WEBVTT

00:00:00.040 --> 00:00:04.740
<v Brian Okken>Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:00:05.140 --> 00:00:09.760
<v Brian Okken>This is episode 455, recorded October 27th, 2025.

00:00:10.480 --> 00:00:11.380
<v Brian Okken>And I'm Brian Okken.

00:00:11.660 --> 00:00:12.220
<v Brian Okken>I'm Michael Kennedy.

00:00:13.020 --> 00:00:16.680
<v Brian Okken>And this episode is sponsored by the wonderful people at Python Bytes.

00:00:17.240 --> 00:00:19.960
<v Brian Okken>Actually, both and everybody here.

00:00:20.500 --> 00:00:25.840
<v Brian Okken>So please check out the work we do for a little bit of money.

00:00:26.020 --> 00:00:29.320
<v Brian Okken>We've got Talk Python training with tons of wonderful courses.

00:00:29.720 --> 00:00:32.119
<v Brian Okken>And his new book, of course, Michael's new book.

00:00:32.980 --> 00:00:38.080
<v Brian Okken>And then also, if you want to check out pytest, there's the complete pytest course.

00:00:38.240 --> 00:00:41.180
<v Brian Okken>Or you can take the pytest course at Talk Python Training.

00:00:41.860 --> 00:00:44.500
<v Brian Okken>And as always, thank you to our Patreon supporters.

00:00:45.180 --> 00:00:45.820
<v Brian Okken>You guys rock.

00:00:47.140 --> 00:00:50.240
<v Brian Okken>We don't shout you out all the time, but we always appreciate you.

00:00:50.940 --> 00:00:56.720
<v Brian Okken>If you'd like to submit a topic idea or some feedback for us or just say hi,

00:00:57.240 --> 00:01:00.740
<v Brian Okken>Check out the show notes at pythonbytes.fm.

00:01:00.960 --> 00:01:04.019
<v Brian Okken>There's links to our socials.

00:01:04.180 --> 00:01:10.320
<v Brian Okken>We've got the show, and both Michael and I are on Bluesky and Fosstodon,

00:01:10.620 --> 00:01:13.380
<v Brian Okken>but that's really Mastodon, so wherever you're at there.

00:01:14.080 --> 00:01:15.940
<v Brian Okken>If you're listening to this and you're like,

00:01:16.050 --> 00:01:18.480
<v Brian Okken>what, sounds like they're recording live somewhere.

00:01:18.690 --> 00:01:19.340
<v Brian Okken>We can see it.

00:01:19.560 --> 00:01:22.080
<v Brian Okken>Yes, we are recording and streaming,

00:01:22.120 --> 00:01:27.920
<v Brian Okken>but you can watch all the back episodes or participate in the chat if you want to.

00:01:28.280 --> 00:01:34.480
<v Brian Okken>Check out pythonbytes.fm/live with all the details there and a link to when we're going to record next.

00:01:36.960 --> 00:01:39.080
<v Brian Okken>Before we get started, one last thing.

00:01:39.840 --> 00:01:43.980
<v Brian Okken>We do send out a newsletter that's getting better and better as we go along,

00:01:44.320 --> 00:01:47.360
<v Brian Okken>thanks to both Michael and I working on it a little bit.

00:01:47.640 --> 00:01:50.560
<v Brian Okken>So there's a newsletter we send out with all the links.

00:01:51.130 --> 00:01:52.580
<v Brian Okken>So you don't have to take notes.

00:01:53.200 --> 00:01:54.440
<v Brian Okken>We'll send you out an email.

00:01:55.070 --> 00:02:00.480
<v Brian Okken>So sign up for the newsletter and we'll send you those links and extra details too.

00:02:00.760 --> 00:02:01.740
<v Brian Okken>It's a great resource.

00:02:02.670 --> 00:02:04.300
<v Brian Okken>Yeah, I think people really appreciate it, Brian.

00:02:04.640 --> 00:02:09.780
<v Michael Kennedy>You know, if you look at when you send out the email and then book back in the campaign

00:02:09.979 --> 00:02:13.560
<v Michael Kennedy>and how many people actually open to the thing that we send out or click on it,

00:02:13.760 --> 00:02:16.180
<v Michael Kennedy>those are really close to 100%, which is ridiculous.

00:02:16.200 --> 00:02:20.000
<v Michael Kennedy>So that's a really good sign that other people might also like it.

00:02:20.120 --> 00:02:22.980
<v Brian Okken>Yeah, I think that people are using it in place of taking notes.

00:02:23.240 --> 00:02:26.660
<v Brian Okken>And also, if you're in a car or something, you don't want to try to remember.

00:02:26.860 --> 00:02:27.480
<v Brian Okken>You don't have to.

00:02:27.760 --> 00:02:28.880
<v Brian Okken>So awesome.

00:02:29.480 --> 00:02:32.880
<v Brian Okken>All right, Michael, what do you got for us right away?

00:02:33.220 --> 00:02:35.900
<v Michael Kennedy>Well, let me see what I can do here.

00:02:37.160 --> 00:02:39.020
<v Michael Kennedy>Let's see what the Cyclops says.

00:02:39.800 --> 00:02:40.460
<v Michael Kennedy>A Cyclops.

00:02:40.880 --> 00:02:43.620
<v Michael Kennedy>It's like a little programming kitty, but it's a Cyclops.

00:02:43.880 --> 00:02:44.160
<v Michael Kennedy>It's a cute.

00:02:44.260 --> 00:02:45.780
<v Brian Okken>Like Opt, O-P-T.

00:02:46.620 --> 00:02:47.660
<v Brian Okken>operations cycle.

00:02:48.780 --> 00:02:49.620
<v Michael Kennedy>I get it.

00:02:49.760 --> 00:02:51.200
<v Michael Kennedy>So we've heard of Click.

00:02:51.820 --> 00:02:53.940
<v Michael Kennedy>You and I were both just actually singing

00:02:54.030 --> 00:02:55.400
<v Michael Kennedy>the praises of ArgPars,

00:02:55.980 --> 00:02:57.020
<v Michael Kennedy>which is pretty interesting.

00:02:57.460 --> 00:02:59.660
<v Michael Kennedy>I am such a fan of ArgPars these days

00:02:59.980 --> 00:03:01.800
<v Michael Kennedy>because it's just built in and it's

00:03:02.020 --> 00:03:02.860
<v Michael Kennedy>simple and it's good enough.

00:03:04.180 --> 00:03:05.680
<v Michael Kennedy>If you were building

00:03:05.880 --> 00:03:07.680
<v Michael Kennedy>something where the CLI

00:03:08.340 --> 00:03:09.440
<v Michael Kennedy>API or interface

00:03:09.820 --> 00:03:11.860
<v Michael Kennedy>or dev user experience was super

00:03:12.040 --> 00:03:13.560
<v Michael Kennedy>important, you might choose something

00:03:13.770 --> 00:03:14.700
<v Michael Kennedy>other than ArgPars.

00:03:15.120 --> 00:03:16.140
<v Michael Kennedy>So what are your options?

00:03:16.480 --> 00:03:19.300
<v Michael Kennedy>You could choose Click, you could choose Typer.

00:03:19.720 --> 00:03:23.460
<v Michael Kennedy>Typer is actually built on Click, so in a sense it's like Starlette and FastAPI.

00:03:23.540 --> 00:03:25.500
<v Michael Kennedy>You choose one, you get the other in a sense.

00:03:25.920 --> 00:03:27.760
<v Michael Kennedy>So there's a blend there, and there's others.

00:03:27.960 --> 00:03:31.140
<v Michael Kennedy>I know there's a bunch of different CLI building options.

00:03:31.660 --> 00:03:36.640
<v Michael Kennedy>But the Cyclops is one that sort of has the second mover advantage over Typer.

00:03:37.020 --> 00:03:40.660
<v Michael Kennedy>And their sort of tagline, I don't remember where I saw it, but

00:03:40.860 --> 00:03:43.700
<v Michael Kennedy>somewhere in here, it's not actually right here on this page.

00:03:44.080 --> 00:03:48.020
<v Michael Kennedy>but no shade at typer, but it says what you thought typer was going to be.

00:03:48.420 --> 00:03:50.600
<v Michael Kennedy>And my second boomer advantage is like, all right,

00:03:51.060 --> 00:03:55.160
<v Michael Kennedy>we've seen different interface things built based around type information.

00:03:55.660 --> 00:03:58.340
<v Michael Kennedy>And now that we've seen the pluses and the minuses,

00:03:58.340 --> 00:04:02.460
<v Michael Kennedy>could we do a slightly different version that has more pluses and fewer minuses?

00:04:02.640 --> 00:04:05.340
<v Michael Kennedy>And so there's a whole page of the typer comparison here.

00:04:05.740 --> 00:04:08.860
<v Michael Kennedy>And I'm not a super expert on typer.

00:04:09.240 --> 00:04:12.380
<v Michael Kennedy>My CLI, who is not that great.

00:04:12.900 --> 00:04:19.400
<v Michael Kennedy>So there's 13 different things, 13 different components or features or aspects of the API

00:04:20.079 --> 00:04:23.320
<v Michael Kennedy>that they chose to address to say, Typer's great.

00:04:23.560 --> 00:04:25.080
<v Michael Kennedy>We're basically inspired by Typer.

00:04:25.200 --> 00:04:25.700
<v Michael Kennedy>That's what we're doing.

00:04:26.220 --> 00:04:30.480
<v Michael Kennedy>However, there's a couple of these 13 areas I think we should make better, right?

00:04:30.540 --> 00:04:32.760
<v Michael Kennedy>So you could actually go through and look at all of them.

00:04:33.000 --> 00:04:39.180
<v Michael Kennedy>Probably the biggest one is that Typer was made with Python 3.7, 3.8,

00:04:39.720 --> 00:04:43.520
<v Michael Kennedy>where Python's types were at an earlier stage in their life.

00:04:44.380 --> 00:04:48.960
<v Michael Kennedy>You had to say things like, this is an argument of int,

00:04:49.120 --> 00:04:52.040
<v Michael Kennedy>or it is an int when it's actually an argument of int or something like that.

00:04:52.360 --> 00:04:57.520
<v Michael Kennedy>And this Cyclops thing was built once annotated was introduced,

00:04:58.160 --> 00:04:59.960
<v Michael Kennedy>which allows you to have sort of a dual role.

00:05:00.180 --> 00:05:05.540
<v Michael Kennedy>Like, it really is one of these, but its type could also be like its native value, right?

00:05:05.880 --> 00:05:08.360
<v Michael Kennedy>Allowing the removal of proxy defaults.

00:05:08.560 --> 00:05:09.140
<v Michael Kennedy>Why does that matter?

00:05:09.460 --> 00:05:12.340
<v Michael Kennedy>Because if you build a CLI with Cyclops,

00:05:13.630 --> 00:05:14.400
<v Michael Kennedy>and you use types,

00:05:14.610 --> 00:05:16.720
<v Michael Kennedy>you can still use it as regular functions

