News for hackers. Stuff that matters.
Re:Rust Is Tier-1 Language at Microsoft by meerita on Thursday September 10, 2026 @10:35AM (#49644445)
Good news they adopted Rust as Tier-1 language. I hope their Weather app stop consuming more than 1GB RAM https://www.notebookcheck.net/Windows-11-s-built-in-Weather-...
Re:Rust Is Tier-1 Language at Microsoft by Verdex on Thursday September 10, 2026 @11:06AM (#49645035)
I feel like the weather app makes a lot of sense from a corporate politics point of view.

A 1mb weather app would have a significantly less impressive pie chart associated with it come "here are our improvements" presentation.

Also if times get tough and you're told to reduce headcount by 10%, who do you want to get rid of. Sally who knows the USB driver end to end or Todd who wrote the bloated 1gb weather app. (Don't feel bad for Todd, he knew what he was getting himself into.)

Re:Rust Is Tier-1 Language at Microsoft by ldobre on Thursday September 10, 2026 @12:04PM (#49646024)
Also, showing the weather is a great excuse to ask permissions for the user location.
Re:Rust Is Tier-1 Language at Microsoft by swozey on Thursday September 10, 2026 @12:59PM (#49646892)
I've been doing forest service stuff for a year with almost no signal and often no gps without antenna and it's incredible what asks for location permission to run. My amazon bought LEDs (15+, 3-5 diff types) all check location before I can connect them. I wind up waiting 30 seconds sometimes more to turn lights on. My generator and inverter have to phone home so that lags constantly.

Also I've been shadowbanned from a bunch of social media sites and had problems with payment systems, etc because Starlink confuses companies tracking user locations to geoips etc.

Won't even get into the apps that look downloaded and usable until you open them with no signal and they don't work before phoning home.

I've been meaning to go through ALL my apps and delete everything I don't use, I haven't installed a new app in years.

Then you have MacOS now that has the most "wtf" level permission prompts that make you think everything is phoning home or trying to access stuff on your network when it's just connecting bluetooth devices or something daily. I don't know how many games I've installed that now show up as having full screen or keyboard control permissions just to use input devices. I work on this stuff and can deduce what it's doing, especially after googling it, but "Stupidgame needs control of your system" is wild to someone who doesn't, I'm sure.

I've been wondering if it's almost nefarious that they want to get people used to allowing these seemingly system wide controls to be given to.. everything, by hiding the security-ok things behind a giant red flag warning.

Sorry went on a tangent. I miss specific permissions notifications I can trust.

edit: Oh, my "fix" for most of this is fakegps and mocking my android systemwide gps location to whatever, if you go through this.

Re:Rust Is Tier-1 Language at Microsoft by zanecodes on Thursday September 10, 2026 @02:53PM (#49648604)
Android's permission system conflates the Bluetooth scanning permission with the "Fine location" permission, because in theory any app that can enumerate nearby Bluetooth devices (including things like nearby Bluetooth Low Energy beacons commonly found in stores and malls) could use that information to locate your phone within a few hundred feet.

It seems like there's a newer build option to explicitly disable the "Fine location" permission prompt while still being able to scan for Bluetooth devices, but such beacons are somehow filtered from the list if it's enabled, and it's only available for builds targeting newer Android versions.

Re:Rust Is Tier-1 Language at Microsoft by nicman23 on Thursday September 10, 2026 @01:04PM (#49646985)
i prefer the macos mindset if not the actual OS
Re:Rust Is Tier-1 Language at Microsoft by swozey on Thursday September 10, 2026 @01:15PM (#49647166)
I just looked and I think what I'm talking about, where they folded more specific permission callouts under a broad term "Full disk access" "local devices" etc used to be more granular before they updated that UI to match the iphone. If I got a jumpscare permission prompt on macos, I used to actually be concerned. Now they're all jumpscares for basic stuff.

But I could be misremembering. I haven't liked any of the recent macos releases. I will begrudgingly install Golden Gate to hopefully fix my m1 max 64gb slowing ot a crawl with Tahoe.

Re:Rust Is Tier-1 Language at Microsoft by jen20 on Thursday September 10, 2026 @03:11PM (#49648836)
If you really want to see what is doing what, you should install Little Snitch and Little Flocker. Many apps (from exactly the people you'd expect) are doing absolutely unhinged nonsense that no-one should put up with.
Re:Rust Is Tier-1 Language at Microsoft by swozey on Thursday September 10, 2026 @05:21PM (#49650303)
I didn't know about Little Flocker and BlockBlock, I'll have to check these out. I do a lot of game modding dev work and people are using mods as attack vectors all the time now and it's made me wanting to ebpf lockdown everything.

Between quick mod tools and even just the mods watch out nowadays. That vibe coded new game tool for a game you've played 10 years and never seen before could be just vibe coded malware slop, especially if its asking to sign software or bypass it. Now gamers are getting used to disabling security stuff just to play games.

I've never actually looked at this list, I've used lulu but they have a ton of security tools https://objective-see.org/tools.html

Re:Rust Is Tier-1 Language at Microsoft by nicman23 on Thursday September 10, 2026 @02:55PM (#49648629)
yeah i mean security is opposite to convenience until it is really really not
Re:Rust Is Tier-1 Language at Microsoft by mf2hd on Thursday September 10, 2026 @03:32PM (#49649103)
Ah, most of the people just click yes, yes, allow, allow, yesIamsure, next. Especially when the system is training them to do exatly this by these meaningless warnings you described.

The forest job sounds nice :)

Re:Rust Is Tier-1 Language at Microsoft by wtallis on Thursday September 10, 2026 @11:17PM (#49653150)
I'm sure at least some of those macOS permissions prompts are spurious, but for the most part I think they're genuine red flags of poor software quality if not actual security/privacy threats. When a video game prompts for full disk access, it's probably because it wants to spray config and save files all over my home directory instead of putting them in a platform-appropriate location. When it triggers a permissions prompt about Bluetooth, it's probably using the wrong API to get input from a game controller or the wrong API for identifying what kind of input devices are present. If it triggers the "wants to control your system" prompt, it's probably trying to keep responding to input even when it's no longer the foreground application.

Sometimes the right API might not actually exist, but most of the time it's just lazy developers half-assing a port with no care for making the application behave appropriately for the platform. The prevalence of "Please don't turn off your computer while the game is saving" warnings is pretty clear proof that game devs in particular don't make any platform-specific adjustments they aren't forced to. (Game consoles usually require those warnings, but they're stupidly out of touch on a computer.)

Re:Rust Is Tier-1 Language at Microsoft by swozey on Friday September 11, 2026 @09:07AM (#49657806)
My point is that the notifications are less specific now, so whether or not someone is being a normal dev, which nearly all if not all of them are in my experience, you still get a giant "FULL DISK ACCESS" because a game wants access to your download directory or something ridiculous. The errors used to be worth stopping to check things for. The OS shouldn't be scaring a user from running an application that broadly, they just become red herring alerts that people stop paying attention to.

You're of course correct in the os APIs, etc, my frustration comes when you're modding games and what not and the Apple notifications make it sound like you're giving your system to the app, when it IS acting for the low permission.

Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Thursday September 10, 2026 @01:52PM (#49647740)
Unrelatedly, I'm still trying to figure out why Apple requires me to unlock my phone to look at the weather. Is there some concern that someone could pick up my phone and learn what city it is in?
Re:Rust Is Tier-1 Language at Microsoft by jshier on Thursday September 10, 2026 @02:10PM (#49647996)
You can use the weather widget on the lock screen, and as long as you have lock screen content when locked enabled, you can see the current area's weather just fine. Or do you want the whole app experience?
Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Thursday September 10, 2026 @02:15PM (#49648070)
The lock screen widgets don't tell you much more than what you can get from looking outside. It's not very helpful to know that it's currently overcast and raining, but it would be a lot more helpful if I could know when the rain is supposed to stop or what the week's forecast is and so on.
Re:Rust Is Tier-1 Language at Microsoft by throwaway27448 on Thursday September 10, 2026 @02:11PM (#49648020)
I'm a little too lazy to experiment, but it wouldn't surprise me if that widget didn't function normally until the phone is unlocked.
Re:Rust Is Tier-1 Language at Microsoft by jen20 on Thursday September 10, 2026 @03:12PM (#49648850)
I just tried it. It works fine.
Re:Rust Is Tier-1 Language at Microsoft by throwaway27448 on Thursday September 10, 2026 @03:30PM (#49649078)
The software can read from the phone without unlocking it?
Re:Rust Is Tier-1 Language at Microsoft by jshier on Thursday September 10, 2026 @04:40PM (#49649874)
After the first unlock after a reboot yes, except for those items with very high security (usually just keychain items) that require an unlock for every access. Lock screen items can be locked every time you lock the phone, or set to allow access while locked (after first unlock). Unfortunately this is an all or nothing setting, unless the widget specifically uses the redaction views to hide content.

Oddly, I find the weather widget refreshes much more often than the app. I'll tap on the widget, which is up to date, which launches the weather app, which could be from yesterday, and have to wait while it refreshes. Apparently the app doesn't implement any background refresh at all, which is really weird.

Re:Rust Is Tier-1 Language at Microsoft by throwaway27448 on Thursday September 10, 2026 @08:24PM (#49651957)
So—the widget doesn't function normally until the phone is unlocked?

I don't want to flex but that seems worth acknowledging from every perspective

Re:Rust Is Tier-1 Language at Microsoft by jshier on Thursday September 10, 2026 @08:41PM (#49652090)
Until the first unlock after a reboot, no, like I said. Given how rarely iOS devices are rebooted it's not an issue.
Re:Rust Is Tier-1 Language at Microsoft by freeplay on Thursday September 10, 2026 @02:07PM (#49647962)
You want to be able to launch apps without unlocking your phone? Slippery slope.
Re:Rust Is Tier-1 Language at Microsoft by kevin_thibedeau on Thursday September 10, 2026 @03:13PM (#49648869)
Camera app does it.
Re:Rust Is Tier-1 Language at Microsoft by derefr on Thursday September 10, 2026 @03:59PM (#49649428)
Nope; the lockscreen camera is actually an entirely different app, or not-quite-app thing. (Note what happens when you open the camera roll in the lockscreen camera.)
Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Thursday September 10, 2026 @02:11PM (#49648013)
If the app doesn't have any sensitive information, then yes. We already do this with home screen widgets today, so clearly there's no real barrier.
Re:Rust Is Tier-1 Language at Microsoft by zamalek on Thursday September 10, 2026 @02:26PM (#49648217)
Apps can have vulnerabilities (intentional or not). It's a contrived example, but maybe some weather app has a custom icon feature, which means you can then browse photos by opening it on the lock screen and going to that setting.
Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Friday September 11, 2026 @01:56PM (#49662527)
Widgets can't have vulnerabilities?
Re:Rust Is Tier-1 Language at Microsoft by zamalek on Friday September 11, 2026 @04:05PM (#49664568)
They can, but scope and features increase surface area: their limited functionality intrinsically limits that.
Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Monday September 14, 2026 @10:42AM (#49697736)
Widgets are just apps with limited scope and surface area. There’s no reason they can’t apply this to the weather app which already has (or should have) a limited scope.
Re:Rust Is Tier-1 Language at Microsoft by afpx on Thursday September 10, 2026 @01:54PM (#49647765)
The mac tahoe weather system daemon is also sus
Re:Rust Is Tier-1 Language at Microsoft by zahlman on Thursday September 10, 2026 @02:28PM (#49648237)
What does that have to do with its RAM consumption, though?
Re:Rust Is Tier-1 Language at Microsoft by sshine on Thursday September 10, 2026 @02:55PM (#49648634)
What if the user changes location?

Sounds like unbounded, dynamic allocation to me!

Re:Rust Is Tier-1 Language at Microsoft by mf2hd on Thursday September 10, 2026 @03:23PM (#49649002)
Makes sense, someone turns on a vpn, have to prepare for that.
Re:Rust Is Tier-1 Language at Microsoft by Escapado on Thursday September 10, 2026 @11:10AM (#49645125)
Did Todd just know or did his PO tell him to add telemetry tool number 24 while he was protesting and begged to be allowed to migrate to a newer rendering library but got shot down promptly because "KPI line must go up"? :)
Re:Rust Is Tier-1 Language at Microsoft by xattt on Thursday September 10, 2026 @11:26AM (#49645387)
Todd was a script kiddie and never really knew what he was doing. He changed careers after the layoff and is now an owner of an electrical contracting business.
Re:Rust Is Tier-1 Language at Microsoft by moooo99 on Thursday September 10, 2026 @12:57PM (#49646853)
The longer I work in corporate, the wiser Todd seems
Re:Rust Is Tier-1 Language at Microsoft by xyst on Thursday September 10, 2026 @12:25PM (#49646372)
In this day and age, both Sally and Todd are expendable. Both have been silently training their replacement by feeding the data models.

Replaced by LLM and an offshore contractor. CaPiTaLiSm, right?

Re:Rust Is Tier-1 Language at Microsoft by villish on Thursday September 10, 2026 @01:59PM (#49647828)
The list of professions made obsolete is very long. Why should programming be protected if AI in the future can make software better, safer, and cheaper?
Re:Rust Is Tier-1 Language at Microsoft by jm4 on Thursday September 10, 2026 @02:06PM (#49647934)
Not to mention, they have 1 GB of headroom in their back pocket if/when they need to make Windows more efficient. Quick rewrite of that app or just scrap it and they've saved months of optimization.
Re:Rust Is Tier-1 Language at Microsoft by throwaway27448 on Thursday September 10, 2026 @02:07PM (#49647968)
I think it's less about pie charts and more that weather apps can be very eyecandy-heavy. This sort of marketing works well for both consumers and board members.
Re:Rust Is Tier-1 Language at Microsoft by zahlman on Thursday September 10, 2026 @02:32PM (#49648317)
1GB is space for almost half an hour of 5000kbps ("YouTube Premium") video. Just what kind of eye candy are we talking about here?
Re:Rust Is Tier-1 Language at Microsoft by monocasa on Thursday September 10, 2026 @02:54PM (#49648621)
It's also only 45 frames uncompressed at 4k. It's remarkably easy to hit that if your base assets are mostly raster rather than vector for a dynamic scene.

Obviously, they should try harder, and this is an explanation rather than an excuse, but the graphics assets are mostly why.

Re:Rust Is Tier-1 Language at Microsoft by zahlman on Friday September 11, 2026 @05:08AM (#49655463)
Why would you need that kind of resolution for a weather app? What are you even going to depict with all those pixels?
Re:Rust Is Tier-1 Language at Microsoft by monocasa on Friday September 11, 2026 @12:38PM (#49661292)
Because people are looking at it on 4k screens.
Re:Rust Is Tier-1 Language at Microsoft by zahlman on Friday September 11, 2026 @06:07PM (#49666071)
I mean, I usually check the weather by putting "weather" into a search engine. And this will show me little SVG icons that take up a tiny fraction of my low-resolution screen and probably involve like less than a kilobyte of path description. And I think this looks perfectly fine and I can hardly even fathom why anyone would want it to be fancier than that. I think that even animating them would make the display actively worse.
Re:Rust Is Tier-1 Language at Microsoft by throwaway27448 on Thursday September 10, 2026 @07:46PM (#49651664)
I have deep faith you can find the imagination with in you to understand
Re:Rust Is Tier-1 Language at Microsoft by throwaway85825 on Thursday September 10, 2026 @02:16PM (#49648076)
Based on windows bloat Sally got fired because she was an old timer and cost to much so all the Sally's are gone and they're all Todd's now and windows is an unstable bloated mess.
Re:Rust Is Tier-1 Language at Microsoft by missingcolours on Thursday September 10, 2026 @02:41PM (#49648434)
The corporate dilemma between "I hired some less competent engineers and they're dragging the team down" and "I hired only highly capable engineers and now I have to give 10% of them bad reviews in stack ranking and later let them go"
Re:Rust Is Tier-1 Language at Microsoft by torginus on Thursday September 10, 2026 @03:10PM (#49648831)
I don't think this is a real dilemma - people hell bent on avoiding work can get by without shipping a single line of code for years.
Re:Rust Is Tier-1 Language at Microsoft by nikanj on Thursday September 10, 2026 @03:09PM (#49648800)
Sally, obviously. Todd is much more likely to have a perfect haircut and immaculate fluency in corpotalk
Re:Rust Is Tier-1 Language at Microsoft by onlyrealcuzzo on Thursday September 10, 2026 @12:11PM (#49646145)
That's less because of what it's implemented in - and more to do with all the tracking and libraries they want to reuse...

BigCo apps will take up lots of space and memory for BigCo reasons - obviously less if it's in Rust vs Go vs Python, but you could easily write Go apps that use far less memory than Rust apps written at BigCo due to BigCo reasons.

It's just not really that much of a priority for them to have their weather app use less than 1GB of memory. It's a far bigger priority for someone to insist that somebody else uses some bloated framework so they can get promoted.

Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Thursday September 10, 2026 @02:04PM (#49647904)
I've been having _a lot of fun_ writing Go apps that don't allocate anything and that use small, preallocated buffers to stream through requests/etc. Basically TigerStyle for Go. I don't use arenas, I just size everything for the worst case (or make the sizes configurable at startup) and still end up using much less memory.

This is really only possible because I told Fable to build the underlying allocation-free HTTP, JSON, etc libraries and consequently I'm not building anything serious yet (although the libraries are well-tested using pre-existing corpuses from reputable projects e.g. curl as well as fuzz tested).

Most "outputs" are passed as out parameters for the function to fill in, and results are Rust-like enums (a Go tagged union containing only small data). I could also have returned (T, error) but I would have to take care that the thing I pushed into the error argument doesn't allocate--not sure if I made the right decision or not, but for now it feels nice. The worst part is that I don't really have a good way to communicate detailed error information, but that hasn't bitten me yet.

This has also been a lot less effort than writing Rust, although Rust would have real checks for lifetimes and im/mutable and enum exhaustiveness and so on--so far I haven't been bitten, and I suspect things like enum exhaustiveness can be addressed via linter if necessary.

Re:Rust Is Tier-1 Language at Microsoft by afdbcreid on Thursday September 10, 2026 @02:44PM (#49648469)
> This has also been a lot less effort than writing Rust

I have never written such Go, but as an experienced Rust programmer I can tell you Rust is not hard to write after learning it. Learning it can take more time than usual (although there is also contrary evidence, e.g. from Google) but after you're used to it, you're basically as proficient as in other languages, except some glitches (that can be expensive - rewriting your main structure, but are fortunately rare). Considering the effort involved in coding in such unnatural Go variant, I tend to believe it is far easier to code in Rust (including coding in Rust using this style, since it is more suited to it).

Of course, if you're just vibe coding everything, maybe it is easier because maybe the LLMs write such Go better that they write Rust. But if you're not, even if you're only reviewing the code, I believe it's easier to review Rust code than to review such Go code (and potentially than reviewing any Go code, but that is a different matter).

Re:Rust Is Tier-1 Language at Microsoft by meerita on Thursday September 10, 2026 @07:33PM (#49651578)
I was a little bit scared at first, but after 1k lines of code written by hand I started to forget that Rust was complicated. It's not the Go experience, but it's not that bad at all.
Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Friday September 11, 2026 @01:27PM (#49662066)
If I was writing no-alloc production code, I would stick with Rust, FWIW, at least until Go's library ecosystem improves.

I don't mind writing Rust (have been dabbling with it since ~2014), especially with some AI assistance. It's just more of a grind for me than working with Go.

> Considering the effort involved in coding in such unnatural Go variant,

I was also expecting writing Go in this style to be more friction, but it was surprisingly smooth. The friction was entirely from lack of libraries and a little uncertainty about how to communicate errors without allocating. Rust has better libraries by far, but I felt more friction from the language (e.g., if you have a buffer you have to initialize every element of it or you have to use something like `heapless::Vec`--not a big deal, just decisions to make to figure out what the happy path is).

Re:Rust Is Tier-1 Language at Microsoft by sn9 on Thursday September 10, 2026 @03:50PM (#49649317)
Have you considered doing this in OCaml?

You'd get most of the benefits of Go and Rust.

Re:Rust Is Tier-1 Language at Microsoft by throwaway894345 on Friday September 11, 2026 @01:12PM (#49661817)
I touched OCaml several years ago and ran into a bunch of problems with build tooling, standard library, syntax noise, ideological/unhelpful community, etc that turned me off. I'm also just not experienced enough to write OCaml without a GC; that would be biting off a lot of learning.
Re:Rust Is Tier-1 Language at Microsoft by pjmlp on Thursday September 10, 2026 @11:05AM (#49645029)
The problem is the Webview2 prevalence, and note many Rust projects love their webviews as well.
Re:Rust Is Tier-1 Language at Microsoft by airstrike on Thursday September 10, 2026 @03:44PM (#49649224)
Not the ones made with iced <3
Re:Rust Is Tier-1 Language at Microsoft by pjmlp on Friday September 11, 2026 @03:20AM (#49654677)
Yeah, however there are probably much more using Tauri.
Re:Rust Is Tier-1 Language at Microsoft by geodel on Thursday September 10, 2026 @10:46AM (#49644658)
But Tier-1 app consuming Tier-1 RAM seems officially approved.
Re:Rust Is Tier-1 Language at Microsoft by isolay on Thursday September 10, 2026 @11:46AM (#49645728)
Whether vibecoded Rust will be better than whatever they are doing now remains to be seen.
Re:Rust Is Tier-1 Language at Microsoft by mr_00ff00 on Thursday September 10, 2026 @11:49AM (#49645784)
The question in terms of memory is, will vibe coded rust get around ownership issues by .clone()-ing everything.

Maybe this has changed since I wrote Rust, but that was a classic beginner fix. Just throw memory at it.

Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @11:58AM (#49645924)
The other things I've seen beginners do is throw unsafe at everything.
Re:Rust Is Tier-1 Language at Microsoft by tredre3 on Thursday September 10, 2026 @12:33PM (#49646509)
The things that unsafe enables are arbitrary pointers, FFI, and accessing union members in a C struct. It seems highly unlikely to me that unsafe would fix any beginner's problem.

.clone() on the other hand is indeed an easy/quick fix for a lot of issues you'd face when learning rust.

Re:Rust Is Tier-1 Language at Microsoft by suddenlybananas on Thursday September 10, 2026 @12:41PM (#49646618)
I think beginner programmers are unlikely to use unsafe when learning rust but people coming from c or c++ who are beginners at rust might use unsafe all over the place.
Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @12:43PM (#49646658)
Exactly - we have been using C or C++ for decades and most of us have a lot of experience. We think like programmers in the languages meaning we often do things that Rust won't allow without unsafe. A small percent of the time that is the right thing (which is why Rust have unsafe), but very often there is a Rust way that is just as performant if only we knew how to think like Rust programmers.
Re:Rust Is Tier-1 Language at Microsoft by Pannoniae on Thursday September 10, 2026 @01:00PM (#49646912)
Sadly it still feels like it's one of the languages where the language doesn't trust you, it tries to force you to do things "the right way". I do love quite a few of its design like how traits are, not forcing every method into the declaration, and the standard library is much less crazy than the C++ version.

Sadly, other things a bit less so - the story for the thin battery-less stdlib + npm-style churn encourages bloat, and the semantics are obsessed with safety at a heavy cost to productivity unless you spam clone() and reference-counting - but then your program becomes slow, kind of negating the advantages, you might as well have written it in C# or something...

Re:Rust Is Tier-1 Language at Microsoft by rblatz on Thursday September 10, 2026 @02:13PM (#49648042)
Yeah it doesn’t trust you, and for good reason the decades of developers making the same mistakes over and over again. If everyone was perfect you wouldn’t need Rust, but no one is perfect and that’s why Rust exists.
Re:Rust Is Tier-1 Language at Microsoft by bluGill on Thursday September 10, 2026 @02:51PM (#49648569)
Most of the time the rust way is just as good, just different.
Re:Rust Is Tier-1 Language at Microsoft by uecker on Thursday September 10, 2026 @01:09PM (#49647060)
Yes, but this this is not a problem at all because any bug caused by misuse of unsafe (or unwrap) is entirely the fault of the programmer (or the AI) and not of Rust. /s
Re:Rust Is Tier-1 Language at Microsoft by JoshTriplett on Thursday September 10, 2026 @01:08PM (#49647045)
https://github.com/luser/keep-calm-and-call-clone

"Keep calm and call clone" is a good strategy for getting things working. Don't prematurely optimize code until you know it's the bottleneck.

Re:Rust Is Tier-1 Language at Microsoft by ben-schaaf on Thursday September 10, 2026 @02:23PM (#49648171)
There's premature optimisation, where you write a whole bunch of complicated code to avoid cloning an Arc<>. And then there's "premature optimisation" where you skip any consideration for performance until it becomes a problem.

The latter is usually what people who use the quote "premature optimisation is the root of all evil" think it means. Don't just keep calm and clone, consider what you're cloning and why, and then hopefully we won't end up with even more horribly slow software.

Re:Rust Is Tier-1 Language at Microsoft by bananamogul on Thursday September 10, 2026 @03:39PM (#49649163)
Isn’t the latter what Knuth meant?

Such a slippery slope between “consideration of performance” and optimization.

Re:Rust Is Tier-1 Language at Microsoft by cogman10 on Thursday September 10, 2026 @04:22PM (#49649681)
The full quote

> Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

Notice the aspects and the reasons for knuth's "premature optimization". Is it making the code harder to debug and read? Is it a non-critical path?

If an optimization doesn't impact readability or debugability (for example, picking a datastructure that fits the problem instead of just using a List for everything). Then you should do it.

I see the quote so often pulled by people that want to justify inserting a n^2 algorithm when a log(n) solution is either the same amount of code or 1 line extra.

There's also important context about the era knuth was programming in. Optimization in the era of knuth was targeting the hardware and tickling things like the CPU cache and memory in a very specific way. It was things like clever bit manipulation and packing to save memory. That's the context. In modern terms it'd be "don't use SIMD intrinsics until you know you need them". It wouldn't be "Don't think about algorithmic complexity" which is where I most often see that kludge deployed.

Re:Rust Is Tier-1 Language at Microsoft by afdbcreid on Thursday September 10, 2026 @02:46PM (#49648497)
"Keep calm and clone" is a good advice for beginners. Then it is also a good advice for experts - because when you're an expert and you just think of cloning, that probably means it is easier than borrowing which you would default to.
Re:Rust Is Tier-1 Language at Microsoft by JoshTriplett on Thursday September 10, 2026 @03:18PM (#49648947)
By all means use borrowing if it's straightforward. But don't necessarily upend your whole codebase to avoid one clone, either.
Re:Rust Is Tier-1 Language at Microsoft by stefan_ on Thursday September 10, 2026 @02:07PM (#49647969)
Actually they just Arc<T> everything
Re:Rust Is Tier-1 Language at Microsoft by Barrin92 on Thursday September 10, 2026 @03:18PM (#49648934)
The question to me in terms of memory is, if you're writing a weather app on windows why are you not using C#.

The point of these low/zero overhead languages like Rust is you're in an environment where memory management is ultra critical. The dotnet garbage collector does more than a good enough job for a weather app, likely a much better one than vibe coded .clone() Rust

Instead of oscillating between Rust and 1 GB webview apps just ... use the excellent managed language that exists on the operating system appropriate for GUI applications?

Re:Rust Is Tier-1 Language at Microsoft by isolay on Friday September 11, 2026 @02:34AM (#49654290)
Maybe they fired all their experienced developers and only have cheap vibecoders now, I don’t know. The decisions of beancounters and lawyers that control these companies are mysterious to me.
Re:Rust Is Tier-1 Language at Microsoft by tcfhgj on Friday September 11, 2026 @06:33AM (#49656124)
Now that WinUI has a Rust API, I think using Rust is a no-brainer.

The app will be running on probably about a billion of devices, and Rust will reduce the footprint on each of those - assuming not a vibe coded clone app.

The additional effort isn't that big, and it would make the experience of maaaany users a bit better still.

Now extrapolate on all windows included apps and ui elements.

How much would that cost per license?

Re:Rust Is Tier-1 Language at Microsoft by hirvi74 on Thursday September 10, 2026 @01:40PM (#49647542)
I seriously do not think things could be any worse.
Re:Rust Is Tier-1 Language at Microsoft by dismalaf on Thursday September 10, 2026 @02:19PM (#49648131)
Instead of leaking memory it'll just clone the whole heap over and over.
Re:Rust Is Tier-1 Language at Microsoft by CamperBob2 on Thursday September 10, 2026 @02:30PM (#49648268)
If it's vibecoded, who GAF what language is used?

This argument applies regardless of how you feel about vibecoding. Lately people have been asking for x64 machine language and getting reasonable results.

Re:Rust Is Tier-1 Language at Microsoft by delta_p_delta_x on Thursday September 10, 2026 @12:54PM (#49646814)
Calling the Weather app an 'app' is doing all the Win32, WPF, WinForms and WinUI developers a huge disservice.

It is essentially an entire Chromium instance around msn.com/weather.

Re:Rust Is Tier-1 Language at Microsoft by MarleTangible on Thursday September 10, 2026 @02:36PM (#49648370)
Outlook, Teams, and other all show up as msedgewebview2.exe, so you also don't know which app is consuming gigs of memory doing nothing.
Re:Rust Is Tier-1 Language at Microsoft by pocksuppet on Friday September 11, 2026 @02:22AM (#49654226)
That is how apps work in 2016 onwards (the last decade).
Re:Rust Is Tier-1 Language at Microsoft by unixhero on Thursday September 10, 2026 @01:03PM (#49646962)
And that the calculator does not take 5 seconds to load
Re:Rust Is Tier-1 Language at Microsoft by jordand on Thursday September 10, 2026 @02:07PM (#49647970)
It won't, that 1GB+ belongs to Microsoft's advertisers and their many video ads
Re:Rust Is Tier-1 Language at Microsoft by MarleTangible on Thursday September 10, 2026 @02:39PM (#49648408)
Reminds me of how they allow OEMs to install bloatware through Windows update now. I believe LG did something that leads to various app installs when you connect their monitors via HDMI.
Re:Rust Is Tier-1 Language at Microsoft by nalekberov on Thursday September 10, 2026 @02:41PM (#49648431)
Does it matter when one embeds web browser into their app?
Re:Rust Is Tier-1 Language at Microsoft by pessimizer on Thursday September 10, 2026 @03:29PM (#49649069)
If they can't do it with infinity budget and infinity AI, they're not going to be able to do it with that plus Rust.

Hilarious that the article is like "Apple's weather app is only 200MB!"

The day that OS vendors started abandoning native apps was a hilarious day.

Re:Rust Is Tier-1 Language at Microsoft by _s_a_m_ on Thursday September 10, 2026 @04:14PM (#49649588)
are they launching for the graphics in the background the whole MS Office and PowerPoint?
Re:Rust Is Tier-1 Language at Microsoft by iw2rmb on Thursday September 10, 2026 @05:33PM (#49650443)
I can't comprehend why 250 MB for a weather app on macOS is considered normal.