[comp.sys.mac.hypercard] XCMDs in LISP?

hector@ai.toronto.edu (02/03/90)

Does anyone know if anything has been written about the possibility (or
impossibility, for that matter) of writing XCMDs and XCFNs in Macintosh Allegro
Common Lisp?  What I am looking for is a guide at roughly the level of the
Pascal and C guides at the back of the Apple Hypertalk book.  Thanks!

Hector Levesque
U. of Toronto

vronay@castor.usc.edu (David Vronay) (02/03/90)

Well, good news and bad news..

The good news is that Allegro supports something called DEFPASCAL,
that will allow you to make your lisp functions look like
PASCAL functions to the toolbox.  This neato feature allows you
to do various outrageous things (like LISP WDEFs, for example.)

However...  There is currently no way (that I know of, at least)
to do any kind of exporting on this code.  That's the bad news.
Thus, there is no (straightforward) way of getting the thing
out of Lisp into HyperCard.

You CAN, however, use one of the many public domain IPC drivers
that exist out there and set up a little EVAL-server.  Just run
HyperCard in one multifinder partition and Lisp in the other.
You can have them talk over the IPC (hypercard passes Lisp something
to EVAL, Lisp passes Hypercard something to DO, etc.).  I've done
this and it works fine (assuming you have enough RAM to actually
have Lisp and Hypercard running simultaneously.)

As a final resort, you can just wait around for new software.
Legend states that System 7.0 will have virtual memory (to get
around the not-enough-ram-for-lisp-and-hc problem), and its own ipc
(to get around the flakey-public-domain-ipc-problem).  This will
all be mute, however, if the nice Allegro folks decide to come out
with a block-compiler.  (don't laugh!  Wouldn't it be nice to
have LISP create MPW-linkable code!)

-ice
=============
reply to: iceman@applelink.apple.com
Disclaimer:  not even I agree with my opinions.
=============