Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just run Linux in a VM! It's my preferred workflow nowadays.

See: https://github.com/mitchellh/nixos-config

https://www.youtube.com/watch?v=ubDMLoWz76U

Only real limitations are lack of ML because no server/desktop-grade GPU and some missing ARM-based docker containers. But the latter is slowly being resolved and the former isn't gonna happen on a laptop anyways.



> Just run Linux in a VM! It's my preferred workflow nowadays.

Or just run it on real hardware! It's my preferred workflow.

These two comments of ours are equally pointless.


Alright, then allow me to explain.

Before, there were a multitude of reasons not to develop in a VM: Poor support for accelerated instructions on laptops; Slow CPUs; limited RAM; slow file-sharing between the host and guest.

The M1 architecture solves most of the issues.

Modern laptops almost universally support accelerated instructions now. This means less overhead, so doing everything entirely in the VM is worth it now. So no more dealing with slow file-sharing.

The speed of the M1 also means you're not limited compared to your desktop. Depending on the benchmark (especially any benchmark relying on CPU cache size), it may be faster on the M1 air than on a 5950X. Even in workloads where the laptop is slower, it is now fast enough.

Running docker containers in a VM on a 16GB *non-M1* machine is untenable. The M1's RAM is not only higher bandwidth and lower latency, but the compression and caching has improved so much that you can fit much more in that same 16GB.

In use-cases where you need more than 16GB, the M1's NVMe disk is so low latency that swap usage is indistinguishable in performance from RAM usage. So the laptop has no memory limit, for practical purposes (though the wear on the disk is increased in this case).

In addition, ARM architectures were a pain to deal with before, so most people emulated x86_64 and assume that you'd still have to do that on the M1. Nowadays, there is no reason not to run an ARM Linux in the VM. Most programs run just fine, and the remaining holdouts are a few Docker containers that haven't been updated. But even those aren't a problem because recent improvements to Docker greatly simplify running x86_64 containers under QEMU.

Combine all of this with the Mac app ecosystem (which has its problems, but is generally OK to use, especially if your other devices come from Apple), improved battery, the return of the good keyboard, and greatly lowered TDP, there really isn't a choice to make anymore.

The remaining reasons not to use it are basically as follows:

1) Compatibility with external devices, or work on embedded controllers

2) Anything requiring significant GPU compute (ML, etc.). But this would likely be done on a desktop rather than a laptop, which wasn't the scope of the question.

3) Disk capacity requirements (though external NVMe over thunderbolt mostly solves this)

4) Extremely multi-threaded work (video editing, etc.) where a desktop CPU outperforms the M1's multi-thread score.

Less pointless now?


> Less pointless now?

Yeah! Now you added substance. Great!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: