开始lisp的旅程

不知道是不是《黑客与画家》的老pual太能忽悠了,一直想把他吹捧的lisp学习一下。

看common lisp和On lisp两本书也有一段时间了,中间还夹着看了一点SICP和land on lisp,但是一直感觉浑浑噩噩的,感觉没学到真正的东西,索性开始看代码吧。

一直在做驱动方面的工作,常想着什么时候抽空玩玩web的东西,所以打算先找一个关于web的lisp实现看着。搜了下,找了一个叫做“Hunchentoot”的东东:http://slack.net/~evenson/abcl/hunchentoot/

按照http://www.cnblogs.com/meteoric_cry/archive/2011/08/18/2143905.html & http://blog.csdn.net/keyboardota/article/details/7654512

的内容了解了下如何使用Hunchentoot(CL-USER>是需要敲入的Lispbox命令,其中step3安装过程出错时直接按5忽略之):

CL-USER> (load "http://beta.quicklisp.org/quicklisp.lisp")



==== quicklisp quickstart loaded ====



To continue with installation, evaluate: (quicklisp-quickstart:install)



For installation options, evaluate: (quicklisp-quickstart:help)



"http://beta.quicklisp.org/quicklisp.lisp"

CL-USER> (ql:quickload "usocket")

; No value

CL-USER> *

NIL

CL-USER> (ql:quickload "hunchentoot")

; Fetching #<URL "http://beta.quicklisp.org/dist/quicklisp/2011-01-10/systems.txt">

; 78.15KB

==================================================

80,026 bytes in 1.19 seconds (65.84KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/dist/quicklisp/2011-01-10/releases.txt">

; 111.77KB

==================================================

114,451 bytes in 1.17 seconds (95.45KB/sec)

To load "hunchentoot":

Install 17 Quicklisp releases:

alexandria babel bordeaux-threads cffi chunga cl+ssl

cl-base64 cl-fad cl-ppcre flexi-streams hunchentoot md5

rfc2388 trivial-backtrace trivial-features

trivial-gray-streams usocket

; Fetching #<URL "http://beta.quicklisp.org/archive/usocket/2011-01-10/usocket-20110110-svn.tgz">

; 54.77KB

==================================================

56,082 bytes in 1.06 seconds (51.52KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-backtrace/2010-10-06/trivial-backtrace-20101006-git.tgz">

; 8.56KB

==================================================

8,770 bytes in 0.28 seconds (30.48KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/rfc2388/2010-10-06/rfc2388-20101006-http.tgz">

; 6.01KB

==================================================

6,154 bytes in 0.01 seconds (400.65KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/md5/2010-10-06/md5-20101006-git.tgz">

; 10.56KB

==================================================

10,809 bytes in 0.02 seconds (659.73KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/cl-ppcre/2010-10-06/cl-ppcre-2.0.3.tgz">

; 153.97KB

==================================================

157,665 bytes in 3.69 seconds (41.75KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/cl-fad/2010-12-07/cl-fad-0.6.4.tgz">

; 11.44KB

==================================================

11,712 bytes in 0.27 seconds (43.00KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/cl-base64/2010-10-06/cl-base64-20101006-git.tgz">

; 8.21KB

==================================================

8,408 bytes in 0.02 seconds (513.18KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/flexi-streams/2010-10-06/flexi-streams-1.0.7.tgz">

; 130.29KB

==================================================

133,413 bytes in 2.59 seconds (50.23KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-features/2010-10-06/trivial-features-20101006-darcs.tgz">

; 7.66KB

==================================================

7,839 bytes in 0.02 seconds (478.45KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/babel/2010-11-07/babel-20101107-darcs.tgz">

; 188.76KB

==================================================

193,290 bytes in 4.23 seconds (44.58KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/cffi/2010-11-07/cffi_0.10.6.tgz">

; 181.59KB

==================================================

185,952 bytes in 7.25 seconds (25.05KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/cl+ssl/2010-10-06/cl+ssl-20101006-cvs.tgz">

; 18.08KB

==================================================

18,513 bytes in 0.53 seconds (34.05KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/trivial-gray-streams/2010-10-06/trivial-gray-streams-20101006-cvs.tgz">

; 3.41KB

==================================================

3,489 bytes in 0.02 seconds (212.95KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/chunga/2010-10-06/chunga-1.1.1.tgz">

; 20.38KB

==================================================

20,871 bytes in 0.49 seconds (42.02KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/alexandria/2010-11-07/alexandria-20101107-git.tgz">

; 44.97KB

==================================================

46,045 bytes in 1.03 seconds (43.61KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/bordeaux-threads/2010-10-06/bordeaux-threads-0.8.0.tgz">

; 17.31KB

==================================================

17,721 bytes in 0.41 seconds (42.62KB/sec)

; Fetching #<URL "http://beta.quicklisp.org/archive/hunchentoot/2010-10-06/hunchentoot-1.1.1.tgz">

; 136.34KB

==================================================

139,617 bytes in 3.41 seconds (40.03KB/sec)

; Loading "hunchentoot"

..................................................

[package alexandria.0.dev]........................

..................................................

..................................................

[package bordeaux-threads]........................

[package usocket].................................

[package trivial-backtrace].......................

[package rfc2388].................................

[package md5].....................................

[package trivial-gray-streams]....................

[package flexi-streams]...........................

..................................................

..................................................

..................................................

..................................................

[package babel-encodings].........................

[package babel]...................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

..................................................

[package cffi-sys]................................

[package cffi-callbacks]..........................

[package cffi]....................................

..................................................

..................................................

[package cffi-features]...........................

[package cl+ssl]

Invoking restart: Skip loading #P"C:/Documents and Settings/Administrator/Application Data/common-lisp/cache/ccl-1.6-f94-win-x86/c/PROGRA~1/LISPBO~1.7/quicklisp/dists/quicklisp/software/cl+ssl-20101006-cvs/reload.wx32fsl"

..................................

[package cl-ppcre]................................

..................................................

..................................................

[package cl-fad]..................................

[package cl-fad-test].............................

[package cl-fad-ccl]..............................

[package cl-base64]...............................

[package chunga]..................................

[package url-rewrite].............................

[package hunchentoot].............................

............

Invoking restart: Return to SLIME's top level.

; Evaluation aborted on #<CCL::PARSE-UNKNOWN-TYPE #xD43CD76>.

; Evaluation aborted on #<CCL::PARSE-UNKNOWN-TYPE #xD43CD76>.

; Evaluation aborted on #<CCL::PARSE-UNKNOWN-TYPE #xD43CD76>.

("hunchentoot")

CL-USER> 

CL-USER> 

CL-USER> 

CL-USER> (asdf:load-system "hunchentoot")

T

CL-USER> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242))

#<ACCEPTOR (host *, port 4242)>

CL-USER>

  接下来就应该开始read source code的旅程了,但在这之前,可能还需要把hunchentoot主页上的内容,尤其是几篇tutorial看一下。

很期待接下来的代码阅读过程,相信应该和读OS一样精彩。

你可能感兴趣的:(lisp)