In general, you have two choices: you can run Scheme on your PC or Linux box, if you have one, or you can run Scheme on Athena. Current thinking is that you are better off running Scheme on your own machine (f you have an Intel-X86 based machine). That's what we do.
Go to MIT Scheme and follow the instructions for installing it on your system.
You must also download onto your machine the homework files provided by us for each homework assignment. There are links to these files on the assignment page.
add scheme
scheme-7.7.1 -heap 5000 -stack 500 -edwin -edit
This will start the Edwin editor in the most recent version of Scheme (better than the 6.001 version). . If you have any problems, you can also try 6.001 Scheme:
add 6.001
6001-scheme -heap 5000 -stack 500
Once in Edwin, you may want to use the (cd "newdir") command described in the bottom section to change your working directory.
If you are using a Linux or FreeBSD/NetBSD machine, you should be fine. The current version of MIT Scheme is also 7.7.1 for those platforms. (Note that if you would like, you can download a copy of MIT Scheme from MIT Scheme and follow the install procedures included to use a local version instead of the Athena version).
The Solaris and SGI machines have a version of Scheme installed. But, we will not be testing on these at all, though, so use them at your own risk. If for some reason this is your only option, ask a TA to tell you about SCM.
The Scheme for the on-line system is not MIT Scheme, so it will not necessarily include every function in the MIT Scheme documentation. But, both MIT Scheme and the on-line system implement the Scheme standard, which is documented here.
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.
You may find a more comfortable general-purpose display function to be:
(define disp (lambda args (letrec ((disp-in (lambda (arg) (if (null? arg) 'Done (begin (display (car arg)) (disp-in (cdr arg))))))) (disp-in args))))
which will allow you to do things such as:
(define foo 42) (disp "The answer is " foo " nodes.")
and get:
The answer is 42 nodes.
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.
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)