UMBC CMSC 331 Fall 2010
Principles of Programming Languages

Scheme on gl.umbc.edu

The traditional way to use Lisp or Scheme is to invoke the interpreter from a command line on Unix or windows. It will enter a read-eval-print loop where it reads an s-expression from the input, evaluates it, and prints the results. There is no special GUI or development environment.

PLT Scheme comes with such a simple program -- MzScheme. It's really just a wrapper around the core scheme engine.

You can log into gl.umbc.edu and invoke the mzscheme command to get this. Here is a session demonstrating it.

> ssh finin@gl.umbc.edu
...

[finin@linux1 ~]$ cd scheme

[finin@linux1 ~/scheme]$ ls -l
total 3
-rw-r--r-- 1 finin faculty 70 Sep 30  2008 fact.ss
-rw-r--r-- 1 finin faculty 15 Sep 30  2008 hello.ss
-rw-r--r-- 1 finin faculty 28 Sep 30  2008 square.ss



[finin@linux1 ~/scheme]$ mzscheme
Welcome to MzScheme v4.1 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.

> (+ 1 2)
3
> (define (double x) (+ x x))
> double
#<procedure:double>
> (double 3)
6
> (load "fact.ss")
> fact
#<procedure:fact>
> (fact 10)
3628800
> (* 10 9 8 7 6 5 4 3 2 1)
3628800
> (exit)

[finin@linux1 ~/scheme]$