Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Makes sense it would have been 6 USD in GLM 5.3?
  • what did i read? genuinely? its only a few words, and even that had to be AI written. The topic in the title barely was mentioned.
  • 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. Thanks for the writeup. De clickbait your title though or you'll keep getting clickbait rage responses :)
  • 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, constructor calls init_xxx and deconstructor calls free_xxx. No other code should be modified during the split.
  • Most important information is missing here.

      * How many lines was the result? Considering how much err != nil and line splitting needs to be done in Go, did you at least reach 30k SLoC?
        * How was sloc counted here? includes comments, blank lines or not? (something like cloc will give a good answer).
      * Performance characteristics of resulting rust, was there an improvement? It maybe appealing to say Rust is Always faster than Go.
    
    As usual these AI coding posts tend to be loose on actual measurements. Don't like it. Granted you can't do too much experimentation with prompting techniques since you're paying per token. But at least you can assess the code that was produced?
  • I have rewritten several things from eg. Python to Rust, Rust to Go very recently. The 400 USD is pretty arbitrary as you could rewrite several big projects pretty comfortably with the Claude ~100 USD subscription tier.

    In my experience it mostly comes down to the harness (or lack of) that you use. Something like 'superpowers' can be pretty verbose and hash out things for a long time (and use a decent amount of tokens) but the output is pretty decent. The better instructions and the more brainstorming you do initially the better - as the subagents encounter fewer issues.

    Without a harness you could try a direct port (prompt: 'convert x to y, don't bother me') and if the languages are roughly compatible you could get a seemingly working port much quicker but likely with major hidden issues. A comprehensive testsuite is obviously a must.

  • Following the recent "Rewriting bun in Rust" I thought to run an experiment which turned out to be success.
  • 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.

Explore Birbla archives