Most active commenters
  • ericfrederich(5)
  • nchmy(5)

←back to thread

264 points tosh | 19 comments | | HN request time: 5.671s | source | bottom
Show context
ericfrederich ◴[] No.44365535[source]
I am totally against Python tooling being written in a language other than Python. I get that C extensions exist and for the most part Python is synonymous with CPython.

I think 2 languages are enough, we don't need a 3rd one that nobody asked for.

I have nothing against Rust. If you want a new tool, go for it. If you want a re-write of an existing tool, go for it. I'm against it creeping into an existing eco-system for no reason.

A popular Python package called Pendulum went over 7 months without support for 3.13. I have to imagine this is because nobody in the Python community knew enough Rust to fix it. Had the native portion of Pendulum been written in C I would have fixed it myself.

https://github.com/python-pendulum/pendulum/issues/844

In my ideal world if someone wanted fast datetimes written in Rust (or any other language other than C) they'd write a proper library suitable for any language to consume over FFI.

So far this Rust stuff has left a bad taste in my mouth and I don't blame the Linux community for being resistant.

replies(20): >>44365585 #>>44365591 #>>44365607 #>>44365639 #>>44365650 #>>44365687 #>>44365703 #>>44365710 #>>44365785 #>>44365790 #>>44365821 #>>44365825 #>>44366008 #>>44366363 #>>44366783 #>>44366848 #>>44366923 #>>44367425 #>>44368861 #>>44373711 #
nchmy ◴[] No.44365607[source]
What, exactly, is your objection to using rust (or any non-python/C language) for python tooling? You didn't actually give any reasons
replies(1): >>44365690 #
1. jftuga ◴[] No.44365690[source]
I believe he alluded to it here...

"I have to imagine this is because nobody in the Python community knew enough Rust to fix it. Had the native portion of Pendulum been written in C I would have fixed it myself."

replies(1): >>44365850 #
2. ericfrederich ◴[] No.44365850[source]
Correct. There better be a damn good reason to add another language to the ecosystem other than it's that particular developer's new favorite language.

Is there anything being done in uv that couldn't be done in Python?

replies(3): >>44365994 #>>44366018 #>>44366097 #
3. nyzs ◴[] No.44365994[source]
speed
replies(1): >>44366208 #
4. nchmy ◴[] No.44366018[source]
How many people are digging into and contributing to any python tooling? How is C meaningfully more accessible than rust? Plenty of people (yet also a significant minority overall) write each of them.

> Is there anything being done in uv that couldn't be done in Python?

Speed, at the very least.

You could just ignore uv and use whatever you want...

replies(2): >>44367282 #>>44377035 #
5. hobofan ◴[] No.44366097[source]
To quote Movie Mark Zuckerberg from The Social Network:

> If Python developers were the inventors of uv - they'd have invented uv

replies(1): >>44381848 #
6. ericfrederich ◴[] No.44366208{3}[source]
I don't see any meaningful speedup. The 10x claims are not reproducible. He's also comparing it to the much older style of requirements.txt projects and not a poetry project with a lockfile.

I detailed this in another comment but pip (via requirements.txt): 8.1s, poetry: 3.7s, uv: 2.1s.

Not even 10x against pip and certainly not against poetry.

replies(2): >>44366502 #>>44366918 #
7. nchmy ◴[] No.44366502{4}[source]
You must be holding it wrong, because everyone else raves about uv
replies(1): >>44367974 #
8. bckr ◴[] No.44366918{4}[source]
How complex are the requirements for this project?
replies(1): >>44367569 #
9. gamegod ◴[] No.44367282{3}[source]
> How is C meaningfully more accessible than rust

They've been teaching C in universities for like 40 years to every Computer Science and Engineering student. The number of professionally trained developers who know C compared to Rust is not even close. (And a lot of us are writing Python because it's easy and productive, not because we don't know other languages.)

replies(2): >>44368761 #>>44373612 #
10. ericfrederich ◴[] No.44367569{5}[source]
https://github.com/nickjj/docker-django-example/blob/bbe3486...
replies(1): >>44370336 #
11. cpburns2009 ◴[] No.44367974{5}[source]
Usually uv pip is only about x2 as fast as regular pip for me. Occasionally I'll have some combination of dependencies that will cause pip to take 2-5 minutes to resolve that uv will handle in 10-20 seconds.
replies(1): >>44368717 #
12. nchmy ◴[] No.44368717{6}[source]
They said "no meaningful speedup". 2x is meaningful
replies(1): >>44370206 #
13. nchmy ◴[] No.44368761{4}[source]
If c + Python is so wonderful and so ubiquitous, why hasn't someone already created uv in C?

Ps the government and others have all recommended moving from C/C++ to Rust... It's irrelevant whether or not that's well-founded - it simply is.

And plenty of other cli tools have been successfully and popularly ported to Rust.

14. cpburns2009 ◴[] No.44370206{7}[source]
The impact of a 2x speedup is relative. For a quick test on one of my projects it's 10 seconds with pip and 4 seconds with uv. That's roughly in line with my previous testing. It's a nice minor speedup on average. It really shines when pip does some non-optimal resolving in the background that takes a minute or more.
15. bckr ◴[] No.44370336{6}[source]
I see. I encourage you to try it with larger projects and see if it makes a difference.

That said, the speed is only one reason I use it. I find its ergonomics are the best in the Python tools I’ve tried. For example it has better dependency resolution than poetry in my estimation, and you can use the uv run —-with command to try things before adding them to your environment.

16. noitpmeder ◴[] No.44373612{4}[source]
I think you'll find that C (and C++) are rapidly disappearing from computer science curriculums. Maybe you'll encounter one or both in Operating Systems, or an elective, but you'll be hard pressed to find recent graduates actually looking for work in those languages.
17. ericfrederich ◴[] No.44377035{3}[source]
> How is C meaningfully more accessible than rust

In an ecosystem where the primary implementation of the language is in C and nearly all native extensions are written in C do you really not know the answer to that?

18. adammarples ◴[] No.44381848{3}[source]
Well to be fair I think they did, it's a successor to Rye which was built by the guy who made Flask, in rust, and inspired by how cargo works.
replies(1): >>44382323 #
19. hobofan ◴[] No.44382323{4}[source]
Hmm, maybe. Though, IIRC rye and uv were more parallel developments rather than uv's lineage tracing back to rye. Also at the point mitsuhiko created rye, he had handed off maintenance of Flask for ~8 years already and was arguably more associated with efforts in the Rust community than in Python.

However, in both cases (uv and rye) it took someone with a Rust background to build something to actually shake up the status quo. With the core PyPa people mostly building on incremental improvements in pip, and Poetry essentially ignoring most PEP effort, things weren't really going to go anywhere.