Programming Language Download

This semester we're using a typed version of the PLAI language. The latest version is here:

Apr 29 2013 version
Dec 02 2012 version

Installation

Go to DrRacket's File | Install .plt File... menu entry, and in the URL tab, enter the URL for the above link and click OK. A window will pop up with installation progress. When it's done, the Close button will become available. At that point you're done.

Documentation

For documentation, go to Help | Help Desk and enter plai-typed in the search box.

If you don't find documentation, it could be because of a known problem in the install process. Open a shell and go to the directory where DrRacket is installed. In that directory you will also find an executable called raco (or raco.exe, depending on your platform). This is the RAcket COmpiler. Run this command with the argument setup: e.g.,

raco setup

This will rebuild the DrRacket documentation, amongst other things, and from then on you should have the documentation working.

DrRacket Initialization

When you first run DrRacket, it says “DrRacket cannot process programs until you choose a programming language”—a comment that might surprise you (it's DrRacket, right?), but we'll see the power of this during the course. For now, you need to take the following steps:

In the Language menu, select Choose Language.... In the resulting pop-up window, select “Use the language declared in the source”, and click OK.

choose language menu

The definitions window will now read

#lang racket
This tells DrRacket that you wish to write programs in the language racket. We want to instead use the language designed for this course. Therefore, get rid of #lang racket, and make the first line instead read
#lang plai-typed
This tells DrRacket that you want the plai-typed language instead. Make sure you put the above incantation at the top of every file you write in this class.

Click the Run button at the top-right. Now the interactions window will reflect that you are in the plai-typed language.

Language Upgrade

We will periodically issue upgrades to the language being used in the course. You should upgrade as soon as possible. To upgrade, simply follow the above steps again. To download, you of course need to be connected to the Internet; after downloading, you can install and use the new version even while disconnected.

DrRacket Customization

It might be annoying to have to type the above #lang every time, but you can make DrRacket do it automatically. In Language | Choose Language..., click the Show Details button. At the bottom-right of the resulting pane, you'll see “Automatic #lang line”. Type the #lang line here and click OK. From now on, whenever you create a new tab, it will automatically have your chosen language.

There are more things you might wish to do. For instance, in Edit | Preferences...:

Working From Home

The Sunlab consultants maintain a guide (PDF) on how to work from home. It tells you how to, from your own machine, access the department machines to run programs and transfer files. CS17 also maintains guides (PDF) for Windows and Mac OS X.