00:05:17.200 --> 00:05:18.660
<v Michael Kennedy>as if they just had an integer

00:05:18.880 --> 00:05:20.340
<v Michael Kennedy>where it said it took an integer and so on.

00:05:20.660 --> 00:05:21.540
<v Michael Kennedy>So things like that.

00:05:21.880 --> 00:05:22.640
<v Michael Kennedy>It's got about, I think,

00:05:22.640 --> 00:05:24.420
<v Michael Kennedy>a thousand GitHub stars or so.

00:05:24.580 --> 00:05:26.040
<v Michael Kennedy>It's not crazy, crazy popular.

00:05:26.280 --> 00:05:28.960
<v Michael Kennedy>But if you're really loving that concept

00:05:29.110 --> 00:05:31.380
<v Michael Kennedy>of having types for your CLI,

00:05:31.670 --> 00:05:32.180
<v Michael Kennedy>give this thing a look.

00:05:33.100 --> 00:05:34.500
<v Brian Okken>Yeah, actually, I got a shout out to him

00:05:34.680 --> 00:05:38.919
<v Brian Okken>for doing things like comparing to Typer

00:05:39.120 --> 00:05:43.040
<v Brian Okken>because, like you said, a lot of us, I use Cyper as well.

00:05:43.300 --> 00:05:46.420
<v Brian Okken>And I've used Typer, I've used Click and ArgParse.

00:05:47.800 --> 00:05:52.800
<v Brian Okken>And so you're probably not going to grab too many of the ArgParse people

00:05:53.160 --> 00:05:56.440
<v Brian Okken>because they're just using it because it's built in, maybe.

00:05:57.920 --> 00:05:59.440
<v Michael Kennedy>You're like the unit test people, Brian.

00:05:59.520 --> 00:06:00.140
<v Michael Kennedy>What can you do?

00:06:01.180 --> 00:06:02.800
<v Michael Kennedy>You talk pytest for 10 years.

00:06:02.980 --> 00:06:03.820
<v Brian Okken>I yell louder.

00:06:04.080 --> 00:06:04.600
<v Brian Okken>That's what I do.

00:06:06.600 --> 00:06:16.140
<v Brian Okken>But I think it's a fair thing because I'd be thinking, well, if I'm not going to use ArgParse, I'm probably going to reach for Typer or Click, lately Typer.

00:06:17.479 --> 00:06:26.100
<v Brian Okken>But having this comparison here and then even a migration from Typer, I think that's cool to show that.

00:06:27.539 --> 00:06:31.240
<v Brian Okken>And there's always room for making CLI tools better.

00:06:31.560 --> 00:06:32.500
<v Brian Okken>We love CLI tools.

00:06:32.820 --> 00:06:33.060
<v Brian Okken>Yeah.

00:06:33.780 --> 00:06:34.540
<v Brian Okken>Yeah, there definitely are.

00:06:34.780 --> 00:06:35.560
<v Michael Kennedy>But yeah, so cool.

00:06:35.700 --> 00:06:39.680
<v Michael Kennedy>I ran across this and I built something with it recently and it was nice.

00:06:40.620 --> 00:06:41.120
Oh, did you?

00:06:41.160 --> 00:06:41.480
Checking out.

00:06:41.600 --> 00:06:42.000
<v Brian Okken>Yeah.

00:06:42.460 --> 00:06:44.060
<v Michael Kennedy>A little, you know, I'm starting to add.

00:06:44.460 --> 00:06:50.140
<v Michael Kennedy>I've been kind of, I've drunk the Kool-Aid now that maybe having an actual CLI,

00:06:50.290 --> 00:06:53.080
<v Michael Kennedy>even from my own tools, might be a little bit better than just,

00:06:53.420 --> 00:06:56.180
<v Michael Kennedy>here's a script I run and maybe I'll pass it something

00:06:56.270 --> 00:06:59.180
<v Michael Kennedy>and just look at sys.argv and see if it's in there.

00:06:59.400 --> 00:07:00.160
Oh, man.

00:07:00.380 --> 00:07:01.520
<v Michael Kennedy>Let's do a little bit better.

00:07:01.690 --> 00:07:04.020
<v Michael Kennedy>And now that I've started to do that, I've been playing with these different ones,

00:07:04.160 --> 00:07:08.200
<v Michael Kennedy>which is, I think, where I kind of got inspired to go down this path and talk about it today.

00:07:08.560 --> 00:07:09.120
<v Brian Okken>Yeah, awesome.

00:07:09.560 --> 00:07:09.640
<v Brian Okken>Cool.

00:07:11.220 --> 00:07:16.260
<v Brian Okken>I want to talk about the present, the future, a little bit of both.

00:07:17.020 --> 00:07:21.840
<v Brian Okken>So there is this interesting article, of course, in Python 3.14.

00:07:22.140 --> 00:07:31.180
<v Brian Okken>Well, we had it in 3.13, is that the GIL was optional with what they call the free threading version, right?

00:07:32.000 --> 00:07:32.900
<v Brian Okken>Free threaded Python.

00:07:33.740 --> 00:07:37.260
<v Michael Kennedy>Not the gill-less, not the galectomy.

00:07:37.640 --> 00:07:39.920
<v Michael Kennedy>Free-threaded, I think, is where we landed from the PEP.

00:07:40.580 --> 00:07:42.580
<v Brian Okken>Okay, but is it kind of the same thing?

00:07:42.780 --> 00:07:43.000
<v Brian Okken>Yeah.

00:07:43.320 --> 00:07:43.500
<v Brian Okken>Okay.

00:07:46.600 --> 00:07:46.900
<v Brian Okken>Oh, right.

00:07:47.060 --> 00:07:48.240
<v Brian Okken>The galectomy was a different project.

00:07:48.800 --> 00:07:49.280
<v Brian Okken>Yeah, it was.

00:07:49.940 --> 00:07:50.120
<v Michael Kennedy>Gosh.

00:07:50.520 --> 00:07:50.820
<v Michael Kennedy>Anyway.

00:07:51.500 --> 00:07:52.740
<v Michael Kennedy>Larry Hastings was doing that.

00:07:53.080 --> 00:07:55.240
<v Michael Kennedy>But I believe, I mean, the free-threaded stuff,

00:07:55.380 --> 00:07:57.160
<v Michael Kennedy>there's a lot of things that had to happen.

00:07:57.270 --> 00:07:59.840
<v Michael Kennedy>And actually, my next topic is also on free-threaded Python.

00:08:00.250 --> 00:08:01.740
<v Michael Kennedy>And it's not just let's take out the gill,

00:08:01.860 --> 00:08:03.460
<v Michael Kennedy>but they had to rework memory management.

00:08:04.440 --> 00:08:05.700
<v Michael Kennedy>the structure of object.

00:08:05.920 --> 00:08:07.920
<v Michael Kennedy>There's like a lot of moving parts

00:08:07.950 --> 00:08:08.880
<v Michael Kennedy>in order to make this possible.

00:08:09.020 --> 00:08:09.680
<v Brian Okken>Okay, cool.

00:08:11.120 --> 00:08:14.480
<v Brian Okken>Okay, so with the free-threaded Python,

00:08:15.340 --> 00:08:16.700
<v Brian Okken>so now we have in 3.13,

00:08:16.810 --> 00:08:18.580
<v Brian Okken>we had two versions of Python released.

00:08:18.700 --> 00:08:20.000
<v Brian Okken>So if you go to download Python,

00:08:20.250 --> 00:08:20.900
<v Brian Okken>you get a choice.

00:08:21.720 --> 00:08:25.420
<v Brian Okken>And with UV2, you can add a T to it, 3.14 T,

00:08:26.020 --> 00:08:27.500
<v Brian Okken>and you get the free-threaded version.

00:08:29.760 --> 00:08:33.500
<v Brian Okken>But like, and also definitely encourage everybody

00:08:33.500 --> 00:08:36.640
<v Brian Okken>test and publish that you've tested.

00:08:36.680 --> 00:08:41.680
<v Brian Okken>In CI, you go ahead and test it because the CI tools support both.

00:08:42.460 --> 00:08:43.599
<v Brian Okken>Why do we care about this?

00:08:44.140 --> 00:08:49.560
<v Brian Okken>Well, because some people are migrating to it because as with 3.14,

00:08:49.880 --> 00:08:52.040
<v Brian Okken>it's no longer just an experimental thing.

00:08:52.240 --> 00:08:58.020
<v Brian Okken>So here, I'm going to cover an article by Giovanni Barili.

00:08:58.560 --> 00:08:59.560
<v Brian Okken>Sorry, Giovanni.

00:08:59.740 --> 00:09:00.640
<v Brian Okken>I can pronounce that one.

00:09:00.940 --> 00:09:03.540
<v Michael Kennedy>I'm pretty sure this is the same Giovanni that makes Granian.

00:09:04.020 --> 00:09:05.360
<v Brian Okken>Oh, okay.

00:09:06.540 --> 00:09:07.240
<v Brian Okken>I think so.

00:09:07.460 --> 00:09:10.560
<v Brian Okken>The future of Python web services looks gill-free.

00:09:10.870 --> 00:09:18.800
<v Brian Okken>So it starts out with two major changes when comparing free-threaded variant of 3.14 versus 3.13.

00:09:19.779 --> 00:09:25.480
<v Brian Okken>First, free-threaded support now reaches phase two, meaning it is no longer considered experimental.

00:09:25.940 --> 00:09:30.100
<v Brian Okken>So everybody's on board with this is what we're going to at least try to do for a while.

00:09:30.960 --> 00:09:36.620
<v Brian Okken>not just try to do but we're the python core team is supporting this and we're going to do it

00:09:36.680 --> 00:09:42.340
<v Brian Okken>moving forward what does that mean it means that people can depend on a free threaded version and

00:09:42.400 --> 00:09:49.180
<v Brian Okken>change their code accordingly if necessary which is great especially for a lot of async stuff

00:09:49.840 --> 00:09:56.359
<v Brian Okken>like web services so uh secondly the implementation is now completed meaning that the workarounds

00:09:56.380 --> 00:10:04.760
<v Brian Okken>introduced in 3.13 make code sound without the gil are now gone, and free-threaded implementation

00:10:05.200 --> 00:10:11.600
<v Brian Okken>now uses the adaptive interpreter as the gil-enabled variant. What does that mean? It means that the

00:10:13.360 --> 00:10:19.320
<v Brian Okken>additional optimizations... Oh, okay. Also, those facts plus additional optimizations make the

00:10:19.440 --> 00:10:27.340
<v Brian Okken>performance penalty that we had in 313 way better or way less annoying so in 313 the free thread if

00:10:27.340 --> 00:10:34.740
<v Brian Okken>you're doing non-async code just straight code you had to face a like a 35 time penalty which sucks

00:10:35.340 --> 00:10:40.180
<v Brian Okken>um now it's like a five to ten percent difference and i think it's going to shrink even more

