Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #318: GIL, How We Will Miss You

Return to episode page view on github
Recorded on Tuesday, Jan 10, 2023.

00:00 - Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:06 This is episode 318, recorded January 10th, 2023.

00:11 I'm Michael Kennedy.

00:12 - And I'm Brian Okken.

00:13 - And this episode is brought to you by Microsoft for Startups Founders Hub.

00:17 Thanks to Microsoft for again supporting the show.

00:20 And Brian, I just want to let people know real quick at the beginning here that they should join us here on YouTube.

00:25 Like right now, live if they want.

00:27 They could go to pythonbytes.fm/stream/live, or just go to the website and click live stream at the top.

00:33 We typically record on Tuesdays at 11 a.m. at Pacific time.

00:37 And you can also see the older video versions, people want to find them there.

00:41 So, it's always nice to have people in the audience.

00:43 - And we also put information in there about future episodes.

00:47 So if for some reason it changes, we keep that up to--

00:49 - Yeah, exactly.

00:50 (laughing)

00:51 Usually what I'll do is I'll just schedule whatever time we're gonna record a week in advance and YouTube will notify you if you smash the bell, you know, that sort of thing.

00:59 - Smash the bell, yeah.

01:01 - What do you got to kick us off with today?

01:02 - Well, I wanna start with something like right out of the presses.

01:06 So we, PEP 703, this was suggested by Will Shanks and the author is Sam Gross and it really was, the PEP was created just yesterday, January 9th, or at least, yeah, so that's pretty cool.

01:22 So very-- - Still has that new PEP smell.

01:24 - Yeah, it has that new PEP smell.

01:26 And also one of the things that the PEP thing, peps.python.org has a dark mode and light mode thing.

01:37 I didn't know that, I was playing with that today.

01:40 Anyway, so the PEP 703 is making the GIL optional in CPython.

01:46 I knew that there was talk about this, I heard Guido talking about it, possibly going in 3.12, but I didn't know if it really was.

01:55 And it does, I mean, it's still in draft stage, so it's not promised yet, but it's targeting 3.12, which is the one that's being worked on right now.

02:04 It's pretty exciting.

02:05 - Yeah, a couple things that jump out from reading just the title.

02:09 Optional, not removal.

02:11 - Yeah.

02:11 - Okay, that's interesting.

02:13 I have, like you said, it's still brand new, so I haven't got a chance to research this a lot yet to understand the nuances of what that is.

02:20 But a lot of the prior talk, we had the galactomy and other things like that.

02:26 Eric Snow's sub-interpreters, all of those were about how do we remove the gill or effectively remove it.

02:33 This is like, well, maybe.

02:35 >> Not really. It is not really optionally selectable while you're running.

02:40 The option is a compile-time flag.

02:43 We probably should link to that really long interview with Guido.

02:50 But there's an interview with Guido van Rossum that in it he talks about some of the GIL challenges.

02:57 It's an interesting bit of conversation.

02:59 Anyway, so there's a flag, a --without-gil flag that's going to be added for compiling CPython.

03:07 When I first heard this, I'm like, well, I don't really want to compile CPython.

03:13 I mean, I could, but I'm not that kind of guy that likes to do that in their free time.

03:18 So we have good news, I'll share that with you later.

03:21 But the idea around this is, and there's a lot of interest because there's a lot more scientific computing and machine learning and all this sort of stuff that's running on Python now that wasn't before or just I don't know what it was doing before.

03:38 But there's a lot of interest in this.

03:40 And scientific computing especially has a lot of concurrency that you can speed things up dramatically if you've got like these huge vectors that you can all compute at the same time.

03:52 So there's ways around it.

03:54 We have some really fast libraries that can do this, but these are like engineering feats that people have to do to make this all work, and they're usually in C API extensions and whatnot.

04:05 So some of the motivation is that there's a lot of obstacles for concurrency because the GIL is in place.

04:13 So what do we do? I'm going to jump to the distribution part, which I'm pretty excited about.

04:20 Distribution. The distribution is going to be easier than I thought.

04:25 I thought people are going to have to build it themselves.

04:28 It doesn't look like that's the case.

04:30 It looks like Sam is going to work with Anaconda to distribute a without-gill version of Python together with compatible packages.

04:40 This will take time. One of the things that is going to be important is to get this out is like quickly so that people can start building packages.

04:49 Because in one of the reasons why I'm glad this is like almost a different distribution.

04:54 I know this is going to be a lot of work, but people can't really use it until the packages that allow them to use it, are there, straight Python.

05:05 >> The C layer might, if you're integrating with C or something, it might assume that there's a gill and not the safety it needs to do or something.

