OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of March 18 to 25, 2025.

Table of Contents

Ocsigen migrating to effect-based concurrency

Vincent Balat announced

We're delighted to announce that the Ocsigen project has just launched one of its most ambitious changes: moving from Lwt to effects-based concurrency.

If this experiment goes well, it will be another step towards simplifying Web development in OCaml, by eliminating the need for monads.

Of course we will try to make this transition as smooth as possible, by providing a compatibility interface for application developers, and tools to help Web and mobile developers to do the transition themselves if they want to. These tools will be released in order to help other projects to do the transition and avoid incompatibilities between OCaml libraries as much as possible.

This work was made possible thanks to the support of the NGI Zero Core fund through the Nlnet foundation, and is perfomed by Tarides.

Read the full announcement by Tarides.

Slipshow!

Paul-Elliot announced

Dear reader,

I am absolutely thrilled to announce the release of slipshow 0.1.1 on this forum! As you have all noticed, that is a huge leap from the previous version, 0.0.34. (What can have motivated this?)

Recall that Slipshow is a tool to prepare presentation support, that is based on scripted scrolling and zooming (instead of slides).

I'll use this single thread to announce all future versions of slipshow, to avoid polluting the global namespace, as it makes sense to keep this forum centered around OCaml, and this tool has nothing to do with OCaml …

… well, almost nothing to do with OCaml, since in this version the engine has been fully rewritten in OCaml (hence the bold new version) and works much better! Making it a full OCaml project. Thanks, OCaml developers of open source libraries and language!

To upgrade it, you can do:

$ opam update
$ opam upgrade slipshow

What? Some people don't have it installed already? For those, it will be:

$ opam update
$ opam install slipshow

Now comes the moment you are all waiting for: the list of new features!

TLDR:

  • Engine rewritten in OCaml
    • Fewer bugs when navigating back
    • Stronger foundation (eg, for subslips)
    • Custom scripts requires minor adjustments
    • Breaking change in subslip HTML
  • Drawing now in SVG
    • No more zoom issues
    • Erasing works "per-stroke"
  • Revamped table of content
    • Now based on title structure rather than subslips
  • New --markdown-output flag for converting to GFM
  • Parser bugfixes
  • License change: Now GPLv3 (previously MIT)
  • npm distribution discontinued.
  • Special thanks to NLNet for their sponsorship!

Dear readers,

I am thrilled to announce the 0.1 release of Slipshow, the slip-based presentation tool!

This is a major minor release. While versions 0.0.1 to 0.0.33 have served well to experiment, this release marks a fresh start, aimed at being a solid foundation for a project with a clear direction. A huge thank you to NLNet for sponsoring this milestone!

So, what is new? Quite a lot, the main change being that the engine has been fully rewritten.

The engine

Started as a single file javascript project, the old engine evolved presentation by presentation – leading to numerous bugs, maintenance challenge or extensibility issue. (In other word, I did all I could not to touch it despite all the bugs)

This release introduces a complete rewrite of the engine in OCaml, with new design choices that improve reliability and expandability. Let's go over the key benefits and breaking changes.

  • Navigating Forward… and Backward

    One of the greatest weakness of the old engine was handling backward navigation. Since it started as a simple "script scheduler", going back wasn't straightforward. The workaround involved taking a snapshot of… everything (the DOM, the state, …), to be able to go back in time.

    This had many bugs, in animations (such as the "focus" action), and in its iteraction with other features (such as drawing).

    So, what is new in this engine? The engine now records an undo function for each step of the presentation. While this may not sound much, it is a ton better in terms of development. It's a much stronger foundation to build new features from. It's also much more efficient for long presentations.

    In most cases, your old presentations will work without modification in the new engine. However, there is one case where it needs modification: when you include the execution of a custom script in your presentation. In this case, you need to return the function undo to undo the executed step: see the documentation! (This is not ideal and better solutions are being experimented)

  • Writing

    Previously, live annotations used the excellent atrament library. While great in many cases, its bitmap-based approach caused blurriness when zooming.

    This release introduces a custom SVG-based annotation system, which eliminates zoom issues. Another change: erasing now works stroke-by-stroke instead of pixel-by-pixel.

  • Table of content

    The old table of contents was based on the slip structure, which didn’t work well for presentations that primarily used a single slip (as is often the case with compiled presentations).

    The new sidebar-style table of contents is now generated from headers, making it more intuitive and aligned with the presentation’s structure—resulting in a much smoother navigation experience!

  • Breaking change: Subslips

    The HTML structure for subslips has evolved, in particuler to avoid having to provide the scale of your subslips.

    Support for subslip in the new engine is not mature and will be announced in the next release, but bear in mind that if your presentation relies on them, you might want to wait a bit before migrating to the new engine!

Compiler

