Podchaser Logo
Home
#372: uv - an impressive pip alternative

#372: uv - an impressive pip alternative

Released Tuesday, 20th February 2024
Good episode? Give it some love!
#372: uv - an impressive pip alternative

#372: uv - an impressive pip alternative

#372: uv - an impressive pip alternative

#372: uv - an impressive pip alternative

Tuesday, 20th February 2024
Good episode? Give it some love!
Rate Episode

Episode Transcript

Transcripts are displayed as originally observed. Some content, including advertisements may have changed.

Use Ctrl + F to search

0:00

Hello and welcome to Python Bites where

0:02

we deliver Python news and headlines directly to

0:04

your earbuds. This is episode 372

0:08

recorded February 20th 2024

0:11

and I'm Michael Kennedy and I'm Brian

0:13

Aken this episode is brought to you

0:15

by Scout APM Super psyched

0:18

to have them supporting the show So we'll tell

0:20

you more about them later But please check them

0:22

out the link is in the podcast player show

0:24

notes They're on the website if you are one

0:26

of the lucky ones Brian who is attending this

0:28

live They got here by

0:30

going to Python by setup him slash live

0:32

crushing the bells saying get notified They

0:35

got notified of in this this comes on when

0:37

it's scheduled and here they are For

0:39

those of you are just listening and we super appreciate

0:41

that anyway, so how are we listening? Thank you. Thank

0:43

you Connect with us

0:45

over on mastodon ron Faucet on at

0:47

Brian Aken at m Kennedy at and

0:49

at python bites Brian before we jump

0:51

into the news and before I forget

0:53

I just want to make a quick

0:55

announcement. I will be a PyCon Philippines

0:59

Starting I leave tomorrow at I fly

1:02

from Portland to San Francisco at

1:04

8 p.m And then I

1:06

leave San Francisco at midnight So who knows what

1:08

I'm what state I'm gonna be in but I'm

1:10

pretty sure with the time zone James and the

1:12

travels and all this There's not gonna be a

1:14

Python bites next week So we're gonna be probably

1:16

skipping next week, which is a good chance for people to catch

1:19

up if they caught they fell behind Yeah,

1:21

and also I'm jealous and I hope you have

1:23

a great time. Thank you very much. I'm gonna

1:25

have a great time Worked

1:27

as was writing the keynote

1:29

speech yesterday and it's gonna be good.

1:31

It's coming together nicely So it's always nerve-wracking. I

1:33

don't know how what is your what is your

1:36

way of working on? Ox and stuff

1:38

like I I want to be prepared and I'm

1:40

the kind of person that would get prepared a

1:42

month or two months early But then if I

1:44

write the stuff and then put it away and

1:46

then come back to it I've kind of lost

1:48

the inspiration and the nuances and the details so

1:50

I don't want to write it too soon But

1:52

I also don't want to wait till last minute.

1:54

So there's this weird weird trade-off I feel I

1:56

the mostly I try I usually try to cover

1:58

too much stuff and So I

2:00

try to hear it down and then yeah,

2:03

I practice the heck out of it the

2:05

ones worth some some talks I like him

2:07

fiddling with the slides too much until like

2:09

five minutes beforehand and that goes terribly So

2:12

I yeah, I like to do

2:14

it early in practice. All right. Well over to

2:16

you. I know you have a big announcement

2:19

Yeah, you are. Okay, am

2:22

I am I first? Yeah,

2:24

so I'm pretty excited the

2:26

folks at astral including

2:28

Charlie Marsh and others have

2:30

released UV a Python packaging

2:33

It's Python packaging and rust

2:35

and it's it's not

2:37

another packaging tool It

2:40

is the Python end so like

2:43

replacing This is actually

2:45

incredible. It's a it's replacing

2:47

pip pip tools and virtual amp

2:49

all in one new rust

2:52

driven tool It their

2:55

announcement said maybe UV represents a

2:57

milestone in our pursuit of cargo

3:00

for Python comprehensive Python

3:02

project and package manager that's fast

3:04

reliable and easy to use They're

3:07

also kind of it's interesting kind of

3:09

combined in this announcement is that they're

3:12

taking Astral is taking stewardship

3:14

of our men Ronik or's rye tool.

3:16

That's an experimental tool So I'm not

3:18

sure what that has to do with

3:20

this, but I don't know it's interesting

3:23

But have you given this a

3:25

try yet? Oh, yes, I

3:27

am so psyched about this the Charlie team Congratulations,

3:30

because this this is setting the world

3:32

on fire in a lot of interesting ways

3:35

So I you know Charlie

3:37

aimed this right at like my

3:39

style of programming and working with

3:41

Python dependencies and projects So on

3:44

one hand we have just the

3:46

pip pip free side Right and

3:48

then on the other you've got

3:50

the poetry and other Pip

3:53

and where you've got like some other

3:55

