Live data from Hacker News

WSL2 corrupting Git repositories and shell history

github.com

161–170 of 423 posts

Re: WSL2 corrupting Git repositories and shell history

#161
post #11

Earlier quoted context omitted.

It's very useful for projects that require (or work better in) a linux environment. I don't want to start up a full linux VM, that sounds like a lot of overhead and I'm more likely to not bother at all. WSL is much lighter than that (we're not talking virtualbox here), if I open windows terminal its up and running, there's almost-zero start up cost. With VSCode I can switch between working in WSL and windows easily,…

You've not explained why you would not run a native Linux system in the first place…

Because corporate only allows their sanctioned images.

Re: WSL2 corrupting Git repositories and shell history

#162

Earlier quoted context omitted.

> That's a minor incovenience at worst. What a bizarre claim. It's irrelevant if you don't need Postgres, a minor inconvenience if you can easily adopt a workaround, and a show stopper if you were relying on accessing a local Postgres instance.

Have you developed in this environment? I have developed more than 20 sites in WSL1, all with PG as the DB. I have it running in the same machine in windows for developemnt(which you are running otherwise you wouldnt be in WSL).Instead of using "localhost" you use "127.0.0.1" in your configuration, that's it.

I have scripts that rely on connecting to PostgreSQL via a UNIX socket, I couldn't use these scripts on WSL. A workaround wouldn't be too hard, but ideally WSL should be 100% Linux-compatible in my opinion.

Re: WSL2 corrupting Git repositories and shell history

#163
post #104

Earlier quoted context omitted.

The web version of Outlook has come a long way, and in my opinion has become the superior product (for my use cases, at least).

The web version does work until you need to sign into more than 2 accounts per day (1 in regular, 1 in private). If you need more than 2 accounts, it does not work anymore. Edit: it does work, but it will sign you out from all M365 services which requires a lot of logins for nothing.

Firefox container tabs are great for this sort of thing.

Re: WSL2 corrupting Git repositories and shell history

#164
post #3

I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!

I just like being able to work in a Windows IDE and compile in a (99%) Linux environment without messing with a VM or mounting shares. Like QMK[1] -- develop in Visual Studio, compile in WSL, flash in QMK Toolbox (Windows). Or in some very specific corner cases, have a Linux-based workflow that suddenly calls into a Win32 utility.

In some cases I need to test something that's Linux-only -- an idea or a GitHub project that just doesn't run on Windows -- and it's easier to jump into a WSL console than boot a VM. But on the other hand, I don't do that frequently enough to just keep a VM running all the time. (Plus there's VM idle RAM usage, and I can't use Hyper-V [which can reduce VM RAM] due to host performance concerns)

[1] https://github.com/qmk/qmk_firmware

Re: WSL2 corrupting Git repositories and shell history

#165

Earlier quoted context omitted.

> That's a minor incovenience at worst. What a bizarre claim. It's irrelevant if you don't need Postgres, a minor inconvenience if you can easily adopt a workaround, and a show stopper if you were relying on accessing a local Postgres instance.

Have you developed in this environment? I have developed more than 20 sites in WSL1, all with PG as the DB. I have it running in the same machine in windows for developemnt(which you are running otherwise you wouldnt be in WSL).Instead of using "localhost" you use "127.0.0.1" in your configuration, that's it.

No, I haven't. Thanks for clarifying, that does make it sound like much less of a problem. Though it might still catch out some people, e.g. on a corporate machine where you're permitted to run WSL but not Postgres.

Re: WSL2 corrupting Git repositories and shell history

#166
> Mind that I come from a Ubuntu distro, Windows is the most energy efficient solution at the moment and allows me to run my Dev tools and work on battery for 4 hours straight. Ubuntu (or any Debian-based distro) destroy my battery in 40 minutes and there's no solution or optimization for that.

I know this is not a solution, but the Librem laptops from Purism hold up for hours straight. I also used to run Windows on laptops for the same reason, but the obvious solution to this is to buy a laptop built with Linux in mind from the ground up, and now we have options available.

Re: WSL2 corrupting Git repositories and shell history

#167
post #3

I don't really understand the use case for WSL. What are the advantages? You could run a full Linux VM and do everything on it on any machine these days. Which is what I do, but I'm just an old school hack. Anyone who uses WSL care to enlighten me? Thanks!

I use a mix of WSL2, and VMs. WSL2 has a few nice properties for some use cases: a) It comes default with some network binding magic (ok, just configuration) that makes your WSL env almost actually behave like localhost. I know you can configure this yourself, but it's nice out of the box. (on the other hand, sometimes is this exactly the opposite of what you want...) b) My main machine is a bit RAM constrained, and…

Also, I think WSL2 is currently only way to access GPU through Cuda API from the guest linux.

Re: WSL2 corrupting Git repositories and shell history

#168
Another funny interaction I found with WSL2 and Windows is file case sensitivity leading to all sorts of weird error messages

I wish I can use a real Linux installation but their display drivers don't work well with my multiple displays with different resolutions

Re: WSL2 corrupting Git repositories and shell history

#169

Earlier quoted context omitted.

Windows is moving to a model where Windows itself is run as a virtualized OS. I believe this is enabled by default in new installs. So having a Linux VM in Hyper-V isn't opening up much new attack surface.

It's not enabled by default. Enabling Hyper-V still causes a battery/performance hit that is going to be hard to get rid of.

Virtualization-based security -- a lighter mode of Hyper-V sans real VMs -- is enabled by default on new installs on recent-enough hardware:

https://techcommunity.microsoft.com/t5/virtualization/virtua...

Re: WSL2 corrupting Git repositories and shell history

#170

Earlier quoted context omitted.

Yeah I think you nailed it there actually. That's exactly their modus operandi. What's even worse is they have managed to abstract most of the support away in this cycle. You can't get enterprise support now because they gutted that entirely. You can't get them to do anything on github because they keep moving all the projects around and erasing them all or auto closing the tickets and no one on first line support kn…

> Yeah I think you nailed it there actually. That's exactly their modus operandi. They're following the "rules" from "The Cathedral and the Bazaar", remember. Specifically, the "Release early and often" bit, for the purposes of this conversation. Microsoft are considered "good open source citizens" because of the changes they've made to follow the written non-rules as well as the the unwritten rules. If you're going…

The thing is 99% of what I get elsewhere does actually work properly. Microsoft are just excessively bad at this.
Post reply on HN