Readit News logoReadit News
Hackbraten · 3 years ago
Because we’re not saying it often enough: Kudos to the author for going out of their way and writing meticulously detailed step-by-step instructions.

That README shows a great deal of appreciation for other people’s time, which should be commended.

darkwater · 3 years ago
Once upon a time these were usually posts on one own blog (self-hosted or not), started with a HOWTO keyword and helped the people just in the same way. Nowadays everything developer must be on GitHub or it won't ever be noticed.

/Old man yells at clouds

zymhan · 3 years ago
There's probably something to be said for the easy of editing a markdown file and pushing it to github, versus using some crummy blog platform.

In addition to the fact that folks can submit a PR (or fork) to update the instructions if something goes out of date.

lazyier · 3 years ago
It is an improvement. Having documentation include with source code means that they can updated together and is less likely to be out of date.

Provided, of course, they don't use the github wiki stuff or use separate repos for documentation.

martinflack · 3 years ago
I read "This is an S, the letter, not a 5." and smiled... aaahhh, someone who's been deep in the trenches. ;-)
robohoe · 3 years ago
I personally like these detailed step by step readmes. It’s helpful for someone clueless dropping in to get quickly started and develop a working prototype. Too many times you’re left to your own devices when setting up dependencies. I totally understand if you’re expected to do some homework. On another hand, it certainly helps to gently guide the reader versus give them a high level request to install this or that.
highwaylights · 3 years ago
The problem with each of these tools (Lima etc.) is that it’s still fundamentally a virtual machine under the covers.

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.

augustl · 3 years ago
It's a shame they essentially deprecated WSL1 and is doing everything in WSL2 now, where exactly this kind of memory allocation and the performance issues that entails is an issue.

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 :)

jstarks · 3 years ago
We work very closely across the file system, kernel, and virtualization teams, so I don’t think we can blame Conway’s Law for WSL2. And actually our WSL1 fork performance wasn’t too bad IIRC—we have real fork at the Windows kernel level, it’s just not something that can realistically work with the Win32 programming model. I also think we will eventually resolve the file system performance issues.

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.

baq · 3 years ago
Their explanation was that Windows could not be enhanced but rather should be slimmed down - the APIs that the NT kernel provides can't be efficiently worked around without breaking all kinds of already existing Windows software.
donatj · 3 years ago
The other commenter alluded to this but didn’t say it outright: WSL2 is essentially just a special VM with API based limited hardware access. It’s neat though, the file systems are connected over 9p.
baq · 3 years ago
It is - but its speciality is exactly what matters most - it doesn't preallocate RAM and in fact can dynamically release it back to the host without any user intervention. It's super convenient.
zxspectrum1982 · 3 years ago
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.

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

killingtime74 · 3 years ago
You are right and it can definitely be improved, however at all my jobs I’ve had 32-64gb MacBooks, is that not true for most developers? When I didn’t i was able to buy an actual Linux laptop
duxup · 3 years ago
Depends on the company and developer I suppose.

Web dev here, ran with 16 up until recently… now at a whopping 24…

No memory pressure.

pjmlp · 3 years ago
Nope, most contractors get issued a laptop with 8GB unless their project is doing anything container related, in which case they get a 16GB one.

Assuming that they just don't get a cloud VM accessed via Citrix/RDP.

drekipus · 3 years ago
I thought it was "macOS subsystem, for Linux" and got excited before realising it's the other way around.

What do Mac users get out of this? I thought most Linux things work reasonably well already

SllX · 3 years ago
FQA's got this covered:

========================

> 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).

classified · 3 years ago
I love "FQA", as in "Frequently Questioned Answers" :)
ar_lan · 3 years ago
For at least the last year I’ve ran my entire dev environment out of a Linux VM I ssh into (locally).

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.

anta40 · 3 years ago
Running 32-bit apps, for example.

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.

jonas-w · 3 years ago
The other way around would be https://github.com/darlinghq/darling
rollcat · 3 years ago
In an ideal world, we wouldn't need to be bothered with Linux-only software. It's incredibly frustrating not only on Mac, but e.g. on OpenBSD as well.

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.

Also: https://news.ycombinator.com/item?id=31842318

cookiengineer · 3 years ago
Is there a Linux Subsystem for MacOS?

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/darlinghq/darling

pickleMeTimbers · 3 years ago
This is also achieved through:

1) https://github.com/lima-vm/lima 2) https://github.com/beringresearch/macpine

With a nice CLI included.

Deleted Comment

philshem · 3 years ago
Multipass is an option for Ubuntu on MacOS

https://multipass.run/

kramerger · 3 years ago
Multipass is somewhat limited, but what it does it does really well.

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

tdsanchez · 3 years ago
I came here to say this.

Multipass is a solid tool.

https://itdeepdive.com/2020/10/kubernetes-multi-node-cluster...

bgm1975 · 3 years ago
I’ve been using Multipass for a couple years now as my “WSL for Mac”. It’s great to be able to spin up a Linux guest on demand. I also use it for Docker shenanigans so I don’t need Docker Desktop or deal with its licensing issues.
sgarland · 3 years ago
I start a small Minikube instance and then hook its Docker daemon back to my Mac terminal.

Either way is absurd, tbh, but here we are.

keyle · 3 years ago
Nice one! multipass looks interesting.
nottorp · 3 years ago
Anyone else reading the title as the reverse of what it actually is?

I thought it's something for running (some parts of) MacOS on Linux. Not the other way round.

andybak · 3 years ago
Yes. It's using the same naming as WSL which always confused me:

  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.

unsafecast · 3 years ago
It's not confusing once you know where it came from. The NT kernel has a concept called “environment subsystems”. Win32 was, until WSL1, the only one used (a long time ago there was SFU, the grandfather of WSL). So WSL is a Windows subsystem made for Linux. Hence the name.

Note that WSL2 isn't an NT subsystem, they're just using an actual kernel now. The name stuck though.

nottorp · 3 years ago
Yeah well, I'm not familiar with their naming scheme, I've managed to mostly ignore Windows in the past 10+ years. Except that legacy vb.net project... sigh, the things I'll do for money.
jagged-chisel · 3 years ago
Same here. But it does follow WSL naming.
classified · 3 years ago
Oh, no, not more of this backwards mis-naming illogic. It's bad enough that MS abuses us with such idiocy, we don't have to copy it.
creshal · 3 years ago
At least Microsoft is internally consistent for once and and naming it after an older similar project: https://en.wikipedia.org/wiki/Windows_Services_for_UNIX
gw99 · 3 years ago
Based on Microsoft’s ability to plan and manage product naming I think you stumbled on a coincidence there rather than actual intent.
privacyking · 3 years ago
I too was scratching my head as to why anyone would ever want to run a macOS terminal from within linux.
lapser · 3 years ago
I've wanted to do it. Mostly to test out stuff that my colleagues would need to run but haven't been able because I run Linux. So I usually have to ask colleagues to double check my work.

I am aware that running macOS on non-Apple hardwade would be against their ToS.

e12e · 3 years ago
For running xcode and building ios apps in a ci pipeline? Eg with darling[1] and godot: https://docs.godotengine.org/en/3.6/development/compiling/cr...

[1] https://www.darlinghq.org/

Deukhoofd · 3 years ago
I'd love to have a simple way to compile stuff for macOS from Linux.
kergonath · 3 years ago
You kid, but I often wish I could run iTerm on my Linux workstations.