10/06/2011
Alex Rubinsteyn

Resources for Learning OCaml

Note: these links were collected in 2011 and might be superceded by better, more recent resources. I have added Real World OCaml below, since it's probably the best place to start.

Getting started

Caml Trading
Video of a lecture by Yaron Minsky where he explains why Ocaml is a good language for printing money on Wall St.
Introduction to Caml
One long page which briefly touches on the core features of OCaml.
OCaml for scientific computation
Longer than the above tutorial, teaches you the basics of OCaml programming with code examples from scientific computing and compares how given algorithms would be implemented in other languages.
PLEAC
A port of the "Perl Cookbook" to OCaml. Every time you wonder "How do I <do some common task> in OCaml?", go here.

Quick references

Books

Real World OCaml.
The best and most comprehensive OCaml book currently available.
Unix system programming in OCaml
A guide to lower level programming (file manipulation, sockets, threads, etc..) by two prominent OCaml researchers.
Developing Applications With Objective Caml
It's not a perfect book (slightly outdated, ugly HTML formatting) but still a good read. The book starts from language fundamentals (types, functions, control structures, modules) and works up to some interesting applications (spelling correcter, minesweeper clone, alpha-beta pruning). Also covers more advanced topics like concurrency, when to use modules vs. objects, and using some of the associated OCaml tools.

Standard Tools

In addition to learning the language, it also helps to know about a few tools which will make your life easier.

For an example of a project with multiple source files and unit tests, check out ocaml_skeleton.

Advanced Stuff & Blogs