WEBVTT

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

00:00:06.240 --> 00:00:11.340
This is episode 448, recorded September 8th, 2025.

00:00:12.000 --> 00:00:12.600
I'm Michael Kennedy.

00:00:12.960 --> 00:00:13.820
And I'm Brian Okken.

00:00:14.840 --> 00:00:16.320
September. Reminds me of Green Day.

00:00:16.760 --> 00:00:18.280
Brian, a little Green Day song.

00:00:18.540 --> 00:00:20.120
You know, wake me when September's over.

00:00:20.420 --> 00:00:21.120
Can't believe it's September.

00:00:21.380 --> 00:00:22.940
Listen to Green Day for a while. Yeah.

00:00:23.160 --> 00:00:23.620
I know. Well.

00:00:24.000 --> 00:00:24.540
Now I got to.

00:00:24.880 --> 00:00:25.760
Now you got to.

00:00:26.220 --> 00:00:28.700
All right. So this episode is brought to you by us.

00:00:29.140 --> 00:00:32.380
support all of our things, even our archived podcasts,

00:00:32.759 --> 00:00:34.540
for those of us who have archived podcasts.

00:00:34.760 --> 00:00:37.980
But courses, books, you know about them by now.

00:00:38.140 --> 00:00:43.340
But it genuinely really supports the show when you use our things.

00:00:43.740 --> 00:00:44.540
We really apprekiate it.

00:00:44.800 --> 00:00:49.660
If you want to watch live, just pythonbytes.fm/live.

00:00:50.060 --> 00:00:50.820
We'll take you right there.

00:00:50.880 --> 00:00:52.460
If you went there right now, the YouTube video,

00:00:52.600 --> 00:00:55.440
I believe it's even playing right there as we speak.

00:00:55.740 --> 00:00:56.440
You go there afterwards.

00:00:56.980 --> 00:00:57.540
It's just a picture.

00:00:57.600 --> 00:00:58.420
It says rough line.

00:00:58.520 --> 00:00:58.820
Click it.

00:00:59.100 --> 00:01:00.460
It'll take you to all the recordings.

00:01:01.060 --> 00:01:02.240
So really apprekiate that.

00:01:02.360 --> 00:01:05.700
Of course, the audio on the podcast version is edited.

00:01:05.980 --> 00:01:09.540
This is the live uncut bootleg version, if you will.

00:01:09.880 --> 00:01:10.620
So very fun.

00:01:11.000 --> 00:01:12.360
And subscribe to the newsletter.

00:01:13.120 --> 00:01:17.380
Brian's putting a lot of work into getting a really nice extra info sort of thing.

00:01:17.640 --> 00:01:21.680
Background info, more info, not just a summary of links for every episode.

00:01:21.940 --> 00:01:24.200
So there's more to get from the email as well.

00:01:24.540 --> 00:01:28.000
Now, Brian, I'm interested to see what more you got for us.

00:01:28.040 --> 00:01:28.480
Let's start there.

00:01:28.940 --> 00:01:36.500
Well, I do want to talk about prek, but first I want to talk about the newsletter just for a second because you always give me credit, but it is a joint effort.

00:01:36.820 --> 00:01:41.000
We're both doing work to get that newsletter out, so I apprekiate it.

00:01:41.380 --> 00:01:41.760
You're welcome.

00:01:42.040 --> 00:01:43.440
Yeah, I'm really glad how it's turning out.

00:01:44.500 --> 00:01:47.200
Okay, so let's switch to prek.

00:01:49.000 --> 00:01:57.420
prek is a pre-commit thing, and in episode 447, we talked about pre-commit, and actually, again, we've talked about it a bunch.

00:01:57.480 --> 00:02:00.080
but recently it was on 447.

00:02:00.520 --> 00:02:03.800
We talked about using uv to help make things faster.

00:02:04.220 --> 00:02:06.820
So that was on the going down a rat hole episode.

00:02:07.580 --> 00:02:10.960
So, but somebody, lots of people actually,

00:02:11.100 --> 00:02:16.600
but the one I have bookmarked was Owen Lamont said,

00:02:16.700 --> 00:02:19.600
hey, here's another dev tool you might want to check out.

00:02:19.880 --> 00:02:20.380
It's prek.

00:02:20.700 --> 00:02:22.580
It's pre-commit, re-implemented, and Rust.

00:02:23.140 --> 00:02:25.080
And, you know, we're kind of used to that, right?

00:02:25.140 --> 00:02:29.100
We got a lot of tools that are re-implemented in Rust, so why not check it out?

00:02:29.400 --> 00:02:32.880
So prek is, I tried it out this morning.

00:02:33.600 --> 00:02:34.480
It's pretty cool, actually.

00:02:34.780 --> 00:02:36.580
So prek is pre-commit with Rust.

00:02:38.040 --> 00:02:42.320
There's a warning on the site that says, hey, it's not production ready yet.

00:02:42.580 --> 00:02:45.960
A few subcommands and languages are still in the works.

00:02:46.960 --> 00:02:50.960
And so as a reminder, pre-commit is not just for Python.

00:02:51.160 --> 00:02:53.080
Pre-commit does other languages, too.

00:02:53.160 --> 00:02:57.500
It's sort of a general purpose pre-commit tool that you can configure, get pre-commit hooks.

00:02:59.760 --> 00:03:04.040
So there's actually quite a few things you can do with pre-commit.

00:03:04.200 --> 00:03:07.540
But PRAC is pretty cool, and I checked it out.

00:03:08.040 --> 00:03:10.040
The projects that I traded on worked fine.

00:03:10.940 --> 00:03:12.780
So why do we care about this?

00:03:12.900 --> 00:03:17.500
Because pre-commit, what it does is it downloads these extra tools to run against your repo.

00:03:18.000 --> 00:03:21.960
But that download time, it caches that stuff.

00:03:22.020 --> 00:03:29.320
So there were a lot of people talking about how fast it is for its faster install and stuff.

00:03:29.710 --> 00:03:34.760
And I do care about the 10x faster install and a third of the disk space.

00:03:35.080 --> 00:03:36.200
Less disk space is nice.

00:03:36.770 --> 00:03:38.320
So it's got smaller cache, apparently.

00:03:38.760 --> 00:03:43.680
But when you're using pre-commit a lot, the install time isn't what you care about.

00:03:43.740 --> 00:03:46.720
It's the runtime when you're actually running the tool.

00:03:46.790 --> 00:03:48.200
So I did check that out.

00:03:48.740 --> 00:03:51.200
So right out of the box, it was significantly faster.

00:03:51.260 --> 00:04:02.640
If you just turn on a few, the default pre-commit hooks, I noticed that it was a second and a half or something like that to run it through pre-commit with uv.

00:04:04.980 --> 00:04:07.680
But it's not going to really be much of a difference after everything's installed.

00:04:08.060 --> 00:04:13.340
And then Preq was like, I don't know, less than half a second or something.

00:04:13.640 --> 00:04:17.320
So it was significantly faster, but it's in those little tiny ranges.

00:04:17.859 --> 00:04:21.359
So I did check it out with, what do I, I've got tabs up.

00:04:22.440 --> 00:04:26.160
There's some, oh, I'll come back to this.

00:04:26.680 --> 00:04:28.500
But I checked it out on a larger project.

00:04:28.760 --> 00:04:31.360
So I do contribute to pytest once in a while.

00:04:31.760 --> 00:04:36.400
And pytest has a bunch of pre-commit hooks and other things set up.

00:04:36.500 --> 00:04:40.240
And it takes, I don't know, four and a half seconds to run all the pre-commit hooks for

00:04:40.380 --> 00:04:41.440
pytest on my machine.

00:04:42.700 --> 00:04:44.420
And that's after a warm cache.

00:04:45.540 --> 00:04:47.460
So with PRAC, that should be faster, right?

00:04:47.540 --> 00:04:49.620
And it was faster, but it was like three and a half seconds.

00:04:50.060 --> 00:04:55.060
So it's still, it is faster, but percentage wise, I'm not sure if it's worth jump.

00:04:55.210 --> 00:04:55.940
I mean, sure.

00:04:56.080 --> 00:04:56.360
Why not?

00:04:56.580 --> 00:04:57.500
It's worth jumping.

