From: Adam Fleming
Subject: Multi-Language Projects with LISP
Date: 
Message-ID: <34B39843.3F75F26F@aber.ac.uk>
Hi,

	I'm in the middle of producing a feasibility study for a project to be
implemented on a Win95/NT system. There are sections of the project which would
be best implemented in LISP (going off my admittedly meagre LISP experience) but
I have no idea how I'd go about combining these sections with modules written in
other languages such as Delphi or C++. Can anyone point me at some resources
that might give me hint as to how to go about doing this or even if it's
possible. I'm no LISP guru so it'd be really handy if they were written in
little words :) 

Please respond by email if possible.

	Many thanks in advance.


-- 
=====================================================================
Adam Fleming
Yr 4 MEng - Software Engineering (Aberystwyth)
Email: ····@aber.ac.uk
Web: http://www.aber.ac.uk/~ajf4
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Never underestimate the power of human stupidity - R.A.Heinlein
=====================================================================

From: Howard R. Stearns
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <34B40210.63FC@elwood.com>
Russ McManus wrote:
> 
> adam-
> 
> >>>>> "Adam" == Adam Fleming <····@aber.ac.uk> writes:
> 
>     Adam> Hi, I'm in the middle of producing a feasibility study for a
>     Adam> project to be implemented on a Win95/NT system. There are
>     Adam> sections of the project which would be best implemented in
>     Adam> LISP (going off my admittedly meagre LISP experience) but I
>     Adam> have no idea how I'd go about combining these sections with
>     Adam> modules written in other languages such as Delphi or
>     Adam> C++. Can anyone point me at some resources that might give
>     Adam> me hint as to how to go about doing this or even if it's
>     Adam> possible. I'm no LISP guru so it'd be really handy if they
>     Adam> were written in little words :)
> 
> using a lisp implementation that compiles to c may make integration
> easy.
> 
> a commercial common lisp system that compiles to c (i don't know if
> it works on win32):
> 
>     <http://www.elwoodcorp.com/eclipse-info/index.htm>
> 
> a commercial scheme system that works on win32, and compiles to c:
> 
>     <http://www.iro.umontreal.ca/~gambit/>
> 
> i can't give a personal recommendation for either of these products;
> these are just pointers to more information.  scheme and lisp are
> similar in many ways, but have significant differences; check the FAQ
> for more information.
> 

To learn about Lisp in general, see the website of the Association of
Lisp Users (ALU), currently at http://www.elwood.com/alu