00:10:40.840 --> 00:10:47.899
<v Brian Okken>but um so if you're if you don't need the free threaded don't use it unless or or use it whatever

00:10:47.920 --> 00:10:51.300
<v Brian Okken>But if it's time critical, don't right now.

00:10:51.450 --> 00:10:52.600
<v Brian Okken>But I think it's going to get better.

00:10:54.180 --> 00:10:59.920
<v Brian Okken>And especially if you are using async and stuff, it's way faster to use the free-threaded, of course.

00:11:00.340 --> 00:11:05.880
<v Brian Okken>So this article does a shout-out to Miguel Grimberg's article about performance.

00:11:06.030 --> 00:11:07.640
<v Brian Okken>I think we covered it last week.

00:11:07.640 --> 00:11:08.140
We did. You did.

00:11:09.120 --> 00:11:12.060
<v Brian Okken>No, maybe I did. We did. I can't remember who started it.

00:11:13.700 --> 00:11:16.820
<v Brian Okken>So this article has a whole bunch more benchmarks.

00:11:17.120 --> 00:11:31.120
<v Brian Okken>And I'm not going to walk through all of them, but talks about doing a service with JSON responses and both measuring with WSGI and ASCII implementations.

00:11:31.460 --> 00:11:35.360
<v Brian Okken>And yes, talking about using Gradient.

00:11:35.510 --> 00:11:36.580
<v Brian Okken>So that makes sense.

00:11:37.720 --> 00:11:38.840
<v Brian Okken>So I'm going to jump down.

00:11:38.880 --> 00:11:48.540
<v Brian Okken>So there's a bunch of metrics, but basically the end result is if you're using ASCII or ASGI, the free-threaded one is obviously the way to go.

00:11:49.860 --> 00:11:56.160
<v Brian Okken>And you don't get really much of a hit because of free-threaded implementation at all.

00:11:56.480 --> 00:11:59.500
<v Brian Okken>You get speedups and memory usage is reasonable.

00:12:00.480 --> 00:12:07.260
<v Brian Okken>So what I want people to do, if you're going to check this out, is to jump down to the final thoughts because there's some great stuff here.

00:12:08.380 --> 00:12:11.560
<v Brian Okken>Essentially, so what do I want to pick out?

00:12:13.680 --> 00:12:16.280
<v Brian Okken>On asynchronous protocols like ASGI,

00:12:16.620 --> 00:12:19.640
<v Brian Okken>despite the fact that concurrency model doesn't change that much,

00:12:20.360 --> 00:12:24.800
<v Brian Okken>it's a shift from one event loop per process to one event loop per thread.

00:12:25.360 --> 00:12:26.880
<v Brian Okken>I think that's a big change, actually.

00:12:27.780 --> 00:12:30.620
<v Brian Okken>Just the fact that we no longer need to scale memory allocations

00:12:30.960 --> 00:12:33.260
<v Brian Okken>just to use more CPU is a massive improvement.

00:12:33.660 --> 00:12:34.000
<v Brian Okken>That's cool.

00:12:34.140 --> 00:12:34.720
<v Brian Okken>Didn't know that.

00:12:35.140 --> 00:12:35.520
<v Brian Okken>That's neat.

00:12:36.460 --> 00:12:39.880
<v Brian Okken>For everybody out there coding a web application in Python,

00:12:40.520 --> 00:12:42.280
<v Brian Okken>simplifying the concurrency paradigms

00:12:42.310 --> 00:12:44.520
<v Brian Okken>and the deployment process of such applications

00:12:44.790 --> 00:12:46.280
<v Brian Okken>is a good thing, obviously.

00:12:47.060 --> 00:12:48.160
<v Brian Okken>And the conclusion being,

00:12:50.120 --> 00:12:52.580
<v Brian Okken>for me, the future of Python web services

00:12:52.940 --> 00:12:53.900
<v Brian Okken>looks like the Guilfri.

00:12:54.120 --> 00:12:56.060
<v Brian Okken>So if you're doing web services,

00:12:56.740 --> 00:12:58.220
<v Brian Okken>try out the free-threaded version.

00:12:58.900 --> 00:13:01.000
<v Brian Okken>At least one developer there is completely happy

00:13:01.160 --> 00:13:02.080
<v Brian Okken>with what we have now.

00:13:02.620 --> 00:13:03.580
<v Michael Kennedy>Yeah, super nice.

00:13:03.880 --> 00:13:05.500
<v Michael Kennedy>A bit of real-time follow-up.

00:13:05.900 --> 00:13:07.900
<v Michael Kennedy>Yes, indeed. It is the same Giovanni.

00:13:08.280 --> 00:13:08.740
<v Michael Kennedy>All right.

00:13:08.860 --> 00:13:09.800
<v Michael Kennedy>Who creates a granion.

00:13:10.180 --> 00:13:13.800
<v Michael Kennedy>So with any of these web production app servers

00:13:14.320 --> 00:13:16.280
<v Michael Kennedy>where you run your Python code when it's running,

00:13:16.660 --> 00:13:17.640
<v Michael Kennedy>whether it's Django, Flask, whatever,

00:13:17.880 --> 00:13:19.600
<v Michael Kennedy>there's a process that runs your code.

00:13:19.920 --> 00:13:23.420
<v Michael Kennedy>Very often, the way that we've got them to work around the gill,

00:13:23.500 --> 00:13:26.260
<v Michael Kennedy>like in the web, the GIL is a much smaller problem.

00:13:26.740 --> 00:13:28.140
<v Michael Kennedy>It's still a problem, but it's less.

00:13:28.500 --> 00:13:33.360
<v Michael Kennedy>Because what we do often is we create a web garden.

00:13:33.880 --> 00:13:35.280
<v Michael Kennedy>So when you set up gran, you can say,

00:13:35.500 --> 00:13:37.280
<v Michael Kennedy>and start four copies of yourself.

00:13:37.780 --> 00:13:39.620
<v Michael Kennedy>So that, yes, they all have the gil,

00:13:40.060 --> 00:13:42.740
<v Michael Kennedy>but we'll round robin requests between the fours.

00:13:43.080 --> 00:13:45.420
<v Michael Kennedy>If you've got four cores, four CPUs,

00:13:45.640 --> 00:13:47.300
<v Michael Kennedy>you basically can say, well, each one of these

00:13:47.340 --> 00:13:50.260
<v Michael Kennedy>is dedicated to a CPU and it can kind of like match, right?

00:13:51.180 --> 00:13:53.020
<v Michael Kennedy>Yeah, so we're running on good stuff.

00:13:53.600 --> 00:13:57.000
<v Michael Kennedy>But the thing is, when you have this free threaded option,

00:13:57.420 --> 00:13:59.960
<v Michael Kennedy>you can actually have true concurrency in your one worker.

00:14:00.480 --> 00:14:02.480
<v Michael Kennedy>So instead of scaling out four copies,

00:14:02.680 --> 00:14:04.480
<v Michael Kennedy>you could have just one and just say,

00:14:04.660 --> 00:14:06.480
<v Michael Kennedy>let that one take 10 concurrent requests

00:14:06.960 --> 00:14:07.940
<v Michael Kennedy>or whatever it needs to take.

00:14:08.220 --> 00:14:08.360
- Yeah.

00:14:08.820 --> 00:14:10.540
<v Michael Kennedy>- Right, so that's how the free thread gets better.

00:14:10.600 --> 00:14:11.680
<v Michael Kennedy>And like, well, okay, why?

00:14:11.800 --> 00:14:13.940
<v Michael Kennedy>What's like six, one, half dozen, the other?

00:14:14.220 --> 00:14:16.260
<v Michael Kennedy>No, the memory becomes a problem

00:14:16.420 --> 00:14:17.580
<v Michael Kennedy>when you create these little web gardens

00:14:17.920 --> 00:14:21.320
<v Michael Kennedy>because if normally your server would use half a gig

00:14:21.700 --> 00:14:23.220
<v Michael Kennedy>and you create four, well now it's two gigs

00:14:23.600 --> 00:14:26.480
<v Michael Kennedy>and maybe that bumps you up in another tier and so on, right?

00:14:26.820 --> 00:14:30.240
<v Brian Okken>- Yeah, and if you need that memory for data,

00:14:30.640 --> 00:14:31.480
<v Brian Okken>you don't have it, so.

00:14:31.920 --> 00:14:34.620
<v Michael Kennedy>- Yeah, so I think that's kind of one of the angles

00:14:34.640 --> 00:14:39.180
<v Michael Kennedy>your writing concurrent code, but the foundations of your code running can do so more efficiently

00:14:39.420 --> 00:14:44.580
<v Michael Kennedy>because they're no longer needing to work around processes, limitations like, well, we got to

00:14:44.620 --> 00:14:49.360
<v Michael Kennedy>fan out these processes because of the kill. Okay, back to the regular scheduled programming,

00:14:49.820 --> 00:14:57.600
<v Michael Kennedy>free threaded Python, let's keep going. So here's an interesting article from a snake wearing a very

00:14:57.820 --> 00:15:04.180
<v Michael Kennedy>fast, it's a very fast snake with jet engines that is wearing a garbage collector. So what I

00:15:04.060 --> 00:15:09.180
<v Michael Kennedy>want to talk about is unlocking the performance in Python's free threaded future GC optimization.

00:15:09.650 --> 00:15:15.320
<v Michael Kennedy>So garbage collection is not something that we frequently talk about a ton in Python. You know,

00:15:15.440 --> 00:15:20.200
<v Michael Kennedy>it's just, we don't think a lot about GC. We don't think a lot about memory. I don't know why, like,

00:15:20.460 --> 00:15:24.900
<v Michael Kennedy>as you know, Brian, in C, C++, people are like always about it, right? Like, oh my gosh,

00:15:25.320 --> 00:15:29.140
<v Michael Kennedy>what size of point and what size of integer are we going to use for this, right? And like,

00:15:29.220 --> 00:15:34.020
<v Michael Kennedy>it's just way more sort of in the forefront, but it's nice every now and then to peel back the

00:15:34.140 --> 00:15:36.180
<v Michael Kennedy>and get a look at what's going on here.

00:15:36.470 --> 00:15:41.840
<v Michael Kennedy>So Neil Schemenauer wrote this article over here from QuantSight.

00:15:42.020 --> 00:15:43.700
<v Michael Kennedy>They do a bunch of data science primarily.

00:15:44.440 --> 00:15:45.240
<v Michael Kennedy>But here, check this out.

00:15:45.360 --> 00:15:47.080
<v Michael Kennedy>This is news to me, actually,

00:15:47.540 --> 00:15:48.940
<v Michael Kennedy>even though I'm still interested in these things.

00:15:49.160 --> 00:15:50.900
<v Michael Kennedy>It says, first, the most important thing to know

00:15:50.950 --> 00:15:54.220
<v Michael Kennedy>is that free-threaded Python uses a different garbage collector

00:15:54.490 --> 00:15:56.900
<v Michael Kennedy>than the default Python, the gil-enabled.

