[armedbear-devel] embedding scripts for languages implemented in Lisp, was: ABCL 0.18.0 released
alessiostalla at gmail.com
Fri Jan 15 08:49:31 UTC 2010
On Fri, Jan 15, 2010 at 5:37 AM, Robert Dodier <robert_dodier at yahoo.com> wrote:
> --- On Wed, 1/13/10, Erik Huelsmann <ehuels at gmail.com> wrote:
>> For integration with existing applications ABCL implements
>> Java Specification Request (JSR) 223: Java scripting API.
> Hi, this is very interesting. I wonder how much work
> it would be to extend the Lisp script engine to languages
> implemented in Lisp. I have in mind Maxima, but there are
> many other languages implemented in Lisp.
> I'm just thinking out loud here -- haven't really thought
> it through.
All the script engine does is simply to READ lisp code from a string
and EVAL that code (interpreted or previously compiled) in an
environment where certain bindings (possibly set by the user on the
Java side) are in place. It shouldn't be hard to decouple the Java
part of the engine - which does things like wrapping Java streams in
Lisp streams, remembering the bindings, and invoking Lisp-side
functions - from the Lisp part, which materially executes the code.
This would allow to reuse the Java part with a different backend, for
example a Maxima one, provided the backend can work within the
limitations imposed by the current implementation (which I can't
pinpoint off the top of my head, but I'm sure they exist). In any
case, a minimal amount of Java plumbing must be written in order to
register the engine in the list of known engines, which then allows
the Java programmer to query for an engine by name or extension of the
source file, rather than instantiate it manually.
I wrote the engine, so I can help in adapting it to Maxima, but I need
to know at least how Maxima reads and evaluates code, and establish
> Thanks very much for all your efforts! You guys are really
> making great progress.
> Robert Dodier
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
More information about the armedbear-devel