Live data from Hacker News

Ask HN: Best Alternative to Homebrew in 2021?

news.ycombinator.com

101–110 of 314 posts

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

#101

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 also use Nix, and agree with these caveats. My personal experience is that it can be hard to initially set up Nix, but once you do, it's rock solid. It's particularly great for sharing config across machines. Here's config for my personal dev environment for instance: https://github.com/mjhoy/dotfiles/blob/main/nix/nixpkgs/conf...

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

#104

It’s a strategy. Package managers have to choose a strategy: slow, crusty and stable or bleeding edge? It’s not CentOS… it’s a local dev machine. The same scenario will occur on Arch Linux. Fortunately Homebrew has lots of helper scripts to upgrade DB’s like Postgres. You probably saw some scroll back with a command to upgrade from 12 to 13 or 13-14 etc. It will even download and install an old version in order to up…

In my experience, developing software on a local dev machine is precisely when fine-grained control of software stack versions is needed.

This can be encapsulated with things like docker, but the "I'll globally, arbitrarily update everything to the bleeding edge" strategy isn't friendly for building and maintaining software.

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

#105
post #37
post #12

The fact that homebrew is awful is one of the huge reasons I don’t use MacOS for development like all my co-workers. Instead I use Windows with WSL because the company won’t allow me a Linux laptop. If I had to use a Mac my solutions would be to alway use Docker, a virtual machine, or a remote dev environment of some kind.

Funny, I use Windows with WSL and the first thing I do when I set up a new WSL instance is get homebrew (linuxbrew) and install everything else through that if available. apt/dpkg and any other package manager that scatters files all over the filesystem is just an absolute disaster that--if you do a lot of R&D tinkering--eventually renders a computer unusable after a few years. That's what happened to my first WSL in…

> apt/dpkg and any other package manager that scatters files all over the filesystem is just an absolute disaster that--if you do a lot of R&D tinkering--eventually renders a computer unusable after a few years.

That was your experience. Mine is that after using apt for a lot of R&D tinkering for 3 years, everything runs fine. apt is global. Sometimes that's great and that's what you want. Sometimes it's not. Another way to keep that in mind is to think as apt as "bad at doing cleanup".

The thing is that you have to have a separation between things that you want on your system all the time, and things that you use for one or more projects. For the first, apt is perfect. For the second, usually that's where I use tools like nvm for node versions, languages package managers like npm, and also docker (which I use a lot for development databases).

For a backend JS project, I would install nvm, npm and docker globally, and then for the project I would use node through nvm with a .nvmrc, install packages locally with npm and use a package.json and package-lock.json, and run the development database with docker through a npm command, usually the latest PostgreSQL version. The link between the backend and database would be made with environment variables, because that's also what I use in production.

The difference between the global (apt) scope and the project (the rest) scope might seem like a failure of apt, but I personally see it as the difference between global and local scope in programming: both have their use, we separate them for a reason and we don't put the same things in them.

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

#106

It’s a strategy. Package managers have to choose a strategy: slow, crusty and stable or bleeding edge? It’s not CentOS… it’s a local dev machine. The same scenario will occur on Arch Linux. Fortunately Homebrew has lots of helper scripts to upgrade DB’s like Postgres. You probably saw some scroll back with a command to upgrade from 12 to 13 or 13-14 etc. It will even download and install an old version in order to up…

In my experience, developing software on a local dev machine is precisely when fine-grained control of software stack versions is needed. This can be encapsulated with things like docker, but the "I'll globally, arbitrarily update everything to the bleeding edge" strategy isn't friendly for building and maintaining software.

That capability exists: brew install postgres@12

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

#107

A lot of the usual "it's bad" "it's not bad for me" discourse in these threads. Could people raise the bar a bit and talk about specific problems they have had with homebrew - other than the auto-update, which we've already noted can be changed by setting HOMEBREW_NO_AUTO_UPDATE=1? Thanks.

Certainly. For me it started when they removed the entire scientific stack, which broke my install scripts / brewfile. Then, they removed the ability to customize builds, which broke my emacs build. Also hit the OP issues.

In every case they were removing features that were working just fine, and in the process creating work for me. Got fed up, switched to macports (after checking out nix), and so far things are back to the way I like it.

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

#108
post #93
post #34

After years of dealing with it I just run most of the software from docker containers and use homebrew for random cli tools.

This was also going to be my comment, homebrew for cli tools and casks for some gui apps, all other environments in docker containers.

Ditto. Anything mission critical runs in Docker via Docker-compose, so I can manage every aspect.

And for any cli tool that's also mission-critical, it can be run within Docker so I can pin it or keep it bleeding edge more easily.

For the important stuff, performance and ease of installation can take a side seat to stability.

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

#109

I'm surprised people still use postgresql from homebrew. Like honestly, I use brew for any CLI command only like zsh and git. Well maybe some programming language as well but I would never, ever install database with it unless I'm desperate. Anything that can be dockerized, just use docker.

I use and love Postgres.app on macOS, separate instances of lots of versions of postgres at the click of a button.
Post reply on HN