← Back to context

Comment by baq

2 months ago

> MacOS has it's rough-edges, but it has become a pleasure to code on.

I don’t know what kind of projects are you working on, but it couldn’t be further from truth for me. WSL2 is so much better than docker on macOS it isn’t even funny. (Haven’t tried orbstack, heard good things; though fundamentally the problem of developing for linux on not-Linux can only be solved by actually running Linux.)

> (Haven’t tried orbstack, heard good things; though fundamentally the problem of developing for linux on not-Linux can only be solved by actually running Linux.)

I really wish we could get back to true platform-agnostic development and away from shipping whole Linux-jungles containing the banana you actually want to ship. Effective hard-coupling isn’t a good thing isn’t my opinion, even when the platform being coupled to is FOSS.

  • Agreed. Instead of solving "It runs on my machine" we just decided to ship the machine as part of the app and call it a day.

Even without WSL, PowerShell is perfectly capable. I find that lots of people just rag about windows because it’s not unix and they’re trying to force it to be.

Docker on macOS also runs a Linux VM under the hood, just like WSL2 does, they're no different in that respect. WSL1 used the more exotic approach of translating Linux system calls to and from NT kernel system calls, but for various reasons (compatibility, performance, complexity) Microsoft abandoned that technique and adopted a Linux VM running under the Hyper-V hypervisor for WSL2.

  • There is a difference in Hyper-V itself. The Windows hypervisor is underappreciated as one of the better VM hypervisors in some scenarios, and WSL2 uses a few Hyper-V tricks [0] to really shine if your machine's Hyper-V isn't interfered with by other hypervisors. (Sadly not uncommon given how many us have things like old VirtualBox VMs that still need Hyper-V to run in a compatibility mode with Oracle-maintained hypervisors of the past.)

    (Also, WSL1 isn't as actively maintained as it was when WSA [Windows Subsystem for Android] was an active Windows 11 feature driving it, but it hasn't been entirely abandoned either and there is some community support ongoing [open source PRs].)

    [0] Among other things, Windows likes to run itself at all times as a guest in Hyper-V when Hyper-V is active (and other ancient hypervisors aren't interfering), making Hyper-V VMs like WSL2 "peers" with Windows itself for Hyper-V resources/attention. (It's one of the funnier things about Hyper-V being a "Pro" feature still today because even consumer-focused Windows Home is often still running in Hyper-V [because it's also sometimes a defense-in-depth security/sandboxing in some consumer use cases], it just won't let you configure other VMs in it than your main Windows OS.)

    • I agree, Hyper-V is a pretty cool technology! I wasn't aware WSL1 was still supported at all, let alone receiving pull requests. Windows Subsystem for Android was a neat feature, but not something I used regularly, especially since it lacked Google Play Services which made many popular apps fail to function on it.

      1 reply →

My experience w/ WSL2 and Docker Desktop has been roughly equivalent: both a little fussy, but work just fine. What was it about either one that led you to such a strong preference?

  • Orbstack on MacOS

    Had to onboard a Windows user the other day and the Docker performance seems to be even worse than I remember the last time I built on Windows.

    Orbstack really makes working with Containers a almost-native experience.