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


Transcript #314: What are you, a wise guy? Sort it out!

Return to episode page view on github
Recorded on Tuesday, Dec 13, 2022.

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

00:04 your earbuds. This is episode 314, recorded December 13th, 2022. I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And it's just us this time. Very nice to be together to share some fun Python news.

00:18 Yeah, we got some good stuff.

00:19 I think we do. Why don't you kick it off? Before you do, actually, real quick,

00:22 I just want to say thank you to Microsoft for startups for sponsoring this show.

00:25 Tell you more about them later. Go.

00:27 Well, first up, we've got something from Will McCoogan. Surprise, surprise.

00:32 But he's got this cool project called Factory. F-A-Q-T-O-R-Y. Factory. Cute joke.

00:41 But it's a tool to generate an FAQ page, a markdown page specifically for a GitHub project or something.

00:51 I mean, you could use it for anything, really.

00:52 But one of the fun things about it is it uses it itself.

00:57 So you can, I mean, not. There's an example there, but the questions are fun.

01:01 So the idea is you've got a lot of questions maybe that come in about your project and you want to keep track of them.

01:11 So what you do is you stick your questions in a question directory.

01:16 And then they're like just these little markdown snippets.

01:20 And let's look at the raw format.

01:24 It's just like this title. There's a title block and that's the question.

01:30 And then maybe some information. You can cite things maybe.

01:35 It's really pretty easy. I'm going to go actually to the read me again to talk about that.

01:41 You're not going to go to the FAQ?

01:42 Oh, yeah, we could.

01:44 I'm just kidding.

01:45 Just the, I wanted to make sure that we talked about alt titles.

01:48 So you had, you have a title for a question and then an alt title maybe for different kinds of questions that are really the same question.

01:55 And then an answer. That's the simple form of what to do in these little markdown files, these little question files.

02:02 And then you just use do factory build.

02:04 And what it does is takes all those and creates a markdown page.

02:09 And then you can see what it looks like on there, the FAQ.md in this project.

02:16 But it's nice. It's got frequently asked questions at the top.

02:19 It's got links to all the questions.

02:21 And then, and then you, you know, you, you go down and you can see what the answer is.

02:26 Yeah. Even like a table of contents with the hash, you know, the hash inner page navigation within GitHub, which is interesting, right?

02:32 Yeah, it is interesting. And links to each question.

02:36 So if you want to like email somebody a link to it, you can link to the question, which is nice.

02:42 There's some funny ones in there as examples.

02:45 Just correct me up. I got to bring them up.

02:47 Like, in fact, most frequently asked questions have never and perhaps will never be asked.

02:54 And then a quote, 89% of statistics are made up on the spot.

02:58 These are, these are pretty funny, but it's kind of cool.

03:04 And that's not all it.

03:05 So you generate it.

03:07 This would be enough, actually, if it just generated this FAQ page, it might be worthwhile taking a look at.

03:13 But it also has templates.

03:15 So it builds like a template so that you can have like a dot FAQ.

03:19 In the dot FAQ, there's templates and you can tweak these to have a different, you know, it's a different look to them if you want.

03:26 You can add some more code.

03:27 Oh, nice.

03:28 And then there's this suggestion, which we got to talk about these suggestions because it has a template for what to do and a suggestion.

03:37 And why this is important is it comes with this hook that you can put into GitHub Actions.

03:46 So there's a built-in thing with actions.

03:50 You can suggest something.

03:51 So if you suggest a question, it tries to figure out what the question might be using some like fuzzy, what does it say, fuzzy matching or something, which is kind of a neat idea.

04:02 And then there's an example right in there.

04:05 Let's see.

04:06 GitHub workflows.

04:07 You can look at the new issues.

04:10 And it's calling this factory.

04:12 So if somebody files an issue that's really just a question and it figures out that there's something it can answer with, it'll answer for you.

04:20 So if you get, if you have, you know, I don't have any projects that have that many issues, but I'm sure Will does.

04:26 And some people do have like these huge projects.

04:29 And having a little thing that goes, hey, this question's already in the FAQ or something similar.

04:34 Just go look there.

04:36 Or here's the answer.

04:38 Maybe.

04:38 That's pretty cool.

04:40 I haven't tried this, but it looks like fun.

04:41 I think that's really excellent.

04:43 Even for my limited small number of small projects, I still get things like, have you considered this or why is it different than that?

04:51 It seems like it's the same.

04:52 It's not the same.

04:54 It's similar.

04:54 It's not the same.

04:56 Here's the huge long discussion on the issue that somebody filed that's closed because we're not resolving it and we don't leave it as an open issue.

05:03 But you go look in the closed issues and you'll see the discussion and you can participate there.

05:07 Right.

05:07 That kind of just point them in the right direction.

05:09 Yeah.

05:10 That's really cool.

05:11 I think there's a lot of stuff like this.

05:13 I actually talked with Ned Batchelder last week, seven days ago, it says, on an episode that's coming out on Talk Python called Tools for Readme Creation and Maintenance.

05:23 Oh, yeah.

05:24 As well as FAQs and changelogs and those sorts of things.

05:28 Remember, I did a shout out for, give me all the tools for Readmes on here.

