OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of October 06 to 13, 2026.
Table of Contents
betacalendars 1.0.0 — deterministic date and calendar utilities
Beta Calendars announced
I’m happy to announce the first stable release of betacalendars, an OCaml library for timezone-independent civil-date arithmetic and deterministic calendar generation.
The library provides Gregorian date operations, configurable month and year grids, bounded recurrence rules, and date-range and calendar-boundary utilities. It is designed for predictable date-only work without relying on local time zones.
Install it with opam:
opam update opam install betacalendars
- Source: https://github.com/mateopedersen/betacalendars-ocaml
- Release: https://github.com/mateopedersen/betacalendars-ocaml/releases/tag/v1.0.0
- API docs: https://mateopedersen.github.io/betacalendars-ocaml/
- opam package metadata: https://github.com/ocaml/opam-repository/blob/master/packages/betacalendars/betacalendars.1.0.0/opam
The package has been tested with OCaml 4.14 and 5.5, including its test suite and generated documentation. Feedback and questions are welcome.
Sedlex 3.8.1
Hhugo announced
Sedlex 3.8.1 is out! 🎉
Sedlex is a unicode-friendly lexer generator for OCaml originally written by Alain Frisch at LexiFi and now maintained under the ocaml-community umbrella.
The headline feature is named capture groups. Sub-patterns can be bound
with OCaml's as syntax and read back in the action:
match%sedlex buf with
| (Plus ('0'..'9') as num), '.', (Plus ('0'..'9') as frac) ->
let n = Sedlexing.Utf8.of_submatch num in
let f = Sedlexing.Utf8.of_submatch frac in
Printf.printf "integer=%s fractional=%s\n" n f
| _ -> ()
Captures are implemented with a tagged DFA, so the generated lexer remains a
single pass with no backtracking, and lexers that don't use as generate the
same code as before. Sub-matches are leftmost-greedy within the longest match.
as is not allowed under Star, Plus, Opt, Rep, Compl, Sub or
Intersect.
This release also brings, among other things:
- Unicode 18.0.0
- Faster
lexeme,sub_lexemeandof_submatchfor Latin1, UTF-8 and UTF-16
You can read the notes in https://github.com/ocaml-community/sedlex/releases/tag/v3.8 (unreleased) and https://github.com/ocaml-community/sedlex/releases/tag/v3.8.1.
It should be available soon on opam.
opam 2.6.1
Kate announced
Hi everyone,
opam 2.6.1 is now available.
This release *fix*es a *regr*ession from 2.6.0 where opam install --deps-only would *not inst*all the depexts field from the *pack*ages being *reque*sted.
It also impr*oves handling of Git repositories in things like *docker containers and works around a bug in Git-for-Windows 2.56.0.windows.1 (e.g. shipped by GitHub Actions)
:open_book: You can read our blog post for relevant links and details.
Try it!
The upgrade instructions are unchanged:
For Unix systems
bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.6.1"
or from PowerShell for Windows systems
Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) } -Version 2.6.1"
Please report any issues to the bug-tracker.
Happy hacking, <> <> The opam team <> <> :camel:
Bold text is dotted around as an experiment to make it easier to read and faster to comprehend
shakuhachi v0.4.0
EruEri announced
Dear all,
I’m happy to announce the release of shakuhachi v0.4.0.
Shakuhachi is still a music collection manager.
This release implements the 2 mains missing bits:
Query float/date property from the command line
# example: List all musics of *Googgosh* played within the last 24 hour $ skhc list %played_at:1dago..now %artist:Googoosh # Or with the S-expression syntax $ skhc list -Q "(and %played_at:1dago..now %artist:Googoosh)"
Complex stats are finally computed when querying an artist
# example: List all artists having at least two albums $ skhc list -Iartist %album_count:2..
This release also supports more… a sensible tagging/writing properties.
- When adding a music the property ALBUMARTISTS (resp. ARTISTS) will be looked first and fallback to *ALBUMARTIST (resp. *ARTIST).
- When tagging, two new options -j and -J which set a joinphrase between the name of artists and artists of albums
$ skhc tag -a "Sona Jobarteh" -j '&' -a "Youssou N'Dour" Kambengwo.flac # Will set ARTIST as a single value and ARTISTS as value containing two values # ARTIST = Sona Jobarteh & Youssou N'Dour # ARTISTS = Sona Jobarteh | Youssou N'Dour
https://codeberg.org/EruEri/shakuhachi
Thanks you for your time Sincerely yours.
Docfd: TUI multiline fuzzy document finder - 13.1.3 + proper user guide
Darren announced
Hi all,
I am happy to announce the release of Docfd 13.1.3. And since I got a bit of time (got laid off from mass restructuring), I finally combined all the scattered instructions into a proper (though basic) user guide, which I hope nicely illustrates the cool parts of Docfd.
What Docfd is
Think interactive grep for text files, PDFs, DOCXs, etc, but word/token based instead of regex and line based, so you can search across lines easily.
Docfd aims to provide good UX via integration with common text editors and PDF viewers, so you can jump directly to a search result with a single key press.
Cheers, Darren
OUPS meetup october 2026
ancolie announced
The next OUPS meetup will take place on Tuesday, 3rd of November 2026. It will start at 6:30pm at the 4 place Jussieu in Paris. It will be in the in the amphitheater 45A. There is a map of the buildings.
Please, register on meetup as soon as possible to let us know how many pizza we should order.
For more details, you may check the OUPS’ website .
Moreover, we’d like to announce that the organizing team moved to the OCaml Zulip. Feel free to contact us there if you’d like to suggest talks.
—
This time we’ll have the following talks:
Compiling FFI-heavy OCaml to WebAssembly: An Experience Report on MOPSA – Réda Boudrouss
Large OCaml applications often rely on native C and C++ libraries through the OCaml FFI, making them difficult to run in the browser. Existing browser backends compile OCaml to JavaScript or WebAssembly, but leave the native dependency stack behind.
In this presentation, we explore a different approach: compiling the OCaml runtime together with the complete native dependency stack to WebAssembly using Emscripten, and running the original OCaml bytecode on top of it. FFI calls are resolved through a static primitive table, without modifying existing FFI code or CamlIDL-generated bindings.
We demonstrate this approach on MOPSA, a static analyzer combining OCaml with LLVM/Clang, GMP, MPFR, Apron, and CamlIDL, and show how the complete application can run directly in a web browser.
Designing a Set-Theoretic Type Library in OCaml – Mickaël Laurent
In this talk, I will share my experience using OCaml to design a library for set-theoretic types. Set-theoretic types are difficult to define because they consist of several recursive components and layers. Furthermore, the termination of certain operations on recursive types depends on a hash-consing system operating at various levels. I will discuss the challenges and advantages of using OCaml, such as the difficulty of making some recursive modules typecheck and how we used algebraic effects to implement our hash-consing system.
—
After the talks there will be some pizzas offered by the OCaml Software Foundation and later on we’ll move to a pub nearby as usual.
faker 0.1.1: fake (but realistic) data, seed-compatible with faker-js
Bartek Teodorczyk announced
I'm happy to announce faker, a library for generating fake but realistic data: names, addresses, emails, phone numbers, companies, dates, finance data, lorem ipsum and more, in 77 locales.
opam install faker
As far as I could find, OCaml didn't have a faker-style library. Property-testing generators like QCheck give you random values, but not plausible, localised fixtures for demos, seeding a development database or snapshot tests.
faker is a port of @faker-js/faker 10.6.0, with seed-for-seed parity: for the same seed, every method returns exactly what faker-js returns. It uses the same MersenneTwister19937 generator and the same algorithms, so an OCaml service and a JS/TS service can share fixtures.
let () =
let f = Faker.create ~seed:42 () in
print_endline (Faker.Person.full_name f);
print_endline (Faker.Internet.email f);
print_endline (Faker.Location.city f);
print_endline
(Faker.Helpers.fake "{{person.firstName}} works as a {{person.jobTitle}}" f);
let de = Faker.Locales.De.faker () in
Faker.seed de 42;
print_endline (Faker.Person.full_name de);
let ja = Faker.Locales.Ja.faker () in
Faker.seed ja 42;
print_endline (Faker.Person.full_name ja)
Nikita Crist Moises.Sipes-Effertz18@gmail.com Lolaville Jeannette works as a Forward Implementation Analyst Melinda Dragu 吉川 結衣
The equivalent faker-js code prints the same six lines.
What's in it
- All 26 faker-js modules (
Faker.Person,Faker.Internet,Faker.Location,Faker.Date,Faker.Finance,Faker.Commerce, …) and all 77 locales. - The API mirrors faker-js, so the faker-js API reference documents every method. The faker instance is always the last argument, and options are optional labelled arguments:
faker.number.int({ min: 1, max: 10 })becomesFaker.Number.int ~min:1 ~max:10 f. - No dependencies beyond the stdlib and
unix. Locales are linked on demand, so an English-only program doesn't carry the other 76.
How parity is checked
dune test compares the OCaml output with fixtures generated by running faker-js itself: 3 seeds for every case, plus a sweep of every method in every locale (about 72,000 checks). Getting them all to pass meant solving a few problems that may interest people here:
- FMA contraction. On arm64, the OCaml compiler fuses
a *. b +. cinto a single fused multiply-add, which rounds differently from V8. The port uses an explicit multiply where it matters. - Evaluation order. OCaml evaluates function arguments and record fields right to left, so every random draw is bound with
letin faker-js's order. - UTF-16 semantics. JS string lengths, case mapping and NFKD normalisation are emulated on UTF-8 strings, with tables generated from Node.
- Floating-point maths.
location.nearbyGPSCoordinateuses a port of V8's fdlibmsin~/~cos. The one known platform dependence isMath.powin the exponential distributor: Node calls the system libm, so faker-js itself rounds the last bit differently on FreeBSD. opam-repo-ci found this, and 0.1.1 is the fix.
The porting notes are in docs/PORTING.md, and the remaining differences are listed in the README under "Known differences".
Links
- Package and API docs: https://ocaml.org/p/faker
- Source: https://github.com/barteo/faker-ocaml
- Issues: https://github.com/barteo/faker-ocaml/issues
All the data and algorithms come from faker-js, so many thanks to the faker-js team and contributors. Feedback and bug reports are very welcome, especially any case where the output differs from faker-js.
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.