API that kind of manages everything and

3:57

I want some of the benefits of

3:59

that want it to be just

4:01

a simple requirement.txt or something like that in

4:03

the end, right? Yeah. And so I use

4:05

pip tools and pip tools will go and

4:07

say, okay, what do you say you actually

4:10

need and then let's build out a, what

4:12

would be into the virtual environment after that.

4:14

And it's great, but you know, the command

4:16

pip compile like for mine, I don't know.

4:18

It takes probably 15 seconds

4:20

to pip compile, update the list of

4:23

things for talk by the train. I

4:25

think there's 250 dependencies in the dev

4:27

version. It's out

4:29

of control. Yeah. It just takes

4:31

a real, real long time with this instant. And

4:34

it's just so good. You, they

4:36

have some benchmarks up there and

4:38

it's like hip sync versus UV.

4:41

Hip sync is like 60 milliseconds

4:44

versus almost five seconds. Right. Those are

4:46

different types. It's, it just happens versus

4:48

you like, okay, hold on. It's

4:51

working. You know what I mean?

4:53

Yeah. And what's really pretty interesting

4:55

is that it looks like it's

4:57

gotten a lot of, it's not

4:59

necessarily that it's just because it's

5:01

written in rough rust

5:04

reading rough as I'm saying that not just that it's

5:06

written in rust, which it happens to be, cause that's

5:09

the vibe of astral. All right. Starting

5:12

with the rough stuff, but that they've

5:14

maybe unlocked some different algorithms or techniques

5:16

or something like that, where even if

5:18

it were in Python, it would be

5:21

faster, which is pretty interesting. Yeah. There's

5:23

that there's some caching that they've done

5:25

and, um, of like sitewide caching and

5:28

keeping also keeping pip, um, actually makes

5:30

sense to have some of this

5:32

stuff, virtual M and then and pip

5:34

outside of the Python tool chain system

5:37

so that, um, because you're going to

5:39

want it in each virtual environment.

5:41

So having it, uh, installed outside is

5:43

kind of interesting. So, um, yeah, I'm

5:46

pretty, uh, it's super fast. Um, the,

5:48

the hope is to be, uh,

5:50

API compatible or at least, uh, interface

5:52

compatible it's, um, in the, they're, they

5:55

just don't have. All of the features

5:57

yet. So, um, but like I

5:59

don't. I don't mean to say that

6:01

it's not worth trying already. It is production

6:03

ready right now, and that's what they've tested

6:05

the heck out of it. It's just that

6:08

you have to work with your workflow to

6:10

make sure that you work with it. So

6:13

I was amusingly trying it out yesterday

6:15

and ran into three things right away

6:17

that are two things that didn't work.

6:20

So I did try

6:22

to use the dash dash prompt

6:24

to have virtual AMP just create my

6:26

virtual environment with the same name. And

6:29

the prompt isn't supported yet. But it is. I

6:32

went to file a defect and it was

6:34

already fixed. It just hasn't been released yet.

6:36

So probably by the time you listen to

6:38

this, it's probably been released and it'll work.

6:40

They're doing a lot of releases, aren't they?

6:42

Yeah. There's been seven releases in four days.

6:44

It's incredible and a really responsive team. A

6:46

lot of people are trying it out, though.

6:48

So yeah, I'm glad they're

6:50

responsive because there's a bunch of issues people are

6:52

working on. It's really

6:54

fun to watch. The other thing was,

6:57

oh, so virtual

6:59

environments work really fast. It's

7:01

so fast. And the resolver

7:04

actually is something we don't really talk about

7:06

too much. But the resolver,

7:08

like you said, when you're pip installing

7:10

something, if you have a requirements file,

7:12

you've got a bunch of projects in it

7:14

or a bunch of things you're pulling

7:16

in, dependencies. They might have conflicting dependencies or

7:18

not really conflicting. But the rules are

7:21

such that you have to pick the

7:23

right dependencies so that it matches both tools.

7:25

That's all done. And it's super fast. I'm

7:28

really impressed with how this thing is. And

7:32

apparently, everybody else is, too. Because

7:35

almost immediately after the announcement, so

7:38

look at all these contributors. We've

7:40

got 32 contributors already. These

7:43

are not just people at Astral. I

7:46

know that Brett is not there.

7:48

So Tox has

7:50

already announced that there is

7:52

a Tox-UV plug-in so

7:54

that you can have Tox act

7:57

faster, too, and use UV for

7:59

virtual environment. And for

8:01

pip also, that makes it faster.

8:03

I think that's, and I'm

8:05

sure there's more tools to come that support,

8:07

will support UVA out of the box. So

8:09

yeah, awesome. I'm super excited, but I have

8:12

a bunch of aliases

8:14

for my shell that I almost

8:16

never type pip, you know, python

8:18

dash nv. Like I, unless

8:20

I'm doing like some presentation where I'm not

