15 comments

  • noahbp 1 hour ago
    This is going to be very helpful for any project to decompile binaries that were compiled with these compilers.

    I'm working on something similar though shot of a full decompilation for Microsoft Visual C++, to trace and report the knobs to tune in the internal register allocation algorithm (among other things) to make reversing and decompiling binaries that were compiled with MSVC a much easier task: https://github.com/NoahBPeterson/c2scope

    • ashdnazg 20 minutes ago
      Nice!

      I'm quite far with Microsoft C 5.1, I wonder how much similarity there is, if any.

  • Waraqa 1 hour ago
    To clarify, 'rebuilt' in the title means reverse-engineered and reconstructed by AI.
    • krn1p4n1c 9 minutes ago
      Probably should just be a verb that encapsulates all that now rather than needing clarification.
  • saturn_vk 1 hour ago
    What’s up with ai titles of the format:

    Short description, adjective more description

    • 6581 19 minutes ago
      "rebuilt" is a past participle in that title, not an adjective.
    • lloydatkinson 45 minutes ago
      It's barely an improvement Over Foo Bar: Very long sentence after the colon
  • codazoda 2 hours ago
    I've been building a web based editor inspired by the Borland Turbo Pascal/Basic editors. It uses an optional GitHub token to save files directly to your repo. You can try it here:

    https://codazoda.github.io/blue

  • owlstuffing 58 minutes ago
    Impressive. But the critical missing feature is a step in the process that transforms the resulting source into readable source, using transforms that are provably identical in behavior.
    • bazzargh 8 minutes ago
      it has exactly that step, described in HOW_IT_WORKS:

      https://github.com/abedegno/borland-reborn/blob/main/docs/HO...

          6. Make it readable
      
          With every byte proved, the source was rewritten for people,
          one step at a time, with the full check after each step
      
      (the original has more detail). Whether this step succeeded is a different question.
    • rayiner 21 minutes ago
      The code is quite readable and well documented. Look at, for example, the register allocator. It’s quite readable what’s going on, and the comment at the top of each file describes the general algorithm.
  • abecedarius 1 hour ago
    I'd love to run this for the nostalgia value, and I did buy the original software but left it behind long ago. Oh, well. ("You need the original Borland programs" -- very reasonably.)
  • Quitschquat 54 minutes ago
    Claude usually gives me some bullshit nannying when I try to reverse engineer stuff.
    • ok123456 31 minutes ago
      It doesn't take much "intelligence" for RE. Qwen-3.8 is fine for a coarse pass.
    • motownphilly 22 minutes ago
      Have you tried Codex? I hear Astra is quite good at RE.
  • smallerfish 1 hour ago
    Watch the use of the word "own" - it's an AI giveaway.
  • humblefly 1 hour ago
    Sincere question: why? Source like this is a notch better than raw decompiler output in the pre-AI era, but what's the expectation / use case?

        if((ES_B(_BX,MEMB_FLAGS)&3)==3) {
            _DI=ES_W(_BX,MEMB_VALUE);
            _ES=SYMBOL_POOL_SEG;ES_W(0,SYM_TYPE)=base;
            if(ES_W(_DI,SYM_FUNC_KIND)==2) {
                while(!TYPES_COMPATIBLE(TYPE_W(SYM_W(_DI,SYM_TYPE),TYPE_TARGET),TYPE_W(base,TYPE_TARGET),0)) _DI=SYM_W(_DI,SYM_NEXT_OVERLOAD);
            } else {
                while(!SAME_SIGNATURE(SYM_W(_DI,SYM_TYPE),base)) _DI=SYM_W(_DI,SYM_NEXT_OVERLOAD);
            }
            if(_DI==0) {_DI=_DI;goto next_param;}
    
    I grant you that it's a thing you can do with agents, and it's impressive that it works, but once the tokens are spent, what does anyone get out of it? I guess I wonder if AI projects are becoming a bit of a "social proof of money spent".
    • leobuskin 40 minutes ago
      That's just wrong usage of agents in this project, many models are capable of reconstructing idiomatic and really close to the original source code with a proper tooling and prompting (I mean, you need to understand what you're doing to get such result). It's sad to see this level of reconstruction with all the resources we have available.
    • abalex 28 minutes ago
      if i have 20 versions of one function to try, i can test all 20 from one script, no DOS. in the Ultima 7 test, all 922 C compiles matched old Borland. ugly code yes, but this part i would use :)
    • markus_zhang 1 hour ago
      I guess AI projects are mostly for individual’s fun. It’s OK.
    • ape4 1 hour ago
      Oh, that's basically assembler
    • AshamedCaptain 1 hour ago
      Is it even better than raw decompiler output? Frankly, I have been saying this forever but always criticized: getting C output that compiles has always been the easy part, getting stuff that is readable is actually where the problem is, and franky these "AI decompilers" are hardly an improvement so far.

      But people act as if "well we got something that compiles down to the same binary, this must be the actual C source!" Welp. It couldn't be more different than the original source. In fact, it's probably even distracting if your goal is to reconstruct the original source. This is just AI slop in a form that you can't even easily recognize.

      Not to mention the licensing aspect of all of this. One should be wary of Watcom because of its terrible license, even though it is technically Open Source.If as a consequence Watcom is kind of a minefield, I don't even know how to start describing this. The trenches at Verdun?

  • squarefoot 1 hour ago
    Since we live in the age of vibe recompilation, reverse engineering etc where everything seems possible, let me drop a wish for a "Turbo Zig" CLI IDE + compiler that covers most well known microcontrollers.
  • theturtle 2 minutes ago
    [dead]
  • Tenrion618 1 hour ago
    [dead]
  • Skyfall106 1 hour ago
    [dead]
  • infralog77 3 hours ago
    [dead]
  • supersimpleguy 1 hour ago
    [dead]