OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of May 27 to June 03, 2025.

Table of Contents

First alpha release of OCaml 5.4.0

octachron announced

Four months after the release of OCaml 5.3.0, the set of new features for the future version 5.4.0 of OCaml has been frozen. We are thus happy to announce the first alpha release for OCaml 5.4.0.

This alpha version is here to help fellow hackers join us early in our bug hunting and opam ecosystem fixing fun (see below for the installation instructions) [^1].

The progresses on stabilising the ecosystem are tracked on the opam readiness for 5.4.0 meta-issue.

The full release is expected around the end of July [^2].

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

If you are interested in the ongoing list of new features and bug fixes, you can have a look at the changelog for OCaml 5.4.0.

Happy hacking, Florian Angeletti for the OCaml team

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.4.0~alpha1

The source code for the alpha is also available at these addresses:

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.4.0~alpha1+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.4.0~alpha1+flambda+nffa ocaml-variants.5.4.0~alpha1+options ocaml-option-flambda ocaml-option-no-flat-float-array

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

[^1]: The release process is described at https://github.com/ocaml/ocaml/blob/trunk/release-info/introduction.md .

[^2]: See also the prospective release calendar.

Combining LLVM MC, lld, precompiled C and bytecode

Continuing this thread, jbeckford announced

The latest update 2.3.202505282324 (see top post for links) has several fixes:

  1. Using ./dk -O ReleaseSmall Exe now has a working Windows target. The generated Windows executables do not require Visual Studio at runtime.
  2. A use-after-free bug has been fixed which mainly affected cross-compilation for the Linux target.
  3. Using a new ./dk gc clear command will remove all the cache space.
  4. A bug has been fixed with the auto-updates where it downloaded up to 5 updates and then reverted to the original.

Uniqueness for Behavioural Types · KC Sivaramakrishnan

A ppx for denoting unreachable branches

Charles Averill announced

I wanted a semantic construct to specifically denote unreachable control-flow branches, so here it is. Prints out an error with file and line number upon being erroneously reached.

https://opam.ocaml.org/packages/ppx_unreachable/ppx_unreachable.1.0/

Sound on OCaml on Windows

Opam repository archival, phase 3

Hannes Mehnert announced

Dear everyone,

the phase 3 of the opam repository archival (taking the x-maintenance-intent into account) is now ready. We ran on 30th of May the maintenance-intent filter, which resulted in 6463 candidates of which we'd like to archive 5714. The full list is below, the PRs are at https://github.com/ocaml/opam-repository-archive/pull/18 and https://github.com/ocaml/opam-repository/pull/27977.

The proposed merge date is on June 9th, so a week from now.

In case you encounter (a) a breakage or (b) a package and version that you'd like to retain, please report this (best as a comment to https://github.com/ocaml/opam-repository-archive/pull/18)

The list of to-be-archived packages: editor’s note: please see the post link for the long list of packages

Peer-Programming in Modern OCaml with ChatGPT and Gemini

Thomas Letan announced

It’s 2025, and it’s becoming harder to ignore that LLMs are here to stay, and are changing the way we are programming at large. Or at least, it feels like it.

For a while, I’ve been kind of a gaulois réfractaire myself, when it comes to adopting this technology. Over the month of May, I decided to change that, and at least try to integrate them in my daily toolkit. Since I write OCaml professionally, I picked an arbitrary project in a domain I wasn’t familiar for, to see the impact of LLMs on a more niche language (no offense ahah).

After the fact, I wrote a devlog of the exercise.

In particular, I got myself familiar with EIO in the process, and I wanted to discuss the following part of my article with the OCaml community

My personal conclusion is that LLMs are not ready for any real programming task involving Eio, and I am really curious to understand why. Do they keep hallucinating functions because Eio is a really generic name, and maybe they are mixing context from the Python library with the OCaml one? Or is it because the API of Eio has changed a lot over the years?

I am also wondering how, as a the author of a library, I can fix a similar situation. Assuming ChatGPT starts assuming false statements about cohttp-connpool-eio, how do I address this? I suspect being “LLMs-friendly” will be increasingly important for a software library’s success.

For a while, people learnt to become search engine friendly. They turned themselves into export of Google algorithm, etc. Will we do the same thing with LLMs? Are there guidelines? How can we “fix” at our level a situation where a LLM got a software library we wrote completely wrong?

I’d be curious to hear your thoughts.

Old CWN

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.