macOS Subsystem for Linux
github.com
github.com
That README shows a great deal of appreciation for other people’s time, which should be commended.
/Old man yells at clouds
Provided, of course, they don't use the github wiki stuff or use separate repos for documentation.
In addition to the fact that folks can submit a PR (or fork) to update the instructions if something goes out of date.
The great thing for me about WSL (and why IMHO it was worth all the effort they put into it), is that because the kernel process tree is running as a native Windows process tree, I don’t have to pre-allocate memory ahead of time.
This is murder on Apple’s RAM-restricted laptops, and kind of rubbish on machines with massive RAM too. Most of the time, most of your memory goes unused. The base model Airs/Pros for example need to have 25-50% of your RAM locked away just to run a Linux container at all - when you already have a fairly anaemic 8GB to begin with that’s pretty dire.
Not that I think it's a bad decision, but I wish they somehow managed to break Conway's Law and enhance Windows itself by fixing the file system speed issues as well as somehow making NT/Windows processes fork instantaneously just like on Linux :)
No, the most important reason to choose a VM instead of a reimplementation of the Linux ABI is long tail compatibility. You can’t realistically replicate and then keep up with every corner of the Linux kernel’s interface. And so with WSL1, software will randomly not work, or it will randomly break after an apt upgrade, and users will get frustrated and switch to a VM anyway. Might as well get perfect compatibility and still have nice integration with Windows via the WSL2 approach.
However, with WSL1, implementing the Linux ABI was such a wicked flex.
How's that any different than running a virtual machine on your Mac with a real Linux in it?
Doing things with something like Vagrant on Mac sometimes cuts it, sometimes doesn't. Either way, if I'm not shelling out money I could be stuck using a subpar solution like VirtualBox.
Didn't Linus famously say they'll "never break userspace"?
At another point, glibc started depending on more precise behavior of CLONE_VFORK, which we originally didn’t implement fully. So essentially all of user space was broken. We fixed it as soon as we could, but I think glibc may have added a workaround, too. I feel bad that the community had to work around our bugs.
Also Linux is very fast. So it's not like there is a huge performance loss in most cases, I am guessing.
As far as we the public know, Google Cloud Run is based on gVisor, which emulates Linux system calls with userspace code. Seems to work great for the usual container workloads.
Things like dynamic memory allocation and release aren't some kind of black magic, but are something that is actually directly communicated by the guest VM.
This does need support in the guest VM, but I've only ever had issues with really old Linux distros.
Microsoft implemented a Firecracker style microVM (they call it "Krypton") for Hyper-V, which is used for WSL2, Edge Application Guard (run Edge in a VM), and Windows Sandbox. There aren't any real good docs on how to create one yourself using the Host Compute Service.
https://learn.microsoft.com/en-us/windows/security/threat-pr...
Also WSL2, if I recall correctly, has a relatively minimal base OS with a custom init binary.
I would say if you’re looking to use Host Compute Service, your best option would be to look at the way https://github.com/microsoft/hcsshim initializes containers.
Web dev here, ran with 16 up until recently… now at a whopping 24…
No memory pressure.
Assuming that they just don't get a cloud VM accessed via Citrix/RDP.
CoLinux did that years before WSL1 did. Sadly, the project is dead and AFAIK it never really worked on Windows 64-bit, only on 32-bit: https://en.wikipedia.org/wiki/Cooperative_Linux
What do Mac users get out of this? I thought most Linux things work reasonably well already
========================
> Q: Why the same naming scheme as WSL?
> A: It's a proof of concept name only. If I were to distribute this as a finished piece of software, which I probably won't (see why below) I would choose a different name.
> Q: Isn't this literally just a QEMU virtual machine? How simple is that!
> A: Yes, it is. And yes, it's simple. Why did I choose to put this on my Twitter, you ask? Because I couldn't find something exactly like what I did, and because before I posted it, I had 50 Twitter followers, total. I did not expect to get the over 700 likes that it did when I posted it; as a matter of fact, I would have been perfectly satisfied if it had gotten 7 likes.
> Q: What, you won't be distributing this as a finished piece of software!? Why?
> A: From what I can tell (and admittedly, I haven't tested this piece of software), it already exists. Lima seems to have a lot more features (such as file sharing, something that I have not implemented) and seems to be geared towards a different application (containers).
I sometimes code in assembly for fun (my professional work is mobile app developer, though). One of my favorite assemblers is FASM: https://flatassembler.net/
It's still written in 32-bit assembly, which means it won't run on any macOS since Catalina. On the other side, Linux still provide 32-bit compatibility mode.
Docker (and Kubernetes) are a prime example, but it's increasingly bothersome to work around dependencies on systemd, logind, etc. Linux software is starting to feel like Windows software: it's this special other thing that requires extra steps and care to run on your machine, and the user experience is far from smooth, if things work at all.
The primary factors are:
1. I, overall, like macOS and the Apple ecosystem. I heavily use Notes, my calendar, several apps I like to sync from my iPad and phone, etc. I'm pretty bought-in, and macOS helps me manage the non-developer stuff a lot easier, in my opinion.
2. Enough things have broken, over time, from macOS updates that my developer experience is subpar compared to a Linux OS.
3. A Linux VM gives me 100% reproducibility, so little delay that I would argue to say there is no delay, and I can reliably use the rest of my MacBook for all the other apps I care about.
It’s worked great, and I’ve never felt like it’s complicated.
Edit: Some people might mention Docker. I've run into just-enough networking issues with Docker that the full VM was worth running.
I know about Darling [1] but don't know about how practical it can be because I'm assuming all proprietary frameworks like the core web framework aren't implemented there.
1) https://github.com/lima-vm/lima 2) https://github.com/beringresearch/macpine
With a nice CLI included.
It is supported in Linux, Windows and osx. This means that you can have identical development environment across all your devices using a shared VM script
Either way is absurd, tbh, but here we are.
Multipass is a solid tool.
https://itdeepdive.com/2020/10/kubernetes-multi-node-cluster...
I thought it's something for running (some parts of) MacOS on Linux. Not the other way round.
Q: Why the same naming scheme as WSL?
A: It's a proof of concept name only.
If I were to distribute this as a finished piece of
software, which I probably won't (see why below) I would
choose a different name.Note that WSL2 isn't an NT subsystem, they're just using an actual kernel now. The name stuck though.
The naming thing kind of started with SFU though.
I am aware that running macOS on non-Apple hardwade would be against their ToS.
https://en.m.wikipedia.org/wiki/User-mode_Linux
See "Win32 environment subsystem" and "OS/2 environment subsystem" here:
https://en.m.wikipedia.org/wiki/Architecture_of_Windows_NT
Then there was coLinux: https://en.m.wikipedia.org/wiki/Cooperative_Linux
Maybe they should've called it LINE (after WINE)....
However WSL2 is just a heavily disguised Hyper-V virtual machine with lots of weirdness around it rather than a proper NT subsystem.
brew install vagrant packer terraform
Podman Desktop is Apache 2.0 open source; supports Win, Mac, Lin; supports Docker Desktop plugins; and has plugins for Podman, Docker, Lima, and CRC/OpenShift Local (k8s) https://github.com/containers/podman-desktop : brew install podman-desktop
/? vagrant Kubernetes MacOS https://www.google.com/search?q=vagrant+Kubernetes+macosYou get all that put together one time on one box and realize you could have scripted the whole thing, but you need bash 4+ or Python 3+ so it all depends on `brew` first: https://github.com/geerlingguy/ansible-for-kubernetes/blob/m...
The Ansible homebrew module can install and upgrade brew and install and upgrade packages with brew: https://docs.ansible.com/ansible/latest/collections/communit...
And then write tests for the development environment too, or only for container specs in production: https://github.com/geerlingguy/ansible-for-kubernetes/tree/m... :
brew install kind docker
type -a python3; python3 -m site
python3 -m pip install molecule ansible-test yamllint
# molecule converge; ssh -- hostname
molecule test
# molecule destroy
westurner/dotfiles/scripts/upgrade_mac.sh: https://github.com/westurner/dotfiles/blob/develop/scripts/u...> Mambaforge-pypy3 for Linux, OSX, Windows installs from conda-forge by default. (@condaforge builds packages with CI for you without having to install local xcode IIRC)
conda install -c conda-forge -y nodejs
mamba install -y nodejs
https://github.com/conda-forge/miniforge#mambaforge-pypy3You probably want Lima anyway
A: From what I can tell (and admittedly, I haven't tested this piece of software), it already exists. Lima seems to have a lot more features (such as file sharing, something that I have not implemented) and seems to be geared towards a different application (containers).
Not that I'm trying to discourage anything here, building things is cool.
It should be called Linux subsystem for macOS if they really need such kind of combination.
> Because we cannot name something leading with a trademark owned by someone else.
> It's pretty much the same reason why you can't launch a commercial product called "Apple <product-name>" unless you're Apple. Or "Adobe <product-name>" unless you're Adobe. Or ... well ... you get the idea ;)
[1] https://twitter.com/richturn_ms/status/1245481405947076610
Almost everything on Linux has a homebrew version available.
Perhaps it could be helpful for pure development needs. I guess.
“ Q: You're an idiot.
A: Very true, but that's not a question.
“I'm loosing hope for anything tech related these days, just bad and concerning
What this is, is Linux compatibility layer (running on MacOS). BSDs have (or used to have) such as well, at least FreeBSD used to.
[1] https://en.m.wikipedia.org/wiki/Windows_Services_for_UNIX