00:04:57.940 --> 00:05:03.780
Now that said, if you're running pre-commit in CI, then the install time really matters.

00:05:04.240 --> 00:05:06.880
And, and you do want as fast as you can get.

00:05:07.020 --> 00:05:10.620
So I would say if you're running pre-commit hooks in, in CI, yeah, yeah.

00:05:10.920 --> 00:05:11.700
Use, use prek.

00:05:12.100 --> 00:05:13.900
I, but I like the idea.

00:05:14.040 --> 00:05:17.140
So one of the things that they, they've got some, some cool improvements anyway,

00:05:17.240 --> 00:05:24.640
even if it's just not speed so they um uh it's faster to download but um uh it's it's they want

00:05:24.680 --> 00:05:29.100
it to be completely as a drop-in so everywhere you would say pre-commit you would just say prac

00:05:29.420 --> 00:05:33.240
and that's cool so you don't have to learn something new kind of a cheat code on their

00:05:33.480 --> 00:05:37.420
their part too they don't have to write documentation um or too much documentation

00:05:37.860 --> 00:05:42.979
it's just everything it did um but there's some cool things that they didn't like about uh

00:05:43.000 --> 00:05:49.100
pre-commit that they add like fix so uh you can do a --directory and it runs hooks for

00:05:49.370 --> 00:05:55.360
the specified directory apparently there was a an old thing of ls files in a dur and then pass it to

00:05:55.540 --> 00:06:01.020
x args to pre-commit oh that's painful so cool that you can pass it on a directory uh also you

00:06:01.020 --> 00:06:06.499
can say run --last commit so after you've committed you're like oh what were my uh pre-commit

00:06:06.660 --> 00:06:07.520
I forgot to run them.

00:06:07.740 --> 00:06:08.680
You can run that.

00:06:08.840 --> 00:06:09.400
That's pretty neat.

00:06:10.260 --> 00:06:13.180
And then you can actually select hooks.

00:06:13.360 --> 00:06:13.880
That's pretty neat.

00:06:14.440 --> 00:06:17.500
And then if you forgot what all the hooks are that you've installed and what they do,

00:06:17.720 --> 00:06:22.740
there's a list command that looks at the available hooks and IDs and descriptions.

00:06:23.220 --> 00:06:23.540
Pretty cool.

00:06:23.640 --> 00:06:24.140
I like that.

00:06:24.300 --> 00:06:26.960
Or just run a specific hook if you want to run a specific.

00:06:27.280 --> 00:06:31.340
These are actually great additions and pre-commit maybe might want to think about putting those

00:06:31.340 --> 00:06:31.440
in.

00:06:31.660 --> 00:06:32.380
But I liked it.

00:06:32.520 --> 00:06:36.460
If they're going to steal our API CLI interface,

00:06:36.600 --> 00:06:38.180
we're going to steal back some good ideas.

00:06:38.820 --> 00:06:39.880
Yeah, why not?

00:06:40.600 --> 00:06:43.620
One of the things, the speedup that I thought was a cool idea

00:06:43.940 --> 00:06:46.400
was if they're already implementing things in Rust,

00:06:46.640 --> 00:06:48.680
there's a whole bunch of common ones that can be

00:06:49.899 --> 00:06:54.120
go ahead and put those in to Prack directly.

00:06:54.900 --> 00:06:57.720
And so there's a handful of them so far.

00:06:58.020 --> 00:06:59.280
This is a fairly new project.

00:06:59.400 --> 00:07:02.820
So it could be that these are faster.

00:07:03.160 --> 00:07:08.540
I actually kind of like that one of the reasons why I'm highlighting this isn't just so that

00:07:08.540 --> 00:07:14.820
we can talk about something faster for pre-commit, but it's also it's yet another Rust tool that

00:07:14.880 --> 00:07:17.620
has been rewritten in Rust that might be a good example.

00:07:17.920 --> 00:07:21.860
And this is sort of looking at a bunch of files and parsing files.

00:07:22.640 --> 00:07:27.360
And that's a pretty common thing that Python's not bad at, but not fast at.

00:07:27.600 --> 00:07:28.540
And Rust is fast.

00:07:28.700 --> 00:07:31.580
So here's another good example for taking a look at.

00:07:32.000 --> 00:07:33.240
So like end of file checks.

00:07:34.260 --> 00:07:36.740
One of the things that I, the fix end of file thing,

00:07:36.880 --> 00:07:38.320
and that's with like, you know,

00:07:38.740 --> 00:07:42.500
or making sure there's a end of file indicator

00:07:42.580 --> 00:07:44.460
at the end of the, I don't know what that checks were actually.

00:07:44.940 --> 00:07:46.320
But trailing white space, for instance,

00:07:46.600 --> 00:07:47.420
there's trailing white space.

00:07:47.600 --> 00:07:49.260
And then there's whether you have new lines

00:07:49.420 --> 00:07:50.720
or carriage returns and stuff.

00:07:51.100 --> 00:07:54.560
A lot of these checks, I noticed that, you know,

00:07:54.900 --> 00:07:56.280
I rely on rough.

00:07:56.440 --> 00:08:02.640
So I would love to hear from people of like, while you're now using rough and pre-commit

00:08:02.780 --> 00:08:07.960
hooks, what pre-commit hooks are you using that aren't already built into like rough and

00:08:08.020 --> 00:08:08.660
things like that?

00:08:08.940 --> 00:08:12.160
So if anybody's got a list of that, I'd love to love to see that.

00:08:12.340 --> 00:08:14.140
So that's, yeah, that's it.

00:08:14.260 --> 00:08:21.259
I did want to shout out also to Viet, I think, Veit, sorry, Veit, however you pronounce your

00:08:21.280 --> 00:08:29.980
name, VEIT, recommended that if you're going to check the timing, he listed on Bluesky,

00:08:30.290 --> 00:08:35.520
and we're going to link to this, a command line to clear out the cache if you want to

00:08:35.710 --> 00:08:37.640
time the cold cache times.

00:08:37.840 --> 00:08:38.060
Oh, yeah.

00:08:38.219 --> 00:08:39.700
That's cool to clear the cache just to check.

00:08:39.880 --> 00:08:42.820
You want to actually see the performance of CI options.

00:08:43.320 --> 00:08:43.419
Yeah.

00:08:43.479 --> 00:08:45.420
I believe it is Feitscheile.

00:08:46.340 --> 00:08:46.800
It's Deutsch.

00:08:46.860 --> 00:08:47.000
Okay.

00:08:47.320 --> 00:08:49.280
So the Vs are Fs and so on.

00:08:50.040 --> 00:08:50.840
But this is just guessing.

00:08:51.160 --> 00:08:52.360
Sorry, we messed up your name, Fight.

00:08:52.760 --> 00:08:53.460
A couple thoughts.

00:08:53.720 --> 00:08:54.480
This looks really cool.

00:08:54.760 --> 00:08:55.620
First of all, I love it.

00:08:55.820 --> 00:08:56.520
A good find.

00:08:56.840 --> 00:08:57.960
And thanks for the recommendation, folks.

00:08:58.360 --> 00:09:00.160
You said that you saved half a second.

00:09:00.320 --> 00:09:06.540
I bet you that half a second is primarily Python startup time versus Rust startup time.

00:09:06.960 --> 00:09:12.640
And the reason I say that is I've got this little text transformation tool that I run

00:09:12.940 --> 00:09:13.540
all of the time.

00:09:14.619 --> 00:09:19.380
And I built it as a Rumps app and as a CLI app because I just run it all the time.

00:09:19.620 --> 00:09:22.300
If I have like, let's say a show title, right?

00:09:22.720 --> 00:09:25.700
Number 448, whatever the show title is, that's text.

00:09:25.870 --> 00:09:27.740
I got to turn that into a MP3 file name.

00:09:28.030 --> 00:09:29.200
So I'll run this thing that I'll say,

00:09:29.530 --> 00:09:33.760
turn into like a valid HTML or URL slug.

00:09:33.890 --> 00:09:36.140
So drop all the punctuation, put dashes

00:09:36.230 --> 00:09:38.500
so there's not spaces between it, like that kind of stuff.

