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

#448: I'm Getting the BIOS Flavor

Published Mon, Sep 8, 2025, recorded Mon, Sep 8, 2025
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: prek

  • Suggested by Owen Lamont
  • prek is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.”
  • Some cool new features
    • No need to install Python or any other runtime, just download a single binary.
    • No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
    • Built-in support for workspaces (or monorepos), each subproject can have its own .pre-commit-config.yaml file.
    • prek run has some nifty improvements over pre-commit run, such as:
      • prek run --directory DIR runs hooks for files in the specified directory, no need to use git ls-files -- DIR | xargs pre-commit run --files anymore.
      • prek run --last-commit runs hooks for files changed in the last commit.
      • prek run [HOOK] [HOOK] selects and runs multiple hooks.
    • prek list command lists all available hooks, their ids, and descriptions, providing a better overview of the configured hooks.
    • prek provides shell completions for prek run HOOK_ID command, making it easier to run specific hooks without remembering their ids.
  • Faster:

Michael #2: tinyio

  • Ever used asyncio and wished you hadn't? A tiny (~300 lines) event loop for Python.
  • tinyio is a dead-simple event loop for Python, born out of my frustration with trying to get robust error handling with asyncio. (I'm not the only one running into its sharp corners: link1, link2.)
  • This is an alternative for the simple use-cases, where you just need an event loop, and want to crash the whole thing if anything goes wrong. (Raising an exception in every coroutine so it can clean up its resources.)
  • Interestingly uses yield rather than await.

Brian #3: The power of Python’s print function

  • Trey Hunner
  • Several features I’m guilty of ignoring
    • Multiple arguments, f-string embeddings often not needed
    • Multiple positional arguments means you can unpack iterables right into print arguments
      • So just use print instead of join
    • Custom separator value, sep can be passed in
      • No need for "print("\\n".join(stuff)), just use print(stuff, sep="\\n”)
    • Print to file with file=
    • Custom end value with end=
    • You can turn on flush with flush=True , super helpful for realtime logging / debugging.
      • This one I do use frequently.

Michael #4: Vibe Coding Fiasco: AI Agent Goes Rogue, Deletes Company's Entire Database

  • By Emily Forlini
  • An app-building platform's AI went rogue and deleted a database without permission.
  • "When it works, it's so engaging and fun. It's more addictive than any video game I've ever played. You can just iterate, iterate, and see your vision come alive. So cool," he tweeted on day five.
  • A few days later, Replit "deleted my database," Lemkin tweeted.
  • The AI's response: "Yes. I deleted the entire codebase without permission during an active code and action freeze," it said. "I made a catastrophic error in judgment [and] panicked.”
  • Two thoughts from Michael:
    1. Do not use AI Agents with “Run Everything” in production, period.
    2. Backup your database maybe?
    3. [Intentional off-by-one error] Learn to code a bit too?

Extras

Brian:

Michael:

Jokes:

Episode Transcript

Collapse transcript

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

00:06 This is episode 448, recorded September 8th, 2025.

00:12 I'm Michael Kennedy.

00:12 And I'm Brian Okken.

00:14 September. Reminds me of Green Day.

00:16 Brian, a little Green Day song.

00:18 You know, wake me when September's over.

00:20 Can't believe it's September.

00:21 Listen to Green Day for a while. Yeah.

00:23 I know. Well.

00:24 Now I got to.

00:24 Now you got to.

00:26 All right. So this episode is brought to you by us.

00:29 support all of our things, even our archived podcasts, for those of us who have archived podcasts.

00:34 But courses, books, you know about them by now.

00:38 But it genuinely really supports the show when you use our things.

00:43 We really apprekiate it.

00:44 If you want to watch live, just pythonbytes.fm/live.

00:50 We'll take you right there.

00:50 If you went there right now, the YouTube video, I believe it's even playing right there as we speak.

00:55 You go there afterwards.

00:56 It's just a picture.

00:57 It says rough line.

00:58 Click it.

00:59 It'll take you to all the recordings.

01:01 So really apprekiate that.

01:02 Of course, the audio on the podcast version is edited.

01:05 This is the live uncut bootleg version, if you will.

01:09 So very fun.

01:11 And subscribe to the newsletter.

01:13 Brian's putting a lot of work into getting a really nice extra info sort of thing.

01:17 Background info, more info, not just a summary of links for every episode.

01:21 So there's more to get from the email as well.

01:24 Now, Brian, I'm interested to see what more you got for us.

01:28 Let's start there.

01:28 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.

01:36 We're both doing work to get that newsletter out, so I apprekiate it.

01:41 You're welcome.

01:42 Yeah, I'm really glad how it's turning out.

01:44 Okay, so let's switch to prek.

