4 ms·
Where I’m working, WSL doesn’t work (well), VMs are banned, and personal experience with cygwin is awful (that was on win7, but still). Everything that helps me
by pletnes 3y ago
Where I’m working, WSL doesn’t work (well), VMs are banned, and personal experience with cygwin is awful (that was on win7, but still). Everything that helps me develop software on windows which runs on linux (of course!) is warmly welcome.
I’m sure there are a thousand similar but different enterprise environments like this. At home / solo dev it makes no sense, you’d just install ubuntu / get a macbook and get working without any fuss.
Docker works but it makes test runs 100x slower (yes, I measured, it’s not made up).
- VBprogrammer 3y agoIf your test runs are slower by two orders of magnitude then something is going wrong. For example, I've had problems on docker for Mac where accessing lots of (python) files in a volume mount was slow. I had to use some beta setting at the time which was far better (though I had to do a OS upgrade to use it, which also entailed some IT nonsense). The overheads of docker are there but if it was that bad people wouldn't use it.
- pletnes 3y agoFile IO seems to be the problem. I’m guessing antivirus + virtualization overhead. Don’t see what I can change about that (use linux, sure). Docker is still useful, it’s great for sharing a complicated setup across machines.
- prewett 3y agoIf I recall correctly, NTFS updates a file's access time (or some such) every time anything happens to it, so by default Windows' file I/O is slow. (Antivirus, of course, will not be helping that.) Once upon a time you could disable access time updating in the registry, although I assume if you had those kind of permissions you wouldn't be having this problem.
- ParetoOptimal 3y agoIt is that bad. I use a Linux VM with docker from OSX and coworkers use docker with OSX. Their compiles take 2m, mine take 30s.
- cesarb 3y ago> [...] VMs are banned [...] Docker works but [...] I might be missing something, but isn't Docker on Windows or MacOS actually a VM running Linux (or, on Windows, perhaps it uses WSL2, which is also a VM running Linux)? How could you use Docker if VMs are banned?
- master-lincoln 3y agoDocker on Windows can run without VM if the guest in the container is a Windows with a matching kernel and the process isolation is enabled in docker parameters. Similar situation for MacOS docker containers on a MacOS host (see recently discussed https://news.ycombinator.com/item?id=37655477 https://news.ycombinator.com/item?id=37655477) But for running Linux containers on MacOS or Windows I think you are right
- wongarsu 3y agoMakes me wonder how docker on Windows handles file access? I know under the hood it uses WSL2, which in turn uses a HyperV VM. In WSL2 it's a big deal where you put there files. While windows can access the files in the Linux VM and the other way around, that requires communication over the hypervisor and is magnitudes slower than accessing the files managed by your own kernel (like C: on Windows and /home in the WSL VM)
- thesnide 3y agoI use mingw/msys2 with great success.' I even do some directx dev with it. All with very portable code that can even be built in the standard github action ubuntu.
- pletnes 3y agoYes, and git bash is quite useful and built on those. In many ways the most useful alternative - it works and everyone already has it. But not a logical choice if you want to «deploy» something I guess.
- tahnyall 3y ago> Where I’m working, WSL doesn’t work (well), VMs are banned, and personal experience with cygwin is awful I'm no Windows fan but WSL has worked extremely well on several different machines I've worked on since 2015 and Cygwin was no WSL but I could get a lot done with it back in the day as well. > Docker works but it makes test runs 100x slower (yes, I measured, it’s not made up). Yeah, I don't know what you're doing that it could be 100 times slower, something else is wrong.
- pletnes 3y agoWSL conflicts with many antivirus/security packages due to e.g DNS filtering or other network restrictions. WSL itself on a non-managed box works not-too-bad, sure. Cygwin has been very useful to me, but also caused its share of issues with its permissions model, creating large directory trees that couldn’t be deleted.