Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of December 05 to 12, 2017.

  1. ocamlnet-4.1.5
  2. New release of Menhir
  3. cpm.3.0.0 will be available in OPAM soon
  4. Interesting interview with Xavier Leroy
  5. Batteries 2.8.0
  6. ocamlbuild 0.12.0
  7. ppx 4.06 editions: ppx_import, ppx_deriving, ppx_deriving_{protobuf,yojson}
  8. Other OCaml News



Gerd Stolpmann announced:
there is now ocamlnet-4.1.5 available:

- compatibility with recent versions of the nettle library

- the cmxs files are now installed and you can load ocamlnet as plugin
  (most work from Jaap Boender)

See the project page for download, documentation, a detailed changelog,
and the mailing list:

The repository has been moved to

opam follows soon.

New release of Menhir


François Pottier announced:
I would like to announce a new release of Menhir, the LR(1) parser generator.

This release fixes the termination test that takes place before parameterized
symbols are
expanded away. The previous test was both unsound (it would accept grammars
whose expansion did not terminate) and incomplete (it would reject
grammars whose expansion did terminate). The new test is believed to be
sound and complete. (Thanks to Martin Bodin for prompting us to look into this issue.)

It is available as of now via opam.

cpm.3.0.0 will be available in OPAM soon


UnixJunkie announced:
cpm: Classification Performance Metrics library (ROC AUC, BEDROC AUC, EF, PM, etc.).

Useful for people doing classification / machine learning.

Code is there:

module type SCORE_LABEL = sig
  type t
  val get_score: t -> float
  val get_label: t -> bool

module type ROC_FUNCTOR = functor (SL: SCORE_LABEL) ->
  (** sort score labels putting high scores first *)
  val rank_order_by_score: SL.t list -> SL.t list
  (** compute the cumulated actives curve given
      an already sorted list of score labels *)
  val cumulated_actives_curve: SL.t list -> int list
  (** compute Area Under the ROC curve given an already sorted list of
      score labels *)
  val roc_curve: SL.t list -> (float * float) list
  (** ROC curve (list of (FPR,TPR) values) corresponding to
      those score labels *)
  val fast_auc: SL.t list -> float
  (** compute Area Under the ROC curve given an unsorted list
      of score labels *)
  val auc: SL.t list -> float
  (** (early) enrichment factor at given threshold (database percentage)
      given an unsorted list of score labels *)
  val enrichment_factor: float -> SL.t list -> float
  (** power metric at given threshold given an unsorted list of score labels *)
  val power_metric: float -> SL.t list -> float
  (** bedroc_auc at given alpha. Default alpha = 20.0. *)
  val bedroc_auc: ?alpha:float -> SL.t list -> float

Interesting interview with Xavier Leroy


Perry E. Metzger announced:
Interesting interview, covering things like how CompCert came about, the early
history of OCaml, etc.

Batteries 2.8.0


gasche announced:
On November 14th was released [Batteries
that brings compatibility with OCaml 4.06.

Batteries is a community-maintained foundation library for OCaml projects -- in
the same space as Base, Core, and Containers -- that tries to remain compatible
with the interfaces exported by the OCaml compiler's standard library.

As always, we backported the 4.06 standard library functions within Batteries,
which means that code using them through Batteries will be compatible with older
OCaml versions -- except for functions relying on new capabilities from the
OCaml runtime. The independent
[Stdcompat](, announced on the
same day, has the same goal of easing the use of new OCaml library functions,
and I hope that we can share our efforts in the future.

ocamlbuild 0.12.0


gasche announced:
On November 11th we released [OCamlbuild

OCamlbuild is a build system for OCaml projects, that tries to require minimal
effort for simple projects yet scale to more complex builds.

OCamlbuild 0.12.0 is a maintenance release containing mostly bugfixes and a few
user-contributed features. (This release was not required by OCaml 4.06, as
previous versions of ocamlbuild work just fine with 4.06.)

- [#227]( install
signatures.{mli,cmi,cmti} to help documentation tools
  (Daniel Bünzli and Gabriel Scherer)

- [#232]( fix Windows install rules
  (David Allsopp)

- [#234]( add "afl_instrument"
and "afl_inst_ratio" flags for corresponding ocamlopt options.
  (Jeremy Yallop)

- [#237]( extend cc/ccopt/cclib
flags to apply to "ocaml" compilation as well, as tweaking the C linker can be
required for pure-OCaml projects -- see
  (Gabriel Scherer, report by Nathan Rebours)

- [#253]( only run native tests
if ocamlopt is available.
  (Ximin Luo, review by whitequark and Gabriel Scherer)

- [#256](,
[#258]( pass -keep-docs and
-keep-locs when using -pack
  (Gabriel Scherer, report by Vincent Jacques)

- [#257](,
[#259]( add `_opam` to the list
of directories ignored by default; it is used for package-local opam switches
  (Gabriel Scherer, request by Edwin Török)

ppx 4.06 editions: ppx_import, ppx_deriving, ppx_deriving_{protobuf,yojson}


gasche announced:
Over the last few months, we have released 4.06-compatibility versions of
[ppx_deriving]( and its plugins
[ppx_deriving_protobuf]( and
[ppx_deriving_yojson](, and the
related project [ppx_import](

- ppx_import [1.3](
and [1.4](
- ppx_deriving
[4.1.5]( and
- ppx_deriving_protobuf
- ppx_deriving_yojson

Some users may remember that it took a long time for support for OCaml 4.05 to
come to these projects, and know that there have been some lingering issues
related to interaction between ppx_deriving and driverized ppxes -- some of
which have been fixed by @diml's work on these issues, see [the separate
on the interaction between ppx_deriving, ppx_type_conv and jbuilder.

The main reason for these delays and trouble is that, while the author and
maintainer of ppx_deriving and plugins, @whitequark, let me know several months
ago that she would be less active maintaining these libraries in the future, I
have been too slow to fill in this maintenance gap. Now that I understand the
release process and the amount of work required to adapt to a new OCaml release
(which is not much), I expect that support releases for newer OCaml versions,
starting with 4.07, will be much smoother -- the hope is to release them before
the OCaml version itself.

If you have been using these projects (especially if you have already
contributed some code, but that is no requirement), now is an excellent time to
get more involved in the development. I will take care of compatibility with
future OCaml releases, and simple bugfixes, but there are interesting changes to
be discussed for these libraries (partial or complete migration to
ocaml-migrate-parsetree, driverization, convergence with ppx_type_conv, and in
general participation in the rapidly-evolving ppx ecosystem) on which your help
would be very welcome, and more active contributors, more voices to discuss
decisions, can only improve the project.

Other OCaml News

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

Spartan type theory

How to migrate your ppx to OCaml migrate parsetree

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