4 ms·
> translate it to Rust catching all the memory bugs in the process That's not possible. If it were, you'd just fix the memory bugs directly in the original lan
by maleldil 3mo ago
> translate it to Rust catching all the memory bugs in the process
That's not possible. If it were, you'd just fix the memory bugs directly in the original language.
Your best bet is to have a translation littered with unsafe blocks, so you still have to do the work of nailing down the specifics to make them safe. There's no magic "unsafe language" -> "safe Rust" pipeline, even with GenAI.
- veber-alex 3mo agoYou really think AI can't convert unsafe blocks to safe code? The reason AI can't fix memory unsafety in the original language is the same reason humans can't do it. There isn't enogh feedback from the compiler.
- maleldil 3mo agoI imagine it could, eventually, if not now. The Bun translation used Anthropic's best model, cost hundreds of thousands of dollars, and still contained a large number of unsafe blocks. Maybe if they left the agent running for longer, using Miri for verification?