[slime-devel] Re: Problem with connection between sbcl and slime

Kai-Florian Richter richter at informatik.uni-bremen.de
Wed Nov 14 21:03:52 UTC 2007


Hi again!

> > SLIME does start up, I get a lisp prompt and it seems to behave
> > normally. However, the connection between SBCL and SLIME is rather
> > shaky.
> > At some point during working with SBCL, I lose the function parameter
> > info, I also can't break running code then.
> 
> Without further context, it's hard to say what problem you are
> seeing.  There are plenty of ways to screw things up :-) 
> Not everything is SLIME's fault.  
Well, I don't doubt that. And I tried to provide as much context as
possible, but oh well...

> If you can't interrupt running code, save the contents of the
> *slime-events* buffer.  That's often useful for debugging SLIME.
I will as soon as SLIME/SBCL reaches that state again. Hasn't happened
all day.

> > Even more, the function (quit) has no effect whatsoever, i.e. SBCL is
> > not stopped, but I get a message "Evaluation aborted."
> > CL-USER> (quit)
> > ; Evaluation aborted.
> > CL-USER> 
> 
> I think that QUIT in SBCL terminates the current thread only, unless
> it is called in the initial thread.  SLIME starts a new listener
> thread if the old was killed (that's sometimes nice, but sometimes
> not).  The second prompt above is a bit irritating, because at that
> time there is no REPL thread, a new one is created for the next
> request.
Looking at the output below, this seems to be the case. The current
thread is "repl-thread", if I type in (quit) it is killed and
immediately replaced by "new-repl-thread". That is, either SLIME or SBCL
(which I doubt) seems to catch and prevent this quit. BTW, in the new
"repl-thread" everyting I defined before is known as well, i.e. all
symbols, functions etc. are still defined. It is as if nothing happened.

(swank-backend:current-thread)
#<SB-THREAD:THREAD "repl-thread" {A7ED6D1}>
CL-USER> (swank-backend:all-threads)
(#<SB-THREAD:THREAD "repl-thread" {A7ED6D1}>
 #<SB-THREAD:THREAD "reader-thread" {A7ED5F1}>
 #<SB-THREAD:THREAD "control-thread" {A7ED509}>
 #<SB-THREAD:THREAD "auto-flush-thread" {A7ED339}>
 #<SB-THREAD:THREAD "initial thread" {A6DD731}>)
CL-USER> (quit)
; Evaluation aborted.
CL-USER> (swank-backend:all-threads)
(#<SB-THREAD:THREAD "new-repl-thread" {A96B239}>
 #<SB-THREAD:THREAD "reader-thread" {A7ED5F1}>
 #<SB-THREAD:THREAD "control-thread" {A7ED509}>
 #<SB-THREAD:THREAD "auto-flush-thread" {A7ED339}>
 #<SB-THREAD:THREAD "initial thread" {A6DD731}>)
CL-USER> 


> > That is, I can't just quit SBCL, I have to kill the lisp process when
> > exiting Emacs.
> 
> You could try sb-int:unix-exit or the REPL shortcut `, quit' which is
> the same as `M-x slime-quit-lisp'.
unix-exit is in package sb-unix, but apart from that it works; ,quit as
well. And (sb-ext:quit :recklessly-p t) as well. So, for quitting I just
need to change my habbits, it seems :)

> For SBCL/x86 we use threads by default.  You could change that with
> with swank:*communication-style*, but the alternatives are usually
> worse.
Mmmh, considering that it works most of the time that doesn't sound like
a great idea :)

Kai-Florian

-- 
---------------------------------------------------------------------
Dipl.-Inform. Kai-Florian Richter    richter at informatik.uni-bremen.de
Cognitive Systems
FB 3  Mathematik & Informatik        phone: +49-421-218-64283
Universitaet Bremen                  fax:   +49-421-218-9864283
---------------------------------------------------------------------




More information about the slime-devel mailing list