One thing you will have to do is to pick a dialect.
When covering dialect-specific information, the ALU web-site
concentrates mostly on Common Lisp, but there are pointers to
information specific to Scheme
(http://www.elwood.com/alu/table/related-languages.htm#scheme).

The site also gives a VERY brief overview about a number of ways to
combine Lisp with other languages in a single application.  See
http://www.elwood.com/alu/table/combine.htm

My company's Eclipse Common Lisp product
(http://www.elwood.com/eclipse-info) is currently being ported to
PC/Linux, with Windows-NT next.

The Lisp implemenations page on the ALU website
(http://www.elwood.com/alu/table/systems.htm) also lists some
non-commercial common-lisp-subset -> C systems.
From: Jason Trenouth
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <34c1c23c.77085187@newshost>
On Wed, 07 Jan 1998 14:59:15 +0000, Adam Fleming <····@aber.ac.uk> wrote:

> Hi,
> 
> 	I'm in the middle of producing a feasibility study for a project to be
> implemented on a Win95/NT system. There are sections of the project which would
> be best implemented in LISP (going off my admittedly meagre LISP experience) but
> I have no idea how I'd go about combining these sections with modules written in
> other languages such as Delphi or C++. Can anyone point me at some resources
> that might give me hint as to how to go about doing this or even if it's
> possible. I'm no LISP guru so it'd be really handy if they were written in
> little words :) 
> 
> Please respond by email if possible.
> 
> 	Many thanks in advance.

If you are able to write some C code that calls the Delphi or C++ code then
most Lisp systems have ways of calling and being called from C. The Lisp<->C
interface is often called the "Foreign Function Interface" (FFI) or "Foreign
Language Interface". Depending on what you want to do, it generally isn't
necessary to use a Lisp that is actually compiled to C itself simply in order
to achieve a usable level of integration.

__Jason
From: Michael Tuchman
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <34b4db26.1776627@news.mindspring.com>
Adam Fleming <····@aber.ac.uk> wrote:

>Hi,
>
>	I'm in the middle of producing a feasibility study for a project to be
>implemented on a Win95/NT system. There are sections of the project which would
>be best implemented in LISP (going off my admittedly meagre LISP experience) but
>I have no idea how I'd go about combining these sections with modules written in
>other languages such as Delphi or C++. Can anyone point me at some resources
>that might give me hint as to how to go about doing this or even if it's
>possible. I'm no LISP guru so it'd be really handy if they were written in
>little words :) 

I just finished such a project where the interprocess communication
was DDE.  Wasn't great, but very usable. If the interactions between
the diferent parts of the product are sporadic, this may work.  

If you have a choice, perhaps I may suggest using LISP as the main hub
and logic and use it to conduct the other modules - the speed critical
ones can be written in C++.  IN other words, make sure LISP is
managing the calls to other languages, rather than the other way
around.

This approach also works, because you might be able to write a
prototype for the application entirely in LISP and perhaps you'll find
that the non-LISP parts might not need to be as numerous as you
thought.

Just my .02, from someone who has been there.




>
>Please respond by email if possible.
>
From: Francis Leboutte
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <34b8f6d3.12437924@news.skynet.be>
The next release of ACL for windows will support Corba (and ACL has a FFI -
Foreign Function Interface). It seems to me that this release has been
promised for February (look at http://www.franz.com/). Don't expect great
performance from Corba.

Francis

--
Francis Leboutte
··········@skynet.be ········@acm.org  http://users.skynet.be/algo
Marre du courrier non sollicit� (spam)? Visitez http://www.cauce.org
From: Samuel James Liddicott
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <884299722.19524.0.nnrp-05.c1ed329a@news.demon.co.uk>
Well I am just trying to compile GCL (GNU Common Lisp) for windows/dos.  It
produces C code too.
It is supposed to work for DOS, but like a lot of GNU development tools -
the dos make-kit doesn't work.

Keep in touch for updates.  A lot of it is compiling, but I could do with
help from someone who knows C, and am a Delphi bod.

Like - in GCC how do I stop it bombing out when it finds undefined functions
at compile time?  Perhaps turn of neccessary prototyping or something - I
always thought C waited till link time before complaining?

Anyway...

Sam


Adam Fleming wrote in message <·················@aber.ac.uk>...
>Hi,
>
> I'm in the middle of producing a feasibility study for a project to be
>implemented on a Win95/NT system. There are sections of the project which
would
>be best implemented in LISP (going off my admittedly meagre LISP
experience) but
>I have no idea how I'd go about combining these sections with modules
written in
>other languages such as Delphi or C++. Can anyone point me at some
resources
>that might give me hint as to how to go about doing this or even if it's
>possible. I'm no LISP guru so it'd be really handy if they were written in
>little words :)
>
>Please respond by email if possible.
>
> Many thanks in advance.
>
>
>--
>=====================================================================
>Adam Fleming
>Yr 4 MEng - Software Engineering (Aberystwyth)
>Email: ····@aber.ac.uk
>Web: http://www.aber.ac.uk/~ajf4
>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>Never underestimate the power of human stupidity - R.A.Heinlein
>=====================================================================
From: George J. Carrette
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <01bd2085$76696600$0f02000a@gjchome.nis.newscorp.com>
Adam Fleming <····@aber.ac.uk> wrote in article
<·················@aber.ac.uk>...
> ...implemented on a Win95/NT system. There are sections of the project
which would
> be best implemented in LISP (going off my admittedly meagre LISP
experience) but...

Some people have been using the WINBATCH and Visual basic languages
with http://people.delphi.com/gjc/winsiod.html
through a couple WINAPI callable functions out of the libsiod.dll

Siod also has a "compiler" that generated windows exe files.
It doesn't actually compile into machine code, it just creates
an executable with the proper structure containing an executable
bootstrap program and a binary format of the lisp source programs.

There is some advantage to that when delivering to a customer, but I
wrote the support for the exe generator because it was convenient
for CGI interface work under web servers.

I've also been fooling around with an Active X interface (OLE SERVER)
and also the Active X scripting interface. 

Now, when SIOD needs to call the operating system layers I always write
a DLL for that. This works out pretty well in any of the usual
environments,
Unix, VMS, WIN32, whatever. Hand-compiling the inner loop of some
algorithm is also typically done. This is a very old style of system
building of course, but it works without the shocking suprises
and product-delivery slippages of more "modern" ways of doing things.

The trick is making very easy to write in C, without imposing a large
learning curve such as you would have in interpreted environments
which are not as elegant.
From: Aleksandar Bakic
Subject: Re: Multi-Language Projects with LISP
Date: 
Message-ID: <34BC4C1A.335B760C@brazil.tcimet.net>
George J. Carrette wrote:
> 
> Adam Fleming <····@aber.ac.uk> wrote in article
> <·················@aber.ac.uk>...
> > ...implemented on a Win95/NT system. There are sections of the project
> which would
> > be best implemented in LISP (going off my admittedly meagre LISP
> experience) but...
> 
> Some people have been using the WINBATCH and Visual basic languages
> with http://people.delphi.com/gjc/winsiod.html
> through a couple WINAPI callable functions out of the libsiod.dll
> 
> Siod also has a "compiler" that generated windows exe files.
> It doesn't actually compile into machine code, it just creates
> an executable with the proper structure containing an executable
> bootstrap program and a binary format of the lisp source programs.
> 
> There is some advantage to that when delivering to a customer, but I
> wrote the support for the exe generator because it was convenient
> for CGI interface work under web servers.
> 
> I've also been fooling around with an Active X interface (OLE SERVER)
> and also the Active X scripting interface.
> 
> Now, when SIOD needs to call the operating system layers I always write
> a DLL for that. This works out pretty well in any of the usual
> environments,
> Unix, VMS, WIN32, whatever. Hand-compiling the inner loop of some
> algorithm is also typically done. This is a very old style of system
> building of course, but it works without the shocking suprises
> and product-delivery slippages of more "modern" ways of doing things.
> 
> The trick is making very easy to write in C, without imposing a large
> learning curve such as you would have in interpreted environments
> which are not as elegant.

I apologize for interrupting... Is it possible to port SIOD to
Windows CE in the near future?

Thanks,
Aleks