WEBVTT

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

00:00:05.200 --> 00:00:11.520
This is episode 353, recorded September 18th, 2023. I am Brian Okken.

00:00:11.520 --> 00:00:12.720
And I am Michael Kennedy.

00:00:12.720 --> 00:00:20.280
This episode is brought to you by us. So please check out Talk Python Training and the new Python

00:00:20.280 --> 00:00:24.800
Testing with pytest course that's in progress, but already awesome. And also thank you to our

00:00:24.800 --> 00:00:31.760
supporters. And if you want to connect to any of us, you've got Python Bytes and Brian Okken and

00:00:31.760 --> 00:00:37.820
M Kennedy all on Fosstodon and the links are in the show notes. So let's kick it off with our first

00:00:37.820 --> 00:00:44.760
AI topic, Michael. Let's ask the AI what our first topic should be. Let's go to Stack Overflow and ask

00:00:44.760 --> 00:00:51.820
them what our first AI topic should be. No, seriously. So Stack Overflow has announced Overflow AI,

00:00:51.820 --> 00:00:55.960
which is not I'm sure they have, you know, they've got Stack Exchange with all sorts of different

00:00:55.960 --> 00:01:02.100
things like stuff for Linux, stuff for Mac, DevOps, you know, you name it. Yeah. So I don't think this

00:01:02.100 --> 00:01:09.460
is not another AI overflow type thing in that sense. This is adding generative AI to Stack Overflow.

00:01:09.460 --> 00:01:15.140
All right. Okay. So the best way to kind of get a sense of what's going on here is there's a little

00:01:15.140 --> 00:01:20.060
video, a three minute video that seems like it could be about 45 seconds given how much content is in it.

00:01:20.060 --> 00:01:25.940
But you know, spend 30 minutes with them and you'll get an example. So the most relevant portion,

00:01:25.940 --> 00:01:30.260
there's some stuff that we don't care about here, but the most relevant portion is when you go to

00:01:30.260 --> 00:01:36.500
Stack Overflow, you search for an answer. It gives you a list of results, right? Those results are based on

00:01:36.500 --> 00:01:42.220
traditional search, right? You know, keyword matches. And honestly, it does surprisingly well,

00:01:42.220 --> 00:01:49.300
when you go search there. But they're changing their search and this is maybe it's out now. I have a hard time

00:01:49.300 --> 00:01:55.180
time telling if it's out now as a preview you can sign up for, but you go to Stack Overflow and you

00:01:55.180 --> 00:02:01.060
search for something now you get like a ChatGPT like response if you want. And it'll say, here are

00:02:01.060 --> 00:02:07.540
some of the possible answers, but here's also just a, you know, like if you search Google or a Kagi, you

00:02:07.540 --> 00:02:12.060
might get a little snippet that just shows you the answer from Stack Overflow without taking it there.

00:02:12.060 --> 00:02:16.060
It's kind of like that. It'll say, and here's a little bit of an answer. And then you can actually

00:02:16.060 --> 00:02:20.500
start a conversation about it. Like you would with ChatGPT, like that's cool, but it doesn't quite

00:02:20.500 --> 00:02:26.260
apply. How would you, you know, I don't, I'm not using Selenium for this. I'm using Pyrite. Could you

00:02:26.260 --> 00:02:32.260
give me an example of the same, the same process, but with Pyrite, you know, it'll try to give you the

00:02:32.260 --> 00:02:37.780
answer. Right. So that's all pretty cool. And they're integrating generative AI into the public

00:02:37.780 --> 00:02:43.180
platform into Stack Overflow for teams. I didn't know Stack Overflow for teams existed, but if I had a

00:02:43.180 --> 00:02:48.740
team, it would look really cool to use, but not, not in a huge corporation, not a ton of people

00:02:48.740 --> 00:02:56.180
working on stuff. So they're also planning to add at the moment VS Code integration or Stack Overflow

00:02:56.180 --> 00:03:01.520
and the Stack Overflow AI. So you can just like, you know, you've got your source control section,

00:03:01.520 --> 00:03:06.880
your file section. It's just got a Stack Overflow section where you can start talking to it and get

00:03:06.880 --> 00:03:12.520
generative AI answers out of Stack Overflow. So I find there's a little bit of irony here, Brian.

00:03:12.800 --> 00:03:20.560
In that Stack Overflow was banning answers from ChatGPT. Now they're adding a feature that lets you

00:03:20.560 --> 00:03:27.160
have a conversation and query it using generative AI, which seems normal. However, one of the features

00:03:27.160 --> 00:03:32.740
they highlight in the video is you can say, none of this applies to me. AI helped me draft a question.

00:03:32.740 --> 00:03:37.580
So the answers can't be generative AI, but the questions can be generative AI.

00:03:37.800 --> 00:03:38.420
Interesting.

00:03:38.420 --> 00:03:48.560
For the right source of AI, right? Origin, right? The Overflow AI, ChatGPT. So this is in private alpha,

00:03:48.560 --> 00:03:54.000
I guess, is the current form. But I went to, I went there, the way I discovered is I went to search for

00:03:54.000 --> 00:03:58.600
something on Stack Overflow. I said, do you want to try out the new Overflow AI search? I'm like, yes.

00:03:58.600 --> 00:04:03.720
What is this? This looks very interesting. And in my profile under settings, I have the ability to

00:04:03.720 --> 00:04:07.340
have that turned on. It is turned on, but when I go to do search stuff, it doesn't seem to use it.

00:04:07.340 --> 00:04:11.860
So I think it's like fading in and out as they're making changes to it. But yeah, people can check

00:04:11.860 --> 00:04:16.880
that out. And then finally, VS Code extension looks cool. Where's our PyCharm one? Come on,

00:04:16.880 --> 00:04:21.400
bring it on, bring it on. I want this in PyCharm too. PyCharm also added its own little AI

00:04:21.400 --> 00:04:26.760
assistant, but I'm, I'm waiting for it to get better. Yeah, you can. Yeah, it's pretty cool.

