Jianshi Huang | 1 Dec 2010 10:42
Picon
Gravatar

SBCL's with-timeout failed with slime-input-stream

Hi,

I'm using SLIME (2010-11-07) with SBCL(1.0.44.22) on Linux x8664.

The following code should signal an sb-ext:timeout condition but
with-timeout isn't functioning on slime-input-stream

with-timeout works with SBCL started from terminal.

    (sb-ext:with-timeout 1 (read *standard-input*))

CL-USER> *standard-input*
#<SWANK-BACKEND::SLIME-INPUT-STREAM {1002C88D31}>

Cheers,

--

-- 
Jianshi Huang

Attila Lendvai | 1 Dec 2010 12:09
Picon
Gravatar

Re: SBCL's with-timeout failed with slime-input-stream

>    (sb-ext:with-timeout 1 (read *standard-input*))

with-deadline also doesn't work from inside slime, but generally you
should prefer that to with-timeout in production systems.

(with-timeout is not safe due to async unwinds at random points in the
code (unless the entire codebase is prepared for that)).

hth,

--

-- 
 attila

_______________________________________________
slime-devel site list
slime-devel <at> common-lisp.net
http://common-lisp.net/mailman/listinfo/slime-devel
Helmut Eller | 1 Dec 2010 16:30

Re: SBCL's with-timeout failed with slime-input-stream

* Jianshi Huang [2010-12-01 09:42] writes:

> Hi,
>
> I'm using SLIME (2010-11-07) with SBCL(1.0.44.22) on Linux x8664.
>
> The following code should signal an sb-ext:timeout condition but
> with-timeout isn't functioning on slime-input-stream
>
> with-timeout works with SBCL started from terminal.
>
>     (sb-ext:with-timeout 1 (read *standard-input*))
>

SLIME also uses with-timeout internally.  Essentially we have a
situation like