05:32 And so this is the episode we ended up doing because like three of the tools out of the eight or nine we covered were written by Ned.

05:38 We're like, we should just, I should just have Ned on the show because it seems like he's a major topic here.

05:43 Nice.

05:44 Anyway, there's a lot of other tools that do that.

05:47 But what I think is relevant here is this automation and this suggest feature.

05:52 This is what makes it really stand out as being different.

05:54 Yeah.

05:55 So even on some of my small projects, I'm going to go ahead and turn it on and then probably issue questions myself and play with it and see how it works.

06:03 Yeah.

06:04 Yeah.

06:04 That'd be awesome.

06:04 Yeah.

06:05 Cool.

06:05 Yeah.

06:06 Steve in the audience, what's the answer to what's the difference between a duck?

06:09 I must know.

06:10 What's the difference?

06:11 Oh.

06:11 It's an FAQ, yeah.

06:12 We'll put it on the FAQ, Steve.

06:14 We'll help you out there.

06:15 Yeah.

06:15 All right.

06:16 Should we go off to the next one?

06:17 Yes.

06:18 All right.

06:18 So way back in, let's see.

06:22 We have a pretty cool search engine here.

06:24 Search for Kagi, live with it.

06:27 Way back here, when we had Gina Huska on the show, I talked about this Kagi thing.

06:35 Yeah.

06:35 Or was it, right?

06:36 Like a paid search thing?

06:37 Yeah.

06:38 There it is.

06:39 That was suggested by Daniel.

06:41 I said, you know, look, I'll give this a try and I'll give you all a report.

06:44 That was in June.

06:46 Well, it's December now.

06:47 So maybe not just one month, which was my idea.

06:49 But I finally got around to writing up a report on Kagi and, you know, TLDR.

06:55 I'm still using it.

06:56 I still really like it.

06:57 So for those of you who don't have a six month perfect memory of the extras, I don't doubt that it's, you know, faded.

07:05 Kagi is a paid search engine that is super privacy respecting and very customizable.

07:11 So instead of being the product, you can pay for a product, which is search, which is pretty rare, actually.

07:17 Right.

07:18 There's not many others that do that.

07:19 So what I did is I went through and did a little write up here.

07:25 And it's really kind of the what are my thoughts on this?

07:28 Why did I go through this whole process?

07:30 But I entitled it paying for search in 2022.

07:33 Am I crazy?

07:34 Which we'll see.

07:35 So some of the highlights of the things I'm really enjoying it.

07:40 I laid out some of the reasons I think it matters, like surveillance capitalism is net, net bad for society.

07:45 That is you being the product by being tracked and having all of that information tracked across different sources, grouped together and resold through data brokers.

07:55 Not good.

07:55 Most search engines, that's their business.

07:58 Right.

07:58 Which is not great.

07:59 Right.

08:00 And also, if you support small companies, we all win.

08:03 Right.

08:04 Even if you don't use it, people are supporting small companies.

08:07 We have many choices.

08:07 There's just there's just more choice.

08:09 Right.

08:09 We don't nobody wants a world where there's like one giant or two giant tech companies that make all the decisions.

08:14 And search happens to kind of live in that intersection of all of these things.

08:20 Right.

08:20 So when you go to do search, you know, you're kind of supporting some giant tech company.

08:25 But at the same time, you're also being tracked and resold.

08:28 I classified it as like some things are on the neutral good side, like DuckDuckGo.

08:34 Like they're mostly good.

08:35 But there's also that sneaky behind the scenes thing with like only Microsoft can track our users.

08:41 No one else can.

08:42 We won't talk about it.

08:43 A link to that.

08:44 Others, fully on the dark side.

08:46 Right.

08:46 So a link to an article about how to retarget your customers.

08:50 So just some of the highlights here for Kaggy is it's totally privacy perspective, respecting because you pay for it.

08:58 Right.

08:58 There's no ads which don't lead to these in perverse incentives, these counter incentives.

09:03 One of the things I really like is you can block websites.

09:07 Like I just unblocked all the things that I had previously blocked and I did a search for HTML for div tag event.

09:13 What was the first result?

09:14 W3 schools.

09:15 I don't know.

09:16 Do you ever run across W3 schools?

09:17 Do you like this?

09:18 Yes.

09:19 No.

09:19 And there's a few.

09:21 There's a few of these that are just they just turn out questions and answers.

09:24 You're just like, could this just stop?

09:26 Could I just never?

09:27 Like, how are they so good at SEO and so bad at answers?

09:31 Right.

09:32 And so for those things, there's like a little Globy looking icon looking thing next to this.

09:38 And you can press it and just say block.

09:40 I will never, ever see W3 schools.

09:42 Now, some people may have extensions.

09:44 There's like a W3 school blocker extension you can get for Chrome and other browsers.

09:49 But I also really don't want to install like any more extensions in my browser than necessary.

09:55 There's plenty of examples of like, oh, this extension became unmaintained.

09:59 And so some company bought it and put some tracking into it.

10:02 So not only your search is tracked, everything you do ever is like now, right?

10:07 Like, I just don't want to install those things.

