Live data from Hacker News

Windows Subsystem for Linux 2 Moving into General Availability

infoq.com

361–370 of 420 posts

Re: Windows Subsystem for Linux 2 Moving into General Availability

#361

In WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are…

WSL2 is really not designed for using Linux tools on your NTFS-based filesystem. Store everything on the WSL filesystem, that works perfectly. If you need GUI tools try VcXsrv.

Why bother with WSL at all then? Why not just use a headless VM that you ssh into and connect back to your X server with?

Re: Windows Subsystem for Linux 2 Moving into General Availability

#362

Earlier quoted context omitted.

I believe WSL2 was designed to keep your files inside on ext4 instead of outside on NTFS.

Yes, but it sure would be nice to get native speeds on both.

There in lies the challenge that they have to deal with.

WSL1 was not great in local or cross-os i/o. WSL2 is at least great in local i/o.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#363
I would love to use Windows WSL full time, along with docker containers, for general web development.

There is one thing though that no one talks about.. the fonts!!! The font smoothing is awful on Windows... will this ever change?

The new terminal looks alright, the default font is nice; but most other programs I like look awful in Windows: Sublime Text, VSCode, gVIM, ... I just can't find a monospace font that looks "thick" enough for readability and have smooth edges -- especially with dark text on light background.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#364
post #259

In WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are…

Have you tried using cygwin? I found cygwin worlds better than WSL, as it always worked correctly on arbitrary disks and folders.

I too have found this, with one exception: fork/exec is appallingly slow. This means ad-hoc scripts in Cygwin should be written as much as possible as pipelines and not loops; bash string functions should be used over sed, grep etc. whenever you can help it.

But with that caveat in mind, Cygwin turns Windows into an acceptable Unix for command-line purposes.

I don't think it's quite as good as a development environment when you're targeting Linux though. That's where WSL (in either form) makes a lot more sense.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#365
post #250

Earlier quoted context omitted.

Clearly the best solution is for Microsoft to (a) write a proper ext4 driver for Windows and (b) find some way of embedding SIDs into ext4, then you could just format the drive as ext4, boot off it, and have the improved performance. (This is mostly a joke, but the performance of NTFS for certain operations has always been abysmal, and having a virus scanner injecting itself into all the operations only makes it wors…

AFAIK the main problem is that Unix's file permissions do not cover Windows' permission model. That would be tolerable on a data partition, but a system partition is going to use all kinds of very particular permission setups on system binaries etc. You might be able to model that stuff as xattr, but then it could be problematic to mount that ext4 partition into Linux because applications might be copying files witho…

>AFAIK the main problem is that Unix's file permissions do not cover Windows' permission model.

Well, since Microsoft has been borrowing more and more ideas from the Linux ecosystem, it would not surprise me that a Windows 10 successor would include some kind of compatibility layers for different file systems.

We can dream...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#366

Earlier quoted context omitted.

AFAIK the main problem is that Unix's file permissions do not cover Windows' permission model. That would be tolerable on a data partition, but a system partition is going to use all kinds of very particular permission setups on system binaries etc. You might be able to model that stuff as xattr, but then it could be problematic to mount that ext4 partition into Linux because applications might be copying files witho…

>AFAIK the main problem is that Unix's file permissions do not cover Windows' permission model. Well, since Microsoft has been borrowing more and more ideas from the Linux ecosystem, it would not surprise me that a Windows 10 successor would include some kind of compatibility layers for different file systems. We can dream...

Why don't they just replace Windows with their own Linux distro? :D WSL2 cannibalizes Windows from the inside out, and all that's left is Sphere. Seems like the most efficient solution.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#367
post #77

Earlier quoted context omitted.

What Electron-related problems have you had with VSCode? I've been using it as my primary for a few years now and it's been nothing but stellar. And that integration sounds incredibly cool.

Not an Electron-related problem, just a general issue: What made me give up on VSCode after trying to make it work again(this March) was the fuzzy search just not being very good in my Rails projects. I can ctrl-shift-r in sublime and get to the method definition I want in 4-5 characters. It's probably my primary code navigation technique: see a thing, wanna check the def, 1-2 seconds later I'm there. There's some VS…

Yeah, its level of support for different languages definitely varies. For TypeScript it feels like a paid IDE. For Rust and Clojure it works quite admirably, since it's the most prominent free (graphical) option for each. For Python, it's... underwhelming. That's too bad about Rails, but I also can't say I'm super surprised.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#368
post #357

In WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are…

So if accessing ntfs from wsl is now slow, you can put the files in wsl instead. The problem then, if you're using this as a dev machine, is how do you edit them in Windows? I want to use my JetBrains IDEs to edit wsl files, if that doesn't work I'd just stick with dual boot.

This was the use case I was really hoping for, also. I've been back and forth with various employers over the years, depending on their requirements - Windows only (it works for Java), Cygwin, VMware Workstation with Linux VMs, MacBook, Linux on the hardware, etc.

WSL1 was unusable as there was no way to run IntelliJ or Eclipse on Windows, and have it work on large projects sitting in the WSL filesystem - the file IO was way too slow, and the instantaneous feedback you expect from Jetbrains products just wouldn't work.

VMs on Windows would work, but again only if you were developing 100% in the Linux VM, IDE included, and just used Windows for Office and whatever else was required. But at that point, you still had to deal with all the Linux issues like ugly fonts and broken plugins, with all the problems of slow VM file IO.

Cygwin also similar to WSL1 - just wouldn't work for anything that required real Linux underneath.

Linux direct on the laptop works, but with all the same problems that have been around for 20 years and never seem to get fixed - broken multi-monitors, ACPI issues, driver support for Nvidia, video conferencing being too slow or unsupported, no MS Office, etc. I just don't have the time or motivation to spend hours every week babysitting a Linux laptop.

Macbooks are definitely the way to go, I'm just worried that my employer will balk at the cost of the new $3K 16" MBPs next upgrade cycle.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#369
post #333
post #41

Earlier quoted context omitted.

I never thought I’d say it but because of this exact setup with VS Code I’ve actually stopped using my MBP at home in favor of my desktop, which was really only built with gaming in mind. I’ve now gotten used to having all the extra computing power at hand and would struggle to go back to a laptop as my primary development machine.

I've stopped coding on my 2012 Macbook Air in favour of my desktop PC for similar reasons. The fact that my ports are shared between Windows and Linux makes the web dev I do a dream. The new Terminal app is great too. I've got all the same split pane stuff that I rely on in iTerm, including useful keyboard shortcuts for switching between them and resizing them. I'm very impressed.

Yes new terminal is awesome. I can open tabs for git bash, powershell, and WSL in one window.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#370
post #83
post #67

Earlier quoted context omitted.

WSL was very cool from a pure tech standpoint, but I've never been clear what the actual use case for it was. WSL2 seems to be more along the lines of coLinux, which I felt the same way about when it was new.

The usecase was Apple has Terminal.app, Windows has MS-DOS. Tell me which you would rather use for node and or docker development.

Personally, as a node developer (and occasional contributor), Windows Terminal and pwsh.

Not sure why you'd use or mention 'MS-DOS' since that stopped being a thing about 20 years ago, a decade before node existed.

Post reply on HN