Lex Fridman PodcastGuido van Rossum: Python | Lex Fridman Podcast #6
EVERY SPOKEN WORD
125 min read · 24,701 words- 0:00 – 1:56
Human nature, WWII’s shadow, and moral ambiguity in literature
- LFLex Fridman
The following is a conversation with Guido van Rossum, creator of Python, one of the most popular programming languages in the world. Used in almost any application that involves computers, from web backend development to psychology, neuroscience, computer vision, robotics, deep learning, natural language processing, and almost any subfield of AI. This conversation is part of MIT 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 @lexfridman, spelled F-R-I-D. And now, here's my conversation with Guido van Rossum. You were born in the Netherlands in 1956. Your parents and the world around you was deeply impacted by World War II, as was my family from the Soviet Union. So with that context-
- GRGuido van Rossum
Well...
- LFLex Fridman
... 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?
- GRGuido van Rossum
Ouch. (laughs) I did not expect, uh, 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.
- LFLex Fridman
Out of that world, at least on the Soviet Union side in Europe, sort of out of suffering, out of challenge, out of that kind of, uh, set of traumatic events often emerges beautiful art, music, literature. In a interview I read or heard you said you enjoy Dutch literature s- when, when you were a child.
- GRGuido van Rossum
Mm-hmm.
- 1:56 – 4:50
Teen reading habits: Dutch novels, anti-heroes, and separation from technical work
- LFLex Fridman
Can, can you tell me about the books that had an influence on you in your childhood?
- GRGuido van Rossum
Well, wes- as a teenager, my favorite writer was... My favorite Dutch author was a guy named Willem Frederik Hermans.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Whose writing, certainly his early novels were all about sort of, uh, ambiguous things that happened during World War II.
- LFLex Fridman
Okay.
- GRGuido van Rossum
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, I think. And-
- LFLex Fridman
In a non-fiction way?
- GRGuido van Rossum
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 crossed that line, and you never really find out what exactly happened.
- LFLex Fridman
And in his novels, there was always a good guy and a bad guy. Is it the nature of good and evil? Is it-
- GRGuido van Rossum
Uh...
- LFLex Fridman
... clear there's a hero?
- GRGuido van Rossum
It's... No, his heroes are often more... His main characters are often anti-heroes.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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.
- LFLex Fridman
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?
- GRGuido van Rossum
Hmm. I still read novels. I don't think that it impacts me that much directly.
- LFLex Fridman
Doesn't impact your work? It just, it's a...
- GRGuido van Rossum
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.
- LFLex Fridman
You don't think there's a creative element to the design? You know, some would say-
- GRGuido van Rossum
Well, th-
- LFLex Fridman
... art, design of a language is art.
- GRGuido van Rossum
Uh... 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.
- LFLex Fridman
Right. Of course, you don't feel doesn't mean it's not somehow deeply there in your subconscious. Who know, who knows-
- GRGuido van Rossum
Who knows. Yeah, yeah.
- 4:50 – 7:13
Early tinkering: electronics kits, debugging, and learning analog realities
- LFLex Fridman
So let's go back to your early teens. Your hobbies were building electronic circuits, building mechanical models.
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
What... If you can just put yourself back in the mind of that, uh, young Guido, 12, 13, 14. Was that grounded in, in a desire to create a system, so to create something, or was it more just tinkering, just the joy of puzzle-solving?
- GRGuido van Rossum
Uh, 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 followed the instructions, putting the things together. I mean, the... 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.... uh, which has ha- which has always stayed with me. But I had a very naïve model of, like, how a transistor works. And I, I don't think that, that in those days, I had any understanding of, uh, coils and capacitors, which, 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-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... how they actually work. And I would have things that the sche- the schematic looked every- everything looked fine and, uh, 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, uh, were kind of poorly built.
- 7:13 – 11:30
First encounter with computers: batch programming and abstract outputs
- LFLex Fridman
But through that time, I think it's really interesting and instructive to think about because there's echoes of it are in this time now. So in the 1970s, 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, your sit- we would sit you down and ask you to predict the '80s and the '90s, do you think you would be able to do so successfully to unroll this, the process that's- (laughs) that's happening?
- GRGuido van Rossum
No, I, I had no clue. I, 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 w- 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 w- heard that word. My, my own explorations in electronics were sort of about very simple digital circuits and I, I had sort of... I had the idea that I somewhat understood how a digital calculator worked.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And so there is maybe some echoes of computers there but I didn't, didn't... I never made that 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 money between accounts. I was act- also not really interested in those things.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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.
- LFLex Fridman
And there were some... you're supposed to talk to that computer by programming it.
- GRGuido van Rossum
Uh-
- LFLex Fridman
So what did that feel like, finding-
- GRGuido van Rossum
That was the... Yeah, that was the only thing you could do with it.
- LFLex Fridman
(laughs)
- GRGuido van Rossum
The c- the computer wasn't really con- 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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And so all you could do was write a program that did something very abstract and I don't even remember what my first forays into programming were but they were sort of doing simple math exercises and-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... just to learn how a programming language worked.
- LFLex Fridman
Did you s- sense... Okay, first year of college. You see this computer, you're, 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 y- did you start to imagine that one, the personal computer, but did you see it as something that is a tool, like a tool th- like a word processing tool, maybe, maybe for gaming or something? Or did you start to imagine that it could be, you know, go into the world of robotics? Like you... you know, the Frankenstein-
- GRGuido van Rossum
I didn't... Yeah.
- LFLex Fridman
... picture that you could create an artificial being, there's like another entity in front of you. You did not see a computer-
- GRGuido van Rossum
I, I don't think I really saw it that way. I was really more interested in the tinkering. It's, 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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
I've always been very focused on the sort of activity of programming itself and not so much what happens with, with the program you write.
- LFLex Fridman
Right.
- 11:30 – 19:09
Conway’s Game of Life: efficiency hacks and emergent complexity
- GRGuido van Rossum
I, I, I do remember and I don't rem- Maybe in my second or third year, uh, probably my second actually, someone pointed out to me that there was this thing called Conway's Game of Life.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, you're probably familiar with it. Uh, I think-
- LFLex Fridman
In the '70s I think is when-
- GRGuido van Rossum
Yeah.
- LFLex Fridman
... he came up with it.
- GRGuido van Rossum
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 very famous at the time and I think up to the '90s 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 this 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, I don't even remember where I got it, uh, 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-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... 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 things and-
- LFLex Fridman
Patterns of different kinds and, yeah.
- GRGuido van Rossum
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-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... that took nine bits of input which is the sort of the cell and its neighbors-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... and produced a new value for that cell.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And it's like combination of, of a half adder and some other clipping, no it's actually a full adder, 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 at, as bitwise, uh, values. And so, I could basically generate 60 bits of a generation in, uh, in like, eight instructions or so.
- LFLex Fridman
Nice.
- GRGuido van Rossum
So I was proud of that.
- LFLex Fridman
(laughs) It's, it's funny that you mentioned, so, uh, for people who don't know, Conway's Game of Life is, uh, there's, it's a cellular automata where there's link, single compute units that kind of look at their neighbors and, uh, figure out what they look like in the next generation based on the state of their neighbors, and this deeply distributed, uh, system that, uh, in, 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, uh, it's, it's beautiful, there's a, 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, uh, a hack you did to make it run efficiently. When you're not commenting on, what, like this is, this is a beautiful implementation. Uh, you're not commenting on the fact that there's an emergent complexity that you've, you've, you've coded a simple program and when you step back and you print out the s- following generation after generation, that s- stuff that you may have not predicted would happen is happening.
- GRGuido van Rossum
Right.
- LFLex Fridman
(laughs) And, and was that, is that magic? I mean, that's the magic that all of us feel when we program. When, when you 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?
- GRGuido van Rossum
I think I went back and forth. Uh, as a student we had an incredibly small budget, uh, 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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
It's a different story but, so, I, I actually wanted the efficient implementation because I also wanted to explore what would happen with a larger number gener- of generations and a larger sort of size of the, of the board. And so once the im- the implementation was flawless, uh, I would feed it different patterns and then I think maybe there was a, a follow-up article where there were patterns that, that were like gliders.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Patterns that repeated themselves after a number of generations, but, uh, translated one or two positions to the right or up or something like that.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, and there were f- I remember things like glider guns. Well, you can, you can Google Conway's Game of Life, it is still a, people still go ah and oo over it.
- LFLex Fridman
For a reason, because it's not really well-understood why, I mean this is what Stephen Wolfram is obsessed about, right? (laughs)
- 19:09 – 20:53
Skepticism about early AI hype and the influence of Gödel, Escher, Bach
- LFLex Fridman
But let me sort of ask, at that time, you know, some of the world, at least in popular press, uh, was kind of captivated, perhaps at least in America, by the idea of artificial intelligence. That, that these computers would be able to think pretty soon. And-
- GRGuido van Rossum
Yeah. (laughs)
- LFLex Fridman
... did that touch you at all? Did that... In science fiction or in reality? Uh, in-
- GRGuido van Rossum
Uh.
- LFLex Fridman
... in any way?
- GRGuido van Rossum
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.
- LFLex Fridman
Was it in the background somewhere, like in your thoughts or-
- GRGuido van Rossum
The, the, the sort of, the using computers to build something intelligent always felt to me... Because I had s- I felt I had so much understanding of what actually goes on inside a computer-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... 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, uh, in my early 20s was Godel, Escher, Bach.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
That was about consciousness, and that was big eye-opener.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
In, in some sense.
- 20:53 – 24:19
Brains as computers: atheism, evolution, DNA as ‘binary code,’ and no soul
- LFLex Fridman
In, in what sense? So, so con- so yeah, so on your own brain, did you... Do you s- did you at the time or do you now see your own brain as a computer or is-
- GRGuido van Rossum
Uh...
- LFLex Fridman
... is it, 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 weakly 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 f- in the '40s, '50s, '60s, and now at least similarities between the brain and our computers.
- GRGuido van Rossum
Oh yeah, I mean, I, 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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
But I don't believe in, like, a separate thing that infuses us with intelligence or, uh, 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 then... Well, my parents were atheists. Uh, 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. I, I totally see that sort of given how many millions of years evolution took its time-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... DNA is, is a particular machine that, that sort of encodes information, uh, and an unlimited amount of information in, in chemical, uh, form and has figured out a way to replicate itself. I thought that that was... Maybe it's 300 million years ago, but I thought it was closer to half a bil- half a billion years ago that that sort of originated, and it hasn't really changed. The, the sort of, the structure of DNA hasn't changed ever since. That is like our binary code that we-
- LFLex Fridman
Yeah.
- GRGuido van Rossum
... have in hardware. I mean...
- LFLex Fridman
The basic programming language hasn't changed, but maybe-
- GRGuido van Rossum
Yeah, we-
- LFLex Fridman
... the programming itself-
- GRGuido van Rossum
... obviously did ch- did sort of...
- LFLex Fridman
(laughs)
- GRGuido van Rossum
It, it happened to be a set of rules that was good enough to, to sort of develop endless variability and, and sort of the, the idea of self-replicating molecules competing with each other for resources and, 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, it's, it's clear that that did happen. And...
- 24:19 – 30:50
Consciousness as a spectrum: senses, vision, animals, and self-driving cars
- LFLex Fridman
Can you comment on consciousness and how you s- 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 conscious, consciousness is this whole other, other thing. Do you think about it often as a developer of a (laughs) programming language and...
- GRGuido van Rossum
(laughs)
- LFLex Fridman
(laughs) ... and as a human?
- GRGuido van Rossum
Those, those are pretty sort of separate topics. My sort of, my line of work, working with programming does not involve anything that, that goes in the direction of developing intelligence or consciousness. But sort of privately as an avid reader of popular science writing, I, I have some thoughts which, which is mostly that I don't actually believe that consciousness is an all or nothing thing.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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, the evolution of more and more intelligence that led to, to sort of the human form of intelligence followed the, the evolution of the senses, especially the visual sense. I mean, there is an enormous amount of processing that's needed to interpret a scene.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And humans are still better at that than, than computers are.
- LFLex Fridman
Yeah. And so...
- GRGuido van Rossum
And, and, and 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 lead 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.
- LFLex Fridman
Has a, a lot of rich sensory information coming in. So the, that's a really interesting thought that the, that whatever that basic mechanism of DNA, whatever that basic, building blocks of programming is you, if you just add more abilities, more, 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, as humans to appear like intelligence and consciousness.
- GRGuido van Rossum
Yeah. So in, in, in, 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."
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
"Oh, here's an old lady crossing the street." "Oh, here is someone carrying a pile of mail. There's a mailbox. I bet you they're gonna cross the street to reach that mailbox."
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And I slow down and I don't even think about that.
- LFLex Fridman
Yeah.
- GRGuido van Rossum
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 gonna fall."
- LFLex Fridman
Mm-hmm. Yeah, it-
- GRGuido van Rossum
I, I, I see sort of, I see much more of a... 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, to do whatever they do.
- LFLex Fridman
(laughs) So in that sense, so you actually highlight... 'cause that's where I work in is in autonomous vehicles, you highlight-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... the big gap, uh, 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, of, uh, uh, consciousness. Consciousness is something that you need to have to be able to empathize, to be able to-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... um, fear, understand what the fear of death is, all these aspects that are important for interacting with pedestrians, you need to be able to, uh, do basic computation based on our human, uh, desires and, and flaws.
- GRGuido van Rossum
And if, if sort of... Yeah, if you, if you look at a dog, the dog clearly knows... I mean, I'm not a dog owner 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 a- alone, they cry. (laughs)
- LFLex Fridman
(laughs)
- GRGuido van Rossum
Uh, they're afraid because they were mistreated when they were younger, uh...... 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.
- 30:50 – 36:34
Limits of pure logic: pattern matching, data, and layers of abstraction
- LFLex Fridman
It's a 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 17th century, and with, uh, 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, form a reasoning. And then once you formallize 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 (laughs) , that this is possible, that this, we can actually program-
- GRGuido van Rossum
But they weren't aware of the concept of pattern matching in the sense that we are aware of it now. They sort of thought you ... They, they had discovered incredible bits of mathematics, like Newton's calculus.
- LFLex Fridman
Yeah.
- GRGuido van Rossum
And their sort of idealism, their, their sort of extension of what they could do with logic and math sort of went along those lines. And they thought there, there's like, yeah, logic. There's, there's like a, 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, a circuit that, that sort of interprets the visual clues and the context and everything else, and somehow can massively parallel pattern match against stored rules. I mean-
- LFLex Fridman
But those-
- GRGuido van Rossum
... if I see you tomorrow here in front of the Dropbox office, I might recognize you. If I-
- LFLex Fridman
Even if I'm wearing a different shirt?
- GRGuido van Rossum
Yeah. But if I, if I see you tomorrow in a coffee shop in Belmont, I might have no idea, or-
- LFLex Fridman
Yeah.
- GRGuido van Rossum
... that it was you, or on the beach or whatever.
- LFLex Fridman
(laughs)
- GRGuido van Rossum
(laughs) I make those kind of mistakes myself all the time.
- LFLex Fridman
I'll have to go to the beach. Okay. (laughs)
- GRGuido van Rossum
I see someone that I only know as like, "Oh, this person is a colleague of my wife's."
- LFLex Fridman
Yeah.
- GRGuido van Rossum
And then I see them at the movies, and I don't recognize them.
- LFLex Fridman
But do you see those ... You call it pattern matching. Do you see that rules is, uh, unable to encode that? To you, you ... Everything 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 you can ... There's probably tens of thousands of facts you pick up moment by moment about this scene. You take 'em for granted and you accumulate, uh, uh, 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? What?
- GRGuido van Rossum
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 effects 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?
- LFLex Fridman
Right.
- GRGuido van Rossum
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. (laughs)
- LFLex Fridman
(laughs) So, that's a very pragmatic view. I mean, obviously as an engineer, I agree with that kind of view, but I also, you also have to consider the, the, well, the Sam Harris view of, well, intelligence is just information processing, that you just, like you said, you take in sensory information and you, and you do some stuff with it and you come up with actions that are intelligent.
- GRGuido van Rossum
(laughs) That make, he makes it sound so easy. I don't know who Sam Harris is, so.
- LFLex Fridman
Uh, f- oh, uh, well, he's a philosopher. So, like this is how philosophers often think, right? I-M-E- and essentially that's what Descartes was is, wait a minute, 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, j- 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 it, uh, you shouldn't get too excited just yet about the fact that you figured out that we're made of atoms.
- GRGuido van Rossum
Right. And, and, and the same about taking facts as our, 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, how to deal with those. I mean, I ... Some- sometimes I don't know if I can go on a tangent or not.
- LFLex Fridman
Please.
- GRGuido van Rossum
Uh-
- LFLex Fridman
We'll drag you back in. (laughs)
- 36:34 – 41:47
Compiler analogy for the mind: parsing, internal representations, and memory
- GRGuido van Rossum
Sure. So-... if I take a simple program that parses, uh, say, say I have a compiler, it parses a program.
- LFLex Fridman
Yeah.
- GRGuido van Rossum
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, and I don't know how many of your viewers or listeners are familiar with compiler technology, but there's-
- LFLex Fridman
Fewer and fewer these days, right?
- GRGuido van Rossum
Uh, that's also true probably. Uh, people want to take a shortcut, but they're sort of... This abstraction is a data structure that the compiler then uses to produce output that is relevant, like a translation of that program to machine code that can be executed by, by hardware. And then the 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, 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. 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, or well, not intelligent, but is- has e- an abstraction for motion.
- LFLex Fridman
Yeah.
- GRGuido van Rossum
And we still have-
- LFLex Fridman
That's-
- GRGuido van Rossum
... similar things in, in, but much more complicated in our brains. I mean, otherwise, you couldn't drive a car if you, if you couldn't sort- if you didn't have an incredibly good abstraction for motion.
- LFLex Fridman
Yeah, in some sense, the same abstraction for motion is probably one of the primary sources of our, of information for us. We just know what to do, uh, I think we know what to do with that. We've built up other abstractions on top, on top of it.
- GRGuido van Rossum
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, and is available on recall. I mean, there 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, 10 digits and reproduce them in a while if, if I sort of repeat them to myself a few times.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, so that's a fairly conscious form of memorization. On the other hand, how do I recognize your face? I have no idea. 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.
- LFLex Fridman
Right. So what, 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 as compilers all the way down. Uh, 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 when Descartes started this whole train of saying that there's no magic. I mean, there's others before him, but-
- GRGuido van Rossum
Well, didn't Descartes also have the notion, though, that the soul and the body were, were fundamentally separate?
- LFLex Fridman
Separate. Yeah, I think he had to write in God in there for, uh-
- GRGuido van Rossum
Yeah.
- LFLex Fridman
... political reasons. So I don't, I don't actually, I'm not a historian, uh, but there's notions in there-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... that all of reasoning, all of human thought can be formalized. I think that continued in, in the 20th century with, with, uh, with Russell and with, uh, with Godel's, uh, incompleteness theorem, this debate of what, what, 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
- 41:47 – 53:29
What counts as programming? ‘Software 2.0,’ ML opacity, and reliability in practice
- LFLex Fridman
faces and so on, theoretically, in, 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, so what it, what, what does it mean to program a computer? So you said you write a Python program or a compiled, uh, a C++ program that compiles to some byte code. Uh, it's forming layers. You're, you're, 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?
- GRGuido van Rossum
I think-
- LFLex Fridman
In the same kind of way?
- GRGuido van Rossum
... at some, at some point, the higher level of, levels of abstraction will not be called programming, and they will not resemble...... what we w- 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 are still programming and, and, and system administration and who knows what's keeping ... to keep the machine running. But what the machine does is, is a different level of abstraction in a sense, 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 layperson, and I feel myself totally as a layperson in that field, it looks like the researchers who publish the results don't necessarily know exactly how, how their algorithms work and, uh, I often get upset when I sort of read a, a sort of a fluff piece about Facebook in the newspaper or social networks and they say, "Well, algorithms..." And that's like totally different interpretation of the word algorithm-
- LFLex Fridman
Algorithm, yeah.
- GRGuido van Rossum
... 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. You can like prove that Eratosthenes' sieve produces all prime numbers and only prime numbers.
- LFLex Fridman
Mm-hmm. Yeah, so, uh, I don't know if you know who Andrej Karpathy is. He's-
- GRGuido van Rossum
I'm afraid not.
- LFLex Fridman
Uh, so he's, uh, uh, head of, uh, AI at Tesla now but he was at Stanford before and he has this cheeky way of calling this concept software 2.0. So let me disentangle that for a second. So, so kind of what you're referring to is the traditional, traditional (laughs) ... The, the algorithm, the concept of an algorithm, something that's ... There it's clear, you can read it, you understand it, you can prove its functioning. It's kind of software 1.0. And what software 2.0 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. 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 clean ... Getting a lot of data. That's what programming is, uh, in this, in this-
- GRGuido van Rossum
Well, that would be programming 2.0.
- LFLex Fridman
2.0. Tu- programming 2.0. So-
- GRGuido van Rossum
T- and I, I wouldn't call it that programming. It- it's just a different activity, just like building organs out of cells is not called chemistry.
- LFLex Fridman
(laughs) Well, so le- let's just, uh-
- GRGuido van Rossum
But, but true.
- LFLex Fridman
... step back and think sort of more generally, I- of course. But, you know, it's like a ... As a parent teaching, teaching your kids things can be called programming. In that same sense that, that's how programming is being used. You're providing them data, examples, uh, use cases so imagine writing a function not by, uh ... Not with for loops and, uh, 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 when it takes those functions it should do this." And then figure out the rest. So that's this 2.0 concept. And l- so the question I have for you is- is like-
- GRGuido van Rossum
Uh.
- LFLex Fridman
... it's a very fuzzy way ... This is the reality of a lot of these pattern recognition systems and so on.
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
It's a fuzzy way of "programming." What do you think about this kind of world? Uh, should, should it be called something totally different, uh, than, uh, programming? It's, it's ... Like if you're a software engineer, does that mean your, your designing systems that are very ... can be systematically tested, uh, evaluated, they have a very specif- specification, and then this other fuzzy software 2.0 world, machine learning world, that sh- that's something else totally or is there some intermixing that's possible?
- GRGuido van Rossum
Well, the question is probably only being asked because we, we don't quite know what that software 2.0 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 he- 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. So I d- I don't know, maybe I'm focused too much on the terminology. I ... But I expect that-... 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, uh, will, will develop those concepts.
- LFLex Fridman
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, it seems on everything we've tested to work 99.9% of the time, but we can't guarantee it and it, it fails in unexpected ways. We can't even give you examples of how it fails in unexpected ways. But it's like really good most of the time.
- GRGuido van Rossum
Yeah, but that's-
- LFLex Fridman
Is there no room for that in current ways we think about programming?
- GRGuido van Rossum
Uh... Programming 1.0 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-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... uh, 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, 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 task. 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.
- LFLex Fridman
Do you think, uh, programming should be taught and thought of as exactly what you just said? 4- I, I come from this kind of, um, you're, you're almost denying that fact always.
- GRGuido van Rossum
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, you 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.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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, uh, 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. 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.
- 53:29 – 1:04:12
Python’s origin story: the ‘itch’ between shell scripting and C, built in three months
- LFLex Fridman
If you then take a few steps back into decades, um, '70s and '80s, uh, 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-
- GRGuido van Rossum
I was actually always caught by surprise by sort of this-
- LFLex Fridman
Every stage of it.
- GRGuido van Rossum
Yeah, pretty much every stage of computing.
- LFLex Fridman
So maybe just because, um, you've spoken in other interviews, but I think the evolution of programming languages are fascinating and, and it's... Especially because it leads, from my perspective, towards greater and greater degrees of intelligence. Uh, I, I learned the first programming language I played with in, in Russia was, um, with the turtle, uh, Logo.
- GRGuido van Rossum
Logo, yeah.
- LFLex Fridman
And, um, and, and if you look, I just have a list of programming languages, all of which I know, played with a little bit, and they're all beautiful in different ways from Fortran, COBOL, Lisp, ALGOL 60, BASIC, Logo again, C, um, as a few... Uh, object-oriented came along in the '60s, Simula, Pascal, Smalltalk, all of that leaves-
- GRGuido van Rossum
Those are all the classics.
- LFLex Fridman
The classics, yeah. The classic hits, right? Uh, Scheme, built, that's built on top of Lisp.... a, on the database side, SQL, C++, and all that leads up to Python. Pascal too, and, uh, that's before Python. MATLAB. These kind of different communities, different languages. So can you talk about that w- world? I know that, um, sort of Python came out of ABC, which I actually never knew that language. I just e- having researched this conversation, went back to ABC-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... and it looks remarkably (laughs) ... It, it has a lot of annoying qualities, uh, but underneath those, like, all caps and so on. Uh, but underneath that, there's elements of Python that are quite... They're already there. Uh-
- GRGuido van Rossum
That's where I got all the good stuff.
- LFLex Fridman
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, what is everyone chasing? You said, um, that every programming language is, uh, built to scratch an itch.
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
W- 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?
- GRGuido van Rossum
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...
- LFLex Fridman
You'll solve nothing.
- GRGuido van Rossum
Uh, well, yeah, it, it's, it's too overwhelming.
- LFLex Fridman
Yeah.
- GRGuido van Rossum
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 on, at the high level, and...
- LFLex Fridman
Nice-
- GRGuido van Rossum
But, I was, I was thinking about... M- much more about... I want a tool that I can use to be more productive as a programmer in a very specific environment. Uh, and I also had given myself a time budget for the development of the tool, and that was sort of about 3 months for both the design, like thinking through what are all the features of the language syntactically, uh, and semantically, and how do I implement the whole pipeline from parsing the source code to executing it?
- LFLex Fridman
So, I think w- both with the timeline and the goals, it seems like productivity was at the core of it, th- as, as a goal. So, like for me-
- GRGuido van Rossum
Yeah.
- LFLex Fridman
... in the '90s and, uh, the first decade of the 21st century, I was always doing machine learning, AI. Programming for my research was always in C++.
- GRGuido van Rossum
Wow.
- LFLex Fridman
And then... (laughs) And then the other people who are a little more mechanical engineering, electrical engineering, are, are MATLABby.
- GRGuido van Rossum
Yeah.
- LFLex Fridman
Uh, they're, they're a little bit more MATLAB-focused.
- GRGuido van Rossum
Mm-hmm.
- 1:04:12 – 1:06:07
Language design as evolution: borrowing features and learning from prior languages
- LFLex Fridman
Ho- so you just specified a bunch of goals, uh, 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 i- in those? So, I have f- f... 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, wh-
- GRGuido van Rossum
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."
- LFLex Fridman
Oh, interesting. So, you basically-
- GRGuido van Rossum
So-
- LFLex Fridman
Exactly. You first observed-
- GRGuido van Rossum
Yeah.
- LFLex Fridman
... what you like.
- GRGuido van Rossum
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-30s, uh, 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, its cr- the- the- with its designers. I had nothing to do with the design. It was designed fully as it was- w- ended up being implemented when I joined the team.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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, um, various other things.
- 1:06:07 – 1:19:03
Governance, Python 3’s breaking changes, and stepping down after PEP 572
- LFLex Fridman
So, and then if you take that further, so you had... You've had this funny sounding but I think surprisingly accurate and... Or at least practical, uh, title of b- benevolent dictator for life, for quite, you know, for the last three decades or whatever. Or no, not the actual title, but functionally speaking. Uh, so you had to make decisions, design decisions. Can you maybe, uh... Let's take Python 2, so Python... Releasing Python 3 as an example.
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
It's not backward compatible to Python 2 in- in ways that a lot of people know. So, what was that deliberation, discussion, decision like? Yeah, what was the psychology of that experience? Do you regret any aspects of how that experience undergone, uh, that-
- GRGuido van Rossum
Well, s- yeah. So, it was a group process, really. At- at- at that point, even though I was BDFL in NIME, in name, and- 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 3.0, in some sense, was sparked by other people in the community, uh, pointing out, "Oh, well, there are a few issues that sort of bite users over and over. Can we do something about that?"
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And for Python 3, 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 warts?" And we had sort of, in the past, we had always taken backwards compatibility very seriously, and so many Python warts 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 warts that were widely recognized as problems, not like roadblocks, but nevertheless, sort of things that some people trip over, and you know that's, that's always the same thing that, that people trip over when they trip. And we could not think of a backwards compatible way of resolving those issues.
- LFLex Fridman
But it's still an option to not resolve the issues, right?
- GRGuido van Rossum
And so yes, 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, in that way, in 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."
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, "And we're okay with that because, well, we can't easily change it. Uh, it's not too bad, we can do a little bit with user education, or we can have a static analyzer or warnings, uh, in, 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, uh, we should do something about that."
- LFLex Fridman
Should do something. But ultimately, there is a decision to be made, right?
- GRGuido van Rossum
Yes.
- LFLex Fridman
So... Was that the toughest decision in the history of Python you had to make as the, uh, benevolent dictator for life? Or if not, what a- are there, maybe e- even on a smaller scale, what was a decision where you were really torn up about?
- GRGuido van Rossum
Well, the toughest decision was probably to resign. (laughs)
- LFLex Fridman
(laughs) All right. Let's go there.
- GRGuido van Rossum
And-
- LFLex Fridman
Hold on a second then. Let me just... Uh, 'cause in the interest of time too, 'cause I have a few cool questions for you, I mean, uh, l- let's touch a really important one because it was quite dramatic and beautiful in certain kinds of ways. Uh, in July this year, three months ago, you wrote, "Now that PEP 572 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, uh, benevolent dictator for life, and you all will be on your own."
- GRGuido van Rossum
(laughs)
- LFLex Fridman
First of all, just this, it's, uh, 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 (laughs) set of statements. It's almost this open-ended nature, called the community to create a future for Python. It, it was just kind of a beautiful aspect to it.
- GRGuido van Rossum
Wow.
- LFLex Fridman
If 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, w- could you take me through your mindset when you made this?
- GRGuido van Rossum
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 572.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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.
- LFLex Fridman
So, so-
- GRGuido van Rossum
But, so...
- LFLex Fridman
Sorry, so sorry, just to ask, is asyncio, is-
- GRGuido van Rossum
No.
- LFLex Fridman
That's the one, or no?
- GRGuido van Rossum
No.
- 1:19:03 – 1:26:51
Looking ahead: GIL, concurrency, packaging, and pride in ‘raising’ Python
- LFLex Fridman
And out of a grab bag of future feature developments, let me ask if you can comment maybe on all very quickly. Concurrent programming, parallel computing, async IO, these are things that people have, uh, expressed hope, complained about.... whatever have discussed on, on Reddit. AsyncIO, so the parallelization in general. Uh, packaging, s- I, I was totally clueless on this. I just use pip to install stuff, but apparently there's pipenv, poetry. There's these, uh, dependency packaging systems that manage dependencies and so on that are emerging, and there's a lot of confusion about what's, what's the right thing to use. Then also, uh, functional programming. The, the ever, you know-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... uh, the, the, uh, f- are we going to get more functional programming or not? This kind of, this kind of idea. And, of course, the, uh, the, the GIL is a (laughs) , uh, connected to the parallelization, I suppose, the global interpreter lock problem. Can you just comment on whichever you wanna comment on?
- GRGuido van Rossum
Well, let's take the GIL and parallelization and AsyncIO as one, one topic.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
I'm not that hopeful that Python will develop into a sort of high concurrency, high parallelism language. That 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.
- LFLex Fridman
So you, you think it might not even need to, really the way people use it? It, it, it might not be, uh, something that should be of, of great concern at the moment?
- GRGuido van Rossum
I think, I think AsyncIO is a special case because it sort of allows overlapping I/O and only I/O, and that is, is a sort of best practice of supporting very high throughput I/O, many connections, uh, per second. Uh, I'm not worried about that. I think AsyncIO will evolve. There are a couple of competing packages. We have some very smart people who are sort of pushing us in sort of to make AsyncIO better.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, parallel computing, I think that Python is not the language for that. Uh, there are, there are way- ways to work around it, but you sort of... You can't expect to write an algorithm in Python and have a compiler automatically parallelize that. What you can do is use a package like NumPy, and there are a bunch of other-
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
... 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++ world. But the, those packages are themselves implemented usually in C++.
- LFLex Fridman
That's right. That's where TensorFlow and all these packages-
- GRGuido van Rossum
Yeah.
- LFLex Fridman
... come in where they parallelize-
- GRGuido van Rossum
Mm-hmm.
- LFLex Fridman
... across GPUs, for example.
- GRGuido van Rossum
Yeah.
- LFLex Fridman
They take care of that for you. So in terms of packaging, uh, can you comment on the future of packaging in Python?
- GRGuido van Rossum
Uh, yeah, my, it... Packaging has always been my least favorite topic.
- LFLex Fridman
(laughs)
- GRGuido van Rossum
It's, it's, it's a really tough problem because, uh, the OS and the platform want to own packaging.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Uh, 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, uh, in general, and, but they all work across all languages.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
And several languages like Node, JavaScript, uh, and Ruby and Python all have their own packaging solutions that only work within the ecosystem of that language.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
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. That's what most people do. 10 years ago, Python packaging was really a terrible situation. Nowadays, pip is the future. There is, there is a separate ecosystem for, uh, numerical and scientific PyCon, Python based on, uh, Anaconda.
- LFLex Fridman
Mm-hmm.
- GRGuido van Rossum
Those two can live together. I don't think there is a need for more than that.
Episode duration: 1:26:44
Install uListen for AI-powered chat & search across the full episode — Get Full Transcript
Transcript of episode ghwaIiE3Nd8