views:

280

answers:

4

I want to learn and use SBCL because of its ease of learning and speed. (I've been playing with Lisp 3 years ago, and now am refreshing it.) But how can I learn what's included in the standard library, so that I don't re-implement things?

After Python this is like a nightmare: the SBCL website has a manual that covers the software only, not a word on the standard library. (For comparison, Gnu Common Lisp's website has only sources and binaries.)

+9  A: 

Consult the Common Lisp HyperSpec for documentation about what is included in Common Lisp

Jeff Foster
+12  A: 

Firstly: that problem isn't really SBCL specific. The CL library is standardised and thus you can use the documentation of any lisp.

As mentioned, the CL HyperSpec is very useful. It is however a reference and thus not very suitable for learning in my opinion.

For learning, there are various books out there. I personally like these a lot:

You should also look at existing code. I particularly enjoyed reading any of the libs by Edi Weitz but spread out and read from different sources to see how other people use Lisp and its huge library to solve problems.

If you can spend that much time you can even log onto IRC (the #lisp channel) and ask questions there. Or post code you have written to comp.lang.lisp and ask for a critique to learn via direct feedback.

HD
Thanks for a big post. I've been learning Lisp for a while in 2006-2007, but what stopped me then was lack of real-life application for me (now there is one) and this very stdlib problem.
culebrón
+3  A: 

Also, if you are learning lisp, consider using CLISP instead of SBCL. CLISP has (IMHO) a much more intuitive debugger. For any non-production stuff the difference between most Common Lisp implementations are negligible.

johanbev
Why I liked SBCL is that it compiles files on the fly (`sbcl --file <filename>` and here it goes at the speed of light). I couldn't figure out how to do that in other implementations. I'll give a look at CLISP too, thanks.
culebrón
CLISP's debugger is very nice, but using the SBCL debugger **through its SLIME interface** is not at all unpleasant. If you want to use your CL from an actual command line session, CLISP is IMO the best choice just on the strength of having Readline built in. If you're using SLIME, it's a tougher call.
Pillsy
+1  A: 

If you are developing on Windows, CLHS (Common Lisp HyperSpec) and CLtL2 (Common Lisp the Language, 2nd Edition) are available as CHM help files, which makes looking for CL standard library functions much easier. I find that it's faster than using the (online or offline) HTML version.

The CHM files are probably available from more than one source. One convenient download is:

http://www.daansystems.com/lispide/

(They're bundled with LispIDE package.)

Nelson