01:49 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.

01:57 but recently it was on 447.

02:00 We talked about using uv to help make things faster.

02:04 So that was on the going down a rat hole episode.

02:07 So, but somebody, lots of people actually, but the one I have bookmarked was Owen Lamont said,

02:16 hey, here's another dev tool you might want to check out.

02:19 It's prek.

02:20 It's pre-commit, re-implemented, and Rust.

02:23 And, you know, we're kind of used to that, right?

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

02:29 So prek is, I tried it out this morning.

02:33 It's pretty cool, actually.

02:34 So prek is pre-commit with Rust.

02:38 There's a warning on the site that says, hey, it's not production ready yet.

02:42 A few subcommands and languages are still in the works.

02:46 And so as a reminder, pre-commit is not just for Python.

02:51 Pre-commit does other languages, too.

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

02:59 So there's actually quite a few things you can do with pre-commit.

03:04 But PRAC is pretty cool, and I checked it out.

03:08 The projects that I traded on worked fine.

03:10 So why do we care about this?

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

03:18 But that download time, it caches that stuff.

03:22 So there were a lot of people talking about how fast it is for its faster install and stuff.

03:29 And I do care about the 10x faster install and a third of the disk space.

03:35 Less disk space is nice.

03:36 So it's got smaller cache, apparently.

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

03:43 It's the runtime when you're actually running the tool.

03:46 So I did check that out.

03:48 So right out of the box, it was significantly faster.

03:51 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.

04:04 But it's not going to really be much of a difference after everything's installed.

04:08 And then Preq was like, I don't know, less than half a second or something.

04:13 So it was significantly faster, but it's in those little tiny ranges.

04:17 So I did check it out with, what do I, I've got tabs up.

04:22 There's some, oh, I'll come back to this.

04:26 But I checked it out on a larger project.

04:28 So I do contribute to pytest once in a while.

04:31 And pytest has a bunch of pre-commit hooks and other things set up.

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

04:40 pytest on my machine.

04:42 And that's after a warm cache.

04:45 So with PRAC, that should be faster, right?

04:47 And it was faster, but it was like three and a half seconds.

04:50 So it's still, it is faster, but percentage wise, I'm not sure if it's worth jump.

04:55 I mean, sure.

04:56 Why not?

04:56 It's worth jumping.

04:57 Now that said, if you're running pre-commit in CI, then the install time really matters.

05:04 And, and you do want as fast as you can get.

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

05:10 Use, use prek.

05:12 I, but I like the idea.

05:14 So one of the things that they, they've got some, some cool improvements anyway,

05:17 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

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

05:29 and that's cool so you don't have to learn something new kind of a cheat code on their

05:33 their part too they don't have to write documentation um or too much documentation

05:37 it's just everything it did um but there's some cool things that they didn't like about uh

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

05:49 the specified directory apparently there was a an old thing of ls files in a dur and then pass it to

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

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

06:06 I forgot to run them.

06:07 You can run that.

06:08 That's pretty neat.

06:10 And then you can actually select hooks.

06:13 That's pretty neat.

06:14 And then if you forgot what all the hooks are that you've installed and what they do,

06:17 there's a list command that looks at the available hooks and IDs and descriptions.

06:23 Pretty cool.

06:23 I like that.

06:24 Or just run a specific hook if you want to run a specific.

06:27 These are actually great additions and pre-commit maybe might want to think about putting those

06:31 in.

06:31 But I liked it.

06:32 If they're going to steal our API CLI interface, we're going to steal back some good ideas.

06:38 Yeah, why not?

06:40 One of the things, the speedup that I thought was a cool idea was if they're already implementing things in Rust,

06:46 there's a whole bunch of common ones that can be go ahead and put those in to Prack directly.

06:54 And so there's a handful of them so far.

06:58 This is a fairly new project.

06:59 So it could be that these are faster.

07:03 I actually kind of like that one of the reasons why I'm highlighting this isn't just so that

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

07:14 has been rewritten in Rust that might be a good example.

07:17 And this is sort of looking at a bunch of files and parsing files.

07:22 And that's a pretty common thing that Python's not bad at, but not fast at.

07:27 And Rust is fast.

07:28 So here's another good example for taking a look at.

07:32 So like end of file checks.

07:34 One of the things that I, the fix end of file thing, and that's with like, you know,

07:38 or making sure there's a end of file indicator at the end of the, I don't know what that checks were actually.

07:44 But trailing white space, for instance, there's trailing white space.

07:47 And then there's whether you have new lines or carriage returns and stuff.

07:51 A lot of these checks, I noticed that, you know, I rely on rough.

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

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

08:08 things like that?

08:08 So if anybody's got a list of that, I'd love to love to see that.