00:04:26.760 --> 00:04:32.300
But it's, it's not something I'm totally embracing yet. I just wanted to be, I'd like it when it rolls

00:04:32.300 --> 00:04:38.300
out completely. I'd like it to be able to be able to know, did this come from a person or from an AI?

00:04:38.300 --> 00:04:45.640
Or was it some mix of the two or something? I don't know. Right. Kind of like with, and I,

00:04:45.720 --> 00:04:54.000
and I kind of agree with them for not allowing AI people to just throw the, throw the question

00:04:54.000 --> 00:04:58.340
into ChatGPT and paste the answer into stack overflow. That's, that's not, that's not what

00:04:58.340 --> 00:05:03.780
people are expecting. So. Right. And if you want that, just put your question straight in ChatGPT,

00:05:03.780 --> 00:05:12.320
like leave out the stack overflow middle aspect. I'm sure the real concern was, you know, there's a lot

00:05:12.320 --> 00:05:16.460
of reputation stuff. There's a lot of like, this person is really good at answering questions and

00:05:16.460 --> 00:05:21.320
here's how much you've contributed. And if you just, you know, you could easily game that with AI

00:05:21.320 --> 00:05:28.120
results and I'm sure it is being gained with AI results just with a little more work, but you know,

00:05:28.120 --> 00:05:35.260
such as the world. Yeah. It's the times are a changing. So they, they are, that's what ChatGPT

00:05:35.260 --> 00:05:40.440
told me anyway. How about you? What's your next one? Well, I was going to talk about

00:05:40.440 --> 00:05:46.480
switching to hatch. So, for packaging for Python packaging and also setting up virtual

00:05:46.480 --> 00:05:52.540
environments and stuff, I guess. So hatches, I'm okay. So for packaging, we had set up tools

00:05:52.540 --> 00:05:59.300
and then we had lots of stuff. We had like flit and hatchling and poetry and all sorts of things.

00:05:59.660 --> 00:06:06.040
so, hatch, there's two parts to hatch. There's hatchling, which is the backend that helps

00:06:06.040 --> 00:06:12.420
you build and unbuild packages and stuff. And then there's, there's hatch, which is built.

00:06:12.420 --> 00:06:17.560
It has hatchling as part of it, but anyway, let's go through this. There's an article from Oliver

00:06:17.560 --> 00:06:23.700
and rich talking about switching to hatch. and great graphic, by the way, there's a graphic

00:06:23.700 --> 00:06:28.460
that says, I don't know where I'm going from here, but I promise it won't be boring. That's

00:06:28.460 --> 00:06:36.000
pretty cool. anyway, he was using poetry, looked at PDM and now he's thinking about hatch.

00:06:36.000 --> 00:06:41.880
It's, possibly his new love. We don't know. It's a question mark. So, there's, there's a

00:06:41.880 --> 00:06:46.360
sentence here that bothers me and we can get back to it, but it says some prominent projects are using

00:06:46.360 --> 00:06:52.720
are enjoy using it or using hatch. I don't know if that's true, but let's go on. He does show some

00:06:52.720 --> 00:06:57.740
really cool things with, with hatch, which I didn't know it could do. For instance, when you

00:06:57.740 --> 00:07:03.680
say hatch new project, it creates a new PI project.toml file. One of the things it does in that is it

00:07:03.680 --> 00:07:09.260
creates these, these entry points to, environment like virtual environments. And they're

00:07:09.260 --> 00:07:15.240
separate ones for things like there's a default one. And then there's a test one that has like your

00:07:15.240 --> 00:07:22.080
PI test and plugins and stuff. Then there's linting that has like pyrite and black and rough and things

00:07:22.080 --> 00:07:27.740
in it. his question really was, why would I have like, why wouldn't I have like, just a dev

00:07:27.740 --> 00:07:33.660
virtual environment, but we're using a lot of extra tools now they might have dependencies that clash.

00:07:33.660 --> 00:07:39.840
So if you do have dependencies that clash, maybe a separate virtual environment for each type of tool

00:07:39.840 --> 00:07:44.240
chain might be interesting. You are speaking my language now. I didn't really think about that,

00:07:44.320 --> 00:07:52.280
but there's about a 50, 50 chance. If I say update all the dependencies for Talk Python Training, which I

00:07:52.280 --> 00:07:57.640
think is about 50, there's the runtime ones. And then there's the reporting dev ones. And that includes

00:07:57.640 --> 00:08:03.280
some things like Jupyter notebooks for graphs and stuff. Yeah. There's about a 50, 50 chance that I'll

00:08:03.280 --> 00:08:09.240
get an error saying cannot find any solution to these requirements that you're asking for because something in the

00:08:09.240 --> 00:08:16.240
data science stack forces something to be less than or equal to, and something in the other stack is greater than or equal to.

00:08:16.240 --> 00:08:26.200
So if you're not intersecting and you're like, well, yeah, it still runs fine. And I'm sure it'll be okay. But it's like, I'm constantly

00:08:26.200 --> 00:08:34.160
doing a dev environment and a dev tools environment in a runtime environment is actually pretty, pretty cool idea.

00:08:34.160 --> 00:08:44.120
So if you're not going to be able to do that, you're going to be able to do that.

00:08:44.120 --> 00:08:57.120
You can also do scripts. So each environment can have its own set of scripts. So you could have linting scripts and testing scripts and docs scripts and things like that. Like, for instance, one of the linting ones, you could say, run black, and it has all of your black arguments or something.

00:08:57.120 --> 00:09:15.120
You can have that. That's pretty, it's kind of neat. No need to use talks. This surprised me.

00:09:15.120 --> 00:09:28.120
Apparently, there's a matrix ability for hatch. So you can do a test matrix, test matrices within hatch. I don't know if you can do other, why would you do a docs matrix though?

