肯汤普森和布莱恩(AWK作者之一)趣说UNIX趣说UNIX")趣说UNIX")


Evan 00:00
好,谢谢大家。我是埃文,是自愿负责组织这次活动的人。谢谢大家。

Evan 00:14
谢谢。很多人给我很大的功劳,但其实是靠着全年的40、50、60个志愿者,这一切才能发生。我一个人什么也做不了。我以前是一个人做的,那时我还留着头发(笑)。整个周末的主题标签是 #VC_at_east,大家可以使用这个标签。这是我们的网站。有人能帮我换一下幻灯片吗?

Ken 00:36
没人管幻灯片。

Evan 00:37
哦,我来吧,好吧,我自告奋勇。好,好。那么有多少人认识一个叫丹·鲁甘迪(Dan Rugandi)的人呢?好的,丹·鲁甘迪是我们团队的元老之一,大概在2005年去世。他去年没能来,因为他在与第四期癌症作斗争。不幸的是,现在他已经过世。他的女儿们今天也在场,我知道他会为此感到非常自豪。丹曾经设计所有我们的旧T恤,那些非常棒的旧T恤。如果你有一件,那就是丹设计的。所以我们把今年的展会献给我的朋友丹。

Evan 01:15
特别感谢信息高速公路科学中心(Infoway Science Center)为我们提供场地,还要感谢我们的赞助商Hackaday。几天前,Hackaday在推特上向40万粉丝推送了我们的消息。ACM向4万粉丝推送了我们的消息。贝尔实验室向2万粉丝推送了我们的消息。而Ars Technica则向110万粉丝推送了我们的消息。万一他们真的来了呢?当你们进场时,应该已经拿到了一份小型的节目册。上面一面是昨天的日程安排,可以忽略。但在页面底部有一个二维码,是我们的展会调查。我们需要知道我们做得如何,以便明年能做得更好。你也有机会赢得出版物或VCF的周边产品。所以请填写并交到前台。我会快速讲一下我们博物馆的一些改进。我们最近安装了监控摄像头,对,就是摩登的设备。

Evan 02:11
去年,我们的网络由一个树莓派通过Linksys家用路由器和一个小型的消费级UPS加上一些50美元的折扣平板组成。现在我们有了一个真正的网络。Minute Man捐赠了一个全新的机架。现在有了UPS,我们有真正的服务器和思科设备,整套设施应有尽有。所以现在我们有了一个真正的网络,还有天花板上的接入点、Poe供电等等。这一切都非常棒,感谢你们的捐赠,让我们通过活动筹集资金来实现这些改进。

Evan 02:48
我们有一台被称为VAX 9000的计算机,它是DEC公司建造的最大、最强的计算机。全球大约只生产了三十几台,而我们拥有最后一台。这台计算机六个月前还在科罗拉多州的一家空军国防承包商那里服役,但他们拒绝告诉我们具体用途。我们的政策是只接受捐赠,不收购文物。他们很乐意把它捐赠给我们,但我们必须从科罗拉多州把它运回来。我们的一位成员(你知道是谁)为我们捐赠了一张五位数的支票,用来雇佣拖车公司并完成运输任务,谢谢你,先生。我们的计划是修复它。我们还需要一个更大的空间来展示它,同时我们也需要建立一个资本基金,计划在未来五年筹集25万美元,以便在校园内建造一个更大的展厅。而像这样的活动让这一切成为可能。

Evan 03:49
我的女朋友夏洛特,她在前台,你们见过,她和我一起决定在信息亭前做一个大箭头。它不在IBM 1130旁边,也不是在蓝色的架子旁边,而是在它们的中间。但你们可能看不到它。嗯,对,接下来的幻灯片应该会显示它,也许它在那里。无论如何,这就是信息亭。照片不能完全展现它的样子。它是一个触摸屏显示器配上一台小型PC。我们计划在博物馆内放置四到六个这样的设备。

Evan 04:18
但这些设备需要资金。所以我们通过举办活动筹集资金。我们制作了那个大箭头,原本没打算让它看起来像Amiga的光标,但它确实像。这是一个非常愉快的意外,非常开心的意外。

Evan 04:33
曼哈顿曾经有一家叫Tech Serve的商店,从1980年开业到几年前关闭。他们关店后在eBay上拍卖了所有资产。洛杉矶有个人的兄弟在纽约,他是个苹果粉丝。这个人出于玩笑心态在拍卖中出价100美元,截了个图发给他的兄弟,哈哈,我竞得了这个招牌。两周后他收到邮件通知,他赢得了拍卖。邮件还说只能在纽约本地取货。这个人的兄弟不想要它,因为他说“我老婆会杀了我”。于是这个在洛杉矶的人开始联系博物馆,包括史密森尼博物馆,但都无果。打了20多个电话后,有人告诉他我们博物馆的存在,他便求我们收下这个招牌。这是几年前的事了。今年我们新增了一些项目,在寄卖室旁边有一个软件商店。我们把这个招牌挂在了软件商店里。感谢托尼和杰森,我们还给它通了电。我几周前读了一篇关于本地废弃购物中心的文章,闲得无聊时翻看了里面的照片,看到了一家Radio Shack的招牌。文章里提到了负责管理的公司,于是你们猜我做了什么?今年夏天我们将获得Radio Shack的店面招牌。如果有人想捐赠文物、资金或志愿服务,或者只是想了解更多关于我们的信息,请随时给我打电话或发邮件。

Evan 06:22
今年的亮点是我们有两个展厅。通常人们只找到第一个展厅而没有去到第二个。搞笑的是,大家看完第一个展厅后会给我们好评,以为看完了整个展会,但实际上还有第二个更大的展厅。所以请务必参观这两个展厅。

Evan 06:51
第二个展厅有一个特别的展览,叫做Unix Town,还有一个特别的Atari展览,今年展出了14到15个Atari相关的展品。因为明天是来自Atari和Amiga的Joe Decure的演讲。几年前我们请Brian来做演讲时,场地像今天一样挤满了人,甚至是个帐篷。而第二天,VisiCalc的Bob Franklin接替了他的位置。当时我说过,现在我还要说,我为明天的Joe Decure感到抱歉,因为他不可能超越Brian的演讲。

Evan 06:51
我们在前厅有一个厂商区,走廊尽头还有一个大型寄卖区,软件商店也在这里。我们还设有“Glitch Works”的工作坊、新加坡计算机、学习焊接工作坊。我们的博物馆也会开放,其它展品也会展出。在街的另一边有卫星天线和食品摊位。所有这些都需要由我们的志愿者来管理。所以在我演讲结束后,请给他们10到15分钟的时间,让他们准备好展品,然后大家再去参观。但你们不是来听我讲的。所以,Amanda,有没有人不知道Kim Thompson是谁?好吧,好吧,知道就好。那么没有任何进一步的延误,接下来请Ken Thompson先生,Unix的共同发明者。

BWK 07:47
还有Brian Kirk。

Evan 07:49
还有Brian Kurdigan,K&R。

BWK 08:03
好吧,请有人关掉那个东西,或者站到它前面。也许你们想离开门口,站到投影仪前面。这样就行了。很好。好的,我也要坐下,这样我就不会从台上摔下去。所以今天我们要做的是一个炉边谈话,我想有人可以给我们放个圣诞树桩之类的东西,好吧。我们不需要那个。

BWK 08:38
所以,Ken和我一起在贝尔实验室工作,很久之前的事了。他在60年代中期来到贝尔实验室,我让他自己讲更多吧。而我是在1967年作为暑期实习生来的。

BWK 08:50
不幸的是,这是那种非常偶然的机会,完全是运气好,我正好在跟Ken同一个组。我办公室就在他对面,差不多有30年。我们在2000年几乎同一天退休,各奔东西,但一直保持联系。实际上,这周应该是我们自离开贝尔实验室以来第一次见面。他一点也没变。所以这次见面很有趣。星期二他在普林斯顿的我的课堂上做了一个客座演讲,那个小组比今天的观众要小得多,当然也年轻得多,或许穿的T恤也不太一样(笑)。无论如何,我们度过了愉快的时光,这是炉边访谈的想法。所以今天我们要做的基本上是一样的。我会问Ken一些引导性问题,让他尽量多说些话。然后在中途,我们会鼓励观众提问。好吧,这就是我们的计划。我把我的小笔记拿出来,一张纸,两张,字很小。是的,好吧。顺便提一下,埃文没有提到的是,Ken显然是和Dennis Ritchie一起创造了我们都熟悉并使用了很长时间的Unix操作系统。他因为这个贡献获得了许多奖项,我就不一一列举了,不过其中包括1983年的ACM图灵奖、国家技术奖章和日本奖。Ken是国家工程院和国家科学院的成员。他通常住在加州,这次来东海岸的原因是星期四他在华盛顿特区被引入国家发明家名人堂。

BWK 10:57
好了,现在我不说了,Ken,你可以先谈谈你的早年生活,特别是你是如何来到贝尔实验室的。

Ken 11:07
哦,那时候我还在伯克利上学。我不知道这个词现在是否还适用,但当时我算是个“职业学生”,对吧?我就这么随波逐流。我报了不少课,得了电气工程学位,但这很容易,因为我在那之前已经是个电气爱好者,大概有十年了。不过,我非常喜欢计算机。当时,伯克利还没有计算机科学的课程,它也正在被创建中。电气工程和数学系之间有一场激烈的政治斗争,争夺谁能拥有这个新兴领域。虽然他们自己也没意识到,但其实这场斗争是关于计算机科学到底会更多地偏向数学,还是会偏向更广泛的计算机科学。最终,计算机派赢了。

