Guido van Rossum, 9 March 2011

This text is my personal transcription of a talk that Guido gave in Atlanta before PyCon. I tried very hard to make it exact, but I’m sure elisions and inaccuracies crept in, as I was typing very fast for a very long time :)

What’s wrong with Perl?

This was a long time ago. Perl in 1988 had only one hundred-screen long manpage, and its design offended my sensibilities. In 1988 and 1989 I was working for the Amoeba distributed project in Amsterdam. We had clusters of 10 computers, and I had been collecting programming languages for the 6 years before that. Wrote a language, never released, known as “Python’s Predecessor”, which was called B, and is now known as ABC.

We were porting lots of application logic to Amoeba, and it was very complex to do. I realized that if we had a higher-level language than C, we could write things faster. In the end, Python may not have been used a lot in Amoeba, but the damage was done, and I had begun work on my own HLL.

I wrote a parser. I did a lot of work to get the parser to recognize indentation for grouping, because I thought that was very important at the time. This has helped and hindered things. Some people can’t get over it. Some people think it’s the best idea. It certainly made Python stand out, but if asked today, I tell people to use braces for grouping, because that’s what everyone is used to.

I had a lot of time and not much pressure, because my manager was out of the country a lot of the time, so I worked on Python a lot. I cut a lot of corners, though, and some of those decisions turned out to be right, and some of them have become major pain points with time. In any case, people working on the project started using it. After about a year, we decided to do a release.

What are some of the things people have done with Python that have surprised you?

One of the earliest things was that people not only picked up Python, but wanted to embed it in other languages. My model was either you have a compiler that generates machine code, or you have an interpreter that parses things in chunks and then you run it. What I had not expected was that people would take that whole interpreter, embed it in even larger applications, and feed it strings to be interpreted, and then used as code in that larger program.

If you’re familiar with Emacs, this is exactly what it does, and Emacs was not exactly new when I was working on Python, so I don’t know why I didn’t get this idea. Amoeba programs and Unix programs were very small, and you had RPCs and pipes, and you didn’t write large programs that did everything, and had an interpreter embedded into it.

And so people would come to me and say “we love python and we want to embed it into our app” and they wouldn’t tell me what they wanted; it was either irrelevant or secret. But eventually they said “turn it into a library”. At first I didn’t even understand what they meant. We got over that.

But the problem was that I had never even thought of that, but internally, everything had very short, convenient names in C, and I had accidentally created huge numbers of naming conflicts with third party libraries or applications. Dynamic linking was added forcefully in the mid-nineties, and it was very painful. We had to rename every function that was part of the runtime so that it’s linker-visible name started with “py_” and that was the result of me completely not having anticipated this embedding.

At this point there are more unanticipated uses of Python than things I thought people would do with it, so that’s very satisfying.

What’s your favorite way to do web stuff

I don’t have a favorite. I think all web stuff sucks in one way or another. I work on app engine, so I’m, ironically, working on the back end of letting other people write web apps.

I used to say that every time I wrote a web app, I used a different framework. These days I mostly use Django, but I’m not really satisfied with it either. I’m more familiar with it, but not enough to tell other people about it.

I’ve used app engine’s as well, and I’m not very excited about it either. The developments I’ve seen in the web world for developing apps don’t really strike me as interesting. It’s still way too much work. Two years ago I tried creating a whole new language for that, and I couldn’t do it.

What’s your coming to Google story?

I knew a lot of people there. the funny thing is I moved to the Bay area in 2003, from northern Virginia. I came there because someone I respected asked me to move and work for him. All the wheels were in motion for me to move, and suddenly I got an email from a google recruiter, asking if I would come and have an interview.

I was far enough into this other process that I said, I’m sorry, if you’d called 2 months earlier, I would, but I feel honor bound to take this other job. 2 1/2 years later, the startup failed, and I knew 4 or 5 people who as soon as I asked how I might get into Google, fell over each other entering me into [the Google HR system].

What languages would you like to see gain popularity or fade into oblivion?

I’ll skip the second part. Enough languages face into oblivion without my help or commentary.

What would I like to see gain popularity? Probably something that hadn’t happened yet. There is a kind of renaissance going on. There’s probably going to be a not-quite OO, not-quite functional language that’s going to come along and solve some hard problems.

What about Go?