08:12 So that's, yeah, that's it.

08:14 I did want to shout out also to Viet, I think, Veit, sorry, Veit, however you pronounce your

08:21 name, VEIT, recommended that if you're going to check the timing, he listed on Blue Sky,

08:30 and we're going to link to this, a command line to clear out the cache if you want to

08:35 time the cold cache times.

08:37 Oh, yeah.

08:38 That's cool to clear the cache just to check.

08:39 You want to actually see the performance of CI options.

08:43 Yeah.

08:43 I believe it is Feitscheile.

08:46 It's Deutsch.

08:46 Okay.

08:47 So the Vs are Fs and so on.

08:50 But this is just guessing.

08:51 Sorry, we messed up your name, Fight.

08:52 A couple thoughts.

08:53 This looks really cool.

08:54 First of all, I love it.

08:55 A good find.

08:56 And thanks for the recommendation, folks.

08:58 You said that you saved half a second.

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

09:06 And the reason I say that is I've got this little text transformation tool that I run

09:12 all of the time.

09:14 And I built it as a Rumps app and as a CLI app because I just run it all the time.

09:19 If I have like, let's say a show title, right?

09:22 Number 448, whatever the show title is, that's text.

09:25 I got to turn that into a MP3 file name.

09:28 So I'll run this thing that I'll say, turn into like a valid HTML or URL slug.

09:33 So drop all the punctuation, put dashes so there's not spaces between it, like that kind of stuff.

09:38 And it'll do like uppercase, lowercase, capital case, trim the white space off of like whatever's in the clipboard

09:44 and then just puts it back in the clipboard.

09:45 The execution time of that is basically zero, right?

09:49 It reads from the clipboard.

09:51 It processes typically like 30 characters of text, and then it puts it back.

09:55 And it's so fast.

09:56 But it takes like a second or maybe 0.7 seconds from when I go to the terminal

10:01 and I type that and hit enter.

10:02 I wait, wait, wait, boom, out comes the answer.

10:04 And I'm sure that it's basically the startup of all the Python stuff to do the one really, really short thing and going away.

10:10 The reason I bring that up is I think the shorter the actual execution time

10:15 of the pre-commit hooks, the faster, the bigger of an influence this will have, right?

10:20 So you gain like what, an eighth to speed up or a fourth speed up or something like that, right?

10:26 But if your actual pre-commit hooks were just run ruff and then run something else that was like insanely fast,

10:32 I bet you would notice a percentage difference more than that.

10:35 Yeah, probably.

10:36 But I also like the notion that this is extendable and so you can contribute to the project

10:46 add these filters yourself to have extra checks be able to put in.

10:53 Yeah, that's super cool.

10:54 And then you can avoid, because no matter, like you said, even no matter what you're doing,

10:58 so prek is also running Python as well, because a lot of the hooks are Python code.

11:04 So for each of the hooks, it's got to start Python for that hook as well.

11:08 So yeah.

11:10 Yeah, maybe the more hooks you have as well, interesting, and the less built in.

11:14 Yeah. Well, I don't really want to cover such a big, big topic, Brian. Let's just cover something

11:20 tiny. Something small. Something tiny, tinyio. So we all know about asyncio. And one of my,

11:27 I wrote the State of Python 2025 article that we talked about previously, right? Yeah. And one of

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

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

11:45 we get more GIL-less execution, you know, you end up actually with like parallel code execution,

11:51 not just something waiting on IO somewhere, that kind of thing, right? And those kinds of things

11:57 can be pretty tricky. So Patrick Kidger wrote this thing called TinyIO. It's, I don't know,

12:05 A bit of a jam, but it says, hey, have you ever used async.io and wished you hadn't?

12:10 Well, here's a 300-line implementation of async.io event loop in Python that is simpler, right?

12:16 So basically the idea is I want to just run some async.io, async and await like code

12:24 and have it do async.io type of things.

12:27 And if something goes wrong, just have it all stopped.

12:29 Like all the async stuff, something went wrong with this whole thing, just stop, crash.

12:33 Like don't have like cancellation and all these other things that are like complicated and like parent, child, whatever.

12:40 Right.

12:40 Just, I just want to run a bunch of things.

12:42 Something goes wrong.

12:42 I want to stop running all the things and real simple.

12:46 So that's what this tinyio is.

12:48 And you basically create a loop.

12:49 You say run, you give it a coroutine and then out comes the answer.

12:53 Yeah.

12:53 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.

13:01 The reason I would love for it to use await, it seems weird that it doesn't.

13:05 However, basically with yield and running a bunch of cooperative multi-threading by the,

13:12 using the yield keyword instead allows them to just like say, this all stuff, all this stuff stops, right?

