CL-USER> *readtable* #<READTABLE #x5322ECE> CL-USER> (copy-readtable) #<READTABLE #xD70F94E> CL-USER> (setq *readtable* *) #<READTABLE #xD70F94E> CL-USER> *readtable* #<READTABLE #x5322ECE>
Noticed this because cl-interpol enabling function stopped working at some point.
-Alan
Alan Ruttenberg alanralanr@comcast.net writes:
Noticed this because cl-interpol enabling function stopped working at some point.
This might be a threading issue. Each request, each expression typed into the repl, is evaluated in a new thread. But it seems to work in Allegro:
CL-USER> *readtable* #<readtable @ #x2000c902> CL-USER> (copy-readtable) #<readtable @ #x20553ff2> CL-USER> (setq *readtable* *) #<readtable @ #x20553ff2> CL-USER> *readtable* #<readtable @ #x20553ff2> CL-USER>
Does OpenMCL something special with *readtable*?
Yes. Turns out openmcl defines a number of standard bindings that get bound automatically unless overridden. Not sure what the appropriate behavior is otherwise I'd make the change myself, but one way would be to simply have spawn not bind any variables defined by common lisp(currently *readtable* and *package*). Here's how you would do that:
(defimplementation spawn (fn &key name) (ccl:process-run-function (list :name (or name "Anonymous (Swank)") :use-standard-initial-bindings nil :initial-bindings (remove-if (lambda(binding &aux (cl-package (find-package "COMMON-LISP"))) (eq (symbol-package (car binding)) cl-package))
(ccl::standard-initial-bindings))) fn))
What do the other lisps do?
An alternative would be to use the above version of spawn, but only when spawning the threads that run from the repl.
-Alan
On Mar 25, 2004, at 2:03 AM, Helmut Eller wrote:
Alan Ruttenberg alanralanr@comcast.net writes:
Noticed this because cl-interpol enabling function stopped working at some point.
This might be a threading issue. Each request, each expression typed into the repl, is evaluated in a new thread. But it seems to work in Allegro:
CL-USER> *readtable* #<readtable @ #x2000c902> CL-USER> (copy-readtable) #<readtable @ #x20553ff2> CL-USER> (setq *readtable* *) #<readtable @ #x20553ff2> CL-USER> *readtable* #<readtable @ #x20553ff2> CL-USER>
Does OpenMCL something special with *readtable*?