This is the archived website of SI 413 from the Fall 2012 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.
You already know about Lisp; it's one of the oldest programming languages, and it's still used in lots of different places. It launched a revolution in functional programming, and has many descendant languages such as Scheme.
You probably also know about the text editor
basically one of two options for real, hardcore text editing in *nix
operating systems (the other option is VI).
But did you know that emacs is actually written in Lisp? Go to any
emacs buffer and type a simple expression like
(+ 10 12),
then put your cursor after the closing paren and do Ctrl-x Ctrl-e. The
answer shows up at the bottom of the screen!
You see, emacs is much more than a simple text editor. It is practically its own operating system, and the fact that it's all programmed (internally) in its own version of Lisp makes it very easy to write emacs extensions in Lisp too, or to accomplish simple programming tasks and run them from within emacs. That's what you'll be doing for this project.
The programs you submit should be in a single file called
proj.lisp. I will of course run your code from within
emacs, by first typing
emacs proj.lispfrom the command line, and then running it by doing
Alt-x eval-bufferfrom within emacs (in emacs-speak, the Alt-x is usually written
M-x). I will do this all from within the CS linux environment, naturally.
For this language, you need to implement modifications A, B, C, G, and H. See the Phase 1 page for details on what this means.
In emacs Lisp, your output should always be to a new emacs buffer that also gets displayed by your program. For part (H), you also need to open the "out.txt" file in emacs at the end, after you've written to it.
See the Phase 2 Page for the list of suggested
problems. Of the ones listed, I recommend the following as being most
well-suited for emacs lisp: