From: Joshua Sutterfield
Subject: java frontend for lisp?
Date: 
Message-ID: <3818e7c9@news.cc.umr.edu>
Anyone have any experience/suggestions regarding .. uh running some lisp code via a java interface?  Short of finding 
a lisp interpreter written in java or keeping a dedicated server running?  Just curious there... Gracias

Josh SUtterfield

From: JustinV
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <FS5S3.70$54.3723@news.uswest.net>
You might be interested in checking out
http://www.cs.dartmouth.edu/~cs18/fall98/  The interpreter I implemented is
for a LISP variant called Dylan, and is highly similar to Scheme.  The
sources are yours for the taking and the whole thing is written in Java.

Joshua Sutterfield wrote in message <········@news.cc.umr.edu>...
>
>Anyone have any experience/suggestions regarding .. uh running some lisp
code via a java interface?  Short of finding
>a lisp interpreter written in java or keeping a dedicated server running?
Just curious there... Gracias
>
>Josh SUtterfield
From: David Hanley
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <3819C957.D31D1B4F@ncgr.org>
Hmmm.. Well, there is the CLORB interface now.  The new
java RMI library used iiop for transmission, so you should be
able to call LISP CORBA code.  This may be the easiest
way to integrate lisp and java.  Alternatively, you *might* be
able to use JNI to talk directly to lisp functions if you can
export the lisp to a shared library using C signatures.  If you
lisp supports C calling your lisp code, this should be
possible.

dave
From: Rahul Jain
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <381BE4FA.A8AF5355@owlnet.rice.edu>
David Hanley wrote:

> If you
> lisp supports C calling your lisp code, this should be
> possible.

Which implementations support this?

--
-> -=-=-=-=-=-=-=-=-=- <  Rahul -=- Jain  > -=-=-=-=-=-=-=-=-=- <-
-> "I never could get the hang of Thursdays." -Douglas N. Adams <-
-> -=-=-=-  URL: http://hoohoo.brrsd.k12.nj.us/~rjain/  -=-=-=- <-
-> -=-=-=-=-=-  E-mail:  ·················@usa.net  -=-=-=-=-=- <-
    Version 9.105.999.1111111111111.23.042
    (c)1996-1998, All rights reserved.
    Disclaimer available upon request.
From: Chris Double
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <wk9045ttvn.fsf@double.co.nz>
[Following up on ancient history, sorry, but thought it might be of
interest]

David Hanley <···@ncgr.org> writes:

> Alternatively, you *might* be able to use JNI to talk directly to
> lisp functions if you can export the lisp to a shared library using
> C signatures.  If you lisp supports C calling your lisp code, this
> should be possible.

I've recently successfully gone the other way. I used the JNI
Invocation API from Lisp to create Java classes, call methods, etc
from Lisp. Using this I was able to have my lisp code use a Swing
interface, which called event handlers written in Lisp. The Lisp I
used didn't have a sockets interface so I just used the Java network
classes - called from Lisp. It worked ok. This was on the Windows
platform, Java runtime 1.2.2, and Corman Lisp.

One caveat was that there seems to be many java libraries that call
System.exit() - particularly in Swing when the applications exit. I
had to make sure the Swing code didn't call System.exit() as this
would shut the entire Lisp process down. I prefered to be able to
interace with Java, creating Swing JFrames, etc from the Lisp
listener - It got annoying real quick when closing a JFrame shut the
Lisp process down.

I used the raw JNI API for this, using the Corman Lisp c-ffi functions
to access it. It would be nice to have a set of macros that made
creating and using Java classes more lisp like. 

I can't see why any of the above couldn't be done on any of the other
Lisps with FFI capability.

Chris.
From: Marc Battyani
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <A58DCB7FEB0D75CC.EFAE45990B0CE6A0.1B22B018B85748CC@lp.airnews.net>
Joshua Sutterfield <·····@umr.edu> wrote in message
·············@news.cc.umr.edu...
>
> Anyone have any experience/suggestions regarding .. uh running some lisp
code via a java interface?  Short of finding
> a lisp interpreter written in java or keeping a dedicated server running?
Just curious there... Gracias

