CS 334: Running SML

Unix Lab Computers

You can run lisp on any of our Linux lab computers using the sml command.

The names of our Unix computers are listed on the department's web page here. You'll need to run the VPN to access that page (and our computers) from off campus.

Personal Computers

You can also install sml on your own computer. Here are minimal installation instructions to do so.
They should be sufficient in the most common cases, but your mileage may vary. We'll be using ML for several weeks, so I'd suggest adding whatever ML extension is available for your editor to support formatting and syntax coloring. I can help with that if run into trouble.


On the command line run the following:

brew cask install smlnj

You may need to add the location of sml to your path. In your terminal window, enter the following command:

export PATH=${PATH}:/usr/local/smlnj/bin/

You'll need to do this each time you open a new terminal window. If you've used .bashrc files before, you can also add that command there, so that it runs each time you create a new bash shell.

Windows 10

There is a Windows installaer available here: https://smlnj.org/dist/working/110.98.1/smlnj-110.98.1.msi. You'll want to follow the instructions here: https://www.smlnj.org/dist/working/110.98.1/index.html.


On the command line run the following:

sudo apt-get install smlnj


You can run the ML interpreter on the web at https://www.tutorialspoint.com/execute_smlnj_online.php.