Transcript #256: And the best open source project prize goes to ...
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:04 This is episode 256, or as Anthony Shaw likes to put it, 2 to the 8th, recorded October 27th, 2021.
00:12 Again, unless you're Anthony, which is probably like a totally different day in the future because he's in Australia.
00:16 I'm Michael Kennedy.
00:17 And I'm Brian Okken.
00:18 And I'm Anthony Shaw.
00:19 Hello.
00:20 Hey, Anthony.
00:21 How is the 28th?
00:23 Is the next day going to be good or things are okay?
00:26 Yeah, it's pretty sunny today.
00:27 It's nice.
00:28 Yeah, right on.
00:29 Okay, so the world hangs together for one more day.
00:32 Fantastic.
00:32 You've been here before.
00:34 You've been on Talk Python a bunch of times.
00:36 It's a friend of the show, all sorts of stuff.
00:37 So I'm sure many people know you, but, you know, just tell people a bit about yourself.
00:41 You're doing more techie things these days.
00:44 You're a little closer to the code, maybe.
00:46 Yeah, so earlier this year, I started working at Microsoft and work with Nina Zakarenko on Python inside Microsoft.
00:55 And, yeah, a lot of what I'm doing at the moment is just running around, breaking things, sometimes on purpose.
01:03 Yeah, just seeing how we can improve our experience and working with VS Code and Azure and a whole bunch of other stuff.
01:08 So, yeah.
01:09 Yeah, it's been a while since the last episode was episode 100, I think.
01:13 Wow.
01:13 You're hitting the big numbers.
01:14 So, yeah.
01:15 This two to the eighth is a significant milestone, I think.
01:20 It is.
01:20 It's pretty cool.
01:21 Yeah, awesome.
01:22 Well, we're happy to have you here.
01:23 Thanks for being here.
01:23 Also, something to do with a puppy I've seen on Twitter.
01:26 Oh, yeah, I got a puppy as well.
01:28 Oh, how cute.
01:29 I like to go to Golden something.
01:30 He's a Border Collie, but he's kind of golden colored.
01:36 And he's not in the room at the moment.
01:38 He's not allowed in here while I'm recording.
01:40 I thought it would be a bit chaotic.
01:43 Yeah, my puppy sometimes is here, but it's very bizarre the way that puppies socialize around COVID.
01:50 Instead of us being gone and then we come home, she now knows and understands the expressions I make to end a Zoom call.
01:56 So, she'll sit quietly for an hour.
01:58 And as soon as I say goodbye in Zoom, she's like, we're ready to go.
02:00 Let's go.
02:00 It's super bizarre.
02:02 But, yeah, that's the world we live in.
02:03 So, enjoy the new puppy.
02:04 Brian, you want to kick us off with our first topic here?
02:09 Lucas Lenga, he's, what is he again?
02:11 The developer in residence?
02:12 Yes.
02:13 For Python?
02:13 Anyway, he wrote an article called, Where Does All the Effort Go?
02:17 Looking at Python Core Developer Activity.
02:20 And I kind of really like this article.
02:23 He not only talks about really what's going on with developers and who's doing what.
02:29 To start off with, he talked about how he got this data.
02:34 So, this is also sort of a data processing sort of information scraping sort of article.
02:42 He's looking at the GitHub repository data for CPython, of course.
02:48 And specifically, he's going to be able to do that.
02:56 We've covered that on the show.
02:58 And even lists the SQL queries that he's got.
03:05 Oh, also, since the data is from the time when CPython moved to GitHub.
03:11 So, that's February 10, 2017.
03:14 And he mentions that it's up through October 9th is when he pulled the data.
03:20 So, but all the information is there.
03:23 So, you could grab it yourself if you want.
03:24 Even the little scripts he's got for modifying some of the data.
03:29 So, some of the interesting things.
03:31 The top parts of CPython that are modified.
03:36 It's probably not that surprising that coval.c is involved in 259 merge requests.
03:42 It's the top merged file.
03:45 Coval.c.
03:47 Yeah, that's where the bytecode processor is.
03:50 So, yeah, that's where all, that's the center point or the tunnel.
03:54 Everything flows through.
03:55 So, that makes sense.
03:55 Yeah.
03:56 And then goes on and looks at which contributors merged, have merged.
04:01 And this is an interesting thing, or had been involved in PRs.
04:06 And it lists the top, he lists the top 50 people, but it includes some bots, which is interesting.
04:13 I was going to ask that.
04:15 I thought Bedivere is probably going to be up there or Mrs. LinkedIn.
04:18 Yeah.
04:19 Both bots, by the way.
04:20 So, this is a, I'd actually love to talk to, or either me or Michael or somebody talked to one of the, or Python people to talk about the different bots that are used and why they're used.
04:31 Because that's an interesting thing of large projects using bots to help out with some of the work.
04:37 And anyway, the non-bots, there's a couple of people that stand out.
04:43 Victor Stinner and Serhi Storkaka.
04:48 So, I apologize for messing up your name.
04:51 But that's, they're really up there.
04:54 So, that's pretty interesting that they're involved a lot.
04:56 And then there's a description here, a nice note that Lucas writes, clearly it pays to be a bot or a release manager since that's naturally causes you to make a lot of commits.
05:08 Victor and Serhi are neither of these things and still generate an amazing activity.
05:13 Kudos.
05:14 And also, it's not a competition, but it's still interesting to see who makes all these recent changes.
05:19 By the way, this, that top PR thing was only since the beginning of January 2020.
05:25 So, taking a look at the more recent stuff.
05:27 And then, one of the things that's interesting looking at who contributed where, I didn't know this.
05:34 There's an experts index.
05:36 So, that was linked.
05:39 Oh, it's asleep.
05:40 An experts index that is part of the Python Developers Guide.
05:45 I didn't know this was here.
05:46 It kind of lists some parts of the system, but there's blanks.
05:50 And so, there's, so Lucas also listed, did a script and pulled out the top five contributors to each file, which is kind of an amazing list of all of the different, of, you know, the top five people for every file within CPython.
06:11 So, if, this is kind of neat, because if you're going to do a PR, or you're working on a fix or something, and you're a little confused by some of the code, one of these people might be able to help you out.
06:21 So, this is kind of a neat list.
06:22 So, there's a, at the bottom of the article also, it talks about some of the, some of the takeaways from this.
06:30 I don't have this right off the top of my head.
06:33 Merging, how long it takes to merge a PR.
06:37 So, it's hard to draw information from this data, because it's all over the map.
06:43 The standard deviations are pretty large.
06:45 But, if a core developer merges their own PR, it takes, on average, about seven days to get through the process, give or take 42 days.
06:52 And, and then core developer authoring a PR, which is merged by somebody else, takes longer, about 20 days, give or take 78.
07:01 And then community authors, up to 20 days, give or take 80.
07:05 But, I mean, I work on commercial projects that are not really that much faster than this.
07:11 So, it's not too bad.
07:13 What do you think of this article?
07:15 Yeah, Anthony, what do you think of this?
07:16 You spend a lot of time inside the CPython code.
07:19 I mean, you did write a book, CPython Internals, which people can check out, right?
07:22 Yeah.
07:23 Yeah, I did write a book about CPython source code.
07:26 It's interesting.
07:28 I'm, first of all, I'm super excited about Lukash being the new developer in residence.
07:32 I think he's got the right approach.
07:34 And he's already made, you know, really promising progress, I think, in terms of how, trying to make the community contribution process a bit slicker.
07:46 Yeah, that's that at the bottom.
07:48 Like, just watching the GitHub repository, core developers working on the repository and making changes and stuff, from the outside, looks fairly seamless.
07:59 My own personal experience has been, sometimes it's quite, like, if your PR gets responded to within the first week, then it'll probably get merged pretty quickly.
08:09 And then, if it doesn't, then it just kind of ends up in the pile.
08:12 And I've had ones in there for, like, three years.
08:16 Well, right, the average was seven.
08:18 But it could go out at, like, another 40 days.
08:21 And it's probably, like, really quick or really far.
08:23 Well, that metric is how long they take to get merged, which I guess requires that they are merged.
08:30 Oh, yeah.
08:32 So that's not their fault.
08:33 I mean, there's basically just, like, loads of people contributing stuff.
08:37 And there aren't enough people with enough time to sift through it all.
08:41 And it just makes it really tricky.
08:43 And the project needs to continue marching forward.
08:46 And there's people who are dedicated to working on the core developers.
08:49 But, you know, some of the community contributions are really valuable.
08:53 I think that's what's promising to me is that Lukash is kind of looking at that and not just taking this role on as I'm going to be 100% core developer.
09:04 Yeah.
09:05 Because, yeah, there's already lots of other people on the team who are making some amazing contributions.
09:11 You know, Pablo has been working on the new parser.
09:15 And now he's working on this, like, stack list changes in 3.11.
09:20 Yeah, there's so many things going on at the moment in CPython.
09:24 So it's really encouraging to see.
09:25 Yeah, it's super encouraging.
09:27 I think Lukash is doing a good job sort of smoothing out the edges to just make it easier for everyone to go faster, which I think a lot of times in teams,
09:35 you know, not specifically here, but in general, there's these people who are kind of, oh, that's the person you can ask to make the CI work again when you break it.
09:43 This is the person you asked, like, to set up a new machine and remembers how to do that.
09:46 And like, you don't necessarily get direct credit for doing that work.
09:50 But without them, it's just way harder.
09:52 And I feel like he's doing that for CPython behind the scenes.
09:54 Yeah, the experts index is really helpful if you want to get involved in bug triaging.
09:59 So that's something that people are open to help with.
10:02 If you go on bugs.python.org and you want to help to triage bugs, often what you have to do is kind of look at it, make sure that the person who's reported it has filled in all enough information,
10:13 and then basically add people on the experts index to something called the nosy list, which is like a CC list, basically, on the bug.
10:22 And then, yeah, it's just kind of directing it to the right people.
10:25 Once you've done that for a while, then you kind of get given like a triage flag in your user.
10:31 And then if you've been doing that for even longer, then you could be promoted up to a core developer.
10:35 And there's a few people who've gone through that route over the last couple of years.
10:39 All right, Anthony, while you're talking, I got two things to share out of the audience.
10:43 Dimitri Figgel.
10:44 Hey, Dimitri.
10:44 Great to see you here.
10:45 Dimitri says, thanks for inviting Anthony.
10:47 He's someone I look up to.
10:48 Very nice.
10:49 Thanks, Dimitri.
10:50 Good to see you.
10:50 Yeah.
10:51 And Waylon, who was recently on Talk Python.
10:53 Hey, Waylon.
10:53 Says, what a great lineup here.
10:55 Also kind of for you.
10:56 And also, Henry Schreiner.
10:58 Hey, Henry.
10:58 Also recently on Talk Python.
11:00 Says, both PRs I've been involved with to CPython got in in about a day, I believe.
11:05 Which that's pretty amazing.
11:07 That's pretty good.
11:08 Yeah.
11:08 That's great.
11:09 Yeah.
11:09 So before we move off from this one, Brian, this is a good pick.
11:12 One thing I just want to point out as well is all these cool stats and these graphs and everything we're seeing here apply to CPython because it's on GitHub, right?
11:20 Yes.
11:20 But you can run the same code and run data set from Simon Willison against it.
11:25 But against a different repo, I would imagine.
11:27 Right?
11:27 Oh, yeah.
11:28 Yeah.
11:28 So if you run a project, you could probably do a similar analysis for your project.
11:33 That's a good idea.
11:33 Yeah.
11:34 All right.
11:35 Speaking of good ideas.
11:36 And it's interesting that Henry is out in the audience because I feel like we might have been responsible for this article.
11:42 Clearly, we did not write it.
11:44 We may have triggered is what I'm saying.
11:45 Mostly me.
11:46 In not the positive way.
11:48 Right?
11:50 So this is a cool article by Paul Gansel, who was also over on Talk Python talking about the mysteries of date, time and stuff.
11:57 There's all sorts of cool things.
11:58 He maintains the date, utility package and set up tools, projects and so on.
12:03 Over on episode 271.
12:05 So he wrote an article said why you shouldn't invoke setup.py directly.
12:10 And the reason I think I might have somehow had something to do with this is Henry was on talking about CI build wheel and all the proper ways to build packages.
12:17 I said, oh, you can run setup Python, setup py space, you know, wheel or bdisk or something.
12:23 And they're like, no, no, no.
12:24 You could.
12:24 But please don't do that.
12:25 And then here we have this article like two days later.
12:27 So I don't know if that was part of that conversation, but it's a really good article talking about the state of building Python packages.
12:35 And it says, you know, look for a long time, setup tools and distutils were the only game in town when it came to creating Python packages.
12:43 Right?
12:44 So you could do something like invoke Python setup, bdisk, sdisk, wheel and so on.
12:49 Wait, I see.
12:50 So Paul is actually in the audience.
12:52 Real time.
12:52 Fantastic.
12:53 Hey, Paul.
12:54 Paul says, I think I did it because Matthew Fikert asked for it on Twitter and I got sniped.
12:58 Yeah, perfect.
12:58 Okay, good.
12:59 So I'm just a coincidence.
13:00 Fantastic.
13:01 But yeah, so my, the reason this is extra interesting to me and thank you, Paul, for writing it is I was still doing this, you know, Python setup UI various commands.
13:10 And I was talking to Henry.
13:12 He's like, no, you shouldn't do that.
13:14 You should do it this other way.
13:15 I'm like, he said, well, okay, well, how should I do so?
13:17 You should use build the build package.
13:19 What is this build package you speak of?
13:22 You know?
13:22 So we've talked about pyproject.toml a bunch of times.
13:26 We've talked about things like flit and stuff that will use it, right?
13:30 This all comes from PEP 517.
13:32 And there is a package called build.
13:35 You can pip install build.
13:36 And then you do things like Python-m for module, run build.
13:40 And you can say, I want an sdisk.
13:42 I want a wheel and things like that.
13:45 And this acts as a front end to things like setup tools to the various backends that do building for Python.
13:54 Yeah.
13:54 Yeah.
13:55 All these different things that understand it, right?
13:57 So it says, all direct invocations.
14:01 Paul says, all direct invocations of setup.py are effectively deprecated in favor of purpose-built, standard-based CLI tools like pip, build, and tox.
14:10 So this is quite a long article.
14:12 There's a lot to go through.
14:13 It has some interesting history.
14:15 So in the early days, there wasn't even distutils.
14:18 And then in Python 2, distutils got added.
14:21 And then setup tools came along.
14:23 And then while they work, there's still problems.
14:26 Like, for example, you might have dependencies that you have to install to run the setup.
14:33 But the way you install stuff and figure out what you depend upon is by running the setup.
14:37 So what do you do?
14:38 So an example of that would be Cython, right?
14:40 So you might have to import Cython.
14:43 And in the invocation of calling setup, you tell it how to Cythonize the PYX files, right?
14:49 But that's obviously not going to work because you're going to have to have Cython installed.
14:54 But how do you express that?
14:55 You know, it's like this chicken and egg problem, right?
14:58 So let me pull up my notes here.
15:00 Yeah.
15:01 So basically, one of the big questions was, why am I not seeing deprecation warnings?
15:06 Let me go down a little further.
15:07 Yeah.
15:07 So if I'm not supposed to do this, why isn't screaming from the top of its terminal?
15:12 Stop, stop, stop.
15:14 Why are you doing this, right?
15:15 So there's a lot of commands that still have indirect uses of the distutils and stuff.
15:21 So it's a little tricky to deprecate it.
15:24 But basically, you should consider it deprecated.
15:27 You know, at the end of the day, it's better to replace your setup commands with tools like
15:30 build instead of setup PY sdist or bdist wheel or talks and knocks instead of setup PY test
15:38 and other commands backed by projects intended to support that.
15:41 Yeah.
15:42 That sound good to you guys?
15:43 Where are you on this?
15:46 Brian, you go?
15:47 Well, I don't use...
15:49 Have opinions.
15:49 I mean, I kind of indirectly use build, but I basically just use flit.
15:53 So I'm not writing things with C extensions.
15:56 So pure Python stuff, I just do a flit build or whatever.
16:01 It works fine.
16:02 Yeah.
16:02 So that's kind of...
16:03 I mean, that's using the pyproject.toml stuff, right?
16:06 Yeah.
16:06 Yeah.
16:07 Anthony?
16:07 I kind of...
16:08 If I'm starting a project now, then I use pyproject.toml and the project doesn't have a setup.py.
16:14 There were some reasons why I had to add one in the past, but that's mostly fixed now.
16:19 So I'm either using flit or something similar like poetry.
16:23 Yeah.
16:24 And I've worked on projects years and years ago where the setup.py was like, just ended up just
16:30 being a script to run ad hoc commands.
16:32 Like there was a test, setup.py test.
16:35 And then there's like, and lint.
16:36 And just run them like odd jobs.
16:39 Yeah.
16:39 And what does that have to do with installing software, right?
16:41 Why is that?
16:42 Yeah, nothing.
16:42 It was just like...
16:43 Yeah, it just ended up being an entry point to do things.
16:47 And one happens to be installed, but there's a bunch of other stuff you might randomly do.
16:51 Yeah.
16:51 And it's fine that it's being deprecated, but it just, you know, cpython still does that.
16:56 Like the setup.py and cpython is still used in that way and invoked directly in the source
17:04 code this is.
17:04 So yeah, it's good that it'll be deprecated, but I don't think the tooling is quite ready yet.
17:10 He's not really saying to get rid of setup.py.
17:13 Just don't use it.
17:14 Yeah.
17:14 Don't run it directly.
17:15 Yeah.
17:15 Find something better.
17:17 pip should do that.
17:18 pip should do the discovery for you, the PEP 5.17.
17:21 Yeah.
17:22 And run the correct steps for you.
17:26 So yeah, absolutely.
17:28 So a couple of comments out in the live stream is that while recommending build, it's nearly
17:33 impossible to Google to find it.
17:35 And racist.
17:37 I love and hate the name.
17:38 So authoritative.
17:38 So un-Google-able and a bit hard to use in conversation, but yeah, yeah, for sure.
17:43 So I think if you want to take away from this conversation, right at the top, there's a TLDR
17:48 section that Paul put in.
17:49 Click on the summary.
17:50 Picks you down to a summary and you can go to a table and it says, I was about to type
17:54 this.
17:55 What should I do instead?
17:56 I was about to type setup.py sdist.
17:59 What should you type?
18:01 Python-m build.
18:02 Having build installed.
18:04 Or if I was going to type setup.py bdist wheel, I should type python-m build --wheel
18:10 or something like that.
18:10 Setup.py test.
18:12 Oh, maybe py test or talks or knocks.
18:14 We covered knocks recently with Preycin, which was really fun, I believe.
18:17 So setup.py install.
18:19 No, that's pip install.
18:21 Python setup.py develop.
18:23 No, that's pip install dash E.
18:25 And then as well as upload, it goes back to twine.
18:28 So yeah.
18:29 Anyway, I think this is the most actionable bit here.
18:31 Yeah, it's good.
18:33 Yeah, indeed.
18:34 All right.
18:34 Well, Anthony, let's talk about keeping an eye on things.
18:38 Yeah.
18:39 So I wanted to highlight a project which has been in the works for a while, but they've
18:44 just recently finalized the specification.
18:47 So this is called OpenTelemetry.
18:49 It's a part of the Cloud Native Computing Foundation, the CNCF.
18:54 And it's a cross-language event tracing, performance tracing, logging, sampling framework for
19:04 applications, in particular for distributed applications.
19:07 So if you've got an application which is spread across multiple microservices and you want to
19:12 trace things or monitor performance or whatever across all of the stack.
19:17 It's a super hard problem, right?
19:19 Maybe you've got a Docker container running this thing.
19:21 That Docker container calls some other service on a different Docker container.
19:25 And maybe the logs are even transient.
19:27 What are you going to do to know if something went wrong?
19:29 Yeah, exactly.
19:31 And if you've got an application that's spread across, well, if it's built into multiple
19:35 microservices and one of those services has a fault, it's really hard to know where that
19:40 fault came from.
19:41 So if it just says error, blah, blah, blah, blah, you're like, okay, so what triggered that
19:46 error?
19:46 Which request from a user at the front end?
19:50 Or how did that error happen in the first place?
19:53 And how can I fix it?
19:55 And also like identifying, I guess, tracking performance across your application and looking
19:59 at that.
20:00 So there's been attempts at doing this in the past.
20:03 Open tracing and open sensors were the two kind of projects beforehand.
20:08 So this new project, Open Telemetry, is a merger of open tracing and open sensors.
20:13 There's engineers from some big companies working on this, including Microsoft, Amazon, Splunk,
20:20 Google, Elastic, New Relic, and a whole bunch of others as well.
20:24 Including actually full-time engineers from some of those companies working on this.
20:28 So yeah, I've been working with an engineer at Microsoft who works full-time on this project.
20:35 He works on, actually, there's a few people who work full-time on this, but the person who
20:39 works full-time just on the Python components to this.
20:42 So the Python SDK basically allows you to instrument lots of different frameworks.
20:48 So you can basically drop it into Flask or Django or Starlet.
20:54 So if you're using FastAPI and you can sort of instantly get capture of what requests are
21:01 going into the application, when there's been a crash, like where that exception's gone,
21:05 all the logging information.
21:07 You can look at performance records and stuff.
21:09 I've been sharing some examples of where I've wrapped it around a FastAPI app.
21:14 And then I can see like performance of what's the average request time for each of these parts of the application.
21:21 And where is that time spent?
21:22 Even down to like...
21:24 Can you say like this is the data layer section and this is the business logic and here's the civilization or whatever?
21:30 Exactly.
21:31 So I can kind of see like almost like a cool stack, but across the actual components of the app.
21:36 So here's where it came into FastAPI.
21:38 Here's where it went into database.
21:40 Like here's how long the query took.
21:42 Here's how long the ORM took to remodel it.
21:45 Here's how long Jinja2k to build the template.
21:48 Like so you can kind of see a breakdown of all the different components and how things are being pulled together.
21:54 So there's two parts of OpenTelemetry, but there's actually more than two parts.
21:58 I am actually really appreciative of even though there are lots of engineers from big companies, this hasn't been over-engineered yet.
22:08 And I'm really hoping it doesn't.
22:10 Is there a factory factory method in here?
22:12 Yeah, exactly.
22:13 Especially because it's like so generic.
22:15 There's a real danger of it being just over-engineered.
22:19 So if you go on the website and go to registry and then pick Python on the right-hand side, you'll see the kind of different extensions you can get.
22:26 So instrumentation is basically like this is the thing I want to monitor.
22:30 And it could be like ASCII or Async Postgres, for example, Database, Celery, Django, Elasticsearch, Flask.
22:41 Like there's a stack of app stacks that you can just drop it into and it will give you all the tracing information.
22:46 And then there's these things called exporters, which is basically like once it's got the information, it can send it to somewhere like Datadog or New Relic or Azure and AWS, obviously, and Google monitoring as well.
23:01 And yeah, actually, I just worked on recently, if you just want to hack around with it, there's an exporter for rich that just basically prints it on the console.
23:12 So you can see everything that's happening.
23:14 In Keller, probably, yeah.
23:16 Yeah, yeah, yeah.
23:17 So it's all kind of color-coded.
23:18 It's really nice, actually.
23:19 So yeah, I'm really excited about this.
23:21 I've been mostly trying it with FastAPI as there aren't really many frameworks for setting up like decent monitoring and tracing in FastAPI applications.
23:32 And yeah, I think it's really promising.
23:34 So I suggest you check it out.
23:36 And if you see a framework that needs support or something, then this is all open source and they're all accepting contributions as well.
23:45 And it's fairly straightforward to add support.
23:48 Yeah, it's got Postgres, MySQL, MongoDB, Pyramid, Redis, all sorts of good stuff in here.
23:54 Another thing maybe worth pointing out here is because this crosses languages, right?
24:00 There's a Python one, but there's also a .NET one.
24:02 There's a Swift one and so on, which means there might be scenarios where I've got like, say, a mobile app written in Swift.
24:10 And then I've got the backend written in Python and FastAPI or something.
24:14 And you want to put those together.
24:15 Because it goes across those languages, theoretically, that's a thing that could happen.
24:19 Absolutely, yeah.
24:20 And you can pull that all together.
24:21 And it would give a request a trace ID.
24:25 So when a request comes into the front end, a trace ID could carry across the different stacks as well, which is pretty cool.
24:32 Yeah, very cool.
24:34 This is neat.
24:34 Awesome.
24:35 Thanks for covering it.
24:36 Now, before we move on, Brian, we have a sponsor for this episode.
24:40 That's cool.
24:40 Yay.
24:40 Thanks to Shortcut.
24:43 Shortcut, formerly known as Clubhouse.
24:45 So they're a really cool project management tool.
24:48 And they ask the question, have you ever really been happy with project management?
24:52 You know, how's your Jira or whatever, right?
24:57 How much are you loving it?
24:58 So they basically say most are either way too simple for growing engineering teams to manage everything or too complex and just throw in the kitchen sink.
25:07 And you don't want to work with it.
25:09 You've got to constantly tweak it to make it work for you.
25:11 So Shortcut, who used to be known as Clubhouse, is different.
25:14 They try to be simple.
25:14 It's project management built specifically for software teams.
25:18 It's fast, intuitive, flexible, many other nice positive adjectives.
25:22 So some of the highlights are team-based workflows.
25:24 Individual teams can use shortcuts, default workflows, or customize them to match the way they work.
25:30 Also, organizational-wide goals and roadmaps.
25:33 So these workflows automatically get tied into larger goals and feed into like a bigger system outside the team.
25:39 Good source control integration, GitHub, GitLab, Bitbucket, all those types of things.
25:44 One thing that I really love is the web app has hotkeys.
25:48 So it's keyboard-friendly, just like HR and VS Code, whatever, right?
25:52 I don't know why more web apps don't have hotkeys.
25:55 It's not particularly hard, but they do, which is great.
25:57 Iteration planning, so you can set your priorities and let Shortcut run the schedule.
26:01 You get nice little burndown charts and so on.
26:02 So check them out at shortcut.com slash pythonbytes, shortcut.com slash pythonbytes, because you shouldn't have to project manage your project management.
26:10 That does not sound fun.
26:12 So let them do it.
26:12 It's their job.
26:13 Now, before we move off to the next topic, Robert Robinson on the audience.
26:18 Hey, Robert, this open telemetry sounds interesting.
26:20 He wants to try it out.
26:21 I do as well.
26:23 I feel like this is the kind of stuff that you just keep putting off, integrating into your system.
26:27 And then once you finally do, you're like, oh, look how awesome this is.
26:30 We can see what's going on.
26:31 And it's actually, did you know this part was crashing?
26:33 No, I didn't know that.
26:34 Nobody looked at the log and it was just eating the exception, right?
26:38 Yeah.
26:38 Tricky, tricky.
26:38 All right.
26:39 Brian, you got the next one.
26:40 So Python's got a few built-ins.
26:44 Not a ton, but quite a few.
26:48 So there's an article from Tushar Sadwani called Understanding All of Python Through Its Built-Ins.
26:57 And it's a pretty, like, he's got a pretty ambitious goal here to understand everything.
27:03 But I actually kind of really enjoyed even the first part of it.
27:07 So I started reading it.
27:08 I've been especially giving it a shot.
27:12 I got a shout out to him.
27:13 He's been fairly involved on Twitter, answering questions and being involved in conversations.
27:19 So that's a good way to get noticed.
27:22 But there's a, there's, there's a, starts off talking about scope.
27:26 So what is built-ins are not just things that Python has built in, but there's also, it has
27:31 a relevance to the scoping rules.
27:34 And he called it the LEGB scoping rules.
27:37 So it's when Python, if Python sees a symbol, first it looks in the local scope, then the
27:43 enclosing scope and global scope, and then the built-in and built-ins really are just anything
27:50 that's in the built-in package.
27:51 So, and that actually that discussion, it's a really pretty good discussion and it helps
27:57 it kind of, it's good for especially newbies to, to understand, but even advanced beginners
28:02 sometimes don't quite understand what's going on here.
28:04 Yeah.
28:05 Brian and Anthony, you both come from C style languages historically, right?
28:10 Or at least I've spent a lot of time there, right?
28:12 Brian, do a lot of C++.
28:13 Anthony, I know you've done some C# and stuff.
28:15 Did the scoping story of Python confuse you and kind of leave you a little uncertain in
28:20 the beginning?
28:20 Yes, definitely.
28:22 Especially coming from C++ where it's, it's very well-defined and different.
28:27 If it's in the curly braces, it's alive afterwards.
28:29 It's gone, right?
28:29 Like, wait a minute.
28:30 That's not the story at all.
28:31 Right.
28:32 And also you've got so many nested curly braces.
28:35 It could be anywhere and it's not really, there's, it seems like, actually we just
28:39 don't do that too much in Python, but Anthony probably know better than me.
28:43 If I've gotten like multiple nested, name or curly braces, we don't have curly braces,
28:49 but multiple nested indentations.
28:52 does the scope sort of look in outer and outer and outer ones?
28:56 Is that what non-local means?
28:57 I, non-local, there's a non-local keyword, which is like a whole other thing.
29:03 That's a completely different thing.
29:05 Okay.
29:06 I think I've every, I don't know.
29:07 Closure, variable capture, basically.
29:09 Yeah.
29:10 Yeah.
29:10 Yeah.
29:10 But the, the, the, the difference in global really freaked me out because really we were
29:14 pounded into our heads everywhere is to never use global variables, but global is different.
29:20 The global namespace is not a global variable.
29:23 It's more like a module level.
29:26 Yeah.
29:27 Yeah.
29:27 Yeah.
29:27 Or like, like a static variable in a class maybe would be what, what other people might
29:32 call it.
29:33 Yeah.
29:33 Yeah.
29:33 It's not a dangerous thing in Python.
29:35 So, yeah.
29:36 So I didn't mean to derail you that much, but I think it's interesting to think about the
29:39 built-in scope, the global scope, these different scopes, because it's such a different world
29:43 from the intuition you get coming from all the C languages.
29:45 Yeah.
29:46 also just sort of just really enjoyed looking at the language through the scope of built-ins.
29:50 It's an interesting take on it.
29:52 one of the, I will pull out a few things that, that he, he mentions.
29:56 And one is all the constants.
29:58 I guess I'd never counted them before, but there's five, there's five constants in
30:02 Python, true, false, none, ellipsis and not implemented.
30:07 I do like ellipsis.
30:09 we talked about that the other day, or I guess, one or two weeks ago using dot,
30:13 dot, dot, instead of pass.
30:15 Are you going to start doing that?
30:16 I've already started doing that.
30:18 Have you?
30:18 I'm all about, I think I'm, I'm up for it as well.
30:20 I, I don't, I guess I, I don't think I've ever used not implemented or even looked for
30:26 it, but.
30:26 Interesting discussion.
30:27 also just like, I like looking around.
30:30 So here's a section on compile exec and eval.
30:33 It's not an alphabetical listing of everything.
30:35 It's a more grouping them together.
30:37 it's quite an, a big article, but I would suggest people just like skim through
30:44 the list.
30:44 Cause it's got a good table of contents at the top and you can just sort of, skim
30:48 through what, what he's talking about and pick a couple and go read about it.
30:52 You'll probably learn something.
30:52 So, anyway, good shout out to Tushar for writing this.
30:57 Yeah.
30:57 This looks super handy.
30:58 Yeah.
30:58 Some of the built-ins are super handy.
31:00 I often have a Python repo open just to do, things that would otherwise be annoying
31:06 to do on a calculator, like converting hex, integers and vice versa.
31:11 There's a hex built in, which is really helpful actually, doing this stuff.
31:15 Yeah.
31:15 I use hex a lot because I'm often, looking at, looking at data elements in a, in a,
31:22 a packet or something like that and trying to convert those.
31:25 So, yeah.
31:26 Very nice.
31:27 Nice one.
31:27 Before we move on, Anthony, how do you feel about dot, dot, dot?
31:30 They should have called it yada, yada, yada.
31:33 yeah, I think that would be, it's way better than ellipses.
31:38 Come on.
31:38 Yeah.
31:38 I use it for type stubs, and that's it.
31:41 So, yeah.
31:42 There's times we use pass, right?
31:44 And I feel like, you know what?
31:45 Dot, dot, dot kind of says, I kind of know what I'm not ready for stuff here yet.
31:49 I think we should start calling instead of ellipses, we should call it dun, dun, dun.
31:53 Exactly.
31:56 All right.
31:57 How about we hand out some awards?
31:59 Okay.
32:00 Best open source software of 2021.
32:02 Now who gets to vote on this?
32:05 Who gets to say, well, info world in this example.
32:07 So this is according to info world, but there may be other rules, but I've, I've found this
32:10 pretty interesting.
32:11 Actually.
32:12 I heard about it, learned about it because Sebastian Ramirez from FastAPI said, yay, we've
32:17 been voted one of the best open source projects.
32:19 So this is called the info world bossy 2021 awards.
32:23 But what I thought was interesting is going through here, there was 30 different projects
32:27 that won awards.
32:28 I'm like, oh, that's interesting.
32:29 Oh, I didn't know about that.
32:30 Oh, check this out.
32:31 Yeah.
32:31 So I wanted to touch on a couple.
32:33 So there's some things that may or may not be interesting to you like Svelte, which is a
32:38 JavaScript front end like viewer react.
32:41 That's not interesting to me.
32:42 But Minikube, Minikube is pretty interesting.
32:45 Minikube is a way to run like a baby Kubernetes cluster right on your computer.
32:50 Just say Minikube start.
32:52 And guess what?
32:52 You've got a cool little cluster running.
32:54 So that might be really helpful for Python people.
32:56 Let's see.
32:57 Pixie.
32:58 Zoom back a little here.
33:00 Number five is FastAPI.
33:02 Now we're all fans of FastAPI.
33:05 I think it's really awesome that it won.
33:06 And we're maybe giving a quick shout out to how they described it as Django and Flask have
33:11 been leading the Python web frameworks for years.
33:13 FastAPI now deserves to be mentioned in the same breath.
33:16 I agree.
33:16 Calls out the main features, which are it's truly modern, truly modern Python web framework
33:22 written from the ground up using type hinting, async and high speed components by default.
33:26 That's true.
33:27 And I also really like that they pointed out that while its name indicates it's primarily
33:32 for APIs, it's also really good at writing more conventional websites with like Jinja
33:37 templates or even chameleon templates.
33:38 So way to go.
33:39 Anthony, you want to add it or Brian want to add anything?
33:41 Well, I just think that I think you're partly to thank for people considering FastAPI for
33:47 not just APIs, because you've been beating that drum a little bit as well.
33:51 Yeah, thanks a bunch.
33:52 I even created some decorators that make it really easy to like render templates as response
33:56 values and stuff.
33:57 Yeah, that's fun.
33:57 I tried out the chameleon thing.
34:01 The one you wrote, actually.
34:02 Yeah, because I'm working on this FastAPI course with you at the moment.
34:06 Yeah, that's going to be fun.
34:07 So yeah, I'm a big fan of FastAPI.
34:10 I think it's brilliant.
34:11 And testament to Sebastian, really, because he really kind of builds on something which is
34:17 quite complicated, but he makes it seem so effortless.
34:20 And just working with FastAPI, like the documentation is excellent.
34:25 The framework itself is just is really logical.
34:27 And, you know, it's really easy to use that in terms of like the I've been keeping an eye
34:34 on the popularity of the different frameworks and stuff over the last few years.
34:38 And Django and Flask are kind of neck and neck and have been for a while.
34:42 And FastAPI now is the third most popular, according to the metrics that I've seen.
34:48 Yeah.
34:48 Out of nowhere to third most popular.
34:50 Yeah.
34:50 Yeah.
34:51 And I know JetBrains are doing the latest PSF developer survey.
34:57 So yeah, we'll see kind of what happens in this year's number.
35:01 But I'd imagine FastAPI would still be the third most popular.
35:05 So yeah, it's brilliant.
35:06 So yeah, I think it's a good solid pick.
35:09 In terms of writing like full apps with it at the moment, like there's still a lot you have
35:15 to do for templating.
35:16 Like you pretty much have to like build in a whole bunch of other templating stuff and
35:22 picking an ORM at the moment isn't easy, but there are some brilliant ones to have a play
35:27 with.
35:27 Yeah.
35:27 There's a couple interesting ones.
35:29 I want to give a shout out to.
35:30 Yeah.
35:30 That give like some are even integrating with Pydantic, which is sort of the natural exchange
35:35 of FastAPI.
35:36 So you want to give a shout out to Tortoise, you say?
35:37 Yeah.
35:38 That's my favorite so far.
35:39 I've used, tried out six different ones so far.
35:42 Yeah.
35:43 And Tortoise, I think it's my favorite at the moment.
35:46 So right on.
35:47 Well, maybe next year we'll be talking about the award for SQL model, which is built on
35:53 top of Pydantic plus SQLAlchemy by Sebastian as well.
35:56 So who knows?
35:56 A lot of good ones out there.
35:57 A lot.
35:58 It's good to see a lot of the excitement and new ideas coming along there.
36:01 All right.
36:01 What else we got?
36:02 Crystal.
36:02 Don't care.
36:03 Windows terminal.
36:04 I think is actually pretty interesting.
36:06 Windows has traditionally been not on par with its terminal experience.
36:10 And I think, you know, the windows terminal, PowerShell seven, all my posh, all these things
36:15 come together, nerd fonts to make it like quite an amazing place to be.
36:19 Actually.
36:19 Windows terminal is an open source project.
36:21 It didn't start out that way, but now it is.
36:23 Yeah.
36:24 Okay.
36:25 Yeah.
36:25 Yeah.
36:25 So that's a good one.
36:26 OBS studio.
36:27 If you're doing video stuff, that's amazing.
36:29 There's a bunch of stuff in here that may apply to people that you can all check out that
36:33 are interesting, but I don't want to cover them.
36:36 BASC though.
36:37 BASC is a big data science one.
36:39 Scale computation, like pandas operations and whatnot.
36:45 Across cores, across clusters, across compute that's larger than the RAM you have by streaming
36:50 it off disk and all sorts of interesting stuff.
36:52 I have no idea why my browser is jumping up and down.
36:54 We'll have to ignore that.
36:55 I'm not in control of it.
36:57 I'm sorry.
36:57 It seems like.
36:58 I, you know, I'll tell you why this is happening.
37:01 I'm, I'm looking up and I see I'm not running my VPN, which would block ads.
37:05 And so there's some kind of ad off, off the screen that's just running.
37:09 And if I turn on my VPN, we'd be good.
37:10 All right.
37:11 Blazing SQL is another great one.
37:13 Rapids from NVIDIA.
37:14 And I feel like there's one more I want to give a shout out to.
37:17 Hugging face.
37:17 I don't know anything about that.
37:18 Now that was it.
37:19 So I just going through that list.
37:20 I thought it called out a lot of neat projects in addition to just FastAPI.
37:23 Yeah.
37:24 Cool.
37:24 Yeah.
37:25 Any, any of those jump out at you guys either that I've just screened by?
37:28 Lots of, lots of stacks that I don't use.
37:31 So same.
37:33 Yeah.
37:34 There was a bunch of ML stuff though, which I don't use, but I think would be relevant
37:38 to people who are listening.
37:39 Maybe.
37:39 Well, we're not to extras yet, Michael.
37:41 No, no, I know.
37:42 I just closed it because the jumping was driving me insane.
37:44 Okay.
37:45 All right.
37:46 Anthony, you've got the last main one, right?
37:49 All right.
37:50 Yeah.
37:50 So I think Lukash is taking up like half of this episode.
37:54 So we're going to get back to Lukash's blog and evolve the discussion that was started
38:00 last week on this discussion.
38:03 Yeah.
38:03 Yeah.
38:03 I'm, let's put it mildly.
38:05 I'm excited about this.
38:06 I think if, if this happens, it's probably going to be the biggest thing to happen in
38:10 CPyton in the last five years, in my opinion.
38:13 And this being the GIL removal.
38:15 This be the GIL removal.
38:17 But not the gillectomy.
38:18 Not the gillectomy.
38:19 Not exactly.
38:20 Yeah.
38:21 So no GIL or let's just go with no GIL.
38:24 Yeah.
38:25 No GIL.
38:26 So almost seemingly out of nowhere, Sam Gross, who works at Facebook, basically likes
38:36 submitted to the core developers, this research paper and a working branch of a gill-less
38:44 Python.
38:44 And just quickly recap, I guess, on what that means.
38:48 This article is pretty heavy in technical detail and the stuff that's, yeah, the stuff that's
38:55 being discussed in the article, again, is pretty complicated.
38:57 And I actually didn't understand a lot of it.
38:59 And I've written a book on the Python compiler.
39:02 So if you read this and it's confusing, don't worry.
39:06 So the GIL is basically the global interpreter lock.
39:10 And it exists as a way of making Python thread safe when it comes to keeping reference counts
39:17 of specific objects.
39:19 So if you create a Python object, for example, there's a counter of how many things are referencing it.
39:27 Because you don't want to just destroy an object.
39:28 Because you don't want to just destroy an object.
39:30 And then you're working through a list of objects, for example.
39:34 But then one of the items in the list just disappears, has been deallocated.
39:39 Because everything is a pointer in Python.
39:41 That pointer just goes nowhere.
39:43 Or actually, there's a magic pointer that Python uses when it deallocates objects, which I know from a very painful experience.
39:53 So you don't want that to happen.
39:54 And if you've got multiple threads kind of working with the same objects all at once, you don't want them to...
39:59 It's incredibly hard to keep track of what's happening.
40:02 Threading is great because you can have multiple threads working on a computer.
40:09 And the operating system can do the scheduling of which threads run on which cores and which CPUs, etc.
40:15 So in theory, it's a way of making your Python applications a lot faster if you write them to be multi-threaded.
40:22 But Python is basically built in this lock, which says, okay, in the evaluation loop in C eval,
40:29 don't let anyone else run an instruction whilst this thread is running the instruction.
40:35 With the exception of IO-bound tasks.
40:38 Yeah.
40:39 And it seems like this is a thing to control threading.
40:42 And really, it's just a thing to protect memory management.
40:44 But it has this huge blocking effect for threading, right?
40:47 Yeah.
40:48 So it's a thing to basically make the reference counter thread safe.
40:52 Without locking.
40:54 So it's fast.
40:55 Without locking.
40:55 Yeah.
40:56 So you don't have to wait to add an income.
40:59 So to give you an idea, like if you run the GC by hand, you'll just see how many tens of thousands of objects are just created,
41:06 like all the time in Python applications.
41:09 So what Sam had put together, I say seemingly out of nowhere, but if you go through the article and what he proposed,
41:18 he's actually been working on this almost full time for two years, which is astonishing.
41:23 And it's a real feat of engineering, to be honest.
41:27 So kind of what he's proposed is a way of removing the GIL so that there's essentially like almost two ways of keeping references into objects.
41:39 And one of them is specific to the local thread.
41:43 And then there's also another reference count, which is for other threads.
41:48 So why is that important?
41:50 Well, let's say, for example, you've got a Python dictionary with values in it, and then you have multiple threads or working on the same dictionary.
41:58 Like that's a complicated problem to solve.
42:01 How do you make sure that the references to the keys or the values don't disappear?
42:07 And he does actually go into detail about how that's been handled.
42:11 And also objects like Python dictionaries are not thread safe at the moment either.
42:17 So if you have two threads working on a dictionary, adding values, for example, to a dictionary, do you have to lock the hash table?
42:28 Anyone who's worked with multi-threading in low-level languages knows that the complexities of doing this.
42:35 So what he's proposing is that in his prototype, he basically replaced the Python memory allocator with another one called Mimalloc,
42:44 which is a sort of thread-safe memory allocator.
42:51 It's actually a Microsoft project.
42:53 But I think it could have been any other thread-safe memory allocator.
42:58 Writing memory allocators is very involved for them to be performant and efficient.
43:05 And then basically objects get tied to the thread that created them.
43:10 And then there's a non-atomic local reference count with the owner thread.
43:14 And then there's basically a separate mechanism for what would be slower, basically, reference counting from other threads.
43:21 So single-threaded performance is equivalent with this proposal.
43:26 But there's still a performance impact of multiple threads working on the same object, which is to be expected.
43:34 There's always a little overhead for that.
43:36 Yeah.
43:36 But to give you an idea, in his note, he implemented a few common problems as a multi-threaded implementation.
43:45 And he said, if you give it 20 threads, it runs 19.84 times faster than it would in just regular CPython.
43:54 So for certain types of problems, this can have enormous impact in performance.
44:00 But it is really complicated.
44:03 And that's why I think it's an interesting discussion to see, okay, how do we get from this is a cool idea to this actually being released and being used by millions of people?
44:16 And I don't know, Python's like running on satellites in space and stuff.
44:21 Like, how do we go from a fork that someone's been hacking around with to something that's like production ready?
44:27 And this is kind of what the article goes into.
44:30 So like, you know, how would this work?
44:33 Would it be a feature flag?
44:34 Which version would we target?
44:37 And so at the moment, it's targeting 3.9 alpha 3, actually.
44:42 So it wasn't even the release of 3.9.
44:45 So he needs to do some work to update that to the latest version of 3.9, which is 3.9.7.
44:50 And then I think the target release, if the core developers agreed to kind of like explore this, if that was 3.11.
44:59 Or I don't think anyone wants to touch the Python 4 topic.
45:04 But 11 is like a year away.
45:08 Is that even possible?
45:09 Or would it most likely be a couple years out?
45:11 Yeah, it seems pretty soon to me.
45:13 And I like sub-interpreters, for example, is like an experimental feature.
45:17 I think the issue with this is that it's that the volume of changes is so broad that it's quite hard to kind of like have it in as a feature toggle.
45:27 So like sub-interpreters was in as like a hidden package that you can use and it's experimental.
45:33 Whereas this is like changing...
45:35 Everything.
45:36 Yeah.
45:37 Well, not everything.
45:38 But like it's a pretty wide sweeping change.
45:41 And changing the memory allocator is a massive change.
45:45 So the question is more, how can we introduce this softly, I think, and have it either as a feature flag?
45:53 And what would this break?
45:54 And the main thing is that C extensions haven't really had to worry about thread safety because the GIL kind of handles that for them.
46:03 So C extensions essentially would need to...
46:06 If they use the mechanisms that are here, that's fine.
46:08 But C extensions often have other objects which they haven't used the reference counter for.
46:16 So they've basically kind of like allocated their own objects and variables and stuff like that that would not be thread safe.
46:23 And they had just not ever had these kind of collision issues in the past.
46:26 So introducing this would potentially break some C extensions.
46:31 So, you know, how could that be introduced gently?
46:34 I think what was interesting in the article is there's a mention of NumPy.
46:40 And NumPy has actually done a lot of its own work already on basically kind of making it thread safe and more scalable.
46:47 But one of the tricky ones is PyBind 11 is called out in here as being anyone who's using PyBind 11 potentially might have to do some refactoring to support this if it was supported.
47:02 And then in closing, Lukash, who wrote this review of posts, sort of said, you know, the team have been really impressed with Sam's work and invited him to join CPython Project as a core developer.
47:15 And he's interested and Lukash is going to mentor him.
47:18 So I think that's brilliant.
47:20 Like, oh, yeah, that's brilliant.
47:21 Just to come up with this over like even two years is like a really short amount of time for a problem that people have been trying to solve for well over a decade.
47:31 So, yeah, very exciting.
47:33 Yeah, this is great.
47:34 I think we have a record number of core developers in the audience right now.
47:38 Yeah.
47:39 So some great comments from Steve Dower.
47:42 Hey, Steve.
47:43 The big thing needed here is a path forward for native extensions.
47:46 They could all need rewriting or else importing them could re-enable the GIL.
47:50 That discussion is happening now.
47:52 It's very early.
47:53 And Henry Schreiner also has similar comments that they're considering that.
47:57 But yeah.
47:58 And Henry also says we would be up for refactoring Pybind 11 if needed, I believe.
48:04 This is also interesting.
48:05 But this is exciting.
48:06 There's a lot of stuff coming here.
48:08 I think another thing in addition to the no GIL is I got the sense that Sam had added several other optimizations that were independently worth adding to Python.
48:18 Yeah.
48:19 One of the things I know that there's a lot of tension around whether or not to do 4.0.
48:26 But if it ends up being that all of the extensions need possibly tweaked, then that might be, then it's an API change.
48:35 And I think a shift to 4.0 might not be terrible.
48:38 It would be the right number.
48:38 Yeah.
48:39 Well, we should just go to Python 5.0 so no one's worried about 4.0 and we'll skip the whole conversation.
48:43 It'll be fine.
48:44 We'll do an AngularJS.
48:46 We'll just make a big fuss about going from 1 to 2 and then just all of a sudden they're on version 10 or something.
48:52 Yeah.
48:52 We'll just go crazy.
48:54 Yeah.
48:54 Yeah.
48:55 That's fantastic.
48:55 I'm actually having Guido Van Rossum and Mark Shannon, I believe, on Monday on Talk Python to talk about performance in the future and stuff.
49:05 And I'm sure we'll talk about this stuff a little bit.
49:07 Yeah.
49:07 So it should be a lot of fun.
49:08 This was Guido's suggestion when I asked internally if anyone wanted to share anything.
49:12 This is what he sent over.
49:13 Okay.
49:14 Fantastic.
49:15 Yeah.
49:15 So I'll try to take that up with him again.
49:16 All right.
49:17 Well, Brian, does that bring us to our extras?
49:19 We are at extras.
49:21 Do you have any extras?
49:21 Yeah.
49:22 No, you go first.
49:23 Tell us about PyCon.
49:24 It's a conference, right?
49:25 Call for Proposals is open for US PyCon.
49:28 I'm pretty excited about that.
49:29 I already wrote down like six ideas of things I might want to talk about.
49:33 So and of course, there's no guarantee.
49:37 No matter who you are, there's no guarantee that you're going to get in.
49:39 But it's fun.
49:40 It's fun to come up with proposals anyway.
49:42 And it's fun.
49:43 I'm definitely going.
49:44 So I'm pretty excited about that.
49:46 And anybody else going to propose?
49:49 Anthony, you going to try to talk there?
49:51 Yeah, I've been thinking about that, what I'm going to put forward.
49:54 I want to put together a talk on performance anti-patterns.
49:58 Oh, that'd be fun.
49:59 Propose that for next year.
50:02 Yeah.
50:02 Because of your name?
50:03 Like anti-patterns?
50:05 Also.
50:07 We're not on the direct section yet, Brian.
50:11 If anybody doesn't know, I wrote a book and then I rewrote it.
50:15 And I'm finished with it, actually.
50:19 So it's not out yet, but I'm pretty excited that I'm finished.
50:22 All the betas, there's beta seven out, has all chapters in it.
50:26 So if you're waiting for it to be done, it's done.
50:29 It's not in print form yet.
50:31 That's going to happen in January or February.
50:33 So I'm pretty excited to get that done.
50:35 I'm hoping for my copy at PyCon, Brian.
50:37 I'm pretty sure I paid for the last one as well.
50:40 I actually, I paid you in cash.
50:41 So I'm going to give you a copy of my book.
50:43 I'll bring, I'll bring at least.
50:45 Maybe we can do a swap.
50:46 Swap.
50:47 Yeah.
50:47 That'd be great.
50:48 Yeah.
50:48 Anthony, I got your book over there.
50:50 I'm not sure what I can trade it for though.
50:51 That's awesome.
50:54 Congratulations, Brian.
50:55 Thanks.
50:56 Anthony, you got any extras you want to share?
50:57 Yeah, I'll be shipping fairly soon.
51:01 The JIT compiler that I've been working called Pigeon.
51:04 I'll be going version one in two weeks.
51:09 So it's a Python 3.10 JIT compiler.
51:13 It's a, you basically just drop it into CPython and turn it on and then run your code and it
51:19 just JIT compiles it in the background.
51:20 And in some cases makes it a lot faster.
51:24 In other cases makes no difference.
51:26 But yeah, some of the benchmarks I've been doing, like floating point math and integer
51:35 math, like makes a massive difference.
51:37 So yeah, like 60%.
51:39 Like the scientific side of thing, right?
51:40 Yeah.
51:41 So stuff that you would otherwise think, oh, I'm going to redo this in Cython or something
51:46 like that.
51:47 You don't have to add all the extra stuff.
51:50 You just kind of turn it on.
51:51 Yeah.
51:52 Yeah.
51:52 And body benchmarks now 60% faster than standard CPython.
51:56 That's great.
51:58 And yeah, some of the other benchmarks I've got are 60% upwards.
52:00 That's super cool.
52:02 So this work with Sam and the NoGill, does that throw a spinner in the works or a spinner in
52:09 the works?
52:09 It would make my life quite hard for a few weeks if it gets merged.
52:14 Yeah.
52:17 So yeah, that could be interesting.
52:18 And I'm also working on another secret project, but I'll share that in a few weeks.
52:22 Yeah.
52:23 Pigeon does, there's a comment in the chat.
52:25 Pigeon does use scikit build, which I did want to call that out when we were talking about
52:30 setup.py earlier because, yeah, so Pigeon uses, is all C++ and it uses CMake, which generates
52:41 make files.
52:41 So yeah, and it uses scikit build, which is a CMake extension, I guess, around Python extension
52:49 modules.
52:50 So that's how it kind of compiles.
52:52 It's really cool.
52:52 Big fan of scikit build.
52:54 Yeah.
52:54 And I recommended using build earlier.
52:56 Henry, on our episode together, mentioned that if you have external non-Python code like
53:02 C code or Fortran or whatever, then instead of build, scikit build would be a good option
53:06 to build the binary bits for that.
53:08 This is the other question I wanted to ask, and Steve Dower beat me to it.
53:12 He states it as an assertion.
53:15 I was going to ask you the question.
53:16 I bet once Pigeon ships, you'll get people interested in helping add optimization.
53:20 Yeah, so it's one thing to JIT compile.
53:22 It's another to just then straight up run it versus go, oh, we can inline this method.
53:26 Oh, and I see we can do this.
53:27 And then we could actually reuse this field because it's not used below and early free,
53:32 all that kind of stuff.
53:33 Where's the optimization of that look?
53:34 Yeah, I've got it on the documentation page as an optimization section, and I've kind of
53:39 written up a lot of the optimizations and how they work, assertions that they make
53:44 and compromises and stuff like that.
53:46 So yeah, if you're interested, there's some info on there.
53:50 But yeah, I'd love more help on this.
53:52 The learning curve on the project is quite steep, but I'm trying to make it easier.
53:57 I mean, it is a compiler, so like, yeah.
53:59 And I just added ARM support as well.
54:03 So M1, Apple M1.
54:06 And I tested Linux ARM 64 and, in theory, Windows ARM.
54:12 But I don't have access to any machines to test the Windows one.
54:15 And I could only test the Apple one remotely.
54:18 If you need a periodic test, you can reach out.
54:20 I got Windows 11 running on ARM.
54:22 Oh, really?
54:23 Okay.
54:23 Yeah.
54:24 Yeah, maybe I'll take you up on that.
54:25 Right on.
54:25 Very cool.
54:26 All right.
54:26 I have a couple throughout there as well.
54:28 Python Software Foundation on Twitter, the PSF analysis.
54:32 We're happy to announce the Python Developer Survey 2021.
54:35 Take part in it.
54:37 This is the one that is then hosted, and then the data analysis is done by JetBrains, but
54:42 not influenced by JetBrains.
54:43 So I'll link to that in the show notes.
54:45 Be sure to get out there and take that.
54:46 Henry, out in the audience, I have something as well, the feature for what you said the other
54:52 day on Twitter.
54:52 I said, after Python's bytes mentioned on yesterday's show, I asked for a new feature, and it's
54:58 already in pip.
54:59 PipX.
55:00 PipX run PyPI command line wheels.
55:04 Basically, this is added to PyPI command line, and it'll tell you all sorts of cool stuff,
55:10 like the details of the wheel.
55:11 So you could run pipX, basically run pyPI-command-line wheels numpy, however you run that.
55:18 And it'll tell you, like, for numpy on macOS 10 universal, does it have a signature?
55:24 Is there a binary distribution?
55:25 What versions are updated?
55:26 Supported?
55:27 How old is it?
55:28 How big is it?
55:29 Same thing for Linux architecture, ARM on Windows, and so on, so on.
55:34 So you get, like, just this cool graph using rich of, like, tables of tables telling you
55:39 about the status of wheels on different platforms straight out of PyPI, which I thought was cool.
55:44 Nice.
55:44 Yeah.
55:45 So that's pretty good.
55:45 So, Henry, thanks for making that happen.
55:47 Also, on the last episode, out on the YouTube not live comments, we got a message from, I want
55:54 to make sure I give it the attribution, from Bahram, and said, we talked about, what is it?
56:00 T-Bump.
56:00 T-Bump.
56:01 That was it.
56:02 T-Bump for bumping the versions.
56:03 He said, oh, that's cool.
56:04 I use bump to version, which is another option to do some similar types of things.
56:08 I could work with or without source control, all kinds of stuff.
56:13 So, fun one to check out.
56:14 And, Brian, you sound really good this time.
56:18 Like, last time I thought maybe a bee had gotten into your microphone.
56:20 What was the story of that?
56:23 It's a long story.
56:24 Basically, I had to throw a mic.
56:26 So, I had a bad mic and a bad cable.
56:29 But I have a new XLR cable.
56:30 It's tough when the two things that are connected together are both broken at the same time.
56:34 The buzzing, I think, was definitely my cable.
56:36 I think there was a feedback thing going on.
56:38 Were you getting an SMS?
56:39 And then I was examining everything in my audio chain and just got rid of the stuff that wasn't
56:49 working.
56:50 Yeah.
56:50 You sound great.
56:51 New mics, even better than before.
56:53 So, like a phoenix, you're back.
56:54 Nice image, too.
56:57 Yeah.
56:57 And then, have you got your Mac Pro yet?
57:00 No, I just bought a Mac a couple years ago.
57:02 I'm not going to buy another one right now.
57:04 Anthony, are you using one of these to test your own version?
57:06 No.
57:07 I don't have a spare $4,000 for another laptop.
57:12 And also, I was like, I don't really need a laptop because I never leave the house.
57:15 So, like.
57:16 Yeah, that is a big problem.
57:18 I mean, I am so loving my Mac Mini and my 4K monitor that I'm just like, I don't want
57:23 to leave.
57:24 I don't want to leave.
57:24 All right.
57:24 Well, that's it for the extras.
57:26 I think it's time for a joke.
57:27 Yeah.
57:28 Maybe Robert's got the first one out there.
57:29 Can't complain about Brian.
57:31 It's all about the hair.
57:32 You got to see the live stream for that one.
57:33 But yeah, I agree with that.
57:35 Next Halloween, I want to go as cousin it.
57:38 So, I got a ways to go.
57:39 Anthony, are you up for doing this joke?
57:41 Yeah.
57:41 Yeah.
57:42 I got it on the, it's got it on my screen.
57:45 Oh, you got it on yours?
57:45 Yeah.
57:46 I'll put yours.
57:47 All right.
57:47 Okay.
57:48 Okay.
57:48 So, I got it.
57:50 It's a picture.
57:51 So, I'll have to describe it.
57:52 I couldn't stop laughing at this when I saw it.
57:54 So, this is Frodo explaining to Gollum.
57:56 And there's Gollum sitting at a computer looking quite confused, looking at a picture of the
58:02 ring.
58:03 And it says, buy now one ETH.
58:05 As in Ethereum, right?
58:07 Yeah.
58:08 Yeah.
58:08 As in Ethereum.
58:09 And Frodo is basically trying to convince Gollum to buy an NFT of the ring instead of actually
58:14 having the ring.
58:15 And underneath.
58:16 My digital precious.
58:18 So, underneath it says, so you can't own the precious physically, but you can pay to have
58:25 your name listed as its owner in an online distributed database.
58:31 It's only, what is that, like 400 US dollars, 500 Australian, something like that.
58:36 I don't know.
58:36 That's a lot for a listing.
58:38 I don't own any NFTs yet, nor have I sold any.
58:42 I don't plan to either.
58:43 Man, I feel like we're missing an opportunity to brand some of our former episodes.
58:51 Maybe like, I could just take screenshots of Brian laughing at different times out of the
58:56 live stream and then like turn it into a stream of NFTs that we'll retire upon.
59:00 Oh yeah.
59:01 Let's, let's do that.
59:02 Yeah.
59:04 Oh, fantastic.
59:06 All right.
59:06 Oh, that was a good one.
59:07 Thanks, Anthony.
59:08 And thanks for being here on this big episode 256.
59:12 Yeah.
59:13 I feel like we've maybe gone slightly over to this.
59:15 This is not really a Python bite this week.
59:17 It's more of a Python lunch.
59:19 Sandwich.
59:20 Yeah.
59:21 Yeah.
59:22 It's a proper meal, a Python dinner, but it was a good one.
59:24 We talked about a lot of stuff and a bunch of great people in the audience gave us like
59:27 really good inside information on where things are going.
59:30 So.
59:30 Yeah.
59:31 So thanks everyone.
59:32 It's everyone.
59:32 Yeah.
59:32 Thanks Brian.
59:33 Yeah.
59:33 All right.
59:34 Bye y'all.