I don’t think i’ve written any yet. I’ve walked through parts of the tutorial and the docs, and I think there are definitely plenty of interesting things there. there are also plenty of things that look — well, maybe misguided. Go is really — designed to be the ideal programming language for one person. I’m not sure if it has broad enough appeal and solves a large enough range of problems, or can be extended to solve a wide enough range of problems to really fly.

There’s probably a lot of similarity between Go now and Java when it was first created; interesting ideas but lots of ideas missing. It has taken Java a long time to fill in things like generics, and it’s completely hit-and-miss on whether Go will get a large enough userbase to go anywhere. I’m doubtful on whether it will replace C++ even within Google, though that is the goal.

I’m sure once it’s in app engine, I’m sure I’ll be playing with it more. Maybe I’ll even like it.

BASIC is gone now. Have you thought about the problem of languages for young people (because a lot of us grew up on BASIC)?

It’s true that almost everyone in middle-class america has more than 1 computer in their house, but pretty much none of them are doing anything with programming. They’re not even doing HTML anymore.

I don’t see a lot of people doing that, and then moving on into Javascript.

OTOH, there was a viewing 2 days ago of a documentary about Infocom games in MTV. I played them even though I didn’t have access to microcomputers — my first was access to a mainframe. I lost my train of thought.

In the end, I don’t think it’s such a big loss because most people didn’t have computers at all in those days. It was a very very small part of a particularly nerdy part of the population that 20 or 30 years ago had access to any computer at home.

There are other geeky hobbies, and there were other geeky hobbies, and I think other stuff will happen. I think there are some geeky kids who are the same sort of geeky kids that we were doing, some of those will become great programmers. I think there is still enough of a feeder population. I’m not worried about there not being any CS graduates anymore, even though people in academia complain about it.

What’s a hard problem that felt really good to crack?

I’m going to punt and give a nontraditional answer here, and say that the appearance of a Python community was something that.. it happened all by itself, and it felt really good that it happened.

I’d been sharing my software with people for 2 or 3 years, and I’d never been very successful at that. I think before python the last thing I tried was a platform independent app for designing GUI applications, and I went for a lowest-common denominator approach, and it was a total dud.

I actually used Python to try to support it to start with, and the only nice thing was that it ran as fast on a Mac as it did on Unix, but it was a nightmare. It was hard to program for, mouse buttons didn’t work. These days every successful GUI library is a sprawling, all-encompassing thing.

So I’d been trying to create software that people would use, and it just didn’t happen, but it happened with Python.

What made that happen? Who knows. I can only say that I had tried a lot of things and it just didn’t happen. But in the summer of 1994, people on the mailing list people started complaining that the python ML needed to become a newsgroup, and I said “fine, make it happen”, and they did. Then people started complaining that there was only one Guido, and the community solved it by self-organizing. And that was my eureka moment instead of any programming problem.

How much control do you retain over the language/community?

Every now and then someone shows up and says “Guido is the dictator, and must be overthrown”

I’ve never had that power. All I’ve ever had is the ability to convince people through words. And that’s still all I have.

Last weekend, the Python repo converted from SVN to Hg. It took two years to do, and all I ever did was say “Ok, do that.” I don’t have commit privileges in the new repo, and I doubt I’ll miss them. I haven’t committed anything in months.

People still listen to me and respect my opinion on things, but I also tell people to think for themselves, and I think that’s been successful. IF I got locked in the datacenter for a few years, Python would go on. I like that I’m not a single point of failure anymore.

What do you think of PyPy?

I love it, but it’s so much more than getting Python self-hosted. It’s so much more than that, and that part is almost irrelevant these days. REally what PyPy is these days is a toolkit for building JITs. They can build a JIT compiler for many different languages. They’ve only tried a few, and they’re not particularly proud of the ones they’ve tried. They tried Prolog, but I don’t think that’s particularly viable. But they have this tool and core for JITs. And on top of that they have a new implementation of Python, which is probably more compatible with the original C python than either Jython or IronPython. And, it’s faster than C Python, which neither of the other ever really will be.

They’ve done an amazing job of compatibility at both the language and library level, but it’s still not there. It’s still a crapshoot on whether all extensions and third-party libs will work. And for large applications, logic doesn’t benefit a lot from JITting. It won’t be any slower than C Python, but it won’t ever be faster. I love that they’re working at it.

