[armedbear-devel] Unix domain sockets for abcl

Mark Evenson evenson at panix.com
Mon Nov 26 13:24:57 UTC 2012

On Nov 25, 2012, at 6:29 PM, Rudolf Schlatte <rudi at constantly.at> wrote:

> Hi,
> I'm having a go at getting clx to run on abcl.  Seems the jvm doesn't support unix domain sockets out-of-the-box and we need a library like junixsocket (http://code.google.com/p/junixsocket/) or juds (https://github.com/mcfunley/juds) to avoid connecting to localhost:6000 over IP where the X server might not be listening depending on how it's configured.  What's the best way to proceed?  (I'm a bit jetlagged or I could maybe answer this one myself..)

These libraries seem to use JNI to access the underlying UNIX
syscalls, so using them will be fairly OS dependent.  And it will
rely on the abstractions of the Java API, so you are probably not
going to end up with very Lisp-py looking i/o routines.  An alternative
might be to use [my patches to CFFI with JNA][1], which would allow
you direct access the same sort of access in Lisp without going
through the Java API.

[1]: http://slack.net/~evenson/abcl/cffi/cffi-abcl-20121029a.patch

If you want to use the libraries you mention, the first step is
getting the necessary jar in the classpath.  To do this, you should
be able to use JAVA:ADD-TO-CLASSPATH to dynamically add the path
at runtime.  ABCL-ASDF provides a mechanism to transcribe the
location of a local jar archive in an ASDF description.

Then, pick a way to write Java code from in ABCL, either by using
the primitives in the JAVA package, or a higher level syntax like
JSS or JFLI from ACBL-CONTRIB.  Find a simple example in Java for
using the library, transcribing it into Lisp.

Let us know how it goes, as I don't think anyone has tried to use
JNI directly from ABCL (as opposed to using JNA).

"A screaming comes across the sky.  It has happened before but there is nothing to compare to it now."

More information about the armedbear-devel mailing list