Brought to you by Talk Python Courses and Six Feet Up consulting

#426: Committing to Formatted Markdown

Published Mon, Mar 31, 2025, recorded Mon, Mar 31, 2025
0:00
00:29:18
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Posit Connect Cloud: pythonbytes.fm/connect-cloud

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: mdformat

  • Suggested by Matthias Schöttle
  • Last episode Michael covered blacken-docs, and I mentioned it’d be nice to have an autoformatter for text markdown.
  • Matthias delivered with suggesting mdformat
  • “Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.”
  • A python project that can be run on the command line.
  • Uses a style guide I mostly agree with.
    • I’m not a huge fan of numbered list items all being “1.”, but that can be turned off with --number, so I’m happy.
    • Converts underlined headings to #, ##, etc. headings.
    • Lots of other sane conventions.
    • The numbering thing is also sane, I just think it also makes the raw markdown hard to read.
  • Has a plugin system to format code blocks

Michael #2: pre-commit-uv

  • via Ben Falk
  • Use uv to create virtual environments and install packages for pre-commit.

Brian #3: PEP 758 and 781

Michael #4: Serie: rich git commit graph in your terminal, like magic books

  • While some users prefer to use Git via CLI, they often rely on a GUI or feature-rich TUI to view commit logs.
  • Others may find git log --graph sufficient.
  • Goals
    • Provide a rich git log --graph experience in the terminal.
    • Offer commit graph-centric browsing of Git repositories.

Extras

Michael:

Joke: Wishing for wishes

Episode Transcript

Collapse transcript

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

00:05 This is episode 426, recorded March 31st, 2021.

00:11 I'm Michael Kennedy.

00:12 Hi, I'm Brian Okken.

00:13 And this episode is kindly brought to you by Posit Connect Cloud.

00:18 Last time, Brian told you all about Posit Connect On-Prem, or your own cloud.

00:23 And we'll talk about Posit Connect Cloud, a cool sibling offering, I guess.

00:28 If you are a social media person, you can find us on the social media things.

00:32 You can find us on Mastodon and Blue Skies, the two main places we hang out.

00:37 Those links are in the podcast player show notes right at the top.

00:40 Also, YouTube, follow us on YouTube.

00:43 There's the live link in the top that'll take you there.

00:46 Please subscribe if you want to be part of the show.

00:48 That happens.

00:49 Usually, right now, Mod 7, every week, Monday at 10 a.m. Pacific time.

00:56 Time zone changes like daylight savings, screw that up a little bit for people.

01:00 But anyway, that's when it is.

01:02 We're going into summer, Brian.

01:03 I don't know how consistent we're going to be, but we've been pretty good lately, right?

01:06 Yeah.

01:07 I think so.

01:08 But we're people.

01:09 We've switched if we need to.

01:10 Exactly.

01:11 And if you would like an artisanal, handcrafted digest of an email form, we send a bunch of

01:17 information that's not even in the show notes.

01:19 And Brian sends that out to us, to all of us, including me, every week.

01:24 And I appreciate that, Brian.

01:25 That's awesome.

01:26 You know what else I appreciate?

01:27 What?

01:28 Our audience.

01:29 When we say stuff, they're like, I know you said you don't know about a thing, but there are several things.

01:34 Yeah.

01:35 It's one of the benefits of having a podcast.

01:37 Like last week, you mentioned, what were you talking about?

01:40 You were talking about...

01:42 I was talking about something.

01:44 Black and Docs.

01:45 Or something.

01:45 Yeah.

01:46 Oh, no, no.

01:46 It was Black and Docs.

01:48 And it formatted all sorts of Markdown code blocks.

01:52 Yeah.

01:52 And I mentioned that that's cool to format the blocks with the code blocks within Markdown

01:58 files.

01:59 But I kind of wanted an auto formatter for Markdown itself.

02:03 And one of our listeners, Matthias, got a hold of us and said, hey, have you guys checked

02:08 out?

02:08 Let's see.

02:09 Have you checked out MD format?

02:12 So MD format.

02:13 So I did check it out this weekend.

02:16 MD format is super cool.

02:18 Actually, I'm kind of in love with it.

02:19 So it's just like any other order formatter.

02:25 It's written in Python.

02:26 I wasn't necessarily needing it to be written in Python, but it's kind of neat that it is.

02:30 So you can check it out, see how it's implemented and open source.

