Live data from Hacker News

Rust is tier-1 language at Microsoft

rustfoundation.org

451–460 of 522 posts

Re: Rust is tier-1 language at Microsoft

#451

Earlier quoted context omitted.

Rapid prototyping is almost a meme at this point. If you are hand rolling code old school, you will waste more time shoehorning JavaScript and python semantics into rust code and end up with worse quality that takes more time rather than writing it from rust. People did this a lot when rust was not as popular but there are plenty of very good rust programmers now who understand the language and can make programs that…

> Rapid prototyping is almost a meme at this point > People did this a lot when rust was not as popular but there are plenty of very good rust programmers now who understand the language and can make programs that are significantly more performance for a marginal development cost. Why isn't the game industry moving to it then? Bc it just cannot compete at volubility with C++, among other things. Yes, you can have ski…

> Why isn't the game industry moving to it then?

The most obvious answer is that requires official support from the platform manufacturers.

Re: Rust is tier-1 language at Microsoft

#452

Earlier quoted context omitted.

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.

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…

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

#453
post #76

With certain rough edges like complex traits and Async aside, rust is an S-tier lang in several domains. Of interest: - Embedded - PC desktop applications - Computationally-intense scientific programming. (Chem, structural bio etc) - OSes, drivers etc - High-performance tasks in general. CPU, GPU, etc. It's not a memory-safety one-trick pony; it's a well-rounded lang which has learned from its predecessors.

Oh, its good at doing desktop applications these days? Which GUI libraries are good these days? Some native win32 binding? Are there good equivalents for Qt? I'm interested in getting back to native application development; the job is on Electron right now and it's… meh.

Slint ?

Re: Rust is tier-1 language at Microsoft

#454
post #360

Earlier quoted context omitted.

Yes, I found these agents to be better at producing acceptable Rust than at producing acceptable Python code. In addition to the Rust compiler, you can also tell them to make clippy happy. Both in normal mode or if you are feeling nitpicky, you can also tell them to make clippy::pedantic happy.

Can you give an example where an LLM produced low quality Python code? Python is such a simple language. This seems hard to imagine. Plus, the amount of open source Python that LLMs can be trained upon is enormous.

I am looking at an MR a colleague threw at me right now where the code quality produced is atrocious.

Multiple redefinitions of enums - except they aren't enum but random lists of strings - that also diverge in different files.

Things consistently typed as `Any` or `dict[str, Any]` even though the functions clearly are expecting specifics, not `Any`

This is the worst MR I've had to review yet in my life. Absolute garbage.

Re: Rust is tier-1 language at Microsoft

#455
post #449

Earlier quoted context omitted.

> But I work in a space where C and C++ have been the only option for the last 30 years with absolutely no production-ready alternative. What "space"? My guess: HFT or HPC.

Their message begins with "As an embedded dev"

"embedded" is very vague though. The problem is that both the guy writing PIC machine code for a $5 thermostat and the guy who wrote some Python running on the Linux box inside a Times Square moving advert think they're "an embedded dev".

Re: Rust is tier-1 language at Microsoft

#456

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…

> 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're using some sort of framework that's doing a _lot_ of initialization. That's not JVM startup time, don't be intellectually dishonest here.

> You simply cannot write processes that use a single digit MiB amount of memory on a JVM and getting down to 2 digits is theoretically possible but requires significant effort.

Again, the main use case for Java is long running server processes. No one cares if the binary is 1, 10, or 100MB or if it consumes 2, 3, or 4x the memory as long as the throughput is there. And Java has a long track record of delivering very good performance in those contexts, coupled with an extremely rich and mature library/tooling ecosystem.

Re: Rust is tier-1 language at Microsoft

#457
post #3

This is very big news, all major OS vendors that also have a role in C and C++ language tooling, now have diversified their options in systems programming languages for greenfield development. Additionally we finally get some public news about the MSVC integration rumors regarding Rust.

I'm totally disgusted that my Visual Studio 2022 instance uses 2 Gigabytes (!!) of RAM to run. What the hell is it doing that it's using that kind of memory? How about those morons solving that first before moving towards Rust. An IDE shouldn't have to use more than a 100MB of RAM tops. Anything more is inexcusable or needs a detailed explanation. BTW Firefox uses 1.1GB RAM so it's not immune from criticism either.

clangd alone uses 6 GB when working with Chromium’s codebase. Code indexes can be very large, even for a simple application. Out-of-the-box IDEs must index the standard library and keep it in memory.

Re: Rust is tier-1 language at Microsoft

#458
post #456

Earlier quoted context omitted.

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…

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

Re: Rust is tier-1 language at Microsoft

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

Yeah it's more of a concern but not "rewrite a ten year old application in Rust to save on the cost of several gigabytes of RAM" bad.

Re: Rust is tier-1 language at Microsoft

#460

Earlier quoted context omitted.

This is true for takeoffs but not for landings. You want to land with a headwind because this means that for the same airspeed you have a lower groundspeed, i.e. when you actually touch down you're going slower on the runway than if you touched down at the same airspeed but with a tailwind.

In other words, it's because of the greater lift.

No. Your calculated landing speed doesn't change depending on the winds, so you'll always be touching down at roughly the same airspeed for the same aircraft type, weight, and flap setting. Touching down with a headwind just means you don't need to use the brakes as hard.

It's beneficial on takeoff because headwind already factors into your airspeed before you even start rolling, which gives you more lift for the same groundspeed yes, enabling you to rotate sooner than you otherwise would.

Post reply on HN