CS312 Course Software Installation Guide (Vim version)

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

Because vim's sml mode provides a fairly good indenting algorithm, we will require that you use Vim until later in the course. Vim will also give you warnings when exceeding the 80-character line limit -- something you will certainly find useful.


Installing SML and Vim
  1. Download the self-installing .exe for Windows (5.3 MB) and run it.
  2. After installing SML/NJ, download this setup file (3.6 MB) Vim editor
  3. Install Vim to C:\Vim\ directory. (If you really object to C:\Vim\, ask for assistance.)
  4. After installing Vim, download this archive (65 KB) for CS312 customizations.
  5. Extract the contents of the archive to the C:\Vim\ directory (or to where you installed vim). Be sure to extract preserving the directory tree structure (options depend on your software). For the next step to work, you will need to put it in the correct location.
  6. Locate Vim in your start menu and start gVim.

Note: If you already use vim, backup your vimrc file before extracting the CS312 customizations. After extracting, merge in your vimrc with the one provided by us.

Note:  For installation of SML/NJ on Windows 2000 or Windows XP, you may experience some difficulties after installing.  The problem is that the system path variable is not being set correctly.  Here is a workaround:  Follow the instructions above.  Click Start -> Run and type "cmd".  If you get a command window, you are ok.  Otherwise do the following:  Right click on My Computer -> Properties -> Advanced tab -> Environment Variables -> System Variables -> Path -> Edit.  Cut the value of the path variable and paste it back again.  Click OK to close everything and try Start -> Run -> cmd again.  You should be ok.

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.


Working versions of SML/NJ are available for Macintosh under OS X (download here). The install instructions are located in file INSTALL of each version's FTP directory. We don't recommend a specific version (anything after 110.33 will work on OS X) nor do we provide detailed installation instructions. The working versions differ from the release version in various ways, particularly regarding Compilation Manager, library use, and error messages. Therefore you should expect to have a bit of difficulty with this as the course progresses.

You can use another SML implementation as well.  MoscowML is a good option; however, all assignments must compile and run with SML/NJ on PCs, so if you develop your assignment on your Mac, be sure to test it out under SML/NJ on a PC before submitting.


Follow the instructions for installing SML/NJ version 110.0.7. Here are step-by-step instructions for both SML/NJ and Vim installs.

                   Installing CS 312 Software on Linux

## Download smlnj:

## For Debian or Redhat:
wget ftp://ftp.research.bell-labs.com/dist/smlnj/release/110/RPMS/smlnj-110.0.7-4.i386.rpm"

## For other linux distributions (or if you prefer to compile from source),
## visit http://cm.bell-labs.com/cm/cs/what/smlnj/install/ for SML/NJ.

## Make a Debian package (skip this step if using Redhat):
alien smlnj-110.0.7-4.i386.rpm

## Install (choose one of the following two commands)

## Debian:
dpkg -i smlnj_110.0.7-5_i386.deb

## Redhat:
rpm -i smlnj-110.0.7-4.i386.rpm

## Get the CS312 customizations for Vim
wget http://www.cs.cornell.edu/courses/cs312/2003sp/vim/vimfiles.tar.gz

## Put it in your home directory
mv vimfiles.tar.gz ~
cd ~

## Extract it in your home directory :)
tar -xvzf vimfiles.tar.gz

As Vim is included with almost every Unix distribution these days, you only need to ensure that your distribution has version 6.1 or greater. This can be checked by typing vim on the command prompt without any arguments.

Note: If you already use vim, backup your vimrc file before extracting the CS312 customizations. After extracting, merge in your vimrc with the one provided by us.