00:15:57.240 --> 00:15:59.320
<v Michael Kennedy>The gilded, I still want to call it the gilded Python.

00:15:59.680 --> 00:16:00.600
<v Michael Kennedy>The gilded Python.

00:16:01.060 --> 00:16:02.220
<v Michael Kennedy>So we have the default GC,

00:16:02.480 --> 00:16:05.400
<v Michael Kennedy>which people probably understand pretty well.

00:16:05.710 --> 00:16:08.420
<v Michael Kennedy>When you create a number, like a thousand,

00:16:08.950 --> 00:16:10.060
<v Michael Kennedy>when you create a list,

00:16:10.400 --> 00:16:12.440
<v Michael Kennedy>when you create an object from a class,

00:16:12.860 --> 00:16:16.340
<v Michael Kennedy>all of those things have a data structure at the top of them

00:16:16.640 --> 00:16:19.400
<v Michael Kennedy>that allows them to manage and track the memory.

00:16:19.860 --> 00:16:22.280
<v Michael Kennedy>And people think of the GIL as being a threading thing.

00:16:22.640 --> 00:16:25.140
<v Michael Kennedy>The GIL is really a protection mechanism

00:16:25.230 --> 00:16:27.140
<v Michael Kennedy>for memory management in Python, right?

00:16:27.320 --> 00:16:31.040
<v Michael Kennedy>It's basically protection against a race condition

00:16:31.060 --> 00:16:32.400
<v Michael Kennedy>in the reference counting.

00:16:32.720 --> 00:16:35.120
<v Michael Kennedy>So basically interacting with this structure

00:16:35.320 --> 00:16:37.420
<v Michael Kennedy>that has seven things reference me

00:16:37.680 --> 00:16:39.800
<v Michael Kennedy>and I reference it, however, you know what I mean?

00:16:39.860 --> 00:16:41.040
<v Michael Kennedy>Like that sort of deal.

00:16:41.380 --> 00:16:41.540
<v Michael Kennedy>- Yeah.

00:16:41.700 --> 00:16:43.400
<v Michael Kennedy>- And when the thing goes out of scope,

00:16:43.520 --> 00:16:45.700
<v Michael Kennedy>it decrements that and that's where the GIL comes in

00:16:45.720 --> 00:16:47.740
<v Michael Kennedy>to like make that decrement safe and so on.

00:16:47.940 --> 00:16:49.740
<v Michael Kennedy>So that's the regular one,

00:16:50.120 --> 00:16:52.140
<v Michael Kennedy>but we don't even have that structure anymore

00:16:52.860 --> 00:16:54.160
<v Michael Kennedy>in the free threaded one.

00:16:54.740 --> 00:16:55.540
<v Michael Kennedy>So what?

00:16:56.379 --> 00:16:58.600
<v Michael Kennedy>So instead, when you allocate stuff,

00:16:58.760 --> 00:17:03.820
<v Michael Kennedy>it goes into a special memory managed heap called memalloc,

00:17:04.100 --> 00:17:05.760
<v Michael Kennedy>or managed by memalloc, right?

00:17:06.199 --> 00:17:09.000
<v Michael Kennedy>And this allows the GC to loop over all these objects

00:17:09.480 --> 00:17:13.100
<v Michael Kennedy>and figure out which ones are junk and which ones aren't.

00:17:13.100 --> 00:17:16.699
<v Michael Kennedy>A little bit like a mark and sweep garbage collector.

00:17:17.240 --> 00:17:18.760
<v Michael Kennedy>So there's a couple of interesting things.

00:17:20.079 --> 00:17:23.079
<v Michael Kennedy>One is that most of the mark and sweep garbage collectors

00:17:23.500 --> 00:17:26.540
<v Michael Kennedy>and that type of thing, they have generations,

00:17:27.060 --> 00:17:28.160
<v Michael Kennedy>like a generational one.

00:17:28.540 --> 00:17:31.500
<v Michael Kennedy>So it has Gen 0s where most objects come,

00:17:31.550 --> 00:17:33.620
<v Michael Kennedy>then it'll check that frequently and so on.

00:17:33.680 --> 00:17:36.200
<v Michael Kennedy>That's also how the garbage collector that looks for cycles

00:17:36.390 --> 00:17:38.600
<v Michael Kennedy>in the regular Python goes, right?

00:17:39.040 --> 00:17:43.320
<v Michael Kennedy>But it doesn't work here because of unmanaged C extensions

00:17:43.940 --> 00:17:45.460
<v Michael Kennedy>and a bunch of stuff like that.

00:17:45.820 --> 00:17:50.640
<v Michael Kennedy>So what it does is it can mark all the objects reachable

00:17:50.840 --> 00:17:52.480
<v Michael Kennedy>from what it calls known roots.

00:17:52.780 --> 00:17:54.600
<v Michael Kennedy>So instead of trying to scan the entire memory space,

00:17:54.690 --> 00:17:55.700
<v Michael Kennedy>it says, well, what are globals?

00:17:55.800 --> 00:17:56.180
<v Michael Kennedy>What are locals?

00:17:56.520 --> 00:18:02.400
<v Michael Kennedy>what are like a you know it sort of follow those and it marks those as active and that can they can

00:18:02.660 --> 00:18:07.920
<v Michael Kennedy>automatically be excluded from the search which is kind of like a generational optimization so

00:18:08.310 --> 00:18:12.900
<v Michael Kennedy>pretty interesting but here's the takeaway we were talking about making things faster by using free

00:18:13.040 --> 00:18:19.720
<v Michael Kennedy>threaded python with this one it's the free threaded gc collection is between two to 12 times faster

00:18:19.920 --> 00:18:25.220
than the 3.13 version wow that's pretty yeah that's pretty wild right yeah yeah so depending on how

00:18:25.220 --> 00:18:26.080
<v Michael Kennedy>your algorithms work,

00:18:26.090 --> 00:18:27.160
<v Michael Kennedy>do you have a super pointer,

00:18:27.440 --> 00:18:27.660
<v Michael Kennedy>pointer,

00:18:27.970 --> 00:18:28.620
<v Michael Kennedy>heavy allocation,

00:18:29.000 --> 00:18:30.220
<v Michael Kennedy>heavy type of algorithm,

00:18:30.440 --> 00:18:30.640
<v Michael Kennedy>then,

00:18:31.000 --> 00:18:31.160
<v Michael Kennedy>you know,

00:18:31.250 --> 00:18:32.340
<v Michael Kennedy>we'll probably see a bigger benefit

00:18:32.540 --> 00:18:33.980
<v Michael Kennedy>than if you allocate a few things

00:18:34.160 --> 00:18:35.040
<v Michael Kennedy>and jam on those.

00:18:35.380 --> 00:18:35.720
<v Michael Kennedy>So anyway,

00:18:35.880 --> 00:18:37.620
<v Michael Kennedy>if you want to peel back the covers

00:18:37.880 --> 00:18:38.500
<v Michael Kennedy>and see the GC,

00:18:38.570 --> 00:18:39.600
<v Michael Kennedy>I didn't even know they were different,

00:18:39.900 --> 00:18:40.760
<v Michael Kennedy>but apparently they're different.

00:18:41.080 --> 00:18:41.860
<v Michael Kennedy>And presumably,

00:18:42.060 --> 00:18:43.120
<v Michael Kennedy>maybe they could even have

00:18:43.300 --> 00:18:45.700
<v Michael Kennedy>like multi-threaded GC stuff going on.

00:18:46.000 --> 00:18:46.580
<v Michael Kennedy>That might be cool.

00:18:46.720 --> 00:18:48.040
<v Michael Kennedy>Or background thread GC.

00:18:48.440 --> 00:18:49.600
<v Michael Kennedy>I know those are a lot of different things

00:18:49.650 --> 00:18:50.900
<v Michael Kennedy>that happen in some of these systems.

00:18:51.260 --> 00:18:52.220
<v Michael Kennedy>These garbage-coach systems.

00:18:52.640 --> 00:18:52.740
<v Michael Kennedy>Yeah.

00:18:53.300 --> 00:18:53.800
<v Michael Kennedy>And finally,

00:18:54.100 --> 00:18:58.140
<v Michael Kennedy>A little bit of real time, not quite real time, but real world follow up, I'll say.

00:18:58.480 --> 00:19:00.960
<v Michael Kennedy>So for some reason, I can't remember what I was doing.

00:19:01.460 --> 00:19:07.220
<v Michael Kennedy>Something I had to do, I had to go back, go through all the examples of my async programming course at Talk Python.

00:19:07.640 --> 00:19:13.100
<v Michael Kennedy>So I went back in there and I said, all right, well, let me just make sure everything's running, update all the dependencies.

00:19:14.200 --> 00:19:15.120
<v Michael Kennedy>I can't remember what it was.

00:19:15.310 --> 00:19:16.580
<v Michael Kennedy>But anyway, something had to be updated.

00:19:16.860 --> 00:19:20.020
<v Michael Kennedy>So I made sure all the dependencies got updated and pinned them to newer ones.

00:19:20.110 --> 00:19:21.980
<v Michael Kennedy>And I'm like, well, there's a lot of changes here.

00:19:21.980 --> 00:19:22.900
<v Michael Kennedy>Let me make sure they're all running.

00:19:23.140 --> 00:19:28.060
<v Michael Kennedy>So go around and I ran every example from the course, probably 25 little apps.

00:19:28.520 --> 00:19:32.380
<v Michael Kennedy>And many of them are like, well, here's a web app, or here's just a way to do

00:19:33.020 --> 00:19:33.960
<v Michael Kennedy>multiprocessing, have a look at it.

00:19:33.960 --> 00:19:36.920
<v Michael Kennedy>But a lot of them were like, let's actually do this with threads.

00:19:37.240 --> 00:19:40.240
<v Michael Kennedy>And in this example with doing IO, you see it does make a difference.

00:19:40.340 --> 00:19:44.840
<v Michael Kennedy>In this example doing computational stuff, no difference or slower because there's

00:19:44.920 --> 00:19:47.180
<v Michael Kennedy>just overhead and it's still running one at a time, right?

00:19:47.500 --> 00:19:56.120
<v Michael Kennedy>Well, I decided to type uv-python 3.14t run those examples and run them free threaded.

00:19:56.500 --> 00:20:01.580
<v Michael Kennedy>The ones that used to have no benefit or a net negative are now like seven times faster.

00:20:03.700 --> 00:20:08.400
<v Michael Kennedy>It would go like synchronous one, 10.2 seconds.

00:20:08.980 --> 00:20:12.800
<v Michael Kennedy>Async or threaded one rather, 10.25 seconds.

00:20:13.660 --> 00:20:16.560
<v Michael Kennedy>And now just put the T on the end, three seconds.

00:20:18.140 --> 00:20:25.300
<v Michael Kennedy>that's pretty cool that is pretty cool man so to me it's really down to what are the framework

