Jane Street's Core library is an industrial-strength alternative to the OCaml standard library. Core is designed with consistency, explicitness and efficiency in mind. This tutorial will cover:
An overview of the main library, including:
A review of the the syntax extensions included in Core and how to use them effectively. The extensions to be covered are:
pa_sexplib: auto-generation of functions for serializing to and from an s-expression format
pa_binprot: auto-generation of functions for serializing and deserializing to an efficient binary format
pa_compare: auto-generation of comparison functions
pa_typehash: for generating a hash of a type definition. Useful for ensuring agreement on types in network protocols.
pa_fields: for auto-generating first-class fields and various iterators over the fields of a record type.
pa_variants: for auto-generating first-class variants and iterators over the set of cases in a variant type.
In addition to giving an overview of the Core and how to make the most of it, we'll cover Core_extended, which is a set of extensions to core that are less stable, but still highly useful. Notable among those libraries is:
Shell: a library for interacting with the UNIX shell
Command: a library for building command-line executables featuring subcommands for combining a collection of utilities into one common command, and built in auto-completion support for Bash.
The class will not teach OCaml proper, so attendees should already know the basic constructs of the language, and be comfortable writing short programs in it. Beyond a facility with the concepts of functional programming, no further experience is required.
Note: This is the same VM as for the T3: Building a Functional OS.
Import Appliance from the File menu, and select the
After it imports the file, click on
CUFP Core and Mirage Tutorials,
and click the green
The user account is
cufp, and the password is
cufp2011. Log in,
/sbin/ifconfig to figure out what the internet address of
the virtual image is. It should be the one associated with
Then ssh to the box as
cufp and log in. All the software you should
need is installed on the virtual machine.
You can also direct a web-browser at the virtual host. You'll find ocamldoc documentation for the Core libraries there.
If you have trouble with virtualbox, you can install OCaml and the relevant packages on their own. Here are the packages you should get, and the order of installation:
All of Jane Street's packages can be found here.
is the head of the technology group at Jane Street, a proprietary trading firm that uses OCaml as its primary development language. Yaron got his PhD in Computer Science at Cornell in 2002, where his research was focused on probabilistic algorithms for distributed systems.