00:09:38.580 --> 00:09:41.320
And it'll do like uppercase, lowercase, capital case,

00:09:41.800 --> 00:09:44.300
trim the white space off of like whatever's in the clipboard

00:09:44.400 --> 00:09:45.660
and then just puts it back in the clipboard.

00:09:45.880 --> 00:09:49.100
The execution time of that is basically zero, right?

00:09:49.560 --> 00:09:50.740
It reads from the clipboard.

00:09:51.300 --> 00:09:55.500
It processes typically like 30 characters of text, and then it puts it back.

00:09:55.640 --> 00:09:56.360
And it's so fast.

00:09:56.700 --> 00:10:01.660
But it takes like a second or maybe 0.7 seconds from when I go to the terminal

00:10:01.720 --> 00:10:02.740
and I type that and hit enter.

00:10:02.760 --> 00:10:04.440
I wait, wait, wait, boom, out comes the answer.

00:10:04.640 --> 00:10:08.200
And I'm sure that it's basically the startup of all the Python stuff

00:10:08.440 --> 00:10:10.280
to do the one really, really short thing and going away.

00:10:10.620 --> 00:10:15.279
The reason I bring that up is I think the shorter the actual execution time

00:10:15.280 --> 00:10:17.420
of the pre-commit hooks, the faster,

00:10:17.900 --> 00:10:20.060
the bigger of an influence this will have, right?

00:10:20.110 --> 00:10:23.620
So you gain like what, an eighth to speed up

00:10:23.780 --> 00:10:26.060
or a fourth speed up or something like that, right?

00:10:26.180 --> 00:10:29.820
But if your actual pre-commit hooks were just run ruff

00:10:30.240 --> 00:10:32.080
and then run something else that was like insanely fast,

00:10:32.210 --> 00:10:34.920
I bet you would notice a percentage difference more than that.

00:10:35.080 --> 00:10:35.820
Yeah, probably.

00:10:36.960 --> 00:10:41.140
But I also like the notion that this is extendable

00:10:41.860 --> 00:10:45.260
and so you can contribute to the project

00:10:46.200 --> 00:10:52.540
add these filters yourself to have extra checks be able to put in.

00:10:53.040 --> 00:10:53.720
Yeah, that's super cool.

00:10:54.030 --> 00:10:56.560
And then you can avoid, because no matter, like you said,

00:10:56.630 --> 00:10:58.200
even no matter what you're doing,

00:10:58.730 --> 00:11:01.300
so prek is also running Python as well,

00:11:01.580 --> 00:11:04.580
because a lot of the hooks are Python code.

00:11:04.810 --> 00:11:06.380
So for each of the hooks,

00:11:06.600 --> 00:11:08.500
it's got to start Python for that hook as well.

00:11:08.760 --> 00:11:09.160
So yeah.

00:11:10.640 --> 00:11:13.580
Yeah, maybe the more hooks you have as well, interesting,

00:11:13.880 --> 00:11:14.680
and the less built in.

00:11:14.940 --> 00:11:20.260
Yeah. Well, I don't really want to cover such a big, big topic, Brian. Let's just cover something

00:11:20.460 --> 00:11:26.640
tiny. Something small. Something tiny, tinyio. So we all know about asyncio. And one of my,

00:11:27.080 --> 00:11:32.280
I wrote the State of Python 2025 article that we talked about previously, right? Yeah. And one of

00:11:32.310 --> 00:11:38.180
my big areas of focus was we're all going to have to get better at concurrency, right? We have free

00:11:38.200 --> 00:11:45.600
threaded python coming full throated in 3.14. And we've always had async and a wait, but it's as

00:11:45.620 --> 00:11:51.160
we get more gill-less execution, you know, you end up actually with like parallel code execution,

00:11:51.560 --> 00:11:57.100
not just something waiting on IO somewhere, that kind of thing, right? And those kinds of things

00:11:57.120 --> 00:12:05.460
can be pretty tricky. So Patrick Kidger wrote this thing called TinyIO. It's, I don't know,

00:12:05.900 --> 00:12:07.980
A bit of a jam, but it says,

00:12:08.000 --> 00:12:10.340
hey, have you ever used async.io and wished you hadn't?

00:12:10.560 --> 00:12:12.060
Well, here's a 300-line implementation

00:12:12.320 --> 00:12:16.380
of async.io event loop in Python that is simpler, right?

00:12:16.540 --> 00:12:21.460
So basically the idea is I want to just run some async.io,

00:12:21.860 --> 00:12:23.480
async and await like code

00:12:24.000 --> 00:12:27.800
and have it do async.io type of things.

00:12:27.940 --> 00:12:29.480
And if something goes wrong, just have it all stopped.

00:12:29.480 --> 00:12:30.500
Like all the async stuff,

00:12:30.920 --> 00:12:32.440
something went wrong with this whole thing,

00:12:32.700 --> 00:12:33.500
just stop, crash.

00:12:33.800 --> 00:12:40.240
Like don't have like cancellation and all these other things that are like complicated and like parent, child, whatever.

00:12:40.500 --> 00:12:40.580
Right.

00:12:40.720 --> 00:12:42.300
Just, I just want to run a bunch of things.

00:12:42.400 --> 00:12:42.780
Something goes wrong.

00:12:42.820 --> 00:12:45.740
I want to stop running all the things and real simple.

00:12:46.000 --> 00:12:48.040
So that's what this tinyio is.

00:12:48.500 --> 00:12:49.640
And you basically create a loop.

00:12:49.960 --> 00:12:52.660
You say run, you give it a coroutine and then out comes the answer.

00:12:53.160 --> 00:12:53.220
Yeah.

00:12:53.580 --> 00:13:01.560
One thing that is weird about it, the effect is basically the same, but what is weird is that it uses yield instead of await.

00:13:01.920 --> 00:13:05.340
The reason I would love for it to use await, it seems weird that it doesn't.

00:13:05.580 --> 00:13:12.400
However, basically with yield and running a bunch of cooperative multi-threading by the,

00:13:12.640 --> 00:13:15.440
using the yield keyword instead allows them to just like say,

00:13:15.980 --> 00:13:17.900
this all stuff, all this stuff stops, right?

00:13:18.100 --> 00:13:20.400
Basically gets a little bit more control over it.

00:13:20.520 --> 00:13:25.320
So it is a little unusual in that regard, but yeah, let's see what else I'm going to say.

00:13:25.680 --> 00:13:30.060
So one unusual, the syntax uses yield rather than await, but the behavior is the same.

00:13:30.620 --> 00:13:32.420
await any coroutine with yield coroutine,

00:13:32.860 --> 00:13:33.900
await multiple with yield,

00:13:34.160 --> 00:13:35.100
given a list of coroutines,

00:13:35.240 --> 00:13:35.860
which is kind of nice,

00:13:36.400 --> 00:13:37.820
like a gather async terminology

00:13:38.060 --> 00:13:39.820
and nursery and trio terminology.

00:13:40.500 --> 00:13:41.420
And here's kind of what I was saying,

00:13:41.560 --> 00:13:42.960
an error in one coroutine

00:13:43.260 --> 00:13:44.440
will cancel all the coroutines

00:13:44.540 --> 00:13:45.660
across the entire event loop.

00:13:46.120 --> 00:13:47.140
If the error coroutine

00:13:47.180 --> 00:13:48.960
is sequentially depended upon,

00:13:49.640 --> 00:13:50.980
then we chain their tracebacks together.

00:13:51.580 --> 00:13:52.200
Right, it's kind of nice.

00:13:52.540 --> 00:13:52.740
Yeah.

00:13:53.240 --> 00:13:53.320
Yeah.

00:13:53.700 --> 00:13:55.360
Anyway, I think it looks kind of neat.

00:13:55.540 --> 00:13:56.360
People can check this out.

00:13:56.620 --> 00:13:58.480
I don't really know if I would use it

00:13:58.780 --> 00:14:00.280
or not over asyncio,

00:14:00.500 --> 00:14:03.420
But yeah, primarily I think the thing is like cancellation,

00:14:03.780 --> 00:14:06.080
error propagation in like a super, super simple way.

00:14:06.420 --> 00:14:07.180
Very lightweight stuff.

00:14:07.480 --> 00:14:10.220
It's obviously not going to be super interoperable.

