5 ms·
Ask HN: Homebrew, Asdf, Nix, or Other?
New Macbook Air incoming and want to find out what the hive mind recommends for a fresh machine. On the old one I used Homebrew mostly but asdf for Ruby and Python. Was always happy with Apple Terminal + Oh My zsh. What’s your setup?
- nikolay 2y agoAqua [1]! [1]: https://aquaproj.github.io/ https://aquaproj.github.io/
- jahnu 2y agoLooks very cool!
- nikolay 2y agoIt's beyond cool as it's fast, and very secure, and you can define your own formulas in place although the maintainer is very active of adding new packages within a couple of days!
- Imustaskforhelp 2y agoThanks I might use this!
- hschne 2y agoHave been using asdf (with Ruby and JS) for years, haven't had a reason to look for something else yet.
- nikolay 2y agoI stopped using asdf as it's a huge security nightmare. Literally, you're running third-party Bash scripts, which have no checksums and absolute no security considerations! Even WordPress is better as it controls the source code of the standard plugins unlike asdf! Also, I often face an issue with GitHub IP quotas as each formula is on its own, often doesn't follow any basic security best practices or conventions, and does not use GITHUB_TOKEN to authenticate against the GitHub API. 90% of the plugin code for asdf is the same. I'm not sure why there's no basic framework that uses eget or other now-popular tools to fetch binaries for the proper arch from GitHub releases! That's why I use aqua [1], which just does this, and unlike asdf, is extremely fast as it has caching and downloads binaries in parallel. [1]: https://aquaproj.github.io/ https://aquaproj.github.io/
- s0l1dsnak3123 2y agoAsdf is great - I'm not knocking it at all and have built several scripts for it over the years - but I think mise might be a better tool for someone starting out from scratch: https://github.com/jdx/mise https://github.com/jdx/mise. These days I'm using nix, but it's not for everyone.
- pawelduda 2y agoYes, asdf just works for me. I can't recall a single issue in like 8 years of using it
- rezaprima 2y agoDont remember why, but I use mise for java versioning, and homebrew for app installation
- comprev 2y agoHave you tried jenv? Similar tool to pyenv and rbenv.
- nikolay 2y agoAnother option is pkgx [1]! [1]: https://pkgx.app/ https://pkgx.app/
- dakiol 2y agoWhat about using a linux VM and mount the directory that contains the source code in your mac so that you can edit it via your favourite editor/IDE? I use multipass/qemu on my m2 and it works wonders. Another benefit is that I don’t run third party deps directly on my machine.
- kkoncevicius 2y agoAnother alternative is MacPorts. I've been using it since my first Mac (8 years ago), and haven't found a reason to change.
- deleted 2y ago[deleted]
- kingkongjaffa 2y agoJust another datapoint but iterm2, zsh+ ohmyzsh, homebrew has been fine for ~10 years for me. The main consideration I have is whether to manage languages via brew or via things like NVM for node, Pyenv for python etc.I don’t remember what I did for python but using poetry works flawlessly.
- solardev 2y agoHomebrew because that's where most packages live, and what most documentation and stack answers point to. Not worth fiddling with the other package managers. Homebrew just works and never gave me much of an issue.
- ashconnor 2y agoI switched from asdf to mise - https://mise.jdx.dev/ https://mise.jdx.dev/
- volker48 2y agoWhat prompted you to switch?
- ashconnor 2y agoThe docs does a great job of comparing the two: https://mise.jdx.dev/dev-tools/comparison-to-asdf.html https://mise.jdx.dev/dev-tools/comparison-to-asdf.html Personally I didn't care about shims or performance. I find the asdf commands to be difficult to remember because they are unintuitive. See the "UX" section of the link above.
- volker48 2y agoThanks I didn't see that before! you can't use latest:20 in a .tool-versions file or many other places This has always bugged me in asdf where I just want to say something like python:3.11.* where I don't care about the patch version number just that some 3.11 version is used.
- aitooltrek-com 2y agoHomebrew is always the first choice to me. I am mainly with JS tech stack for years and play around Python from time to time - My set up in my machine is iterm2 + Oh-My-Zsh(theme) + plugins(e.g. autoJump & zsh Autosuggestions). I cant live without Autosuggestions in my terminal.
- wishpal 2y agoHomebrew primarily.
- SirensOfTitan 2y agoI use nix darwin, which can wrap homebrew for a gradual migration over. Homebrew is ridiculously slow in my experience, and nix is quite easy when you stay on the happy path—and when you fall off of it homebrew is unlikely to help you anyway.
- nidnogg 2y agoI've seen some people using asdf + direnv. Is there a vanilla way to go about it with asdf AND direnv sourced from brew, or is the mostly used route the asdf-direnv plugin [1]? Seems to be slightly unmaintained, few stars and last commit 9 months ago [1] - https://github.com/asdf-community/asdf-direnv https://github.com/asdf-community/asdf-direnv
- faizmokh 2y agoI'm already accustomed to Homebrew and I don't think it's something that I have to fiddle with. It just works. I use asdf for managing versions. Was using nvm, rbenv, etc previously.