[slime-devel] unexpected behavior of eval-when with CCL when compiling with C-c C-k

Faheem Mitha faheem at faheem.info
Thu Aug 30 04:42:03 UTC 2012


Hi,

I recently posted a question at

http://stackoverflow.com/questions/12156902/unxpected-behavior-with-eval-when

Brief summary:

The following code should (I think) set *read-default-float-format* to
double float. Well, it does compile with C-c C-k, but running

*read-default-float-format*

in the REPL afterwards gives SINGLE-FLOAT.

So the value of *read-default-float-format* in the REPL has not changed
from the default value of SINGLE-FLOAT.

Note, however, that the

(print *read-default-float-format*)

in the code does return DOUBLE-FLOAT.

Rainer Joswig, in his answer to this question, says that this is
because the compilation and the REPL are on different threads (if I
understand him correctly), but I'd like some evidence of this. Also,
this code works fine with SBCL.

In addition to wanting to understand why this is happening, I'd like
to know whether it is possible to work around this, and set
*read-default-float-format* in a file, rather than having to set it on
the command line.

I'm not sure whether this issue has something to do with SLIME, so I'm
posting here first.

Platform and versions. I'm using Debian squeeze x86. The version of
SLIME is from Debian unstable, 1:20120525-2. CCL is the 1.8 release. I
tried it both with the upstream binaries from
http://svn.clozure.com/publicsvn/openmcl/release/1.8/linuxx86/ccl, and
a binary package created by me - see Package ccl at
mentors.debian.net. The result was the same in each case.

Thanks in advance. Please CC me on any reply.

                                                         Regards, Faheem

#######################################################################

(eval-when (:compile-toplevel :load-toplevel :execute)
   (require :asdf) (require :cl-rmath) (setf *read-default-float-format* 'double-float))

(print *read-default-float-format*)




More information about the slime-devel mailing list