There will be several talks about it at PyCon. They get closer and faster and more compatible every year. Maybe this year is the breakthrough year.

Still a Monty Python fan?

Yes, I am. I was a nuisance to my family because several weeks ago I started watching the earliest series on youtube.  They don’t understand the humor.  HAving grown up with Monty Python, I am so desensitized to so many movies that take themselves seriously.

Do you envision programs like App Inventor making programming literacy more common, or do you think they’ll just make it easier for people who already want to write programs?

In the middle. I’ve played with it a little, but I found it frustrating because I can already program.

OTOH, I’ve seen what educators have done with it, and there’s definitely something there. There are definitely people who would never get into programming at all who have some experience with creating a program and debugging it, which is the interesting part. Figuring out where to put the semicolons and braces is no fun at all, and App Inventor takes that away.

But creating a program in little steps, and watching it run away terribly, or crash in a microsecond, and then figure out what you did wrong, that’s the fun part. And App Inventor gives you that, adn lets you see if you’re any good at it, and if you can use that somewhere else in your life.

I think there’s something there. I think there’s some class of people who think they can use AI to write an app and put it in an app store and make piles of money, and that’s not how it’s going to work.  But getting something to work is a thrill, and after that maybe you can do it using text, which is the highest-bandwidth method of communication from your brain to the computer.

[Question redacted due to NDA]

[Answer as well]

What would you like to see improved about working at Google?

You know, personally, I’m pretty happy here. I don’t have a lot of wishes, but I also realize that being sort of famous and all that, I’m in a pretty lucky situation.

I dunno, I like to think that it’s still a pretty good place to work for. There’s a lot of exciting stuff going on. We have a number of areas where we’ve been outrageously successful, and a number of areas where we have a really good chance to, and it’s good to be on the inside of that.

What advice would you give to us mere mortals? Where does your drive and inspiration come from?

I dunno. On the one hand, I’ve always felt that I was much, much geekier than almost anyone around me, and I’ve mostly just tried to be at peace with that, and not worry about it. I wasn’t a big social hit in high school. Or in college, for that matter. But I enjoyed what I was good at.

My college career was very weird. I went to study math, thinking I was really good at it. It turned out that I wasn’t, I was only really good with the math in high school. Fortunately I found something else that I enjoyed, and was very good at, and that was programming. I just followed by heart there. I decided not to be too hung up about actually graduating in mathematics, but just have fun doing programming.

Eventually I did get a degree, but that’s.. there was a time when I wasn’t so sure that I would get there. So, follow what you love. And then be patient, and it will be alright :)

How did very early Python differ from today’s?

There were no classes. That’s the single biggest change ever made.

It was not an OO language. It was an object *based* language. There were objects, but no way to create new objects classes, except by writing a C extension.

The first implementation of classes had a broken way of declaring inheritance, which I think was

  Class = Baseclass

and after 2 years, we fixed that.

Emacs or vi?


Javascript: Consoles and First-class Functions

I’ve been writing a lot of Javascript lately. It’s a lot more fun when you treat it as a real programming language (which it is) and not that horrible thing that’s shoved inside all the browsers. It’s also a lot more fun when you decide that nothing but the most recent versions of Firefox and Chrome exist, which leads me to my first topic.

Javascript Shells

Both the Mozilla and Chrome projects make their Javascript engines available as standalone libraries, which can be embedded in other programs. They also both provide command-line shells which behave just like the Python/Ruby REPL.

Not only is this just plain nicer than using the browser devtools, but the shells add new functions to the language that make it better suited to the console world, like ‘print()’ and ‘load()’, which finally makes it possible to include Javascript from other Javascript files (under the shell). There’s also a good amount of deeper stuff which would be handy for serious debugging, like the ability to lock objects, absolutely preventing any modification until unlocked. Best of all, everything I’ve tried in one has worked in the other, though I admit that I haven’t even tried to try everything — I’ve just been working on what interests me.

One thing you don’t get with the shells is the browser environment. So no ‘window’ object, no ‘document’ object, and none of the methods attached to them, which means no DOM manipulation. This will come up again in about 4 paragraphs.