8:22

sure that people would know what the heck

8:24

is going on. So I'll just type vnv

8:26

and that will do the magic or when

8:28

an activated environment is AE or, you

8:30

know, I want to install the requirements, I'll

8:32

say PR, right. And I rewrote all of those

8:35

to move from using pip to using UV and

8:37

it's basically like the same workflow for me

8:39

just better. Well, one of

8:41

the things that I do a lot is

8:43

to just see what's in my virtual environment

8:45

is do a pip list and

8:48

that's not supported yet either. But

8:51

freeze is and list is coming, you

8:54

know, but so just use free. I

8:56

didn't actually just for some reason, I

8:58

think there's like a 50-50 split of

9:01

people that use generally pip freeze over lists.

9:03

What are you a freeze person or a

9:05

list person? I'm a list person these days,

9:08

but that's because yeah, because

9:10

I don't use pip freeze to generate

9:12

like the requirements.txt I use pip compile.

9:14

Right, but pip freeze will just like

9:16

list out which what things you have

9:19

installed in what versions. Yeah, and that's

9:21

what I want list for. So I

9:23

don't know why I used list. Anyway,

9:26

yeah, that's true. Pretty fun. Yeah. Okay,

9:28

a couple of pieces of real-time

9:30

follow-up. First of all, Ofek Lev from

9:32

Hatch says the next minor release of

9:34

Hatch will have an option to use

9:36

UV under the hood instead of pip

9:38

and virtual ENV. Hooray! Yeah, I

9:40

love Hatch. I've been doing like doing a lot

9:42

of stuff with Hatch lately and it's really really

9:45

nice. So Ofek, you're killing it. Keep it up.

9:47

Very nice. And you mentioned

9:49

talks. Henry Shriner, who I see

9:51

some comments from him out there

9:53

as well, says with

9:56

the Knox back in using

9:58

UV and the Knox back in it drops. the time

10:00

taken to build the docs from 22 seconds to 4

10:02

seconds. So, you know,

10:04

that's, you know, it's not like 22 seconds

10:07

is gonna change the world. I go, if

10:10

they just didn't take 22 seconds to build

10:12

the docs, but the faster these things get,

10:14

the more willing you just like to do

10:16

them more iteratively. And, you know, get tight

10:19

enough feedback loop and stuff like that. So

10:21

like, for example, with rough, you know, and

10:23

PyCharm now, you can just check the box,

10:25

like run, run rough onto the

10:27

end of this project when I hit save. If

10:30

it took five seconds to do that, you would never check that.

10:32

That would not even be a box you could check, right? Because

10:36

it's so fast. So hopefully I'm

10:38

not missing anything else from folks out there,

10:40

but this stuff is really neat. And I

10:42

am super excited. I would love if some

10:44

of the things they learned from

10:46

this could be brought back into standard pip,

10:49

just to make standard pip faster too. That

10:51

would still be cool. Yeah. And this, I

10:53

guess that brings up a side question is

10:55

really how much energy there's going to

10:58

be around supporting the other tools

11:00

that are getting replaced by things

11:02

that astral is building, but there's

11:05

a, yeah, anyway, we'll have that conversation

11:07

later. Maybe. Yeah.

11:10

Opek agrees with you that much of the speed

11:12

up comes to the way they're doing caching. Very,

11:14

very nice. So, you know, people check this out.

11:16

It's been a few days and it's things

11:19

are going fast in the space. So yeah,

11:21

very, very exciting. Let's go

11:23

on to the next topic. All

11:25

right. Brian Jupiter notebooks have definitely

11:27

taken over as a

11:29

really interesting way for creating, writing

11:32

Python code, visualizing Python code, sharing it,

11:35

communicating with it. And obviously

11:37

will McGougand to work with rich

11:39

and then on from their textual

11:42

is doing amazing stuff too. Right.

11:44

Yeah. What if those came together

11:46

like butter and jelly or whatever

11:48

it is that you put together that goes

11:50

together well. So David chocolate, man. Yes. Okay.

11:53

Sorry. Reese's pieces. I got it. Okay. David

11:56

bro chart says I just published my

11:58

first blog post. Which

12:01

is, we go over here, JP

12:03

term, Jupiter in the terminal

12:05

built on textual and rich.

12:08

Yeah, that's great. There's a

12:10

bunch of terminal fun stuff

12:12

that's based on the textual

12:15

and other things that we could cover. But

12:17

this is what I'm covering today. I'll save

12:19

the other for next time. So Jupiter in

12:21

the terminal and it says, well, you know,

12:23

basically, David says, look, the terminal

12:25

is the new browser in the sense that

12:28

we all have a terminal. And if we

12:30

write to this, it's kind of a

12:32

simple, cool UI that everybody already has.

12:34

You can just plug stuff into it

12:36

largely because of all the work that

12:38

they've done over it. Textualize with textual

12:40

