[pro] multiple Lisp images

Scott L. Burson Scott at sympoiesis.com
Wed Apr 27 18:35:24 UTC 2011


One caveat, if you're going to do this kind of thing: be sure to bind
all the variables that control the printer (on the sending end) and
reader (on the receiving end) -- *package*, *print-base*, *read-base*,
etc.

Years ago I was working on a project on the Lisp Machines that
involved creating a package that did not use the lisp: package
(basically, I was implementing another language that had its own names
for things).  I discovered that when I was editing a file in this
package, and tried to access the file server, I would get mysterious
errors deep in the code that implemented the NFILE protocol.  As it
turned out, ZMacs was binding *package* to the package of the file I
was editing, and the NFILE client implementation was reading an sexp
sent by the server without binding *package*, so that occurrences of
"NIL" in that sexp were not being read as lisp:nil ("the chosen nil",
as Bernie Greenberg used to call it).

Discovering that bug left me with a permanent dislike and distrust of
special variables.  I still use them occasionally, but I try to keep
them to a bare minimum.

-- Scott

On Wed, Apr 27, 2011 at 8:07 AM, William Halliburton
<whalliburton at gmail.com> wrote:
>>  How to pass sexps as transparently between the two Lisps as possible?
>
> Can you please elaborate on "transparently"?
> The first thing out of my toolbox when I need to simply get some data
> between lisps is just:
>   (send
>      (print1 payload)
>      other-server)
> using whatever mechanism.
> and then
>   (let ((*print-eval* nil)) (read-from-string payload))
>
>
> _______________________________________________
> pro mailing list
> pro at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/pro
>
>




More information about the pro mailing list