02:35 But so after you install it, you run MD format on a file.

02:39 So you just sort of run it.

02:41 You can run it on a given file names.

02:43 You can give it a directory and it reformats your markdown.

02:46 That's exactly what I wanted.

02:48 But you have to kind of agree with its style because it is opinionated.

02:51 And there is a warning that says, hey, we're going to we may change this.

02:55 So if you really like the style that we're using right now, you might want to pin it, which is a good idea.

03:01 So the style, one of the things that I really wanted was the underlying headings of Markdown with like you can have on this next line of you can write a heading.

03:11 then on the next line you can write like three equal signs or or or more um or three dashes and

03:18 that means a heading or a subheading and i don't ever use that i use the pound uh yeah for

03:25 animals use the three underscore well i used to okay please don't write me i'm joking no i often

03:31 use the three lines for like the horizontal line i do too yeah i do too thank you anyway so um the

03:38 so it switches it to the heading style I like. Bulleted lists, which are kind of cool. They

03:43 alternate between dashes and, and asterisks because both of those work. But so like,

03:50 if you have embedded lists, it'll alternate. So it looks nice. But I mean, the output is all the

03:56 same anyway, but it makes it look nice. And then there's standardization for ordered lists. However,

04:03 this one tricked me up i'm like i get it so what they do with order lists if if you have like

04:08 one two and three um it converts them all to one uh and that seems weird and there's a reason

04:16 around it there's a reason is because it reduces the number of get of uh get diffs or you know when

04:22 you when you change a version if you move things around the only thing that'll diff is the thing

04:27 that you added or the thing you deleted not all the numbering changes how that's nice however

04:33 it's something I like to be able it's less readable just right off the bat

04:37 so there is a flag you can pass it pass it --number and it doesn't do that

04:42 it just numbers them consecutively which actually also kind of nice because if you move things around

04:50 instead of having to go through and retype all those numbers you can just do the empty format with number

04:55 so why would he put it 1, 4, 7, 2, 3, 5 yeah well I mean you've done that

05:02 I'm sure like you're moving things around and now they're wrong.

05:07 So I'm excited about that.

05:09 If I was writing in plain and a completely unassisted text editor, I might write just 1.1.1.

05:16 And so you have the ability to reorder it.

05:18 However, if you're using any sort of tools that understand markdown, when you hit enter, it will increment that like Typora and IA writers and others.

05:26 Right.

05:26 So it's going to number it automatically for you.

05:28 And if you want to reorder it, then it's broken.

05:30 And so this is really nice.

05:31 I like it.

05:32 Yeah. And then you could, of course, since it's a command line tool, there's probably a hook already written for a commit, like a pre-commit hook, but you could write your own easily or just use it or use it, put it in CI.

05:45 So, so I like, this is already enough and, and I'm, I'm going to use it right away just for this, but it doesn't stop there.

05:53 You can also mark down, you can convert your code.

05:56 So it will handle auto-formatting your code blocks also.

06:04 And for that, it has a plugin system because it doesn't know how you want it formatted.

06:08 So there's a plugin for black and one for rough and a bunch of others that you can.

06:14 So there's a web one.

06:15 So you can like format your JavaScript or CSS or HTML within your.

06:20 So this is pretty cool that you can have all these different plugins to convert your code blocks also.

06:27 Anyway, I'm kind of in love with this.

06:29 I like it a lot.

06:30 That is very nice.

06:31 Can you go back to the homepage of this thing?

06:33 I want to point out something interesting here.

06:35 Okay.

06:36 Yeah, go to the top.

06:37 So it says, here's how you install it.

06:38 PipX install MD format.

06:40 You could easily do uv tool install MD format, right, Ryan?

06:44 Yeah, definitely.

06:46 But see the inject.

06:47 That inject, pipx inject, MD format, MD format dash GFM, I'm guessing GitHub Markdown format.

06:56 What does inject do?

06:57 Yes, I'm like, what is that?

06:58 And so while we were talking, I did a little research.

07:02 And what it does is it will add additional packages, but to the same virtual environment,

07:08 the dedicated virtual environment that pipx creates for the tool.

07:12 So pipx will create a tool for MD format and then also install these other things.

07:17 things now i was we talked we talked uv up so much and we're going to come back to it somewhat as well

07:23 um but as far as i can tell it doesn't have such a feature you've got to create a virtual environment