(sb-ext:with-timeout 1 
   (loop 
     (sb-ext:with-timeout 0.2
       (handler-case 
           (sleep 10000)
         (sb-ext:timeout ()
           (print 'timeout)
           (force-output))))))

The handler doesn't know that the condition was raised by some outer
with-timeout.  

That's probably just one of many problems of the with-timeout construct
(Continue reading)

Jianshi Huang | 2 Dec 2010 06:21
Picon
Gravatar

Re: SBCL's with-timeout failed with slime-input-stream

Hi Attila,

On Wed, Dec 1, 2010 at 8:09 PM, Attila Lendvai <attila.lendvai <at> gmail.com> wrote:
>>    (sb-ext:with-timeout 1 (read *standard-input*))
>
> with-deadline also doesn't work from inside slime, but generally you
> should prefer that to with-timeout in production systems.
>

Thanks for the advice.  Being able to restrict the signal in specific
code block is very nice.

> (with-timeout is not safe due to async unwinds at random points in the
> code (unless the entire codebase is prepared for that)).
>

That makes sense, and I suppose using without-interrupts is
unacceptable in the body part.

Since the part I want timeouts are all IO function calls, I think it
should be safe. But I think I'd better use with-deadline. :)

--

-- 
Jianshi

Jianshi Huang | 2 Dec 2010 06:38
Picon
Gravatar

Re: SBCL's with-timeout failed with slime-input-stream

Hi Helmut,

On Thu, Dec 2, 2010 at 12:30 AM, Helmut Eller <heller <at> common-lisp.net> wrote:
> SLIME also uses with-timeout internally.  Essentially we have a
> situation like
>
> (sb-ext:with-timeout 1
>   (loop
>     (sb-ext:with-timeout 0.2
>       (handler-case
>           (sleep 10000)
>         (sb-ext:timeout ()
>           (print 'timeout)
>           (force-output))))))
>
> The handler doesn't know that the condition was raised by some outer
> with-timeout.
>

I see. But why

(handler-case
    (sb-ext:with-timeout 1
      (read *standard-input*))
  (sb-ext:timeout (c) c))

or

(handler-case
    (sb-sys:with-deadline (:seconds 1)
(Continue reading)

Helmut Eller | 3 Dec 2010 09:33

Daily ChangeLog diff

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.2165 slime/ChangeLog:1.2166
--- slime/ChangeLog:1.2165	Sat Nov 13 06:18:03 2010
+++ slime/ChangeLog	Thu Dec  2 11:39:00 2010
 <at>  <at>  -1,3 +1,10  <at>  <at> 
+2010-12-02  Martin Simmons  <martin <at> lispworks.com>
+
+	* swank-lispworks.lisp (frame-actual-args): Reimplement to include
+	only the values like on other platforms and deal with, optional
+	key and rest args.
+	(print-frame): Format the frame as a call like in other backends.
+
 2010-11-13  Helmut Eller  <heller <at> common-lisp.net>

 	Improve source locations for compiler messages in Lispworks.

Frank | 4 Dec 2010 08:55
Picon

SLIME installation for CCL

Hey there,

I'm new to slime.

I'm using CCL and when I startup slime I get those messages printed in 
the *inferior-lisp* buffer:

; Warning: These Swank interfaces are unimplemented:
;           (ACTIVATE-STEPPING ADD-FD-HANDLER ADD-SIGIO-HANDLER
;            BACKGROUND-SAVE-IMAGE DUP EXEC-IMAGE MAKE-FD-STREAM
;            REMOVE-FD-HANDLERS REMOVE-SIGIO-HANDLERS SLDB-BREAK-AT-START
;            SLDB-BREAK-ON-RETURN SLDB-STEP-INTO SLDB-STEP-NEXT 
SLDB-STEP-OUT)
; While executing: SWANK-BACKEND::WARN-UNIMPLEMENTED-INTERFACES, in 
process list

and later

;Compiler warnings for "c:/Dokumente und

Einstellungen/fau/Anwendungsdaten/.emacs.d/slime-2010-12-03/contrib/swank-presentation-streams.lisp" 
:
;   In CCL::CLEAR-PRESENTATIONS inside an anonymous lambda form: 
Undefined function SWANK::CLEAR-PRESENTATION-TABLES
;   In SWANK::PRESENTING-OBJECT-1: Undefined function 
SWANK::SAVE-PRESENTED-OBJECT

Well it seems to me everything is running (well I assume not the above 
mentioned features).

(Continue reading)

Stas Boukarev | 4 Dec 2010 09:12
Picon

Re: SLIME installation for CCL

Frank <some.frank <at> gmail.com> writes:

> Hey there,
>
> I'm new to slime.
>
> I'm using CCL and when I startup slime I get those messages printed in 
> the *inferior-lisp* buffer:
>
> ; Warning: These Swank interfaces are unimplemented:
> ;           (ACTIVATE-STEPPING ADD-FD-HANDLER ADD-SIGIO-HANDLER
> ;            BACKGROUND-SAVE-IMAGE DUP EXEC-IMAGE MAKE-FD-STREAM
> ;            REMOVE-FD-HANDLERS REMOVE-SIGIO-HANDLERS SLDB-BREAK-AT-START
> ;            SLDB-BREAK-ON-RETURN SLDB-STEP-INTO SLDB-STEP-NEXT 
> SLDB-STEP-OUT)
> ; While executing: SWANK-BACKEND::WARN-UNIMPLEMENTED-INTERFACES, in 
> process list
>
> and later
>
> ;Compiler warnings for "c:/Dokumente und 
>
Einstellungen/fau/Anwendungsdaten/.emacs.d/slime-2010-12-03/contrib/swank-presentation-streams.lisp" 
> :
> ;   In CCL::CLEAR-PRESENTATIONS inside an anonymous lambda form: 
> Undefined function SWANK::CLEAR-PRESENTATION-TABLES
> ;   In SWANK::PRESENTING-OBJECT-1: Undefined function 
> SWANK::SAVE-PRESENTED-OBJECT
>
> Well it seems to me everything is running (well I assume not the above 
(Continue reading)

Helmut Eller | 4 Dec 2010 09:32

Re: SLIME installation for CCL

* Frank [2010-12-04 07:55] writes:

> Hey there,
>
> I'm new to slime.
>
> I'm using CCL and when I startup slime I get those messages printed in 
> the *inferior-lisp* buffer:
>
> ; Warning: These Swank interfaces are unimplemented:
> ;           (ACTIVATE-STEPPING ADD-FD-HANDLER ADD-SIGIO-HANDLER
> ;            BACKGROUND-SAVE-IMAGE DUP EXEC-IMAGE MAKE-FD-STREAM
> ;            REMOVE-FD-HANDLERS REMOVE-SIGIO-HANDLERS SLDB-BREAK-AT-START
> ;            SLDB-BREAK-ON-RETURN SLDB-STEP-INTO SLDB-STEP-NEXT 
> SLDB-STEP-OUT)
> ; While executing: SWANK-BACKEND::WARN-UNIMPLEMENTED-INTERFACES, in 
> process list
>
> and later
>
> ;Compiler warnings for "c:/Dokumente und 
>
Einstellungen/fau/Anwendungsdaten/.emacs.d/slime-2010-12-03/contrib/swank-presentation-streams.lisp" 
> :
> ;   In CCL::CLEAR-PRESENTATIONS inside an anonymous lambda form: 
> Undefined function SWANK::CLEAR-PRESENTATION-TABLES
> ;   In SWANK::PRESENTING-OBJECT-1: Undefined function 
> SWANK::SAVE-PRESENTED-OBJECT
>
> Well it seems to me everything is running (well I assume not the above 
(Continue reading)

Frank | 4 Dec 2010 11:42
Picon

SLIME Interning Issues

Hi there,

I'm not sure but this looks like a bug to me.

I have those lines in a file lets say "scratch.lisp"

;;; start scratch.lisp
(defpackage :foo)
(in-package :foo)
(defmacro bar (bazzz))
(defun bar2 (bazzz2))
;;; end scratch.lisp

I start emacs and then slime.
On the fresh REPL I type:

; SLIME 2010-12-02
CL-USER> (load "scratch.lisp")
;Compiler warnings for "/Dokumente und 
Einstellungen/fau/Desktop/scratch.lisp" :
;   In BAR: Unused lexical variable BAZZZ
;Compiler warnings for "/Dokumente und 
Einstellungen/fau/Desktop/scratch.lisp" :
;   In BAR2: Unused lexical variable BAZZZ2
#P"c:/Dokumente und Einstellungen/abc/Desktop/scratch.lisp"

CL-USER> (find-symbol "BAZZZ")
BAZZZ
:INTERNAL

(Continue reading)


Gmane