[神仙打架]高司令口述历史:我和李满囤,不得不说的故事

起因是高司令在访谈中提到 Emacs 源码的问题。视频三个半小时,太长了我没看,好在已经有人总结了脱水版:

https://www.reddit.com/r/programming/comments/dhrcxw/james_gosling_on_how_richard_stallman_stole_his/f3qk4xh/

HN 上也有讨论:

另附:

https://www.jwz.org/doc/emacs-timeline.html


补充:

GNU Emacs 之前,RMS 也是有自己的 Emacs。为什么后来会扯上高司令的 Emacs?原因在 My Lisp Experiences and the Development of GNU Emacs - GNU Project - Free Software Foundation 有提到:

Therefore, when I wrote my second implementation of Emacs, I followed the same kind of design. The low level language was not machine language anymore, it was C…

Now, this was not the first Emacs that was written in C and ran on Unix. The first was written by James Gosling, and was referred to as GosMacs. A strange thing happened with him. In the beginning, he seemed to be influenced by the same spirit of sharing and cooperation of the original Emacs. I first released the original Emacs to people at MIT.

RMS 在打算用 C 写第二版 Emacs 的时候,发现高司令的 GosMacs 已经在先了,而且这时有人给了他查看 GosMacs 代码的权限:

At that time I was working on the GNU system (a free software Unix-like operating system that many people erroneously call “Linux”). There was no free software Emacs editor that ran on Unix. I did, however, have a friend who had participated in developing Gosling’s Emacs. Gosling had given him, by email, permission to distribute his own version. He proposed to me that I use that version.

4 个赞

炮打斯托曼——我的第一张大字报

3 个赞

Weber : But Stallman was not involved. No one went after him because he had no money, right?

Gosling : Right. I mean, you can’t sue a homeless person, right, which is, you know, he-- Yeah, he had sort of weird views on, you know, economic models at the time.

:joy:

这哪是第一张啊

你好骚啊~~

emacs的代码版本历史都在,司令可以把自己的代码找出来

早没了,Emacs的代码库经历了RCS -> CVS -> Bazaar -> Git三次迁移,司令估计是RCS时代之前写的代码。

git log --reverse > /tmp/log
rg Gosling < /tmp/log

值得一提的是第一次提交是这个Jim Blandy在1985年做的,这里他的邮箱被标记为红帽的邮箱,然而红帽是1993年创立的,估计是版本控制库转换系统手动添加上去。

commit ce5584125c44a1a2fbb46e810459c50b227a95e2
Author: Jim Blandy <[email protected]>
Date:   Thu Apr 18 00:48:29 1985 +0000

    entered into RCS

顺带一提这个Jim Blandy现在似乎也有用Emacs

1 个赞

如果有的话, 源文件里应该会留下一些印记吧? 比如开头的注释里, 还有就是代码, 代码不可能每一行都被修改了吧? 如果是这样, 那跟重写差不多了.

看到过这个讨论, 没有看到最终原因. 说是此人有超强的预测能力, 提前预测出未来会有红帽公司出现.

越来越神必了……

2 个赞

老李(RMS)也是有洁癖的人,上手就把 lisp 解释器替换了(rms-elisp):

…Then I discovered that Gosling’s Emacs did not have a real Lisp. It had a programming language that was known as ‘mocklisp’, …

I concluded I couldn’t use it and had to replace it all, the first step of which was to write an actual Lisp interpreter…

没多有又把其它代码也移除了(emacs-timeline):

1981               Gosling Emacs                       :
                   by James Gosling                    :
                   written in C; with "Mocklisp"
                   as its extension language.
                       /      |
1983                  /       |
                     /   Unipress Emacs (6-may-83)
                    /    $395 commercial product.
1984               /                                   Hemlock
                  /                                    by Bill Chiles,
                 /                                     Rob MacLachlan, et al.
1985  GNU Emacs 13.0? (20-mar-85)                      written in Spice Lisp
      by Richard Stallman.                             (CMU Common Lisp)
      initial public release?                              :
             |                                             :
      GNU Emacs 15.10 (11-apr-85)                          :
             |
      GNU Emacs 15.34 (07-may-85)
             |
      GNU Emacs 16.56 (15-jul-85)
      (Gosling code expunged
      for copyright reasons)

是不是还有遗留,有待高司令和吃瓜群众去挖了。

2 个赞

我有个问题,为什么RMS叫李满囤?

高司令,李满囤,苏翰生,韦马赫,很有上个世纪里翻译外国人名字的感觉。。

1# 楼补充了 rms-lisp 链接以及部分内容摘录。

李满囤是截图里那个推友给起的名字吧?

整件事可能大概是这样的:

  • RMS 写了第一版的 Emacs。
  • RMS 打算用 C 重写 Emacs,但是发现已经有人这么做了,这就是高司令的 GosMacs(然而这时的高司令都准备弃坑了,把代码卖给了一家公司)。
  • 友人给了 RMS 查看 GosMacs 代码的权限。代码估计也不完全是高司令一个人写的,因为他有号召社区帮他一起改进。
  • RMS 大概觉得可以在高司令的基础上继续开发,但是拿到代码发现 lisp 解释器不行,就写了一个替换掉。
  • RMS 接着又移除了其它涉及版权的代码。
  • 至此 GNU Emacs 应该是符合 RMS 的 ‘free software’ 的定义。
5 个赞

他在 Mozilla 做 Rust ,之前在 Red Hat 做过 GDB

1 个赞

不太可能挖得出來,挺多失传的商業软件最后作者自己都沒留下源码。


以 rms 的标准定是全重写了,哪像現在的程序员个个都那么不敬業连个 copyright notic 都不改。


RMS: I can’t remember all the hacks that I was proud of, so I can’t pick the best. But here’s something I remember fondly. The last piece of Gosmacs code that I replaced was the serial terminal scrolling optimizer, a few pages of Gosling’s code which was proceeded by a comment with a skull and crossbones, meaning that it was so hard to understand that it was poison. I had to replace it, but worried that the job would be hard. I found a simpler algorithm and got it to work in a few hours, producing code that was shorter, faster, clearer, and more extensible. Then I made it use the terminal commands to insert or delete multiple lines as a single operation, which made screen updating far more efficient.

说实话能难到一个人吊打 Symbolics 的 RMS 说明 Gosling 还真有点水平。

2 个赞

很好奇司令放弃了emacs之后, 在用什么编辑器?

NetBeans IDE 啊。他还促成 Apache 从 Oracle 接管这个项目。

1 个赞

高司令现在是异教徒:

I do most of my programming in NetBeans, although I use vi a fair amount.

1 个赞

可能是java api太多, 不用补全不行了