While this release focuses on the engine, the compiler has also seen improvements, including bug fixes (particularly in the parser) and a new feature:

  • --markdown-output for markdown exports

    If you want to print your presentation or host it as a static webpage, the default format can be cluttered with annotations. The new --markdown-output flag lets you generate a clean, GitHub Flavored Markdown (GFM) file without annotations.

Other

A small but maybe important note: the license has changed, the project has transitioned from MIT to GPLv3, aligning better with its values.

Conclusion

Looking forward to your bug reports!

Christian Lindig asked and Paul-Elliot replied

Could you link to a demo presentation done with this tool?

Sure!

Here is a presentation of the tool itself, in French. The source file for it is here.

Here is a math presentation using more features (made using a previous version of the engine, which had more features and more bugs).

Here is the historical first presentation made in Slipshow (made with the worst version of the engine).

(I include presentations made with old versions of the engine to give an idea of what you can do, as the new engine is very new I don't have many examples using it, and it has some breaking changes which makes porting old presentations using too many features hard to port!)

Daniel Bünzli added

Here is a non-dogfooded one.

Odoc 3.0 released!

Jon Ludlam announced

On behalf of the Odoc development team, I’m delighted to announce the release of Odoc 3! This is a big big release with loads of new features and bug fixes, and I encourage everyone to install it and have a play!

For an overview of the new features see our beta release announcement. tl;dr:

$ opam install odoc-driver # will install odoc 3
$ odoc_driver odoc odoc-parser odoc-driver odoc-md sherlodoc --remap

and point your browser at _html/index.html. This example shows odoc_driver creating the docs for the 5 packages specified and remapping links to other packages (see here for an explanation)

If you try the above command, you'll note something interesting, and hopefully this will encourage you to run odoc_driver on your own packages before you release them, as then you'll be able to avoid slightly embarrassing post-release fixes like this one 😬

Here are the changes from the beta release:

4th editor tooling dev-meeting: 28th of March

PizieDust announced

Hi everyone, join us for the next Editor Public Dev-Meeting on March 28th! This session will feature a talk from Xavier (@xvw) on the latest Emacs functionalities integrated with OCaml LSP server.

:clipboard: Meeting agenda:

  • A tour-de-table to allow the participants that wish to do so to present themselves and mention issues / prs they are interested in.
  • Talk from Xavier and Q&A
  • Discuss issues and pull requests that were tagged in advance or mentioned during the tour-de-table.
  • 🔹 What’s new in Emacs for OCaml development?
  • 🔹 How the latest LSP improvements enhance the experience?
  • 🔹 Live demo and discussion on upcoming features
  • 📅 Date: March 28th
  • 🕐 Time: 4PM CET
  • 📍 Location: https://meet.google.com/wrv-dovu-ypb

This is a great opportunity to learn about the latest improvements and share feedback with the community. Looking forward to seeing you there! 🚀

Previous meeting notes are available in Merlin’s repository wiki

https://calendar.app.google/zPx5ZQ47C4dwq3437

The Call for Papers for FUNARCH2025 is open!

Jeffrey Young announced

Hello everyone,

This year I am chairing the Functional Architecture workshop colocated with ICFP and SPLASH.

I'm happy to announce that the Call for Papers for FUNARCH2025 is open - deadline is June 16th! Send us research papers, experience reports, architectural pearls, or submit to the open category! The idea behind the workshop is to cross pollinate the software architecture and functional programming discourse, and to share techniques for constructing large long-lived systems in a functional language.

See FUNARCH2025 - ICFP/SPLASH for more information. You may also browse previous year's submissions here and here.

See you in Singapore!

Proposal for the replacement of Set and Map in the stdlib

Christophe Raffalli announced

Hello,

While working on AVL for teaching I found an alternative to the AVL that seems overall better than the current ocaml implementation. The code is available here: https://github.com/craff/ocaml-avl/tree/master. The Readme.md contains the inequality needed to prove correctness and termination of the balancing function "join".

The idea is to replace the constraint

|height left_son - height right_son| <= 2 

By

size left_son <= 2 * size right_son + 1
size right_son <= 2 * size left_son + 1

We see 3 advantages:

  • O(1) cardinal of set or map
  • slightly simpler code or at least not more complicated (see below)
  • seems faster in many cases (not always and strangely depends on compilation options). Use dune exec ./test.exe for some simple tests.

Before submitting a PR, I think it call be a good idea to call for comments here.

Cheers, Christophe

A tool to reverse debug OCaml (and other binaries) runs

Sid Kshatriya announced

I'd like to announce a debugging tool I've built ! It's called Software Counters mode rr .

It is available at https://github.com/sidkshatriya/rr.soft

Many of you may have already heard of a debugger called rr – it allows you to record and replay programs on Linux. It is extremely useful for instance to debug issues with garbage collection or other low level issues in natively compiled OCaml programs. Once you capture a bug during the record phase, that bug can be replayed any number of times during replay.

One major limitation of rr is that it requires access to CPU Hardware Performance counters which is usually not available in cloud VMs or containers.

Software Counters mode rr is a modification of the rr debugger that lifts this limitation – access to CPU Hardware Performance counters is not required. This means you can run rr in many more configurations.

I've been able to successfully record/replay the whole OCaml compiler test suite using Software Counters mode rr (Except for a single ocaml test called pr2195 which exhausts the file descriptors).

I've also written a blog post about record/replay debugging generally and Software Counters mode in particular. Please see here.

Feedback request: New lesson on Lazy

Jakub Svec announced

Hello,

I created a lesson on the Lazy module that I'd like to propose for the language tutorials section of ocaml.org.

You can find the draft on HackMD

Please suggest anything you would like, I'm happy to make several rounds of improvement.

Lesson implementation decisions:

This lesson is focused on beginners.

The first draft of this lesson is 345 lines, which is on the shorter side compared to other lessons.

The surface area of the Lazy module is small, so I took the opportunity to supplement the lesson with a thorough explanation of evaluation strategies. This is supplemental, however, and can be shortened or removed based on your preferences.

Without the supplemental section, the lesson is only 200 lines long.

OCaml Workshop 2025 at ICFP/SPLASH - announcement and call for proposals

Kiran Gopinathan announced

Hihi everyone!!!

This year, the ICFP (International conference on Functional Programming) Programming Languages conferences will be held in Singapore (colocated with SPLASH in fact!):

92022b69038715b7dd16ecd9e417b50acbc53dc1_2_1380x552.jpeg

Continuing this community's annual tradition from 2012, we will be hosting the OCaml workshop after the ICFP conference, on the 17th October 2025 (Friday). The workshop is intended to cover all different kinds of aspects of the OCaml programming language as well as the OCaml ecosystem and its community, such as scientific and/or research-oriented, engineering and/or user-oriented, as well as social and/or community-oriented.

Call for talk proposals

The call for talk proposals for the workshop is now open!

  • Dates

    Here are the important dates:

    • Talk proposal submission deadline: July 3rd (Thursday)
    • Author notification: August 7th (Thursday)
    • Workshop: October 17th (Friday)
  • Submissions

    Submissions are typically around 2 pages long (flexible), describing the motivations of the work and what the presentation would be about.

    We encourage everyone who might be interested in giving a talk to submit a proposal! We truly mean everyone, and also have strongly anyone in mind who belongs to a group that’s traditionally underrepresented at OCaml workshops, e.g. due to your gender(s) or non-gender, where you’re from or based or whatever other kinds of characteristics you might have. You should all be able to find all information you’ll need to submit a proposal on the official call for talk proposals. However, if you have any question, don’t hesitate to ask us.

  • Quota on accepted talks per affiliation

    Following the approach from last year which worked well, this year again we will try to enforce a quota of a maximum of four talks given by speakers with the same company/university/institute affiliation. In order to guarantee a coverage of a diverse range of topics and perspectives, we’ll experiment with the same affiliation quota again.

    Do not hesitate to submit your talk proposal in any case: quotas, if needed, will be taken into account by the PC after reviewing all submissions, so there’s no reason to self-select upfront.

About the workshop itself

So far, we’ve only covered the talk proposals and formalities. The exciting part will be the workshop itself! The OCaml workshop is going to be a whole-day event and, similarly to previous years, it’s likely going to have four sessions of about four talks each. It’s a fairly informal and interactive environment, where people engage in all kinds of conversations about OCaml during the breaks and after the workshop.

  • Hybrid attendance and cost for speakers

    We’re aiming to make the workshop hybrid with the same streaming modalities as last year, meaning that talks as well as participation can be either in-person or remote, and remote attendance will be free. To promote a good atmosphere, communication and engagement, we prefer to have most talks in-person, but remote talks will be most welcome as well.

    There may be opportunities for speakers who would not have funding otherwise (via their employer or university) to attend, although we are still in the process of confirming this. (Please keep an eye on this post, which will be updated once we get confirmation!)

    We will do our best to provide the best workshop experience possible for remote participants, within the constraints of the hybrid format. While attending in-person does come with advantages, it also comes with an environmental cost, and we strongly support transitioning to a less plane-intensive organization for conferences and community events :deciduous_tree: .

  • Related events

    The day before the OCaml workshop, i.e. Oct 16th (Thursday), is the day of the ML workshop, with focus on more theoretical aspects of OCaml and the whole family of ML languages in general. The ML workshop and tends to be very interesting for OCaml lovers as well.

    That aside, this year, I believe, is the first year that both the ICFP and SPLASH programming languages conferences are going to be co-located, so this is an exciting opportunity to experience the whole breadth of two of the top-ranked PL conferences over the span of a week! What a time to be alive!

    We’re looking forward to the the talk submissions and to the workshop! Let us know if you have any questions. @Gopiandcode & @yasunariw

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.