and rich and so on. Right. So

12:42

look, look at all these widgets we

12:44

already have. So like there's a select

12:46

widget and there's a whole bunch

12:49

of others. But if we view this, I'll open

12:51

a new tab, maybe

12:53

open image in a new tab. Oh,

12:56

it's downloading. Hold on, because of course it is. Open

13:00

this up. It's Jupiter lab

13:02

side by side with JP term and

13:04

check it out. It's like you've got

13:07

yourselves, you've got your in your bracket

13:09

and quite similar. Huh? What do you

13:11

think about this? That's incredible. That's pretty

13:13

cool. Yeah. So it's got let me

13:15

go back to the article here.

13:18

You go down, it's got graphing. It's

13:20

got like charts for it. And

13:22

he says basically one of the real

13:24

similar things to compare to might be

13:27

Jupiter light. Because Jupiter light is a

13:29

web assembly based all front end

13:31

Jupiter. And this is like client

13:33

doesn't even need a server, right? Because it just

13:35

runs. Although he does point out with textual web.

13:39

Is a way to put this

13:41

on the internet and share it as well.

13:43

But like here, look, here's a bunch of

13:45

cool graphs over time in the terminal. Yeah.

13:47

So this is a super early almost a

13:49

proof of concept even has images, which is

13:52

interesting. I think they're bad.

13:55

Yeah, like you want if you long for

13:57

like Commodore 64 days. I

14:00

see you got something in store for you, but

14:03

you can go ahead. You can see it's quite new.

14:05

Uh, it's been, uh, you know, created

14:07

like four months ago and just announced,

14:09

I think pretty recently. So people

14:11

go check this out. Uh, David

14:14

is, uh, I think a Jupiter

14:16

cord, Ev or at least a

14:18

contributor over there. So yeah, uh,

14:20

interesting to see where this goes.

14:22

Yeah. Let's see. Cool. You know,

14:24

the Elsa school, our sponsor. Yes.

14:27

Indeed. Indeed. They are. So

14:29

let me tell you real quick about

14:31

doubt APM. There are

14:33

big supporters of Python bites. So

14:35

we appreciate that very much. So

14:37

if you are tired of spending

14:39

hours trying to find the root

14:42

cause of issues impacting your performance,

14:44

then you order yourself to check

14:46

out scout APM. They're a leading

14:48

Python application performance monitoring tool, APM,

14:50

that helps you identify and solve

14:52

performance abnormalities faster and easier. Scout

14:55

APM ties bottlenecks such as memory

14:57

leaks, slow database queries, background jobs,

14:59

and the dreaded in plus one queries

15:01

that you can end up. If you do lazy

15:03

loading in your ORM and then you say, Oh

15:05

no, why is it so slow? Why

15:08

are you doing 200 database queries for what should

15:10

be one? So you can find out things like

15:12

that. And it links it back directly to source

15:14

code so you can spend less time in the

15:16

debugger and healing logs and just finding the problems

15:19

and moving on. And you'll love it because it's

15:21

built for developers by developers. It makes it easy

15:23

to get set up. Seriously, you can do it

15:25

in less than four minutes. So that's awesome. And

15:27

the best part is the pricing is straight forward.

15:30

You only pay for the data that you

15:32

use with no hidden overage fees or per

15:34

seat pricing. And I just

15:37

learned this, Brian, they also have, they provide

15:39

the pro version for free to all open

15:41

source projects. So if you're an open source

15:43

maintainer and you want to have scout APM

15:45

for that project, just shoot them a message

15:47

or something on their pricing page about that.

15:50

So you can start your free trial and get

15:52

instant insights today. Is it by the by side

15:55

of him slash scout. The link is in your

15:57

podcast player show notes as well. And

15:59

please use that. That link, don't just search for them

16:01

because otherwise they don't think you came from

16:03

us. And then they'd stop

16:05

supporting the show. So please use our

16:07

link pythonby.fm slash scout, check them out.

16:10

It really supports the show. Awesome. Yeah.

16:13

All right. Over to you. What's next?

16:15

I've got a little, little topic. Martin

16:17

Heinz wrote a blog post called everything,

16:19

everything you can do with the Python's

16:21

text wrap up module. And I love

16:23

the text wrap module. And I think

16:25

that more people, I think a lot

16:27

of people just forget about it. It's

16:29

very, Brian, do you have that feeling where

16:32

like you spent half a day implementing some algorithm,

16:34

then you're like, Oh, that was a function I

16:36

could have just called. Yeah, exactly. Text wrap is

16:38

that. Yeah. Um, there's, and

16:40

you know, every time I come back

16:42

to it, I'm like, Oh, I'm still

16:44

using stuff that I shouldn't. So, uh,

16:46

uh, it's a pretty short article. Go

16:49

through a few of the features of

16:51

text wrap. Uh, first off it's shortened.

16:53

