Most active commenters
  • taminka(7)
  • DiabloD3(4)

←back to thread

217 points amazonhut | 48 comments | | HN request time: 2.242s | source | bottom
1. untrimmed ◴[] No.45248154[source]
As someone who has spent days wrestling with Python dependency hell just to get a model running, a simple cargo run feels like a dream. But I'm wondering, what was the most painful part of NOT having a framework? I'm betting my coffee money it was debugging the backpropagation logic.
replies(5): >>45248223 #>>45248315 #>>45248416 #>>45248640 #>>45248972 #
2. taminka ◴[] No.45248223[source]
lowkey ppl who praise cargo seem to have no idea of the tradeoffs involved in dependency management

the difficulty of including a dependency should be proportional to the risk you're taking on, meaning it shouldn't be as difficult as it in, say, C where every other library is continually reinventing the same 5 utilities, but also not as easy as it is with npm or cargo, because you get insane dependency clutter, and all the related issues like security, build times, etc

how good a build system isn't equivalent of how easy it is include a dependency, while modern languages should have a consistent build system, but having a centralised package repository that anyone freely pull to/from, and having those dependencies freely take on any number of other dependencies is a bad way to handle dependencies

replies(7): >>45248396 #>>45248405 #>>45248468 #>>45248509 #>>45248523 #>>45248580 #>>45249844 #
3. codetiger ◴[] No.45248315[source]
I guess, resource utilization like GPU, etc
4. itsibitzi ◴[] No.45248396[source]
What tool or ecosystem does this well, in your opinion?
replies(1): >>45249115 #
5. quantumspandex ◴[] No.45248405[source]
Security is another problem, and should be tackled systematically. Artificially making dependency inclusion hard is not it and is detrimental to the more casual use cases.
6. ricardobeat ◴[] No.45248416[source]
Have you tried uv [1]? It has removed 90% of the pain of running python projects for me.

[1] https://github.com/astral-sh/uv

replies(3): >>45248587 #>>45248888 #>>45249600 #
7. ◴[] No.45248468[source]
8. jokethrowaway ◴[] No.45248509[source]
Is your argument that python's package management & ecosystem is bad by design - to increase security?

In my experience it's just bugs and poor decision making on the maintainers (eg. pytorch dropping support for intel mac, leftpad in node) or on the language and package manager developers side (py2->3, commonjs, esm, go not having a package manager, etc).

Cargo has less friction than pypi and npm. npm has less friction than pypi.

And yet, you just need to compromise one lone, unpaid maintainer to wreck the security of the ecosystem.

replies(1): >>45249163 #
9. dev_l1x_be ◴[] No.45248523[source]
> lowkey ppl who praise cargo seem to have no idea

Way to go on insulting people on HN. Cargo is literally the reason why people coming to Rust from languages like C++ where the lack of standardized tooling is giant glaring bomb crater that poses burden on people every single time they need to do some basic things (like for example version upgrades).

Example:

https://github.com/facebook/folly/blob/main/build.sh

replies(2): >>45248572 #>>45249051 #
10. IshKebab ◴[] No.45248580[source]
This is the weirdest excuse for Python's terrible tooling that I've ever heard.

"It's deliberately shit so that people won't use it unless they really have to."

replies(1): >>45249075 #
11. DiabloD3 ◴[] No.45248587[source]
uv is great, but I think the real fix is just abandoning Python.

The culture that language maintains is rather hostile to maintainable development, easier to just switch to Rust and just write better code by default.

replies(5): >>45248612 #>>45248634 #>>45248782 #>>45249308 #>>45249966 #
12. airza ◴[] No.45248612{3}[source]
There's not really another game in town if you want to do fast ML development :/
replies(2): >>45248718 #>>45249873 #
13. trklausss ◴[] No.45248634{3}[source]
Every tool for the right job. If you are doing tons of scripting (for e.g. tests on platforms different than Rust), Python can be a solid valid alternative.

Also, tons of CAE platforms have Python bindings, so you are "forced" to work on Python. Sometimes the solution is not just "abandoning a language".

If it fits your purpose, knock yourself out, for others that may be reading: uv is great for Python dependency management on development, I still have to test it for deployment :)

replies(1): >>45248843 #
14. Galanwe ◴[] No.45248640[source]
> spent days wrestling with Python dependency hell

I mean I would understand that comment in 2010, but in 2025 it's grossly ridiculous.

15. DiabloD3 ◴[] No.45248718{4}[source]
Dunno, almost all of the people I know anywhere in the ML space are on the C and Rust end of the spectrum.

Lack of types, lack of static analysis, lack of ... well, lack of everything Python doesn't provide and fights users on costs too much developer time. It is a net negative to continue pouring time and money into anything Python-based.

The sole exclusion I've seen to my social circle is those working at companies that don't directly do ML, but provide drivers/hardware/supporting software to ML people in academia, and have to try to fix their cursed shit for them.

