Live data from Hacker News

I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

iurii.net

71–76 of 76 posts

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#71

Earlier quoted context omitted.

But we know, Bun was 535496 lines for $165000. The whole point of this experiment was to try and make the rewrite as cheap as possible.

Oh no, bun had quite a bit of machinery: https://bun.com/blog/bun-in-rust#loops-that-write-review-cod...

True, the main problem is how to split the work. They decided to go file by file.

To be fair, I haven't try exactly "rewrite in Rust" prompt, but I cannot imagine for this to work.

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#72
post #5

Earlier quoted context omitted.

Well the author “cannot simply dye my hair blue” so maybe they can’t confirm semantic equivalence or behavior? Poke aside (and unserious intro?) seems like a general and loose question of if the conversion can happen. *be me over eager

I consider a wig. I'm still on a fence with Rust at this point. see comments above

Llm rewrite or llm boosted dev aside, I’m still on the fence about rust too. My main issue is deployment as I hop different os’s casually and makes rust a non-starter.

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#73

I recently rewrote a complex C++ program into Rust using the Strangler Mode, all codes are written by AI. Firstly, I split the code into some dynamic libraries, which uses C ABI to interacts with each other. Secondly, rewrite the libraries one by one. A init_xxx function are used to construct a object and a free_xxx is used to deconstruct it. A handle is used as 'this' pointer. In the caller side, write another class…

Nice. Yeah, the general problem is how to divide and conquer. Your method is not always available (it depends on the language pair), in my case, Go packages didn't translate into Rust crates 1:1.

Yes. Also it is hard for this method to deal with vtables. Two ways: writting a vtable yourself or write same inheritance in the caller side. Both is not good idea.

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#74
post #72

Earlier quoted context omitted.

I consider a wig. I'm still on a fence with Rust at this point. see comments above

Llm rewrite or llm boosted dev aside, I’m still on the fence about rust too. My main issue is deployment as I hop different os’s casually and makes rust a non-starter.

I don’t know about Windows but between MacOS and Linux mine experience is smooth. I can even cross compile from Linux to MacOS.

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#75

Earlier quoted context omitted.

Do we think that was necessary? What would have happened if OP had just asked it to rewrite and test/validate each piece as it went until everything is verified and complete? My gut feeling is this is doing way too much, and it would've figured it out.

converting code to more abstract and denser representations and then manipulating them makes sense to me. Finding better representations is like half of mathematics.

Is code being converted to / represented in maths that much more helpful for an LLM that deals in language primarily, by definition? I have no idea, interesting though!

Re: I used Fable to rewrite 65kLoC of Go in Rust. It cost $400

#76
post #72

Earlier quoted context omitted.

Llm rewrite or llm boosted dev aside, I’m still on the fence about rust too. My main issue is deployment as I hop different os’s casually and makes rust a non-starter.

I don’t know about Windows but between MacOS and Linux mine experience is smooth. I can even cross compile from Linux to MacOS.

How? Is there a working example? I ended up switching to go before I started digging down the rabbit hole of vagrant based builds
Post reply on HN