Remix.run Logo
m00dy 4 days ago

Rust is the clear winner of the LLM era. With code generation being so effortless, why would you write in any other language?

throawayonthe 4 days ago | parent | next [-]

i don't use LLMs, but i've heard people complain current LLMs are not good at writing Rust

wizzwizz4 4 days ago | parent | next [-]

Current LLMs are not good at writing any language you actually understand, unless you do so much of the work that you might as well have written the whole program yourself.

They're excellent at doing things I'm not an expert at, though! https://en.wikipedia.org/wiki/Gell-Mann_amnesia_effect

galangalalgol 4 days ago | parent | next [-]

We should make calculators like this for kids to learn on. Every so often it makes mistakes that you will spot if you could have done the arithmetic yourself and are just saving time. That is where ai code is at right now.

bigstrat2003 4 days ago | parent | prev [-]

This is exactly why I don't trust LLMs (and therefore why I don't use them). When dealing with something I know about I can see the many mistakes they make - I would have to be a complete fool to trust them to do better on subjects I don't know about.

m00dy 4 days ago | parent | prev [-]

yeah that narrative was popular last year. You can't go wrong with LLMs on Rust.

pessimizer 4 days ago | parent | next [-]

That narrative is still popular with LLMs themselves. If you ask an LLM whether it can code Rust, it will tell you that it can but not very well.

They're good at web languages, python, and C/C++. As far as I can tell Rust works if you're already good at Rust and you can catch its screwups and strange architecture choices quickly.

morcus 4 days ago | parent | prev [-]

Maybe I'm doing it wrong (using a variety of models on GitHub Copilot) but in complex tasks I often find that they give me code that doesn't quite compile (often due to lifetime errors, sometimes other issues)

_alternator_ 4 days ago | parent [-]

Try agents like Claude code. My experience was that the initial code was conceptually correct with some type errors on the first pass. It then iterated on compile errors about 6 times, tweaking the code to resolve the issues. Then it compiled and ran correctly.

This was about 500 lines of working rust in about 10 minutes, approximately 25x my pace at writing rust. (I’m a bit of a beginner.)

pjmlp 3 days ago | parent | prev [-]

The ultimate goal is for LLM replace languages, and directly perform tasks, why bother with Rust when we will be using agentic runtimes?

m00dy 3 days ago | parent [-]

I feel so safe when my Rust code compiles; it feels like the program will run forever. I'm not sure what you mean by "agentic runtimes," but if they offer the same safety standards as Rust, I wouldn't mind using them.

pjmlp 3 days ago | parent [-]

Beware of too much expectations,

https://edera.dev/stories/tarmageddon

m00dy 2 days ago | parent [-]

what you sharing is not a rust specific, It's the same for npm and pypy packages.

Rust is native binary + fearless concurrency + memory safe and AI can help you to achieve these targets very fast. That's why Rust is the winner of all the languages, every software needs to be fast, secure and able to run forever.

pjmlp 2 days ago | parent [-]

How is Rust winning on CUDA and Khronos standards?

m00dy 2 days ago | parent [-]

wait until China releases their open source CUDA on pure rust code.