OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of July 12 to 19, 2022.

Table of Contents

Gopcaml-mode and Gopcaml-mode merlin (0.0.6) - Phoenix release (Support for OCaml 4.14.0!)

Kiran Gopinathan announced

Like the phoenix, Gopcaml-mode rises again from the ashes!…

…this time with support for OCaml 4.14.0 and OCaml 4.13.0 (by popular demand)

See the original release post for detailed instructions on how you can install it.

Screenshots (if you haven't seen them before)



What's next?

  • Support for OCaml 5.0
  • Better ergonomics for piping (i.e _ |> _)
  • … you decide! (feature requests/pull requests welcome!)

Sandmark Nightly - Benchmarking as a Service

Shakthi Kannan announced

Tarides is happy to announce Sandmark Nightly benchmarking as a service. tl;dr OCaml compiler developers can now point development branches at the service and get sequential and parallel benchmark results at https://sandmark.tarides.com.

Sandmark is a collection of sequential and parallel OCaml benchmarks, its dependencies, and the scripts to run the benchmarks and collect the results. Sandmark was developed for the Multicore OCaml project in order to (a) ensure that OCaml 5 (with multicore support) does not introduce regressions for sequential programs compared to sequential OCaml 4 and (b) OCaml 5 programs scale well with multiple cores. In order to reduce the noise and get actionable results, Sandmark is typically run on tuned machines. This makes it harder for OCaml developers to use Sandmark for development who may not have tuned machines with a large number of cores.

To address this, we introduce Sandmark Nightly service which runs the sequential and parallel benchmarks for a set of compiler variants (branch/commit/PR + compiler & runtime options) on two tuned machines:

  • Turing (28 cores, Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz, 64 GB RAM)
  • Navajo (128 cores, AMD EPYC 7551 32-Core Processor, 504 GB RAM)

OCaml developers can request their development branches to be added to the nightly runs by adding it to sandmark-nightly-config. The results will appear the following day at https://sandmark.tarides.com.

Here is an illustration of sequential benchmark results from the service:


You should first specify the number of variants that you want for comparison, and then select either the navajo or turing hostnames. The dates for which benchmark results are available are then listed in the date column. If there are more than one result on a given day, then the specific variant name, SHA1 commit and date are displayed together for selection. You need to choose one of the variants as a baseline for comparison. In the following graph, the 5.1.0+trunk+sequential_20220712_920fb8e build on the navajo server has been chosen as the baseline, and you can see the normalized time (seconds) comparison for the various Sandmark benchmarks for both 5.1.0+trunk+sequential_20220713_c759890 and 5.1.0+trunk+sequential_20220714_606abe8 variants. We observe that the matrix_multiplication and soli benchmark have become 5% slower as compared to the July 12, 2022 nightly run.


Similarly, the normalized MaxRSS (KB) graph for the same baseline and variants chosen for comparison is illustrated below:


The mandelbrot6 and fannkuchredux benchmarks have increased the MaxRSS (KB) by 3% as compared to the baseline variant, whereas, the metric has significantly improved for the lexifi-g2pp and sequence_cps benchmarks.

The parallel benchmark speedup results are also available from the Sandmark nightly runs.



We observe from the speedup graph that there is not much difference between 5.1.0+trunk+parallel_20220714_606abe8 and the 5.1.0+trunk+decouple_20220706_eb7a38d developer branch results. The x-axis in the graph represents the number of domains, while the y-axis corresponds to the speedup. The number in the parenthesis against each benchmark refers to the corresponding running time of the sequential benchmark. These comparison results are useful to observe any performance regressions over time. It is recommended to use the turing machine results for the parallel benchmarks as it is tuned.

If you would like to use Sandmark nightly for OCaml compiler development, please do ping us for access to the sandmark-nightly-config repository so that you may add your own compiler variants.

OCamlFormat Web Configurator

Louis Roché announced

Thanks to Pomba Magar we now have a code editor with highlighting. It hopefully should also solve the lack of monospace font on safari.


Jane Street is Hiring Front End Engineers

Matt Russell announced

Jane Street is looking to hire Front End Engineers that want to design and build our next-generation of browser-based tools for operating our trading infrastructure (in OCaml). We’re building tools for expert users, and want to maintain a high UX bar while building tools that are powerful and flexible, so it’s a challenging domain.

Ron Minsky wrote a bit more about the role here: https://twitter.com/yminsky/status/1541605410691596289?s=20&t=yyrhGx7TnNwPIwdZoArpGw

And you can find a link to the job descriptions and the application page here:

BAP 2.5.0 Release

Ivan Gotovchits announced

We are proud to announce the 2.5.0 release of the Carnegie Mellon University Binary Analysis Platform (CMU BAP). This is one of the biggest releases of BAP with lots of new features and bug fixes. In this release, we significantly improved BAP performance (in some use cases by a factor of three) and reduced memory consumption (up to a factor of two). In addition, we devised a new method for representing floating-point operations that is scalable and efficient and now we enable floating-point lifters for all x86 binaries with little to no extra overhead. The floating-point support for other targets is coming! We also rewrote the ABI specifications and now support dozens of different ABI. The new ABIs support calling conventions for structures and floating-point values and the `bap-c` library was significantly expanded with lots of new functions and types to describe C types and C object layouts.

You can install bap with

opam install bap.2.5.0

Do not forget to opam update before that.

Why I used OCaml to developed a utility to download Jira items

Willem Hoek announced

Not a technical post – but my notes on why I decided to used OCaml to develop a small utility that download Jira items to SQLite https://whoek.com/b/jira-to-sqlite-with-scrumdog

The Hacker News comments here https://news.ycombinator.com/item?id=32109461

Liquidsoap 2.1.0

Romain Beauxis announced

Liquidsoap 2.1.0 was just released, some 10 months after the initial release of the ~2.0.x release cycle!

The release is available here: https://github.com/savonet/liquidsoap/releases/tag/v2.1.0 and should be coming through opam pretty soon.

🤔 What is liquidsoap?

Liquidsoap is a statically-typed, type-inferred, functional scripting language equipped with specialized operators to build audio and video stream automation.

The liquidsoap language offers all the flexibility and expressivity of a fully featured programming language to help build your media streams.

Using liquidsoap, one can very quickly stand up a media streaming platform that can rotate files from playlists, accept live DJ input, mux audio and video, encode (or not!) and send the resulting data to youtube, icecast, HLS and more..

:white_check_mark: Why liquidsoap?

While there are many tools that offer competing features, the real difference with liquidsoap is its scripting language.

Setting up tools using configuration files is often easier and more straight forward, however, when it comes to the finer details, such as inserting jingles between shows, defining crossfades between tracks and more, potentially, each project has its own set of expectations, and this is where liquidsoap becomes really useful!

:zap:️ What's new in Liquidsoap 2.1.0?   zap

Lots of things have been brewing since the 2.0.0 release. This new release branch is intended to bring up some of the breaking changes that were introduced while we keep working on more exciting future changes that we have on our roadmap

Some noticeable changes include:

Improved JSON parsing

You should now be able to do:

let json.parse ({
} : {
  foo: string,
  bla: float,
  gni: bool
}) = '{ "foo": "aabbcc", "bla": 3.14, "gni": true }'

For any one who has ever tried to parse json in their liquidsoap scripts, this is gonna be a game changer. We have a detailed article here

Regular expressions are now first-class entities.

This should be familiar to anyone used to working with Javascript's regular expression. So, now, instead of doing:

string.match(pattern="\\d+", s)

You will now do:


There's a detailed description of this new feature here.

Vim now highlights types, feedback welcome

Maëlan announced

A patch just made its way to the community-maintained Vim files for OCaml (not propagated to the official Vim distribution, yet), that tries to highlight types. IMHO the patch is large and hacky so you may want to try it cautiously, and feedback would be appreciated. :-)

The former behavior was to highlight identifiers that happened to be the name of a builtin type (such as int or list), regardless of where they appeared. Now, in principle, all type expressions can be highlighted, and be so only when in a type context. By default, only builtin types are highlighted, but you can unleash the full power of the new linter:

" put this in ~/.vim/after/syntax/ocaml.vim for instance:
hi link ocamlTypeConstr   Type
hi link ocamlTypeBuiltin  Type
hi link ocamlTypeVar      Type
hi link ocamlTypeAnyVar   Type

or fancier (if you like excess :rainbow:):

" 112 = light green (the color of the “Type“ hl group with my theme)
hi ocamlTypeConstr       ctermfg=112
hi ocamlTypeBuiltin      ctermfg=112 cterm=bold
hi ocamlTypeVar          ctermfg=112 cterm=italic
hi ocamlTypeAnyVar       ctermfg=112 cterm=bold

Even if you don’t care about highlighting types, allowing the linter to discriminate between types and exceptions has some tangential benefits.

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