Lex Fridman Podcast - Guido van Rossum: Python

Episode Date: November 22, 2018

Guido van Rossum is the creator of Python, one of the most popular and impactful programming languages in the world. Video version is available on YouTube. If you would like to get more information a...bout this podcast go to https://lexfridman.com/ai or connect with @lexfridman on Twitter, LinkedIn, Facebook, or YouTube where you can watch the video versions of these conversations.

Transcript
Discussion (0)
Starting point is 00:00:00 The following is a conversation with Guido and Rasm, 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 at Lex Friedman, spelled F-R-I-D. And now, here's my conversation with Guido van Rassam.
Starting point is 00:01:02 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, 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? Ouch! I did not expect such a deep one. I guess we all have good and evil potential in us, and a lot of it depends on circumstances and context. Out of that world, at least on the Soviet Union side in Europe, sort of out of suffering,
Starting point is 00:01:55 out of challenge, out of that kind of set of traumatic events, often emerges beautiful art, music, literature. In an interview, I read or heard, you said you enjoyed Dutch literature when you were a child. Can you tell me about the books that had an influence on you in your childhood? Well, as a teenager, my favorite writer was, my favorite Dutch author was a guy named Willem Friedrich Hermanns, whose 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 very interesting, very good books I thought, I think. In a nonfiction way. No, it was all fiction, but it was very much set in
Starting point is 00:03:10 No, it was all fiction, but it was very much set 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 some of the characters in his novels sort of cross that line and you never really find out what exactly happened. And in his novels there's always a good guy and a bad guy, the nature of good and evil, is it clear there's a hero? It's no, his heroes are often more, his main characters are often anti-heroes. And so they're not very heroic. They're often, they fail at some level to accomplish their lofty goals. And looking at the trajectory through the rest of your life, has literature, Dutch or English or translation and an impact outside the technical world that you existed in.
Starting point is 00:04:14 I still read novels. I don't think that it impacts me that much directly. It doesn't impact your work. It's a separate world. My work is highly technical and the world of art and literature doesn't really directly have any bearing on it. You don't think there's a creative element to the design? Some would say say art design of a language is art 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 Right, of course, you don't feel doesn't mean it's not somehow deeply there in your subconscious We know who knows. So let's go back to early teens. Your hobbies were building on trunk circuits, building mechanical models.
Starting point is 00:05:16 What if you can just put yourself back in the mind of that young, widowed 12, 13, 14, was that grounded in a desire to create a system so to create something? Or is it more just tinkering? Just the joy of puzzle solving. 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
Starting point is 00:05:56 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
Starting point is 00:06:20 sort of follow the instructions very carefully, which has always stayed with me, but I had a very naive model of how a transistor works. And I don't think 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 analog part of how they actually work. And I would have things that the schematic looked, everything looked fine. And it didn't work.
Starting point is 00:07:10 And what I didn't realize was that there was some megahertz level oscillation that was throwing the circuit off because I had two wires were too close, or the switches were were kind of poorly built, 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 1970s the personal computer was being born
Starting point is 00:07:43 So did you sense in tinkering with these circuits? Did you sense the encroaching revolution in personal computing? So if at that point, you're sitting, we'll 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 the process. That's. 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.
Starting point is 00:08:17 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.
Starting point is 00:08:41 And I had never heard that word. My own explorations in electronics were sort of about very simple digital circuits. 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 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 the money between accounts. That was also not really interested in those things. It was only when I went to university to study math that I found out that they had a computer
Starting point is 00:09:37 and students were allowed to use it. And there were some, you're supposed to talk to that computer by programming it. Or did I feel like finding it? Yeah, that was to talk to that computer by programming it. What did that feel like, 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
Starting point is 00:10:03 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. And I don't even remember what my first forays into programming were, but there were sort of doing simple math exercises and just to learn how a programming language worked. Did you sense, okay, first year of college, you see this computer, you're able to have a
Starting point is 00:10:38 program and it generates some output. Did you start seeing the possibility of this, or was it a continuation of the tinkering circuits? Did you start to imagine that one, the personal computer, but did you see it as something that is a tool, like a word processing tool, maybe for gaming or something, or did you start to imagine that it could be, you be, going to the world of robotics, like the Frankenstein picture that you could create an artificial being,
Starting point is 00:11:11 there's another entity in front of you. You did not see them. I don't think I really saw it that way. I was really more interested in the tinkering. It's maybe not a 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
Starting point is 00:11:37 of programming itself and not so much what happens with the program you write. 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. You're probably familiar with it. I think 70s I think. So there was a scientific
Starting point is 00:12:10 American column by someone who did a monthly column about mathematical diversions. I'm also blinking 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 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. I didn't even remember where I got it. But it spoke to me and I remember implementing
Starting point is 00:12:55 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 sort of things. Patterns of different kinds. 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
Starting point is 00:13:41 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 produce the new value for that sell. And it's like a combination of a half-adder and some other clipping. You know, 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 as bitwise values. And so I could basically generate 60 bits of a generation
Starting point is 00:14:40 in like eight instructions or so. Nice. So I was proud of that. It's funny that you mentioned, so for people who don't know, Conway's Game of Life is a, there's a cellular automata where there's single compute units
Starting point is 00:14:58 that kind of 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 emerging complexity, even though the underlying rules are simple, there's an emerging complexity. Now, the funny thing is, you've implemented this, and the thing you're commenting on is you're proud
Starting point is 00:15:36 of a hack you did to make it run efficiently. When you're not commenting on, what is a beautiful implementation? You're not commenting on the fact that there's an emergent complexity that you've coded 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 what happened is happening.
Starting point is 00:16:03 Right. And there was that magic. I mean, that's the magic that all of us feel when we program. When you create a program and then you run it, whether it's Hello World or show something on screen, if there's a graphical component, are you seeing the magic and the mechanism of creating that? 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
Starting point is 00:16:35 one of my professors because I had overspent the department's budget. It's a different story. But It's a different story. But so 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 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 were like gliders, patterns that repeated themselves after a number of generations, but translated one or two positions to the right
Starting point is 00:17:29 or up or something like that. And there were, I remember things like lighter guns. Well, you can, you can Google Conway's Game of Life. It is still a, people still go on over it. For a reason, because it's not really well understood why I Mean this 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 of the emerges in these kinds of systems And the only way you can do is to run it
Starting point is 00:18:02 I'm not convinced that that it's sort of a problem that lends itself to classic mathematical analysis. No. So one theory of how you create an artificial intelligence or an artificial being is you kind of have to, same with a game of life, you kind of have to create a universe and let it run, that creating it from scratch in a design way, in a, you know, coding up a Python program that creates a full intelligence system, maybe quite challenging, that you might need to create a universe, just like the game of life is.
Starting point is 00:18:42 Well, you might have to experiment with a lot of different universes before there is a set of rules that doesn't essentially always just end up repeating itself in a trivial way. Yeah, and Steve 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 rules that will create interesting things.
Starting point is 00:19:18 They might not look like humans, but the emergent phenomena that's interesting may not be as difficult to create as we think. Sure. 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, that's all to that in science fiction or in reality in in anyway
Starting point is 00:19:53 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. Was it in the background somewhere, like in your thoughts? That sort of the using computers to build something intelligent always fell to me because I had felt I had so much understanding of what actually goes on inside a computer. 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 would really sort of satisfy
Starting point is 00:20:50 my definition of intelligence. I think the most influential thing that I read in my early 20s was Gilles Echerbach. That was about consciousness and that was big eye opener in in some sense. In what sense? So so yeah, so on your own brain, did you do you did you at the time or do you now see your own brains of 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 the 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. Oh yeah, 50s, 60s, and now at least similarities
Starting point is 00:21:45 between the brain and our computers. Oh yeah, I mean, I totally believe that brains are computers in some sense. I mean, the rules they use to play by are pretty different from the rules we can sort of implement in our current hardware. 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 been an atheist probably from when I was 10 years old, just by thinking a bit about
Starting point is 00:22:33 math and the universe and well my parents were atheists. Now I know that 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 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 300 million years ago, but I thought it was closer to half a billion years ago,
Starting point is 00:23:35 that that sort of originated, and it hasn't really changed, that sort of the structure of DNA hasn't changed ever since. That is like our binary code that we have in hardware. The basic programming language hasn't changed, but maybe the programming itself did. It happened to be a set of rules that was good enough to happened to be a set of rules that was good enough to develop endless variability and sort of 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.
Starting point is 00:24:33 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 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 pretty separate topics. My line of work working with programming does not involve anything that goes in the direction of developing intelligence or consciousness, 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 I forget what I read that influence this, but I feel that if
Starting point is 00:25:52 you look at a cat or a dog or a mouse, they have some form of intelligence. 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 evolution of more and more intelligence that led to the human form of intelligence followed 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, and humans are still better at that than computers are. Yeah, and so. And I have a feeling that there is a sort of the reason that like mammals is in particular developed
Starting point is 00:26:58 the levels of consciousness that they have and then eventually sort of going from intelligence to self-awareness and consciousness has to do with sort of being a robot that has very highly developed senses. As a lot of rich sensory information coming in, so that's a really interesting thought that 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
Starting point is 00:27:47 like intelligence and consciousness. Yeah, so as far as robots go, I think that the self-driving cars have the 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
Starting point is 00:28:18 crossing the street. Oh, here is someone carrying a pile of mail. There is a mailbox. I bet you they're going to cross the street to reach that mailbox and I slow down and I don't even think about that. And so there is so much where you turn your observations into an understanding of what other conscious nurses are going to do or what other systems in the world are going to be, oh, that tree is going to fall. Yeah, I see much more of, I expect somehow that if anything is going to become conscious, it's going to be the self-driving car
Starting point is 00:29:05 and not the network of a bazillion computers in a Google or Amazon data center that are all networked together to do whatever they do. So in that sense, so you actually highlight, that's what I work in, is in the Thomas vehicles, you highlight 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 and consciousness and intelligence is something that basically
Starting point is 00:29:40 a system should have in order to interact with those 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 thoughts. If you look at the dog, the dog clearly knows, I mean, I'm not the dog owner, my brother, 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 when they learn.
Starting point is 00:30:30 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. They're afraid because they were mistreated when they were younger. they were mistreated when they were younger, we don't assign sort of consciousness to dogs, or at least not all that much, but I also don't think they have none of that. So I think it's consciousness and intelligence are not all or nothing. It's a spectrum.
Starting point is 00:31:07 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, I think one of the exciting ideas came in the 17th century and with the live notes, Hobbes, the cart, 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. You can formalize it, formal reasoning. And then once you formalize everything, all of knowledge, logic. You can formalize it, formal reasoning. And then once you formalize
Starting point is 00:31:45 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, 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 had discovered incredible bits of mathematics, like Newton's calculus. And they're sort of idealism, they're sort of extension of what they could do with logic and math sort of went along those lines and they thought there's like yeah logic there's like a bunch of rules and a bunch of input they didn't realize
Starting point is 00:32:39 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. I mean, if I see you tomorrow here in front of the Dropbox office, I might recognize you. Even if I'm wearing a different shirt.
Starting point is 00:33:14 Yeah, but 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 wives. And then I see them at the movies and I don't recognize them. But do you see those, you call it pattern matching?
Starting point is 00:33:40 Do you see that rules is unable to encode that? Everything you see, all the piece 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 weren't at the end of the day, you can just put it all on the table and calculate. Oh, I don't know what that means. I mean, yes, in the sense that there is no, there is no actual magic there, but there are enough layers of abstraction from the facts as they enter my eyes and my ears to the understanding of that distance. It's like if you take a human body
Starting point is 00:34:47 and you realize it's built out of atoms, well, that is a uselessly reductionist view, 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 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 got to quantum mechanics.
Starting point is 00:35:12 So, that's a very pragmatic view. I mean, obviously, as an engineer, I agree with that kind of view, but you also have to consider the, the, with the same Harris view of, well, intelligence is just information processing. Like you said, you take in sensory information, you do some stuff with it, and you come up with actions that are intelligent. That makes it sound so easy. I don't know who Sam Harris is. Oh, it's a philosopher.
Starting point is 00:35:42 So like this is how philosophers often think, right? And essentially that's what the cart was. It's, wait a minute, if there is, like you said, no magic. So you basically says it doesn't appear like there is 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,
Starting point is 00:36:05 the fact that we know very little how to get from the atoms to organs in a way that's recreatable means that you shouldn't get too excited just yet about the fact that you figured out that we're made of atoms. 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, sometimes, I don't know if I can go on a tangent or not. Drag you back in.
Starting point is 00:36:50 Sure. 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 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 tweet, and I don't know how many of your viewers or listeners are familiar with compiler technology,
Starting point is 00:37:33 but there's fewer and fewer these days, right? 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,
Starting point is 00:38:14 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. 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, but much more complicated in our brains. I mean, otherwise you couldn't drive a car. If you couldn't sort of,
Starting point is 00:39:06 if you didn't have an incredibly good abstraction for motion. 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. I think we know what to do with that. We've built up other abstractions on top. We build much more complicated data structures
Starting point is 00:39:27 based on that. And we build more persistent data structures. Sort of after some processing, some information, sort of get stored in our memory pretty much permanently 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 ten
Starting point is 00:39:57 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. 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 somehow our brains know how to do lots of things like that that are useful in our interactions with other humans without really being conscious of how it's done anymore. Right. So, so our actual day-to-day lives were operating at the very highest level of abstraction.
Starting point is 00:40:52 We were just not even conscious of all the little details into lying it. There's compilers on top of, like turtles on top of turtles, or turtles all the way down, as compilers all the way down. But that's essentially, you say that there's no magic. That's what I was trying to get at, I think, is with the cards started this whole train of saying that there's no magic. I mean, there's always before. Well, didn't the card also have the notion, though, that the soul and the body were fundamentally separate. Yeah, I think he had to write in God in there for political reasons. So 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.
Starting point is 00:41:36 I think that continued in the 20th century with the Russell and with Gatos and completeness theorem, this debate of what are the limits of the things that could be formalized? That's where the touring 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 the computer and code 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 the computer. And in that context, I like to ask programming in a philosophical way. So what does it mean to program a computer? So you said you write a Python program or a C++ program that compiles to somebody code. It's forming layers.
Starting point is 00:42:33 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? I think at some point, the higher levels of abstraction will not be called programming and they will not resemble what we call programming at the moment. There will not be source code. I mean, there will still be source code,
Starting point is 00:43:14 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's keeping, to keep the machine running. But what the machine does is a different level of abstraction in a sense. And as far as I understand, the way that for the 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 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
Starting point is 00:44:10 their algorithms work. And I often get upset when I sort of read sort of a fluff piece about Facebook in the newspaper or social networks and they say, well, algorithms. And that's like a totally different interpretation of the word algorithm. Because for me, the way I was trained or what I learned when I was eight or 10 years old, and algorithm is a set of rules that you completely understand that can be mathematically analyzed.
Starting point is 00:44:44 And you can prove things. You can prove that Aristosthenes' Siv produces all prime numbers and only prime numbers. I don't know if you know who Andre Kapati is. I'm afraid not. So he's a head of AI at Tesla now, but he's Stanford before, and he has this cheeky way of calling this concept software 2.0. So let me disentangle that for a second. So kind of what you're referring to is the traditional algorithm, the concept of an algorithm, something that's there is clear you can read it,
Starting point is 00:45:25 you understand it, you can prove it's functioning, it's kind of software 1.0. And what software 2.0 is exactly what you describe, 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 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
Starting point is 00:45:56 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, there would be programming 2.0. 2.0. 2 programming 2.0. I wouldn't call that programming. It's just a different activity, just like building organs out of cells is not called chemistry.
Starting point is 00:46:18 Well, so let's just step back and think 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 by, 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, should do this and then figure out the rest. So that's the 2.0 concept. And so the question I have for you is like,
Starting point is 00:47:12 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? If you're a software engineer, does that mean your designing systems that are very can be systematically tested, evaluated, have a very specific specification, and then this
Starting point is 00:47:44 other fuzzy software 2.0 world, machine learning world, that's something else totally, or is there some intermixing that it's possible? Well, the question is probably only being asked because we don't quite know what that software two pointer actually is. And it sort of, I think there is a truism that every task that AI 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 use that term. It was just, oh, now we know how to do this.
Starting point is 00:48:37 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. I said, I don't know, maybe I'm focused too much on the terminology, but I expect that that there just will be different concepts where people with different education and a different model of what they're trying to do will develop those concepts. Yeah, and I guess if you could comment on another way to put this concept is,
Starting point is 00:49:30 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 in it. It fails in unexpected ways. We can even give you examples of how it fails in unexpected ways. But it's like really good most of the time. Yeah, but there's no room for that in current ways we think about programming.
Starting point is 00:50:19 Programming 1., 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 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 becomes even more tedious. So everyone's 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
Starting point is 00:51:28 the second time, which often magically it does. Or they go up and they try some other way of performing their tasks. 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 sort of biological systems are even more full of that because otherwise they wouldn't survive. Do you think programming should be taught and thought of as exactly what you just said? I come from this kind of, you're almost denying that fact always. In sort of basic programming education, the sort of the programs you're having students write are so
Starting point is 00:52:30 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. 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
Starting point is 00:53:12 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 do things and how you think about it. If you then take a few steps back into decades, 70s and 80s, when you're first thinking about Python or just that world of programming languages, 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, I was actually always caught by surprise by sort of this.
Starting point is 00:54:11 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. And if you look, I just have a list of programming languages, all of which I've know have played with a little bit. I mean, they're all beautiful in different ways, from Fortran, Kobo, Lisb, Algo, 60, Basic, Logo, again, C. As a few, the object oriented came along in the 60s, Simulant, Pascal, small talk. All of that leads to the classics.
Starting point is 00:55:05 The classics, yeah, the classic hits, right? Scheme built on top of a list on a database side SQL, C++, and all of that leads up to Python, Pascal to, that's before Python, MATLAB, these kind of different communities, different languages. So can you talk about that world?
Starting point is 00:55:29 I know that sort of Python came out of ABC, which actually never knew that language. I just, having researched this conversation and went back to you, 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. That's where I got all the good stuff. All the good stuff. 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
Starting point is 00:56:02 of what is everyone chasing? You said that every program in language is built scratch and itch. Were you aware of all the itches in the community and if not, or if yes, I mean, what itch we're trying to scratch with Python? 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, you'll solve nothing. Well, yeah, it's too overwhelming. And so I had a very, very focused problem. I wanted a programming language that set somewhere in between shell scripting and C. And now arguably there is like one is higher level,
Starting point is 00:57:02 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. And, not... 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. 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
Starting point is 00:57:46 of the language syntactically and semantically and how do I implement the whole pipeline from parsing the source code to executing it. 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 21st century, I was always doing machine learning AI, programming for my research was always in C++. And then the other people who are a little more mechanical engineering, electrical engineering are Matt Labby.
Starting point is 00:58:32 They're a little bit more Matt Lab focused. Those are the world. Maybe a little bit Java too, but people who are more interested in emphasizing the object oriented nature of things. So, but then in the last 10 years or so, especially with the oncoming of neural networks in these packages that are built on Python
Starting point is 00:58:53 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 it 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.
Starting point is 00:59:18 It could be just a feeling. I don't know if I'm actually more productive, but how do you think about it? You 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++ was I really enjoyed creating performance code and creating a beautiful structure where everything, you know, this kind of going into this, especially with the newer, newer standards of templated programming, of just
Starting point is 00:59:50 really creating this beautiful, uh, formal structure that I found myself spending most of my time doing that as opposed to getting a, parsing a file and extracting a few keywords or whatever the task I was trying to do. So what is it about Python? How do you think productivity in general as you were designing it now? So 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? There are different tasks. And as a programmer, it's useful to have different tools available that
Starting point is 01:00:27 sort of are suitable for different tasks. So I still write C code. I still write shell code, but I write most of my things in Python. 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 right to 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 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 take you to write the code and how long does the code run?
Starting point is 01:01:47 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, fewer details 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. Just like when I was building electronics, I was using a breadboard most of the time.
Starting point is 01:02:59 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 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 sense 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. I mean, I know nothing about that when it comes in the way, but you're kind of describing from a Darwin described the evolution of species, right? You're observing of what is about true about Python. Now, if you take step back, if the act of creating languages is
Starting point is 01:04:22 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 features that result in those? So I have, in the beginning,
Starting point is 01:04:43 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 lexical analyze or whatever evolution was still a big part of it because 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. Oh, interesting. So you basically, exactly, you first observe what you like. Yeah.
Starting point is 01:05:15 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, 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 with its designers. I had nothing to do with the design. It was designed fully as it was, it 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
Starting point is 01:06:16 literals and how numbers work from C and various other things. So, and then if you take that further, so you've had this funny sounding but I think surprisingly accurate and 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 2, so, releasing Python 3 as an example. It's not backward compatible to Python 2 in ways that a lot of people know.
Starting point is 01:07:03 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? Well, yeah, so it was a group process really. At that point, even though I was BDFL in NIME, in NAME, and certainly everybody respected my position as the creator and the current owner of the language design, I was looking at everyone else for feedback. else for feedback. Pifon 3.0 in some sense was sparked by other people in the community, pointing out, oh well, there are a few issues that bite users over and over. can we do something about that? And for Python 3, we took a number of those, Python warts, as they were called at the time,
Starting point is 01:08:12 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 wards 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. So we were stuck with a number of words that were widely recognized as problems, not like
Starting point is 01:08:56 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 and you know that's always the same thing that people trip over when they trip. And we could not think of a backwards compatible way of resolving those issues. But it's still an option to not resolve issues. And so yes, for a long time, we had sort of to, well, okay, the language is not going to be perfect in this way and that way and that way. We sort of, there are still plenty of things where you can say, well, that particular detail is better in Java or in R or in Visual Basic or whatever.
Starting point is 01:09:48 And we're okay with that because, well, we can't easily change it. It's not too bad. We can do a little bit with user education or we can have a static analyzer or warnings in the parse or something. But there were things where we thought, well, these are really problems
Starting point is 01:10:10 that are not going away. They are getting worse in the future. We should do something about it. We should do something. But ultimately, there is a decision to be made, right? Yes. Was that the toughest decision in the history of Python you had to make as the benevolent dictator for life? Or if not, what other, maybe even on
Starting point is 01:10:34 the smaller scale? What was the decision where you were really torn up about? Well, the toughest decision was probably to resign. All right, let's go there. Hold 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 kinds of ways. In July this year, three months ago,
Starting point is 01:10:58 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 court developer and I'll still be available to mentor people
Starting point is 01:11:18 possibly more available. But I'm basically giving myself a permanent vacation from being BDFL, benevolent dictator for life. And you all will be on your own. Just this, 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
Starting point is 01:11:54 to create a future for Python. It's just kind of a beautiful aspect to it. Wow. So what end dramatic, you know, what was making that decision like, what was on your heart on your mind, stepping back now a few months later, we could take you to your mind. 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
Starting point is 01:12:33 PEP 572, which I had a big hand in its design, although I didn't initiate it originally. I sort of gave it a bunch of nudges in a direction that would be better for the language. So, sorry, just to ask, is A.S.N.K.I.O. is the one or no? No, pep 572 was actually a small feature which is assignment expressions. Oh assignment expressions, okay. That had been thought there was just a lot of debate where a lot of people claimed that they knew what was Python again, what was not Python and they knew that this was going to destroy the language. This was like a violation of Python's most fundamental design philosophy.
Starting point is 01:13:27 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. 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.
Starting point is 01:13:51 Now let's just go implement it. So I went to bed feeling really relieved. That's behind me. And I wake up Thursday morning, 7 a.m. and I think, well, that was the last one that's going to be such a terrible debate and that's it going to be said. That's the last time that I let myself be so stressed out about a pep decision. I should just resign. I've been sort of thinking about retirement for half a
Starting point is 01:14:28 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. Don't take the FL part of my title too literally 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 down here by and in I think maybe 15-20 minutes I wrote that thing that you just called Shakespearean. And the funny thing is, I didn't. I was going to get so much crap for calling you Shakespearean. I didn't even realize what a monumental decision it was.
Starting point is 01:15:17 Because five minutes later, I read that link to my message back on Twitter, where people were already discussing on Twitter. Guido resigned as the BDFL. And 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 news would sort of get out. The on your own aspects, I had also an element of quay. It was quite a powerful element of the uncertainty that lies ahead, but you can also just briefly talk about, you know, like for example,
Starting point is 01:15:59 I play guitar, it's a hobby for fun. And whenever I play, people are super positive. It's super positive. It's super friendly. They're like, this is awesome. 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 in the two camps, the two or plus camps, often pretty harsh at criticizing the opposing camps. As an onlooker, I may be totally wrong on this.
Starting point is 01:16:30 Yeah, holding wars are sort of a favorite activity in the programming community. 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? Well, if everybody is betting 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 is a middle ground where there is healthy, ongoing criticism and feedback that is very productive.
Starting point is 01:17:21 And you mean at every level you see that, I mean, someone proposes to fix a very small issue in a code base. Chances are that some reviewer will sort of respond by saying, well, actually you can do it better the other way. 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. So that future, do you have a fear of that future? Do you have a hope for that future? I'm very confident about that future. It by and large, I think that the debate has been very healthy and productive. And I actually, when I wrote that resignation, email, I knew that Python was in a very good spot and that the Python core development community,
Starting point is 01:18:27 the group of 50 or 100 people who 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 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 felt okay, resigning because I knew that the community can really take care of itself. 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, A-Sync I-O.
Starting point is 01:19:35 These are things that people have expressed hope complained about, whatever had discussed on, right, A-Sync I-O, so the parallelization in general, packaging, I was totally close on this, I just used PIPPT install stuff, but apparently there's PIPPT end and poetry, there's these dependency packaging systems that manage dependencies and so on,
Starting point is 01:19:57 they're emerging and there's a lot of confusion about what's the right thing to use, then also functional programming, the ever thing to use, then also functional programming. I will go into get more functional programming or not, this kind of idea. And of course, the, the, the, the, the, the, the, the, connected to the parallelization, I suppose, the global interpreter lock problem.
Starting point is 01:20:24 Can you just comment on whichever you want to comment on? Well, let's take the GIL and parallelization and ACNKO as one topic. I'm not that hopeful that Python will develop into a sort of high concurrency, high parallelism language. That's sort of 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. 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.
Starting point is 01:21:14 I think A-Sync IO is a special case because it sort of allows overlapping IO and only IO. And that is a sort of best practice of supporting very high throughput IO, many connections per second. I'm not worried about that. I think ASINCIO 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 a sync IO better. parallel computing, I think that Python is not the language for that. There are ways to work around it, but you can't expect to write an algorithm in Python and have a compiler automatically paralyze that.
Starting point is 01:22:13 What you can do is use a package like NumPy and there are a bunch of other very powerful packages that 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 we're back in the C++ world. But those packages are themselves implemented usually in C++. That's right. That's where TensorFlow and all these packages come in where they parallelize across GPUs, for example, they take care of that for you.
Starting point is 01:22:46 So in terms of packaging, can you comment on the future of packaging in the back? Yeah. Packaging has always been my least favorite topic. It's a really tough problem because the OS and the platform want to own packaging, 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. But they all work across all languages. Several languages like Node, JavaScript, and Ruby, and Python,
Starting point is 01:23:38 all have their own packaging solutions that only work within the ecosystem of that language. 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 a separate ecosystem for a numerical and scientific
Starting point is 01:24:20 Python based on anaconda. Those two can live together. I don't think there is a need for more than that. Great. So that's packaging. Well, at least for me, that's where I've been extremely happy. I didn't even know this was an issue until I 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-and-a-half-hour
Starting point is 01:24:46 oral history, the Don 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. So outside of your family Looking back, what about this journey? Are you really proud of? There are 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. Well, I would say that Python is definitely the best thing I've ever done.
Starting point is 01:25:39 And I wouldn't sort of say just the creation of Python, but the way I raised Python like a baby. 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 be able to take care of himself. And I'm very proud of that. 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 Hitchhark as guide or any other literature show movie that cracks you up when you think about it?
Starting point is 01:26:23 Oh, you can always play me the parents, the dead parents catch. Oh, that's brilliant. Yeah. That's my favorite as well. It's pushing up the daisies. Okay, Greta, thank you so much for talking to me today. Bless you. It's been a great conversation. Thank you.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.