From: Jim Fisher
Subject: lisp to "C"
Date: 
Message-ID: <3626E724.F37@primenet.com>
I have a customer who has lisp code (MAC lisp) that he needs to be
converted to "C" code and compiled to run on a PC.  Does anyone know of
a tool/utility to convert lisp to "C"?  I am lisp iliterate, but if I
can get to a reasonably equivalent c code, I should be able to make it
run on an IBM compatible.

Thanks for any help.  I'm going to be out-of-town until tuesday, so
don't give up if I don't answer for a few days.

Jim Fisher

From: Charles Hixson
Subject: Re: lisp to "C"
Date: 
Message-ID: <362779D1.3C468557@earthling.net>
Eclipse Lisp, which runs on a PC, claims to be able to convert lisp to
C.  Be warned:  The C looks like it was written by a program.  It costs
about $500.  You should be able to find it through:
http://www.elwoodcorp.com/alu/

Jim Fisher wrote:
> 
> I have a customer who has lisp code (MAC lisp) that he needs to be
> converted to "C" code and compiled to run on a PC.  Does anyone know of
> a tool/utility to convert lisp to "C"?  I am lisp iliterate, but if I
> can get to a reasonably equivalent c code, I should be able to make it
> run on an IBM compatible.
> 
> Thanks for any help.  I'm going to be out-of-town until tuesday, so
> don't give up if I don't answer for a few days.
> 
> Jim Fisher

-- 
Charles Hixson	·············@earthling.net
(510) 464-7733	or ······@mtc.dst.ca.us
From: Howard R. Stearns
Subject: Re: lisp to "C"
Date: 
Message-ID: <3627CD91.D4DE6301@elwood.com>
Jim Fisher wrote:
> 
> I have a customer who has lisp code (MAC lisp) that he needs to be
> converted to "C" code and compiled to run on a PC.  Does anyone know of
> a tool/utility to convert lisp to "C"?  I am lisp iliterate, but if I
> can get to a reasonably equivalent c code, I should be able to make it
> run on an IBM compatible.
> 
> Thanks for any help.  I'm going to be out-of-town until tuesday, so
> don't give up if I don't answer for a few days.
> 
> Jim Fisher

Depending on how involved the code is, I'm not sure that any modern
Lisp system will handle the code without changes, and I suspect you
may need someone with some Lisp familiarity to modernize it.

The Maclisp dialect is a now obsolete.  As I understand it, its
closest successors are:
  Common Lisp
  XLisp (including deriviatives such as AutoLisp)
  Scheme

