Previous week Up Next week


Here is the latest Caml Weekly News, for the week of February 07 to 14, 2012.

  1. Vim plugin
  2. llpp v10
  3. OCaml/MinGW
  4. interval trees
  5. Package installation assumptions made by odb
  6. Interval programming library
  7. Other Caml News

Vim plugin


Continuing the thread from last week, Pierre Vittet announced:
I have made a minor update of the plugin: When we print the type using
<LocalLeader>t, the type is also copied in the unnamed register. This allows
to copy it easily.

llpp v10


malc announced:
New version of llpp is now available (tagged v10) at ;


llpp a graphical PDF viewer which aims to superficially resemble

Changes (relative to v7, last version being announced here):

* MuPDF grown itslef XPS and CBZ support
* Margin trimming
* Multi column mode
* Probably more, since:

llpp$ git diff --stat v7..v10 | tail -1
 11 files changed, 5206 insertions(+), 2514 deletions(-)

How to build/run:



malc announced:
GCC shipped with (current) MingW no longer recognizes -mno-cygwin
argument, my oline searches for a workaround were fruitless, but
turns out there is one, one can create a self specs file and
make gcc (the driver) strip -mno-cygwin from cc1 invokation. This
can be done by putting a file named "specs" into a directory listed
under "install:" in the output of `gcc -print-search-dirs' containing
following line:
*cc1: %<mno-cygwin

Hope that would save someone the trouble of making things run.

interval trees


Francois Berenger asked and Richard Jones replied:
> I need to use an interval tree.
> Biocaml has one, batteries have imap/iset, nice!
> However, I have intervals of reals, not integers. :(
> I want to build the tree (once), then query it with a real number
> (many times) like in: which intervals contain the query real number?
> Should I convert my floats to ints (by sorting them then ranking) before
> inserting them into some existing interval tree for integers?
> I am not so concerned about the pre-processing time.
> Should I write from scratch?

I wrote a segment tree (integers, not floats), which is similar.  It
wasn't very hard.  The code is here if it helps:;a=blob;f=lib/;hb=HEAD
Goswin von Brederlow asked, Eliot Handelman replied and Sebastien Ferre added:
> >  Anyone have something like this but for non-overlapping intervals and
> >  allowing interval insertion and removal with merging and spliting of the
> >  internaly used intervals?
> >  
> >  Cis from Sébastien Ferré?
> >  
> >

The Cis library (Cis for Compact Integer Sets) is
designed for representing sets of integers, but it
could easily be adapted to the insertion and
removal of intervals since it already handles
the merging and spliting og intervals.
Edgar Friendly also replied and Philippe Veber said:
> Yes, IMap / ISet (borrowed from camomile and improved) do this.  I assume
> biocaml's is the same.

Actually no, biocaml_intervalTree keeps the inserted intervals untouched, it
is in fact pretty similar to an interval multimap, with some specialized
operations. In cases when we want to describe a set of integers (vs a set of
intervals), we use ISet from Batteries. With these two structures we can
describe an interesting range of genome annotations.

Package installation assumptions made by odb


Edgar Friendly said:
odb is a simple ocaml program to install ocaml packages with
dependencies. I've written a document on the assumptions it makes of the
packages it's to install. By sharing this, I hope to influence library and
application developers to use a standard interface for compiling their

The details are here:

Thank you for any feedback. Please bear in mind that odb is meant to be
simple, so the complexity of configuring, building and installing any packages
is expected to be in that package's build system, and not odb itself.

Interval programming library


Jean-Marc Alliot announced:
This is an interval computation library for ocaml. The download link is :

This library uses assembly code to compute all operations with proper
roundings (high/low), and currently ONLY works on intel processors.
The package has been developped for linux systems but should probably
work on windows distribution with a few tweaks.

Documentation is available in the doc/ directory in html, pdf and dvi
formats. It is extremely wise to read the whole documentation, even if
you intend to only use the interval module.

To build the library just type "make" in the main directory.

Tests are available in the TESTS/ directory. They are mainly for
debugging purpose and quite complicated. You may run them to
check that everything is working properly for your machine.
The test program runs also a speed test program for your
particular architecture.

Examples are available in the EXAMPLES/ directory. There is a
B_AND_B sub-directory with an example of a branch-and-bound algorithm
that uses interval arithmetics for function optimization (the
example is for the Griewank function, but you can substitute
any function you like).
Jean-Marc Alliot later added:
As requested by Fabrice, this is the link to the web page for the library.
There are some more things on this page, such as an introduction to interval
programming, and to B&B techniques with interval arithmetic.

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

Rediscovering the RSync Algorithm:

gapi-ocaml v0.1 released:

Opa presentation at a game development meetup, GameJS:

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