11 ms·
Porting a macOS Clojure Dev Setup to Windows WSL2
- Lindoves 6y agoWhy not use Linux directly? Set up one PC for games, and one for dev; I can't believe anyone uses Windows for anything but 'games.' But that's fair; just a subjective comment.
- jrsj 6y agoI've never worked somewhere that uses Linux dev machines. Almost always Mac these days, but otherwise it's been Windows. At least a good option exists for *nix tools on Windows now. And WSL2 is good enough for personal development that I use it on my desktop as well -- I don't want to waste time fucking around with drivers or dual booting for something I do infrequently anyways.
- Toorkit 6y agoI've never understood what drivers you people are "fucking around with". On Windows I have to go to netgears website and download a driver or use the included CD to get my WiFi dongle working. On Linux it works out of the box. I've always found Windows to be the huge pain in the rear end, not Linux.
- kraig911 6y agoLucky you? Usually it's my bluetooth adapter, or my AMD graphics card, or my thunderbolt, or my 4 button mouse... or.. or... the list goes on and on. For a normal experience yeah it generally could work out of the box if I just want chrome and facebook like normal people. But none of us here are normal are we?
- oneplane 6y agoIf you want chrome and facebook you go to an american shopping building and get a chromebook or a rebranded mass-produced bottom-shelf el cheapo laptop with whatever it has preinstalled. Heck, normal users don't see a device in terms of hardware and software, it's just "the flip-open-thing that gets me cat pictures".
- eropple 6y ago- Dunno what bluetooth you're using, but cheapo USB ones off Amazon work as well as my laptop's Intel built-ins. - `radeon` is in the box (for Fedora, I assume Ubuntu) and has worked on half a dozen different cards over the last decade. I've never installed `amdgpu` but it looks no more difficult than nVidia's proprietary drivers? - Thunderbolt is a continuing problem, though TB3 is significantly improved IME. Docks and multi-monitor over DisplayPort MST are fine. Haven't tried PCIe extensions. - Many-buttoned mice work better than they do on Macs, I'll tell you that much.
- qalmakka 6y agoAMD cards now with AMDGPU are vastly more convenient than Nvidia ones under Linux. AMDGPU is fully open source, so everything JustWorks™ without installing anything. Everything is shipped in Mesa and the kernel itself, and it does not require anything else.
- eropple 6y agoCool, good to know. I didn't realize that it was more like `nouveau`. That's awesome!
- qalmakka 6y agoNone of these cards need any additional driver under Linux, unless it's extremely obscure hardware made by some Chinese company. Damn AMD has even rewrote its entire Linux graphic drivers from scratch, now they are fully open and work fantastically out of the box. I bought an RX 580 specifically because now I can just install Linux and have everything working perfectly without caring about even installing a single package. I bought a WiFi + Bluetooth PCIe card last month; it was one of those cheap Chinese no-brand cards that consist in an Intel WiFi chip slapped on a board. It worked instantly without installing anything, with just the drivers shipped in the Linux source tree that every distribution has. My mouse is a Logitech mouse with 5 buttons and it too works out of the box. How long has it passed since the last time you installed Linux? It has changed a lot in the last 10 years; lots of things work flawlessly now. I haven't had to meddle with any driver since at least 2010, when my shitty ATi Radeon X1600 still only worked under FGLRX or when I tried to use a crappy Chinese WiFi dongle whose drivers were only distributed as source on a CD (damn you realtek)
- iphone_elegance 6y agoI use linux most of the time the problems are graphics, bluetooth esp. audio but still random other issues are common, general acpi crap (had recent issues where the computer wouldn't go to sleep or randomly would wake up while closed), palm rejection being shit, color profile issues it's like 90% fantastic but that last 10% still sucks weekends away for me and I've been using linux for almost two decades
- jamesgeck0 6y agoWindows: Sometimes Windows Update can't automatically find an appropriate driver the first time a device is connected and I have to install one manually. Time lost: fifteen minutes, tops. Linux: Last time I bought a USB wifi dongle, I bought one with a Linux penguin on the box. It turned out that the driver was a realtek fork and I had to manually apply their patches and rebuild every time my kernel updated. Could never get DKMS working quite right. Time lost: two hours. I have dual monitors, one running on an Intel integrated card, one running on NVidia. Either one can run on the open source drivers alone, but I cannot activate both at the same time. The Intel drivers output hot garbage when Nouveau is running. There's a "flicker free" mode which eliminates a similar problem, but the Intel driver appears to ignore my config in this duel head configuration. Time lost: eight hours.
- simion314 6y agoMy experience: WiFi device comes with CD but I have no CD-ROM. Then I try to google this no name brand and find the official website but fail. I plug the device in Linux and figure out exactly the real chip used (many devices reuse same chips and put their own antenna and branding on top). Now I know the real chip name but the guys that make it do not offer driver downloads to regular users, so I need to Google and find some driver. Then the next problem, what website that offers driver downloads should I trust? I never heard of any of them, in the end I remember that many years ago I was downloading stuff from softpedia, decided that I already spent too much time on this and since it was my son PC I can risk it and grabbed a few potential drivers from there. After that I needed to refresh my memory how to install drivers when you don't have a wizard and read a quick tutorial and follow it. Conclusion, there are tons of hardware , as a Linux users in more then 15 years I can list only this issues(I am not using 4K or multiple screens setups): - a few years back AMD catalyst driver dropped support for my 1 year old laptop (maybe the chip was older) forcing me to decide if I use older software or the crappy at that time open source software ( this costed AMD sicne I bought NVIDIA next time) - for latest NVIDIA driver I just need to google , find and enable and official repository and now I can install from a list of drivers versions, I do not need to make an NVIDIA account to get updates. - my Cannon printer was detect fine, I had to select a similar model from a dropdown and change a setting from RGM to CMYK (I had to google this) - I had issues with microphones on cheap headphones, my solution was to buy USB headphones - they just work (including Microsoft ones) no driver installs I never had to install an audio or network driver on Linux, on Windows I had issues with same hardware where installing drivers from Windows and not from the original CD would make the audio and network conflict (both were Realteck chips and Windows would get confused). Btw I am not saying your experience is not happening, I am sure that some new hardware will be missing support and some other hardware might experience bugs, I added my experience to put things in balance.
- ARandomerDude 6y agoLaptop suspend, ALSA sound, Bluetooth, and WiFi are almost always sources of constant frustration. I loved Linux but until they get that ironed out, I won't use it for a desktop solution. I hate getting jerked around by Apple but not as much as I hate driver issues.
- eropple 6y agoI won't buy non-Thinkpad laptops because I'm reasonably assured that they'll work with Fedora, but IME desktop hardware has a much higher chance of Just Working.
- dragandj 6y agoWho are "they", and why would they care about someone's demands? Don't get me wrong, I got bitten by some of these issues occasionally, too, but Linux is not an actual product I pay for. It's a bunch of free code. I can choose to contribute or not, but I can't expect that anyone is obliged to care about my demands.
- ARandomerDude 6y agoThis is a straw man argument. I wasn't making demands, never claimed Linux wasn't free, and never said anyone was expected to care about my situation. I just said until they (contributors, obviously) have a better solution, I'll choose to pay for a desktop environment that suits my needs.
- boogies 6y agoBut why pay Apple tax for a Mac when you can pay $0 extra for a Thinkpad/Thinkstation that's certified tested to run multiple GNU/Linux distros well, or a Dell XPS “Developer Edition” or System76, Purism, or similar laptop with one preinstalled, and not be 'jerked around by' a single company?
- deleted 6y ago[deleted]
- jrsj 6y agoUsually when a new series of GPUs is first released the driver support on Linux is pretty bad and even if it works its unstable.
- bitwize 6y agoThe vast majority of corporate shops do not have a story for IT management of Linux machines. Accordingly, all employee PCs need to be either Windows or Mac -- and until WSL, for webdevs they were mostly Mac.
- panpanna 6y ago> The vast majority of corporate shops do not have a story for IT management of Linux machines. Oh, that is changing and very quickly. Even Microsoft is on board, for some reason.
- kaliszad 6y agoMost corporations don't even support Macs and very often also don't support iPhones for mobile device management. Even in the IT department, you are very lucky if you can be "on your own" and use what gets the job done best/ you are most comfortable with. Oh and Bring Your Own Device isn't much of a thing here in middle Europe.
- owenwil 6y agoI can think of a few reasons not to, as someone who tried to use Linux first when switching away from macOS. The most notable of which is using Linux with a high-density 4k+ display is nightmarish at best; everything is either too big or too small, and at least in Ubuntu, fractional scaling is too broken to use on a daily basis – also requiring a ton of manual config and tweaking to even get usable. Windows, by contrast, works out of the box really well with HiDPI displays, and generally has a really well-refined experience these days, particularly between WSL2 and the Windows Terminal experience. It's the best of both worlds, without the hassle of dual-boot or manual config, IMO
- heavyset_go 6y agoFractional scaling on Plasma Desktop works just fine on Ubuntu 20.04. I wouldn't use it if that wasn't the case.
- fmakunbound 6y agoA few Windows HiDPI problems I've experienced with an external 4k display: all the task bar status icons are blurred nearly unrecognizably after a while, Qt-based applications seem to be twice as large (text scale, and widgets) than win32 based ones (sure it's a Qt thing, no Windows), Steam can't figure out where the pointer is after a while (seems to track the pointer as 1/4 of where it is in x/y coordinates), and win32 applications often appear blurred and require some compatibility setting via the .exe file's properties thing which I don't understand because it seems to make no difference. Honestly, Pop_OS! on the same setup is much smoother. Probably something to do with the HiDPI Daemon it has running. The only flawless operating system on this 4k external setup has been macOS. Can't think of any problems and that's my daily system.
- ShamelessC 6y agoI've never experienced the issues you describe with status icons or steam having pointer issues except perhaps when changing the DPI settings without logging out and back in. When was the last time you tried it? With regard to Win32 apps appearing blurry, I think that's a fair compromise considering Windows heavy focus on backwards compatibility.
- pier25 6y agoI also use Windows for music production. I built a Ryzen PC for around $1500 which is more powerful than the $6000 base Mac Pro. Thank god I left Logic years ago.
- simonh 6y agoOh absolutely, but to be fair the specs of the base level Mac Pro aren't really relevant to anything. If you're spending less than 5 digits on your Mac Pro, you're not doing it right.
- pier25 6y agoI wouldn't need to spend that much. It seems the highest MT score on Geekbench is the Mac Pro W-3275M with 19,189 points. An AMD Ryzen Threadripper 3990X gets 24,049 points and costs less than $4000.
- auganov 6y agoIt's not spelled out clearly, but I'm understanding that the main rationale here is to: - have an Ubuntu dev environment, - while benefiting from Win's RDP - AND also having access to native Windows for testing. Because Clojure runs perfectly well on regular Windows, it's not like WSL is required. So otherwise the author would have to have a separate Windows install just for testing.
- Borkdude 6y agoAuthor here. This sums it up well. I want the WSL2 setup so I can also keep running the zsh setup and bash scripts I was already using on macOS. For work I need to run several Docker containers in addition to the Clojure/Java stuff. Since I had not used Docker on Windows prior to WSL2, I jumped to the combination immediately. I figured that running everything in WSL2 was easier than some things inside and some things outside.
- auganov 6y agoWell if you don't strictly need Ubuntu chances are your scripts would work with Cygwin. Which operates under the regular Windows paradigm. Then you can use native Emacs too[0]. I've been doing Clojure stuff on a pure Windows setup for quite a while and honestly I liked it more than my current Linux setup (only switched because of some linux kernel features I needed). [0] note that ansi-term is (or used to be) broken on Windows tough , other than that pretty much everything works
- tootie 6y agoI think Cygwin and msys are essentially deprecated at this point. WSL is easier to setup and more compatible. I was big Cygwin fan for a long time, but I've definitely run into edge cases that it couldn't handle. WSL works pretty flawlessly for me so far and I can just use apt for package management instead of the Cygwin setup tool.
- auganov 6y agoDepends if you care about doing anything natively on Windows or not. Say Windows has perfectly good native support for NodeJS. If you go with WSL you'll be running WSL's Node. Many may not want that. Java/Clojure same deal. There's no problem with them on Windows. Running everything under WSL sounds like a big compromise to make to me. Though for Java/Clojure I could imagine you could still for most projects start your software from the normal java.exe as jars generally don't have platform specific code. But in my codebase I do actually use a few libraries that are system specific.
- deleted 6y ago[deleted]
- shmerl 6y agoWhy not run Linux natively? If you need Windows, you can run it in VM.
- anaisbetts 6y agoI don't know any legitimate mainstream reason why you would run Linux when WSL2 exists. It runs everything Linux does perfectly, but also with an operating system that isn't built around an 11-year old somehow still "experimental" display server that leaves fundamental use-cases like screen sharing to "an exercise for the reader"
- jameson 6y agoWSL 2 has issues: https://github.com/Microsoft/WSL/issues https://github.com/Microsoft/WSL/issues For most of the users doing a lightweight work, it might not be a problem but my repository is extremely huge and building on WSL 2 takes at least 5X more than natives Widnows or MacOS. https://github.com/microsoft/WSL/issues/4197 https://github.com/microsoft/WSL/issues/4197 edit: My use-case for WSL 2 is that I have codebase that only runs on windows / Linux. Switching between the two is cumbersome and VM takes a hit on performance. If I didn't need Windows then definitley no need to use WSL 2 and just go for Linux/MacOS
- qalmakka 6y agoIf Wayland doesn't work for you, you can still use Xorg, that has worked fine for millions of people in the last few decades. I like Wayland, but I won't switch until it gets to the same level of features and stability of Xorg. Also if we must be fair, Windows still has no way to reliably install Windows updates through SSH, because you apparently cannot elevate yourself, without even if you are logged in as administrator. I still need to RDP into my Windows instances while every other OS can conveniently be updated using just a few shell commands.
- oldmanhorton 6y agoWindows updates can be installed remotely/using only command line tools with Powershell, though I forget if it requires admin.
- zamalek 6y ago> Installing Ubuntu on new PC. The installer is surprisingly smooth, detects my wifi, even nvidia video card apparently. This is the advantage of the development model behind Linux "drivers." People with serious commitment to code quality review them. They typically should work more reliably. I usually don't complain about anything Windows, but certain OEMs (Dell, HP) clearly care only for hardware. I've been suffering through a comedy of awful drivers, culminating in using my phone to print. I wish WHQL did more thorough testing.
- boogies 6y agohttps://en.wikipedia.org/wiki/WHQL_Testing https://en.wikipedia.org/wiki/WHQL_Testing is out of date, does WHQL still exist, after Microsoft firing a testing division in favor of Windows Insiders?
- julioo 6y agoIt’s a little bit off topic but does any one make WSL2 working on Surface Pro with the LTE connection? Everything works fine un WiFi but nothing works with LTE.
- m0xte 6y agoUsually adapter protocol bindings related. I have the same problem on my desktop with WSL2. It turns IPv4 off for some reason!
- nickjj 6y agoWSL 2 is pretty decent honestly. I've been using WSL 1 + Docker for full time web development since early 2018 on Windows 10 Pro. Upgraded to WSL 2 when it hit the stable release and it works quite well. The only thing that sucks is mount performance for files outside of WSL 2's file system but if your source code is inside of WSL 2's file system it's very solid. This is with ~$850 worth of 6 year old hardware too (i5 3.2ghz, 16gb of RAM, 1st generation SSD, etc.). I never bothered to upgrade because everything I do around Flask / Phoenix / Rails / Node development + running Docker / VMs + etc. works great. I do video editing too. If anyone is curious what it's like, I made a video where I went over all of the tools I use on Windows and WSL 2 to have an acceptable dev environment for Linux based development https://nickjanetakis.com/blog/a-linux-dev-environment-on-windows-with-wsl-2-docker-desktop-and-more https://nickjanetakis.com/blog/a-linux-dev-environment-on-wi.... It covers both the Windows tools and how I have everything configured on the WSL 2 side of things (tmux, terminal Vim, etc.).
- 91edec 6y agoI'm really torn with WSL. WSL1 has far superior performance when performing I/O tasks on the mounted Windows drives, but slower than WSL2 locally. WSL2 is unbearably slow when performing I/O on the mounted Windows, using vim with a git pluggin or FZF is crippling. So I attempted to just use WSL2+vim on the linux local file system, but then when I try to run Windows npm scripts in a folder UNC paths cannot be understood by CMD.exe. It is the only thing preventing me from fully switching over.
- znpy 6y agoHave you considered switching to GNU/Linux instead? Given that you do all your work in a Linux environment already...
- nickjj 6y agoIf you have npm installed in WSL 2, what use cases are you running into where you need to run Windows npm scripts? You could exclusively run npm commands inside of WSL 2 and never have to touch cmd.exe.
- crb002 6y agoMy notes. Many yaks were shaved due to Windows hating my graphics card. https://github.com/chadbrewbaker/CompilingOnAWSLambda/blob/master/wsl2.md https://github.com/chadbrewbaker/CompilingOnAWSLambda/blob/m...