Previous week Up Next week


Here is the latest Caml Weekly News, for the week of 03 to 17 August, 2004.

Sorry for not sending the CWN last week, I had no internet access.

  1. graphics on Mac OS X
  2. ocamldbi 0.9.8 released
  3. mod_caml 1.2.0 released
  4. Functional arrays
  5. Acute: Distributed Ocaml development
  6. OCaml Games mailing list
  7. Constants
  8. ocaml-biz
  9. Enhanced Ocaml Documentation Version 3.08
  10. Parser Combinator Libraries for Caml
  11. New release of htmlc
  12. cocanwiki 0.9.0 (A Wiki written in OCaml)

graphics on Mac OS X

Michael Benfield asked and Grégoire Henry answered:
> Just out of curiosity, are there any plans for OCaml to use OS X native
> graphics stuff rather than X11?

I've make an external implementation of Graphics using Cocoa and Quartz.
It's available here:

ocamldbi 0.9.8 released

Richard Jones announced:
OCamlDBI is a simple, abstracted database interface for OCaml

Main changes in version 0.9.8:

* Dbi.Factory has been *removed*.

* Drivers have been removed from the monolithic dbi.cma.  This requires
  a small change in the way programs are linked.  You must now link with
  dbi.cma, and the particular driver(s) you need, eg:

  ocamlc [...] -I +dbi dbi.cma dbi_postgres.cmo
He then added:
Version 0.9.9 is available:

This fixes:

* Install *.o files to allow native linking to work.
* Fixed Dbi_postgresql driver to work against Markus Mottl's Postgresql
  module v.1.3.3.

mod_caml 1.2.0 released

Richard Jones announced:
mod_caml is a set of Objective CAML (OCaml) bindings for the Apache
API.  It allows you to run CGI "scripts" written in OCaml directly
inside the Apache webserver.  It also gives you a fairly complete set
of bindings to the Apache API and Apache request cycle.

Main change in release 1.2.0:

* This version should be completely independent of OCamlDBI[1].  To
  achieve this, the DBI pooling code has been "functorized" (see
  previous discussion on caml-list).
  You will now need to load DBI modules explicitly, since they are
  no longer linked into  For example, if you were
  using PostgreSQL, you'd add the following lines to your Apache conf:

  CamlLoad /usr/lib/ocaml/3.07/postgres/postgres.cma
  CamlLoad /usr/lib/ocaml/3.07/dbi/dbi.cma
  CamlLoad /usr/lib/ocaml/3.07/dbi/dbi_postgres.cmo


[1] Note that although this release is independent of OCamlDBI, if you
_do_ want to use OCamlDBI in conjunction with this release, then you
must use version >= 0.9.8.

Functional arrays

Deep into the thread, Diego Olivier Fernandez Pons suggested and Daniel Ortmann asked:
> - Markus Mottl port of Okasaki's book

Would you post a link to this work?  (I believe I had a copy and lost it.)
Diego Olivier Fernandez Pons answered:
Google for Markus Mottl

then software -> caml -> purefun (chapter 9) and dscontrib
He also added:
And here is the electronic version of Okasaki's thesis

Acute: Distributed Ocaml development

Brian Hurt said:
I'm mildly surprised I didn't see any announcements of this language here.
I saw it over on LtU:

(Note: I have nothing to do with this project, I just thought it might
interest people- especially people like me, who are pining the death of

I haven't read any of the papers on it yet, so other people's comments and
opinions are welcomed.
Francesco Zappa Nardelli replied:
>(Note: I have nothing to do with this project, I just thought it might
>interest people- especially people like me, who are pining the death of

Since you ask, let me say that we are currently working on a prototype
implementation of Join-calculus locations on top of Acute.

        the Acute team  ( )

OCaml Games mailing list

Brandon J. Van Every announced:

OCaml is a cutting edge language technology in need of more library
support and refinement for practical problems. OCaml Games is for making
game development in OCaml viable, practical, and preferrable to any
other language.

Commercial developers, hobbyists, and newbies are equally encouraged to
subscribe. Posters should discuss OCaml in a Game Development context.
Some topic drift is ok as long as this core concern is returned to.

The group is unmoderated, but people are expected to remain civil and
voluntarily de-escalate conflicts that get out of hand. In the case of a
major meltdown, the Listowner will issue warnings, temporarily moderate
the group, or remove extremely disruptive posters.


Jon Harrop asked and Shawn Wagner answered:
> Am I correct in thinking that pi is not defined in the OCaml core library?
> Does anyone have a module of constants already? If not I'll knock one up...

A module defining pie pi and a bunch of others are included in mathlib:


Christopher A. Gorski announced:
Flamewar aside, maybe an ocaml-biz mailing list isn't such a bad idea.
Perhaps at the very least it would siphon non-tech discussions from the
primary list (even if they are promulgated by only a few individuals).

Try it out here:

If the list crashes and burns...I'm only doing it for amusement, anyway.

Enhanced Ocaml Documentation Version 3.08

Hendrik Tews announced:
I would like to announce the

                 The Enhanced Ocaml Documentation
                          Version 3.08
   available via

The enhanced documentation contains the original html version of
the ocaml reference manual with the following changes:

- Changes (wrt version 3.07) are tagged with icons and color

- meta symbols of the grammar are "hot" and refer to their

- additional appendix containing just the grammar rules

Brouwsing through the Enhanced Ocaml Documentation you will
discover the following changes that have not been announced in

- new keyword character sequence ``[>''
- no default output file name for ocamlc -a
- toplevel uses HOME environment variable
- new ocamllex option -q
- new ocamldoc options -customdir, -I, -intro
- ocamldoc markups for indices
- caml_get_public_method to access methods from C
- new function Arg.align
- new function Format.kfprintf, ksprintf
- new function Gc.quick_stat
- new function Hash.length
- scanf conversion l
- new function SdtLabels.Array.fast_sort
- new functions StdLabels.List.fast_sort, merge
- new functions StdLabels.String.t, compare
- Unix.execv* returns 'a
- new functions Unix.inet_addr_loopback, domain_of_sockaddr,
     get_addr_info, get_name_info

Parser Combinator Libraries for Caml

Deep into a thread about parsing, James Woodyatt said:
I suppose now would be an appropriate time to remind the list that the
Pagoda Core Foundation contains a parser combinator library.  Whether
it suits your tastes remain to be seen, but I've been pretty happy with
it so far.   I've found the [Cf_parser] and [Cf_lexer] modules
especially well-suited for implementing extensible grammars.

The URL for the distribution is here:

The auto-generated documentation is online here:
Diego Olivier Fernandez Pons also said:
Here is what Robert Ennals and I found :

- Alice (and Alice parsec)

- Pagoda core fondation

Functional LL(x) parsing with monadic combinators

- CDK (Caml Development Kit)
Two parser combinators libraries Pc and Pc2

- Christian Lindig _lexer_ combinators

The library doesn't seem to be available from Lindig's pages anymore

- I also remember a toy set of lexer combinators from Cousineau's
(really old) book on Caml-light but I don't remember if it had also
parsing combinators or not.

New release of htmlc

Pierre Weis announced:
Htmlc, an HTML pages compiler

I am pleased to announce the 1.50 version of Htmlc, a convenient tool
to manage a set of WEB pages in order to maintain the common look of those
pages and factorize the repetive parts of their HTML code.

Htmlc allows the automatic insertion of the result of arbitrary Unix
commands into the generated pages.

Htmlc expanses on the fly ``$id'' variables written in the source
document: the binding for $id could be written in the document or in
an Htmlc environment source file (and guess what ? the syntax to
define id is ``let id = value;;'', so that environment files for Htmlc
are valid Caml implementation files :).

Htmlc encourages the usage of simple HTML templates that lowerize the
burden of writing the HTML pages.

Htmlc is also very convenient to produce the final HTML page result of
a CGI program from static templates and execution environments created
on the fly by the CGI.

Htmlc is still evolving from its initial satus of SSI static resolver
to the plain HTML page compiler we are all dreaming of. So, please,
don't hesitate to send your constructive remarks and contributions !

Htmlc home page is
Htmlc source files can be found at

cocanwiki 0.9.0 (A Wiki written in OCaml)

Richard Jones announced:
Version 0.9.0 of this Wiki is now available.  Here is our sandbox,
which also includes downloads, installation instructions and so on:

This version has many extra features over the previously released

* File uploads.
* Image uploads.
* Automatic generation of thumbnails.
* Administration scripts.
* Support for OCaml 3.08.

I built my whole website with it:

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