Previous week Up Next week


Here is the latest Caml Weekly News, for the week of October 17 to 24, 2006.

There won't be a CWN next week as I will be offline the whole week.

  1. SQLite 3, ocaml, mac os x
  2. Looking for references to usage of ocaml in data mining, knowleadge discovery, etc
  3. Un peu de pub, lacher d'hevea
  4. dypgen : a generator of dynamically extensible parsers for OCaml
  5. ECMAscript, continuations and ocaml
  6. New Ocaml book hits shelves on Oct 23

SQLite 3, ocaml, mac os x


Kenneth Sullivan asked and Olivier Andrieu answered:
 > Does anyone know of a good SQLite 3 wrapper for ocaml, in 
 > particular, one they have used with mac os x?  Christian Szegedy's 
 > wrapper (, seems to 
 > fit the bill.  However this was tested on linux, and I had a bear 
 > of a time convincing it to compile on darwin and finally got "Bus 
 > errors" running the test code.  If anyone could point me to a 
 > wrapper they are currently having success with on a mac, I'd 
 > greatly appreciate it. 
I have a sqlite3 wrapper that I use in a project. I made a standalone 
release if you want to try: 

NB: It's never been tested on mac AFAIK.

Looking for references to usage of ocaml in data mining, knowleadge discovery, etc


Axel Poigné asked and Markus Mottl answered:
> I look for references to usage of ocaml in Data Mining, Knowleadge 
> Discovery. Inductive Logic Programming, Vector support Machines and 
> related topics. I have browsed the net but entries are sparse. 

> I would like to try using Ocaml in these areas and want to avoid 
> double work. 

You may have already found AIFAD (Automated Induction of Functions over 
Algebraic Datatypes), a symbolic machine learning program, which generalizes 
induction of decision trees to structured values, and is pretty efficient 
even on large amounts of data.  You can find the sources and documentation 

It's also available as a Godi-package, which makes it easier to install, 
because it depends on other libraries. 

We use Lacaml, a fairly complete and convenient binding to BLAS/LAPACK, here 
at Jane Street Capital for implementing numeric algorithms to analyse very 
substantial amounts of financial data.  I unfortunately cannot give you 
details about this work.  You can get Lacaml through Godi or download it 

Un peu de pub, lacher d'hevea


Luc Maranget announced:
J'ai la joie d'anoncer le nouveau lacher d'HEVEA. 
      HEVEA, version 1.09 un traducteur rapide de LaTeX vers HTML. 

  HEVEA traduit un sous-ensemble quasi complet de LaTeX2e 
  vers HTML 4.0 transitionel. 

  Plus d'information en 


  Par rapport à la version précédente, il y a, entre autres 

    - De nouveaux packages 
        ifpdf, chngcntr, inputenc (encodage latins 8bits) 
        eurosym (hevea passe à l'euro avec un petit retard), 
        textcomp, longtable, supertabular. 

    - Plus de liberté (au fait hevea est du logiciel libre) 
        Un truc bizarre a disparu. On peut maintenant mettre \title{...} 
        après \bgin{document} si on a envie. 

    - Plus de propreté 
        Le HTML généré est je crois, plus propre, emploi massif 
        des feuilles de styles, paragraphes rendus par l'élément P. 


  Pour compiler hevea 1.09, il faut ocaml (au moins) 3.07. 

  Une version Windows compilée est disponible, merci Ph. Viton. 

  Les packagers Linux ne tarderont pas à adopter la nouvelle version.

dypgen : a generator of dynamically extensible parsers for OCaml


Emmanuel Onzon announced:
dypgen is a GLR parser generator for Objective Caml. It can generate dynamically 
extensible parsers. 

The program is available at : 

Here is are two examples of extension of a small language. 
This is the example included with the program. 

  list_content := expr(x) = List(x,Nil) 
  and list_content := expr(x);list_content(y) = List(x,y) 
  and expr := [] = Nil 
  and expr := [list_content(x)] = x 
  and expr := expr(x)::expr(y) = List(x,y) 
match [1;2;3] with 
  | a::[b;c] -> b 
  | _ -> 4 

  expr := | expr(x) | = Node(Leaf,x,Leaf) 
  and expr := expr(x) | expr(y) | = Node(x,y,Leaf) 
  and expr := | expr(x) | expr(y) = Node(Leaf,x,y) 
  and expr := expr(x) | expr(y) | expr(z) = Node(x,y,z) 
match Node(Leaf,3,Node(Node(Leaf,7,Leaf),5,Node(Leaf,1,Leaf))) with 
  | (|3|((|7|)|a|(|1|))) -> a 
  | _ -> 8

ECMAscript, continuations and ocaml


Jacques Carette announced:
There is an interesting discussion of definite relevance to ocaml over 
at LtU: 
One of the main threads is the issue of what kind of continuations will 
be 'grafted' on to ocaml for the reference implementation of ECMAscript 
4.  The keepers of ocaml might want to wade in to this issue before 
someone else makes a 'de facto' decision as to which type of 
continuations will be part of the ``language''.

New Ocaml book hits shelves on Oct 23


Kognate announced:
There is a new Ocaml book (Practical Ocaml, published by Apress) that 
will hit the shelves on Monday, Oct 23. 

There is a sample chapter online, and the source code to the book is 
there (well, it might not be there just yet, but it will be real soon), 
too.   I'm the author, so I certainly hope people find the book useful. 
   The book was tech edited by Richard Jones (who is very active on 
several Ocaml lists and groups). 

The TOC reads like this: 

CHAPTER 1  Why Objective Caml (OCaml)? 
CHAPTER 2  Interacting with OCaml: The Toplevel 
CHAPTER 3  Syntax and Semantics 
CHAPTER 4  Understanding Functions 
CHAPTER 5  Practical: Creating a Simple Database 
CHAPTER 6  Primitive and Composite Types 
CHAPTER 7  Practical: Simple Database Reports, Exports, and Imports 
CHAPTER 8  Collections 
CHAPTER 9  Files and File I/O 
CHAPTER 10 Exception Handling 
CHAPTER 11 Practical: A URI Library 
CHAPTER 12 Using Ocamldoc 
CHAPTER 13 Modules and Functors 
CHAPTER 14 Practical: A Spam Filter 
CHAPTER 15 Practical: A Network-Aware Scoring Function 
CHAPTER 16 Ocamllex and Ocamlyacc 
CHAPTER 17 Practical: Complex Log File Parsing 
CHAPTER 18 The Objective Part of Caml 
CHAPTER 19 Digression: OCaml Is Not Pure 
CHAPTER 20 Digression: Functional Programming 
CHAPTER 21 Practical: Web Programming 
CHAPTER 22 Practical: A Shoutcast Server 
CHAPTER 23 Using Threads 
CHAPTER 24 Practical: A Concurrent Web Crawler 
CHAPTER 25 Interfacing with OCaml 
CHAPTER 26 Practical: Time and Logging Libraries 
CHAPTER 27 Processing Binary Files 
CHAPTER 28 OCaml Development Tools 
CHAPTER 29 Camlp4 
CHAPTER 30 Conclusion

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