Live data from Hacker News

Learnings from 100K lines of Rust with AI (2025)

zfhuang99.github.io

61–70 of 225 posts

Re: Learnings from 100K lines of Rust with AI (2025)

#61
post #54

We're working on a large Rust codebase, heavily assisted development with Claude and Codex, and one critical workflow is after you have written a spec, have the other LLM critique it thoroughly. This back and forth will take quite a while, but the resulting implementation plan will be 10x better than the original. You can automate this by giving Codex a goal, and a skill to call Claude to review the implementation sp…

I strongly believe you don’t need to call another model for that. The same model can do result fine. Just not as part of the same context.

I mean that if you ask codex on gpt 5.5 to submit to a plan reviewer subagent that uses gpt5.5, this is enough to have a very good reviewing and reassessment of the plan.

My hypothesis is that it’s even better than opus.

The reason why submitting the product of one LLM to another to review is that you need a fresh trajectory. The previous context might have “guided” the planer into some bias. Removing the context is enough to break free from that trajectory and start fresh.

Re: Learnings from 100K lines of Rust with AI (2025)

#62
post #54

We're working on a large Rust codebase, heavily assisted development with Claude and Codex, and one critical workflow is after you have written a spec, have the other LLM critique it thoroughly. This back and forth will take quite a while, but the resulting implementation plan will be 10x better than the original. You can automate this by giving Codex a goal, and a skill to call Claude to review the implementation sp…

I hate how seriously people take the output of an LLMs or how reliable they think it is.

Have Claude produce that spec 10 times, use the same prompt and same context. Identical requests, but you'll get 10 unique answers that wil contradict each other with each response seeming extermely confident.

Its scary how confident you people are in these outputs.

Re: Learnings from 100K lines of Rust with AI (2025)

#63

Earlier quoted context omitted.

> I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. What harness and model you've been using? For the last few months, essentially since I did the whole "One Human + One Agent = One Browser From Scratch" experiment, I've almost exclusively be…

Have you split your 100k loc codebases into smaller crates? If you take a look at eg gitoxide's repo, they've split it in many smaller crates. I think that might help with keeping the scope for the ai small and maybe help with keeping contracts tight and well-defined.

Yes, that absolutely helps (and yes, doing that :) ), I'm going even further and basically hard-enforcing a LOC limit per file too, which helps a lot as well.

The complexities LLMs end up putting themselves in is more about the bigger architecture/design of the program, rather than concrete lines, where things end up so tangled that every change requires 10s of changes across the repository, you know, typical "avoid the hairball" stuff you come across in larger applications...

Re: Learnings from 100K lines of Rust with AI (2025)

#64
post #9

I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. Honestly, despite all the hype around Rust in the community, the fact that AI can't handle lifetimes reliably makes me reluctant to use it. The AI constantly defaults to spamming .clone() or w…

I see the complete opposite. The lower level the language, the less babysit the agent. Pure asm is the best, only with very advanced SIMD flags it has problems. C is excellent.

But python or typescript are full of errors all the time. I rather fallback to perl than python. Perl has been excellent all along.

Re: Learnings from 100K lines of Rust with AI (2025)

#65
post #44

Earlier quoted context omitted.

> have hard gates that disallow doing work in the wrong crate Maybe I'm using agents wrong, but I'm not sure how you'd end up in that situation in the first place? When I start codex, codex literally only has access to the directory I'm launching it, with no way to navigate, read or edit stuff elsewhere on my disk, as it's wrapped in isolation with copied files into it, with no sync between the host. Hearing that oth…

tsz is an experiment in giving coding agents full control. On my day job I am a lot more careful. But I've moved on from manually approving every change and instead review the final diff. I noticed manually approving was counterproductive.

Right, I'm giving my agents full control too, but not sure why that'd exclude putting them in a sandbox?

Re: Learnings from 100K lines of Rust with AI (2025)

#66
post #30
post #9

I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. Honestly, despite all the hype around Rust in the community, the fact that AI can't handle lifetimes reliably makes me reluctant to use it. The AI constantly defaults to spamming .clone() or w…

Honestly Rust is an UGLY language. For whatever powers it possesses in memory safety, its cryptic symbology is reminiscent of assembly. This is a problem when language designers are mathematicians and don’t understand typographical nuance and visual weights.

To me it looks clean and concise

Re: Learnings from 100K lines of Rust with AI (2025)

#67
post #41

Earlier quoted context omitted.

If I was forced to write it myself, then I'd agree, I'd use Clojure all day before Rust, because it's such a chore to write, edit and read. The whole "with AI" kind of reduces my hate for Rust though, and increases the appreciation for how strict the language is, especially when the agents themselves does the whole "do change > see error/warning > adjust code > re-check > repeat" loop themselves, which seems to work…

It’s funny I got downvoted immediately as expected. I mean God help us should a crustacean try to understand the merits of my claim. “Oh he’s saying something negative about rust…” Downvote! I think with AI the language should still be readable. Humans need to be able to understand what’s going on!

Hardly surprising, you give a strong opinion but you don't actually back that up by any arguments, that stuff tends to be downvoted here. Add some proper reasoning and making it clear why you think as you think, and people will stop downvoting :) Also, stop caring about magic internet points, they don't matter and people downvote random stuff sometimes.

Re: Learnings from 100K lines of Rust with AI (2025)

#69
post #54

We're working on a large Rust codebase, heavily assisted development with Claude and Codex, and one critical workflow is after you have written a spec, have the other LLM critique it thoroughly. This back and forth will take quite a while, but the resulting implementation plan will be 10x better than the original. You can automate this by giving Codex a goal, and a skill to call Claude to review the implementation sp…

I hate how seriously people take the output of an LLMs or how reliable they think it is. Have Claude produce that spec 10 times, use the same prompt and same context. Identical requests, but you'll get 10 unique answers that wil contradict each other with each response seeming extermely confident. Its scary how confident you people are in these outputs.

If you ask 10 different humans to produce the spec with the same information (prompt and context) they will also produce 10 unique answers that will contradict each other and (depending on who you asked) may be just as confident.

There are real decisions to be made when going from a vague prompt to a spec. It's not surprising that an LLM would produce different specs for the same work on different runs. If the prompt already contained answers to all the decision points that come up when writing the spec then the prompt would already be the spec itself.

Re: Learnings from 100K lines of Rust with AI (2025)

#70
post #41

Earlier quoted context omitted.

It’s funny I got downvoted immediately as expected. I mean God help us should a crustacean try to understand the merits of my claim. “Oh he’s saying something negative about rust…” Downvote! I think with AI the language should still be readable. Humans need to be able to understand what’s going on!

Hardly surprising, you give a strong opinion but you don't actually back that up by any arguments, that stuff tends to be downvoted here. Add some proper reasoning and making it clear why you think as you think, and people will stop downvoting :) Also, stop caring about magic internet points, they don't matter and people downvote random stuff sometimes.

You’re right on both counts.

However, if I link to gestalt theory of psychology; The Elements of Typographical Style by Robert Bringhurst; and The Primer of Visual literacy by Donis Dondis, folks will undoubtedly NOT read it and still downvote because they have been in Rust code and so have naturally become accustomed to its monstrous appearance. :)

Perhaps I should design a language that is typographically sound—something like brainf*ck haha

Post reply on HN