Blog

The OCaml Planet RSS

Articles and videos contributed by both experts, companies and passionate developers from the OCaml community. From in-depth technical articles, project highlights, community news, or insights into Open Source projects, the OCaml Planet RSS feed aggregator has something for everyone.

Want your Blog Posts or Videos to Show Here?

To contribute a blog post, or add your RSS feed, check out the Contributing Guide on GitHub.

OCaml Weekly News, 27 Oct 2026

uniker.nl - Unikernels in OCamlAnnouncing segmap, a fast data structure for renamingshexen.0.1intel_hex.1.0Js_of_ocaml / Wasm_of_ocaml 6.5TIFF Inspector: an ocaml-tiff based inspector, with an in-browser OCaml playgroundOCaml 5.5.2 releasedbytream.0.4First release of spvecocaml-emcc: compile OCaml programs with their C stubs to WebAssemblyNew release of snkv-ocaml 0.3.0 — OCaml bindings for SNKV with HNSW vector searchBuilding TIFF Inspector: Exploring OCaml, TIFF Internals, and an In-Browser Playgroundstele 0.1.0: syntax-error messages for Menhir grammarsOSEC-2026-21: Str partial-match stale capture registers underflowOSEC-2026-22: Integer overflow in Unix.map_fileOSEC-2026-23: Multiple issues in MarshalOSEC-2026-24: Multiple issues in command quoting on WindowsOSEC-2026-25: Heap buffer overflow in the OCaml ~runtime_events~ consumer when parsing an oversized custom user eventOSEC-2026-26: runtime_events user event name-based type confusion

27 Oct 2026

Caml Weekly News

Read Article
Notes from week 43

ocaml.org memory and CPU improvements; the first Tessera block processed straight into the Zarr store; a CephFS kernel bug that returned zeros for files that were fine; and day10 updates.

26 Oct 2026

Marc Elvers

Read Article
k7: Keeping CLI Animations in Sync with Your Code