00:20:25.650 --> 00:20:30.460
<v Michael Kennedy>what are the packages and libraries that you're using if it's green across the board for free

00:20:30.560 --> 00:20:37.340
<v Brian Okken>threaded that's pretty interesting it opens up some real possibilities yeah also i i think i'll

00:20:37.340 --> 00:20:41.919
<v Brian Okken>be looking forward to the i know i don't know if we have a deadline or timeline for this but

00:20:41.940 --> 00:20:45.760
<v Brian Okken>when we can go back to having one version of Python

00:20:47.160 --> 00:20:48.680
<v Brian Okken>and it's being the free-threaded one,

00:20:49.420 --> 00:20:53.240
<v Brian Okken>it'll be, you know, maybe we can switch it

00:20:53.360 --> 00:20:55.080
<v Brian Okken>to be the default is the free-threaded one.

00:20:55.180 --> 00:20:57.760
<v Brian Okken>And for a couple of versions, there's the other one also.

00:20:57.900 --> 00:20:59.660
<v Brian Okken>You got to say 3.14G.

00:21:00.260 --> 00:21:01.380
<v Brian Okken>Yeah, or something like that.

00:21:02.720 --> 00:21:04.820
<v Brian Okken>And I think that would be good

00:21:05.140 --> 00:21:08.220
<v Brian Okken>because the default way we think about how to program

00:21:08.360 --> 00:21:10.359
<v Brian Okken>and how to program quickly

00:21:10.560 --> 00:21:14.920
<v Brian Okken>And the rules of thumb based on the GIL will be gone.

00:21:15.190 --> 00:21:16.420
<v Brian Okken>So we'll teach people different.

00:21:17.660 --> 00:21:17.800
<v Brian Okken>Yeah.

00:21:18.050 --> 00:21:19.480
<v Brian Okken>So anyway.

00:21:19.800 --> 00:21:19.880
<v Brian Okken>Yeah.

00:21:20.300 --> 00:21:23.960
<v Michael Kennedy>And before we move on real quick, a follow-up to your topic from chart here.

00:21:24.640 --> 00:21:27.320
<v Michael Kennedy>Also, if you're on a Kubernetes, if you're on Kubernetes,

00:21:27.530 --> 00:21:30.660
<v Michael Kennedy>it makes setting reasonable CPU and memory requests more difficult

00:21:31.350 --> 00:21:34.880
<v Michael Kennedy>to have to scale out like the WebGarden type stuff.

00:21:35.620 --> 00:21:35.980
Oh, okay.

00:21:36.500 --> 00:21:36.580
<v Michael Kennedy>Yeah.

00:21:36.870 --> 00:21:39.240
<v Michael Kennedy>So if you can just have one process like this is the one,

00:21:39.620 --> 00:21:40.480
<v Michael Kennedy>I think it's easier.

00:21:40.740 --> 00:21:41.760
<v Michael Kennedy>I believe that's what he was getting at.

00:21:41.960 --> 00:21:42.260
<v Brian Okken>Yeah.

00:21:42.620 --> 00:21:48.680
<v Brian Okken>And also, I mean, from the C++ world, yes, processes and threads both can work.

00:21:49.580 --> 00:21:53.040
<v Brian Okken>But thinking in threads is easier than thinking about multiprocesses.

00:21:53.700 --> 00:21:54.100
<v Michael Kennedy>100%.

00:21:54.100 --> 00:21:54.800
<v Michael Kennedy>Because you have shared memory.

00:21:54.800 --> 00:21:55.080
It just is.

00:21:55.820 --> 00:21:59.580
<v Michael Kennedy>You don't have to proxy stuff over and figure out how to sync it back up and copy it.

00:22:00.140 --> 00:22:02.060
<v Brian Okken>To queues and all sorts of...

00:22:02.640 --> 00:22:02.740
<v Michael Kennedy>Anyway.

00:22:03.860 --> 00:22:04.080
<v Michael Kennedy>Okay.

00:22:04.660 --> 00:22:05.460
<v Michael Kennedy>I can't resist.

00:22:05.600 --> 00:22:08.800
<v Michael Kennedy>I got to say, I got to put this out there in the world and see what you think.

00:22:09.100 --> 00:22:12.960
<v Michael Kennedy>One thing right now, we have the gilded Python and we have the free threaded Python.

00:22:13.190 --> 00:22:16.300
<v Michael Kennedy>And I can choose to run the free threaded one, as we've been talking about, if I want that.

00:22:16.650 --> 00:22:17.680
<v Michael Kennedy>But what about this, Brian?

00:22:17.800 --> 00:22:18.960
<v Michael Kennedy>This is what I want to put out in the world.

00:22:19.340 --> 00:22:24.200
<v Michael Kennedy>I want, like right now, if I have a project and I've got some data and I need to process

00:22:24.360 --> 00:22:28.520
<v Michael Kennedy>this in parallel on the gilded one, I need to maybe do multi-processing.

00:22:28.850 --> 00:22:34.100
<v Michael Kennedy>So that's going to spin up five little baby Python processes all to go jam on that, right?

00:22:34.460 --> 00:22:35.580
That's how you get around the GIL.

00:22:35.880 --> 00:22:36.580
<v Michael Kennedy>What about this?

00:22:36.760 --> 00:22:39.820
<v Michael Kennedy>what if you could pass a flag to multi-processing

00:22:39.950 --> 00:22:42.980
<v Michael Kennedy>and it would start up free-threaded Python with threads

00:22:43.480 --> 00:22:44.900
<v Michael Kennedy>instead of a bunch of different processes

00:22:45.260 --> 00:22:47.660
<v Michael Kennedy>that can't coordinate on whatever algorithm

00:22:47.710 --> 00:22:49.460
<v Michael Kennedy>that you just say run multi-processing,

00:22:49.880 --> 00:22:52.420
<v Michael Kennedy>but this time do it in free-threaded Python

00:22:53.000 --> 00:22:54.600
<v Michael Kennedy>as your little multi-process burst

00:22:54.890 --> 00:22:56.160
<v Michael Kennedy>and then come back to me with the answer.

00:22:56.400 --> 00:22:56.940
<v Michael Kennedy>That would be cool.

00:22:57.300 --> 00:22:57.900
<v Brian Okken>- Yeah, yeah.

00:22:58.020 --> 00:22:58.720
<v Michael Kennedy>- You're not convinced?

00:22:59.120 --> 00:23:00.200
<v Michael Kennedy>I mean, you could that way,

00:23:00.650 --> 00:23:01.340
<v Brian Okken>'cause you weren't right. - I mean, your code

00:23:01.430 --> 00:23:02.340
<v Brian Okken>has to be different though.

00:23:02.840 --> 00:23:03.920
<v Michael Kennedy>- Just that one function though.

00:23:04.290 --> 00:23:05.780
<v Brian Okken>And you don't have to pay, you know what I mean?

00:23:05.920 --> 00:23:09.720
<v Michael Kennedy>like this one function that i'm going to call multi-processing on i'm going to write it assuming

00:23:09.860 --> 00:23:14.600
<v Michael Kennedy>that it can be it will be an advantage to be threaded or it will be an advantage to be concurrent

00:23:14.760 --> 00:23:18.940
<v Michael Kennedy>but the rest of my code i don't have to rewrite like it'd be a cool way to sort of bring kind of

00:23:19.000 --> 00:23:22.860
<v Michael Kennedy>like scython lets you bring and say this one function if just this were way faster it would

00:23:22.960 --> 00:23:26.740
<v Michael Kennedy>make all the difference you could do that but for free threading i would like to see that would be

00:23:26.880 --> 00:23:34.220
<v Brian Okken>interesting yeah yeah or just a chunk to say like yeah this um this subsystem is a through with

00:23:34.240 --> 00:23:35.900
<v Michael Kennedy>With free threading.

00:23:37.060 --> 00:23:38.220
<v Brian Okken>All right, go ahead.

00:23:38.680 --> 00:23:44.300
<v Brian Okken>Okay, completely different tangent is we're going to go back in time by a couple of one or two episodes.

00:23:45.820 --> 00:23:55.160
<v Brian Okken>We've been, the last few episodes or two or three talking about lazy imports because I thought they were coming in 315.

00:23:55.760 --> 00:23:58.380
<v Brian Okken>They're proposed in 315, but they're not here.

00:23:58.660 --> 00:24:00.580
<v Brian Okken>So, or they're not accepted yet.

00:24:00.680 --> 00:24:01.260
<v Brian Okken>I haven't checked.

00:24:01.300 --> 00:24:02.760
<v Brian Okken>I don't think that anything's changed.

00:24:04.080 --> 00:24:09.320
<v Brian Okken>So last episode, I did talk about lazy imports that you can use today.

00:24:10.780 --> 00:24:17.240
<v Brian Okken>Responding to that, Bob Bilderbos had a discussion on LinkedIn.

00:24:17.680 --> 00:24:25.820
<v Brian Okken>And part of that discussion, we had Will McCoogan hop in and said that he's excited about the PEP

00:24:26.160 --> 00:24:33.240
<v Brian Okken>and that he has a lazy loading mechanism for textuals widgets, which totally makes sense.

00:24:33.320 --> 00:24:39.720
<v Brian Okken>like widgets, you might just need a button, but you don't need all of the other widgets.

00:24:40.320 --> 00:24:42.120
<v Brian Okken>Be cool if you could just load what you needed.

00:24:42.580 --> 00:24:43.460
<v Brian Okken>And he's got that.

00:24:43.520 --> 00:24:44.660
<v Brian Okken>So I checked it out.

00:24:44.880 --> 00:24:45.900
<v Brian Okken>I was checking this out.

00:24:45.940 --> 00:24:49.920
<v Brian Okken>And I think this is sort of a small topic, but I think it's cool.

00:24:49.980 --> 00:24:58.300
<v Brian Okken>So the idea that I want to highlight is I presented last week a method for doing lazy

00:24:58.480 --> 00:25:02.240
<v Brian Okken>loading now or lazy importing now on things that you depend on.

00:25:02.500 --> 00:25:04.160
<v Michael Kennedy>But what if you're like, you don't have to wait.

00:25:04.160 --> 00:25:05.160
<v Michael Kennedy>You can be lazy today.

00:25:06.480 --> 00:25:08.060
<v Brian Okken>But what about like, yeah, exactly.

00:25:09.400 --> 00:25:10.400
<v Brian Okken>What about if you're the package?

00:25:10.530 --> 00:25:14.960
<v Brian Okken>If you have a big package that you have a bunch of stuff that people might want to import,

00:25:15.490 --> 00:25:21.220
<v Brian Okken>making it so that you're not the problem, that your package is going to import really fast

00:25:21.640 --> 00:25:24.740
<v Brian Okken>because behind the scenes, you're doing lazy importing for people.

00:25:25.210 --> 00:25:27.120
<v Brian Okken>And that's essentially what Textual does.

00:25:27.680 --> 00:25:30.140
<v Brian Okken>And the implementation is like really easy.

