Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

clisp: compile Lisp program to stand alone binary?

1,102 views
Skip to first unread message

David Steuber The Interloper

unread,
Oct 5, 1998, 3:00:00 AM10/5/98
to
Can clisp create a binary executable that can be distributed without
relying on lisp being on the other machine?

cmu doesn't seem to be available for Linux. Am I blind, or is this
true?

While not on topic, should I get GARNET? It is no longer being
maintained by cmu. Never the less, it is still tempting to get it.

--
David Steuber (ver 1.31.1b)
http://www.david-steuber.com
To reply by e-mail, replace trashcan with david.

When the long night comes, return to the end of the beginning.
--- Kosh (???? - 2261 AD) Babylon-5

"Where do you want to go tomorrow?" --- KDE tool tip

Erik Naggum

unread,
Oct 5, 1998, 3:00:00 AM10/5/98
to
* tras...@david-steuber.com (David Steuber "The Interloper")

| Can clisp create a binary executable that can be distributed without
| relying on lisp being on the other machine?

no. (the same is true for all other languages, incidentally. C just
happens to have its run-time system pre-shipped with many systems.)

what is the problem with shipping a file to be loaded into CLISP?

| cmu doesn't seem to be available for Linux. Am I blind, or is this true?

can't say you aren't blind, but CMUCL is available for Linux.

#:Erik

R. Toy

unread,
Oct 5, 1998, 3:00:00 AM10/5/98
to
David Steuber The Interloper wrote:
>
> cmu doesn't seem to be available for Linux. Am I blind, or is this
> true?

Look at www.cons.org/cmucl. You'll find rpms and tar files of a fairly
recent version. If not, I can let you have mine.

>
> While not on topic, should I get GARNET? It is no longer being
> maintained by cmu. Never the less, it is still tempting to get it.
>

Of all of the GUI I've tried (CLUE, CLIO, XIT, Picasso), Garnet was the
only one with usable documentation and examples. I like it, and there
are a few people still interested in it and some fixes have come out
recently.

Ray

--
---------------------------------------------------------------------------
----> Raymond Toy rt...@mindspring.com
http://www.mindspring.com/~rtoy

David N. Welton

unread,
Oct 5, 1998, 3:00:00 AM10/5/98
to
"R. Toy" <rt...@mindspring.com> writes:

> David Steuber The Interloper wrote:
> >
> > cmu doesn't seem to be available for Linux. Am I blind, or is this
> > true?
>
> Look at www.cons.org/cmucl. You'll find rpms and tar files of a fairly
> recent version. If not, I can let you have mine.

.debs are available from the 'unstable' tree of Debian GNU/Linux -
look for it on www.debian.org

Ciao,
--
David Welton http://www.efn.org/~davidw

--Debian GNU/Linux--

David Steuber The Interloper

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
On 05 Oct 1998 10:50:12 +0000, Erik Naggum <er...@naggum.no> claimed or
asked:

% * tras...@david-steuber.com (David Steuber "The Interloper")
% | Can clisp create a binary executable that can be distributed without
% | relying on lisp being on the other machine?
%
% no. (the same is true for all other languages, incidentally. C just
% happens to have its run-time system pre-shipped with many systems.)

In the windows world, C or C++ can be compiled into a single
executable image. There is no need to rely on a C/C++ compiler or run
time environment to run the program.

% what is the problem with shipping a file to be loaded into CLISP?

I don't want to rely on the pre-existance of CLISP (or any other lisp)
on another machine. I also want the code to compile into machine
code, not some byte interpreted code. It is the paradigm I am used
to.

% | cmu doesn't seem to be available for Linux. Am I blind, or is this true?
%
% can't say you aren't blind, but CMUCL is available for Linux.
%
% #:Erik

Steve Gonedes

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to

tras...@david-steuber.com (David Steuber "The Interloper") writes:

< In the windows world, C or C++ can be compiled into a single
< executable image. There is no need to rely on a C/C++ compiler or run
< time environment to run the program.
<
< % what is the problem with shipping a file to be loaded into CLISP?
<
< I don't want to rely on the pre-existance of CLISP (or any other lisp)
< on another machine. I also want the code to compile into machine
< code, not some byte interpreted code. It is the paradigm I am used
< to.

