不知道是不是《黑客与画家》的老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的旅程的更多相关文章

  1. Lisp和SICP

         大概不少programmer都看过<黑客与画家>,作者用了整整一章的篇幅讨论Lisp的强大.我自然就会手痒痒.      几个月前,几天内攻城略地搞定了Python,用的方法便是 ...

  2. ANSI Common Lisp Practice - My Answers - Chatper - 3

    Ok, Go ahead. 1 (a) (b) (c) (d) 2 注:union 在 Common Lisp 中的作用就是求两个集合的并集.但是这有一个前提,即给的两个列表已经满足集合的属性了.具体 ...

  3. Lisp永远成不了编程主流语言

        Lisp语言是第二古老的高级编程语言.许多的黑客和开发者对Lisp推崇备至,Paul Graham甚至说"编程语言现在的发展,不过刚刚赶上1958年Lisp语言的水平". ...

  4. 读 [The Root of Lisp]

    首先,在对 Lisp 有一丢丢的了解下读这篇文章会大大激发你学下去的欲望.之后可以看作者的著作<ANSI Common Lisp>. 想要体会一下 Lisp 的强大,本文是不二之选. Co ...

  5. 在Visual Lisp中处理自动化错误

    Handling Automation errors in Visual LISP 翻译自原文Kean's blog:http://through-the-interface.typepad.com/ ...

  6. some simple recursive lisp programs

    1. Write a procedure count-list to count the number of elements in a list (defun count-list (numbers ...

  7. 搭建fedora开发环境 common lisp, c++, go

    第三方软件库: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.h ...

  8. SBCL 从REPL 中提取lisp代码

    1, 在emacs C-x C-W 文件另存为保存所有REPL过程 由于 (load "foo.lisp")时只有定义语句可以正确执行, 执行语句不可正确被 (load " ...

  9. 《On Lisp》第四章第三节图4.6中的rmapcar函数中展现的apply陷阱

    (defun rmapcar (fn &rest args) (if (some #'atom args) (apply fn args) (apply #'mapcar #'(lambda ...

随机推荐

  1. javascript 一串DIV跟随鼠标移动

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  2. pushState与replaceState区别

    history.pushState(state, title, url) 将当前URL和history.state加入到history中,并用新的state和URL替换当前.不会造成页面刷新. sta ...

  3. ibatis面试笔记

    ibatis是在结果集与实体类之间进行映射hibernate是在数据库与实体类之间进行映射Hibernate是一个开放源代码的对象关系映射框架,它对JDBC进行了非常轻量级的对象封装,使得Java程序 ...

  4. 关于linux开机自启

    /etc/rc.d/rc.local 是在系统最后启动,必须和其他rc.0 - rcN文件具有755权限

  5. quick-x 触摸事件的新方法

    --[[ local function onTouch(event, x, y) print(event, x, y) if event == "began" then retur ...

  6. vs2008生成的各种文件

    一.sln文件     .sln(Solution)解决方案文件,表示一个项目组,他通常包含一个项目中所有的工程文件信息.   二.suo文件     suo(Solution User Option ...

  7. Python学习笔记(一)Python安装及环境变量的配置

    1.下载python安装包. 下载地址:https://www.python.org/ 2.配置环境变量 找到python的安装路径.C:\Python27;script的路径:C:\Python27 ...

  8. salt-API基本验证命令

    配置SALT-API,网上有很多,作下来也很顺利. 我的参考: 作一下验证的记录: curl -k https://x.x.x.x:8000/login -H "Accept: applic ...

  9. bzoj1816

    这道题不是很难,二分答案+判定即可 注意在一套牌中Joker只能用一次 ..] of longint;     mid,l,r,n,m,i,ans:longint; function check(x: ...

  10. Welcome Back to C++ (Modern C++)

    http://msdn.microsoft.com/en-us/library/hh279654.aspx 看看你是古代还是现代Cpper重点强调 Stack-based scope instead ...