Hacker News new | ask | show | jobs
by csomar 1849 days ago
I know people here are a bit touchy about Rust, and writing everything in Rust. But here is one advantage I have found with Rust programs: The installation just works. Cargo, as a package manager, is just wonderful.

I have lost counts of how many times my "brew" or "pacman" failed to install something. It's much worse if it's Python; and things that work in macOS are not guaranteed to compile in Linux, and vice-versa. On the other hand, my "cargo install" almost never fails.

For that reason alone, I welcome any initiative to write something in Rust.

5 comments

Pacman and cargo accomplish completely different tasks. One is a package manager for a language and a language alone, the other is a package manager for a whole operating system. Pacman can not be responsible for a build failing, since it doesnt build anything in the first place...

Apart from that, most modern languages come with a package manager nowadays. Why do you like rust more than go? Or nim? Or elixir? Or crystal?

It's been ~11 years since I used a distro based on pacman as a daily driver, and I was very harsh on pacman at the time. It seemed to lag behind the high-level package management tools of contemporaneous distros in terms of flexibility (and, once you had a lot of things installed, performance).

But I never, ever had it just fail to install a package, and I don't remember much fuss with dependency resolution taking manual fiddling, either.

I'd love to hear your pacman horror stories; gimme the hot package manager gossip :D

The way pacman installs new kernels by default is just replacing the old package with the new one. This is bad because if for some reason the new kernel package gets corrupted, the system will fail to boot, and you will have to arch-chroot into the system to install the kernel again. Fedora on the other hand keeps old kernels for some time before removing them.
Wow I think in 10+ years, I've only had 1 or 2 cases of brew failing to install something. It's a piece of software I've been consistently impressed with over the years. I wonder why our experiences differ so much.
Damn, for me it breaks every couple months
It's been a while since I did any coding on macOS but if I remember accurately, I think it didn't play nice with macports (which I needed for some other packages).
Project specific centralized package repositories have the danger of being political (see npm and others). There already is a CoC here that can be used against wrongthink or people you don't like:

https://crates.io/policies

These days, I prefer Linux distributions or BSD ports, though Homebrew seems to be pretty casual as well.

Cargo can handle dependencies linked via URL. Crates.io may be a moderated centralized database, but Cargo is just a neutral tool like make or Cabal.
I mean it is pretty simple. If one is not serving the cause of justice then they need to be brought to justice via social media.
Probably a good reason not to use MAC as development platform.

The last straw for me was being unable to do something simple like install vey common Perl packages natively via CPAN.