05:13 Right. And even if there's no changes that have to be made, they're going to be, these packages are going to have to be recompiled.

05:21 But there probably are changes they have to make, but they're trying to keep it to a minimum.

05:25 But anyway, they'll at least have to get recompiled, and they'll be not binary compatible with both versions of Python.

05:31 So we'll have this two Python world for a little bit.

05:34 But it's really targeted, and I think going through Anaconda is a good way to do it.

05:38 it's targeted to people developing these C API extensions so that they can start developing it.

05:45 That's pretty neat.

05:47 This collection of packages that already support the GIL lists Python will grow over time.

05:55 I'm okay with having that be coordinated through Nandicond that seems reasonable.

06:00 >> Yeah.

06:01 >> One of the things I loved about this article is it talked about some of the challenges.

06:05 I'm zooming really fast, apologies for people watching the video.

06:08 But there's a lot of discussion around the motivation of all the, a lot of the difficulties of different types of parallelism that you are hard to express with the GIL in place.

06:19 And it's just an interesting, this part's an interesting read.

06:23 There's effects on Python library usability.

06:28 There's effects, you want to be able to GPU heavy workloads require multi-core processing to coordinate the whole thing together.

06:35 There's a lot of stuff that we've done engineering-wise to work around the gill.

06:41 And it's kind of exciting that this is-- I didn't think-- actually didn't see this happening this quickly.

06:47 So this is pretty exciting.

06:48 >> Yeah, this came out of the blue for me too.

06:50 >> The-- one of the things that the discussion-- oh, cool, I found it.

06:55 The-- what's going to change?

06:57 So I had this surprise to me-- the surprise to me was that the-- there's supposedly going going to be relatively few changes to the public Python and C APIs.

07:07 So this isn't like moving from Python 2 to Python 3, you have to rewrite your Python code.

07:13 Hopefully you won't have to change your Python code at all.

07:15 It's going to be some of these extensions.

07:17 And these are, I mean, like the people writing NumPy and things like that, pandas, they're probably going to have to do some changes and Pillow and, you know, like PyTorch and things like that.

07:32 they really care about this and they're going to be working with it.

07:34 But they're the ones that didn't want the gill there in the first place.

07:38 So I think they're motivated to make these changes.

07:40 It's pretty exciting.

07:41 But okay, so what is changing?

07:43 And a lot of the internals of CPython.

07:45 So there's, and I think this is a fascinating thing just as a, like a computer science discussion of this is a big problem, what are the problems?

07:54 Well, there's, and how do we, what are the changes to solve it?

07:57 And there's reference counting and memory management, container thread safety, like if you've got multiple threads using the same list, how do you deal with that?

08:06 Locking and atomic APIs.

08:08 And there's a great discussion in here on all those.

08:11 So I really loved this just as a refresher of some of these CS topics and how they're still relevant in today's programming.

08:18 So it's pretty cool.

08:19 - Yeah, yeah, the container one's pretty interesting, especially with Python's extreme dependency upon dictionaries - Yes.

08:28 - Even being like the foundation of classes and stuff.

08:31 The reference counting is the one that's always been held out as a holdup, right?

08:35 Like, well, we have reference counting and that can be so fast because we don't have to do any locking or any thread safety around it.

08:42 As soon as you remove the gill, all that stuff goes out the window.

08:46 It talks about a couple of building on one of the things that was done previously, which is pretty interesting.

08:52 You know, Sam Gross behind this and a bunch of other folks have just put together a whole host.

08:57 You know, a lot of this comes out of Cinder, I believe at Meta, there's a lot of small building blocks.

09:03 This is not just like, well, here's the change.

09:05 One of the things that I saw in the reference counting section is immortalizing objects.

09:14 >> Oh, yeah.

09:14 >> One of the things was, can we make it so they basically, we're pretty sure that we don't want to ever remove these.

09:21 We're just going to take them out of the reference counting checks and just assume that they're going to be here for the life of the program.

09:28 >> Yeah.

09:29 just for performance and memory caching and all that kind of stuff.

09:33 However, you also don't have to lock something that you're not incrementing and decrementing because you've decided not ever to do that.

09:40 So there's some interesting piling on effects and also it was talking about, I don't remember the word, but something about a certain lock-free thread safe type of way to do the increment for the reference counting.

09:55 >> I mean, I was familiar with just like brute force reference counting, of course, it's a common way to deal with shared objects.

10:02 But one of the things I loved about this is the discussion around biased reference counting and deferred reference counting.

10:09 The notion that statistically looking at how multi-threaded applications work, most objects are only accessed by one thread.

10:23 There's not that many objects that are shared.

