I am using aserve under cmucl and call the INIT-ASERVE-CMU function as the README suggests (otherwise latency is unbearable). INIT-ASERVE-CMU looks like this:
#'(LAMBDA () (BLOCK INIT-ASERVE-CMU (UNLESS (FIND-IF #'(LAMBDA (ASERVE-SYSTEM::PROC) (STRING= (MULTIPROCESSING:PROCESS-NAME ASERVE-SYSTEM::PROC) "Top Level Loop")) (MULTIPROCESSING:ALL-PROCESSES)) (MULTIPROCESSING::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS))))
After running it slime-space no longer shows the arglist. This is slime HEAD.
Tried it under sbcl-mt. Naturally, since init-aserve-cmu need not be run, everything works fine. I may even use it but compilation notes do not work and I'd miss them very much.
Gabor
Gabor Melis mega@hotpop.com writes:
After running it slime-space no longer shows the arglist. This is slime HEAD.
STARTUP-IDLE-AND-TOP-LEVEL-LOOPS is returns. The calling thread becomes the idle-loop, a new thread is created and a new read-eval-print loop is executed in the new thread.
For SLIME this looks like a RPC is still in progress and SLIME disables slime-space when there are pending requests. This is done to not disturb Lisp (might be problematic when SIGIO is used). slime-space is also disabled during debugging for the same reason.
All this should only happen when you call STARTUP-IDLE-AND-TOP-LEVEL-LOOPS from the SLIME REPL. If you call it in the *inferior-lisp* buffer, everything should work as usual. Alternatively you can call `M-x slime-reset' and SLIME discards all pending requests (and re-enables slime-space).
Tried it under sbcl-mt. Naturally, since init-aserve-cmu need not be run, everything works fine. I may even use it but compilation notes do not work and I'd miss them very much.
Thanks for mentioning this. I was under the impression that compilation notes work for SBCL. I think I can fix that.
Helmut.
Helmut Eller e9626484@student.tuwien.ac.at writes:
STARTUP-IDLE-AND-TOP-LEVEL-LOOPS is returns. The calling thread
^^^ ehm, that should be "never returns".
Helmut.
It works. Thanks for the answer.
Speaking of *inferior-lisp*, there is one more thing. AServe can be told to enter the debugger when a worker thread encounters an error. In this case under CMUCL the debugger appears in the *inferior-lisp* buffer.
(Under sbcl-mt it is nowhere to be found, but it is probably due to this and not SLIME related: debugger invoked on a SB-INT:SIMPLE-CONTROL-ERROR in thread 5669: attempt to RETURN-FROM a block or GO to a tag that no longer exists )
OK, *one* more thing:
(defun long-running-printer () (dotimes (i 3) (prin1 i) (force-output) (sleep 2)))
Now, lets wait for '1', type 't', wait for '2' to appear and then press enter:
CL-USER> (long-running-printer) 01t2<enter> Error: the variable T2 is unbound.
If one presses enter only after the prompt appears then:
CL-USER> (long-running-printer) 0t12 NIL CL-USER> ; No value
which isn't very good either.
Gabor
Gabor Melis mega@hotpop.com writes:
It works. Thanks for the answer.
Speaking of *inferior-lisp*, there is one more thing. AServe can be told to enter the debugger when a worker thread encounters an error. In this case under CMUCL the debugger appears in the *inferior-lisp* buffer.
You can try to set *debug-hook* to 'swank:swank-debugger-hook. This installs our debugger globally. This must be done in the *inferior-lisp* buffer, because the *debug-hook* is dynamically bound in the SLIME REPL.
[snip]
Now, lets wait for '1', type 't', wait for '2' to appear and then press enter:
CL-USER> (long-running-printer) 01t2<enter> Error: the variable T2 is unbound.
This is a bit difficult to fix properly and I don't have enough motivation to do that at the moment.
Helmut.
On Tuesday 11 May 2004 23:11, Helmut Eller wrote:
Gabor Melis mega@hotpop.com writes:
It works. Thanks for the answer.
Speaking of *inferior-lisp*, there is one more thing. AServe can be told to enter the debugger when a worker thread encounters an error. In this case under CMUCL the debugger appears in the *inferior-lisp* buffer.
You can try to set *debug-hook* to 'swank:swank-debugger-hook. This installs our debugger globally. This must be done in the *inferior-lisp* buffer, because the *debug-hook* is dynamically bound in the SLIME REPL.
That mostly helps. However, sldb-show-source has become erratic: sometimes it doesn't do anything on the first invocation and then shows the wrong file/form on the subsequent ones.
[snip]
Now, lets wait for '1', type 't', wait for '2' to appear and then press enter:
CL-USER> (long-running-printer) 01t2<enter> Error: the variable T2 is unbound.
This is a bit difficult to fix properly and I don't have enough motivation to do that at the moment.
Is it the bookkeeping code for slime-[input | output]-[start | end] that's wrong?
Hmm. Setting swank:*communication-style* to :spawn seems to work. I thought that slime-multiprocessing implies :spawn but looking at the code I can see that's not the case.
Gabor Melis mega@hotpop.com writes:
That mostly helps. However, sldb-show-source has become erratic: sometimes it doesn't do anything on the first invocation and then shows the wrong file/form on the subsequent ones.
I guess that's because the debugger keeps a pointer into the control stack, but CMUCL copies the stacks forth and back to schedule different threads. The pointer for the frame is probably not updated and has no meaning in the other thread. A wonder that CMUCL didn't crash.
I think the CMUCL debugger disables scheduling, perhaps for this reason.
This is a bit difficult to fix properly and I don't have enough motivation to do that at the moment.
Is it the bookkeeping code for slime-[input | output]-[start | end] that's wrong?
Yes. The current code only works if the marks are separated by the prompt. But in this situation all markers are at the same position. The marks must be moved differently for input from the user and for output form the Lisp process. Setting the insertion types of the markers is not enough. It's probably the easiest to use insert-before-markers (not sure if that exists in XEmacs) to insert output from Lisp and to change the insertion-types so that user input is handled correctly.
Helmut.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tuesday 11 May 2004 12:55, Gabor Melis wrote:
I am using aserve under cmucl and call the INIT-ASERVE-CMU function as the README suggests (otherwise latency is unbearable). INIT-ASERVE-CMU looks like this:
#'(LAMBDA () (BLOCK INIT-ASERVE-CMU (UNLESS (FIND-IF #'(LAMBDA (ASERVE-SYSTEM::PROC) (STRING= (MULTIPROCESSING:PROCESS-NAME ASERVE-SYSTEM::PROC) "Top Level Loop")) (MULTIPROCESSING:ALL-PROCESSES)) (MULTIPROCESSING::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS))))
After running it slime-space no longer shows the arglist. This is slime HEAD.
Tried it under sbcl-mt. Naturally, since init-aserve-cmu need not be run, everything works fine. I may even use it but compilation notes do not work and I'd miss them very much.
Gabor
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel
Using this function didn't work for me, so I've switched to the trick, used in INSTALL.lisp:
#+(and cmu mp) (setf mp::*idle-process* mp::*initial-process*)
Don't know if it breaks slime-space, though.
HTH, Ivan