a few issues

Tomas Hlavaty tom at logand.com
Sun Apr 12 21:32:21 UTC 2015


Hi Jean-Claude,

> Most of your issues should be fixed now in git master head (on
> github).

thanks a lot!

>     #<a SWANK/GRAY::SLIME-OUTPUT-STREAM 140431551121664> is not
>     of type STREAM.
>        [Condition of type TYPE-ERROR]
>
> Should be fixed in git head. Not really a new bug, just revealed
> itself on that occasion...

I confirm that this is now fixed.

>     Pressing C-c C-c on a function (compile function in slime),
>     I get:
>    
>     1462 is not of type STREAM.
>        [Condition of type TYPE-ERROR]
>    
> Should be fixed in git head.

I still get this error.

> BTW, are you sure you turned off any "trace preventing" optimization
> before trying cl:trace?  You need to have done the equivalent of
> (proclaim '(optimize (debug 3) (safety 3) (speed 1)) before
> compilation of any code that you expect to trace through, otherwise
> there may be some inlining or "fast-call" done by the compiler that
> will prevent good use of cl:trace.

This seem to do something, but not always.  I haven't identified the
problem yet.

> I more carefully re-read the code of mkcl:run-program and I can now
> say that NIL as third value is indeed a "feature" of asynchronous
> execution (:wait nil).  But what I cannot understand is NIL as second
> value of mkcl:run-program; It should be impossible to get that, ever,
> by construction.  Do you have an easy way to reproduce that case?

I suspect that is has something to do with optimisation settings.

   CL-USER> (compile-file "/tmp/bug.lisp")
   #P"/tmp/bug.fas"
   NIL
   NIL
   CL-USER> (load "/tmp/bug.fas")
   #P"/tmp/bug.fas"
   CL-USER> (funcall (bug::foo nil :stream "sha1sum" '("/etc/passwd")))
   #<two-way stream 7f86ff69abe0>
   NIL
   NIL
   CL-USER> (proclaim '(optimize (debug 3) (safety 3) (speed 1)))
   NIL
   CL-USER> (compile-file "/tmp/bug.lisp")
   #P"/tmp/bug.fas"
   NIL
   NIL
   CL-USER> (load "/tmp/bug.fas")
   #P"/tmp/bug.fas"
   CL-USER> (funcall (bug::foo nil :stream "sha1sum" '("/etc/passwd")))
   #<two-way stream 7f86ffaaa460>
   #<process "sha1sum" 7f86ff8e31e0>
   NIL
   CL-USER> 

where /tmp/bug.lisp is

   (defpackage :bug
     (:use :cl))
   
   (in-package :bug)
   
   (defun foo (input output cmd args)
     (multiple-value-bind (io p x)
         (mkcl:run-program cmd
                           args
                           :input input
                           :output output
                           :error nil
                           :wait (not (or input output))
                           :search t)
       (lambda () (values io p x))))

Without doing anything special, I get the second value NIL (unless
entered via slime repl).  After (proclaim '(optimize (debug 3) (safety
3) (speed 1)), I haven't seen this issue.

One more question: is there something like octets-to-string and
string-to-octets functions?

Thank you,

Tomas



More information about the mkcl-devel mailing list