So if you've got, if you want

16:55

to make a, uh, piece of text

16:57

shorter, um, you can use shortened and

16:59

it's cool because it also does a

17:01

placeholder thing. So it'll put like, um, like,

17:03

uh, dot, dot, dots and, and brackets or

17:05

something or whatever placeholder you want to say,

17:08

there's more text there. It's just, we've cut

17:10

it off. Um, and, uh, it looks really

17:12

nice. Uh, easy to, easy to use. You

17:14

just call it, uh, just

17:16

a function, but then there's, um, there's

17:19

wrap, uh, which seems obvious, but, um,

17:21

can do word wrapping. So you can

17:23

split along, uh, a long chunk of

17:25

text into multiple lines. Um, but you

17:27

can also do it. Uh, one

17:29

of the things I like here is it says, uh,

17:32

said, well, yes, of course you can

17:34

use it for splitting long lines into,

17:36

into different multiple lines, but also even

17:38

if you're not going to print it

17:40

like that, um, it's very useful. If

17:42

you're going to batch that batch work

17:45

on texts, you can, uh, split a

17:47

big chunk of text into small or,

17:49

you know, even sized batches to work

17:51

on those. Um, that's a pretty cool

17:53

use case for that. I like it.

17:56

Uh, there is, there's even, um,

17:58

you can specify drop-wise void. That's

18:00

pretty cool. I didn't know about

18:02

that. Neat. There's a class also,

18:04

so a lot of the stuff

18:06

you can do with TextWrap, you

18:08

can do within an object. So

18:10

there's a TextWrapper class that you

18:12

can create a TextWrapper object and

18:14

do a whole bunch of work

18:16

with that multiple times, and

18:19

only specify it once in the

18:21

constructor. Very cool. Then at the bottom,

18:23

last but not least, is my

18:25

favorite use of TextWrap is ddent. ddent

18:30

will take, if you've got a multi-line string

18:33

and it's in your code,

18:35

so it's indented with the rest of

18:38

your code, that multi-line will have a

18:40

whole bunch of extra white space on

18:42

the left, and you don't really want

18:44

that when you're

18:46

actually using it, and ddent will

18:49

take out those extra left white

18:51

space. I love that.

18:53

This seems like a weird thing to

18:55

have built in, but I

18:58

use it a whole bunch of times

19:00

often in writing tests, because I've got a

19:02

multi-line string that I want to compare to

19:04

some output, and I don't want

19:06

it at the global level, I want it in

19:09

my test function. So I

19:12

can just do that and use ddent to

19:14

get it back to. Right. Because it would

19:16

look weird left-aligned inside of an indented function,

19:19

right? Yeah. I

19:21

mean, you can, it just looks ugly. Yeah.

19:23

You lose the flow of where

19:25

it belongs. Yeah. So

19:28

TextWrap, it's there, it's

19:30

fun. Use it. You already have it. It's

19:32

in Python. Yeah. Yeah. Very nice. All right.

19:35

Let's talk about some design principles for

19:37

the web here. This is

19:40

not exactly Python, but

19:42

it certainly links back to some cool things

19:44

in Python. It's this place I ran across

19:46

called html-burst.com. The

19:50

idea is, there seems to be some fatigue. You

19:52

know how in JavaScript, it used to be so

19:54

easy, you would include a script, or if you

19:57

were doing something super small, you maybe just say,

19:59

a script tag and you would write a bit

20:01

of JavaScript right in the page and then you

20:03

carry on. You're like, oh, that was

20:05

easy. Look, that just worked. And then it said, oh,

20:08

well, now we're going to put it over on this

20:10

other place. No, we're going to like minify it. Also,

20:12

we're going to shake it down to only include the

20:14

parts that we use and we'll do the same for

20:16

the CSS. And then you need this build step and

20:19

then we're going to compile it from TypeScript to JavaScript

20:21

and then shake it down to not include this. And

20:24

then you're going to include it with import,

20:26

export it with node. And you're just like,

20:28

what is, why is this so hard? Why

20:30

are there so many steps to this thing

20:33

that used to be so easy, right? And

20:35

so this is kind of like, we just

20:37

not have that as like the default way

20:39

of working already. So HTML, HTML,

20:41

we'll get the HTML. HTML first is

20:43

a set of guidelines for making it

20:45

easier, faster, and more maintainable to build

20:47

web software by leveraging the default capabilities

20:49

of modern browsers. I learned something I

20:51

didn't know from here that I used

20:53

to do a JavaScript that I will

20:55

never do again if I don't have

20:57

to. So awesome. And then the

21:00

extreme simplicity of HTMLs, attributes syntax and, you know,

21:02

keeping the view source alive, right? You used to

21:04

be able to go to the website, like, how

21:06

did they do that? That's cool view source. Now

21:08

it's just like one tiny line of like a

21:10

bunch of stuff that triggers JavaScript stuff. You're like,

