CS 381K: Programming Assignments

Song: "God Wrote in Lisp", Lyrics by Bob Kanefsky, sung by Julia Ecklar.

Programming assignments are to be done in Lisp; see Using Lisp on Local Machines. Notes on Lisp Style and Efficiency are available. Common Lisp: the Language (second source) (third source) is a reference manual; also see ANSI and GNU Common Lisp Document

You can download Gnu Common Lisp for Linux or for Windows.

There are some on-line CS 307 lecture notes on Scheme: by Contents or Index. There is also a page on differences between Scheme and Common Lisp.

Lisp is easier to use through the Emacs editor. Gnu Emacs can be dowloaded free, for either Linux or Windows. If you wish to use Gnu Common Lisp (GCL), you can copy the files ~cs381k/.emacs and ~cs381k/.lisp.el to your directory; these facilitate use of Lisp within emacs. You will also need to have /p/bin in your path, since xgcl is /p/bin/xgcl. This can be done by adding the following line to your .login file:

setenv PATH {$PATH}:/p/bin
Alternatively, you could put in a local link to xgcl with the following commands to unix:
ln -s /p/bin/xgcl ./xgcl
chmod +x xgcl

If you wish to use Allegro Common Lisp (ACL), see Using Lisp on Local Machines and copy Prof. Mooney's file instead.

To use Lisp within emacs, first start emacs . Then give the command C-x 3 (control-x 3) to split the window vertically into two halves (or C-x 2 (control-x 2) to split horizontally). With the cursor in one half-window, give the command M-x run lisp (meta-x run lisp) to start Lisp. You now can run Lisp within one window and edit your Lisp code in the other half. Putting your cursor at the start of a function definition in one window and giving the command C-M-z (control-meta-z) will send the definition to Lisp. You can also save your Lisp source code to a file and load the file from Lisp, e.g. (load "myfile.lsp") .

Program files are provided, in the directory ~cs381k, to be used with the assignments; these are described by Program File Descriptions. FTP directory for Program Files.

Other Resources:


All programs must be individual work.

Gordon S. Novak Jr.