Guido van Rossum - Python Language - PyCon 2016

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Little did I know that "Guido" is pronounced "Gee-doh".

👍︎︎ 14 👤︎︎ u/wyldphyre 📅︎︎ Jul 11 2016 🗫︎ replies

That "femail" section was painful to watch. Talk about a "rock and a hard place".

👍︎︎ 19 👤︎︎ u/evolutionof 📅︎︎ Jul 11 2016 🗫︎ replies

Adding more syntax (in this case for variable declaration) seems like a misguided goal to me. Syntactic simplicity is one of Python's greatest assets. I think this push in the past few years to pollute syntax with more niche features could be a slippery slope.

👍︎︎ 6 👤︎︎ u/[deleted] 📅︎︎ Jul 11 2016 🗫︎ replies
Captions
Welcome to the second morning of PyCon 2016. [applause] As we are in the city of handcrafted artisan beer and handcrafted artisan clothing, handcrafted artisan wax canvas luggage and so forth, if you have not been in the Python community for very long, or if you're new, you might not know that the inventor of the Python language, Guido van Rossum, not only put it up on the Internet for the rest of our use 25 years ago, the Spring in 1991, but that he also has continued to handcraft and work with it as our BDFL, our Benevolent Dictator For Life. He has continued to guide its evolution as people have had a lot of dumb ideas about what should happen next with Python that would've made it a lot more complicated. But as occasionally very, very good ideas have come along as well, it is Guido who has the final word, who is, if you will, the handcrafter of Python, the artisan who chooses which features gradually over the years have built Python into a world-class language. And as is his usual habit, he's here to speak to us this year at PyCon. Welcome Guido van Rossum. [applause] (Guido van Rossum) Hello. Sounds like everyone can hear me. So, a keynote. Wonderful to be back in Portland by the way. I have had many OSCONs here. I have a variety of topics I want to talk about, but I also want to have time at the end for Q & A, so I hope the AV people are prepared for that. To start with, I thought it would be nice to get back to my roots and actually present a mini State of the Union. How are things doing in Python? What's happening? What does the future bring? And if I don't answer all your questions, that's what the Q & A is for. There is something else in between, but let's start with the future of Python 2. [laughter] Well, I keep having to dig up that little picture out of my archives. Until 2020, we will really not see anything besides security fixes, maybe some new platforms that absolutely need to be used because the old platforms that they replace are no longer around. And very rarely, usually only when I make a mistake and edit in the wrong branch, a bug fix. If you want to know exactly when the party's going to be, it's gonna be at PyCon 2020. We'll have the official End of Python 2.7 Life party. It's gonna be a big one. And if you want to know exactly how long that will take, go to pythonclock.org. [applause] So -- thank you. I also have had a design idea for what the clock should really look like. It should be more like sort of one of those James Bond bombs. But Brett has a much more gentler CSS sensibility. Anyway, what's new in Python 3.5? Well actually this is also old news because Python 3.5 came out right after last year's PyCon, I believe. One very interesting notable thing is native coroutine syntax. You can define a coroutine by saying async def blah blah blah. Under the hood it's actually a generator, but you can no longer see that it's a generator. It really feels like a coroutine. It can interact with asyncio, the library, or with other coroutine frameworks that you build. Or you can just build a little app out of bare coroutines. The important keywords are async and await. Await basically suspends your coroutine. There's also async for and I think there's even async with. We'll go look it up in PEP 492. So there's some more stuff in Python 3.5 that I want to call out because I know that not everybody has sort of migrated to Python 3.5 yet. So there's the matrix multiply that numpy people really like. There's more unpacking syntax. This is just one of the new thing that are possible in Python 3.5, which is pretty obvious. Bytes formatting is back. If you have sort of old Python 2 code that uses a lot of string formatting to generate essentially byte strings, Python 3.5 sort of lets you still write that code, and doesn't actually look so bad either. And then of course there's the gradual typing. With three colleagues from Dropbox, I already gave a talk about that last Sunday. The "Hello world" of gradual typing in Python actually is celebrating its 16th birthday this year, 'cause I start thinking about that and presented that exact same example in the year 2000. So, this is a mini State of the Union. We're going pretty fast. What's new in Python 3.6? Python 3.6 is not out yet. The first alpha was just released maybe two weeks ago. The code freeze, the first beta, is gonna happen in September, and the final release is gonna happen just before Christmas for everyone to have something to play with on that boring day after Christmas. So what's gonna be new in Python 3.6? Here are a couple of things that I dug out of the PEP archives. We'll have f-strings. As if we didn't have enough different ways of formatting strings, here is an even more convenient way that sort of combines the flexibility and attention to detail of format strings with the convenience of just using print statements. And no, you don't have to use it in a print statement. You can use it for any kind of formatting. And yes, it only references local variables. And it's actually compiled to code that pulls out the local variables. Anyway, again, track down the PEP and read it if you're more interested. And maybe there's even documentation already, or if there's not, please help write that documentation. That's why this is a handcrafted, artisanal community. People help out. We also got underscores in numbers, because everyone else got them. The pathlib's library's future, its life hung on a thread. There was a large group of people who wanted it to be very different. There was some serious opposition. There was also an endless discussion on what to do with it and how to save it and what was the right way to deal with file system paths. Because, well, are they strings? Are they byte sequences? You can't even get two core developers to agree on that, let alone two users. Anyway, we now have a protocol that any object that claims to represent a file system path can turn itself into either strings or bytes, whichever it deems most appropriate, which you can then pass to a variety of system calls that continue to take strings. We'll also modify a large number of popular utility functions in the standard library to use this protocol to accept pathlib objects or other similar objects. So hopefully pathlib is up to a wonderful, productive future and everybody's going to use it. And if you have your own favorite pathlib-like library, you can also support this protocol and be on equal footing. OK, we have a secrets module. Apparently people looking for ways to generate random passwords or tokens were continuously sort of reimplementing poorly corrective graphically understood algorithms. We now have the secrets module that has a bunch of different functions that are approved by cryptographers that give you the right kind of random bits. Oh yeah, I'm not even gonna talk about local time disambiguation, although I really want to, because it's such a fascinating topic. But I'm not gonna do it. Catch me afterwards, or, well, there's always Q & A. Oh yeah, and we're moving to GitHub. Five years ago we were faced with the choice. We have to get off Subversion. What do we use: Mercurial or GitHub? And Mercurial looked so much more comfortable for us dyed-in-the-wool Subversion users because the branching model was the same, the command line structure was the same, the concepts you had to learn to get going were the same. The only cool difference was that it had all your revisions locally. Git, on the other hand, had all that plus a completely indecipherable structure for commands. Nobody understood how to do branches. OK, I can go on. So we chose Mercurial. Now somehow everybody understands Git's branching model. Everybody uses Git's, everybody sort of gets born with a GitHub account. [laughter] So we're going with the program, and thanks so much to Brett Cannon again for taking the initiative to sort of -- [applause] -- get us going, and before the end of the year, we promise we will be on GitHub. So, what do we have beyond Python 3.6? Well, this is at this point all completely idle speculation. Or sometimes I just feed Python ideas, some crazy ideas, in the hope that they'll sort of -- I don't know. It's fun to watch. It's like throwing a ball of wool into a nest full of kittens. So I don't know what'll come of the match statement ideas or dict unpacking. Variable declaration syntax is something I would really like for myself. Or actually I would like it for the gradual typing because that's the one big thing where we currently don't have syntax. To declare a variable redundantly, in this example, to be of type integer, you have to use a type comment. I really would like that to be part of the language. Unfortunately, all the alternatives that I've come up with so far that aren't much more verbose than the type comment have trouble parsing or troubling introducing. Var, for example, seems to be a very common variable name, so we really can't use a var statement for this. Anyway, meet us on Python-ideas for that. Then at the Language Summit -- hopefully by now Linux Weekly News has published a summary of what went on at the Language Summit, so please go there, LWN.net. Larry Hastings is performing a GILectomy on a live Python interpreter, and the results are apparently that the Python interpreter can still run extensions, and everything is only about three times as slow -- [laughter] -- which is actually very good signs, because he's reproducing an experiment that Greg Stein performed in the late '90s. So we know it's still slower when you remove the GIL, but Larry says there's lots of low-hanging watermelons and maybe he can eventually get it faster. So if you're interested in this kind of esoteric stuff, come to the sprints, because Larry is going to be there and look for help. So then I have a few other things. First, I need to apologize for a very obvious typo I made in my slides last year. At the very last moment, I decided I wanted to say something about female core developers because there are so few of them, if any. And in my haste to sort of get that in while I was rushing to get to the venue, I left in a typo. And six months later I still got email about that one typo in my slide. And I am so sorry. And I'm even more sorry that we still don't have two female core developers. I was approached by several women right at that PyCon where I first made the promise. Again, at various times afterwards, some women said, "I would be interested in that." Somehow none of them have yet made it to actually be Python core contributors. Well, we've received a few patches, but I'm not doing it right. And so there are now more people in the core developer group who are also offering to mentor specifically women who aspire to join our club, because we really don't like that it's sort of -- what it currently is, even though it's a -- I mean it's a fun club to be in and I want other people to also feel the fun. So Raymond Hettinger and Brett Cannon, Brett again, are also offering to mentor. And that's all I'm going to say about that. And now -- I wish I had this Monty Python BBC announcing voice. "And now for something completely different." [laughter] And actually I -- oh dear, this is not how I wanted to see it at all. What was it? Now maybe this works. So... This is lot of text and I'm gonna read it, so I'm not sure if I can make much eye contact with you all. So last month, the Netherlands celebrated King's Day. I have to say, I'm still confused by the King's Day thing because all my life, it's been the Dutch Queen, and Queen's Day was always on April 30. And now it's King's Day, and it's on April 27. I sort of -- I feel a little uncomfortable about that. In my heart I'm not much into royalty, but there we have it. the Dutch Embassy in San Francisco, which is close to where I live, invited me to give a little talk to an audience of Dutch and American entrepreneurs and tech people. I don't know, they just sort of -- I don't know where their mailing list comes from, but somehow I'm on their mailing list as a potential speaker. So this time I caved in and I wrote this thing. So, part of what follows is the tl;dr of my autobiography. Part of it is about the significance of programming languages. And part of it is about Python's big idea. And so because I am pretending that I'm still at this event at the embassy, I'm going to say: leve de koning! Long live the king. (male audience member) Hoera! Hoera! (Guido van Rossum) There is a fellow Dutchman, clearly. [laughter] He knows how that goes. So, Python is a programming language created by a community. I was introduced as Python's creator, but I'm really just more sort of a mentor for the community, just a very opinionated mentor. So yeah, there's a lot of rambling here, and I will get to a point eventually. So, to introduce myself -- and I think that introduction here is still somewhat relevant -- I'm a nerd, a geek; that's not new. I'm probably somewhere on the autistic spectrum. I'm also a very late bloomer. I graduated from college when I was 26 years old, which by current modern American standards was kind of late. At that time it was not that unusual, even. I was 45 before I got married. I'm now 60, and I have a 14-year-old son. That's sometimes exhausting, but still lot of fun. Maybe I just have a hard time with decisions. I've lived in the US, for example, for 20 years, and I'm still not a citizen, I'm just a permanent resident, even though when you ask me, I have no desire to go back to the Netherlands. I feel I'm American. I'm no Steve Jobs. I'm no Mark Zuckerberg. But when I was 35 years old, I created a programming language and it got a bit of a following. And what happened next really was pretty amazing. And I'll get to more of that. But now I want to go really far back in time. At age 10 -- sort of how -- the roots of my nerdiness, or when I first discovered. At age 10, my parents gave me an educational electronics kit. That kit was made by Philips, and it was actually an amazing kit. And every once in a while, I Google the name of that kit, and there are still a couple of Dutch electronics amateur enthusiasts who have copies of that kit and photos of it online, and I'm just drooling. I can -- I know what the components taste like. [laughter] It's like -- it's such a visceral memory to me. But it really was amazing. First I just followed the directions. And I'm very good at following directions, so everything always worked. And later I even figured out how to design my own circuits. And I literally got into computing after building my own NAND gate out of discrete components. So my first kit had three transistors, and they were like, way more than I could afford to replace from my little allowance. So I took one of my first models, a blinking light -- that's two transistors, two capacitors, a few resistors, and a battery -- and I took it to Show and Tell in, I believe, 5th grade, and it was a total dud. Nobody cared. Nobody understood why I brought that thing. Nobody was interested. Nobody was excitedly pointing at it. Nobody was asking, "How does it work?" There was no one else who knew anything about electronics. And that was one of my first -- my earliest memories of finding that I was a geek. Until then I had just been a quick learner, and that also doesn't score you any points on the social pecking order in elementary school. So in high school I developed my nerdiness further. I don't know why Word is showing all these wiggly things. I hung out with a few other kids that were interested in electronics. Big improvement; I actually had my own little social circle. And during physics class, we just sat in the back of the class discussing NAND gates while the rest of the class was still figuring out Ohm's Law. Fortunately, our teacher, our physics teacher had figured us out. And he at some point employed us to build a digital timer, which I think was actually by my design, and then we built it together. And he used it in class to demonstrate the law of gravity. It sort of -- it could measure... ...I think, one hundredth of a second and sort of multiples of that. So you dropped something and it would tell you exactly, well, that took 400 milliseconds. And then they would plot it and show that it was some kind of parabola. So this was a great project. I didn't care about laws of gravity. Already knew them. But it showed that our skills, that this electronics hobby stuff that we did, was useful. And the other kids still thought we were weird. It was the '70s, so many of them were actually into smoking pot and rebelling against society. And then there was another group who were already preparing for successful careers as doctors or lawyers or tech managers. But everyone left me alone, and I left them alone, and I still graduated as one of the best of my class. So I went to the University of Amsterdam. It was close to home, and for a teenager in the Netherlands in the '70s, that was a pretty cool place. In my mind it was the only cool place because I had sort of watched various European student protests in 1968 on television. And then my high school physics teacher was a little surprised and disappointed that I chose to major in math, not in physics, but if I look back, that difference didn't matter. What mattered was, in the basement of the science building was a mainframe computer. And the way I believe it -- I remember it, I didn't even know the word "computer," much less the concept of a computer, when I entered college at age 18. But this mainframe computer was love at first sight for me. There were card punches, line printers, batch jobs. So, more to the point, I quickly learned to program in languages named, like, ALGOL or Fortran, or, later, Pascal. That was the best one. And mostly those names actually have been forgotten, but at the time they were highly influential. And soon, again, there I was, sitting in the back of algebra class, or Galois theory, which I never figured out what it was about, ignoring the lecturer -- no wonder I didn't figure it out! -- correcting my computer programs, because that was where my emotional energy was invested. Why was that? So in that basement around the mainframe, something pretty amazing was actually happening. I don't think I was quite aware of it at the time. But there was this loosely-knit group of students and staff with similar interests, and we were all deeply into programming. And we exchanged tricks of the trade. We shared subroutines and programs. We united in alliances against the staff of the mainframe, especially in endless cat and mouse games over disk space. And in those days, of course, disk space was unbelievably precious in a way that you will never understand today. [laughter] Fortunately, the files were also much smaller. But the most important lesson I learned there was about sharing. Most of the programming tricks I learned there died with the mainframe era. But the idea that software needs to be shared, of course, is stronger than ever. And today we call it open source and it's a whole movement. And you all know that. The businesspeople in the Dutch embassy hopefully had at least heard of it but were interested in hearing more about it. So at the time, my immediate knowledge of the tricks and the trades of mainframe computer actually did matter a lot because the mainframe staff had an operating systems group, and through some kind of enlightened management or who knows what, they employed some part-time students, or maybe it was just that students were much cheaper than the full-time staff and they worked harder. So they posted a vacancy and I applied and I instantly got offered a job on the spot. I don't know, maybe I had a reputation already. So this changed my life completely. Suddenly I had unlimited access to this mainframe because the staff, of course, could always access it and do whatever they wanted on it. And there was no more fighting for disk space, also no more fighting for terminals. there were always dedicated terminals for the staff. Plus, I had access to the source code of the operating system which was an enormously big deal because that was a very highly guarded secret. Plus, the only way you could access it was on a printout, and there was only one copy. Anyway. There were also, again, dozens of colleagues who showed me how all of that worked and who sort of helped stoke my enthusiasm and taught me more tricks and other interesting stuff. So now I had my dream job. I was programming all day with -- we had real customers, the other programmers who were using the mainframe. The operating systems group sort of supported those people. So my studies kind of stalled, and I almost dropped out of college, and I would not have graduated except for an enlightened manager at the mainframe management group, and one professor who hadn't given up on me. So they actually nudged me towards finishing some classes, and they probably pulled some strings. And eventually after seven years or so in there, I did graduate. Yay! So I immediately landed another dream job, and that was the kind of job that would not have been open without graduating, so the graduation was very useful. So I had never lost my interest in programming languages as something to study, and now I was joining a team that was building a new programming language -- not something you see every day, even today. I mean, yeah, there are people working on Rust, and obviously there are people working on Python. But even Rust started maybe 10 years ago. Who is working on designing a new programming language today? That's a pretty heady experience. So the designers of this language hoped that their language would take over the world and replace BASIC. So now it was the '80s and BASIC was the language of choice for a new generation of amateur programmers. They were coding on microcomputers like the Apple 2 and the Commodore 64, which to me personally was uninteresting because I had had this mainframe my whole life. But this was a cool project. And the team considered BASIC sort of a pest that the world should be rid of. And we were building a language named ABC, and ABC would stamp out BASIC. "Stamp out BASIC" was the team's motto. Now sadly, for a variety of reasons, the marketing, or maybe the timing sucked, And after four years, ABC was abandoned, not having had effectively more than a dozen users outside the team that made it. So since then, I've spent many hours trying to understand why ABC failed, even though its heart was so clearly in the right place. Well, apart from being somewhat overengineered, my best answer is that ABC died because there was no Internet in those days. This was still the mid '80s, and at least in Amsterdam, we did not have an Internet. And as a result, there could not be a healthy feedback loop between the makers of the language and its users. So ABC's design was all a one-way street. In fact, it was worse. When I joined the team in '82, the language design was complete. Four years later, the language design was identical to that original design. Four years of work on the language had not revealed a single flaw in the design. Or -- you can interpret that however you want. [laughter] Anyway, just half a decade later, I was picking through ABC's ashes looking for ideas for my own language. And I realized that that missing feedback loop was one of the things that was wrong with ABC, and I decided to improve on that. So my motto was going to be "Release early, release often," which I heard the sort of encouragement was by Democrats in Chicago, "Vote early, vote often." And in 1990, my institution in Amsterdam that wasn't so backward after all, had been the first Internet node, and we now had some Internet access and access to users, and there it was. It was possible to have a user community. So I'm looking back now 25 years later, and the Internet and the open source movement, also known as free software of course, those two things really changed everything. And of course something called Moore's Law which makes computers faster. So that whatever great idea you have today that you can't quite implement, you can implement next year. But these things together have entirely changed the interaction between the makers of computer software and its users. We sort of -- we can ask the users questions and we'll get answers. And the users can ask the language makers questions and submit patches and feature requests and all sorts of things. And it's my belief that these developments and how I managed to make good use of that have contributed more to the success of my programming language than my programming skills or experience, no matter how awesome those were, of course. Now, it also didn't hurt that I named the language Python. That was a bit of unwitting marketing genius on my part. I meant to just honor the irreverent comedic genius of Monty Python's Flying Circus. And back in 1990, I didn't think I had much to lose. I mean, we were naming components of the larger operating system we were building all the time, and we gave them all sorts of crazy names. TV shows were actually a popular option. But nowadays, I'm sure brand research firms would be happy to take a lot of your money to tell you what the associations are in the brains of the users when they hear a name like that. But I was just being flippant. So again, remember, this is -- I'm recycling material. I have promised the ambassador not to bore you with technical discussions on the merit of the different programming languages, and I will not bore you guys with that either because you already have made your choices. But I would like to say a few things about what programming languages mean to the people who use them: programmers. Us. Typically when you ask a programmer to explain to a layperson, "What is a programming language?", you get an answer like, "Oh, a programming language is just how you tell the computer what to do." And then they go on maybe to tell what computers can do. But if that was all, if a programming language was just a way to tell a computer what to do, why would programmers be so passionate about programming languages when you hear them talk amongst themselves? So in reality, programming languages are much more than just how you tell a computer what to do. They're how programmers express ideas and how they communicate those ideas. And the audience for those ideas is other programmers. We program for each other, not for the computer. And the reason for that is that the computer can take care of itself. If you designed a language with a completely stupid syntax -- and this is not something I was telling the ambassador at the time -- you can write a parser for a stupid syntax just fine and you can execute it just as efficiently. The computer really doesn't care about any of that. It's other programmers that you want to express your ideas to and be able to communicate, exchange ideas, feedback. So programmers are always working with other programmers, and poorly communicated ideas can cause very expensive flops. And I'm sure you've heard some of the stories about miscommunication due to programming bugs. In fact, I think that ideas expressed in a programming language also often actually reach the end user of the program, the people who will never read or even know about the program but they're nevertheless affected by those ideas embodied in those programs. That's why those ideas are so important. So think of the incredible success of companies like Google or Facebook or your next startup. At the core of these are ideas, ideas about what computers can do for people. And to be effective, an idea must be expressed as a computer program. You can't just sort of throw out an idea and the idea will take care of itself. That's not how it works. You have to have the computer program. Then that will take care of itself. And you have to use a programming language. And the language that's best to express an idea will give the team that uses that language a key advantage because it gives the team members, who are people, clarity about their idea or those ideas that they're exchanging. So, the ideas underlying Google or Facebook couldn't be more different. And in fact, the favorite programming languages at those companies sort of are at the opposite ends of the spectrum of programming language design. And that is my point about programming languages. So here's a true story. The first version of Google was written in Python. And the reason was that Python was the right language to express the original ideas that Larry Page and Sergey Brin had about how to index the web and organize search results. I think the sort of "all the information of the world" came a little later. But they could run these ideas on their computers, too. So anyway, in 1990, over 25 years ago, before Google and Facebook, I made my own programming language. I named it Python, duh. But what is the idea of Python? Why is Python so successful? Is it the indentation? [laughter] Is it the hash tables? How does Python distinguish itself from other programming languages, and why are you all staring at me like that? Well, I have a lot of answers to that, actually, and some of the answers are quite technical, and I do not want to talk about those in a keyword. Some of the reasons behind Python's success I'm sure were purely coincidental, like being at the right place and the right time. But I believe the most important idea is that Python is developed on the Internet entirely in the open by a community of volunteers, but not amateurs -- people who feel passion as well as ownership of their language. And that is also what a group of geeks in the basement of the science building around the mainframe computer was all about. So here's a surprise. Like any good inspirational speech, the point of this talk is really about happiness. So what do I have to say about happiness? I'm happiest when I feel that I'm part of this community. I'm lucky that I can feel it in my day job too where I'm a principal engineer at Dropbox. If I can't feel this community, I don't feel alive. And so I believe it's for other community members. And this feeling is contagious. And there are members of our community all over the world. And I don't actually have to tell you all this. The Python user community is formed of millions of people who consciously use Python, love using it. There are active member organizations -- or active members, actually, organizing Python conferences, the PyCons, in faraway places like Namibia, Iran, Iraq, even Ohio. [laughter] So, my favorite story: a year ago I spent 20 minutes on a videoconference call with a classroom full of faculty and staff at Babylon University in southern Iraq, and I was answering questions about Python. And thanks to the efforts of the audacious woman who organized this event in a war-ridden country, the students at Babylon University are now being taught introductory programming classes using Python. If it hadn't been for her -- [applause] -- they would be using Java. [laughter] So, honestly, I still tear up when I think about the power of that experience. And in my wildest dreams, I would never -- I had never expected I would touch lives so far away and so different from my own. So on that note, I'd like to leave you. A programming language created by a community fosters happiness in users around the world. And next year I may go to PyCon Cuba, and that will make me happy. Q & A time. [applause]
Info
Channel: PyCon 2016
Views: 134,323
Rating: undefined out of 5
Keywords:
Id: YgtL4S7Hrwo
Channel Id: undefined
Length: 42min 14sec (2534 seconds)
Published: Tue May 31 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.