00:25:32.120 --> 00:25:40.620
<v Brian Okken>So he's using a, basically, when you access anything, he's overriding the git adder function.

00:25:40.990 --> 00:25:45.720
<v Brian Okken>So if you access a widget, it's going to try to just grab it out of a dictionary.

00:25:46.300 --> 00:25:48.220
<v Brian Okken>And of course, right away, it's going to fail.

00:25:50.120 --> 00:25:56.480
<v Brian Okken>And then if it fails, he goes ahead and imports it and then stores it in.

00:25:56.660 --> 00:25:59.320
<v Brian Okken>So the next time somebody tries to grab it, it's going to be there.

00:26:00.160 --> 00:26:03.460
<v Brian Okken>And so there's a little bit of misdirection here.

00:26:04.860 --> 00:26:10.900
<v Brian Okken>But in the end, you get lazy loading on every widget access.

00:26:11.620 --> 00:26:12.360
<v Brian Okken>So pretty cool.

00:26:13.760 --> 00:26:16.320
<v Brian Okken>And so I thought, you know, this is pretty neat.

00:26:16.500 --> 00:26:18.140
<v Brian Okken>I don't want it just to be hidden.

00:26:18.500 --> 00:26:19.140
<v Brian Okken>It's not hidden.

00:26:19.340 --> 00:26:20.220
<v Brian Okken>It's an open source project.

00:26:20.640 --> 00:26:28.040
<v Brian Okken>So I went ahead and wrote all this up in a new post called Polite Lazy Imports for Python Package Maintainers.

00:26:28.320 --> 00:26:28.740
Very nice.

00:26:28.760 --> 00:26:35.040
<v Brian Okken>link to that also but i just thought that the implementation is totally clever and um and maybe

00:26:35.120 --> 00:26:40.260
<v Brian Okken>it's maybe for other package maintainers this is like well yeah that's the way you do it but um it

00:26:40.260 --> 00:26:45.060
<v Brian Okken>was new to me i thought it was neat so there we go also want to shout out i didn't realize there

00:26:45.060 --> 00:26:53.440
<v Brian Okken>was both git adder git adder is used for uh for if it's not found for missing items but also there's

00:26:53.460 --> 00:26:59.820
<v Brian Okken>another one called get attribute. And I did look up, I really appreciate that Trey Hunter had posted

00:27:00.120 --> 00:27:07.780
<v Brian Okken>this every Dunder method article. So pretty cool. I totally have this bookmarked so that I'm like,

00:27:08.040 --> 00:27:11.700
<v Brian Okken>if I want to understand the Dunder method in Python, I go here.

00:27:12.500 --> 00:27:17.380
<v Michael Kennedy>Yeah, very cool. I know it for classes, but for modules as well. Interesting.

00:27:18.200 --> 00:27:23.060
<v Brian Okken>Yeah, I don't think, and packages. So this is, you go ahead and throw it. Well, I guess,

00:27:23.480 --> 00:27:28.660
<v Brian Okken>It is for modules, but if you put that in a dendronit file,

00:27:28.910 --> 00:27:30.100
<v Brian Okken>then it's for your entire package.

00:27:30.460 --> 00:27:30.820
<v Brian Okken>Yeah, exactly.

00:27:31.150 --> 00:27:31.600
<v Brian Okken>It's pretty cool.

00:27:32.840 --> 00:27:33.320
<v Michael Kennedy>I love it.

00:27:33.740 --> 00:27:33.880
<v Michael Kennedy>Nice.

00:27:34.580 --> 00:27:34.760
<v Michael Kennedy>All right.

00:27:34.880 --> 00:27:35.740
<v Michael Kennedy>Is that all your extras?

00:27:36.300 --> 00:27:37.360
<v Michael Kennedy>Oh, that's just...

00:27:37.360 --> 00:27:37.920
<v Michael Kennedy>Your main thing.

00:27:38.080 --> 00:27:39.080
<v Michael Kennedy>That's my main thing.

00:27:39.460 --> 00:27:40.280
<v Michael Kennedy>What do you got for extras?

00:27:40.280 --> 00:27:40.640
<v Michael Kennedy>I do have one extra.

00:27:40.940 --> 00:27:46.460
<v Brian Okken>The one extra, so one of the things I've been doing is I've been,

00:27:47.560 --> 00:27:50.560
<v Brian Okken>you know, I paused Python people a long time ago,

00:27:51.040 --> 00:27:53.300
<v Brian Okken>And I totally stopped doing testing code.

00:27:53.620 --> 00:27:57.200
<v Brian Okken>I'm focused on this too and focused on work, but I'm also writing more.

00:27:57.580 --> 00:28:00.340
<v Brian Okken>And one of the things I'm doing is writing a book on test driven development.

00:28:01.100 --> 00:28:06.400
<v Brian Okken>And I don't have an announcement yet, but in the next couple of weeks, I think I might

00:28:06.820 --> 00:28:07.440
<v Brian Okken>have an announcement.

00:28:07.600 --> 00:28:11.180
<v Brian Okken>But if you'd like to know what, I guess what I'm going to do is I'm going to write it.

00:28:11.700 --> 00:28:15.920
<v Brian Okken>I'm going to write the book, but to motivate me and to make people not have to wait.

00:28:16.220 --> 00:28:22.400
<v Brian Okken>I'm doing it as a, like a, you know, like Manning does like the early access books and

00:28:22.660 --> 00:28:23.760
<v Brian Okken>Pragmatic has beta books.

00:28:24.420 --> 00:28:25.420
<v Brian Okken>I'm kind of doing that.

00:28:25.620 --> 00:28:28.540
<v Brian Okken>I'm doing a lean, trying to do a lean startup applied to books.

00:28:29.020 --> 00:28:34.300
<v Brian Okken>And I'm going to release it after I've got, I'm like, you know, do a rough first draft,

00:28:34.600 --> 00:28:37.380
<v Brian Okken>clean it up a little bit and then release it for every chapter.

00:28:38.000 --> 00:28:41.340
<v Brian Okken>And then as I go along, incorporate feedback from people.

00:28:41.790 --> 00:28:46.180
<v Brian Okken>And then once the whole thing is good and polished, I might bring on an editor or something

00:28:46.200 --> 00:28:47.180
<v Brian Okken>or maybe just release it.

00:28:48.360 --> 00:28:50.600
<v Brian Okken>But if you'd like to know more about that,

00:28:51.840 --> 00:28:52.720
<v Brian Okken>I'll announce it here.

00:28:52.800 --> 00:28:55.080
<v Brian Okken>But also, if you'd like to know the minute it's available,

00:28:56.000 --> 00:28:58.220
<v Brian Okken>join the newsletter over at Python Test,

00:28:58.340 --> 00:28:58.920
<v Brian Okken>and I'll let you know.

00:28:59.100 --> 00:29:01.160
<v Michael Kennedy>Yeah, we really do appreciate when you join our newsletter.

00:29:01.760 --> 00:29:03.360
<v Michael Kennedy>You might think, oh, we can just announce these things

00:29:03.440 --> 00:29:04.980
<v Michael Kennedy>on social media or on the podcast,

00:29:05.460 --> 00:29:07.360
<v Michael Kennedy>but it's not the same people.

00:29:07.400 --> 00:29:09.200
<v Michael Kennedy>A lot of people miss it because they miss an episode,

00:29:09.540 --> 00:29:12.300
<v Michael Kennedy>or social media is just a screaming feed of stuff.

00:29:12.780 --> 00:29:13.500
<v Michael Kennedy>It really makes a difference.

00:29:13.680 --> 00:29:14.420
<v Michael Kennedy>So join the newsletter.

00:29:15.060 --> 00:29:19.420
<v Brian Okken>Also, I want to talk about there's newsletters and then there's newsletters.

00:29:20.160 --> 00:29:24.820
<v Brian Okken>So this isn't really – I don't do a weekly eight tips on testing.

00:29:24.930 --> 00:29:25.540
<v Brian Okken>That would be cool.

00:29:25.650 --> 00:29:26.880
<v Brian Okken>I just don't have time to do that.

00:29:28.760 --> 00:29:32.060
<v Brian Okken>So it's mostly announcements if there's something to keep track of.

00:29:32.430 --> 00:29:37.920
<v Brian Okken>But people like you and me and others, we're using things like – I'm using Kit, but there's others.

00:29:39.220 --> 00:29:40.820
<v Brian Okken>I've used other email things before.

00:29:41.260 --> 00:29:43.100
<v Brian Okken>I don't keep track of who's subscribed.

00:29:43.220 --> 00:29:45.260
<v Brian Okken>So I'm not going to sell this to anybody or anything.

00:29:45.800 --> 00:29:47.300
<v Brian Okken>It's just an announcement thing.

00:29:47.500 --> 00:29:48.900
<v Brian Okken>And you can unsubscribe anytime.

00:29:49.120 --> 00:29:50.000
<v Brian Okken>And I don't even know.

00:29:50.300 --> 00:29:52.240
<v Brian Okken>Like once you're unsubscribed, you're gone.

00:29:52.280 --> 00:29:53.740
<v Brian Okken>I don't have the access to that.

00:29:53.980 --> 00:30:00.440
<v Brian Okken>So there's people that abuse newsletters and people that I don't think there's a lot of people in the Python tech space that do, though.

00:30:00.660 --> 00:30:02.360
<v Brian Okken>So it's not spammy.

00:30:02.460 --> 00:30:03.780
<v Brian Okken>Anyway, moving on.

00:30:03.860 --> 00:30:04.980
<v Brian Okken>Do you have any extras for us?

00:30:05.200 --> 00:30:06.220
<v Michael Kennedy>I actually have a couple.

00:30:07.040 --> 00:30:08.560
<v Michael Kennedy>Let's jump over and hear about it.

00:30:08.980 --> 00:30:09.880
<v Michael Kennedy>Very exciting news.

00:30:10.280 --> 00:30:13.480
<v Michael Kennedy>I am really happy with this new course that I created called

00:30:13.780 --> 00:30:17.180
<v Michael Kennedy>Agentic AI Programming for Python Devs and Data Scientists.

00:30:17.760 --> 00:30:18.060
Cool.

00:30:18.400 --> 00:30:24.300
<v Michael Kennedy>Yeah, and the idea is basically, so we have these agentic AI tools

00:30:24.620 --> 00:30:28.060
<v Michael Kennedy>like Claude Code and Cursor and Juni and all of them,

00:30:28.280 --> 00:30:31.060
<v Michael Kennedy>but how do you actually be successful with them, right?

00:30:31.400 --> 00:30:33.980
<v Michael Kennedy>I've talked a few times about just insane productivity

00:30:34.500 --> 00:30:36.180
<v Michael Kennedy>and really good outcomes that I've had,

00:30:36.180 --> 00:30:38.120
<v Michael Kennedy>and people are like, how are you doing that?

00:30:38.820 --> 00:30:45.440
<v Michael Kennedy>So this course is like a real world set of guidelines and examples and best practices