10:25 So having each object having a thread owner and the process for what reference counting is for the owner is different than the process for the non-thread owner people accessing the object.

10:42 And all of this is hopefully invisible to the people using it.

10:47 I mean, clearly at some point we're going to have to have some way in Python to be able to utilize this.

10:55 It can't be invisible forever.

10:58 So it'll be interesting.

11:00 - Yeah, the bias reference counting, that's the word I was looking for.

11:02 That's pretty interesting.

11:04 Like the owner thread might not have to lock it.

11:06 It just does whatever and the others have to care.

11:10 - Well, and also a lot of this is around, I mean, we do reference counting, but partly because of the reference counting and how our object model is.

11:19 I mean, one of the things I was surprised by when I moved from C++ to Python or picked up Python with objects and everything is that like in C++ you totally know when the destructor happens.

11:30 But in Python we don't really talk about destructors too much. We have constructors, but we don't really put a ton of work into structures because you don't really know when it's going to really go away. And I think that's a good thing because now we can say it's actually going to be a little bit longer. You thought it was going to, you know, it probably would have disappeared earlier, but we're going to defer that and have a garbage collection phase where it also includes making sure that the threads are concurrency is saved and stuff like that.

11:58 So yeah, interesting.

12:00 >> It's a very fascinating read.

12:02 I just had a quick read of it this morning, but.

12:04 >> It looks very clever and I'm all for it.

12:07 I'm here for it.

12:08 Let's do this.

12:08 >> I don't want to like paint it too rosy and everybody paying attention to this knows that there is a performance hit for single threaded stuff.

12:17 So, and I thought it was going to be larger.

12:20 The reference in here talks about somewhere between a 5% and 10% performance hit.

12:26 But we've already seen these like massive gains in performance.

12:29 And the work on improving the performance of Python is going to continue.

12:35 So I'm personally optimistic.

12:36 I think that the gains in performance elsewhere are going to far outweigh the possible slowdown of single-threaded stuff.

12:46 I mean, a lot of people don't really care about 5% difference.

12:51 I mean, the code they're running, that's more simple.

12:54 It's probably not performance sensitive a lot of the times.

12:57 And when it is, you might be trying to squeeze even more performance out of it, right?

13:02 And, you know, my little mini here has eight cores.

13:05 Python only cares about one of them.

13:07 If I could use all eight or six or something, I could do way more than 5% better.

13:13 You know, so I could more than make up for that.

13:15 up for that if I actually leverage this feature.

13:17 - Yeah.

13:18 - And if I don't care about performance, plus or minus 5%, probably doesn't matter.

13:22 - Yeah, I don't, I don't, I don't, I think they have to bring it up because there's gonna be people saying, ah, but it's gonna be slower.

13:28 And so I'm glad that--

13:29 - Yeah, and that's also, that's always been the reason we still have the gill, is it's like, we like to make changes, but they make a con, the most common use case less good, so we're not doing it.

13:38 But maybe this is close enough, possible improvements, even down the road, so yeah.

13:43 Yeah, I'm just it's gonna be I'm excited to see how this how this pans out. So yeah, I'm excited as well They're very cool. I would say certainly the biggest News of the show is right here And we got some good jokes and stuff people can stick around for those. Yeah. Yeah stick around till the end Okay, what do you got for us next? All right. Well, I want to tell you about the ferret We heard a ferret DB have not like a mongoose, but it's not quite a I honestly if you showed me a mongoose and a ferret and said, which is which, I don't know if I could tell.

14:16 Maybe the ferret mongooses are more intense, I don't know, but ferrets are more pet-like.

14:20 They're pretty similar, right?

14:22 >> Is Mongo from mongoose?

14:24 >> No, it's from humongous.

14:26 But there are some frameworks in the JavaScript space called mongoose from the Node.js side.

14:33 Anyway, so ferretDB is this thing that I think someone told me about.

14:38 Let me see if I got some credit.

14:41 Yeah, this comes from John Bultmeier, and thanks for sending that in, and said, ran across this.

14:47 So FerretDB is pretty interesting.

14:50 We'll see where it goes.

14:50 It's a truly open source MongoDB alternative.

14:54 By the way, I'm going to accept the cookies.

14:57 You know, a cool way you don't have to have cookie policy pop-ups is not to track other people.

15:02 That's even better, but I'll go ahead and accept it for them.

15:06 Our site doesn't have any, does it, Brian?

15:08 'Cause we don't have third-party cookies.

15:09 So 5,000 GitHub stars already, that's pretty incredible.

15:14 And these folks are big fans of MongoDB and also really big fans of 100% true open source.

15:22 And that's why they decided to make this thing called FerretDB.

15:26 So here I'll read from their page a bit.

