Previous week Up Next week


Here is the latest Caml Weekly News, for the week of February 14 to 21, 2006.

  1. Weblogs 1.2 released
  2. ocaml+twt v0.81
  3. ocaml ncurses bindings
  4. What library to use for arbitrary precision decimals
  5. Menhir available under GODI

Weblogs 1.2 released


Richard Jones announced:
We're pleased to announce version 1.2 of our weblogs library, for
importing and parsing web server logs, and much much more.

This is released under GNU LGPL + OCaml linking exception.

ocaml+twt v0.81


Mike Lin announced:
Here's a small bugfix update to "The Whitespace Thing" for OCaml, a
preprocessor that uses indentation instead of parenthesization to group 
multi-line expressions, like in Python and Haskell. Although the 
implementation approach I used has some limitations, I now use ocaml+twt for 
all my new code and I recommend it, if you like this code style.

ocaml ncurses bindings


Kai Kuehne asked, Nicolas George answered, and Paul Pelzl added:
Nicolas George wrote:
> Kai Kuehne wrote:
> > Just a question... I wan't to start programming in Ocaml but it would be great
> > if there were a ncurses-binding. I know ocaml-tmk, but there is no release yet
> > and it seems that there won't be a release-version. :)
> > 
> > Well.. is anybody here planning to implement a ncurses-binding for ocaml
> > or finish ocaml-tmk?
> Hi. I am the shameful author of ocaml-tmk. I can say that for me, the
> project is dead: I almost do not write Caml these times, and I have more
> pressing things to do.
> I say "shameful" because at least one person proposed to carry on the
> project, and I procrastinated my reply. Which makes I must make apologies
> for replying so late, which makes me procrastinate more. So today I force
> myself to answer. I am really sorry for people who counted on me.

I think I may have offered to take over the project at one point... or
at least I considered offering.  I forget.

I maintain two projects that use a slightly-forked version of your
curses bindings:
Since I'm already maintaining that fork as part of those projects, it
wouldn't be a big deal for me to set up a minimal website and offer the
curses bindings as a separate package.

> I am willing to give the project to anyone who wants it, provided he tells
> me exactly what I have to do on the Savannah website to change the
> ownership, including a possible licence change to include
> I-do-not-remember-what Caml-specific exception to the LGPL..

If you do want to hand over the project to me, I'd rather not deal with
Savannah.  I'd just set up a personal site and let you link to it ("this
project has moved...").

> As for your immediate needs: the ncurses binding in the current state of TMK
> was working and fairly complete last time I checked. As far as I remember,
> the only missing parts are the scanf-like functions and the mouse parts.
> What is not complete at all is the widget system on top of that, but if you
> only need low-level ncurses functions, you may be lucky.
> On the other hand, the code dates back to just before the coming of
> dynalically-loaded primitives. The build system is probably broken with
> regard to that aspect.

Kai, I'd recommend you grab the curses bindings out of the source code
from one of the projects I linked above.  They've got a couple of
bugfixes that are not in ocaml-tmk, and they've been updated to work
with recent OCaml releases.

What library to use for arbitrary precision decimals


Deep into this thread, Richard Jones said:
Before we go too far down the currency track (where I agree, using
integers is the way to go), my actual requirement is for a natural
OCaml mapping for the PostgreSQL NUMERIC/DECIMAL type:

The database can define types like NUMERIC(6,4) which means 6 decimal
digits in total, 4 of them after the decimal point -- for example,

There doesn't seem to me to be a good natural map for this type in the


PS. You can find latest progress on PG'OCaml here:

I've already converted a few of our bigger programs to use this library.

Menhir available under GODI


François Pottier announced:
This short note is to let you know that Menhir, the new LR(1) parser generator
for OCaml, is now available through GODI. If you have installed GODI, just run
godi_console and look for the package godi-menhir.

More information about Menhir can be found at

Using folding to read the cwn in vim 6+

Here is a quick trick to help you read this CWN if you are viewing it using vim (version 6 or greater).

:set foldmethod=expr
:set foldexpr=getline(v:lnum)=~'^=\\{78}$'?'<1':1

If you know of a better way, please let me know.

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