Lex Fridman Podcast - 吉多·范罗苏姆:Python 封面

吉多·范罗苏姆:Python

Guido van Rossum: Python

本集简介

吉多·范罗苏姆是Python的创造者,Python是全球最受欢迎且最具影响力的编程语言之一。视频版本可在YouTube上观看。如需获取更多关于本播客的信息,请访问https://lexfridman.com/ai,或在Twitter、LinkedIn、Facebook或YouTube上关注@lexfridman,观看这些对话的视频版本。

双语字幕

仅展示文本字幕,不包含中文音频;想边听边看,请使用 Bayt 播客 App。

Speaker 0

以下是与Python之父吉多·范罗苏姆的对话。Python是全球最流行的编程语言之一,几乎应用于所有涉及计算机的领域,从网络后端开发到心理学、神经科学、计算机视觉、机器人技术、深度学习、自然语言处理,以及人工智能的几乎所有子领域。这段对话是麻省理工学院关于人工通用智能课程和人工智能播客的一部分。如果你喜欢,请在YouTube、iTunes或你选择的播客平台订阅,或者在Twitter上关注我@lexfriedman(拼写为F R I D)。现在,请听我与吉多·范罗苏姆的对话。你1956年出生于荷兰。

The following is a conversation with Guido van Rasam, creator of Python, one of the most popular programming languages in the world, used in almost any application that involves computers, from web back end development, to psychology, neuroscience, computer vision, robotics, deep learning, natural language processing, and almost any subfield of AI. This conversation is part of MIT's course on Artificial General Intelligence and the Artificial Intelligence Podcast. If you enjoy it, subscribe on YouTube, iTunes, or your podcast provider of choice, or simply connect with me on Twitter lexfriedman, spelled F R I D. And now, here's my conversation with Guido van Rasam. You were born in The Netherlands in 1956.

Speaker 0

你的父母和周围的世界深受第二次世界大战的影响,我的苏联家庭也是如此。在这样的背景下,你对人性的看法是什么?有些人天生善良,有些人天生邪恶,还是我们每个人内心都同时存在善与恶?

Your parents and the world around you was deeply impacted by World War two, as was my family from The Soviet Union. So with that context Well what is your view of human nature? Are some humans inherently good and some inherently evil, or do we all have both good and evil within us?

Speaker 1

哎呀,没想到问题这么深刻。我想我们都有善恶的潜力,很大程度上取决于环境和情境。

Ouch. I did not expect such a deep one. I I guess we all have good and evil potential in us, and a lot of it depends on circumstances and context.

Speaker 0

从那个世界,至少从苏联和欧洲的角度来看,往往在苦难、挑战和一系列创伤性事件中,会诞生出美丽的艺术、音乐和文学。在我读过或听过的一次采访中,你说你小时候喜欢荷兰文学。

Out of that world, at least on the Soviet Union side and in Europe, sort of out of suffering, out of challenge, out of that kind of, set of traumatic events often emerges beautiful art, music, literature. In a interview I read or heard you said you enjoyed Dutch literature when you were a child.

Speaker 1

嗯。

Mhmm.

Speaker 0

你能告诉我童年时期对你产生影响的书籍吗?

Can you tell me about the books that had an influence on you in your childhood?

Speaker 1

嗯,青少年时期我最喜欢的荷兰作家是威廉·弗雷德里克·赫尔曼斯。他的早期小说大多描写二战期间发生的模糊事件。我想他那时还是个年轻人,写了很多关于那段时间的作品,非常有趣,我认为是非常好的书。

Well, as a teenager my favorite writer was, my favorite Dutch author was a guy named Wilhelm Friedrich Hermans. Mhmm. Who's writing certainly his early novels were all about sort of ambiguous things that happened during World War II. I think he was a young adult during that time and he wrote about it a lot and and very interesting, very good books, I thought,

Speaker 0

我认为。以一种非虚构的方式?

I think. In a non fiction way?

Speaker 1

不。它完全是虚构的,但背景设定在抵抗德国人的模糊世界中,在那里你常常无法分辨一个人是真的在抵抗还是实际上是德国人的间谍。而且他小说中的一些角色某种程度上跨越了那条线,你永远无法确切知道到底发生了什么。

No. It was all fiction, but it was very much set in in the ambiguous world of resistance against the Germans, where often you couldn't tell whether someone was truly in the resistance or really a spy for the Germans. And and some of the characters in his novels sort of cross that line, and you never really find out what exactly happened.

Speaker 0

在他的小说里,总有一个好人和一个坏人。善与恶的本质,是否明确存在一个英雄?

And in his novels, there's always a good guy and a bad guy. Is the nature of good and evil, is it clear there's a hero?

Speaker 1

不。他的英雄,或者说主角,常常是反英雄。所以他们并不那么英勇。他们往往在某种程度上未能实现他们崇高的目标。

It's no. His heroes are often more his main characters are often antiheroes. And and and so they're they're not not very heroic. They're they're often they they fail at some level to accomplish their lofty goals.

Speaker 0

回顾你人生的其余轨迹,文学,无论是荷兰语、英语还是翻译,是否在你所处的技术世界之外产生了影响?

And looking at the trajectory through the rest of your life, has literature, Dutch or English or translation had an impact outside the technical world that you existed in?

Speaker 1

我仍然阅读小说。我不认为它对我有太多直接影响。

I still read novels. I don't think that it impacts me that much directly.

Speaker 0

对你的工作没有影响?它只是——

Doesn't impact your work? It's just it's a

Speaker 1

那是个截然不同的世界。我的工作技术性很强,某种程度上,艺术与文学的世界对它并没有直接影响。

It's a separate world. My work is is highly technical and sort of the the world of art and literature doesn't really directly have any bearing on it.

Speaker 0

你不认为设计中存在创造性元素吗?要知道,有些人会说语言的艺术设计本身就是艺术。

You don't think there's a creative element to the design? You know, some would say art design of a language is art.

Speaker 1

我并非不同意这点。我只是说,我感觉不到传统艺术对我个人创造力的直接影响。

I'm not disagreeing with that. I'm just saying that sort of I don't feel direct influences from more traditional art on my own creativity.

Speaker 0

好吧。当然,你感觉不到并不意味着它没有以某种方式深植于你的潜意识中。我们难道不——

Alright. Of course, you don't feel doesn't mean it's not somehow deeply there in your subconscious. Don't we don't

Speaker 1

谁知道呢?

Who knows?

Speaker 0

谁知道呢?是啊。那么让我们回到你的少年时期。你的爱好是搭建电子电路、制作机械模型。

Who knows? Yeah. Yeah. So let's go back to your early teens. Your hobbies were building electronic circuits, building mechanical models.

Speaker 0

嗯。如果你能让自己回到那个年纪,年轻的Guido十二三岁时,那种行为是基于创造系统的渴望吗?是为了创造某样东西,还是仅仅出于摆弄的乐趣,享受解决问题的快乐?

Mhmm. What if you can just put yourself back in the mind of that, young Guido 12, 13, 14, was that grounded in a desire to create a system, so to create something, or was it more just tinkering, just the joy of puzzle solving?

Speaker 1

实际上,我认为更多是后者。或许在高中快结束时,我才有了足够的信心去设计一些还算有趣的电路。但大部分时间里,我只是照着模型套件的说明书组装零件。头几年组装电子套件时,我对电子学原理其实一知半解——虽然能按说明书仔细调试(这个习惯保留至今),但对晶体管工作原理的理解非常肤浅。

I think it was more the latter, actually. I maybe towards the end of my high school period I felt confident enough that that I designed my own circuits that were sort of interesting somewhat. But a lot of that time, I literally just took a model kit and follow the instructions, putting the things together. I mean, I think the first few years that I built electronics kits I really did not have enough understanding of sort of electronics to really understand what I was doing. I mean I could debug it and I could sort of follow the instructions very carefully which has always stayed with me but I had a very naive model of like how a transistor works.

Speaker 1

那时我完全不懂线圈和电容的原理,后来搭建复杂数字电路时就吃了大亏。因为忽略模拟电路部分(比如兆赫兹级的振荡干扰),明明电路图看起来没问题却无法工作。有次就因为两根导线距离太近,或是开关质量太差导致整个系统崩溃。

And I don't think that that in those days I had any understanding of coils and capacitors, which actually sort of was a major problem when I started to build more complex digital circuits because I was unaware of the sort of the analog part of the Mhmm. How they actually work. And I would have things that the scheme the schematic looked every everything looked fine and it didn't work. And what I didn't realize was that there was some megahertz level oscillation that was throwing the circuit off because I had a sort of two wires were too close or the switches were were kind of poorly built.

Speaker 0

这段经历现在回想起来既有趣又具有破坏性——七十年代个人计算机刚萌芽时,你摆弄这些电路时是否感知到即将到来的计算革命?如果当时让你预测八九十年代的发展轨迹,你觉得能准确推演出后来的进程吗?

But through that time, I think it's really interesting and destructive to think about because there's echoes of it are in this time now. So in the nineteen seventies, the personal computer was being born. So did you sense, in tinkering with these circuits, did you sense the encroaching revolution in personal computing? So if at that point, we would sit you down and ask you to predict the eighties and the nineties, do you think you would be able to do so successfully to unroll the process that's happening?

Speaker 1

完全没概念。记得18岁参加东欧数学奥林匹克时,荷兰队的某个书呆子队友提到'计算机'这个词,那是我第一次听说。虽然我捣鼓过简单数字电路,也自认为理解计算器原理,但这两者间从没建立过联系。

No, I had no clue. I remember, I think in the summer after my senior year, or maybe it was the summer after my junior year. Well, at some point I think when I was 18, I went on a trip to the Math Olympiad in Eastern Europe and there was like, I was part of the Dutch team and there were other nerdy kids that sort of had different experiences and one of them told me about this amazing thing called a computer. And I had never heard that word. My own explorations in electronics were sort of about very simple digital circuits.

Speaker 1

父母用穿孔卡片订杂志时,我根本不知道背后有计算机在处理账户转账。说实话,当时对这些也提不起兴趣。

And I had sort of, I had the idea that I somewhat understood how a digital calculator worked. And so there is maybe some echoes of computers there, but I didn't, connection. I didn't know that when my parents were paying for magazine subscriptions using punched cards that there was something called a computer that was involved that read those cards and transferred the money between accounts. I was actually also not really interested in those things.

Speaker 0

嗯。

Mhmm.

Speaker 1

直到大学读数学系时,才发现学校有台允许学生使用的计算机。

It was only when I went to university to study math that I found out that they had a computer and students were allowed to use it.

Speaker 0

当时有些情况是,你得通过编程来与那台计算机对话。那种感觉是怎样的?

And there were some, you're supposed to talk to that computer by programming it. What did that feel like

Speaker 1

确实,那是唯一能做的事。那台计算机并未真正与现实世界连接。你只能把程序打在打孔卡片上,交给操作员,一小时后取回打印结果。所以你能做的只是编写执行抽象任务的程序。

finding Yeah, that was the only thing you could do with it. The computer wasn't really connected to the real world. The only thing you could do was sort of you typed your program on a bunch of punched cards. You gave the punched cards to the operator and an hour later the operator gave you back your printout. And so all you could do was write a program that did something very abstract.

Speaker 1

我甚至不记得最初尝试编程是什么内容了,大概是做些简单数学练习,只是为了了解编程语言的运作方式。

And I don't even remember what my first forays into programming were, but they were sort of doing simple math exercises and just to learn how a programming language worked.

Speaker 0

大学第一年见到这台计算机时,当你写出程序并获得输出,你是否预见到了它的潜力?还是觉得这只是电路调试的延伸?你是否开始想象个人电脑的出现?是将其视为文字处理或游戏工具,还是预见到它能进入机器人领域?

Did you sense, okay, first year of college, you see this computer, you're able to have a program and it generates some output. Did you start seeing the possibility of this, or was it a continuation of the tinkering with circuits? Did did you start to imagine that one, the personal computer, but did you see it as something that is a tool? It's like a tool, like a word processing tool, maybe for gaming or something. Or did you start to imagine that it could be going to the world of robotics?

Speaker 0

就像弗兰肯斯坦的构想——你能创造一个人造生命体,眼前仿佛存在另一个实体。这种愿景你当时...

Like you know, the Frankenstein picture that you could create an artificial being, there's like another entity in front of you. You do not see

Speaker 1

我确实没那样想过。我更痴迷于调试过程。后来我创造编程语言——这个给其他程序员使用的工具,或许并非完全巧合。我一直更关注编程活动本身,而非程序运行后的结果。

I a don't think I really saw it that way. I was really more interested in the tinkering. It's maybe not as sort of a complete coincidence that I ended up sort of creating a programming language, which is a tool for other programmers. I've always been very focused on the sort of activity of programming itself and not so much what happens with the program you write. Right.

Speaker 1

我确实记得——大概大二或大三时(应该大二),有人向我介绍康威生命游戏这个概念。嗯,你大概知道这个。

I do remember and I don't remember, maybe in my second or third year, probably my second actually, someone pointed out to me that there was this thing called Conway's Game of Life. Mhmm. You're probably familiar with it. I think

Speaker 0

我想是在七十年代,是的。当他提出这个想法的时候。

In the seventies, I think is Yeah. When he came up with it.

Speaker 1

当时《科学美国人》杂志有个专栏,由一位每月撰写数学趣题的人执笔。我现在也想不起他的名字了。那个专栏在当时非常有名,大概持续到九十年代左右。其中有一期专栏讲的是康威的生命游戏,他配了一些插图,详细列出了所有规则,并暗示这从哲学角度很有趣,这也是康威如此命名的原因。我手头只有那篇文章的两页复印件。

So there was a Scientific American column by someone who did a monthly column about mathematical diversions. I'm also blanking out on the guy's name. It was it was very famous at the time and I think up to the nineties or so. And one of his columns was about Conway's Game of Life and he had some illustrations and he wrote down all the rules and sort of there was the suggestion that this was philosophically interesting that that was why Conway had called it that. And all I had was like the two pages photocopy of that article.

Speaker 1

我甚至不记得是从哪里得到的。但它深深吸引了我,我记得当时为我们使用的批处理计算机实现了这个游戏的一个版本——我用Pascal写了个完整程序,从输入读取初始状态和一些参数,比如运行多少代、每隔多少代打印一次。然后就会输出一页又一页的...

I don't even remember where I got it. But it spoke to me and I remember implementing a version of that game for the batch computer we were using where I had a whole Pascal program that sort of read an initial situation from input and read some numbers that that said, do so many generations and print every so many generations. And then out would come pages and pages of of sort of

Speaker 0

各种形态的图案,没错。

things. Patterns of different kinds and yeah.

Speaker 1

是的。后来我还用Python做过类似的东西。但最初那个版本特别有意思,因为我结合了电子爱好者时期学到的技巧——我先在纸上设计了一个由逻辑门构成的简单电路,接收9位输入(代表细胞及其邻居状态),输出该细胞的新状态。这有点像半加器和某些限幅电路的组合...不,其实是个全加器。

Yeah. And I remember much later, I've done a similar thing using Python, but I'd sort of that original version I wrote at the time, I found interesting because I combined it with some trick I had learned during my electronics hobbyist times. I essentially first on paper I designed a simple circuit built out of logic gates that took nine bits of input which is the sort of the cell and its neighbors and produced a new value for that cell. And it's like a combination of a half adder and some other clipping. No, it's actually a full adder.

Speaker 1

我设计好电路后,又将其转化为Pascal整数上的布尔运算序列(可以把整数当位值使用)。这样我基本上用八条指令就能生成60位的下一代状态。

And so I had worked that out and then I translated that into a series of Boolean operations on Pascal integers where you could use the integers as bitwise values. And so I could basically generate 60 bits of a generation in in like eight instructions or so.

Speaker 0

厉害。

Nice.

Speaker 1

所以我为此感到自豪。

So I was proud of that.

Speaker 0

你提到这个很有趣,对于不了解的人来说,康威的生命游戏是一种细胞自动机,其中的单个计算单元会观察它们的邻居,并根据邻居的状态决定下一代的样子,这至少在概念上是一个高度分布式的系统。然后它们都遵循简单的规则,当你退一步观察时,从这些简单规则中涌现出的现象却异常美丽。这是一种涌现的复杂性。尽管底层规则简单,却产生了复杂的现象。有趣的是你实现了这个,而你评论的却是对自己为提高效率所做的技巧感到自豪。

It's it's funny that you mentioned so, for people who don't know Conway's Game of Life is a there's it's a cellular automata where there's single compute units that kinda look at their neighbors and figure out what they look like in the next generation based on the state of their neighbors, and this is deeply distributed system, in concept at least. And then there's simple rules that all of them follow, and somehow out of this simple rule, when you step back and look at what occurs, it's beautiful. There's an emergent complexity. Even though the underlying rules are simple, there's an emergent complexity. Now the funny thing is you've implemented this, and the thing you're commenting on is you're proud of a hack you did to make it run efficiently.

Speaker 0

你并没有评论说这是一个美丽的实现。你没有提到这种涌现的复杂性,你引用了一个简单的程序,当你退后一步,一代又一代地打印出后续结果时,那些你未曾预料的事情正在发生。这就是魔法,我是说,这就是我们编程时都能感受到的魔力。当你创建一个程序并运行它时,无论是“Hello World”还是有图形界面的东西,你是否看到了创造过程中的魔力?

Well, you're not commenting on what like, this is it's a beautiful implementation. You're not commenting on the fact that there's an emerging complexity, that you've you've you've quoted a simple program, and when you step back and you print out the following generation after generation, that's stuff that you may have not predicted would happen is happening. Right. And is that magic, I mean, that's the magic that all of us feel when we program. When create a program, and then you run it, and whether it's Hello World, or it shows something on screen if there's a graphical component, are you seeing the magic in the mechanism of creating that?

Speaker 1

我想我那时是反复思考的。作为学生,我们能使用的计算机时间预算非常有限,实际上是按量计算的。有一次我因为超支了部门的预算而惹恼了一位教授,这是另一个故事了。

I think I went back and forth. As a student, we had an incredibly small budget of computer time that we could use. It was actually measured. I once got in trouble with one of my professors because I had overspent the department's budget. It's a different story.

Speaker 1

所以我实际上想要一个高效的实现,因为我还想探索更多代数和更大棋盘尺寸下的情况。一旦实现完美,我就会输入不同的模式。我记得后来可能有一篇后续文章,里面提到了像滑翔机这样的模式,它们会在若干代后重复自身,但会向右或向上平移一两个位置。还有我记得像滑翔机枪这样的东西。你可以去谷歌搜索康威的生命游戏。

But so I, I actually wanted the efficient implementation because I also wanted to explore what would happen with a larger number of generations and a larger sort of size of the of the board. And so once the implementation was flawless, I would feed a different patterns. And then I think maybe there was a follow-up article where there were patterns that that were like gliders, patterns that repeated themselves after a number of generations, but translated one or two positions to the right or up or something like that. And there were, I remember things like glider guns. Well, you can you can Google Con way's Game of Life.

Speaker 1

至今仍让人惊叹不已。

It is still, still go ah and oh over it.

Speaker 0

这是有原因的,因为我们并不真正理解为什么,这也是斯蒂芬·沃尔夫勒姆痴迷的地方。好吧,我们缺乏数学工具来描述这类系统中涌现的复杂性,唯一的方法就是运行它。

For a reason, because it's not really well understood why, I mean, is what Stephen Wolfram is obsessed about. Okay. He's just the the we don't have the mathematical tools to describe the kind of complexity that emerges in these kinds of systems. And the only way you could do is to run it.

Speaker 1

我不认为这是一个适合用经典数学分析来解决的问题。

I'm not convinced that that it's sort of a problem that lends itself to to classic mathematical analysis.

Speaker 0

不。关于如何创造人工智能或人造生命的一种理论是,就像生命游戏一样,你必须创造一个宇宙并让它运行,从零开始以设计方式创造,比如编写一个能创造完全智能系统的Python程序可能相当具有挑战性,你可能需要像生命游戏那样创造一个宇宙。

No. And the so one one theory of how you create an artificial intelligence or an artificial being is you kinda have to, same with the game of life, you kind of have to create a universe and let it run, that creating it from scratch in a design way, a, you know, coding up a Python program that creates a fully intelligent system may be quite challenging that you might need to create a universe just like the game of life is.

Speaker 1

嗯,你可能需要尝试许多不同的宇宙,直到找到一套不会总是以琐碎方式重复自身的规则。

Well, you might have to experiment with a lot of different universes before there there is a set of rules that doesn't essentially always just end up repeating itself in a in a trivial way.

Speaker 0

是的。史蒂夫·沃尔夫勒姆研究这些简单规则时说,令人惊讶的是你很快就能找到创造有趣事物的规则。理论上不应该,但不知怎的你就是能做到。也许我们的宇宙本身就充满了能创造有趣事物的规则,这些事物可能看起来不像人类,但涌现出的有趣现象可能并不像我们想象的那么难创造。确实如此。

Yeah. And and Steve Wolfram, Steven Wolfram works with these simple rules, says that it's kind of surprising how quickly you find rules that create interesting things. You shouldn't be able to, but somehow you do. And so maybe our universe is laden with with rules that will create interesting things that might not look like humans, but emergent phenomena that's interesting may not be as difficult to create as we think. Sure.

Speaker 0

但让我问问,那时候世界上,至少在大众媒体中,尤其是美国,人们被人工智能的概念所吸引,认为这些计算机很快就能思考。这有没有触动到你?无论是在科幻还是现实中,以任何方式?

But let me sort of ask, at that time, some of the world, at least in popular press, was kind of captivated, perhaps at least in America, by the idea of artificial intelligence, that these computers would be able to think pretty soon. And Yeah. Did that touch you at all? Did that in science fiction or in reality, in in any way?

Speaker 1

我直到很久以后才开始读科幻小说。我想青少年时期,我可能只读过一本科幻小说集。

I didn't really start reading science fiction until much, much later. I think as a teenager, I I read maybe one bundle of science fiction stories.

Speaker 0

这在他的背景中有所体现吗?比如在你的思想里?

Was it in his background somewhere? Like in your thoughts?

Speaker 1

那种利用计算机来构建智能事物的想法,对我来说一直感觉不太对劲,因为我对计算机内部的实际运作有很深的理解。我知道它有多少内存位,编程有多困难,所以我根本不相信仅凭这些就能构建出真正符合我对智能定义的东西。我认为二十出头时对我影响最大的是《哥德尔、埃舍尔、巴赫》,那本书关于意识,在某种意义上让我大开眼界。

That that that sort of the using computers to build something intelligent always felt to me because I had I felt I had so much understanding of what actually goes on inside a computer. I I knew how many bits of memory it had and how difficult it was to program and sort of I didn't believe at all that that you could just build something intelligent out of that, that that would really sort of satisfy my definition of intelligence. I think the most the most influential thing that I read in my early twenties was Godel Eischerbach. That was about consciousness and that was a big eye opener in some sense.

Speaker 0

在什么意义上呢?关于你自己的大脑,你当时或现在是否将其视为计算机?还是说存在完全分离的认知方式?你非常务实,清楚内存的限制、串行计算或弱并行计算的局限,你了解现有技术的边界,虽然难以看清智能如何从中产生,但也容易发现——从40年代、50年代、60年代至今,大脑与计算机至少存在某些相似性。

In what sense? So yeah, so on your own brain, did you at the time, or do you now see your own brain as a computer? Or is there a total separation of the way, so yeah, you're very pragmatically, practically know the limits of memory, the limits of this sequential computing, or weekly paralyzed computing, and you just know what we have now, and it's hard to see how it creates, but it's also easy to see. It was in the 40s, 50s, 60s, and now, at least similarities between the brain and our computers.

Speaker 1

哦当然,我完全相信大脑在某种意义上就是计算机。只不过它们运行的规则与我们当前硬件能实现的规则相当不同。

Oh yeah, I mean, I totally believe that brains are computers in some sense. I mean, the rules they, they use to play by are pretty different from the rules we we can sort of implement in in our current hardware.

Speaker 0

嗯。

Mhmm.

Speaker 1

但我不相信存在某种独立实体赋予我们智能或意识之类的东西。没有灵魂。我大概从10岁起就是无神论者,通过思考数学和宇宙——当然我父母也是无神论者。我知道有人即使是无神论者,也可能认为智能或意识无法从固定规则中涌现。我不属于那个阵营。

But I don't believe in, like, a separate thing that infuses us with intelligence or, consciousness or any of that. There's no soul. I've I've been an atheist probably from when I was 10 years old, just by thinking a bit about math and the universe and and well, my parents were atheists. Now I know that you you you could be an atheist and still believe that there is something sort of about intelligence or consciousness that cannot possibly emerge from a fixed set of rules. I am not in that camp.

Speaker 1

我完全理解进化花费了数百万年时间,DNA是一种特殊机器,它以化学形式编码近乎无限的信息,并找到了自我复制的方法。虽然可能起源于三亿年前(我原以为接近五亿年),但自那以后DNA的基本结构从未改变。这就像我们硬件中的二进制代码。

I I totally see that sort of given how many millions of years evolution took its time, DNA is a particular machine that sort of encodes information and an unlimited amount of information in chemical form and has figured out a way to replicate itself. I thought that that was maybe it's three hundred million years ago, but I thought it was closer to half a half a billion years ago that that sort of originated and it hasn't really changed, the sort of the structure of DNA hasn't changed ever since. That is like our binary code we have in hardware, I mean.

Speaker 0

基础编程语言没变过,变的可能是编程本身

Basic programming language hasn't changed, maybe programming itself

Speaker 1

显然,这确实在某种程度上发生了,恰好是一套足够好的规则体系,能够发展出无限的多样性,以及自我复制分子为资源相互竞争的概念,最终某一种类型总会占据主导,这一切发生在化石记录出现之前。所以我们不清楚具体如何发生,但我相信这确实发生过。

Obviously did did sort of, it happened to be a set of rules that was good enough to sort of develop endless variability and, and sort of the, the idea of self replicating molecules competing with each other for resources and one type eventually sort of always taking over, that happened before there were any fossils. So we don't know how that exactly happened but I believe it's clear that that did happen.

Speaker 0

你能谈谈对意识的看法吗?因为我觉得我们会大量讨论编程。我们会讨论智能如何从根本上与编程相连,但意识完全是另一回事。作为编程语言开发者和人类,你经常思考这个问题吗?这两者其实是相当独立的话题。

Can you comment on consciousness and how you see it? Because I think we'll talk about programming quite a bit. We'll talk about, you know, intelligence connecting to programming fundamentally, but consciousness is this whole other thing. Do you think about it often as a developer of a programming language and as a human. Those are pretty sort of separate topics.

Speaker 1

某种程度上,我的编程工作并不涉及发展智能或意识的方向。但作为科普读物的热心读者,我有些想法——主要是认为意识并非非有即无的状态。我隐约记得(忘了具体出处),猫、狗或老鼠都具有某种形式的智能,鱼类也是。进化经历了漫长过程,我认为从感官(尤其是视觉)的进化中,逐渐发展出越来越高的智能,最终形成人类水平的智能。

Sort of my line of work, working with programming does not involve anything that goes in the direction of developing intelligence or consciousness. But sort of privately as an avid reader of popular science writing, I have some thoughts which is mostly that I don't actually believe that consciousness is an all or nothing thing. I have a feeling that and and I forget what I read that influenced this, but I feel that if you look at a cat or a dog or a mouse, they have some form of intelligence. If If you look at a fish, it has some form of intelligence. And that evolution just took a long time, but I feel that the the sort of evolution of more and more intelligence that led to sort of the human form of intelligence followed the evolution of the senses, especially the visual sense.

Speaker 1

我的意思是,解析视觉场景需要巨大的信息处理量。目前人类在这方面仍优于计算机。

I mean, is an enormous amount of processing that's needed to interpret a scene. And humans are still better at that than than computers are.

Speaker 0

是啊。所以

Yeah. And so

Speaker 1

而且我觉得,哺乳动物之所以能发展出当前的意识水平,从智能到自我认知和意识的跨越,本质上与成为拥有高度发达感官的'机器人'有关。

And, and, and I, I have a feeling that there is a sort of the, the reason that, that like mammals is in particular developed the levels of consciousness that they have and that eventually sort of in from, going from intelligence to, to self awareness and consciousness has to do with sort of being a robot that has very highly developed senses.

Speaker 0

有大量丰富的感官信息输入。这个观点很有趣——无论DNA的基本机制如何,无论编程的基础构件是什么,只要叠加更多能力、更高分辨率的传感器,这些基础生存程序就会发展出让我们人类觉得像智能和意识的奇妙特性。

Has a lot of rich sensory information coming in. So the, that's a really interesting thought that the, whatever that basic mechanism of DNA, whatever that basic building blocks of programming, if you just add more abilities, more high resolution sensors, more sensors, you just keep stacking those things on top, that this basic programming in trying to survive develops very interesting things that start to us humans to appear like intelligence and consciousness.

Speaker 1

是的,就机器人而言,我认为自动驾驶汽车最有可能发展出类似人类意识的能力。因为当我亲自驾驶时,我不仅关注交通规则,还会观察周围环境并获取线索——哦这是商业区、有位老太太正在过马路、有人抱着一叠邮件。

Yeah, so as far as robots go, I think that the self driving cars have that sort of the greatest opportunity of developing something like that because when I drive myself, I don't just pay attention to the rules of the road. I also look around and I get clues from that. Oh, this is a shopping district. Oh, here's an old lady crossing the street. Oh, here is someone carrying a pile of mail.

Speaker 1

那里有个邮筒,我打赌他们会横穿马路去投递。于是我会减速。这些判断都是瞬间完成的。

There's a mailbox. I bet you they're gonna cross the street to reach that mailbox. And I slow down. And I don't even think about that. Yep.

Speaker 1

这种将观察转化为理解其他意识体行为的能力无处不在,比如预判'那棵树要倒了'——本质上是对世界运行系统的认知。

And, and so there is, there is so much where you turn your observations into an understanding of what other consciousnesses are going to do or what, what other systems in the world are going to be, oh, that tree is going to fall.

Speaker 0

没错。

Yeah.

Speaker 1

我隐约觉得,如果真有什么机器会产生意识,那更可能是自动驾驶汽车,而不是谷歌或亚马逊数据中心里那数十亿台联网计算机——尽管它们能完成各种复杂运算。

I, I see sort of, I see much more of I I expect somehow that if anything is going to become conscious, it's going to be the self driving car and not the network of a bazillion computers at, in a Google or Amazon data center that are all networked together to do whatever they do.

Speaker 0

从这个角度看——我本人就从事自动驾驶行业——你其实指出了当前技术瓶颈与终极目标间的巨大鸿沟。按照这个逻辑,意识和智能应该是系统为了与人类互动而必须具备的特质,而非抽象概念。比如需要共情能力、理解对死亡的恐惧等,这些对行人交互至关重要的特质,都要求系统能基于人类的情感和缺陷进行基础运算。

So in that sense, so you actually highlight, because that's what I work in, is in autonomous vehicles, you highlight the big gap between what we currently can't do and what we truly need to be able to do to solve the problem. Under that formulation, then consciousness and intelligence is something that basically a system should have in order to interact with us humans, as opposed to some kind of abstract notion of consciousness. Consciousness is something that you need to have to be able to empathize, to be able to fear understand what the fear of death is, all these aspects that are important for interacting with pedestrians, you need to be able to do basic computation based on our human desires and and flaws.

Speaker 1

就像狗的表现——虽然我不养狗,但我朋友们的狗显然能预判人类行为(至少建立了行为模型)。它们会学习:有些狗知道你要出门就想跟着,被独自留在家时会难过哀叫。

If if sort of, yeah, if you if you look at the dog, the dog clearly knows I mean, I'm not the dog owner, my but I I have friends who have dogs. The dogs clearly know what the humans around them are going to do, or at least they have a model of what those humans are going to do, and they learn. The dog some dogs know when you're going out and they want to go out with you. They're sad when you leave them alone. They cry.

Speaker 1

他们感到恐惧是因为年少时曾遭受虐待。我们通常不会赋予狗类意识——至少不会赋予太多——但我也认为它们并非完全没有。所以我认为意识和智力并非全有或全无的二元状态。

They're afraid because they were mistreated when they were younger. We we don't assign sort of consciousness to dogs or at least not not all that much, but I I also don't think they have none of that. So I think it's it's consciousness and intelligence are not all or nothing.

Speaker 0

这是个光谱概念,非常有趣。回到编程语言和构建智能、意识、人造生命的思考方式上。十七世纪莱布尼茨、霍布斯、笛卡尔提出的激动人心的理念认为:所有思维、推理、大脑的特殊机能都可以转化为逻辑形式,实现形式化推理。

The spectrum. It's really interesting. But in returning to programming languages and the way we think about building these kinds of things, about building intelligence, building consciousness, building artificial beings. So I think one of the exciting ideas came in the seventeenth century, and with Leibniz, Hobbes, Descartes, where there's this feeling that you can convert all thought, all reasoning, all the thing that we find very special in our brains, you can convert all of that into logic. So you can formalize it, formal reasoning.

Speaker 0

一旦将所有知识形式化,剩下的就是计算——这正是人脑的运作方式。当时人们相信这种可能性,但他们没能...

And And then once you formalize everything, all of knowledge, then you can just calculate, and that's what we're doing with our brains is we're calculating. So there's this whole idea that we that this is possible, that this But they weren't

Speaker 1

理解现代意义上的模式识别概念。他们虽然发现了牛顿微积分等伟大数学成果,但...

aware of the concept of pattern matching in the sense that we are aware of it now. They sort of thought you, they had discovered incredible bits of mathematics like Newton's calculus.

Speaker 0

而且

And

Speaker 1

他们的理想主义倾向使其过度延伸逻辑与数学的边界。他们以为面部识别只是规则堆砌,却未意识到这需要海量数据支撑,以及能同步处理视觉线索、上下文并进行大规模并行模式匹配的神经回路。

their sort of idealism, their sort of extension of what they could do with logic and math sort of went along those lines. And they thought there's there's like, yeah, logic. There's there's like a bunch of rules and a bunch of input. They didn't realize that how you recognize a face is not just a bunch of rules, but it's a shit ton of data. Plus a circuit that sort of interprets the visual clues and the context and everything else and somehow can massively parallel pattern match against stored rules.

Speaker 1

我是说

I mean

Speaker 0

但那些

But those

Speaker 1

如果我明天在Dropbox办公室前见到你,我可能会认出你。即使

If I see you tomorrow here in front of the Dropbox office, I might recognize you. Even if

Speaker 0

我穿了不同的衬衫。

I'm wearing a different shirt.

Speaker 1

是的。但如果我明天在贝尔蒙特的咖啡店见到你,我可能完全认不出是你,或者在沙滩上或其他地方。我自己也经常犯这种错误。我看到某人,只记得像是,哦,这个人是我妻子的同事。

Yeah. But if I if I see you tomorrow in a coffee shop in Belmont, I might have no idea that it was you or on the beach or whatever. I make those kind of mistakes myself all the time. I see someone that I only know as like, oh, this person is a colleague of my wife's. Yeah.

Speaker 1

然后我在电影院见到他们时却认不出来。

And then I see them at the movies and I don't recognize them.

Speaker 0

但你看到那些你称之为模式匹配的东西了吗?你觉得规则无法编码这些吗?你看,所有的信息片段,你环顾这个房间,我穿着黑色衬衫,我有特定的身高,我是人类,所有这些,你可能每时每刻都在接收关于这个场景的数以万计的事实。你视之为理所当然,并将它们累积、聚合起来理解整个场景。你不认为所有这些都可以被编码,最终你可以把它们都摆在桌面上进行计算吗?

But do you see those you call it pattern matching. Do you see that rules is unable to encode that? You see, all the pieces of information, you look around this room, I'm wearing a black shirt, I have a certain height, I'm a human, all these, there's probably tens of thousands of facts you pick up moment by moment about this scene. You take them for granted, and you accumulate, aggregate them together to understand the scene. You don't think all of that could be encoded to where at the end of the day, you can just put it all on the table and calculate?

Speaker 1

哦。我不明白那是什么意思。我是说,从某种意义上讲,是的,那里没有真正的魔法,但从事实进入我的眼睛和耳朵到对场景的理解,有足够多的抽象层次,所以我不认为人工智能真的覆盖了那段距离的足够部分。就像如果你把人体看作是由原子构成的,那是一种无用的还原论观点。对吧?

Oh. I don't know what that means. I mean, yes, in the sense that there is no, there there is no actual magic there, but there are enough layers of abstraction from sort of from the facts as they enter my eyes and my ears to the understanding of the scene that that so I don't think that that AI has really covered enough of of of that distance. It's like if you take a human body and you realize it's built out of atoms, well, that that is a uselessly reductionist view. Right?

Speaker 1

没错。身体由器官构成,器官由细胞构成,细胞由蛋白质构成,蛋白质由氨基酸构成,氨基酸由原子构成,然后就进入了量子力学的领域。

Right. The body is built out of organs, the organs are built out of cells, the cells are built out of proteins, the proteins are built out of amino acids, the amino acids are built out of atoms, and then you get to quantum mechanics.

Speaker 0

所以,这是一种非常实用的观点。作为工程师,我认同这种看法,但你也需要考虑萨姆·哈里斯(Sam Harris)的观点,即智能本质上就是信息处理。就像你说的,你接收感官信息,对其进行处理,然后产生智能行为。

So, that's a very pragmatic view. I mean, as an engineer, agree with that kind of view, but you also have to consider the, well, Sam Harris view of, well, intelligence is just information processing. You just like you said, you take in sensory information, you you do some stuff with it, and you come up with actions that are intelligent.

Speaker 1

他说得这么轻巧。我其实不知道萨姆·哈里斯是谁。

That make he makes it sound so easy. I don't know who Sam Harris is.

Speaker 0

哦,他是位哲学家。你看,这就是哲学家典型的思考方式。本质上,笛卡尔也是这样的——他突然意识到:

Oh, well, it's a philosopher. So, like, this is how philosophers often think. Right? And and essentially, that's what Descartes was. It's wait a minute.

Speaker 0

就像你说的,如果不存在魔法,那么他的核心观点是:虽然表面上没有魔法,但我们对此知之甚少,以至于它和魔法没什么区别。即便我们知道人体由原子构成,知道器官的组成,但由于我们完全不清楚如何从原子一步步构建出可复现的器官,这意味着——你现在还不应该因为发现'我们由原子构成'而过于兴奋。

If there is, like you said, no magic so he basically says, it doesn't appear like there's any magic, but we know so little about it that it might as well be magic. So just because we know that we're made of atoms, just because we know we're made of organs, the fact that we know very little how to get from the atoms to organs in a way that's recreatable means it, that you shouldn't get too excited just yet about the fact that you figured out that we're made of atoms.

Speaker 1

对,同样地,我们的感官接收事实信息,并将其转化为理由和行动——这中间存在大量我们尚未完全理解的抽象过程。有时候我都不确定自己是否该跑题...请继续。

Right, and the same about taking facts as our sensory organs take them in, and turning that into reasons and actions that sort of, there are a lot of abstractions that we haven't quite figured out how to deal with those. I mean, I, some sometimes I don't know if I can go on a tangent or not. Please.

Speaker 0

把你拉回正题。当然可以。

Drag you back in. Sure.

Speaker 1

假设我编写一个简单的解析程序,比如一个编译器,它能解析程序。从某种意义上说,这个编译器或解析器的输入例程就像是一个感知器官。它会构建起对所解析程序的极其复杂的内部表示,不再仅仅是代表程序文本的线性字节序列,而是拥有一棵抽象语法树。

So if I take a simple program that parses, say I have a compiler, it parses a program. In a sense, the input routine of that compiler, of that parser is a sense, a sensing organ. And it builds up a mighty complicated internal representation of the program it just saw. It doesn't just have a linear sequence of bytes representing the text of the program anymore. It has an abstract syntax tree.

Speaker 1

我不知道有多少观众或听众熟悉编译器技术,但

And I don't know how many of your viewers or listeners are familiar with compiler technology, but

Speaker 0

如今懂这个的人越来越少了,对吧?

there's fewer and fewer these days, right?

Speaker 1

可能确实如此。人们总想走捷径,但这种抽象数据结构是编译器用来生成相关输出的基础——比如将程序翻译成可由硬件执行的机器码。之后这个数据结构就被丢弃了。当鱼或苍蝇接收视觉刺激时,我确信它们也会构建某种数据结构,对苍蝇而言可能极其简单。以苍蝇大脑为例,我猜想其抽象层次少得可怜,大概只能区分'这里比那里暗'这样的程度。

That's also true probably. People want to take a shortcut, but there's sort of, this abstraction is a data structure that the compiler then uses to produce outputs that is relevant, like a translation of that program to machine code that can be executed by hardware. And then that data structure gets thrown away. When a fish or a fly sees, sort of gets visual impulses, I'm sure it also builds up some data structure and for the fly that may be very minimal. A fly may have only a few, I mean, in the case of a fly's brain, I could imagine that there are few enough layers of abstraction that it's not much more than when it's darker here than it is here.

Speaker 1

不过它能感知运动,因为你手臂挥过去时苍蝇会有反应。显然它的视觉处理很...不能说智能,但确实具备对运动的抽象能力。我们大脑中也有类似但复杂得多的机制——若没有极其精密的运动抽象能力,你根本不可能开车。某种程度上,这种运动抽象能力可能是

Well, it can sense motion because a fly sort of responds when you move your arm towards it. So clearly its visual processing is intelligent, well, not intelligent, but it has an abstraction for motion. And we still have similar things in in but much more complicated in our brains. I mean, you couldn't drive a car if you couldn't sort of, if you didn't have an incredibly good abstraction for motion. Yeah, in some sense, the same abstraction for motion is probably one of

Speaker 0

我们最主要的信息来源之一。我们天生就知道如何处理这些信息,并在此基础上构建了更多抽象层

the primary sources of our of information for us. We just know what to do. I think we know what to do with that. We've built up other abstractions on top

Speaker 1

我们基于此构建更复杂的数据结构。经过某些处理后,有些信息会几乎永久地存储为更持久的数据结构,随时可供调取。比如记电话号码——以我的年纪得写下来,但若反复默念几次,短时间内应该能记住那7位或10位数字。这是较有意识的记忆方式。而像人脸识别这种能力,我就完全不明白其机制了。

We build much more complicated data structures based on that, And we build more persistent data structures sort of after some processing, some information sort of gets stored in our memory pretty much permanently and is available on recall. I mean, are some things that you sort of, you're conscious that you're remembering it, like you give me your phone number, I, well, at my age I have to write it down, but I could imagine I could remember those seven numbers or 10 digits and reproduce them in a while if I sort of repeat them to myself a few times. So that's a fairly conscious form of memorization. On the other hand, how do I recognize your face? I have no idea.

Speaker 1

我的大脑拥有一整套专门用于识别人脸的硬件系统。我不清楚这其中有多少是编码在我们的DNA里的,又有多少是在零到三岁期间通过反复训练形成的。但无论如何,我们的大脑懂得如何完成许多这类对人类互动有用的事情,而无需再意识到其具体运作方式。

My brain has a whole bunch of specialized hardware that knows how to recognize faces. I don't know how much of that is sort of coded in our DNA and how much of that is trained over and over between the ages of zero and three. But but but somehow our brains know how to do lots of things like that that are useful in our interactions with with other humans with without really being conscious of how it's done anymore.

Speaker 0

没错。所以在我们的日常生活中,我们其实是在最高层次的抽象层面进行操作。我们甚至意识不到底层所有细微的细节。这就像编译器之上还有编译器,如同层层叠叠的乌龟——归根结底都是编译器在支撑。

Right. So so what our actual day to day lives, we're operating at the very highest level of abstraction. We're just not even conscious of all the little details underlying it. There's compilers on top of it's like turtles on top of turtles or turtles all the way down. It's compilers all the way down.

Speaker 0

但这本质上说明不存在魔法。我想这正是我试图表达的观点,笛卡尔开启了这个思想链条,宣称世间没有魔法。我是说,在他之前人们总是...

But that's essentially you say that there's no magic. That's what I what I was trying to get at, I think, is with Descartes started this whole train of saying that there's no magic. I mean, there's always before him

Speaker 1

不过笛卡尔不是也提出过灵魂与肉体根本分离的概念吗?

Well, didn't Descartes also have the notion, though, that the soul and the body were were fundamentally separate?

Speaker 0

分离。没错。我认为他当时不得不把上帝写入理论中...嗯,出于政治原因。虽然我不是历史学家,但他的理论核心在于所有推理、所有人类思维都可以被形式化。

Separate. Yeah. I think he had to write in God in there for Yeah. Political reasons. So I don't I don't actually I'm not a historian, but there's notions in there that all of reasoning, all of human thought can be formalized.

Speaker 0

我想这个思想在二十世纪通过罗素和哥德尔的不完备性定理得以延续,关于形式化边界在哪里的辩论——正是图灵机诞生的背景。这个激动人心的理念,也是许多计算理论的基础,说明计算机能完成相当多的事情。理论上我们可以将人脸识别等讨论内容编码成算法,在计算机上运行。在这个语境下,我想从哲学角度探讨编程:给计算机编程究竟意味着什么?

I think that continued in the twentieth century with Russell and with Gadle's incompleteness theorem, this debate of what are the limits of the things that could be formalized, that's where the Turing machine came along. And this exciting idea, I mean, underlying a lot of computing, that you can do quite a lot with a computer. You can you can encode a lot of the stuff we're talking about in terms of recognizing faces and so on, theoretically, in an algorithm that can then run on a computer. And in that context, I'd like to ask programming in a philosophical way. So what does it mean to program a computer?

Speaker 0

你说你写Python程序,或是编译成字节码的C++程序时,其实是在构建抽象层次。你在更高层级上进行编程。你如何看待这种语境下的编程?抽象层级能否无限向上堆叠?

So you said you write a Python program, or a compiled, a C plus plus program that compiles just some byte code. It's forming layers. You're programming a layer of abstraction that's higher. How do you see programming in that context? Can it keep getting higher and higher levels of abstraction?

Speaker 1

我认为在某个阶段,更高层次的抽象将不再被称为编程,它们也不会类似于我们目前所称的编程。那时将不会有源代码。我的意思是,在机器的较低层次上仍然会有某种形式的源代码,就像我们大脑中仍然存在分子、电子和蛋白质一样。但为了保持机器运行,仍然会有编程、系统管理以及谁知道的其他工作。但从某种意义上说,机器所做的是另一个层次的抽象。

I think at some point, the higher level of levels of abstraction will not be called programming and they will not resemble what we we call programming at the moment. There will not be source code. I mean, there will still be source code sort of at a lower level of the machine, just like there are still molecules and electrons and and sort of proteins in our brains. But and and so there's still programming and and and system administration and who knows what keeping to keep the machine running. But what the machine does is, is a different level of abstraction in a sense.

Speaker 1

据我理解,过去十年或更长时间里,人们在面部识别或自动驾驶汽车等领域取得进展的方式,都是通过海量的训练数据实现的。至少作为一个外行——我自认在那个领域完全是个外行——看起来发表研究成果的研究人员并不一定确切知道他们的算法是如何工作的。我经常在看到报纸或社交媒体上关于Facebook的肤浅报道时感到恼火,他们总是说‘算法’。这完全是对‘算法’一词的不同理解。因为对我来说,从小接受的教育告诉我,算法是一套你完全理解、可以数学分析并能证明其正确性的规则集合。

And as far as I understand the way that for last decade or more people have made progress with things like facial recognition or the self driving cars is all by endless, endless amounts of training data where at least as, as, as a lay person and I feel myself totally as a lay person in that field, it looks like the researchers who publish the results don't necessarily know exactly how their algorithms work. And I often get upset when I sort of read a sort of a fluff piece about Facebook in the newspaper or social networks, they say, well, algorithms. And that's like a totally different interpretation of the word algorithm. Yeah. Because for me, the way I was trained or what I learned when I was eight or 10 years old, an algorithm is a set of rules that you completely understand that can be mathematically analyzed and and and you can prove things.

Speaker 1

比如你可以证明埃拉托斯特尼筛法能生成所有且仅生成质数。

You can like prove that Aristotle's sieve produces all prime numbers and only prime numbers.

Speaker 0

嗯。不知道你是否听说过安德烈·卡帕西?恐怕没有。他现在是特斯拉的AI负责人,之前就职于斯坦福大学。他俏皮地将这个概念称为‘软件2.0’。

Mhmm. Yeah. So I don't know if you know who Andrej Kapathi is by any chance. I'm afraid not. So he's a head of AI at Tesla now, but he was at Stanford before, and he has this cheeky way of calling this concept Software two point zero.

Speaker 0

让我稍作解释。你提到的传统算法概念——那些明确存在、可阅读、可理解、可验证其功能的东西——可以算是‘软件1.0’。而‘软件2.0’正是你所描述的:使用神经网络这种机器学习类型,你输入大量数据,神经网络学会执行某种功能。你只需指定输入和期望输出,却无法窥视内部运作或进行分析。

So let me disentangle that for a second. Kind of what you're referring to is the traditional, traditional, the algorithm, the concept of an algorithm, something that's there, it's clear, you can read it, you understand it, you can prove it's functioning, it's kind of software one point zero. And what software two point zero is, is exactly what you described, which is you have neural networks, which is a type of machine learning that you feed a bunch of data, and that neural network learns to do a function. All you specify is the inputs and the outputs you want, and you can't look inside. You can't analyze it.

Speaker 0

你只能通过提供大量数据来训练这个函数实现输入到输出的映射。从这个意义上说,编程就变成了获取大量数据的过程。这就是这种范式下的编程本质。

All you can do is train this function to map the inputs to the outputs by giving a lot of data. In that sense, programming becomes getting a lot of data. That's what programming is in this Well,

Speaker 1

那应该叫‘编程2.0’才对。

there would be programming two point zero.

Speaker 0

二点零,编程二点零。

Two point zero, programming two point zero.

Speaker 1

我不会称之为编程。这完全是另一种活动,就像用细胞构建器官不被称为化学一样。

And I wouldn't call that programming. It's just a different activity, just like building organs out of cells is not called chemistry.

Speaker 0

那么,让我们退一步更广义地思考这个问题。就像父母教育孩子也可以被称为编程那样,在这个意义上,编程正被如此运用。你提供数据、示例和用例。想象一下,不是用for循环和清晰可读的文本编写函数,而是说:这里有很多这个函数应该接受的输入示例,以及当它接受这些输入时应该做什么的示例,然后让系统自行推断其余部分。这就是二点零的概念。

Well, so let's just step back and think sort of more generally, of course, but it's like, as a parent teaching your kids things can be called programming. In that same sense, that's how programming is being used. You're providing them data, examples, use cases. So imagine writing a function not with for loops and clearly readable text, but more saying, well, here's a lot of examples of what this function should take, and here's a lot of examples of when it takes those functions, it should do this, and then figure out the rest. So that's the two point zero concept.

Speaker 0

所以我想问你的问题是:这种模式识别系统等事物的现实运作方式非常模糊,是一种模糊的所谓'编程'方式。你对这种世界怎么看?它是否应该被完全区别于编程的其他名称来称呼?比如,如果你是软件工程师,是否意味着你设计的是可以系统测试、评估、有明确规范的系统,而这个模糊的软件二点零世界、机器学习世界,完全是另一回事?还是说两者有可能相互融合?

And so the question I have for you is like, it's a very fuzzy way, this is the reality of a lot of these pattern recognition systems and so on. It's a fuzzy way of quote unquote programming. What do you think about this kind of world? Should it be called something totally different than programming? Like if you're a software engineer, does that mean you're designing systems that can be systematically tested, evaluated, that have a very specific specification, and then this other fuzzy software two point o world, machine learning world, that's that's something else totally, or is there some intermixing that's possible?

Speaker 1

这个问题之所以被提出,很可能是因为我们还不完全清楚软件二点零究竟是什么。我认为有个不言而喻的事实:过去AI解决的每个任务,到某个时刻我们明白其原理后,就不再被视为人工智能的一部分,因为不再需要使用这个术语。它变成了'哦,现在我们知道怎么做了',然后发展出一个新的科学或工程领域。我不确定是否所有形式的学习或控制系统都应该始终被称为编程。

Well, the question is probably only being asked because we we don't quite know what that software two point o actually is. And it sort of I think there is a truism that every task that AI has has tackled in the past, at some point, we realized how it was done and then it was no longer considered part of artificial intelligence because it was no longer necessary to to use that term. It was just, oh, now we know how to do this. And a new field of science or engineering has been developed. And I don't know if sort of every form of learning or sort of controlling computer systems should always be called programming.

Speaker 1

所以我不知道。也许我过于关注术语了。但我预期...

So I I don't know. Maybe I'm focused too much on the terminology. I but I expect that

Speaker 0

...最终会出现不同的概念体系,由具有不同教育背景和不同目标模型的人来发展这些概念。是的。我想换种方式说明这个概念:我认为神经网络提供的功能类型是,与其能够预先证明它在所有情况下都有效,不如说它最差情况分析与平均情况分析的区别。你只能说在我们测试的所有案例中,它似乎99.9%的时间都有效,但我们无法保证,而且它可能会以意想不到的方式失败。

that there just will be different concepts where people with sort of different education and a different model of what they're trying to do, will will develop those concepts. Yeah. And I guess if you could comment on another way to put this concept is, I think I think the kind of functions that neural networks provide is things as opposed to being able to upfront prove that this should work for all cases you throw at it. All you're able it's the worst case analysis versus average case analysis. All you're able to say is it seems, on everything we've tested, to work 99.9% of the time, but we can't guarantee it, and it fails in unexpected ways.

Speaker 0

我们甚至可以举例说明它如何以意想不到的方式出错。但大多数时候它确实表现得很好。但这是否意味着在我们当前的编程思维方式中没有这种容错空间?

We can even give you examples of how it fails in unexpected ways. But it's like really good most of the time. But that's Is there no room for that in current ways we think about programming?

Speaker 1

编程1.0实际上也正在达到这种境界——大多数软件开发人员早已放弃了无bug程序的理想。我们只关心那些频繁出现到令人烦恼的bug。我们默认接受偶尔的崩溃、宕机或错误结果,因为我们不可能、也没有足够的程序员让所有代码都完美无缺,那将是极其乏味的工作。如果试图采用形式化方法,过程会变得更加繁琐。所以偶尔用户点击链接遇到错误时,普通用户不会惊慌,他们只是重试看看是否第二次能正常工作——而往往神奇地确实如此,或者他们会尝试其他方式完成任务。

Programming one point zero is actually sort of getting to that point too, where the sort of the ideal of a bug free program has been abandoned long ago by most software developers. We only care about bugs that manifest themselves often enough to be annoying. And we're willing to take the occasional crash or outage or incorrect result for granted because we can't possibly, we we don't have enough programmers to make all the code bug free and it would be an incredibly tedious business. And if you try to throw formal methods at it, it gets, it becomes even more tedious. So every once in a while, the user clicks on a link and somehow they get an error and the average user doesn't panic, they just click again and see if it works better the second time, which often magically it does, or they go up and they try some other way of performing their tasks.

Speaker 1

这就像一种端到端的恢复机制。而在系统内部,存在各种重试、超时和回退机制。我猜想生物系统中的这类机制甚至更为丰富,否则它们就无法存活。

So that's sort of an end to end recovery mechanism. And inside systems, there is all sorts of retries and timeouts and fallbacks. And I imagine that that sort of biological systems are even more full of that because otherwise they wouldn't survive.

Speaker 0

你认为编程教学是否应该按照你刚才描述的方式来思考和传授?在我的成长环境中,人们几乎总是否认这个事实。

Do you think programming should be taught and thought of as exactly what you just said? From where I come from is kind of, you're almost denying that fact always.

Speaker 1

在基础编程教育中,学生编写的程序通常非常小而简单,如果出现bug总能被发现和修复。因为目前中小学乃至大学编程入门课程教授的都是'小规模编程'。真正教授软件工程、构建大型系统的课程非常少。比如每年夏天Dropbox都会接收大量实习生,西海岸每家科技公司都是如此。这些实习生总是感到震惊,因为这是他们生平第一次见识真正大规模软件开发环境的样子。

In in sort of basic programming education, the sort of the programs you're you're having students write are so small and simple that if there is a bug, can always find it and fix it. Because the sort of programming as it's being taught in some, even elementary, middle schools, in high school, introduction to programming classes in college typically, it's programming in the small. Very few classes sort of actually teach software engineering, building large systems. I mean, every summer here at Dropbox, we have a large number of interns, every tech company on the West Coast has the same thing. These interns are always amazed because this is the first time in their life that they see what goes on in a really large software development environment.

Speaker 1

他们在大学学到的所有知识几乎都停留在小规模层面,而这种规模差异会从根本上改变你处理问题的方式和思维方式。

And everything they've learned in college was almost always about a much smaller scale and somehow that difference in scale makes a qualitative difference in how you how you do things and how you think about it.

Speaker 0

如果把时间拉回到七八十年代,当你最初构思Python或思考编程语言世界时,你是否预见到会出现像谷歌、Facebook和Dropbox这样庞大的系统?当你设计Python时想过这些吗?

If you then take a few steps back into decades seventies and eighties, when you were first thinking about Python or just that world of programming languages, did did you ever think that there would be systems as large as underlying Google, Facebook, and Dropbox? Did you when you were thinking about Python

Speaker 1

实际上,它的每一个阶段都让我感到意外。

I was actually always caught by surprise by Every stage of it.

Speaker 0

是的,几乎计算机发展的每个阶段都是如此。也许是因为你在其他访谈中提过,但我认为编程语言的演变非常迷人。尤其从我的角度看,它正朝着越来越智能的方向发展。我在俄罗斯接触的第一门编程语言是Logo语言的海龟绘图。

Yeah, pretty much every stage of computing. So maybe just because you've spoken in other interviews, but I think the evolution of programming languages are fascinating. And it's, especially because it leads, from my perspective, towards greater and greater degrees of intelligence. I learned the first programming language I played with in Russia was with the turtle logo.

Speaker 1

Logo,没错。

Logo, yeah.

Speaker 0

如果你看看这个清单——我列了所有我曾涉猎过的编程语言,它们各有各的美:Fortran、COBOL、Lisp、Algol 60、Basic、再次出现的Logo、C语言。六十年代还出现了面向对象语言,像Simula、Pascal、Smalltalk,这些都引领着...

And if you look, I just have a list of programming languages, all of which I know I've played with a little bit, and they're all beautiful in different ways, from Fortran, COBOL, Lisp, Algol 60, Basic, Logo again, C. A few Object Oriented came along in the sixties, Simula, Pascal, Smalltalk, all of that leads

Speaker 1

这些都是经典之作。

Those are all the classics.

Speaker 0

经典,对,经典金曲对吧?基于Lisp的Scheme,数据库领域的SQL,C++等等,最终催生了Python。还有更早的Haskell、MATLAB,形成了不同的社区和语言生态。能聊聊这段历史吗?我知道Python脱胎于ABC语言——说实话我之前完全不了解这门语言,为了准备这次对话才去查阅资料。虽然ABC有很多恼人的特性(比如全大写字母等),但仔细看,Python的许多精髓其实早已蕴藏其中。

The classics, yeah, the classic hits, right? Scheme, that's built on top of Lisp, on the database side, SQL, C plus plus and all of that leads up to Python, Haskell too, that's before Python, MATLAB, these kind of different communities, different languages. So can you talk about that world? I know that Python came out of ABC, which I actually never knew that language. I just, having researched this conversation, went back to you, you see, and it looks remarkably it has a lot of annoying qualities, but underneath those, like all caps and so on, but underneath that, there's elements of Python that are quite they're already there.

Speaker 1

那些精华部分都被我继承过来了。

That's where I got all the good stuff.

Speaker 0

全是好东西。在那个世界里,你沉浸在这些编程语言中。你是只专注于自己小圈子里的好东西,还是对整个社区在追逐什么有所感知?你说每种编程语言都是为了解决某个痛点而诞生的。

All the good stuff. So, but in that world, you're swimming in these programming languages. Were you focused on just the good stuff in your specific circle? Or did you have a sense of what is everyone chasing? You said that every programming language is built to scratch an itch.

Speaker 0

你当时了解社区里所有的痛点吗?无论答案是与否,我想知道,你开发Python是想解决什么痛点?

Were you aware of all the itches in the community? And if not, or if yes, I mean, what itch were you trying to scratch with Python?

Speaker 1

幸好我当时不知道所有痛点,否则可能什么都做不成。我是说,如果你试图一次性解决所有问题的话。

Well, I'm glad I wasn't aware of all the itches because I would probably not have been able to do anything. I mean, if you're trying to solve every problem at once.

Speaker 0

最终只会一事无成。

You'll solve nothing.

Speaker 1

没错,那太让人不堪重负了。所以我当时有个非常非常明确的问题——想要一种介于Shell脚本和C语言之间的编程语言。现在来看,可以说一个是更高级的,一个是更低级的,而Python某种程度上属于中间层次,尽管它仍然偏向高级语言。但我当时更多考虑的是:我需要一个工具,能在特定编程环境中显著提升工作效率。

Well, yeah, it's it's too overwhelming. And so I had a very, very focused problem. I wanted a programming language that sat somewhere in between shell scripting and C. And now, arguably, there is, like, one is higher level, one is lower level, And Python is sort of a language of an intermediate level, although it's still pretty much at the high level end. But I was I was thinking about much more about I want a tool that I can use to be more productive as a programmer in a very specific environment.

Speaker 1

我还为这个工具的研发设定了时间预算,大约三个月完成从语言设计(包括语法/语义特性的全面考量)到实现整个流程(从源代码解析到执行)。

And I also had given myself a time budget for the development of the tool. And that was sort of about three months for both the design, like thinking through what are all the features of the language syntactically, and semantically, and how do I implement the whole pipeline from parsing the source code to executing it?

Speaker 0

从时间线和目标来看,生产力似乎是核心诉求。比如90年代到21世纪头十年,我一直在做机器学习、AI研究,编程始终用C++。而更偏向机械/电子工程的人则多用MATLAB——那是他们的世界,或许还有些用Java的,那些更注重面向对象特性的人。

So I think both with the timeline and the goals, it seems like productivity was at the core of it as a goal. So like for me in the 90s and the first decade of the twenty first century, I was always doing machine learning, AI. Programming for my research was always in C plus plus Wow. And then the other people who are a little more mechanical engineering, electrical engineering are MATLAB They're a little bit more MATLAB focused. Those are the world, and then maybe a little bit Java too, but people who are more interested in emphasizing the object oriented nature of things.

Speaker 0

然而,在过去十年左右的时间里,特别是随着神经网络的兴起以及基于Python构建的与神经网络交互的软件包出现,我转向了Python。我注意到一种显著的效率提升,虽然我无法确切描述——因为我不常思考这个问题——但就是感觉能用更短时间完成任务。你认为这种差异是质变还是量变?或许只是主观感受。我不确定自己是否真的更高效了,但你觉得呢?你大概确实如此。是的,我认为有几个因素。让我谈谈影响我生产力的一个方面:C++让我沉迷于编写高性能代码和构建精美架构,尤其是随着模板编程新标准的引入,我发现自己把大部分时间花在构建这种形式美感上,而非实际任务——比如解析文件提取关键词。那么Python的特质究竟是什么?

So, but then in the last ten years or so, especially with oncoming of neural networks and these packages that are built on Python to interface with neural networks, I switched to Python and it's just, I've noticed a significant boost that I can't exactly, because I don't think about it, but I can't exactly put into words why I'm just much, much more productive, just being able to get the job done much, much faster. So how do you think, whatever that qualitative difference is, I don't know if it's quantitative, it could be just a feeling. I don't know if I'm actually more productive, but how do you think You about probably are. Yeah, well, that's right. I think there's elements, let me just speak to one aspect that I think that was affecting my productivity, is C plus plus was, I really enjoyed creating performant code and creating a beautiful structure where everything that, you know, this kind of going into this, especially with the newer and newer standards of templated programming, of just really creating this beautiful formal structure that I found myself spending most of my time doing that as opposed to getting it, parsing a file and extracting a few keywords, or whatever the task I was So trying to what is it about Python?

Speaker 0

在跨越最近三十年的语言设计过程中,你如何看待生产力这个概念?你认为高效程序员意味着什么?你如何尝试将这种理念融入语言设计?

How do you think of productivity in general as you were designing it now, sort of through the decades, last three decades? What do you think it means to be a productive programmer? And how did you try to design it into the language?

Speaker 1

编程任务各有不同。作为程序员,掌握适用于不同场景的多种工具很有必要。所以我仍会写C代码和shell脚本,但大部分工作使用Python完成。

There are different tasks. And as a programmer, it's useful to have different tools available that sort of are suitable for different tasks. So I still write C code. I still write shell code. But I write most of my my things in Python.

Speaker 1

为何仍使用其他语言?因为某些任务本身就有特定要求。多数情况下,任务本身决定了语言选择——比如不是从零编写解决X问题的程序,而是修复现有程序X的漏洞或为大型程序添加小功能。即便没有这类语境限制,仍需权衡编写代码耗时与代码运行耗时之间的关系。

Why do I still use those other languages? Because sometimes the task just demands it. And well, I would say most of the time the task actually demands a certain language because the task is not write a program that solves problem X from scratch, but it's more like fix a bug in existing program X or add a small feature to an existing large program. But even if if you sort of, if you're not constrained in your choice of language by context like that, there is still the fact that if you write it in a certain language, then you sort of you have this balance between how long does it time, does it take you to write the code and how long does the code run. Right.

Speaker 1

在解决方案探索阶段,编写代码的时间通常远超过运行时间——每次运行后发现输出不如预期,就需要继续修改。像Python这样的语言能大幅加速迭代过程:它省略了许多细节,拥有丰富的库函数,无需纠结太多细节就能让程序编译运行。你可以快速组合现有组件,让原型应用跑起来。

And when you're in sort of in the phase of exploring solutions, you often spend much more time writing the code than running it, because every time you've sort of you've run it, you see that the output is not quite what you wanted and you spend some more time coding. And a language like Python just makes that iteration much faster because there are fewer details. There is a large library, sort of there are fewer details that that you have to get right before your program compiles and runs. There are libraries that do all sorts of stuff for you. So you can sort of very quickly take a bunch of existing components, put them together and get your prototype application running.

Speaker 1

就像我搭建电子电路时总使用面包板——线路杂乱无章,稍一震动就会失灵,但它能验证功能就够了。确认可行后,就能继续完善原理图设计或添加新功能。当确定某个无线电或光感器的完美设计方案后,才会考虑:如何设计PCB板?如何在小空间焊接元件?如何确保其抗电压波动或机械干扰?

Just like when I was building electronics, I was using a breadboard most of the time. So I had this like sprawled out circuit that if you shook it, it would stop working because it was not put together very well, but it functioned and all I wanted was to see that it worked and then move on to the next next schematic or design or add something to it. Once you've sort of figured out, oh, this is the perfect design for my radio or light sensor or whatever, then you can say, okay, how do we design a PCB for this? How do we solder the components in a small space? How do we make it so that it is robust against, say, voltage fluctuations or mechanical disruption?

Speaker 1

虽然我对电子设计一窍不通,但在编写代码方面,这些正是我的专长所在。

I mean, I know nothing about that when it comes to designing electronics, but I know a lot about that when it comes to to writing code.

Speaker 0

所以最初的步骤是高效、快速的,没有太多阻碍。但你有点像达尔文描述物种进化那样描述,对吧?你在观察Python的真实情况。现在,退一步讲,如果创造语言的行为是艺术,而你有三个月的时间来完成它,最初的步骤,你只是设定了一堆目标,关于你观察到的Python的一些特性。也许你有这些目标,但如何创建规则、句法结构、那些能实现这些目标的特性呢?

So the initial initial steps are efficient, fast, and there's not much stuff that gets in the way. But you're kind of describing from a like Darwin described the evolution of species, right? You're observing of what is true about Python. Now, you take a step back, if the act of creating languages is art, and you had three months to do it, initial steps, so you just specified a bunch of goals, sort of things that you observe about Python. Perhaps you had those goals, but how do you create the rules, the syntactic structure, the the features that result in those?

Speaker 0

所以一开始,我也有一些关于Python进化过程的后续问题。但在最开始,当你坐在那里创建词法分析器的时候,无论是什么

So I have in the beginning, and I have follow-up questions about through the evolution of Python too. But in the very beginning, when you're sitting there creating the the lexical analyzer, whatever

Speaker 1

进化仍然是其中的重要部分,因为我对自己说,我不想从头开始设计一切。我打算从其他我喜欢的语言中借鉴特性。

Evolution was still a big part of it because I I sort of I said to myself, I don't want to have to design everything from scratch. I'm going to borrow features from other languages that I like.

Speaker 0

哦,有意思。所以你基本上是先观察你喜欢的东西。

Oh, interesting. So you basically exactly. You first observe what you like.

Speaker 1

是的。这就是为什么如果你17岁,想创建一种编程语言,你不会很成功,因为你没有其他语言的经验。而我那时,比如说,三十多岁,我之前写过解析器,所以我参与过ABC的实现。我花了几年时间和ABC的作者们讨论它的设计,与设计师们讨论。我与设计无关。

Yeah. And so that's why if you're 17 years old and you want to sort of create a programming language, you're not going to be very successful at it because you have no experience with other languages. Whereas I was in my, let's say, mid thirties, I had written parsers before, so I had worked on the implementation of ABC. I had spent years debating the design of ABC with its authors, it's the with its designers. I had nothing to do with the design.

Speaker 1

它在我加入团队时已经完全设计好并最终实现。所以你从不同的语言中借鉴想法、概念和非常具体的局部规则,比如缩进和某些其他句法特性来自ABC。但我选择从C语言中借鉴字符串字面量和数字的处理方式,以及其他各种东西。

It was designed fully as it was ended up being implemented when I joined the team. But so you borrow ideas and concepts and very concrete sort of local rules from different languages like the indentation and certain other syntactic features from ABC. But I chose to borrow string literals and how numbers work from C and various other things.

Speaker 0

那么,如果你进一步推进这一点,你有一个听起来有趣,但我认为出奇地准确或至少实用的头衔——终身仁慈独裁者,在过去的三十年左右。或者不,不是实际的头衔,但功能上说是这样。所以你不得不做出决策,设计决策。也许我们可以以Python 2为例,Python发布Python 3。

So in then, if you take that further, so yet you've had this funny sounding, but I think surprisingly accurate or at least practical, title of benevolent dictator for life for quite you know, for the last three decades or whatever. Or no. Not the actual title, but functionally speaking. So you had to make decisions, design decisions. Can you maybe let's take Python two so Python releasing Python three as an example.

Speaker 0

嗯。它在很多方面与Python 2不向后兼容,这是众所周知的。那么当时的审议、讨论和决策过程是怎样的?这种经历的心理感受如何?你对这一过程中的某些方面是否感到后悔?

Mhmm. It's not backward compatible to Python two in ways that a lot of people know. So what was that deliberation, discussion, decision like? What was the psychology of that experience? Do you regret any aspects of how that experience undergone that?

Speaker 1

其实这是一个集体决策的过程。尽管名义上我是BDFL(终身仁慈独裁者),大家也尊重我作为语言创造者和当前设计负责人的地位,但我当时更多是在寻求其他人的反馈。某种程度上,Python 3.0的诞生源于社区其他成员指出——有些问题反复困扰用户,我们能否解决这些问题?

Well, so it was a group process really. At that point, even though I was BDFL in name, and certainly everybody sort of respected my my position as the creator and and the current sort of owner of the language design. I was looking at everyone else for feedback. Sort of Python three point zero in some sense was sparked by other people in the community pointing out, oh, well, there are a few issues that sort of bite users over and over. Can we do something about that?

Speaker 0

然后

And

Speaker 1

对于Python 3,我们当时处理了许多被称为'语言疣'的问题。我们思考能否通过小的语言调整来解决这些痛点。过去我们始终严格保持向后兼容性,因此早期版本的许多问题已通过兼容方式或渐进式改进解决了。但最终我们仍面临一些公认的缺陷——虽非致命问题,却总让某些开发者踩坑。

for Python three, we took a number of those Python warts as they were called at the time. And we said, can we try to sort of make small changes to the language that address those words. And we had sort of, in the past, we had always taken backwards compatibility very seriously. And so many Python words in earlier versions had already been resolved because they could be resolved while maintaining backwards compatibility or sort of using a very gradual path of evolution of the language in a certain area. And so we were stuck with a number of words that were widely recognized as problems, not like roadblocks, but nevertheless sort of things that some people trip over and you know that that's always the same thing that that people trip over when they trip.

Speaker 1

而我们始终找不到能保持向后兼容的解决方案。

And we could not think of a backwards compatible way of resolving those issues.

Speaker 0

但选择不解决这些问题也是可行的,对吧?

But it's still an option to not resolve the issues, right?

Speaker 1

所以很长一段时间里,我们只能接受语言在某些方面无法完美的事实。就像现在依然存在某些细节可能不如Java/R/Visual Basic等语言的情况。但我们会想:既然难以改变,况且问题也不算太严重,那就这样吧。

And so, for for a long time we had sort of resigned ourselves to well, okay, the language is not going to be perfect in this way and that way and that way. And we sort of certain of these I mean, there are still plenty of things where you can say, well, that's that particular detail is better in Java or in R or in Visual Basic or whatever. Mhmm. And we're okay with that because, well, we can't easily change it. It's not too bad.

Speaker 1

我们可以通过用户教育做些小改进,或者在解析器中加入静态分析器或警告提示之类的。但有些问题我们意识到,这些确实是无法回避的困境,未来只会愈演愈烈。我们必须采取行动。

We can do a little bit with user education or we can have static analyzer or warnings in the parser or something. But there were things where we thought, well, these are really problems that are not going away. They are getting worse in the future. We should do something about it.

Speaker 0

是该采取行动。但归根结底需要做出抉择,对吧?没错。那么作为Python终身仁慈独裁者,这是否是Python历史上最艰难的决定?

Should do something. But ultimately, there is a decision to be made. Right? Yes. So was that the toughest decision in the history of Python yet to make as the benevolent dictator for life?

Speaker 0

如果不是的话,还有哪些决定——或许规模较小——曾让你真正感到左右为难?

Or if not, what are other, maybe even on the smaller scale, what was the decision where you were really torn up about?

Speaker 1

最艰难的决定大概就是辞职了。

Well, the toughest decision was probably to resign.

Speaker 0

好,让我们稍作停留。考虑到时间关系——我还有些精彩问题要问——我们先探讨这个重要节点:今年七月(三个月前)那场既戏剧性又充满美感的转折。你当时写道:'既然PEP572已尘埃落定,我再也不愿为某个PEP如此艰难抗争,更不愿看到那么多人鄙弃我的决策。我将彻底退出决策层。未来一段时间我仍会以普通核心开发者身份存在,继续指导新人——或许会比以前更有空。但本质上,我要永久卸任BDFL(终身仁慈独裁者)职务,你们要自力更生了。'

Right, let's Hold go on a second then. Let me just, because in the interest of time too, because I have a few cool questions for you, I mean, let's touch a really important one, because it was quite dramatic and beautiful in certain In kinds of July this year, three months ago, you wrote, now that PEP five seventy two is done, I don't ever want to have to fight so hard for a PEP and find that so many people despise my decisions. I would like to remove myself entirely from the decision process. I'll still be there for a while as an ordinary core developer, and I'll still be available to mentor people, possibly more available. But I'm basically giving myself a permanent vacation from being BDFL, a benevolent dictator for life, and you all will be on your own.

Speaker 0

首先,这段宣言简直具有莎士比亚式的戏剧张力。'我不会指定继任者,你们打算怎么办?建立民主制、无政府状态、独裁政权还是联邦体系?'这组陈述既震撼又美妙,其开放性本质正是在召唤社区为Python创造未来,蕴含着某种诗意的美感。

First of all, just this it's it's almost Shakespearean. I'm not going to appoint a successor, so what are you all going to do? Create a democracy, anarchy, a dictatorship, a federation? So that was a very dramatic and beautiful set of statements, it's almost, it's open ended nature called the community to create a future for Python. There's this kind of beautiful aspect to it.

Speaker 0

哇。如此...如此具有戏剧性。当时做这个决定是怎样的心境?时隔数月回望,你当时内心经历了什么?带我重温你的心路历程。

Wow. So what and and dramatic, you know. What was making that decision like? What was on your heart, on your mind, stepping back now, a few months later? Well, take me through your mind.

Speaker 1

我很高兴你喜欢这段文字,因为它实际上写得相当快。那是在经历数月兜兜转转后,我终于批准了PEP 572——嗯。虽然最初不是我发起的,但我在其设计上发挥了重要作用。我算是给它施加了一些推动力,使其朝着对语言更有利的方向发展。

I'm glad you liked the writing because it was actually written pretty quickly. It was literally something like after months and months of going around in circles, I had finally approved PEP five seventy two Mhmm. Which I I had a big hand in its design, although it I didn't initiate it originally. I I sort of gave it a bunch of nudges in a direction that would be better for the language.

Speaker 0

抱歉打断一下,请问async IO是这个吗?还是说不是?

So so so sorry just to ask is async IO is No. That's the one or no?

Speaker 1

不是。PEP 572其实是个小特性,关于赋值表达式的。

No. PEP five seventy two was actually a small feature, which is assignment expressions.

Speaker 0

哦,赋值表达式啊。明白了。

Oh, assignment expressions. Okay.

Speaker 1

当时争议很大,很多人声称自己懂什么是'Pythonic'的,什么不是,并断言这会毁掉这门语言。他们说这违背了Python最根本的设计哲学。我觉得这都是胡扯,因为我支持这个提案——而且我自认对Python的设计哲学还算了解。所以当时我既疲惫又压力山大。

That had been thought there was just a lot of debate where a lot of people claimed that they knew what was Pythonic and what was not Pythonic, and they knew that this was going to destroy the language. This was, like, a violation of Python's most fundamental design philosophy. And I thought that was all bullshit because I was in favor of it. And I would think I know something about Python's design philosophy. So I was really tired and also stressed of that thing.

Speaker 1

就在某个周三晚上,我正式发邮件宣布接受该提案后,终于如释重负。'通过了,现在只管实现它吧。'我带着解脱感入睡,总算翻过了这一页。

And literally, after sort of announcing I was going to accept it, a certain Wednesday evening, I had finally sent the email. It's accepted. Now let's just go implement it. So I went to bed feeling really relieved. That's behind me.

Speaker 1

结果周四早上7点醒来时,我想:'这应该是最后一次如此激烈的争论了,也是我最后一次让PEP决策把自己搞得这么心力交瘁。'

And I wake up Thursday morning, 7AM, and I think, well, that was the last one that's going to be such such a terrible debate, and that's going to be that's the last time that I let myself be so stressed out about a PEP decision.

Speaker 0

是啊。

Yeah.

Speaker 1

我应该直接辞职。这五年来我一直在考虑退休的事。我半开玩笑地提过退休,也向社区透露过未来某个时间点我会退休。是的,别太把我头衔里的FL部分当真。

I should just resign. I've been sort of thinking about retirement for half a decade. I've been joking and sort of mentioning retirement, sort of telling the community some point in the future, I'm going to retire. Yeah. Don't take that FL part of my title too literally.

Speaker 1

当时我想,好吧,就这样吧。我受够了。那天我休假,想和妻子好好享受时光,我们正要去附近的一个海滨小镇。

And I thought, okay, this is it. I'm done. I, had the day off. I wanted to have a good time with my wife. We were going to a little beach town nearby.

Speaker 1

大概十五到二十分钟后,我写下了那篇被你称为莎士比亚式的东西。有趣的是,你会因为这么称呼我而遭到不少调侃。

And in, I think, maybe fifteen, twenty minutes, I wrote that thing that you just called Shakespearean. And the funny thing is You're gonna

Speaker 0

称你为莎士比亚式肯定会招来很多非议。

get so much crap for calling you Shakespearean.

Speaker 1

我甚至没意识到这是个多么重大的决定,因为五分钟后,我在推特上看到有人已经在讨论‘吉多辞去BDFL职务’的消息——而我原本以为只发布在核心开发者可见的内部论坛,至少能保密一天。

I didn't even I didn't even realize what a monumental decision it was because five minutes later, I read that sent a link to my message back on Twitter where people were already discussing on Twitter. Guido resigned as the BDFL. And I had I had posted it on an internal forum that I thought was only read by core developers. So I thought I would at least have one day before the news would sort of get out.

Speaker 0

关于‘独自前行’的部分还包含了...嗯...一个相当强烈的元素,即未来的不确定性。不过你能简单说说吗?比如我业余爱好弹吉他,每次演奏时人们都特别热情,他们会说‘太棒了’。

The on your own aspect had also an element Mhmm. Of quite it was quite a powerful element of the uncertainty that lies ahead. But can you also just briefly talk about like for example, I play guitar as a hobby for fun, and whenever I play, people are super positive. They're super friendly. They're like, this is awesome.

Speaker 0

这很棒。但有时我作为一个旁观者进入编程社区时,似乎总会看到针对某个话题形成的不同阵营,这些阵营——两个或更多——经常对对立阵营进行相当严厉的批评。作为旁观者,我可能完全误解了这一点。

This is great. But sometimes I enter, as an outside observer, I enter the programming community, and there seems to sometimes be camps on whatever the topic, and the two camps, the two or plus camps, are often pretty harsh at criticizing the opposing camps. As an onlooker, I may be totally wrong on this.

Speaker 1

是啊,圣战(holy wars)算是编程社区最热衷的活动之一了。

Yeah, holy wars are sort of a favorite activity in the programming community.

Speaker 0

这背后的心理是什么?一个健康的社区允许这种现象存在吗?这种对立最终会成为语言进化的推动力吗?

And what is the psychology behind that? Is that okay for a healthy community to have, is that a productive force ultimately for the evolution of a language?

Speaker 1

如果所有人都互相吹捧而不说真话,那肯定不是好事。我认为应该有个中间地带——互相攻击是不可取的,但保持健康的持续批评和反馈是非常有益的。这种互动在各个层面都能看到,比如有人提议修复代码库中的一个小问题时,

Well, if everybody is patting each other on the back and never telling the truth, It would not be a good thing. I think there is a middle ground where sort of being nasty to each other is not okay. But there there is is is a middle ground where there is healthy ongoing criticism and feedback that is very productive. And you you mean at at every level you see that. I mean, someone proposes to fix a very small issue in a code base.

Speaker 1

很可能会有评审者这样回应:其实换个方法能做得更好。而在决定Python核心开发者社区未来时,我们现在已经有五六份相互竞争的组织章程提案了。

Chances are that some reviewer will sort of respond by saying, well, actually you can do it better the other way. Right. When it comes to deciding on the future of the Python core developer community, we now have, I think, five or six competing proposals for a constitution.

Speaker 0

对于这样的未来,你是感到担忧还是抱有期待?

So that future, do you have a fear of that future? Do you have a hope for that future?

Speaker 1

我对未来充满信心。总体而言,这些辩论非常健康且富有成效。事实上,当我写那封辞职邮件时,我就知道Python正处于非常好的状态——由50到100人组成的核心开发社区(他们负责编写或审核大部分Python代码)绝大多数时候相处融洽。这个社区汇集了不同专业领域、不同经验层次的人才,既有深耕Python核心开发的,也有来自广义软件开发领域的,包括大型系统、小型系统和嵌入式系统专家。所以我辞职时很安心,因为我知道这个社区完全能够自我管理。

I'm very confident about that future. By and large, I think that the debate has been very healthy and productive. And I actually, when, when I wrote that resignation email, I knew that, that Python was in a very good spot and that the Python core development community, the group of 50 or 100 people who sort of write or review most of the code that goes into Python, those people get along very well most of the time. A large number of different areas of expertise are represented at different levels of experience in the Python core dev community, different levels of experience completely outside it in software development in general, large systems, small systems, embedded systems. So I I felt okay resigning because I knew that that the community can really take care of itself.

Speaker 1

然后从

And out of

Speaker 0

未来功能开发的大杂烩中,让我问问你是否能快速评论一下并发编程、并行计算、asyncio等话题。这些都是人们在Reddit上表达过希望、抱怨或讨论过的事情。关于asyncio,也就是广义上的并行化。打包方面,我完全不懂。我只是用PIP安装东西,但显然还有PIP和Poetry,这些管理依赖的打包系统正在兴起,对于该使用哪个存在很多困惑。

a grab bag of future feature developments, let me ask if you can comment maybe on all very quickly, concurrent programming, parallel computing, asyncio. These are things that people have expressed hope, complained about, whatever, have discussed on on Reddit. Asyncio, so the parallelization in general. Packaging, I I was totally clueless on this. I just use PIP to install stuff, but apparently, there's PIP and Poetry, there's these dependency, packaging systems that manage dependencies and so on that are emerging, there's a lot of confusion about what's the right thing to use.

Speaker 0

还有函数式编程。我们是否会得到更多函数式编程功能,这类想法。当然,GIL(全局解释器锁)问题,我想这与并行化相关。你可以随便评论你想谈的哪个话题?

Then also functional programming. The ever, are we going to get more functional programming or not, this kind of idea. And of course, gill, connected to the parallelization, I suppose, the global interpreter lock problem. Can you just comment on whichever you wanna comment on?

Speaker 1

好吧,我们把GIL、并行化和异步IO作为一个话题来讨论。嗯。我对Python发展成一种高并发、高并行语言不太抱希望。这是由语言的设计方式、大多数用户的使用方式以及语言的实现方式共同决定的,使得这种未来相当不可能。

Well, let's take the gill and parallelization and async IO as one one topic. Mhmm. I'm not that hopeful that Python will develop into a sort of high concurrency, high parallelism language. That's sort of the the way the language is designed, the way most users use the language, the way the language is implemented, all make that a pretty unlikely future.

Speaker 0

所以你认为根据人们的使用方式,这可能甚至不需要成为重点关注的问题。

So you think it might not even need to, really the way people use it, it might not be something that should be of great concern.

Speaker 1

我认为AsyncIO是个特例,因为它只允许IO操作的重叠。这是一种支持高吞吐量IO、每秒处理大量连接的最佳实践。我不担心这个。AsyncIO会继续发展,目前有几个竞争的包。

I think AsyncIO is a special case because it sort of allows overlapping IO and only IO. That is, is a sort of best practice of supporting very high throughput IO, many connections per second. I'm not worried about that. I think AsyncIO will evolve. There are a couple of competing packages.

Speaker 1

我们有一些非常聪明的人正在推动我们改进asyncio。至于并行计算,我认为Python不适合这方面。虽然有变通方法,但你不能指望用Python写一个算法然后让编译器自动并行化。你可以使用像NumPy这样的包,以及其他一些非常强大的包,它们能利用所有可用的CPU,因为你告诉包:这是数据,这是要应用的抽象操作,去执行吧,然后我们又回到了C++的世界。但这些包本身通常是用C++实现的。

We have some very smart people who are sort of pushing us in sort of to make asyncio better. Parallel computing, I think that Python is not the language for that. There are there are ways to work around it, but you sort of you can't expect to write an algorithm in Python and have a compiler automatically paralyze that. What you can do is use a package like NumPy and there are a bunch of other very powerful packages that sort of use all the CPUs available because you tell the package, here's the data, here's the abstract operation to apply over it, go at it, and then then we're back in the C plus plus world. But the those packages are themselves implemented usually in C plus plus

Speaker 0

没错。这正是TensorFlow和其他此类软件包的用武之地,例如它们能在GPU上并行处理。它们为你解决了这个问题。那么关于软件包管理,你能谈谈未来的发展趋势吗?是的。

That's right. That's that's where TensorFlow and all these packages come in where they paralyze across GPUs, for example. They take care of that for you. So in terms of packaging, can you comment on the future of packaging and Yeah.

Speaker 1

对我来说,软件包管理一直是最不讨喜的话题。这是个非常棘手的问题,因为操作系统和平台都想掌控软件包管理权。

My it packaging has always been my least favorite topic. It's it's it's a really tough problem because the OS and the platform want to own packaging.

Speaker 0

嗯。

Mhmm.

Speaker 1

但它们的软件包解决方案并不针对特定语言。比如在Linux系统上,或者说整个Unix体系,存在两种相互竞争的软件包解决方案。但它们都适用于所有语言。

But their packaging solution is not specific to a language. Like, if you take Linux, there are two competing packaging solutions for Linux or for Unix in general. And but they all work across all languages.

Speaker 0

嗯。

Mhmm.

Speaker 1

像Node、JavaScript、Ruby和Python等语言都有各自专属的软件包解决方案,这些方案仅在其语言生态内有效。嗯。那么究竟该用哪个?这确实是个难题。我个人的做法是用系统包管理器安装Python,然后再用Python的包管理系统安装第三方Python包。

Several languages like Node, JavaScript, and Ruby and Python all have their own packaging solutions that only work within the ecosystem of that language. Mhmm. Well, what should you use? That is a tough problem. My own own approach is I use the system packaging system to install Python, and I use the Python packaging system then to install third party Python packages.

Speaker 1

大多数人都是这么做的。十年前Python的包管理状况非常糟糕。如今PIP代表着未来。基于Anaconda的数值计算和科学计算Python形成了独立生态,这两者可以共存。我认为不需要更多解决方案了。

That's what most people do. Ten years ago, Python packaging was really a terrible situation. Nowadays, PIP is the future. There is a separate ecosystem for numerical and scientific Python based on Anaconda, those two can live together. I don't think there is a need for more than that.

Speaker 1

很好。所以这就是包装的问题。

Great. So that's that's packaging.

Speaker 0

至少对我来说,这是让我感到非常满意的地方。我甚至不知道这是个问题,直到被提出来。考虑到时间有限,我就跳过其他一大堆问题了。我观看了你在计算机历史博物馆做的五小时、确切地说是五个半小时的口述历史访谈,最棒的是,由于访谈的线性推进,它给人一种生活充实、充满趣事的感受。可以说,这是对我们在地球上短暂存在的一种美好消耗。

That's well, at least for me, that's that's where I've been extremely happy. I I didn't I didn't even know this was an issue until it was brought up. Well, in the interest of time, let me sort of skip through a million other questions I have. So I watched the five hour five five and a half hour oral history that you've done with the Computer History Museum, and the nice thing about it, it gave this, because of the linear progression of the interview, it gave this feeling of a life, you know, a life well lived with interesting things in it. Sort of a pretty, I would say, a good spend of this little existence we have on earth.

Speaker 0

那么,抛开家庭因素回顾这段旅程,有哪些部分让你真正感到自豪?是否有某些时刻、成就或想法特别突出?是否Python的创造本身就是你回首时会感叹‘干得漂亮’的亮点?

So outside of your family, looking back, what about this journey are you really proud of? Are there moments that stand out, accomplishments, ideas? Is it the creation of Python itself that stands out as a thing that you look back and say, damn, I did pretty good there?

Speaker 1

嗯,我会说Python绝对是我做过最棒的事。而且不仅仅是创造了Python,还包括我像养育孩子一样培育它的方式。嗯。我不只是孕育了一个孩子,还抚养了他。现在我要让孩子自由地走向世界,并且已经让他具备了独立生存的能力。

Well, I would say that Python is definitely the best thing I've ever done. And I I wouldn't sort of say just the creation of Python, but the way I sort of raised Python, like a baby. Mhmm. I didn't just conceive a child, but I raised a child. And now I'm setting the child free in the world, and I've set up the child to to sort of be able to take care of himself.

Speaker 1

我为此感到非常自豪。

And I'm I'm very proud of that.

Speaker 0

就像《蒙提·派森的飞行马戏团》的报幕员常说的:现在来点完全不同的东西——你有特别喜欢的《蒙提·派森》桥段,或是《银河系漫游指南》及其他文学节目/电影中,一想到就会让你开怀大笑的场景吗?

And as the announcer of Monty Python's Flying Circus used to say, and now for something completely different, Do you have a favorite Monty Python moment or a moment in Hitchhiker's Guide or any other literature show or movie that cracks you up when you think about it?

Speaker 1

哦,你随时可以给我放‘死鹦鹉’那个小品。

Oh, you can always play me the parrot the dead parrot sketch.

Speaker 0

哦,太棒了。是的,这也是我最喜欢的。

Oh, that's brilliant. Yeah. That's my favorite as well.

Speaker 1

它正在长眠于地下。

It's pushing up the daisies.

Speaker 0

好的,格蕾塔,非常感谢你今天和我交谈。我非常感激

Okay, Greta, thank you so much for talking with me today. This I appreciate

Speaker 1

这是一次很棒的对话。

has been a great conversation.

关于 Bayt 播客

Bayt 提供中文+原文双语音频和字幕,帮助你打破语言障碍,轻松听懂全球优质播客。

继续浏览更多播客