Lisp Resources and Links

Document Sample
Lisp Resources and Links Powered By Docstoc
					Lisp Resources and Links
Common Lisp at UH
          (add-to-list 'load-path "~ics313/public_html/slime-2.0/") ; your SLIME directory (require 'slime) (slime-setup)

Create a file in your home directory called .emacs if you don't already have one. Put the following lines in that file:
(setq inferior-lisp-program "/opt/acl60/alisp") (global-set-key "\C-x\C-l" `run-lisp) (global-set-key "\C-xd" `lisp-eval-defun) (global-set-key "\C-x\C-d" `lisp-eval-defun-and-go)

To start Lisp within SLIME, type M-x slime This will start SLIME and an inferior lisp process in your buffer. The SLIME manual and files can be found at ICS 313 slime directory To start a Lisp process from within emacs, type C-x C-l or Meta-X run-lisp Many more commands are available in the unix/emacs help files.
 

Put the information in the Header line for lisp files for lisp assignment files. For examples of functions, see selection statements selection.lisp, recursive functions recurse.lisp beer.lisp using princ and terpri, beer-format.lisp same function using format for output or selection.lisp

Lisp at home
 

Lisp in a box Practical Common Lisp textbook and code

Common Lisp Resources
 

Ansi common lisp specification online from Xanalys/Lispworks "Common Lisp: A gentle introduction to Symbolic Computation" by David S. Touretzky (pdf) (local copy)

     

 Complete specification for Common Lisp in HTML from Xanalys. Put the following information in the header of your lisp files Practical Lisp Programming Online pages Online Tutorial material list from the Association of Lisp Users ( Lisp Resource Kit - with bootable Linux CD image (700 MB) is available at: Common Lisp on UH Uhix without SLIME: web page: o acl_hints.html o Save this in your file (from Franz) o Or this version (from David Chin) You can create an alias to the executable with alias alisp /opt/acl60/alisp Thereafter, you can simply type alisp to start Lisp.
o o

For running Lisp as an inferior process to Emacs, put this in your .emacs file. A list of emacs/acl key bindings

Example programs
  

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" CL-USER(28): 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
(princ-to-string 99)

==> "99"

Common Lisp for home
    

Xanalys Lispworks - commercial and trial versions of common lisp - Franz, Inc. - commercial and trial versions of common lisp - ANSI Common Lisp compiler, debugger, and interpreter -- CLISP. Free implementation of Common Lisp from Carnegie Mellon -- CMUCL. GNU compiler and interpreter for common lisp -- GCL

General Lisp Programming Resources
       


A discussion of Lisp for C programmers (pdf) (postscript) -- A new resource from Franz, Inc for learning Common Lisp interactively. Common Lisp Resources on the Web, Amant & Young, Intelligence, V. 12, No. 3, pp. 21-23 (handout) Basic Lisp Techniques (pdf) Adaptive Software Article Tutorial on Good Lisp Programming Style, Peter Norvig (postscript) or (pdf) Loving Lisp - The Savy Programmer's Secret Weapon by Mark Watson - book + code html to download Text version of Richard Stallman's historical/hysterical talk/flame at the International Lisp Conference in 2002 in SanFrancisco. It is at Examples of defining and using structures Common Lisp Object System examples

Lisp compared to other languages

Scheme Resources

 

 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". (pdf). Overview of R & N Agent code from AI, A Modern Approach link LISA - Intelligent Software Agents for Common Lisp -- LISA environment.

Tags: Lisp
Description: Common Lisp at UH