00:09:28.120 --> 00:09:41.120
You know, so test matrix makes sense. I don't know if it makes sense anywhere else. But that's kind of neat. And then the last bit I thought was pretty cool was that, well, for what it has scripts, but I don't know if it's very convenient.

00:09:41.120 --> 00:09:53.120
So like, say you have a Cove script for coverage within your test environment, you would run it by saying hatch run test colon Cove. It's kind of a mouthful still. So I'm not sure.

00:09:53.120 --> 00:09:54.120
It is. Yeah.

00:09:54.120 --> 00:10:10.120
Optional dependencies are kind of neat. You there's all most tools have optional dependencies, but the apparently hatch has a kind of a neat way to say so let's say in the example, you had to have two different optional dependencies for my SQL or Postgres, depending on what database you want to install.

00:10:10.120 --> 00:10:17.120
database you want to install. A default could be just saying my SQL and it would pull in all of the requirements for my SQL.

00:10:17.120 --> 00:10:45.120
You just so you can there's an easy way to do sort of a transitive default set. So it's kind of cool. Anyway, nice. The thing I wanted to come back with was the comment of like everybody's using it. I don't think everybody's using it. If the in if you look at the hatch website, it does say all these different projects are using hatch. But some of them, it's obvious they're using hatchling. Like most of my projects use hatchling. That's not the same as using hatch.

00:10:45.120 --> 00:10:48.120
Yeah, it could just be the build back. Yeah, just for building the wheels. Right?

00:10:48.120 --> 00:11:10.120
Exactly. That build back in is rock solid and I recommend it. The hatch is sort of the work with the top hatches that workflow tool is similar to poetry. So but still cool. I kind of like that. Poetry kind of makes you at least last time I tried it. It's sort of in had you take all of the tools with it. But hatch is more of a use the tools you want sort of a tool. So anyway. Yeah.

00:11:10.120 --> 00:11:28.120
Kind of cool. So nice. I just checked while we were talking. You did. What did I say 48 or something for the number of dependencies? Yeah, it's insane. I don't know how I got to where 232 packages to run Talk Python Training with the reporting. I can't easily separate the dev versus runtime.

00:11:28.120 --> 00:11:55.120
Yeah, that like more work. But yes, that's a lot of packages. And that's a it's like, are you sure you're not using like, go or something else that uses tons of dependencies? JavaScript? Yeah, yeah, yeah. I'm not saying it's a problem. It's just there's with 232. There's a chance there's a reasonable chance that a bunch, you know, a good bunch of those come from the non runtime stuff. There's a good chance that there's a clash between them. So this idea of multiple virtual environments. Yeah. Yeah. Yeah.

00:11:55.120 --> 00:12:24.940
I'm assuming most of those are transitive. You're using some tool that's using some other tool. Yeah, exactly. Exactly. Cool. Okay, on to the next. Hold on. Comment from Mark in the audience says, Yeah, I feel like hatchling but not hatch is a fairly common pattern. When mentioned on Doc Python to me. Yeah. Awesome. Speaking of, speaking of, I just want to point out that episode 408 earlier this year,

00:12:24.940 --> 00:12:32.560
I had ofech on the creator of hatch, talk about hatch and its benefits and all those different things. So cool.

00:12:32.560 --> 00:12:38.260
People can check that if they can, but let's talk formatting code. Formatting code equals black. Yes.

00:12:38.260 --> 00:12:50.260
Yeah. And others and others rough. However, rough checks your code formatting for correctness. And we've, we've discussed how fast rough is right to the point where it's like, Hmm.

00:12:50.260 --> 00:12:57.220
Did I actually check the code? Did I enter the wrong, the wrong directory and there just found no contents, right? That kind of thing. Right.

00:12:57.880 --> 00:13:08.080
Well, this was sent over to us from sky. So thank you sky for sending in. Charlie Marsh, creator of rough has announced the Ruff formatter.

00:13:08.080 --> 00:13:17.500
So not just telling you what's wrong, but checking for errors, but formatting your code based on convention, similar, but not identical to black.

00:13:17.500 --> 00:13:24.280
Black. So that's pretty cool. Let me read a few things that sky sent over here. Cause I think it's their experiences worthwhile.

00:13:24.280 --> 00:13:34.060
So Charlie says, first of all, the formatter is designed to be a drop in replacement for black, but with an excessive focus on performance and direct integration with rough.

00:13:34.060 --> 00:13:35.000
That's pretty cool. Right.

00:13:35.000 --> 00:13:49.820
Right. So sky says, I can't find any benchmarks that have been released yet, but I did some extremely unscientific testing caveat there and found the Ruff formatter to be five to 10 times faster than black when running on already formatted code or in a small code base.

00:13:49.820 --> 00:13:55.700
So five to 10 times faster, but 75 times faster when running on a large code base of unformatted code.

00:13:55.700 --> 00:14:03.300
However, they point out that the second outcome is not that relevant because how many times do you format huge projects that are not formatted?

00:14:03.300 --> 00:14:05.240
No, normally it's incremental, right?

00:14:05.240 --> 00:14:10.080
So the smaller bits is maybe worth paying attention to more there.

00:14:10.080 --> 00:14:11.320
Yeah.

00:14:11.320 --> 00:14:16.760
So I almost missed this announcement because rough already had some, go ahead and fix it.

00:14:16.760 --> 00:14:18.100
If you can features.

00:14:18.100 --> 00:14:18.420
Yeah.

00:14:18.460 --> 00:14:19.720
I did have a few fix it things.

00:14:19.720 --> 00:14:20.380
Yeah, exactly.

00:14:20.380 --> 00:14:26.320
And like I said, I think that was about, there's a, a violation rather than a convention, right?

00:14:26.320 --> 00:14:33.240
It's not a violation necessarily to say I write generally in single quotes, or I write in double quotes for all my strings.

00:14:33.240 --> 00:14:41.120
Or I might sometimes have a single quote or sometimes have a double quote where like you might have a coding convention that says all of our strings are the same.

00:14:41.120 --> 00:14:43.700
They all use single quotes or they all use double quotes.