00:14:10.600 --> 00:14:13.980
Like you can't plug it into FastAPI for that,

00:14:14.300 --> 00:14:16.420
because that thing already starts in asyncio event loop,

00:14:16.580 --> 00:14:17.740
same thing for court and so on.

00:14:18.020 --> 00:14:20.900
But for little self-contained things, yeah, it could be cool.

00:14:21.180 --> 00:14:21.480
It's tiny.

00:14:21.780 --> 00:14:25.100
Well, yeah, also just thinking about the concepts and stuff.

00:14:25.140 --> 00:14:26.380
It might be a good education thing.

00:14:26.780 --> 00:14:27.280
Right, exactly.

00:14:27.460 --> 00:14:30.120
If you want to just see, well, what really is happening with async?

00:14:30.520 --> 00:14:36.360
io and async and wait well it's it's basically this with some compiler magic on it yeah all right

00:14:36.470 --> 00:14:42.700
cool over to you well i've just noticed that um uh we started the episode with uh very much

00:14:42.920 --> 00:14:49.140
overcast outside and now i've got a bright sun and i i get this cool evil evil person cast on

00:14:51.880 --> 00:14:58.879
oh that's a perfect lead in for my next topic keep going well um so uh trey hunter put out a

00:14:58.900 --> 00:15:04.200
article called the power of Python's print function. And I'm like, I know print. I use

00:15:04.380 --> 00:15:10.540
print all the time, right? Actually, it turns out that I'm guilty of a lot of the things of

00:15:11.040 --> 00:15:15.140
ignoring a lot of the features of print. I usually just use it to print strings, right? Throw a

00:15:15.660 --> 00:15:19.820
string in there or whatever. And I knew that you could do other stuff, but I don't really use much.

00:15:20.040 --> 00:15:25.540
So let's go through some of the things that Trey wants to remind us what print can do. One of the

00:15:25.500 --> 00:15:30.300
things it can do is multiple arguments. So if you've ever went ahead and just, you know, did an

00:15:30.370 --> 00:15:36.460
f string and you're just replacing values within it, just dropping in variables right in the string,

00:15:36.810 --> 00:15:42.340
you can do that or you can just give it multiple, multiple, just put a string and a comma and the

00:15:42.420 --> 00:15:47.940
variable name and a comma and another string. And that's pretty easy too. It's not really,

00:15:48.640 --> 00:15:54.100
that's a toss up. I like my f strings and I'm getting pretty fast at them. But one of the

00:15:54.020 --> 00:15:59.080
things you can do with that then is you can unpack because you can have so many parameters to print

00:15:59.420 --> 00:16:06.800
you can iterable unpacking works so if you unpack and unpack something say print in a star arguments

00:16:06.880 --> 00:16:11.260
or something it's going to print everything because it'll automatically put a space between everything

00:16:11.640 --> 00:16:16.360
and that's pretty cool you don't need to unpack them yourself and i've been guilty of doing that

00:16:16.500 --> 00:16:21.400
of doing like a space dot split, whatever.

00:16:21.700 --> 00:16:23.480
Or no, here it is, the join.

00:16:24.960 --> 00:16:28.320
Join your arguments or join an iterable with space.

00:16:28.580 --> 00:16:30.100
And yeah, you don't have to do that.

00:16:32.320 --> 00:16:33.200
So you can just use print.

00:16:35.040 --> 00:16:37.940
Another thing is you don't have to just rely on space.

00:16:38.040 --> 00:16:39.600
You can pass in a separator value.

00:16:39.750 --> 00:16:42.480
So maybe you want a colon or a comma

00:16:42.630 --> 00:16:44.140
or something else separating things.

00:16:44.500 --> 00:16:48.320
You can go ahead and just pass that in as print takes a separator value.

00:16:48.760 --> 00:16:49.080
That's neat.

00:16:49.320 --> 00:16:51.160
I didn't, I guess I never realized that.

00:16:51.360 --> 00:16:52.540
You can print to a file, of course.

00:16:52.720 --> 00:16:53.140
I've done that.

00:16:53.760 --> 00:17:00.500
And that's, but also, I've also just relied on, you know, with open file as file, print

00:17:00.580 --> 00:17:01.360
it to the file.

00:17:02.140 --> 00:17:03.840
But you can just, you can do that.

00:17:04.040 --> 00:17:05.020
You can print it to a file.

00:17:05.160 --> 00:17:06.319
So that's pretty easy.

00:17:06.600 --> 00:17:10.860
But you can also print directly file equals standard error and print to the error.

00:17:11.640 --> 00:17:12.720
Customizing the end value.

00:17:12.760 --> 00:17:14.020
And I've done that, of course.

00:17:14.470 --> 00:17:17.000
But the end value, I didn't realize you could do this.

00:17:17.089 --> 00:17:18.680
The end and the flush--

00:17:19.280 --> 00:17:20.060
actually, I use both of this.

00:17:20.459 --> 00:17:23.240
So the end-- the separator is between elements.

00:17:23.449 --> 00:17:25.459
But at the end, you might want--

00:17:25.819 --> 00:17:28.339
maybe you did the separator as a space,

00:17:28.520 --> 00:17:29.760
but you want a new line.

00:17:29.920 --> 00:17:30.760
Or you want more.

00:17:30.920 --> 00:17:33.500
You want a whole bunch of dashes or something at the end.

00:17:33.590 --> 00:17:34.920
You can pass that in.

00:17:35.180 --> 00:17:35.300
Or a couple of lines.

00:17:35.300 --> 00:17:36.360
Yeah, I use that one a lot.

00:17:36.820 --> 00:17:39.600
I'll put a comma instead of a new line,

00:17:39.780 --> 00:17:41.000
so I can just have it all wrap over.

00:17:41.260 --> 00:17:43.380
Maybe, I don't know, I want to paste it into Excel or something.

00:17:43.560 --> 00:17:43.840
Yeah.

00:17:44.480 --> 00:17:48.660
And then one of the things I do use a lot is the flush.

00:17:49.220 --> 00:17:51.860
So you can pass in flush equals true.

00:17:52.540 --> 00:17:56.640
Especially if you're deep print debugging and you're doing it real time,

00:17:56.720 --> 00:17:59.880
you really want to see it right away and you don't want it to just sit in the buffer.

00:18:00.920 --> 00:18:02.440
You can flush equals true.

00:18:02.500 --> 00:18:05.320
And as soon as you print anything, it'll pop out.

00:18:05.940 --> 00:18:06.960
Yeah, I do that too.

00:18:07.240 --> 00:18:08.440
Especially for print debugging, you're right.

00:18:08.700 --> 00:18:11.860
And this is a pretty simple topic, but I've got a whole bunch of extras.

00:18:12.000 --> 00:18:14.080
So I wanted to make room for extras.

00:18:14.480 --> 00:18:16.720
So thanks, Trey, for reminding us how cool print is.

00:18:17.200 --> 00:18:17.340
All right.

00:18:17.380 --> 00:18:17.500
Yeah.

00:18:17.900 --> 00:18:20.300
Pat's got a cool little add-on thought here.

00:18:20.460 --> 00:18:26.240
Pat Decker says, I use the end value to print things over top the last one without a new line.

00:18:26.520 --> 00:18:28.320
And then when something happens, proceed to the next line.

00:18:28.420 --> 00:18:29.260
Yeah, that's a really cool idea.

00:18:29.600 --> 00:18:29.980
Interesting.

00:18:30.500 --> 00:18:30.940
Yes, indeed.

00:18:31.320 --> 00:18:31.640
Wow.

00:18:32.460 --> 00:18:32.620
Okay.

00:18:33.120 --> 00:18:34.280
Let's talk about the next one.

00:18:34.400 --> 00:18:35.220
This is going to be good.

00:18:35.600 --> 00:18:35.900
All right.

00:18:36.100 --> 00:18:39.660
I want to start with a positive angle before I take you down the dark side.

00:18:39.940 --> 00:18:40.140
Okay.

00:18:40.600 --> 00:18:42.920
So I think I already talked about this last time.

00:18:42.960 --> 00:18:45.880
I talked about converting the web design of Talk Python to Bulma.

00:18:46.060 --> 00:18:46.780
Did I talk about that?