10:08 It's just not worth it.

10:09 But here you can just say block these four or five domains or just lower them if you kind

10:13 of want them to sort.

10:14 Yeah.

10:15 Oh, you muted.

10:16 How did I mute?

10:17 Sorry.

10:17 Check this out, Brian.

10:19 If you do a search for CNN, see how this globe turns reddish orange?

10:24 Yeah.

10:24 Just in the search results.

10:25 This is on Kaggy, right?

10:26 On the right next to it.

10:28 And you're like, wait a minute.

10:28 Why is it red?

10:29 If you go over to it, it has a big red warning.

10:33 There you can click it.

10:33 It'll give you more information.

10:34 It has a big red warning.

10:35 There's 43 trackers detected on this page.

10:37 So if you click on it, you're getting 43 trackers put on you.

10:40 It's like jump.

10:41 It's like that pool is full of leeches.

10:42 Don't go in it.

10:43 You're going to go in it.

10:44 Warning.

10:45 And it even gives you the categorization of it has fingerprinting, advertising, has Google

10:49 as a tracking category and email.

10:51 Isn't that nuts?

10:52 And cool.

10:52 Yeah.

10:53 I mean, cool.

10:54 It tells you not cool that it is.

10:55 Yeah.

10:55 But then just to be fair, things like Vivaldi and stuff can block most of that stuff.

11:00 Yes, exactly.

11:01 And so if you want to block it, you can.

11:03 Right.

11:03 Certainly you should be blocking it, I think.

11:06 But anyway, it's also nice that the search engine has kind of like got your back in that

11:10 regard.

11:10 Like, you know, here's.

11:12 Yeah.

11:12 This is the category of the site.

11:14 Yeah.

11:15 So are the results good, though?

11:16 That is a super important question because if they're not, then all this doesn't matter.

11:21 Right.

11:21 Right.

11:22 I would say they're pretty close to Google.

11:24 I'm pretty sure that the cost, which is $10 a month.

11:28 I think the cost mostly because that's that can't be compute.

11:31 There's just no way that costs that much.

11:33 I think the results are there.

11:36 I'm pretty sure they're buying search as a service from Google and Bing.

11:39 OK.

11:40 I haven't been able to verify it, but there's they talk about enhancing their search results

11:45 with open source and other results.

11:48 So it's like we've got those results plus, you know what I mean?

11:51 Yeah.

11:52 And so as far as I can tell, they're pretty.

11:54 It's quite similar to Google, actually.

11:56 I think with the extra features that be able to block sites you don't ever want to see.

12:00 So that's cool.

12:01 Exactly.

12:01 Yeah.

12:02 So here's the follow up to live with it, Kagi.

12:04 I give it a solid thumbs up.

12:06 The only really the only downside is that it costs money.

12:09 Are you interested in paying another subscription, another $10 a month for something?

12:14 For me, it makes me happy.

12:15 I search for stuff just constantly all day.

12:18 And every time I'm like, yep, still not being tracked.

12:21 Feels pretty good.

12:22 And so for me, it's worth it.

12:23 People can can decide.

12:24 All right.

12:25 Well, I have to say this is a random comment from Vincent is I don't know how I I don't

12:34 know how to read this.

12:34 Once again, I'm rocking my baby to sleep.

12:36 And once again, y'all voices aid me in doing so.

12:39 So we're so boring.

12:41 You're putting your kid to sleep.

12:42 I'm not sure what.

12:43 No.

12:44 Yeah, I'm not sure.

12:45 No, that's awesome.

12:46 Hey, Vincent, great to have you here.

12:48 As somebody who had one of those baby carriers when I had twins, I would hook them both on me and I would sit there and like work on my keyboard because

12:55 like in the middle of the night because they would sleep if they were stuck to me, but not

12:58 if I was like trying to lay them down.

13:00 Oh, God, no.

13:00 So hopefully we're just.

13:02 I feel you.

13:02 I feel you.

13:03 I feel you.

13:03 Yeah.

13:04 Oh, a newborn.

13:04 He has a newborn.

13:05 So they're not listening anyway.

13:07 They're just our voices.

13:08 So cool.

13:09 Or are they?

13:10 And are they going to grow up to know Python by the time they're five?

13:13 Yeah.

13:14 Yeah.

13:15 And know how to properly protect themselves against search engines.

13:20 That's right.

13:21 That's right.

13:21 All right, Brian.

13:22 Before we move on, let me tell folks about our sponsor, Microsoft for Startups.

13:26 You know, Microsoft for Startups has been a great support of the show and it's really good

13:30 to have them on board.

13:31 Make sure that we can keep this going strong.

13:34 You know what they don't have in this ad, by the way, Brian?

13:36 Retargeting.

13:37 We don't have any retargeting for you.

13:39 So I'm sorry about that, but you do have some really great offers if you go visit it.

13:43 If you start a business, obviously it's hard to get started.

13:46 A lot, 90% or more businesses go out of business within the first year.

13:51 And so Microsoft for Startups set out to understand what are some of the challenges and what are

13:56 some of the assets that they can bring to bear to help that.

13:59 So Microsoft for Startups Founders Hub was created and it has a bunch of free resources