00:14:43.700 --> 00:14:52.960
And I don't, there's no reason for like in the same function to have two kinds of strings unless, unless you're in that situation where like I'm saying it's possible.

00:14:53.480 --> 00:14:55.200
So I don't want to use a single quote.

00:14:55.200 --> 00:14:55.260
So I don't want to use a single quote.

00:14:55.260 --> 00:14:57.260
So I don't have to escape the apostrophe.

00:14:57.260 --> 00:14:58.860
So I'll use a double quote for that one.

00:14:58.860 --> 00:14:59.020
Right.

00:14:59.020 --> 00:15:03.300
But other than those like sort of weird cases, you shouldn't mix.

00:15:03.300 --> 00:15:03.780
Right.

00:15:03.780 --> 00:15:07.540
I think that's more what the point of the Ruff formatter is addressing and black as well.

00:15:07.540 --> 00:15:07.880
Yeah.

00:15:08.300 --> 00:15:13.840
Well, rough has a few and a few differences from, from black as well.

00:15:13.840 --> 00:15:14.440
Yes.

00:15:14.440 --> 00:15:20.880
And they, they call out as the formatters intended to emit near identical output when run over black formatted code.

00:15:20.880 --> 00:15:21.620
This is interesting.

00:15:21.620 --> 00:15:28.660
When run over extensively black formatted code projects like Django and Zulip, it was 99.9% the same.

00:15:28.940 --> 00:15:36.500
However, it says somewhere when run over non black formatted code, it might make different decisions than black has made.

00:15:36.500 --> 00:15:37.300
Yeah.

00:15:37.300 --> 00:15:40.440
And I kind of like some of the decisions that they're making.

00:15:40.440 --> 00:15:40.960
Just.

00:15:40.960 --> 00:15:41.760
I do too.

00:15:41.760 --> 00:15:43.240
I do actually like them quite a bit.

00:15:43.240 --> 00:15:46.980
So I'm, I'm a fan of some of these things.

00:15:46.980 --> 00:15:55.500
It's not, it doesn't have as many features yet as, as black does in terms of like controlling certain things or, you know, but they're, they're working on it.

00:15:55.500 --> 00:15:58.040
I was talking to Charlie just an hour ago by talking.

00:15:58.220 --> 00:16:00.020
Charlie just said, I meant submitting a GitHub issue.

00:16:00.020 --> 00:16:02.660
And it was quickly, we're having a back and forth there.

00:16:02.660 --> 00:16:03.540
So that's awesome.

00:16:03.540 --> 00:16:04.020
Yeah.

00:16:04.020 --> 00:16:05.080
I like, so it talks about.

00:16:05.080 --> 00:16:09.500
For instance, the line endings, I think are a cool way to deal with it.

00:16:09.500 --> 00:16:10.240
Yeah.

00:16:10.240 --> 00:16:10.740
So.

00:16:10.740 --> 00:16:16.640
The line feed versus carriage return line feed backslash end versus backslash R backslash end.

00:16:16.640 --> 00:16:18.720
That's a windows versus non windows.

00:16:18.720 --> 00:16:19.400
Yeah.

00:16:19.400 --> 00:16:20.040
Challenge.

00:16:20.040 --> 00:16:20.460
Right.

00:16:20.460 --> 00:16:25.120
And so I guess if you're on a windows, you don't want it to keep like unraveling that for you.

00:16:25.120 --> 00:16:25.800
I suppose.

00:16:25.800 --> 00:16:26.540
Yeah.

00:16:26.600 --> 00:16:31.540
Actually, I thought one of the things I thought I read was things about comments at the end

00:16:31.540 --> 00:16:32.040
of the line.

00:16:32.040 --> 00:16:39.460
Black would often put like the comment on a completely, your, your comment might not match up with what

00:16:39.460 --> 00:16:41.340
it, what you actually commented against.

00:16:41.340 --> 00:16:42.340
Yeah.

00:16:42.340 --> 00:16:42.340
Yeah.

00:16:42.340 --> 00:16:42.800
Yeah.

00:16:42.800 --> 00:16:44.680
Rough is trying to be a little bit better about that.

00:16:44.680 --> 00:16:45.140
So.

00:16:45.140 --> 00:16:45.500
Yeah.

00:16:45.500 --> 00:16:51.640
The other area where this is supposed to be different intentionally says frequently black

00:16:51.640 --> 00:16:55.400
will suggest this at the same or the different.

00:16:55.400 --> 00:16:56.340
Let's see.

00:16:56.340 --> 00:17:01.540
There's, there's some places where it's specifically different versus black.

00:17:01.620 --> 00:17:03.360
It talks about, I don't know.

00:17:03.360 --> 00:17:04.600
I haven't read it.

00:17:04.600 --> 00:17:08.880
I don't want to like mistake quoted here, but it's, it talks about there's a whole bunch

00:17:08.880 --> 00:17:11.680
of sections of the variations and so on.

00:17:11.680 --> 00:17:12.180
Yeah.

00:17:12.180 --> 00:17:14.580
Anyway, I'm, I'm excited to try it.

00:17:14.580 --> 00:17:18.440
And, and I think it's cool that this is happening in this space.

00:17:18.680 --> 00:17:24.120
Indeed, Jeff out there asks, is there also a rough daemon like black has?

00:17:24.120 --> 00:17:27.800
I had no idea about the black daemon and I definitely don't know about the rough daemon.

00:17:27.800 --> 00:17:35.120
But what I use is, I just have the ID integrate, IDE integration for rough.

00:17:35.120 --> 00:17:39.380
So it will automatically be running in the background, right?

00:17:39.380 --> 00:17:41.280
You get that for PyCharm and VS Code.

00:17:41.280 --> 00:17:46.460
I, I imagine it makes sense to have it run and just constantly checking.

00:17:46.700 --> 00:17:48.840
So I don't know, not, not sure.

00:17:48.840 --> 00:17:49.240
Right.