Also, fwiw, there is no reason why Triton is Python. I dislike Triton for a lot of reasons, but its just a matmul kernel DSL, there is nothing inherent in it that has to be, or benefits from, being Python.... it takes DSL in, outputs shader text out, then has the vendor's API run it (ie, CUDA, ROCm, etc). It, too, would benefit from becoming Rust.

replies(3): >>45249457 #>>45249615 #>>45249713 #
16. Exuma ◴[] No.45248782{3}[source]
i hate python, but the idea of replacing python with rust is absurd
17. aeve890 ◴[] No.45248843{4}[source]
>Every tool for the right job. If you are doing tons of scripting (for e.g. tests on platforms different than Rust), Python can be a solid valid alternative.

I'd say Go is a better alternative if you want to replace python scripting. Less friction and much faster compilation times than Rust.

replies(2): >>45248979 #>>45249134 #
18. TheAceOfHearts ◴[] No.45248888[source]
Switching to uv made my python experience drastically better.

If something doesn't work or I'm still encountering any kind of error with uv, LLMs have gotten good enough that I can just copy / paste the error and I'm very likely to zero-in on a working solution after a few iterations.

Sometimes it's a bit confusing figuring out how to run open source AI-related python projects, but the combination of uv and iterating on any errors with an LLM has so far been able to resolve all the issues I've experienced.

19. zoobab ◴[] No.45248972[source]
"a simple cargo run feels like a dream"

A cargo build that warms up your CPU during winter while recompiling the whole internet is better?

replies(1): >>45249917 #
20. DiabloD3 ◴[] No.45248979{5}[source]
I am not a huge fan of Go, but if all the world's "serious" Python became Go, the average code quality would skyrocket, so I think I can agree to this proposal.
21. taminka ◴[] No.45249051{3}[source]
i'm saying that ease of dependency inclusion should not be a main criterion for evaluating how good a build system is, not that it isn't the main criterion for many people...

like the entire point of my comment is that people have misguided criteria for evaluating build systems, and your comment seems to just affirm this?

replies(2): >>45249336 #>>45249342 #
22. taminka ◴[] No.45249075{3}[source]
i just realised that my comment sounds like it's praising python's package management since it's often so inconvenient to use, i want to mention that that wasn't my intended point, python's package management contains the worst aspects from both words: being centralised AND horrible to use lol

my mistake :)

23. taminka ◴[] No.45249115{3}[source]
any language that has a standardised build system (virtually every language nowadays?), but doesn't have a centralised package repository, such that including a dependency is seamless, but takes a bit of time and intent

i like how zig does this, and the creator of odin has a whole talk where he basically uses the same arguments as my original comment to reason why odin doesn't have a package manager

replies(1): >>45250016 #
24. physicsguy ◴[] No.45249134{5}[source]
Go performance is terrible for numeric stuff though, no SIMD support.
replies(4): >>45249445 #>>45249515 #>>45249581 #>>45249766 #
25. taminka ◴[] No.45249163{3}[source]
nah python's package management is just straight up terrible by every metric, i just used it as a tangent to talk about how imo ppl incorrectly evaluate build systems
26. pjmlp ◴[] No.45249308{3}[source]
I know Python since version 1.6.

It is great for learning on how to program (BASIC replacement), OS scripting tasks as Perl replacement, and embedded scripting in GUI applications.

Additionally understand PYTHONPATH, and don't mess with anything else.

All the other stuff that is supposed to fix Python issues, I never bothered with them.

Thankfully, other languages are starting to also have bindings to the same C and C++ compute libraries.

27. adwn ◴[] No.45249336{4}[source]
> like the entire point of my comment is that people have misguided criteria for evaluating build systems, and your comment seems to just affirm this?

I think dev_l1x_be's comment is meant to imply that your believe about people having misguided criteria [for evaluation build systems] is itself misguided, and that your favored approach [that the difficulty of including a dependency should be proportional to the risk you're taking on] is also misguided.

replies(1): >>45249679 #
28. Sl1mb0 ◴[] No.45249342{4}[source]
> dependency inclusion _should not_ be a main criterion for evaluating how good a build system is

That's just like, your opinion, man.

replies(1): >>45249526 #
29. pclmulqdq ◴[] No.45249445{6}[source]
There are Go SIMD libraries now, and there's also easy use of C libraries via Cgo.
30. nkozyra ◴[] No.45249457{5}[source]
> Dunno, almost all of the people I know anywhere in the ML space are on the C and Rust end of the spectrum.

I wish this were broadly true.

But there's too much legacy Python sunk cost for most people though. Just so much inertia behind Python for people to abandon it and try to rebuild an extensive history of ML tooling.

I think ML will fade away from Python eventually but right now it's still everywhere.

31. DiabloD3 ◴[] No.45249515{6}[source]
(given the context of LLMs) Unless you're doing CPU-side inference for corner cases where GPU inference is worse, lack of SIMD isn't a huge issue.

