关于swank started at port的解答1

在配置Common Lisp开发环境时,无论是lisp in a box或者Emacs+SBCL+Slime时都会出现一个报错:

swank started  at port :

其实在我一台没有联网的电脑上运行lisp in a box上却没有出现问题,目前出问题的电脑使用的是公司的代理服务器,我怀疑出现问题的网络设置有很大关系,因为同样配置的电脑差异只是有没有联网。

搜遍网络只有一篇英文,复制英文的原因很简单,自己看着方便,万一英文网站被和谐嘛。

引用如下:

http://stackoverflow.com/questions/12650082/about-stumpwm-and-swankclisp


I have built stumpwm using thread enabled clisp successfully. And the created stumpwm works great. However, the swank server doesnot work if started from ~/.stumpwmrc as below:

(load  "~/.vim/slime/start-swank.lisp")

The swank server is indeed started as netstat -na shows it is lisening on port 4005. But telnet 127.0.0.1 4005 will report "connection is closed by peer". So that the slimv in VIM cannot connect to swank server.

If i start another clisp REPL and run (load "~/.vim/slime/start-swank.lisp"), then both telnet and slimv works ok.

Why doesnot (load "~/.vim/slime/start-swank.lisp") in ~/.stumpwmrc work ?

FYI, The stumpwm log:

 Starting swank on port 4005
 ;;  Loading file /home/***/.vim/slime/start-swank.lisp ...
 ;;  Loading file /home/***/.vim/slime/swank-loader.lisp ...
 ;;  Loaded file /home/***/.vim/slime/swank-loader.lisp
 ;;   Loading file /home/***/.slime/fasl/2012-03-06/clisp-2.49-unix-pc386/swank-backend.fas ...
 ;;  ...
 ;;   Loaded file /home/***/.slime/fasl/2012-03-06/clisp-2.49-unix-pc386/contrib/swank-mrepl.fas
 ;; Swank started at port: 4005.

It seems ok but i cannot use stumpwm anymore !

I'm not familiar with slimv, but it seems that all you're looking to do is start a server in lisp and connect to it. Keep it simple. As I don't really want to find out too much about what's going on in start-swank.lisp, and you probably don't either, I would recommend you start a swank server by putting this in your .stumpwmrc:

(ql:quickload "swank")
(swank:create-server :port #<choose a port number>)

Then connect on that port number with slimv's equivalent of M-x slime-connect. If the version of swank in quicklisp is not compatible with slimv, make sure you have one that is, and REQUIRE it.

Try it out and, if it still doesn't work, look at the version numbers of swank and slimv and post your findings.

From the clisp mailing list, i got a suggestion: We should modify ~/.vim/slime/swank-clisp as below:

(defimplementation preferred-communication-style () :spawn)

After running (load "~/.vim/slime/start-swank.lisp") to start swank server, the slimv can connect to swank server without any error.

Now slimv works great with clisp(with thread support) .

Regards!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值