00:17:49.240 --> 00:17:50.240
This is still an alpha.

00:17:50.240 --> 00:17:51.800
So probably not.

00:17:51.800 --> 00:17:55.140
So, and also good to note it's, this isn't a set.

00:17:55.140 --> 00:17:58.060
It is kind of a separate tool, but it's part of rough.

00:17:58.060 --> 00:18:01.880
So it's a, if you say like Ruff format, yes, exactly.

00:18:01.880 --> 00:18:03.160
So yeah.

00:18:03.160 --> 00:18:04.960
Ruff format.

00:18:04.960 --> 00:18:10.020
And I actually was thinking, I can't find my little example that I was running earlier,

00:18:10.020 --> 00:18:11.080
but there's a couple of, yeah.

00:18:11.080 --> 00:18:16.500
So you can do things like, so you can say like Ruff format, dash, dash,

00:18:16.560 --> 00:18:19.260
line length, dash, dash respect, .gitignore.

00:18:19.260 --> 00:18:24.840
So it'll say if it's ignored and get, don't format it, please.

00:18:24.840 --> 00:18:25.340
Yeah.

00:18:25.340 --> 00:18:28.740
You know, things like packages that are installed in a virtual environment.

00:18:28.740 --> 00:18:31.440
Don't go messing with stuff that like, I don't care about.

00:18:31.440 --> 00:18:31.920
Right.

00:18:31.920 --> 00:18:38.080
If it's ignored in GitHub, I didn't get, it probably is only going to cause me trouble by messing with it.

00:18:38.080 --> 00:18:39.560
so just leave it alone.

00:18:39.560 --> 00:18:39.880
Right.

00:18:39.880 --> 00:18:41.120
It's kind of the way I see it.

00:18:41.120 --> 00:18:43.760
I never considered that.

00:18:43.760 --> 00:18:46.320
Does black change like virtual environments?

00:18:46.320 --> 00:18:48.240
this is a question.

00:18:48.240 --> 00:18:48.700
I don't know.

00:18:48.700 --> 00:18:48.960
Okay.

00:18:48.960 --> 00:18:51.560
Anyway, probably, probably not, but I don't want it to.

00:18:51.560 --> 00:18:52.000
It does.

00:18:52.000 --> 00:18:52.420
Yeah.

00:18:52.420 --> 00:18:52.740
Anyway.

00:18:52.740 --> 00:18:53.260
Cool.

00:18:53.260 --> 00:18:55.660
That, that, the rough, rough space format.

00:18:55.760 --> 00:18:56.080
Very cool.

00:18:56.080 --> 00:19:03.060
well, we're kind of going into the, like the inside baseball on this episode,

00:19:03.060 --> 00:19:03.760
but that's all right.

00:19:03.760 --> 00:19:08.300
next up, we've got a suggestion from Will McCoogan.

00:19:08.300 --> 00:19:10.560
thought this might be good.

00:19:10.560 --> 00:19:12.320
A good one to discuss on the show.

00:19:12.320 --> 00:19:13.960
what's wrong with Toml?

00:19:13.960 --> 00:19:17.340
I'm like, I don't think anything's wrong with Toml.

00:19:17.340 --> 00:19:18.240
So let's take a look.

00:19:18.500 --> 00:19:22.240
so there's an article, I forget calm.

00:19:22.240 --> 00:19:25.500
So it's hard to find, but Kamal Connor, cool name.

00:19:25.500 --> 00:19:27.180
what's wrong with Toml?

00:19:27.180 --> 00:19:33.620
And the gist of this really is Toml is, is great for smallish things.

00:19:33.620 --> 00:19:41.220
And even considering pyproject.toml is smallish, but interesting quote from, apparently from

00:19:41.220 --> 00:19:47.220
Martin Vignar, author of PyToml, said Toml is a bad file format.

00:19:47.220 --> 00:19:51.340
It looks good at first glance and for really, really trivial things.

00:19:51.340 --> 00:19:52.060
It's probably good.

00:19:52.060 --> 00:19:57.320
But once I started using it and the configuration schema became more complex, I found the syntax

00:19:57.320 --> 00:19:58.940
ugly and hard to read.

00:19:58.940 --> 00:20:01.360
Not sure what he was doing with it, but anyway.

00:20:01.360 --> 00:20:06.360
So there, apparently there's some, some funkiness with big things.

00:20:06.360 --> 00:20:08.260
And I'm like, well, what is big things?

00:20:08.260 --> 00:20:09.320
And what are they comparing it to?

00:20:09.320 --> 00:20:14.960
One of the comparisons is against a thing called strict YAML, which I didn't know what that

00:20:14.960 --> 00:20:15.280
was.

00:20:15.940 --> 00:20:18.560
And strict YAML is YAML compliant.

00:20:18.560 --> 00:20:20.600
It's the YAML that won't let you go out at night.

00:20:20.600 --> 00:20:22.220
Your curvy is like nine 30.

00:20:22.220 --> 00:20:24.340
It's, it's really, it's oppressive.

00:20:24.340 --> 00:20:28.980
apparently it's YAML with, some of the features taken away.

00:20:28.980 --> 00:20:33.380
So I'm not, it's not a standard yet, but apparently it's in the process.

00:20:34.040 --> 00:20:35.980
So like, what are they doing with it?

00:20:35.980 --> 00:20:37.260
That Toml is a problem.

00:20:37.260 --> 00:20:43.980
And, it's around strict YAML also is built for, what is it built for?

00:20:43.980 --> 00:20:46.240
readable story tests.

00:20:46.240 --> 00:20:48.280
I'm like, what's a readable story test?

00:20:48.280 --> 00:20:48.820
I want to see.

00:20:48.820 --> 00:20:50.200
Here's some examples.

00:20:50.200 --> 00:20:55.540
We've got, this is a, strict YAML readable story.

00:20:55.540 --> 00:20:58.500
mappings with defined keys.

00:20:58.660 --> 00:21:03.580
Anyway, this is sort of readable, but there's a lot of keywords in here that, I'm not