15:28 MongoDB is a life-changing technology for many developers, empowering them to build applications faster than using relational databases.

15:35 Yes, however, MongoDB abandoned its open source roots, changing the license to SSPL, making it unusable for many open source and commercial projects.

15:44 Now, MongoDB is still open source, but this is like, I'm pretty sure this license is basically you can't make our thing as a service and then sell it without us.

15:53 Like AWS had a MongoDB as a service, and Mongo's like, "Uh, hello, we didn't expect it "to be used in this way." So I don't think it's, I mean, it's not like a huge bash against Mongo, I don't really think.

16:07 But if you really wanted it to be unencumbered entirely, well, MongoDB is not it, right?

16:12 - Right.

16:13 - So here's the idea.

16:14 So FerretDB is built on top of PostgreSQL, but it is wire compatible with MongoDB.

16:22 That is, you can use the different libraries or drivers from different languages, you know, Python, JavaScript, .NET, whatever.

16:32 You should be able to just change the connection string over to the FerretDB, and off it goes.

16:37 And it exchanges the binary JSON encoding across the wire just like MongoDB does.

16:44 I'm guessing they're using the JSON column stuff in PostgreSQL to match.

16:51 Couldn't imagine they're trying to do a relational thing over there.

16:54 They're probably just like stashing the blobs.

16:56 But yeah, it's pretty neat.

16:58 What do you think?

16:59 - That's actually, the architecture of that sounds great for an open source project to not try to do the entire database backend, but built on top of Postgres.

17:09 - Yeah, I mean, there's EdgeDB, right, which is quite popular in the Python space, and I believe they're doing basically the same thing.

17:17 Like build something, yeah, powered by Postgres under the hood.

17:20 Maybe just the query engine, I'm not sure if the database engine as well for the EdgeDB folks, I interviewed them, but still pretty neat, I can get ahead with the joke.

17:29 Yeah, so FerDB, formerly MangoDB, is an open source proxy that translates MongoDB wire protocol queries to SQL with Postgres as a Postgres SQL as the database engine.

17:40 - Mango DB, that's a little bit too close, I think.

17:43 - Yeah, a little bit.

17:44 Mango, yeah, that's maybe pushing it.

17:47 So yeah, you pretty much write the regular MongoDB code that you would write, but it apparently works.

17:53 Now somewhere, I don't know where the roadmap is.

17:57 Let's see.

17:58 They did a blog post, yeah, maybe that's where I should be looking.

18:00 And on the blog post, they have something about their roadmap.

18:04 I don't know, I'll link to it if I can find it.

18:06 But there's a FerretDB roadmap and there's one really notable thing that people are gonna need to be holding out for, and that's indexes.

18:16 - Oh, okay.

18:17 - And so if you don't have indexes, you have a real hard time doing fast database stuff.

18:24 So I think they said they're trying to get it kind of all finished up by the end of 2023.

18:29 So this is not like a, hey, you should just jump right on this and run with it.

18:34 Because I don't think it's far enough along.

18:37 It's written in Go for what that's worth.

18:40 MongoDB itself is written in C, so it's not like it makes it more or less friendly to Python folks.

18:45 So, oh, here's the public roadmap, perfect.

18:48 So it's all linked off their GitHub pages.

18:49 And so you can see the end of alpha is supposed to be in the past, and it does look like they're all done.

18:55 You can see their beta stuff they're working on.

18:57 But then for general availability, this index stuff that's supposed to come, actually I said 2023, this is supposed to be done in January 2023, which felt like a long time ago, not long ago, but that's actually now.

19:10 So I don't know how far along it is, but support for issues, for rather indexes, look at this issue here, I don't see a lot of traffic on it, but still it would be basically required, right?

19:22 If you've got many, many gigs of data, then you have to have indexes.

19:27 >> Right. However, the devil's advocate here, development work on a project that utilizes this can proceed before you get tons of users and stuff.

19:39 Knowing that it's coming soon, I guess.

19:42 >> Yeah, that's a good point.

19:43 >> If you trust it.

19:44 >> Yeah. Although because it's wire protocol, you could just run MongoDB and then flip it theoretically.

19:50 You don't have to. It's not like a complete new creation you've got to build upon.

19:54 It's meant to mirror something that exists.

19:56 So you could do that.

19:58 I think we've got like five, six, seven gigs of data in the database that backs Python bytes.

20:05 If you do queries against, give me the 20 things out of these millions and millions of records that match this, without an index, it's actually I think MongoDB may refuse to do it.

20:17 There are certain situations where it's like too much data, no index, not going to be able to answer that question.

20:24 So it might be really slow or it might actually error out and say, this you need to create an index.

