OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of April 30 to May 07, 2024.

Table of Contents

Deploying Ocsigen applications

Hans Ole Rafaelsen announced

I have written a short text on how Ocsigen applications might be packed in order to be deployed to other nodes, that don't have your development environment installed.

Deploying Ocsigen

If you happen to have a better way, or solutions to parts that I have not been able to solve, please let me know.

OCaml linting tools and techniques

Simmo Saan announced

Recently, I started wondering about linting tools for OCaml, so I went looking. This ended up being a quite extensive survey. Therefore, I decided to publish my findings in a blog post: OCaml linting tools and techniques.

In particular, I focused on linting with dune and Ppxlib because there's many variations out there. In the post I describe the technical choices that go into such linters and provide an overview of those that work and how well. In the process of experimenting, I tried them out myself and published them as demos on GitHub: sim642/dune-lint-demo.

Feel free to let me know if I missed any tools out there or you have any questions/comments. There isn't much information about this out there (and existing tool does it slightly differently), so I hope this overview benefits others as well.

dune 3.15

Etienne Millon announced

We've released 3.15.1 and 3.15.2. The latter is particularly important for Coq users since it fixes a regression in incremental compilation introduced in 3.13.0.

Here's the combined changelog:


  • Fix overflow in sendfile stubs (copy of large files could fail or end with truncated files) (#10333, @tonyfettes)
  • Fix crash when a rule with a directory target is disabled with `enabled_if` (#10382, fixes #10310, @gridbugs)
  • melange: remove all restrictions around virtual libraries in Melange. They may be used as otherwise in libraries and executables. (#10412, @anmonteiro)
  • spawn: fix compatibility with RHEL7 (#10428, @emillon)
  • If no directory targets are defined, then do not evaluate `enabled_if` (#10442, @rgrinberg)
  • Fix a bug where Coq projects were being rebuilt from scratch each time the dependency graph changed. (#10446, fixes #10149, @alizter)

bitgenerators v0.1.0

zoj613 announced

Hi everyone. I'd like to announce the first release of bitgenerators. This library implements an OCaml port of NumPy's bitgenerator interface for working with Psuedo-random numbers (see: https://numpy.org/doc/stable/reference/random/bit_generators/index.html).

  • This library implements several PRNGs that are exposed through this common interface. It also implements an SeedSequence module for seeding PRNGs using high quality initial states based on the ideas discussed here.
  • Morever, the module provides functions that help easily generate independent and non-overlapping instances of a PRNG for use in parallel computation in a reproducible manner.
  • Implemented PRNG's include PCG64, SFC64, Philox4x64, Xoshiro256** and ChaCha. All of which pass stringent statistical randomness tests like PractRand and Testu01.
  • The API documentation can be found here
  • The source code is hosted on github: https://github.com/zoj613/bitgenerators
  • The README file contains examples of how the library can be used.

This is my first Ocaml project and therefore I would highly appreciate feedback from experienced users regarding it's usefulness and possibly how it could be improved (e.g. usability and performance). I tried to keep the implementation as functional as possible, though not very sure if that's the best approach here.

checked_oint v0.1.0

Sima Kinsart announced

I'd like to announce a new library: checked_oint. It implements checked arithmetic for both signed and unsigned integers of 8, 16, 32, 64, and 128 bits. Unlike stdint or ocaml-integers, routines in this library either return an option or raise an exception when a result of an arithmetic operation cannot be represented in a desired integer type. In addition, it contains abstractions for manipulating arbitrary integers and integer types in a generic and type-safe manner, which I find quite useful for compiler/interpreter implementations.

Usage example:

open Checked_oint

let () =
  let x = U8.of_int_exn 50 in
  let y = U8.of_int_exn 70 in
  assert (U8.equal (U8.add_exn x y) (U8.of_int_exn 120));
  assert (Option.is_none (U8.mul x y))

Feel free to ask any questions in the comments.

Liquidsoap 2.2.5 is out!

Romain Beauxis announced

Liquidsoap 2.2.5 has out! Full release details are here: https://github.com/savonet/liquidsoap/releases/tag/v2.2.5

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.

This is hopefully the last release of the 2.2.x release cycle before we kick off the new 2.3.x release cycle. We've got a couple feature to bring there and then it'll be ready for more testing.

Liquidsoap 2.2.5 has some good bugfixes and some minor changes but its most exciting feature is the autocue . It was developed in close collaboration with several users. The feature is an opt-in crossfade extension that computes the perfect crossfade transitions for your tracks.

Over the years, it's been very interesting to maintain an application and language that is now pretty large and complex using the OCaml compiler and ecosystem. It's amazing to see how easy it is now to build integrate new packages. It also brings in some interesting, real-life challenges such as some very specific memory issues.

Next, we would like to work on optimizing the language by introducing modules, to reduce the standard library's memory footprint, and to use the new OCaml parallelism to fully leverage CPU and memory usage when streaming large amount of data such as video streams.

OCaml 5.2.0 - First Release Candidate

octachron announced

The release of OCaml 5.2.0 is imminent. As a final step, we are publishing a release candidate to check that everything is in order before the release in the upcoming week(s).

If you find any bugs, please report them on OCaml's issue tracker.

Compared to the second beta, this release contains one small compiler-libs printer fix and one configuration tweak.

The full change log for OCaml 5.2.0 is available on GitHub. A short summary of the changes since the second beta release is also available below.

Installation Instructions

The base compiler can be installed as an opam switch with the following commands on opam 2.1 and later:

opam update
opam switch create 5.2.0~rc1

The source code for the release candidate is also directly available on:

Fine-Tuned Compiler Configuration

If you want to tweak the configuration of the compiler, you can switch to the option variant with:

opam update
opam switch create <switch_name> ocaml-variants.5.2.0~rc1+options <option_list>

where <option_list> is a space-separated list of ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch:

opam switch create 5.2.0~rc1+flambda+nffa ocaml-variants.5.2.0~rc1+options ocaml-option-flambda ocaml-option-no-flat-float-array

All available options can be listed with opam search ocaml-option.

Changes since the second beta

  • #13130: Minor fixes to pprintast for raw identifiers and local module open syntax for types. (Chet Murthy, review by Gabriel Scherer)
  • #13100 Fix detection of zstd when compiling with musl-gcc (David Allsopp, review by Samuel Hym)

Announcing DBCaml, Silo, Serde Postgres and a new driver for postgres

Pretty Printing in OCaml: Format Primer

Vladimir Keleshev announced

Hi folks, I wrote another monad Format tutorial.


Here's some of layouts that are covered:

 ["one", "two", "three"],
  ["one", "two", "three"],
[ []
, [ "one", "two", "three" ]
, [ "one"
  , "two"
  , "three"
  , "four"
  , "five"
  , "six"
  , "seven"
  , "eight"
  , "nine"
  , "ten"

I tried to share some of my experience using Format. As a bonus—JSON pretty printer.

Send us Talk and Workshop Proposals for Fun OCaml 2024 in Berlin, September 16+17

Sabine Schmaltz announced

Fun OCaml 2024 is a 2 days open source hacking event dedicated to OCaml enthusiasts and professionals. We focus on the impact and potential of OCaml for solving real-world problems and get together in Berlin for a conference/hackathon over two days:

  • Day 1 (Monday, September 16): talks (which are live-streamed) and socializing/hacking.
  • Day 2 (Tuesday, September 17): Workshops and hacking.

Topics we're interested in:

  • how you use OCaml in your business / in your projects
  • OCaml libraries, frameworks, and other Open Source projects built on OCaml
  • hands-on demonstrations that encourage people to try things on the second day of the event or at home
  • seeing actual code and reasoning behind design decisions
  • experience reports

For more details, check out the website and the CFP linked from there:


Registration for attendees will be announced later this week in advance, but is not open yet.

Thanks! :sparkles: :orange_heart: :camel:

OCaml Workshop 2024 at ICFP – announcement and call for proposals

Sonja Heinze continued this thread

As mentioned above, the submission deadline for the OCaml Workshop at ICFP is getting closer.

As a new note: A few weeks after the OCaml Workshop at ICFP, there'll be the new initiative Fun OCaml in Berlin. It's super exciting to have three OCaml-related workshops (first the ML Workshop and the OCaml Workshop at ICFP, and then Fun OCaml) over the course of a few weeks, and we're also very much looking forward to Fun OCaml!

We've already mentioned that when reading the submissions, as every year, we'll collaborate closely with the organizers of the ML workshop at ICFP, which intersects with the OCaml Workshop on talks with a strong theoretical and research-oriented focus. We'll also collaborate with the organizers of Fun OCaml this year, which might intersect on talks with a strong practical focus. With collaboration, we mainly mean potentially transferring submissions from one workshop to another after checking in with the authors (side-note: if you want your presentation to be taken into account for a potential transfer, you need to respect the earlier of the two submission deadlines).

Best, and looking forward to this exciting year of OCaml workshops, @Armael and @pitag

Other OCaml News

From the ocaml.org blog

Here are links from many OCaml blogs aggregated at the ocaml.org blog.


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 to the caml-list.