Previous week Up Next week


Here is the latest Caml Weekly News, for the week of January 24 to 31, 2012.

  1. SQL engine in OCaml with client side cache
  2. Vim plugin
  3. Other Caml News

SQL engine in OCaml with client side cache


Deep in this thread, Diego Olivier Fernandez said and Pons Gabriel Scherer replied:
> You don't seem to like SQL much, which is surprising as it is kind of
> isomorphic to comprehension of sets (of tuples). That's why F# added
> first class SQL support with comprehension-like syntax

This may be a little off-topic (but who cares at this point?), but
I'll take the chance to do some self-advertising here.
We (Jerôme Vouillon and I) have done something related a few years
ago: Macaque, a DSL for writing typed and composable SQL queries in
OCaml, in a comprehension syntax.

The comparison is that we also have something capable of typing SQL
queries as parts of OCaml programs. It more or less stops here, this
project is much less mature than the excellent LINQ work: it's mostly
a research prototype (with a very short development time: three
months) that hasn't been put to real use, mostly by lack of interested
users; it's understandable that the interest of the approach doesn't
compensate the cost of using a small, feature-restricted and
relatively arcane library when we have relatively solid SQL bindings.
By limitation of the implementation, it only supports PostgreSQL
(through the excellent PG'OCaml project, a pure-ocaml reimplementation
of the pgsql client protocol), and in retrospect the decision to use a
comprehension syntax instead of the real SQL syntax (that can be typed
all the same) is a bit unfortunate. But you may still be interested,
for example as inspiration if you decide to write some database stuff
in OCaml -- or, why not, as a user-developer.

For other SQL stuff in OCaml, see the Sqlite3 bindings, and possible
the "ocaml-orm-sqlite" project on top of it (whose approach is to use
code generation rather than a query DSL or combinator library; less
flexible, but result in simpler interfaces):

Vim plugin


Pierre Vittet announced:
I don't know if many of you use Vim to write OCaml code. I had to make some
change on the official plugin in order to use the annotation as I wanted. I
share my modifications in the hope that they can be useful to others :

I corrected 2 bugs and add a functionnality allowing to use annotations on
every .ml file opened in the editor. Until now, it looks like previously
annotation were working only on the first opened OCaml file.

I use my modified version without any problem for several weeks. If you try my
plugin, please, keep me informed of the eventual bugs.

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

New js_of_ocaml example: Hyperbolic tree viewer:

Sessions: handling state, communication & concurrency in Opa.:

libsndfile-ocaml 0.8 available:

Zermelo Proof Checker 1.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.

This article has been translated to Serbo-Croatian language by Web Geeks.

Alan Schmitt