CSE 341 - Programming Languages

Running Racket

We'll use DrRacket, version 6.1.1. It is installed on the windows machines in the undergrad labs, or you can download it for a personal machine.

On the Windows machines in the lab, DrRacket is here:

All Programs / DEV TOOLS & LANGUAGES / Racket / DrRacket

You can also double-click on a saved Racket source file.

On Linux, start it by typing drracket to the shell prompt. You'll need to use XWindows -- DrRacket will come up in a separate window.

Finally, you can download it and install it on a personal machine from http://racket-lang.org/download. It's free.

First Time Set-Up

The first time you use DrRacket, click on “Language” in the top menu, then select “The Racket Language.” The text #lang racket should appear in the upper definitions pane, and the bottom left should say “Determine language from source“ Click “Run”.

DrRacket should remember this choice henceforth.

Structure of your Racket files

Using DrRacket

For the most part DrRacket is an easy-to-use system with lots of documentation. Here are a few specific notes related to how we will use it:

Useful Tools

Use the "Debug" button to debug programs, and also to understand how recursive functions are operating. Another useful command is "Check Syntax", which of course checks the syntax, but also lets you see the bindings of variables. (Try hovering the mouse over a variable -- good to help understand lexical scoping.)