This guide demonstrates how to set up your programming environment on the Rice machines (part of FarmShare2). This setup includes every language/library you’ll use in this course.

1. Logging on to Rice

The Rice machines are associated with your SUNet accounts, so you should run from the command line:

ssh <your sunet id>

If you’re running on Windows, you should use PuTTY for this.

Note: You can simplify the login process (mostly avoid passwords/2FA) by following the instructions here: link.

2. Setting up your environment

Important: you must be running the bash shell for this to work correctly. Any work you do for cs242 must be in bash. Run echo $0 to see which shell you’re running. Type bash to enter a bash shell if you’re not already in one.

All of the environment setup for every language you’ll use this course has been prepared in one handy script. Just run:


And you’re good to go! This script does the following:

  • Sets up Lua, LuaRocks, and assignment dependencies
  • Sets up OCaml, OPAM, and assignment dependencies
  • Automatically installs merlin bindings for Vim and Emacs
  • Sets up Rust and Cargo
  • Saves all setup to your .bashrc file to persist across sessions

Note: the script installs many packages from scratch, so it will take 20-30 minutes to run to completion.

3. Configuring your editor

See the respective guides for Lua, OCaml, and Rust for configuring your editor to work with these languages.