14:04 or once you're accepted into the program, a lot of included resources that are just

14:09 given to you.

14:10 And they come in two categories.

14:12 They come in a bunch of cloud credits so you can run your infrastructure and code for no

14:17 money out of it, you know, probably for free for a couple of years.

14:20 And they also come in the form of mentorship and connections and information.

14:23 So you get a bunch of free GitHub credits.

14:27 You get a bunch of Microsoft cloud credits.

14:29 You get many from OpenAI, a global leader in AI research and development as well.

14:35 And it's also not just about who you know.

14:38 Like it is so often for companies out there on their own.

14:41 You get access to their mentorship network and giving you access to a pool of hundreds

14:45 of mentors across a range of disciplines like idea validation, fundraising, management, coaching,

14:51 sales and marketing.

14:53 That's definitely an important one as well as a bunch of specific technical aspects.

14:57 So you can even book a one-on-one meeting with these mentors, many of whom are founders

15:01 themselves.

15:01 So make your idea a reality today with a critical support you'll get from Microsoft for Startups

15:06 Founders Hub.

15:06 Visit pythonbytes.fm/founders hub 2022.

15:10 The link is in your show notes.

15:12 Thank you, Microsoft, for supporting the show.

15:14 Yeah.

15:14 Thanks a lot.

15:15 Mm hmm.

15:16 Well, is it time to rewrite some code, Brian?

15:19 Yeah, we, this was fun.

15:21 So I ran across an article called Tools for Rewriting Python Code by Luke Plant.

15:26 And it's also like, by the way, it's kind of a gorgeous blog formatting.

15:33 It looks like a book almost.

15:34 But anyway, beside the point, we've covered a lot of these things, these tools on the podcast,

15:40 things like black and eyesort and linters and things like that.

15:44 But it's kind of fun to see them a whole bunch of things listed together.

15:47 So what by rewriting, we mean like hopefully tools that change your code, but hopefully

15:53 for the better.

15:54 So we've got things like formatting, formatting and style guides like black.

16:00 And another popular one is that I don't know if we've covered is YAPF or yet another Python

16:07 formatter, I think.

16:08 And it's, it's similar ethos to black, but it's more customizable.

16:13 So black, you can't, there's only a few options.

16:16 But YAPF is often used by companies that have their own style guide to be able to customize

16:23 it.

16:23 So it, but it's a little more tweaky.

16:25 So you have to kind of get in there and set it up so that it follows your style guide.

16:30 So there's that.

16:31 There's auto pepate.

16:32 I sort, which I really like, which reorders Python imports.

16:36 And so there's things like this table format.

16:39 I have to play with this.

16:41 Makes it easy to align columns in your Python source code.

16:43 I kind of want to try this out because it's, that's something I don't like about black and

16:49 other formatters sometimes is they muck up my tables.

16:52 But anyway, there's upgrade things like by upgrade and Flint.

16:56 You've mentioned Flint a couple of times.

16:58 I'm a big fan of Flint.

17:00 I run it on Python Bytes website code on talk Python on the train site.

17:04 And it's, it's great.

17:05 Yeah.

17:06 And actually, I just got a pull request on one of my projects.

17:10 And I'm pretty sure they just ran Flint over.

17:12 They're just going through and finding some projects and doing running Flint and then doing

17:16 PRs against them.

17:17 And I was slightly kind of annoyed by that, but also like, I didn't have to do it.

17:21 So yeah, thanks.

17:22 I grabbed it.

17:23 Type hints, which I'm, I didn't know about this stuff.

17:27 So I'm, I'm kind of have to look at this.

17:29 So things like pyannotate and monkey type to add, and there's a few others to add type

17:36 hints to your.

17:37 This is super interesting.

17:38 Adding type hints based on instrumented test suite runs.

17:42 So instrumented, I mean, it watches what functions get called and it says, Hey, this parameter

17:47 was always a string.

17:47 This one was always a user object.

17:49 So here's your type parameter, colon string, colon user.

17:52 That's awesome.

17:53 Yeah.

17:53 If you ever, and then I guess you know, I need to do this.

17:56 Try it.

17:57 Yeah.

17:57 Yeah.

17:58 So I'm going to try these.

17:59 There's a few of them.

18:00 So anyway, interesting.

18:02 Some refactoring stuff is a, that I, it mostly talks about how a lot of these refactoring

18:10 tools are built into IDEs.

18:12 And I'll have to say when I'm, I usually use an IDE assisted thing like pylance or pyrate

18:17 to, to, to do some refactoring, but, and I actually don't use them as much as I probably

18:22 should.

18:23 I usually do manual refactorings, but anyway.

18:26 And then some standalone ones like rope and Jedi.

18:28 And then, and then the other category includes things like shed, which, which I still have

18:36 yet to try.

18:36 I need to try that.

18:37 That combines a whole bunch of the tools.

18:39 But the, the part that one of the parts that I was really excited about is I didn't know

18:43 about lib CST.

18:46 So it talks about, this article talks about writing your own.

18:49 There's a project called lib CST that apparently you can use to, to write your own.

18:55 It does a syntax tree thing and, and you can hopefully write your own reformatter.

