views:

2014

answers:

7
+5  Q: 

SBCL and clisp

When I started learning CL from Practical Common Lisp, as is preached in the book, I started off with Allegro CL compiler. I stopped using it, since its commerical, yet free bit didn't impress me. It needed a connection to its remote server for some licensing stuffs.

I switched to 'clisp' and am using it. Now, I have been hearing about SBCL and planning to start using it as well.

So, the question is: How do the various ANSI CL implementations differ? Any practical experience of using one over the other ?

Thank you.

+2  A: 

I don't know enough to give you a detailed answer, but I noticed that SBCL was considerably faster then Clisp when I was working with CL for my AI class. Unless you have a compelling reason not to, I'd suggest going with SBCL.

I've heard that Clisp is easier to install and is more portable than SBCL (which has lots of processor-specific optimizations), but if you're using Linux they're both easy enough to fetch from the package manager.

Kyle Cronin
Thanks for sharing :-)
Amit
I don't really know that much, but I felt bad you didn't get an answer. Hopefully what little I've provided helps!
Kyle Cronin
SBCL compile sto native code, clisp compiles to byte-code that is then interpreted by the clisp virtual machine. That is the source of both the speed and portability issues you've mentioned.
Vatine
+5  A: 

There are portions of ANSI CL that leave certain details up to the implementations to determine; you will find that for those parts of the standard, each implementation will have its own quirks.

Also, look for things that are important to the runtime but not defined in the language: things like threading and multiprocessing and garbage collection will vary substantially in performance and reliability.

I have found SBCL to be the easiest implementation to work with in Linux; it has good support for threading in Linux. I can't say much about the garbage collector, because it hasn't mattered to me much yet.

On Windows, your best bet will probably be Allegro or LispWorks, although I've had some success with clisp on Windows. The Windows port of SBCL is progressing, but I haven't used it much, so I can't really comment.

Generally speaking, an understanding of these kinds of things that are difficult to acquire through research or analysis; it comes through experience. Just pick a decent implementation that you're comfortable with, and get to work. You'll figure out the tricky stuff as you go.

Ben Collins
+15  A: 

See Common Lisp Implementations: A Survey by Daniel Weinreb.

huaiyuan
Thanks, I will go through it.
Amit
+6  A: 

If you are on a machine that can run SBCL, you should use it. It's the fastest free Lisp compiler (it can generate code that is as fast as Haskell, OCaml, Java, C, and C++, which are all very very fast, especially compared to Python and Ruby). It also is a fairly complete implementation, and supports most of Swank's features (for SLIME), which is nice when you are developing.

As some of the other comments mention, you won't really notice any differences when you are first starting out. All the free CL implementations are "fast enough" and support all the features you'll need. But if you start writing production software, you will appreciate SBCL's features. OTOH, there's really no reason not to switch now.

jrockway
Thank You, I just made the switch.
Amit
A: 

Depends on your OS of choice

  • Windows - use ecl or abcl
  • Linux - use sbcl or ecl or abcl or cmucl
  • Mac - ccl or ecl or sbcl
  • Other - abcl or ecl or sbcl

EDIT:

Sbcl on windows lacks threading and is, in general not that stable, and none of core maintainers use windows.

ecl is much better choice for cross platform lisps, its feature set is equaly stable on all major platforms.

Dev er dev
I keep hearing that sbcl isn't good on Windows, but I rarely hear why. What makes you not say sbcl on Windows? Is it buggy?
Steve Rowe
You forgot to mention clozurecl. It is an evolution of openmcl. It is fast (both in compilation speed and runtime speed), produces native code (but somewhat slower than sbcl, as far as I know). It is available on both windows and linux (also on other OSes) in both x86 and x86-64.SBCL is unstable on windows. Its threading support is not yet fully done.
dmitry_vk
I mentioned it as ccl. It is fine impelementationm, but doesn't work without SSE2, so I can't run it.
Dev er dev
A: 

I found the error messages in clisp to be more friendly and help me find the problem faster.

Arthur Ulfeldt
A: 

I've had pretty good luck with installing clisp using cygwin if you're under windows.

Jason Baker