upvote
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.
reply
I would imagine it would make a good material for AI to learn from.

Given the hardware constraints software engineers had at the time, that code is a piece of art in terms of optimisations. We don't write like that anymore. Now days we optimise for readability and mintainability (rightfully so - optimize later).

Not many people now days can write a complete IDE which can run on a machine with 64 kilobytes of RAM... :)

reply
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 :)
reply
I guess AI projects are mostly for individual’s fun. It’s OK.
reply
I mean, it can also be fun to buy a fast car or spend money on an NFT of a monkey, but we were never celebrating that on HN. Historically, hobby projects on the front page focused on personal growth, practical utility, or a more abstract sense of wonder: "whoa, I didn't know you can do that with a computer".

I guess now, we're to some extent running on "it looks like a thing that would have required skill and determination in the bygone days, but now just requires $1,000, and the author had $1,000".

reply
I agree with you and I’d not brag about AI vibe coding if I ever did it. But for a lot of people it’s very fun and they are probably the majority.
reply
Pretty much you need less than 10 dollars to do this with DeepSeek...
reply
> just requires $1,000, and the author had $1,000

Huh? What is that attitude of HN that mocks people for trying new things. Do you know how much effort the author spent to do this? Just a prompt?

Do you also mock people for using chainsaw to make furniture instead of more basic tools?

reply
Oh, that's basically assembler
reply
I wonder how much of the original source was assembler and this is trying to turn it into the C code that it never was.
reply
I've spent some time on the problem of deriving equivalent C to codebases that were not originally C and it is quite challenging. For documentation purposes and future maintainability I think it's useful, but decomposition is an active area of research with a lot of open problems.
reply
Turbo C actually let you use _BX and _ES as plain variables. Borland's own compiler would take that code without blinking.
reply
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?

reply
IMO there are two things that decompiling is useful for:

1. Understanding how the program works. But for this you need a good decompilation, not just "portable assembly in C"

2. Porting to a new platform. Once you have something that builds with a C compiler, you can rebuild it for a different platform, usually more performantly than running in an emulator. And it's often doable (if a lot of work) to also swap out graphics APIs, etc. But I'm not sure there's anyone who would care to run Borland DOS compilers on e.g. apple-aarch64, and DOSbox is more than good enough for anyone who does.

reply
Portable assembly in C is a good first step. Then you can start to name leaf functions and variables… and look for common inlined bits. You can confirm all your higher level transformations continue to produce equivalent bits.

You can leave a model to crank on this for a couple of days and get something much closer to idiomatic source.

It will not be THE source but it will be readable source that produces the same bits.

reply
It looks that way because compilers are complicated.

If you want to do something useful instead of just whining, then reindent it and submit a PR instead of complaining about something that doesn't matter like white space.

reply