07:29 and then install it yeah you might be able to do a run --with and make a really long

07:36 complicated thing but there's no clean so how about that pipx for the win a little bit which is

07:41 not usually what we're saying i like pipx but that's not normally what we say yeah no cool

07:46 All right.

07:46 All right.

07:47 All right.

07:48 On to the next, which is pre-commit uv.

07:52 I told you that we're coming back to it.

07:53 Here it is.

07:54 So despite it having no description, it's in the GitHub repo, which I could probably use.

08:00 The idea is to bring the advantages of uv to pre-commit and get pre-commit hooks.

08:09 So pre-commit is a project by Anthony Satili.

08:13 and the idea is it's like a multi-language runner happens to be written in Python

08:18 but it's not about Python per se that will run pre-commit hooks.

08:23 So instead of saying, well, you want to use a pre-commit hook written in Rust,

08:26 you've got to install and manage Rust and all that.

08:28 You just kind of like do it its way.

08:30 You just pre-commit it, right?

08:31 Yeah.

08:31 So that uses pip and it has all the bonuses but also the drawbacks of using pip.

08:37 So you can pipx install pre-commit and then here we are again pipx inject pre-commit dash uv and so then when you when it does it its

08:49 thing to install and set up a new machine with the pre-commit hooks or updated or whatever it's going

08:54 to use uv and they did a oh go back up a look for a second there's the uv version uh uv tool install

09:01 pre-commit with so that's like the inject yeah i think that that would i think that would do it

09:07 I think that's the way that you could probably pull that off.

09:10 But I think, you know, maybe that will do it.

09:15 I thought you could only do that with run, but if you can do with in the install, then, you know, there you go.

09:20 That's the uv way.

09:22 Awesome.

09:22 Okay, so we're learning stuff, but they're running a timed example of run one thing,

09:30 and then the other says try pre-commit install hooks.

09:33 I don't know what the hooks were, but some set of hooks.

09:36 install them with raw pre-commit and then pre-commit uv install hooks. And the difference

09:42 here is with regular pre-commit, it took 54 seconds plus or minus eight around. With pre-commit

09:51 uv, it took 41. However, that's the first time you do that on a machine that involves those

09:59 dependencies, right? If you hit it again, like if pre-commit uv has to build something from source,

10:06 it's going to be super cached again, right?

10:08 Yeah.

10:09 So I think, though it does say 10 runs, interesting.

10:13 But I think it's doing it with like an isolated environment or something like that.

10:16 Anyway, if you're already using uv and you use pre-commit hooks, check it out.

10:21 There's some configuration options you can pass with environment variables and so on.

10:26 Nice.

10:27 Once installed, it will use uv out of the box.

10:30 However, you can disable that and then require you to run it with, I think,

10:34 the dash command, the pre-commit, pre-dash-commit-dash-uv.

10:38 There you go.

10:39 Cool.

10:39 Cool, cool.

10:40 You know what?

10:40 Before we move on, I do want to tell people about our sponsor.

10:45 So let me tell everyone about Posit and Posit Connect Cloud.

10:50 So this episode is brought to you by the folks over at Posit.

10:54 They're originally known for building RStudio and Shiny, and they've created a bunch of tools for the Python community.

11:01 For example, Shiny for Python.

11:02 I had Joe Chung on to talk about that and a whole bunch of infrastructure things for Team Python.

11:09 So I want to tell you all about Posit Connect Cloud, which is a cool cloud hosted,

11:15 they manage it pass that manages your data science platform.

11:19 So it simplifies deployment of data applications and documents.

11:24 And it might be the most simple way to share your Python content as a data scientist.

11:29 So all you do, three steps.

11:31 You put your code into a public or private repo, and then if it's private, you can give it access to your private repo, for example.

11:38 If it's public, obviously don't worry about it.

11:39 Then you basically point Posit Connect Cloud at that repo, and you click deploy.

11:45 That's it, and it's off and running, and it'll clone your code repo, build your asset, and host it on an online URL that you can share.

11:52 And best of all, it will update your app continuous delivery style.

11:58 So if you push new stuff to the branch that you've told it to publish, it'll just go,

12:03 ah, there's a new version of your data science thing.

12:05 Let me update the one out on the cloud that you're sharing with people at your company

12:10 or researchers or however you're sharing it.

12:12 And any GitHub user can create a free Posit Connect cloud account.

