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:
I vaguely remember struggling with that old Borland TP editor, so I'm not sure if I am your ideal target audience for that project.
Your post has me trying to remember what editor I used way back then...I remember using Turbo Pascal to quickly whip up a multi-hand blackjack simulator after my very first efforts using MS-BASIC and, of course, after my struggles with the incredibly slow interpreted BASIC, Turbo Pascal seemed like straight witchcraft to me.
I can remember being rather blown away by the raw speed of the Borland editor...this had to be the mid 80's or so. Wow...thinking back about how different everything was back then is really taking me down memory lane. The almost instantaneous compile times were also a wonder after cutting my teeth on my University's time-shared DEC/PDP-10 and it's multi-minute waits.
Since no one in my family or my friends were really into PCs (my dad got an original IBM PC for spreadsheet work with Visicalc and then Lotus123), I had almost no way at all to get any information at all about using the editor or even programming in Pascal...I guess the bookstore and the very expensive programming books that I couldn't afford was how I learned. That and a ton of "crash-n-burn" debugging of course.
Sitting in a bookstore taking notes while reading the books...yeah I guess it really was different back then lol.
I have many fond memories of many nights quietly programming under the blue glow of Borland IDEs, to the point where I recreated an almost 1:1 copy of it as a available IDE theme in my ASMR screensaver.
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.
It's a github repo of someone having fun. Not sure if the submitter is even the author.
Borland was well loved by developers, in case you didn't know what it was. You know what happened if there was no AI? the author wouldn't get around doing this rebuilding.
Wouldn't you spend time doing something more productive than dissing someone's effort? Maybe you have something constructive to criticize?
I was thinking what does "recovered" meant, did they dig up an old pile of floppy disk? Given Borland still exist as Embarcadero. And what does "rebuilt" meant,
Reverse-engineered and reconstructed by AI could have been the first sentence.
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
Not a lawyer, but I guess since the binaries for that version (plus MASM and more) are available with a MIT license, it would be OK to decompile and distribute the source code too?
Not that I have found anything that I felt like I wanted to change. Maybe bring it up to full ANSI C89? It is already quite close though. Think there was some minor thing I ran into that was missing, but usually it just works to treat it as C89, and LLMs seem to have no problem with it either.
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.)
Wait...come on now. Do you really think the people who wrote that code care even the tiniest bit if people in 2026 run there code without paying for it?
That would actually be a rather interesting blog post..finding the authors of 80's software and asking them if they still cared about licensing and all that here in the age of AI and modern interwebs.
I would have to say...almost surely not but who knows?
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".
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.
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?
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.
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.
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".
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.
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 :)
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.
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... :)
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.
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.
Hmmm...sure looks mighty readable to me. Not sure exactly what your complaint about the codebase could be?
My problem seems to be stranger...is anyone else having the Github Unicorn error message popping up everywhere, or is it just me? I am unable to view more than 2 or 3 C files before my review is held up by these rather strange errors.
Its been a little while since I've scanned thru Github...maybe this is a common problem now?
Can anyone who knows the mainframe domain explain why legacy COBOL applications are not being aggressively ported to modern java applications? It sounds like an obvious usage of AI to solve a real world problem and yet I barely hear about it.
This. It's very probable that any system still running COBOL has been relatively stable for decades. A lot of these programs are likely used in relatively risk-averse industries (finance, government, etc.) as well.
The truth is that COBOL, particularly on IBM System/390 and z/Architecture, has some rather unusual data representations and capabilities.
For example, PIC 9(18) DISPLAY occupies 144 bits! There are also packed-decimal representations (COMP-3), native decimal arithmetic supported directly by the processor, and other specialized representations. Modern Enterprise COBOL even supports decimal fields of up to 31 digits.
These aren't necessarily exclusive to COBOL or IBM hardware, but the combination of language features, hardware support, and ecosystem integration makes the environment quite distinctive.
And then there's the ecosystem itself. I'm going to keep this deliberately vague for simplicity, but imagine an airline or a bank with millions of lines of COBOL, deeply integrated with databases, transaction processing, messaging, batch systems, and decades of accumulated business logic.
Porting that isn't simply a matter of translating source code. You have to preserve behavior, data representations, transaction semantics, and integrations. Verification alone would be an enormous undertaking. You really don't want to accidentally introduce a rounding error into a banking system or break an airline's reservation system.
Much of this software is also extremely close to the underlying hardware and operating environment. That's part of what makes these systems so difficult to replace.
I’ll forward a theory that a large proportion of legacy cobol in actual use is already running in an emulated mainframe environment. Which is only to say that the underlying hardware may not play into it as much anymore.
I’d be interested to hear from anyone doing work in this field, if I’m right or not. I only have one personal observation, of an IBM system which was still in use in the 2010’s but the TUI was accessed from a web browser and the execution was (reportedly) in an emulator on a modern PC server.
Emulators: turns out that the IBM z-architecture is difficult to emulate, all emulators I've tried (zpd&t and other free and commercial ones) have bugs; i.e. "z" has a instructions not available in arm64/amd64 land (i.e. "Load floating-point integer equivalent, rounded" (FIEBRA)); for comparison "z" has 1000-1300 instructions while amd64 has a few hundreds; those therefore need to be rewritten in software, and those implementations sometimes have bugs (I've found many*).
This is the tip of the iceberg, there are other bugs in the handling of network interfaces, dasds etc. They also have limitations which real hardware do not have. I recommend emulators (free and commercial) for developing, but I'd say, unless you are a hobbyist, stay away from those to run production software; it will work until it breaks.
(*) Some are not fixed to this day, and I've lost hope that they ever will be.
This is not true anymore. Most of it can now be emulated as its simply easier to move the legacy application and environment to modern hardware and emulate it.
Sure there might still be some CNC machine or proprietary interface that exists, but this is so far in a tiny minority that its not economically viable to pay attention to
Why do you think they haven't been rewritten before?
The code that's still in COBOL is likely mission-critical and must run exactly correctly. The processes it implements are also probably complex enough (e.g. due to the number of workflows and their special cases) that the code is exceptionally difficult or risky to rewrite.
Even if the amount of labour required to produce the bulk of the code could be cut significantly with LLMs, maintaining correctness (or verifying it) doesn't become trivial.
You can't vibe the kinds of applications that still run in COBOL.
“You need the original Borland programs (not included: see NOTICE.md).”
i had these all on 3.5" 'floppy' disks back in the day (like many old fogies 'round here i'm sure) but god knows where they are now -- should have kept them safe and sound sigh :(
OMG I wrote code for these compilers on a 286 back in '94. wow I took a C++ class and my final project was a checkers game. I ended up getting my first technology job due to a printout of that code!
codazoda | 13 hours ago
https://codazoda.github.io/blue
cubano | 10 hours ago
Your post has me trying to remember what editor I used way back then...I remember using Turbo Pascal to quickly whip up a multi-hand blackjack simulator after my very first efforts using MS-BASIC and, of course, after my struggles with the incredibly slow interpreted BASIC, Turbo Pascal seemed like straight witchcraft to me.
I can remember being rather blown away by the raw speed of the Borland editor...this had to be the mid 80's or so. Wow...thinking back about how different everything was back then is really taking me down memory lane. The almost instantaneous compile times were also a wonder after cutting my teeth on my University's time-shared DEC/PDP-10 and it's multi-minute waits.
Since no one in my family or my friends were really into PCs (my dad got an original IBM PC for spreadsheet work with Visicalc and then Lotus123), I had almost no way at all to get any information at all about using the editor or even programming in Pascal...I guess the bookstore and the very expensive programming books that I couldn't afford was how I learned. That and a ton of "crash-n-burn" debugging of course.
Sitting in a bookstore taking notes while reading the books...yeah I guess it really was different back then lol.
vunderba | 9 hours ago
https://hackerman.specr.net
mv4 | 8 hours ago
squarefoot | 13 hours ago
Waraqa | 12 hours ago
krn1p4n1c | 11 hours ago
miah_ | 10 hours ago
muststopmyths | 10 hours ago
larodi | 9 hours ago
kencausey | 7 hours ago
bartread | 10 hours ago
jryle70 | 9 hours ago
Borland was well loved by developers, in case you didn't know what it was. You know what happened if there was no AI? the author wouldn't get around doing this rebuilding.
Wouldn't you spend time doing something more productive than dissing someone's effort? Maybe you have something constructive to criticize?
bigstrat2003 | 5 hours ago
Nobody put effort into this repo. This is AI slop.
ksec | 9 hours ago
I was thinking what does "recovered" meant, did they dig up an old pile of floppy disk? Given Borland still exist as Embarcadero. And what does "rebuilt" meant,
Reverse-engineered and reconstructed by AI could have been the first sentence.
smallerfish | 12 hours ago
noahbp | 12 hours ago
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 | 11 hours ago
I'm quite far with Microsoft C 5.1, I wonder how much similarity there is, if any.
1313ed01 | 5 hours ago
https://github.com/microsoft/MS-DOS/tree/main/v4.0/src/TOOLS
Not that I have found anything that I felt like I wanted to change. Maybe bring it up to full ANSI C89? It is already quite close though. Think there was some minor thing I ran into that was missing, but usually it just works to treat it as C89, and LLMs seem to have no problem with it either.
abecedarius | 12 hours ago
jodrellblank | 11 hours ago
# 1. download Borland C++ 2.0 and Turbo C 2.01 from WinWorld (links in docs/SETUP.md)
Section 3 here:
https://github.com/abedegno/borland-reborn/blob/main/docs/SE...
(It’s up to your conscience whether it lets you. I have not tried the downloads).
cubano | 10 hours ago
That would actually be a rather interesting blog post..finding the authors of 80's software and asking them if they still cared about licensing and all that here in the age of AI and modern interwebs.
I would have to say...almost surely not but who knows?
humblefly | 12 hours ago
ape4 | 12 hours ago
wvenable | 8 hours ago
hedgehog | 5 hours ago
fortran77 | 7 hours ago
AshamedCaptain | 12 hours ago
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?
gavinsyancey | 9 hours ago
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.
mlyle | 2 hours ago
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.
markus_zhang | 12 hours ago
humblefly | 8 hours ago
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".
markus_zhang | 7 hours ago
pimeys | 5 hours ago
jryle70 | 21 minutes ago
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?
leobuskin | 11 hours ago
abalex | 11 hours ago
DonHopkins | 8 hours ago
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.
alexvas | 2 hours ago
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... :)
saturn_vk | 12 hours ago
Short description, adjective more description
lloydatkinson | 11 hours ago
6581 | 11 hours ago
DonHopkins | 9 hours ago
Edit: At least AI would have attempted to talk them out of self harm.
bartread | 8 hours ago
owlstuffing | 12 hours ago
rayiner | 11 hours ago
bazzargh | 11 hours ago
https://github.com/abedegno/borland-reborn/blob/main/docs/HO...
(the original has more detail). Whether this step succeeded is a different question.owlstuffing | 10 hours ago
cubano | 11 hours ago
My problem seems to be stranger...is anyone else having the Github Unicorn error message popping up everywhere, or is it just me? I am unable to view more than 2 or 3 C files before my review is held up by these rather strange errors.
Its been a little while since I've scanned thru Github...maybe this is a common problem now?
Quitschquat | 11 hours ago
ok123456 | 11 hours ago
motownphilly | 11 hours ago
bogantech | 7 hours ago
airstrike | 10 hours ago
lp4v4n | 10 hours ago
qak-qskj | 10 hours ago
You would introduce new problems.
vunderba | 9 hours ago
natas | 10 hours ago
The truth is that COBOL, particularly on IBM System/390 and z/Architecture, has some rather unusual data representations and capabilities.
For example, PIC 9(18) DISPLAY occupies 144 bits! There are also packed-decimal representations (COMP-3), native decimal arithmetic supported directly by the processor, and other specialized representations. Modern Enterprise COBOL even supports decimal fields of up to 31 digits.
These aren't necessarily exclusive to COBOL or IBM hardware, but the combination of language features, hardware support, and ecosystem integration makes the environment quite distinctive.
And then there's the ecosystem itself. I'm going to keep this deliberately vague for simplicity, but imagine an airline or a bank with millions of lines of COBOL, deeply integrated with databases, transaction processing, messaging, batch systems, and decades of accumulated business logic.
Porting that isn't simply a matter of translating source code. You have to preserve behavior, data representations, transaction semantics, and integrations. Verification alone would be an enormous undertaking. You really don't want to accidentally introduce a rounding error into a banking system or break an airline's reservation system.
Much of this software is also extremely close to the underlying hardware and operating environment. That's part of what makes these systems so difficult to replace.
Jolter | 9 hours ago
I’d be interested to hear from anyone doing work in this field, if I’m right or not. I only have one personal observation, of an IBM system which was still in use in the 2010’s but the TUI was accessed from a web browser and the execution was (reportedly) in an emulator on a modern PC server.
natas | 8 hours ago
This is the tip of the iceberg, there are other bugs in the handling of network interfaces, dasds etc. They also have limitations which real hardware do not have. I recommend emulators (free and commercial) for developing, but I'd say, unless you are a hobbyist, stay away from those to run production software; it will work until it breaks.
(*) Some are not fixed to this day, and I've lost hope that they ever will be.
DonHopkins | 8 hours ago
https://hyperties.org/machine/games/zork/
LeFantome | 7 hours ago
IBM has mainframe revenues of $6 billion annually. No need for emulators.
trollbridge | 9 hours ago
hobo123 | 9 hours ago
andsoitis | 9 hours ago
what is the problem that warrants solving?
lp4v4n | 9 hours ago
A legacy COBOL code base that runs on expensive and proprietary hardware doesn't sound like a big enough problem?
andsoitis | 8 hours ago
COBOL codebases are actively updated, maintained, and expanded.
Instead of wholesale rewrites (which is high-risk), one strategy is adapting a COBOL code base to interact with other cloud software.
LeFantome | 8 hours ago
It is quite likely NOT running on legacy hardware though.
malux85 | 5 hours ago
Sure there might still be some CNC machine or proprietary interface that exists, but this is so far in a tiny minority that its not economically viable to pay attention to
Delk | 5 hours ago
The code that's still in COBOL is likely mission-critical and must run exactly correctly. The processes it implements are also probably complex enough (e.g. due to the number of workflows and their special cases) that the code is exceptionally difficult or risky to rewrite.
Even if the amount of labour required to produce the bulk of the code could be cut significantly with LLMs, maintaining correctness (or verifying it) doesn't become trivial.
You can't vibe the kinds of applications that still run in COBOL.
pmkary | 10 hours ago
igravious | 8 hours ago
“You need the original Borland programs (not included: see NOTICE.md).”
i had these all on 3.5" 'floppy' disks back in the day (like many old fogies 'round here i'm sure) but god knows where they are now -- should have kept them safe and sound sigh :(
whobre | 8 hours ago
diavelguru | 7 hours ago
elvis70 | 7 hours ago
elvis70 | 6 hours ago
peteri | 6 hours ago
regnull | 7 hours ago