20:29 So anyway, long story short, this is a big deal until this comes in.

20:33 I would not touch it in terms of I'm going to try to run on top of this.

20:37 >> Yeah.

20:38 >> But if that comes through, then you already have Postgres, but you want some document-like experience for part of your app or one of your apps, but you don't want to switch to Mongo, that would be pretty cool.

20:50 So one of the things notable in the menu bar of FerretDB is careers.

20:57 So this is intended to be something commercial at some point, unless they just feel like hiring people for the fun of it.

21:05 Yeah, that is interesting. Where are they going with it, right?

21:09 So I would imagine they have FerretDB as a service in mind out there, but you're right, it certainly has an ink and a...

21:20 I mean, that's not necessarily bad.

21:22 That's probably a good thing that there's money behind it.

21:24 But just interesting.

21:25 >> It is interesting. Yes, very interesting.

21:27 All right. Well, Feridibi, something I put out there for people to keep their eye on, not necessarily to jump on right away, but quite interesting.

21:36 >> Yeah.

21:36 >> Oh, by the way, we have a couple of excited folks out in the audience.

21:42 Gil Optional would be amazing, says Ciro.

21:45 I know that Ciro is working on some real high-performance web framework stuff.

21:49 So that would be cool.

21:50 And how about a Docker container pre-built with CPython with no Gil?

21:55 Pick your Docker container and run that one.

21:57 >>Sure, that'd be cool.

21:58 >>Yeah, that's not a bad idea.

21:59 >>Yeah.

22:00 >>And Seth out there says, "Good thing we invested in faster CPython earlier, so now we can roll it back a little." >>Yeah, I mean, kind of we knew that was coming, so that's one of the reasons for the speedups in 3.11 and planned for future, so.

22:13 >>Yeah, indeed.

22:14 All right, let's switch over to real quickly talk about our sponsor before we move on here.

22:20 As I said at the beginning, this episode's brought to you by Microsoft for Startups.

22:24 We just got an email, I don't know if you saw it, Brian, from somebody who signed up for the Microsoft for Startups program and said, "This is a really great," I was a little bit skeptical, but I signed up, "And this is a really great project, a really great service and offering for them." And that they actually, it's working really well.

22:39 So-- - That's great.

22:41 - Yeah, it was really good to hear.

22:42 So, you know, Microsoft knows that starting a business is hard, they wanna help support startups that can then later be customers of theirs, of course.

22:52 So they put together this Microsoft for Startups program to help them understand what startups need, to help them be more successful, and to create a digital platform to help them overcome those challenges.

23:03 And they call that Microsoft for Startups Founders Hub.

23:06 And it provides all founders at any stage with free resources to solve startup challenges, provides tech benefits, access to expert guidance, and skilling resources, mentorship, network connections, and much more.

23:19 It doesn't require the startups to be investor-backed or third-party validated.

23:22 You just apply.

23:23 Microsoft says it looks like you'd be a good fit for this program.

23:27 You're in.

23:27 And with that, you get access to a bunch of cloud resources, GitHub and Azure, Office 365, I think.

23:34 You also get access to open AI, which, you know, chat and GTP, pretty hopping these days and might be something cool to leverage.

23:42 And through Microsoft for Startup Founders Hub, coming at Founders also no longer about who you know, you have access to their mentorship network, which I think is one of the biggest values you probably get.

23:52 Talk to people about idea validation, fundraising, management coaching, sales and marketing, and all those things.

23:58 And you get a book one-on-one meetings with those mentors.

24:01 So make your idea a reality today with the critical support you'll get from Microsoft for Startups Founders Hub.

24:06 To join the program, just visit pythonbytes.fm/foundershub2022.

24:11 The link's in your show notes.

24:12 So if you're interested, give it a click.

24:14 - Yes.

24:15 - All right, over to you, Brian.

24:17 - Well, I wanna guess transition is difficult for me apparently right now, as are words.

24:26 Anyway, the next article I wanna talk about is four tips for structuring your research groups Python package.

24:33 So I think this is just a Python package, but research group, I think this is from David Aaron Nicholson And I think the idea around it is a lot of people with scientific computing and various things like that might not be, might be struggling with lots of Python code.

24:53 So they're putting it into subdirectories and stuff like that.

24:58 So this is talking about packages in that sense of, it's a directory with a dunder init and you can reference it by importing it through normal import, the import mechanism.

25:09 It's not about packaging for like PyPI or something like that.

25:13 It's still some really great information.

25:15 So the four tips are, one, give your packages and modules terse single-word names whenever possible.

25:23 There's some great examples of what not to do later.

25:26 Number two, import modules internally instead of importing everything from modules.

