Skip to main content

Courseware and Computer Resources

Installing OCaml

Download and install OCaml. Install the latest release available for your platform.

Windows users, install either the MinGW port or the Cygwin port of OCaml. Ignore the information on producing standalone Windows executables; you will not need them for this course.

Installing Emacs with Tuareg Mode

You can develop OCaml programs using any text editor. Vim, Emacs, Notepad++, TextWrangler, and SublimeText are popular and effective text editors. (Note that Microsoft Word is not a text editor!) We suggest Emacs with Tuareg mode, a special mode for editing OCaml files. It offers an interactive toplevel and a variety of formatting utilities. You can find the software and installation instructions on the Tuareg page. Emacs with Tuareg is installed on the Windows machines in the public CIT labs and CSUGLab. For help getting started with Emacs, see the CS3110 Guide to Emacs with Tuareg Mode.

Windows users can download and extract Emacs customized for CS 3110. This ZIP archive (40 MB) contains Emacs with Tuareg mode already installed, plus a few minor CS 3110 customizations. For example, it will warn you if a line in your source code is longer than 80 characters. Execute RunEmacs.bat from the Emacs directory that you extracted. To run OCaml from inside Emacs, first open an .ml file, then click on the OCaml menu and choose Interactive Mode then Run Caml Toplevel.

Installing the OCaml Plugin for Eclipse

Many of you are familiar with Eclipse from 2110. There is an OCaml plugin, OcaIDE, available for Eclipse 3.5 (Galileo) and later versions. The plugin provides features like syntax highlighting, identification of minor errors, and an in-app interactive toplevel. We were able to install OcaIDE without problems on an Intel-based Mac running Mac OS X 10.5 (Leopard) following the online instructions.

Installation and configuration on Windows was a little more painful but ultimately successful. The plugin also requires bash, a Unix command interpreter, which comes with Cygwin, so you may also need to install Cygwin and put C:/cygwin/bin/ on your Windows path.

CS3110 Virtual Machine

To standardize and streamline the tools we use in this course, we provide a virtual operating system for download. Click here to install the disk image. (You will need Oracle's Virtual Box software to load it.)

The virtual environment comes with the latest version of OCaml, the OPAM package manager, many recommended text editors (including Emacs with Tuareg mode), and the CS3110 compilation tool. We highly recommend it over trying to install tools natively.

Computer Labs

CIT Labs

Cornell Information Technologies (CIT) runs several computer labs across campus for all members of the Cornell community. Check here for locations and hours.


CS majors are entitled to an account in the CSUG labs in Gates and Rhodes. Check here for more information.