Software Setup

This course will depend on the DrScheme implementation of Scheme. Even if you have used other Scheme systems before, you will have to use this one here.

Running DrScheme Inside the Department

To run DrScheme on the CS Linux machines use the following command: /course/cs173/bin/drscheme

DrScheme is also installed on the Windows machines in the MS Lab on the first floor of the CIT. DrScheme is not available on any other departmentally-managed Windows machine.

The first time you run DrScheme, it will ask you to select a language. Choose “PLAI - Advanced Student” from the “Programming Languages: Application and Interpretation” subheading.

Running DrScheme From Home

  1. Download DrScheme v208 from www.drscheme.org.
  2. Install the PLT Scheme 208 patch
  3. Install the PLAI package.
  4. Restart DrScheme.
  5. Choose the correct language level.

Installing the PLAI Package

You will need to do this if you are running DrScheme at home, and you may need to do it if you are running DrScheme on a Windows computer in the department.

In DrScheme, go to File > Install .plt file... and enter the following URL: http://www.cs.brown.edu/courses/cs173/2004/plai.plt Then, restart DrScheme.

Language Selection

When working in DrScheme, be sure that you always use one of the PLAI languages so that all the useful constructs shown in class will be available. These languages are under the “Programming Languages: Application and Interpretation” option in the languages list. While you’re getting started with Scheme, try using “PLAI - Beginning Student,” but you will need to switch to “PLAI - Advanced Student” before working on the assignments. To change the current language, select the Language > Choose Language... menu in DrScheme and pick the correct item from the resulting dialog box.

To verify the language is set correctly, click the Run toolbar button. You should see “Language: PLAI - Advanced Student” in the lower pane of the DrScheme window. We strongly recommend that you use PLAI - Advanced Student for your assignments because it will give you better error messages.

If, while working in DrScheme, you begin to get random syntax errors on the predefined constructs, make sure to double check the language (since this is a common cause of errors) before spending a lot of time searching for a bug or contacting the staff.

Troubleshooting

You can get documentation for the special CS 173 language constructs by searching for “cs173” in DrScheme’s Help Desk. The Help Desk is available from the Help menu.

If you are unsure of the correctness of your home installation of the plai.plt file, the following instructions will allow you verify that the setup completed correctly.

  1. If you have DrScheme running, shut it down and restart it.
  2. In DrScheme, go to the Languages menu. Select "Choose Language...".
  3. In the resulting window, do you see an option that reads
      Programming Languages: Application and Interpretation
        PLAI - Beginning Student
        PLAI - Intermediate Student with lambda
        PLAI - Advanced Student
        PLAI - Pretty Big
    
    If so, then you’re done with the installation process.
  4. At this point, select the PLAI - Beginning Student language. This is the language you want to program in for the first few weeks.

Running Haskell

We will also be spending some time working with the Haskell programming language, using an implementation called Helium. You may opt to either download your own copy of Helium from its download page, or work with the version installed on the CS department's Linux machines.

For helium to run properly, several environment variables must be set.

Once these are set, you may run helium either