1.《Common Lisp: A Gentle Introduction to Symbolic Computation》
2.《Common Lisp: The Language 2nd》
3.《On Lisp》
4.《Practical Common Lisp》
5.《计算机程序的构造和解释》
就能写出完整的 Common Lisp 程序来,那就大错特错了(不过要看完上述五本书仍然是一件很艰难而且很耗时的事,这就是为何成为 Lisp
程序员更难一些的主要原因:语言规模大、并且有自己独特的编程风格)。事实上对于 C 程序员来说,上述五本书基本上只相当于 K&R
的《The C Programming Language》而已,正如写一个完整的 C
程序还需要诸如编译、调试、Makefile(或者全套的autotools)以及各种各样的第三方库那样,编写完整的 Common Lisp
程序决不仅仅是打开一个 lisp 的交互环境然后输入一个 (format t "Hello, world!~%") 那么简单。
G. 实际上如果代码正确的话,现在在这个目录里运行 sbcl,然后输入 (clc:clc-require :hello) 就可以编译这个项目了:
binghe@localhost:~/lisp/src/hello$ ls -l
总计 20
-rw-r--r-- 1 binghe staff 53 2006-10-23 00:50 config.lisp
-rw-r--r-- 1 binghe staff 326 2006-10-23 00:48 hello.asd
-rw-r--r-- 1 binghe staff 226 2006-10-23 00:56 hello.lisp
-rw-r--r-- 1 binghe staff 161 2006-10-23 01:00 Makefile
-rw-r--r-- 1 binghe staff 122 2006-10-23 00:59 package.lisp
binghe@localhost:~/lisp/src/hello$ sbcl
This is SBCL 0.9.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
; in: LAMBDA NIL
; (SB-KERNEL:FLOAT-WAIT)
;
; note: deleting unreachable code
;
; compilation unit finished
; printed 1 note
CL-USER(1): (clc:clc-require :hello)
T
CL-USER(2): (quit)
binghe@localhost:~/lisp/src/hello$ sbcl
This is SBCL 0.9.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
; in: LAMBDA NIL
; (SB-KERNEL:FLOAT-WAIT)
;
; note: deleting unreachable code
;
; compilation unit finished
; printed 1 note
CL-USER(1): (clc:clc-require :hello)
评论