Files
hpr-knowledge-base/hpr_transcripts/hpr0577.txt
Lee Hanken 7c8efd2228 Initial commit: HPR Knowledge Base MCP Server
- MCP server with stdio transport for local use
- Search episodes, transcripts, hosts, and series
- 4,511 episodes with metadata and transcripts
- Data loader with in-memory JSON storage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 10:54:13 +00:00

121 lines
10 KiB
Plaintext

Episode: 577
Title: HPR0577: Episode 11.Bit-of-Python-2010-04-07
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0577/hpr0577.mp3
Transcribed: 2025-10-07 23:25:38
---
You're listening to episode 11 of a little bit of Python. This is a special episode
recorded at PyCon at Lanter 2010 with Antoine Petru, a core CPython developer.
If you have any comments, feedback or suggestions, you can email us at all at bitofpython.com.
Hello, you're listening to a little bit of Python. This is Michael Ford. I'm sitting here in PyCon 2010 and at Lanter.
Pretty much in the aftermath of the conference, the final talks and the final lightning talks
have recently finished and I'm sat downstairs in a virtually empty hallway with Antoine Petru.
Now Antoine is one of the core CPython developers but he's a name that my guess is that
not a huge number of you will have heard of. One of the interesting things about this
conversation is you get to see certainly for the Python world all these famous people you get to
sort of see Guido and chat to Guido. There's Alex Martelli wandering around, Raymond Hattinger,
Brett Cannon, all of these focus are pretty well known in the Python world but as is often the case,
a lot of the work behind the scenes with developing Python is done by people who maybe don't
sort of make themselves known quite so much and Antoine is one of these guys. He's in the last
year in one of the top three committers to core CPython so it'll be interesting to hear from him.
Hello Antoine. Hello Michael. So how did you first get into programming, first programming with Python
and then actually working on Python? Okay well I started programming with Python at the end of 2004
when I had a customer who wanted to hire me on a contract and he wanted the project to be
the software to be written in Python because it was a research project and researcher which had
who had launched the project like Python basically. So I had to learn Python for a couple of weeks
before starting that project and I quickly fell in love with a language because it's quite an
elegant language, quite simple syntactically and very well well designed and well conceptualized
syntactically. So this project was a project was how to say a peer-to-peer virtual world project
that is a virtual world system where there is no centralized storage data. Each node in this
peer-to-peer world has a knowledge of its neighbors and so the consistency of the world doesn't
exist as a whole in centralized places just built incrementally and so this project was
written in Python of twisted and W is widgets and yes this is how I started programming in Python.
Since I had fallen in love with a language I decided that not only my following projects should
be done in Python but that one day I would start contributing, we would try to contribute to a
language. So I started picking up some bugs on the tracker and proposing patches and so on.
So did you find it easy to get involved with actually developing Python?
Yes and no. Contributing patches is easy. Getting to getting in the communities is not so easy when
you are not affluent in this speaker. There is quite a culture of restraint and politeness which
is not easy to get when you don't have a necessary vocabulary. So you think Python program is a
restrained and polite. I'm not sure if individually restrained and polite but there is an atmosphere in
the community which fosters this kind of attitude. So that kind of made you feel like it was a bit
hard to get in because you didn't want to go against the sort of community norms as it were?
Yes. That's interesting to hear. So when did you actually get the commit rights to Python?
I got the commit rights nearly two years ago. I think it was almost the beginning of summer,
2008. That was, I'd say roughly six months after I started a really contributing.
Wow. What sort of things have you worked on?
I've worked on a range of things. I've worked quite a bit on Python-free, more than
two.experts. I've worked on, together with another French guy called Amory Forsradark.
We wrote the I-O library of Python-free.0 which was written in pure Python. We wrote it in C.
So the big move from 3.0 to 3.1. A big part of that was about having the faster I-O layer in C.
Yeah. You did a good chunk of that, did you?
Yes. I did a good chunk of that, yes.
Wow.
Yes. I also worked on a new implementation of a global interpreter lock, which I didn't
remove unless most people would have hoped, but the goal was to fix some glaring inefficiencies
in the implementation of this gear. That was what came out of David Beasley did a talk on
the global interpreter lock when he shows what happens when you have CPU band threads competing for
the gear on a multi-core processor.
Yes. It was his talk which triggered me to get into his problem. At first I had a mixed feeling
about his talk because it looked like some numbers looked really outrageous and when you tried to
run them on the Linux it was not so bad, but it was particularly a problem for MacOS, which is
what David is. Yes. Yes. The benchmark he chose was clearly a worst-case benchmark for 2.x.
Right. It was a very pathological case and it wasn't a realistic world case because it was just a
spinning loop. Right. But on the other hand, it helped uncover a real problem really.
I then wrote a custom benchmark called CCBench, which is a concoursey benchmark, which
helped me really assess the effects of the gear on two different kinds of metrics, which are
threads which in latency when you have an IO thread which is running and which is waiting for
packets. How long does it take when a packet arrives for the IO thread to wake up and get to process
it? Another metric which is throughput, that is when you run several CPU band threads, how much
throughput do you get compared to one single thread? So my goal was to improve those two metrics.
Right. Right. And that code has gone into what will become Python 3.2? Yes. It has been
committed now. And that was the first time that the global interpreter lock code has been touched
in many years apparently? Yeah, apparently. I hadn't looked at the logs to know exactly one
and it hadn't been touched for the last time. It's true that the thread and primitives inside
the interpreter, which basically abstract very different thread and libraries are very old and
rusty and archaic. So do you think there's more work that could be gone into to working on those?
Yes, definitely. And we have started deprecating some very very old platforms like SGI, IRIX,
this kind of thing, which will help us build some new primitives, some more sophisticated primitives.
Using using constructs supported by more modern operating systems? Yes, basically we will support
only projects and windows. And perhaps always to if the maintainer, Andrew McIntyre, I think,
gets to do a support. Cool. Wow. What about porting the new gear back to Python 2? That sounds like
that hasn't been done. Why hasn't that been done? Well, I wasn't interested in doing it in
3.x. First, because we had to duplicate the thread in APIs and declare that various platforms are
not supported anymore because I couldn't use just the primitives that we have in this thread in
abstraction because we are too crude to do something efficient. So support in the old platforms
was actively preventing you solving the problem? Yes, yes. And besides, I wanted it to be a 3.2
feature because I think it's nice that 3.x has things that do that hasn't. Right. Getting the
community wider community of Python, including the library authors and application authors and
giving them good reasons to see that Python 3 has a lot to offer. So it's like a good thing.
Yes. So what else is coming up in Python 3.2 that we should be interested in?
Oh, it's a good question. I don't have a list on the market, so I can tell you.
So now we don't have a lot of features. It's still a while away. At the time we're recording this,
who knows when people will actually be listening to it, but yes. Python 2.7 comes first and then later
in 2010, there is the 3.2. We have a moratorium too, there's obviously less core
language changes. So more under the cover changes? Yes. A lot of polishing, I think,
probably polishing the standard library because we are still a bit some issues with things like
Unicode by separation in some modules which have been a bit overlooked. Right. The move to an
all-unicode has a lot of API implications, which really needs to be worked through the standard
library. For example, the email module is said to be a big broken in Python 3.x. Which
module? The email module. So how have you found Python 2010? Is this your first? Yes, it's my first
Python. Have you enjoyed it? Yes, it's quite pleasant to meet all these people which I had never
met before for most of them. Yeah, it's quite enjoyable. Which talks have you been to?
What sort of face have you particularly? Well, I've been to Gerl talk, obviously. I had to see
what he had to say about it and how exactly he was talking about it. What I have seen? I have
discovered a pioneer, which is the Python implementation of a parrot, which is directly target
in Python 3, which is a good thing. I think that's the two most interesting talks. Well, the two talks
which interested me a bit. What about Leiden Swallow? What are your thoughts about that? And
bringing C++ into the language? Oh, well, I'm not opposed to C++. It's not the most
of the language and it's obvious that like many people, I would like
pipators exceed and perhaps one day become the reference implementation, but it seems to be
quite far from now. It was really interesting to see because pipa has been around for many years.
When it first came out and the first talked about bringing it into Python, there's a lot of
excitement in the community and then seemingly nothing happened for several years, but this year
they've presented and they've actually shown real world benchmarks, not just sort of true real
numeric benchmarks, running chunks of applications and whether actually starting to share a
speed improvement. So I think this year, again, the Python community is starting to get excited
again about pipa. Yeah, there's a problem. We've projects that get very related,
if there are some psychological barriers because people are a bit bored.
Okay, it's been great to talk to you everyone. Thank you very much.