top | item 46479032

(no title)

theflyinghorse | 1 month ago

I keep thinking about perhaps LLMs would make writing code in these lower-level-but-far-better-performing languages in vogue. Why have claude generate a python service when you could write a rust or C3 service with compiler doing a lot of heavy lifting around memory bugs?

discuss

order

dotancohen|1 month ago

  > Why have claude generate a python service when you could write a rust or C3 service with compiler doing a lot of heavy lifting around memory bugs?
The architecture of my current project is actually a Python/Qt application which is a thin wrapper around an LLM generated Rust application. I go over almost every line of the LLM generated Rust myself, but that machine is far more skilled at generating quality Rust than I currently am. But I am using this as an opportunity to learn.

all2|1 month ago

> that machine is far more skilled at generating quality Rust than I currently am. But I am using this as an opportunity to learn.

I'm currently doing this with golang. It is not that bad of an experience. LLMs do struggle with concurrency, though. My current project has proved to be pretty challenging for LLMs to chew through.

notimetorelax|1 month ago

Having worked with rust in the past couple years, I can say that it hands down much better fit for LLMs than Python thanks to its explicitness and type information. This provides a lot of context for LLM to incrementally grow the codebase. You still have to watch it, of course. But the experience is very pleasant.

klysm|1 month ago

Because there’s more python on the internet to interpolate from. LLMs are not equally good at all languages

yencabulator|1 month ago

You can throw Claude at a completely private Rust code base with very specific niche requirements and conventions that are not otherwise common in Rust and it will demonstrate a remarkably strong ability to explain it and program according to the local idioms. I think your statement is based on liking a popular language, not on evidence..

venuur|1 month ago

That’s been my experience. LLMs excel at languages that are popular. JavaScript and Python are two great examples.

sonnig|1 month ago

I think the same. It sounds quite more practical to have LLMs code in languages whose compilers provide as much compile-time guardrails as possible (Rust, Haskell?). Ironically in some ways this applies to humans writing code as well, but there you run into the (IMO very small) problem of having to write a bit more code than with more dynamic languages.

HighGoldstein|1 month ago

It seems cynically fitting that the future we're getting and deserve is one where we've automated the creation of memory bugs with AI.

gitaarik|1 month ago

You still want to be able to easily review the LLM generated code. At least I want to.