About stumpwm and swank(clisp)

1.1k views Asked by At

I have built stumpwm using thread enabled clisp successfully. And the created stumpwm works great. However, the swank server doesnot work if started from ~/.stumpwmrc as below:

(load  "~/.vim/slime/start-swank.lisp")

The swank server is indeed started as netstat -na shows it is lisening on port 4005. But telnet 127.0.0.1 4005 will report "connection is closed by peer". So that the slimv in VIM cannot connect to swank server.

If i start another clisp REPL and run (load "~/.vim/slime/start-swank.lisp"), then both telnet and slimv works ok.

Why doesnot (load "~/.vim/slime/start-swank.lisp") in ~/.stumpwmrc work ?

FYI, The stumpwm log:

 Starting swank on port 4005
 ;;  Loading file /home/***/.vim/slime/start-swank.lisp ...
 ;;  Loading file /home/***/.vim/slime/swank-loader.lisp ...
 ;;  Loaded file /home/***/.vim/slime/swank-loader.lisp
 ;;   Loading file /home/***/.slime/fasl/2012-03-06/clisp-2.49-unix-pc386/swank-backend.fas ...
 ;;  ...
 ;;   Loaded file /home/***/.slime/fasl/2012-03-06/clisp-2.49-unix-pc386/contrib/swank-mrepl.fas
 ;; Swank started at port: 4005.

It seems ok but i cannot use stumpwm anymore !

2

There are 2 answers

0
z_axis On BEST ANSWER

From the clisp mailing list, i got a suggestion: We should modify ~/.vim/slime/swank-clisp as below:

(defimplementation preferred-communication-style () :spawn)

After running (load "~/.vim/slime/start-swank.lisp") to start swank server, the slimv can connect to swank server without any error.

Now slimv works great with clisp(with thread support) .

Regards!

1
jwmc On

I'm not familiar with slimv, but it seems that all you're looking to do is start a server in lisp and connect to it. Keep it simple. As I don't really want to find out too much about what's going on in start-swank.lisp, and you probably don't either, I would recommend you start a swank server by putting this in your .stumpwmrc:

(ql:quickload "swank")
(swank:create-server :port #<choose a port number>)

Then connect on that port number with slimv's equivalent of M-x slime-connect. If the version of swank in quicklisp is not compatible with slimv, make sure you have one that is, and REQUIRE it.

Try it out and, if it still doesn't work, look at the version numbers of swank and slimv and post your findings.