News for hackers. Stuff that matters.
Re:Creating my awesome Windows 10 dev setup by woodruffw on Friday January 29, 2021 @10:57PM (#25965884)
An honest question from someone who hasn't used Windows since the early 2010s: as developers, what's the draw?

I've seen a few blog posts like this one where competent individuals attempt to construct a Linux-like development environment on their Windows install. It's clear that you're still fighting the host environment at the end of the day, and that anything that provides a Linux-like interface is going to suffer from both Windows' lackluster performance and the overhead of virtualization/translation/emulation/whatever approach your layer-of-choice uses. Is it familiarity, presence of other (non-development) applications, or something else?

Edit: I should say that I haven't used Windows since 2012 or so, but I have developed for it (mostly drivers and filesystem work) since then by running VMs. Ironically, my best experience developing for Windows has been entirely on Linux and macOS.

Re:Creating my awesome Windows 10 dev setup by AaronFriel on Friday January 29, 2021 @11:28PM (#25966051)
Hardware just works, interface is familiar and understandable, it works with high DPI displays reliably, Hyper-V and Docker and WSL/WSL2 make cross-platform development a breeze.

I'm not aware of any compromises I've had to make, whereas MacOS colleagues have to deal with compatibility issues with userland utils, Docker, running *nix VMs, and so on.

And as of a couple months ago, GPU passthrough with WSL2 enables using an Nvidia GPU for ML tasks using Linux binaries.

Re:Creating my awesome Windows 10 dev setup by jhanschoo on Saturday January 30, 2021 @12:30AM (#25966461)
Another point in favor of Win10: full-disk encryption is easier to set up as Bitlocker on Windows. Together with the TPM, physical access no longer means easy data access, and you don't have to input a passcode for the encryption either.

There is no good story for tpm-secured booting into a full-drive encrypted Linux OS. What I have now still requires a passcode at boot, and it was still a pain to set up.

Re:Creating my awesome Windows 10 dev setup by selfhoster11 on Saturday January 30, 2021 @10:41AM (#25969923)
I was about to write that you can easily enable full-disk encryption with Ubuntu on install, but then I realised you had a requirement to use TPM for this. Ubuntu doesn't support this mode without finagling, so this wouldn't meet your requirements.
Re:Creating my awesome Windows 10 dev setup by Macha on Saturday January 30, 2021 @08:31AM (#25968894)
My understanding is bitlocker is using your login credentials as the auth to get the TPM to unlock the disk - otherwise how is it blocking anyone else with physical access getting at data by just turning the power on if there's no auth?
Re:Creating my awesome Windows 10 dev setup by AaronFriel on Saturday January 30, 2021 @01:43PM (#25971672)
You can enable TPM and PIN at boot that engages with the TPM, or you can just use TPM in which case your disk is unlocked by the bootloader (IIRC, terminology might be off).

The TPM and PIN has protections against brute forcing and offline attacks. The TPM only method for Bitlocker is more similar to FileVault.

Re:Creating my awesome Windows 10 dev setup by JeremyNT on Saturday January 30, 2021 @07:18PM (#25974428)
So basically, the claim here is that it's easy to visualize linux in Windows than it is on a Mac?

That's swell, but what advantage do you perceive versus... just running linux? I understand if you're a .net shop, but I'm always confused about the lengths Windows users seem to go through to run Linux tools within Windows rather than just running Linux.

Re:Creating my awesome Windows 10 dev setup by AaronFriel on Saturday January 30, 2021 @10:43PM (#25975676)
Because then I have to run Linux as my desktop environment, and I would rather not.
Re:Creating my awesome Windows 10 dev setup by Arainach on Saturday January 30, 2021 @02:33AM (#25967092)
My thoughts on this previously: https://news.ycombinator.com/item?id=25425365

I have to fight against Linux to do standard desktop environment GUI things, while Windows just works for the most part. The rough edges of Windows are essentially all covered by the Windows Subsystem for Linux.

Re:Creating my awesome Windows 10 dev setup by jiggawatts on Saturday January 30, 2021 @03:15AM (#25967301)
This exactly.

What most Linux people say when they say that they want the "Linux development environment" they mean some shell tools. Shell tools that are now available under Windows with better "fidelity" than under MacOS.

Re:Creating my awesome Windows 10 dev setup by CJefferson on Saturday January 30, 2021 @03:03AM (#25967236)
My answer is, I don't see the problems, and I don't fight windows.

I run WSL2, and when benchmarking performance is almost identical to rebooting into Ubuntu.

I've never had a laptop where everything worked well in Linux (WiFi, Bluetooth, sleeping), even when trying laptops where I was told it would work well, like the Dell XPS.

Also, I work on (open source) desktop software, where the majority of our users use Windows, so I like being able to easily debug their problems. I work in academia and get lots of word and Excel documents I have to edit, and find while open office can view them it often breaks them if I edit and resave.

Re:Creating my awesome Windows 10 dev setup by clircle on Friday January 29, 2021 @11:11PM (#25965944)
Linux is bad for laptop batteries, 4K screens, other hardware, and most office programs. If you only use vim, stay plugged into an outlet all day, and don't need great video conferencing, then Linux is fine. But that's not most people.

OTOH windows is slower than Linux, but it's a price worth paying for some.

Re:Creating my awesome Windows 10 dev setup by woodruffw on Friday January 29, 2021 @11:24PM (#25966026)
> Linux is bad for laptop batteries, 4K screens, other hardware, and most office programs. If you only use vim, stay plugged into an outlet all day, and don't need great video conferencing, then Linux is fine. But that's not most people.

I don't disagree with any of this[1]! But we're talking about developers, not most people, and it looks like this particular author went out of their way to install a CLI editor.

Others have pointed out that Windows is still the right platform if you're a game developer, which makes a lot of sense to me. Are there other specific hobbyist development cases that are best served by a Windows environment?

[1]: Except the 4K and video conferencing. Those actually work quite nicely for me (n=1) on Linux.

Re:Creating my awesome Windows 10 dev setup by clircle on Friday January 29, 2021 @11:36PM (#25966114)
Yes, I know one person can hack there way about all the Linux issues on their specific hardware for their specific work requirements.

I hate to beat up on Linux. I'm a 15 year user on my personal hardware who wishes he could use it for work.

Re:Creating my awesome Windows 10 dev setup by Shared404 on Friday January 29, 2021 @11:32PM (#25966077)
> [1]: Except the 4K and video conferencing. Those actually work quite nicely for me (n=1) on Linux.

I suppose I'll add my n=1 experience that battery life has been pretty good oob.

Re:Creating my awesome Windows 10 dev setup by dhdhhdd on Friday January 29, 2021 @11:45PM (#25966174)
Maybe it would have been even better in windows?

:-)

I remember playing with governor's, disabling hardware, supporting Nvidia Optimus and other stuff in Linux in order to get decent battery life (actually, i got decent out of the box. I wanted good battery life)

Re:Creating my awesome Windows 10 dev setup by Macha on Saturday January 30, 2021 @08:33AM (#25968907)
Was not the case on my last dual boot laptop (XPS 15), battery life was better under Linux on that.
Re:Creating my awesome Windows 10 dev setup by Shared404 on Saturday January 30, 2021 @12:01AM (#25966285)
Quite possibly.

This laptop is the first computer I've owned for myself though, and is what let me get into Linux. I tried dual booting for a while, used Windows ~2 times, and never went back.

I can get 8 - 10 hours pretty easily with Linux, and that's using GNOME, so I just haven't worried about it.

Re:Creating my awesome Windows 10 dev setup by ardy42 on Friday January 29, 2021 @11:14PM (#25965964)
> An honest question from someone who hasn't used Windows since the early 2010s: as developers, what's the draw?

Corporate standards? Also, if you're in enterprise land, there could be some weird tool you need to use (or is superior to whatever you can get on Linux) that forces/encourages you to use Windows.

Also, there may be some weird little ergonomics thing: I recently switched from Windows to a Mac at work. We use Outlook, and IMHO Mac Outlook sucks compared to the Windows version. It's just missing a bunch of useful little features that I got used to. I was originally planning on using Windows Outlook in a VM, but got thwarted by new policies set by our new desktop support vendor.

Re:Creating my awesome Windows 10 dev setup by olyjohn on Friday January 29, 2021 @11:46PM (#25966182)
Mac Outlook is so totally neutered compared to the Windows version. I thought Outlook on Windows was a crappy, crashy POS application, then I used it on Mac. It actually hinders my productivity. There's not even an option to manually run mail rules that you create. I guess you just have to wait for that e-mail to come in again to see if you set up your rules properly. No option to rebuild your mailboxes. I have had to remove and recreate my account multiple times already just to keep it functioning.
Re:Creating my awesome Windows 10 dev setup by entropyie on Saturday January 30, 2021 @05:19AM (#25967876)
I agree with your sentiment for the most part (although I haven't run native windows outlook in 15 years)... however, for what it's worth, you can apply client side mail rules to existing emails on MacOS. I've used this to classify automated notifications into at least a dozen folders at work. At home I use Thunderbird ;-)
Re:Creating my awesome Windows 10 dev setup by woodruffw on Friday January 29, 2021 @11:19PM (#25965997)
That makes sense for a Windows development shop, but for a personal development environment? This blog and others I've seen seem geared at hobbyist developers.
Re:Creating my awesome Windows 10 dev setup by xnyan on Saturday January 30, 2021 @12:21AM (#25966407)
For servers, I would never consider anything but linux. As a desktop OS, Windows gives me a great experience. I’m lucky enough that I don’t have the performance problems that others describe. Games. Hardware compatibility without configuration or tweaking. Windows subsystem for Linux v2. It all works like I expect and I don’t have to fiddle with it constantly.
Re:Creating my awesome Windows 10 dev setup by jjcm on Friday January 29, 2021 @11:18PM (#25965989)
Gaming. If you look at the author's posts on twitter, you'll see he's heavy into gaming / game dev. There simply aren't other platforms for this. OSX is atrocious with anything gaming related. Linux is getting there, but it's always a hack and there's a chance you'll be banned by platforms due to anti-hack detection algos often flagging linux/wine as nefarious.
Re:Creating my awesome Windows 10 dev setup by armoredkitten on Saturday January 30, 2021 @12:24PM (#25970916)
Linux is definitely improving when it comes to gaming. A lot more games either support it natively, or they work quite well using Proton. Like you say, anti-hack/cheat algorithms on multiplayer games can be a problem. I dual-boot with Windows for those games that just don't work on Linux, but I find myself booting into Windows less and less....

which does not bother me one bit.

Re:Creating my awesome Windows 10 dev setup by TwoNineA on Saturday January 30, 2021 @09:34AM (#25969363)
Nothing stops anyone from using a Linux desktop as their workhorse and gaming in a VM with GPU passthrough.

With tools like Looking Glass (https://looking-glass.io/) you don't even have to leave the Ubuntu Desktop environment.

Re:Creating my awesome Windows 10 dev setup by selfhoster11 on Saturday January 30, 2021 @10:46AM (#25969965)
I have looked into this extensively, and all I can say is that it's extremely difficult to get working on certain hardware configurations if you only want to use one card, and even then it's hard to set everything up the way you want to do it.
Re:Creating my awesome Windows 10 dev setup by TwoNineA on Saturday January 30, 2021 @11:33AM (#25970416)
I've been running 2 Ubuntu servers running 3 gaming VMs. I agree to a certain extent that hardware choice is key. I got burned by AMD GPUs not resetting so switched to NVidia GPUs.

Didn't have issues for almost a year.

Rule of the thumb for me is: AMD GPU for host, NVidia for guests. I use AMD GPUs for host because open source drivers are awesome and makes kernel/version updating easy. NVidia for guests is no brainer since they don't have PCIe reset issues. For motherboard, pick one that has good IOMMU groupings, usually x<3|4|5>70 for AM4 or x299 for Intel, or go Threadripper.

Re:Creating my awesome Windows 10 dev setup by RealStickman_ on Saturday January 30, 2021 @11:54AM (#25970640)
There's actually a kernel patch that basically separates every pcie device into its own iommu group (linux-vfio on arch). You shouldn't do that if you need the security provided by proper iommu groups, but it works for a gaming vm.

According to Wendell on Level1Linux, the reset bug should be fixed on AMD 6000 series gpus.

Re:Creating my awesome Windows 10 dev setup by monsieurbanana on Friday January 29, 2021 @11:29PM (#25966062)
I almost don't want to answer, I'm wary about the replies telling me how I'm doing it wrong or how I'm unlucky with my hardware (with a hint of "I don't believe you") or with guides about setting up stuff.

I'm a linux guy, I've used linux almost exclusively for the past 10 years, but one of my two laptops recently started running Windows10 + WSL2.

Why I use it:

- WSL2 is usable. Looks like a linux, smells like a linux, and performance is way faster than on my linux laptop (purely because the windows laptop hardware is much more beefy, I'm just saying WSL2 performance isn't a bottleneck)

- Games, obviously, and I'm sure you know that. There's a non-negligible overlap between gamers and developers. VR games on linux is a no-go at the moment.

- Printers. I've never had a linux laptop that just worked regarding scans and printing. Sometimes I works, sometimes (usually) it doesn't.

- My otherwise well-supported thinkpad has a crappy broadcomm wifi+bluetooth chipset. It's just not well supported on linux. I've had to stay in a hotel for 2 weeks covid quarantine, I'm glad I had my windows laptop with me, as linux didn't want to connect to their wifi at all. Bridging wifi from my android phone is another workaround I use

- Regarding bluetooth, it's bad too. Audio works after a decent amount of manual config (finding the right driver online, the one shipped on ubuntu is the wrong one), but with horrible latency (almost 1sec). My bluetooth mouse is now working without issues, besides a bluetooth systemctl restart from time to time.

The bad things about it:

- A couple of random BSOD. I have no idea where to even start to debug them. Only 2-3 in 6 months of usage though.

- Botched upgrades. This was a bad one, when I bought the laptop, the latest upgrade just didn't work, it would brick the laptop. It seems to be a problem with my ryzen cpu, so the only solution was to reinstall and stop all updates until microsoft fixed it

- Upgrades in general, they're shitty, forced, etc... Nothing new here. I use third-party programs to stop the forced upgrades, so at least I have control over that

- Autohotkey is required for basic customization, like shortcuts. I'm very specific about my shortcuts (I need my bazillion emacs keybindings to work the same as in linux), but ahk makes it work for me.

- Some annoying, but non-critical bugs in WSL2. It might get better with time.

- Virtual workspaces are now shipped with windows, but their keybindings suck in a non-fixable way

There you go. I'm still a linux guy, I prefer linux and will probably dual boot an ubuntu+i3 once I buy a bigger SSD, but WSL2 makes dev on windows quite painless. All I need for my work is a terminal, emacs and a browser after all.

Re:Creating my awesome Windows 10 dev setup by tiew9Vii on Saturday January 30, 2021 @03:14AM (#25967300)
Interesting you mention WSL2 as a plus.

I've used Linux since early 2000's and OSX on the desktop since 2010+. Before that Windows CE, 95 and think Vista or 7 was the last.

I was curious about what Windows looks like these days as it's been a decade and also curious about WSL2 as it seems online posts are generally positive over WSL. The surface go / surface line of devices looked interesting for a nsmall, stuff in the bag while traveling doing email/browsing/office type of machine. I was tempted to buy one to see what they are about.

At a contracting gig last year I was given a Windows machine. I'm not sure if it was because it wasn't the best and typical corporate laptop specs, or if it was because of the corporate lock-down, installed software, av, and other junk but my eagerness to try modern Windows and WSL2 quickly diapered. I struggled getting docker running, i struggled running docker in the subsystem, i found things where not working in the subsystem, had difficulty with paths etc. In the end the machine went back and I got a mac and was up and running in an hour with full dev environment and everything set up how I like using nix-darwin. Same for the other devs, they where unable to get a working dev environment on windows so sent the machines back for macs.

Some of it will certainly be my unfamiliarity but it just didn't seem compelling enough to overcome. Clicking the start menu and seeing ads instead of finding programs was a blatant yes this is windows moment.Even the UI /UX felt old which seems odd given that Microsoft have quite a lot of material out on user interaction and ux research.

An interesting observation about modern Microsoft is a lot of the onsite Microsoft Azure employees seem to be using Macs and Microsoft give them the option of running Macs.

Re:Creating my awesome Windows 10 dev setup by woodruffw on Friday January 29, 2021 @11:31PM (#25966073)
Thank you for the detailed response! I was stung badly by the promise of POSIX on Windows back in the Cygwin era, so it's very possible that I don't fully appreciate just how good/seamless WSL2 is.
Re:Creating my awesome Windows 10 dev setup by dpayonk on Saturday January 30, 2021 @12:03AM (#25966298)
WSL2 has been awesome so far. I just recently decided to buy a surface book instead of a Mac because it felt like Microsoft was embracing linux more while Mac was drifting away.

After a month, other than keybindings, I’m very pleased. For me, the python experience made the difference. It’s 1st class with VSCode and remote debugging over WSL.

Re:Creating my awesome Windows 10 dev setup by shrimp_emoji on Saturday January 30, 2021 @01:21AM (#25966742)
I switched to Linux before WSL1 came out (which I heard was awful from people who were using it), so I've never used either. Then I heard WSL2 was far better, and then later that it still has fundamental problems:

https://news.ycombinator.com/item?id=25612962 (corrupting repos)

https://github.com/microsoft/WSL/issues/5336 (no Internet access)

Re:Creating my awesome Windows 10 dev setup by dehrmann on Saturday January 30, 2021 @02:54AM (#25967195)
I've gotten annoyed by some of the Windows bloatware recently, and I realized most of what I do should work fine on Linux. As others have said, I have hardware compatibility concerns, am not sure how a high dpi or external monitor will work, have battery life doubts, and am not looking forward to using Wine.
Re:Creating my awesome Windows 10 dev setup by woodruffw on Saturday January 30, 2021 @11:56AM (#25970661)
I don’t use a HiDPI laptop but, for what it’s worth, getting a 2x4K setup working on my desktop was nearly painless on Ubuntu 20.04[1]. It would probably have been even easier had I stuck to GNOME instead of switching to i3.

[1]: https://blog.yossarian.net/2020/12/24/A-few-HiDPI-tricks-for...

Re:Creating my awesome Windows 10 dev setup by markjgx on Sunday January 31, 2021 @09:23AM (#25979011)
Proprietary tools that work significantly better/exclusively on Windows 10, plus games... yeah mostly games.