caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <>
To: "lwn" <>, "cwn"  <>,,
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 01 Dec 2020 09:54:57 +0100	[thread overview]
Message-ID: <> (raw)

[-- Attachment #1: Type: text/plain, Size: 22326 bytes --]


Here is the latest OCaml Weekly News, for the week of November 24 to
December 01, 2020.

Table of Contents

drom.0.2.0: OCaml Project Manager, beta release
OCaml on the BEAM webinar
ocaml-lsp-server 1.3.0
OCaml User Survey 2020
http-cookie 2.0.0
reparse 2.0.0
VSCode OCaml Platform v1.5.0
Database modelling
Opium 0.19.0
Operator lookup tool for OCaml
Other OCaml News

drom.0.2.0: OCaml Project Manager, beta release


Fabrice Le Fessant announced

  I am happy to announce the first release of `drom', version 0.2.0, a
  tool to create and manage OCaml projects. `drom' is a simple layer on
  top of `opam' and `dune', with project and package descriptions
  written in TOML syntax. It is an attempt at providing a `cargo'-like
  experience for developers, with builtin support for standard OCaml
  tools (`opam', `dune', `odoc', etc.) and source managers (Github for
  now, with Github Actions and Github Pages).

  There are mainly 2 use-cases of `drom':

  • Scafolding tool: `drom' makes it easy to create OCaml projects by
    generating all the files needed for a standard OCaml project. It
    creates files for `opam' and `dune', formatters (`ocp-index' and
    `ocamlformat'), documentation (`sphinx' and `odoc'), testing
    directories and Github CI. Once these files have been created,
    `drom' is not needed anymore and you can keep using your preferred

  • Management tool: `drom' can also be used to keep managing the
    project afterwards. It has commands like `drom build' to build the
    project, automatically installing a local switch with all needed
    dependencies, `drom doc' to generate the documentation and `drom
    test' to execute tests. `drom' works as a simple interface over
    `opam' and `dune' so you almost never need to use them directly.


  (this site and the documentation was mostly generated by `drom'

  `drom' is available in the official opam repository.


  │ $ 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

  This is an early release to get feedback from users. `drom' has been
  tested on several of our internal projects, like `opam-bin' and

  Since `drom' creates local `opam' switches for every project by
  default (though it is possible to use global switches too), it is
  advised to use it with `opam-bin' to speed up switch creation and

  `drom' works by creating projects using "skeletons", i.e. project and
  package templates. `drom' comes with a few predefined skeletons
  (`program' or `library'), and allows users to add their own
  skeletons. We will of course extend the substitution language to help
  users develop such new skeletons.

  `drom' is a collaborative work between OCamlPro and Origin Labs.

François Bobot asked and Fabrice Le Fessant replied

        I'm very happy to see work in the OCaml world in that
        direction. I was currently looking for duniverse for that
        kind of need. Do they fullfil different needs or how do
        they compare?

  My understanding is that `duniverse' tackles the problem of the
  "mono-repo", i.e. when you want to manage many different projects as
  just one project, using `dune' capacity to build them all at once. I
  would say that `drom' 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.

  It would probably be possible to use `duninverse' on a set of projects
  containing projects generated by `dune', but I don't know enough about
  `duniverse' to be sure.

  Of course, `drom' can manage projects composed of multiple libraries
  and executables (called `packages' because `drom' generates one `opam'
  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.

OCaml on the BEAM webinar


Yawar Amin announced

  Erlang Solutions is going to do a webinar on Leandro Ostera's new BEAM
  backend for OCaml:

  Should be exciting!

ocaml-lsp-server 1.3.0


Rudi Grinberg announced

  On behalf of the ocaml-lsp team, I’d like to announce version 1.3.0.

  This release an improvement in keyword completion and a new code
  action. Keywords are now filtered by the context the user requested
  the completion, and there's a new code action to quickly populate .mli
  files with the the inferred types from the .ml file.

OCaml User Survey 2020


Xavier Leroy announced

  Here is a summary and analysis of the survey results I wrote on behalf
  of the OCaml Software Foundation:

http-cookie 2.0.0

  Archive: <>

Bikal Lem announced

  A new version of `cookies' package - now named `http-cookie'- 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.

  `http-cookie' is a [RFC 6265] compliant HTTP cookie library.  RFC 6265
  is a HTTP cookie standard specifying cookie data validity

  Additionally, I have also removed the use of `Result.t' from the
  previous version and have used plain old exceptions to denote any
  cookie data validation errors.

  • [Github - http-cookie]
  • [Docs - http-cookie]

[RFC 6265] <>

[Github - http-cookie] <>

[Docs - http-cookie] <>

reparse 2.0.0

  Archive: <>

Bikal Lem announced

  A new version of `reparse' 2.0.0 has been released to opam.

  Reparse is a monadic, recursive descent based, comprehensive, parser
  construction library for ocaml.

CHANGES for version 2.0.0:

  • Rewrite the whole package to use exceptions rather than `result'
  • Adds many more parsing combinators
  • Adds comprehensive unit tests
  • Adds comprehensive documentation, host documentation and add links
    in repo home page
  • Adds abstraction for input source
  • Provides unix file source and string input source
  • Adds separate package `reparse-unix' for unix file input
  • Adds and in examples.

  Additionally, the API is now comprehensively documented with at least
  an example for each API call.

  • [Github Reparse]
  • [API Docs]

[Github Reparse] <>

[API Docs] <>

VSCode OCaml Platform v1.5.0


Max Lantas announced

  We are happy to announce the v1.5.0 release of [VSCode OCaml
  Platform], a Visual Studio Code extension for OCaml. It is available
  on the [VSCode Marketplace] and [Open VSX Registry].

  This release has the following changes:
  • Highlight `rec' keyword in OCaml mli files for recursive modules
  • Highlight `cram' stanza in dune-project files ([#441])
  • Fix reason highlighting of let extensions ([#447])
  • Improve highlighting of Menhir new syntax ([#450])
  • Improve Menhir syntax highlighting ([#455])
  • Add `Alt + P' keyboard shortcut for infer interface code action
  • Infer interface when switching to a non-existing interface file

  This is the first release to be automatically published to Open VSX,
  which will benefit users of [VSCodium] and other editors.

  Please feel free to share feedback.

[VSCode OCaml Platform]

[VSCode Marketplace]

[Open VSX Registry]

[#434] <>

[#441] <>

[#447] <>

[#450] <>

[#455] <>

[#448] <>

[#437] <>

[VSCodium] <>

Database modelling

  Archive: <>

Reviving this very old thread, paul announced

  And a version for postgresql:

Opium 0.19.0

  Archive: <>

Thibaut Mattio announced

  On behalf of the Opium team, I am pleased to announce a new version of
  Opium (`0.19.0') is available on Opam.

  This release comes with a complete rewrite of Opium's internals to
  switch from Cohttp to Httpaf (work done by @anuragsoni).

  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 situations.

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

  The `rock' package offers a very slim API, with very few dependencies,
  so it should be an attractive option for other Web frameworks to build
  on, which would allow the re-usability of middlewares and handlers,
  independently of the framework used (e.g. one could use Sihl
  middlewares with Opium, and vice versa).

  Apart from the architectural changes, this release comes with a lot of
  additional utilities and middlewares which should make Opium a better
  candidate for complex web applications, without having to re-write a
  lot of common Web server functionalities.

  The Request and Response modules now provide:
  • JSON encoders/decoders with `Yojson'
  • HTML encoders/decoders with `Tyxml'
  • XML encoders/decoders with `Tyxml'
  • SVG encoders/decoders with `Tyxml'
  • multipart/form encoders/decoders with `multipart_form_data'
  • urlencoded encoders/decoders with `Uri'

  And the following middlewares are now built-in:
  • `debugger' to display an HTML page with the errors in case of
  • `logger' to log requests and responses, with a timer
  • `allow_cors' to add CORS headers
  • `static' to serve static content given a custom read function
    (e.g. read from S3)
  • `static_unix' to serve static content from the local filesystem
  • `content_length' to add the `Content-Length' header to responses
  • `method_override' to replace the HTTP method with the one found in
    the `_method' field of `application/x-www-form-urlencoded' encoded
    `POST' requests.
  • `etag' to add `ETag' header to the responses and send an HTTP code
    `304' when the computed ETag matches the one specified in the
  • `method_required' to filter the requests by the HTTP method and
    respond with an HTTP code `405' if the method is not allowed.
  • `head' to add supports for `HEAD' request for handlers that receive
    `GET' requests.

  Lastly, this release also adds a package `opium-testing' that can be
  used to test Opium applications with Alcotest. It provides `Testable'
  modules for every Opium types, and implements helper functions to
  easily get an `Opium.Response' from an `Opium.Request'.

  As this release changes the API drastically, we will keep maintaining
  the `0.18.0' branch for bug fixes, for users who don't want to (or
  can't) migrate to `0.19.0'.

What's next?

  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 for the next release and investigate the current bottlenecks in

  We will also continue adding higher-level functionalities to Opium to
  make users productive with real-world applications. This includes:
  • Sessions support (with signed cookies)
  • Handlers for authentication
  • Adding more middlewares (compression, flash messages, caching, etc.)

  Your feedback is welcome, don't hesitate to open Issues on Github!

Andreas Poisel asked and Anurag Soni replied

        Does Opium + Httpaf support TLS?

  It doesn't at the moment.

Calascibetta Romain then said

  According the interface of `opium', it's possible to have the support
  of TLS (with `ocaml-tls') with the [new version of Conduit] and
  [`paf'] (which is a MirageOS compatible layer of HTTP/AF -

  │ let stack ip =
  │   Tcpip_stack_socket.UDPV4.connect (Some ip) >>= fun udpv4 ->
  │   Tcpip_stack_socket.TCPV4.connect (Some ip) >>= fun tcpv4 ->
  │   Tcpip_stack_socket.connect [ ip ] udpv4 tcpv4
  │ let http_with_conduit (ip, port) error_handler request_handler =
  │   Paf.https httpaf_config ~error_handler ~request_handler:(fun _ -> request_handler)
  │     ({ Paf.TCP.stack= stack ip
  │      ; keepalive= None
  │      ; nodelay= false
  │      ; port= port}, Tls.Config.server ~certificates ())
  │ let () = match ( (https_with_conduit (Ipaddr.V4.localhost, 4343)) opium_app) with
  │   | Ok () -> ()
  │   | Error err -> Fmt.epr "%a.\n%!" Conduit_mirage.pp_error err

  I used it for a long time on my personal unikernels and did some tests
  to ensure that [it does fails when it handles many requests]. Note
  that you are able to use OpenSSL too if you want.

[new version of Conduit]

[`paf'] <>

[it does fails when it handles many requests]

Robin Björklin also replied

  If you want to use this new version of Opium there are ways around
  this problem. You could have Haproxy (or similar) terminate your TLS
  connections externally and if your environment requires TLS for your
  internal network something like [Consul Connect] can cover that
  use-case for you.

[Consul Connect]

Operator lookup tool for OCaml


Craig Ferguson announced

  I'm pleased to announce the initial release of, a search tool for OCaml operators and
  syntax elements:


  For each operator, the tool provides a short explanation of its
  behaviour, examples of usage and warnings of common misuses and


  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:

  • all standard library operators,
  • conventional infix operators (`>>=', `>>|', `>|='),
  • binding operators (`let+', `let*', `and+', etc.),
  • syntax that is often confused for an operator (`#', `;;').

  Please let me know if you have any suggestions for improvements. I
  hope you find it useful!


  This tool is heavily based on the [JavaScript operator lookup] utility
  by [Josh Comeau]. Thanks to him for the initial idea and for allowing
  me to re-use his design elements.

[JavaScript operator lookup]

[Josh Comeau] <>

Kakadu asked and Craig Ferguson replied

        It's not obvious for me are these operators hardcoded or
        do you scan opam packages from time to time?

  They're hardcoded. The operators fall into three classes:

  • The vast majority of them are from the `Stdlib' module, so I don't
    expect those to change very regularly.

  • A small number of "conventional" operators used in the community
    (`>>=', `let*', etc.). Even for that small set there is some
    divergence in Opam – c.f. `>>|' vs `>|=' for a _map_ operator – so I
    suspect there are not many other candidates for this group.

  • There are a few regexes behind the scenes for catching valid
    operator names that don't fall into the first two
    categories. e.g. many search terms are classified as "_a
    left-associative operator_" with a correspondingly vague

Other OCaml News

From the ocamlcore planet blog

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

  • [“Universal” Dune Tip: Rebuild Stuff, Sometimes]

[OCaml Planet] <>

[“Universal” Dune Tip: Rebuild Stuff, Sometimes]


  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

  If you also wish to receive it every week by mail, you may subscribe

  [Alan Schmitt]

[send me a message] <>

[the archive] <>

[RSS feed of the archives] <>

[online] <>

[Alan Schmitt] <>

[-- Attachment #2: Type: text/html, Size: 39166 bytes --]

             reply	other threads:[~2020-12-01  8:55 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  8:54 Alan Schmitt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 17:54 Alan Schmitt
2022-07-19  8:58 Alan Schmitt
2022-07-12  7:59 Alan Schmitt
2022-07-05  7:42 Alan Schmitt
2022-06-28  7:37 Alan Schmitt
2022-06-21  8:06 Alan Schmitt
2022-06-14  9:29 Alan Schmitt
2022-06-07 10:15 Alan Schmitt
2022-05-31 12:29 Alan Schmitt
2022-05-24  8:04 Alan Schmitt
2022-05-17  7:12 Alan Schmitt
2022-05-10 12:30 Alan Schmitt
2022-05-03  9:11 Alan Schmitt
2022-04-26  6:44 Alan Schmitt
2022-04-19  5:34 Alan Schmitt
2022-04-12  8:10 Alan Schmitt
2022-04-05 11:50 Alan Schmitt
2022-03-29  7:42 Alan Schmitt
2022-03-22 13:01 Alan Schmitt
2022-03-15  9:59 Alan Schmitt
2022-03-01 13:54 Alan Schmitt
2022-02-22 12:43 Alan Schmitt
2022-02-08 13:16 Alan Schmitt
2022-02-01 13:00 Alan Schmitt
2022-01-25 12:44 Alan Schmitt
2022-01-11  8:20 Alan Schmitt
2022-01-04  7:56 Alan Schmitt
2021-12-28  8:59 Alan Schmitt
2021-12-21  9:11 Alan Schmitt
2021-12-14 11:02 Alan Schmitt
2021-11-30 10:51 Alan Schmitt
2021-11-16  8:41 Alan Schmitt
2021-11-09 10:08 Alan Schmitt
2021-11-02  8:50 Alan Schmitt
2021-10-19  8:23 Alan Schmitt
2021-09-28  6:37 Alan Schmitt
2021-09-21  9:09 Alan Schmitt
2021-09-07 13:23 Alan Schmitt
2021-08-24 13:44 Alan Schmitt
2021-08-17  6:24 Alan Schmitt
2021-08-10 16:47 Alan Schmitt
2021-07-27  8:54 Alan Schmitt
2021-07-20 12:58 Alan Schmitt
2021-07-06 12:33 Alan Schmitt
2021-06-29 12:24 Alan Schmitt
2021-06-22  9:04 Alan Schmitt
2021-06-01  9:23 Alan Schmitt
2021-05-25  7:30 Alan Schmitt
2021-05-11 14:47 Alan Schmitt
2021-05-04  8:57 Alan Schmitt
2021-04-27 14:26 Alan Schmitt
2021-04-20  9:07 Alan Schmitt
2021-04-06  9:42 Alan Schmitt
2021-03-30 14:55 Alan Schmitt
2021-03-23  9:05 Alan Schmitt
2021-03-16 10:31 Alan Schmitt
2021-03-09 10:58 Alan Schmitt
2021-02-23  9:51 Alan Schmitt
2021-02-16 13:53 Alan Schmitt
2021-02-02 13:56 Alan Schmitt
2021-01-26 13:25 Alan Schmitt
2021-01-19 14:28 Alan Schmitt
2021-01-12  9:47 Alan Schmitt
2021-01-05 11:22 Alan Schmitt
2020-12-29  9:59 Alan Schmitt
2020-12-22  8:48 Alan Schmitt
2020-12-15  9:51 Alan Schmitt
2020-11-03 15:15 Alan Schmitt
2020-10-27  8:43 Alan Schmitt
2020-10-20  8:15 Alan Schmitt
2020-10-06  7:22 Alan Schmitt
2020-09-29  7:02 Alan Schmitt
2020-09-22  7:27 Alan Schmitt
2020-09-08 13:11 Alan Schmitt
2020-09-01  7:55 Alan Schmitt
2020-08-18  7:25 Alan Schmitt
2020-07-28 16:57 Alan Schmitt
2020-07-21 14:42 Alan Schmitt
2020-07-14  9:54 Alan Schmitt
2020-07-07 10:04 Alan Schmitt
2020-06-30  7:00 Alan Schmitt
2020-06-16  8:36 Alan Schmitt
2020-06-09  8:28 Alan Schmitt
2020-05-19  9:52 Alan Schmitt
2020-05-12  7:45 Alan Schmitt
2020-05-05  7:45 Alan Schmitt
2020-04-28 12:44 Alan Schmitt
2020-04-21  8:58 Alan Schmitt
2020-04-14  7:28 Alan Schmitt
2020-04-07  7:51 Alan Schmitt
2020-03-31  9:54 Alan Schmitt
2020-03-24  9:31 Alan Schmitt
2020-03-17 11:04 Alan Schmitt
2020-03-10 14:28 Alan Schmitt
2020-03-03  8:00 Alan Schmitt
2020-02-25  8:51 Alan Schmitt
2020-02-18  8:18 Alan Schmitt
2020-02-04  8:47 Alan Schmitt
2020-01-28 10:53 Alan Schmitt
2020-01-21 14:08 Alan Schmitt
2020-01-14 14:16 Alan Schmitt
2020-01-07 13:43 Alan Schmitt
2019-12-31  9:18 Alan Schmitt
2019-12-17  8:52 Alan Schmitt
2019-12-10  8:21 Alan Schmitt
2019-12-03 15:42 Alan Schmitt
2019-11-26  8:33 Alan Schmitt
2019-11-12 13:21 Alan Schmitt
2019-11-05  6:55 Alan Schmitt
2019-10-15  7:28 Alan Schmitt
2019-09-03  7:35 Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).