21:12

Oh, well, all right. Or how did they do

21:14

that? Oh, it's a bunch of divs. Yes,

21:17

exactly. And

21:19

so the goal is, you know, try to

21:21

widen the pool of people who enjoy web

21:24

development. So you can make

21:26

it less expensive for your company because it's

21:28

just less complex. So it's

21:30

not just, you know, dev yells at the

21:33

cloud because people are making

21:35

it hard, right? Screams it into

21:37

the sky, but some practices, right?

21:39

So there's some examples, prefer vanilla

21:42

approaches. And so for example,

21:44

did you know you could say details

21:46

summary and then stuff below it? And

21:48

if you click the summary, it'll expand

21:50

the thing below it. No JavaScript. No

21:53

JavaScript. Yeah. How

21:55

about that? And so

21:57

they have encouraged versus.

22:00

Here's like import react user state

22:02

from react create a details component,

22:04

which is an arrow function which

22:06

returns a concept

22:09

of things and toggling the content and

22:11

then you on click you like like

22:14

Then you export the data. This is the import

22:16

export out is railing against right? So

22:18

that's one prefer just if you can

22:20

do is basic HTML or even basic

22:23

JavaScript I think don't go over to

22:25

the top and where possible practice to

22:27

where possible define default the defining styles

22:30

and behaviors with inline attributes with things

22:32

like tailwind or Tachyon's and

22:34

you can use libraries like hyper script and

22:36

Alpine and it says you're yes It does

22:38

mean your HTML gets a little bit busier But you don't

22:40

have to go to three places to figure out what's happening

22:44

So for example, it says encouraged

22:46

button on click this class list

22:48

add background green discouraged

22:50

you have a results pane says click me and

22:52

then you have a CSS section

22:54

that actually what happens when you do that changes the

22:57

color of green then you have some JavaScript that gets

22:59

it and then When it's done you set the

23:01

class which then goes back to CSS and

23:04

these are usually mushed all over the place

23:06

You know like what is happening, right? Yeah,

23:08

it says you'll notice the separation of concerns

23:10

is kind of not so much awesome

23:13

here, however, you should maybe

23:16

consider the locality of behavior

23:18

more than you should worry about separation

23:20

concerns and HTM X Carson Gorse has

23:22

a nice essay on this like yes, you

23:24

might repeat yourself sometimes but right there

23:27

You see everything that's happening instead of having it

23:29

so it's spread out, right? Yeah All

23:32

right. Next good, right? I just wanted to

23:34

comment one of the things that I like

23:36

about this sort of model is is that

23:38

I'm learning I'm frequently you're learning like new

23:41

web frameworks like I'm working on learning

23:43

Django and And

23:45

you know age fast API and others and

23:47

a lot of times it's templating that I'm

23:50

working on and to Understand

23:52

how it's gonna get output

23:54

keeping the template simple in

23:56

like mostly HTML help them

23:58

helps with Discoverability and learning

24:00

something new so even if even if

24:03

it isn't like a production thing later,

24:05

but it might be Starting

24:08

out simple really helps with the learning process.

24:10

So yeah, oh, absolutely And you also have

24:12

to learn fewer things, right? Yeah, you have

24:14

to learn three other frameworks and build tools

24:16

and so on All right. Another one is

24:18

about try to use libraries If

24:21

you got these libraries trying to use ones

24:23

that leverage HTML attributes over JavaScript and custom

24:25

attributes like HTML X is a real nice

24:28

example of that Just

24:30

say this favor build steps. So

24:32

encourage the ability to say style

24:34

sheet slash style You

24:37

know, it's slash styles CSS discouraged distribute

24:39

output NPX CSS compile with a watch

24:41

and then don't forget to run that

24:43

And then why is this not updating,

24:45

you know all these different things and

24:47

then finally this one I

24:49

think the HTML is really relevant to

24:51

Python folks But also this one their

24:53

example is Ruby, but it just as

24:55

well could be any WTF

24:59

forms which is I think

25:01

it is though the form builder type stuff

25:03

You see a lot of that actually in

25:06

Django says prefer naked HTML to obfuscation layers

25:08

that compile down to HTML So you know

25:10

just you got a form just write the

25:12

right the form put the values in it

25:14

instead of you know Form with and then

25:17

form like label for this form text field

25:19

for that part of the model and so

25:21

on right? So anyway, I finally preserved some

25:23

some view source for us all because it'll

25:26

help everyone But anyway, I like this and

25:28

I you know, it's interesting

25:30

to think of as a philosophy Yeah, the

25:32

build staffs they also reference like a whole bunch

25:35

of people how it used to be completely Like

25:38

oh, you're such a noob if you want

25:40

to skip having like a bunch of build

25:42

tools along the way But references four different

25:44

articles and places where people are writing about

25:46

like, you know, what we're done with this

25:48