Ken 12:12
毕业后的那个夏天,我还在随波逐流。其实我自己都没想到我已经修完了所有的必修课。我本打算继续待在大学里,因为我感觉自己已经“拥有”了这所学校。我不知道该怎么形容这种感觉,但我能接触到学校里所有的资源。学校里的主机每天午夜关闭,我会用我的钥匙进入机房,然后这台主机就成了我个人的计算机,直到早上8点。这就是我当时的生活。

Ken 12:52
所以我很开心,没什么雄心壮志。换句话说,我可以形容自己为“极度工作狂”。我非常卖力工作,但没有任何目标。我不知道自己在做什么,也没有明确的方向。有一位老师,他当时是从贝尔实验室来的,只在这里教了一年,教授了一门真正的计算机课程,我旁听了这门课。后来到了夏天,我没有申请研究生。说实话,我觉得自己不够优秀。 然而,就在那个夏天快结束的时候,这位朋友---现在已经是我的朋友了---给了我一张研究生课程表,并告诉我:“这是你研究生课程的安排。”他帮我申请了研究生并且我被录取了。我想应该是因为他的推荐信,但我也不确定。于是我就这样进入了研究生院。

Ken 14:00
那一年快结束时,各大公司纷纷来学校招聘,但我没有参加招聘。我没有去任何一个招聘会。体育馆里摆满了展台,一个接一个。我不断收到通知,说贝尔实验室的展台在某个时间有空,但我都没有理会,我对这些完全没有兴趣。整个招聘周过去了,我跳过了贝尔实验室的六到八次招聘面试机会。还是没有任何雄心壮志。

Ken 14:40
后来贝尔实验室的招聘人员居然直接敲开了我家的门。我邀请他进来,据他说,我给了他姜饼和啤酒,我们聊了一会儿,然后他就走了。这就是我和贝尔实验室的招聘故事。

Ken 15:02
接着我收到了一封邀请信,邀请我到东海岸、新泽西去面试。我拒绝了。他们问我为什么,我说:“我对在商业机构工作不感兴趣,我只是会拿你们的钱而已。我觉得接受你们的钱去面试对你们不公平。”他们说:“没关系,来吧,看看我们。” 于是我答应了。我想,我有一些高中时代的朋友在东海岸,我可以去面试,然后顺便拜访朋友。他们希望我参加两天的面试,我说只参加一天,然后我会开车沿着东海岸拜访我的朋友。他们同意了。我还警告他们说:“结果还是一样的,我不想要这份工作。” 于是我去了那里。

Ken 15:32
到了那里,我走在研究部门的走廊上,研究的是计算机科学。走廊两旁的每个门上写的名字我都认识,这让我非常震惊。接着我被两位很了不起的人面试,其中一位是Brian Shinlin的合著者,他们一起研究了旅行推销员问题的启发式算法。面试结束后,我拿上租来的车,开车沿东海岸走了一圈。在第三个朋友家时,我收到了一份工作邀请。我在从一个朋友家到另一个朋友家的两个小时车程中思索了一下,最后到了下一个朋友家时,我打电话给贝尔实验室,说:“好吧,我接受了。” 就这样,我在贝尔实验室工作了35年。

BWK 17:11
那时候,贝尔实验室的人真的很有远见。当然,Ken当时可能还没有。那么你进入贝尔实验室后,显然参与了许多项目,其中之一是Multics。后来Unix也由此诞生。你能谈谈这段演变过程吗?你是如何开始的?

Ken 17:36
哦,Multics。我不知道大家是否了解这个项目。它就像是一个庞然大物,设计过度、规模过大,是个典型的“第二系统症候群”的例子。他们在麻省理工学院(MIT)开发了一个非常优秀的时间共享系统,接着决定要打造一个更好的版本,但这往往是失败的先兆。他们与麻省理工学院、贝尔实验室和通用电气联合开发这个系统。通用电气提供机器,但它不能在普通机器上运行,必须有专用的硬件,非常庞大。大部分编程是在贝尔实验室进行的,但设计主要是由MIT完成的。我们拿到任务,然后完成它。尽管工作不错,但我并不觉得有多大的动力。我只是在一个庞大的系统中做着一个小小的程序员,没有意识到自己其实并不想使用这个系统。后来贝尔实验室的管理层意识到了这一点,并退出了这个项目。于是剩下的就只剩下通用电气和MIT继续合作。贝尔实验室退出时,带着一种“我们不再做操作系统”的情绪。而我却想做操作系统。

Ken 19:23
后来我找到了一台叫做PDP-7的工作站,它主要用于电气工程领域的远程作业输入。你可以在CRT显示器上画电路图,然后按下按钮,电路图就通过电话线传送到主机,主机会进行计算,接着你可以看到各种传输函数的结果,所有这些都与电气工程有关。我接手了这台机器,用它做了一些游戏。这个显示器非常有趣,它有一个巨大的圆形屏幕,就像老式电视机一样,并且有一个遮光罩,能让你用双眼分开来看。我做了一个太空射击游戏,两个玩家在一个巨大的空间里,你需要找到对方并互相射击。如果你能跟上对方的尾巴,你就赢了。当你在对方的尾巴后面时,你会看到他们的火力从四周喷射出来。这很有趣,但你需要有一个伙伴来玩。

Ken 20:52
所以我利用电话线安排了大约十个远程作业输入站,我把我的程序加载到这些站点上,玩家可以随意选择对手。你不知道自己会和谁对战,所以你就像是在和陌生人对战。我感到很抱歉,我是不是浪费了太多时间?

BWK 21:19
继续吧!不,我觉得这个故事很棒。

Ken 21:24
接下来我对磁盘产生了兴趣。PDP-7有一块磁盘,是唯一一台有这种磁盘的PDP-7。磁盘大约六英尺高,只有一个盘片,盘片是垂直安装的。有人告诉我,千万不要站在它的前面或后面,因为如果盘片脱落,它就像飞机螺旋桨一样飞出。这块盘片的速度非常快,快得超出了这台机器的处理能力,真是可惜无法充分利用它。

Ken 22:01
于是我写了一个磁盘调度算法,试图最大化磁盘的吞吐量,特别是这块磁盘。我让它运行起来了,但接下来我需要测试它的性能。我需要给它足够的工作量来测试它的吞吐量,于是我开始编写一些辅助程序。突然有一天,我意识到自己在不知不觉中,已经离完成一个操作系统只差三周了。我需要三个程序,每周写一个。一个是编辑器,我需要它来编写代码;一个是汇编器,用来将代码转换为机器语言;最后一个是一个小型内核,也就是操作系统。幸运的是,正好在这个时候,我的妻子带着我们大概一岁的孩子去加州探亲,去了三周。于是我一个人在家,一周后,我们就有了Unix系统。

BWK 23:44
我觉得现在的程序员可没有以前那么高效了(笑)。所以从那台PDP-7开始,事情逐渐发展了。你是怎么把Dennis拉进来的,或者是他拉你进来的?你可以谈谈这段进展吗?

Ken 23:58
当Unix系统运行起来时,尽管它只是台小型计算机,速度比主机慢了十倍,但我开始吸引到一些非常厉害的用户。PDP-7有两个终端,一个是我在显示器上放置的涂鸦文本终端,另一个是型号为33的电传打字机终端。所以最多只能同时有两个人使用。

BWK 24:34
你当时用的是PDP-7吗?我记得我有一个非常早期的用户ID,可能就是在那个系统上。

Ken 24:39
嗯,Dennis 是其中一位用户,McElroy 也是用户,Morris 也是用户。我想大概就这些人了。这就是当时那个小组的用户顺序。贝尔实验室仍然对之前糟糕的操作系统项目心存芥蒂,因此公司决定不再开发操作系统。我们提出了一个建议,想要获得一台 PDP-10,这是当时的一个时间共享计算机,打算把 Unix 移植到这个操作系统上。我们四个人都对这个想法很感兴趣。然而,尽管这个提案的预算完全在合理范围内,它还是被彻底否决了。在贝尔实验室,通常一个人的年薪,包括所有附加成本(如建筑、安保等)算作“全额薪酬”,而公司通常允许的预算是一个人的全额薪酬的两倍左右。所以,如果你有四个人参与,就可以争取到数百万的预算。然而,即便如此,我们申请的 PDP-10 还是被拒绝了,因为公司不再做操作系统。

然后其中一位同事,Joe Joina,想出了一个,说得好听点,谎言。他们说专利局打算购买一个专门用于编辑、存储和修改专利的编辑系统,因为专利有自己特殊的格式和编号需求,普通的编辑软件无法满足。当时有家公司正在为专利申请售卖一些计算机,我们就说:“我们可以做这个,而且还能节省很多钱。”于是第二个提案变成了节约开支,而不是花钱。我们申请的机器也不涉及操作系统,是为别人做的。这是个三赢的局面,难以拒绝。所以我们获得了批准,立刻把 Unix 移植到了这台机器上。

Joe Joina 居然相信了我们,我不知道他为什么会相信,但他确实写了足够强大的宏语言(enroff 和 troff)来处理专利文件。然后我们白天确实在处理专利文件,大概有10位专利打字员(现在可能这个词不太合适)在输入专利文件,我们用机器打印它们。晚上我们就自己用这台机器做自己的工作,但我们不会做任何复杂的事,因为这台机器没有保护机制,如果做一些恶意程序,比如直接写机器语言,它就会崩溃。后来专利局非常喜欢这台机器,买下了它,还给我们提供了帮助。尽管我们仍然无法正式从事操作系统的开发,McMahon 还是为我们争取到了这笔资金。

BWK 28:43
计算中心的事。是的,还有声学部门的人。

Ken 28:47
是的,声学部门的人。对,他们实际上为我们买单了。你知道,贝尔实验室是一个非常特别的地方,他们有太多的钱,因为当时每个电话账单中有1%的费用都会流向贝尔实验室。所以这并不是一个“预算”,而更像是“配额”。

BWK 29:18
对,某种意义上来说,这是一种花钱的许可证,但为了大家的利益。

Ken 29:24
所以我们得到了第一台 PDP-11。我不知道你们中有没有人见过带有 /20 的 PDP-11。我们得到了它,但外设还没到。Morris 于是写了 DC,我想这是第一款在 PDP-11 上写的程序。当时它还在用纸带操作系统,因为磁盘还没到。我们当时在移植一些程序,写一些汇编语言,以便让这台机器可以运行,并为将来的测试做准备。后来磁盘到了,Unix 几乎瞬间就跑了起来,磁盘和远程电传打字机通信设备也到了,DEC(数字设备公司)当时在全力实时构建这些设备。

BWK 30:30
这大概是在 1971 年左右,对吧?

Ken 30:36
对,差不多是 1970 年。

BWK 30:39
不久之后,Unix 最显著的创新之一出现了,那就是“管道”的发明。你能谈谈管道的故事吗?

Ken 30:53
PDP-7 实际上有一个叫做 IPC(进程间通信)的东西,你可以将一些东西存进去,然后再取出来,但它不是很实用。使用它的两个进程必须进行通信。我们曾试图用它做一些事情,但基本上它是个毫无价值的接口,从未在 PDP-7 上被真正使用过。我做这个是因为我的直接主管---部门主任---写了一篇文章,他的文章现在可以在互联网上找到。他的文章提出了一个想法:如果能像网状结构一样连接程序,那该多好。我认真思考过这个问题,但觉得无法实现,因为队列会爆炸或者耗尽,如果你只是让所有东西随机读取和写入这些无序的进程连接。除此之外,我也没有想到什么实际的程序会从这种网状结构中受益。所以我放弃了这个想法,但在 PDP-7 上实现了 IPC,这样如果大家合作的话,还是可以尝试一下。最终没人使用它,这只是个错误的想法。

有一天,我突然想到了“管道”的概念,它基本上就是今天我们所熟知的样子。我花了一个小时将它们放进了操作系统,因为它们真的很简单。当时 Unix 已经拥有了 I/O 重定向和 shell 脚本。我用几个程序测试了一下,它们的效果非常震撼。Dennis 和我一夜之间重写了我们世界里的所有东西。我们抛弃了很多多余的信息,比如 sort 程序不再说“我在排序、我在合并、我在处理这个文件”,所有这些垃圾信息都被去掉了。sort 程序现在只需读取、排序、然后写出数据,它成了一个我们当时称之为“过滤器”的东西。我们把所有处理数据的程序都转化成了过滤器。这是一个非常大的变化,而且非常令人兴奋。

我最喜欢的一个例子是 DC(桌面计算器)。我们写了一个程序,可以将数字转化为单词,比如 50 会变成“五十”。然后我们可以将 DC 连接到这个叫做“数字”的程序,再连接到语音合成器上。你输入“1 加 2”,它会说出“4”之类的,尽管它的数学不太好。这些事情都是自然而然发生的,之前从未想过的程序和功能突然可以通过管道连接在一起。这种兴奋感就像南美洲的食人鱼吃牛一样,疯狂而迅速。

BWK 35:07
我记得那段时间,确实是疯狂的。突然间,你可以做这么多事情,世界几乎在一夜之间改变了。我还记得当时有很多问题想问你。你可以谈谈你在这段时间做过的其他事情吗?比如那天我跟学生提到的一个程序,这个程序从 1971 或 1972 年开始我们就一直在用,甚至比我的学生还要老。它叫做 Grep,你还记得 Grep 吗?

Ken 35:49
是的,我几乎在一夜之间写了 Grep。当时我决定自己不应该是 bin 目录的唯一维护者。如果有共识或者有需要,某些程序可以进入 bin 目录,否则它们就留在我的目录里。我并不想成为那种独裁者。

BWK 36:18
永远的仁慈独裁者,对吧?

Ken 36:22
对,或者说是分发者,而不是上瘾者。所以我把 Grep 藏了起来,自己用它做一切事情。后来 Doug McElroy(我的部门主管)走进来说:“如果我们可以在文件中搜索内容,那就太好了。” 我说:“让我晚上想想。” 那个晚上我做的事情其实就是修复一些 bug,大概只花了一个小时。第二天我就把 Grep 给了他,他说:“这正是我想要的。”

Ken 37:07
于是 Grep 从我的目录移到了 bin 目录,变成了一个名词和动词,甚至进入了下一版《牛津英语词典》。它成了一个真正的词汇。

Ken 37:30
最难的部分是给它起名字。当它还在我的目录时,它并不叫 Grep,我记得它叫 S(代表 Search)。后来我决定给它一个符合实际用途的名字,于是就叫它 Grep。

BWK 37:56
我记得当时 AT&T 有一个广告语,叫做“Reach out and grab someone”(伸手抓住某个人)。我们的副总裁 Arno Penzias(因为发现宇宙微波背景辐射而获得诺贝尔奖)曾经说他可以在一次演讲中使用这个口号,但他想确认一下这个短语的含义,于是他来问我。我向他解释了这个口号的意思。

BWK 38:35
你长期参与了许多语言开发工作,从最早的语言如 B 和 Bon 到最近与 Rob Pike 和 Robert Griesmer 一起开发的 Go。你能谈谈这些语言的演进吗?

Ken 38:52

当然可以。我会尽量简短一些。我的部门主管 McElroy 是我们中最聪明的一个,但他是最不被记住或记录下来的。他有一个朋友,叫 Robert McClure,他发明了一种叫 TMG 的语言。McClure 对他的语言非常保护,甚至可以说是商业化了。他离开贝尔实验室时,带走了 TMG,并且说这是他的专有技术,其他人不能使用。TMG 是一种类似于 Yacc 的编译器,但它不是符号逐个处理的,而是递归下降解析。如果你知道这些术语的话,McElroy 真的在纸上---不是在电脑上---用 TMG 写下了 TMG 的完整实现。写得非常漂亮,没有涂改。

BWK 40:07

抱歉,TMG 是什么?

Ken 40:11

哦,我不知道。

Ken 40:20

然后他用 TMG 写了 TMG。他把这个手稿交给了我,并将代码输入到我的编辑器中,编译之后几乎没有错误,令人惊讶。他在 PDP-7 上用 TMG 写了一个 TMG 编译器,这是我见过的最基础、最简洁、最令人印象深刻的自编译过程之一。于是它就这样出现了,成了 PDP-7 上的一个非常早期的工具。我认为没有一台计算机是完整的,除非它有 Fortran。所以我决定必须在每台电脑上安装 Fortran。

(Evan 41:22 )

(现在。)

Ken 41:25

PDP-7 有 8K 的 18 位字,我为系统保留了 4K,剩下的 4K 给用户使用。于是我用 TMG 写了 Fortran,玩得很开心。但当我第一次尝试运行时,它的大小是系统剩余空间的十倍。所以我开始削减代码,一次又一次地削减,直到它缩小到 4K。我把它叫做 B,因为它刚好合适,没必要再继续精简了。

Ken 42:24

后来我加了一些我喜欢的功能,但它又超过了 4K,无法运行。于是我写了一个版本的 B,叫做“虚拟 B”,它可以从磁盘运行程序,这样它就可以超出 4K。我通过虚拟 B 运行 B 的源代码,希望它能变得更小,回到 4K 以下。这个过程反复进行,直到 B 的最终版本出现。另外,我从 Johnson 那里借用了 for 循环中的分号语法,并把它加入了 B。

Ken 43:59

Dennis 希望把 B 移植到更大的计算中心。他为计算中心写了一个 B 的编译器,称之为 NB(new B)。这个版本被多个大学使用。

Ken 44:57

后来我们有了 PDP-11,内存更多了。我们决定必须用更高级的语言来编写 Unix。当时一切都是用汇编语言写的。Dennis 开始把 NB 改写成 C,最大的改进是加入了类型系统。B 只有字,而 C 加入了字节和类型管理。最终 Dennis 成功地将 NB 转化为 C,我尝试用 C 重写内核,失败了三次,完全失败。由于我是个自负的人,我把失败归咎于语言。于是 Dennis 回去改进语言。

Ken 45:35

当结构体被引入 C 时,Unix 的移植才真正成功。C 成为了一种非常重要的语言。你对 C 也有所参与,是吗?

BWK 46:11

我没有参与 C 的开发,我只是强迫别人写了一本书,哈哈。这是我唯一的贡献。 好,换个话题吧。你最初是电气工程师,对吧?你参与了很多硬件项目,最有趣的可能是你开发的国际象棋机器。你能谈谈它吗? (译者注: The C Programming Language, 数年后的Go程序设计语言 大概成了BWK被拉着去写)

Ken 46:42
我一直对国际象棋很感兴趣。我大概在七年级的时候开始下棋,那时正是鲍比·菲舍尔最辉煌的时候。我和菲舍尔的年龄差不多,可能只差了十天左右,尽管他现在已经去世了。

BWK 46:58
哦…

Ken 47:01
我会回家,然后看到《生活》杂志封面上是鲍比·菲舍尔。而我呢?我和他同龄,刚上七年级。你知道,我该怎么办?所以我感到非常…我不知道,觉得自己没用。我加入了国际象棋俱乐部,在学校下棋,而且下得不错,但我不喜欢。我不喜欢赢,因为…你知道,你会对那些认真对待比赛的人感到抱歉,而大多数人确实很认真。我当然也不喜欢输。这减少了我的选择。不过,我迷上了国际象棋,成了一个国际象棋的观众。现在我知道很少有人这么做,但现在通过互联网,你可以实时观看所有的比赛,而我确实这么做了。比如,我早上四点起床观看白俄罗斯那边的比赛,很棒。总之,回到国际象棋上。所以我决定要写一个国际象棋机器,而不是一个国际象棋程序。我做了。在一年一度的ACM大会上,有一个国际象棋比赛的旁项。我在1972年参加了这个比赛,带着一个用C语言编写的国际象棋程序。我相信,虽然不能完全确定,这是第一个从贝尔实验室出来的C语言程序。在某种意义上。我去和那些用贝尔机和Cray机的人比赛。

Ken 48:50
我被打得头破血流,然后得出结论---速度才是关键。无论我有多好的算法,如果你比我快两倍,你就可以模拟我在做的事情并设置陷阱。这就是常识。

Ken 49:12
所以我回去造了一个小型国际象棋机器。其实,最初我造了一个只接入PDP-11的单板国际象棋机器。PDP-11负责所有的计算工作。我用了它一段时间,了解了它的慢点和快点。它的速度几乎和软件一样快,因为接口太笨拙了。于是我在旁边建造了一台微码机器,它装在一个大约这么方的一盒子里,速度明显更快。我带着它参加了1978年的ACM比赛,并赢了。令人震惊的是,我赢了。然而在1979年的比赛中,我打成平手,或者类似的情况。我记得大概是第二名,可能并列第二或第三。所以我回去“疗伤”,然后遇到了Jokada,他是一位非常有能力的电气工程设计师。他和其他一些人设计了硬件设计工具,可以将屏幕上的图表转换为实物,模拟这些实物,生成电线,并最小化电线。最后一步是我们修改了一个X-Y绘图仪,你会把一个线缠板安装在绘图仪下方,而绘图仪上有一个笔状的东西,但不是墨水笔,而是一个线缠枪。绘图仪会定位到引脚的位置,你取出一根线,缠上去。然后它会移动到该去的地方,你再缠上那根线。你这样做八小时,就有了一台国际象棋机器。我带着这台机器去了比赛。现在这台机器非常严肃。它大概有这么高,从地板到我的腰部,大小大概是这么方。它仍然由PDP-11控制,但有16或17块非常大的线缠板。它把所有对手都击败了,尤其是在对抗B系列计算机时表现出色。这台机器成为了1980年世界冠军,然后成为美国冠军。ACM每年举办美国锦标赛,从大约1980年到1986或1987年,这台机器一直是冠军,直到Cray系列计算机出现。

对了,还有一个臭名昭著的故事---大家知道那次去莫斯科的国际象棋之旅吗?告诉他们,这是个好故事。

Ken 52:57
好吧,所以在1980年我赢得世界冠军后,苏联著名的国际象棋大师博塔尼克邀请我去莫斯科。主要是我从地下消息得知,他们不相信一台国际象棋程序能达到大师水平,认为这是一场骗局,他们想进行测试。所以他们邀请我去莫斯科做一系列演示。实际上,这些演示相当于一场测试。他们安排了一些不同水平的棋手来和我对弈。我很乐意接受这个挑战。于是我打包好机器,准备带上飞机。我从肯尼迪机场出发,机场有一个货运站。他们告诉我,如果我想让机器和我同一班飞机出发,我必须提前一天把它送到货运站。所以我开车把机器送到肯尼迪机场,确保它能按照我的要求安全送达。我还带了一整箱备用零件,以防机器出了问题可以修理。

Ken 54:25
第二天,我去机场的客运站上了飞机,降落后有一大群重要人物来接我,但他们把飞机的货仓清空后,我的电脑却不见了。我说,我已经尽力了。于是他们开始各种调查,告诉我第二天会到。第二天,又一大群人去接机,但机器还是没到。这样的情况持续了好几天。

Ken 55:05
贝尔实验室的安全主管对我很熟悉,原因有点复杂。顺便说一句,我曾经有“杀人执照”,如果你知道这是什么意思。Vic的文件里写着,如果我在某个奇怪的地方被抓住,不用担心,我有‘免罪卡’。Vic曾让我尝试闯入各种设施,如果被抓住,我有不用坐牢的特权。所以我在某种程度上是一个安全专家。安全主管叫Crude,他手下的一个人曾在肯尼迪机场货运站工作,后来离职了。

BWK 56:18
继续说,时间快到了。

Ken 56:28
他们告诉我,机器在机场的某个地方,上面缠着黄色的警戒线,写着“不要触碰”,还有一个电话号码。没有其他任何信息。通过这个线索,Crude和贝尔实验室的人进行了调查。他们找到机器,但没有人敢碰它,因为上面有警戒线。你打电话过去,如果没有正确的密码,他们就会挂断电话,没有其他回应。我的莫斯科之旅因此被取消了,苏联那边的人非常生气,认定这是一场骗局。所以我回来了,证明了他们的怀疑。

Ken 57:42
贝尔实验室的电脑程序其实是当地国际象棋俱乐部的一员。我每周五晚都会带着它去俱乐部,一方面是为了了解它的等级,另一方面是为了平息大家的紧张情绪。因为你如果从来没有和电脑对弈过,会吓得不知所措,觉得电脑是个怪物。我还举行了同时对弈的表演赛。所以这台电脑在俱乐部里非常受欢迎。那天我独自去了俱乐部,因为没有带电脑,大家都问我机器怎么了,能不能和它下棋。我于是讲了这个故事。下周我又独自去了俱乐部。俱乐部里有个人在长岛的一份免费报纸工作,他告诉编辑这个故事,编辑想写一篇报道。我说可以。于是我们聊了很久。大约两周后,报道刊登在那份长岛报纸上。两天后,《华盛顿邮报》联系了我。我把整个故事告诉了记者。他说他会帮忙调查。

Ken 59:31
十分钟后,他打电话给我说他找到了相关人,知道他们想要什么,事情的来龙去脉都清楚了。事实是,正好在我把电脑送到机场的前一天,里根总统发表了一份声明,提到“技术外泄”,说美国在无偿输出技术。而我在电脑上写满了“电脑,莫斯科”这样的字样,结果不出十秒钟,它就被扣押了。他们想尽可能低调地解决此事,因为《华盛顿邮报》已经报道了。这篇报道写得很好。第二天,各大媒体都开始联系我,美国《科学》杂志、《科学美国人》、《流行机械》、甚至《体育画报》都来采访。最后,事情曝光后的一天,有人打电话给我说:“我们找到了你的电脑,想还给你。”我说:“好啊,寄过来吧。”但他们说:“你不明白,这台电脑的出口是非法的,我们不能就这么还给你。你得交罚款。”我问他们:“罚多少?”他们说罚款是非法出口物品价格的10%。于是我告诉他们,电脑的零件总共价值1.7万美元。对方沉默了一会儿,说:“你不明白,我们只会罚你10%的价格,而且这东西肯定是二手货吧?”最后他们把罚款降到了几百美元,贝尔实验室付了罚款,第二天电脑就送到了实验室大厅。

BWK 01:02:20
Evan,时间怎么样?

Evan 01:02:23
我有点糊涂了,刚才我们在聊的是国际象棋,不是Unix。

Ken 01:02:27
不好意思。

Evan 01:02:30
好吧,我不知道话筒能不能用,我就大声说吧。首先,感谢你们。

Evan 01:02:52
请举手,如果你们的职业生涯依赖于Unix和C语言。

Ken 01:02:58
对吧?绝对的。

Ken 01:03:07
我能请你们再举一次手吗?谢谢。那么,大家是否同意延长一下时间?

Evan 01:03:23
Ken已经非常慷慨地同意留一会儿。我们预计会有一个接待环节,请大家简洁地和他交流,不要占用太长时间,因为其他人也需要机会。之后我们会带他去Unix展览区,大家可以合影、签名,但请尊重他的时间和其他人的时间。




英语原文:

Evan 00:00
Well, thank you. So my name is Evan and I'm the soccer who volunteered to run this thing. Thank you.

Evan 00:14
Thank you. A lot of people give me credit, but it's because of 40,50,60 volunteers year round that this happens. I could do nothing alone. I used to, that's, I got used when I did it alone. I had hair. So our hashtag throughout the weekend is VC at east. Please use it. And that's our website. Could somebody advance a slide, please?

Ken 00:36
Nobody's at the slide.

