13 ms·
Microsoft is busy rewriting core Windows library code in memory-safe Rust
- shp0ngle 4y agoI can now get personalized ads in my operating system in a memory safe way! Great
- mateuszf 4y agoIt's not fair to reduce the role of Windows to an advertising tool. It's also a spyware.
- hdjjhhvvhga 4y agoIt's interesting we got to the point where I would gladly pay Microsoft a yearly fee for not introducing any (of what they call) innovations. I just need stability and security updates. Instead, in W11 I got all windows grouped without the possibility to ungroup them. And the main browser set up to their MSN page that actually serves fraud links as news. Could they go lower than that?
- shp0ngle 4y agoLTSC is basically that, but Microsoft basically won't sell it to you if you buy single licenses. There are legal resellers, that sell them for about 200-300 USD per license. There are shady resellers, that sell them very cheaply, but I always suspect they are pirated.
- justsomehnguy 4y ago> sell them very cheaply, but I always suspect they are pirated. You can't buy something for $100 and sell it for $20. Well, you can, but this is not a sound business model. It's always amusing for me when people assume they can buy a 'legal' copy/key for $5-10 'somewhere on the net'.
- e12e 4y agoCould be reselling from bankrupt companies though?
- justsomehnguy 4y agoNo, because these licenses are named ie contract is valid only between Microsoft and the $company. Any other entity is not the subject of the licensing contract. The only way to resell something from a bankrupt company is to buy a retail box versions of software in the first place and LTSC is not available in retail.
- hdjjhhvvhga 4y agoIt's a bit more complex than that. Windows licenses come in various variants with one common trait: they have very specific conditions regarding license transfer. Basically, Microsoft tries to define a very limited set of conditions that let you transfer the license. The problem is, not all of these are enforceable in all jurisdictions. One example: > If you acquired the software from a retailer as stand-alone software, you may transfer the software to another device that belongs to you, but not more than one time every 90 days (except due to hardware failure, in which case you may transfer sooner). It is highly probable that, if anybody cared, you could win such a case in a European court but I'm not aware if anyone bothered to try.
- e12e 4y agoI suppose in the US the question is if it is indeed considered a license or a sale; wether or not the first sale doctrine applies. I thought this had recently been ruled in favour of re-sale - but the newest i could find was on Vernor v. Autodesk, which goes the other way... https://dunnerlaw.com/buyer-beware-the-threat-to-the-first-sale-doctrine-in-the-digital-age/ https://dunnerlaw.com/buyer-beware-the-threat-to-the-first-s...
- sai_c 4y agoIf I were a Rust user, I'd be really afraid of what will happen to Rust when Microsoft gets hold of it in any way. Just look at what happened to C++ after it got popular because of Windows/Visual C++ and the strong ties between Microsoft and WG21 in the 90s/00s. To quote Steve Jobs: "They just have no taste."
- nindalf 4y agoThis is FUD. Microsoft doesn't "get a hold of" Rust by using Rust, any more than you get a hold of it by writing Rust programs. With C++ they had their own compiler implementation, which obviously diverged. This is common for independent code bases. Whereas with Rust they're contributing positively to the main compiler implementation. Just one example - see all of Ryan Levick's (@rylev) contributions to Rust. Not just with code, or with tutorials, but in regular unglamorous work like running weekly compiler performance meetings. Microsoft is also a platinum sponsor to the Rust foundation. The foundation uses this money to directly sponsor folks working on the language and library authors.
- penguin_booze 4y ago> Beyond the presumed safety improvement, performance is said to be 5 to 15 percent faster for Shaping (substituting) glyphs with OTLS (OpenType Library Services). That's all available to developers now. I'd be interested to know as to why a simple rewrite (from C++, no less) would give you this kind of upgrade.
- xony 4y ago[dead]
- deleted 4y ago[deleted]
- hulitu 4y ago> Microsoft is busy rewriting core Windows library code in memory-safe Rust They shall be busy fixing the bugs in Windows 10.
- 1letterunixname 4y agoIt's the same shit at Meta. It's developer job security. Random group decides to rewrite in Rust but then breaks their shipped codebase for 3 weeks. They don't care. They have a new toy and don't care if they break things other people use.
- ativzzz 4y agoThis is how I feel about devs forcing rust onto web UI development (https://news.ycombinator.com/item?id=35722681 https://news.ycombinator.com/item?id=35722681). JS exists and people already make new toys (frameworks) for it every month. That's not enough and now we need rust on the frontend
- 1letterunixname 4y agoI care if it's written to be better and cheaper to maintain. I don't care about a new Javascript, Rust, or (latest religion) framework, this or that, unless the approach is better than what came before and it's part of sound governance. Code should not be religious, it should be functional and focused on its purpose.
- xedrac 4y agoI often advocate for the use of Rust, but it's not the right tool for every job. If one of these conditions is met, I'll happily use Rust: - Cannot have garbage collection - Need the raw speed of C - Need to provide a C interface - Already have a lot of Rust code in the project Having said that, I very much prefer statically typed languages, and ones with a focus on correctness and safety. Rust and Haskell both fit that bill very well.
- waboremo 4y agoThankfully most of that seems self-contained to Reddit/HN in pet projects. My god what a disaster for the web that would be, shoving everything into WASM despite zero performance reason to.
- zeroxfe 4y agoNobody's forcing anything. This is hacker culture, and it's what drives progress. Get over it.
- petilon 4y agoIf Microsoft is getting value out of Rust, I hope they add Rust as a supported language in Visual Studio.
- zip1234 4y agoHave you tried it on VS Code? Have found the Rust experience in VS Code to be pretty good.
- qalmakka 4y agoRust with rust-analyzer is IMHO very good nowadays, probably on par if not better than the experience with C++ on paid IDEs. The fact Rust grammar is context-free makes writing tools way easier because there's way less room for breakage, unlike when you write an extra > in C++ and parsing burns down in flames.
- steveklabnik 4y ago(Rust’s grammar is technically not context free but the part that’s context sensitive is rarely used and even more rarely at a depth greater than one, so you’re right in spirit but I feel the need to be a bit pedantic about it for fairness’ sake)
- qalmakka 4y ago(I know, but if you take raw literals out of the equation it more or less is, thankfully you can implement raw literals as a big huge lexer hack and ignore it during parsing. There's also macros, which are a separate pickle, but then the user more or less expects they may cause some magic, sure it's vastly better than `bob<flop>(blaz)` which is not sane in any metric I can think of)
- 13of40 4y agoI don't know what it's like now, but back in the day devdiv (owners of Visual Studio, .Net, etc.) and Windows were highly siloed and it was hard to get them to align on a common way forward. Rust seems like the sort of thing devdiv would naturally pick up though.
- mise_en_place 4y agoPeople still use GDI+? That brings me back.
- zeusk 4y agoWindows Remote desktop (display redirection) used a GDI xpddm driver up till Windows 19h1 (and Windows Server 2022). They switched to IddCx which is pretty cool to play with.
- just_for_you 4y agoI actually used raw GDI+ for the GUI of an app recently. My personal requirement was that the executable had to be completely stand-alone and only a few KB in size. GDI+ helped fit the bill for creating a simple GUI and eliminating dependencies on large frameworks, so that it could easily be copied around and guaranteed to work everywhere. Wouldn't use raw GDI+ for any UI of moderate complexity, but it was perfect for the ghetto app I made myself.
- HideousKojima 4y agoEven in C#, the default image handling libraries use GDI+ still, even in .NET 7. There was some sort of attempt to make it work on Linux (via some sort of shim or comparability layer, I assume) but MS abandoned those efforts after .NET Core 3.1
- pjmlp 4y agoYes, it is much easier to use than Direct2D.
- SheinhardtWigCo 4y agoIt would be amazing if there were a Manhattan Project for eliminating memory-unsafe code from modern operating systems and browser engines. This would probably increase the cost of pwning VIPs and critical infrastructure by several orders of magnitude.
- _8j50 4y agoI don't think so. Outside of labs, I can't remember needing memory safety exploitation or hearing about a major compromise that used such an exploit. I am not saying the security improvements are not real, just not orders of magnitude. For example some post exploitation stuff like BYOVD I am sure would be much harder. A lot of vulns are just mistakes people made. Perhaps LLMs can help with that in the neat future but right now you hardly even need a CVE to compromise even well protected networks. A little phish here, a little abuse of legit software there, patiently look for services and credentials that aren't well protected and voila. Few actors use 0days and auto-updates have made 1-days hard to rely on
- selfmodruntime 4y ago> I don't think so. Outside of labs, I can't remember needing memory safety exploitation or hearing about a major compromise that used such an exploit. NSO group. Stuxnet.
- _8j50 4y agoI said "I" as in myself who is neither of those things. I also said the following because of in part the point you are trying to make: > I am not saying the security improvements are not real
- astrea 4y ago[flagged]
- stouset 4y agoWhat exactly leads you to believe these “better” developers aren’t already working for employers who benefit from these skills? If they are already working elsewhere, what do you think happens when they go to Microsoft and leave their current employer?
- sn_master 4y agoNow if they can make the Search work inside directories like it was until Windows XP. They somehow broke it in Vista and never fixed it until now.
- jve 4y agoHow many years and counting and MS still can't make search work? So much comments about how search is screwed up. For me I can't stand it sometimes doesn't find that I know there is. Or sometimes I don't really know that something is or is not there because I can't trust the search. And sometimes it just wont search. Or does it really slowly
- twelvedogs 4y agoIt's really silly how much better Fast tiny 3rd party programs like everything search so much faster than windows search
- qalmakka 4y agoI personally gave up on GUI file searching a long ago, it's one thing that sucks everywhere IMHO. I'll take CLI tools like locate or `fd` any day, they are IMHO quicker to use even on Windows.
- kk_cz 4y agoJust use Everything (https://www.voidtools.com/ https://www.voidtools.com/), so much better than Windows Search.
- layer8 4y agoThe latest version supports searching file contents now, though it's slow because the contents isn't indexed.
- mock-possum 4y agomy favorite FOSS goto for searching contents in Windows is AstroGrep - https://astrogrep.sourceforge.net https://astrogrep.sourceforge.net
- megablast 4y ago[flagged]
- NegativeK 4y agoEven Microsoft doesn't want the type of ads that memory safety vulnerabilities let in.
- andrewstuart 4y agoRust is the best option for writing memory safe code. However, it is far from a good option. Rust is overly complex and this is going to bring its own issues to Windows.
- rgrmrts 4y agoWhat kind of issues?
- andrewstuart 4y agoComplexity is an issue.
- goolz 4y agoIndeed. Perhaps some examples of how Rust is? Would be interested why you think that.
- zgk7iqea 4y agoBecause of the minimal standard library, the ecosystem is fractured into crates (similar to npm). Also, rust forces you to actually model the complexity of the real world. I think the best example for this are the various string types. There is one for Interop with C, one for Paths, one that is utf-8 etc. Your code explicitly states what to do with edge cases. Edge cases that existed anyway but are now visible. Don't get me wrong, I don't dislike Rust. It's an awesome language.
- vlovich123 4y agoCompared to C/C++, I’d say the Rust standard library is very feature full. Regarding crates, they are super easy to pull in compared with random C/C++ libraries, and the crates generally are fairly high quality.
- rastignack 4y ago
- senectus1 4y agohttps://www.youtube.com/watch?v=8T6ClX-y2AE https://www.youtube.com/watch?v=8T6ClX-y2AE This is the announcement video. its about an hour long but much of it is very interesting. "Adminless windows" sounds very interesting.
- vxNsr 4y agoUgh that whole talk is announcing a whole bunch of things that make it much harder for smaller devs to get started. They want a signing chain that will inevitably cost thousands of dollars just to get approved with some sort of annual fee tacked on as well, so as a independent dev you can either go through that rigmarole or just not target windows, or you need to walk your users through disabling the smart filter thing first...
- Aleklart 4y agoadminless and passwordless windows: population 9001 (spyware telemetry entities)
- singularity2001 4y agoI wonder if somehow someday Microsoft Windows can be rerooted as something like wine running in user space of a rust os like https://github.com/theseus-os/Theseus https://github.com/theseus-os/Theseus
- MagnumOpus 4y agoThe kernel space of Windows is not a problem, it has been fit-for-purpose and even good for the last 20-odd years. The problem is the deterioration in the UI and UX side of the OS (adware, spyware, hodgepodge of UI paradigms, spotty GUI settings apps, reset of preferences after any serious update, bad built-in tooling forced on the user etc).
- ShadowBanThis01 4y agoThey need to re-do the entire Windows UI from the ground up. It's a disgrace today.
- ShadowBanThis01 4y agoUh-oh! I offended some Windows apologist!
- Winsaucerer 4y agoOr alternatively, your comment is being downvoted for being random and off topic.
- nindalf 4y agoI downvote anyone complaining about downvotes.
- ShadowBanThis01 4y agoYeah, wouldn’t want anyone with a backbone on here.
- nindalf 4y agolol