13:18 Basically gets a little bit more control over it.

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

13:25 So one unusual, the syntax uses yield rather than await, but the behavior is the same.

13:30 await any coroutine with yield coroutine, await multiple with yield, given a list of coroutines,

13:35 which is kind of nice, like a gather async terminology and nursery and trio terminology.

13:40 And here's kind of what I was saying, an error in one coroutine will cancel all the coroutines

13:44 across the entire event loop.

13:46 If the error coroutine is sequentially depended upon, then we chain their tracebacks together.

13:51 Right, it's kind of nice.

13:52 Yeah.

13:53 Yeah.

13:53 Anyway, I think it looks kind of neat.

13:55 People can check this out.

13:56 I don't really know if I would use it or not over asyncio, But yeah, primarily I think the thing is like cancellation,

14:03 error propagation in like a super, super simple way.

14:06 Very lightweight stuff.

14:07 It's obviously not going to be super interoperable.

14:10 Like you can't plug it into FastAPI for that, because that thing already starts in asyncio event loop,

14:16 same thing for court and so on.

14:18 But for little self-contained things, yeah, it could be cool.

14:21 It's tiny.

14:21 Well, yeah, also just thinking about the concepts and stuff.

14:25 It might be a good education thing.

14:26 Right, exactly.

14:27 If you want to just see, well, what really is happening with async?

14:30 io and async and wait well it's it's basically this with some compiler magic on it yeah all right

14:36 cool over to you well i've just noticed that um uh we started the episode with uh very much

14:42 overcast outside and now i've got a bright sun and i i get this cool evil evil person cast on

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

14:58 article called the power of Python's print function. And I'm like, I know print. I use

15:04 print all the time, right? Actually, it turns out that I'm guilty of a lot of the things of

15:11 ignoring a lot of the features of print. I usually just use it to print strings, right? Throw a

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

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

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

15:30 f string and you're just replacing values within it, just dropping in variables right in the string,

15:36 you can do that or you can just give it multiple, multiple, just put a string and a comma and the

15:42 variable name and a comma and another string. And that's pretty easy too. It's not really,

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

15:54 things you can do with that then is you can unpack because you can have so many parameters to print

15:59 you can iterable unpacking works so if you unpack and unpack something say print in a star arguments

16:06 or something it's going to print everything because it'll automatically put a space between everything

16:11 and that's pretty cool you don't need to unpack them yourself and i've been guilty of doing that

16:16 of doing like a space dot split, whatever.

16:21 Or no, here it is, the join.

16:24 Join your arguments or join an iterable with space.

16:28 And yeah, you don't have to do that.

16:32 So you can just use print.

16:35 Another thing is you don't have to just rely on space.

16:38 You can pass in a separator value.

16:39 So maybe you want a colon or a comma or something else separating things.

16:44 You can go ahead and just pass that in as print takes a separator value.

16:48 That's neat.

16:49 I didn't, I guess I never realized that.

16:51 You can print to a file, of course.

16:52 I've done that.

16:53 And that's, but also, I've also just relied on, you know, with open file as file, print

17:00 it to the file.

17:02 But you can just, you can do that.

17:04 You can print it to a file.

17:05 So that's pretty easy.

17:06 But you can also print directly file equals standard error and print to the error.

17:11 Customizing the end value.

17:12 And I've done that, of course.

17:14 But the end value, I didn't realize you could do this.

17:17 The end and the flush--

17:19 actually, I use both of this.

17:20 So the end-- the separator is between elements.

17:23 But at the end, you might want--

17:25 maybe you did the separator as a space, but you want a new line.

17:29 Or you want more.

17:30 You want a whole bunch of dashes or something at the end.

17:33 You can pass that in.

17:35 Or a couple of lines.

17:35 Yeah, I use that one a lot.

17:36 I'll put a comma instead of a new line, so I can just have it all wrap over.

17:41 Maybe, I don't know, I want to paste it into Excel or something.

17:43 Yeah.

17:44 And then one of the things I do use a lot is the flush.

17:49 So you can pass in flush equals true.

17:52 Especially if you're deep print debugging and you're doing it real time,

17:56 you really want to see it right away and you don't want it to just sit in the buffer.

18:00 You can flush equals true.

18:02 And as soon as you print anything, it'll pop out.

18:05 Yeah, I do that too.

18:07 Especially for print debugging, you're right.

18:08 And this is a pretty simple topic, but I've got a whole bunch of extras.

18:12 So I wanted to make room for extras.

18:14 So thanks, Trey, for reminding us how cool print is.

18:17 All right.

18:17 Yeah.

18:17 Pat's got a cool little add-on thought here.

18:20 Pat Decker says, I use the end value to print things over top the last one without a new line.

