Live data from Hacker News

Uv is the best thing to happen to the Python ecosystem in a decade

emily.space

941–950 of 1001 posts

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#941
post #115

Earlier quoted context omitted.

This isn't a comment just about Python.. but it should just work. There shouldn't be constant ceremony for getting and keeping environments running.

It does, Python has essentially solved it for years.

Big gap between essentially solving it and actually.

The pieces actually all existed for sure.

I can even write scripts to make it all happen.

But uv remains as a long overdue universal command line tool for python.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#943
post #410

Honestly though it's a pretty rough indictment of Python that the best thing to happen in a decade is that people started writing Python tools in Rust. Not even a little Rust, uv is 98% Rust. I mean, they just released 3.14 and that was supposed to be a pretty big deal.

I sometimes wonder if many core Python people don’t actually like the language that much. That’s why (a) they’re constantly reinventing it, and (b) they celebrate rewrites from Python into other languages. Long before Rust, it was considered a good thing when a standard library module was rewritten in C. Compare this to the Go community, who celebrate rewrites from other languages into Go. They rewrote their compiler…

This isn't really a fair comparison, though.

Python is an interpreted scripting language that was not originally designed with high performance computing in mind. It's perfectly normal for languages like that to have their tooling written in a systems programming language. It's also perfectly normal for languages like that to have components that do need to be performant written in a systems programming language. We call this, "Using the right tool for the job."

It's true that a lot of historical Python toolchain was written in Python. That was also using the right tool for the job. It's a holdover from a time when Python was still mostly just a scripting language, so projects were smaller and packages were smaller and dependency trees were smaller and there just generally weren't as many demands placed on the toolchain.

Go, by contrast, is itself a systems programming language. And so naturally they'd want to have all the systems components written in Go, and the sooner the better. It wouldn't inspire much confidence if the maintainers of a systems programming language didn't trust it with systems programming tasks.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#944
post #410

Honestly though it's a pretty rough indictment of Python that the best thing to happen in a decade is that people started writing Python tools in Rust. Not even a little Rust, uv is 98% Rust. I mean, they just released 3.14 and that was supposed to be a pretty big deal.

I sometimes wonder if many core Python people don’t actually like the language that much. That’s why (a) they’re constantly reinventing it, and (b) they celebrate rewrites from Python into other languages. Long before Rust, it was considered a good thing when a standard library module was rewritten in C. Compare this to the Go community, who celebrate rewrites from other languages into Go. They rewrote their compiler…

The Python community has always had a make it work first, then optimize the parts that most benefit attitude, and has always seen selective use of lower-level systems languages as one (but far from the only) important tool for the optimize part.

I wouldn't describe having a culture that isn’t exclusivisy fanaticism as not liking the language, though.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#945
post #222

Earlier quoted context omitted.

I use this but I hate it. I want to be able to ship a bundle which needs zero network access to run, but will run. It is still frustratingly difficult to make portable Python programs.

Zipapp comes close: https://docs.python.org/3/library/zipapp.html

uv doesn't support creating zipapps yet, but there is an issue with that. For that reason, I'm still using PDM.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#946

It’s puzzling why Python became the de facto standard scripting language rather than Ruby when the tooling was so inferior.

Perhaps the language design is more important than the tooling?

How do you think Python's language design is superior to Ruby's?

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#947

Earlier quoted context omitted.

We've all done it. I'm curious though, I wonder what would be the best way to prevent a user from doing this.

Wrap curl to detect if /dev/stdout is a pipe and if the output is a script - this is fast because of the hash-bang. From there you can do a lot of fancy things: replace the output with echo "don't do this" ; exit 1", check the Url against a list of well known accepted scripts based on hash, run the unknown ones through an LLM to validate if they are potentially malicious, etc.

> run the unknown ones through an LLM

Run my command through an LLM and tell me "don't do this" once, I'm out to a different distro :-).

Also, if people copy-paste stuff they don't understand in a terminal (and running a script like this is pretty much "running stuff one does not understand"), I don't think there is anything you can do for them.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#948

Should I try this? I, let’s say, code with Ai and am not an engineer. Python related environment stuff makes my head explode (across the 3 computers I use). It’s the main thing my brain just can’t seem to figure out.

thanks y'all for the super helpful comments!

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#949

I gotta say, I feel pretty vindicated after hearing for years how Python’s tooling was just fine and you should just use virtualenv with pip and how JS must be worse, that when Python devs finally get a taste of npm/cargo/bundler in their ecosystem, they freaking love it. Because yes, npm has its issues but lock files and consistent installs are amazing

[dead]

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#950

The sticking point for me is the way tools like uv and poetry build everything around the idea of a "project". I don't want a separate environment for every project, and I don't want to start by creating a project. I want to start with an environment that has stuff in it, and I start fiddling around, and gradually something comes together that eventually will be pulled out into a separate project. From what I can see…

This is me exactly. I have a default dev environment, and a couple for experimenting with new versions of various packages, I don't need or want "projects" most of the time

This is nice just for playing and exploring alone. It is a nightmare if you need reproducibility, to send something for production, or event to share your work with someone. Maybe even to come back to your project an year later.

uv.lock is a bless

Post reply on HN