Mozilla’s Spidermonkey shell is ‘js’, and Chrome’s V8 is (unpredictably, and at odds with at least one doc I found on the web) ‘d8’. Both are available as packages under Arch Linux (and everything else, I’m sure). If you do anything with the web, even for fun, your toolbox will be greatly enhanced by adding them to it. Here’s a link to the Mozilla docs (I haven’t found the Google ones yet).

The second thing I want to talk about is a little bit of fun that I painlessly prototyped using the Javascript shell.

First-class Functions

Javascript has them. All it means is that functions aren’t special in any way; they’re treated just like all other data in the language. This is an incredibly powerful concept, which you can use to do incredibly powerful things. Or just to solve an interesting little problem.

Having written a tiny Javascript test library yesterday, I immediately found myself wanting to use it to test things other than the tiny parser I’d written the day before that. The problem was twofold:

  1. My test library replied on the print() function of the js/d8 shells to report its findings to the world, and this, of course, does not exist in a browser.
  2. The other things I wanted to test do live in a browser, and do tons of DOM manipulation, which doesn’t exist in the shells.

The solution came from remembering that functions are first-class in Javascript. But before I could get around to that, I needed to know how to test for defined-ness in Javascript without generating warnings or errors. Well, I could use the shell to fiddle with that, too.

d8> if (document) { print('doc') }
(d8):1: ReferenceError: document is not defined
if (document) { print('doc') }

Nope. Not like that.

d8> try { document } catch(err) { print('no doc') }
no doc

Ah. try/catch block. Okay, now I know how to see if I’m inside a browser or not, because that’s the only place that the document object exists. So now I can get around to solving my original problem with, effectively, a one-liner. Before changing my test lib code, I decided to use the shell again to make sure my idea really worked.

1  d8> print2 = print;  
2  function print() { [native code] }
3  d8> print = function(msg) { print2("foo" + msg + "bar") }
4  function (msg) { print2("foo" + msg + "bar") }
5  d8> print("hello, world");
6  foohello, worldbar
7  d8>

I’ve numbered the lines this time for easy reference. On line 1, I assign print to print2. Since functions are first-class, ‘print’ isn’t magical in any way, but is just a label, which points to a piece of data. In this case, the data being pointed to is a compiled function, which does the actual printing. So now ‘print’ and ‘print2’ point to the same function and will (natch) behave identically. Line 2 shows the evaluation of the assignment.

In line 3, I reassign ‘print’ to an inlined anonymous function which takes one argument and calls ‘print2’ (AKA the original, stock printing function), passing it the concatenation of “foo”, the argument to ‘print’, and “bar”. Line 4 is equivalent to line 2.

On line 5 I call ‘print’, which now points not to the original stock print function, but to my anonymous function. Line 6 shows “hello, world” stuck between “foo” and “bar”, exactly as it should be.

Now for the real thing:

try {
    if (document) {
        print = function(msg) { document.write("<div>" + msg + "</div>") }
} catch(err) {

Couldn’t be easier. If my test library is inside a HTML document, ‘print’ will be pointed at an anonymous function which wraps the argument inside a pair of ‘div’s and calls ‘document.write’, plopping it into the document where ever the calling <script> tag is located. One library; one try/catch block; works in a webpage or at the console.

Tomato Caviar What?

I can’t even begin to make sense of this one. Worst thing in a while to come out of the Food Terrordome that is my cookbook collection.

This exemplifies the 1950s recipe. It’s a “salad” where the vegetables are only there to give structural support to the creams and dairy products. It’s overwrought. It’s a bizarre hodge-podge of ingredients, half of which are in quantities so small you’d never be able to taste them. The mise en place would be a nightmare. Construction is baroque. It just sounds bad.

From “Salads and Salad Dressings”, Culinary Arts Institute (who I thought knew what decent food was like), 1957.

Tomato Caviar Temptation

Rinse, peel, and chill 4 large tomatoes.

Stuffed Eggs

Hard-cook and chill 4 eggs. Set out 12 rolled anchovy fillets.

Reserve one egg for Cheese Spread. Cut the remaining eggs into halves lengthwise. Remove egg yolks to a bowl and mash with a fork or force through ricer or sieve into the bowl. Mix in until thoroughly blended

  • 2T thick sour cream
  • 1T salad dressing
  • 1/4t grated onion
  • 1 or 2 drops tabasco sauce

and a mixture of

  • 1/8t celery salt
  • 1/8t garlic salt
  • Few grains white pepper

Lightly fill the egg whites with the egg-yolk mixture. Poke two of the anchovy fillets into each stuffed egg. Chill in refrigerator.

Cheese Spread

Shred and set aside 4oz. sharp cheddar cheese (about 1 cup, shredded). Finely chop or sieve the reserved egg into a bowl. Add and mix in the cheese and

  • 1/2t prepared horseradish
  • 1/2t Worcestershire sauce
  • 1 or 2 drops tabasco sauce

and a mixture of

  • 1/4t salt
  • 1/8t dry mustard
  • 1/8t pepper
  • 1/8t monosodium glutamate

Blend in

  • 1/4C thick sour cream
  • 3T salad dressing

Set in refrigerator to chill thoroughly.

Cottage Cheese Filling

Lightly mix

  • 1 1/2C cream-style cottage cheese
  • 1/3C finely-chopped sweet pickles
  • 1T salad dressing

and a mixture of

  • 1/4t monosodium glutamate
  • 1/8t salt
  • 1/8t onion salt
  • Few grains pepper

Set in refrigerator to chill thoroughly.

Dice and panbroil until very crisp 8 slices bacon. Drain on absorbent paper.

Just before serving salad, lightly mix bacon pieces into the cottage cheese mixture.

To Complete Salad

Rinse, drain, pat dry and chill salad greens (such as lettuce or curly endive). Arrange on 6 chilled individual salad plates.

Cut the chilled tomatoes into 12 slices about 1/2in. thick. Place one slice on each salad plate. Spoon Cottage Cheese Filling over slices, allowing about 1/4C for each. Top with remaining tomato slices. Spread tomato slices with the Cheese Spread, and place Stuffed Eggs, filling side down, on top.

Spoon over eggs a mixture of

  • Thick sour cream
  • Caviar

If desired, top salad with more caviar.

Sprinkle French dressing over lettuce leaves around the salad.

Serve with Melba toast or crusty hard rolls.

6 servings.

Dear Lazyweb: Where was this picture taken?

Dear Lazyweb: Where was this picture taken?

Invitation to the commissioning of USS Anteitam. Found taped to the back of the photo whose inscription was transcribed in the previous entry.
I note that &#8220;Dolly&#8221; is written here, and a Dolly was mentioned in the inscription. I can&#8217;t decide if that makes the whole thing more or less puzzling.

Invitation to the commissioning of USS Anteitam. Found taped to the back of the photo whose inscription was transcribed in the previous entry.

I note that “Dolly” is written here, and a Dolly was mentioned in the inscription. I can’t decide if that makes the whole thing more or less puzzling.

Inscription on back of photograph of USS Goldsborough (DDG-20)

Saturday Oct 27th 1984 We left Hawaii at 10:00 P.M. {???}

Friday Oct 26th We all met at The Pearl Harbor {Officers Club} {???} went To The US [sic] Goldsborough for a {gourmet dinner} guests of Captain Fitz & his Wife — Then were given tour of The ship by Capt. Fitz, Took Polaroid Pictures of every {partner} at The Dinner Table —

Thurs Oct 25th We all were guests of Admiral & Mrs. C[onrad]. J. Rorie {aboard} “The Admiral’s Barge” for Cocktails & Dinner {just before} Sunset as it cruised around The Harbor and to The “Arizona”, sunk at “Pearl Harbor” with 11,00[sic] (Dec 7 1941 By The Japanese) men & Officers aboard. Their Bodies are enshrined There with a Beautiful Memorial {around it}. As C.J.’s Barge motored By, Each Ship Anchored at Pearl Harbor gave Salutes with The Ships Horns Blasting Out A Fond Farewell To C.J. who was Retiring as The Cmdr. of The Naval Base “Pearl Harbor” also the Cmdr of The Naval Surfice[sic] Group Mid Pacific after 30 yrs of Service in The US Navy — Dolly Bellizio, Robt. {George} & Doris George were guests of C.J. & Pat Rorie at the V.I.P Guests Quarters at Barbers Point Hawaii on the Ocean Front. Then after four days we moved to Waikiki and Stayed at The Halikailinie [Hali Kalani?] Hotel on The Beach

This took 45 minutes to transcribe. It is written in badly-faded blue ink on a sheet of stamped foil (wrapping paper?) which is taped to the back of the frame of the photo of the Goldsborough. It was completely illegible in places (marked by [???] and nearly so in others (the words {in braces}).

I’m a total sucker for ephemera like this. There’s always something neat to find out. For instance, in checking that I was reading “C.J. Rorie” correctly, I found this article about the troubles the National Park Service had in convincing the Navy to let them examine the Arizona so it could be properly cared for and interpreted for visitors.

Vintage Bacon Overkill

Both from The Favorite Recipes of Home Economics Teachers Cookbook, 1970.

Bacon-Macaroni Casserole

  • 2C elbow macaroni
  • 1# bacon
  • 1/2C chopped onion
  • 3/4C grated sharp cheese
  • 1 can tomato soup
  • 1C milk

Cook macaroni; drain. Reserve 4 slices bacon; cut remainder into 1/2” strips. Brown cut bacon in skillet; push to one side. Cook onion in bacon drippings until soft. Mix crisp bacon, macaroni, onion, cheese, soup, and milk; pour into greased casserole. Place reserved bacon on top. Bake at 375 for 25-30 minutes.

Lorene L. Arent, Wausa Pub. School, Wausa, Nebraska

Hunter’s Dinner

  • 1 4oz. package spaghetti
  • 2C canned or frozen whole-kernel corn, drained
  • 1 12oz. pkg frozen lima beans, thawed
  • 1/2C chili sauce
  • 1# bacon
  • 1# cooked ham

Cook spaghetti in salted water; drain. Mix spaghetti, corn, limas, and chili sauce. Dice bacon and ham; brown slowly in skillet. Drain off fat. Add meat to vegetable mixture; pour into greased casserole. Bake at 350 for 30 minutes or until sauce is thick.

Sister M. Tabitha Kaup, O.S.F., Archbishop Ryan Mem. H.S., Omaha, Nebraska

Tiny Music Reviews 1

A couple weeks ago I ended up ransacking the $1 bin at Criminal Records, picking up everything that looked like a sampler or had really good graphic design on the jacket. This was brought on by discovering that a sampler I picked up over a year ago (and forgot about) was constructed from purest awesomtanium.

In case you’d like a copy of that one yourself, it was Parasol Records’s Sweet Sixteen Volume 6.

I didn’t find anything that good, but I did find some interesting stuff. And some not-so-good stuff. First up, the winners, in no particular order.

Clarence Fountain, Sam Butler, and the Boys: Stepping Up & Stepping Out

Black people can do a lot of things well that white people can’t. Dance. Wear purple. Be funky. Sing about Jesus without whining and wishing to be dead. This album is a really good example of that last one, from two of the men who were part of the Blind Boys of Alabama. 

Chain and the Gang: Down with Liberty…Up with Chains!

I only bought this one because it was put out by “Secretly Canadian Distribution”, and because the CD itself says “A Rock and Roll Comintern Production”. The music turned out to be on the weird-artsy side and uneven, but interesting and not bad. Gooder when it rocked more.

The Joneses: Criminals/Tits and Champagne

This is 2 EPs on one CD. From the names (band and albums) I was expecting something laughably pretentious and horrible and emo. From the pics of the band on the back, I was expecting something douchey. What I got was some pretty good punk/psychobilly. Interestingly, the three covers (Crocodile Rock, Your Cheatin’ Heart, and Route 66) are the weakest tracks on the disc. Oh, and it turns out the EPs were recorded in 1983 and 1987.

Baby Shakes

This is another one that made it because of the screening on the CD itself. “STEREO: PLAY LOUD” says one side. The catalog number is given as DMR025, for “Douchemaster” records. It turned out to be an all-girl punk/rockabilly group, laying down some pretty decent tracks. Very Shonen Knife, only without singing about sumo wrestling and reading books and god knows what. Oh, and it turns out they really are on Douchemaster Records.

More later.

This is real. There was a list of corporate sponsors on the back and everything. And I&#8217;m a horrible person for laughing at this, but the shirt itself is hilarious.
Could they have picked a less appropriate font?

This is real. There was a list of corporate sponsors on the back and everything. And I’m a horrible person for laughing at this, but the shirt itself is hilarious.

Could they have picked a less appropriate font?