CMUCL and acl for linux compile to machine code. You can get the
sources for cmucl - it's neat to see the register and instruction
handling but it's a real pain to compile (there are many circular
dependencies). I know acl will let you dump a single binary without
the compiler and debugger. I'm not as familiar with cmucl (actually I
don't know much about dumping lisps in general).

Native compilation will usually result in faster applications and you
shouldn't get penalized for abstractions either (this is probably
obvious though).

You can play with the pseudo-register code in acl by setting
COMP::*HACK-COMPILER-OUTPUT* to a list of functions (was just
mentioned on cll not too long ago). It seems pretty realistic to me;
whenever I changed the code things began to break - very much like my
assembly programs (x86 assembly is just too complicated for me).

In acl5.0 you can write your own main function and link it to the lisp
stuff. Dunno if that's easier to use or not - never tried it. It's all
documented in the manual.

Erik Naggum

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
* tras...@david-steuber.com (David Steuber "The Interloper")

| In the windows world, C or C++ can be compiled into a single
| executable image. There is no need to rely on a C/C++ compiler or run
| time environment to run the program.

well, in that case, you can dump a Lisp world into a new image, too.

the image my current client runs on Allegro CL 5.0 has pre-dumped over
300 patches and new functions and advice and such. when the application
is ready to be run directly (it's loaded from a concatenated FASL file
now), it'd be a piece of cake to load it before dumping yet another
image.

| I don't want to rely on the pre-existance of CLISP (or any other lisp)
| on another machine. I also want the code to compile into machine
| code, not some byte interpreted code.

only Emacs Lisp and CLISP of the commonly supported Lisps produce byte
code. all others produce machine code. _that_ should be the least of
your worries, actually.

#:Erik

Rainer Joswig

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
In article <362782a4...@news.newsguy.com>,
tras...@david-steuber.com wrote:

> In the windows world, C or C++ can be compiled into a single
> executable image. There is no need to rely on a C/C++ compiler or run
> time environment to run the program.

Same for Macintosh Common Lisp. Double Click in the application
and it starts...

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

Tim Bradshaw

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
* David Steuber "The Interloper" wrote:

> In the windows world, C or C++ can be compiled into a single
> executable image. There is no need to rely on a C/C++ compiler or run
> time environment to run the program.