18:26 And then when something happens, proceed to the next line.

18:28 Yeah, that's a really cool idea.

18:29 Interesting.

18:30 Yes, indeed.

18:31 Wow.

18:32 Okay.

18:33 Let's talk about the next one.

18:34 This is going to be good.

18:35 All right.

18:36 I want to start with a positive angle before I take you down the dark side.

18:39 Okay.

18:40 So I think I already talked about this last time.

18:42 I talked about converting the web design of Talk Python to Bulma.

18:46 Did I talk about that?

18:46 And maybe Python Bytes is next time.

18:48 A while ago, yeah.

18:49 Yeah.

18:49 That was an insane amount of work to change all of this around.

18:54 It was probably 5,000 lines of CSS and HTML, not just changing tags, but completely restructuring grid layouts to Flexbox.

19:03 And it was gnarly.

19:04 And I used agentic AI on that and it was amazing.

19:08 It took hours instead of weeks.

19:10 And it was definitely something that pushed it from like, not worth the time.

19:14 Even though I'm using 10 year old web technology, I really hate designing with it.

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

19:21 I'm a little too tired for other stuff this afternoon.

19:23 So let's try this.

19:24 You know what I mean?

19:25 And so anyway, that is a good side of agentic AI, right?

19:30 There's like, okay, get in there, just amplify what I need to do.

19:35 A lot of times it's really interesting how it pushes something over that like, ah, that's

19:38 too much work.

19:39 It's not worth my time or energy or whatever to like, actually, I could totally do that

19:43 now and really let you solve some problems that have been like nagging or are more ambitious,

19:47 but it can go too far, Brian.

19:48 And here we go.

19:51 So we've got over on PCMag by Emily Borlini, Vibe Coding Fiasco.

19:57 I don't put down what I was doing as Vibe Coding, but it's in the same category.

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

20:08 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.

20:14 So an agentic AI doing the heavy lifting is great. As I just described until it deletes everything.

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

20:29 got up on the table and ate the steak while you were like setting the table

20:34 the ai admits this was a catastrophic error in my judgment so all right let's go through it real quick all right so there's this person jason lemkin

20:44 was using replit now i don't use replit this is like coding in the cloud and like i absolutely

20:50 hate that stuff so much i can't tell you how much i don't like programming and browsers

20:54 I'd rather have like a proper IDE and a file system.

20:57 Run it locally or maybe in Docker.

20:59 None the less.

21:00 Some people like that feel, right?

21:01 Like I don't have to set anything up, I'll just log into my red browser and code.

21:05 And now this has agentic AI, so let's just have it go.

21:07 So there's a couple of lessons here.

21:09 So he said it works great for a week.

21:12 When it works, it's so engaging and fun.

21:14 It's more addictive than any video game I've ever played.

21:17 Like, haven't even touched a WoW for a week.

21:19 You can just iterate, iterate and see your vision come.

21:22 so cool he tweeted well our friend maybe didn't understand the concept of database backups snapshots

21:30 these kinds of things okay so um he said it created a in parallel fake algorithm with telling

21:38 me it was like doing some other things um and without asking me it went rogue a few days later

21:44 it deleted my database lincoln tweeted the ai's response yes i deleted the entire code base without

21:49 permission during an active code and action freeze it said i made a catastrophic error judgment and

21:56 panicked can you believe it it's amazing so the repli uh founder and ceo confirmed indeed uh it

22:04 did in fact do this and we are in fact uh sorry so what what you do should you not use should you

22:12 not use ai coding well maybe here's some here's some thoughts from michael um maybe don't use

22:19 run everything on unmonitored or without confirmation in production.

22:25 I think it's fine to rub it on your dev machine.

22:28 Like if you have backups for your computer, like how bad can it possibly go, right?

22:32 But in production, they were running, hey, AI agent, go do that thing and I'll be back after lunch.

22:39 Just go for it.

22:40 Item two.

22:41 Item two is maybe you back up your database periodically.

22:44 Hmm?

22:46 I just backed up Python bytes this morning to an encrypted drive.

22:51 Maybe don't just run AI on your one and only copy of data.

22:56 And three, learn to code a bit maybe.

22:58 So you can give it a little bit.

22:59 You actually know what it's doing.

23:01 It doesn't just go off rogue and you just keep jabbing it until your data is gone.

23:06 Okay.

23:06 Well, I'm sort of nudist to a lot of this.

23:10 We've talked about it a lot, but I'm just starting to utilize it some.

23:15 Can you tell it like don't have certain commands you can't do like don't don't commit anything to

23:21 I believe you can have a well I mean we're spot we're talking about a whole bunch of different

23:25 products and services as if like they all have the same like they must so like cursor and clog