I have always been a fan of asciinema and of Charm's VHS. asciinema records a terminal while you use it, and VHS types a script of commands into a terminal and films the result. I wanted their animations in the READMEs of my projects, but I always forgot the syntax of VHS's tape files, and I always mistyped a command halfway through an asciinema recording (and then started again). I also always forgot to re-run those recordings when my API changed, and they got out of sync quickly. Fortunately, most of my projects already check their command-line output with cram tests, transcripts of shell commands and of what they print, which dune, OCaml's build system, runs as tests. Making those tests produce animated images was a short stretch, and then, why stop there? The result is k7 (how the French write cassette, if you say it out loud), a command-line tool that records any program, whatever its language, as an SVG image animated with CSS alone. Here is ls, and sl, which I regularly enjoy mistyping. Each took one command, such as k7 rec -o sl.svg -- sl, which generates an animation you can embed in any HTML page (and in your projects' READMEs). ls, as I meant to type it. sl, as I actually typed it. Animations that dune checks I was not the first to draw a terminal as an animated SVG. termtosvg (now archived) and svg-term-cli do it too. What k7 adds, I think, is that it both writes and plays dune's cram tests. A cram test is a text file that reads like a terminal session. Each command is indented and starts with $ , the output it should print sits below it, and any other line is a comment: Print a greeting: $ printf 'hello\n' hello dune test runs the commands of each test in a new empty directory and compares what they print with the file. When the output changes, dune shows the difference, and dune promote writes the new output into the file. k7 fits into that loop at both ends. k7 rec -o hello.t -- printf 'hello\n' writes the test above (without the comment). In the other direction, k7 play types the commands of a cram test into bash and draws what happens. The image at the top of k7's README comes from doc/demo.t, drawn by k7 play -o doc/demo.svg doc/demo.t. Dune runs the same file as a test, so the test fails exactly when the image needs drawing again, and drawing it again takes one command. doc/demo.t from k7's repository, typed into bash by k7 play. The same screen as VHS, every time k7 rec runs a program on a pseudo-terminal and feeds what it prints to a terminal emulator, matrix, from Thibaut Mattio's mosaic project at Invariant Systems. I wanted k7 to draw the same screens as VHS, which runs xterm.js in a browser, so I fixed the places where matrix and xterm.js disagreed and sent the fixes upstream. Each time the program changes the screen, k7 keeps a copy of it, at most 50 times a second (as in VHS). Each distinct line of text is defined once, each frame refers to the lines it shows, and a single CSS @keyframes rule slides the strip of frames, jumping to each one at the time the program drew it. This keeps the file small when most lines stay put: the image of ls above takes 4 KB. A train crossing the screen is the worst case, and the image of sl takes 356 KB. The GIF that VHS made of the same sl, on a terminal of the same size, takes 2.1 MB. VHS drives a headless browser and encodes the frames with ffmpeg, and on my laptop it took 53 seconds, against 8 for k7 rec, about 7 of which were sl itself. A program like sl has no cram test, since its output is an animation rather than text. For those, k7 rec -o sl.cast -- sl keeps the recording itself, in asciinema's asciicast v3 format, and k7 play draws it, or any asciinema recording, without running anything. Recording is not deterministic, but drawing is. Record sl twice and the two recordings differ, because the program never prints at quite the same times. Draw one recording twice and you get the same file, byte for byte. So dune can check a committed image against the recording beside it: (rule (target sl.generated.svg) (action (run k7 play -o %{target} %{dep:sl.cast}))) (rule (alias runtest) (action (diff sl.svg sl.generated.svg))) A tape syntax the compiler remembers That leaves the VHS tape syntax I kept forgetting. k7 plays .tape files too, and in OCaml, the K7 library builds tapes as values instead, so the compiler remembers the syntax for me: let tape = K7.tape ~settings:K7.[ Font_size 18; Width 1000; Height 560 ] ~outputs:[ "demo.gif" ] K7.[ type' "dune test\n"; wait Prompt; sleep (Ms 2000) ] K7.tape checks the tape against the rules of VHS's parser as soon as it is built, theme name included, where VHS only notices a misspelt theme when it runs the tape. Its tests hold it to vhs validate on 3000 random tape lines, as I held my Tailwind rewrite to Tailwind itself. Trying it k7 0.9.0 is in my Homebrew tap, for macOS and Linux, and on opam for OCaml 5.4 and later: $ brew install samoht/tap/k7 $ opam install k7 A few edge cases are not supported (the README lists them), but for most uses it seems to work fine. If k7 draws something differently from VHS or asciinema, please open an issue with the recording (k7 rec -o bug.cast -- yourprogram makes one).

26 Oct 2026

Thomas Gazagnaire

Read Article
.plan-26-43: Wireguard meshes over troubled water

Forester toplevels are working well in FoCS lectures, a smooth Patch the Planet week with Trail of Bits, and drowning in security reports.

25 Oct 2026

Anil Madhavapeddy's Blog

Read Article
OCaml Weekly News, 20 Oct 2026

opentelemetry 0.92

20 Oct 2026

Caml Weekly News

Read Article
uniker.nl, our new website for unikernels

A new workflow to develop and deploy unikernels

20 Oct 2026

Robur Cooperative

Read Article
Notes from week 42

day10 reverse dependencies are live and found a dune regression; the aardvark 2017 run finished; and the v2~beta1 Zarr store was rebuilt on a grid that no longer depends on its own data.

19 Oct 2026

Marc Elvers

Read Article
.plan-26-42: Tails of the unexpected

Back to lecturing Foundations of CS, why List.tl raises, a record Tessera crowd at the CCI, and a sample of termtime meetings from Japanese AI governance to NVIDIA and samosa socials.

18 Oct 2026

Anil Madhavapeddy's Blog

Read Article