The title is the worst part of the essay. Which is super interesting, to wit: fable's a very capable model when it comes to transforming concepts in and out of structural descriptions, and you can use it (along with a test suite I presume) to transpile a codebase. I wouldn't have thought to do this, but I think it makes sense, and I like it - it's using model intelligence at a few different steps for sensible things.…
I'm glad you liked it. I was trying to keep both, the title and the content as straightforward as possible. Another point is, Fable is reasonably cheap if you don't allow it to read or write.
Thank you. Yes I would like to hear more about that - I’d be interested to read details about limiting some of its native tool use.
I recently performed this exact exercise of converting a complex library set from one language into an intermediate state machine representation and then translated into N other languages. It worked well but there's a lot of caveats. I'd highly recommend a direct "port" in most cases tbh, as many bugs are "load bearing" and may not survive the intermediate translation. I speak from experience.
> I'd highly recommend a direct "port" I'm sure there are other caveats. Also cost of the more or less straightforward Bun port was $165000 for 500KLoC.
Are you implying a direct bug for bug port is more expensive than converting to an intermediate representation and then converting via generators? Depending on the "fidelity" of the representation I'd figure the costs are about the same.
I work on a C++ codebase. I frequently prototype in c and then have the ai model slopify it back to c++. Nice b/c I am faster at reading c, but hard b/c you miss some of the features/nuances of c++.
I would be afraid to do this with C++. My friend once sent me a snippet, maybe 10 lines of C+++, asking "can you spot the UB?". So I'm staring at these 10 lines, I KNOW there is an UB. I wasn't able to find it without a hint.
How much did the verification cost on top? how did you gate it? was it a Go test suite you ran against the Rust or what? I always wonder how ppl are testing these rewrites, rewriting the tests can also lead to bug. I really wonder how reliable are rewrites like that, a 65k lines you didn't actually read. How did you confirm the semantic equivalence, same behaviour?
I realized that I haven't answered the question. These $400 also include the tests. Fable ported "human fuzzing session" (the best bug hunter) from Go to Rust and used it to validate everything else. I used hierarchical state machines, so a lot of my QA gates were encoded into the implementation — impossible states are, well, impossible. (I ported first 80% practically in one shot, planning and then leaving Fable ove…
This is impressive but it again led me to questions. Porting the fuzzer from Go to Rust to validate Rust is a bit circular, isn’t it^^? Porting a fuzzer bug will hide the same class bug in the code it’s checking, who fuzzes the fuzzer / setup / harness:)?
A good standard for rewrites is a differential testing, feed the same input to the old Go app and the new Rust then diff the outputs. Did you do that?
honestly it is hard to believe that seeing your replies and this heading: "The secret sauce". Giving the benefit of doubt, we all might be writing a bit like claude nowadays. If that is the case, I'd recommend reviewing the content before publishing to see if it sounds like a LLM. Or if you are trying to create "better" AI slop and think that is enough to say the text is human-written, don't do that, just say it was…
I wrote this elsewhere. Reading so much LLM output may have affected how I write. Probably I need some fresh air and a good fiction book.