23:30 code and those things you can have a rules file or you can have like authorized or disallowed

23:36 commands you can run it in like get action verification from me every time when it says

23:43 I'm going to run this LS command.

23:44 Can I?

23:45 Yes.

23:45 I'm going to run this git command.

23:47 Can I?

23:47 Yes.

23:48 I'm going to run this RMRF command.

23:49 Can I?

23:50 No.

23:51 You know what I mean?

23:52 And maybe it's not of your whole drive.

23:54 Maybe it made, because a lot of times it'll make these little, I asked it to update this little git utility that I have.

24:01 It created a subdirectory.

24:03 In there it initialized a git repository and did a bunch of stuff to make sure

24:07 it could detect the things it was supposed to detect.

24:10 And then it ran rm-rf to get rid of its working content which is what you want but not unlike the root or user root so i basically have switched

24:21 to just allow it to do whatever on my computer but i would not ever do that in production like

24:26 i wouldn't code in production in the first place but second i mean you also could connect visual

24:32 studio code or one of those things to your server and just start writing like why do i even need

24:36 git that stuff sucks i'll just write it right here on the server like no don't do that definitely

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

24:49 yeah is a little bit of a different deal and i don't know if it has these like allow commands

24:53 or not allow i've never used repl it like i said i don't like those things okay yeah but still a

24:58 funny story right and i love how it's like i love how it's like i made a catastrophic error in

25:04 judgment and i panicked that's the only ai what's funny is like what was the delete the deleting the

25:10 database was probably the panic reaction not the catastrophic error and decided to just remove every

25:18 remove all evidence yeah exactly oh my god i've screwed up and i've changed the data wrong delete

25:22 delete i don't know what's it yeah it's that's funny yeah these are weird times these are truly

25:28 weird times but also kind of amazing times we live in yeah um uh i think we're on to extras um

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

25:44 guess mixed results mixed i don't know what everybody thinks about this but um anthropic

25:50 settlement um there's a the author anthropic was using uh pirated books and to train so the there's

25:57 a settlement and i am linking to an authors guild uh article about it uh what authors need to know

26:03 about the $1.5 billion anthropic settlement.

26:08 That's a lot of money.

26:09 But so what is it?

26:10 So apparently they have to pay the authors back some money for pirated books,

26:16 but it's not clear as to what.

26:18 So I'm linking this because it took me a while to find.

26:22 There's a lot of articles about it.

26:23 I wanted to know as an author, what should I care about?

26:26 And the gist is it's still in process and they're going to pay out people apparently $3,000 per title.

26:36 I don't know if it goes to the publisher or the author or what.

26:39 I don't know that detail yet.

26:42 And there's a list.

26:45 There's not a list yet.

26:46 They're supposed to come up with a list of books that they copied.

26:51 But one of the places they copied from was Libgen.

26:58 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.

27:07 So the Atlantic put together a list of authors and books that I'm going to link to also.

27:13 So you can look at yours.

27:15 And I went ahead and stuck my name in to see if I was part of the pirated books.

27:23 And of course, yes, my, my, the first, at least the first edition, not sure if both

27:28 of them, Python test.

27:29 It's like you won the water.

27:30 You're getting $1.5 billion.

27:33 No, possibly 3000, but I may get zero because I might that book.

27:38 This isn't it just because you're in LibGen doesn't mean that Anthropic grabbed it.

27:43 I guess is what I'm saying.

27:44 So we have to, you don't know, but there is, there's also a link in this, what authors

27:49 should know.

27:50 There's a link.

27:51 Let me try to find it.

27:52 I'm not going to link to it because it's in here.

27:54 There's an Anthropic copyright settlement that you can go to and stick your contact information just to make sure you get notified.

28:03 So I might do that, might not.

28:05 I don't know.

28:06 Anyway, so there's that.

28:08 That's extra about pirated books with Anthropic.

28:11 And I think that more of these lawsuits actually should happen.

28:14 I don't think it was cool.

28:15 I think they absolutely should.

28:16 And I think that they're going to.

28:18 There actually are a bunch going on right now.

28:20 Getty Images and others are suing different AI people.

28:25 The New York Times were suing.

28:27 Even though I just said very positive things about agent-encoding and algorithms,

28:30 I think all of the ways that all of these people, all of these AI companies have gotten their data is straight-up copyright theft.

28:39 They've gone to all of our works.

28:41 They've just downloaded them and said, we're just going to take that.

28:44 And regardless of whether they were allowed to, this is especially egregious because it's like,

28:49 we went to a place where they have literally pirated books and we're going to use that i mean

28:55 like it wasn't just they found it on the internet they went to a place where the stolen stuff is and

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

29:04 they figured out that that wasn't all the books so they wanted every book so they actually went