Use the sockets interface of your favorite lisp. You can then have a local
or remote interface in Java and do applications in Lisp.
You can even generate the Java interface from Lisp.

Marc Battyani
From: Jim White
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <QzpT3.2692$zd.56305@news1.alsv1.occa.home.com>
Joshua Sutterfield wrote in message <········@news.cc.umr.edu>...
>Anyone have any experience/suggestions regarding .. uh running some
lisp code
>via a java interface?  Short of finding
>a lisp interpreter written in java or keeping a dedicated server
running?

I'm not sure I understand what you mean by saying that you want to run
lisp code but not use a lisp interpreter.

There are a bunch of lisp interpreters and compilers available for Java.

See:
<http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.html#lispandco>

The best is Kawa, a Scheme for the Java VM.  It does dynamic and static
compilation to Java bytecode and can easily be incorporated into any
Java program:

<http://www.gnu.org/software/kawa/>

jim
------------------------------------------------------------
James P. White             Netscape DevEdge Champion for IFC
IFC Exchange  -  Insanely great Java  -  http://www.ifcx.org
From: Bruce Tobin
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <38314A82.BF961C35@columbus.rr.com>
Joshua Sutterfield wrote:
> 
> Anyone have any experience/suggestions regarding .. uh running some lisp code via a java interface? 

Compile the Lisp code to a dll or other shared library (several
implementations allow this; ACL/Win is one, and I think Elwood
Corporation's Lisp-to-C compiler is another) and call it via JNI.  This
will require a C compiler to create the JNI wrapper for the dll.

Does anyone know if you can create a shared library using ACL, CMU, or
Harlequin on *nix?

On Windows you could compile to a COM object (ACL, I think Harlequin,
and Corman Lisp support this) and call it directly from the Microsoft 
JVM.
From: Roos Van Raadshooven L.A. (Leon)
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <roosvanr.942968258@biceps>
Bruce Tobin <······@columbus.rr.com> writes:

>Joshua Sutterfield wrote:
>> 
>> Anyone have any experience/suggestions regarding .. uh running some lisp code via a java interface? 

I use AllegroCL (Franz inc) with ORBLink (Lisp Corba). On the Java side
I use Visibroker (Java Corba) to connect to Lisp. This is a very convenient
way to use Java user interface code together with Lisp server code.
It is even possible to use Java applets this way, but I only managed
to do this using a Java browser plugin (available from Sun, free download) to
get rid of the browser incompatibilities.

Leon.
From: Pedro Gonzalez Arellano
Subject: Re: java frontend for lisp?
Date: 
Message-ID: <38464F37.5F588EAA@iiia.csic.es>
"Roos Van Raadshooven L.A. (Leon)" wrote:

> Bruce Tobin <······@columbus.rr.com> writes:
>
> >Joshua Sutterfield wrote:
> >>
> >> Anyone have any experience/suggestions regarding .. uh running some lisp code via a java interface?
>
> I use AllegroCL (Franz inc) with ORBLink (Lisp Corba). On the Java side
> I use Visibroker (Java Corba) to connect to Lisp. This is a very convenient
> way to use Java user interface code together with Lisp server code.
> It is even possible to use Java applets this way, but I only managed
> to do this using a Java browser plugin (available from Sun, free download) to
> get rid of the browser incompatibilities.
>
> Leon.

Hi,

I am programming a Java applet interface for LISP. The application is divided in 3 parts:

1. The  Java applet
2. The Java server
3. The LISP program(s)

The java applet, where all interface code resides, communicates with the Java server via RMI, which makes
it
quite straight forward to implement. The complicate part of the applet is writing a browser "universal"
interface!

The Java server side forwards the RMI calls to the LISP side using sockets. Besides it controls logins,
logouts,
idle time, configuration concerns, and so on. Using sockets here allows me independence from LISP
implementation
and from the machine which is executing the LISP code.

It's possible to directly evaluate the code read from the socket : (eval (read-socket the-socket)),  if
you send a LISP
evaluable string from the Java side. Therefore, you may have 3 functions with the same name, 1 for the
applet,
1 for the server, and 1 for LISP.

    Pedro