build stuff We're just writing CSS. We're just

25:50

writing JavaScript I'm gonna go with that. So

25:52

anyway, pretty pretty well backed up some of

25:54

these ideas. Nice That's all

25:56

of our main items. You can see their tabs

25:58

left for me. So that means I must have

26:00

extras, but what about you? I do have extras. Do

26:02

you want to go through yours since they're up or

26:04

do you want to? Sure. Let's do it. All right.

26:06

So first of all, Vincent warmer dumb says

26:09

a new pie data location

26:12

Pittsburgh. So there's a

26:14

call for proposals at pie

26:16

data Pittsburgh. Let's see. When does it hopefully it's

26:18

not over. So yeah, so

26:21

if you want to speak if you're in

26:23

the general Pittsburgh area or you want to

26:25

be then check out pie data Pittsburgh and

26:27

go submit some talks there it say

26:30

when this is going to be surely April.

26:32

Okay April 11th. I guess anyway check it

26:34

out and you can submit a talk

26:36

there. That's pretty cool. Just want to bring

26:39

out one more example, you know, I write I

26:42

riff on or I rip on the

26:44

ad space and I say look we

26:46

should run ad blockers. We should we

26:48

should not support these people and I

26:50

know some folks are out there like

26:53

well, but then you're not supporting creators.

26:55

You're not supporting the small

26:57

folks who have Google ads on their

26:59

site or whatever and I don't know. I

27:01

just I think the trade-off is not really worth

27:03

it. So I just want to point out one

27:05

more example of like terrible stuff that's happening. So

27:08

our own Oregon senator Ron

27:10

Wyden is started

27:12

investigation because a data broker

27:14

gets data from you know,

27:16

all these these different sources

27:19

like ad retargeting stuff used

27:21

abortion clinic visitor location data

27:23

because their endpoints were not

27:25

blocked by some sort

27:28

of DNS block or something to help

27:30

send targeted misinformation to vulnerable

27:32

women. How terrible right awful.

27:36

So I think we all

27:38

should just stand up to stand up

27:40

to the like the retargeting remark like

27:42

we don't have to that has nothing

27:44

to do with trying to make money

27:46

for content creators. Yeah, I

27:48

know except for that the the data flows

27:51

into these shady places right and then they

27:53

then you know, they already have it. So

27:55

instead of trying to sell them shoes like

27:57

what's let's do something terrible like that. Yeah.

28:00

All right. Anyway, next

28:02

DNS that I have folks. Okay. Call

28:04

for proposals is also open for a

28:06

very close nearby SciPy 2024,

28:09

which is awesome. This

28:12

will be in Tacoma, Brian, just a

28:14

short hop and a skip up I-5

28:17

North from us. That'd be fun. Yeah.

28:19

So July 8 to 14. I

28:22

wish I could make it, but I am

28:24

already tied up around the

28:26

house. My wife is traveling for work

28:29

at that time and somebody has to stay

28:31

with the dog and the kid. So I'm

28:33

not going to this. I have a feeling that

28:35

the same timeframe is Oregon Country Fair. So I

28:38

probably can't either. Yeah, but anyway,

28:40

there's a lot of people out there who

28:42

can and call for proposals are out, but

28:45

you must act. You must act soon. You

28:47

have exactly seven days to get this ish

28:49

depending on when you listen. But as I

28:51

speak, you have about seven days to get

28:53

your talk proposal in. So please go do

28:55

that. So February 27th is that in time.

28:59

Okay. Thanks a handful of

29:01

topics. Python's 8.01 8.0.1 is out.

29:07

And why is this important one? It's the

29:09

first bug fix since 8.0 came

29:12

out and it has the bug that bug

29:14

to me. So the there was a there

29:17

was a regression where if

29:19

you parameterization would go backwards for

29:22

some reason. Yeah, we talked

29:24

about that before. Yeah, so that's that's fixed.

29:26

So I've got it updated

29:28

to 8.01 everywhere. I'm

29:30

using by test. Okay next

29:34

if you'd like to understand

29:37

dependency injection. Hinnock

29:39

has a new video out loose

29:42

coupling and dependency injection the easy way and

29:44

I really like that the dude and I

29:46

like what he's doing up on YouTube. So

29:49

that's fun. Plus this pen. Injection is

29:52

not as complicated as it sounds and

29:55

and he'll show you but but I

29:57

freaked out the first time that people were like,

29:59

oh. fixtures, they're kind of like dependency injection. I'm

30:01

like, I don't know what you're talking about. They

30:04

are kind of like dependency injection.

30:06

Yeah. Yeah. I had a guest

30:09

Nicole on Python test

30:11

recently. This hasn't been aired yet. But

30:14

when we were talking about something completely

30:16

different, and I mentioned all

30:18

of the rust that's coming into Python

30:20

community. And I said, but I

30:23

mean, I want to try to learn rust.

30:25

