Top
Best
New

Posted by andsoitis 5 hours ago

They don't make 'em like that any more: Borland Turbo Pascal 7(kevinboone.me)
167 points | 92 comments
bdamm 3 hours ago|
Turbo Pascal was a glorious tool for my imaginative 15-year-old brain. The first programs I sold were all written in Turbo Pascal. I had the Turbo Pascal reference books near my bedside, and I wish I still had them because they were dog-eared, post-it noted, margin-scribbled, and it's kind of strange but those books guided my future almost more than any other written text.

One distinct memory stands out. I could not wrap my mind around the Object-Oriented extensions on Pascal. I read, re-read, and re-re-read the section of the book describing what polymorhpism is and how it worked, probably at least a dozen times. Somehow it seemed really important and I kept coming back to it. I worked the examples. And then one day the ah-hah moment arrived. I remember it felt like a shock, why it was useful and what I could do with it. I promptly used my knowledge to write a new game using OOP principles to guide the rudimentary "characters" of various geometric shapes at the core of the game.

Fun times, and very formative to me!

nurettin 49 minutes ago|
Similar experience here. I'd try to understand a concept in the help file, give up, try again the next year and suddenly it clicks. Maybe that's just how the human brain develops.
enneff 27 minutes ago||
I really didn’t get it either until I saw how all the good programs were organised as struct types and groups of functions that operate on those structs. Then I was like “oh so OOP just makes that more convenient.” But I couldn’t have realised that until I understood the difference between a well-written program and a bad one. If only I’d had access to as much source code then as I do now!
throwaway81523 4 hours ago||
Required reading, "Things Turbo Pascal is Smaller Than", https://prog21.dadgum.com/116.html

And: "A Personal History of Compilation Speed, Part 2" https://prog21.dadgum.com/47.html

BruceEel 3 hours ago|
I miss James Hague's posts - prog21 was really something else.
chasil 6 minutes ago||
"...it can’t produce code that runs on modern Windows systems, and few people have much interest in early Windows."

This final version for Windows 3.1 might be compatible with 32-bit Windows installations under WoW16, no?

Windows 11 was the first version to ship that was 64-bit only.

orthogonal_cube 4 hours ago||
Man, I haven’t seen Turbo Pascal since high school. We were lucky enough to have a CompSci class taught by our Stats teacher.

He offered three courses. CompSci 1 used Turbo Pascal and Delphi. CompSci 2 used C++ and Java. CompSci 3 used Microsoft Turbo Assembly and a language of the student’s choice.

We had to write our code and save them to floppy discs for submission since the lab systems had DeepFreeze installed on Win95, so any local storage wouldn’t persist.

ivanmontillam 4 hours ago||
> We had to write our code and save them to floppy discs for submission since the lab systems had DeepFreeze installed on Win95

Didn't realize DeepFreeze is that old. My lab used Angel Custodius[0], which was a hardware-based solution. It used a PCI-slot and the buffer was an IC on the PCI board.

It worked the same, rebooting the computer would restore the frozen state, because changes were never committed to disk.

It also was OS-agnostic, because it ran before booting anything. If you had a Linux server and got hacked, you just restarted it, though it remained vulnerable until you disabled the protection and actually patched it.

If you wanted to introduce changes you had to press a combination of keys to bypass it, by introducing the password. Mainly to apply pending Windows Updates.

--

[0]: https://web.archive.org/web/20040210055959/http://www.custod...

natebc 3 hours ago||
I ran a small PC lab at a university for a while and we used PC-Rdist. It was magical!

You could have different templates that all built off of the same base which made switching between different specialized classes in the lab super easy.

spankibalt 3 hours ago|||
> He offered three courses.

