Currently, we have:
(defun create-swank-server (port &key reuse-address) "Create a Swank TCP server on `port'. Return the port number that the socket is actually listening on." (declare (ignore reuse-address)) (comm:start-up-server-and-mp :announce *terminal-io* :service port :process-name "Swank Request Processor" :function 'swank-accept-connection ) ; tsk tsk; terrible style! port)
From the fine manual:
Note: start-up-server-and-mp is implemented only on Unix/Linux/Mac OS platforms.
Which means the current CREATE-SWANK-SERVER for lispworks will fail on Windows. Now, I hate windows as much as the next guy, but this seems unnecessarily rude; I suggest one of the following things:
* revert to just comm:start-up-server. This has the advantage that many users either need to start up MP themselves later on. Once comm:start-up-server-and-mp runs, you can no longer launch MP yourself from a chosen entry point. What was the rationale of using x-and-mp?
* #+Unix #-Unix the code to only use x-an-mp on unices
* do your own checks, e.g. (if MP::*MULTIPROCESSING* ; I coulda sworn this used to be public in 4.2 (comm:start-up-server ...) (comm:start-up-server-and-mp ...))
I'm not sure which is the best solution because I'm not sure why it currently uses comm:start-up-server-and-mp.
This may or may not be related to another problem I'm having, which is all works fine when I manually evaluate (load "/home/ap/Lisp/slime/swank-loader.lisp") (swank::create-swank-server 4005)
in a running lispworks and connecting via slime-connect, but this fails when the above forms are in my .lispworks file and I try C-u M-x slime [lisp?] my-lispworks-image
The process shows up:
XOS 5 > (mp:ps) #<MP:PROCESS Name "Swank Request Processor" Priority 3 State "Waiting for connection"> #<MP:PROCESS Name "Top level loop" Priority 0 State "Running"> #<MP:PROCESS Name "The idle process" Priority -8388608 State "Running"> NIL
XOS 6 >
But noone is actually listening on the socket. (as can be verified with telnet). Clues?
Thanks,
Alain.Picard@memetrics.com writes:
Which means the current CREATE-SWANK-SERVER for lispworks will fail on Windows. Now, I hate windows as much as the next guy, but this seems unnecessarily rude; I suggest one of the following things:
- revert to just comm:start-up-server. This has the advantage that many users either need to start up MP themselves later on. Once comm:start-up-server-and-mp runs, you can no longer launch MP yourself from a chosen entry point. What was the rationale of using x-and-mp?
Nothing in particular. The first example I found in the documentation (for 4.2) used the mp function.
But noone is actually listening on the socket. (as can be verified with telnet). Clues?
Hmm... no. The startup is a bit different if you use M-x slime: there is no fixed port number; Emacs tells Lisp the name of a temporary file and waits until Lisp writes the chosen port number of the server socket into that file. The file is then removed and the server socket is closed after the first connection.
I reorganized startup code a bit: we use now comm:start-up-server and the correct port number is written to the bootstrap file. The new version should work with M-x slime, but it's bit difficult to test this with personal edition.
BTW, I've heard that Xanalys will/has/announced to/ release the source of their editor. Do you know any details?
Helmut.
Helmut Eller e9626484@stud3.tuwien.ac.at writes:
BTW, I've heard that Xanalys will/has/announced to/ release the source of their editor. Do you know any details?
What, they're open-sourcing Hemlock?
/me ducks and runs
-dan
Helmut Eller writes:
Hmm... no. The startup is a bit different if you use M-x slime: there is no fixed port number; Emacs tells Lisp the name of a temporary file
Okay -- I didn't know the protocol.
I reorganized startup code a bit: we use now comm:start-up-server and the correct port number is written to the bootstrap file. The new version should work with M-x slime, but it's bit difficult to test this with personal edition.
I'll test it for you.
BTW, I've heard that Xanalys will/has/announced to/ release the source of their editor. Do you know any details?
Yes. I have it sitting on my disk right here. It came with V 4.3.