Hi,
I am using CLisp so let's say I wan't to save an image with Swank so I just do the regular procedure with "M-x slime" which will give me the REPL. Now if I save image and start clisp with the same procedure it will crash (I guess because swank is already loaded in the image). What steps can I do now to avoid swank from loading again?
Thanks! Andrew
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
Andrew Stebakov astebakov@yahoo.com writes:
Hi,
I am using CLisp so let's say I wan't to save an image with Swank so I just do the regular procedure with "M-x slime" which will give me the REPL. Now if I save image and start clisp with the same procedure it will crash (I guess because swank is already loaded in the image). What steps can I do now to avoid swank from loading again?
i'm not sure but it looks like you're saving an image with the sime server already started, this is going to create problems whne you startup the image since it contains refrences to sockets and other os resources whcih no longer exist. what you want to do is save an image with swank loaded (but without a runnig server) and then startup a server every time you start the image. try using something like this:
[untested]
; in a clean CLISP image
(asdf:oos 'asdf:load-op :swank) (ext:saveinitmem "image-with-swank.mem" :init-function (lambda () (swank:create-swank-server)))
then loadup the image-with-swank image and you should get a properly runnig swank server.
hth.
* Marco Baringer [2005-10-08 11:34+0200] writes:
; in a clean CLISP image
(asdf:oos 'asdf:load-op :swank) (ext:saveinitmem "image-with-swank.mem" :init-function (lambda () (swank:create-swank-server)))
then loadup the image-with-swank image and you should get a properly runnig swank server.
The latest CVS version has some better support for this situation.
E.g. you can set slime-registered-lisp-implementations like so:
(setq slime-registered-lisp-implementations '((clisp ("clisp")) (xclisp ("clisp" "-q" "-M" "image-with-swank.mem") :init (lambda (file _) (format "(swank:start-server %S)\n\n" file)))))
Then you can start the custom image with `M-- M-x slime xclisp'. Note that the :init, unlike the default, doesn't load the swank code.
It's currently not possible to use plain a `M-x slime' to load custom image, mostly because all the our docs mention inferior-lisp-program as the way the specify the lisp implementation, but we need a little more information than the program name alone. Maybe we should switch from inferior-lisp-program to slime-registered-lisp-implementations as default.
In the meantime you can create your own command like this:
(defun clisp-slime () (interactive) (slime-start :program "clisp" :program-args '("-M" "image-with-swank.mem") :init (lambda (file _) (format "(swank:start-server %S)\n\n" file))))
Helmut.
[Helmut Eller:]
E.g. you can set slime-lisp-implementations like so:
(setq slime-lisp-implementations '((clisp ("clisp")) (xclisp ("clisp" "-q" "-M" "image-with-swank.mem") :init (lambda (file _) (format "(swank:start-server %S)\n\n" file)))))
this change seems to break slime-register-lisp-implementation, slime-select-lisp-implementation, and slime-find-lisp-implementation which all expect the old format for slime-lisp-implementations.
is their use deprecated? should they just be deleted?
thanks,
...bryan
"bryan d. o'connor" bryan-lisp@lunch.org writes:
is their use deprecated? should they just be deleted?
Yes.