25:32 Make use of sub-packages.

25:34 The last one is prefer modules with specific names instead of things like utils, helpers, and support.

25:42 This is everyone struggling with this, including me even though I've been preaching this for a long time.

25:48 >> It's hard.

25:49 >> There's some great examples of what not to do.

25:53 What was this? Give your modules terse single word names whenever possible.

25:58 I guess there's a couple of examples of what not to do.

26:00 There's a really long directory name called Electromyography Toolkit.

26:07 Yeah, that's a bit long.

26:08 Then prefixing everything with EMG afterwards within it.

26:13 Yeah, don't do that. You don't need to.

26:15 Just some great examples of better versions.

26:18 >> It already has the top-level part of the package as the namespace.

26:23 >> Yeah.

26:24 >> If you want to be explicit, just package.sub package.

26:28 >> Talking about what it looks like when you're importing it, is different. So I'm going to scroll down of like, importing stuff.

26:37 I guess I'll just drop to one.

26:40 A better thing would be like EMG toolkit.

26:43 And I would say even like, is toolkit really adding any information?

26:47 Maybe just EMG or something.

26:49 and then having instead of having like solvers and a whole bunch of, prefixes, just put solvers in a directory name and then put the types of solvers underneath.

26:59 You don't have to have, EMGs under everything or, Yeah, MG and brute force solver and a star solver and all that.

27:08 It's just solvers dot a star.

27:09 So yeah, brute force or something, right?

27:11 Yeah, right.

27:12 And I'd argue that you could even just probably drop the toolkit and it would be Mg dot solvers dot brute force.

27:17 It'd be a better name.

27:18 But, I think so.

27:21 I'm not going to go through this this entire thing, but import modules is something I've seen a lot of people do like from package solver import and then list all the things that they're importing.

27:32 I've been guilty of this to doing this before also, especially if I'm only importing one.

27:39 One of the things that people will do this for is because the entire name is too long, well then make the name shorter.

27:47 Instead of doing that, just import the package solver and then you dot reference everything else.

27:53 >> Right.

27:54 >> Or do what the data scientists do, if you don't control the name, import numpy as np.

28:00 >> Yeah.

28:01 and then np.

28:02 You can shorten the name for you, even if you can't shorten it for others at the source.

28:07 - Right, so one of the reminders is you can do from, if you're in the same directory, you can do from.importsolvers, and then you can reference like solvers, entropy solver, and things like that.

28:18 Anyway, some great, even discussion of sub-packages.

28:23 And this is something that I always forget that is difficult.

28:27 It's a mind shift to say, oh, I'm gonna throw things into a directory and then have a package, but you can do that again.

28:33 It can keep going down and some people forget to do that.

28:38 So that references that as well.

28:40 So it's good.

28:41 You can have packages inside of packages inside of packages.

28:43 - Nice.

28:44 I think Robert out in the audience, that's a great recommendation to simplify the code we got to write.

28:50 - Yeah.

28:51 - Just how about we just extend it a little bit from star import star and like you just have access to everything.

28:55 There's sure the startup time is 10 minutes, but it's fine.

28:58 (laughing)

29:00 - Yes.

29:01 - And then Pamphleroy is reminding us that, you know, one of the Zen of Pythons is about these namespaces.

29:07 - Yeah, and I think it's just, also be nice to people.

29:10 Just, you know, people trying to write their code in Python, they're not doing weird stuff because they wanna do weird stuff.

29:17 They just don't know what the normal way to do it is.

29:20 So gentle reminders like this post are good.

29:22 - Indeed.

29:23 - What you got for us next?

29:25 - I don't wanna really quibble about it, but let's talk about it anyway.

29:28 Quibbler.

29:30 So Quibbler actually is interesting, keeping with the data science theme.

29:34 So this one here is a way to take Matplotlib and make it more interactive.

29:41 So you probably know Matplotlib will make a nice, like printable, publishable, high quality image, but they're generally not as interactive as like Bokeh, some of these other frameworks.

29:53 So Quibbler is like your data, but interactive.

29:57 Let me just play a little video for you here, and I'll just describe it, but this way you'll kind of know what this is about if you haven't checked this out.

30:03 So the idea is you could go and plot something with matplotlib, and you have some variable you would like to make interactive.

30:10 You just wrap it in an iquib, and all of a sudden the entire UI becomes completely interactive, which is insane.

30:19 Here's a triangle with squares around each, based off each of the edge of the triangle.

30:26 Then if you just make the numbers, the inputs, this iQuib type, then all of a sudden you can drag them around and interact with them, and even works on cells and zooms and other pictures. What do you think?

30:39 >> This is amazing.

