From: David Bakhash
Subject: output executable from Lisp
Date: 
Message-ID: <cxjyapgzyxe.fsf@engc.bu.edu>
Is there a Lisp implementation that can output an independent
executable, either on UNIX or Windows, so that s/he who runs it
doesn't need Lisp, and such that the executable is reasonably-sized?
I understand the reasons why this would not be easy, but it's worth
asking.  It's something I've been wondering, but no one ever gave me
a solid yes-or-no-p.

dave

From: Tim Bradshaw
Subject: Re: output executable from Lisp
Date: 
Message-ID: <ey367ck508s.fsf@todday.aiai.ed.ac.uk>
* David Bakhash wrote:
> Is there a Lisp implementation that can output an independent
> executable, either on UNIX or Windows, so that s/he who runs it
> doesn't need Lisp, and such that the executable is reasonably-sized?
> I understand the reasons why this would not be easy, but it's worth
> asking.  It's something I've been wondering, but no one ever gave me
> a solid yes-or-no-p.

Define `reasonably sized'.  We have a fairly nontrivial application
that fits on a PC floppy.  I think it's currently 2 files (app &
image) but I think that's not inherent (I don't know the details).
There will be a talk about this app at next week's LUGM, papers
describing it are available (mail me if you want them as, again, I
don't have details just here).  It was done using Franz's old PC CL
system.  It has a GUI for some of its functionality.

--tim
From: Howard R. Stearns
Subject: Re: output executable from Lisp
Date: 
Message-ID: <364B34A4.58B4AF92@elwood.com>
David Bakhash wrote:
> 
> Is there a Lisp implementation that can output an independent
> executable, either on UNIX or Windows, so that s/he who runs it
> doesn't need Lisp, and such that the executable is reasonably-sized?
> I understand the reasons why this would not be easy, but it's worth
> asking.  It's something I've been wondering, but no one ever gave me
> a solid yes-or-no-p.
> 
> dave

Eclipse (http://www.elwood.com/eclipse-info) compiles ANSI CL to ANSI or
K&R C, where the generated code uses normal C naming and function
calling conventions.  The resulting C files can be compiled like any
other C files, but must be linked to a runtime library that provides all
the standard ANSI CL functions and data. (The library can also be used
directly by hand-written C code, too.)

The library is actually split into two libraries -- one for EVAL,
COMPILE-FILE, declarations, macros, etc., and one for everything else. 
If you just use the basic runtime library (no EVAL, etc.), then
applications may be distributed freely WITHOUT additional licenses,
royalties, etc. 

Staticly linked against BOTH libraries, a single executable file
(requiring no other libraries to run except what comes with the
operating system) is typically 3-6 MB.  Staticly linking against just
the basic runtime license can result in files of about 2.5 MB. Note that
the basic runtime library still contains all of CLOS, MOP,
floating-point, complex and bignum arithmetic, streams, the reader and
printer, etc.  We could break this up into still smaller pieces if there
was sufficient demand.

Eclipse is $500 on any of:
  PC/32-bit Windows (95, NT, ...)
  Sparc/Solaris
  PA-RISC/HP-UX
  PC/Linux
This gets you both C-callable libraries and a traditional top-level
read-eval-print loop, and of course, compile-file.
From: Martin Rodgers
Subject: Re: output executable from Lisp
Date: 
Message-ID: <MPG.10b5542bca823814989d1b@news.demon.co.uk>
In article <·················@elwood.com>, ······@elwood.com says...

> Staticly linking against just the basic runtime license can result
> in files of about 2.5 MB.

Can this runtime be dynamically linked, instead of statically? I would 
hope so, but I'm not sure if your reference to static linking is mere 
pedentry (so we know what kind of file you're talking about) or if 
dynamic linking isn't available. Perhaps you could clarify this?

Thanks.
-- 
Remove insect from address to email me | You can never browse enough
     will write code that writes code that writes code for food
From: Howard R. Stearns
Subject: Re: output executable from Lisp
Date: 
Message-ID: <364B672E.33352AA5@elwood.com>
Martin Rodgers wrote:
> 
> In article <·················@elwood.com>, ······@elwood.com says...
> 
> > Staticly linking against just the basic runtime license can result
> > in files of about 2.5 MB.
> 
> Can this runtime be dynamically linked, instead of statically? I would
> hope so, but I'm not sure if your reference to static linking is mere
> pedentry (so we know what kind of file you're talking about) or if
> dynamic linking isn't available. Perhaps you could clarify this?
> 
> Thanks.

On Windows, the Lisp libraries provided with Eclipse itself are in
libXXX.lib format, not xxx.dll.  You can use these to create whatever
other executable and library files you like.

Nothing in Eclipse itself requires static vs. dynamic linking.
From: Martin Rodgers
Subject: Re: output executable from Lisp
Date: 
Message-ID: <MPG.10b5fc0bb3f4a011989d1f@news.demon.co.uk>
In article <·················@elwood.com>, ······@elwood.com says...

> On Windows, the Lisp libraries provided with Eclipse itself are in
> libXXX.lib format, not xxx.dll.  You can use these to create whatever
> other executable and library files you like.

Excellent! That's what I expected you'd say, but I appreciate the 
confirmation. I'm just wary of wishful thinking, esp after being 
"suprised" by various bits of software in the past.

> Nothing in Eclipse itself requires static vs. dynamic linking.
 
Thanks.
-- 
Remove insect from address to email me | You can never browse enough
     will write code that writes code that writes code for food
From: Espen Vestre
Subject: Re: output executable from Lisp
Date: 
Message-ID: <w6d86svdj3.fsf@gromit.nextel.no>
David Bakhash <·····@bu.edu> writes:

> Is there a Lisp implementation that can output an independent
> executable, either on UNIX or Windows, so that s/he who runs it
> doesn't need Lisp, and such that the executable is reasonably-sized?

I just built a standalone server application with ACL5 on Solaris 2.6.  
It consists of 3 files (one tiny executable and two libraries) and 
measures 4,5MB in total, which _I_ consider a very reasonable size
(most PCs could store 1000 copies of it, these days).

--

 (regards
    (espen vestre))
From: Nick Levine
Subject: Re: output executable from Lisp
Date: 
Message-ID: <364C41DF.9784234D@harlequin.co.uk>
David Bakhash wrote:

> Is there a Lisp implementation that can output an independent
> executable, either on UNIX or Windows, so that s/he who runs it
> doesn't need Lisp, and such that the executable is reasonably-sized?
> I understand the reasons why this would not be easy, but it's worth
> asking.  It's something I've been wondering, but no one ever gave me
> a solid yes-or-no-p.
>
> dave

  And another "yes". LispWorks generates applications as standalone
executable files (and, on Windows platforms, as externally callable
DLLs). Typical size for a small to moderate windowing application is
under 5MB. For example the othello program which has just thrashed me
quite soundly (2 games to 1) saves out as a 3.7MB .exe. I don't know if
there's any obvious way to tell that it was written in lisp (beyond
taking the .exe apart with a low-level debugger?).

- nick