Using MIT/GNU Scheme with 6.034
MIT/GNU Scheme is a full-featured Scheme development system, including an editor, debugger and compiler. MIT/GNU Scheme is available for GNU/Linux, Apple Mac OS X (Intel), FreeBSD, IBM OS/2 and Microsoft Windows (all versions).Warnings
You can run MIT Scheme from any Linux-Athena or machine, such as those available in any of the clusters around campus, or a Windows machine. We recommend AGAINST running scheme remotely via ssh/X-forwarding on public Athena dialups, as public dialups are not for use for compute-intensive processses. Your scheme projects will likely often be very compute-intensive.Setting up MIT/GNU Scheme
Go to the MIT/GNU Scheme page and follow the instructions for installing it on your system.
Finding Documentation
Go to the MIT/GNU Scheme page for links to documentation.
Running MIT Scheme on Athena
To run MIT scheme on Linux-based Athena workstations, type the following:
add scheme
scheme -edwin -edit
This will start the Edwin editor in the most recent version of Scheme (better than the 6.001 version). Once in Edwin, you may want to use the (cd "newdir") command described in the bottom section to change your working directory.
We currently do not support running scheme on other types of Athena workstations, such as Sun workstations, SGIs, or other platforms, as the Scheme implementations on these platforms are obsolete or broken. You will likely encounter problems if you try to evaluate 6.034 code using MIT Scheme on these workstations.
Examples of Miscellanous Useful Scheme Stuff
Functions
(pp expression)Pretty prints an expression.
(cd "/mit/6.034/ps1")
Changes the working directory.
(pwd)
Print the working directory.
(load "match.scm")
Loads and evaluates contents of a file (here, match.scm).
(trace function-name)
Shows the input arguments and output value when the function is called. Redefining the function, such as by loading a file that defines it, undoes the tracing.
(debug)
Shows you useful information when at an error breakpoint.
(load-option 'format)
Enables the use the format
function. While you won't need to use this, some assignments make use
of it.
Edwin Key Bindings
Under Windows, you may want to reduce the font size using the option in the menu of the upper-left system box.Because Edwin is similar to Emacs, you may find the Athena On-line Help pages useful.
There are a number of key combinations that you may want to be aware of, in case you missed them in 6.001. You can find these in the various documentation files mentioned above. Here is a brief summary (C- means hold down control; M- means hold down meta or alt):
C-x C-f : Open a file, or create a new one
C-x C-s
: Save a file
C-x k
: Kill (close) a buffer
C-x C-c : Exit Edwin
C-g : Abort a command
C-x C-e : Evaluate the previous expression
M-z : Evaluate the expression surrounding the cursor
M-o : Evaluate an entire buffer (careful!)
C-c C-c : Quit from an error level after a bad evaluation
M-p : Recall the last expression
C-space : Mark the current cursor position
C-w : Cut from current position to mark
M-w : Copy from current position to mark
C-y : Paste (yank)
C-x 2 : Split screen vertically
C-x 5 : Split screen horizontally
C-x 1 : Return to non-split screen
M-x : Enter a command by name (use tab to complete)
Questions/comments?
As usual, please contact 6034sp-staff@csail.mit.edu if you have any problems or suggestions!