Evan 00:37
Oh, here. I'll do it. Okay. I volunteer myself. Okay. Okay. So how many of you knew a guy named Dan Rugandi? Okay, so Dan Ragandhi was one of our original members of our group, like in 2005, last year, he couldn't make it here because he was fighting stage for cancer. And unfortunately, he did pass away. His daughters are here. I know he'd be very proud of that. Dan used to design all old t shirts, all the old really awesome t shirts. So anybody has one as a Dan? So we dedicate this year show to my friend Dan.

Evan 01:15
Special thanks to Infoway Science Center for hosting us hack a day, our sponsor. A few days ago, hackeday tweeted us to 400,000 people. ACM treated us to 40,000 people. Bell Labs tweeted us to 20,000 people. And ours technical tweeted us to 1.1 million people. What if they come when you all walked in, you got a little miniature program booklet. One side is yesterday's schedule, so ignore that part. But on the bottom of that, there's a QR code for a show survey. We need to know how we did. We can get better next year. And you can win a publisher or a VCF swag. So please fill that out and you can give it a front desk. I'll talk about some improvements in our museum real fast. We recently installed security cameras. Yes, that's Morden.

Evan 02:11
Last year, our network consisted of a Raspberry Pi verse over a Linksys home router and a consumer grade little UPS and that and a couple of 50 dollar closeout discount tablets. Now we have a proper network. Minute Man donated a brand new rack. Now UPS, we have real servers and Cisco equipment and the whole 9 yards. So real network now is a nice thing to have and access points on the ceilings and Poe and everything else. So it's pretty awesome. And that's all thanks to your donations from the event to raising money so we could do things like this.

Evan 02:48
There is a computer called a VAX 9,000. It is the computationally and physically largest computer deck ever built. There were about three dozen ever made, and we got the last one. It was in service six months ago by an Air Force defense contractor in Colorado who won't tell us what they did with it. Our policy is we only accept donations. We do not purchase artifacts. They were happy to give it to us, but we had to go get it from Colorado. One member, you know who you are, gave us a five figure check to hire a tractor teller to do it. Thank you, sir. And our plan is to restore it. It doesn't just, yeah, so we need a bigger space to put it on display and we need a capital fund where just beginning over the next five years or so to raise a quarter million dollars to have a bigger building here on campus. And again, events like this enable that to happen.

Evan 03:49
My girlfriend, Charlotte, who is at the front desk, you met, we decide to make a big arrow putting to our information kiosk. It is not the blue rack or the IBM 1130. It is in the middle between them. You can't see it. Yeah, well, oh yeah, it's, I don't know how that's the next slide. That should even maybe it is there. I don't know. But anyway, that is the information kiosk. It picture doesn't do it justice. It's a touch screen monitor in a little PC. We want to have four or five or six of those throughout the museum.

Evan 04:18
Again, these things cost money. So we have events. We made the arrow, the big arrow. We did not intend for it. It looks like an Amiga cursor, but it does. So that was a happy accident, very happy accident.

Evan 04:33
There was a store in Manhattan called Tech Serve from about 1980 to a few years ago. They went out of business and they auction all their assets on eBay. Somebody in Los Angeles had a brother in New York who was an apple fan. As a joke, the guy bid on the auction like a hundred bucks, took a screen capture, sent to his brother in law. Aha, been in the sign. Two weeks later, got an email, you won the auction. Local pickup only in New York. The guy's brother was like, I don't want it. My wife, believe me. So the guy in LA, he spent like called the museum in actual history to Smithsonian. No one given the time of day, 20 calls later, someone told about us and he said, please take a sign. That was a few years ago. One of the new things this year, next to the consignment room, we have a software store. And we hung this on up in a software store. And thanks to Tony and Jason, we powered it up. I was reading an article in the local newspaper a few weeks ago about an abandoned local shopping mall. I was just bored scroll through the pictures inside the mall and saw a Radio Shack store of the sign and the article said who had a management company was. So you know what I did. And this summer we're getting the Radio Shack store sign. If anybody wants to donate an artifact or donate funds or volunteer or just take part or otherwise learn about us. Please call me, email me anytime. So highlights us here, we have two exhibit halls. Historically, people only find a first exhibit hall and don't go down around to the second one. What's funny is we get rave reviews of people who saw, they think this on a whole show, they rave about it. Said, do you know there was a whole second bigger exhibit hall and they rave about first. So please see both exhibit halls.

Evan 06:22
The second exhibit hall, we have a special exhibit called Unix Town and a special Atari exhibit this year with like 1415 exhibits, all Atari Unix. Cuz tomorrow is Joe to cure from Atari and Amiga. And you know, a few years ago when we had Brian here as a speaker, it was a room like this, totally filled out as a tent, actually. And the next day, Bob Franklin from Visakau had to fill his shoes. And I said, then I'll send now, I feel sorry for Joe to cure tomorrow from Atari, cuz he can't possibly put your shoes.

Evan 06:51
Can we have a vendor room by the front lobby? We have a huge consignment thing down the hall here, the software store. We have glitch works workshop, Singapore computers learn to solder workshop. Our museum will be open. The rest of the museum, Soviet as well. Down the street, the satellite dish and food, all this stuff has to be staffed by our volunteers. So after this speech, let them do their job. Give them 10,50 minutes to open everything up so the exhibitors can get through exhibits before you guys do. But you didn't come to hear me. So Amanda, does anyone not know who Kim Thompson is? Okay, okay, good. Without any further delay, Mister Ken Thompson, co inventor of Unix.

BWK 07:47
And Brian Kirk.

Evan 07:49
And Brian Kurdigan, the KK and R.

BWK 08:03
Okay, so somebody turns that thing off or stands in front of it. Maybe you want to move out of the doors and in front of the projector. That would do it. Great. Okay. Yeah, and I'm going to sit as well so that I don't fall off the stage. So what we're gonna do today is a fireside chat, and I suppose somebody could put out a little, you know, Yule Lugger or something like that. Better. Okay. Yeah, we don't need that.

BWK 08:38
So Ken and I were at Bell Labs together very long time ago. He arrived at Bell Labs in the mid 60s. I'll let him say more about that. And I arrived as a summer intern in 67.

BWK 08:50
Unfortunately, this is one of these, you know, boy, talk about being in the right place the right time by blind luck, I was in the same group as can. My office was directly across the hall from hidden for about 30 years. We retired essentially the same day in 2000 and went separate ways, but we've kept in touch it over all of that time. And actually, this week, I think is the first time that I have seen him physically since we left Bell Labs. He hasn't changed. So it's actually been fun. On Tuesday, he gave a guest appearance in my class at Princeton with a group that was much smaller than this and substantially younger, but maybe not even dressed in the same kinds of t shirts. Anyway, we had a great time with that as at the fireside chat idea. And so basically what we're gonna do is the same thing here. I will ask Ken some leading questions, let him do all the talking, and then part way through, we will encourage the audience debt ask questions as well. Okay, so that's where we're going. And to do that, pull out my little set of notes, one piece of paper too. Small print. Yes, yes. Okay. Something that Evan didn't mention, by the way, is that Ken obviously created the Unix operating system with Dennis Ritchie, a system that we all know and love and have used for a very long time. He's been recognized for that with all kinds of awards, and I will not embarrass them by going through too many of them, but it includes things like the ACM's Turing Award in 1983 in the National Medal of technology and the Japan prize. He's a member of the National Academy of engineering and the National Academy of Sciences. And the reason that he's on the East Coast, normally he's in California. The reason he's on the East Coast is that on Thursday, he was inducted into the National Inventor's Hall of Fame in DC.

BWK 10:57
So let me, at this point, stop talking and can, why don't you tell us a little bit about early life and in particular, how you got to Bell Labs.

Ken 11:07
Oh, I was in school in Berkeley, and I was, I don't know if the term still applies, but I was a professional student, right? I just drifted along. I, you know, rolled in class. I got an electrical engineering degree, but it was easy because I was an electrical hobbyist for essentially 10 years before that. And, but I consume computers. You know, I love them, you know, and at that time, there was no computer science curriculum at Berkeley. So it was being invented and there was a big political fight between electrical engineering and math to decide who gets this new brown. And the fight, although they didn't know it, was whether it was going to be mathematically computer science or computer science and the computer people one.

Ken 12:12
So I was drifting along the summer after I graduated and that was a surprise cuz I didn't know that I'd gotten all the requirements. I was just gonna stay in the university because I owned it. I don't know how to describe this, but my fingers were in absolutely everything I had. Well, the com, the main monster computer at the university, shut down at midnight, and I'd come in with my key and I'd open up and I'd be my personal computer for the, till 8:00am. So that's the kind of thing.

Ken 12:52
So I was happy I wasn't, you know, no ambition, no. So is another way of describing extreme work. I mean, I was workaholic, but for no goal. There was no goal out there for what I was doing. And a teacher who happened to be a one time, a one year teacher from Bell Labs came out, taught a real computer course, which I took, audited. And after that, in the NE, in the next summer, I didn't apply for graduate school. To be honest, I didn't think I was good enough. And right towards the end of the summer, my, this friend, me now friend, gave me a class schedule and says, here's your classes for grad school. He had applied and I got accepted. And I think it was with his recommendation, but I'm not positive, and enrolled. And that's how I got into grad school.

Ken 14:00
Then during that year, there's big recruiting towards the end of that year where all the companies come out and try to do this. And I didn't recruit. I didn't go to any of these. They had booth lined up in the gym, you know, one after the other. And I kept getting schedules, be it the Bell Labs booth on, you know, such and such a time. And it just went over my head. I wasn't interest until finally the whole week had gone by and I'd skipped maybe six or eight recruit attempts by Bell Labs. Again, you know, no ambition.