And, but I don't have a

30:27

lot of time. And she said, Oh, we had the

30:29

same problem at work. So I wrote a tutorial.

30:31

So there's yar.fyi.

30:34

Yar is yet another rust resource.

30:36

But the pirate

30:39

friendly. Yeah, pirate. It's

30:42

a it's a rust tutorial. But

30:45

intended for people that already know how to

30:47

program, they just don't know rust. And so

30:49

I'm excited to jump

30:51

into that. Okay, what

30:53

else? Oh, yeah, I'm looking

30:56

for trying to ramp up interviews for Python

30:58

people. So if there's, if

31:00

there's just some interesting stuff around the Python community that

31:02

you'd like me to talk to, or if you'd like

31:04

me to talk to you, reach

31:06

out. And the first

31:08

episode was Michael Kennedy. It was a good

31:11

episode. But I've only been 12 episodes so

31:13

far, but I want to get more out.

31:16

And the last thing I wanted to

31:19

know, there's there's a like, there's an

31:21

interesting thing phenomenon out there. Did you

31:23

know that there's people still using x?

31:25

Yes. I've seen

31:27

them. There are many of them

31:30

over there. Actually, I, I

31:32

have I am officially following zero people

31:34

just to end it just just to

31:36

like as a protest. I don't I

31:38

don't really I show up

31:40

there about once a month to check my

31:42

direct messages. So if you

31:44

if you want to contact me, I

31:46

will probably reply to you eventually. But

31:49

just morning, I'm not there very often.

31:51

Indeed, indeed. Awesome. Well, a bunch of

31:53

great items. How about we talk about

31:56

some unfortunate architectural or

31:58

vendor based that's part

32:00

of our joke here. You ready? Have you seen

32:02

this joke? Did you look ahead? I have not

32:04

looked ahead. I don't know what you're talking about.

32:06

Beautiful. All right. You ready? Yeah, do the joke.

32:08

So here we are. I got this over

32:12

on Reddit and of course I zoomed it

32:14

in. So why, you know, why are we

32:16

using SAP again when there's this open source

32:18

thing that is so much simpler? Or why

32:20

are we using Oracle again for this? Because

32:23

whatever. So there's an angry team

32:25

leader something. Why do we end up with a

32:27

solution? A couple of people are like, cool savings,

32:30

time savings maybe. Then someone like a hipster

32:32

looking dude in the back is like, the vendor

32:34

sent me a Yeti tumbler. So

32:37

they grab him and throw him out the window. Why

32:41

are we stuck with this crappy system that is

32:43

like whatever? Well, conference

32:45

swag basically. Yeah.

32:49

I think the real answer is usually the

32:51

best house options were all free and

32:54

we needed to have to pay somebody. Yeah,

32:57

that's true. That's true. Well,

32:59

none of them had an SLA, but

33:01

it's like, but do you have a Yeti

33:03

tumbler? I have one of these

33:05

like soft Yeti, uh, hoolers that we'll take and

33:08

we go out camping or boating or something, but

33:10

I don't have a tumbler now. I don't believe

33:12

so. I had to look it up. I didn't

33:14

even know what this was. Oh

33:17

yeah. Yeti, this is like the role.

33:19

Yeti is like the Rolls Royce of

33:22

like hillbilly land, I guess. They're

33:25

like, they're like super, super, um, nice

33:27

coolers. If you want a thermos for

33:29

your coffee, but you don't want to

33:31

spend $10, you want to spend $40,

33:34

get a Yeti. Yeah. Yeah. We

33:37

have a lot of Yeti stuff. Actually, it's

33:40

really nice. I'm just joking. Bougie. What if

33:42

stuff got warm, Brian? What if it got

33:44

warm? What if your beer got a little

33:46

bit warm and your mountains and your cores,

33:48

they weren't blue anymore. They turned whatever color

33:51

they're not when they're not blue, whatever color

33:53

they have in the non blue. You

33:55

want to talk about like the cord, one of the cords beer

33:57

cans has a can that when it's like a certain temperature, mountains

34:00

on the can turn blue.

34:02

And if it's too warm, they turn white or something

34:04

or what other color. OK,

34:06

so we had a couple options. We could have

34:09

made better beer or a better can. We chose

34:11

a better can. What do you see

34:13

when you're shopping? Come on

34:15

now. Awesome. Yeah. OK.

34:18

Fun as always. Thank you for being here. And

34:20

thank you, everyone, for listening. See you

34:22

all.

Rate

Join Podchaser to...

  • Rate podcasts and episodes
  • Follow podcasts and creators
  • Create podcast and episode lists
  • & much more

Episode Tags

Do you host or manage this podcast?
Claim and edit this page to your liking.
,

Unlock more with Podchaser Pro

  • Audience Insights
  • Contact Information
  • Demographics
  • Charts
  • Sponsor History
  • and More!
Pro Features