OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of November 05 to 12, 2024.
Table of Contents
Picos — Interoperable effects based concurrency
polytypic announced
I'm happy to announce that Picos version 0.6.0 has been released!
Picos is a systems programming interface between effects based schedulers and concurrent abstractions.
A lot of work has been done on Picos since previous announcements.
You might start on the new minimalist landing page for Picos, which, among other things, allows you to access the documentation of all the released Picos versions.
Also, in case you missed it, a recording of the talk
can be found here.
We also held a workshop on concurrency and parallelism at Fun OCaml. You might enjoy trying out the exercise we developed for the workshop.
As, for reasons of dependencies, Picos now comes in no less than 8 packages and multiple libraries, here is a summary of the packages and the libraries inside each package:
picos
— Picos — Interoperable effects based concurrencypicos
— A systems programming interface between effects based schedulers and concurrent abstractionspicos.domain
— Minimalistic domain API available both on OCaml 5 and on OCaml 4picos.thread
— Minimalistic thread API available with or without threads.posix
picos_mux
— Sample schedulers for Picospicos_mux.fifo
— Basic single-threaded effects based Picos compatible scheduler for OCaml 5picos_mux.multififo
— Basic multi-threaded effects based Picos compatible scheduler for OCaml 5picos_mux.random
— Randomized multi-threaded effects based Picos compatible scheduler for OCaml 5picos_mux.thread
— Basic Thread based Picos compatible scheduler for OCaml 4
picos_std
— Sample libraries for Picospicos_std.finally
— Syntax for avoiding resource leaks for Picospicos_std.awaitable
— Basic futex-like awaitable atomic location for Picospicos_std.event
— Basic event abstraction for Picospicos_std.structured
— Basic structured concurrency primitives for Picospicos_std.sync
— Basic communication and synchronization primitives for Picos
picos_io
— Asynchronous IO system for Picospicos_io
— Basic IO facilities based on OCaml standard libraries for Picospicos_io.select
— Basic Unix.select based IO event loop for Picospicos_io.fd
— Externally reference counted file descriptors
picos_io_cohttp
— Cohttp running on Picos IOpicos_io_cohttp
— Minimalistic Cohttp implementation using Picos_io for Picos
picos_lwt
— Lwt interface for Picospicos_lwt
— Direct style Picos compatible interface to Lwt for OCaml 5picos_lwt.unix
— Direct style Picos compatible interface to Lwt with Lwt_unix for OCaml 5
picos_aux
— Auxiliary libraries for Picospicos_aux.htbl
— Lock-free hash tablepicos_aux.mpmcq
— Lock-free multi-producer, multi-consumer queuepicos_aux.mpscq
— Lock-free multi-producer, single-consumer queuepicos_aux.rc
— External reference counting tables for disposable resources
picos_meta
— Integration tests for Picos packages
In addition to the above, Moonpool now uses Picos underneath.
And, I almost forgot, there is a ready to be merged PR for Kcas to change it to use Picos. You should be able to try it with an opam pin-depends.
findlib-1.9.7
Gerd Stolpmann announced
findlib-1.9.7 is out. This is mostly a bugfix release. There is now also some support for relocability (driven by environment variables), contributed by Marek Kubica.
For manual, download, manuals, etc. see here:
http://projects.camlcity.org/projects/findlib.html
An updated OPAM package will follow soon.
First release candidate for OCaml 5.2.1
octachron announced
The release of OCaml version 5.2.1 is imminent.
OCaml 5.2.1 is a collection of safe but import runtime time bug fixes backported from the 5.3 branch of OCaml. The full list of bug fixes is available below.
In order to ensure that the future release works as expected, we are planning to test a release candidate during the upcoming week.
If you find any bugs, please report them here on GitHub.
Installation Instructions
The base compiler can be installed as an opam switch with the following commands on opam 2.1:
opam update opam switch create 5.2.1~rc1
The source code for the release candidate is 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.1~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.1~rc1+flambda+nffa ocaml-variants.5.2.1~rc1+options ocaml-option-flambda ocaml-option-no-flat-float-array
All available options can be listed with `opam search ocaml-option`.
Changes Since OCaml 5.2.0
Runtime System:
- #13207: Be sure to reload the register caching the exception handler in caml_c_call and caml_c_call_stack_args, as its value may have been changed if the OCaml stack is expanded during a callback. (Miod Vallat, report by Vesa Karvonen, review by Gabriel Scherer and Xavier Leroy)
- #13252: Rework register assignment in the interpreter code on m68k on Linux, due to the %a5 register being used by Glibc. (Miod Vallat, report by Stéphane Glondu, review by Gabriel Scherer and Xavier Leroy)
- #13268: Fix a call to test in configure.ac that was causing errors when LDFLAGS contains several words. (Stéphane Glondu, review by Miod Vallat)
- #13234, #13267: Open runtime events file in read-write mode on armel (armv5) systems due to atomic operations limitations on that platform. (Stéphane Glondu, review by Miod Vallat and Vincent Laviron)
- #13188: fix races in the FFI code coming from the use of Int_val(…) on rooted values inside blocking questions / without the runtime lock. (Calling Int_val(…) on non-rooted immediates is fine, but any access to rooted values must be done outside blocking sections / with the runtime lock.) (Etienne Millon, review by Gabriel Scherer, Jan Midtgaard, Olivier Nicole)
- #13318: Fix regression in GC alarms, and fix them for flambda. (Guillaume Munch-Maccagnoni, report by Benjamin Monate, review by Vincent Laviron and Gabriel Scherer)
- #13140: POWER back-end: fix issue with call to `caml_call_realloc_stack` from a DLL (Xavier Leroy, review by Miod Vallat)
- #13370: Fix a low-probability crash when calling Gc.counters. (Demi Marie Obenour, review by Gabriel Scherer)
- #13402, #13512, #13549, #13553: Revise bytecode implementation of callbacks so that it no longer produces dangling registered bytecode fragments. (Xavier Leroy, report by Jan Midtgaard, analysis by Stephen Dolan, review by Miod Vallat)
- #13502: Fix misindexing related to `Gc.finalise_last` that could prevent finalisers from being run. (Nick Roberts, review by Mark Shinwell)
- #13520: Fix compilation of native-code version of systhreads. Bytecode fields were being included in the thread descriptors. (David Allsopp, review by Sébastien Hinderer and Miod Vallat)
mirage-swapfs
Reynir Björnsson announced
I am pleased to announce the first release of mirage-swapfs (swapfs on opam). It is an experimental library to use a mirage block device for ephemeral, append-only, anonymous "files". It was developed for use cases such as in opam-mirror where opam package source archives are downloaded. The files are first downloaded to "swap" and if the download succeeds and the checksum is as expected the data is then copied over to the tar filesystem.
Internally it uses a weak pointer array (Weak.t
) to map "block" offsets to handles. The idea is the garbage collector can help us free up "blocks" if the user forgets to explicitly free the handle. A "block" is (configurable, see blocking_factor
) multiple of sectors in order to reduce bookkeeping overhead. With a sector size of 512 bytes the default is 1 MiB per block.
See also the documentation https://robur-coop.github.io/mirage-swapfs/doc/swapfs/index.html
I would be interested to hear about other ideas or approaches.
Dune dev meeting
Etienne Marais announced
We will hold our regular Dune dev meeting tomorrow, on Wednesday, November, 13th at 9:00 CET. :warning: Note that the session has been moved one hour earlier. As usual, the session will be one hour long.
Whether you are a maintainer, a regular contributor, a new joiner or just curious, you are welcome to join: these discussions are opened! The goal of these meetings is to provide a place to discuss the ongoing work together and synchronise between the Dune developers !:smile:
:calendar: Agenda
The agenda is available on the meeting dedicated page. Feel free to ask if you want to add more items in it.
:computer: Links
- Meeting link: zoom
- Calendar event: google calendar
- Wiki with information and previous notes: GitHub Wiki
Other OCaml News
From the ocaml.org blog
Here are links from many OCaml blogs aggregated at the ocaml.org blog.
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.