|
| 1 | +Title: The Wild World of Apple Silicon |
| 2 | +Date: 2021-03-06 10:33 |
| 3 | +Modified: 2021-03-06 10:33 |
| 4 | +Category: Posts |
| 5 | +tags: apple,m1,apple_silicon,applesilicon |
| 6 | +cover: static/imgs/m1small.jpg |
| 7 | +summary: A recap of my experience setting up my new M1-powered Macbook Air. |
| 8 | + |
| 9 | +I recently took the plunge and obtained a shiny new M1-powered Macbook Air. For |
| 10 | +those unfamiliar, last year Apple announced that they were now building |
| 11 | +machines with a brand new ARM-based architecture, making the switch from the |
| 12 | +long-lived x86 Intel architecture. This brought promises of amazing battery |
| 13 | +life, amazing performance, and terrifying compatibility issues. Now that |
| 14 | +I've been living with this machine for a week or two, I thought I'd recap |
| 15 | +my experience both setting it up, any gotchas or surprises along the way, |
| 16 | +as well as my experiences around how well the new architecture works as |
| 17 | +experienced through the lens of a developer. |
| 18 | + |
| 19 | +## Lesson 1: Rosetta Works, But Sucks Battery Like You Wouldn't Believe |
| 20 | + |
| 21 | +Everything I've run through Rosetta has been flawless from a functionality |
| 22 | +perspective. Having said that though: anything run through Rosetta does seem to |
| 23 | +suck battery life. And not just apps that are normally CPU intensive. For |
| 24 | +example: I found that having Dropbox (which doesn't support M1), Itsycal, and |
| 25 | +Spectacle constantly running in my menu bar all seemed to have a significant |
| 26 | +drain on battery life. I've since switched from |
| 27 | +Dropbox to [Sync](https://www.sync.com/), from Spectacle to |
| 28 | +[Rectangle](https://rectangleapp.com/), and have uninstalled Itsycal as |
| 29 | +I still haven't found an M1-powered replacement. |
| 30 | + |
| 31 | +## Lesson 2: Which Apps Are M1 Ready is Really Random |
| 32 | + |
| 33 | +So of these, which would you expect are M1 ready right now? |
| 34 | + |
| 35 | +* Slack |
| 36 | +* Chrome |
| 37 | +* Firefox |
| 38 | +* Visual Studio Code |
| 39 | +* Sublime Text |
| 40 | +* Dropbox |
| 41 | +* Docker |
| 42 | + |
| 43 | +If you answered the first three, then kudos to you, though until very recently |
| 44 | +(ie within the last week or so) VS Code only had M1 support via Insiders. It |
| 45 | +looks like |
| 46 | +[Sublime Text 3 will *never* support M1](https://forum.sublimetext.com/t/apple-silicon-native-build/54775) |
| 47 | +and ST4 is still a long ways off, which for a paid product used by *a lot* of |
| 48 | +Mac users is truly mind-blowing to me. The fact that Dropbox still doesn't have |
| 49 | +M1 support is just inexcusable at this point (particularly given it's an "always |
| 50 | +running" app). Docker has a preview version that's been out for some time, but |
| 51 | +full support still seems like a long ways off. Side note: I haven't tried the |
| 52 | +preview version, and I don't plan on it as there's been mixed reports on how |
| 53 | +stable it is ( |
| 54 | +[a positive take](https://blog.earthly.dev/using-apple-silicon-m1-as-a-cloud-engineer-two-months-in/) |
| 55 | +and |
| 56 | +[a negative take](https://twitter.com/mkennedy/status/1360318443661107210) |
| 57 | +). |
| 58 | + |
| 59 | +## Lesson 3: Homebrew is Ready, but Your Obscure Package Might Not Be |
| 60 | + |
| 61 | +With Homebrew 3.0, the popular package manager is now M1-ready. I can happily |
| 62 | +report that the vast majority of packages I use are M1-native. I installed |
| 63 | +`python3`, `git`, `git-extras`, `bash-completion`, `pyenv`, `pipx`, `starship`, |
| 64 | +`the_silver_searcher`, `hugo`, `watch` and a bunch of others without |
| 65 | +issue, and all seem to be M1 as reported in Activity Monitor. |
| 66 | + |
| 67 | +So what happens when something isn't? |
| 68 | + |
| 69 | +```shell |
| 70 | +$ brew install hadolint |
| 71 | + |
| 72 | +Updating Homebrew... |
| 73 | +==> Auto-updated Homebrew! |
| 74 | +Updated 1 tap (homebrew/core). |
| 75 | +==> New Formulae |
| 76 | +bas55 delve geph4 kotlin-language-server latino libpipeline openmodelica oras sqlancer |
| 77 | +==> Updated Formulae |
| 78 | +Updated 267 formulae. |
| 79 | + |
| 80 | +Error: hadolint: no bottle available! |
| 81 | +You can try to install from source with: |
| 82 | + brew install --build-from-source hadolint |
| 83 | +Please note building from source is unsupported. You will encounter build |
| 84 | +failures with some formulae. If you experience any issues please create pull |
| 85 | +requests instead of asking for help on Homebrew's GitHub, Twitter or any other |
| 86 | +official channels. |
| 87 | +``` |
| 88 | +
|
| 89 | +I asked [about this on Github](https://github.com/Homebrew/brew/issues/10744) |
| 90 | +and since `hadolint` is built with `ghc` and `ghc` isn't M1 ready (and likely |
| 91 | +won't be for some time) you either live without the package, install a separate |
| 92 | +Rosetta-based brew installation, or obtain the package from some other means |
| 93 | +(in the case of `hadolint` this is what I did: there are |
| 94 | +[self-contained binaries on their Github](https://github.com/hadolint/hadolint/releases/tag/v1.23.0), |
| 95 | +so I |
| 96 | +[threw the latest in my path](https://github.com/hadolint/hadolint/issues/558)) |
| 97 | +
|
| 98 | +One pro-tip: this site is awesome for seeing if a package you're interested in |
| 99 | +is M1-ready or not: <https://doesitarm.com/kind/homebrew/> |
| 100 | + |
| 101 | +## Lesson 4: Homebrew Is Different Now |
| 102 | + |
| 103 | +One minor gotcha I ran into is that Brew installs to a different directory: |
| 104 | +`/opt/homebrew`. If you have scripts (think things like `.bashrc` & the like) |
| 105 | +that reference the old brew path they'll have to be tweaked. |
| 106 | +
|
| 107 | +## Lesson 5: Instant On is Amazing |
| 108 | +
|
| 109 | +This is a minor thing, and honestly I didn't think I'd like it as much as |
| 110 | +I do, but M1 Macbooks feature an "instant on" wake up from sleep. And it |
| 111 | +truly is "instant". Ie before I've completely opened the lid of my MBA |
| 112 | +the screen is already on and awaiting input. This even happens when I have |
| 113 | +an external display connected. Contrast this with my Intel-based Macbook |
| 114 | +Pro for work which takes a good 30 seconds to resume from sleep (often |
| 115 | +longer if I have external displays connected). |
| 116 | + |
| 117 | +Surprisingly this meant I didn't bother installing |
| 118 | +[Amphetamine](https://apps.apple.com/us/app/amphetamine/id937984704?mt=12) |
| 119 | +on this machine since there's no point -- I don't care if my M1 Mac falls |
| 120 | +asleep as it wakes up so damn fast. |
| 121 | +
|
| 122 | +## Lesson 6: Big Sur Is Less Good |
| 123 | +
|
| 124 | +This is less dev-orientated, but I really don't like Big Sur. The new |
| 125 | +Notification Center is annoying and just wastes space on my menubar. |
| 126 | +Toast notifications look much bigger on screen (so are more jarring). |
| 127 | +Lots of little annoyances with it, none of which are dealbreaking, but |
| 128 | +if I had my way I'd have Catalina instead of Big Sur on this machine |
| 129 | +(alas, not an option). |
| 130 | +
|
| 131 | +## In Summary |
| 132 | +
|
| 133 | +This machine is awesome. It's expensive (as all Macs are), but is crazy |
| 134 | +fast, and (once you get rid of all your Intel apps) sips battery very |
| 135 | +lightly. |
| 136 | + |
| 137 | +Docker is really the only thing that I miss at this point from turning this |
| 138 | +into a real dev machine. Hopefully full M1 support will arrive for that |
| 139 | +though I can't help but wonder if Docker will ever be completely compatible |
| 140 | +(if you build a Docker image on M1, can you run that image on an Intel |
| 141 | +based machine?) |
0 commit comments