OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of December 18 to 25, 2018.

Merry Christmas!

Table of Contents

Next feature for Logarion

Orbifx announced

Getting ready for another release of Logarion. I might be able to squeeze in another feature before that, what would you like to see?


If you want something that is not there, write a comment here or there, or post on the discussion list.

Blog post: Virtual Libraries in Dune

Rudi Grinberg announced

Dune is gaining a new feature called virtual libraries in the next release (1.7). It's a pretty interesting feature so I've written a blog post about it:


LSP, DAP protocols for language and debugger support

Perry E. Metzger announced

As an FYI to the OCaml community:

Microsoft has for some time been pushing a standardized protocol for language servers (of which Merlin is an example), called (appropriately enough) the Language Server Protocol. The notion behind the LSP is to allow any editor to be a good IDE for any language provided that a language server exists for the language and that it (and the editor) both speak the LSP. LSP has taken off very quickly; there's now reasonable emacs, vim, vscode, etc. support for it.

It appears Microsoft is now also in the process of creating a new protool called the Debug Adapter Protocol, which works to allow any editor or IDE to interface with any language specific debugger, provided both implement the protocol.

It might be nice if, over the long run, OCaml's tooling took advantage of the growing ecosystem these protocols provide. I recognize that this probably cannot happen very quickly, but it certainly is something interested people in the community should be aware of.

Ryan Slade said

A LSP implementation for OCaml already exists:


Louis Roché added

There are (at least) 3 LSP implementation for ocaml/reason actually:

Perry E. Metzger then said

Yes, and there's the Earlybird debug adapter. But so far as I can tell, these tools are not in wide use. It would probably be a good thing if, over time, using LSP and DAP became the default way that Merlin and the debuggers were interfaced to editors. (This might require some extensions to the protocols.)

LablGtk 3.0.beta3

Jacques Garrigue announced

Here is a third beta release of Lablgtk3.

It includes support for GtkBuilder as a replacement to libglade, thanks to the Matita people.

It is available for download at the usual location:

The opam package is on its way:

The code and bug reports are on GitHub
https://github.com/garrigue/lablgtk/tree/lablgtk3 (for the lablgtk3 branch)

Working with bit-level data

Anton Kochkov asked

I plan to implement bitfields support in Cstruct library. And I wonder on what syntax is best and probably an API, maybe there are already some good examples of OCaml libraries that work with bit-level data? If you ask - why not to just aggregate bits into bytes, there are two problems:

  1. If you don't align bitfields, all members can be shifted across byte boundary to be read directly
  2. Changing the way to read/write in case of different endianess

See https://github.com/mirage/ocaml-cstruct/issues/205 for more information.

Anurag Soni suggested

Is https://github.com/xguerin/bitstring similar to what you are looking for?

Anton Kochkov then said

Yes, it is similar, thanks.


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 online.