00:21:03.580 --> 00:21:04.640
going to say this is readable.

00:21:04.640 --> 00:21:06.400
I don't think this is that great.

00:21:06.500 --> 00:21:10.080
Now compared to the, Toml version.

00:21:10.080 --> 00:21:11.620
Yeah, this is weird.

00:21:11.620 --> 00:21:16.580
You've got like these weird brackets with lots of, I don't think this is necessarily a problem.

00:21:16.580 --> 00:21:20.980
My take on it is I wouldn't use either of these for this purpose.

00:21:20.980 --> 00:21:21.340
Exactly.

00:21:21.340 --> 00:21:28.340
Like I would use Python, probably to describe stories, but anyway, I don't want to bash

00:21:28.340 --> 00:21:28.680
on him.

00:21:28.680 --> 00:21:34.020
I guess something to think about if, Toml is, if you're using Toml for really large things,

00:21:34.020 --> 00:21:35.220
maybe it's a problem.

00:21:35.220 --> 00:21:40.480
I'd be curious to know, well, if, well, if you're listening, what do you think?

00:21:40.480 --> 00:21:44.720
Is it, are you using some wacky large Toml files that are becoming a problem?

00:21:44.720 --> 00:21:45.560
I don't know.

00:21:45.560 --> 00:21:49.920
So that's just wanted to throw that out there.

00:21:49.920 --> 00:21:50.440
Awesome.

00:21:50.440 --> 00:21:51.960
Got any extras to throw out there?

00:21:51.960 --> 00:21:55.400
my extras are totally self-serving.

00:21:55.400 --> 00:22:00.160
but, I see the beginning of the episode.

00:22:00.300 --> 00:22:00.540
Yeah.

00:22:00.540 --> 00:22:05.620
So the last, so last, last week I announced, I think that I had a part one of

00:22:05.620 --> 00:22:08.840
the, my test course, all buttoned down and ready.

00:22:08.840 --> 00:22:14.440
And that was a kind of a problem because my video intro video was like, Hey, I'm starting

00:22:14.440 --> 00:22:16.060
this course, but I've already started it.

00:22:16.060 --> 00:22:18.480
So I re what I did is I did a few things.

00:22:18.480 --> 00:22:23.500
I redid the video, the intro video to just sort of describe where, where this course fits

00:22:23.500 --> 00:22:24.520
in with everything else.

00:22:24.700 --> 00:22:27.440
and so it's like a few minutes to check it out.

00:22:27.440 --> 00:22:33.460
the other thing I did was I had some feedback from people that said, teachable sort of

00:22:33.460 --> 00:22:36.120
easy to use, but some people might not understand.

00:22:36.120 --> 00:22:37.760
Maybe you should do a little intro video.

00:22:37.760 --> 00:22:42.840
So I did a, a little intro video for how to use, how to use teachable.

00:22:42.840 --> 00:22:45.060
and it's a few minutes also.

00:22:45.320 --> 00:22:48.960
And one of the things I like about this is I learned some things that I didn't know.

00:22:48.960 --> 00:22:53.980
So you can, my favorite is you can adjust the speed so you can listen to me, at like

00:22:53.980 --> 00:22:56.900
1.25 or 1.5 speed and it'll go faster.

00:22:56.900 --> 00:22:59.100
The other thing is you can add notes.

00:22:59.100 --> 00:23:04.240
You can add like notes for different video places and say, and then when you, when you

00:23:04.240 --> 00:23:07.940
click on it, so I'll even do it without explainer video.

00:23:07.940 --> 00:23:09.280
You can grab a note.

00:23:09.280 --> 00:23:09.900
Hi.

00:23:10.400 --> 00:23:14.820
and then later you can go back and click on the note and it takes you back to

00:23:14.820 --> 00:23:15.700
that part of the video.

00:23:15.700 --> 00:23:18.000
So if you want to keep some notes, that's kind of neat.

00:23:18.000 --> 00:23:21.360
So that's, that's our early, all my extras is that's going on.

00:23:21.360 --> 00:23:21.840
Yeah.

00:23:21.840 --> 00:23:22.840
That's a very useful feature.

00:23:22.840 --> 00:23:23.420
Excellent.

00:23:23.420 --> 00:23:24.000
Excellent.

00:23:24.000 --> 00:23:26.280
What you got making progress on your course.

00:23:26.280 --> 00:23:27.080
Nice to see.

00:23:27.080 --> 00:23:27.580
Thanks.

00:23:27.580 --> 00:23:30.940
I also have a course announcements.

00:23:30.940 --> 00:23:38.160
So Christopher Trudeau and I teamed up to create a Django version of the HTMX course at

00:23:38.160 --> 00:23:38.900
talk Python.

00:23:39.120 --> 00:23:43.480
Now we have HTMX plus Django modern Python web apps hold the JavaScript.

00:23:43.480 --> 00:23:49.980
So this is a two hour course that shows Django developers, how to work with HTMX, how to

00:23:49.980 --> 00:23:55.700
build up like a pretty, pretty realistic, pretty complicated, but not overly complicated, but

00:23:55.700 --> 00:23:59.500
you know, not toy type of application that they get to build throughout the course.

00:23:59.500 --> 00:24:00.580
So check that out.

00:24:00.580 --> 00:24:02.460
It's still on the early bird special.

00:24:02.460 --> 00:24:08.540
So if people get to it by the 23rd, September 23rd, got a few more days to

00:24:08.540 --> 00:24:09.320
save 10%.

00:24:09.320 --> 00:24:11.900
If you're thinking about getting it might as well do that now.

00:24:11.900 --> 00:24:14.080
And it has the sister flask course.

00:24:14.080 --> 00:24:15.900
If you don't Django, but you flask.

00:24:15.900 --> 00:24:19.800
So those are our two sides of the same coin there.

00:24:19.800 --> 00:24:20.900
And HTMX is just awesome.