Actually I suspect that you usually depend on a fair amount of shared
library code, unless you do whatever the Windows equivalent of linking
statically is. However, you can typically dump lisp images too, and
they then don't rely on anything but themselves and the OS. They tend
to be bigger than the equivalent C, for small programs (this may not
be true on windows -- how large is a typical completely-static binary
for Windows, and is that even well-defined (for instance does Windows
have a reasonably-small `primitive system-call' level like Unix
does)?). However for large programs the zero-point cost imposed by
dumping a Lisp image becomes less significant, both because the
program gets bigger, and because it uses more of the other stuff that
gets dumped in the image.

--tim

Howard R. Stearns

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
David Steuber The Interloper wrote:
>
> On 05 Oct 1998 10:50:12 +0000, Erik Naggum <er...@naggum.no> claimed or
> asked:
>
> % * tras...@david-steuber.com (David Steuber "The Interloper")
> % | Can clisp create a binary executable that can be distributed without
> % | relying on lisp being on the other machine?
> %
> % no. (the same is true for all other languages, incidentally. C just
> % happens to have its run-time system pre-shipped with many systems.)
>
> In the windows world, C or C++ can be compiled into a single
> executable image. There is no need to rely on a C/C++ compiler or run
> time environment to run the program.
>
> % what is the problem with shipping a file to be loaded into CLISP?
>
> I don't want to rely on the pre-existance of CLISP (or any other lisp)
> on another machine. I also want the code to compile into machine
> code, not some byte interpreted code. It is the paradigm I am used
> to.

I think I recall that you originally were asking about free Lisps.
However, Eclipse ($500) does support the classic C paradigm:

1. COMPILE-FILE generates human readable C.
2. Use your favorite C compiler on that, and any handwritten C code you
want.
3. Use your favorite linker to combine this and the Eclipse library to
produce a
stand-alone executable. (Most such executables can then be
distributed
freely, without royalties or other runtime requirements.)

Furthermore, the generated C functions can be called directly by
hand-written C code, and can call C functions directly.

If you are very used to C, it might also be nice to be able to "see
what's going on" in Lisp by looking at the generated C code for some
arbitrary Lisp code.

See http://www.elwood.com/eclipse-info

Peter Van Eynde

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
On 6 Oct 1998 05:48:35 GMT, Steve Gonedes <jgon...@worldnet.att.net> wrote:
>< % what is the problem with shipping a file to be loaded into CLISP?
><
>< I don't want to rely on the pre-existance of CLISP (or any other lisp)
>< on another machine. I also want the code to compile into machine
>< code, not some byte interpreted code. It is the paradigm I am used
>< to.
>
>CMUCL and acl for linux compile to machine code. You can get the
>sources for cmucl - it's neat to see the register and instruction
>handling but it's a real pain to compile (there are many circular
>dependencies). I know acl will let you dump a single binary without
>the compiler and debugger. I'm not as familiar with cmucl (actually I
>don't know much about dumping lisps in general).

It can be done, it's actually a stage in the recompilation: you first
generate a image without compiler (kernel.core) and then you load the
compiler.

You could modify this to only load the stuff you want, but be aware that the
compiler is needed for a lot of things, even for calling CLOS methods...

Actually the best way is to convert clisp into a netscape plug-in and call it
a multimedia extention :-).

Groetjes, Peter

--
It's logic Jim, but not as we know it. pvan...@debian.org, pvan...@inthan.be
Look in keyservers for PGP key.

Johann Hibschman

unread,
Oct 6, 1998, 3:00:00 AM10/6/98
to
tras...@david-steuber.com (David Steuber "The Interloper") writes:

> I still have to boot over to Linux to see if cmucl was included in my
> distribution. The cmu web site mentioned "python" as a new cmu cl
> compiler. I've heard references to it before and thought it was a
> programming language. Is python possibly a synonym for cmu cl?

There are two pythons. One is the name for the CMUCL compiler, which
does all sorts of useful type inference. (So, in a sense, that python
is a synonym for CMUCL.) The other is a programming language, of
comp.lang.python fame. I like both.

> Is cmu cl a better lisp than clisp? I would prefer to stick with just
> one lisp for a while, and I would like it to be the Common Lisp that
> is considered the most suitable for creating X windows applications.

CMU CL will compile to machine code and is (I believe) more ANSI CL
compliant than clisp. So, if you had to pick one, I'd go with CMU CL.
I use clisp for small projects because CMU CL is a little too
resource-intensive for my old, tired laptop.

Sadly, I don't know anything about threading and GUI programming, so I
can't recommend either lisp for that. (I'm a numeric kinda guy...)

--Johann

David Steuber The Interloper

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
On 06 Oct 1998 11:58:15 +0000, Erik Naggum <er...@naggum.no> claimed or
asked:

% only Emacs Lisp and CLISP of the commonly supported Lisps produce byte
% code. all others produce machine code. _that_ should be the least of
% your worries, actually.

Actually, it is fairly low on my list. However, it would be something
of a show stopper for me if Lisp couldn't create stand alone
applications the way C can. It would make it less than general
purpose.

I still have to boot over to Linux to see if cmucl was included in my
distribution. The cmu web site mentioned "python" as a new cmu cl
compiler. I've heard references to it before and thought it was a
programming language. Is python possibly a synonym for cmu cl?

Is cmu cl a better lisp than clisp? I would prefer to stick with just


one lisp for a while, and I would like it to be the Common Lisp that
is considered the most suitable for creating X windows applications.

--

David Steuber The Interloper

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
On Mon, 05 Oct 1998 23:43:51 -0400, "R. Toy" <rt...@mindspring.com>
claimed or asked:

% Of all of the GUI I've tried (CLUE, CLIO, XIT, Picasso), Garnet was the
% only one with usable documentation and examples. I like it, and there
% are a few people still interested in it and some fixes have come out
% recently.

Thanks for the pointer! BTW, have you tried CLIM? I saw that listed
as a GUI library for cmucl which also supported threading.

David Steuber The Interloper

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
On Tue, 06 Oct 1998 10:38:00 -0500, "Howard R. Stearns"
<how...@elwood.com> claimed or asked:

% Furthermore, the generated C functions can be called directly by
% hand-written C code, and can call C functions directly.
%
% If you are very used to C, it might also be nice to be able to "see
% what's going on" in Lisp by looking at the generated C code for some
% arbitrary Lisp code.
%
% See http://www.elwood.com/eclipse-info

I am choosing between free alternatives at this time. However, I did
see a CL to C compiler on the cmu site. I didn't pull it down though.
If it is complete, I will probably go for that. I imagine who ever
wrote it did a better job of it than I could.

Erik Naggum

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
* tras...@david-steuber.com (David Steuber "The Interloper")

| However, it would be something of a show stopper for me if Lisp couldn't
| create stand alone applications the way C can. It would make it less
| than general purpose.

I really don't understand this argument. when you start up a C program,
a _lot_ of stuff happens that it is impossible _not_ to refer to as a
"run-time environment". C programs are not "stand-alone" for any
reasonable meaning of that concept. in fact, _nothing_ is stand-alone,
anymore, except for operating systems and certain embedded systems. the
rest of the interesting applications are interdependent in massive ways.

for all the evil and fraudulent marketing and business practices that
Bill Gates and Microsoft have tried to get away with, the well-deserved
lawsuits against them are annoyingly shallow and even stupid. I hate it
when bad people get off the hook just because their opponents are dumb.
relevant to this case is that their browser _is_ part of their operating
system and vice versa, as is all the rest of the shitware they hoist onto
innocent Intel processors everywhere, but the coupling is no more or less
hard than any other operating system or major application environment.
the problem is that it is not documented, even though it _is_ exported.
IBM was forced to release documentation for their subsystem interconnect
cables as part of their antitrust lawsuits, allowing Amdahl to produce
"plug-compatible" systems and hardware. something like this has to be
done with software, as well, and then we can start to _rely_ on and
exploit the environment instead of being held hostage by it. and perhaps
in 50 years' time, even C programmers will start to understand that they
are _frightfully_ dependent on the services of the operating system and
lots and lots of supporting software elsewhere in the system.

"stand-alone" is a red herring. what do you _really_ want? why is your
outdated understanding of "stand-alone" the only answer to your question,
to the exclusion of every other answer?

if you want an application that can be shipped elsewhere and it needs a
Common Lisp environment, ship the Common Lisp environment. like, duh.
those who object to this are merely ignorant of the fact that they were
willing to install an operating system before your application, too, and
perhaps had to acquire several components from several disparate vendors
to build a complete system. you offer them the _benefit_ of shipping the
environment they need. if you are frightened of the prospect, _you_ will
be the cause of your loss in sales or whatever, not any inherent aspects
of the Common Lisp environment you refused to ship.

(note, however, that commercial distribution of either run-time versions
or development systems may require you to share with their vendor. if
this is what you don't like, try a tax strike first; it's just a futile,
but at least it has a better moral foundation.)

| I still have to boot over to Linux to see if cmucl was included in my
| distribution. The cmu web site mentioned "python" as a new cmu cl
| compiler. I've heard references to it before and thought it was a
| programming language. Is python possibly a synonym for cmu cl?

PYTHON is the name of the compiler in CMU CL. PYTHON is also the name of
a programming language. they are not related _except_ by name.

| Is cmu cl a better lisp than clisp?

yes, most definitely.

| I would prefer to stick with just one lisp for a while, and I would like
| it to be the Common Lisp that is considered the most suitable for
| creating X windows applications.

well, if CLISP has it, you got the source. just compile the relevant
parts in CMU CL, instead, and off you go. (if it doesn't compile, as I
suspect is the case, that's why you shouldn't use CLISP.)

#:Erik

Raymond Toy

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to
>>>>> "David" == David Steuber "The Interloper" <tras...@david-steuber.com> writes:

David> On Mon, 05 Oct 1998 23:43:51 -0400, "R. Toy" <rt...@mindspring.com>
David> claimed or asked:

David> % Of all of the GUI I've tried (CLUE, CLIO, XIT, Picasso), Garnet was the
David> % only one with usable documentation and examples. I like it, and there
David> % are a few people still interested in it and some fixes have come out
David> % recently.

I also want to say that I don't think CLUE or CLIO or XIT or Picasso
are bad---I was just too stupid to figure out how to do something
interesting with the available documentation and examples.

David> Thanks for the pointer! BTW, have you tried CLIM? I saw that listed
David> as a GUI library for cmucl which also supported threading.

I don't think there's any CLIM except the commercial version, so CMUCL
can't run it. :-( CMUCL on Linux and Freebsd supports threading so
all of the Lisp GUIs could to. I believe there are some patches for
Garnet that make it multi-threaded for CMUCL.

Ray

David Steuber The Interloper

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
On 07 Oct 1998 19:02:22 +0000, Erik Naggum <er...@naggum.no> claimed or
asked:

% "stand-alone" is a red herring. what do you _really_ want? why is your
% outdated understanding of "stand-alone" the only answer to your question,
% to the exclusion of every other answer?

What I really want is easy deployment. If the runtime is required, it
should be buried in the executable file so that its presence is
transparent to the end user and to myself. Like you said with C
programs, they rely on OS services. I know I can't get away from
that. What I do want to get away from is shipping some other piece
like a <cough!> VB programmer has to.

I seem to be very unclear on what I mean by "stan-alone". I guess
I've had my head buried in Windblows for so long that run time support
means something different than what I thought. I hope with some
experience with Lisp, my ideas can clean themselves up and I can make
better distinctions between my application, the run time support, and
the OS.

Maybe I just want to choose to distribute my code with or without
source.

Pierre Mai

unread,
Oct 8, 1998, 3:00:00 AM10/8/98
to
tras...@david-steuber.com (David Steuber "The Interloper") writes:

> What I really want is easy deployment. If the runtime is required, it
> should be buried in the executable file so that its presence is
> transparent to the end user and to myself. Like you said with C
> programs, they rely on OS services. I know I can't get away from
> that. What I do want to get away from is shipping some other piece
> like a <cough!> VB programmer has to.

You will have to ship more files than your executable anyways (=>
Documentation, sample files, ...)! And IIRC with CMU CL the only
thing that is needed besides your dumped image is the driver (around
80KB), and a little script like this:

#!/bin/sh
exec ./lisp -core NewESIM.core

With around 800KB of compiled code, I get a dumped image around 20MB
of size, which can be gzipped (-9) to around 7MB, which makes a little
over 7MB in total in 3 files for deployment as a .tar.gz or .zip file,
and nothing has to be installed in a "system" directory, or can create
conflicts with existing runtime libraries, like VB or Java-apps often
do...

To deploy a Java application, you need to deploy the JDK, which is
more than 15MB in size, and if it uses Swing (which seems to be
getting common these days), you need another 15MB. Of course, most
distributors of Java Apps leave it to the user to get and install
these themselves... :-( (Sorry, but the whole world _doesn't_ have, or
even want Java, and as a user I don't want to know what runtime the
application uses, either).

> Maybe I just want to choose to distribute my code with or without
> source.

This issues is wholly unrelated to the run-time issue. Since every
current CL implementation I know of has a (non NOP) compiler, you can
just distribute the compiled files, and no source leaves your system.
And with a native-code compiler like CMU CL's, decompiling these files
to reverse-engineer the source code seems highly unlikely.

Regs, Pierre.

--
Pierre Mai <de...@cs.tu-berlin.de> http://home.pages.de/~trillian/
"Such is life." -- Fiona in "Four Weddings and a Funeral" (UK/1994)

David Steuber The Interloper

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to
On 08 Oct 1998 14:03:57 +0200, Pierre Mai <pm...@acm.org> claimed or
asked:

% With around 800KB of compiled code, I get a dumped image around 20MB
% of size, which can be gzipped (-9) to around 7MB, which makes a little
% over 7MB in total in 3 files for deployment as a .tar.gz or .zip file,
% and nothing has to be installed in a "system" directory, or can create
% conflicts with existing runtime libraries, like VB or Java-apps often
% do...

A single .tar.gz file is certainly a satisfactory distribution method.

Why don't I think about these things a little more? Oh yeah. I've
had my head up windblows for too long. Where's Install Shield?

Imagine installing a web browser and not having to reboot the system
for it to work. Imagine? Why would you have to reboot? Installing
the web browser upgraded all your system files? Why did it do that?
Why should that require a reboot?

Marco Antoniotti

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to

CMUCL (at least in the old 17f version) had also a byte compiler,
whose main concern was to produce smaller object code.
--
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - (0)6 - 68 10 03 16, fax. +39 - (0)6 - 68 80 79 26
http://www.parades.rm.cnr.it

Raymond Toy

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to
>>>>> "Marco" == Marco Antoniotti <mar...@galvani.parades.rm.cnr.it> writes:

Marco> CMUCL (at least in the old 17f version) had also a byte compiler,

It still does. But the native code compiler is much better maintained
and probably less buggy.

Ray


Mike McDonald

unread,
Oct 9, 1998, 3:00:00 AM10/9/98
to
In article <lwk929a...@galvani.parades.rm.cnr.it>,

Marco Antoniotti <mar...@galvani.parades.rm.cnr.it> writes:
>
> CMUCL (at least in the old 17f version) had also a byte compiler,
> whose main concern was to produce smaller object code.

It still has it.

Mike McDonald
mik...@mikemac.com

David Steuber The Interloper

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to
On 11 Oct 1998 16:27:32 -0400, Sam Steingold <s...@goems.com> claimed
or asked:

% That having said, I use both - CLISP for most of the development, CMUCL
% for actually running FPU-intesive stuff (CMUCL is about 8x faster than
% CLISP in that, while CLISP is about 4x faster with bignums and about
% 2-10x faster with i/o).

Look, I've already made up my mind to use CMUCL. Why do have to come
along and confuse me with some facts? How did you do the
benchmarking? Is there some standard Lisp benchmark program that can
be run?

Having said that, I think FPU will be pretty important to me.

CMUCL is apparently written entirely in Lisp. I don't know if CLISP
is as well. If there are still missing ANSI features in CMUCL, can't
they be dropped in from CLISP code? There is a group of people
maintaining CMUCL at www.cons.org. They are moving in the direction
of ANSI compliance from what I can see.

--
David Steuber (ver 1.31.2a)


http://www.david-steuber.com
To reply by e-mail, replace trashcan with david.

So I have this chicken, see? And it hatched from this egg, see? But
the egg wasn't laid by a chicken. It was cross-laid by a turkey.

Pierre Mai

unread,
Oct 12, 1998, 3:00:00 AM10/12/98
to
tras...@david-steuber.com (David Steuber "The Interloper") writes:

> CMUCL is apparently written entirely in Lisp. I don't know if CLISP
> is as well. If there are still missing ANSI features in CMUCL, can't
> they be dropped in from CLISP code? There is a group of people
> maintaining CMUCL at www.cons.org. They are moving in the direction
> of ANSI compliance from what I can see.

Contrary to what Sam has stated, CLISP is IMHO more removed from ANSI
compliant behaviour in a number of cases than CMUCL is, and in some of
these cases the primary author of CLISP has publicly stated that he
prefers the behaviour of CLISP as is over the ANSI-mandated behaviour
and thus will not change CLISP to make it conformant.

CMUCL OTOH is constantly being made more ANSI-compliant in those
regions where it is needed.

Just noticed that CLISP still starts up in a package named USER which
is different from CL-USER (i.e. COMMON-LISP-USER), which IMHO is not
ANSI-compliant, and confused me for a couple of secs ;)

WRT the comments that CLISP is faster on I/O and bignums: For most
programs neither bignums nor I/O is the bottle-neck (for your program
too, I'd imagine), but CMUCL is faster in a number of other regions,
and it's numeric optimiziation and type-inference mechanisms probably
will prove very important.

I just checked, and the following procedure takes around 4.3 secs on
CLISP and CMUCL for a 50000 line file (size ca. 2.5 MB), so CLISP
isn't any faster for read-line I/O:

(defun testme2 (name)
(with-open-file (stream name)
(loop for line = (read-line stream nil nil) while line)))

And if I also split the read lines into fields I get times of less
than 10 secs for CMUCL, but I need > 60 secs in CLISP...

Just some datapoints. But you should probably just take a look at
CLISP yourself...

gunter.ko...@gmail.com

unread,
Oct 27, 2017, 1:53:22 AM10/27/17
to
Sbcl can create a statically-linked version of its runtime and append the lisp image of a program creating a single file that can be opened by double-clicking on it. Currently I am trying to use this to make a version of Maxima that doesn't require the exact version of the lisp it was compiled with to be installed on the Linux box it is installed on.

Sam Steingold

unread,
Oct 27, 2017, 10:07:15 AM10/27/17
to
> * <thagre.xb...@tznvy.pbz> [2017-10-26 22:53:19 -0700]:
>
> Sbcl can create a statically-linked version of its runtime and append
> the lisp image of a program creating a single file that can be opened
> by double-clicking on it.

TBH, I don't quite understand the question.
Are you talking about clisp (in your subject) or sbcl?
You might find https://clisp.sourceforge.io/impnotes/image.html
and https://stackoverflow.com/q/25046/850781 valuable.

> Currently I am trying to use this to make a version of Maxima that
> doesn't require the exact version of the lisp it was compiled with to
> be installed on the Linux box it is installed on.

Again, it depends on what CL implementation you are using.
If you are talking about CLISP, you might find
https://clisp.sourceforge.io/impnotes/quickstart.html useful.

Could you please clarify what you are asking?

--
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net http://www.memritv.org
http://americancensorship.org https://jihadwatch.org http://memri.org
"Syntactic sugar causes cancer of the semicolon." -Alan Perlis

Robert Munyer

unread,
Oct 28, 2017, 6:29:58 PM10/28/17
to
Sam wrote:

> TBH, I don't quite understand the question.
> Are you talking about clisp (in your subject) or sbcl?

Sam, he isn't asking a question, he's trying to answer one:
a question that was asked over 19 years ago!

Gunter, this is why you're supposed to prepend some context
in your article body, and "Re: " in your "Subject:" header.

--
-- Robert Munyer code below generates e-mail address

(format nil "~(~{~a~^ ~}~)" (reverse `(com dot munyer at ,(* 175811 53922))))