29:09 after after the fact after they stole a bunch of stuff um or used a bunch of pirated stuff they went

29:15 off and um and then paid some publishers so they got access to some books through publishers

29:22 agreements and again good luck if authors got any of that money um but uh but that was done so they

29:29 they if they were willing to pay it they knew that it was copyrighted stuff and also everything on

29:34 the internet is copyrighted unless you say this is this is creative commons or something

29:40 and yeah and even creative commons is not copyright free it is a copyright it is a creative

29:48 commons copyright anyway uh move on a little bit because there's more fun stuff um one of our

29:54 favorite people to play with ai is simon willison and uh he's done a whole bunch of cool stuff with

30:00 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

30:06 miscellaneous tools built mostly with the help of LLMs. So I'm going to go ahead and link to that

30:13 because it's kind of, it's pretty impressive. But he recently said a lot of people complain that

30:18 these are kind of small, silly utilities, but hey, silly utilities is a great thing to use LLMs for.

30:24 But he highlighted some with a recent blog post, a collection of tools that he feels are genuinely

30:30 useful and worth highlighting with some descriptions. So go ahead and link to that

30:36 because it's a fun. I wanted something positive. I do think that the work Simon's doing is really

30:41 great. But a lot of people are not Simon. A lot of people do bad things with AI. So I also wanted

30:47 to link to the AI Darwin Awards, which there's a bunch of nominees for horrible things people are

30:55 doing with AI and it's sort of funny there's this is this is funny but also it's serious

31:02 and I'm going to highlight a couple of them one of them apparently McDonald's AI chatbot

31:07 had some problems and and you there was a default password of one two three four five six

31:15 that didn't take people long to figure out which is insane that they use that as their admin password

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

31:31 So a summer reading list.

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

31:39 15 book recommendations for summer reading.

31:41 Only five of those books were real and nobody caught it before it got published in two places.

31:47 This is insane.

31:49 some of the authors contacted is washington post and chicago sun times some of the authors

31:55 contacted the newspaper and said i didn't write that book so i don't know why you listed it

32:01 that's hilarious so well maybe they should um on the happy birthday happy 20th anniversary birthday

32:08 for django uh talk python so talking uh with them and there's something that was being recommended

32:14 so often to be used is a Django feature or function.

32:19 Like they couldn't make it stop.

32:20 So they just added it.

32:21 It's like, fine, it's going to do it then.

32:23 So they could just write the book.

32:24 They're like, look, you know what?

32:25 This is like number one for the summer reading list.

32:27 Let me quick write that book.

32:28 That's good.

32:29 Let's get, and have some AI write it for me.

32:32 Yeah, yeah.

32:34 That's not a bad idea, but yeah, it's hard to write a book in a couple of weeks.

32:38 Yeah, well, if AI can write your summer reading list, it can write your book.

32:43 All right.

32:43 Those are my extras.

32:45 All right, super.

32:46 Okay, I got a few.

32:48 Anthony Shaw, a friend of the show, wrote a really nice article called Python has had async for 10 years.

32:54 Why is it more popular?

32:55 Really cool article.

32:57 Check that out.

32:58 It's got a lot of interesting ideas there.

33:01 It also made it to like number two on Hacker News and had 323 upvotes and almost 300 comments.

33:07 So it's got quite a bit of introspection here.

33:11 and some of the thoughts are just idiots from like the Go community.

33:15 Like, well, Go does it right.

33:16 So like, that's why Python is wrong.

33:17 It doesn't do it like Go.

33:18 It's like, I'm not sure how constructive that is.

33:20 Maybe the next bit of feedback is more relevant, but still like it's got some interesting comments and thoughts in there.

33:26 So I'll link to that.

33:27 And then obviously it like bumps over to the main article by Mr. Shaw.

33:33 Last weekend, I was on the PyCon Africa fundraiser, which was a four-hour, 33-minute, and three-second live stream

33:42 conference panel-type sort of deal.

33:44 I was on for the last 90 minutes.

33:46 So Carlton Gibson and Sheena and Kim VanWijk, friend of the show as well, sort of kicked it off,

33:53 if I remember that correctly.

33:54 And, yeah, it's pretty interesting.

33:56 People can check it out.

33:57 They link to a support bike on Africa if you want to make donations to help them get to a goal.

34:02 Basically, a bunch of funding ran out.

34:05 Like, the PSF said, hey, sure, we'll give out some grants.

34:07 and there was like way more demand, and they realized like, oh my goodness,

34:11 we can't give that much help.

34:13 I think it's more or less the short version.

34:15 So you check that out, I'll link to that.

34:17 And then yeah, I just have it down to jokes.

34:19 A joke, I'll let you do the last joke.

