用 SLY 在 Emacs 中取代 Shell 工作流

1 个赞

有一点迷惑。

主页上是 CET 时区:

Every year, FOSDEM hosts a wide variety of activities. This page gives an overview with links to further information about scheduled events. All times CET (UTC+1).

目前这是直播的页面:

image

这个是计划:

但是好像和 Scheme 没有太大关系。

不知道什么时候这个直播会出来?

直播早过了⋯⋯大概在六小时前开始的

看来是这个主页可以了解更多 SLY 的信息,不过似乎没有找到和替换 shell 直接相关的内容。

然后在 Links 中找到了这个博文: A Lisp REPL as my main shell

I was an Eshell user for a while, then I switched to M-x shell, which rid me of most of the aforementioned terminal limitations, since graphical Emacs is a full-blown graphical application.

But I still wasn’t satisfied, in particular with the programming language used by the shell (I’ve used Bash, Zsh, Fish and Eshell).

I fancy the Lisp programming languages, so why not use the language I’m most comfortable with, say Common Lisp?

我个人觉得 EShell 虽然性能差点,但是能刚好用。性能上追求更好表现 vterm 可能是更好的选择。

可能博主对 Shell 的要求更高。似乎博主对 CL 的熟悉度更高,较之于 C 或者 Elisp,是这个 REPL 诞生的主要动机。

这个文章我觉得价值最大的观点是跳出传统的 shell 需要和终端仿真软件一起用的观念,探讨 shell 和具有更丰富功能的图形界面软件配合使用的可能性。

2 个赞

文章的意思是sly可以作为一个bash的替代品吗?

但我好像没看到sly和外部命令交互的例子, 是现在还没实现吗?

就目前来看,直接用Emacs比SLY+CL靠谱,尽管CL比Elisp要好一点。Emacs本身就是一个巨型REPL(Emacs的常规编辑以外的交互基本都是用minibuffer,而minibuffer的特性就像REPL的prompt)

另外点开看这个作者有点眼熟,然后发现是guix的committer

1 个赞

就目前来看,都比不上 fish。甚至这个方案的 shell command 䃼全目前用的也是 fish 和 bash。

Eshell cannot separate standard input from standard error. This is a blocker in my opinion, until we fix it or implement some other shell in Emacs Lisp.

poor threading support

CL 至少这两点有很大优势

順帯黑下 racket

At first, Racket startup time around 100ms on my machine seems prohibitive for scripts.

2 个赞

racket以前用起来我感觉和外部的交互有非常明显的延迟, 不知道最新的怎么样.

Clojure 社区有个 babashka,很实用。

clojure要启动jvm的话, 延迟总是个问题吧…

这个 babashka 是 graalvm 编译的,不启 jvm 的。

一瞬间就起来了,很方便,可以用 emacs 的 cider 或 inf-clojure 连。

1 个赞

那听起来好像挺好用的.

以前看过用clojure写script还要用lein专门配置jvm的参数, 当时就放弃了.

现在看起来可以用用了!