Things That Turbo Pascal Is Smaller Than (2011)
Discussion 92 comments
Fundamentally, many inefficiencies were justified for developer productivity, and I'm not sure that makes sense anymore, and the cost of larger projects with clear abstraction boundaries has plummetted.
Having lived through this period, I would disagree, quite the opposite we tended to develop in C and assembly specifically for runtime efficiency because we had to.
For developer productivity you could opt for Lisp or SmallTalk or some such, which ran much slower until high quality compilers for these became available, and even then your target machine might only have a C compiler.
Now, developer productivity is becoming less important as developers are factored out entirely.
It's the lack of clear abstraction boundaries that causes decreased developer productivity.
A code generator will not save you from Conway's law.
The next few years are going to be fun.
There's no reason (other than laziness) why that should take more than 2k.
On the other hand, a lot of boilerplace code is repeated in each and every command. When I first learned as a kid about UNIX commands being ordinary programs, I was intrigued (there is nothing "special" about them, you can also write your own!) but also shocked about the overhead compared to an architecture in which e.g. the shell contained all (at least core) commands compiled into a single binary, which could share all the error handing, startup code, command line parsing code and so on.
GNU coreutils touch does a lot more than that. My local copy is about 95k; it allows for choosing from multiple different timestamps to update; suppressing the (default) creation of an empty file if it doesn't already exist; operating on symlinks directly rather than following them (if the system supports it); specifying a custom timestamp rather than "now" (including by parsing a date string), and of course outputting a help message and a version.
I did a quick estimate by disassembling touch with objdump on macOS (163 kB executable), and it was approximately 6 kB (1500 instructions * 4 bytes/instruction). There is a lot more to an executable than executable code.
> DATE STRING
> The --date=STRING is a mostly free format human readable date string such as "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. An empty string indicates the beginning of the day. The date string format is more complex than is easily documented here but is fully described in the info documentation.
There it is.
If size is really a concern, we have supported building a single 'coreutils' binary since 2014, which will be more effective in saving disk space. It can be done with './configure --enable-single-binary'.
[0] https://github.com/coreutils/gnulib/blob/master/lib/parse-da...
I presume you know some of the intricacies of coreutils or the touch program. I'll probably go and donate to whomever receives donations for coreutils; it's the least I can do: Show some respect to the developers of these free and open source tools.
Watching `mv` do its thing is even better. About 100 system calls, including playing nice with SELinux in case it happens to be installed, just to issue a single `renameat2` system call.
Don't forget that we're running on a 64-bit machine. MS-DOS in 1986 was a 16-bit machine? The word size on a modern machine is bigger because we have a bigger address space, more registers, and more instructions.
We want speed and security and convenience and pleasant error messages. All of this is put here by the compiler to ensure that we have nice things. It sounds awesome to have such a small Pascal compiler, and it makes the modern state of binaries seem bloated, but all those extra bytes are paying for things that we want. There's probably a little bloat, but really, there is not much bloat.
Evne in its heyday, Borland's Pascal-based products were not that big in the developer tools market. Delphi was a huge hit in Europe, but in the US, they were dwarfed by Microsoft. So Pascal's influence is a bit like that Brian Eno saying (paraphrasing): “Only 30,000 people bought the first Velvet Underground album, but everyone who bought it started a band.”
Part of Borland's fall was betting too much on client/server database stuff at a time when the web was happening. They renamed themselves Inprise and marketed a suite of technologies called MIDAS which nobody remembers anymore. You used Delphi to build database GUIs on top of MIDAS and, say, Oracle. I don't know what they were thinking. They also did a Linux version of Delphi called Kylix which was just using Wine (!).
Even so, I suspect ObjectPascal would have failed eventually. A language tied to a GUI toolkit, without a standard spec, or a cross-platform open source implementation, just couldn't last forever.
I held onto Delphi far after it was evident that it was a dying language. I actually did a ton of my work in the 1990s and early 2000s doing non-GUI stuff in Delphi, including web backends and commercial games, which I suspect was not that common. ObjectPascal actually worked wonderfully as a server-side language. It was a strict, statically typed language, it had modern constructs like classes and threads, it was natively compiled, very fast, had a terrific interactive debugger. In many ways a perfectly fine alternative to C++ at the time, including for game development — I made my own bindings for DirectDraw, DirectSound, and so on.
At the time — say, around 2000 — I didn't find the alternatives compelling. Java was dead slow and didn't offer anything language-wise. Languages like Python were also slow and were not type-safe. But there came a point when Linux had just taken over, and ObjectPascal wasn't a viable option anymore.
Today, the closest thing in spirit to the ObjectPascal language isn't C#, I think, but Go.
Really it could have been go-lang before go-lang and I'm not sure why it wasn't other than that it wouldn't have been controllable by the folks at Google.
I think we didn't even have bookmarklets at that point—the browsers supported them, but we didn't know that.
Hem hem,
---
Really, it was because pascal was the go of its day with very little corporate backing (by modern standards). A language designed around developer ergonomics with some safety in mind: lovely for teaching, but only because it was a jack of all trades.
Web units were included, it's just that php became dominant because it was stupidly easy. I myself was a pascal programmer that started writing php around the time of lazarus 0.9 / fpc 1.9 and I recall that php felt like bash scripting by comparison. Today, I consider the cgi model to be rudimentary and php itself a pile of shit.
Delphi / Lazarus were GUI frameworks not different languages, and regarding Lazarus itself I'm gonna be RMS here and say that it's GNU/Linux (which it was, for some time).
Florian Klämpfl deserves some credit.
https://entwickler-konferenz.de/en
Then there is still FreePascal, Mikroe Pascal and RemObjects Pascal to chose from.
And now also Micron, which re-added Pascal features to Oberon (https://github.com/rochus-keller/micron/).
The project is rather cool.
Though Borland had some commercial success, I remember Pascal mainly as a teaching language.
Ada also was widely used in aerospace/military applications, though not sure it's still used for anything new today.
It morphed into Delphi. The reason that it's not that successful anymore is that it was deeply tied to Windows (even if there were half-arsed Macintosh ports).
And then the Internet taking off happened.
And suddenly you had gigantic companies built on PHP/JavaScript/Linux (like Facebook), on open-source software (Google) and Pascal/Delphi got also attacked by actually portable stuff, like Java, which some of today's biggest companies were built on (like Amazon).
So on one hand Linux and it's myriad of open-source languages and on the other hand Java (which is what it is but it is portable) and then JavaScript in the browser.
Nowadays tens of billions of devices, including many servers powering the entire world, are running Linux. While Pascal/Delphi was that language you'd run on DOS and half-arsedly ported to Windows: not a winning proposition.
C, for example, doesn't have strings. It has pointers to memory that might contain characters and, if you are lucky and the stars are aligned, a zero to mark the end. I'll never understand how C strings were accepted as a string representation and not the mad source of bugs and insanity that they are.
1972 was definitely not a good year for C standardization bodies. I blame that guy Ritchie and his audacity to hack a language on a whim. Even his GitHub page is empty (or misattributed).
So it wasn't for lack of standard per se.
In the absence of that, Pascal’s creators and commercializers invented follow-on languages, including the most successful thread via Hejlsberg as we’re discussing here: Object Pascal -> Delphi -> C#/.NET—with a brief detour to J++, which I don’t know enough about to understand if it belongs in this sequence.
As for your sequence, from someone that was around back then, .NET and C# only exist as you know it thanks to Sun's lawsuit regarding Java language and runtime extensions introduced in J++.
Then an internal research language originally named Cool, became C#, the language extensions in J++ were made into C# features (events, J/Direct, COM interop), Windows Foundation Classes became Windows Forms, and J# was released in .NET 1.0 as transiton technology.
Had it not been for the lawsuit, Ext-VOS (.NET codename) would have been released with J++ instead.
https://web.archive.org/web/20190111203733/https://blogs.msd...
Follow the linked paper for Ext-VOS, aka COM+ Runtime, aka .NET.
Microsoft would revisit this COM+ Runtime a decade later with WinRT,
https://arstechnica.com/features/2012/10/windows-8-and-winrt...
Can’t wait to read the VOS paper.
Bytes have history, meaning, context of creation, different utilities and different cost associated with creation/transfer/storage/manipulation
We could also use those comparisons to praise how complicated our current world has become and how good we are at managing such complexity
Of course now it would be a trivial job for an AI to make the chart. Finding a authoritative source for byte counts, probably less so.
Zabbix also confuses operators at this point. I recently had to increase a cache. I chose to go from a solid 4MB to a luxurious 256MB.
I know high-performance Java, so just a little jab there, but you don't size JVM parameters like that, except maybe code caches. And before Rust comes in, we also have a Rust application running without good resource control and it wouldn't like those resource constraints.
There is truth to this article.
Sure, I mean it had a turbo whereas Microsoft only ever had quick things. A shame no one thought of swift back then.
> zlib.h in the Mac OS X Lion SDK (80,504 bytes).
What a stupid comparison. zlib.h is probably 99% comments.That said i never finished that and ended up making another one (using tvchat as a base since it had largely working communication and session management) that acts as a server/daemon inside the container is meant to run in the background and provides a web-based UI instead.
http://runtimeterror.com/pages/iv/images/25b1d4b43bb3467e392...
Comparing to current-day stuff is kinda like comparing battery-powered bathtub toys to jetskis.
Software in the 80s showed what's possible when you really care about doing it. Software in the last 15 years feels like an exercise on what happens when you don't.
IBM’s 640 KB limit, to be fair.
If there is any positive progress to be made, the rethinking necessary must go much, much deeper than the superficial flesh of the problem, but there it’s bound to hit upon the sinews and bones of vested interests.
In all, as I’m growing older and see the world trudge along the same lines it did centuries ago, I’m more and more pessimistic about the possibility of people agreeing that the sacrifices necessary will be made.
Short-term stakeholder interests seem to trump any notions of longer-term greater good.
which one is which?
However the language extensions that were the reason for the lawsuit did indeed transition from J++ into C#, with J# being J++ on top of .NET for easing code porting.
The features were events, J/Direct (later P/Invoke on .NET), COM interop (later RCW/CCW on .NET), and Windows Foundation Classes (later Windows Forms on .NET).
Thanks to the good work of internet archivists,
https://archive.org/details/microsoftvisualj00micr
https://download.microsoft.com/download/1/6/d/16d24ada-5317-...
https://www.microsoft.com/en-us/download/details.aspx?id=559...
The irony is that two decades later Microsoft has an OpenJDK distribution, and they were the ones that initially provided the ARM port for Windows.
https://www.microsoft.com/openjdk
https://www.zdnet.com/article/microsoft-completes-phase-one-...