Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml PLEAC reaches 70%
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-06-29 (16:30)
From: Dave Benjamin <dave@r...>
Subject: OCaml PLEAC reaches 70%

The PLEAC project aims to translate the source code examples of the Perl 
Cookbook to many programming languages. I have been working steadily for 
the past two years toward completing the OCaml translation. As of today, 
it is 70.71% complete, in between Ruby (64.43%) and Python (85.43%).

Much of my recent work has been on the file I/O chapters, which cover 
the topics of reading and writing to files using Pervasives and the Unix 
module. The file access chapter covers argument parsing, file locking, 
buffering and non-blocking I/O:

The file contents chapter contains some helpful examples of working with 
Streams and Buffers, line-indexing of large files, and manipulation of 
binary data including an example of using Richard Jones' Bitmatch 
library to parse and "tail" Linux's binary "utmp" database of login events:

I have updated the PDF version as well, if you prefer to read PLEAC in 
an offline format. You can download it here:

As always, feedback, corrections, and contributions are more than 
welcome, and I will do my best to make suggested improvements. I think 
that, despite being somewhat Perl-centric and in need of more 
explanation, the OCaml PLEAC has already become a valuable resource. I 
refer to it frequently myself. Hopefully some day there will be a real 
OCaml Cookbook. In the meantime, there are a lot of practical code 
snippets that can save a few trips to the manual / interface files. I 
hope you find it useful as well.