We had two courses at my school in early post-Wende East Germany ('91 onwards, on Amstrad PC2386 386/20 MHz machines): a beginner's computer course with OS intro (MS-DOS 4.01 and Windows 3.0), office applications, and typing... and a programming course via the GW-BASIC (later QBasic) to Turbo Pascal (much later Delphi) pipeline.

grep_it 4 hours ago||
Similar experience here, except it was Qbasic followed by Delphi. Good memories of passing our dumb little games around the compute lab. It wasn't till later in life that I connected Pascal to Wirth when reading Algorithms + Data Structures = Programs (I still think the last chapter on compilers holds amazing as an introduction to the subject).
enneff 32 minutes ago||
It was with Turbo Pascal that I started to code in earnest as a child. I am so grateful for the authors and for the friend from school who gave me a copy, and taught me Pascal.

A cool thing about TP was that it had simple and convenient support for inline assembly, which was the gateway drug for me learning more low level programming.

It’s really sad that Delphi didn’t take off like VB. It was a superior environment in every way. Faster programs, better UI, much better language, and I would argue easier to use (in VB you spent a lot of time working around the limitations of BASIC in my experience). Hard to compete with Microsoft though.

I didn’t realise at the time that, with the advent of web apps (and my interest in them), that chapter of my life would be the last time I would work with such a clean, integrated dev environment.

mapontosevenths 4 hours ago||
> "That almost nobody has the skills these days to implement something like TP is something we could eventually come to regret – or, rather, our grandchildren could. Software development is becoming a semi-skilled industry, and I doubt that the rise of AI will entirely compensate for this."

I agree, but AI also there is hope!

For many years I've worried about the ever-growing depth of abstraction in computing. There are few alive now who actually understand all of the layers on abstraction involved in modern computing, and who can debug the truly strange edge case bugs and vulnerabilities introduced by the interoperation of these many complex layers.

For a time I imagined it to be an unsolvable problem, and that there would always be only a special class of neurodivergent hyper-specialists who still mostly had to work in large teams to even come close to understanding a stack in full. We're reaching the point where a single human lifespan just isn't enough to learn it all, even for those of us with what Dilbert called "The Knack". By the time you're proficient in all of it - you're dead.

Now there is a new kind of intelligence. One that CAN fit it all in a single mind, and one that will outlive us all and continue to learn long after our meat has gone bad.

As long as the AI's stay aligned, and we find ways to build them more efficiently there's a non-zero chance that they actually make it all better instead of worse. Genuinely long-term planning and the ability to TRULY grasp the full stack COULD actually happen. At least if we use these new systems in service of the greater good, and not just to play silly games on the stock market.

mike_hearn 3 hours ago||
AI isn't fundamentally different to us and it does benefit from abstractions. So, I don't think that's going to happen.

Besides, it's an exaggeration. I've been programming for 35 years, and Turbo Pascal was one of my first languages. I wrote OWL code! Seeing that splash screen brought back memories. But I can understand and debug problems that cross almost any layer of the software stack. Anything from some ReactJS library to kernel code to UEFI. I'm now 42 so the idea nobody can understand or debug interactions across layers before they die is for the birds. The stack isn't that deep.

enneff 25 minutes ago||
I think it’s easier for us to say when we grew up with the stack. In the old days you could pretty much understand everything on your computer in a relatively short period of time. So as a learner it was all so accessible. These days it’s hard to even know where to start.
herf 4 hours ago|||
AI is not trending towards small, minimal code with nice abstractions. It is faster at replicating "big team" code, but the code from a small team or a few authors still wins for elegance and simplicity.
iugtmkbdfil834 4 hours ago||
I suppose it depends on what you mean by trending. Some of the recent rewrite news[1] for example suggest that, at minimum, it is the macro demand that is driving the software trends. In this case, issues with memory supply drive attempts at more sensible memory utilization.

[1]https://tech-insider.org/discord-electron-rust-gpui-rebuild-...

BadlyDrawnBoy 3 hours ago||
>https://tech-insider.org/discord-electron-rust-gpui-rebuild-...

The fact that we are celebrating that a chat app only uses 300MB ram at launch instead of 1GB seems absolutely ludicrous to me

The early versions of Skype used about 30MB RAM while in a video call and by the early 2000s standards it was bloatware. Before that we used WebEx in the 90s which was a browser ActiveX or Java applet and RAM use was about 6MB in a video call. In the early / mid 90s I used CU-SeeMe for video calls and its RAM footprint was just over 2MB on Mac System 7

Something has clearly gone very wrong in the software development process in the last 2-3 decades and while Im encouraged to see that some people are interested in reversing that trend I still find the resource wastage has me shaking my head sometimes

mike_hearn 3 hours ago||
A lot of that RAM is just high resolution bitmaps. You can have apps that fit in 10MB of RAM today if you're comfortable with the UI quality of an app circa 2000 (e.g. icons are 16x16 pixels at 8 bit colour depth).
BadlyDrawnBoy 3 hours ago||
Usually thats not the case. Its mostly abstraction layers upon abstraction layers upon abstraction layers that causes this issue

Sometime in the late 90s there started a fundamental change in the software development process. We changed from optimising software for the end user (development is difficult) to optimising the software development process for the developer at the expense of user resources

mike_hearn 3 hours ago||
That's true for Electron apps. For other kinds of desktop app, it's mostly stuff like artwork, double buffers and fonts. Go profile a desktop app heap and see for yourself.

One of the main selling points of Turbo Pascal was OWL: the Object Windows Library, which was just a big OOP abstraction over Win16. Here's some sample code:

https://github.com/TeamVault/pascal-programs/blob/master/Pas...

Doesn't look radically different to how a GUI app that targets a native framework would look today. OWL added bloat to make developer lives easier. It was ever thus.

BadlyDrawnBoy 2 hours ago||
I think its true for most types of modern development for apps with a UI, not just electron

>Doesn't look radically different to how a GUI app that targets a native framework would look today

Modern "Native" frameworks are part of the problem. I cant comment on Windows current state as I havent used Windows since I moved my gaming rig from Windows 7 to Linux many, many years ago but even then Windows frameworks were a complete mess

Take Libadwaita for example. I migrated an old, very simple disk image manipulation utility app last year from GTK2 to modern gnome. No change in capabilities, a simple clone in GTK4 / Libadwaita. It went from using ~19MB to ~185MB without any additional functionality simply by switching the "Native" framework

kvemkon 2 hours ago|||
> GTK4

After my comment https://news.ycombinator.com/item?id=49235430 I've investigated the high RAM jump issue a bit further. It turned out, 60 MB comes from MESA / video graphics driver, right after the first function call, that triggers OpenGL/... context initialization. Thus:

  GTK2 14 MB
  GTK3 24 MB
  GTK4 38 MB  (+ 60 MB video acceleration)
Looks a bit better. But we still need 98 MB total.
mike_hearn 2 hours ago|||
Try GSK_RENDERER=cairo and see if it helps. I think the memory usage increase will mostly be GPU buffers. If GPU rendering isn't necessary for your app then it's pure bloat to use it, indeed. But with very large hi res screens it's often the case now that CPU rendering can't keep up anymore.
kvemkon 2 hours ago||
3 MB RSS less with GTK4 4.22.4 on Debian Forky (testing).
hnlmorg 4 hours ago|||
There’s no substitute for human knowledge. What if the climate crisis gets to the point where we cannot justify boiling the ocean to perform tasks we’ve come to depend on?

What’s our disaster recovery strategy in the event of war and loss of internet?

Or worse yet, a near extinction event and we are forced to rebuild civilisation from memory?

Some of these might seem like extreme edge case scenarios but then history is full of disasters that people didn’t prepare for because they assumed they were too big to fail.

andsoitis 4 hours ago|||
> There’s no substitute for human knowledge.

Would you not say that AI is an expression of the sum of all human knowledge? And as humans continue to generate more knowledge, it too, will be added to the AI's representation of it all?

sellmesoap 3 hours ago|||
There's much more about humans then there is writing about them, a lot of cultures with oral histories, a lot of nuance in behavior we take for granted, can it all be digitized?
hnlmorg 4 hours ago|||
I would say your reply feels like you didn’t read beyond the first sentence of my comment.

If you did, then I apologise. But my point is about accessing that knowledge when AI isn’t available. Not about how AI discovered its corpus to begin with.

andsoitis 4 hours ago||
I re-read it. I think your thesis is that we ought not to depend on technology in case the infra to support it goes away. Does that capture it?
hnlmorg 4 hours ago||
No. It’s that we shouldn’t depend on AI always being available.

Absolutely we should use all the tools at our disposal which enhances productivity. But that doesn’t mean we shouldn’t also learn how’re to do things for ourselves too.

To use a contrived example, there’s no shame in using a dishwasher. But if you cannot wash dishes by hand when the dishwasher breaks down, then you know you have problems.

andsoitis 4 hours ago|||
> It’s that we shouldn’t depend on AI always being available.

I made the general tech-dependence statement, but it sounds like you think it is only AI tech that shouldnt' depend on. I wouldn't worry about it; humanity has proven itself to be INCREDIBLY resilient and adaptable when the things we've come to depend on go away or change materially.

hnlmorg 4 hours ago||
We aren’t just talking about technology, we are talking about knowledge.

Like I said, I have zero issue being “AI first”. 90% of my day-to-day is using AI. But the part I objected to in the OP was “we don’t need to know things because we have AI” (to paraphrase. So I was asking the question: what if AI goes away?

I agree humans are resilient. But that’a not a good excuse for complacency.

andsoitis 1 hour ago||
I think open weights and local AI will distribute the knowledge across the planet, avoiding a single point of failure. All you would need is electricity and a computer. And if we have no way to access it, there will always be enough people who either have sufficient knowledge already or the hunger to rediscover things.
CookieCrisp 3 hours ago|||
I feel like having a local qwen model that could run without the internet competes with having a local searchable wikipedia. If disaster does strike, we could now recreate a lot of knowledge with a single high end pc
elisbce 4 hours ago|||
That already happened many times in history to many civilizations. Knowledge was discovered and lost, and rediscovered years later or never.
hnlmorg 4 hours ago||
Yes, I hinted at that. And each time that civilisation fell. With the next occupiers of the land left to find it.

Do we really want to put ourselves in the same situation?

krapp 4 hours ago||
We are already in that situation and it's far too late to prepare for countermeasures. The only culture we're leaving behind is our garbage.
hnlmorg 4 hours ago||
I disagree. However even if that were true, that’s more of a reason to learn more instead of less.
markus_zhang 4 hours ago|||
We do have free pascal and it looks pretty good I think.
tonyedgecombe 4 hours ago|||
>I agree, but AI also there is hope!

It's like a religion isn't it.

andai 4 hours ago|||
Or we could just ask them to build something less embarrassing?
elisbce 4 hours ago|||
I’m not sure where he got that idea. All I could learn about TP was like one book sold in one bookstore in my entire city. The barriers to entry back then were astronomically higher than they are today, especially given how AI has democratized access to information, knowledge, and expertise.
cyclopeanutopia 4 hours ago||
[dead]
lgl 4 hours ago||
This hits home. Turbo Pascal was the thing (although I've barely noticed at the time) where I learned actual programming, as we know now.

I had played a lot with the Spectrum (a Sinclair zx spectrum 128k) and its BASIC interpreter but that was mostly copying from magazines and changing some parameters. And BASIC is weird :)

A few years later in school in the 90s, Pascal was "the" language that most people learned the basics in, at least in my country.

Unknowingly I sort of absorbed all that and it only started making sense when a few years later I decided to get into actual programming with perl and eggdrop bots and plugins or whatever they were called.

Damn, the 90s, IRC and Quake were awesome!

renehsz 58 minutes ago||
Check out FreePascal[1] if you want a modern compiler toolchain that's largely compatible with TP7, and Lazarus[2] if you want a modern alternative to Delphi.

[1]: https://www.freepascal.org/

[2]: https://www.lazarus-ide.org/

rr808 2 hours ago||
The best things about TP and even VB was how fast everything was to develop. When I'm sitting there watching our CI build take 45 minutes to deploy, I still remember turning around changes and copying to release file server in just a few minutes.
pjmlp 1 hour ago|
Yeah, and then we got a new generation amazed that Zig and Go compile fast, this how bad has gotten.
ilaksh 1 hour ago|
Anyone remember Turbo Pascal DiskTutor? My older brother bought that for me for my birthday and I used it to learn object oriented programming. This was DOS still.

I used Turbo Pascal in 8th grade to create a simple type of 3d wireframe CAD-like tool on the PC in my bedroom.

Then in AP Computer Science in high school we had (TUI) Turbo Pascal also.

I always remember that type/style of TUI fondly. It periodically pops up in my head out of nowhere. Like just yesterday I randomly decided to add a Borland-style menu to my Starship prompt as an experiment. I accomplished that by writing about two sentences to an AI.

My actual job at this point is feeding tasks into AI and judging whether it answered just the way I wanted.

More comments...