配置lisp开发环境

对lisp的支持,Emacs的是比较好,有Slime。后来,Vim也相应的出了Slimv,可能毕竟没有Emacs流行吧。一开始我的选择是Slimv,毕竟比较习惯vim了。但是安装这个插件遇到了很多问题。

对Vim的尝试

官方教程是直接下载插件放到vim目录下安装,我偷懒直接用Vundle从github安装的,结果运行出错。去google一下,发现这个项目下面有一个和我一模一样的错误:SlimvInitBuffer not defined。这是由于Vim对函数前缀b:的错误,之前的版本是直接忽略掉的,但是从vim7.4之后,就有问题了。参考这个issue,删掉所有的:b前缀就可以解决,因为其实:b什么都没有做。删掉是没有错误了,大还是我的REPL还是没有出现。

只好回到官方toturials上面了。发现上面说vim是需要pyhton-enable的,我去vim查看了一下版本,发现我的vim没有支持python,支持的是python3,只好重新编译安装。编译安装的过程可以参考这里。其实也可以不必重新安装,使用update-alternatives,可以直接将vim指定到python2.

花了很多时间之后,按照官方的教程下载,发现并没有启动,百般周折,最后还是选择了Racket。

最终选择Racket

Racket的前身是DrScheme(PLT-scheme?)现在plt-scheme的主页直接指向racket了。

安装方法是(ubuntu):

  1. 从https://download.racket-lang.org/ 下载安装脚本。
  2. chmod +x [下载到的脚本名字]
  3. sudo ./[脚本名字]

话说用111M的一个单文件sh,这么样的安装方式我还是第一次见……安装好之后,可以从ubuntu的GUI打开软件了。用官方的example试一下吧:



配置lisp开发环境”已经有5条评论

  1. Sorry I don’t have time to explore the problems you told me about Slimv, I was pretty busy since I arrived at this new city.

    Anyway, it’s good to see you have a nice start. For these days, besides my usual work, I have to teach some mathematicians Lisp. And I always recommend Racket to be a entry point for them somehow.

    By the way, if you are learning SICP, you probably want to check this out: https://docs.racket-lang.org/sicp-manual/index.html

    If you already know it or some similar ones else, ignore that shit!

    Happy Chinese New Year!

    • Thanks!Forget slimv, I gave up on it after trying to install it Twice, I think racket would be the perfect environment for lisp since the moment I downloaded it. The debug is awesome! And unfortunately I found it didn’t support auto complete, I don’t know why. But I can do with that.

      Happy new year to you too! My friend! Take care of yourself! You can FaceTime me anytime when I get back to shanghai(4 feb).

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注