19:03 So that might be fun.

19:05 Okay.

19:05 Nice.

19:06 And one of the recommendations is the, the documentation is a little overwhelming for

19:10 lib CST.

19:10 So maybe use GitHub or libraries.io to find other projects that are using it and then see how

19:18 they're using it.

19:19 And I love that way to understand how to use something.

19:23 Yeah.

19:23 I, I need pretty much what this does, but I want to change these two things.

19:27 Let me copy that and go.

19:28 Yeah.

19:29 Yeah.

19:29 I guess that'd be another way to do it.

19:30 It's like fork black, like the, the people that forked black and made blue, which gotta love

19:35 blue.

19:35 it wasn't listed here, but, Oh, one of the things I wanted to, to bring up while

19:40 we're right here is, there's, what there's, upgrades like PI upgrade and Flint.

19:46 there was one of them that does, set up PI upgrade, which upgrades set up.py to set up.cfg.

19:54 I'd really like someone to figure out how to take all of your setup stuff and create a PI project.tomo

20:01 file.

20:01 Yes.

20:02 that'd be nice.

20:03 That would be excellent.

20:05 Anyway, cool stuff.

20:06 Set up, set up PI tom alert something.

20:09 Yeah.

20:10 Set up.tomo.py.

20:11 Okay, cool.

20:12 Yeah.

20:12 This looks really, it's a really nice taxonomy of ways to clean up your code and improve your

20:18 code, modernize your code.

20:19 Yeah.

20:20 Yeah.

20:20 Very cool.

20:21 All right.

20:21 All right.

20:21 Let's go talk some web for a minute.

20:24 zero who I know listen to the show because sometimes drops into the live chat and gives

20:29 some, advice or, or feedback created this thing called socketify.py.

20:36 So socketify, I suppose the name is inspired by trying to do web sockets really well, but it's

20:42 a little more general web framework and server as far as I can tell.

20:47 So the tagline or whatever is bringing web sockets, HTTPS high performance servers for

20:54 PI PI three.

20:55 That's the JIT version of Python, Python three, as well as CPython.

21:00 So what's the website say for us?

21:03 So it's, it's pretty interesting.

21:05 it's, if you look through here, you'll see, I guess we see some of the features

21:10 that has, web socket support with pub sub fast HTTPS.

21:14 I think that's probably the biggest thing that people care about.

21:18 It runs on all the versions.

21:20 So, you know, think kind of micro whiskey or UV a corn or something like that with a little

21:27 bit of flask type of stuff on top of it.

21:30 Okay.

21:30 Okay.

21:31 it has URL routing sync and async function.

21:35 So it's, it's kind of a mix of like a web server that is also a web framework, fast TLS.

21:41 what else we got here?

21:43 This one's interesting for the async story is max back pressure, max payload and timeouts.

21:49 One of the problems that can happen if you have async code is your async code will just accept

21:54 the request and it'll forward it on through an, an await some database call or wait some

21:59 microservice other API call.

22:01 And it can just way pile up on your server and then like slam the database.

22:06 And you might say, look, we only want to have, you know, 20 database queries in flight at a

22:10 time.

22:10 Right.

22:10 So you can limit how much pressure the web server is putting onto the database and it'll

22:15 kind of slow it down.

22:16 And say, instead of accepting more requests or doing more of this work, just queue up the

22:21 response.

22:22 Like a, a non async web server would do.

22:24 Okay.

22:25 It has async support, ASGI web server support, with extensions for Falcon, which is a, one

22:31 of the web frameworks as well as a WSGI WSGI one and some new features coming.

22:35 But the real selling point, the reason people might care to check this out is the performance.

22:40 So Falcon is pretty fast.

22:42 UV corn is pretty fast.

22:44 But if you look at socket, if I, I talked to zero in, they're using the tech and power

22:49 benchmarks.

22:50 I'll pull those up in a second.

22:51 I'll actually pull them up now.

22:52 So over here on mass announces, follow up.

22:55 We break a new record for Python.

22:57 No other web frameworks able to reach 6.2 million requests per second in the tech and power benchmarks.

23:03 As puts Python in the same ballpark is going rust and C++.

23:08 So we pull this up.

23:09 What do we get?

23:09 We get waiting.

23:11 Ironic.

23:11 Isn't it waiting on that?

23:13 But look at this.

23:15 You've got socketify at a 6.2 million requests per second on the tech and power benchmark.

23:20 And then vibora and gibranto.

23:22 And what's really interesting is like down here at 10, we have 360,000 for UV corn.

23:28 But follow me down here.

23:29 There's a couple of interesting ones.

23:31 Pyramid.

23:31 Go pyramid.

23:32 I love pyramid.

23:33 Python bites.

23:33 Talk Python or pyramid at the moment.

23:35 At a quarter million.

23:36 we make our way down, down, down, down, down, down, down, down, down.

23:40 Async flask is at 57,000.

23:42 straight flask is at 8,000.

23:45 And let's see.

23:46 We've got tornado at 40,000.

23:48 Here's another one at 50,000 for tornado.

23:50 Turbo gears at 70.

23:52 Another one at 90.