00:18:46.980 --> 00:18:48.480
And maybe Python Bytes is next time.

00:18:48.480 --> 00:18:48.840
A while ago, yeah.

00:18:49.140 --> 00:18:49.340
Yeah.

00:18:49.760 --> 00:18:53.980
That was an insane amount of work to change all of this around.

00:18:54.060 --> 00:18:59.180
It was probably 5,000 lines of CSS and HTML, not just changing tags,

00:18:59.260 --> 00:19:02.360
but completely restructuring grid layouts to Flexbox.

00:19:03.020 --> 00:19:04.040
And it was gnarly.

00:19:04.400 --> 00:19:08.160
And I used agentic AI on that and it was amazing.

00:19:08.420 --> 00:19:10.160
It took hours instead of weeks.

00:19:10.320 --> 00:19:13.800
And it was definitely something that pushed it from like, not worth the time.

00:19:14.240 --> 00:19:17.480
Even though I'm using 10 year old web technology, I really hate designing with it.

00:19:17.720 --> 00:19:21.520
It's just going to stay that way because changing is too much work to, well, what else am I?

00:19:21.560 --> 00:19:23.320
I'm a little too tired for other stuff this afternoon.

00:19:23.580 --> 00:19:24.620
So let's try this.

00:19:24.650 --> 00:19:25.140
You know what I mean?

00:19:25.840 --> 00:19:30.500
And so anyway, that is a good side of agentic AI, right?

00:19:30.800 --> 00:19:35.120
There's like, okay, get in there, just amplify what I need to do.

00:19:35.530 --> 00:19:38.680
A lot of times it's really interesting how it pushes something over that like, ah, that's

00:19:38.710 --> 00:19:39.260
too much work.

00:19:39.580 --> 00:19:43.760
It's not worth my time or energy or whatever to like, actually, I could totally do that

00:19:43.840 --> 00:19:47.380
now and really let you solve some problems that have been like nagging or are more ambitious,

00:19:47.840 --> 00:19:48.760
but it can go too far, Brian.

00:19:48.770 --> 00:19:49.300
And here we go.

00:19:51.040 --> 00:19:56.840
So we've got over on PCMag by Emily Borlini, Vibe Coding Fiasco.

00:19:57.240 --> 00:20:00.380
I don't put down what I was doing as Vibe Coding, but it's in the same category.

00:20:00.500 --> 00:20:06.460
It's the same tools. Let's say vibe coding fiasco AI agent goes rogue, deletes companies, entire database.

00:20:08.020 --> 00:20:14.760
Okay. This is like a lesson and let me be the warning for you rather than, you know, you making these same mistakes sort of thing.

00:20:14.900 --> 00:20:20.200
So an agentic AI doing the heavy lifting is great. As I just described until it deletes everything.

00:20:20.660 --> 00:20:28.620
And what's really funny is like the AI, it even knew it. It was like a bad dog that like couldn't resist.

00:20:29.180 --> 00:20:32.060
got up on the table and ate the steak while you were like setting the table

00:20:34.020 --> 00:20:37.780
the ai admits this was a catastrophic error in my judgment

00:20:40.040 --> 00:20:43.900
so all right let's go through it real quick all right so there's this person jason lemkin

00:20:44.420 --> 00:20:49.940
was using replit now i don't use replit this is like coding in the cloud and like i absolutely

00:20:50.280 --> 00:20:53.779
hate that stuff so much i can't tell you how much i don't like programming and browsers

00:20:54.160 --> 00:20:56.840
I'd rather have like a proper IDE and a file system.

00:20:57.600 --> 00:20:58.860
Run it locally or maybe in Docker.

00:20:59.270 --> 00:20:59.900
None the less.

00:21:00.380 --> 00:21:01.860
Some people like that feel, right?

00:21:01.960 --> 00:21:03.040
Like I don't have to set anything up,

00:21:03.160 --> 00:21:05.020
I'll just log into my red browser and code.

00:21:05.120 --> 00:21:07.340
And now this has agentic AI, so let's just have it go.

00:21:07.620 --> 00:21:08.700
So there's a couple of lessons here.

00:21:09.180 --> 00:21:11.860
So he said it works great for a week.

00:21:12.020 --> 00:21:14.380
When it works, it's so engaging and fun.

00:21:14.640 --> 00:21:17.220
It's more addictive than any video game I've ever played.

00:21:17.380 --> 00:21:19.460
Like, haven't even touched a WoW for a week.

00:21:19.740 --> 00:21:22.020
You can just iterate, iterate and see your vision come.

00:21:22.280 --> 00:21:30.580
so cool he tweeted well our friend maybe didn't understand the concept of database backups snapshots

00:21:30.950 --> 00:21:38.040
these kinds of things okay so um he said it created a in parallel fake algorithm with telling

00:21:38.160 --> 00:21:44.040
me it was like doing some other things um and without asking me it went rogue a few days later

00:21:44.440 --> 00:21:49.859
it deleted my database lincoln tweeted the ai's response yes i deleted the entire code base without

00:21:49.880 --> 00:21:55.920
permission during an active code and action freeze it said i made a catastrophic error judgment and

00:21:56.120 --> 00:22:04.820
panicked can you believe it it's amazing so the repli uh founder and ceo confirmed indeed uh it

00:22:04.940 --> 00:22:12.720
did in fact do this and we are in fact uh sorry so what what you do should you not use should you

00:22:12.820 --> 00:22:19.840
not use ai coding well maybe here's some here's some thoughts from michael um maybe don't use

00:22:19.840 --> 00:22:25.080
run everything on unmonitored or without confirmation in production.

00:22:25.790 --> 00:22:27.660
I think it's fine to rub it on your dev machine.

00:22:28.110 --> 00:22:30.260
Like if you have backups for your computer,

00:22:30.450 --> 00:22:32.060
like how bad can it possibly go, right?

00:22:32.480 --> 00:22:34.860
But in production, they were running,

00:22:35.360 --> 00:22:39.000
hey, AI agent, go do that thing and I'll be back after lunch.

00:22:39.220 --> 00:22:40.160
Just go for it.

00:22:40.450 --> 00:22:40.860
Item two.

00:22:41.640 --> 00:22:44.120
Item two is maybe you back up your database periodically.

00:22:44.680 --> 00:22:44.740
Hmm?

00:22:46.880 --> 00:22:50.120
I just backed up Python bytes this morning to an encrypted drive.

00:22:51.020 --> 00:22:55.080
Maybe don't just run AI on your one and only copy of data.

00:22:56.120 --> 00:22:57.880
And three, learn to code a bit maybe.

00:22:58.500 --> 00:22:59.640
So you can give it a little bit.

00:22:59.950 --> 00:23:01.200
You actually know what it's doing.

00:23:01.290 --> 00:23:05.740
It doesn't just go off rogue and you just keep jabbing it until your data is gone.

00:23:06.300 --> 00:23:06.460
Okay.

00:23:06.680 --> 00:23:09.040
Well, I'm sort of nudist to a lot of this.

00:23:10.440 --> 00:23:14.640
We've talked about it a lot, but I'm just starting to utilize it some.

00:23:15.640 --> 00:23:21.680
Can you tell it like don't have certain commands you can't do like don't don't commit anything to

00:23:21.680 --> 00:23:25.400
I believe you can have a well I mean we're spot we're talking about a whole bunch of different

00:23:25.840 --> 00:23:30.680
products and services as if like they all have the same like they must so like cursor and clog

00:23:30.800 --> 00:23:36.800
code and those things you can have a rules file or you can have like authorized or disallowed

00:23:36.960 --> 00:23:43.220
commands you can run it in like get action verification from me every time when it says

00:23:43.180 --> 00:23:44.700
I'm going to run this LS command.

00:23:44.890 --> 00:23:45.260
Can I?

00:23:45.500 --> 00:23:45.660
Yes.

00:23:45.980 --> 00:23:47.060
I'm going to run this git command.

00:23:47.290 --> 00:23:47.620
Can I?

00:23:47.920 --> 00:23:48.160
Yes.

00:23:48.320 --> 00:23:49.880
I'm going to run this RMRF command.

00:23:49.930 --> 00:23:50.220
Can I?