30:40 Also amazing use of video to show people how easy it is to switch.

30:44 >> Yes. Thank you for doing that.

30:46 Thank you for doing that, people.

30:48 But yeah, this is a super cool project.

30:50 I don't have a ton to say about it actually, but if you're working with Matplotlib already, it'd be really nice is if we could move some of these things around and create interactive graphics a little bit more than just wrapping the independent variables in iquib interactive bits and it turns the whole graph into something that's pretty excellent.

31:12 I think this is, it looks great.

31:15 I don't see why you wouldn't want to use it.

31:17 >> Yeah, that looks fun.

31:19 >> Yeah.

31:19 >> Cool.

31:19 >> Someone in the audience loves Quib, so they must have experience with it as well.

31:24 If you're doing Matplotlib and you want to make it more interactive, check this out.

31:28 >> Awesome.

31:29 >> It's all of our items, isn't it, Brian?

31:30 Even though somehow I seem to have a screen full of tabs, so I don't know how that works.

31:34 >> Yeah. You've got some interesting Python related stuff.

31:37 I thought I would go with the tradition of Python and say, and now for something completely different, I just ran across an article that I thought I'd share.

31:47 just quickly, I'm not going to talk about it a lot.

31:49 But there was an article in Washington Post about how turtle moms talk to their eggs before they hatch. And I just thought it was a fascinating read.

31:58 Plus, it's got pictures of turtles.

32:00 So turtles are awesome.

32:02 I wasn't going to talk about it too much, but one of the things I thought was really cool was somebody went out and thought, oh, we don't we there's the turtle moms hang out in the rivers or somewhere near the, the, the, the, the hatch, the eggs on the sand and they just wait for him or something.

32:19 Well, are they talking?

32:21 It probably not, but they went out and recorded anyway.

32:23 And it's lower frequencies, frequencies that we don't normally hear.

32:28 And, that's also slower timeframes.

32:31 Like a conversation can be like hours for reply.

32:35 So it takes a while to go back.

32:38 And then also like some of the eggs talk to each other before they They can talk to each other to help possibly coordinate when to hatch, because if there's predators around, more of them will survive if they all hatch at the same time.

32:52 So anyway, just cool article.

32:53 Check it out if you guys want to look at turtles.

32:55 - Yeah, science is neat, isn't it?

32:57 - Yeah.

32:58 - Yeah, that's really cool.

32:59 So kind of not one of my extras, but I'll go through this in.

33:03 The next coming Talk Python episode is around the story of imaging black holes with Dr.

33:11 Sarah Eisen.

33:12 Yeah.

33:13 So, that's going to be really, really awesome.

33:16 And then there's a good chance, not a 100% chance, but a good chance that I also will have a science show on the Fusion National Ignition Breakthrough with Python as well coming up.

33:29 So, very cool.

33:30 Very cool stuff.

33:31 >> Very neat.

33:32 so many cool people through that.

33:33 That's neat.

33:34 >> I know. I would never get to talk to these people.

33:37 Like, "Hey, I have a podcast.

33:38 Let's talk about it." Amazing.

33:40 >> Awesome. Let's see your extras.

33:42 >> Yeah, let's see my extras.

33:44 I published the thing on RSS a little while ago, and talked a lot about RSS.

33:51 I have more RSS stuff because I said Reeder, R-E-E-D-E-R, is a really cool thing, but it's Mac only.

33:59 Other people are like, "Hey, guess what else I use?

34:01 This is neat.

34:02 So there's a fresh RSS, which is like your own hosted RSS web app.

34:07 I think it also does some read later type of things.

34:10 Feedly, I knew about Feedly, but I thought it was just, I don't know, just some sort of web app type of thing.

34:16 But apparently it has like a cool AI engine to help kind of recommend if you get like overwhelmed with all the stuff you subscribe to, you're like, well, now I can't read it.

34:24 It's just insane.

34:25 You know, it has a kind of a, your own personal algorithmic feed, which is, I know algorithmic feeds often get a bad name, but there are benefits too, you know?

34:33 - Yeah.

34:34 - Have you used Feedly lately?

34:34 I have not.

34:35 - I've been using it for years, so I didn't know about the AI bit, but yeah, I use it a lot.

34:41 - Yeah, I thought that was the one you had said you were using, so.

34:44 But yeah, the AI engine sounds at least interesting.

34:47 Flim on Android, people care about that.

34:51 And Readwise we talked about, but I've been playing the Readwise, and it continues to be interesting.

34:55 - Cool.

34:56 - Not only, when I first thought about, Oh, RSS and maybe read later, but you can throw in like EPUB books, you can do YouTube videos and it'll let you annotate the transcripts that it makes and it's pretty wild.

