Computer Laboratory

OCaml Labs

Community Outreach

Growing a language community is more than just technology; we also need a better online presence, documentation and educational material. We're working on an O'Reilly book about practical OCaml programming, as well as a comprehensive revamp of the website to include features such as the interactive TryOCaml Javascript toplevel.

Much of this work is done in collaboration with members of the wider OCaml community such as Ashish Agarwal and Christophe Troestler, and not just from the Cambridge group.



Sep '12Oct '12Nov '12Dec '12Jan '13Feb '13Mar '13Apr '13May '13Jun '13Jul '13Aug '13Sep '13Oct '13Nov '13Dec '13Jan '14Feb '14Mar '14Apr '14
Anil Madhavapeddy Real World OCaml
Anil Madhavapeddy Book review site
Philippe Wang Meta preprocessor
Philippe Wang Markdown processor
Anil Madhavapeddy infrastructure
Amir Chaudhry redesign
Jeremy Yallop FPDays tutorial

Real World OCaml

Complete by Anil Madhavapeddy (May 2011 - Nov 2013)
Homepage   Twitter  

Coming soon in 2013 and published by O'Reilly Media, is the definitive practical guide to programming in OCaml.

This hands-on book will show you how to take advantage of OCaml’s functional, imperative, and object-oriented programming styles with recipes for many real-world tasks. It covers a range of topics on building and maintaining fast, reliable code, with a pragmatic emphasis on getting stuff done with community libraries such as Core and Async.

The book starts with OCaml basics, including how to set up a development environment, and moves toward more advanced topics such as the module system, foreign-function interface, macro language, and the ocamlbuild system. By the end of the book, you'll have learned how to solve day-to-day problems in data processing, numerical computation, system scripting, and database-driven web applications with the OCaml multi-paradigm programming language.

You can see the book's website at and follow @RealWorldOCaml on Twitter.

Book review site

Complete by Anil Madhavapeddy (Jun 2011 - Jan 2013)

Online version of the Real World OCaml book. The whole book will be freely readable online under a Creative Commons license. While it is under development, the online version has per-paragraph commenting functionality enabled, with the comments stored as GitHub issues for the authors to manage

With this system, we hope to engage a lot more people in the review process so that the final version of the book can incorporate feedback and improvements from the community. Commenting will require a (free) GitHub account.

The book is currently on alpha4 and several hundred comments from reviewers have been addressed across the versions.

Related work

Meta preprocessor

Complete by Philippe Wang (Apr 2013 - Aug 2013)
mpp code  

MPP (Meta PreProcessor) is a preprocessor that is designed to be very customizable, very simple to use and to be used with most programming languages (e.g., OCaml, C/Java, Ada) and most document description languages (e.g., HTML, (La)TeX, MarkDown).

Two fundamental particularities of MPP:

  1. it allows to embed most programming languages into your project and use them as preprocessor languages. This means that the expressiveness of MPP is mainly limited by its users' knowledge of other programming languages.

  2. MPP is meta because you can use it to produce a specialized preprocessor, which is a feature that is particularly important if you want to build and provide a simple preprocessor for non-programmers.

Without MPP, if the language you're using doesn't provide a specialized preprocessor, you'd either use no preprocessor at all or build complex scripts to parse and process your programmes or documents.

Related work

Markdown processor

Complete by Philippe Wang (Jun 2013 - Nov 2013)

Much of the workflow of the website depends on a solid Markdown implementation. We currently shell out to external processors such as Pandoc, but a pure OCaml library would be very helpful in embedding it more naturally into the toolchain. It would also be helpful for the js_of_ocaml integration of OCaml in the future. infrastructure

Complete by Anil Madhavapeddy (Aug 2011 - Feb 2013)
Wiki is an infrastructure project as part of creating and releasing the OCaml Platform. All of the source code is available from the OCaml organisation at GitHub, and anyone can fork repositories and submit pull requests for consideration by the maintainers.

We are working on setting up the following sub-domains under

  • a public facing site at, and a staging server for testing updates before they are pushed live.
  • a mailing list server with public archives, at
  • an site to host the OPAM archives and packages. It's useful having a subdomain here to permit future DNS load balancing ( and so on).
  • as a read-only mirror of the Github repositories.
  • for the HotCRP setup for the OUD conferences.


Discussion about the infrastructure machines should be directed to the infrastructure list. This is a public, archived mailing list.

We currently have a single 12-core host running Debian and Xen. It is configured with the following VMs:

  • is an internal mailing list relay for list traffic. The e-mail is handled via the University managed domain service, and they relay e-mail for over to our VM. It runs Mailman and Postfix.

  • is a web server VM. It can virtual host multiple non-SSL domains. It current hosts Please get in touch with Anil if you need something else hosted here, `as it has plenty of capacity at the moment.

  • is another web server VM, currently used to host the Mirage website. It switches between being a UNIX VM or a microkernel, depending on the current state of the Mirage tree.

Related work redesign

Complete by Amir Chaudhry (Jan 2013 - Nov 2013)   Wiki   Blog is the public facing website for OCaml. A professional agency will be creating a new design for, with flexible templates that can be used across other OCaml related sites as people wish. This will include branding work for the OCaml language itself.

So far we have:

FPDays tutorial

Complete by Jeremy Yallop (Aug 2013 - Oct 2013)
Prep   Post-mortem   Github  

FPDays is a conference held in Cambridge to teach functional programming. We ran an OCaml session there as the first outing for Real World OCaml.