00:30:46.040 --> 00:30:47.280
<v Michael Kennedy>for working with agentic AI.

00:30:47.490 --> 00:30:51.460
<v Michael Kennedy>So build, spend an hour building like a really detailed application.

00:30:52.280 --> 00:30:56.460
<v Michael Kennedy>But we also, it also talks like almost for an hour about like guardrails and roadmaps

00:30:56.620 --> 00:30:58.980
<v Michael Kennedy>and how do you get it to do exactly what you want.

00:30:59.020 --> 00:31:02.780
<v Michael Kennedy>You're like, when I say build an app, don't just build the app, but build it with uv,

00:31:03.380 --> 00:31:06.820
<v Michael Kennedy>write high test tests, format it with rough, with this Tommel.

00:31:07.200 --> 00:31:10.160
You don't have to do any, you don't have to, but you know, like how do you get it to give

00:31:10.220 --> 00:31:11.160
<v Michael Kennedy>you what you want?

00:31:11.520 --> 00:31:15.520
<v Michael Kennedy>Not something in the vague general space of what you asked for.

00:31:15.520 --> 00:31:16.040
<v Michael Kennedy>You know what I mean?

00:31:16.360 --> 00:31:20.040
<v Michael Kennedy>So sort of a practical agentic AI programming course.

00:31:20.140 --> 00:31:23.860
<v Michael Kennedy>So I really, I'm getting like crazy amounts of good feedback on this course.

00:31:24.020 --> 00:31:25.000
<v Michael Kennedy>So people check it out.

00:31:25.160 --> 00:31:27.100
<v Michael Kennedy>The link is in the, in the show notes.

00:31:27.300 --> 00:31:30.180
<v Michael Kennedy>I think it's talkpython.fm dash slash agentic dash AI.

00:31:30.540 --> 00:31:31.180
<v Michael Kennedy>So that one's fun.

00:31:31.600 --> 00:31:31.800
<v Michael Kennedy>What else?

00:31:31.980 --> 00:31:35.760
<v Michael Kennedy>I'm also going to be on talking with Hugo Bowen Anderson.

00:31:37.040 --> 00:31:40.020
<v Michael Kennedy>He's running the Vanishing Gradients podcast.

00:31:40.360 --> 00:31:42.480
<v Michael Kennedy>He was on Talk Python a while ago,

00:31:42.820 --> 00:31:44.580
<v Michael Kennedy>and now I'm going to be on his show,

00:31:44.920 --> 00:31:46.440
<v Michael Kennedy>Data Science Meets Agentec AI.

00:31:47.360 --> 00:31:50.140
<v Michael Kennedy>Sort of a follow-up from my Talk Python in production book,

00:31:50.940 --> 00:31:52.160
<v Michael Kennedy>plus this course I just talked about.

00:31:52.220 --> 00:31:53.120
<v Michael Kennedy>Those are those kind of ideas.

00:31:53.260 --> 00:31:54.620
<v Michael Kennedy>We're going to spend some time riffing on that.

00:31:54.700 --> 00:31:56.800
<v Michael Kennedy>So that's tomorrow night US time.

00:31:57.120 --> 00:31:58.420
<v Michael Kennedy>So check that out.

00:31:58.740 --> 00:32:01.740
<v Michael Kennedy>All right. Also, OpenAI introduced

00:32:01.820 --> 00:32:05.120
<v Michael Kennedy>an AI browser wrapping Google Chrome called Atlas.

00:32:05.600 --> 00:32:06.400
<v Michael Kennedy>This is interesting.

00:32:06.760 --> 00:32:07.700
<v Michael Kennedy>I played with it.

00:32:08.220 --> 00:32:09.080
<v Michael Kennedy>I'm not convinced yet.

00:32:09.140 --> 00:32:09.960
<v Michael Kennedy>I mean, it's kind of fine.

00:32:10.559 --> 00:32:11.140
<v Michael Kennedy>I don't know.

00:32:11.140 --> 00:32:12.480
<v Michael Kennedy>I don't even know what to think about these things.

00:32:12.840 --> 00:32:13.740
<v Michael Kennedy>That's not why I included it.

00:32:13.960 --> 00:32:15.500
<v Michael Kennedy>Maybe it's sort of interesting as a side note.

00:32:15.580 --> 00:32:17.720
<v Michael Kennedy>But I linked to the Ars Technica article.

00:32:18.120 --> 00:32:19.500
<v Michael Kennedy>Holy smokes, you guys.

00:32:19.940 --> 00:32:20.600
<v Michael Kennedy>Check out the comments.

00:32:21.080 --> 00:32:22.440
<v Michael Kennedy>They are not loving it.

00:32:23.260 --> 00:32:25.040
<v Michael Kennedy>And it's not OpenAI's fault exactly.

00:32:25.740 --> 00:32:30.980
<v Michael Kennedy>It's just this idea of AI taking over everything is not.

00:32:32.000 --> 00:32:34.220
<v Michael Kennedy>At least if there's not everyone hating on it,

00:32:34.500 --> 00:32:36.860
<v Michael Kennedy>there's a very vocal group of people who don't love it.

00:32:37.150 --> 00:32:40.100
<v Michael Kennedy>So, and I just noticed that Kyle Orland wrote this

00:32:40.190 --> 00:32:42.060
<v Michael Kennedy>and he actually wrote a whole book on Minesweeper,

00:32:42.150 --> 00:32:43.460
<v Michael Kennedy>which, you know, props to him for that.

00:32:43.590 --> 00:32:45.480
<v Brian Okken>But check out the- - Oh, that's awesome.

00:32:45.480 --> 00:32:47.000
<v Brian Okken>I gotta check that out.

00:32:47.000 --> 00:32:49.260
<v Michael Kennedy>- I'm like, geez, it's been a long time

00:32:49.260 --> 00:32:50.560
<v Michael Kennedy>to thought about Minesweeper.

00:32:50.560 --> 00:32:53.420
<v Michael Kennedy>Anyway, this is actually just a really interesting

00:32:53.420 --> 00:32:54.800
<v Michael Kennedy>cultural like touch point, I think.

00:32:54.800 --> 00:32:55.820
<v Michael Kennedy>So people can check that out.

00:32:55.880 --> 00:32:59.080
<v Michael Kennedy>All right, James Abel, one of the,

00:32:59.080 --> 00:33:01.840
<v Michael Kennedy>I think he was behind Pi Bay this year, but yeah.

00:33:01.840 --> 00:33:03.500
<v Michael Kennedy>In the San Francisco area said,

00:33:03.600 --> 00:33:07.040
<v Michael Kennedy>Hey, we somehow we were talking about dunder name.

00:33:07.360 --> 00:33:10.100
<v Michael Kennedy>If dunder name equals dunder main today, I have a package.

00:33:10.300 --> 00:33:11.000
<v Michael Kennedy>It's real, real simple.

00:33:11.680 --> 00:33:15.180
<v Michael Kennedy>But instead of writing this, if you want to like get people started, you can just

00:33:15.540 --> 00:33:20.600
<v Michael Kennedy>import my thing and say, if is main as a simpler, saner way, it should, that maybe

00:33:20.640 --> 00:33:22.180
<v Michael Kennedy>should be a built in, don't you think?

00:33:22.820 --> 00:33:23.160
<v Michael Kennedy>Python.

00:33:23.620 --> 00:33:23.920
Yeah.

00:33:24.140 --> 00:33:28.200
Or what I would rather see is if isn't main, here's what I would like to see, but

00:33:28.200 --> 00:33:30.540
<v Michael Kennedy>I don't know that Python has a mechanism for it.

00:33:30.760 --> 00:33:35.600
<v Michael Kennedy>I would like to say at the top, something to the effect of register this function as

00:33:36.140 --> 00:33:42.120
me, and then when it's done parsing the file, then it runs it because even this,

00:33:42.360 --> 00:33:46.640
<v Michael Kennedy>which is super helpful, it's still, if you accidentally put code below it, it's a

00:33:46.740 --> 00:33:47.320
<v Michael Kennedy>problem, you know what I mean?

00:33:47.320 --> 00:33:50.660
<v Michael Kennedy>I would like Python to enforce, like we'd load the whole file and then it runs

00:33:50.780 --> 00:33:51.880
<v Michael Kennedy>like a cool mechanism for that.

00:33:51.910 --> 00:33:52.860
<v Michael Kennedy>But still, this is pretty nice.

00:33:53.240 --> 00:33:57.520
<v Michael Kennedy>And at first I thought I was just like wrapping if name is main, right?

00:33:57.800 --> 00:34:00.940
<v Michael Kennedy>But in fact, it's like doing some a little bit different here.

00:34:01.660 --> 00:34:05.980
<v Michael Kennedy>It's using the inspect stack to go back and then look at the value.

00:34:06.650 --> 00:34:10.280
<v Michael Kennedy>Because obviously, it itself is not main, so it can't do that test.

00:34:10.480 --> 00:34:11.460
<v Michael Kennedy>So I don't know, kind of cute.

00:34:12.059 --> 00:34:12.419
<v Michael Kennedy>Yeah.

00:34:12.860 --> 00:34:16.179
<v Michael Kennedy>If you don't want to have a dependency on this library,

00:34:16.230 --> 00:34:20.139
<v Michael Kennedy>you could take that line of code and put it somewhere as a utility class in yours.

00:34:20.320 --> 00:34:22.580
<v Brian Okken>But, okay, I'm just going to throw this out there.

00:34:22.700 --> 00:34:25.919
<v Brian Okken>If you want to do something really fast, make sure you time this.

00:34:26.240 --> 00:34:30.580
<v Brian Okken>Because every time I've added inspect, I love the inspect library.

00:34:30.669 --> 00:34:33.340
<v Brian Okken>But whenever I add it, it slows things down.

00:34:33.740 --> 00:34:34.320
<v Brian Okken>Okay.

00:34:35.460 --> 00:34:36.500
<v Brian Okken>Just benchmark.

00:34:38.060 --> 00:34:38.580
<v Brian Okken>Benchmark it.

00:34:38.940 --> 00:34:39.120
<v Brian Okken>All right.

00:34:39.240 --> 00:34:39.780
<v Brian Okken>Benchmark it.

00:34:40.879 --> 00:34:41.060
<v Michael Kennedy>All right.

00:34:41.120 --> 00:34:41.479
<v Michael Kennedy>Inline.

00:34:42.139 --> 00:34:42.360
<v Michael Kennedy>All right.

00:34:43.179 --> 00:34:47.399
<v Michael Kennedy>If you're an IntelliJ person like PyCharm, wouldn't it be nice, Brian?

00:34:47.710 --> 00:34:53.460
<v Michael Kennedy>Wouldn't it be incredible if while you're working, a little pet could walk around in the bottom?

00:34:53.540 --> 00:34:56.899
<v Michael Kennedy>Anthony Shaw, I believe, is the one who added this to VS Code.

00:34:57.280 --> 00:34:57.400
<v Michael Kennedy>Yeah.