35:09 - Wow.

35:11 - And then, okay, going for more RSS here is just published all the Talk Python courses as an RSS feed.

35:19 So if you wanna subscribe to that, then soon as we publish a new Talk Python Training course, If we go down here, there's a pytest one somewhere.

35:28 Getting started with pytest.

35:30 That came out a couple months ago.

35:31 So people, if they're subscribed to the RSS feed, another one comes out, they'll get it straight away.

35:36 It's cool, right?

35:37 >> That is neat.

35:37 >> Yeah. RSS and more of the things.

35:39 Over at Talk Python, the podcast, not the courses.

35:42 We're talking about this right before the show.

35:44 I did a ton of stuff for helping people find, when was a particular person a guest on the show?

35:51 When were they on the show?

35:52 If they're on one episode, What other episodes do they do?

35:56 So here's a great huge list of tons of people who have been guests on the show.

36:02 And Brian, who's in number one right now?

36:04 - I am with Brett as a close second.

36:07 - A close second, yeah.

36:08 So Brian's been on 10 times.

36:10 Brett Cannon, nine.

36:11 Anthony Shaw, nine.

36:13 Dan Bader, six.

36:14 Lucas Schlinga, five.

36:16 Cecil, down there at five.

36:18 That's Cecil Philip as well.

36:19 Anyway, this is a new resource on the podcast.

36:22 So go, if you want to explore the data for the last seven years in a slightly different way, people can check that out.

36:28 And congrats, Brian, for leading the pack there.

36:30 - Yes.

36:31 - And last, I talked about how to do traveling around, just taking an iPad and still doing development work.

36:39 And we talked about prompt and all those things.

36:40 So I basically wrote up an article on that discussion I had there.

36:44 So I'll link to that.

36:45 People can check that out if they want to.

36:47 So there's the written, more formal version called Dev on the Road on my website.

36:53 - Cool.

36:54 - All right, ready for a joke?

36:57 By the way, Robert out there is suggesting that we might need to update your photo.

37:01 Now you got your cool hair, we might need to update you on that guest list there.

37:05 - I probably should.

37:06 - That was a seven year old photo or something, you know, that's from when you were on the show the first time, maybe six years ago.

37:11 - No, I really do look like that other photo.

37:13 What you're seeing right now is an AI generated bot.

37:15 - Yeah, this is like a, actually, Brian hasn't been here for a few years.

37:20 This is a deep fake and I invented him.

37:22 No, just kidding.

37:23 All right.

37:24 Speaking of jokes.

37:25 >>Brian is still embroiled in a lawsuit to try to get this to stop.

37:31 >>The real Brian will never defeat the AI.

37:34 Okay.

37:36 So I thought of you actually, Brian, when I saw this one.

37:40 This is on Program and Humor.

37:42 And it says it has this dog looking thing, kind of very deep in thought, projected to the sky for reasons I don't understand, but it says, am I testing this program or is it testing me?

37:56 I know I suspect a lot of people can, can relate to having that go both ways.

38:00 Deep thoughts, deep thoughts.

38:02 And we've got a name for the AI.

38:04 It's called Brian GPT.

38:05 All right.

38:06 I know you got a joke as well for us, maybe more involved than the floating dog.

38:12 Okay.

38:13 I can't remember where I got this, but, every cloud architecture, it's just, I don't I don't know, it's an image with some stuff that I really, there's a lot, I'm not gonna cover everything, but one of my favorite bits of this is the managed services, the mismanaged services, and the unmanageable services.

38:31 - They're held together by duct tape and some kind of super glue. - Gum or something.

38:35 - Yeah, gum.

38:36 - Containers everywhere.

38:37 I do like the cool databases that drive resumes and the real database that's actually doing all the actual work.

38:47 of plumbing, there's a huge bunch of plumbing around it.

38:50 It just has the data engineers got very excited here.

38:53 - Yeah.

38:54 - It empties into a data lake.

38:55 - The witch also drips into a data swamp and there's a blame radius services that stop stuff.

39:02 There's one tiny cron job that keeps everything from falling apart.

39:06 It's good VPN of sadness.

39:08 - And of course it's all backed by the fricking slick reverse proxy.

39:15 >> Yeah. This is found on Good Tech Things, which actually has a whole bunch of cool funny images.

39:23 I might steal some more of these from you.

39:25 >> We might hear from Good Tech Things again.

39:27 This is pretty awesome.

39:28 >> All right. Was that everything for us?

39:31 >> That is. That is all of it.

39:33 >> Nice.

39:34 >> Thank you everyone for listening.

39:35 Brian, thanks as always.

39:37 >> Bye.

Back to show page