23:53 And there's some variations on like some of the internal, like is it PyPy versus CPython versus whatever.

23:59 There's a bunch of variations in here.

24:00 But there's, some surprises there, huh?

24:03 Yeah.

24:04 Huh.

24:04 So here's the trade-off you got to make.

24:06 You got to decide, right?

24:07 Like this, this framework is cool.

24:09 It's quite new with 230,000 stars, but it looks also quite promising.

24:14 So for most people, you might not need something like this.

24:18 it's kind of a low level, lower level programming, than say, your standard flask, right?

24:25 And it doesn't have as many extensions, but it also, it has some, I mean, if, if you get that kind of performance and you need it, right?

24:31 Here's a pretty cool option you could try out.

24:33 So anyway, I, I encourage people to have a look at it.

24:35 It looks pretty interesting.

24:36 It's also quite new, you know, last, commit six, six days ago.

24:40 So that's, that's encouraging, right?

24:42 Yeah.

24:42 And also one of the things I like about projects like this, that, that, you know, are, assuming they're doing something different to make things faster than, you know, let's think outside the box to do something a little bit different than everybody else is doing.

24:54 other people pay attention.

24:56 So the people that are there, you know, these other frameworks are paying attention to what's going on here and, and everybody learns from each other.

25:04 So, having a speed up in one area, maybe, maybe we can have somebody that take this and, and make the interface as easy to work with as like FastAPI or last or something.

25:15 And absolutely.

25:16 And, or, get some of the learnings from here and build those into the other frameworks as well.

25:22 So, yeah, maybe not, for everything you're doing, but if, if you have like some project, that's, that's some part or some part of your project that needs to be super high speed.

25:33 this is a good thing to take a look at.

25:35 Yeah, absolutely.

25:36 I agree.

25:37 So put it in the interesting category and, congrats zero on some pretty high end performance there.

25:42 Yeah.

25:43 Nice.

25:43 Well, I think that's it for all of our items.

25:46 Isn't it our main ones.

25:47 Yeah.

25:48 I got a couple extras.

25:49 Yeah.

25:49 Throw them in.

25:50 yeah.

25:51 So let's, I w I was, I was actually going to cover this, but I think it's a little early.

25:56 So it's a project called mouse bender, from Brett Cannon.

26:00 And, the ideas I think, is around producing and consuming.

26:05 It says producing, consume dependency lock files for Python.

26:08 And there's some, goals for the project, about, this project hopes to eventually

26:16 provide a way to create reproducible installations for virtual and a virtual environment from a

26:22 lock file.

26:22 And so there's a lot of stuff going on here, but it's a little early in the project.

26:26 So, I'm, I just want to point this out and I, if people really care about packaging,

26:32 maybe watch this, I'm going to be, I care about it.

26:35 So I'm going to be watching this project and see if there's anywhere where I can contribute

26:38 possibly.

26:39 anyway, mouse bender, looks interesting.

26:42 I don't think it's ready to use for anything yet, but, but yeah, it sounds, it looks a

26:48 little interesting.

26:49 Yeah, it does.

26:50 Yeah.

26:50 Nice work, right?

26:51 and I think I got this from Brett too, but I can't remember.

26:54 there's a, there's, there's a page called, at dev guide.python.org versions.

27:01 We've got, status of Python versions and a graphic for all the release cycles.

27:07 That's so cool.

27:08 And we'll need to see this graphic.

27:10 This is cool.

27:10 Yeah.

27:11 And, it's neat because it shows you all the old end of life ones, and how long

27:16 they've been, you know, end of life for 2.6 was back.

27:21 In 2013.

27:22 So what are you guys doing?

27:24 If you're still using that?

27:25 They should put like a skull and crossbones on the 2.7 and 2.6 or something.

27:28 but so you've got a whole bunch in end of life.

27:31 You got some in the security zone, which means if there's security fixes, they'll add those.

27:36 and then, but then they get like it, you only got like six months left of, 3.7.

27:42 So if you're still using 3.7, it might be a good time to upgrade, but shows all the, you

27:47 know, the only one that with feature is a 3.12 right now.

27:50 Cause that's the one that's being worked on.

27:52 and, it's kind of a neat visual.

27:54 this page is pretty simple too.

27:56 And, and at the bottom you've got more specifics of when things are end of life, but, at

28:02 the bottom, the description of what all these mean.

28:04 So what does feature versus, end of life mean things?

28:08 Good thing.

28:09 Neat.

28:09 Yeah, that's cool.

28:10 I switched our website to run 3.11 by the way.

28:13 Nice.

28:14 Yeah.

28:14 Like a week ago and it's still running.

28:16 So that's good.

28:16 Yeah.

28:17 I switched some of our test code at work to, to flip to 3.11 and, and, one of my

28:24 team members says, Oh, I wonder if we're ready.

28:26 And I'm like, Oh yeah, we've already switched.

28:27 So, yeah, we better be.

28:30 It's been doing it for a while.

28:31 So, do you have any extras?

28:34 of course.

28:35 So I thought this would be the only thing that I would refer back to my website for, but then

28:41 that writeup I did on Kagi, I'm going to try to do a video.

