Live data from Hacker News

Rust is tier-1 language at Microsoft

rustfoundation.org

401–410 of 521 posts

Re: Rust is tier-1 language at Microsoft

#401
post #103

Earlier quoted context omitted.

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

I don't think "volubility" means what you think it means. The usual meaning of "voluble" is "talkative" ( gesprächig if your username is accurate). I'm not quite sure what you're going for here or in an earlier comment, but suspect it's something more like "ergonomic", i.e. the language being easy/natural to write and not getting in your way.

> I don't think "volubility"

Indeed I got it wrong bc I translated from spanish and it seems to be a false friend. The word I meant is "malleable".

Re: Rust is tier-1 language at Microsoft

#402
post #148

Earlier quoted context omitted.

There have also been repeated statements from NSA & CISA that they recommend all development should be done in memory safe languages. It's abundantly clear that there is a strong headwind towards memory safety, whether that's Rust or GC'd languages.

The recommendation is qualified for typical apps that do not have extreme performance or scale requirements. They use Java for many, many things. C++ is still indicated for systems that are optimizing for performance and scalability characteristics, since it intrinsically requires a lot of "unsafe" constructs.

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

Re: Rust is tier-1 language at Microsoft

#403

Earlier quoted context omitted.

> C++ is still indicated for systems that are optimizing for performance The only evidence I've seen for this is that people with a vested interest in my believing this keep saying it is true. That's the exact same evidence I have for Trump having triumphed in Iran. Do better if you want me to believe you. > since it intrinsically requires a lot of "unsafe" constructs. This is an excellent reason to choose Rust. The…

I heard that unsafe rust is then unsafer than c++. I haven't learned rust yet, and I get that it's a tradeoff because the rest of the system can still be relied on. But how true is that first statement?

Rust allows much more aggressive optimization of the reference types than C++. If you have a &T, the compiler can assume that it will not change over the entire lifetime of the reference, and reorder things even past things that a C++ compiler would never reorder across. This can easily bite you badly if you have the mental model of C/C++ pointers and step into unsafe land. There is a separate warning for:

    unsafe {
        mem::transmute::(t) //takes a &T, returns a &mut T
    }
in the compiler because this is something that a lot of people think might be safe (I'm running single-threaded, everything would be so much simpler if I just mutated this bit while no-one's looking), but is in fact pretty much always UB of the nasal demons type. But there are more ways to step on this problem than the most apparent way, and the compiler is not able to protect you from all of them.

To be clear, just declaring a block to be unsafe does not immediately do anything in Rust, it just allows a set of primitives that are not normally available, so it is possible to use unsafe judiciously without immediately stepping into a million landmines. You just have to be careful and ideally read the docs and the nomicon page for the operations you do, especially if they are very long.

Re: Rust is tier-1 language at Microsoft

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

The complaint can be applied to any modern software, unfortunately.

Re: Rust is tier-1 language at Microsoft

#408

Earlier quoted context omitted.

Interesting perspective. I toyed with rust a bit from the perspective of a c# background (and a bit of java, php, classic asp, JavaScript, typescript, etc) . I like rust, but I've come to still prefer c#'s object oriented features. Perhaps it's my naivety, but I've found c# AOT compilation to do plenty of trimming and startup performance optimization that I don't see it as a bad option. Have you made a personal compa…

From a software design standpoint, it certainly takes some adjustment going from OOP to the compositional architecture and structural trait system used by Rust, but it's not that big a shift. The biggest downsides are the poor standard library that ships with Rust and the non prescriptive project structure which puts too much authority on the writer to figure out. The biggest wins are that runtime exceptions and conc…

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

Re: Rust is tier-1 language at Microsoft

#409
post #122

Those interested in this may find the following articles of interest: Microsoft goals [edit: err, Microsoft hiring manager vision-casting goal ] to convert 1 billion lines of code to rust by 2030 via automated tooling enabling "1 engineer, 1 month, 1 million lines of code": https://thenewstack.io/microsofts-bold-goal-replace-1b-lines... DARPA work towards automating converting C code to Rust using a mix of 6 differen…

Just in case slop is not strong enough.

Re: Rust is tier-1 language at Microsoft

#410

Earlier quoted context omitted.

I like Rust a lot but I'm not sure it would come very high up my list for web applications.

At work we're moving almost everything to Rust on our backend. Massively reduced memory usage and significant latency improvements relative to our Typescript codebase. Even for code that you'd expect to work well in TS, a near 1 to 1 port to Rust has considerably improved our best case and, in particular, our worst case latencies. And the memory we get back is huge, we may even drop our instance size down with the 80…

To be fair, it's not that hard to get an improvement compared to running TS in the backend.
Post reply on HN