Then the web came (and I got confused) and I've never regained such clarity in programming as with Delphi on my little Windows desktop.
Turbo Pascal Turns 40
211–220 of 271 posts
Re: Turbo Pascal Turns 40
#212Earlier quoted context omitted.
Same here. Even now, I still sometimes set my vim colors to blue background and yellow/white text.
That was a common choice for TUI software running in the 16-color PC textmode palette. I suppose the blue provided a "dark" background with less contrast than actual black. (TUI programs of the era generally had a pure black-and-white mode too, and the overall look there was not unlike that of *nix terminal-based software.)
Re: Turbo Pascal Turns 40
#213But then at some point we got a copy of Turbo Pascal (my Dad was an engineer and was always bringing interesting stuff home for me to try) and I started banging on that. In my senior year of HS I got super into it when I took another class. I did the whole year's curriculum in a couple months and then wrote an asteroids clone in class. It kind of drove the teacher nuts cause he said he had nothing left to teach me and he got annoyed when I started sharing the program with other students and they were playing the game instead of working.
The one thing I remember not grokking when using TP was pointers. I wrote my whole asteroids program with fixed size arrays. I don't think it helped that I didn't really have anything great in terms of books and no one around me really understood how to use them well to talk to me about it. A year later when I started learning C/C++ in college I got it quick though. I didn't even switch to CS till after I decided where to attend, I had originally planned on studying Aeronautical Engineering and the whole Turbo Pascal adventure made me change my mind.
I keep wondering if I have a copy of that program sitting on a floppy disk and I could recover it. I don't actually own a computer with a floppy drive though, even though I might have an old internal floppy drive sitting in a box.
Re: Turbo Pascal Turns 40
#214I started with TP 3.0 in high school. It compiled faster than any other Pascal. It uses the WordStar editor. My teacher called it the cat's pajamas.
Re: Turbo Pascal Turns 40
#215Is anyone going to mentioned that that's not at all what Turbo Pascal looked like when it was first released? Not in 1983. The UI was significantly simpler. I remember it looking like this: https://imgur.com/EuOVL8c
Re: Turbo Pascal Turns 40
#216I'm currently reading "Assembly Language Step-By-Step" by Jeff Duntemann from 1992. In it, he calls TP "moron friendly" (unlike Assembly). Also something like Sears Catalog fallacy, "where you go hunting through veritable Sears catalog of toolbox products looking like: SearchDataFileForFirstRecordBeginningWithStringAndDisplayInRed Basically, this method glues other people's canned procedures into programs..." 30 year…
Re: Turbo Pascal Turns 40
#217Earlier quoted context omitted.
Yeah, the benefits of strong typing have nothing to do with Pascal... Sigh. Kids nowadays, etc. Look up which was the original language ridiculed for its "belt-and-braces" approach to type safety, in contrast to C, the freewheeling language of Kewl H4xx0rs (although they weren't yet spelled that way). Now excuse me, there's a cloud I have to go shake my fist at.
I genuinely didn't realize Pascal was recognized as providing having a strong type system. I guess there is Brian Kernighan's "Why Pascal is Not My Favorite Programming Language," where he complains that there's "no escape" to the type system as in C, where anything can be cast to anything. But I took it to mean that C just had an exceptionally loose and liberal type system.
It was really common for people to stuff pointers in ints and ints in pointers and do all kinds of really abusive things with the memory system in C. It was all fun and games until the program died with nary a stack trace. (Stack traces were pretty amazing the first time I saw them!)
There were even big commercial libraries that did really odd stuff. Motif (big early Unix UI framework) did a lot of weird stuff.
Pascal was pretty straightforward and disciplined compared to that, although I'm sure developers who were too clever for their own good found ways to do silly things.
Re: Turbo Pascal Turns 40
#218For all who wonder why Turbo Pascal was so fast here some insights: 50% is certainly due to the language Pascal itself. Niklaus Wirth designed the language in a way so it can be compiled in a single pass. In general the design of Pascal is in my opinion truly elegant and compared to other programming languages completely underrated. Wirth published a tiny version of his compiler written in Pascal itself in a 1976 boo…
All of this is fascinating. I believe single-pass compilation is underrated, and quickly disregarded by a large body of the PL community as anachronistic. I think that's complete nonsense. Just take one look at the massive build infrastructure that's driving modern monorepos to see how incredibly crucial fast compile-times are. > Jump tables everywhere. In general the compiler was quite table driven. It would be inte…
It's also largely irrelevant if you want optimized code generation, especially across multiple procedures, since that requires you to read abstract representations of the code into memory and deal with them globally which is the opposite of single-pass compilation.
Re: Turbo Pascal Turns 40
#219Earlier quoted context omitted.
All of this is fascinating. I believe single-pass compilation is underrated, and quickly disregarded by a large body of the PL community as anachronistic. I think that's complete nonsense. Just take one look at the massive build infrastructure that's driving modern monorepos to see how incredibly crucial fast compile-times are. > Jump tables everywhere. In general the compiler was quite table driven. It would be inte…
Single-pass is a bit of a gimmick. It requires programs to be written sequentially in a strictly "bottom up" way, so that forward references to parts of the program that have yet to be defined are rare enough that they can be marked specially (e.g. as with C program headers). It's also largely irrelevant if you want optimized code generation, especially across multiple procedures, since that requires you to read abst…
I think it's uncontroversial that most fast, statically compiled languages benefit greatly from quick debug builds. It's just that very few of them are designed with this in mind.
Re: Turbo Pascal Turns 40
#220It's hard to overstate just how much faster Turbo Pascal was than its competitors. So fast that it was hard to believe it wasn't cheating in some way. And then the resulting program was faster too. A tour-de-force of its day, and it deserved all the acclimation that it got.
It's biggest downside was that it was limited to producing 64KB .COM files until version 4 or 5.
https://en.wikipedia.org/wiki/COM_file#DOS_binary_format
EXE (aka MZ) is using other memory models
https://devblogs.microsoft.com/oldnewthing/20200728-00/?p=10...