看了《黑客与画家》之后一直想了解一下Lisp这门语言,前段时间买了本田春翻译的《Practical Common Lisp》(实用Common Lisp 编程),十月份刚出的,拿来看看。


  • Lisp环境的搭建:安装和运行Lisp in a Box(需要先安装Emacs)
需要安装:common lisp controller 以及 Slime(The Superior Lisp Interaction Mode for Emacs)
 
sudo apt-get install common-lisp-controller
sudo apt-get install slime


启动:在Emacs里 Alt+x 输入 slime 即可启动 REPL(read-eval-print loop).


  • LIsp 初接触: 没有“Hello, World”程序的编程书是不完整的

CL-USER> (+ 2 3)
5
CL-USER> (format t "hello, world")
hello, world
NIL
CL-USER> (defun hello-world () (format t "hello, world"))
HELLO-WORLD
CL-USER> (hello-world)
hello, world
NIL

 

相关文章:

  • 2021-06-27
  • 2022-12-23
  • 2022-01-15
  • 2021-12-05
  • 2021-09-15
  • 2022-12-23
  • 2021-12-26
猜你喜欢
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2023-02-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案