Paul Rubin

unread,
Oct 28, 2017, 7:24:19 PM10/28/17
to
A while back there was a proposal here in cll for a Lisp writing style
that got rid of most of the parentheses in program text, maybe by
relying on indentation to convey some structure info. Unlike a lot of
those proposals which failed, this one was well received, seemed to make
sense, and was introduced by an actual Lisper (I've forgotten who).
I've made some effort to search for that thread but don't find it.

Anyone remember more about this? Thanks.

Paul

Rob Warnock

unread,
Oct 29, 2017, 2:55:39 AM10/29/17
to
Paul Rubin <no.e...@nospam.invalid> wrote:
+---------------
+---------------

Between one & two decades ago I often wrote about two styles I've used,
"P'Lite Scheme" [infix grammar, TCL-ish with a touch of ML flavor] and
"OPFR" [Outer-Parentheses-Free REPL, pure CL except you don't type the
outermost parens at the top level].

This brief post provides a bit more rationale and plus short examples
of both P'Lite & OPFR:

https://www.xach.com/rpw3/articles/aYKdnbVKUYDSis7Y...@speakeasy.net.html
Subject: Re: Lisp and Scheme with fewer parentheses
From: rp...@rpw3.org (Rob Warnock)
Date: Thu, 09 Nov 2006 05:55:59 -0600
Newsgroups: comp.lang.lisp,comp.lang.scheme
Message-ID: <aYKdnbVKUYDSis7Y...@speakeasy.net>

If this interests you, I can say more...


-Rob

p.s. OPFR was released in 2009 ["ISC/OpenBSD"-style license,
like "MIT", but shorter], see:

https://www.xach.com/rpw3/articles/jPudnXzHkK7r_y7U...@speakeasy.net.html
Subject: OPFR ("Outer-Parenthesis-Free REPL") released
From: rp...@rpw3.org (Rob Warnock)
Date: Sun, 08 Mar 2009 00:15:18 -0600
Newsgroups: comp.lang.lisp
Message-ID: <jPudnXzHkK7r_y7U...@speakeasy.net>

-----
Rob Warnock <rp...@rpw3.org>
627 26th Avenue <http://rpw3.org/>
San Mateo, CA 94403

Lars Brinkhoff

unread,
Oct 29, 2017, 3:01:02 AM10/29/17
to
Paul Rubin wrote:
> A while back there was a proposal here in cll for a Lisp writing style
> that got rid of most of the parentheses in program text, maybe by
> relying on indentation to convey some structure info.

Was it this one?

http://readable.sourceforge.net/

Marco Antoniotti

unread,
Oct 29, 2017, 1:34:07 PM10/29/17
to
This would make the code vulnerable to the irsabol attack.

$ sudo irsabol /

Cheers
--
MA

Kaz Kylheku

unread,
Oct 29, 2017, 1:55:48 PM10/29/17
to
On 2017-10-28, Paul Rubin <no.e...@nospam.invalid> wrote:
> A while back there was a proposal here in cll for a Lisp writing style
> that got rid of most of the parentheses in program text, maybe by
> relying on indentation to convey some structure info. Unlike a lot of
> those proposals which failed, this one was well received, seemed to make
> sense, and was introduced by an actual Lisper (I've forgotten who).
> I've made some effort to search for that thread but don't find it.

Scheme has a SRFI for this: SRFI 49.

This is also called "I-Expressions":

https://en.wikipedia.org/wiki/M-expression#I-expressions

Madhu

unread,
Oct 29, 2017, 11:22:41 PM10/29/17
to

* Marco Antoniotti <ot53ea$101j$1...@gioia.aioe.org> :
Wrote on Sun, 29 Oct 2017 13:34:04 -0400:

> On 2017-10-29 07:00:58 +0000, Lars Brinkhoff said:
>
>> Paul Rubin wrote:
>>> A while back there was a proposal here in cll for a Lisp writing style
>>> that got rid of most of the parentheses in program text, maybe by
>>> relying on indentation to convey some structure info.
>>
>> Was it this one?
>>
>> http://readable.sourceforge.net/

That is the only one I remember, David Wheeler's proposal, though I'm
not sure if it was well received. I had the impression only Rob
Warnock's OPFR was well received (by the "bigot" lispers)..

> This would make the code vulnerable to the irsabol attack.
>
> $ sudo irsabol /

This teasing has to end. What is irsabol? I'm guessing it is some
racist anti-whitespace script of yours that does a find -exec rm \{} ,
which deletes source code which it finds offensive

Kaz Kylheku

unread,
Oct 30, 2017, 1:57:53 AM10/30/17
to
LMG: in-place remove spaces at beginning of line? :)

Paul Rubin

unread,
Oct 30, 2017, 2:23:20 AM10/30/17
to
rp...@rpw3.org (Rob Warnock) writes:
> This brief post provides a bit more rationale and plus short examples
> of both P'Lite & OPFR:

Thanks to all who answered! I believe I was remembering Readable, but
P'Lite and OPFR also look interesting.

Marco Antoniotti

unread,
Oct 31, 2017, 4:47:35 PM10/31/17
to
:)

Or: insert random spaces at beginning of line :)

Cheers
--
MA



0 new messages