Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

231–240 of 314 posts

Re: Ask HN: Best Alternative to Homebrew in 2021?

#231
post #35

My experience is that both (Macports, Homebrew) are comically unreliable and frustrating to use. That said, with my insistence to install under $HOME, Macports seems to work slightly better. But truly, I got the best results from downloading and compiling every single flipping dependency myself.

> But truly, I got the best results from downloading and compiling every single flipping dependency myself. My experience has been that very, very rarely is any installation as straightforward as "curl && ./configure && make PREFIX=whatever install", partially due to everyone in the known universe thinking they need some awesome new build system, partially due to unknown dependencies and their versions, partially due…

> My experience has been that very, very rarely is any installation as straightforward as "curl && ./configure && make PREFIX=whatever install", partially due to everyone in the known universe thinking they need some awesome new build system [...]

Aye, This is particularly impacting when the build system itself needs to be eh built.

> The value of Homebrew to me are the constantly bumped formulae descriptors, definitely, 100% NOT the "brew" frontend for it. [...] and using "--build-from-source"

I hadn't thought about that and I suspect you are right. Although I lack recent exposure to it and I can certainly recall getting very annoyed by it, I have to say that my experience with Gentoo's Portage/emerge is by far the least unpleasant as dealing with package managers goes.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#232

Homebrew project leader here: I hope you're able to find a package manager that better fits your needs and I'm sorry that Homebrew is not currently doing so. --- Homebrew upgrades dependencies and dependents of those dependencies (which, admittedly, can feel like unrelated) on installation and upgrade. As mentioned in other comments, you can customise this behaviour with `HOMEBREW_NO_INSTALL_UPGRADE` or `HOMEBREW_NO_…

I don't use homebrew too much (I'm usually on Linux, and when I am on macos, my development environment tends to be pretty lightweight), but based on my experience with Linux package managers, I wonder if this is mostly a pain point due to the performance issues brew sometimes has. On Linux, I tend check for upgrades fairly often (at least once a day, and always right before trying to install something), so I don't run into this issue much there. However, with my Linux package manager, checking for updates is always really fast (maybe a second or two at most unless I'm on very spotty wifi), whereas sometimes trying to do the same with brew takes significantly longer (and that's before even applying the updates). It seems plausible that users who are frustrated with slow updates start updating less often, which then causes updates to take even longer the next time they do, until eventually they have an experience like OP where they try to install one thing and it takes 45 minutes. I imagine there isn't an easy solution if this is in fact the core issue, but I think it's worth considering that the core issue isn't actually the update strategy you describe, as that's fairly similar to what I've seen with Linux package managers, and I can't remember ever seeing any complaints like OP's about any of them.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#233
post #182

I just reached the same breaking point -- and normally I am pretty sympathetic to software jank, but the maintainer of homebrew is so actively hostile and rude that my degree of empathy is significantly less -- and switched to Nix, which is quite good, conditional on three gotchas: 1. Nix has very limited support for GUI applications of the kind that you'd find in `brew cask`. Not no support, some of them are there,…

I've just gone through the process of configuring a new MBP with nix-darwin and home-manager, and I'm sold. Keeping my MacOS and my NixOS environments in sync has been a nice bonus. I still run Homebrew for a couple of services and casks, but I'm down to less than 20 packages still installed that way. There have been a few points of friction (which I'm used to as a polyglot with lots of active projects), but the comm…

You can also run nixos-rebuild targeting your NixOS machine from your Mac which is a neat trick - and it’s how I update my home server.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#234

I just reached the same breaking point -- and normally I am pretty sympathetic to software jank, but the maintainer of homebrew is so actively hostile and rude that my degree of empathy is significantly less -- and switched to Nix, which is quite good, conditional on three gotchas: 1. Nix has very limited support for GUI applications of the kind that you'd find in `brew cask`. Not no support, some of them are there,…

Regarding GUI applications: you're probably talking about the Nixpkgs repository, rather than the Nix tool itself. I use the following Nix function to install GUI applications https://github.com/cmacrae/.nixpkgs/blob/d4b51eb414b0edaffae... It doesn't work for everything, but I use it at the moment for Amethyst, DBeaver, DockerDesktop, Emacs, Firefox, iTerm2, Postman, Slack and VNCViewer.

This is neat! I wonder if there would be value in having a repo for only GUI applications, equivalent to casks. I suppose it works best when the application doesn’t also auto-update, which many do.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#235
post #195
post #165

Earlier quoted context omitted.

> python is always going to be a mess The irony is that poster was trying to install a solution to this very problem (virtualenv). The broader problem is that, at this point, python is effectively its own OS. Coupled with macOS being schizophrenic between "We want to provide a posix environment for users" and "No user should ever look under the hood, so no need to tell them about all the duct taped bits." Which brew…

No, the problem is that Python's packaging system (like Homebrew's!) was created without adequate reference to prior art, has undergone much more evolution than design, and has suffered in every attempt to improve it from the fact of its adoption by a large userbase which democratically manages it so that changes must be conservative. As a result, Python packaging has an utterly insane design that it can't evolve its…

I think of those sorts of things as paradoxical people requirements.

To wit, only people interested in new languages spend lots of effort building new languages (and their associated ecosystems).

People who have been using an existing language for years, long enough to internalize the design decisions and flaws, have little incentive to stop using something they're an expert at, to build something new.

Ergo, the person you really want designing a language and ecosystem is someone who's used existing art enough to be an expert, then decides to give it all up, start from scratch, and do something harder.

There aren't many of those people.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#236
post #52

I've personally had very good experiences switching back from Homebrew to MacPorts. Wouldn't go back to Homebrew. I find it much faster now, which is quite funny to me because back when Homebrew was new (and a lot less opinionated) it was much faster than MacPorts, especially with the bottles (binary packages) feature. Today, MacPorts has binary packages, doesn't randomly force incredibly slow updates when I just wan…

Macports made my life hard three times I upgraded OSes from having to migrate Macports versions, just leaving broken files in /usr/local/*. The worst instance was Mavericks, when it suddenly said i had no ports, after 10 years on the same image. It did something similar during the Monterey update. I'm now 100% brew but still have broken artefacts from MacPorts littering my system. I'm also still using the same image…

Perhaps it would be great opportunity for you to clean install macOS to start anew and start fresh from there without worrying about lingering old files in the system.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#237
post #218

Earlier quoted context omitted.

I appreciate all your hard work and I like Homebrew, but I think updating high-level packages when a descendent dependency is updated is the wrong behavior - at least in this example. If Postgres has an unversioned dependency to PackageX, the only time I might expect Postgres to be updated automatically is if I update PackageX across a major version boundary, risking breaking changes. Even then, I'm not sure I'd want…

> If Postgres has an unversioned dependency to PackageX, the only time I might expect Postgres to be updated automatically is if I update PackageX across a major version boundary, risking breaking changes. Homebrew doesn't meaningfully have versioned or unversioned dependencies, because it doesn't incorporate any notion of version into its dependency solver. When you declare a dependency on `python@3.9`, you're not t…

Now I understand better why Homebrew author failed his job interview at Google :)

Re: Ask HN: Best Alternative to Homebrew in 2021?

#238

I just reached the same breaking point -- and normally I am pretty sympathetic to software jank, but the maintainer of homebrew is so actively hostile and rude that my degree of empathy is significantly less -- and switched to Nix, which is quite good, conditional on three gotchas: 1. Nix has very limited support for GUI applications of the kind that you'd find in `brew cask`. Not no support, some of them are there,…

Yes, agreed. Someone asked if there can be a progress bar on Homebrew. Instantly shutdown the thread. Homebrew is old and it needs to be replaced. It has served its time.

> Homebrew is old and it needs to be replaced. It has served its time.

Counterpoint: I've spent serious time (years) with, oh, six or seven package managers, in a couple decades of using package managers. More if you count Flatpack and stuff like that.

Brew is my favorite, all-around. Package selection is incredible. Stability is excellent. It's a little slow and I think defaulting to updating the package list damn near every time one invokes the command is a really weird choice, but that's configurable.

My second favorite? Docker :-)

Third would probably be portage (from Gentoo), I guess. Then apt/dpkg.

Worst I've used is easily Macports, and it's not even close—however, I switched years ago because it broke constantly under normal usage, on my machine, so for all I know it's great now—and I've never forgiven RPM-based distros for all the time I lost to RPM hell over the years, and for going so long with worse CLI tools than apt.

Void's seems very nice, but I've not spent enough time with it to feel the rough edges.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#239
Came here hoping to see some recommendations on getting started with nix on MacOS, or maybe a favorite blog post or series.

I've tried the nix.dev installation + nix-darwin instructions 4 or 5 times but never make it very far.

Seems like I should generally prefer a multi-user install? Does nix-darwin play well with that?

As I supposed to `sudo -i nix-channel --add / update` or not use sudo? Is unstable the generally recommended channel? Do I use sudo with nix-darwin, since it's supposed to be kind of like NixOS / system-wide?

And then I usually give up, count my blessings for homebrew, and resolve to never again waste another 2 days trying to figure out nix.

Rinse and repeat in 1 month.

Re: Ask HN: Best Alternative to Homebrew in 2021?

#240
post #57

Why did you want to `brew install virtualenv`? That’s no longer the current way to work with python. Virtual environments are now in the standard library: python -m venv /my/directory I’ve never had any problem with homebrew in over a decade’s usage. But yes, don’t use it for python development tooling: use pyenv and python -m venv and pip for that.

I can't recommend pyenv and pipx enough. I use brew to install pyenv and pipx, and there ends my interaction with brew and python. Pyenv builds all of my python versions. Pipx installs cli tools in their own env. Precommit is also great for much more than just pre-commit hooks. It can install tools used for hooks in their own cache, no need to manage venvs yourself.

Pyenv will setup Python environments under your user and replace the system Python executable with a shim. Depending on your setup, it can create a lot of confusion (I have fixed a lot of colleague machines in the past year that were broken in one way or another).

Doing a `python[V.v] -m venv …` and then sourcing `activate` is conceptually much simpler and doesn’t affect any other terminal sessions you may have open.

Post reply on HN