Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the main differences between CLISP, ECL, and SBCL?

I want to do some simulations with ACT-R and I will need a Common Lisp implementation. I have three Common Lisp implementations available: (1) CLISP [1], (2) ECL [1], and (3) SBCL [1]. As you might have gathered from the links I have read a bit about all three of them on Wikipedia. But I would like the opinion of some experienced users. More specifically I would like to know:

(i) What are the main differences between the three implementations (e.g.: What are they best at? Is any of them used only for specific purposes and might therefore not be suited for specific tasks?)?

(ii) Is there an obvious choice either based on the fact that I will be using ACT-R or based on general reasons?


As this could be interpreted as a subjective question I checked What topics can I ask about here and What types of questions should I avoid asking? and if I read correctly it should not qualify as forbidden fruit.

like image 925
lord.garbage Avatar asked Aug 02 '14 06:08

lord.garbage


3 Answers

I wrote a moderately-sized application and ran it in SBCL, CCL, ECL, CLISP, ABCL, and LispWorks. For my application, SBCL is far and away the fastest, and it's got a pretty good debugger. It's a bit strict about some warnings--you may end up coding in a slightly more regimented way, or turn off one or more warnings.

I agree with Sylwester: If possible, write to the standard, and then you can run your code in any implementation. You'll figure out through testing which is best for your project.

Since SBCL compiles so agressively, once in a while the stacktrace in the debugger is less informative than I'd like. This can probably be controlled with parameters, but I just rerun the same code in one of the other implementations. ABCL has an informative stacktrace, for example, as I recall. (It's also very slow, but if you want real Common Lisp and Java interoperability, it's the only option.)

One of the nice things about Common Lisp is how many high-quality implementations there are, most of them free.

For informal use--e.g. to learn Common Lisp, CCL or CLISP may be a better choice than SBCL.

I have never tried compiling to C using ECL. It's possible that it would beat SBCL on speed for some applications. I have no idea.

CLISP and LispWorks will not handle arbitrarily long argument lists (unless that's been fixed in the last couple of years, but I doubt it). This turned out to be a problem with my application, but would not be a problem for most code.

Doesn't ACT-R come out of Carnegie Mellon? What do its authors use? My guess would be CMUCL or SBCL, which is derived from CMUCL. (I only tried CMUCL briefly. Its interpreter is very slow, but I assume that compiled code is very fast. I think that most people choose SBCL over CMUCL, however.)

(It's possible that this question belongs on Programmers.SE.)

like image 174
Mars Avatar answered Oct 20 '22 05:10

Mars


In general, SBCL is the default choice among open-source Lisps. It is solid, well-supported, produces fast code, and provides many goodies beyond what the standard mandates (concurrency primitives, profiling, etc.) Another implementation with similar properties is CCL.

CLISP is more suitable if you're not an engineer, or you want to quickly show Lisp to someone non-engineer. It's a pretty basic implementation, but quick to get running and user-friendly. A Lisp-calculator :)

ECL's major selling point is that it's embeddable, i.e. it is rather easy to make it work inside some C application, like a web-server etc. It's a good choice for geeks, who want to explore solutions on the boundary of Lisp and the outside world. If you're not intersted in such use case I wouldn't recommend you to try it, especially since it is not actively supported, at the moment.

like image 26
Vsevolod Dyomkin Avatar answered Oct 20 '22 06:10

Vsevolod Dyomkin


Their names, their bugs and their non standard additions (using them will lock you in)

I use CLISP as REPL and testing during dev and usually SBCL for production. ECL i've never used.

I recommend you test your code with more than one implementation.

like image 8
Sylwester Avatar answered Oct 20 '22 06:10

Sylwester