Live data from Hacker News

Rust is tier-1 language at Microsoft

rustfoundation.org

501–510 of 522 posts

Re: Rust is tier-1 language at Microsoft

#501
post #499
post #493

Earlier quoted context omitted.

Rust supports opting into the C ABI

So does any other language which wants to be useful; being able to call C functions is table stakes for a systems programming language. But Rust itself can still only generate static binaries, because Rust doesn’t have a stable ABI.

I am not talking about calling C functions, but about providing a stable ABI for your binary.

Re: Rust is tier-1 language at Microsoft

#502

Earlier quoted context omitted.

I'm quite skeptical of rust usage leading to anything that helps consumers. Microsoft managed to add arbitrary code execution to Notepad. And it all points to a total disregard of the end-user, not lack of talent or capacity.

> Microsoft managed to add arbitrary code execution to Notepad. You write as though this was an intentional feature. Not, it was a CVE. I had to Google about it. For anyone else who didn't know about this CVE: "Microsoft added Markdown (.md) support and interactive hyperlink parsing to the modern Windows 11 version of Notepad. Improper validation of links meant that clicking a crafted hyperlink inside a Markdown file…

Arbitrary code execution in Notepad. That’s just insane, regardless of how they added as a “feature”.

Re: Rust is tier-1 language at Microsoft

#504

Earlier quoted context omitted.

We've seen several anecdotes where JIT languages (e.g. Java) outperform Rust in throughput and latency in long-running server programs.

It is mathematically impossible for a Java program to be faster than a well optimized Rust program, so long as the JVM exists and requires non-zero resources to run (to say nothing of GC etc). This isn't me glazing Rust, this is just the boring observation that a VM language is necessarily going to be outperformed by a language without a VM. VMs have good attributes, but they are never zero cost.

Key is "well optimized". At some point and scale, it becomes almost impossible to chase those manual optimizations, not to mention that usage patterns at runtime can change in such a way that make such an optimization prohibitively expensive, if not outright impossible. And even then, you would end up matching what the JVM JIT offers anyway.

What I mentioned is already something that people have observed for both Rust and C++ against programs written in Java. Now add features like observability, profiling, debugging, and dev productivity, and it becomes a worthwile tradeoff a lot of the time.

For constrained environments, GraalVM offers native image.

Re: Rust is tier-1 language at Microsoft

#505

Earlier quoted context omitted.

In real world systems, Java can beat programs in compiled languages like C++ and Rust when it comes to throughput and even latency.

This is so untrue I still don't know how anyone can even claim this. When I run tests in Rust, the biggest portion of the time is spent compiling the test (lets say 3-4 seconds), then the tests conclude practically instantly, in less than half a second. Meanwhile when I run tests on my JVM projects it can take 30 seconds just to start and the test execution is extremely slow too. Even if you do manage to match the pe…

It's not untrue, there are people who have observed this, and for a long time now. AOT compilers assume a closed world system, whereas JIT are able to perform runtime optimizations that AOT can't.

By real world systems, I mean long running real server-side systems that run things that you use day to day by large corporations serving millions of users.

Are you able to share some of the tests you are running, and which frameworks are you using? Now with project leyden and similar efforts, start up time has been cut drastically.

Re: Rust is tier-1 language at Microsoft

#506
post #456

Earlier quoted context omitted.

> This is so untrue I still don't know how anyone can even claim this. Because it's referring to long running processes, AKA the kind of things where hot paths can be JITted into faster native code than is possible from static compilation because the JIT has information about the real-world usage patterns. > Meanwhile when I run tests on my JVM projects it can take 30 seconds just to start That strongly implies you'r…

> or if it consumes 2, 3, or 4x the memory I think this used to be true more than it is now. Memory has been relatively expensive in cloud environments for a while (often 2x the price of an ec2 node for an equivalent with 2x RAM) and DRAM shortages aren't helping.

CPU is still more expensive than memory. Trading more memory to save CPU (and reduce the # of nodes required to run your service) can still hold.

Re: Rust is tier-1 language at Microsoft

#508

Earlier quoted context omitted.

Based on Grok identifying the company correctly, that would amount to ~3% of annual revenue and 30% of profits which seems insane to me for the cost of a single project. Anyway, even if that were true, rewrites are becoming drastically cheaper, simpler, and more correct with AI. The Bun rewrite is the largest experiment and seems to be 5-10x cheaper and completed ~100x faster and these costs are likely to come down f…

The rewrite was done over several years which is going to complicate your analysis. It's been making money and over fist for the company for the last 10 years and the investment to R&D has gone down some since the rewrite but not a lot.

Sure I was assuming it wasn't a 1 year outlay. Still, even over several years that's a lot for just software - you're talking about $250M/year in development costs split over 4 years across 600 developers. I'm assuming the bulk of that cost must have been a HW rearchitecture though right and you don't have 600 people trying simultaneously to do a rewrite? Either that or someone was significantly overpaying consultants on the project.

It seems suspect to me is all; the repayment time on $1B from a rewrite of an existing software stack isn't generally huge unless it also enabled adding new features that weren't possible before which enabled significant new revenue streams that justify that $1B outlay.

Re: Rust is tier-1 language at Microsoft

#509
post #507
post #469

Earlier quoted context omitted.

Targeting XBox, Windows drivers in kernel mode, COM interop, structured exception handling, UWP sandboxing,

Thanks, I wasn't aware. I'm surprised that COM is still a thing!

COM is the main delivery mechanism for Windows APIs since Windows Vista.

After the Longhorn reboot all the .NET based APIs were remade in COM, while WinRT introduced in Windows 8, adds a new base interface, replaces type libraries with .NET metadata, and requires an application identity.

Re: Rust is tier-1 language at Microsoft

#510

Earlier quoted context omitted.

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.

Why would you need that kind of resolution for a weather app? What are you even going to depict with all those pixels?

Because people are looking at it on 4k screens.
Post reply on HN