Obtaining a copy of ML

It is easy to download a Standard ML system to use on your own computer, regardless of whether you run Windows, MacOS X or Linux. There are three main implementations of the standard ML language:

All are open source and will not cost you anything. On the other hand, none give you a fancy development environment. They are designed to be used in the old-fashioned manner, where the programmer types code into an editor window and later transfers it to a terminal window where an ML session is running.

Cambridge ML, the version used in the practical classes, is also available. As an implementation at ML it is rather unstable, but many students find it easier to use for experimentation. Download the zip file, then extract the folder cml using WinZip. Locate the icon CML (labelled cml.exe) and double click on it to launch Cambridge ML.

Notes for Windows users

While MacOS X and Linux provide terminal windows with full editing capabilities, Windows makes things difficult. The following tips may help you:

Here is a method I have found which makes it easier to paste code into the command line when running windows.

  1. Open the command line.
  2. Click on the program icon in the top left of the window (alt + space).
  3. Select properties.
  4. Make sure that "QuickEdit Mode" is ticked.
  5. Press OK.

Once this is done, to paste code into the command line, perform one right click. Also you can highlight code by dragging a box over it. Once highlighted, you can then copy the selection by pressing enter.

Obvious, isn't it? I am grateful to D A Wright for these tips.

Note for Mac users

The easiest way to install lots of open source software, including ML compilers, is via the package manager MacPorts. Although it requires the command line, it is easy to use and installs software fairly quickly. In particular, it provides packages for all three of the main ML systems: mosml, polyml and smlnj. if you feel brave, you can also install the huge and unimaginably complicated editor, emacs.

I have written an ML Language Module for BBEdit and TextWrangler, two Macintosh text editors (TextWrangler is free!). It provides syntax colouring for keywords, strings and comments for filenames having the extension ML, sml or sig. To install for BBEdit, first quit the application. Then, copy the file StandardML.plist into the directory Library/Application Support/BBEdit/Language Modules/. The installation instructions for TextWrangler are analogous.