From: Paul French
Subject: Converting LISP?
Date: 
Message-ID: <35B851A3.37824255@reading.sgi.com>
Hello,

Q. Are there any tools available for converting LISP to C++?

My nth sense is that this will probably be best done using the PORT
technique (Print Out ReType)!.

This may also spark a discussion of why!


Thanks,

-- 
Paul French

From: Rainer Joswig
Subject: Re: Converting LISP?
Date: 
Message-ID: <joswig-2407981124480001@pbg3.lavielle.com>
In article <·················@reading.sgi.com>, Paul French
<·····@reading.sgi.com> wrote:

> Hello,
> 
> Q. Are there any tools available for converting LISP to C++?

To C++? Don't know. Sounds difficult.

Some tools are supporting C. Like Eclipse.

> My nth sense is that this will probably be best done using the PORT
> technique (Print Out ReType)!.

Isn't it PORI? Print Out ReImplement?

> This may also spark a discussion of why!

Not really,

Rainer Joswig
From: Howard R. Stearns
Subject: Re: Converting LISP?
Date: 
Message-ID: <35B8D199.9A305725@elwood.com>
(I hope this doesn't get reposted 47 times.  My news manager seems to be
having problems replying to comp.lang.c++...)

Rainer Joswig wrote:
> 
> In article <·················@reading.sgi.com>, Paul French
> <·····@reading.sgi.com> wrote:
> 
> > Hello,
> >
> > Q. Are there any tools available for converting LISP to C++?
> 
> To C++? Don't know. Sounds difficult.
> 
> Some tools are supporting C. Like Eclipse.

Eclipse generates readable, maintianable, lintable C (NOT C++) from ANSI
Common Lisp source.  The code is intended to be compatible with C++ by
using prototypes, gently name-mangling  Lisp identifiers that conflict
with C++ reserved words, and avoiding C++ prohibited parts of ANSI/ISO C
-- but we don't generate C++ classes, etc.  The C code is all
function-driven.
(See http://www.elwood.com/eclipse-info for more information, including
product doc.)

It is my understanding that ILOG Talk could translate some EuLisp/ISLisp
dialect (i.e. not ANSI CL) to C++ (pre ANSI?), but I do not know the
details of the correspondence between Lisp and C++ code, or how readable
the result is.  It is also my understanding that Talk is no longer sold.

If you are going to recode by hand, I understand that there are some C++
libraries of Lisp-like utilities, and some (simple ?) Lisp interpreters
built in C++.  Search for Lily, L++, the Kamin interpreters, ...

> 
> > My nth sense is that this will probably be best done using the PORT
> > technique (Print Out ReType)!.
> 
> Isn't it PORI? Print Out ReImplement?
> 
> > This may also spark a discussion of why!
> 
> Not really,
> 
> Rainer Joswig

Java happens.  Since Java, I am not aware of much interest in porting
Lisp code to C++.  I think that Eclipse would be a good platform for
creating a true ANSI-Lisp->C++ converter and C++ library, and, given
enough money, I think it could be done reasonably quickly.  I think the
main issues would be:
 1. Deciding how to set up Lisp metaobjects to represent the different
C++ class and method semantics, which the compiler could then translate
to idomatic C++.
 2. Recoding certain system library source to use these metaobjects.
 3. (Optional) Recoding your application to use these metaobjects.
The first two of these are similar to what would have to be done for a
Java translator.  

What is is not mentioned above is how to get the compiler to generate
C++ template code.  I have no idea how to do this.

Howard R. Stearns, Eclipse Product Manager, Elwood Corp.
······@elwood.com, 414-764-7500
From: Harley Davis
Subject: Re: Converting LISP?
Date: 
Message-ID: <6pav9l$lv$1@news1-alterdial.uu.net>
Howard Stearns wrote...
>It is my understanding that ILOG Talk could translate some EuLisp/ISLisp
>dialect (i.e. not ANSI CL) to C++ (pre ANSI?), but I do not know the
>details of the correspondence between Lisp and C++ code, or how readable
>the result is.  It is also my understanding that Talk is no longer sold.

Not exactly.  Ilog Talk compiled to fairly natural but not maintainable C
and also included a C++ binder tool, which could parse C and C++ header
files to generate a Talk API to access the original C and C++ libraries -
kind of like an extended FFI with an automatic FFI generator.  It worked
very well, and we published a paper about it in the 1994 ACM LFP conference.

Ilog Talk also included a module system which was able to generate
OS-standard object files, shared libraries, and executables for easier
application delivery and simplified linkage with C and C++ libraries.

Unfortunately, Ilog Talk did not fit well with Ilog's product strategy going
forward - we are primarily in the optimization and visualization library
business rather than the language business - and has since been dropped from
the product line.  A free version for Linux is still available, as Bruno
Haible pointed out a couple days ago.

I still think it's the coolest Lisp system I've ever used, but then I'm
pretty biased.

-- Harley Davis
From: Marc Dzaebel
Subject: Re: Converting LISP?
Date: 
Message-ID: <35BD103F.3D932FF@acco.net>
Paul French wrote:
> 
> Hello,
> 
> Q. Are there any tools available for converting LISP to C++?
> 
> My nth sense is that this will probably be best done using the PORT
> technique (Print Out ReType)!.
> 
> This may also spark a discussion of why!
> 
> Thanks,
> 
> --
> Paul French

There was a company called Chestnut but they died. We had
no fun with their product but it supported full CL.

Yours, Marc Dzaebel