00:34:57.800 --> 00:34:59.620
<v Michael Kennedy>PyCharm people can love animals too.

00:35:00.320 --> 00:35:02.840
<v Michael Kennedy>So you could install the pet into your PyCharm now.

00:35:03.080 --> 00:35:03.420
<v Michael Kennedy>Oh, cool.

00:35:03.920 --> 00:35:04.000
<v Michael Kennedy>Nice.

00:35:04.420 --> 00:35:05.440
<v Michael Kennedy>I don't know that I'm going to be doing it.

00:35:05.960 --> 00:35:07.060
<v Michael Kennedy>This is a last minute edition.

00:35:07.250 --> 00:35:09.980
<v Michael Kennedy>I just got a brand new M5 iPad.

00:35:10.210 --> 00:35:10.980
<v Michael Kennedy>How insane is that?

00:35:11.360 --> 00:35:13.680
<v Michael Kennedy>I've had the last one I had, I got five years ago.

00:35:13.730 --> 00:35:14.740
<v Michael Kennedy>I'm like, it's probably time.

00:35:14.790 --> 00:35:19.100
<v Michael Kennedy>And I got a 13-inch iPad Pro, which is an insanely large iPad.

00:35:19.760 --> 00:35:23.160
<v Michael Kennedy>But I started using it as the second monitor for my laptop.

00:35:23.200 --> 00:35:26.020
<v Michael Kennedy>if I'm traveling or if I'm at a coffee shop or something.

00:35:26.170 --> 00:35:27.600
<v Michael Kennedy>And that's a super cool experience.

00:35:27.800 --> 00:35:28.840
<v Michael Kennedy>Just put them side by side.

00:35:29.240 --> 00:35:30.660
<v Michael Kennedy>If they're on the same network or the cable,

00:35:31.100 --> 00:35:34.940
<v Michael Kennedy>they just do real, real low latency, dual monitor stuff.

00:35:35.260 --> 00:35:36.000
<v Michael Kennedy>And yeah, it's pretty neat.

00:35:36.100 --> 00:35:37.080
<v Brian Okken>So just a little shout out to that.

00:35:37.340 --> 00:35:38.220
<v Brian Okken>That's incredible.

00:35:38.480 --> 00:35:41.580
<v Brian Okken>It's like having a new laptop, a second laptop

00:35:41.750 --> 00:35:43.220
<v Brian Okken>for the price of a second laptop.

00:35:43.700 --> 00:35:44.140
<v Michael Kennedy>Yes, it is.

00:35:44.210 --> 00:35:44.940
<v Michael Kennedy>But here's the thing.

00:35:46.180 --> 00:35:47.020
<v Michael Kennedy>Yes, I agree.

00:35:47.230 --> 00:35:48.660
<v Michael Kennedy>But it's also a really nice reading device,

00:35:49.110 --> 00:35:50.320
<v Michael Kennedy>which I do a lot of reading and stuff.

00:35:50.500 --> 00:35:52.940
And I was going to get one of the cheaper ones.

00:35:53.440 --> 00:35:57.800
<v Michael Kennedy>One of the things that drives me, I have a MacBook Air as my main laptop computer and

00:35:57.840 --> 00:35:58.900
<v Michael Kennedy>the same chip for my main computer.

00:35:58.960 --> 00:36:04.040
<v Michael Kennedy>I don't have a high end computer and it's plenty good for Docker stuff or programming

00:36:04.160 --> 00:36:05.020
<v Michael Kennedy>stuff, all these things.

00:36:05.140 --> 00:36:06.140
<v Michael Kennedy>It's totally fine.

00:36:06.280 --> 00:36:07.000
<v Michael Kennedy>But here's the thing.

00:36:07.260 --> 00:36:13.400
<v Michael Kennedy>The iPad Air, while great, it's peak brightness is something like five or 600 nits.

00:36:13.760 --> 00:36:17.120
<v Michael Kennedy>And if you're working, like I like to work in my back outside area in the summer, like

00:36:17.180 --> 00:36:18.460
<v Michael Kennedy>that's kind of not relevant right now.

00:36:18.520 --> 00:36:22.220
<v Michael Kennedy>But in general, you know, sit outside, enjoy the weather, get out of the office.

00:36:22.760 --> 00:36:26.160
<v Michael Kennedy>And if it's at all bright through a window or somewhere, it's like really a pain.

00:36:26.440 --> 00:36:30.360
<v Michael Kennedy>This thing is like the best screen you can buy on a Mac, period, whatever.

00:36:30.880 --> 00:36:31.800
<v Michael Kennedy>And it's a thousand nits.

00:36:32.020 --> 00:36:36.380
<v Michael Kennedy>So you could push the computer to the side and just put the laptop in front of you and

00:36:36.440 --> 00:36:36.880
<v Michael Kennedy>type on it.

00:36:36.940 --> 00:36:37.620
<v Michael Kennedy>It's really nice.

00:36:37.940 --> 00:36:39.260
<v Michael Kennedy>Anyway, that's the main reason.

00:36:39.340 --> 00:36:41.560
<v Michael Kennedy>I want a brighter screen without having a MacBook Pro.

00:36:41.880 --> 00:36:46.640
<v Brian Okken>I feel so bad for you having to deal with like working outside in such bright light.

00:36:47.300 --> 00:36:47.960
<v Michael Kennedy>It's really horrible.

00:36:48.240 --> 00:36:48.460
<v Michael Kennedy>I know.

00:36:48.560 --> 00:36:49.000
<v Michael Kennedy>You should really.

00:36:50.240 --> 00:36:50.680
<v Michael Kennedy>It's hard.

00:36:50.840 --> 00:36:51.460
<v Michael Kennedy>It's hard doing me.

00:36:52.460 --> 00:36:52.780
<v Brian Okken>All right.

00:36:54.300 --> 00:36:55.140
<v Michael Kennedy>Carrying on with the jokes.

00:36:55.340 --> 00:36:55.640
<v Michael Kennedy>No, go ahead.

00:36:55.820 --> 00:37:01.060
<v Brian Okken>Well, before we get to the joke, I wanted to, I guess, highlight, going back to my announcement

00:37:01.160 --> 00:37:02.200
<v Brian Okken>of possibly a book.

00:37:05.340 --> 00:37:07.980
<v Brian Okken>Japanol7 says, a TDD book by Brian.

00:37:08.260 --> 00:37:08.680
<v Brian Okken>Can't wait.

00:37:08.900 --> 00:37:11.320
<v Brian Okken>Also, Talk Python training courses are great.

00:37:11.460 --> 00:37:11.660
<v Brian Okken>Kudos.

00:37:12.180 --> 00:37:12.280
<v Brian Okken>Yeah.

00:37:12.820 --> 00:37:13.160
<v Brian Okken>I'm awesome.

00:37:13.720 --> 00:37:13.800
<v Brian Okken>Yeah.

00:37:13.880 --> 00:37:17.280
<v Brian Okken>I'm looking forward to getting that book out, and I'm looking forward to that AI course

00:37:17.280 --> 00:37:17.480
<v Brian Okken>of yours.

00:37:18.160 --> 00:37:19.320
<v Michael Kennedy>Yeah, same.

00:37:20.720 --> 00:37:21.000
<v Brian Okken>All right.

00:37:21.780 --> 00:37:23.620
<v Michael Kennedy>I'm not looking forward to surgery, I'll tell you what.

00:37:23.920 --> 00:37:25.020
<v Michael Kennedy>And it's getting to be weird, Brian.

00:37:25.330 --> 00:37:28.580
<v Michael Kennedy>I mean, like doctors using AI and stuff.

00:37:28.740 --> 00:37:32.120
<v Michael Kennedy>Actually, we probably are going to get better diagnoses as for certain things.

00:37:32.300 --> 00:37:32.680
Oh, dear.

00:37:33.140 --> 00:37:34.900
<v Michael Kennedy>But here's a surgeon situation.

00:37:35.600 --> 00:37:38.380
<v Michael Kennedy>There's a person who just, they're in post-op, okay?

00:37:38.510 --> 00:37:42.500
<v Michael Kennedy>They're laying there like, oh, man, a little woozy from the anesthesia coming out of it.

00:37:42.730 --> 00:37:47.840
<v Michael Kennedy>And the doctor, which is a robot with a ChatGPT-like, I don't think it's, is it the same?

00:37:48.020 --> 00:37:55.520
<v Michael Kennedy>know something an ai logo for a robot face and the patient says but why is the scar on the left

00:37:55.670 --> 00:38:00.240
<v Michael Kennedy>if the appendix is on the right the ai surgeon says you're absolutely right let me try that one

00:38:00.240 --> 00:38:10.180
<v Michael Kennedy>more time please don't try it one more time it's so bad it's pretty bad it's pretty funny that

00:38:10.420 --> 00:38:14.860
<v Brian Okken>actually drives me nuts when when i'm like this doesn't sound right is this you know

00:38:15.700 --> 00:38:17.420
<v Michael Kennedy>The user is pointing out I've made a mistake.

00:38:17.970 --> 00:38:18.660
<v Brian Okken>Oh, you're right.

00:38:18.860 --> 00:38:18.940
<v Brian Okken>Yeah.

00:38:19.580 --> 00:38:19.880
<v Brian Okken>Oh, well.

00:38:20.780 --> 00:38:20.960
<v Brian Okken>Yeah.

00:38:22.740 --> 00:38:25.460
<v Michael Kennedy>So, yeah, just get a second opinion.

00:38:25.980 --> 00:38:28.680
<v Michael Kennedy>So if opening is going to operate on you,

00:38:29.400 --> 00:38:31.840
<v Michael Kennedy>have Anthropic be the backup, I guess, is the moral of the story.

00:38:31.840 --> 00:38:32.280
<v Michael Kennedy>I don't know.

00:38:33.340 --> 00:38:34.880
<v Brian Okken>I don't think that's the moral of the story.

00:38:34.880 --> 00:38:35.640
<v Michael Kennedy>You don't think so?

00:38:36.080 --> 00:38:36.420
<v Michael Kennedy>Okay.

00:38:36.760 --> 00:38:38.120
<v Brian Okken>Maybe somebody trained in medicine.

00:38:39.380 --> 00:38:40.300
<v Michael Kennedy>Trained on medicine?

00:38:40.580 --> 00:38:41.240
<v Michael Kennedy>I'm sure they are.

00:38:43.100 --> 00:38:44.680
<v Brian Okken>Trained with heavy medication.

00:38:45.260 --> 00:38:45.640
<v Michael Kennedy>Yeah, exactly.

00:38:47.080 --> 00:38:47.560
<v Brian Okken>All right, cool.

00:38:47.720 --> 00:38:48.600
<v Michael Kennedy>Well, fun as always.

00:38:49.140 --> 00:38:50.320
<v Brian Okken>Well, definitely fun as always.

00:38:50.660 --> 00:38:52.440
<v Brian Okken>And we'll see everybody next week.