Ken 14:40
The Bell Labs recruiter came and knocked on my door at home. I invited a man. And his story is, I don't remember it, but his story is that I gave him Ginger Snaps and beer for, and we talked and then he left. So that was my recruiting for Bell Labs.

Ken 15:02
Then I got a request to come out for an interview to the East Coast, to New Jersey. And I told him no. And they said, well, why not? And I said, well, I'm not interested in a job commercial, in a commercial institution. And I just be taking your money. I don't feel right about taking your money to go out there. And I says, we'll take it. Okay. Come on, visit us. Come and look.

Ken 15:32
I said, well, I, I could. I have friends on the East Coast from high school days and I could come out and interview, you know, they want two days of interview. And I said not only one and then I'll get it and I'll drive down the East Coast and visit all my friends. And they said, okay, okay. And I said, but be warned. I mean, the answer is no, I don't want a job. So I went out there and the very first thing I did was walk down the corridor of the first place I went, which was research, computer science research at Bill Laboratories. And every name on the doors on the way down, I knew, you know, and it was just shocking. And then I was interviewed by two amazing people. One of them is a big co author with Brian Shinlin. They did the traveling salesman heuristic programming. And so I got then I got my Renna car after the day and I drove down East Coast and that. And somehow they tracked me and there was a there was a offer waiting at like the third stop down the East Coast. And I picked up the offer and drove it from one stop to another, which was maybe two hours thinking about it. And then when I got to the next friend's house, I called him and said, okay, so that's Bill Apps, 35 years.

BWK 17:11
Yeah, I chose it back in the good old days, some people really knew what they were doing, not Ken, but bell lenders. So once you got to Bell Labs, obviously there was a work on a variety of things, one of which was maltics. And out of that experience came Unix. Do you wanna talk some about that sort of evolution, how you got started into that.

Ken 17:36
Part of. Oh, well, motics. I don't know if anybody. Well, have you studied archaeology? Like was a monsterly over engineered over big project and it's a typical second system syndrome where they had a very nice time ensuring system at MIT and they decide they were gonna do the next one better. That's kiss of death. And so they cooperated in a, in a Three Way thing with MIT, Bell Labs and general Electric provided the machine. It couldn't run on a normal machine. It had to have its own machine monster. And then programming was done at Pelebson on, but it was mostly designed at MIT. And so we got these things, you know, do this, and we did them. And mostly I was uninspired. I do it and it was good work. I mean, you know, I was a pretty good programmer. I just didn't know what I was, you know, it was a notch in a big wheel. And, and I, and it was producing something that I didn't know I didn't wanna use myself at some point, management realize this, Bill Labs management, and they backed out of the project. So it now became just not General Electric, who was the follow on re. Honeywell and MIT and Bell Labs backed out, but they back out with a nasty taste in their mouth.

Ken 19:23
You know, we don't do operating systems. No, you know, and here I was, I wanted to do operating systems. So I actually found a, it was called a workstation. It's PV7. There was a remote job entry for electrical engineering circuits. You draw a circuit on a CRT tube and you push a button, the circuit goes into the main computer. By way of datasets, kind of, you know, telephone lines. And they do the crunching and they come back and then you can get the transfer function of various sorts on, on your, on the screen, all electrical engineering. I just took it over and made some games on it. The, the, the, there was a, there was a, one of the nice things about this is that had a monster had this horrible, you know, kind of round scope like old TV, you know, about this big around. But it had a hood that went like this and bifurcated your eyes. And, you know, that was great. So I built a little shoot him up space thing where you two guys out there in a very large space and when you find each other, you start shooting at each other. And if you get on their tail, they can't get rid of you. So you're gonna win if you can actually maneuver to get on their tail. But as you get on their tail, you see all their fire coming out around you. It's, it's pretty, it was fun. And, but you had to have a partner.

Ken 20:52
So that's what I used the telephone sets for. There were probably 10 of these remote job entry stations around. And I arranged to have them all loaded with my program and somebody just wander over, look in and choose, you know, you know, any one of the combinatorics to find out who you're gonna fight. And so you're sitting there and you don't know who you're fighting and you're just so, I'm sorry, I'm wasting too much time.

BWK 21:19
Press on. No, I not even heard a great story.

Ken 21:24
Next thing was a. I was interested in a disk. This PDP7 had a disk. No other PDB7 had one like this. It was 6 feet tall and a single platter. And the platter was on the vertical around. And there was kind of a folklore, you know, you don't stand in front of it, you don't stand back of it, because if it lets go, it'll be like a propeller on an airplane going through. And it was fast. It was too fast for the machine, which was, you know, kind of a shame you couldn't make good use of it.

Ken 22:01
But I wrote a disk scheduling algorithm to try to maximize throughput on potentially any disk, but in particular, this disk got it going. But then I had to taste test it. I had to load it up with work. I mean, you don't, you don't, you know, you know, you don't say read to get something back. That's, any desk can do that. So I had to, you know, load it up, get it really, you know, test its throughput under different algorithms and things. And for that, I needed some programs on the side to do that. And so I started writing these programs on the side. And at some point I realized, without knowing it up until that point, that I was three weeks from an operating system with three programs, one a week, an editor. I needed an editor to write code. I need an assembler to turn the code into language I could run. And I needed a little kernel kind of overlay, call it an operating system. And luckily, right at that moment, my wife went on a three week vacation to take my one year old roughly to visit my in laws who are in California. Disappeared all alone and one week and we had Unix.

BWK 23:44
Yeah, I think programmers aren't quite as productive these days as they used to be. So from that PDP7, things went on somewhere. You enlisted Dennis, or who you enlisted you. Do you wanna say more about how that evolve? Oh, I've.

Ken 23:58
When Unix was running, it was by far, even though it was a crummy little, you know, factor of 10 slower computer than the op, you know, the comp center. I started picking up really impressive users on this machine. It had two stations. It had the, I put a scribble text on this scope. That was one station. And then I had a Model 33 teletype on the other one. That's the. So two at a time.

BWK 24:34
Were you on the 7? I don't know. I have a single digit user ID on one of those systems.

Ken 24:39
Okay. Yeah, Dennis was a user. Mcelroy was a user, Morris was a user. I think I was about it maybe. Yeah, that was that was on that was the order of the user community on this single machine. The bell app still had a nasty taste in its mouth from its horrible s, you know, operating system, no more operating systems. So we made a proposal to get a P to B ten, which was like the time sharing computer of the day to port Unix onto, you know, this operating signal, which everybody, meaning the four of us, like. And it was soundly rejected when it fit into the typical budget of somebody requesting something, usually a single person at Bell Labs could consume roughly their loaded salary in a year on the side. So the notion was that somebody's salary, their loaded salary that included the building and the guards and the thing, their loaded salary twice over was kind of the budget for Bell Labs. And so, you know, you get four people together, you can get multi million things, you know, five people. So we were well within budget and we asked for this PDB tenant and said, no, we don't do operating systems, we don't do it. So one of our fellows had, Joe, Joina, yeah, came up with a, I'm trying to use a better word, lie where they were going. The patent office was going to buy a special purpose editing complex to edit, store and modify patents. They have their own formatting requirements, they have their own numbering, they're unique, no normal editing thing. So some company was gonna try to, I was selling some computers, you know, for patent applications. And we said, aha, we can do that and we'll save all this money. So the second proposal was to save money rather than to spend it. And for a machine that wasn't on no operating system, honest, and it was for somebody else, it was all, you know, you know, as a Three Way win, it was impossible to say no. So we got it and instantly reported you next to it. And then Joe Asana believed us, which was, I don't know why he did, but he wrote what enroff and t. Roff with enough macro power to do the patent. And then at some point, then we were actually doing patents during the day. We'd have a 10 patent secretaries, I guess, which is dirty word now on typing in patents and we print them in it. And, but we do our own work at night, but we wouldn't do anything serious because this is an unprotected machine and would crash if you do anything remotely malicious like, you know, writing s machine language. And then the patent office took our machine. They loved it and bought us with the help of an adjacent, still we couldn't be in operating systems, bought it with the adjacent McMahon.

BWK 28:43
Computer center stuff. Max. Oh, yeah, the acoustics people.

Ken 28:47
Yeah, acoustic people. Right. They actually footed the Bill and said here, you know, cuz Bill Labs was a special place. It had so much money, you couldn't it, there was a tax on every phone in the whole country, and 1% of that went to the Bill apps. I mean, it's boom. So it was a, I think this is your word, it wasn't a budget, it was a quota.

BWK 29:18
Yeah, yes. So a license to spend money in some sense, but for the good of everybody.

Ken 29:24
So we got, now the first one was a PDP11. I don't know if any of you have seen a PDP11 with a slash 20 on it. Note slash 20PDP11. Okay, there are virtue of made. We got it before the peripherals came and Morris wrote DC. I think it was the very first program ever written on the PDB11. And it was while it was still a paper tape operating system because the disk hadn't come. And we were doing some porting and writing an assembly that we could live with for that machine and some other things in preparation and testing it with the assembly language for DC. And then when it came, it almost came up Unix almost instantly when like the disk in the communications, teletype, remote teletype communications gear came in, which deck was feverishly trying to build in real time.

BWK 30:30
So it was not very, this would probably be roughly, what, 71,70,71 that.

