Live data from Hacker News

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

zfhuang99.github.io

191–200 of 225 posts

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

#191
post #173

Earlier quoted context omitted.

Yes, I would bet it won't go anywhere. The blog post mentioned the project is 130k LoC multiple times. Where 45/50k LoC comes from? >Rust makes no promise of being terser than C++ True, but Rust has no header files, this alone is a great LoC saver.

50k LOC wouled be the rust code without tests. But it's not apples to apples because they seem to have done much more performance work though, this is far from code golfing.

RSL’s 36k LoC includes tests and should be compared with 130k LoC, not 50.

Having 90k LoC of tests for 50k LoC codebase also a problem. At least in my experience LLM generate too many tests. It does not evolve test suite but throws more code into it as development happens. Unless I aggressively refactor tests I quickly end up with a test suite that I don’t understand. Then LLM modifies tests to “make code work” and I have no idea if this is a legit edit or LLM cheats. I wonder if the same thing is happening or about to happen with this codebase.

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

#192
post #64

Earlier quoted context omitted.

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.

It makes sense. In a lower level language most mistakes would break the software hard and the AI will notice it. Python and JS are happy to run with lots of bugs.

Why would one not use TDD when coding with Claude? It's so cheap!

Yes you need to help it with the types of tests: you still need to know what you want from it. But once you have all types of tests (unit, db, fake-services, e2e, etc.) in place and documented; it can basically write tests until you cov-tool says it's 85%. Then you can ask it to find the weakest tests: you review those and make sure they are not weak, or Claude understands why they are not weak. Then let it find the next batch of weakest tests. Etc.

TDD finally makes sense economically for me on the types of projects I usually work on.

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

#193

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…

If I was forced to write it myself, i would love to keep writing ruby. What a wonderful language. I dont write ruby anymore, mostly using golang and python.. but ruby still a joy.

Have you looked at Kotlin? I looooved Ruby. But now I've come to a conclusion that a stronger type system is worth it: in teams, for LLMs, for my own sanity.

Kotlin is basically a Ruby (OO first with lots of FP goodness) with a serious type system. And where Ruby uses C-written libs in some places, with Kotlin one uses Java written libs from time to time.

See http4k for a nice implementation of Rack + a lot of goodness from Rails, without becoming a framework (it's just a lib).

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

#194

Earlier quoted context omitted.

It makes sense. In a lower level language most mistakes would break the software hard and the AI will notice it. Python and JS are happy to run with lots of bugs.

Why would one not use TDD when coding with Claude? It's so cheap! Yes you need to help it with the types of tests: you still need to know what you want from it. But once you have all types of tests (unit, db, fake-services, e2e, etc.) in place and documented; it can basically write tests until you cov-tool says it's 85%. Then you can ask it to find the weakest tests: you review those and make sure they are not weak,…

But I use TDD when coding with AI.

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

#195

Earlier quoted context omitted.

Unless you can somehow provide some arguments against it, I feel like you're the one who is trying to cargo-cult stuff here. Say what you will with proper reasoning or arguments if you feel compelled, tired reddit-commentary like that helps no one.

i legitimately cannot divine what you are saying at all with this. there are so many dangling antecedents and modifiers that it is completely impossible. and i say this out of a genuine desire to understand what your argument is, knowing full well that i likely disagree with it.

Alright, let me explain, hopefully simpler: GP made told us their experience with working with LLMs, and some pointers to what they found to be working. The comment I replied to just says "This is astrology for devs" which basically is a cheap putdown without any reasoning nor arguments for why the commentator believes so. My comment is urging them to actually participate in the discussion, not just post their soundbite they thought of in five seconds, so HN as a whole can remain good instead of devolving into reddit (which is a tale as old as HN, I know).

Hopefully it's understandable now, and hopefully you don't disagree :)

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

#196

Earlier quoted context omitted.

> Your only hope in such discourse is not trying to convince the other party how wrong they are I don't care about convincing anyone, the ones I reply to or others, but if you take the time to leave a comment, at least make it something to read and think about instead of soundbites like "This is astrology for devs", it's plain boring to read and makes HN worse.

>I don't care about convincing anyone That's fine. Others will care for you. >it's plain boring to read and makes HN worse. I chuckled at the joke. Surprising amount of layers to it. Though I never strove to be a comic nor writer, that kind of terse, compact punch makes me envy those of such literary talent.

> I chuckled at the joke. Surprising amount of layers to it.

What joke?

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

#197

Earlier quoted context omitted.

Wow, there are still people trying to claim they don't reason. What will they have to do before you'll admit that they can?

You are asking the wrong question. It's not about if you can do X which can be faked especially if you are given practically infinite tries and all failures are hidden. The people who want to believe they actually reason just ignore all obvious evidence of contrary and cherry pick the times reasoning was faked well enough. The people who don't want to believe will just take a second to understand how they work and th…

You seem to believe that something is only "reasoning" if it works in a particular way. That it's not enough for it to observationally display reasoning skills; it has to be using a particular method to do that so it's not "faking" it. Is that correct?

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

#198
post #21

Earlier quoted context omitted.

I'm actually vibe coding a game engine right now using a Hexagonal Architecture, and I ran into this exact same issue when trying to synchronize the feedback loop between the viewport and the editor. To be fair, I probably messed up the domain boundaries myself in the first place, but honestly, the AI-generated code wasn't very effective at solving it either

Game engines are one of the worst case scenarios for something like Rust as game heaps are simulations of the real world, so have lots of complex graph structures in them. Affine types work best for request/response oriented stuff where lifetimes are clearly bounded.

So, I am currently changing the language. Thank you for your kind advice

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

#199

Earlier quoted context omitted.

Unless you can somehow provide some arguments against it, I feel like you're the one who is trying to cargo-cult stuff here. Say what you will with proper reasoning or arguments if you feel compelled, tired reddit-commentary like that helps no one.

i legitimately cannot divine what you are saying at all with this. there are so many dangling antecedents and modifiers that it is completely impossible. and i say this out of a genuine desire to understand what your argument is, knowing full well that i likely disagree with it.

You can't be serious. It couldn't be more obvious what the poster was referring to, a drive by put-down comment with no attempt to discuss anything seriously is more highly upvoted than an objection to such a comment.

What is this place for? Dang tells us, curious discussion. The guidelines explicitly state that certain comments are not in the spirit.

But the community seems to have decided otherwise, which is a shame.

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

#200

Earlier quoted context omitted.

i legitimately cannot divine what you are saying at all with this. there are so many dangling antecedents and modifiers that it is completely impossible. and i say this out of a genuine desire to understand what your argument is, knowing full well that i likely disagree with it.

You can't be serious. It couldn't be more obvious what the poster was referring to, a drive by put-down comment with no attempt to discuss anything seriously is more highly upvoted than an objection to such a comment. What is this place for? Dang tells us, curious discussion. The guidelines explicitly state that certain comments are not in the spirit. But the community seems to have decided otherwise, which is a sham…

Don't read too much into it, downvotes/upvotes are highly random here, saying the same thing twice will have different reactions depending on the time of day and the topic of the submission, seems certain crowds are drawn to certain topics, which isn't that surprising.

I don't mind the downvotes, the points aren't really the reason I'm here anyways, I just want fun and interesting discussions with people and read other's perspectives, the points don't hinder that :)

Post reply on HN