Live data from Hacker News

Sapphire: Rust based package manager for macOS

github.com

141–150 of 311 posts

Re: Sapphire: Rust based package manager for macOS

#141
post #127

Earlier quoted context omitted.

I am not too fond of this design for reasons of privilege separation and FHS-alignment, but can accept it as most Homebrew users don't have their Macintosh computers used by multiple people.

My machine is single-user, problem is some things require root. Maybe they shouldn't according to Homebrew's stance on permissions, but idk, I'm working with what I've got.

Can you give a concrete example?

I know why certain software has be run with root privileges, but it's a bit hard for me to come with a reasonable scenario where a software would fail to run properly when installed to a directory that is owned by the same non-root user that launches that software.

Re: Sapphire: Rust based package manager for macOS

#142
post #133

I just want the equivalent of `sudo apt-get install` on Mac, with the same exact commands.

The thing you want then is `fink`, which literally uses dpkg and apt.

That sounds like what I want. Seems to only have "wip" support for the newer macOSes though. I also remember using the Debian packager on iPhone back in the golden age of jailbreaking.

Re: Sapphire: Rust based package manager for macOS

#143
post #53

Earlier quoted context omitted.

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.

Hmm I'm sure people said that about Pip before uv came along and was literally 10x faster. To be fair I haven't noticed Brew being as tediously slow as Pip. Maybe I just use it way less.

There are two things that work in `uv`'s favor (which, to be clear, is an incredible tool that I'm a big fan of):

1. Python packaging, unlike Homebrew, does have a compute-heavy phase in the form of dependency resolution. `uv` can make significant gains over `pip` in that phase.

2. `uv` performs parallel downloads and other operations, in part because of Rust's fearless parallelism.

Homebrew doesn't really have (1), since resolution is just a linearization of the dependency tree. And parallelism of downloads in (2) poses a problem for Homebrew that's been mentioned in other threads (whereas parallelism is not a significant problem for PyPI's CDN-fronted distribution).

Re: Sapphire: Rust based package manager for macOS

#145
post #141

Earlier quoted context omitted.

My machine is single-user, problem is some things require root. Maybe they shouldn't according to Homebrew's stance on permissions, but idk, I'm working with what I've got.

Can you give a concrete example? I know why certain software has be run with root privileges, but it's a bit hard for me to come with a reasonable scenario where a software would fail to run properly when installed to a directory that is owned by the same non-root user that launches that software.

The symptom was something like https://stackoverflow.com/questions/16432071/how-to-fix-home... , which btw has a terrible accepted answer. I forget the root cause (no pun intended), possibly some bad interaction with stuff I installed outside of Homebrew. It's also possible I did something wrong, but even then there's something to be said about so many users having the same problem uniquely with Homebrew.

Lemme try to repro again when I'm home.

Re: Sapphire: Rust based package manager for macOS

#146

Consider rebranding to a 4 letter name or even better a 3 letter one. I know it sounds dumb but uv was smart to go shorter than pip and sapphire feels heavier than brew no matter what it does after typing that.

Yeah i vote it should be rebranded “why”

Perhaps _why?

Re: Sapphire: Rust based package manager for macOS

#147
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…

Cool project, good luck with it! If I may surface one use case: Several years ago I had to manage a bunch of Macs for CI jobs. The build process (Unreal's UAT) didn't support running more than one build process at a time, and Docker was really slow, so I'd hoped to use different user accounts to bypass that and get some parallelization gains. Homebrew made that very difficult with its penchant for system-wide install…

Nix effectively has per-user packages, but it’s hard to read into your full use case from your comment.

Re: Sapphire: Rust based package manager for macOS

#148
post #144

Please give it an easier command name than ‘sapphire’ if you want to win people over to use it. Double in size and three times as hard to remember (or type) than ‘brew’. Even cli peeps are still just people

https://en.wikipedia.org/wiki/Alias_(command)

Re: Sapphire: Rust based package manager for macOS

#149

Earlier quoted context omitted.

Hmm I'm sure people said that about Pip before uv came along and was literally 10x faster. To be fair I haven't noticed Brew being as tediously slow as Pip. Maybe I just use it way less.

There are two things that work in `uv`'s favor (which, to be clear, is an incredible tool that I'm a big fan of): 1. Python packaging, unlike Homebrew, does have a compute-heavy phase in the form of dependency resolution. `uv` can make significant gains over `pip` in that phase. 2. `uv` performs parallel downloads and other operations, in part because of Rust's fearless parallelism. Homebrew doesn't really have (1),…

Python should be able to do parallel downloads at least, albeit having the overhead of multiple OS threads unless you're using asyncio.

Re: Sapphire: Rust based package manager for macOS

#150
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…

One big difference is that apt and dnf are both binary package management systems, whereas Homebrew is a source-based build system with binary packages (“bottles”) added on top.
Post reply on HN