00:24:20.900 --> 00:24:21.580
So check that out.

00:24:21.580 --> 00:24:22.360
If people are interested.

00:24:22.360 --> 00:24:23.720
Look, it's looking forward to that.

00:24:23.720 --> 00:24:24.160
Yeah.

00:24:24.160 --> 00:24:24.460
Thanks.

00:24:24.700 --> 00:24:32.200
And then if you happen to be coding in Rust, JetBrains just released a new IDE called Rust

00:24:32.200 --> 00:24:32.760
Rover.

00:24:32.760 --> 00:24:35.200
A funny name.

00:24:35.200 --> 00:24:39.760
I'm not really sure the origin of it, but it's based on the same foundation as PyCharm.

00:24:40.120 --> 00:24:44.360
So if you're already using PyCharm or, you know, something like it, WebStorm, whatever,

00:24:44.360 --> 00:24:48.740
and you have the muscle memory for those hotkeys and basically the way it looks and feels, but

00:24:48.740 --> 00:24:49.780
you also want to do Rust.

00:24:49.780 --> 00:24:52.000
Rust Rover, Rust Rover, come on over.

00:24:52.000 --> 00:24:53.480
You know, let's do it.

00:24:53.480 --> 00:24:53.980
Nice.

00:24:54.040 --> 00:24:54.760
I haven't tried this out.

00:24:54.760 --> 00:24:55.560
I don't do any Rust.

00:24:55.560 --> 00:24:59.780
So people who do Rust can check it out and let us know what they think.

00:24:59.780 --> 00:25:00.220
Nice.

00:25:00.220 --> 00:25:02.660
I use the C++ version also.

00:25:02.660 --> 00:25:04.120
The sea lion?

00:25:04.120 --> 00:25:04.460
Yeah.

00:25:04.460 --> 00:25:06.400
It's sort of a funny name for it.

00:25:06.400 --> 00:25:07.600
It is.

00:25:07.600 --> 00:25:08.220
They got good names.

00:25:08.220 --> 00:25:15.200
Also, Skylar Costco, who is the sky from submitting the Ruff formatter, says,

00:25:15.200 --> 00:25:20.100
It looks like --respect .gitignore is the default behavior in a Ruff formatter.

00:25:20.100 --> 00:25:23.120
You should only need to set a flag, pass this flag.

00:25:23.480 --> 00:25:27.960
If you do want to format .gitignored files via dash dash, no respect.

00:25:27.960 --> 00:25:30.440
No respect for the .gitignore.

00:25:30.440 --> 00:25:32.320
Got no respect around here.

00:25:32.320 --> 00:25:33.680
Yeah.

00:25:33.680 --> 00:25:35.980
Some Rodney Dangerfield programming right there.

00:25:35.980 --> 00:25:38.740
You dissing the .gitignore.

00:25:38.740 --> 00:25:39.260
Come on now.

00:25:39.260 --> 00:25:43.880
New talk by the episode I just released like right before we jumped on here.

00:25:43.880 --> 00:25:46.400
The lightful machine learning apps with Gradio.

00:25:46.400 --> 00:25:52.760
If you want to take a ML machine learning model you've created and put it into an interactive UI

00:25:52.920 --> 00:25:53.900
on the web that you can share.

00:25:53.900 --> 00:25:54.460
Super easy.

00:25:54.460 --> 00:25:55.300
Check this out.

00:25:55.300 --> 00:25:55.820
Open source.

00:25:55.820 --> 00:25:56.400
Very cool.

00:25:56.400 --> 00:25:57.760
They even have some hosting options.

00:25:57.760 --> 00:25:58.360
Nice.

00:25:58.540 --> 00:25:59.760
Both free and paid.

00:25:59.760 --> 00:26:00.680
All right.

00:26:00.680 --> 00:26:01.980
So that is it.

00:26:01.980 --> 00:26:03.380
Oh, I guess one more piece of follow up.

00:26:03.380 --> 00:26:08.020
Since you asked Will McGugan says, are we Tomal?

00:26:08.020 --> 00:26:10.040
Most more hypothetical issues.

00:26:10.040 --> 00:26:13.240
I think there were some good points, but haven't faced them yet.

00:26:13.240 --> 00:26:13.940
Okay.

00:26:13.940 --> 00:26:14.400
Thanks, Will.

00:26:14.400 --> 00:26:15.580
I figured you were listening.

00:26:15.580 --> 00:26:16.440
Yeah.

00:26:16.440 --> 00:26:18.720
Brian, are you willing to face a joke?

00:26:20.000 --> 00:26:21.580
Well, yeah, I think.

00:26:21.580 --> 00:26:21.960
Yeah.

00:26:21.960 --> 00:26:22.200
Okay.

00:26:22.200 --> 00:26:23.920
So sometimes, sometimes.

00:26:23.920 --> 00:26:24.540
I'm worried now.

00:26:24.540 --> 00:26:31.520
Well, I'm sure in school you probably studied like the five stages of grief or something like

00:26:31.520 --> 00:26:31.680
that.

00:26:31.680 --> 00:26:31.980
Okay.

00:26:31.980 --> 00:26:32.180
Yeah.

00:26:32.180 --> 00:26:33.840
You know, that's not something you really want.

00:26:33.840 --> 00:26:34.080
Why?

00:26:34.080 --> 00:26:35.000
Well, there's not open the image.

00:26:35.000 --> 00:26:35.660
I can't do it.

00:26:35.660 --> 00:26:38.040
Anyway, maybe it's, it's just best.

00:26:38.040 --> 00:26:38.580
No, it's not.

00:26:38.580 --> 00:26:40.640
But very, I got to try to read very small here.

00:26:40.640 --> 00:26:40.940
Hold on.

00:26:41.260 --> 00:26:44.040
So this is the five stages of debugging.

00:26:44.040 --> 00:26:44.900
Okay.

00:26:44.900 --> 00:26:46.840
Let me find a way to make this bigger.

00:26:46.840 --> 00:26:47.260
So I agree.

