Just run Arch in a VM on the mac, using Apple's virtualization framework [1]. (No need for other wrappers; the framework is often easier to use directly.) I find no significant performance issues; a lot of software actually runs faster in a Linux VM than when I compile and run it on the mac.
The limitations are that the Linux VM's don't support save/restore of state (i.e., you have to shut down to stop the VM) and the graphics and device support is limited.
You might get more performance if you compile your own Arch distribution with all the flags necessary to enjoy modern CPU features in M-series (particularly M4+ with SME extensions). With M4-Pro memory should run 273GB/second for JAX and PyTorch.
However, AFAICT, PyTorch supports vectorization on Apple silicon by delegating to Apple's Metal API's, and that wouldn't be available from the Linux VM, so you might prefer running those on macOS directly.
To me the biggest draw of the M4 processor is that it supports CPU tracing (at least for Xcode-run code): actual, direct (not sampled) data about CPU internals like branching, cache misses, etc. If you're into performance, this will take you from working with a black box to seeing exactly what's up.
[1] https://developer.apple.com/documentation/Virtualization/run...
Alpine is a musl research/hobby distro at best.
If you want an app, then pick an app that uses that API.
Me: Please install software A.
Homebrew: In order to install it I will also install 20 libraries (some need to be built from source), update openssl, update Python and wreck all virtual environments. Also since its been a while I decided it must be time to upgrade your other unrelated packages. Enjoy!
Its doing so much hand-holding and extra stuff, it cant be really considered “pro” at all.
What bothers me the most is when they immediately remove packages because they get EOL’ed, but in the real world it doesn’t work like this.
I still have projects that use old PHP versions for example and brew just refuses to install these since they have been deprecated.
So then you have to use some finicky workaroud and download these old versions off of some repo/cask that will also probably go away at some point.
When you install Homebrew you are literally granting access to virtually anyone remote access to your laptop.
Any security leaders in an org that allow Homebrew on workstations used for anything remotely sensitive should be fired.
I have been restricted from disallowing it at some orgs, which is my cue to leave before a major supply chain attack is blamed on me.
1. If you do Python development, use “uv” or any other Python interpreter-management tool which uses precompiled Python installations from a reputable source. This removes the pain of sorting out compile dependencies for Python itself, as well as solving the “unrelated brew install command trashed all my Python virtualenvs” issue. Whether you use uv or some other Python-version-manager, I hope we can all agree that Brew-managed Python for development, as well as pyenv-compiled Python, are just garbage. As a bonus, “uv” gives you decent reproducibility on a lot of other platforms, if you ever want to develop or share your software to someone on a different version of MacOS or a different OS.
2. ‘export HOMEBREW_NO_AUTO_UPDATE=1’ in all your profiles to turn off the automatic updating of unrelated dependencies. That feature is so stupid. Yes, even given security issues and changing system deps.
3. Keep MacOS updated to current minus one point version, and make sure to fully uninstall/reinstall XCode/XCode CLT every time you update MacOS, and then check “brew doctor” every time you do. I’ve had far too many “brew decides to build from source” situations that boil down to Homebrew detecting my OS or build chain as not up to date with the last 6 months of MacOS updates, or lacking prebuilt artifacts for a very recently-released version.
None of this is a defense or indictment of Homebrew itself. I’m not commenting on whether or not this should be necessary (lord knows I’ve updated into plenty of MacOS misfeature releases just to get Homebrew working again). These are just relatively easy steps that allowed me to forget Homebrew build/install issues entirely.
If I want a specific version of something I don’t mind using a specific version manager (eg. asdf or mise)
But for me, the long term momentum of new platforms as they release doesn't matter - what IS supported is excellent (including the brilliant GPU driver).
My Mac Studio M1 Ultra runs Fedora Asahi Remix perfectly with full support and is exactly what I need. So those who are looking for a fast Apple Silicon system that can run Linux natively will save $$ and buy a used M1/M2 from Apple or otherwise.
Unfortunately, a lot of this effort seems stalled by some of the Linux kernel developers' hostility towards Rust, which also prompted Hector Martin (marcan42) to leave the project.
Now at the current rate, Apple is still moving backwards faster than the FOSS community is moving forward. I actually miss macOS 10.5 on PowerPC.
It's promising.
I still have to use macOS for mobile app development, but definitly want to use Linux on M2.
I'd disable that as one of the first things. Just autologin with no password.
For the thing running in the VM, not the host.
Homebrew user from day 1 it appeared. I have many many packages installed on multiple actively used systems and I have never had to deal with any kind of breakage.
What is this myth? Yeah yeah I am just one data point ...
And from what I can see, migrations are still causing issues. [0]
brew update && brew upgrade && brew autoremove && brew cleanup && brew doctor
Running this every few days and fixing everything that it explicitly complains about kept me issue-free for the last 10 years or so.Lately I'm running this like once every 2-3 weeks and it's still surprisingly nice to use. The problems only really manifest when you never run this "maintenance" snippet and only use the `brew install`, which will attempt to do the housekeeping stuff when you want/expect it the least.
Whenever this kind of discussion comes up around these parts, you can bet on there being a bunch of people complaining about Brew, but Macports basically never comes up.
So I have to wonder: why does everyone use Brew? Does it have features or other advantages which Macports doesn't? Is macports no longer a thing (I've stopping using macs around 2021)? This reminds me of people complaining about what a crappy experience Windows is, but never even contemplating moving to something else.
Macports comes up all the time, just like you've mentioned it here. It has a few user friendly benefits (no sudo, more up-to-date apps, better gui clients, slightly easier to add custom package, etc), but in general hard to say exactly why one app wins
https://news.ycombinator.com/item?id=44621441
Also, I can never internalize its nomenclature: formula, cask, tap, bottle… makes no sense to me.
By sticking to this I’m able to avoid Homebrew’s mess and Nix’s complexity. I use mise (https://mise.jdx.dev/) to manage the binaries and languages I have on my machine. It handles installing multiple versions and is directory-aware.
In the long run, hardware is cheaper than your time.
(I am a longtime Mac user, but I recently got a ThinkPad T14 Gen 5 and all the hardware works out-of-the-box and very well on Linux.)
I have used Arch in a couple of personal laptops during a handful of years and macOS at job for the last year. I love using Arch, even though it is sometimes painful qua drivers and issues with non-essential hardware. In macOS I don’t recall having issues with homebrew, however I am more familiar with pacman on Arch and therefore prefer it. Before starting to use it, I set up alacritty on macOS building it from source.
The Framework has given me a bewildering litany of issues over the years, and I now just want something solid, light, and reasonable battery life, so just I threw down for an M4 Air today.
Having used Linux exclusively for 25 years and an unaBashed CLI junkie, I'm a bit nervous about workflow friction.
How does experience with nixos-darwin compare against just VMing on top of MacOS?
Also, is there any reason for mucking about with Apple's bootloader etc?
Kinda depends what you want. Both work. With Nix Darwin you’ll sometimes run into packages that aren’t compatible with your system. It’s not an ND problem really - some software was just never built for Mac.
Running a VM works great too. I’m a big fan of Orbstack as it’s fairly transparent with the system. It’s nice to hop inside a real Linux box but feel like you’re working ON the actual system. You’ll take a battery hit compared to on-metal as macOS puts VMs on P-cores, but it’s not that bad.
When something costs 3 times as much, it should be better. It's a bit like comparing an entry level Ford to an S class Mercedes.
I think the best "feature" of Apple computers is that it prevents cheapskates from making bad choices they will regret.
In my family, they use iPhones and I'm glad for it because if they would use Androids, they would just buy the cheapest garbage they could find and the experience would be miserable. It's funny how a corporation greed is actually useful to prevent some people being fucked by their own greed (stinginess is a form of reverse greed, particularly true when you actually have money).
In my experience when you only compare on build quality of laptops there’s nothing that’s on the level of current MacBooks.
For $1k in the WinTel world you're lucky to get 1920x1200, or even worse, 16:9 1920x1080 as the standard. I switched to Mac the day the M1 came out, and haven't looked back despite how much I miss Linux. macOS grew on me, and I can't stomach paying $3k+ for a machine that is still substandard to a $1k MacBook Air.
The only laptop that comes close is the new arm Surface Laptop 7, but - no Linux on that for now.
Highly recommend wezterm. That’s what enabled me to do this: https://cweagans.net/2023/09/application-specific-terminals/
You might also be interested in Hammerspoon! Lua-based customization and scripting of many macOS features.
I recently tried installing cachyos kernel on fedora I tried sched_ext with it (scx_lavd specifically) and to my suprise changing CPU scheduler resolved all UI stuttering for me (even dual 360hz + laptop screen on 3y old laptop with integrated intel gpu)
I occasionally use M1 apple mini and right now I can confidently say that now my Linux machine works smoother.
If you ever sit down to play with a native NixOS install, the difference in functionality is night-and-day.
I'd love to use NixOS itself, of course, but it's not a native option on this machine due to the missing M4 support in Asahi. For now, I'm trying to see how much package/configuration management discipline I can reclaim on macOS, and familiarize myself with Nix in the process.
I could have just used a set of Ansible scripts and Homebrew, but that didn't seem quite as interesting as trying Nix out.
I used to use a dot file manager (home grown and later yadm).
But once I got over the learning curve I much prefer using Nix.
My machines are now effectively immutable and I wipe them without worrying I will lose anything. Can still have machine or role specific configs (e.g. one of the Linux servers is my firewall, so it has no desktop environment or GUI apps).
Btw, you should Ghostty a try too. I was a long term Alacritty and WezTerm user, but Ghostty in 1.0 form already replaced everything I used those for, and has better native platform integration.
I use most of the same configuration on nixos too
Ummm... Homebrew has been around for at least a decade.
That's totally subjective. Windows takes the cake, since it ignores user agency when it wants. It's not your operating system. macOS is not as bad, but it does what Apple wants. If your use of computers fits within what Apple wants, then I suppose it's smooth sailing. Otherwise, there are endless distractions of fighting the OS to make it do what you want, and make it NOT do what you don't want it to do. Refreshingly, Linux is all yours. That power comes with responsibility, its greatest advantage and disadvantage.
Spoken as someone who's never seen random gaming ads in their OS