Dan_Muller/Lisp Stuff
SDxWiki

Organizing files

At the moment, I have a directory ~/lisp where I do Lisp stuff. The tilde designates my "home" directory. I made this be C:\home\danm; using the standard Windows location under C:\Documents and Settings was causing occasional problems because of the spaces in the name. (Curse MS for this choice.)


Installing asdf-install

I chose to "install" by getting the sources from the definitive CVS repository. I keep third-party Lisp libraries in ~/lisp/cl-library, so, in a cygwin shell:

$ cd ~/lisp/cl-library $ mkdir asdf-install $ cd asdf-install $ cvs -d :pserver:cvs@clozure.com:/usr/local/tmpcvs/ccl-0.14 login # <enter "cvs" when prompted for a password> $ cvs -d :pserver:cvs@clozure.com:/usr/local/tmpcvs/ccl-0.14 get ccl/tools/asdf-install

Now to see if/how well it works under Windows.


Notes on installing various libraries and tools

Not complete!

Unless otherwise noted, I run commands in a Cygwin shell window. I am using the Cygwin version of CVS. The native NT version might work, too.

I'll try to remember to record things here in case I decide later that a library is needed. Its presence here may only indicate that I installed the library to try it out for something.

SLIME

Slime is a CommonLisp development environment that runs in Emacs or XEmacs. It's more text-oriented than MS programmers are used to, and of course you have to learn Emacs, too. I've been using only a very small subset of SLIME's functionality, and I'm very pleased with it.

The best description of how to install it on Windows so far is provided by [Bill Clementson's blog]:

1.. Download the CVS version of SLIME to HOME/site/slime:

cvs -d :pserver:anonymous@common-lisp.net:/project/slime/cvsroot login # Password is "anonymous" cvs -d :pserver:anonymous@common-lisp.net:/project/slime/cvsroot checkout slime

1.. Download & install the Lisp implementation you want to use in the BIN directory (see the CL Cookbook instructions if you need help doing this) 2.. Create a file called ".slime.lisp" in your HOME directory with the following contents:

(load "c:/usr/home/site/slime/swank-loader.lisp") #-clisp (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t) #+clisp (swank::create-swank-server 4005)

1.. Add the following code to your .emacs file:

;;__________________________________________________________________________ ;;;; SLIME Setup

(setq load-path (append (list "c:/usr/home/site/slime") load-path)) (require 'slime) (add-hook 'lisp-mode-hook (lambda () (slime-mode t))) (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t))) ;; If you don't want eldoc-like behavior, comment out the following line (slime-autodoc-mode)

;; These are the 3 CL implementations that currently work with SLIME/Win32: ;; (Note: Unless you want to try out all 3, you only need one of these functions) ;; Franz Allegro Common Lisp - http://www.franz.com (defun acl-start () (interactive) (shell-command "c:/bin/acl-6.2/alisp.exe +B +cm -L ~/.slime.lisp&")) ;; GNU CLISP - http://clisp.cons.org/ (defun clisp-start () (interactive) (shell-command (concat "c:/bin/clisp-2.32/full/lisp.exe " "-B c:/bin/clisp-2.32/full/ " "-M c:/bin/clisp-2.32/full/lispinit.mem " "-i c:/usr/home/.slime.lisp " "-ansi -q&"))) ;; Xanalys LispWorks - http://www.lispworks.com (defun lw-start () (interactive) (shell-command (concat "c:/bin/lispworks-4.3/lispworks-personal-4300.exe " "-init c:/usr/home/.slime.lisp&"))) ;;__________________________________________________________________________

To use:

1.. Start the CL first with "M-x acl-start" (or equivalent) from Emacs (Note: The LispWorks Personal version doesn't have support for init files. Therefore, it is necessary to manually enter (load "c:/usr/home/.slime.lisp") into LispWorks after it has started) 2.. Start the SLIME connection with "M-x slime-connect RET RET RET" from Emacs

ACL-COMPAT

Expect to need this for building swig-uffi, maybe other stuff. (Need to check license.)