1. Launch Dr. Scheme

A shortcut to it has been placed in the Dock – the red and blue lambda.

  1. Upon launch, if this is the first time Dr. Scheme has run on your computer, you will be asked to select 1) whether to use English, French, etc., and then 2) to “Configure Language.”  This choice of language configuration should be made by your instructor, since it will determine whether your homework assignments run correctly or not.  If you don’t know which to use, I recommend the “Standard (R5RS)”, which is the topmost option, as this is the least constrained version of the language and thus least likely to give an unreasonable error.
  2. The main Dr. Scheme window consists of two sub-windows: 1) Definitions (the top half) 2) Interactions (the bottom half, the “pocket calculator”).

 

Explanation of Interactions vs. Definitions:

      The interactions window will return an evaluation for each complete statement you type in.  So if you type (+ 4 4) it will return 8, and if you type (define a 3) it will assign the value 3 to the expression a, so that if you then type a, it will return 3.

      The definitions window, on the other hand, lets you enter a whole set of statements (i.e.,  your whole program) which are only evaluated when you click the “Execute” button at the top of the window.  The point of this is that you may then save your whole program (i.e., all the definitions in the definitions window) as a file, and load it up later when you’d like to use it again or add to it.

 

How to save your work:

      You will notice, there are multiple Save options.  Your instructor will most likely ask you to turn in both your saved Definitions and your saved Interactions, and each of these has a separate save option.  YOU MUST SAVE BOTH SEPARATELY if you want to preserve the contents of both.  NOTE that saving your interactions only constitutes a record of input and outputs, it does not save the program: you’ll have to cut and paste to continue “interacting” where you left off.

      You may be unfamiliar with the Mac OS X environment.  Do not worry, it works the same as previous Mac systems as well as Windows systems. 

In this image, you can see the usual box for naming your file (this one would be named “my scheme file”), and the Cancel and Save buttons.  The pull-down menu for “Where” currently points to the Desktop, which is usually the easiest place to save your work if you don’t want to go digging for it later.  You can point it elsewhere by clicking on it, however, and choosing one of the options. 

Or, you can click on the arrow to the right of it, and you will end up with a window like this:

The big window that opened up features a scrollbar on the bottom and on the side, which lets you navigate through the folder system, much like you would when you click the “Browse” button in Windows or an older Mac.

 

Loading Teachpacks:

      You will navigate the folder system again, when you load a teachpack (if your instructor has you doing this).  To add a teachpack, go to the Language menu in Dr. Scheme:

There you will see the option “Add Teachpack…”  Select this option, and you will be presented with a file dialog box just as you would when saving a file.  This time, use the horizontal scrollbar to scroll as far to the left as it will go, so that you can see a folder named “Applications” in one of the columns.  Highlight “Applications”, and the window should scroll right far enough to reveal another column.  This column displays the contents of the Applications folder.  Use the vertical scrollbar to scroll down to a folder called “PLT v202” – this is the folder on the hard drive where Dr. Scheme is stored.  Highlight it, and the right-hand column will then display the contents of this folder.  Scroll down until you see a folder in here called “teachpack”.  Inside this folder (we’re almost there), there is a final folder called “htdp” which stands for How to Design Programs, i.e. this is the folder where the teachpacks for your textbook are kept.  To load one, you just highlight it and click open.  It will then appear in the Language menu, and can be unloaded there, for instance if you loaded the wrong teachpack:

 

Submitting your work to the online Drop-box:

      If your instructor wants you to submit completed work to a Drop Box, here is how.  Bring “Finder” to the foreground by clicking on the face icon in the Dock:

Then from the “Go” menu at the top of the screen, choose the option “Connect to Server…”  In the window that appears, type “miranda.cs.uchicago.edu” in the Address field, then click connect:

In the window that follows, highlight the button next to “Guest”, then click Connect.  You will see a list of available server volumes to choose from; you want to choose “Courses” and click Ok.  You should then see an icon appear on the Desktop, labeled “Courses”.  This can be treated as a disk or folder as any other – double click on it, and you will see its contents.

 

Within the Autumn 2002 folder are folders for each class section, and within each class section is a Drop Box folder.  This is where you will drag and drop your homework files when you’re ready to submit.  Note that once you have dropped something into the Drop Box, it can only be seen, read, or changed by the instructor – you cannot take it back out.

Web resources:

As of this writing, the websites for Dr. Scheme and for the book How to Design Programs are both out of service.  However their addresses are hyperlinked below.

 

Dr. Scheme Homepage: http://www.drscheme.org

Dr. Scheme Download (works as of now): http://download.plt-scheme.org/drscheme/

HTDP Homepage: http://www.htdp.org