Live data from Hacker News

Rust is tier-1 language at Microsoft

rustfoundation.org

171–180 of 526 posts

Re: Rust is tier-1 language at Microsoft

#173
post #16

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-...

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 thei…

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

#174
post #50
post #16

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-...

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'…

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

#175
post #106

Earlier quoted context omitted.

Also, showing the weather is a great excuse to ask permissions for the user location.

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?

You want to be able to launch apps without unlocking your phone? Slippery slope.

Re: Rust is tier-1 language at Microsoft

#176
post #50
post #16

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-...

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'…

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

#177
post #91

Earlier quoted context omitted.

Whether vibecoded Rust will be better than whatever they are doing now remains to be seen.

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.

Actually they just Arc everything

Re: Rust is tier-1 language at Microsoft

#179
post #47

Earlier quoted context omitted.

But of a tangent but I think cognitive skills are starting to become like physical skills. If we don’t move our bodies, we waste away physically. If we don’t do hard cognitive work sometimes - like writing and debugging code - I worry our minds will atrophy. I don’t have a problem with cars. But walking is still good for us.

Try, but what skills are work keeping? We need something cogntive, but not everything. I know a few people who blacksmith as a hobby (often for the physical exercise as much as the work), but most people are happy not knowing how to do that job. I know how to set the air-fuel ratio on a gas engine, but I'm glad I don't need to tweak those parameters while driving (unlike a 1910s car where you did), and I won't miss o…

> Try, but what skills are work keeping? We need something cogntive, but not everything.

Are you trying to be funny?

Re: Rust is tier-1 language at Microsoft

#180
post #106

Earlier quoted context omitted.

Also, showing the weather is a great excuse to ask permissions for the user location.

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?

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?
Post reply on HN