12:16 So you don't have to do a trial or anything like that.

12:18 You can just use it for free and try it out.

12:20 And if you need fast, lightweight way to share your data science content, try Posit Connect

12:26 Cloud. And as Brian told you last week, if you need these features, but you need them

12:31 private, then you can try the on-prem version, Posit Connect. So if you work on a data science

12:37 team where moving fast matters, you owe it to yourself and your organization to check out

12:41 Posit Connect Cloud. Visit pythonbytes.fm/connect-cloud. See if it's a good fit. It's

12:47 pythonbytes.fm/connect-cloud. The link is in your podcast player's show notes right at the top.

12:52 Thank you, Deposit, for supporting Python Bytes.

12:55 Yes, very much.

12:56 Thank you.

12:58 So now I'd like to talk about a couple of PEPs.

13:01 So these are pretty quick topics, but there's some changes to the PEPs.

13:08 So PEP 5.7.

13:09 No, I got that wrong.

13:10 PEP 7.5.8 is allow, accept, and accept star expressions without parentheses.

13:18 This was accepted as of, looks like the 14th of March.

13:23 and so looking through here um and i kind of uh i guess i just like i don't really think about it

13:30 too much but if you if you have a try accept block and the accept can accept a lot like you shouldn't

13:36 have just accept with nothing you should have accept with which types of exceptions that's

13:41 right you should put pass it there try accept pass is the best way try some no i'm just kidding

13:46 try pass, try, just skip the accept. anyway, so the, if normally right now,

13:54 if you have several exceptions that are allowed, you put them in parentheses. Now this is just a

14:00 small little language change that says you don't actually have to put the parentheses there or you

14:05 won't in the future. And, I'm all for this. This is, this looks great. it seems like

14:11 and slam dunk. And I'm sure that's why I got it. One of the reasons why it got accepted

14:16 is that just in the future in Python 3.14 and beyond, you won't need the parentheses. That's

14:23 really it. Kind of nice. So, however, you know, so like four years from now, we can start using

14:31 this if, because you'll, you know, once you stop supporting all other Pythons below 3.0, you know,

14:37 for package so for package maintainers this is um this is future news for normal humans this is news

14:45 for this year so anyway yes um the another PEP that is not accepted yet it's in draft form

14:52 in i just want to highlight it because i think it's a good idea is PEP 781 make type check it

14:58 type make type checking a built-in constant uh and this um that the idea around this is i'm

15:06 I'm noticing as I'm using typing more is that occasionally I need to, like, if you're going to

15:13 import something, like if I only import something just so that I can import the type, so that I

15:19 can put the type of something, you know, the type of a class or a type of a return value or

15:24 whatever in a function, import or a functions, you know, statement or whatever, a variable type,

15:30 I don't really need the type, the import for running. I just need it for type checking because

15:36 that's to get the type so there's there's that but it does cause some uh the m but if you do that

15:43 the import like um you know is running all the time anyway so but you always have to to say like

15:49 you know from typing import type checking what to tell whether you're type checking or not

15:54 it's just basically just saying that we that we won't have to do this anymore so instead of uh

16:01 Oh, where's the actual spec?

16:04 Yeah, so we'll have like, just have it be a constant is all.

16:08 So anyway.

16:09 Yeah, that's great.

16:10 Part of the built-ins, right?

16:11 Just you don't have to import it.

16:13 You can just use it like you can print in others.

16:15 Yeah, yeah.

16:16 Like underscore dunder type checking or something.

16:19 So yeah, anyway.

16:21 Love it.

16:21 I think we should have it.

16:23 It'll be good.

16:24 Oh, while I was here though, another thing I want to highlight is I was like looking around.

16:28 I'm like, well, what else is there?

16:30 And there's an index by category here at peps.python.org.

16:35 And it's really kind of great.

16:37 This is a really well put together web page about how to navigate peps.

16:41 Because there's a lot of peps, right?

16:43 So I was like, well, I'm currently looking for ones that have been accepted.

16:49 So you can pop down and say accepted peps.

16:52 And then you can look at what the version number, what version they're coming in or which they came in and stuff.

16:59 So really nicely done, easy to navigate website.

17:03 So good job.

17:03 That is very nice.

17:04 Anyway, so that's it for that.

17:05 I wonder if that's available in a structured data way.

17:08 Is there like a JSON that represents some data or something?