Ken 30:36
Year, right? 70.

BWK 30:39
So it wasn't very long after that. The, I think in some sense, the most obvious new contribution of Unix came along, which the invention of pipes. You wanna say something about pipes?

Ken 30:53
The PV7 actually had a little thing called IPC inner something connect communication and you could stuff something in and pull something out. It wasn't cute. It was just something. But it, both processes that did this had to communicate. And we experimented with it for doing some things, but base basically it was a worthless interface and was never known or described or used on the PDP7. I did that because my immediate supervisor, department head is the name of the title. Yeah, wrote a paper that he is come around the internet. It it's online saying wouldn't be great to kind of connect programs up like in a mesh in a, you know, and I thought about that seriously and decided that I just couldn't make it work because of cues would explode or cues would draw if you just kind of let everything just, you know, read and write these random mesh kinda anarchy, you know, connection of processes. Also, I didn't think of any real program except the mesh like programs today, whether, you know, these kind of things where it would be any good would be worthwhile. So I put it off. I put this IPC in the 7 so that it was possible to actually do that if you wanna, if they were all cooperating. It was never done. Nobody, it was just, you know, it was a wrong idea. And one day I got this idea and pipes, you know, it's essentially exactly as they are today. And I put them in the operating system in an hour. They're trivial. They really are super trivial when you've got redirecting Io like Unix already had and rotishell. And I tried it out on a couple of things. And the idea was, it was just mind blowing us that Dennis and I came in and rewrote everything in the world, our world in one night. We converted everything. And then Mo, what mostly what we did is throw out extraneous messages that like sort will never say, hey, I'm sorting, you know, I'm merging, I'm doing this, I'm working on this file. All that good, you know, all that garbage is gone, you know, sort would read, sort, then write, and suddenly sort was what we call a filter in the in that day. And then we converted, filled everything that process something, we convert it into filters. It was massive and just exciting. And my favorite thing was DC, again, desk calculator. We wrote a program that would take numbers and convert them into words. You know, you look, 5,0 would turn into 5,000, right? And, and so you could connect up DC to numbers, this word thing called numbers. And then we had a speech synthesize and you connect that to the speech synthesis. And you'd go 1 to, you'd type one to plus and it would say 4, you know, whatever it would say was never good at math. And those kind of things just came spontaneously, you know, just, you know, interconnections of things that were never meant to be in the same room together. So anyway, that would, that would, that was a frenzy. It was almost like a, like these fish eating the cow, you know what South American fish. Piranha.

BWK 35:07
No, I remember that. It really was frenzy is the right word. It was like, wow, look at all these things you can do. And the world changed essentially overnight at that point. So I've got a bunch of things here I wonder about. Do you want to talk about some of the other things that you have done over the years that are in and around this? For example, a program that I was telling class the other day, they've been using, we, all of us have been using since probably about 1971 or 72. So it's much older than my students. It's not older than some of you, but it's older than many of you. This program called grab. Remember grab?

Ken 35:49
Okay, I wrote Grep almost as it is, right? And had it. At some point I decided that I shouldn't be the pusher of the bin directory. I, you know, that if there was a consensus or if there was a need or something, then something I might have written but would go into, but things I wrote would go into my directory, you know, and I didn't wanna be the, I don't know, what's.

BWK 36:18
The word, benevolent dictator for life. The, yes, yes.

Ken 36:22
Yes. Or the addict, you know, the pusher, not the addict. So I had grep squirled away and I'd use it for everything. And again, Doug Mcelroy, my department head, came in and said, you know, it would be really great if we could look for things in files and do this. Nice. Oh, let me think. I'll think about it overnight. So the overnight thing was basically getting rid of bugs and things that I'd meant to do that I had done and, you know, an hour work maybe at most. And next day I presented him with grep and he was, that's exactly what I wanted.

Ken 37:07
So grip moved from my directory into the bin directory and became a noun and a verb and is a, the next version of the OED had it in. It is a real word too.

Ken 37:30
The hardest part was naming it. And it wasn't called grip when it was mine. And I think it was called s for search some, you know, something in my vocabulary and and so anyway, Grep came up when I decided what it was really what it was.

BWK 37:56
Yeah, there was for a while a bumper sticker and a slogan that at and t put a called reach out and grab someone. Do you remember that? And I, at the time, our vice president of research was Arno Pansius, you know, winner of Nobel Prize for finding the background, identifying a background radiation of. And somebody said that he could use this in a talk, you know, reach out and grab someone, but he wanted to be sort of sure what that meant. And so he asked me, you know, is this okay and what does it mean? And so I got to explain it to him.

BWK 38:35
Other things that you've been involved with for a long time include languages that were the very early languages like B and bond and even before that and all the way through now to your work with go with Rob Pike and Robert Griesmer. You wanna talk about languages and evolution and.

Ken 38:52
I. Sure as well. So I'll try here really history again, my department in Mackleary keeps coming up. He's the smartest of all of us and the least remembered or written down of all of us had a friend, Robert Mcclure, who had a language called TMG. And Mcclure got very defensive, what's the word, commercial, about his language and wouldn't let it out. And when he left Bill Labs, he took it with him and said, you can't, you know, proprietor, you can't touch it. So it was a compiler, a yak like thing, but it was not a symbol at a time. It was matching, it was doing recursive dissent, if you know the terminology. He, Mcelroy, sat there and wrote on a piece of paper, now not on a computer, TMG, written in TMG. Okay. Complete. He just did it right. And it was beautiful handwriting. It was no scratches. I mean, it was Cmgs.

BWK 40:07
Pardon? GMG is transmogrier.

Ken 40:11
I didn't know that.

Ken 40:20
And then he now has TMG written in TMG. He decided to give this piece of paper to his piece of paper and write down what came out, the code, which he did. And then he came over to my editor and he typed in his code, assembled it, and I won't say without error, but with so few errors, you'd be astonished. He came up with a TMG compiler on PDP7 written in TMG, and it's the most basic, bare, impressive self compilation I've ever seen in my life. All right, so anyway, it was there. It appeared it was a tool, very early tool on the PDP7. I decided no computer is complete without Fortran. It's gotta have Fortran on every. Nobody will ever buy a computer without a Fortran. So.

Evan 41:22
Now.

Ken 41:25
The PDB7 was 8K of 18 bit words. And I ripped off 4K for the system, right? I, that was mine. And then the user swapped through the other 4K. And so I was writing 4 tran in TMG. I was having a great time. And then the first time I tried to actually do it, it was like 10 times the size of the thing over there. So I started cutting pieces out of it, you know, like, you know, down and down and down and down and down. When it finally got down to 4K, I called it B and and, but it was right at 4K because it came from above, right? There's no reason to stop when you get to where you want.

Ken 42:24
So then I put features in that I liked, and it would blow over 4K and not run. So I wrote a separate version of B, which was a virtual B that would run the program out of disk. And so it would grow over 4 k. I'd run it on virtual B to get the B source. The B source for both of them were the same. And hopefully what I wrote was a compaction of some sort, so it would get smaller, so I'd go under 4K. So I could bring it back to being roughly real time kind of, you know. And this went over and over until the final version of B. There was one other added thing to B, which was I saw Johnson's semicolon version of the for loop and I put that in. I stole it and that went virtual and then came back down again. And then Dennis took it and wanted to put it on the, the comp center, the big comp center. And he wrote a compiler for B for the big comp center. And he called it newbie and NB. And it was used to some extent, and it was externally ported to use several universities.

Ken 43:59
And then he decided that wasn't enough at this point. Time had gone on, and we now had a P2P eleven, and we started getting more memory for the PDP11. So we could think about expansion. And we decided that we had to write Unix in a higher level language. It was just mandatory. This was all assembly language digital then. So he started muting newbie into C of with may. The big deal was types. You put types in B, b and b. And the old C were very similar languages except for all the types. New B only had words. You load, store, ad, everything was words. And the PDP11 was bytes. So something had to be done to not waste a factor for on it.

Ken 44:57
So anyway, I'm long story sort all by himself. He converted that made C. I would then try to rewrite the kernel and C that, you know, whatever this current language was, which was called C. And failed three times. Three total complete failures. And being, I basically being an ego test, I blamed it on the language. So he'd go back and beef up the language for something.

Ken 45:35
And then finally, when structures came in, the way that structures did come into the language, which is completely outside of BB, had nothing resembling structures. The port to Unix of C on the PDP11 work, you know, it was before that it was too complicated. I just couldn't keep it all together. And so then there was as the first C version of Unix. And C became a pretty, you had something to do with C, didn't you? Are you know.

BWK 46:11
I had nothing to do with C. I twisted a guy's arm into writing a book, but that's the stand on my DOC. Okay. Shifting gears a bit, you started life as a, or some part of it, as an electrical engineer. You've been involved in a lot of different hardware things. Perhaps the most interesting piece of hardware that you were deeply involved with was chess playing. Stuff you wanna talk about chess? Oh, yes.

Ken 46:42
I've always been interested in chess. I played it when I was like in the seventh grade because that's when Bobby Fisher was right at this hot height. When I was at 7, maybe Fisher and I are like 10 days apart in age, or, except that he's dead.

BWK 46:58
But, so I.

