On Tue, Jul 1, 2008 at 12:21 AM, Blake McBride <blake@...> wrote:
Hi. Sorry for the long delay, but somehow I didn't get to it any earlier.
> Is there any abcl specific documentation? Specifically, what I am
> looking for is documentation for:
Well, most of what I do with it, I derive from (a) the Common Lisp
specification or (b) try to find in the sources. Since I've been
developing on Windows lately, the platfrom hinders progress quite a
bit, but I'm managing.
> 1. How to call abcl from Java
I've read the j and abcl sources to find the answer to your question.
In the app i'm currently writing, this is how I do it (summarized):
Function load = (Function)Symbol.LOAD.getSymbolFunction();
Function compileFile =
LispObject arg = new LispObject;
arg = new
LispObject.funcall(load, arg, LispThread.currentThread());
And then I can retrieve the symbols and packages in parse-number,
which I can then use to call them.
> 2. How to call Java from abcl
Have a look at the java.lisp file in the sources. It contains many of
the interfaces required to call into java. Alternatively, you could
have a look at the ABCL backend for usocket
(common-lisp.net/project/usocket/) which is mainly based on the
lisp->java foreign function interface.
> 3. How to pass and return lisp and Java values and how they are
> represented on each side
Lisp values are simply java objects, meaning that you can simply
access them as such from Java. Accessing Java objects from lisp is
done through the lisp->java FFI.
> 4. What are the .cls files?
They are the compiled code (object files) for the java vm.
> Blake McBride
Hope that helps!