17:11 There is an API.

17:11 I don't know if it applies to that.

17:13 I'm sure somebody will tell us.

17:15 Yeah.

17:16 Nine point ChatGPT at that table and have it do it.

17:20 Yeah, JSON metadata.

17:21 Yes, indeed.

17:22 All right.

17:23 On my final item, Siri.

17:25 Not, sorry.

17:26 Anybody's phone who started?

17:27 That's, I just pronounced the same.

17:29 S-E-R-I-E.

17:31 I guess that would be the same.

17:32 So this is for people who are more terminal-like but need a better Git experience.

17:38 So it's a rich Git commit graph in your terminal.

17:42 So there's a little picture here.

17:46 Open the image and look at it bigger, I suppose.

17:48 But basically, it gives you the entire branch tree and something that you can navigate around

17:54 and interact with kind of like rich and lets you do things like search all branches

17:59 over the commit log and browse through tags and all kinds of stuff.

18:03 What do you think, Brian?

18:04 I love this.

18:05 I mean, can you try it right away?

18:07 Yes, I know.

18:08 This is so cool.

18:09 It looks really cool.

18:10 I totally want to say it like, okay, that's cool.

18:12 Now it's written in Rust, so it's not a Python thing.

18:14 It is a tool for Python people.

18:17 Although I feel like we have a certain kinship with Rust people.

18:19 It's not really written in Python, but that doesn't matter because you just type the command

18:23 and you get better understanding of your Python and other code, right?

18:26 Yeah.

18:27 So yeah, there's not a whole lot more to say about it.

18:29 You can install it with Homebrew.

18:30 You can install it via cargo.

18:32 Other ways, you can even build it from source.

18:34 But yeah, it's a pretty simple tool, but it's super nice.

18:37 I'll have to check it out.

18:38 Please be available on Windows.

18:41 Because that's where I really need it.

18:43 Yeah, for work, right?

18:45 Yeah.

18:45 Yep.

18:46 I imagine it is.

18:47 I mean, Rust is pretty cross-platform.

18:50 Cross them fingers.

18:52 Remember to try it in Windows Terminal.

18:54 Don't do it in cmd.exe.

18:56 Don't push your luck.

18:57 You just ask for it.

18:58 Windows Terminal?

18:58 Yeah, it's like the much nicer.

19:01 PowerShell?

19:03 PowerShell is the thing that the shell that runs, but Windows Terminal is the app that hosts it

19:08 and it has much better compatibility.

19:09 Like for example, Rich works a lot better in Windows Terminal than it does in CMD and so on.

19:14 Get it from the Microsoft App Store.

19:16 How am I only learning about this now?

19:18 It's really nice.

19:19 And you can do like dropdowns.

19:21 Say run this tab in PowerShell, run this one and get back, run this one and I don't know what you call DOS, whatever that is.

19:27 I'll report back because I've spent my entire career pretending that I don't use a Windows machine at work.

19:34 But yeah, anyway.

19:36 Yeah, you could even, I think, open a particular tab as a Windows subsystem for Linux and Vutu type deal.

19:43 So pretty cool.

19:45 Nice.

19:45 Okay.

19:46 Tangent.

19:46 Extras.

19:47 We're on to our extras if you have extras.

19:49 I have no extras today.

19:51 Well, you're lucky that I do.

19:54 Oh, and before we jump on, Will, who I just released a Talk Python episode about high-performance algorithms,

20:01 algorithms for high-performance terminal apps, and we talked a lot about this,

20:04 says Windows Terminal will be the default in future Windows releases, good times for terminal users,

20:09 and, in the case of Will, terminal framework builders, TUI builders.

20:14 I wonder if you need term colors for Windows Terminal.

20:17 So anyway, okay.

20:18 I don't know.

20:19 I don't know.

20:20 But let's see what else I have extra on.

20:22 Okay, not the picture.

20:24 So I wrote a blog post.

20:25 I was just going to link to the place that I'm using, but I wrote a blog post called Sunsetting Search.

20:30 And Brian, I used to use search so much.

20:33 I've talked about Kagi and how much I love Kagi and all those things, right, a couple years ago.

20:38 And I was probably doing a couple thousand searches per month in there.

20:43 Yeah.

20:44 I looked last month across my three computers that I use and my multiple browsers on each one

20:50 and my phone and my iPad.