28:43 version of that Kagi live with it thing.

28:45 but I ended up realizing that that was going to take way more time than I have this

28:49 week.

28:50 So I just wrote it up.

28:50 But another one I wrote up, people can just check this out as, sometimes you should

28:55 build it yourself.

28:56 and embracing your not, you're not built here.

29:00 Maybe we should just build it.

29:01 I know we could buy it, but let's build it.

29:02 sort of talking about some of the things, I did at talk Python as well as Python bytes

29:06 and like how, sometimes you sort of get into this cascade of things where

29:13 new possibilities arise, right?

29:15 So for example, one of the parts that says integrations abound.

29:18 So for our live stream, right?

29:20 We have our live stream here on YouTube at the moment.

29:23 And then it becomes the podcast says, because the way we put all this stuff together is not

29:29 only do we do our live stream, but I push a button on the stream deck that announces this

29:33 on Twitter and also that on Mastodon, Mastodon puts the website into live stream mode.

29:37 But then that platform will, you know, Python bytes will take the, the YouTube live stream,

29:43 grab its carefully crafted thumbnail, pull that down to actually become the social share

29:48 image.

29:49 So if somebody shares the episode on Mastodon or Twitter, all the way back to the thing we

29:54 did with the live stream is actually already producing the, the image.

29:58 And so it just talks about like, you know, sometimes, because I always have had this

30:02 tendency, like, well, don't build it yourself.

30:04 Find something that works, find something that's out there.

30:06 And you have to break down and build it yourself.

30:08 And like, you know what?

30:09 There's actually some really cool stuff that we've been able to accomplish because we built

30:12 it ourselves.

30:13 So here's a kind of a, an essay on that.

30:15 I would say.

30:15 Nice.

30:16 Yeah.

30:16 So people can check that out.

30:17 Also back to the live with it side of things.

30:20 I'm, I'm trying to support smaller companies and be less just integrated into like one big

30:28 tech giant.

30:29 So for my personal email, I've got a domain, mkennedy.tech.

30:35 It's what I went with, which redirects to my other one for my blog.

30:37 But, then that was hosted on Gmail on like a paid $6 a month, email docs, whatever.

30:45 And I just got really tired of trying to juggle two Gmail accounts, two Google drive accounts,

30:49 two Google calendars, you know, all these things.

30:52 I'm like, why am I doing this?

30:53 Why don't I get a dedicated cool place that is like even a little more on the privacy side

30:57 as well.

30:58 So I'm trying to try and go all in on, Proton.

31:02 Do you have a Proton account?

31:03 Use this.

31:03 I don't.

31:04 Well, for a long time, it was just email.

31:06 And like, you can have like a Proton.me or a Proton.com or whatever.

31:10 But I realized recently that they have other, features where, if you pay $7 a month,

31:19 you get access to all of their things like their calendar and drive and VPN, but that doesn't

31:23 matter to me.

31:23 But you get three custom domains and 15 email addresses plus catch all email addresses and,

31:30 hide my email aliases.

31:32 So I can have all of my different domains all have email addresses and that all basically

31:38 resolve back to my personal email.

31:40 Ooh, cool.

31:41 Isn't that cool?

31:42 And so I was at Google and I just changed the MX records and now I'm at Proton.

31:46 And if I like it, I'll stay here.

31:47 If not, I'll change my MX records again and I'll be somewhere else.

31:50 But, you know, kind of try to take control of the email.

31:52 So it's my thing, not something at gmail.com, no matter what you think about it.

31:57 Right.

31:57 Yeah.

31:58 So anyway, people can check that out.

31:59 I just want to mostly point out Proton looks like it has more to offer than it used to.

32:03 And how about like support?

32:05 Can you just use your, I mean, to the, like, use your normal email client to, to access

32:10 all this stuff or?

32:11 so Proton is like end to end encryption, which is a little tricky, but they have, what

32:16 is it?

32:17 It's called, Proton Bridge.

32:19 So, let's go to the mail thing.

32:22 So this is it.

32:23 So what you can do is you can run this thing on Mac or Windows or Linux.

32:27 And it's like a little, you connect to basically local host for your email client, for your

32:32 email server.

32:33 And it talks to Proton with the end to end encryption.

32:36 And then it just does IMAP the last few, I don't know.

32:40 It's not even the, not even the last step of the network, right?

32:42 It's just, it's a loop back.

32:43 And so, yes, you can connect your, your usual things to with that.

32:47 Okay.

32:47 Cool.

32:48 Yeah.

32:48 All right.

32:48 another quick one.

32:49 There was a court in Germany that, stand kind of the same theme that decided that,

32:55 Google fonts usage of Google fonts.

32:57 Like if you look at a lot of web pages, they'll internally have slash slash fonts.google.com.

33:02 Some like open, whatever, right?

33:05 Some, some font name and like the, the weights of it that exchanges a bunch of cookies and tells

33:10 Google about the visitors.

33:11 Yay.

33:12 And so, of course it does.

33:14 Cause even the YouTube thumbnail picture does, why wouldn't it?

33:18 So, bunny, bunny.net, which is the awesome CD.

33:22 And that we were, I talked about a couple of times ago, a couple episodes ago, they released