(I don't know too much about Maclisp or Xlisp/AutoLisp but...) I
suspect that a knowledgable programmer can write a "Maclisp
compatibility package" in the first two of these.  This would be a set
of macros and such, written in Common Lisp or XLisp/AutoLisp, that
allow Maclisp code to be processed by current Common Lisp, XLisp or
AutoLisp implementations.  At that point, you then only have to worry
about translating the modern dialect to C.  In fact, why do you even
need to translate it to C at all once you have it running in a modern
Lisp implementation?  

(I'm sure Kent and Barmar can comment on what is most likely to work...)

The web site of the Association of Lisp Users (see
http://www.elwood.com/alu) gives some information about these
dialects.  In particular:

 The "Related Languages" page points you to more information on
Scheme, Xlisp and AutoLisp.  I happen to know the AutoLisp FAQ link
can get you to an AutoLisp-to-C product.  The links also give pointers
to Scheme and other Lisp implementations (including some that make use
of C translation internally).

The "Common Lisp Implementations" page points to you to several
implementations of Common Lisp.

    A few of these, such as GCL, ECoLisp and CLiCC work by translating
    the Common Lisp code to C.  They are all free, handle varying
    portions of the full ANSI Common Lisp standard, and produce C code
    with varying degrees of readability.  I beleive that CLiCC is
    intended to produce C code which has the least reliance on the
    full Lisp implementation (i.e., which is easiest to make run as a
    separate executable without being "inside" the top-level Lisp
    program).

    Another of the implementations, Eclipse, made by my company, is a
    commercial product ($500) that supports the full ANSI Common Lisp
    standard. It is designed to make separate, stand-alone executables
    (which are created by linking to a run-time library).  (See
    http://www.elwood.com/eclipse-info for more information.)  Eclipse
    also tightly integrates the resulting code with other C code, so
    that function-calls and data-passing between Lisp and C is
    relatively straightforward.

You may also hear about the "Chestnut Lisp-to-C translator".  This was
a $12,000 commercial Common Lisp to C translator.  Chestnut is no
longer in business, and the rights to the product have been bought by
a major software vendor that, as I understand it, is not making the
software available to others.
From: Kent M Pitman
Subject: Re: lisp to "C"
Date: 
Message-ID: <sfwg1coqdqj.fsf@world.std.com>
"Howard R. Stearns" <······@elwood.com> writes:

> 
> Jim Fisher wrote:
> > 
> > I have a customer who has lisp code (MAC lisp) that he needs to be
> > converted to "C" code
> [...]
> The Maclisp dialect is a now obsolete.

Hmm. I understood Jim to be asking about Macintosh Common Lisp, which
is a modern implementation of CL not to be confused with MACLISP,
which you're right is obsolete.

Maybe he could clarify.
From: Rainer Joswig
Subject: Re: lisp to "C"
Date: 
Message-ID: <joswig-1710980238280001@194.163.195.67>
In article <···············@world.std.com>, Kent M Pitman
<······@world.std.com> wrote:

> "Howard R. Stearns" <······@elwood.com> writes:
> 
> > 
> > Jim Fisher wrote:
> > > 
> > > I have a customer who has lisp code (MAC lisp) that he needs to be
> > > converted to "C" code
> > [...]
> > The Maclisp dialect is a now obsolete.
> 
> Hmm. I understood Jim to be asking about Macintosh Common Lisp, which
> is a modern implementation of CL not to be confused with MACLISP,
> which you're right is obsolete.
> 
> Maybe he could clarify.

Why would he have to reimplement Lisp code in C to make it
running on a PC? There are Lisp systems available for the
PC. LispWorks for Windows for example has royalty free
delivery of Lisp applications and the price is affordable.

-- 
http://www.lavielle.com/~joswig
From: Kent M Pitman
Subject: Re: lisp to "C"
Date: 
Message-ID: <sfwww60t3l7.fsf@world.std.com>
······@lavielle.com (Rainer Joswig) writes:

> In article <···············@world.std.com>, Kent M Pitman
> <······@world.std.com> wrote:
> 
> > "Howard R. Stearns" <······@elwood.com> writes:
> > 
> > > 
> > > Jim Fisher wrote:
> > > > 
> > > > I have a customer who has lisp code (MAC lisp) that he needs to be
> > > > converted to "C" code
> > > [...]
> > > The Maclisp dialect is a now obsolete.
> > 
> > Hmm. I understood Jim to be asking about Macintosh Common Lisp, which
> > is a modern implementation of CL not to be confused with MACLISP,
> > which you're right is obsolete.
> > 
> > Maybe he could clarify.
> 
> Why would he have to reimplement Lisp code in C to make it
> running on a PC? There are Lisp systems available for the
> PC. LispWorks for Windows for example has royalty free
> delivery of Lisp applications and the price is affordable.

He wouldn't.  That's why I wanted him to clarify.

But it is possible that he was confused on this point.
From: Jim Fisher
Subject: Re: lisp to "C"
Date: 
Message-ID: <362D1FEB.5916@primenet.com>
Kent M Pitman wrote:
> 
> ······@lavielle.com (Rainer Joswig) writes:
> 
> > In article <···············@world.std.com>, Kent M Pitman
> > <······@world.std.com> wrote:
> >
> > > "Howard R. Stearns" <······@elwood.com> writes:
> > >
> > > >
> > > > Jim Fisher wrote:
> > > > >
> > > > > I have a customer who has lisp code (MAC lisp) that he needs to be
> > > > > converted to "C" code
> > > > [...]
> > > > The Maclisp dialect is a now obsolete.
> > >
> > > Hmm. I understood Jim to be asking about Macintosh Common Lisp, which
> > > is a modern implementation of CL not to be confused with MACLISP,
> > > which you're right is obsolete.
> > >
> > > Maybe he could clarify.
> >
> > Why would he have to reimplement Lisp code in C to make it
> > running on a PC? There are Lisp systems available for the
> > PC. LispWorks for Windows for example has royalty free
> > delivery of Lisp applications and the price is affordable.
> 
> He wouldn't.  That's why I wanted him to clarify.
> 
> But it is possible that he was confused on this point.


Thanks for all of the help folks...

As I stated in the beginning, I am lisp iliterate... so am not sure what
MAC lisp it is.  The reasons why customer wants it converted to C are:
1) Lisp is runnming slow
2) The folks that are going to maintain and extend the project are not
lisp trained.
3) The other portions of the project that need to be integrated with the
lisp code are written in C.

Anyway, thanks, this gives me some areas to look.

Jim Fisher
From: Rainer Joswig
Subject: Re: lisp to "C"
Date: 
Message-ID: <joswig-2110981239010001@pbg3.lavielle.com>
In article <·············@primenet.com>, Jim Fisher <·······@primenet.com>
wrote:

> As I stated in the beginning, I am lisp iliterate... so am not sure what
> MAC lisp it is. 

You would need to find out. Is it Maclisp (mostly dead,
can be converted to CL) or is it Macintosh Common Lisp?

> The reasons why customer wants it converted to C are:
> 1) Lisp is runnming slow

The Lisp program could made run faster?

> 2) The folks that are going to maintain and extend the project are not
> lisp trained.

O.k.

> 3) The other portions of the project that need to be integrated with the
> lisp code are written in C.

Lisp systems usually can interface to C via a foreign function interface.
Macintosh Common Lisp for example supports loading the
usual shared libraries of the MacOS platform.

-- 
http://www.lavielle.com/~joswig