Live data from Hacker News

Sapphire: Rust based package manager for macOS

github.com

51–60 of 311 posts

Re: Sapphire: Rust based package manager for macOS

#51
post #27

Earlier quoted context omitted.

Given homebrew was strictly worse than the tool it displaced, I’m not sure it’s the right question to ask. MacOS package management is strictly marketing based.

Macports was less ergonomic imho, which caused the community to shift to homebrew.

Everybody forgot about Fink

https://www.finkproject.org/doc/users-guide/index.php

https://pdb.finkproject.org/pdb/index.php?phpLang=en

(Not a recommendation; seems pretty dead)

Re: Sapphire: Rust based package manager for macOS

#52
post #31

Earlier quoted context omitted.

Wow. They really don't want anyone to take this project seriously! This is actually making me reconsider having brew installed even... https://github.com/pkgxdev/pantry/pull/5360#issuecomment-233...

Is this the guy who was complaining that he didn't get hired by Google even though he made brew? Maybe there were personality issues at play...

I checked out his X account and yep, that's the guy.

Re: Sapphire: Rust based package manager for macOS

#53

> WARNING: ALPHA SOFTWARE > Sapphire is experimental, under heavy development, and may be unstable. Use at your own risk! Ruby seems fine for brew. Does this do anything else better? Ruby makes it easy to write recipes for it which is a huge boon for a package manager.

Homebrew is dog-slow. If this becomes yet another Rust tool that is 10x faster than the one that it replaces: great.

Homebrew is 99% IO-bound and this will be too. Installing (prebuilt) packages doesn't require much logic. If this tool supports parallel downloads, it will be 10x faster than Homebrew, but it won't have anything to do with the language. The issue is finding a hosting provider willing to be DDOS'd for the good of the open-source community.

Re: Sapphire: Rust based package manager for macOS

#54
With my Homebrew hat on, but not speaking for others: I think this is pretty cool, and demonstrates something that we've discussed indirectly for years.

At its core, there are really two parts to Homebrew:

1. There's the client side, i.e. `brew`, which 99.9% of users stick to happy paths (bottle installs, supported platforms) within. These users could be supported with relative ease by a small native-code installer, since the majority of the work done by the installer in the happy path is fetching bottles, exploding them, and doing a bit of relocation.

2. There's literally everything else, i.e. all of the developer, repository, and CI/CD machinery that keeps homebrew-core humming. This is the largely invisible infrastructure that makes `brew install` work smoothly, and it's very hard to RIIR (in a large part because it's tied heavily to the formula DSL, which is arbitrary Ruby).

(1) is a nice experimental space, because Homebrew does (IMO) a decent job of isolating the client-facing side from the complexity of (2). However, (2) is where the meat-and-potatoes of packaging happens, and where Homebrew's differentiators really lie (specifically, in how easy it is to contribute new packages and bump existing ones).

Edit: Another noteworthy aspect here around performance: I mentioned this in another comment[1], but parallel downloads of things like bottles and DMGs is not an architectural limitation of Homebrew itself, but instead a conscious decision to trade some install speed for courtesy towards the services we fetch from (including GitHub itself). Smaller projects can sidestep this because they're not directing nearly the same degree of volume; I think this project will discover if/when its volumes grow that it will need to serialize downloads to avoid being throttled or outright limited.

[1]: https://news.ycombinator.com/item?id=43765605

Re: Sapphire: Rust based package manager for macOS

#55

Earlier quoted context omitted.

Given homebrew was strictly worse than the tool it displaced, I’m not sure it’s the right question to ask. MacOS package management is strictly marketing based.

At the time I switched from macports to homebrew (years ago?), homebrew could install more things I needed without any errors. Many more. That was it, that's why I switched, nothing more, nothing less.

This is why I switched as well. At that point the brew experience was a lot closer to that of apt on a Debian-based Linux distribution or something where you could reliably run “x install ”, get up to go grab coffee, and come back to a useable newly installed package. Macports felt like it could throw errors because Venus was in retrograde sometimes.

Re: Sapphire: Rust based package manager for macOS

#56
post #26

Hey, so I built this thing, most of it at so far at least. And yeah, right now it isn't doing many things better than Homebrew. Setting of relative paths for bottle installs is still not perfect, well it works for every bottle I have tested except rust. Getting bottles working 100% is very doable though imo. Build from source formulae is still pretty f*ed + I do not know if it is really feasible given that the json A…

What makes you interested in a rust implementation of brew? I'm guessing it's that you hoping that it is eventually more performant -- are there specific areas of current brew you have identified as performance bottlenecks likely to eventually benefit from a rust implementation? Or any more info to share about assumptions/hopes that motivated this or any other motivations?

I say this from ignorance, but coming from a lineage of linux package managers; brew must be doing something wrong - and upon immediate introspection I doubt that its language specific.

The performance of apt/dnf in comparison is surreal; but dnf (or at least yum, its predecessor) is written in Python; which has even worse performance characteristics than Ruby.

Clearly something is wrong, I wonder how different they are architecturally.

Re: Sapphire: Rust based package manager for macOS

#57
post #31

FWIW the author of Homebrew is also working on a next generation package manager in rust: https://pkgx.dev/ (beware facebook tracking and infinite AI slop)

Wow. They really don't want anyone to take this project seriously! This is actually making me reconsider having brew installed even... https://github.com/pkgxdev/pantry/pull/5360#issuecomment-233...

This has nothing to do with Homebrew. It's a different project.

Re: Sapphire: Rust based package manager for macOS

#60
post #56

Earlier quoted context omitted.

What makes you interested in a rust implementation of brew? I'm guessing it's that you hoping that it is eventually more performant -- are there specific areas of current brew you have identified as performance bottlenecks likely to eventually benefit from a rust implementation? Or any more info to share about assumptions/hopes that motivated this or any other motivations?

I say this from ignorance, but coming from a lineage of linux package managers; brew must be doing something wrong - and upon immediate introspection I doubt that its language specific. The performance of apt/dnf in comparison is surreal; but dnf (or at least yum, its predecessor) is written in Python; which has even worse performance characteristics than Ruby. Clearly something is wrong, I wonder how different they…

Have you tried Homebrew in the last year or so? I think a lot of people have an impression of Homebrew's performance from the "bad old days," i.e. back when Homebrew had to evaluate every single local formula file to perform any operations at all.

(There's still low handing fruit, but it's not like it was a few years ago where `brew list` took seconds to run. It now runs nearly instantaneously for me locally, like most of the other happy path commands.)

Post reply on HN