[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Why should I use CLISP?

Eduardo Costa

6/7/2015 12:01:00 AM

I noticed that a lot of people use CLISP. I would like to know what I am missing. In general, people who use don't program, and use computers only to run applications written by third parties, prefer sbcl, because it is fast and easy to install. However this may not be the whole story. Here are the points in favor of sbcl:

1 -- It is easy and fast to install sbcl. One just download the appropriate binary from www.sbcl.org, unpack it (this step is not necessary in MacIntosh), click on the installation file, give the permission, and a few seconds latter you are ready to run your grammar checker or whatever. I tried to install CLISP in my MacIntosh using brew, and failed miserably.

2 -- sbcl is much faster than CLISP. For instance, CLISP took several minutes to check this article with a RASP based grammar, while sbcl produced the answer in seconds.

Tell me if I am wrong. sbcl is much larger than the CLISP. Therefore sbcl is too slow for Internet applications. The server takes a long time to load 70 megabytes, which is the size of sbcl+rucksack+ppcre. CLISP has only 4.5 megabytes. I assume that a smaller runtime is good for writing web scripts.

14 Answers

Pascal J. Bourguignon

6/7/2015 12:37:00 AM

0

Eduardo Costa <edu500ac@gmail.com> writes:

> I noticed that a lot of people use CLISP. I would like to know what I
> am missing. In general, people who use don't program, and use
> computers only to run applications written by third parties, prefer
> sbcl, because it is fast and easy to install. However this may not be
> the whole story. Here are the points in favor of sbcl:
>
> 1 -- It is easy and fast to install sbcl. One just download the
> appropriate binary from www.sbcl.org, unpack it (this step is not
> necessary in MacIntosh), click on the installation file, give the
> permission, and a few seconds latter you are ready to run your grammar
> checker or whatever. I tried to install CLISP in my MacIntosh using
> brew, and failed miserably.
>
> 2 -- sbcl is much faster than CLISP. For instance, CLISP took several
> minutes to check this article with a RASP based grammar, while sbcl
> produced the answer in seconds.
>
> Tell me if I am wrong. sbcl is much larger than the CLISP. Therefore
> sbcl is too slow for Internet applications. The server takes a long
> time to load 70 megabytes, which is the size of
> sbcl+rucksack+ppcre. CLISP has only 4.5 megabytes. I assume that a
> smaller runtime is good for writing web scripts.

But if you write web applications, instead of web cgi scripts, then the
overhead of sbcl should not be a problem and its speed an advantage.


If you're not concerned by speed or space, then it's over implementation
specific features that you will make the decision.

For example, clisp has SCREEN and KEYWORD packages that allows to write
terminal applications with a much simplier API than ncurses.

clisp has a very good support for unicode in particular, and most other
encoding in general, with its encoding objects used for
external-formats.

In clisp you can define your own hash-table test functions.

In clisp, long-floats have more precision than double-float, and you can
dynamically change the precision of long-floats, if you need more!

With clisp, you can save an image without killing the lisp process.
This allows you to write snapshots. For example, you can write a server
that keeps all it database inside the image; when updates arrives, you
write them to a log file, and from time to time, you save the image as
an updated snapshot of the database. When you reboot, you just use the
last saved snapshot, and replay the last log file.

clisp is internationalized, eg. you can get the error messages in any
language amongst (ENGLISH DEUTSCH FRANÃ?AIS ESPAÃ?OL NEDERLANDS РУССÐ?Ð?Ð?
DANSK).

clisp has a simple socket API that lets you write very easily client and
servers.

In addition to the best FFI (highest level), clisp let you use libraries
as "modules" that are linked and dynamically loaded into the runtime.

But nowadays, one would rather choose to use a generic dynamic library
with CFFI. However modules give the C code access to some clisp internals.
There's a collection of existing modules, including TWO X11 interfaces
(clx and new-clx).

While developping, clisp also has the advantage of having an
interpreter, so you don't lose time compiling your lisp sources, and the
debugger on interpreted code is very nice, allowing easy reading and
writing the lexical variables. cf. for a example
http://cliki.net/TutorialCli...
sbcl is so lame in this respect, that it motivated the creation of slime
and sldb!

Now of course, if you use slime, and the portability libraries (as you
should), you level up the differences between implementations and can't
benefit from the advantage of one or the other, and the only criteria
remaining is the speed (compilation and run-time) and space used.

And of course, for unix scripts, clisp has the advantage of being small
and fast to load, so you can write easily lightweight scripts with
clisp. Since 1990, I write all my scripts with clisp.


And finally, clisp existing long before sbcl, and ran on a wider range
of systems than sbcl, before sbcl caught up and the choice of systems
reduced dramatically. So there's an historical aspect to it too.


--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

Eduardo Costa

6/7/2015 4:01:00 AM

0

On Saturday, June 6, 2015 at 9:37:13 PM UTC-3, informatimago wrote:
> Eduardo Costa <edu500ac@gmail.com> writes:
>
> > I noticed that a lot of people use CLISP. I would like to know what I
> > am missing. In general, people who use don't program, and use
> > computers only to run applications written by third parties, prefer
> > sbcl, because it is fast and easy to install. However this may not be
> > the whole story. Here are the points in favor of sbcl:
> >
> > 1 -- It is easy and fast to install sbcl. One just download the
> > appropriate binary from www.sbcl.org, unpack it (this step is not
> > necessary in MacIntosh), click on the installation file, give the
> > permission, and a few seconds latter you are ready to run your grammar
> > checker or whatever. I tried to install CLISP in my MacIntosh using
> > brew, and failed miserably.
> >
> > 2 -- sbcl is much faster than CLISP. For instance, CLISP took several
> > minutes to check this article with a RASP based grammar, while sbcl
> > produced the answer in seconds.
> >
> > Tell me if I am wrong. sbcl is much larger than the CLISP. Therefore
> > sbcl is too slow for Internet applications. The server takes a long
> > time to load 70 megabytes, which is the size of
> > sbcl+rucksack+ppcre. CLISP has only 4.5 megabytes. I assume that a
> > smaller runtime is good for writing web scripts.
>
> But if you write web applications, instead of web cgi scripts, then the
> overhead of sbcl should not be a problem and its speed an advantage.
>
>
> If you're not concerned by speed or space, then it's over implementation
> specific features that you will make the decision.
>
> For example, clisp has SCREEN and KEYWORD packages that allows to write
> terminal applications with a much simplier API than ncurses.
>
> clisp has a very good support for unicode in particular, and most other
> encoding in general, with its encoding objects used for
> external-formats.
>
> In clisp you can define your own hash-table test functions.
>
> In clisp, long-floats have more precision than double-float, and you can
> dynamically change the precision of long-floats, if you need more!
>
> With clisp, you can save an image without killing the lisp process.
> This allows you to write snapshots. For example, you can write a server
> that keeps all it database inside the image; when updates arrives, you
> write them to a log file, and from time to time, you save the image as
> an updated snapshot of the database. When you reboot, you just use the
> last saved snapshot, and replay the last log file.
>
> clisp is internationalized, eg. you can get the error messages in any
> language amongst (ENGLISH DEUTSCH FRANÇAIS ESPAÑOL NEDERLANDS ???????
> DANSK).
>
> clisp has a simple socket API that lets you write very easily client and
> servers.
>
> In addition to the best FFI (highest level), clisp let you use libraries
> as "modules" that are linked and dynamically loaded into the runtime.
>
> But nowadays, one would rather choose to use a generic dynamic library
> with CFFI. However modules give the C code access to some clisp internals.
> There's a collection of existing modules, including TWO X11 interfaces
> (clx and new-clx).
>
> While developping, clisp also has the advantage of having an
> interpreter, so you don't lose time compiling your lisp sources, and the
> debugger on interpreted code is very nice, allowing easy reading and
> writing the lexical variables. cf. for a example
> http://cliki.net/TutorialCli...
> sbcl is so lame in this respect, that it motivated the creation of slime
> and sldb!
>
> Now of course, if you use slime, and the portability libraries (as you
> should), you level up the differences between implementations and can't
> benefit from the advantage of one or the other, and the only criteria
> remaining is the speed (compilation and run-time) and space used.
>
> And of course, for unix scripts, clisp has the advantage of being small
> and fast to load, so you can write easily lightweight scripts with
> clisp. Since 1990, I write all my scripts with clisp.
>
>
> And finally, clisp existing long before sbcl, and ran on a wider range
> of systems than sbcl, before sbcl caught up and the choice of systems
> reduced dramatically. So there's an historical aspect to it too.
>
>
> --
> __Pascal Bourguignon__ http://www.informat...
> “The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment.” -- Carl Bass CEO Autodesk

Thank you for your answer. I filtered the following pieces of information from it:

1 - Yes, I am right. The large runtime of sbcl can be a handicap in cgi applications. As you told, clisp has the advantage of being small and fast to load, so you can write easily lightweight scripts with clisp.

2 - CLISP has SCREEN and KEYWORD packages that allows to write terminal applications with a much simplier API than ncurses. In fact, I wrote a small text editor for Lisp using ncurses. It is quite small and very simple. In any case, it is great to know that CLISP makes such a task even simpler.

Now, I would like to point out that CLISP is not easy to install. There is no simple installer for Linux or OS-X. CLISP for brew is broken and for ports takes almost one hour to install. Another thing that worries me about CLISP is that the packages are very old. For instance, the only binaries I found for CENT OS 64 bits is from 2007, eight years ago. Do you think I am looking at the wrong places?

Pascal J. Bourguignon

6/7/2015 4:19:00 AM

0

Eduardo Costa <edu500ac@gmail.com> writes:

> Now, I would like to point out that CLISP is not easy to
> install. There is no simple installer for Linux or OS-X. CLISP for
> brew is broken and for ports takes almost one hour to install.
> Another thing that worries me about CLISP is that the packages are
> very old. For instance, the only binaries I found for CENT OS 64 bits
> is from 2007, eight years ago. Do you think I am looking at the wrong
> places?

Current version is 2.49+

Also, I forgot to mention that clisp had open about 70 open issues,
while sbcl has more like 700 open issues.


--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

Eduardo Costa

6/7/2015 6:14:00 AM

0

On Sunday, June 7, 2015 at 1:18:37 AM UTC-3, informatimago wrote:
> Eduardo Costa <edu500ac@gmail.com> writes:
>
> > Now, I would like to point out that CLISP is not easy to
> > install. There is no simple installer for Linux or OS-X. CLISP for
> > brew is broken and for ports takes almost one hour to install.
> > Another thing that worries me about CLISP is that the packages are
> > very old. For instance, the only binaries I found for CENT OS 64 bits
> > is from 2007, eight years ago. Do you think I am looking at the wrong
> > places?
>
> Current version is 2.49+
>
> Also, I forgot to mention that clisp had open about 70 open issues,
> while sbcl has more like 700 open issues.
>
>
> --
> __Pascal Bourguignon__ http://www.informat...
> "The factory of the future will have only two employees, a man and a
> dog. The man will be there to feed the dog. The dog will be there to
> keep the man from touching the equipment." -- Carl Bass CEO Autodesk

I tried to install clisp, but failed. It seems that it is much harder to install than sbcl. For instance, I tried a package for Cent OS, and got the following error message:

[~]# rpm -i clisp-2.42-1.el5.rf.x86_64.rpm
warning: clisp-2.42-1.el5.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
error: Failed dependencies:
libsigsegv.so.0()(64bit) is needed by clisp-2.42-1.el5.rf.x86_64
strue028@medicina.tips [~]#

Then I got the said signature, and installed it.

[~]# rm -i libsigsegv-2.2-1.1.el3.rf.x86_64.rpm

But clisp refused to work. I compiled it from sources, but when I tried to run the result, I got a somewhat mysterious error. Well, I guess clisp is not for the faint of heart.

William James

6/7/2015 10:32:00 AM

0

Eduardo Costa wrote:

> > Eduardo Costa <edu500ac@gmail.com> writes:
> >
> > > Now, I would like to point out that CLISP is not easy to
> > > install. There is no simple installer for Linux or OS-X. CLISP for
> > > brew is broken and for ports takes almost one hour to install.
> > > Another thing that worries me about CLISP is that the packages are
> > > very old. For instance, the only binaries I found for CENT OS 64 bits
> > > is from 2007, eight years ago. Do you think I am looking at the wrong
> > > places?
> >
> > Current version is 2.49+
> >
> > Also, I forgot to mention that clisp had open about 70 open issues,
> > while sbcl has more like 700 open issues.
.....
> I tried to install clisp, but failed. It seems that it is
> much harder to install than sbcl. For instance, I tried a
> package for Cent OS, and got the following error message:
>
> [~]# rpm -i clisp-2.42-1.el5.rf.x86_64.rpm
> warning: clisp-2.42-1.el5.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
> error: Failed dependencies:
> libsigsegv.so.0()(64bit) is needed by clisp-2.42-1.el5.rf.x86_64
> strue028@medicina.tips [~]#
>
> Then I got the said signature, and installed it.
>
> [~]# rm -i libsigsegv-2.2-1.1.el3.rf.x86_64.rpm
>
> But clisp refused to work. I compiled it from sources, but
> when I tried to run the result, I got a somewhat mysterious
> error. Well, I guess clisp is not for the faint of heart.


Gauche Scheme:

(use srfi-13 :only (string-tokenize))
(use util.lcs) ;; longest common subsequence

(define (str->words text) (string-tokenize text #[\w]))

(define w1 (str->words "
Now, I would like to point out that CLISP is not easy
to install. There is no simple installer for Linux or
OS-X. CLISP for brew is broken and for ports takes
almost one hour to install. Another thing that worries
me about CLISP is that the packages are very old. For
instance, the only binaries I found for CENT OS 64 bits
is from 2007, eight years ago. Do you think I am
looking at the wrong places?"))

(define w2 (str->words "
I tried to install clisp, but failed. It seems that it
is much harder to install than sbcl. For instance, I
tried a package for Cent OS, and got the following
error message:"))

(lcs w1 w2 string-ci=?)

===>
("I" "to" "install" "CLISP" "is" "to" "install"
"For" "instance" "I" "for" "CENT" "OS" "the")

--
The fact that I have no remedy for all the sorrows of the
world is no reason for my accepting yours. It simply
supports the strong probability that yours is a fake.
--- H. L. Mencken

Matthew Carter

6/7/2015 6:04:00 PM

0

Eduardo Costa <edu500ac@gmail.com> writes:

> On Saturday, June 6, 2015 at 9:37:13 PM UTC-3, informatimago wrote:
>
> Thank you for your answer. I filtered the following pieces of
> information from it:
>
> 1 - Yes, I am right. The large runtime of sbcl can be a handicap in
> cgi applications. As you told, clisp has the advantage of being small
> and fast to load, so you can write easily lightweight scripts with
> clisp.
>
> 2 - CLISP has SCREEN and KEYWORD packages that allows to write
> terminal applications with a much simplier API than ncurses. In fact,
> I wrote a small text editor for Lisp using ncurses. It is quite small
> and very simple. In any case, it is great to know that CLISP makes
> such a task even simpler.
>
> Now, I would like to point out that CLISP is not easy to
> install. There is no simple installer for Linux or OS-X. CLISP for
> brew is broken and for ports takes almost one hour to install.
> Another thing that worries me about CLISP is that the packages are
> very old. For instance, the only binaries I found for CENT OS 64 bits
> is from 2007, eight years ago. Do you think I am looking at the wrong
> places?

For item #1 - an alternative to CGI scripts (imho a better one) is
running a web service on it's own port and Proxy Passing from a more
common (apache) web server to the web app's port.

I use hunchentoot or woo (caveman2) for this - this means web requests
are handled almost instantly (certainly faster than any CGI style ones),
and there is no start up overhead as the sbcl web app is running 24/7.

--
Matthew Carter (m@ahungry.com)
http://a...

Waldek Hebisch

6/9/2015 1:53:00 PM

0

Eduardo Costa <edu500ac@gmail.com> wrote:
> On Saturday, June 6, 2015 at 9:37:13 PM UTC-3, informatimago wrote:
>
> Thank you for your answer. I filtered the following pieces of information from it:
>
> 1 - Yes, I am right. The large runtime of sbcl can be a handicap in cgi applications. As you told, clisp has the advantage of being small and fast to load, so you can write easily lightweight scripts with clisp.

Mostly wrong. Measure time needed to start clisp and sbcl in a loop
and you probably will be surprised: sbcl starts faster.

Larger size affects somewhat time to load sbcl _frist time_, but
if you load it only once than that time usually is negligible.

> Now, I would like to point out that CLISP is not easy to install. There is no simple installer for Linux or OS-X. CLISP for brew is broken and for ports takes almost one hour to install. Another thing that worries me about CLISP is that the packages are very old. For instance, the only binaries I found for CENT OS 64 bits is from 2007, eight years ago. Do you think I am looking at the wrong places?

Clisp is in major Linux distribution: Debian, Gentoo etc. In
Debian just use 'apt-get install clisp' and it works. Building
Clisp from source is another story, apparently Clisp maintainers
are not interested to make it easier.

--
Waldek Hebisch
hebisch@math.uni.wroc.pl

Kaz Kylheku

6/9/2015 2:46:00 PM

0

On 2015-06-09, Waldek Hebisch <hebisch@math.uni.wroc.pl> wrote:
> Eduardo Costa <edu500ac@gmail.com> wrote:
>> Now, I would like to point out that CLISP is not easy to install. There is
>> no simple installer for Linux or OS-X. CLISP for brew is broken and for
>> ports takes almost one hour to install. Another thing that worries me about
>> CLISP is that the packages are very old. For instance, the only binaries I
>> found for CENT OS 64 bits is from 2007, eight years ago. Do you think I am
>> looking at the wrong places?
>
> Clisp is in major Linux distribution: Debian, Gentoo etc. In
> Debian just use 'apt-get install clisp' and it works. Building
> Clisp from source is another story, apparently Clisp maintainers
> are not interested to make it easier.

I used to build Clisp regularly some years ago. I had few issues with it.
`
Except for one time when I wanted to cross-compile it for MIPS, on an x86 build
machine. Ugh!

At one point, almost exactly ten years ago, I wrote a GNU Make include file
replaced the "add-module-set" functionality of the "clisp-link" script, making
it easier to make custom linking sets using rules that could just be pulled in
to a Make-based project.

http://sourceforge.net/p/clisp/mailman/message...

The URL in the message doesn't work, but I haven't lost the source.

Waldek Hebisch

6/9/2015 3:53:00 PM

0

Eduardo Costa <edu500ac@gmail.com> wrote:
> I noticed that a lot of people use CLISP. I would like to know what I am missing.

There a lot of reasons to prefer other Lisp than Clisp. But if
you want reasons to use Clisp, I have one: it seem to be the
only Lisp which actually works on Cygwin. Other are claimed to
work, but failed when tried. So for FriCAS sbcl is Lisp of choice
if available, but Cygwin binary is created using Clisp. Note:
from my point of view Cygwin in preferable to native Windows
because on Cygwin Unix style GUI works fine while native
Windows would be limted to be text only.

AFAICS most folks use Clisp just from inertia: it worked in
the past and they keep using it. Never mind that alternative
got better and Clisp do not change much.

> Tell me if I am wrong. sbcl is much larger than the CLISP. Therefore sbcl is too slow for Internet applications. The server takes a long time to load 70 megabytes, which is the size of sbcl+rucksack+ppcre. CLISP has only 4.5 megabytes. I assume that a smaller runtime is good for writing web scripts.
>

sbcl is much larger, but conclusion about time is mostly wrong.

--
Waldek Hebisch
hebisch@antispam.uni.wroc.pl

Blake McBride

6/26/2015 2:30:00 PM

0

On 06/07/2015 01:13 AM, Eduardo Costa wrote:
> ....
> But clisp refused to work. I compiled it from sources, but when I tried to run the result, I got a somewhat mysterious error. Well, I guess clisp is not for the faint of heart.
>

I was unable to build CLISP on 64 bit machines. After some effort and
help from the net I figured out how to fix it. Not sure why CLISP is
not fixed. I think it is largely no longer maintained. Here are my
notes to build for 64 bit machines:

CLISP on 64 bit machines fails ?make check? and doesn?t work with slime.
To fix the problem, even if you are not using FFI:

Get and install http://savannah.gnu.org/projects...
You MUST use CVS head and not what comes in the various distributions.
The file name is ffcall.tar.gz

Do a _clean_ build with the FFI library. Everything will work. I tried
it on three machines.

Blake McBride