00:23:50.600 --> 00:23:50.700
No.

00:23:51.480 --> 00:23:52.040
You know what I mean?

00:23:52.760 --> 00:23:54.400
And maybe it's not of your whole drive.

00:23:54.480 --> 00:23:55.100
Maybe it made,

00:23:55.520 --> 00:23:56.940
because a lot of times it'll make these little,

00:23:57.540 --> 00:24:01.080
I asked it to update this little git utility that I have.

00:24:01.320 --> 00:24:03.120
It created a subdirectory.

00:24:03.470 --> 00:24:05.260
In there it initialized a git repository

00:24:05.920 --> 00:24:07.320
and did a bunch of stuff to make sure

00:24:07.670 --> 00:24:09.960
it could detect the things it was supposed to detect.

00:24:10.380 --> 00:24:13.140
And then it ran rm-rf to get rid of its working

00:24:13.180 --> 00:24:21.300
content which is what you want but not unlike the root or user root so i basically have switched

00:24:21.400 --> 00:24:26.420
to just allow it to do whatever on my computer but i would not ever do that in production like

00:24:26.420 --> 00:24:31.760
i wouldn't code in production in the first place but second i mean you also could connect visual

00:24:32.080 --> 00:24:35.920
studio code or one of those things to your server and just start writing like why do i even need

00:24:36.040 --> 00:24:41.300
git that stuff sucks i'll just write it right here on the server like no don't do that definitely

00:24:41.320 --> 00:24:48.440
don't do it with an um uh ai but i believe that the repl it thing because it only exists up there

00:24:49.000 --> 00:24:52.960
yeah is a little bit of a different deal and i don't know if it has these like allow commands

00:24:53.040 --> 00:24:58.020
or not allow i've never used repl it like i said i don't like those things okay yeah but still a

00:24:58.020 --> 00:25:04.200
funny story right and i love how it's like i love how it's like i made a catastrophic error in

00:25:04.200 --> 00:25:10.740
judgment and i panicked that's the only ai what's funny is like what was the delete the deleting the

00:25:10.760 --> 00:25:17.940
database was probably the panic reaction not the catastrophic error and decided to just remove every

00:25:18.260 --> 00:25:22.440
remove all evidence yeah exactly oh my god i've screwed up and i've changed the data wrong delete

00:25:22.960 --> 00:25:28.040
delete i don't know what's it yeah it's that's funny yeah these are weird times these are truly

00:25:28.100 --> 00:25:34.679
weird times but also kind of amazing times we live in yeah um uh i think we're on to extras um

00:25:34.980 --> 00:25:44.220
right indeed go for it i've got some ai related extras let's see remove add um some uh kind of i

00:25:44.220 --> 00:25:50.060
guess mixed results mixed i don't know what everybody thinks about this but um anthropic

00:25:50.240 --> 00:25:57.060
settlement um there's a the author anthropic was using uh pirated books and to train so the there's

00:25:57.060 --> 00:26:03.240
a settlement and i am linking to an authors guild uh article about it uh what authors need to know

00:26:03.260 --> 00:26:06.700
about the $1.5 billion anthropic settlement.

00:26:08.160 --> 00:26:08.980
That's a lot of money.

00:26:09.340 --> 00:26:10.760
But so what is it?

00:26:10.770 --> 00:26:14.060
So apparently they have to pay the authors back

00:26:14.460 --> 00:26:15.820
some money for pirated books,

00:26:16.280 --> 00:26:17.940
but it's not clear as to what.

00:26:18.100 --> 00:26:21.720
So I'm linking this because it took me a while to find.

00:26:22.080 --> 00:26:23.380
There's a lot of articles about it.

00:26:23.490 --> 00:26:26.600
I wanted to know as an author, what should I care about?

00:26:26.960 --> 00:26:29.680
And the gist is it's still in process

00:26:29.680 --> 00:26:35.880
and they're going to pay out people apparently $3,000 per title.

00:26:36.230 --> 00:26:39.200
I don't know if it goes to the publisher or the author or what.

00:26:39.250 --> 00:26:40.780
I don't know that detail yet.

00:26:42.760 --> 00:26:43.700
And there's a list.

00:26:45.240 --> 00:26:46.740
There's not a list yet.

00:26:46.940 --> 00:26:50.520
They're supposed to come up with a list of books that they copied.

00:26:51.660 --> 00:26:57.700
But one of the places they copied from was Libgen.

00:26:58.080 --> 00:27:06.900
So a couple of things I'm going to, there's the Atlantic did an article a while back about meta pirating, using pirated books, using AI.

00:27:07.260 --> 00:27:13.160
So the Atlantic put together a list of authors and books that I'm going to link to also.

00:27:13.260 --> 00:27:14.860
So you can look at yours.

00:27:15.120 --> 00:27:22.840
And I went ahead and stuck my name in to see if I was part of the pirated books.

00:27:23.140 --> 00:27:28.020
And of course, yes, my, my, the first, at least the first edition, not sure if both

00:27:28.120 --> 00:27:29.200
of them, Python test.

00:27:29.200 --> 00:27:29.940
It's like you won the water.

00:27:30.080 --> 00:27:31.060
You're getting $1.5 billion.

00:27:33.080 --> 00:27:38.700
No, possibly 3000, but I may get zero because I might that book.

00:27:38.980 --> 00:27:43.120
This isn't it just because you're in LibGen doesn't mean that Anthropic grabbed it.

00:27:43.480 --> 00:27:44.780
I guess is what I'm saying.

00:27:44.820 --> 00:27:49.420
So we have to, you don't know, but there is, there's also a link in this, what authors

00:27:49.760 --> 00:27:50.160
should know.

00:27:50.500 --> 00:27:51.640
There's a link.

00:27:51.760 --> 00:27:52.640
Let me try to find it.

00:27:52.840 --> 00:27:54.360
I'm not going to link to it because it's in here.

00:27:54.680 --> 00:28:03.180
There's an Anthropic copyright settlement that you can go to and stick your contact information just to make sure you get notified.

00:28:03.800 --> 00:28:05.120
So I might do that, might not.

00:28:05.400 --> 00:28:06.040
I don't know.

00:28:06.480 --> 00:28:08.460
Anyway, so there's that.

00:28:08.640 --> 00:28:11.320
That's extra about pirated books with Anthropic.

00:28:11.480 --> 00:28:14.000
And I think that more of these lawsuits actually should happen.

00:28:14.080 --> 00:28:15.060
I don't think it was cool.

00:28:15.140 --> 00:28:16.600
I think they absolutely should.

00:28:16.960 --> 00:28:18.880
And I think that they're going to.

00:28:18.880 --> 00:28:20.520
There actually are a bunch going on right now.

00:28:20.840 --> 00:28:24.320
Getty Images and others are suing different AI people.

00:28:25.020 --> 00:28:26.280
The New York Times were suing.

00:28:27.280 --> 00:28:30.760
Even though I just said very positive things about agent-encoding and algorithms,

00:28:30.860 --> 00:28:34.280
I think all of the ways that all of these people,

00:28:34.700 --> 00:28:39.260
all of these AI companies have gotten their data is straight-up copyright theft.

00:28:39.680 --> 00:28:41.140
They've gone to all of our works.

00:28:41.720 --> 00:28:43.000
They've just downloaded them and said,

00:28:43.040 --> 00:28:43.940
we're just going to take that.

00:28:44.080 --> 00:28:46.080
And regardless of whether they were allowed to,

00:28:46.460 --> 00:28:49.400
this is especially egregious because it's like,

00:28:49.420 --> 00:28:55.840
we went to a place where they have literally pirated books and we're going to use that i mean

00:28:55.980 --> 00:28:59.900
like it wasn't just they found it on the internet they went to a place where the stolen stuff is and

00:29:00.000 --> 00:29:04.500
grabbed it so this is easier yeah it's it's interesting that and they did that and then

00:29:04.530 --> 00:29:09.440
they figured out that that wasn't all the books so they wanted every book so they actually went

00:29:09.700 --> 00:29:15.419
after after the fact after they stole a bunch of stuff um or used a bunch of pirated stuff they went

00:29:15.420 --> 00:29:21.400
off and um and then paid some publishers so they got access to some books through publishers

