News for hackers. Stuff that matters.
Re:Why Not Rust? (2020) by adamnemecek on Saturday December 18, 2021 @08:29PM (#29610509)
What did you get stuck on?

> I also dont know why npm and node get so much shit for needing so many libraries but rust and cargo get a pass for these small libraries everywhere.

Because cargo is a better package manager in every aspect.

Re:Why Not Rust? (2020) by Zababa on Saturday December 18, 2021 @11:47PM (#29611414)
> Because cargo is a better package manager in every aspect.

It is not. For example, cargo doesn't have namespacing, which makes the issue of name squatting worse. I'd like to have every crate of the tokio-rs organization on Github (https://github.com/tokio-rs) under a @tokio/ namespace or something like that. npm allows that.

Dismissive responses like that are part of why people talk about "blind optimism and fanboy-ism".

Re:Why Not Rust? (2020) by DenseComet on Sunday December 19, 2021 @12:36AM (#29611652)
I'd love to see that happen, but as I understand it, that's a decision for the crates.io registry. Cargo itself doesn't deal with those types of details and you could host a custom registry that does have namespaces.
Re:Why Not Rust? (2020) by adamnemecek on Sunday December 19, 2021 @01:12AM (#29611833)
You are confusing cargo and crates. Also this was a conscious decision.
Re:Why Not Rust? (2020) by formerly_proven on Saturday December 18, 2021 @08:50PM (#29610621)
> Because cargo is a better package manager in every aspect.

A piece of software can only help with some of the less important questions when you're working with many dependencies.

Re:Why Not Rust? (2020) by adamnemecek on Saturday December 18, 2021 @09:09PM (#29610709)
It handles the insanely tedious parts of package management like version mismatch.
Re:Why Not Rust? (2020) by pjmlp on Sunday December 19, 2021 @03:37AM (#29612391)
It doesn't handle the issue that every tiny piece of functionality is a crate, because everyone wants to have one on their CV.

Also there are no namespaces and integration with other languages boils down to writing our own build.rs scripts.

Re:Why Not Rust? (2020) by formerly_proven on Sunday December 19, 2021 @07:40AM (#29613439)
I'm no node developer, but even with ~100 packages in a Python project it was really rare to see "version mismatch problems". There's probably a lot of talk about it because "just install newest spec'd version recursively" is not technically correct and can violate package version constraints, and it's also probably the only algorithmic thing you can put in a package manager, and optimal solutions are of course NP-hard, making it an interesting thing to work on. But practical impact? Far down the list.
Re:Why Not Rust? (2020) by iopq on Sunday December 26, 2021 @01:09PM (#29694764)
I literally just downloaded a Python program that didn't run because I had the wrong version

In Rust, when you compile an earlier edition with the newer compiler it actually works

Re:Why Not Rust? (2020) by adamnemecek on Sunday December 19, 2021 @09:54AM (#29614383)
I have definitely run into these problem with much smaller projects in both python and js.
Re:Why Not Rust? (2020) by zozbot234 on Saturday December 18, 2021 @08:36PM (#29610554)
Because Rust is a `cargo` cult. /s
Re:Why Not Rust? (2020) by zerocount on Sunday December 19, 2021 @03:54AM (#29612441)
[Ice Cube voice]: Started off with too much cargo, dropped 4 letters now I'm making all the dough.