298 points · by cstrahan · 3y ago · 216 comments
Each time she acquires a new Mac, she embarks on a week-long odyssey to set up her computing environment from scratch. It's not because she enjoys it; rather, it's a necessity because the built-in migration assistant just doesn't cut it for her specialised needs.
While she currently wields the power of an M1 Max MacBook Pro and runs on the Monterey operating system, she tends to stick with the pre-installed OS for the lifespan of her hardware, which often spans several years. In her case, this could be another 2-3 years or even more before she retires the machine or hands it over to a postdoc or student.
But why does she avoid the annual OS upgrades? It's simple. About a decade ago, every OS update would wreak havoc on her meticulously set-up environment. Paths would break, software would malfunction, and libraries that used to reside in one place mysteriously migrated to another. The headache and disruptions were just not worth it.
She decided to call it quits on annual OS upgrades roughly 7-8 years ago. While I've suggested Docker as a potential solution, it still requires her to take on the role of administrator and caretaker, which, in her busy world of astrophysical research, can be quite the distraction.
When your partner builds her entire dev environment against a very specific version, packages etc. and then you expect it to just work next macOS Version? If you don't put any effort into using containers, vms or even just basic setup scripts then yeah this will not work out.
I've worked with a few physicists and they are scientists first and developers second. Which is okay, but will lead to janky setups that you cannot simply upgrade the OS under.
I want actual updates of my OS and don't want to be stuck forever on some specific version of openssh because some Astrophysicist decides to built her dev environment against it.
So either build a reproducible dev environment or don't complain that you cannot update without issues.
In the software world, it seems to be universally accepted that everything will change, all of the time, and one needs to keep up. If your dependencies break, it's your responsibility to update those too. Hence software "maintenance", which requires a lot of effort.
In my world, maintenance is not a concern. If I write a paper, then once it's done it's done. Academic papers, too, have dependencies: "By Theorem 3.4 of Jones and Smith [14], we can conclude that every quasiregular foozle is blahblah, and therefore..." You don't have to worry that Jones and Smith are going to rewrite their paper, change their definition of "quasiregular", or renumber everything.
Different cultures. Personally, I prefer my own.
The churn gets very tiring at one point and you begin to suspect that the people who impose it on you actually have no clue what they're doing and are taking the easy way out because they want to clock out for the week. Which I do understand but pretending that it's for the good of everyone is obviously bogus.
IMO all you scientist folks should work closely with a few programmers and sysadmins and have them author you tools to bring up and down various environments. It's easy and it's much more churn-proof than what we currently do.
I am still in the process of authoring a script to bring up my dev environment everywhere I go, I need to iron out a few kinks in the initial bootstrap (as in, OS and Linux-distro specific ways to install several critically important tools before installing everything else) and I'll just provision a few laptops at home and a VM in the cloud and be done with it.
It's annoying but ultimately a worth investment. Look into it and ask your dev friends.
> In the software world, it seems to be universally accepted that everything will change, all of the time, and one needs to keep up. If your dependencies break, it's your responsibility to update those too. Hence software "maintenance", which requires a lot of effort.
> In my world, maintenance is not a concern. If I write a paper, then once it's done it's done. Academic papers, too, have dependencies: "By Theorem 3.4 of Jones and Smith [14], we can conclude that every quasiregular foozle is blahblah, and therefore..." You don't have to worry that Jones and Smith are going to rewrite their paper, change their definition of "quasiregular", or renumber everything.
> Different cultures. Personally, I prefer my own.
Those are the problem with SW developers: they don't have a concept of a finished product and (some of them) never finish the product.
The problem is most people aren’t happy with stuff being the same way forever. They want new things and new updates, and that requires changes which in turn creates maintenance.
Software maintenance is less comparable to a single academic paper than it is to the entire field of academia. Sure Freud's papers are all exactly as they were when he published, but if you want to be in the field of psychology you’re going to have a bad time if that’s the most recent version of your academic “software stack”
Supremely unrealistic expectation anywhere else
If the software stack is reproducible, then you decouple that to the environment and hence upgrading the OS shouldn’t break it.
(That said it is very difficult to be 100% reproducible, eg your hardware can change from x64 to arm64… that’s why people are suggesting docker. I don’t like docker in the sense that it is a lazy approach to make things reproducible. But the guarantee there is very high.)
For science, not really - what use is the GP's partner's data if it cannot be reproduced?
I know, I know ... scientists go ahead and publish non-reproducible studies anyway, but it's widely acknowledged as bad science.
For scientists, containers seem to be a much more important than just about anything else, especially for publications, because reproducibility is at the core of the work being done.
What made you think the OP's post was a complaint? It seems reasonable to defer upgrades if you know they're going to break things and create a lot of extra admin work when you'd rather just be getting your job done.
I feel the same pain myself. Major macOS upgrades typically always break things, either in my dev environment or just by introducing bugs or breaking/removing/changing some random OS feature that I like using.
Its usually only Xcode which forces me to upgrade, since at some point in each release cycle Apple starts requiring the latest macOS for the latest Xcode, which in turn is required if you want to target/deploy to the latest iOS. If it wasn't for that I'd prefer to stick to one major version for 2-3 years.
It used to happen on Windows quite a bit, through now fault of Microsoft. People for one reason or another sometimes see to go out of their way to ensure that their software is tied entirely to one specific version of one operating system.
We dealt with a customer who could upgrade a server, required to use newer TLS versions, but their custom software was pretty much locked to Windows Server 2008. They couldn't even build the software on something newer. I quite honestly don't know how people keep ending up in that situation. I don't think they do it on purpose, but the way they insist on working just makes things work out that way.
This is fundamentally different from the nature of computer software, which can completely change in scope and function from one version to another and introduce changes that "break" something for no good reason as far as the user is concerned.
Imagine for a moment if you will: You use your screwdriver everyday, but one day the handle suddenly changes to something completely new and the shaft falls out because the handle uses a new way of fastening the shaft.
You are told by the manufacturer to come in and have it replaced with the newest model, or if they're not so gracious they tell you to come in and buy the newest model.
And for what reason? The screwdriver was working fine until yesterday. You hate this, because as just a simple user there's no good reason the screwdriver suddenly changed itself. Whether you get it replaced or buy a new one, you're wasting time and even money.
You then realize, one way or another, you can just tell your screwdriver that it cannot change without your assent. Ever. You want, perhaps need your screwdriver to work everyday, so you tell it to never change. The manufacturer keeps changing their screwdriver, but yours never changes and it keeps working.
One day though, the screwdriver finally breaks and you need a new one. So you go and buy a new screwdriver. Except it's completely different. And completely incompatible with the rest of your workshop, and all the tools inside which you likewise told to never change.
Why is the computer world so fucking shit?
I don't say you have to update, but in time security updates will no longer come for your version of macOS and in addition to that you will won't even get new features, like in the new macOS Version the openssh version is newer and now almost fully supports yubikey ssh keys stuff like that.
Yes I do. I couldn’t give a s how much security stuff or how many developer issues update solves, backwards compatibility is king. The older I get, the more I am about this. I have million things to take in my life, I’ve paid 3k for this thing and you expect me to sysadmin it on top?
Edit to add, if you or her want help with this, I wouldn’t mind helping, reach out to my username at gmail.
I use MacPorts, but be careful stating this. libc is unstable between major releases of Mac OS, and the recommendation from the MacPorts project itself is to reinstall *all* of your ports after an OS upgrade.[1] This is not a fun process if you don't delay updating until the build bots for the latest OS go online. Also note it is literally impossible to statically link libc in Mac OS applications.[2]
Realistically speaking, I think Nix is likely to be a better alternative to both MacPorts and Homebrew for setting up dev environments, since you will have a declarative file format rather than ad-hoc Tcl (or Ruby) scripts running a function for fetch, verify, configure, build, destroot, etc. The only reason I personally don't use Nix is because MacPorts has more or less just worked for me and I haven't had the motivation to learn how Nix really works.
[1] https://trac.macports.org/wiki/Migration
[2] https://developer.apple.com/library/archive/qa/qa1118/_index...
While it does do an excellent job of reproducibility if the inputs are the same, I’ve found it to be prone to be breaking if you switch to newer versions.
Part of the reason that it’s painful to use is because while it’s marketed as “declarative”, in actuality it’s functional, which results in a lot of convoluted syntax to modify parameters for a package, which varies based on the language of the package.
There seems to be some awareness of the usability issues, but the changes have seemed both a step forward and backwards. For instance, you used to be able to use the “nix search” command to look up package names; now it’s gated behind some arcane syntax because it’s “experimental” and something to do with flakes. And flakes seems like it has the consequence of fragmenting the package repositories and making it impractical to improve the language.
I still have helper functions to wrap desktop applications that I had to set aside, because some upstream changes broke it and neither I nor anyone on the nix forums could figure out if there was even a way to include them in the “darwin” namespace with an overlay. My goal was to make it as easy as homebrew to add an app to nix’s repository.
Another evening I sat down to make a minor feature to a Python library and decided to use a nix environment. In theory, this should have been better than a virtualenv. In practice, there’s no in-tree support for specifying specific versions of Python libraries, and mach-nix had trouble with the dependencies, so I wound up just filing a bug report and gave up on the feature I was trying to implement.
On the plus side, NixOS finally has a graphic installer, but I don’t think that helps macOS.
I’m still hopeful that the community will decide to prioritize usability, but after spending an aggregate of months of time trying to get things to work and continually running into time-consuming roadblocks, it’s not something I would recommend lightly to someone who wants to be more productive.
Really? I thought Golang on macOS switched from direct syscalls to linking against libc, because the former is unstable but the latter is stable.
The Sonoma installer came out for MacPorts less than a week after the release IIRC. The migration is like 4-5 shell commands. One of them takes a while as everything recompiles but it’s not interactive.
NOTE: I briefly tried Gentoo Prefix, so I could use the same setup for both Linux and macOS, but that required quite a bit more time investment than I'm willing to deal with. I spent even less time trying out Nix, but the learning curve was steeper than I had the time for, so I gave up on it pretty quickly.
did you mean versioned? if you really meant vendored, could you elaborate?
I don't know about brew, but MacPorts wasn't ready when Sonoma came out. So that's a bit of a bummer for early adopter types, or folks that need to develop their own app against beta macOS and depend on ports for their setup.
Golang, where it is (or used to be) a common practice, even has special tooling for this, and dedicates the "vendor" directory to that.
After several years of perennial macOS environment hell (part of which was spent working in a much more research-oriented environment - e.g. lots of ancient HPC packages, etc.), I made the jump to just using Nix on macOS [0]. Takes a little bit of learning (realistically just a couple hours to get productive IME - just enough to get acquainted with nix-shell [1] and build some configs). After a few months, I had the thought to look at what I still used brew for and realized I could just move to Nix completely - and remove Brew. I back up all my nix configs to a git repo, just in case - and whenever I switch to a new machine, or "brick" my current one - I just reinstall nix, pull in my configs, and I'm good to go - takes 5 minutes (a conservative estimate tbh). The only caveat is to just check the community [2] before upgrading to the next macOS version to make sure any issues have been ironed out. In the early days of macOS support, it was a bit finnicky between updates - I haven't had any issues for the last couple years that weren't my fault (for example, booting into recovery mode and accidentally deleting the nix store APFS volume - even then, all I had to do was reinstall nix and pull my configs).
It is so nice to just "declare" I want to use and just...use it. Want to try out ripgrep for something? `nix-shell -p ripgrep` Not what you want? just exit the shell. Too much unused crap taking up space in your Nix store? `nix-collect-garbage`.
There's even darwin-nix [3] as a sort-of "nixos-for-macos" - I started using it recently, mostly for managing macOS settings declaratively, and it's great - but honestly 99% of the usefulness I get on macOS from Nix is just using the package manager!
[0] https://nixos.org/download#nix-install-macos [1] https://nix.dev/tutorials/first-steps/declarative-shell [2] https://nixos.org/community/ [3] https://github.com/LnL7/nix-darwin
Btw, I still use hombrew for some stuff I’m too lazy to create derivations, but I use nix-darwin homebrew module to also manage it with nix. The shitty part is that I must install homebrew. I think that can also be automated with a simple activation script, but I’m too lazy and it’s not something I do more than once on the machine.
https://determinate.systems/posts/nix-survival-mode-on-macos
- late adoption is a synonym to remain production ready. We used to have a badge in the internal system of Amazon called late adopter because most of the staff who run the amzn infra did not want to upgrade anything unless there was a must (mostly security fixes)
- setting up such environments by hand is a time wasting error prone excercise. Automation is a must. I keep an Ansible repo only for the environment I need to maintain.
- using MacOS for Fortran, Matlab etc might not be the most efficient. For problematic software I usually run a virtualized Linux instance that can be snapshotted and transferred to other devices so it is super easy to replicate a complicated environment
- Docker might not cut it, we live in an era when a fully virtualized instance boots up in 3 seconds on a M1 Mac so you might as well just use a full OS instead of a container
Btw. it is a shame that software development is like this. The lack of 1.0 mindset and the continuous "improvements" that are quite often regressions and UX degradations are really annoying and mostly unnecessary. There are tiny improvements between the last 3 major OS versions from Apple.
I could not care less about new notifications (that I immediately disable after installing the new MacOS) and such features and I care deeply about being able to run my usual tools as they were running in the previous version.
This sounds like FUD to me, but then again you can't use docker with out a VM on OSX any way.
We are now in an age that I call "Abusability": How much can we insult and mistreat the customer with our unfriendly software? ^_^
> I've suggested Docker as a potential solution
I recommend Podman instead because it is compatible with Docker containers but does not require root privilege.[1]
> it still requires her to take on the role of administrator and caretaker, which, in her busy world of astrophysical research, can be quite the distraction
. . . And yet
> she embarks on a week-long odyssey to set up her computing environment from scratch
She is already a sysadmin. But multiply the number of machines to maintain by a factor of 1000 for an initial model of a sysadmin's real workload.
= = =
[1] _ https://podman.io/
I’ve relegated my Mac usage to simple web browsing and stuff like that.
I am on a Mac, but my work is done on a Mint.
I’m curious what doesn’t work for her.
Gnome is relatively stable but not foolproof, there are strange behaviors like file picker previews not working. There are services running in the background that do who knows what. I have built a custom distribution using build root, I will be attempting to use that as my daily driver.
Ansible is fairly quick to learn, and can control homebrew so it's able to install a lot of stuff.
If you're interested, ping me and I can share some snippets. Also I bet you'll get a reply from someone evangelizing Nix ;)
EDIT: Oh, and git repo with dot files is very useful. As is homebrew bundle, which installs a list generated from a different host.
EDIT 2: oh also I just moved MacBooks last week, so a lot of this fresh in my head right now. Including cargo/rust, VSCode profiles, brew bundle, ublock origin config, backups of .envrc files, etc etc ad infinitum. My Emacs config was actually about the easiest bit to move!
https://www.reddit.com/r/russian/comments/32x2ml/what_does_м...
She could use a bash or zsh script, with instructions to get the apps she wants. Brew allows installing most open source apps + MAS apps you've bought + third party proprietary apps. E.g.:
brew install --cask alfred
brew install --cask google-chrome
(She could save those in a brew dump file from the earlier machine too and re-play it).then she could hookup up some external disk (or use some cloud storage) and sync any settings files she has customized (.zshrc, and so on) and rsync any stuff, build some folder structure she has, etc, and copy over settings for third party apps.
With "defaults write" commands she can then set a lof of Mac preferences that she'd normally have to change on the Settings page or individual Apple apps, e.g.:
defaults write com.apple.finder QuitMenuItem -bool true
A new system would just need some small time to run the script to get to taste. I've been using that for years and it works great.For reproducible stuff I use docker, vms, etc with pinned versions. And for sciency stuff she'll be having something similar, or at least conda and such.
that would have been a nightmare
Also Apple did give an OS release or two warning I think.
She should really just switch to GNU/Linux, though. So much easier.
when I've told people that, what I hear is "you're not supposed to update the OS on a Mac, stick with the one it shipped with and never make the major OS update as those are for newer hardware".
to me that seems illogical, wrong, worse than Windows... and yet as an observer to comments like the parent and seeing colleagues get bitten by issues, it appears to be true... the happy path with Mac OS is to never upgrade the major version
Disclaimer: I'm running a rolling-release distro (Void) since 2016, and has gone through 5 machines with it, usually with near-zero setup after a move.
Just shows how different people are in their approaches to dependencies... I can't imagine working like that, the idea that everything I'm using could break at any moment. I'd rather deal with those (possibly larger in number at one time) set of changes at fixed upgrade intervals, in exchange for having a stable system.
I suspect it’s because they actually don’t know _what_ will break with what they change.
Most of the time people just don’t replicate work, full stop. In the rare instances that they do, replicating the analysis from scratch is the whole point. Running the same script and getting the same result is not interesting.
I realize Nix is also an option but the user land version is much more rudimentary than NixOS' - which already requires expert level knowledge of the package management for everyday chores.
It is fair from the user to expect some stability here.
I've done scientific work on a mac, and it was fine, now I am doing SWE work on a mac and it is fine, too. Such fragile setups would not survive most linux distro updates, the only advantage is that you could find a distro with a very low rate of innovation and thus a very long support window and call it day. But it is, obviously, not a viable choice for apple.
It's not obvious to me. Apple used to release 1 version of MacOS every 1.5-2.5 years[1]. Now it releases 1 every 11 months. And it's not like the recent versions have some groundbreaking innovations in them. Nobody cares about MacOS upgrades outside of worrying about breakage, or getting a recent enough XCode to target newer iPhones.
[1]: <https://en.wikipedia.org/wiki/MacOS_version_history#Releases>
That's not a great idea security-wise. Apple has formally committed to only updating the latest major version for security fixes. Of course, they have backported some fixes, but even in early 2023 those backports were highly delayed and incomplete.
If you're talking 7-8 years (and the hardware is certainly good for that long) of still using the OS as shipped, I feel like that is a mistake. The most painful updates are when they do the very large refactors, like Mojave->Catalina, then Catalina->Bug Sir. I am guessing whatever comes after Sonoma will be a biggie also.
I am still on Catalina for my media server. I don't dare update it. But it's not connected to Internet.
Unfortunately, a computer that doesn't do whatever you need it to do is useless, regardless of how "secure" it is.
I personally like (older, 2010-2015) Apple hardware because it's sturdy, looks pretty nice, generally holds up over time, their touchpads and keyboards are the best I've found on laptops, shopping for new-to-me hardware is easy (and cheap) because of the limited model range and everymac.com, etc. Unfortunately the repairability went down for a good while, and build quality took a nosedive with the butterfly keyboards etc. The Apple Silicon machines seem nice, but there's even less upgrade possibilities than my 2014 MacBook Air, that at least has replaceable storage. How well they will hold up over time (decade-plus) is unknown still.
Catalina is about the newest OS any of my Macs will run. Still using Mojave, however, since I want to keep using my old paid-for (no scammy SaaS, which neither want or can afford) copy of Adobe CS3, which needs Carbon. Even by Mojave, it seems to me Apple had been locking the OS down and nerfing the Unix features way past the point of diminishing returns and into decline. It seems to only have gotten way worse since then.
So all in all, living with an "insecure" operating system seems like the lesser evil. I use an up to date browser (although it's only a matter of time before those are no longer available, I guess), browse from behind a Firewall + NAT if possible, make regular backups and keep an eye out for suspicious looking processes or ones using a lot of CPU or battery. The risks/drawbacks honestly seem pretty theoretical compared to the very practical drawbacks of trying to stay current. And I'm not even counting the monetary outlay of trying to stay current.
"Bug Sir" is such a great typo.
edit: Forgot that in addition to Adobe CS3 I also have a copy of MS Office 2011, that I found boxed at a flea market for the price of one month of o365 or something.
Was that intentional or freudian?
I have my entire Mac setup in a single set of declarative files, including custom compile of Emacs ans all of my config.
It takes maybe 20 minutes to have a new Mac up and running. 10 if on fast internet.
GNU coreutils deviate from POSIX in a number of instances.
GNU coreutils are also verbose and potentially overengineered. Compare GNU ls.c (4726 LOC) to FreeBSD ls.c (1030 LOC), for example. Even if you include the other BSD source files used in ls, the FreeBSD version is still half the size of the GNU version. GNU grep is over 3000 LOC, whereas the FreeBSD version is 724.
GNU and Linux won. The only BSD environment is macOS, and if you put GNU on macOS, then the only thing I can think of that's worth a mention is alpine and busybox containers, but at that point it feels like we're just grasping at straws.
Where are you getting that number from? Because I have a bit over 1,500 lines in usr.bin/grep (code only, excluding comments and blanks) vs. 3,900 for GNU grep.
Also you can't compile bsdgrep with just POSIX libc (such as musl) since it relies on some extensions (specifically: REG_STARTEND). So if you're looking for POSIX_ME_HARDER then bsdgrep isn't actually the right place.
If anyone is curious, this is the resulting Perl oneliner:
perl -WE 'printf ("COMMAND;DESCRIPTION;USAGE\n");while (my $line = <>) { $line =~ /^(.*):\s#\s(.*)\[Usage\s`(.\*)`]/ && printf("$1;$2;$3\n")};' Makefile | column -c "3" -s ";" -t that lower-cased LANG is invalid on macOS, so the system will silently default to LANG=C
Oh my!The consumer facing site shows consumer facing features. Hence why you’d see things like screensavers and video effects highlighted.
The developer side features are documented on videos released at WWDC each year. https://developer.apple.com/news/?id=cj1fjit2
Or summarized in the Platform State of the Union https://developer.apple.com/news/?id=gxtoci7w
What exactly broke for you in the last three updates?
I have no idea what the problem was, but it eventually sorted itself out after that (not before I was ready to wipe it all and start again, despite how uninterested I was in doing that). Search engines and GPT didn’t give me much - Spotlight reindexing was everyone’s best guess, but I saw no evidence of this.
The fact that I’d transitioned to putting all my dev work into iCloud didn’t help - I moved out of that pretty shortly after, iCloud really doesn’t like files changing that often.
The UX on macOS is still my favourite across all the OSs I’ve used for personal use. But when it stops working … it’s impossible to figure out why and impossible to do anything about it except wait and hope, or start over.
Right now I'm staring at the calendar daemon. Spending 70-80% CPU syncing a calendar that hasn't been in use for a few years. If I had screwed up that badly I'd be embarrassed and keen to ship a fixed version pronto. Apple doesn't seem to give a shit about software quality.
The real news is that people who work at apple don’t use grep.
(Or persistent ssh connections…)
(Or multiple monitors…)
% type grep
grep is /usr/bin/grep
% echo -n "a" | /usr/bin/grep -o 'b*'
Assertion failed: (advance > 0), function procline, file util.c, line 732.
zsh: done echo -n "a" |
zsh: abort /usr/bin/grep -o 'b*'
Your alias is not part of the macOS default.It appears I missed the -o; without it, my alias asserts, but unaliased doesn't. With the -o they both assert. Still not what I was expecting, but the failure to cleanly replicate it is mine.
You have to use the legacy flag!