6 ms·
Things That Turbo Pascal Is Smaller Than (2011)
- hnlmorg 5y agoAmusing article. Turbo Pascal was an awesome IDE. I remember writing a lots of DOS software for it. Including a graphical shell (like early Windows).
- mrlonglong 5y agoWith a DOS extender you could do a proper GUI shell and not worry about memory constraints if you had the memory.
- hnlmorg 5y agoI was still at high school though so my graphical shell was pretty limited. I’m still pretty impressed I pulled off what I did though. Just goes to show how easy Pascal was.
- lastdong 5y agoBorlando Turbos included amazing docs accessible within the IDE, with useful code examples one could quickly copy+paste and try. Great time to learn, before msdn collection, or the web as we know it now.
- ilaksh 5y agoI have started building an IDE for Algorand smart contracts (TEAL/PyTEAL) inspired by Turbo Pascal. It will go up on TurboTEAL.com within a couple of months. A lot of the core such as the Python -> PyTeal transpiler is already working. It will have the same look, built in instant context sensitive help, and a few other things.
- pjmlp 5y agoTurbo Pascal taught me what is the minimum acceptable tooling for any programming language, good OOP programming foundations (Turbo Vision and OWL later on), systems programming doesn't need to be like the C mess, good compilation speed and modular programming. All of that in PCs running MS-DOS in 1 MB RAM. Thanks Borland.
- dang 5y agoRelated: Things That Turbo Pascal Is Smaller Than (2011) - https://news.ycombinator.com/item?id=22843140 https://news.ycombinator.com/item?id=22843140 - April 2020 (170 comments) Things That Turbo Pascal Is Smaller Than (2011) - https://news.ycombinator.com/item?id=15104766 https://news.ycombinator.com/item?id=15104766 - Aug 2017 (15 comments) Things That Turbo Pascal Is Smaller Than (2011) - https://news.ycombinator.com/item?id=11733610 https://news.ycombinator.com/item?id=11733610 - May 2016 (2 comments) Things That Turbo Pascal is Smaller Than (2011) - https://news.ycombinator.com/item?id=4592997 https://news.ycombinator.com/item?id=4592997 - Sept 2012 (58 comments) Things That Turbo Pascal is Smaller Than - https://news.ycombinator.com/item?id=3175629 https://news.ycombinator.com/item?id=3175629 - Oct 2011 (114 comments)
- aidenn0 5y agoWe used Turbo C++ in my HS computer science class, but the AP test was still in Pascal at the time. My dad had an old copy of Turbo Pascal, so I used that to learn enough pascal to pass the test. I was completely blown away by the compilation times. In class, we fought over who got the 2 486 DX2s because you could compile simple programs in under a minute on it. On my wimpy AM386 at home Turbo Pascal compiled from scratch in seconds and did incremental compiles instantaneously. A couple years later, I encountered common lisp for the first time; it was even better because you could recompile single functions. To this date, I still think very short iteration time is a super-power for program design.
- muth02446 5y agoI have a project going that tries to bring back ultra short compilation times: https://github.com/robertmuth/Cwerg https://github.com/robertmuth/Cwerg
- miohtama 5y agoThe real question, what these kind of articles do not ask, is why Turbo Pascal was smaller? Hand written assembly was optimised, Pascal is easy to compile language, but there are a lot of other things - Segmented 16 bit pointers - No graphics or images - Limited OS - no glibc, could only save A: and C: drives - Computers could not hibernate or sleep - Computers did not have periheral devices or needed special software: printer, mouse - No network - No multitasking - No portability For the editor itself - No autocomplete - No colours - Not very useful error messages - VI like navigation experience (got much better in 5 years with Turbo Vision IDE framework) Also - All documentation was in a dead tree format For the good reference point on sizes, the bible text is 4-5 MB.
- folmar 5y ago> Computers could not hibernate or sleep My Thinkpad 300 would like a word with you. It can sleep to RAM and hibernate, done via apm if OS supports it or through keys, but basically everything is done by the BIOS and works fine with DOS.
- hnlmorg 5y agoAs impressive as that laptop was, it was released in the 90s and whereas the version of TP we are discussing was the 80s.
- kazinator 5y ago"no glibc" makes programs bigger; they have to contain their own library. Presumably, that small TC executable made some DOS/BIOS calls; that would be its OS-supplied library. That gives you things like file I/O and reading the keyboard. Anyway I don't think you're quite explaining it (in spite of a good effort and nice points) because, look, the mere hash table module in my TXR language has 30K of machine code. This happens to be 32 bit x86: $ size opt/hash.o text data bss dec hex filename 31558 100 8 31666 7bb2 opt/hash.o It's just a bunch of hash table functions. I cannot say, oh, my hash table functions are almost bigger than Turbo Pascal 3 for MS-DOS because of documentation (there isn't any), autocomplete (none and not applicable) or because I have networking, multitasking (also not applicable). I mean, Turbo Pascal 3 probably has some internal hash table itself, and provides an entire language and IDE, in the same space as my hash table stuff. /bin/ls on Debian 11, x86_64: size /bin/ls text data bss dec hex filename 131876 4728 4824 141428 22874 /bin/ls What are the amazing features in ls? It does ANSI color and probably something with extended attributes; so, ooooh! that must be why it's four times bigger than Turbo Pascal 3?
- pkaye 5y agoIn comparison, you can get TCC (tiny compiler) which is 100KB in size and can produce 32/64 bit code, compile the Linux kernel and probably better optimizations. https://en.wikipedia.org/wiki/Tiny_C_Compiler https://en.wikipedia.org/wiki/Tiny_C_Compiler
- jart 5y agoTCC is non-optimizing and its 64-bit implementation was contributed by someone else and never finished. Borland Pascal has an IDE. Their executable has 7.141258 bits per byte of entropy. That's even higher than SectorLISP, a 436 byte development environment, which only has 6.300498 bits per byte of entropy. I wish I could travel back in time and the people who wrote Turbo Pascal could probably teach me a thing or two about size optimization tricks.
- tomcam 5y ago> I wish I could travel back in time and the people who wrote Turbo Pascal could probably teach me a thing or two about size optimization tricks. Uh you’re doing fine. You are a complete beast and deeply inspiring. P.S. At Microsoft I worked with Anders Hejlsberg, who created Turbo Pascal (and C#, typescript, etc.) I took full advantage of my position and peppered him with questions about compiler writing, which he endured with grace and good humor.
- ngcc_hk 5y agoAmazing opportunity. That software is just crazily good. The question is even with him can we do that for other software.
- colejohnson66 5y agoHow do you even define “entropy” of a program? It’s a byte stream where each byte is important.
- jart 5y agoShannon entropy. https://github.com/jart/cosmopolitan/blob/master/libc/rand/measureentropy.c https://github.com/jart/cosmopolitan/blob/master/libc/rand/m... You can even measure a program in terms of physics constants too.
- phendrenad2 5y agoNow do "Things libLLVM (or libGCC) Is Larger Than"
- tomcam 5y agoShanghai, Australia, and Saturn
- WalterGR 5y agoFor comparison, how large were EDLIN.COM, EDIT.EXE, QBASIC.EXE, and QB.EXE?
- animal531 5y agoBeing stuck in a 3rd world country (with some sanctions at the time) I had trouble finding compilers, but I found a version of Turbo Pascal 6 on a BBS disc my brother had bought. It was pretty much how I learned to program, but I can't say I miss the days when the program would crash, then you insert a blank line randomly in the source code and it would work again.