logoalt Hacker News

pohlyesterday at 6:36 PM4 repliesview on HN

This doesn't seem surprising, given the straight translation that they prompted.

Couldn't a case be made that it's better to get Bun to the to the language with the stronger type system first and, once there, use that stronger type system as leverage for these kinds of improvements as a follow-on effort? It seems preferable to requiring perfection on the very first step.


Replies

Aurornisyesterday at 7:27 PM

> Couldn't a case be made that it's better to get Bun to the to the language with the stronger type system first and, once there, use that stronger type system as leverage for these kinds of improvements as a follow-on effort? It seems preferable to requiring perfection on the very first step.

This is what they are doing.

They are working through the issues as they come in.

kubbyesterday at 7:02 PM

They'll just need to update the prompt with "make sure there's no UB", and it should be good.

fastballyesterday at 6:42 PM

Yes, and seems pretty clear you can now backpressure the rewrite with tools like miri to have Claude Code automatically improve it.

show 1 reply
muvlonyesterday at 6:42 PM

It's not surprising that a mostly straightforward translation to (partly unsafe) Rust exhibits UB.

What is a bit disappointing is that the Rust code apparently has APIs that aren't marked unsafe but may cause UB anyway. When doing this kind of translation, I'd always err on the side of caution and start by marking all/most things unsafe. Or prompt the slopbots to do the same I guess.

Then you can go in and verify the safety of individual bits step by step.

show 1 reply