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

I develop Rails in WSL1 just fine.

> Postgres never worked for example natively.

That's a minor incovenience at worst.

I will stay put in WSL1. If I wished a VM I would have just installed VMWare and run some Linux ISO image from it.



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


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.


Can't you just run Postgres natively on Windows? It's a database, you can talk to it from WSL over a local socket, no?


Yes, that's what I do, and it is completely transparent. I dont know why people are so dumbfounded because I wrote it was a minor inconvenience at worst.


> That's a minor incnvenience at worst.

The level of inconvenience purely depends on your stack and how its developed. Often things which don't bother me have huge effects on other members of my team, or on people working on other projects.


I mean, why not do that?

I tried WSL because I thought it would be faster than a heavyweight VM. Turned out it's dog slow in comparison.

Honestly don't see a use for it.


WSL1 is much better integrated, which is useful for some things, especially when networking is involved. And it wastes less memory as a consequence.

The root partition is slower, but I'm usually manipulating windows files anyway so both versions are similarly slow.

I use WSL2 right now, but only because I need to mount a vhd that's formatted with BTRFS.


You can’t compile anything with WSL1, did you notice that?


Do you mean kernel modules? You can compile programs just fine. There's a whole infrastructure around using visual studio code to run the UI natively and compile things inside the linux environment.


I find the opposite, WSL1 is much faster for pretty much every usage except workloads that involve reading/writing lots of files.


The difference on I/O is enough to make WSL unusable.

I wasted a day trying to figure out if I had a problem with anti-virus or something that was blocking me before realizing that WSL I/O is just... well, slow.

People kept telling me to upgrade to WSL2 to solve that but the version of windows I had didn't allow it. Might have been a blessing in disguise given the data corruption bugs.


What version of Windows doesn’t have WSL2?


It was introducing in windows 10 release 2004. A lot of users myself included are still stuck on the 1909 update because it does not show up in our list of automatic updates. This usually happens if Microsoft update determines that some of your hardware may cause BSODs with the new update.


You need at least Win 10 version 1903


Any version from 1.0 to 10.1809.




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

Search: