Live data from Hacker News

Initial Impressions of WSL 2

daverupert.com

131–140 of 233 posts

Re: Initial Impressions of WSL 2

#132
post #123

For the past couple years I've developed on macOS, and the few years before that in a different role, on windows. On both machines I ended up resorting to a Linux VM to avoid frustrating differences between my dev environment and my prod environment. Windows was totally off, macOS nearly just worked but every now and then an update would kill my dev environment and I would have to spend a day fixing it. WSL1 was tota…

I recent switched to a Linux desktop after doing the VM dance on MacOS for a few years and I can't believe I didn't do it sooner.

I am now doing the opposite: When I need to dev for Windows or something (usually for a contract), I spin a Win10 VM on QEMU-KVM.

If you guys have been virtualizing on VMWare or Virtualbox, try KVM. It's blistering fast and the whole SPICE protocol is amazing. You can actually get a usable, snappy 2+ desktop with dynamic resizing, audio redirection and USB redirection (which is SO good i was able to test using a USB soundcard and I got sound to play without underruns! quite a feat)

Do it!

Re: Initial Impressions of WSL 2

#133

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.

Why use WSL2 instead of just running linux directly? Why do you need Windows in there?

drivers.

Re: Initial Impressions of WSL 2

#134
post #47
post #40

Earlier quoted context omitted.

Developing linux software on windows is actually pretty painful. Actually, running any linux software in general such as middleman or Jekyll is pretty painful on Windows- I recently had a horrible time trying to get git-crypt working for a colleague of mine who was using Windows.. There's a lot of value in being able to just run "linux" (with bash, grep, sed, awk, gcc, python) while being able to access your normal f…

Why not just move to Linux?

I work in game dev. Good luck getting people to switch. Retraining thousands of developers, retraining all our IT staff on how to deploy Linux machines reliably. Retooling all our built up support tools.

It’s not feasible, as much as I wish it was.

Re: Initial Impressions of WSL 2

#135
post #70

Earlier quoted context omitted.

FreeBSD has a similar syscall translation layer (and has had it for over 20 years). They do it with a team of part-time volunteers. This is enough to maintain basic support, but FreeBSD still lack support for newer Linux syscalls which prevent things like the Linux binary version of Chrome from running on FreeBSD.

Yes, but translating syscalls across two Unix like systems is likely much easier. Big parts of it even just straight mapping one number to another.

This is somewhat true, but not entirely. You have to remember that FreeBSD and Linux share no common ancestors, and FreeBSD defines its ABI at the libc level, whereas Linux defines it at the syscall level. There are also subtle differences in how various internal kernel mechanisms work (such as flag definitions for calls). See linux_common_open() for an example of an "easy" straight mapping. https://github.com/freebsd/freebsd/blob/68a4c41e983228d54619...

This is true even between OSes that share a common ancestor. I was the maintainer of FreeBSD/alpha, and did the compat layer for OSF/1 / DEC UNIX / Tru64 starting with NetBSD's version and adding new calls, etc. The very easiest calls were the simple ones that both inherited from 4.3BSD or earlier (read, write). Medium were things that had diverged in different ways (stat, mmap), and for me the harder things were ABI handlers for the OSF/1 executable format (ecoff).

The hardest stuff was things at almost worked, except for maybe one flag was different, and it was hard to notice because an OSF/1 program would run for 5 minutes, and then coredump.

Re: Initial Impressions of WSL 2

#136
> get a proper, functioning, fast Linux environment up and running on my beefy gaming computer

Since I didn't see it mentioned in this thread - if all one needs is Ubuntu VMs, i.e., for common web development setup, Multipass is a simple and easy tool:

https://multipass.run/

Made by Canonical, runs on Hyper-V (or equivalent), cross-platform support. I have not compared it with WSL 1 or 2, but it's been a smooth user experience.

Re: Initial Impressions of WSL 2

#137

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.

Why use WSL2 instead of just running linux directly? Why do you need Windows in there?

to play windows games or run windows applications that don't work in wine or in a windows virtual machine.

to comply with company policy that only supports windows on desktops.

Re: Initial Impressions of WSL 2

#138

I must say WSL2 has genuinely been huge for me, to the point where I've finally been able to ditch macOS for a desktop with a Ryzen CPU. Honestly it's mindblowing how far Windows has come - if I were Apple I'd genuinely be scared of losing a large proportion of power-users as Windows becomes an increasingly viable platform for development.

Better experience you will have using native linux, insterd of a glorified VM.

Re: Initial Impressions of WSL 2

#139
post #3

No free lunch, of course. Faster file access with WSL2 (vs WSL1), if you stay in the Linux world. But if you point it at Windows files (/mnt/c, etc), it's pretty slow. WSL2 just moved the slowness from one side to the other. Accessing the Linux FS from Windows (\\wsl$\) is also slow. That said, I am a fan, and get a lot of use out of WSL1. Since I don't use the Windows interop much, WSL2 should be a performance win f…

exactly this is the problem.

As the article says

>To get the full benefit of WSL 2, you’ll also want to move your project files from /mnt/c/Users// over to your new ~/ Linux home directory on your new VHD. You can see the contents of this drive on the Network by going to \\wsl$\\\home or typing the command explorer.exe . from your bash prompt.

>This is your Linux filesystem and it acts and behaves as you’d expect. I made a folder called ~/projects that has all my project repos and then I open those projects in VS Code using the code . command.

i have accidentally wiped my home directory on Ubuntu VM reinstall. I cant even backup it up easily.

WSL engineers need to figure out a way to make the Linux home directory to be persistent. If we are living in the docker world, this is a solved problem - docker volumes live separately to the docker VM itself.

WSL2 needs to do something like that.

Re: Initial Impressions of WSL 2

#140
post #116

Earlier quoted context omitted.

The GUI isn't as great as Windows and it's often buggy. Let's face it.

Do you find the microsoft gui great? Honest question, because I have a desktop with windows and I find its gui a clusterfuck of randomness, especially since it seems two or three different ui "languages" are constantly fighting each other since w8.

I'm not talking about the desktop UI/UX philosophy but the system itself. It is much more stable than Linux, especially where there's ongoing chaos regarding Wayland.
Post reply on HN