开始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的旅程的更多相关文章
- Lisp和SICP
大概不少programmer都看过<黑客与画家>,作者用了整整一章的篇幅讨论Lisp的强大.我自然就会手痒痒. 几个月前,几天内攻城略地搞定了Python,用的方法便是 ...
- ANSI Common Lisp Practice - My Answers - Chatper - 3
Ok, Go ahead. 1 (a) (b) (c) (d) 2 注:union 在 Common Lisp 中的作用就是求两个集合的并集.但是这有一个前提,即给的两个列表已经满足集合的属性了.具体 ...
- Lisp永远成不了编程主流语言
Lisp语言是第二古老的高级编程语言.许多的黑客和开发者对Lisp推崇备至,Paul Graham甚至说"编程语言现在的发展,不过刚刚赶上1958年Lisp语言的水平". ...
- 读 [The Root of Lisp]
首先,在对 Lisp 有一丢丢的了解下读这篇文章会大大激发你学下去的欲望.之后可以看作者的著作<ANSI Common Lisp>. 想要体会一下 Lisp 的强大,本文是不二之选. Co ...
- 在Visual Lisp中处理自动化错误
Handling Automation errors in Visual LISP 翻译自原文Kean's blog:http://through-the-interface.typepad.com/ ...
- some simple recursive lisp programs
1. Write a procedure count-list to count the number of elements in a list (defun count-list (numbers ...
- 搭建fedora开发环境 common lisp, c++, go
第三方软件库: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.h ...
- SBCL 从REPL 中提取lisp代码
1, 在emacs C-x C-W 文件另存为保存所有REPL过程 由于 (load "foo.lisp")时只有定义语句可以正确执行, 执行语句不可正确被 (load " ...
- 《On Lisp》第四章第三节图4.6中的rmapcar函数中展现的apply陷阱
(defun rmapcar (fn &rest args) (if (some #'atom args) (apply fn args) (apply #'mapcar #'(lambda ...
随机推荐
- Scut:账号服务器问题修正
姑且记录一下,以防未来出现bug回来看看今天改了哪些. 原 Scut 账服是应用于 渠道频道 的账号服务器,每天会发放大量的游客账号,它有一个"自动将已经被注册了一段时间的游客账号再重新推送 ...
- jsonp跨域问题记录
这段时间用H5做移动app开发,遇到不少之前做web的时候不曾遇到的问题,记录一下,共勉-- 首先说一个:js跨域取数的问题 描述: 之前做web都是通过后台获取数据,没考虑过跨域的问题.这次用h5 ...
- 趣味C程序100.1 .2 绘制正弦曲线
说明:1.本问题来源于<C语言经典.趣味.实用程序设计编程百例精解>,所有程序为本人自己编写.与原程序不同之处作有标记. 2.本系列所有程序均使用codeblocks编译,操作系统为Win ...
- bzoj 1500: [NOI2005]维修数列 splay
1500: [NOI2005]维修数列 Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 6556 Solved: 1963[Submit][Status ...
- 【测试】解决loadrunner11无法运行负载测试
问题: LoadRunner11版,录制完脚本,准备运行时提示‘ loadrunner controller 无法创建 vuser 确保您的 load generator ’, 脚本已经录好,但是运行 ...
- 5种php加密工具zendGuard、ionCube、SourceCop、SourceGuardian、phpShield
PHP做桌面应用的想法: 除去icudt55.dll,PHP7用7ZIP压缩后不足7MB,而PHP自带了SQLite和CLI HTTP Server,用户打开浏览器就能访问PHP开发的桌面应用.如果源 ...
- mysql常见字符串处理函数结束
一.简明总结 ASCII(char) 返回字符的ASCII码值 BIT_LENGTH(str) 返回字符串的比特长度 CONCAT(s1,s2…,sn) 将s1,s2…,sn连接成字符串 CONCAT ...
- 查看SGA和PGA使用率
select name,total,round(total-free,2) used, round(free,2) free,round((total-free)/total*100,2) pctus ...
- poj3233
这道题其实算是把快速幂的思想用在多项式之中 A+A^2+A^3+…+A^n=(A+A^1…+A^[n/2])+A^[n/2](A+A+A^1…+A^[n/2])+n mod 2*A^n 然后就是打码的 ...
- 队爷的讲学计划 CH Round #59 - OrzCC杯NOIP模拟赛day1
题目:http://ch.ezoj.tk/contest/CH%20Round%20%2359%20-%20OrzCC杯NOIP模拟赛day1/队爷的讲学计划 题解:刚开始理解题意理解了好半天,然后发 ...