Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of December 19 to 26, 2017.

  1. OPAM 2.0 and the "source" external dependencies
  2. Databases and OCaml
  3. New name for jbuilder
  4. Work on the OCaml compiler at Jane Street
  5. Lwt 3.2.0 – Promises and concurrent programming
  6. Yaml 0.1.0 released
  7. Ocaml Github Pull Requests
  8. Other OCaml News

OPAM 2.0 and the "source" external dependencies


Jacques Pa announced:
Just a small announcement for OPAM packagers here.
According to the new external dependencies (depexts for short) implementation in
OPAM 2.0 [1], the `"source"` depexts will not be supported anymore.

The `"source"` depext allowed you to execute any arbitrary script as root and is
usually used for installing external dependencies from source when those are not
available on some or any distributions.
This is not possible anymore with OPAM 2.0. The rational is that it is too much
of a security risk, the user using `opam depext` has no control over what is
executed and the installation process is quite arbitrary.

The last bits of `"source"` depexts will be removed soon enough from the
opam-repository [2]. If you are maintaining any library that needed to use the
`"source"` depext in order to comply with the CI system or anything of that
matter, please do not use it and add a `post-messages` in case of failure
telling how the users might want to install the missing dependencies in case
they are not available in any or too few distributions.


Databases and OCaml


Brendan Long announced:
If anyone is interested, I put Arena's new Postgres library (PGX) [on
GitHub]( There's still a lot of work to do
before I make a bigger announcement, but if you want something similar to
PG'OCaml with a higher-level interface and more tests it might be for you.

At this point we're definitely planning to change the interface in
non-backwards-compatible ways, and we're also looking for feedback on the
interface. Our goals (in order of priority) are:

 - Safety -- the library should prevent you from doing things wrong whenever possible
 - Ease of use -- Try to reduce boilerplate as much as possible and make it
obvious how to do things right
 - Speed -- If we can get it without hurting the other two
UnixJunkie then replied:
On the minimalist side of things, there is a dbm package in opam.
"Binding to the NDBM/GDBM Unix databases"

New name for jbuilder


Jérémie Dimino announced:
It's now settled: Jbuilder will be renamed Dune.

Thanks to everyone for helping in finding a new name for Jbuilder! I personally
loved the dune books and I'm looking forward to this rename, I think it's a
great choice for Jbuilder.

We'll start the renaming work at the beginning of next year, you can follow the
advancement on [this ticket](
Dune will be the first non-beta release of the project.

Jbuilder has gone a long way since it's initial alpha release in December 2016,
and I hope Dune will continue to grow and help more developers in 2018.

Jbuilder has evolved from a domain specific industrial tool into a standard
build system for the community. There are now 456 packages in opam using
Jbuilder from [310 different
repositories](, and the team has
grown with 3 new active developpers.

We are ending this year with exciting work such as cross compilation, with
already lots of packages in the
repsository]( successfully
using jbuilder to cross compile.

2018 will bring more good news, with in particular the addition of the plugin
system which is starting to flesh out nicely. We will also move Dune from the
janestreet github organization to a community one.

I thank everyone who contributed to jbuilder by submitting pull requests,
reporting issues, participating in design discussions, organizing brainstorming
sessions and just using it in their projects. A special thank to @rgrinberg who
joined the project early this year and has enormously contributed to it.

Work on the OCaml compiler at Jane Street


Yaron Minsky announced:
As Jane Street grows, the quality of the development tools we use matters more
and more. We increasingly work on the OCaml compiler itself: adding useful
language features, fine-tuning the type system and improving the performance of
the generated code. Alongside this, we also work on the surrounding toolchain,
developing new tools for profiling, debugging, documentation and build

We’re looking to hire a developer with experience working on compilers to join
us. That experience might be from working on a production compiler in industry
or from working on research compilers in an academic setting. No previous
experience with OCaml or functional programming languages is required.

We’re looking for candidates for both our London and New York offices. See this
post for more.

Lwt 3.2.0 – Promises and concurrent programming


Anton Bachin announced:
It is my pleasure to announce release 3.2.0 of Lwt, the promise and
concurrent I/O library.

See the full changelog here:

Apart from bug fixes and new APIs, this release schedules several
breaking changes, to be committed in Lwt 4.0.0. Lwt 4.0.0 will be
released in March 2018.

The breaking changes are detailed here:

An abbreviated list:

- We will adjust the semantics of Lwt.bind [1].
- The PPX, Camlp4 extension, and lwt.log are being factored out into
  their own opam packages.
- lwt.preemptive is being merged into lwt.unix, and the name
  lwt.preemptive is being retired.
- The >> syntax is being removed from the PPX.

Happy concurrent programming!


Yaml 0.1.0 released


Anil Madhavapeddy announced:
This is an OCaml library to parse and generate the YAML file
format. It is intended to interoperable with the
JSON handling library, if the simple common subset of Yaml 
is used.  Anchors and other advanced Yaml features are not
implemented in the JSON compatibility layer.

The [Yaml module
docs]( are
browseable online.

## Example of use

Install the library via `opam install yaml`, and then execute a
toplevel via `utop`.  You can also build and execute the toplevel

$ opam install yaml
$ utop
# #require "yaml";;
# Yaml.of_string "foo";;
- : Yaml.value Yaml.res = Result.Ok (`String "foo")
# Yaml.of_string "- foo";;
- : Yaml.value Yaml.res = Result.Ok (`A [`String "foo"])
# Yaml.to_string (`O ["foo1", `String "bar1"; "foo2", `Float 1.0]);;
- : string Yaml.res = Result.Ok "foo1: bar1\nfoo2: 1.\n"

The [README]( contains
more information about how the library is structured. This repository is a
reasonable example of how to use
[ocaml-ctypes]( and stub generation to
bind to a C library without writing any actual C code for the bindings.

Ocaml Github Pull Requests

Gabriel Scherer and the editor compiled this list:
Here is a sneak peek at some potential future features of the Ocaml
compiler, discussed by their implementers in these Github Pull Requests.

- Adding "Queue.iteri" and "Queue.foldi" functions to the standard library
- Support empty variants

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,

Posts and Talks Elsewhere

Full Time: Tools & Compilers Engineer at Jane Street in New York & London

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong

frama-clang 0.0.4, compatible with Frama-C 16 is out. Download ithere.

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

Alan Schmitt