Lisp Resources and Links
Common Lisp Quick Reference (pdf)
Example lisp files
Common Lisp at UH
- Using SSH to UHunix:
- Connect to UHUnix using SSH (if you do not have SSH or another
secure terminal program installed, get it from UH ITS (information
technology services) and install it.
- connect to uhunix.hawaii.edu
- cd to the directory where your ics313 files are
- type the entire path to lisp
you should see a lisp process start in the current window.
Note that this is an older version of ACL than the trial one for PCs.
You can create an alias to the executable with
alias alisp /opt/acl60/alisp
Thereafter, you can simply type alisp to start Lisp.
- Alternatively, you may create an alias for lisp by typing
on the keyboard (or putting in your .login file)
alias lisp /opt/acl60/alisp
and then start lisp with lisp
This will start common lisp in the current window.
- Common Lisp on UH Uhix without SLIME:
Common Lisp for home
Try Franz's Allegro Common Lisp (franz.com), Lispworks (lispworks.com) lisp or GNU CLISP (free software founmdation sfs.org).
Common Lisp Resources
Towers of hanoi program in lisp (Hanoi.lisp)
Lisp structure drawing program (sdraw.lisp)
- describe function
The function describe takes a symbol argument (quoted function name) and returns the documentation string and other properties of the symbol.
For example (describe 'sumcube) ==>
SUMCUBE is a SYMBOL.
It is unbound.
It is INTERNAL in the COMMON-LISP-USER package.
Its function binding is #
The function takes arguments (X Y)
Its property list has these indicator/value pairs:
EXCL::%FUN-DOCUMENTATION "Returns the sum of arguments cubed"
- Example programs in Common Lisp are available
in the assignments directory.
Lisp includes recursion, iteration, the towers of Hanoi problem, the N-Queens problem, and state
space searches in the sssearch directory.
- Note: the concatenate function in Common Lisp takes any number of
arguments (in contrast to princ) and returns them in a specified format, eg.
(concatenate (quote string) "A" " " "C" " " "B" )
==> "A C B"
which can be passed to princ.
To convert a number to a string (for use in concatenate, for example), use
General Lisp Programming Resources
Lisp compared to other languages
- The 90 Minute Scheme to C compiler
from '(Montreal Scheme/Lisp User Group) 20/10/2004 Meeting
Marc Feeley gave us another really good presentation. It was more technical than the previous ones, but it was definitely worth it. (I think this may set the tone for future presentations... we'll see!)
Marc showed us how to write a simple Scheme to C compiler, in Scheme. In only 90 minutes! And although not supporting the whole Scheme standard, the compiler supports fully optimized proper tail calls, continuations, and (of course) full closures. The compiler is implemented using two important compilation techniques for functional languages: closure conversion and CPS-conversion.
The presentation is available in PDF format. The source code of the whole compiler is available here, as well as a few test programs: test1.scm, test2.scm, and test3.scm.
Intelligent Agent Programming in Lisp
- Intelligent Agents - Chapter 2 of Russell and Norvig’s text "Artificial
Intelligence: A Modern Approach".
- Overview of R & N Agent code from AI, A Modern Approach
- LISA - Intelligent Software Agents for Common Lisp --
Go to the
(c) N. E. Reed, 2003