News for hackers. Stuff that matters.
Re:Rust for Windows by bezout on Thursday January 21, 2021 @02:47PM (#25863243)
OT: I must agree about your comparison of macOS and Windows. IMO Microsoft is doing a lot to improve the developer experience. WSL2 is so freaking good. It has its quirks and it has issues with some workflows, but I’m thinking about moving out of macOS after having tried it.

Apple may have the fastest processor, but Microsoft has the most comfortable tools. Both companies are not perfect, but if we must choose the lesser evil...

Re:Rust for Windows by cpeth on Thursday January 21, 2021 @04:07PM (#25864246)
"Apple may have the fastest processor, but Microsoft has the most comfortable tools. Both companies are not perfect, but if we must choose the lesser evil..."

It's very fast for a low power, laptop-focused processor and even then only truly excels at single-threaded workloads. It's out classed by AMD mobile offerings (4900HS and 4800U) in multi-threaded workloads on most tests[0]. If you step up to desktop processors, the top end processors like the AMD 5950X are in a different class of multi-threaded performance.

Don't get me wrong, it's an exceptional processor and incredibly fast for its sub-25W TDP.

[0] - https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...

Re:Rust for Windows by caycep on Thursday January 21, 2021 @04:33PM (#25864577)
This is simply a matter of adding more cores...I mean, I would hope the 5950x with its 16 full strength cores would be better than an M1 with it's big/little design...
Re:Rust for Windows by phendrenad2 on Thursday January 21, 2021 @07:10PM (#25866528)
I don't think it's as simple as adding more cores. Maybe the M1 doesn't scale up nicely.
Re:Rust for Windows by SekstiNi on Thursday January 21, 2021 @09:38PM (#25867632)
Looking at the die shot [1], they have plenty of space for cores and cache if they remove the GPU. Surely it's not that simple, but I believe they should be able scale to at least 8+4 cores without large interconnect changes, and at that point they are already knocking on the 5900X's door.

[1] - https://images.anandtech.com/doci/16226/M1.png

Re:Rust for Windows by NewLogic on Friday January 22, 2021 @03:34AM (#25869653)
I would suspect by the time that product releases, AMD will be allowed some 5nm fab capacity for a future Zen product release.
Re:Rust for Windows by MBCook on Thursday January 21, 2021 @08:07PM (#25866951)
We’ll find out this year.
Re:Rust for Windows by seertaak on Thursday January 21, 2021 @02:50PM (#25863303)
Indeed, WSL2 is pretty cool. Also, Windows Terminal is actually pretty sweet, and I even gave PowerShell a spin the other day. The crazy thing is you can basically use it as a bash shell, and it gets the job done. My developer experience right now consists of PowerShell, where I do all my regular directory jumping, editing (vim), etc., and a Developer Shell with god awful classic "terminal" which I only use to call conan/cmake/clang-windows.

I have to add the following: MSVC supports clang on windows. And CMake - all within Visual Studio. And it works perfectly, with perfect support for C++17. Badass.

Re:Rust for Windows by atonse on Thursday January 21, 2021 @03:33PM (#25863845)
MS has always been solid with developer tools, documentation, and dev relations.

Even though I prefer administering Linux servers any day over Windows servers, I find myself often missing PowerShell when I use bash. It has some quirks but some of the design decisions are exactly what you'd hope someone would make if they redesigned a command-line shell 40 years later.

I still find it comical that we proudly paste around commands that just wrangle text no differently from what perl programmers did in the 90s, using sed, print, cut, etc, when things like PowerShell moved to piping objects between commands. It just removes a whole class of ambiguity.

Re:Rust for Windows by blibble on Thursday January 21, 2021 @05:58PM (#25865765)
> MS has always been solid with developer tools, documentation, and dev relations.

in my 25 years of using their tooling and reading their documentation, they've never been more than what just qualifies as borderline acceptable

I booted up VS2019 today for the first time in a while (after waiting 90 minutes for it to install) and it still feels like using a Jetbrains IDE from 15 years ago, and it's still worse than what Borland produced in the 90s

... and it's even slower than IntelliJ IDEA, which just seems amazing as IDEA is written in Java

Re:Rust for Windows by jolux on Thursday January 21, 2021 @11:18PM (#25868261)
I find Visual Studio intolerably slow, I don't quite understand why but it's been bad since at least Visual Studio 2017. Rider and IntelliJ are both much faster and I prefer them.

The documentation is excellent in my experience though. I love it. Visual Studio is really the only Microsoft developer tool I don't like. Even Visual Studio Code is much better.

Re:Rust for Windows by devmunchies on Thursday January 21, 2021 @07:11PM (#25866538)
Agree. going through .Net ans ASP.Net documentation and none of the classes/methods have usage examples except for the super obvious ones (like the "String" class). They just show method signatures and that's it.

It as if the tools were built "by IDE users", "for IDE users".

Re:Rust for Windows by atonse on Thursday January 21, 2021 @09:06PM (#25867358)
They may have stagnated but MSDN was, for many, many years, some of the best documentation I had seen anywhere. (Java was pretty solid too, and also PHP).

But maybe I didn't stray too far off the beaten path?

Re:Rust for Windows by coliveira on Friday January 22, 2021 @05:42PM (#25877219)
MSDN has a lot of documentation, but it is not easy to use.
Re:Rust for Windows by MagnumOpus on Friday January 22, 2021 @04:40AM (#25870051)
> MS has always been solid with developer tools, documentation, and dev relations

The single most heavily used Microsoft dev environment is the Microsoft VBA Editor. It has not had any update in nine years and is virtually unchanged in 22 years since the release of Office 2000, incredibly outdated in terms of usability. It also cannot be replaced by using a text editor like other IDEs can. It is anything but solid.

Re:Rust for Windows by pjmlp on Friday January 22, 2021 @01:37PM (#25874594)
Except many end up installing VB.NET and using Office COM Automation instead.
Re:Rust for Windows by knicknic on Friday January 22, 2021 @12:04AM (#25868509)
Why not just install powershell on Linux?
Re:Rust for Windows by 908B64B197 on Thursday January 21, 2021 @03:54PM (#25864105)
> 90s

The paradigm of sending text in and out of pipes is ~20 years older than that.

Re:Rust for Windows by atonse on Thursday January 21, 2021 @09:04PM (#25867346)
I had actually written an earlier date but then I realized I was talking about Perl :)

I think perl was created in the early 90s, correct?

Re:Rust for Windows by to11mtm on Thursday January 21, 2021 @09:15PM (#25867427)
I believe the annals of history say 87

[0] "1987 - Larry Wall falls asleep and hits Larry Wall's forehead on the keyboard. Upon waking Larry Wall decides that the string of characters on Larry Wall's monitor isn't random but an example program in a programming language that God wants His prophet, Larry Wall, to design. Perl is born."

[0] - http://james-iry.blogspot.com/2009/05/brief-incomplete-and-m...

Re:Rust for Windows by boogies on Friday January 22, 2021 @02:43PM (#25875425)
+1 for linking such beautiful annals
Re:Rust for Windows by 908B64B197 on Friday January 22, 2021 @12:21PM (#25873712)
I misunderstood your post. You are 100% correct about perl.

I understood it as 'shell computing with stdin and stdout streams of characters' instead of structured data coming in and going out.

Re:Rust for Windows by wirrbel on Friday January 22, 2021 @03:20AM (#25869583)
I think they even ship powershell now for non-windows OSs.
Re:Rust for Windows by lokedhs on Friday January 22, 2021 @12:43AM (#25868717)
Windows Terminal is very difficult to work with if one has astigmatism that prevents working with dark background.

I don't usually use Windows, so perhaps I didn't spend enough time on it, but I was unable to create a colourmap with white background that didn't look horrible with some software. No matter how much I changed the colours, there was always some combination that gave me light grey on white or something like that.

If anyone has a colourmap I can use, that would be really appreciated.

Re:Rust for Windows by ryantriangles on Saturday January 23, 2021 @03:21AM (#25880627)
Here's the colormap I use, which I've made sure never has too-bright colors on the near-white background: https://pastebin.com/raw/AdR3sBSs

Microsoft publish a tool in the Windows Terminal GitHub repo, ColorTool.exe[1], which can turn iTerm2 color scheme files into Windows Terminal ones. That might be your best bet because there are huge repositories of good iTerm2 schemes[2] and really slick tools to quickly make your own with live previews.[3]

[1] https://github.com/Microsoft/Terminal/tree/main/src/tools/Co...

[2] https://github.com/mbadolato/iTerm2-Color-Schemes

[3] https://terminal.sexy/

Re:Rust for Windows by bezout on Friday January 22, 2021 @02:20AM (#25869302)
I guess it depends. I use the Windows Terminal, and I have high astigmatism and myopia. I find it very readable using the Cascadia Code font. Btw I agree about dark backgrounds being less readable but I can’t get away with light backgrounds because of eye floaters.
Re:Rust for Windows by Kipters on Friday January 22, 2021 @02:50AM (#25869444)
I'm astigmatic but I never noticed any issue with dark backgrounds, not only in Windows Terminal, I didn't know it could happen
Re:Rust for Windows by lokedhs on Friday January 22, 2021 @04:42AM (#25870059)
I don't think it happens to everybody with astigmatism. I cannot read any text with black background. After a very short amount of time I'm unable to read anything, and once I take my eyes off the screen it feels as though I've been staring into the sun.

There used to be a great Firefox plugin that allowed me to change the colours of web pages that use black background, but it doesn't work anymore, and I haven't found a good replacement.

Re:Rust for Windows by prionassembly on Friday January 22, 2021 @09:02AM (#25871720)
This has to do with screen glare. A matte screen might treat you better.
Re:Rust for Windows by lokedhs on Friday January 22, 2021 @09:38AM (#25871971)
I only use matte screens. It definitely isn't that though. I didn't mean to say that black screens are too bright, that wouldn't make any sense.

What I tried to explain was the sensation, not the actual effect. It was a really bad example, I agree.

Re:Rust for Windows by jolux on Thursday January 21, 2021 @03:05PM (#25863517)
Visual Studio has supported Developer PowerShell for a while now, and it’s possible to load it into Windows Terminal. It’s just a set of arguments. This blog post explains them: https://devblogs.microsoft.com/visualstudio/say-hello-to-the...
Re:Rust for Windows by unnouinceput on Thursday January 21, 2021 @03:36PM (#25863893)
Wait until you find out CygWin is a thing for decades and you could've used Linux style under Windows all this time
Re:Rust for Windows by naikrovek on Thursday January 21, 2021 @04:18PM (#25864371)
Not at all the same. Not at all.
Re:Rust for Windows by girvo on Thursday January 21, 2021 @05:40PM (#25865548)
I mean sure it’s not, but back in the late 2000s I did everything under it and it made for a great experience. It’s little package manager was handy, everything I needed was there, it worked surprisingly well.
Re:Rust for Windows by 40four on Thursday January 21, 2021 @10:38PM (#25868031)
I agree. I recently bailed on WSL because my poor crappy laptop was buckling under the weight of the extra resource demand.

I’m not using Cygwin, but similarly, I decided to trick out my git bash with extra packages from MSYS2. I have all the Linux tools I need, been having a great experience with it.

The amount of resources it takes to run WSL, or a virtual box on older hardware can be devastating. You don’t hear this mentioned much.

Re:Rust for Windows by naikrovek on Friday January 22, 2021 @03:53PM (#25876227)
WSL1 doesn't use a virtual machine, and only implements Linux syscalls as NT kernel syscalls. There's no VM or OS overhead; WSL1 is 100% userland software, except for the kernel translation stuff.

You should not have any issues with WSL1 in terms of system load or "weight" (whatever the hell that is supposed to mean in computer terms. This is used all the time and I've never once seen a definition for it. What is the unit of measurement? What's the border between "lightweight" and "not lightweight?" This industry as a whole ingests far too many hallucinogens. )

Re:Rust for Windows by heresie-dabord on Friday January 22, 2021 @03:59AM (#25869780)
Cygwin offers excellent out-of-the-box GNU userland functionality. It is fast and open-source, with a generous set of packages and languages. I can pin it and have a stable, internally consistent GNU userland. Very good for a developer using several interpreted languages.

Cygwin has its quirks and flaws, like any software. But so does a full distro (Ubuntu, no less) running inside Windows 10.

Re:Rust for Windows by naikrovek on Friday January 22, 2021 @03:57PM (#25876267)
WSL1 isn't a full distro, it's only the userland stuff. You can also easily make your own userland in Linux, tar it up the deploy it as a WSL environment. It's really nice.
Re:Rust for Windows by nitrogen on Thursday January 21, 2021 @05:20PM (#25865248)
There was even a period of time when Cygwin's X server supported GLX and I managed to get some OpenGL software I wrote for Linux to run in Cygwin, but for some reason it was removed or stopped working.
Re:Rust for Windows by andrewmackrodt on Thursday January 21, 2021 @06:33PM (#25866174)
You can still accomplish this with the cygwin packages xorg-server and xinit. You can then export DISPLAY=:0 in your bash shell and have working OpenGL, e.g. glxgears assuming you have the necessary packages available in your "remote" session/WSL. Here's a GitHub gist I use for this: https://gist.github.com/andrewmackrodt/b53943185bbbd804ef4b0...
Re:Rust for Windows by jhoechtl on Thursday January 21, 2021 @05:57PM (#25865755)
What is windows terminal? cmd?
Re:Rust for Windows by mmgutz on Friday January 22, 2021 @04:05AM (#25869810)
It's like the the terminals found on Linux. I would give it a recommendation but I still encounter issues with tmux session and mouse (yes I have the latest from github installed). I recommend the terminal in VSCode which works as expected with ssh + tmux.
Re:Rust for Windows by bhauer on Thursday January 21, 2021 @06:03PM (#25865820)
Re:Rust for Windows by wayne on Thursday January 21, 2021 @08:20PM (#25867033)
Re:Rust for Windows by Kwpolska on Thursday January 21, 2021 @06:08PM (#25865886)
Re:Rust for Windows by hctaw on Thursday January 21, 2021 @03:49PM (#25864039)
> Apple may have the fastest processor, but Microsoft has the most comfortable tools.

It doesn't matter how fast the M1 is if XCode can't keep up with modern development tools. I don't understand how Apple developers produce any software with it, the experience is truly awful compared to nearly every alternative. It's slow, buggy and inscrutable. How long does it take to onboard a fresh grad at Apple, I wonder?

Re:Rust for Windows by kitsunesoba on Thursday January 21, 2021 @06:09PM (#25865889)
I think IDEs may be a bit more subjective than are often presented. Personally speaking, my experience with Xcode has been just ok (not amazing) while IntelliJ based IDEs have been clunky and arcane, with some of their "smarts" functioning in ways that aren't expected or intuitive at all. Both are functional if you let me pick which to spend a work day in, it'd probably be Xcode.

What one is first exposed to and how they're exposed to it probably makes a big difference.

Re:Rust for Windows by kenjackson on Thursday January 21, 2021 @05:14PM (#25865179)
I have an existing app in Swift and Interface Builder. I hate xCode. Simple things like deploying the app to a device is hit or miss (usually miss). Is there a development environment that I could use for my app which is better? Happy to use any platform (MacOS, Linux, Windows).
Re:Rust for Windows by hctaw on Thursday January 21, 2021 @05:27PM (#25865348)
App Code is probably the only thing worth checking out. Swift isn't a useful language outside of the Apple ecosystem and interface builders come and go, usually go (design in Figma/Adobe products, implement in Code rather than UI wysiwyg)
Re:Rust for Windows by chx on Thursday January 21, 2021 @03:26PM (#25863761)
> WSL2 is so freaking good.

I am on WSL1 two things hold me back from upgrading

1. How's networking? I go on and off VPNs quite a bit.

2. How's cross system access to files especially performance wise? I edit with phpstorm for windows, I share the files with Slack also windows, I access the same files with WSL git, LAMP stack and more.

Re:Rust for Windows by kyriakos on Thursday January 21, 2021 @03:38PM (#25863918)
1. Just works. Only issue I found is that Wsl2 will not update its dns resolver IPs when connecting to the vpn. There's a workaround script. So it's either exit the terminal and re enter it or run the script to update them.

2. This is my current pain. Windows file system is slow already and accessing it from wsl adds an overhead. Ideally I keep projects in Wsl2 storage and IDEs in Windows. I searched a lot for a solution but haven't found one. On the other hand, Wsl2 Linux storage speed runs circles around wsl1.

Re:Rust for Windows by mynameisash on Friday January 22, 2021 @12:11AM (#25868542)
I never had an issue with WSL1 until some bizarre bug that cropped up seemingly out of nowhere in which I would blue-screen during some Rust compilation. I didn't have the issue after maybe four or six months of using Rust in WSL1 until suddenly I did. Upgrading to WSL2 fixed the problem.

Publishing Rust crates does require a workaround[0] in WSL2 if it's from a Windows directory. That's annoying but pretty infrequent (for me) and not a difficult workaround.

Except for those two issues, I've not had any problems in either WSL version - certainly nothing that would give me pause to using either one.

[0] https://github.com/rust-lang/cargo/issues/8439#issuecomment-...

Re:Rust for Windows by peschkaj on Thursday January 21, 2021 @03:58PM (#25864151)
I use X410 and run tools from inside of WSL2 by exporting the display. Works well for Emacs, JetBrains Rider, and every other GUI application I've tried so far.
Re:Rust for Windows by naikrovek on Thursday January 21, 2021 @04:20PM (#25864403)
Concur. X410 is great and survives where xming and vcxsrv both crash for me. It's not free but the "not crashing" feature makes it well worth the $10 I paid for it.
Re:Rust for Windows by girvo on Thursday January 21, 2021 @05:42PM (#25865568)
That sounds excellent: I’ll have to give it a shot. VSCode under WSL2 with its Docker support is neat, but can be slow due to the storage system overhead. This might solve that for my team!
Re:Rust for Windows by baq on Friday January 22, 2021 @05:10AM (#25870217)
re 2) try NFS exports on either host windows or WSL2. i've used an nfs mount inside WSL2 and it works very well. don't put it in /etc/fstab, though - for me it caused a WSL2 hard lock on start.
Re:Rust for Windows by ben-schaaf on Thursday January 21, 2021 @08:43PM (#25867188)
> As a rule of thumb, WSL 2 accessing host (NTFS) files is about 5 times slower than WSL 1 accessing those same files.

https://vxlabs.com/2019/12/06/wsl2-io-measurements/

Re:Rust for Windows by TheOperator on Thursday January 21, 2021 @03:05PM (#25863516)
Buying Microsoft for it's OS and Apple for it's hardware? What is this opposite day?
Re:Rust for Windows by jhoechtl on Thursday January 21, 2021 @05:55PM (#25865739)
Unleash all your handcuffs and move directly to Linux. It will be really refreshing!
Re:Rust for Windows by vijaybritto on Friday January 22, 2021 @12:12AM (#25868547)
Please know that networking in WSL2 is a nightmare if working in a VPN. We are currently staying in WSL1 because the internet wont work in WSL2 under the corporate VPN.
Re:Rust for Windows by bezout on Friday January 22, 2021 @02:26AM (#25869332)
Re:Rust for Windows by baq on Friday January 22, 2021 @05:12AM (#25870229)
cisco anyconnect is notorious for that. you have to bump its interface metric above a certain value so WSL2 network or whatever does the routing can do its work.