adopt them or people will develop portability libraries to smooth over the differences between implementations for features not specified in the language standard.
13
Steel Bank Common Lisp
14
CMU Common Lisp
15
SBCL forked from CMUCL in order to focus on cleaning up the internals and making it easier to maintain. But the fork has been amiable; bug fixes tend to propagate between the two projects, and there's talk that someday they will merge back together.
16
The venerable 'hello, world' predates even the classic Kernighan and Ritchie C book that played a big role in its popularization. The original 'hello, world' seems to have come from Brian Kernighan's 'A Tutorial Introduction to the Language B' that was part of the http://cm.bell-labs.com/cm/cs/who/dmr/bintro.html
.)
17
These are some other expressions that also print the string 'hello, world':
(write-line 'hello, world')
or this:
(print 'hello, world')
18
Well, as you'll see when I discuss returning multiple values, it's technically possible to write expressions that evaluate to no value, but even such expressions are treated as returning NIL
when evaluated in a context that expects a value.
19
I'll discuss in Chapter 4 why the name has been converted to all uppercase.
20
You could also have entered the definition as two lines at the REPL, as the REPL reads whole expressions, not lines.
21
SLIME shortcuts aren't part of Common Lisp—they're commands to SLIME.
22
If for some reason the LOAD
doesn't go cleanly, you'll get another error and drop back into the debugger. If this happens, the most likely reason is that Lisp can't find the file, probably because its idea of the current working directory isn't the same as where the file is located. In that case, you can quit the debugger by typing q
and then use the SLIME shortcut cd
to change Lisp's idea of the current directory—type a comma and then cd
when prompted for a command and then the name of the directory where hello.lisp
was saved.
23
http://www.flownet.com/gat/jpl-lisp.html
24
Before I proceed, however, it's crucially important that you forget anything you may know about #define-style 'macros' as implemented in the C pre-processor. Lisp macros are a totally different beast.
25
Using a global variable also has some drawbacks—for instance, you can have only one database at a time. In Chapter 27, with more of the language under your belt, you'll be ready to build a more flexible database. You'll