Ken 47:01
I would come home and on the cover of life magazine and be Bobby Fisher. And here I am, exactly the same age and I'm a seventh grader. You know, what do I do? And so I felt very, you know, I don't know, worthless. And I joined the chess club and played chess and, and school and was good at it, but I didn't like it. I didn't like to either win because, you know, you know, you feel sorry for, you know, somebody who would take it seriously. Most of them really do. And I didn't like to lose, of course. And that cut down on my options, you know, so, but I got hooked on chess and I was a chess spectator as a spectator sport. Now I know very few people do this, but like now on the internet you can get all the tournaments in real time and watch them. And I do, you know, I get up at 4 in the morning to watch something happening in Belarus, you know, and it's great all the. So anyway, back to chess. So I decided was gonna write a chess machine, not a chess program. And I did. And the annual ACM tournaments, ACM conventions had a chess tournament sideline, and I went to the first one in 1972 with a C program that played chess. And I believe, but I'm not positive, that it was the very first C program that got out of Bell Labs. In some sense. And I went to play against all these on bells and Crays and, you know, on and on, on.

Ken 48:50
And got my head handed to me and came to the conclusion that speed was what matters. That no matter if I had an algorithm and you had an algorithm and you went twice as fast as me. You can emulate what I was doing and set traps. You know, I mean, it's just, that's just, it's just normal sense.

Ken 49:12
So I went back and built a little tiny chess machine. Well, actually I built the first one was a one board chess machine that plugged into a PDP11. And then PDP11 did all the work and played with that for a while, got ideas where it was slow, where it was fast. It was almost the same speed as the software because the interface was so clumsy. So then I built a microcoded machine on the side, which was now in a box about this square. It was significantly faster, and I took it to a 78 AC end tournament and won it. You know, it was shocking. And, but then the 79 tournament, I tied or something like that. Basically, I didn't come in. I came in like, call it second, maybe five for second and third. And I, so I went back, licked my wounds, and then I ran into Jokada massively competent design, electric engineering design. And he built a bunch of, he and some other people design a design tools for building hardware that would take diagrams on screens, convert them into things, simulate the things, produce wires, minimize the wires. And then the last step was that we modified an X, y plotter. And you would mount a wire wrap board underneath the X, y plotter with a pen sticking up towards the. And the plotter instead of an ink pen had a notch, just a, you know, just a, a, a, a, a sider, a site or. And you'd have a wire wrap gun in your hand and a bunch of wires and it would come and say, it would go to position itself. The X, y platter would position itself over one of the pins, and you'd take out a wire and zap it on and then it would go to where it was supposed to go. And you go over there and zap it on. And you do this for eight hours and you had a chess machine. And I took that chess machine and now this one was serious. I mean, this was really serious. And it was about this tall from, not the floor, but from my floor and about this square. And it had, again, it was run by a PDB11, but it had 16,17 very large wire wrap boards that were about this big, right? And I don't know anyone often it just trounced to everybody and against B kills, you know, it really does. It was the world championship champion in 80 and then the US champion. The US was the eight, the name for the tournament that the ACM held every year, that it was the US champion from roughly S80 till 86 or 87, until the craze started coming out. Sorry. Infamously, by the way, infamously. Does everybody know the Moscow trip of chess? Tell him. It's a good story.

Ken 52:57
Okay, so I was invited after I won the world championship in 80, I was invited by Botanik, if you know who that is, a very famous chess layer in the Soviet Union, to come out. And mainly I heard from my friends underground is they didn't believe that a chess program could be a master. It was a hoax, and they wanted to test it. So they invited me out to Moscow to give a set of demos. And the demos were in fact were a test. They had ranges of strengths of people they were gonna put in tournaments with me and play. And I was happy to do it, you know. So I package it up. And I wanted to be on the plane that I was on out of Kennedy. And Kennedy has a freight terminal. And they said if you wanted to be on the plane you're on, you have to come out and bring it out the day before. So I got my car, drove all the way out to Kennedy, gave him this computer with whole bunch of words on it to make sure that it got to where I wanted it to go and legally Bell Labs and made a carney for it. You know, it would export, import, export, you know, kind of thing. A lot of paperwork, a lot of, you know, and I packed a suitcase full of spare parts so if anything broken this thing, I could just fix it, right? And left it at the freight terminal.

Ken 54:25
Next day, I go out to the passenger terminal, get on my plane, land. And the, the, the, a big contingent of very special people meet me and they go out and they empty the plane and it's not there. No. And I say, well, you know, I tried. I really tried. And they, so they make all sorts of inquiries and says, come be here tomorrow. Oh, right. So big contingent goes out. The next day, it's not there. And this goes on.

Ken 55:05
And now in the background, we were well known. I was well known by the head of security of Bell Labs for various kind of strange reasons. As a real quick side thing, I had a license to kill. I don't know if you knew this. And Vicks file folder saying if you're caught in a funny place, don't worry. You know, he's, and Vic had me try to break into various things. And if I got caught, I was a get out of jail free card. So as a kind of hands on security expert. So anyway, I was known by the secure, the head of securities name was crude. And crude had somebody who worked for him, used to, who quit or left and was a guard at the Kennedy transportation side. The five minutes.

BWK 56:18
Keep going, then we'll haul them off the stage. They mean 20 the.

Ken 56:28
And they said that it's out there and it's got this police yellow tape wrapped around it saying don't touch it, had a net. It had a telephone number on it, period. That was it. So through this and coming back to your crew and then going up through Bell Labs. They tried to look at it and they find it and no one would touch it where it was because all this tape. And you call the phone number and they say, who do you want? And you say, you know, if you don't, I say a password or something, whatever you're supposed to say, they hang up on you and that was it. There was nothing else. So this, my trip was aborted. It was, it got more and more. I mean, they were at me. They were really, seriously at me. And so I left, basically proving that it was all a hoax, you know, and came back. And now bell, what? Bell was the name of the pro computer or the program? All the programs actually was a member of the local chess club and I would go to the local chess club with it for several purposes.

Ken 57:42
1, to get an idea of rating of how good it was. And two, to calm the people down because you can pick up 200 points by just playing somebody who's never played a computer before. It was frightening. You know, it's a monster. It's, a computer can kill you, you know, that kind of stuff. But I would give simultaneous exhibitions and everything. So anyway, it was a very familiar, very popular member of the local chess club. I take it every week, Friday nights, I take it. So I came up one Friday night alone because I didn't have a computer and they all ask what was going on, where is it, can I play it? This kind of stuff. So I, I, I, I, I, I gave a story. I gave the story up to that point. And the next week I came back to it again, alone, to the Chess club. And somebody who was a member of the chess club worked for a throwaway newspaper in Long Island. The, one of these Sunday things you find, you know, freebie on your, on, on your lawn. And he said that he told his editor about it. And his editor wanted to write a story. Would it be okay? I said, sure. So we sat and we talked. And then not the next Sunday, but the Sunday after that, it came out on this Long Island newspaper. And two days later, the Washington post got it. And call me up. And I told the whole story to him. And he says, and I says, and we're, we're try, you know, we've got everybody looking for this thing and we can't find out who wants it, what they want, what's it all about. And he says, just a second, I'll try to find. I'll check on it.

Ken 59:31
And I said, right, good. You know, 10 minutes later, he called me up. He found the guy. He found what they want. He found what it was all about. And what had happened is the day before I took my computer down to the terminal. Reagan, that tells you when this happened, had made an announcement where he used the term hemorrhage of technology, how the United States is just giving away everything. And I had very carefully written all over this thing computer, Moscow. And man, it was up not 10 seconds later. So, and they wanted to get out of it is unembarsingly as they could because it was a PR story that was now in the post. Okay? And so the post wrote a story on it. It was a very good story. And the next day everybody called, you know, scientific, American science, popular mechanics, what, sports illustrated and every newspaper. You know, at some point they put people on to answer these questions. And then the day after that, all these things started coming out. And I got a call the day after that from somebody saying, well, we have your computer. They called me. We have your computer. We'd like to give it back. And I said, okay, well sent. You know, you know where I am. And they said, but you don't understand it was technically illegal and we can't just ignore that. We're gonna have to find you. And I said, okay, how much? And they say, the fine is 10% of the price of the thing you're illegally exporting. And they said, so how much is it? And I said, well, for the budget, for building it, the parts, it's one of a kind. So it's hard to put a price on it. The parts were $17,000. And they, and he thought for saying, he says, you don't seem to understand. We're gonna charge you ten percent of that price. Surely it was used, right? I mean, you know. Anyway, he talked himself down to a couple hundred dollars and Bell Labs paid the fine and it showed up in the lobby. They delivered it to the lobby the next day.

BWK 01:02:20
Evan, what should we do on time?

Evan 01:02:23
Well, I'm confused. I stepped down and we're talking about chef, not Eunux.

Ken 01:02:27
I'm sorry. This.

Evan 01:02:30
Okay. So I don't know the microphones. I'll just speak up. First of all, thank you.

Evan 01:02:52
Raise your hand if your careers depend on Unix and C.

Ken 01:02:58
Right, too? Absolutely.

Ken 01:03:07
Can I ask you to raise those same hands, please? Thank you. So would you take a motion for an extension?

Evan 01:03:23
Ken has graciously agreed to stick around a while. We expect for receiving lines, please be brief with your time. Don't hog the man everyone else wants him to do. We're gonna take him down to the Unix exhibit at some point. You ought to graph selfies, but respect his time with everyone else's time. The ECF is open, as you see.


好文收藏
38 声望6 粉丝

好文收集


下一篇 »
eBPF on Go