No subject


Tue Dec 1 00:55:21 PST 2020


=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=
=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=
=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=
=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  =E2=80=A2 [=E2=80=9CUniversal=E2=80=9D Dune Tip: Rebuild Stuff, Sometimes]


[OCaml Planet] <http://ocaml.org/community/planet/>

[=E2=80=9CUniversal=E2=80=9D Dune Tip: Rebuild Stuff, Sometimes]
<https://seb.mondet.org/b/0009-dune-universe-hack.html>


Old CWN
=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90

  If you happen to miss a CWN, you can [send me a message] and I'll mail
  it to you, or go take a look at [the archive] or the [RSS feed of the
  archives].

  If you also wish to receive it every week by mail, you may subscribe
  [online].

  [Alan Schmitt]


[send me a message] <mailto:alan.schmitt at polytechnique.org>

[the archive] <http://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <http://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <http://alan.petitepomme.net/>


--=-=-=
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

<?xml version=3D"1.0" encoding=3D"utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en">
<head>
<!-- 2020-12-01 Tue 09:50 -->
<meta http-equiv=3D"Content-Type" content=3D"text/html;charset=3Dutf-8" />
<meta name=3D"viewport" content=3D"width=3Ddevice-width, initial-scale=3D1"=
 />
<title>OCaml Weekly News</title>
<meta name=3D"generator" content=3D"Org mode" />
<style type=3D"text/css">
 <!--/*--><![CDATA[/*><!--*/
  .title  { text-align: center;
             margin-bottom: .2em; }
  .subtitle { text-align: center;
              font-size: medium;
              font-weight: bold;
              margin-top:0; }
  .todo   { font-family: monospace; color: red; }
  .done   { font-family: monospace; color: green; }
  .priority { font-family: monospace; color: orange; }
  .tag    { background-color: #eee; font-family: monospace;
            padding: 2px; font-size: 80%; font-weight: normal; }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
  .org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
  .org-center { margin-left: auto; margin-right: auto; text-align: center; }
  .underline { text-decoration: underline; }
  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  p.verse { margin-left: 3%; }
  pre {
    border: 1px solid #ccc;
    box-shadow: 3px 3px 3px #eee;
    padding: 8pt;
    font-family: monospace;
    overflow: auto;
    margin: 1.2em;
  }
  pre.src {
    position: relative;
    overflow: visible;
    padding-top: 1.2em;
  }
  pre.src:before {
    display: none;
    position: absolute;
    background-color: white;
    top: -10px;
    right: 10px;
    padding: 3px;
    border: 1px solid black;
  }
  pre.src:hover:before { display: inline;}
  /* Languages per Org manual */
  pre.src-asymptote:before { content: 'Asymptote'; }
  pre.src-awk:before { content: 'Awk'; }
  pre.src-C:before { content: 'C'; }
  /* pre.src-C++ doesn't work in CSS */
  pre.src-clojure:before { content: 'Clojure'; }
  pre.src-css:before { content: 'CSS'; }
  pre.src-D:before { content: 'D'; }
  pre.src-ditaa:before { content: 'ditaa'; }
  pre.src-dot:before { content: 'Graphviz'; }
  pre.src-calc:before { content: 'Emacs Calc'; }
  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  pre.src-fortran:before { content: 'Fortran'; }
  pre.src-gnuplot:before { content: 'gnuplot'; }
  pre.src-haskell:before { content: 'Haskell'; }
  pre.src-hledger:before { content: 'hledger'; }
  pre.src-java:before { content: 'Java'; }
  pre.src-js:before { content: 'Javascript'; }
  pre.src-latex:before { content: 'LaTeX'; }
  pre.src-ledger:before { content: 'Ledger'; }
  pre.src-lisp:before { content: 'Lisp'; }
  pre.src-lilypond:before { content: 'Lilypond'; }
  pre.src-lua:before { content: 'Lua'; }
  pre.src-matlab:before { content: 'MATLAB'; }
  pre.src-mscgen:before { content: 'Mscgen'; }
  pre.src-ocaml:before { content: 'Objective Caml'; }
  pre.src-octave:before { content: 'Octave'; }
  pre.src-org:before { content: 'Org mode'; }
  pre.src-oz:before { content: 'OZ'; }
  pre.src-plantuml:before { content: 'Plantuml'; }
  pre.src-processing:before { content: 'Processing.js'; }
  pre.src-python:before { content: 'Python'; }
  pre.src-R:before { content: 'R'; }
  pre.src-ruby:before { content: 'Ruby'; }
  pre.src-sass:before { content: 'Sass'; }
  pre.src-scheme:before { content: 'Scheme'; }
  pre.src-screen:before { content: 'Gnu Screen'; }
  pre.src-sed:before { content: 'Sed'; }
  pre.src-sh:before { content: 'shell'; }
  pre.src-sql:before { content: 'SQL'; }
  pre.src-sqlite:before { content: 'SQLite'; }
  /* additional languages in org.el's org-babel-load-languages alist */
  pre.src-forth:before { content: 'Forth'; }
  pre.src-io:before { content: 'IO'; }
  pre.src-J:before { content: 'J'; }
  pre.src-makefile:before { content: 'Makefile'; }
  pre.src-maxima:before { content: 'Maxima'; }
  pre.src-perl:before { content: 'Perl'; }
  pre.src-picolisp:before { content: 'Pico Lisp'; }
  pre.src-scala:before { content: 'Scala'; }
  pre.src-shell:before { content: 'Shell Script'; }
  pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
  /* additional language identifiers per "defun org-babel-execute"
       in ob-*.el */
  pre.src-cpp:before  { content: 'C++'; }
  pre.src-abc:before  { content: 'ABC'; }
  pre.src-coq:before  { content: 'Coq'; }
  pre.src-groovy:before  { content: 'Groovy'; }
  /* additional language identifiers from org-babel-shell-names in
     ob-shell.el: ob-shell is the only babel language using a lambda to put
     the execution function name together. */
  pre.src-bash:before  { content: 'bash'; }
  pre.src-csh:before  { content: 'csh'; }
  pre.src-ash:before  { content: 'ash'; }
  pre.src-dash:before  { content: 'dash'; }
  pre.src-ksh:before  { content: 'ksh'; }
  pre.src-mksh:before  { content: 'mksh'; }
  pre.src-posh:before  { content: 'posh'; }
  /* Additional Emacs modes also supported by the LaTeX listings package */
  pre.src-ada:before { content: 'Ada'; }
  pre.src-asm:before { content: 'Assembler'; }
  pre.src-caml:before { content: 'Caml'; }
  pre.src-delphi:before { content: 'Delphi'; }
  pre.src-html:before { content: 'HTML'; }
  pre.src-idl:before { content: 'IDL'; }
  pre.src-mercury:before { content: 'Mercury'; }
  pre.src-metapost:before { content: 'MetaPost'; }
  pre.src-modula-2:before { content: 'Modula-2'; }
  pre.src-pascal:before { content: 'Pascal'; }
  pre.src-ps:before { content: 'PostScript'; }
  pre.src-prolog:before { content: 'Prolog'; }
  pre.src-simula:before { content: 'Simula'; }
  pre.src-tcl:before { content: 'tcl'; }
  pre.src-tex:before { content: 'TeX'; }
  pre.src-plain-tex:before { content: 'Plain TeX'; }
  pre.src-verilog:before { content: 'Verilog'; }
  pre.src-vhdl:before { content: 'VHDL'; }
  pre.src-xml:before { content: 'XML'; }
  pre.src-nxml:before { content: 'XML'; }
  /* add a generic configuration mode; LaTeX export needs an additional
     (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
  pre.src-conf:before { content: 'Configuration File'; }

  table { border-collapse:collapse; }
  caption.t-above { caption-side: top; }
  caption.t-bottom { caption-side: bottom; }
  td, th { vertical-align:top;  }
  th.org-right  { text-align: center;  }
  th.org-left   { text-align: center;   }
  th.org-center { text-align: center; }
  td.org-right  { text-align: right;  }
  td.org-left   { text-align: left;   }
  td.org-center { text-align: center; }
  dt { font-weight: bold; }
  .footpara { display: inline; }
  .footdef  { margin-bottom: 1em; }
  .figure { padding: 1em; }
  .figure p { text-align: center; }
  .equation-container {
    display: table;
    text-align: center;
    width: 100%;
  }
  .equation {
    vertical-align: middle;
  }
  .equation-label {
    display: table-cell;
    text-align: right;
    vertical-align: middle;
  }
  .inlinetask {
    padding: 10px;
    border: 2px solid gray;
    margin: 10px;
    background: #ffffcc;
  }
  #org-div-home-and-up
   { text-align: right; font-size: 70%; white-space: nowrap; }
  textarea { overflow-x: auto; }
  .linenr { font-size: smaller }
  .code-highlighted { background-color: #ffff00; }
  .org-info-js_info-navigation { border-style: none; }
  #org-info-js_console-label
    { font-size: 10px; font-weight: bold; white-space: nowrap; }
  .org-info-js_search-highlight
    { background-color: #ffff00; color: #000000; font-weight: bold; }
  .org-svg { width: 90%; }
  /*]]>*/-->