20:52 did 211 searches. How about that? He probably did more, but okay.

20:57 Kagi keeps track like in your account because they charge you by it.

21:00 Oh, okay. So I went and looked at my Kagi stats and I said, you did 211.

21:04 Why is it going down? Because I'm using AI to answer so many of these questions these days. And so many with

21:13 the pro ChatGPT and stuff, it's just like I could open up a bunch of tabs and do a research project myself or I could, hey, go do some

21:20 deep research on this and come back to me with references to where you found the answers and

21:24 summarize it. And anyway, I think it's, I just thought it was really wild. And so I am switching

21:30 over to something called start page. Have you heard of start page? Yeah, I've been using it for the

21:35 last couple of months. I love it. Do you like it? Yeah, it doesn't have, I'm going to sound like a,

21:42 like an old guy or something. I like that. It just gives me search results and doesn't give me AI

21:47 results at the top. Yeah. Yeah. Yeah. It's really good. And I super love it. You can go and

21:54 it's, you don't even have to have an account. You can just basically, set it up to like not show

21:59 all of its ad stuff somewhere. I don't know. I was fooling around with that, but I think it's great.

22:03 It's basically private, like privacy preserving doesn't pass your information on along to,

22:10 to Google, but it's basically the Google index. There's someplace to say, don't show the ad,

22:14 Is it Appearance General?

22:15 I don't know.

22:16 Somewhere here.

22:16 So don't show all the marketing goo.

22:18 But if you go and search there, it will sort of disintermediate your Google searches, I guess.

22:27 And it lets you, it has like little visits privately, right?

22:31 You know, you can say, if you do some kind of search, like, how do I get out of here?

22:34 Let's go back here.

22:35 If I search for like Python podcast or something, it'll let you run it in like a little VM iframe

22:42 that like doesn't even let it know where you came from.

22:44 It's pretty interesting, this thing.

22:47 Yeah, I think it's pretty interesting.

22:48 So it's using the Google Index, though?

22:51 Yes, and the way that it funds itself is it also has ads.

22:55 Yeah.

22:55 However, notice I have no ads in mind because I run an ad blocker, and it takes them out, so it's even better.

23:01 See, I'm running it with ads, and it's just not annoying to me.

23:04 I'm like, I'm okay with that.

23:06 Yeah, that's good.

23:07 Because they're not tracking it.

23:09 They're not tracking stuff.

23:10 Yeah, I mostly hate the tracking and the retargeting and all that.

23:14 Yeah.

23:15 So, yeah.

23:16 Oh, good.

23:16 One of the curious things I've got about this is I wonder, so I know that Google, sort of a tangent, but I know that Google like worsened their search like recent, I don't know, several years ago so that people would have to go through more pages so they see more ads.

23:31 Yes, it's terrible.

23:32 I wonder if that's the case with the, did they do that mucking about in the index so that start pages using the mucked up index or?

23:41 Probably, but it doesn't have as much.

23:44 of that not immediate, like not so much of the answers.

23:48 So if you did a search on straight Google, you get, and here's a whole bunch of videos

23:53 and here's a bunch of like Q&A stuff we found and like that's half of it

23:57 and then you got the ads of which are a third of it then like way down the bottom

24:00 somewhere you get a little bit of something to start and I don't see any of that stuff there.

24:04 Yeah, or just the AI answer at the top.

24:07 I think that a lot of, that's killing a lot of ad revenue for actual, or actually traffic

24:13 to people that are actually writing about interesting stuff.

24:16 I know, exactly.

24:17 CAGI does have a very interesting approach on whether to put the AI answer at the top.

24:21 And that's if your search on CAGI ends in a question mark, it'll put an AI answer.

24:27 If the same search without a question mark on the end goes there, there's no answer shown.

24:31 Interesting.

24:32 Yeah.

24:33 I believe that Startpage does have an answer sort of thing, but you got to turn it on or something.

24:38 I'm not sure.

24:38 I feel like I've seen it, but anyway, since I'm not using search so much,

24:42 I thought, well, let me search around and see what else I can find.

24:44 And yeah, start page.

24:45 It's interesting that you're using that as well.

24:48 Yeah.

24:49 Yes, I think it just got turned on by me.

24:52 I didn't think I found it.

24:53 I think Vivaldi turned it on or something, but I don't know.

24:56 Interesting.

24:57 Okay.