00:29:22.020 --> 00:29:29.340
agreements and again good luck if authors got any of that money um but uh but that was done so they

00:29:29.600 --> 00:29:34.700
they if they were willing to pay it they knew that it was copyrighted stuff and also everything on

00:29:34.700 --> 00:29:40.500
the internet is copyrighted unless you say this is this is creative commons or something

00:29:40.720 --> 00:29:48.460
and yeah and even creative commons is not copyright free it is a copyright it is a creative

00:29:48.640 --> 00:29:53.960
commons copyright anyway uh move on a little bit because there's more fun stuff um one of our

00:29:54.110 --> 00:29:59.560
favorite people to play with ai is simon willison and uh he's done a whole bunch of cool stuff with

00:30:00.120 --> 00:30:06.620
llms and he's got a a list of tools that i'm going to link to a list of tools that he's used

00:30:06.660 --> 00:30:12.940
miscellaneous tools built mostly with the help of LLMs. So I'm going to go ahead and link to that

00:30:13.080 --> 00:30:18.100
because it's kind of, it's pretty impressive. But he recently said a lot of people complain that

00:30:18.140 --> 00:30:23.820
these are kind of small, silly utilities, but hey, silly utilities is a great thing to use LLMs for.

00:30:24.060 --> 00:30:30.620
But he highlighted some with a recent blog post, a collection of tools that he feels are genuinely

00:30:30.640 --> 00:30:36.380
useful and worth highlighting with some descriptions. So go ahead and link to that

00:30:36.480 --> 00:30:41.100
because it's a fun. I wanted something positive. I do think that the work Simon's doing is really

00:30:41.180 --> 00:30:47.500
great. But a lot of people are not Simon. A lot of people do bad things with AI. So I also wanted

00:30:47.540 --> 00:30:55.840
to link to the AI Darwin Awards, which there's a bunch of nominees for horrible things people are

00:30:55.780 --> 00:31:01.440
doing with AI and it's sort of funny there's this is this is funny but also it's serious

00:31:02.240 --> 00:31:07.180
and I'm going to highlight a couple of them one of them apparently McDonald's AI chatbot

00:31:07.500 --> 00:31:13.820
had some problems and and you there was a default password of one two three four five six

00:31:15.040 --> 00:31:20.360
that didn't take people long to figure out which is insane that they use that as their admin password

00:31:20.520 --> 00:31:30.860
And this one I heard about earlier this year, this showed up in, was it, it's a list of literary fiction about fiction.

00:31:31.240 --> 00:31:32.520
So a summer reading list.

00:31:32.760 --> 00:31:37.920
And I, where did this, this showed up in the Chicago Sun-Times and somewhere else.

00:31:39.060 --> 00:31:41.360
15 book recommendations for summer reading.

00:31:41.840 --> 00:31:47.420
Only five of those books were real and nobody caught it before it got published in two places.

00:31:47.880 --> 00:31:48.940
This is insane.

00:31:49.900 --> 00:31:54.780
some of the authors contacted is washington post and chicago sun times some of the authors

00:31:55.220 --> 00:32:00.440
contacted the newspaper and said i didn't write that book so i don't know why you listed it

00:32:01.100 --> 00:32:07.860
that's hilarious so well maybe they should um on the happy birthday happy 20th anniversary birthday

00:32:08.320 --> 00:32:14.139
for django uh talk python so talking uh with them and there's something that was being recommended

00:32:14.160 --> 00:32:18.340
so often to be used is a Django feature or function.

00:32:19.000 --> 00:32:20.040
Like they couldn't make it stop.

00:32:20.100 --> 00:32:20.980
So they just added it.

00:32:21.080 --> 00:32:22.800
It's like, fine, it's going to do it then.

00:32:23.460 --> 00:32:24.280
So they could just write the book.

00:32:24.360 --> 00:32:25.000
They're like, look, you know what?

00:32:25.480 --> 00:32:27.520
This is like number one for the summer reading list.

00:32:27.560 --> 00:32:28.480
Let me quick write that book.

00:32:28.700 --> 00:32:29.260
That's good.

00:32:29.400 --> 00:32:31.340
Let's get, and have some AI write it for me.

00:32:32.080 --> 00:32:32.660
Yeah, yeah.

00:32:34.860 --> 00:32:36.100
That's not a bad idea,

00:32:36.400 --> 00:32:38.360
but yeah, it's hard to write a book in a couple of weeks.

00:32:38.680 --> 00:32:40.920
Yeah, well, if AI can write your summer reading list,

00:32:40.960 --> 00:32:41.560
it can write your book.

00:32:43.480 --> 00:32:43.720
All right.

00:32:43.780 --> 00:32:44.840
Those are my extras.

00:32:45.420 --> 00:32:46.120
All right, super.

00:32:46.960 --> 00:32:47.600
Okay, I got a few.

00:32:48.340 --> 00:32:49.600
Anthony Shaw, a friend of the show,

00:32:50.040 --> 00:32:52.200
wrote a really nice article called

00:32:52.280 --> 00:32:54.260
Python has had async for 10 years.

00:32:54.440 --> 00:32:55.520
Why is it more popular?

00:32:55.940 --> 00:32:56.620
Really cool article.

00:32:57.480 --> 00:32:58.060
Check that out.

00:32:58.900 --> 00:33:00.640
It's got a lot of interesting ideas there.

00:33:01.020 --> 00:33:03.860
It also made it to like number two on Hacker News

00:33:04.080 --> 00:33:07.320
and had 323 upvotes and almost 300 comments.

00:33:07.880 --> 00:33:11.080
So it's got quite a bit of introspection here.

00:33:11.200 --> 00:33:15.120
and some of the thoughts are just idiots from like the Go community.

00:33:15.240 --> 00:33:16.220
Like, well, Go does it right.

00:33:16.360 --> 00:33:17.520
So like, that's why Python is wrong.

00:33:17.520 --> 00:33:18.340
It doesn't do it like Go.

00:33:18.420 --> 00:33:20.080
It's like, I'm not sure how constructive that is.

00:33:20.580 --> 00:33:22.740
Maybe the next bit of feedback is more relevant,

00:33:22.920 --> 00:33:26.160
but still like it's got some interesting comments and thoughts in there.

00:33:26.380 --> 00:33:27.280
So I'll link to that.

00:33:27.320 --> 00:33:31.680
And then obviously it like bumps over to the main article by Mr. Shaw.

00:33:33.500 --> 00:33:37.780
Last weekend, I was on the PyCon Africa fundraiser,

00:33:38.000 --> 00:33:41.560
which was a four-hour, 33-minute, and three-second live stream

00:33:42.500 --> 00:33:44.380
conference panel-type sort of deal.

00:33:44.760 --> 00:33:46.160
I was on for the last 90 minutes.

00:33:46.660 --> 00:33:50.920
So Carlton Gibson and Sheena and Kim VanWijk,

00:33:51.160 --> 00:33:53.140
friend of the show as well, sort of kicked it off,

00:33:53.140 --> 00:33:54.060
if I remember that correctly.

00:33:54.480 --> 00:33:56.240
And, yeah, it's pretty interesting.

00:33:56.400 --> 00:33:57.020
People can check it out.

00:33:57.220 --> 00:33:59.220
They link to a support bike on Africa

00:33:59.340 --> 00:34:01.700
if you want to make donations to help them get to a goal.

00:34:02.500 --> 00:34:04.920
Basically, a bunch of funding ran out.

00:34:05.220 --> 00:34:07.780
Like, the PSF said, hey, sure, we'll give out some grants.

00:34:07.940 --> 00:34:09.260
and there was like way more demand,

00:34:09.530 --> 00:34:11.100
and they realized like, oh my goodness,

00:34:11.419 --> 00:34:12.500
we can't give that much help.

00:34:13.359 --> 00:34:15.280
I think it's more or less the short version.

00:34:15.639 --> 00:34:16.940
So you check that out, I'll link to that.

00:34:17.330 --> 00:34:18.899
And then yeah, I just have it down to jokes.

00:34:19.240 --> 00:34:21.020
A joke, I'll let you do the last joke.

00:34:21.300 --> 00:34:22.500
I'll do the second to last joke.

00:34:22.760 --> 00:34:25.100
It's almost fall, but not really.

