CS312 Course Software Installation Guide

You will need to make use of three different software packages for this course:


Installing OCaml and Emacs
  1. Download and install OCaml 3.10.2
  2. After installing OCaml, download and extract Emacs customized for CS 3110. This ZIP archive (40 MB) contains Emacs with tuareg-mode (a mode for editing OCaml code) already installed. It also contains a few minor CS 3110 customizations. For example, it will warn you if a line in your source code is longer than 80 characters.
  3. Execute RunEmacs.bat from the Emacs directory that you extracted.
  4. To run the OCaml top-level from inside Emacs, first open a .ml file. Then click on the OCaml menu and choose Interactive Mode then Run Caml Toplevel.
Setting up your newsreader
  1. You may use any news reader you like, but you need to have at least one. These instructions are for Outlook Express.  To set up a news account in Outlook Express, first start up Outlook Express and exit out of the myriad wizards that start up.
  2. Once at the main screen, choose Accounts... from the Tools menu.
  3. Choose to make a new News... account from the Add button.
  4. Enter your name, click next.
  5. Enter your e-mail address, click next.
  6. Enter newsstand.cit.cornell.edu for the name of the news server, check the authentication box, click next.
  7. Enter your Cornell netid for the account name and your CIT password, click next.
  8. Click finish and close.
  9. Choose Newsgroups... from the Tools menu to select the newsgroups you want to read.  The newsgroups for this course are cornell.class.cs312 and cornell.class.cs312.talk.

Unix/Linux and Mac OS X

Installing OCaml for Linux Ubuntu/Kubuntu/Xubuntu 8.10

You should just type sudo apt-get install ocaml in a Terminal and it will install OCaml 3.10.2. Then type ocaml -version to be sure you got the right version. However, if you are running another version of Ubuntu, it might not install the right version of OCaml for the course.

Installing OCaml for other Linux distributions and Mac OS X

  • Go to the page for the 3.10.2 release of OCaml.
  • Under Source Distribution download the Source tarball and save it the the Desktop
  • Unzip the file. You can either do that by double-clicking (Mac OS X) or right click then extract (Linux). If this does not work, you can also open a terminal, cd to the desktop then type tar -xvzf ocaml-3.10.2.tar.gz.
  • Next open up your Terminal and navigate to the directory you just unzipped. If you're not familiar with using UNIX in the Terminal, after opening the Terminal type cd Desktop then enter, then type cd ocaml-3.10.2.
  • In the folder ocaml-3.10.2, there is a text file called INSTALL. Open that file and follow the instructions to install. When done, you will be able type ocaml as soon as you enter the Terminal and it will run. Again if you are not comfortable using the Terminal, simply type the following commands in sequence, pressing enter after each command.
    make world > log.world 2>&1
    make bootstrap > log.bootstrap 2>&1
    make opt > log.opt 2>&1
  • The next step can be a bit tricky because you need to become the root user to complete the installation. If you are running bash, type sudo bash then enter. If you are running tcsh, type sudo tcsh then enter. On Linux, if you don't know what you are running you are probably running bash. Next do the following commands pressing enter after each:
    umask 022
    make clean
  • Then you're done and can run OCaml from the Terminal by typing the command ocaml.

    Installing the Tuareg mode for Emacs

    You can use any text editor for typing OCaml programs. If you are using Emacs, there is a special mode for OCaml called Tuareg. You can find the software and installation instructions on the Tuareg page.

    Setting up your newsreader

    Even if you are not using Outlook Express, configuring other news clients is not very different; you should be able to configure your news client using the Windows explanations (above).
    If you don't know what newsreader to use, the course staff uses Mozilla Thunderbird which works pretty well.