There are libraries to write SIMD in Go now, but I think the better fix is being able to autovectorize during the LLVM IR optimization stage, so its available with multiple languages.

I think LLVM has it now, its just not super great yet.

32. taminka ◴[] No.45249526{5}[source]
i mean, unless you have some absolute divine truths, that's kind of the best i have :shrug
33. 9rx ◴[] No.45249581{6}[source]
That's not really true, but we're talking about a Python replacement for scripting tasks, not core compute tasks, anyway. It is not like Python is the paragon of SIMD support. Any real Python workloads end up being written in C for good reason, using Python only as the glue. Go can also interface with C code, and despite all the flack it gets for its C call overhead it is still significantly faster at calling C code than Python is.
34. mtlmtlmtlmtl ◴[] No.45249600[source]
I'm sure it's true and all. But I've been hearing the same claim about all those tools uv is intended to replace, for years now. And every time I try to run any of those, as someone who's not really a python coder, but can shit out scripts in it if needed and sometimes tries to run python software from github, it's been a complete clusterfuck.

So I guess what I'm wondering is, are you a python guy, or are you more like me? because for basically any of these tools, python people tell me "tool X solved all my problems" and people from my own cohort tell me "it doesn't really solve anything, it's still a mess".

If you are one of us, then I'm really listening.

replies(4): >>45249727 #>>45249732 #>>45249763 #>>45249960 #
35. mountainriver ◴[] No.45249615{5}[source]
I love Rust and C, I write quite a bit of both. I am an ML engineer by trade.

To say most ML people are using Rust and C couldn’t be further from the truth

replies(1): >>45250172 #
36. taminka ◴[] No.45249679{5}[source]
my thesis is that negative externalities of build systems are important and i don't know how to convince of importance of externalities someone whose value system is built specifically on ignoring externalities and only factoring in immediate convenience...
37. airza ◴[] No.45249713{5}[source]
Okay. Humor me. I want to write a transformer-based classifier for a project. I am accustomed to the pytorch and tensorflow libraries. What is the equivalent using C?
38. J_Shelby_J ◴[] No.45249727{3}[source]
Isn’t UV essentially cargo for python?
39. jhardy54 ◴[] No.45249732{3}[source]
I’m a “Python guy” in that I write Python professionally, but also am like you in that I’ve been extremely underwhelmed by Portry/Pipenv/etc.

Python dependencies are still janky, but uv is a significant improvement over existing tools in both performance and ergonomics.

40. hobofan ◴[] No.45249763{3}[source]
I'm one of you.

I'm about the highest tier of package manager nerd you'll find out there, but despite all that, I've been struggling to create/run/manage venvs out there for ages. Always afraid of installing a pip package or some piece of python-based software (that might muck up Python versions).

I've been semi-friendly with Poetry already, but mostly because it was the best thing around at the time, and a step in the right direction.

uv has truely been a game changer. Try it out!

41. wild_egg ◴[] No.45249766{6}[source]
Lots of packages out there using SIMD for lots of things.

You can always drop into straight assembly if you need to as well. Go's assembler DX is quite nice after you get used to it.

42. hobofan ◴[] No.45249844[source]
> but having a centralised package repository that anyone freely pull to/from, and having those dependencies freely take on any number of other dependencies is a bad way to handle dependencies

So put a slim layer of enforcement to enact those policies on top? Who's stopping you from doing that?

43. ◴[] No.45249873{4}[source]
44. surajrmal ◴[] No.45249917[source]
It has 3 direct dependencies and not too many more transitively. You're certainly not recompiling the internet. If you're going to run a local llm I doubt you're building on a toaster so build speed won't be a big ordeal either.
45. tinco ◴[] No.45249960{3}[source]
As a Ruby guy: uv makes Python feel like it finally passed the year 2010.
46. WhereIsTheTruth ◴[] No.45249966{3}[source]
abandoning Python for Rust in AI would cripple the field, not rescue it

the disease is the cargo cult addiction (which Rust is full of) to micro libraries, not the language that carries 90% of all peer reviewed papers, datasets, and models published in the last decade

every major breakthrough, from AlphaFold to Stable Diffusion, ships with a Python reference implementation because that is the language researchers can read, reproduce, and extend, remove Python and you erase the accumulated, executable knowledge of an entire discipline overnight, enforcing Rust would sabotage the field more than anything

on the topic of uv, it will do more harm than good by enabling and empowering cargo cults on a systemic level

the solution has always been education, teaching juniors to value simplicity, portability and maintainability

47. zoobab ◴[] No.45250016{4}[source]
"a standardised build system (virtually every language nowadays?)"

Python packages still manage poorly dependencies that are in another lang like C or C++.

48. Narishma ◴[] No.45250172{6}[source]
They said most people they knew, not most people.