24:57 Yeah, I'm a fan.

24:58 All right.

24:59 Cool.

25:00 Yeah, cool.

25:02 One final extra.

25:04 Rhett Turnbull, who's been on Talk Python to talk about building Mac apps with Python,

25:09 sent us, so he knows something about building some frameworks and stuff. He says, remember,

25:14 I said, Brian, you can just uv toolinstall ruff and then you just have rough and don't have to put

25:20 it into your requirements file or your uv lock or wherever those things go. He says, good advice.

25:25 However, you might want to actually put it in your virtual environment. That way it becomes part of

25:30 your pinned dependencies so that people who are contributing to your project use the same version

25:35 of rough if they don't already have that exact version and you don't get like flip-flop of get

25:41 changes because something changed about rough itself or the rules defaults or something yeah

25:46 yeah i totally agree and that's one of the fun things that we have in talking about python tools

25:51 and everything for everybody is that the advice for solo developers is different than the advice

25:56 of people that work on teams um so yeah yeah teams even being open source teams yeah exactly

26:03 Exactly. All right. Shall we make a joke? Sure. Let's see how I did today. This one,

26:09 I thought of you, Brian, when I wrote this, because I thought this is all about the C developers or

26:14 even the C# or C++. I'm sure there's some many other languages that have this, but C in

26:20 particular came to mind. This has to do with a genie and this software developer-like person

26:26 comes along and stumbles upon the golden genie shaped little vase or whatever the heck it is

26:34 and rubs it as you do, out comes the genie. He says, I will grant you three wishes. Okay. But

26:40 before you can, the genie interrupts. The rules are you can't wish for death or life or make people

26:46 fall in love. And you can't wish for more wishes. That's the, that's usually the escape hatch. You

26:57 Can't wish for more.

26:58 So I can wish for fewer wishes?

27:01 Why would you wish for that?

27:03 I think there's a bug in this cartoon, so I'm going to fix it.

27:07 I wish to have negative one wishes.

27:09 Fine.

27:10 Granted, you have 4,295,967,000 wishes left.

27:23 Stack of the cliff.

27:24 Right.

27:24 Yeah, it's an unsigned int they were storing it in.

27:28 Yeah, I think you're right.

27:29 It has a bug because the cartoon has zero and zero should be valid for any numbering system.

27:36 It should, but minus one.

27:40 And then if you go to the thread a little bit further down in here, there's a lot of pretty good comments.

27:46 Almost no one caught that it needs to be negative.

27:48 Like underflow, zero doesn't underflow people.

27:50 But someone pointed out, the hat pointed out, you need to upgrade the 64-bit genie.

27:55 There's some kind of like animated, crazier, crazy game with like lightning striking it.

28:02 That's the 64-bit version.

28:03 That's funny.

28:04 It would just give you even more wishes if you underflowed that though.

28:08 Yeah, so do you remember the first time you heard, you probably don't, and I don't either,

28:12 but early on learning these, like the genie and the lamp stories, I was like thrown because like one,

28:20 that didn't look like any lamp I had in my house.

28:25 and why are you rubbing the lamp?

28:27 That seems weird.

28:28 Why would somebody do that?

28:29 But I guess it comes from a time when you've got more time on your hands and.

28:35 Well, no, yeah.

28:36 Well, it's also like it's an oil lamp.

28:38 They look different.

28:40 And also it was probably brass.

28:43 And now that I'm an antique dealer, we, yeah, we, yeah.

28:45 Yeah, you got to polish it or something, right?

28:47 Yeah.

28:47 Yeah, of course.

28:49 I don't know that I own a single thing that's brass.

28:51 I got a lot of crap around my house, but I don't know that any of them are brass, but who knows?

28:55 Really?

28:56 Anyway, I thought that was a pretty good joke.

28:59 What do you think?

28:59 It was good.

28:59 I like it.

29:00 Yeah.

29:01 Yeah.

29:01 As a C person, you have to approve, except for the bug.

29:04 Except for the bug.

29:06 Except for the bug.

29:06 They didn't test it.

29:08 No, they certainly did not test it.

29:10 We'll come back to that next week somehow, I'm sure.

29:12 Yeah.

29:12 All right.

29:13 Well, thank you, Brian.

29:14 Thank you.

29:15 Thank you, everyone, for listening, and see you all later.


Want to go deeper? Check our projects




Subscribe to Python Bytes