logoalt Hacker News

rafram • last Wednesday at 9:03 PM • 4 replies • view on HN

On the other hand, Rust's borrow checker is very picky, and even a frontier LLM still sometimes struggles to respond to roadblocks sensibly (refactoring so whatever it's trying to do can be done safely) rather than stupidly (introducing some horrible global arena thing so it can make the borrow checker go away). A lot depends on how good your instructions are, and how good the existing code is, since bad input begets bad output.


Replies

nchie • last Wednesday at 9:48 PM

I've (more or less; I've read quite a bit of the code) vibecoded several houndred thousand lines of Rust and I've not seen this happen a single time. It sounds like something it'd do when you ask it to "write a linked list while satisfying the borrow checker". Are you sure you haven't (possibly unknowingly) been giving it instructions which ended up luring it into doing these things?

hbbio • yesterday at 12:35 AM

Yep! In our tests, we found Zig to be a pretty good fit to translate C++ codebases.

And static analysis + agents are good enough at keeping the memory management in check. Compared to Rust, there's no magic so it's easy for devs and agents to reason about.

If you're curious: https://github.com/okcontract/oksolc

fireant • yesterday at 5:38 AM

TBH a "global arena thing" can be very good for performance rather than a bunch of random allocations/deallocations

Karrot_Kream • last Wednesday at 11:50 PM

A good eval benchmark suite could really improve this then.