Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Guido van Rossum

๐Ÿ‘ค Speaker
See mentions of this person in podcasts
1189 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

We're on a team of a whole bunch of people with maybe a little mind and we can only manage one web connection at a time.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

So I'm just sitting looking at this web connection and I'm just blocked until something comes in and then I'm already waiting for it.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

I get the data, I process the data, and then I go back to the top and say, no, sort of, I'm waiting for the next packet.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Those are about the two paradigms.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

One is a paradigm where there is sort of notionally a thread of control, whether it's an actual operating system thread or more an abstraction.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

In asyncio, we call them tasks.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But a task in asyncio or a thread in other contexts is devoted to one thing, and it has logic for all the stages.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Like when it's a web request, wait for the first line of the web request, parse it, because then you know if it's a get or a post or a put or whatever, or an error.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

then wait until you have a bunch of lines until there's a blank line, then parse that as headers, and then interpret that, and then wait for the rest of the data to come in if there is any more that you expect, that sort of standard web stuff.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And the other thing is, and there's always endless debate about which approach is more efficient and which approach is more error-prone,

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Where I just have a whole bunch of stacks in front of me, and whenever a packet comes in, I sort of look at the number of the packet, that there's some number on the packet, and I say, oh, that packet goes on this pile, and then I can do a little bit, and then sort of that pile provides my context.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And as soon as I'm done with the processing, I sort of... I can forget everything about what's going on because the next packet will come in from some random other client and it's that pile or it's this pile.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And every time a pile is maybe empty or full or whatever the criteria is, I can toss it away or use it for a new space.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

But...

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

Several traditional third-party libraries for asynchronous IO processing in Python chose the model of a callback.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And that's the idea where you have a bunch of different stacks of paper in front of you.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And every time someone gives you a piece, gives you a new sheet, you decide which stack it belongs to.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And that leads to a certain style of spaghetti code that I find sort of aesthetically not pleasing.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And I was sort of never very successful.

Lex Fridman Podcast
#341 โ€“ Guido van Rossum: Python and the Future of Programming

And I had heard many stories about people who were also sort of complaining about that style of coding.