Previous week Up Next week


Here is the latest Caml Weekly News, for the week of July 05 to 12, 2011.

  1. Priority queues, reloaded
  2. Atdgen 1.2.0 + tutorial, OMake/Make support
  3. Other Caml News

Priority queues, reloaded


Deep in this thread, Jon Harrop asked about heaps and priority queues in Ocaml and James Woodyatt replied:
I released this years ago.  It's stable, meaning I use it all the
time, and I never touch it.

From the README in the Cf library:

>> Highlighted features include:
>> - Functional streams and stream processors (extended).
>> - Functional bootstrapped skew-binomial heap.
>> - Functional red-black binary tree (associative array).
>> - Functional sets based on red-black binary tree.
>> - Functional real-time catenable deque.
>> - Functional LL(x) parsing using state-exception monad.
>> - Functional lazy deterministic finite automaton (DFA).
>> - Functional lexical analyzer (using lazy DFA and monadic parser).
>> - Functional substring list manipulation (message buffer chains).
>> - Gregorian calendar date manipulation.
>> - Standard time manipulation.
>> - System time in Temps Atomique International (TAI).
>> - Unicode transcoding.
>> - Universal resource identifier (URI) manipulation.
>> - Extended socket interface (supports more options, and UDP w/multicast).
>> - I/O event multiplexing (with
>> - Functional XML stream parsing and generation
>> - Functional MIME stream parsing and generation

Among other treasures, it has priority queues built with the bootstrapped 
skew-binomial heaps.

Nobody knows about my Oni project because I rarely put any effort into 
promoting it, but its Cf library is an excellent alternative to the OCaml 
standard library in many ways.  There is a GODI package for it, of course, 
but the OCaml With Batteries people settled on a more popular alternative 
(and who can blame them) so again nobody knows about it.  Nevertheless, if 
you need the complete array of functional data structures in OCaml, you 
should look at the Cf library I wrote.  It's pretty good.

Atdgen 1.2.0 + tutorial, OMake/Make support


Martin Jambon announced:
I have the pleasure to officially announce this new release of Atdgen.
Atdgen is a tool that generates optimized OCaml code from type
definitions, primarily for data serialization:

Atdgen supports one text format, JSON, and one binary format, Biniou,
which retains most properties of JSON.

  JSON specification:
  Biniou specification:

What's new

* a tutorial:

* new command-line modes (-t, -b, -j, -v) and new conventions that make
it easier to split groups of type definitions into multiple files and
OCaml modules. Existing users of Atdgen are encouraged to switch to this
new model, described in the tutorial.

* a validator mode (-v) which produces code that calls user-specified
validators on the nodes of data structures to validate.

* OMake support:

* GNU Make support:

Development status

Atdgen is being developed at MyLife ( where we use
it routinely to process and serve terabytes of rich data.

The source repository is publicly hosted on GitHub:

Technology used

* type definition parsing (atd package): ocamllex + menhir
* JSON parsing (yojson package): ocamllex, some Obj
* Biniou parsing (biniou package): handwritten OCaml, some Obj
* pretty-printing (atd, yojson, biniou): easy-format, relying on Format
* not-too-ugly-printing OCaml code (atdgen) uses simple technique
implemented here:

(Atdgen does not use Camlp4)

Other Caml News

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

Stacks and other stuff:




Batteries 1.4.0 released:

Was running into this problem, fixed by disabling that setting....:

How to organize Ocsigen projects to compile to a native code binary (and why this is not good).:

OCamlspotter 1.3.0:

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