Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of September 02 to 09, 2014.

  1. capnp-ocaml 2.0.1
  2. Ocaml 4.02.0: Dead Code Elimination and Core
  3. ppx_deriving 0.3
  4. ppx_deriving_yojson 1.0
  5. Other OCaml News

capnp-ocaml 2.0.1


Paul Pelzl announced:
I'm pleased to announce the release of capnp-ocaml 2.0.1. It is
available in OPAM as package "capnp", or from the project website:

capnp-ocaml is a code generator plugin for the Cap'n Proto
serialization framework. Cap'n Proto's distinguishing feature is that
there is no explicit parsing/serialization step: the on-the-wire
message format is also designed to serve as an efficient in-memory
data structure representation.

Aside from important bugfixes, this release brings a larger and
better-designed I/O support library for moving messages across various
types of channels. Performance has also been significantly improved;
I've written a blog post about the benchmarking and optimization

An excerpt from the change log follows. Enjoy,


=== Backwards-incompatible changes
* Module `Codecs`: change API to accept the more natural
instead of `Bytes.t list`.
* Module `Codecs`: change API to accept a `compression` specifier,
instead of using
separate functions and separate types for compressed and uncompressed
* Module `Message`: `to_storage` now returns a list of (storage,
length) pairs.

=== Other changes
* Module `Codecs`: fix incorrect encoding of framing headers (for
as generated by `serialize`).
* Module `Codecs`: fix infinite loop in `PackedStream` decoding.
* Module `Codecs`: reduce serialized message sizes, by omitting unused
regions from the serialized messages.
* Instantiate `BytesMessage = Message.Make(BytesStorage)`, so the user
doesn't always
need to. (Implementation is furthermore defunctorized for improved
* New module `IO`: functions for moving message data through various
types of I/O
* Compiler now says something about files it created.
* Corrected compilation errors when using 4.02 `-safe-string`.
* Significant performance improvements across the board.

Ocaml 4.02.0: Dead Code Elimination and Core


Jacques Garrigue replied to this request from Goswin von Brederlow:
> Note: an example using oasis would be the best. :)

I just gave a presentation at the ML workshop about that.
There is no oasis code, but the slides explain well how to call the compiler,
and the impact on dependencies.

ppx_deriving 0.3


Peter Zotov announced:
I'm glad to announce the 0.3 release of ppx_deriving[1],
which is available for installation via OPAM.


  * Show, Eq, Ord, Iter, Fold: handle ref.
  * Show: include break hints in format strings.
  * Show: pull fprintf into local environment.
  * Show: add [@polyprinter] and [@opaque].


ppx_deriving_yojson 1.0


Peter Zotov announced:
I'd like to announce the initial release of ppx_deriving_yojson[1],
a ppx_deriving[2] plugin that generates Yojson serializers and
deserializers from type definitions.

It is available for installation via OPAM.


Other OCaml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the OCaml Weekly News the links to the
recent posts from the ocamlcore planet blog at

Concatenation of a list of strings:

OCaml 4.02.0 available:

Terms With Variables (C++):

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