33:26 this thing called bunny fonts.

33:27 And so bunny fonts is epic.

33:30 They even talk about like this, this court ruling and a GDPR and stuff, but the idea is

33:35 it's a, the bunny fonts is a drop-in placement for Google, Google fonts for

33:42 Google fonts.

33:42 Yeah.

33:42 So whatever URL you would put into your website to get the fonts from Google, you just change

33:47 the word Google to bunny.

33:49 Wow.

33:50 That's really a drop in.

33:51 Yeah.

33:51 Yeah.

33:52 And it's the same API as just, you change the word and you get like super fast CDN backed

33:57 zero privacy leaking fonts.

34:01 So you can just, it's super easy to adopt.

34:03 Right.

34:03 It's pretty cool.

34:04 So, not zero privacy, hyper.

34:06 Yeah.

34:06 Hyper zero privacy leaking.

34:08 Yeah.

34:09 Zero privacy trade offs or whatever.

34:11 Where's there?

34:12 here we go.

34:13 Here's their fonts.

34:13 But anyway, that's cool.

34:15 Isn't that cool?

34:16 Yeah.

34:16 Yeah.

34:17 So, super easy.

34:19 Bunny.

34:19 I mean, you don't even have to have an account and it's a cute bunny.

34:22 I mean, they're bunny.

34:22 They're, they're, iconography is really, really good.

34:25 So there's a place where you go pick the font.

34:28 So you come over here and say, I'm interested in a Homa or I don't know, whatever.

34:33 I don't even know a font.

34:34 Let's say you're interested in this one.

34:35 Or you could just like say, I want to add it.

34:37 And it gives you like the little, the little URL, which is just font.bunny instead of,

34:42 instead of the Google one.

34:44 So yeah, it's pretty cool.

34:45 Anyway, that's all I got for my extras.

34:46 Well, that's a great, yeah, good stuff.

34:49 All right.

34:50 I have a joke for you.

34:51 Oh, let's do a joke.

34:52 Yeah.

34:52 Are you ready?

34:53 Yeah.

34:53 You've heard of ChatGPT.

34:56 I'm sure.

34:57 I'm trying to not hear about it.

34:58 I know I've, I logged out so I could, specifically, show the homepage.

35:04 So I got to get back.

35:05 Anyway, ChatGPT.

35:06 I'm trying to not hear about it as well.

35:07 My brother actually shared this with me.

35:10 Him and his son, my nephew were playing with it, doing some coding stuff.

35:14 So how they ran across this example.

35:17 So this is a tweet from someone else that he shared with me.

35:20 Riley, the tweet is not my brother.

35:22 it says open AI is new ChatGPT explains the worst case timing complexity of the bubble

35:29 sort algorithm.

35:29 Okay.

35:30 So what you can do is you can say, give me a step-by-step analysis of the worst case time

35:35 complexity of the bubble sort algorithm with Python code examples.

35:38 Right?

35:39 So that, that's, that's not a joke, right?

35:41 That's helpful.

35:41 It could tell you here's the situation and it could like show you with Python code examples,

35:46 but the next part makes it awesome.

35:48 Give me the explanation with Python code examples, but write every sentence in the speaking style

35:53 of a fast talking wise guy from a 1940s gangster movie.

35:58 This is good.

35:59 Are you ready?

35:59 Yeah.

36:00 Okay.

36:00 All right, pal.

36:01 Listen up.

36:02 The bubble sort algorithm.

36:03 She's a real simple one, but the worst case time complexity, that's a whole different

36:06 story.

36:07 You see, in the worst case, every element in the list got to be swapped.

36:10 So the time complexity is going to be proportional to the square, the length of the list.

36:14 Get it?

36:14 Here's the Python code to help you out.

36:16 See if you follow along.

36:17 There's some Python code with comments, by the way.

36:20 See, in the worst case, the while loop is going to keep looping until there ain't no more

36:25 swaps to be made.

36:26 The inner loop, it's going to go through every element in the list.

36:29 So the time complexity is going to be proportional to the square of the list.

36:31 Get it?

36:32 What do you think?

36:33 This is good.

36:35 It's pretty fun, right?

36:36 Yeah.

36:36 So.

36:37 All right.

36:37 Anyway, well, I don't know.

36:39 The chat GP stuff is interesting.

36:41 It's kind of scary, but it's also funny.

36:44 But does the algorithm work?

36:46 I haven't read it, but I think so.

36:49 It looks like the right kind of, at least first glance, it looks right.

36:53 I don't know.

36:55 I could always go and copy the code and try to run it.

36:58 What do you think?

36:59 It's like too much work.

37:02 No.

37:02 Oh, the indent.

37:03 The indent is off.

37:05 That's.

37:06 Yeah.

37:06 You know what?

37:08 I'll run it and report for next time.

37:10 See if the wise guy's code is actually any good.

37:12 Yeah.

37:13 I'm always up for volunteering you for work.

37:16 Nice.

37:18 Anyway.

37:19 Thanks.

37:20 Yeah.

37:20 That was funny.

37:21 Yeah, it was.

37:21 All right.

37:22 See you later.

Back to show page