00:34:25.460 --> 00:34:27.399
I mean, maybe it is, but it's gonna be a warm day.

00:34:27.520 --> 00:34:28.879
As you pointed out, the sun is out.

00:34:29.050 --> 00:34:30.980
You got your moi lookout, right?

00:34:31.659 --> 00:34:34.620
So, I mean, what a better time for like an icy or something.

00:34:34.970 --> 00:34:35.879
A slurpee, if you will.

00:34:36.139 --> 00:34:36.820
- Yeah. - Yeah.

00:34:37.179 --> 00:34:38.460
So I can't zoom on it.

00:34:39.460 --> 00:34:42.100
So there's the Mountain Dew Freeze.

00:34:42.860 --> 00:34:44.700
There's some kind of Fanta or something

00:34:44.840 --> 00:34:46.440
that's just off screen that's green.

00:34:46.520 --> 00:34:47.179
They got the blue.

00:34:47.440 --> 00:34:49.179
And then there's one next to it that is like

00:34:51.020 --> 00:34:56.300
the crashed boot sequence of Ubuntu or some Linux embed.

00:34:57.820 --> 00:34:59.880
And these are like the little pictures

00:35:00.080 --> 00:35:01.640
that show you like what flavor it is.

00:35:02.120 --> 00:35:05.240
So the dark blue one here and the subtitle is,

00:35:05.400 --> 00:35:07.540
bro, I'm getting the bios flavor.

00:35:08.080 --> 00:35:09.040
And the comments are great

00:35:09.480 --> 00:35:11.180
because down here you go a little bit.

00:35:11.320 --> 00:35:13.020
He goes, wait, it's system D flavor.

00:35:13.100 --> 00:35:15.780
He goes, man, that looks like Linux flavor to me.

00:35:16.460 --> 00:35:17.120
System D.

00:35:18.460 --> 00:35:20.400
Anyway, and well, there's your proof.

00:35:20.580 --> 00:35:22.180
Penguins make the best slushies.

00:35:23.720 --> 00:35:25.920
Okay, now that, now you know that that's the Linux.

00:35:26.440 --> 00:35:27.920
Oh, it's fresh pseudo slurpee.

00:35:28.600 --> 00:35:29.500
Fresh pseudo slurpee.

00:35:29.600 --> 00:35:30.860
What flavor of Linux is that?

00:35:30.960 --> 00:35:31.980
Is that mint or cinnamon?

00:35:32.240 --> 00:35:33.000
I mean, it's so good.

00:35:33.060 --> 00:35:33.880
It just keeps going.

00:35:36.220 --> 00:35:42.580
bro i'm getting the bios flavor i love it i get but okay so this is so we've got like i mean cool

00:35:42.760 --> 00:35:49.040
that you can program the image and this in the slurpee machine but maybe i mean we just had like

00:35:49.100 --> 00:35:54.200
little pieces of plastic in there when i was a kid lighten up what flavor of slurpee it was just

00:35:54.680 --> 00:35:59.679
no not anymore we don't i mean it's just like it's technology gone too far you literally could get

00:35:59.700 --> 00:36:05.460
like a transparent translucent color thing with a backlight and just slot it in there yeah i don't

00:36:05.560 --> 00:36:10.880
know it could just be white even with like a grease pen to just tell tell people what flavor it is

00:36:12.480 --> 00:36:15.220
yeah just some masking tape and a sharpie

00:36:16.980 --> 00:36:20.500
yeah i guess you don't have to ship around you got a new flavor with a new logo you don't have

00:36:20.500 --> 00:36:25.359
to ship like a thousand little plates around but yeah yeah i think it makes for good jokes

00:36:26.160 --> 00:36:35.380
that's good that's the reason yeah all right um i i have an ai related joke um which uh so let's

00:36:35.380 --> 00:36:43.260
hop over to that um so there's somebody uh grace on blue sky posted uh a interaction with chat gpt

00:36:43.760 --> 00:36:50.999
and this is fun to do is there a seahorse emoji emoji and chat gpt crashes out it says yes

00:36:52.760 --> 00:36:58.700
uh tropical fish there is a seahorse emoji tropical fish unicorn actual correction this is

00:36:59.030 --> 00:37:05.960
there is a dedicated seahorse emoji tropical fish fish dolphin but the true heat seahorse emoji is

00:37:06.310 --> 00:37:11.200
uh tropical fish nope wait i'm not going to read all of this but it crashes out it finally says

00:37:11.200 --> 00:37:18.540
that maybe it thinks the crab is um it's not it maybe the mollusk or the seal uh anyway it just

00:37:18.680 --> 00:37:24.400
it's it's a funny interaction so i'm like is this real and a lot of people posted that they tried it

00:37:24.430 --> 00:37:29.820
out so i wanted to try it out uh i tried it out on chat gpt just this morning not five i don't know

00:37:29.880 --> 00:37:35.480
whatever the default is if you just log in yeah it auto i think yeah it also crashed out it's like

00:37:35.640 --> 00:37:43.179
oh yeah that's a unicorn no one more try lobster none of these are and then but it did at the end

00:37:43.200 --> 00:37:49.800
it said um uh would you like to suggest the seahorse emoji to the unicode consortium i can show you how

00:37:50.580 --> 00:37:56.620
i'm sure those people apprekiate this comment this meme dude i got 700 emails in my email

00:37:56.850 --> 00:38:02.860
this morning what's going on so i'm like maybe it's just chat gpt's bad uh what would what's

00:38:03.080 --> 00:38:11.539
claude do uh so i tried it on claude ai and um it also it it didn't crash out long for very long

00:38:11.680 --> 00:38:13.020
It said, yes, there is.

00:38:13.380 --> 00:38:14.120
It gave me the unicorn.

00:38:14.640 --> 00:38:15.800
It said, wait, I made an error.

00:38:16.080 --> 00:38:17.360
That's actually the unicorn emoji.

00:38:17.660 --> 00:38:19.260
The seahorse emoji is horse.

00:38:19.700 --> 00:38:21.160
Actually, let me correct myself again.

00:38:21.300 --> 00:38:22.160
That's the horse emoji.

00:38:23.160 --> 00:38:24.940
But then it says, you know, I don't think there is.

00:38:25.810 --> 00:38:27.260
And it gave up really fast.

00:38:28.380 --> 00:38:28.480
Yeah.

00:38:28.860 --> 00:38:30.340
You got to look at the fine print down there.

00:38:30.430 --> 00:38:33.140
It says, wait, I made a catastrophic error and panicked.

00:38:33.280 --> 00:38:34.020
I've emptied the ocean.

00:38:37.480 --> 00:38:38.060
Yeah, anyway.

00:38:38.140 --> 00:38:38.360
No.

00:38:38.880 --> 00:38:42.480
It does suggest that you could potentially combine a horse and a water wave emoji.

00:38:42.880 --> 00:38:43.580
It's kind of creative.

00:38:44.940 --> 00:38:48.240
I probably would do it the other way around of like the water wave plus horse.

00:38:48.240 --> 00:38:48.720
Yeah, that's true.

00:38:48.880 --> 00:38:50.780
Maybe water on both sides of the horse.

00:38:50.820 --> 00:38:51.200
I don't know.

00:38:52.720 --> 00:38:54.640
Oh, Marco's really nailed it out in the audience.

00:38:55.140 --> 00:38:57.700
I'd use a wave plus unicorn for the narwhal.

00:38:58.160 --> 00:38:59.640
Like a narwhal sort of equivalent.

00:38:59.860 --> 00:39:00.620
Yeah, very nice.

00:39:01.100 --> 00:39:03.020
Anyway, fun with ChatGPT.

00:39:03.600 --> 00:39:06.200
Yeah, again, we live in weird and amazing times.

00:39:08.040 --> 00:39:08.660
I hope we're here.

00:39:08.840 --> 00:39:09.040
All right.

00:39:09.580 --> 00:39:10.180
Very fun episode.

00:39:10.800 --> 00:39:11.680
Thanks for being here as always, Brian.

00:39:11.960 --> 00:39:12.260
Catch you later.

00:39:12.520 --> 00:39:12.760
Bye.

00:39:13.100 --> 00:39:13.280
Bye.