00:26:47.260 --> 00:26:48.040
There we go.

00:26:48.040 --> 00:26:49.380
So the five stages.

00:26:49.380 --> 00:26:49.920
Okay.

00:26:49.920 --> 00:26:51.720
Number one, denial.

00:26:51.720 --> 00:26:57.100
This stage is often characterized by phrases such as what?

00:26:57.100 --> 00:26:58.000
That's impossible.

00:26:58.000 --> 00:26:59.840
Or I know this is right.

00:26:59.840 --> 00:27:04.720
And a strong sign of denial is recompiling without changing any code.

00:27:04.720 --> 00:27:05.520
Just in case.

00:27:05.520 --> 00:27:06.680
Funny.

00:27:06.680 --> 00:27:07.620
All right.

00:27:07.620 --> 00:27:10.060
Stage two, bargaining and self-blame.

00:27:10.360 --> 00:27:14.460
Several programming errors are uncovered and the programmer feels stupid and guilty of

00:27:14.460 --> 00:27:15.140
having made them.

00:27:15.140 --> 00:27:16.180
Bargaining is common.

00:27:16.180 --> 00:27:18.440
If I fix this, will you please compile?

00:27:18.440 --> 00:27:20.480
Also, I have only 14 errors to go.

00:27:20.480 --> 00:27:21.740
Stage three is anger.

00:27:21.740 --> 00:27:24.740
Cryptic error messages send the programmer into rage.

00:27:24.740 --> 00:27:32.260
This stage is accompanied by hours long diatribes about the limitations of language directed

00:27:32.260 --> 00:27:35.300
to whomever will listen.

00:27:35.300 --> 00:27:37.480
Stage four, it's getting serious depression.

00:27:37.480 --> 00:27:40.180
Following the outburst, the programmer becomes aware.

00:27:40.320 --> 00:27:43.120
The hours have gone by unproductively.

00:27:43.120 --> 00:27:45.800
And there's still no solution in sight.

00:27:45.800 --> 00:27:47.620
The programmer becomes a listless.

00:27:47.620 --> 00:27:50.760
The posture often deteriorates.

00:27:51.800 --> 00:27:58.980
And you can see all the graphics are screaming and banging on the computer or staring at the sky.

00:27:58.980 --> 00:28:00.800
The depression one is just sunk in the chair.

00:28:00.800 --> 00:28:04.020
And acceptance, the wheelchair is like the wheelie chair.

00:28:04.020 --> 00:28:05.160
It's turned around and it's gone.

00:28:05.160 --> 00:28:06.480
There's no one at the computer anymore.

00:28:06.480 --> 00:28:07.060
Yeah.

00:28:07.060 --> 00:28:08.560
The final stage is acceptance.

00:28:08.560 --> 00:28:12.960
The programmer finally accepts the situation, declares the bug a feature, and goes to play some Quake.

00:28:13.760 --> 00:28:14.060
Yeah.

00:28:14.060 --> 00:28:16.900
So I just, yeah.

00:28:16.900 --> 00:28:19.300
There's tons of stages missing.

00:28:19.300 --> 00:28:20.480
Yes, this is funny.

00:28:20.480 --> 00:28:21.700
I know it's supposed to be a joke.

00:28:21.700 --> 00:28:23.760
But, like, get up.

00:28:23.760 --> 00:28:25.060
Go talk to somebody else.

00:28:25.060 --> 00:28:27.360
Don't do, like, leave the computer.

00:28:27.360 --> 00:28:32.180
That should be one of the first things you do is go, like, take a shower or take a nap or something like that and come back.

00:28:32.180 --> 00:28:32.880
Yeah.

00:28:32.980 --> 00:28:33.800
That's very productive.

00:28:33.800 --> 00:28:36.920
I also think somewhere in there, there should be searching Stack Overflow.

00:28:36.920 --> 00:28:37.460
Yeah.

00:28:37.460 --> 00:28:41.480
And there should be another stage where you go to ChatGPT and see if it can help you.

00:28:41.480 --> 00:28:42.020
Yeah.

00:28:42.020 --> 00:28:44.560
Or duck, what, rubber ducking?

00:28:44.560 --> 00:28:45.720
Yeah, exactly.

00:28:45.720 --> 00:28:52.220
So I never really could get into the rubber duck completely of explaining the problem to a rubber duck or some inanimate object.

00:28:52.220 --> 00:28:58.860
But explaining it to a non-technical person, I'll, like, try to explain the problem to, like, one of my kids or something.

00:28:59.500 --> 00:29:04.200
And I'm often, while I'm explaining it, I'm like, wait, I think the problem's there.

00:29:04.200 --> 00:29:05.060
Anyway.

00:29:05.060 --> 00:29:06.180
So, yeah.

00:29:06.180 --> 00:29:06.600
That's funny.

00:29:06.600 --> 00:29:09.740
I find time away often is the most important thing.

00:29:09.740 --> 00:29:09.960
Yeah.

00:29:09.960 --> 00:29:11.940
Go record a podcast or something.

00:29:11.940 --> 00:29:12.840
Exactly.

00:29:12.840 --> 00:29:14.100
Or go for a walk.

00:29:14.100 --> 00:29:16.000
Go for a motorcycle ride, bicycle ride.

00:29:16.000 --> 00:29:18.200
Like, just get away from the computer for a little bit.

00:29:18.200 --> 00:29:18.380
Yep.

00:29:18.380 --> 00:29:18.760
Yeah.

00:29:18.760 --> 00:29:19.240
Cool.

00:29:19.240 --> 00:29:21.980
Well, speaking of getting away from the computer.

00:29:21.980 --> 00:29:23.440
Exactly.

00:29:23.440 --> 00:29:24.460
Let's get away from this podcast.

00:29:24.460 --> 00:29:25.400
Thank you, everyone.

00:29:25.400 --> 00:29:25.840
Thank you.

00:29:25.840 --> 00:29:26.340
Bye.

