Please forgive me if this is not the right place to send help requests --- I see it is a devel mailing list, but I could not find a slime-user or slime-help list.
I am experiencing odd behavior using SLIME with CMUCL. It seems that a call to ext:set-floating-point-modes is failing to set the modes correctly. From within SLIME, I have the following interaction:
CL-USER> (ext:get-floating-point-modes) (:TRAPS (:OVERFLOW :INVALID :DIVIDE-BY-ZERO) :ROUNDING-MODE :NEAREST :CURRENT-EXCEPTIONS NIL :ACCRUED-EXCEPTIONS NIL :FAST-MODE NIL :PRECISION-CONTROL :64-BIT) CL-USER> (ext:set-floating-point-modes :traps nil) ; No value CL-USER> (ext:get-floating-point-modes) (:TRAPS (:OVERFLOW :INVALID :DIVIDE-BY-ZERO) :ROUNDING-MODE :NEAREST :CURRENT-EXCEPTIONS NIL :ACCRUED-EXCEPTIONS NIL :FAST-MODE NIL :PRECISION-CONTROL :64-BIT)
In contrast, if I start CMUCL from a terminal (same version, running my own init file in both cases), I get:
* (ext:get-floating-point-modes)
(:TRAPS (:OVERFLOW :INVALID :DIVIDE-BY-ZERO) :ROUNDING-MODE :NEAREST :CURRENT-EXCEPTIONS NIL :ACCRUED-EXCEPTIONS NIL :FAST-MODE NIL :PRECISION-CONTROL :64-BIT) * (ext:set-floating-point-modes :traps nil)
* (ext:get-floating-point-modes)
(:TRAPS NIL :ROUNDING-MODE :NEAREST :CURRENT-EXCEPTIONS NIL :ACCRUED-EXCEPTIONS NIL :FAST-MODE NIL :PRECISION-CONTROL :64-BIT) *
I've observed this behavior with at least two versions of SLIME (one from a couple months ago, and downloaded on 04-28-2004 from CVS), and at least two versions of CMUCL (an 11-2003 snapshot and an 04-2004 snapshot). I seem to recall that when I *first* installed the 04-2004 snapshot it worked OK, and only on all subsequent invocations has it failed, but my memory could be faulty on this point.
Any ideas or help would be most appreciated. I definitely need to be able to set the floating-point-mode for what I'm trying to do.
Cheers,
rif
rif rif@MIT.EDU writes:
Please forgive me if this is not the right place to send help requests --- I see it is a devel mailing list, but I could not find a slime-user or slime-help list.
This is the right place.
I am experiencing odd behavior using SLIME with CMUCL. It seems that a call to ext:set-floating-point-modes is failing to set the modes correctly. From within SLIME, I have the following interaction:
I don't understand this stuff, but it does appear to be caused by our using SIGIO. If you use a SERVE-EVENT handler for SLIME instead of SIGIO then it works as expected. To do that, put this in your ~/.swank.lisp:
(setq swank:*communication-style* :fd-handler)
There're some more details/cautions about our request handling styles in the Lisp-side configuration part of the manual, which currently lives at http://www.bluetail.com/~luke/misc/lisp/slime.ps.gz
Cheers, Luke
Luke Gorrie luke@bluetail.com writes:
I am experiencing odd behavior using SLIME with CMUCL. It seems that a call to ext:set-floating-point-modes is failing to set the modes correctly. From within SLIME, I have the following interaction:
I don't understand this stuff, but it does appear to be caused by our using SIGIO.
It seems that CMUCL saves and restores the FPU modes in the signal handler. Apparently it's even possible to cheat:
CL-USER> (progn (ext:set-floating-point-modes :traps nil) (throw 'lisp::top-level-catcher nil)) ; Evaluation aborted CL-USER> (ext:get-floating-point-modes) (:traps nil :rounding-mode :nearest :current-exceptions nil :accrued-exceptions nil :fast-mode nil ...) CL-USER>
Helmut.