Submitting solutions by e-mail

Course links

When you're ready to submit an exercise, follow these instructions to send your solution to the instructor by e-mail.

Creating the source and log files

  1. If DrScheme is not yet running, start it (by clicking on the DrScheme icon -- the red-and-blue circle with the Greek letter lambda on it -- on the front panel at the bottom of the screen).
  2. If your program is not displayed in DrScheme's Definitions window, you must have saved it in a file during a previous session with DrScheme. Take the following steps to call it up again:
    1. Move the pointer onto the word File on the menu bar at the top of the DrScheme window and click the left mouse button.
    2. Move the pointer onto the word Open... on the menu that has just appeared and click the left mouse button.
    3. In the small window that appears (with the title ``Open''), if the name of the file containing your program is listed, move the mouse pointer onto it and click the left mouse button. You may need to adjust the scroll bar at the right to search through the list of available files; do this by moving the pointer onto the raised ``bubble'' in the scroll bar, pressing and holding the left mouse button, and dragging the bubble along the bar, releasing it when the name of your file comes into sight.
    4. (If you saved your program in a subdirectory of your home directory, move the pointer onto the name of that subdirectory and click the left mouse button, then find the name of the file in the list that appears, as described above.)
  3. You now have a DrScheme window containing a Definitions window that displays your program. (If you want to make any last-minute changes in the program, this is the time to make them.) Move the pointer onto the Run button near the top of the window and click the left mouse button to run your program. Any results generated directly by the program will appear in the Interactions window.
  4. Depending on the nature of your program, you may want to illustrate its behavior by running some test cases interactively. If so, move the pointer to the bottom of the Interactions window and click the left mouse button, then type in the expressions that run those test cases. The values of the expressions will appear in the Interactions window.
  5. Save the contents of the Definitions window in a text file: Move the pointer onto the word File in the menu bar and click the left mouse button. Move the pointer onto the phrase Save Definitions as Text... in the menu that has just appeared. A small window with the title ``Save'' now appears. The name of the directory within which DrScheme expects you to save the file is in the white rectangle near the bottom of this window. Move the pointer to the end of the directory name, click the left mouse button, and edit the contents of the white rectangle, adding a slash character and the name of the file in which you want the program text to be saved (typically, this would be something like frogs.ss -- .ss for ``Scheme source''). Then move the pointer onto the button labelled OK (in the lower right-hand corner of the ``Save'' window) and click the left mouse button.
  6. Next, save the contents of the Interactions window in another text file: Move the pointer onto the word File in the menu bar and click the left mouse button. Move the pointer onto the phrase Save Interactions as Text... in the menu that has just appeared. The ``Put File'' window reappears. As before, move the mouse pointer to the end of the directory name, click the left mouse button, and edit the contents of the white rectangle, adding a slash character and the name of the file in which you want the test runs to be saved -- something like frogs.log would be a good choice. Move the pointer onto the OK button and click the left mouse button.

Mailing the files

At this point, everything that you want to turn in is contained in the two files that you have just created. (If you like, you can shut down DrScheme now.)

  1. Start a terminal window (if you don't have one already) by moving the pointer onto the monitor icon on the front panel at the bottom of the screen and clicking the left mouse button.
  2. Move the pointer into a terminal window and type the command
    cat frogs.ss frogs.log | mail stone

    at the prompt, substituting the names of your own Definitions and Interactions files for frogs.ss and frogs.log. (The vertical-bar character | is essential.)

Here's how the message looks when it shows up in my mail reader:

From: George Spelvin <spelvin@math.grinnell.edu>
To: stone@math.grinnell.edu
Date: Mon, 31 Feb 2005 13:05:30 -0600

;;; frogs -- an amphibian tallier
;;; George Spelvin
;;; February 31, 2005

   ...

Welcome to DrScheme, version 208
Language: Standard (R5RS).
> (frogs (list 'rabbit 'frog 'frog 'dog 'frog 'chipmunk))
3

   ...

(And so on.)

If you want, you can even have mail provide a ``Subject'' line of the header for you, by adding the option -s followed by the desired subject header (enclosed in double quotes):

cat frogs.ss frogs.log | mail -s "Amphibian tallier" stone

Now the header will look like this in my mail reader:

From: George Spelvin <spelvin@math.grinnell.edu>
To: stone@math.grinnell.edu
Subject: Amphibian tallier
Date: Mon, 31 Feb 2002 13:08:41 -0600