</style>
<style type=3D"text/css">#table-of-contents h2 { display: none } .title { d=
isplay: none } .authorname { text-align: right }</style>
<style type=3D"text/css">.outline-2 {border-top: 1px solid black;}</style>
<script type=3D"text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target =3D document.getElementById(id);
   if(null !=3D target) {
     elem.cacheClassElem =3D elem.className;
     elem.cacheClassTarget =3D target.className;
     target.className =3D "code-highlighted";
     elem.className   =3D "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target =3D document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className =3D elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className =3D elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id=3D"content">
<h1 class=3D"title">OCaml Weekly News</h1>
<p>
<a href=3D"http://alan.petitepomme.net/cwn/2020.11.24.html">Previous Week</=
a> <a href=3D"http://alan.petitepomme.net/cwn/index.html">Up</a> <a href=3D=
"http://alan.petitepomme.net/cwn/2020.12.08.html">Next Week</a>
</p>

<p>
Hello
</p>

<p>
Here is the latest OCaml Weekly News, for the week of November 24 to Decemb=
er 01, 2020.
</p>

<div id=3D"table-of-contents">
<h2>Table of Contents</h2>
<div id=3D"text-table-of-contents">
<ul>
<li><a href=3D"#1">drom.0.2.0: OCaml Project Manager, beta release</a></li>
<li><a href=3D"#2">OCaml on the BEAM webinar</a></li>
<li><a href=3D"#3">ocaml-lsp-server 1.3.0</a></li>
<li><a href=3D"#4">OCaml User Survey 2020</a></li>
<li><a href=3D"#5">http-cookie 2.0.0</a></li>
<li><a href=3D"#6">reparse 2.0.0</a></li>
<li><a href=3D"#7">VSCode OCaml Platform v1.5.0</a></li>
<li><a href=3D"#8">Database modelling</a></li>
<li><a href=3D"#9">Opium 0.19.0</a></li>
<li><a href=3D"#10">Operator lookup tool for OCaml</a></li>
<li><a href=3D"#11">Other OCaml News</a></li>
<li><a href=3D"#org04fe27e">Old CWN</a></li>
</ul>
</div>
</div>


<div id=3D"outline-container-org10c5504" class=3D"outline-2">
<h2 id=3D"1">drom.0.2.0: OCaml Project Manager, beta release</h2>
<div class=3D"outline-text-2" id=3D"text-1">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-drom-0-2-0-ocaml-projec=
t-manager-beta-release/6841/1">https://discuss.ocaml.org/t/ann-drom-0-2-0-o=
caml-project-manager-beta-release/6841/1</a>
</p>
</div>

<div id=3D"outline-container-org5ede9d5" class=3D"outline-3">
<h3 id=3D"org5ede9d5">Fabrice Le Fessant announced</h3>
<div class=3D"outline-text-3" id=3D"text-org5ede9d5">
<p>
I am happy to announce the first release of <code>drom</code>, version 0.2.=
0, a
tool to create and manage OCaml projects. <code>drom</code> is a simple lay=
er on
top of <code>opam</code> and <code>dune</code>, with project and package de=
scriptions
written in TOML syntax. It is an attempt at providing a <code>cargo</code>-=
like
experience for developers, with builtin support for standard OCaml
tools (<code>opam</code>, <code>dune</code>, <code>odoc</code>, etc.) and s=
ource managers (Github for
now, with Github Actions and Github Pages).
</p>

<p>
There are mainly 2 use-cases of <code>drom</code>:
</p>

<ul class=3D"org-ul">
<li>Scafolding tool: <code>drom</code> makes it easy to create OCaml projec=
ts by
generating all the files needed for a standard OCaml project. It
creates files for <code>opam</code> and <code>dune</code>, formatters (<cod=
e>ocp-index</code> and
<code>ocamlformat</code>), documentation (<code>sphinx</code> and <code>odo=
c</code>), testing
directories and Github CI. Once these files have been created,
<code>drom</code> is not needed anymore and you can keep using your preferr=
ed
tools.</li>

<li>Management tool: <code>drom</code> can also be used to keep managing the
project afterwards. It has commands like <code>drom build</code> to build t=
he
project, automatically installing a local switch with all needed
dependencies, <code>drom doc</code> to generate the documentation and <code=
>drom
  test</code> to execute tests. <code>drom</code> works as a simple interfa=
ce over
<code>opam</code> and <code>dune</code> so you almost never need to use the=
m directly.</li>
</ul>

<p>
<a href=3D"https://ocamlpro.github.io/drom">https://ocamlpro.github.io/drom=
</a>
</p>

<p>
(this site and the documentation was mostly generated by <code>drom</code> =
itself)
</p>

<p>
<code>drom</code> is available in the official opam repository.
</p>

<p>
Examples:
</p>

<pre class=3D"example">
$ drom new mylib --skeleton library // generate library project
                                    //           or
$ drom new hello                    // generate program project

$ cd hello
$ emacs drom.toml // edit the project description
$ drom project    // update files
$ drom build                  // create local switch and build
                              //      or
$ drom build --switch 4.10.0  // use global switch and build
$ ./hello         // run the executable
$ drom test       // run tests
$ drom install    // install in opam switch
</pre>

<p>
This is an early release to get feedback from users. <code>drom</code> has =
been
tested on several of our internal projects, like <code>opam-bin</code> and
<code>ez_file</code>.
</p>

<p>
Since <code>drom</code> creates local <code>opam</code> switches for every =
project by
default (though it is possible to use global switches too), it is
advised to use it with <code>opam-bin</code> to speed up switch creation and
upgrades.
</p>

<p>
<code>drom</code> works by creating projects using "skeletons", i.e. projec=
t and
package templates. <code>drom</code> comes with a few predefined skeletons
(<code>program</code> or <code>library</code>), and allows users to add the=
ir own
skeletons. We will of course extend the substitution language to help
users develop such new skeletons.
</p>

<p>
<code>drom</code> is a collaborative work between OCamlPro and Origin Labs.
</p>
</div>
</div>


<div id=3D"outline-container-org02a2d44" class=3D"outline-3">
<h3 id=3D"org02a2d44">Fran=C3=A7ois Bobot asked and Fabrice Le Fessant repl=
ied</h3>
<div class=3D"outline-text-3" id=3D"text-org02a2d44">
<blockquote>
<p>
I'm very happy to see work in the OCaml world in that direction. I was curr=
ently looking for
duniverse for that kind of need. Do they fullfil different needs or how do =
they compare?
</p>
</blockquote>

<p>
My understanding is that <code>duniverse</code> tackles the problem of the
"mono-repo", i.e. when you want to manage many different projects as
just one project, using <code>dune</code> capacity to build them all at onc=
e. I
would say that <code>drom</code> tackles an orthogonal problem, which is to
simplify the creation of simple OCaml projects (generating all the
standard files you need, like Makefile, dune-project, dune,
.ocamlformat, .github CI, documentation, license, etc.) and day-to-day
management (changing dependencies, having a copy of headers that you
can insert in new files, etc.). It also provides a single interface
over basic opam/dune commands.
</p>

<p>
It would probably be possible to use <code>duninverse</code> on a set of pr=
ojects
containing projects generated by <code>dune</code>, but I don't know enough=
 about
<code>duniverse</code> to be sure.
</p>

<p>
Of course, <code>drom</code> can manage projects composed of multiple libra=
ries
and executables (called <code>packages</code> because <code>drom</code> gen=
erates one <code>opam</code>
file for every one of them), but I wouldn't call that a mono-repo,
it's just frequent to have more than one package in a small project.
</p>
</div>
</div>
</div>




<div id=3D"outline-container-orgcd1006f" class=3D"outline-2">
<h2 id=3D"2">OCaml on the BEAM webinar</h2>
<div class=3D"outline-text-2" id=3D"text-2">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ocaml-on-the-beam-webinar/6=
851/1">https://discuss.ocaml.org/t/ocaml-on-the-beam-webinar/6851/1</a>
</p>
</div>

<div id=3D"outline-container-org8ea2d09" class=3D"outline-3">
<h3 id=3D"org8ea2d09">Yawar Amin announced</h3>
<div class=3D"outline-text-3" id=3D"text-org8ea2d09">
<p>
Erlang Solutions is going to do a webinar on Leandro Ostera's new BEAM back=
end for OCaml:
<a href=3D"https://www2.erlang-solutions.com/webinar-registration-2">https:=
//www2.erlang-solutions.com/webinar-registration-2</a>
</p>

<p>
Should be exciting!
</p>
</div>
</div>
</div>




<div id=3D"outline-container-org2aa94d5" class=3D"outline-2">
<h2 id=3D"3">ocaml-lsp-server 1.3.0</h2>
<div class=3D"outline-text-2" id=3D"text-3">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-ocaml-lsp-server-1-3-0/=
6856/1">https://discuss.ocaml.org/t/ann-ocaml-lsp-server-1-3-0/6856/1</a>
</p>
</div>

<div id=3D"outline-container-org5d4baea" class=3D"outline-3">
<h3 id=3D"org5d4baea">Rudi Grinberg announced</h3>
<div class=3D"outline-text-3" id=3D"text-org5d4baea">
<p>
On behalf of the ocaml-lsp team, I=E2=80=99d like to announce version 1.3.0.
</p>

<p>
This release an improvement in keyword completion and a new code action. Ke=
ywords are now filtered by
the context the user requested the completion, and there's a new code actio=
n to quickly populate .mli
files with the the inferred types from the .ml file.
</p>
</div>
</div>
</div>




<div id=3D"outline-container-orgd14af62" class=3D"outline-2">
<h2 id=3D"4">OCaml User Survey 2020</h2>
<div class=3D"outline-text-2" id=3D"text-4">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-ocaml-user-survey-2020/=
6624/28">https://discuss.ocaml.org/t/ann-ocaml-user-survey-2020/6624/28</a>
</p>
</div>

<div id=3D"outline-container-orge847278" class=3D"outline-3">
<h3 id=3D"orge847278">Xavier Leroy announced</h3>
<div class=3D"outline-text-3" id=3D"text-orge847278">
<p>
Here is a summary and analysis of the survey results I wrote on behalf of t=
he OCaml Software
Foundation: <a href=3D"https://www.dropbox.com/s/omba1d8vhljnrcn/OCaml-user=
-survey-2020.pdf?dl=3D0">https://www.dropbox.com/s/omba1d8vhljnrcn/OCaml-us=
er-survey-2020.pdf?dl=3D0</a>
Enjoy!
</p>
</div>
</div>
</div>




<div id=3D"outline-container-org3524013" class=3D"outline-2">
<h2 id=3D"5">http-cookie 2.0.0</h2>
<div class=3D"outline-text-2" id=3D"text-5">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-http-cookie-2-0-0/6866/=
1">https://discuss.ocaml.org/t/ann-http-cookie-2-0-0/6866/1</a>
</p>
</div>

<div id=3D"outline-container-orgce4f2b4" class=3D"outline-3">
<h3 id=3D"orgce4f2b4">Bikal Lem announced</h3>
<div class=3D"outline-text-3" id=3D"text-orgce4f2b4">
<p>
A new version of <code>cookies</code> package - now named <code>http-cookie=
</code>-  has been released to opam. This
version has been rewritten to remove all its external and ppx dependencies =
and now only depends on
stock ocaml and its stdlib.
</p>

<p>
<code>http-cookie</code> is a <a href=3D"https://tools.ietf.org/html/rfc626=
5">RFC 6265</a> compliant HTTP cookie library.
RFC 6265 is a HTTP cookie standard specifying cookie data validity requirem=
ents.
</p>

<p>
Additionally, I have also removed the use of <code>Result.t</code> from the=
 previous version and have used
plain old exceptions to denote any cookie data validation errors.
</p>

<ul class=3D"org-ul">
<li><a href=3D"https://github.com/lemaetech/http-cookie">Github - http-cook=
ie</a></li>
<li><a href=3D"https://lemaetech.co.uk/http-cookie/">Docs - http-cookie</a>=
</li>
</ul>
</div>
</div>
</div>




<div id=3D"outline-container-org14723cf" class=3D"outline-2">
<h2 id=3D"6">reparse 2.0.0</h2>
<div class=3D"outline-text-2" id=3D"text-6">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-reparse-2-0-0/6868/1">h=
ttps://discuss.ocaml.org/t/ann-reparse-2-0-0/6868/1</a>
</p>
</div>

<div id=3D"outline-container-org743431e" class=3D"outline-3">
<h3 id=3D"org743431e">Bikal Lem announced</h3>
<div class=3D"outline-text-3" id=3D"text-org743431e">
<p>
A new version of <code>reparse</code> 2.0.0 has been released to opam.
</p>

<p>
Reparse is a monadic, recursive descent based, comprehensive, parser constr=
uction library for ocaml.
</p>
</div>

<div id=3D"outline-container-org957685f" class=3D"outline-4">
<h4 id=3D"org957685f">CHANGES for version 2.0.0:</h4>
<div class=3D"outline-text-4" id=3D"text-org957685f">
<ul class=3D"org-ul">
<li>Rewrite the whole package to use exceptions rather than <code>result</c=
ode> type</li>
<li>Adds many more parsing combinators</li>
<li>Adds comprehensive unit tests</li>
<li>Adds comprehensive documentation, host documentation and add links in r=
epo home page</li>
<li>Adds abstraction for input source</li>
<li>Provides unix file source and string input source</li>
<li>Adds separate package <code>reparse-unix</code> for unix file input</li>
<li>Adds calc.ml and json.ml in examples.</li>
</ul>

<p>
Additionally, the API is now comprehensively documented with at least an ex=
ample for each API call.
</p>

<ul class=3D"org-ul">
<li><a href=3D"https://github.com/lemaetech/reparse">Github Reparse</a></li>
<li><a href=3D"https://lemaetech.co.uk/reparse/">API Docs</a></li>
</ul>
</div>
</div>
</div>
</div>




<div id=3D"outline-container-orgf309e0c" class=3D"outline-2">
<h2 id=3D"7">VSCode OCaml Platform v1.5.0</h2>
<div class=3D"outline-text-2" id=3D"text-7">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-vscode-ocaml-platform-v=
1-5-0/6871/1">https://discuss.ocaml.org/t/ann-vscode-ocaml-platform-v1-5-0/=
6871/1</a>
</p>
</div>

<div id=3D"outline-container-org872f0ac" class=3D"outline-3">
<h3 id=3D"org872f0ac">Max Lantas announced</h3>
<div class=3D"outline-text-3" id=3D"text-org872f0ac">
<p>
We are happy to announce the v1.5.0 release of <a href=3D"https://github.co=
m/ocamllabs/vscode-ocaml-platform">VSCode OCaml
Platform</a>, a Visual Studio Code extension for
OCaml. It is available on the <a href=3D"https://marketplace.visualstudio.c=
om/items?itemName=3Docamllabs.ocaml-platform">VSCode
Marketplace</a> and <a href=3D"https://open-vsx.org/extension/ocamllabs/oca=
ml-platform">Open
VSX Registry</a>.
</p>

<p>
This release has the following changes:
</p>
<ul class=3D"org-ul">
<li>Highlight <code>rec</code> keyword in OCaml mli files for recursive mod=
ules (<a href=3D"https://github.com/ocamllabs/vscode-ocaml-platform/pull/43=
4">#434</a>)</li>
<li>Highlight <code>cram</code> stanza in dune-project files (<a href=3D"ht=
tps://github.com/ocamllabs/vscode-ocaml-platform/pull/441">#441</a>)</li>
<li>Fix reason highlighting of let extensions (<a href=3D"https://github.co=
m/ocamllabs/vscode-ocaml-platform/pull/447">#447</a>)</li>
<li>Improve highlighting of Menhir new syntax (<a href=3D"https://github.co=
m/ocamllabs/vscode-ocaml-platform/pull/450">#450</a>)</li>
<li>Improve Menhir syntax highlighting (<a href=3D"https://github.com/ocaml=
labs/vscode-ocaml-platform/pull/455">#455</a>)</li>
<li>Add <code>Alt + P</code> keyboard shortcut for infer interface code act=
ion (<a href=3D"https://github.com/ocamllabs/vscode-ocaml-platform/pull/448=
">#448</a>)</li>
<li>Infer interface when switching to a non-existing interface file (<a hre=
f=3D"https://github.com/ocamllabs/vscode-ocaml-platform/pull/437">#437</a>)=
</li>
</ul>

<p>
This is the first release to be automatically published to Open VSX, which =
will benefit users of
<a href=3D"https://github.com/VSCodium/vscodium">VSCodium</a> and other edi=
tors.
</p>

<p>
Please feel free to share feedback.
</p>
</div>
</div>
</div>




<div id=3D"outline-container-org5fe0baf" class=3D"outline-2">
<h2 id=3D"8">Database modelling</h2>
<div class=3D"outline-text-2" id=3D"text-8">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/database-modelling/1150/2">=
https://discuss.ocaml.org/t/database-modelling/1150/2</a>
</p>
</div>

<div id=3D"outline-container-org5933ca2" class=3D"outline-3">
<h3 id=3D"org5933ca2">Reviving this very old thread, paul announced</h3>
<div class=3D"outline-text-3" id=3D"text-org5933ca2">
<p>
And a version for postgresql:
<a href=3D"https://github.com/pat227/ocaml-pgsql-model.git">https://github.=
com/pat227/ocaml-pgsql-model.git</a>
</p>
</div>
</div>
</div>




<div id=3D"outline-container-org1428f0f" class=3D"outline-2">
<h2 id=3D"9">Opium 0.19.0</h2>
<div class=3D"outline-text-2" id=3D"text-9">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-opium-0-19-0/6876/1">ht=
tps://discuss.ocaml.org/t/ann-opium-0-19-0/6876/1</a>
</p>
</div>

<div id=3D"outline-container-org15a58bc" class=3D"outline-3">
<h3 id=3D"org15a58bc">Thibaut Mattio announced</h3>
<div class=3D"outline-text-3" id=3D"text-org15a58bc">
<p>
On behalf of the Opium team, I am pleased to announce a new version of Opiu=
m (<code>0.19.0</code>) is available on
Opam.
</p>

<p>
This release comes with a complete rewrite of Opium's internals to switch f=
rom Cohttp to Httpaf (work
done by @anuragsoni).
</p>

<p>
As demonstrated in several benchmarks, Httpaf's latency is much lower than =
Cohttp's in stress tests, so
it is expected that Opium will perform better in these high-pressure situat=
ions.
</p>

<p>
The underlying HTTP server implementation is now contained in a <code>rock<=
/code> package, that provides a Service
and Filter implementation, inspired by Finagle's. The architecture is simil=
ar to Ruby's Rack library
(hence the name), so one can compose complex web applications by combining =
Rock applications.
</p>

<p>
The <code>rock</code> package offers a very slim API, with very few depende=
ncies, so it should be an attractive
option for other Web frameworks to build on, which would allow the re-usabi=
lity of middlewares and
handlers, independently of the framework used (e.g. one could use Sihl midd=
lewares with Opium, and vice
versa).
</p>

<p>
Apart from the architectural changes, this release comes with a lot of addi=
tional utilities and
middlewares which should make Opium a better candidate for complex web appl=
ications, without having to
re-write a lot of common Web server functionalities.
</p>

<p>
The Request and Response modules now provide:
</p>
<ul class=3D"org-ul">
<li>JSON encoders/decoders with <code>Yojson</code></li>
<li>HTML encoders/decoders with <code>Tyxml</code></li>
<li>XML encoders/decoders with <code>Tyxml</code></li>
<li>SVG encoders/decoders with <code>Tyxml</code></li>
<li>multipart/form encoders/decoders with <code>multipart_form_data</code><=
/li>
<li>urlencoded encoders/decoders with <code>Uri</code></li>
</ul>

<p>
And the following middlewares are now built-in:
</p>
<ul class=3D"org-ul">
<li><code>debugger</code> to display an HTML page with the errors in case o=
f failures</li>
<li><code>logger</code> to log requests and responses, with a timer</li>
<li><code>allow_cors</code> to add CORS headers</li>
<li><code>static</code> to serve static content given a custom read functio=
n (e.g. read from S3)</li>
<li><code>static_unix</code> to serve static content from the local filesys=
tem</li>
<li><code>content_length</code> to add the <code>Content-Length</code> head=
er to responses</li>
<li><code>method_override</code> to replace the HTTP method with the one fo=
und in the <code>_method</code> field of <code>application/x-www-form-urlen=
coded</code> encoded <code>POST</code> requests.</li>
<li><code>etag</code> to add <code>ETag</code> header to the responses and =
send an HTTP code <code>304</code> when the computed ETag matches the one s=
pecified in the request.</li>
<li><code>method_required</code> to filter the requests by the HTTP method =
and respond with an HTTP code <code>405</code> if the method is not allowed=
.</li>
<li><code>head</code> to add supports for <code>HEAD</code> request for han=
dlers that receive <code>GET</code> requests.</li>
</ul>

<p>
Lastly, this release also adds a package <code>opium-testing</code> that ca=
n be used to test Opium applications
with Alcotest. It provides <code>Testable</code> modules for every Opium ty=
pes, and implements helper functions to
easily get an <code>Opium.Response</code> from an <code>Opium.Request</code=
>.
</p>

<p>
As this release changes the API drastically, we will keep maintaining the <=
code>0.18.0</code> branch for bug
fixes, for users who don't want to (or can't) migrate to <code>0.19.0</code=
>.
</p>
</div>

<div id=3D"outline-container-org0eba00c" class=3D"outline-4">
<h4 id=3D"org0eba00c">What's next?</h4>
<div class=3D"outline-text-4" id=3D"text-org0eba00c">
<p>
Recent discussions have shown that building optimized applications was not =
trivial. This is partly due
to the lack of documentation, and probably because some configurations that=
 should come by default, are
left to the user to optimize. Therefore, we will keep performance in mind f=
or the next release and
investigate the current bottlenecks in Opium.
</p>

<p>
We will also continue adding higher-level functionalities to Opium to make =
users productive with
real-world applications. This includes:
</p>
<ul class=3D"org-ul">
<li>Sessions support (with signed cookies)</li>
<li>Handlers for authentication</li>
<li>Adding more middlewares (compression, flash messages, caching, etc.)</l=
i>
</ul>

<p>
Your feedback is welcome, don't hesitate to open Issues on Github!
</p>
</div>
</div>
</div>


<div id=3D"outline-container-org01342ca" class=3D"outline-3">
<h3 id=3D"org01342ca">Andreas Poisel asked and Anurag Soni replied</h3>
<div class=3D"outline-text-3" id=3D"text-org01342ca">
<blockquote>
<p>
Does Opium + Httpaf support TLS?
</p>
</blockquote>

<p>
It doesn't at the moment.
</p>
</div>
</div>


<div id=3D"outline-container-orgd202d91" class=3D"outline-3">
<h3 id=3D"orgd202d91">Calascibetta Romain then said</h3>
<div class=3D"outline-text-3" id=3D"text-orgd202d91">
<p>
According the interface of <code>opium</code>, it's possible to have the su=
pport of TLS (with <code>ocaml-tls</code>) with
the <a href=3D"https://discuss.ocaml.org/t/ann-new-release-of-conduit/6611"=
>new version of Conduit</a> and
<a href=3D"https://github.com/dinosaure/paf-le-chien/"><code>paf</code></a>=
 (which is a MirageOS compatible layer of HTTP/AF -
unreleased):
</p>

<div class=3D"org-src-container">
<pre class=3D"src src-ocaml"><span style=3D"color: #000000; font-weight: bo=
ld;">let</span> <span style=3D"color: #0000ff;">stack</span> <span style=3D=
"color: #a0522d;">ip</span> =3D
  <span style=3D"color: #228b22;">Tcpip_stack_socket.UDPV4.</span>connect (=
<span style=3D"color: #000000; background-color: #ffffff;">Some</span> ip) =
&gt;&gt;=3D <span style=3D"color: #a020f0;">fun</span> <span style=3D"color=
: #a0522d;">udpv4</span> -&gt;
  <span style=3D"color: #228b22;">Tcpip_stack_socket.TCPV4.</span>connect (=
<span style=3D"color: #000000; background-color: #ffffff;">Some</span> ip) =
&gt;&gt;=3D <span style=3D"color: #a020f0;">fun</span> <span style=3D"color=
: #a0522d;">tcpv4</span> -&gt;
  <span style=3D"color: #228b22;">Tcpip_stack_socket.</span>connect [ ip ] =
udpv4 tcpv4

<span style=3D"color: #000000; font-weight: bold;">let</span> <span style=
=3D"color: #0000ff;">http_with_conduit</span> (<span style=3D"color: #a0522=
d;">ip</span>, <span style=3D"color: #a0522d;">port</span>) <span style=3D"=
color: #a0522d;">error_handler</span> <span style=3D"color: #a0522d;">reque=
st_handler</span> =3D
  <span style=3D"color: #228b22;">Paf.</span>https httpaf_config ~error_han=
dler <span style=3D"color: #008b8b;">~request_handler</span>:(<span style=
=3D"color: #a020f0;">fun</span> <span style=3D"color: #a0522d;">_</span> -&=
gt; request_handler)
    ({ <span style=3D"color: #228b22;">Paf.TCP.</span>stack=3D stack ip
     ; keepalive=3D <span style=3D"color: #000000; background-color: #fffff=
f;">None</span>
     ; nodelay=3D <span style=3D"color: #008b8b;">false</span>
     ; port=3D port}, <span style=3D"color: #228b22;">Tls.Config.</span>ser=
ver ~certificates ())

<span style=3D"color: #000000; font-weight: bold;">let</span> () =3D <span =
style=3D"color: #a020f0;">match</span> <span style=3D"color: #228b22;">Lwt_=
main.</span>run (<span style=3D"color: #228b22;">Opium.</span>run (https_wi=
th_conduit (<span style=3D"color: #228b22;">Ipaddr.V4.</span>localhost, 434=
3)) opium_app) <span style=3D"color: #a020f0;">with</span>
  | <span style=3D"color: #000000; background-color: #ffffff;">Ok</span> ()=
 -&gt; ()
  | <span style=3D"color: #000000; background-color: #ffffff;">Error</span>=
 err -&gt; <span style=3D"color: #228b22;">Fmt.</span>epr <span style=3D"co=
lor: #8b2252;">"%a.\n%!"</span> <span style=3D"color: #228b22;">Conduit_mir=
age.</span>pp_error err
</pre>
</div>

<p>
I used it for a long time on my personal unikernels and did some tests to e=
nsure that <a href=3D"https://github.com/dinosaure/paf-le-chien/pull/12">it=
 does fails
when it handles many requests</a>. Note that you are
able to use OpenSSL too if you want.
</p>
</div>
</div>


<div id=3D"outline-container-org2638bf7" class=3D"outline-3">
<h3 id=3D"org2638bf7">Robin Bj=C3=B6rklin also replied</h3>
<div class=3D"outline-text-3" id=3D"text-org2638bf7">
<p>
If you want to use this new version of Opium there are ways around this pro=
blem. You could have Haproxy
(or similar) terminate your TLS connections externally and if your environm=
ent requires TLS for your
internal network something like <a href=3D"https://learn.hashicorp.com/tuto=
rials/consul/get-started-service-networking?in=3Dconsul/getting-started">Co=
nsul
Connect</a>
can cover that use-case for you.
</p>
</div>
</div>
</div>




<div id=3D"outline-container-org3bff1b8" class=3D"outline-2">
<h2 id=3D"10">Operator lookup tool for OCaml</h2>
<div class=3D"outline-text-2" id=3D"text-10">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/ann-operator-lookup-tool-fo=
r-ocaml/6882/1">https://discuss.ocaml.org/t/ann-operator-lookup-tool-for-oc=
aml/6882/1</a>
</p>
</div>

<div id=3D"outline-container-org8d3d4da" class=3D"outline-3">
<h3 id=3D"org8d3d4da">Craig Ferguson announced</h3>
<div class=3D"outline-text-3" id=3D"text-org8d3d4da">
<p>
I'm pleased to announce the initial release of craigfe.io/operator-lookup/,=
 a search tool for OCaml
operators and syntax elements:
</p>


<div class=3D"figure">
<p><img src=3D"https://aws1.discourse-cdn.com/standard11/uploads/ocaml/opti=
mized/2X/e/ee41569b4426c9b77fd6d367e50ff5ac759f4e46_2_1034x558.png" alt=3D"=
ee41569b4426c9b77fd6d367e50ff5ac759f4e46_2_1034x558.png" />
</p>
</div>

<p>
For each operator, the tool provides a short explanation of its behaviour, =
examples of usage and
warnings of common misuses and misunderstandings:
</p>


<div class=3D"figure">
<p><img src=3D"https://aws1.discourse-cdn.com/standard11/uploads/ocaml/opti=
mized/2X/8/879ae652a8895fa0258bc288c8d0c819cb9ef314_2_920x1000.png" alt=3D"=
879ae652a8895fa0258bc288c8d0c819cb9ef314_2_920x1000.png" />
</p>
</div>

<p>
The intent of writing this tool was to give OCaml beginners a quick way to =
find the standard /
conventional operators in the language and to disambiguate "operator-like" =
syntax that can be hard to
search for otherwise. It currently supports:
</p>

<ul class=3D"org-ul">
<li>all standard library operators,</li>
<li>conventional infix operators (<code>&gt;&gt;=3D</code>, <code>&gt;&gt;|=
</code>, <code>&gt;|=3D</code>),</li>
<li>binding operators (<code>let+</code>, <code>let*</code>, <code>and+</co=
de>, etc.),</li>
<li>syntax that is often confused for an operator (<code>#</code>, <code>;;=
</code>).</li>
</ul>

<p>
Please let me know if you have any suggestions for improvements. I hope you=
 find it useful!
</p>
</div>

<div id=3D"outline-container-org3b0cfe8" class=3D"outline-4">
<h4 id=3D"org3b0cfe8">Acknowledgements</h4>
<div class=3D"outline-text-4" id=3D"text-org3b0cfe8">
<p>
This tool is heavily based on the <a href=3D"https://www.joshwcomeau.com/op=
erator-lookup/">JavaScript operator
lookup</a> utility by <a href=3D"https://twitter.com/JoshWComeau">Josh
Comeau</a>. Thanks to him for the initial idea and for allowing me to
re-use his design elements.
</p>
</div>
</div>
</div>


<div id=3D"outline-container-org47de08f" class=3D"outline-3">
<h3 id=3D"org47de08f">Kakadu asked and Craig Ferguson replied</h3>
<div class=3D"outline-text-3" id=3D"text-org47de08f">
<blockquote>
<p>
It's not obvious for me are these operators hardcoded or do you scan opam p=
ackages from time to time?
</p>
</blockquote>

<p>
They're hardcoded. The operators fall into three classes:
</p>

<ul class=3D"org-ul">
<li>The vast majority of them are from the <code>Stdlib</code> module, so I=
 don't expect those to change very regularly.</li>

<li>A small number of  "conventional" operators used in the community (<cod=
e>&gt;&gt;=3D</code>, <code>let*</code>, etc.). Even for that small set the=
re is some divergence in Opam =E2=80=93 c.f. <code>&gt;&gt;|</code> vs <cod=
e>&gt;|=3D</code> for a <span class=3D"underline">map</span> operator =E2=
=80=93 so I suspect there are not many other candidates for this group.</li>

<li>There are a few regexes behind the scenes for catching valid operator n=
ames that don't fall into the first two categories. e.g. many search terms =
are classified as "_a left-associative operator_" with a correspondingly va=
gue description.</li>
</ul>
</div>
</div>
</div>




<div id=3D"outline-container-org676a63f" class=3D"outline-2">
<h2 id=3D"11">Other OCaml News</h2>
<div class=3D"outline-text-2" id=3D"text-11">
</div>
<div id=3D"outline-container-org87f0038" class=3D"outline-3">
<h3 id=3D"org87f0038">From the ocamlcore planet blog</h3>
<div class=3D"outline-text-3" id=3D"text-org87f0038">
<p>
Here are links from many OCaml blogs aggregated at <a href=3D"http://ocaml.=
org/community/planet/">OCaml Planet</a>.
</p>

<ul class=3D"org-ul">
<li><a href=3D"https://seb.mondet.org/b/0009-dune-universe-hack.html">=E2=
=80=9CUniversal=E2=80=9D Dune Tip: Rebuild Stuff, Sometimes</a></li>
</ul>
</div>
</div>
</div>




<div id=3D"outline-container-org04fe27e" class=3D"outline-2">
<h2 id=3D"org04fe27e">Old CWN</h2>
<div class=3D"outline-text-2" id=3D"text-org04fe27e">
<p>
If you happen to miss a CWN, you can <a href=3D"mailto:alan.schmitt at polytec=
hnique.org">send me a message</a> and I'll mail it to you, or go take a loo=
k at <a href=3D"http://alan.petitepomme.net/cwn/">the archive</a> or the <a=
 href=3D"http://alan.petitepomme.net/cwn/cwn.rss">RSS feed of the archives<=
/a>.
</p>

<p>
If you also wish to receive it every week by mail, you may subscribe <a hre=
f=3D"http://lists.idyll.org/listinfo/caml-news-weekly/">online</a>.
</p>

<div class=3D"authorname">
<p>
<a href=3D"http://alan.petitepomme.net/">Alan Schmitt</a>
</p>

</div>
</div>
</div>
</div>
</body>
</html>


--=-=-=--



More information about the caml-news-weekly mailing list