From: Fred
Subject: Java, CLISP interaction
Date: 
Message-ID: <ae095847.0208170050.200425f@posting.google.com>
Hi,

I'm trying to write a Java GUI that can invoke a foreign function,
which is written in CLISP. I'm wondering if there is any way I can do
that. What can I do to send parameters back and forth between the Java
GUI and CLISP program? Do I have to convert the CLISP program to C
program by CLiCC first?? I'm just wondering if there is any easier way
to do so.

Thanks a lot!!!!

From: Marcin Tustin
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <yztbu1ltwgoo.fsf@werewolf.i-did-not-set--mail-host-address--so-shoot-me>
················@yahoo.com (Fred) writes:

> Hi,
> 
> I'm trying to write a Java GUI that can invoke a foreign function,
> which is written in CLISP. I'm wondering if there is any way I can do
> that. What can I do to send parameters back and forth between the Java
> GUI and CLISP program? Do I have to convert the CLISP program to C
> program by CLiCC first?? I'm just wondering if there is any easier way
> to do so.

    There is a way to do this, I believe. I found something on freshmeat
that purports to do just this thing, but I haven't played with it, nor
can I remember what it's called. Just search freshmeat.

-- 
A: No, you !*&(^&!&^ well shouldn't!
Q: Should I top-post?
From: Marc Spitzer
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <slrnalt1v7.2cfa.marc@oscar.eng.cv.net>
In article <················@werewolf.i-did-not-set-
-mail-host-address--so-shoot-me>, Marcin Tustin wrote:
> ················@yahoo.com (Fred) writes:
> 
>> Hi,
>> 
>> I'm trying to write a Java GUI that can invoke a foreign function,
>> which is written in CLISP. I'm wondering if there is any way I can do
>> that. What can I do to send parameters back and forth between the Java
>> GUI and CLISP program? Do I have to convert the CLISP program to C
>> program by CLiCC first?? I'm just wondering if there is any easier way
>> to do so.
> 
>     There is a way to do this, I believe. I found something on freshmeat
> that purports to do just this thing, but I haven't played with it, nor
> can I remember what it's called. Just search freshmeat.
> 

I believe that onshord(IMHO etc) have a rmi encoder/decoder thing.  Also
you could just make the clisp stuff into a server that is started when
the  app starts and talk using a simple socket based protocol.
http://ars.userfriendly.org/cartoons/?id=20020817
marc

> -- 
> A: No, you !*&(^&!&^ well shouldn't!
> Q: Should I top-post?
From: Marcin Tustin
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <yztbofc1wbkf.fsf@werewolf.i-did-not-set--mail-host-address--so-shoot-me>
················@yahoo.com (Fred) writes:

> Hi,
> 
> I'm trying to write a Java GUI that can invoke a foreign function,
> which is written in CLISP. I'm wondering if there is any way I can do
> that. What can I do to send parameters back and forth between the Java
> GUI and CLISP program? Do I have to convert the CLISP program to C
> program by CLiCC first?? I'm just wondering if there is any easier way
> to do so.
> 
> Thanks a lot!!!!

    I believe you may be looking for jacol.

-- 
A: No, you !*&(^&!&^ well shouldn't!
Q: Should I top-post?
From: Neil Cohen
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <3d5ef933$1@giga.realtime.net>
"Fred" <················@yahoo.com> wrote in message
································@posting.google.com...
> Hi,
>
> I'm trying to write a Java GUI that can invoke a foreign function,
> which is written in CLISP. I'm wondering if there is any way I can do
> that. What can I do to send parameters back and forth between the Java
> GUI and CLISP program? Do I have to convert the CLISP program to C
> program by CLiCC first?? I'm just wondering if there is any easier way
> to do so.
>
> Thanks a lot!!!!

  If you find something, let me know.  I've spent a lot of time
unsuccessfully trying to have a Java GUI with a LWW back end.  Dave Bakhash
used the LWW Corba to get it to work on the internet, and mostly work on a
CD version, but something went wrong on about 10% of the computers it was
used on.  Later, I tried making the back end into a DLL, and Java Native
Interface was used to call the DLL.  Again, it was mostly successful, but
took lots of work, and failed on about 10% of the computers it was used on.
Dave thinks writing a simple server is the way to go.



--
Neil Cohen
Bridge Trix
From: Fred
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <ae095847.0208190857.26050265@posting.google.com>
Thanks a lot guys! I'll try out the suggestions!!

Thanks again!
From: Dave Bakhash
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <c29k7mdbvn0.fsf@nerd-xing.mit.edu>
"Neil Cohen" <······@bridgetrix.com> writes:

> > I'm trying to write a Java GUI that can invoke a foreign function,
> > which is written in CLISP.

CLISP has some support for Corba (CLORB), though it's in its very early
stages.  I tried using it, but it was unsuccessful.  The first thing you
have to overcome, unfortunately, is not having an IDL parser.  It's not
so bad re-writing everything in a lispier syntax, but depending on how
much IDL you have, it can be annoying.  Lacking documentation makes it
all the more difficult.

Other than Corba, getting Lisp and Java to interoperate in a
straightforward and platform-independent way suggests Corba.  I suppose
that if the data types being passed back and forth are extremely
primitive, then a simple S-expression syntax might work, where CL waits
for foreign calls, and then runs them, sending back the return values.

> ...used the LWW Corba to get it to work on the internet, and mostly
> work on a CD version, but something went wrong on about 10% of the
> computers it was used on.

It's true...dealing with the idiosyncrasies of certain OSs, browsers,
firewalls, etc. was a pain sometimes.

As far as security goes, there are packages (e.g. SOCKS) that help cope
with such issues.  For example, AOL AIM and Y! IM have support for
SOCKS5, and manage to overcome security issues through proxies.

People behind strict corporate firewalls have trouble doing the most
basic Internet tasks, let alone playing a Java-based bridge game through
a Java-enabled browser.  And people running certain inflexible personal
firewalls had trouble as well.

> Later, I tried making the back end into a DLL, and Java Native
> Interface was used to call the DLL.  Again, it was mostly successful,
> but took lots of work, and failed on about 10% of the computers it was
> used on.  Dave thinks writing a simple server is the way to go.

Corba is pretty standard these days.  In fact, Java RMI and J2EE are all
now built on top of Corba.  JNI, DLLs, etc. are difficult and
non-portable solutions.

dave
From: Eric Marsden
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <wziit1n3tm6.fsf@melbourne.laas.fr>
>>>>> "db" == Dave Bakhash <·····@alum.mit.edu> writes:

  db> CLISP has some support for Corba (CLORB), though it's in its very early
  db> stages.  I tried using it, but it was unsuccessful.  The first thing you
  db> have to overcome, unfortunately, is not having an IDL parser.  It's not
  db> so bad re-writing everything in a lispier syntax, but depending on how
  db> much IDL you have, it can be annoying.

there is also the possibility of using an interface repository: import
all your IDL interfaces into the repository of your choice, then get
CLORB to talk to that. It is possible to have CLORB suck all the
interfaces out of the repository and dump them to a file, so you don't
need the IR running all the time.

  db> Lacking documentation makes it all the more difficult.

yes, and I'm sure that patches are welcome.
  
  db> Other than Corba, getting Lisp and Java to interoperate in a
  db> straightforward and platform-independent way suggests Corba.

I agree; CORBA is a stable and well known technology, which has good
documentation and several high quality implementations (avoid the ORB
builtin to the 1.3 JDK, though).

-- 
Eric Marsden                          <URL:http://www.laas.fr/~emarsden/>
From: Dave Bakhash
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <c29vg5l5wzn.fsf@nerd-xing.mit.edu>
Eric Marsden <········@laas.fr> writes:

> there is also the possibility of using an interface repository: import
> all your IDL interfaces into the repository of your choice, then get
> CLORB to talk to that. It is possible to have CLORB suck all the
> interfaces out of the repository and dump them to a file, so you don't
> need the IR running all the time.

that's good information to know about.  It seems to imply that I can use
another IDL compiler, then somehow load it into a repository.

I'll look into it.  

thanks,
dave
From: Reini Urban
Subject: Re: Java, CLISP interaction
Date: 
Message-ID: <3D6A0443.5050705@x-ray.at>
Neil Cohen schrieb:
> "Fred" <················@yahoo.com> wrote in message
> ································@posting.google.com...
>>I'm trying to write a Java GUI that can invoke a foreign function,
>>which is written in CLISP. I'm wondering if there is any way I can do
>>that. What can I do to send parameters back and forth between the Java
>>GUI and CLISP program? Do I have to convert the CLISP program to C
>>program by CLiCC first?? I'm just wondering if there is any easier way
>>to do so.
> 
>   If you find something, let me know.  I've spent a lot of time
> unsuccessfully trying to have a Java GUI with a LWW back end.  Dave Bakhash
> used the LWW Corba to get it to work on the internet, and mostly work on a
> CD version, but something went wrong on about 10% of the computers it was
> used on.  Later, I tried making the back end into a DLL, and Java Native
> Interface was used to call the DLL.  Again, it was mostly successful, but
> took lots of work, and failed on about 10% of the computers it was used on.
> Dave thinks writing a simple server is the way to go.

With CormanLisp it is easier. But there's no large public test example.
-- 
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/