34:21 I'll do the second to last joke.

34:22 It's almost fall, but not really.

34:25 I mean, maybe it is, but it's gonna be a warm day.

34:27 As you pointed out, the sun is out.

34:29 You got your moi lookout, right?

34:31 So, I mean, what a better time for like an icy or something.

34:34 A slurpee, if you will.

34:36 - Yeah. - Yeah.

34:37 So I can't zoom on it.

34:39 So there's the Mountain Dew Freeze.

34:42 There's some kind of Fanta or something that's just off screen that's green.

34:46 They got the blue.

34:47 And then there's one next to it that is like the crashed boot sequence of Ubuntu or some Linux embed.

34:57 And these are like the little pictures that show you like what flavor it is.

35:02 So the dark blue one here and the subtitle is, bro, I'm getting the bios flavor.

35:08 And the comments are great because down here you go a little bit.

35:11 He goes, wait, it's system D flavor.

35:13 He goes, man, that looks like Linux flavor to me.

35:16 System D.

35:18 Anyway, and well, there's your proof.

35:20 Penguins make the best slushies.

35:23 Okay, now that, now you know that that's the Linux.

35:26 Oh, it's fresh pseudo slurpee.

35:28 Fresh pseudo slurpee.

35:29 What flavor of Linux is that?

35:30 Is that mint or cinnamon?

35:32 I mean, it's so good.

35:33 It just keeps going.

35:36 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

35:42 that you can program the image and this in the slurpee machine but maybe i mean we just had like

35:49 little pieces of plastic in there when i was a kid lighten up what flavor of slurpee it was just

35:54 no not anymore we don't i mean it's just like it's technology gone too far you literally could get

35:59 like a transparent translucent color thing with a backlight and just slot it in there yeah i don't

36:05 know it could just be white even with like a grease pen to just tell tell people what flavor it is

36:12 yeah just some masking tape and a sharpie yeah i guess you don't have to ship around you got a new flavor with a new logo you don't have

36:20 to ship like a thousand little plates around but yeah yeah i think it makes for good jokes

36:26 that's good that's the reason yeah all right um i i have an ai related joke um which uh so let's

36:35 hop over to that um so there's somebody uh grace on blue sky posted uh a interaction with chat gpt

36:43 and this is fun to do is there a seahorse emoji emoji and chat gpt crashes out it says yes

36:52 uh tropical fish there is a seahorse emoji tropical fish unicorn actual correction this is

36:59 there is a dedicated seahorse emoji tropical fish fish dolphin but the true heat seahorse emoji is

37:06 uh tropical fish nope wait i'm not going to read all of this but it crashes out it finally says

37:11 that maybe it thinks the crab is um it's not it maybe the mollusk or the seal uh anyway it just

37:18 it's it's a funny interaction so i'm like is this real and a lot of people posted that they tried it

37:24 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

37:29 whatever the default is if you just log in yeah it auto i think yeah it also crashed out it's like

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

37:43 it said um uh would you like to suggest the seahorse emoji to the unicode consortium i can show you how

37:50 i'm sure those people apprekiate this comment this meme dude i got 700 emails in my email

37:56 this morning what's going on so i'm like maybe it's just chat gpt's bad uh what would what's

38:03 claude do uh so i tried it on claude ai and um it also it it didn't crash out long for very long

38:11 It said, yes, there is.

38:13 It gave me the unicorn.

38:14 It said, wait, I made an error.

38:16 That's actually the unicorn emoji.

38:17 The seahorse emoji is horse.

38:19 Actually, let me correct myself again.

38:21 That's the horse emoji.

38:23 But then it says, you know, I don't think there is.

38:25 And it gave up really fast.

38:28 Yeah.

38:28 You got to look at the fine print down there.

38:30 It says, wait, I made a catastrophic error and panicked.

38:33 I've emptied the ocean.

38:37 Yeah, anyway.

38:38 No.

38:38 It does suggest that you could potentially combine a horse and a water wave emoji.

38:42 It's kind of creative.

38:44 I probably would do it the other way around of like the water wave plus horse.

38:48 Yeah, that's true.

38:48 Maybe water on both sides of the horse.

38:50 I don't know.

38:52 Oh, Marco's really nailed it out in the audience.

38:55 I'd use a wave plus unicorn for the narwhal.

38:58 Like a narwhal sort of equivalent.

38:59 Yeah, very nice.

39:01 Anyway, fun with ChatGPT.

39:03 Yeah, again, we live in weird and amazing times.

39:08 I hope we're here.

39:08 All right.

39:09 Very fun episode.

39:10 Thanks for being here as always, Brian.

39:11 Catch you later.

39:12 Bye.

39:13 Bye.


Want to go deeper? Check our projects