15 comments

[ 0.25 ms ] story [ 18.3 ms ] thread
I used Acornsoft ISO Pascal on a BBC Micro. It came in two 16KB ROMs. These included an editor.
Ironically, I opened about 10 tabs of this site, which lead to using 1 Turbo Pascal worth of bandwidth in a few seconds.
This one never gets old! While it's debatable whether it makes a whole lot of sense to compare compiled code to (completely) unrelated things, it's pretty shocking that touch on Mac OS Lion is that large in size (haven't verified myself though). Perhaps someone could quickly explain how that particular version of touch operates.
touch in macOS Sierra is down to 23kB since the 32-bit version is no longer part of the binary.

If you open it up, it's about 2/3rds zeros, maybe 10% Apple signing certificate, a whole bunch of dynamic linking data and according to otool, the (__TEXT,__text) section – normal code – is a mere 3kb in size.

Thanks for taking your time to analyze the binary. I know we are not constrained by expensive hard drives these days, but this sure is some wasted space.
Why all the 0s? Required padding?
Mach-O files are usually padded to 4096 byte aligned segments. You can inspect the segments with otool, pagestuff, and nm.

NB: UPX compresses it from 23312 -> 12904 bytes (55.35%) using UCL.

I think this is a little misleading since I don't think version 3 really was a "solid representation of the Turbo Pascal experience". Version 3 was pretty feature poor: no step through debugger, no pull-down menus in the IDE, etc. It's was just a bare-bones console editor and a COM-only compiler.

It was the blue-background versions of the IDE that most people remember as "Turbo Pascal". That started with version 5. These versions were more than 10 times the size of Turbo Pascal 3. 548.64 kB for version 5 and nearly double that again for version 5.5.

500kB is still pretty small by modern standards but don't be thinking that everything you might associate with "Turbo Pascal" fit into 39,731 bytes.

I think I have TP7 on a disk, the whole distribution (all exes, ide, compiler, utils) is around 800kB.
Still trying to find the Turbo Pascal source of the Turbo Bridge after all these years.
Pascal as a language was designed, among other things, to be very easy to compile. I believe that most of the time you don't even need to build an AST, for instance. Unless you try to optimize the result seriously, it must be reasonably easy to write a very compact and resource-economical Pascal compiler.
They are not comparing to meaningful things like other Pascal, Algol, Go, or C compilers. Which would be a relevant comparison.

They are comparing to meaningless stuff like an iPhone picture (!)

The entire Super Mario Bros game for the NES is 31kb for comparison