Maxima+Slime is possible in CMUCL



Thanks to some excellent help from the #lisp folk (pjb in particular) a
way has been found to have Slime work with a running Maxima image on
CMUCL.  Here are the instructions on how I got it to work (improvements
welcome, particularly alternatives to the absolute load path I've got
in maxima-init.lisp)

First, put the following in maxima-init-cmucl-slime.lisp

(setf mp::*idle-process* mp::*initial-process*)
(pushnew "/home/user/maximatoplevel/slime/" asdf:*central-registry*)
(asdf:oos 'asdf:load-op :swank)
(mp:make-process #'(lambda () (swank:create-swank-server)))

If your slime directory isn't in /home/user/maximatoplevel/slime/
replace that with the value of your slime directory.

Next, put the following line in maxima-init.lisp:

#+cmu (load "/home/user/.maxima/maxima-init-cmucl-slime.lisp")

This avoids trying to load unworkable code in other lisps.

Then, start maxima with cmucl.  You will see a swank server start up,
and the load messange will supply a port number:

;; Swank started at port: 4005.

Now, start emacs and slime.  In this case, you will need to start emacs
and then do M-x slime-connect.  You will be prompted for a host
(127.0.0.1 is your own computer) and port (make sure it matches the one
Maxima told you it was using.  Once this is done, you should see
something like the following:

; SLIME 2005-06-01
CL-USER>

This means you have succeeded.  To get into the MAXIMA package, where
most of the action will be taking place, you type:

CL-USER> (in-package MAXIMA)
#
MAXIMA> 

You can now enter regular Maxima expressions via the normal interface,
and interact with Maxima through the SLIME REPL via this emacs Window.

I've uploaded a screenshot showing an example - The top frame is a
normal maxima interaction mode, the middle is a lisp file
(unit-functions.lisp in this case) and the bottom is the Slime REPL
window.

http://maxima.sourceforge.net/maxima+slime+cmucl.png


		
__________________________________ 
Discover Yahoo! 
Stay in touch with email, IM, photo sharing and more. Check it out! 
http://discover.yahoo.com/stayintouch.html