6 ms·
Rust needed a GUI and Microsoft provided one. They seem to be very focused on giving developers what they need, but only to a point. I've been doing some system
by phkahler 6y ago
Rust needed a GUI and Microsoft provided one. They seem to be very focused on giving developers what they need, but only to a point. I've been doing some system glue stuff and while it's nice that powershell has ssh an scp they are missing some options I want. I was going to use curses with python (batteries included!), only to find out it's not supported on windows.
It almost feels like a strategy - be standard enough to bring people in, but idiosyncratic enough to lock them in.
I'll be using gtk-rs thank you very much.
- dgellow 6y agoWSL2 has almost everything you need if Windows isn’t enough
- boogies 6y agoYep, WSL2 is standard enough to draw some in. Its DirectX support is a[n early baby] step in the direction of making it idiosyncratic enough to keep them locked in (we should probably expect more in the future. Right now it otherwise seems to be just a VM, without a lot of non-standard stuff to give it an advantage over running the more stable OS on the bare metal and keeping the BSODing one contained with virtualization).
- oaiey 6y agoWell they bring in the language and its runtime to windows development via WinRT. They don't bring WinRT to Rust. This is the windows team writing adapters for their COM API surface. They do the same for C++, C#, JS and now Rust.
- Spivak 6y agoFor people who have not lived in the Windows world this would be like GNOME writing Rust Glib bindings.
- kyriakos 6y agoJS? can you point me to that?
- oaiey 6y agoSearch WinJS. However, i agree with the sibling comment that this is a maintenance only story.
- ptx 6y agoDidn't they remove the JavaScript WinRT projection? The docs[1] describing how to call a WinRT component from JS say: Universal Windows Platform (UWP) projects are not supported in Visual Studio 2019. See JavaScript and TypeScript in Visual Studio 2019. To follow along with this section, we recommend that you use Visual Studio 2017. See JavaScript in Visual Studio 2017. [1] https://docs.microsoft.com/en-us/windows/uwp/winrt-components/walkthrough-creating-a-basic-windows-runtime-component-in-cpp-and-calling-it-from-javascript-or-csharp https://docs.microsoft.com/en-us/windows/uwp/winrt-component...
- contextfree 6y agoSort of, it was/is built in to Chakra (the JS engine in IE9+, old Edge, and the original UWP WebView based on those browser engines) and hasn't been ported to the new Chromium-based Edge or the WebView2 based on it. There's also a separate NodeRT projection for generating Node/Electron modules: https://github.com/NodeRT/NodeRT https://github.com/NodeRT/NodeRT
- mumblemumble 6y agoI do think it is a strategy, but I think it's a rather simpler one than that: basic work triage and scope management. ssh and scp make sense to put into powershell, because they're everyday sysops things. curses is pretty posix-specific, and apps that use it are likely to need other posix stuff, so handle that with WSL rather than unnecessarily re-inventing a wheel.
- koheripbal 6y agoNever attribute to malice what can be adequately explained by incompetance, laziness, or limited resources.
- nitrogen 6y agoIt's hard to forget that Microsoft's official, documented policy for a very long time was Embrace, Extend, and Extinguish. It all feels very vaguely analogous to the West's relations with China and Russia -- both China and Russia appeared very open for a time, and then closed back down after gaining enough leverage.
- mumblemumble 6y agoIt's hard for me to see why we are doggedly ignoring the existence of WSL in an effort to manufacture a controversy. We've got a square peg, and an operating system that has both a round hole and a square hole. There is nothing nefarious about choosing not to use the round hole.
- alexfromapex 6y agoThat's exactly what this is, a way to sink their proprietary claws into Rust and try to influence the market the way they have done with most of their software for decades.
- jvanderbot 6y agoMicrosoft has reinvented themselves, but the old hatred won't die easy. I'm excited for Intel to do the same, and look forward to the lingering suspicion even then.
- alexfromapex 6y agoI disagree that they've reinvented themselves: https://www.computerworld.com/article/3568009/slack-files-eu-antitrust-complaint-against-microsoft-cites-anti-competitive-teams-bundling.html https://www.computerworld.com/article/3568009/slack-files-eu...
- dimitrios1 6y agoThe solution for this is rather simple, and until Windows does it, I will always be skeptical of their renaissance as some benevolent contributor to open source: open source windows.
- ChrisSD 6y agoSure! Presumably you're volunteering to track down the current rights holders for all code derived from third parties and will negotiate the relicensing of their contributions?
- dimitrios1 6y agoNope, I am volunteering the trillion dollar market cap corporation to do that.
- sgift 6y ago
- mwcampbell 6y ago> I'll be using gtk-rs thank you very much. Please be aware that if you do this, your application won't be accessible with screen readers or other assistive technologies on Windows and Mac. At least not now. Maybe I'll have time to implement GTK accessibility backends for those platforms someday.
- Blikkentrekker 6y agoScreen readers rely on some kind of toolkit a.p.i.? I would assume they would simply read the screen. Are they thus not capable of, for instance, reading a picture? They should not be called “screen readers” but “text to speech” if they not actually read the screen on a bitmap level.
- riquito 6y agoScreen readers, despite the name, don't do OCR, they access informations provided by the GUI toolkit (which is one of the vastly improved area in GTK 4 Afaik).
- Blikkentrekker 6y agoThen why don't actual screen readers exist when a.i.'s at this point can practically solve captcha's by enhancing the reflexion in the eyes of a highly compressed jpeg and reading the text in there? Certainly there would be significant demand for a sightless man to be able to read the dankest memes from pictures?
- danShumway 6y ago> Then why don't actual screen readers exist when a.i.'s at this point can practically solve captcha's Training a computer to solve a captcha is a lot easier than training a computer to understand interface conventions. There isn't an AI that can look at a jpeg screenshot of an interface and say, "there's two input elements, and it looks like they're grouped together and control the list to the left of them, and one of them is selected, which I can tell because it has some kind of subtle glow effect on it, but not the glow effect you would get if you moused over it." There's nothing that can realistically do that today, and it wouldn't be fast enough or performant enough for low-powered cell phones and laptops even if it did exist. If you're just looking at describing pictures themselves... sure, Facebook does auto-generate alt tags for images if you forget to put one in. And Youtube auto-generates captions. Those are valuable services, but they have a lot of glitches and mistakes. If you're a blind reader, you'd prefer not to have that experience when you're using a piece of software, you'd prefer something that just works reliably. It's the same reason you probably used a keyboard to type this comment instead of speech to text. Speech to text is useful in some cases, but not good enough or accurate enough that you would want to use it as your main input method.
- heavyset_go 6y ago> I'll be using gtk-rs thank you very much. How well does gtk-rs work as a cross-platform GUI library? I know it works well on Linux, but I haven't tried it on macOS or Windows. If anyone has experience using it for cross-platform development, I'd love to hear about it.
- Macha 6y agoIt works. The windows theme is a little dated, but Windows users are used to a random mishmash of inconsistent styles, so likely won't cause complaints. On Mac, well actually I haven't personally tried it on Mac, just Windows/Linux, but I hear a lot of vocal complaints about GTK not fitting in from mac users. I'm not sure this means it's worse than on Windows, I think Mac users just expect more.
- freeone3000 6y agoYou'll need to install windows-curses, since cmd.exe didn't support vt100 escape sequences until relatively recently, and still requires a special WinRT call in order to enable them. But it's a bit telling that the first hurdle you hit in running python on windows was the operating systems choosing different forty-year-old terminal emulator escape sequences. :)
- pjmlp 6y agoWindows Terminal is the actual solution.
- DHowett 6y ago"still requires a special WinRT call in order to enable them" Which WinRT call would that be? Hi, owner of the Windows Console here. Enabling VT control sequences is a matter of setting the ENABLE_VIRTUAL_TERMINAL_PROCESSING mode on the output handle, and it's available through the same interface as every console mode flag that came before it. SetConsoleMode has a long history--dating back to the nineties--that this just builds on. It's behind a flag so that applications developed before ca. 2015 that like to emit control characters to the screen don't melt away into gibberish.
- freeone3000 6y agoYes, that'd be the call in question; it requires cross-platform vt100 apps to specifically know about and call a feature on windows in order to enable it. They can't just emit control characters to terminal, they must call this WinRT function first. This isn't something you can fix, for the reasons you listed, but it's something that's true. As a side note, Windows Terminal (the app) is absolutely fine letting programs emit and handle VT100 escapes without them issuing any particular opt-in call themselves... And upon looking, you're the person who enabled this feature! Thanks for that, but, why is it good for terminal but bad for conhost?
- DHowett 6y agoSorry, I had my Microsoft-colored glasses on. We use WinRT almost exclusively to refer to the new COM-based API surface that “modern” applications use. I see now that I’ve misunderstood you :) Back when VT parsing was implemented, it was an entirely new output stream parser built into a console that hadn’t been updated in a rather long time. We were careful commensurate with its age, and opt-in made sense. Language runtimes or compatibility layers like Cygwin could handle the decision for all of their hosted applications(1) and everything else would generally continue working properly. Now that we’re working on conhost’s replacement, we get to revisit some of those decisions! Cases like this are especially acceptable because a user can always fall back to conhost. That escape hatch isn’t one we intend to get rid of. 1) this doesn’t do anything for manual or direct ports, and Cygwin is far from the only provider here. Representative example, etc.
- Already__Taken 6y agocurses specifically is majorly antithetical to how powershell and by extension Windows/server has decided to evolve. infact text-based UI is the reason CMD.exe cannot and will not ever be improved. munging anything around with text very much not the Windows way. For better or worse.
- chiph 6y ago> They seem to be very focused on giving developers what they need, but only to a point. This may be a consequence of the consent decree they signed in the early 2000's, where it was alleged that they used their control of Windows APIs to further Internet Explorer market share at the expense of other browsers. Since then they have had to be careful not to act like a monopoly. https://en.wikipedia.org/wiki/United_States_v._Microsoft_Corp https://en.wikipedia.org/wiki/United_States_v._Microsoft_Cor....
- majkinetor 6y agoSo Windows didn't port every single linux lib in existence and you call it 'strategy' ?