[Openmcl-devel] PyInjector and Lisp

Gary Byers gb at clozure.com
Thu Dec 1 23:06:02 PST 2005

On Thu, 1 Dec 2005, Matthew Swank wrote:

> PyInjector: http://end.com/speth/wp-content/pyinjector.html
> "[Embeds] a Python command interpreter and a high-level object browser
> into a running Cocoa application."
> Basically it consists of a window that lists running Cocoa apps and it
> lets you open a REPL (and the FScript object browser) with the NSApp of
> an application available as a global variable.
> How hard would this be to do in openmcl (He asks not knowing too much
> about Cocoa, but a bit about Python and Lisp)?
> Thanks,
> Matt
> -- 
> "You do not really understand something unless you can explain it to
> your grandmother." - Albert Einstein.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

A few years ago, Joerg Garbers contributed an example which provided
some level of FScript/OpenMCL integration.   (People unfamiliar with
FScript can find more information about it at - of all places -

Joerg's example used an early version of the ObjC interface (before
Randall Beers' ObjC bridge).  In that interface, the readtable was
hacked so that expressions between square brackets were treated
as message sends (looking something like ObjC or Smalltalk), and
it was never (AFAIK) updated to use the newer bridge features.
(There's a copy of Joerg's "fscript.lisp" file in the 0.13 CVS tree:

In the current ObjC bridge implementation, it's a little harder than it
needs to be to introduce add-on ObjC code.  Someone tried to do this
a month or so ago - they were tring to access the "AddressBook" framework -
and they ran into a bunch of problems that I wouldn't have anticipated.
There is a "WebKit" example in the 1.0 distribution that's supposed to
show how to do this, but the person accessing AddressBook ran into a
few problems that the WebKit example didn't encounter.  I think that
they eventually succeeded; this sort of thing -should- be easy and
it -is- fairly easy in theory, but there are currently some hoops
that need to be jumped through.  (I have a slow net connection
at the moment, but when I get home I can try to search through
email and try to enumerate those hoops ...)

There's still a file - "ccl;examples;objc-readtable.lisp" - that
enables the old readtable hack.  I'm not sure if Joerg's example
would still work if OBJC-READTABLE was REQUIREd before the example
was, but it might come close to doing so.

More information about the Openmcl-devel mailing list