10 ms·
Things That Turbo Pascal Is Smaller Than (2011)
- pkaye 7y agoI'd like to see a performance comparison between Turbo Pascal and TCC (tinycc) which is about 100k is size.
- fortran77 7y agoWhile today's code does a lot more, and has to deal with everything from internationalization to accessibility, I have to believe that we (I was around programming in those days!) were better at computer programming back when computers had memory measured in kilobytes than we are today. I still take on jobs to do embedded programming in assembly language on PIC or similar processors and my clients are usually amazed at what can be done in tiny amounts of code.
- tomaszs 7y agoLimited resources are what drives creativity and art. I also think understanding of programming is better of persons who had this background
- dylan604 7y agoSevere limits/restrictions can influence some amazing solutions. To me, this separates the real programmers from the people that just get paid to bang out code. We went to the moon and back on this kind of severe limitations, yet today, we can't make a website without a library requiring 100s to 1000s of dependencies resulting in a total download larger than the amount of data required by the entire moon missions. That's just for one page of useless internet. I just shake my head at the silliness.
- not_kurt_godel 7y ago> We went to the moon and back on this kind of severe limitations Adjusting for inflation, NASA spent $283 billion going to the moon[0]. I can't be bothered to find a breakdown of how much of that budget could be directly tied to writing code, but I suspect that the investment was a wee bit higher than a rando frontend dev slapping together some libraries in 2020. [0] https://www.planetary.org/get-involved/be-a-space-advocate/become-an-expert/cost-of-apollo-program.html https://www.planetary.org/get-involved/be-a-space-advocate/b...
- throwanem 7y agoReal programmers don't use Pascal. https://web.mit.edu/humor/Computers/real.programmers https://web.mit.edu/humor/Computers/real.programmers
- philistine 7y agoNot that I disagree with your point, but the computers used for the Apollo program needed a healthy amount of printed manuals and ground-based support to be functional. They were only a part of the computational stack required for Apollo.
- analog31 7y agoI think part of the fun in the "old days" was that you could familiarize yourself with your tool chain in its entirety. I mean, I knew every command in Turbo Pascal, and virtually every feature of the "operating system" such as it was. Even finding out information about algorithms was hard before the Internet, so I had to wring my own. The microprocessor wasn't radically different from the 4 bit computer that I built on breadboards for my college electronics class, and I could tell you pretty much all of the things it could do. Then the only limitation was you and your own wits. Today, not only is there a language to learn, but libraries, and a framework, and an architecture, and a "stack" and revision control system... you can't ever master the whole thing and it's changing faster than the baud rate of my eyeballs. It's still a boatload of fun, but a new kind of fun, and sometimes I like going back to the old kind.
- oaiey 7y agoWe work on the shoulders of Giants nowadays.
- jonsen 7y agoYeah, it’s a giant mess.
- smitty1e 7y agoYes, but did they have smart phones in that Eden?
- basementcat 7y agoThe phones made cool sounding tones when you pushed the buttons.
- analog31 7y agoThey had buttons.
- drivingmenuts 7y agoI remember when I could remember details about the languages I worked in without having to google or have the docs handy.
- hcarvalhoalves 7y agoI learned TP during college and thought programming professionally would be simple like that... Ignorance is bliss right?
- knodi123 7y agoI remember when we hired an intern straight out of college, and he had to do a task where one of the steps involved sorting a long list. He got so excited, and spent half a day implementing quicksort. He got so sad during code review when I showed him there was already a built in Array.sort method that was faster than his.
- greenyoda 7y agoI've never used Turbo Pascal, but I've used UCSD Pascal, which was also pretty small. In a college computer graphics course in around 1980, we ran UCSD Pascal on Terak 8510/a machines, which had a total of 28K 16-bit words (56K bytes) of RAM. The Terak was an interesting machine: > The Terak 8510/a of 1976 or 1977 was among the first desktop personal computers with a bitmap graphics display. It was a desktop workstation with an LSI-11 compatible processor, a graphical framebuffer, and a text mode with downloadable fonts. Despite the lack of a MMU, it was capable of running a stripped version of UNIX version 6. It was the first personal machine on which the UCSD p-System was widely used.[1] Various universities in the USA used it in the late 1970s and early 1980s to teach Pascal programming. It provided immediate graphic feedback from simple programs encouraging students to learn.[1] Also, in those days, we were running Version 7 Unix on a PDP 11/45, which supported several concurrent users in what would now be an unimaginably tiny 256K of RAM. [1] https://en.wikipedia.org/wiki/Terak_8510/a https://en.wikipedia.org/wiki/Terak_8510/a
- 0xcde4c3db 7y ago> And the whole thing was lightning fast, orders of magnitude faster at building projects than Microsoft's compilers. This particular comparison is interesting when you consider that the primary author of Turbo Pascal, Anders Hejlsberg, has been at Microsoft working on C# and TypeScript for quite a while.
- oaiey 7y agoAnders (and Typescript and C# and TurboPascal) is always about productivity. Compile time is only a small part of that.
- kragen 7y agoPhilippe Kahn is not Anders Hejlsberg!
- 0xcde4c3db 7y agoI suppose we could call Kahn the primary author of Turbo Pascal v1 if we exclude the actual compiler from the definition of "Turbo Pascal", but I'm not sure why we'd do that, especially in the context of this article. He definitely deserves credit for establishing the product category of "credible off-the-shelf IDE for commodity microcomputers", though.
- kragen 7y agoI didn't realize Anders Hejlsberg wrote the compiler in the original Turbo Pascal! Thank you for the correction.
- pjmlp 7y agoAnd J++.
- userbinator 7y agoIt's even more interesting when you consider that it ran under MS-DOS, which had no dynamic linking --- it's a statically linked binary. The touch command under OS X Lion (44,016 bytes). ...and I bet that one is dynamically linked. I believe the reason why it's so fast is because it has no optimiser, and generates code as it parses. Pascal is also one of the easier languages to compile.
- zozbot234 7y agoTurbo Pascal programs relied on separate on-disk .BGI files that contained object code and effectively implemented a kind of dynamic linking (albeit in a single-task context). It was possible to directly link them into the final executable, but this wasn't the default.
- pcardoso 7y agoPerhaps they were .TPUs instead of BGI? BGIs were the graphic drivers IIRC.
- dragonwriter 7y agoTPUs are closer than BGIs, but still aren't dynamically linked. They are object files which are statically linked into the final exe. It's possible that the author is thinking of pre-TP4.0 chain files (which were used to get around the 64K memory limit of .COM format before TP switched to generating EXEs.)
- api 7y agoWhat is all the weight in that "touch" binary? It can't be code. My guess would be that the format is just not optimized for size and contains a bunch of boilerplate records whose minimum size is in the kilobytes.
- haberman 7y agoI just ran Bloaty (https://github.com/google/bloaty https://github.com/google/bloaty) on /usr/bin/touch from Catalina, and I got this: $ bloaty `which touch` -d segments,sections --domain=file FILE SIZE --------------- 55.1% 19.6Ki __LINKEDIT 91.7% 18.0Ki Code Signature 2.7% 544 Symbol Table 1.9% 376 Lazy Binding Info 1.6% 328 String Table 1.2% 232 Indirect Symbol Table 0.6% 112 Binding Info 0.2% 32 Export Info 0.1% 24 Function Start Addresses 0.0% 8 Rebase Info 0.0% 8 Table of Non-instructions 0.0% 0 [__LINKEDIT] 22.2% 7.90Ki __TEXT 35.0% 2.77Ki __TEXT,__text 33.6% 2.65Ki [__TEXT] 17.2% 1.36Ki [Mach-O Headers] 4.2% 339 __TEXT,__cstring 3.4% 274 __TEXT,__const 3.3% 266 __TEXT,__stub_helper 1.9% 150 __TEXT,__stubs 1.5% 120 __TEXT,__unwind_info 11.2% 4.00Ki __DATA 94.9% 3.80Ki [__DATA] 4.9% 200 __DATA,__la_symbol_ptr 0.2% 8 __DATA,__data 11.2% 4.00Ki __DATA_CONST 98.4% 3.94Ki [__DATA_CONST] 1.6% 64 __DATA_CONST,__got 0.3% 104 [Mach-O Headers] 100.0% 35.6Ki TOTAL So 2.77Ki of actual code in "__TEXT,__text". Those [__TEXT], [__DATA], and [__DATA_CONST] sections are the part that is lost to padding, so 10.4Ki or so. Disclosure: I am the author of Bloaty.
- tomaszs 7y agoI have written a 3D engine in Turbo Pascal. There was a castle you was able to walk through. It was fascinating because all calculation has to be done manually including figuring all the math to figure out where to plot a 3D point on a screen. Great times. Later i have moved to Visual Basic and OpenGL. Nice memories from primary school
- smitty1e 7y agoAh, Visceral BaySuck. I've been in places where all one had was MSOffice, and that VBA IDE was it. I keep a private github repo called NVBC (NecroVisualBasiCon) with snippets of the all the madness that was trying to trick VBA into being a useful tool. The IDE was good, but the language itself was surgically precise in delivering 83% of what one wanted for a given task.
- tomaszs 7y agoIt was caused mostly by the way MSOffice access was delivered to VBA at that time. And maybe also by VBA itself. Cannot remember. Anywho. VB standalone was pretty decent. Nice you have the library. Its part of the history
- geophile 7y agoTurbo Pascal was an IDE and a blazingly fast compiler. In 1986, I ran it on my 64k IBM PC (8088 4MHz). It was like nothing else I had experienced previously. Prior to that, I had developed software in grad school on punch cards. I occasionally had access to a PDP-11. I don't remember what editor I used, but it certainly wasn't an IDE. It may have been line-oriented. At work, we had a VMS system, and I had access to a C compiler and my first emacs. Not too bad, but nothing as immediate and responsive as Turbo Pascal. Viewed another way, Turbo Pascal recaptured the incredibly rapid edit/run cycle that I first experienced with a PDP-8M running BASIC. Only now, I had 64k instead of my shared of 12k shared among a maximum of four users, an IDE instead of a line editor, and a far better language. Turbo Pascal also blew away anything else available on the PC. I had a C compiler from Microsoft that was far more expensive and far slower. Turbo Pascal was a truly magical piece of software. I remember that I had some initial skepticism about it. As I recall, it took some liberties with the language. But once I finally used it, I was instantly converted. IMHO, nothing has quite captured that experience of development until IntelliJ, starting with 4.x or 5.x.
- analognoise 7y agoLazarus/FreePascal? There's a dedicated group of troopers who have kept the flame alive. It's cross platform. There's an Android port in progress. There's a JavaScript backend. The IDE is like all the good things about Delphi 7, none of the drawbacks.
- themodelplumber 7y agoYes! I use it and really enjoy it so far. There are obviously some people using it for _very_ advanced work in medicine and the sciences, to see some of the community posts and shared libraries... Personally I think I'm building yet another text editor (starting with a text viewer) but the experience has been great. The community is really a nice bonus, too.
- brnt 7y agoWhere does that community hang out? I find it very difficult to find Pascal projects on Github for instance.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- wuwuno 7y agoWrote a program to manage the sale and rental of video tapes for an small business. I wrote it in 1984, using Turbo Pascal. The last time I checked the store was still running the same software in 2005. The application was table driven, all important configuration items were stored in a text file as a key-value pair. It had a bar-code scanner and was tied into a cash drawer. Receipts were printed on small dot matrix printer. It took about 4 weeks to write. The best programming environment ever.
- roel_v 7y agoDidn't the software need to distinguish between vhs and dvd by the mid 90's?
- Mister_Snuggles 7y agoBack in the mid-80s it would have needed to distinguish between Betamax and VHS. Or it could be handled simply by listing "The Terminator (Beta)" and "The Terminator (VHS)" as separate titles.
- deleted 7y ago[deleted]
- watertom 7y agoIt did. Like I said everything was table driven, with key value pairs. The owner opened up the text file, and added a new rental type, DVD. They also started renting VHS players, and DVD players, just added as new categories. If the sales tax ever changed, the owner could easily make that change as well. It had a built in rewards program, specials, sales, all editable in the text file. Once the software was delivered I never touched it again.
- coolgeek 7y agoYou just doxxed your throwaway acccount. There was no contact in either profile, so my choice was to post as a comment, or leave you unknowingly exposed
- AceJohnny2 7y agoCounterpoint: what are some things that Turbo Pascal lacked that we take for granted in a modern language environment?
- StreamBright 7y agoI would say having an installer that depends on 3 other languages, using a particular libc without the ability to switch it up, unable to cross-compile to other platforms.
- pjc50 7y agoNo intellisense or similar. No extensibility or scripting. 80x25 text mode.
- zozbot234 7y agoVGA-class cards could display a 80x50 text mode. Not sure that it was easily accessible in MS-DOS without assembly hacks, but it could be configured from within Windows.
- dragonwriter 7y ago> VGA-class cards could display a 80x50 text mode. Not sure that it was easily accessible in MS-DOS without assembly hacks. It was directly accessible from the DOS prompt with the MODE command. Don't remember if TP had a library function that exposed it.
- mkl 7y agoYes it did, and I'm pretty sure you could use the IDE in that mode too (5.5 or 6.0).
- ghaff 7y agoYeah, there were some hacky things you could do, e.g. using software from Quarterdeck? Don't remember. I'd have to go back and look at docs I wrote from a program I wrote t the time. I seem to remember supporting some alternative screen resolutions in a an MS-DOS directory manager I sold.
- esnible3 7y agoTurbo Pascal is 3.7x smaller than the Wikipedia page describing it. Wikipedia's prose description of Turbo Pascal is 148k.
- eyelidlessness 7y agoI'm curious how large the actual components delivering that page are. I suspect they're significantly larger. HTML output (in this case) is a product of a program, not the program itself.
- bdcravens 7y agoTurbo Pascal is a language I've never used professionally but always has a special place in my heart. I grew up poor without any kind of a computer but always considered computers "fun". As a high school senior (1995) I took what I thought was just another computer class; they were teaching Turbo Pascal, and I immediately knew I discovered my life's passion.
- dakna 7y agoI still have 2 post-it notes on my second monitor from when I decided to finally deep dive into the Android Framework. One says "1988 Pascal", the other one "2018 Kotlin". I wrote those after noticing how similar the syntax is for variable declaration and it felt like going back to my roots. The sheer joy of knowing your IDE, the language and the target platform all in one interface reminds me a lot of the days staring at the blue screen of Borland Turbo Pascal in the early 90s. I really missed it in all those years of web development I did afterwards.
- pkaye 7y agoSame for me. I learned most of my programming in high school in our computing classes using Turbo Pascal. I would finish the classwork in a manner of minutes and spend the rest of the time writing games and other software. Our teacher didn't mind us playing games as long as we wrote it ourselves.
- jasonv 7y agoI remember coding in Turbo Pascal to hack on PCBoard and its fork, WWIV, which were BBS programs.
- throwaway_pdp09 7y agoThe BBC computers had a pascal compiler that was about 5K if I remember. It lacked quite a lot though, like records I think, enumerations & more, but had nestable procs/funcs so wasn't too far off the language in other ways. Never used it BTW. One thing I liked about pascal but missed in every language since is the ability to have arrays start from arbitrary values. It can be fudged in C/C++ pretty easily but still, be nice to have it built into languages like java/scala/so many more.
- badsectoracula 7y agoAnother nice feature is sets and ranges, so you can have something like type Day = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); Days = set of Day; const Weekdays = [Monday..Friday]; ... if Today in Weekdays then ... ... Sets are essentially bit flags but they look much better than a series of #define MONDAY 0x0001 #define TUESDAY 0x0002 etc. IMO, of course :-P.
- codr7 7y agoI had so much fun with Turbo Pascal in the early 90's, I used it to create everything from GUI frameworks to ANSI bulletin board systems and keyloggers. Definitely the most creative environment I've come across. Then came C++, and I wasted A LOT of time trying to wrap my head around it while creating nothing of value before giving it up entirely. My Pascal experience also landed me my first job after university, which was to help write/maintain a system developed in Delphi.
- lioeters 7y agoI discovered Turbo Pascal in my preteens, after BASIC. Spent a few years with it and got pretty fluent. Interestingly enough, I remember also working on a bulletin board system, called something like WWIV. Now that I think about it, that was a seed planted for my current occupation. Learned C after that, but drifted away from programming (for a decade or so) around when C++ came out. I came back around to computers when I wanted to build myself a static website - and I'm still in the wondrous rabbit hole. These days, much of my time is spent reading and writing TypeScript. How strange after all these years, I'm again speaking a language created by Anders Hejlsberg. It's a joy to work with VS Code editor as an integrated development environment, and I fondly remember my time with Turbo Pascal.
- icedchai 7y agoI used Turbo Pascal back in high school (1992-93, AP computer science.) By that point, I already knew C and it felt like a step backwards in some respects. Still, the IDE was impressive and it was a lot of fun!
- Roboprog 7y agoI learned Pascal before learning C in college back in the 80s. For me, C felt like a step backwards towards assembly language. Things missing in C: Bounds checking; Non-null references; Subranges; Sets; Nested functions?
- zengargoyle 7y agoOh wow, I think I learned Pascal via Turbo Pascal. When I was 14 in 1984 I went to a Computer Camp at Virginia Tech and we used Pascal in this monolithic IDE sort of thing. Maybe it was actually UCSD Pascal.... We made a simple 16 room 4x4 dungeon with keys and doors. Each group writing the code for one room and them tying them all together. It came out not bad for a bunch of kids. When I got my Amiga a year later I was happy that there was a Pascal compiler, then saddened that it only had stdio sort of interface. No way to open windows and draw things or the like. Luckily I found a FORTH that not only had a 68k assembler but also all of the constants and things you needed to write graphics and the bonus of making that single executable file. Sorta sad I never really got to use Pascal after that. By university time it was all Assembly, FORTRAN and C for the CS classes.
- knodi123 7y ago> I think I learned Pascal via Turbo Pascal. When I was 14 in 1984 Ha, I learned it via TP when I was 14 in 1994! So many dumb hijinks in that class. If there was somebody you didn't like, one thing you could do was space out past the end of line 1 of the program and just write END; in the 100th column or so. That made everything else in the file just a comment. There was no word wrap, so unless they knew how to page right, there was no way they'd ever figure it out! I also wrote a 2-player pong game, but I knew the keyboard handler could only handle 3 keys at a time, so if you wanted to temporarily disable the other player at a key moment, you could just hold down three keys and shut him out. Ah, good times.
- sbussard 7y agonode_modules
- bluemooner 7y agoGoing beyond Turbo Pascal, the author is amazing! I've just discovered this blog and I'm amazed by how simple and relevant every article is. Here are some of my favourites: [1] https://prog21.dadgum.com/128.html https://prog21.dadgum.com/128.html [2] https://prog21.dadgum.com/149.html https://prog21.dadgum.com/149.html
- Shorel 7y agoI made a Tetris clone in Turbo Pascal back in the day. It ran in an amber monochrome screen. When I got a newer, faster computer, the colors were a bit under designed, and it ran too fast. =) Good times.
- fortyrod 7y agoI was one of the 12 people who wrote a lot of Apple Pascal in the early 80s. One a day I got a call from a tech writer who was reviewing Turbo Pascal for Byte or some other programming mag. He had heard through the grapevine that I did Pascal and brought over an Osborne luggable and a copy of Turbo pascal for CPM. I fell in love instantly. Although I was a die-hard Apple guy at the time, the PC version of TP eventually turned me into a PC programmer overnight. One other thing, it was so cheap and fast that people started using it as their text editor of choice. It would be interesting to know how many copies of TP were sold that never compiled a line of code.
- mikewarot 7y agoI wrote an application that we sold to clients in TP. I implemented a set of libraries to do forms based editing, a cooperative form of multi-tasking, and the ability to pipe text between those tasks. It was a lot of fun, and a bit mind bending to have a function return from the spawn call twice. 8)
- wolfspider 7y agoTurbo Pascal was what the cool kids coded in. Although that sounds like an offhand statement the kids I knew that started out learning it went on to work at Id Software later on. A little before my time and I was jealous because QBasic was where I was at back then. Seeing that though gave me the courage to jump into Borland C++ not long after. It certainly made me realize there was a world beyond BASIC.
- malkia 7y agoAnd TurboVision - that was years ahead of everything else...
- pjmlp 7y agoTurbo Vision was my introduction to OOP after learning it with Turbo Pascal 5.5 and getting old of a 6.0 copy. Learning C after that experience was probably similar to how Bjarne felt being forced to leave Simula for BCPL.
- counterplex 7y agoMy Turbo Pascal story is weirder than most I think. When I was much younger, someone I knew was learning COBOL and the "editor" they were told to use was a pirated binary on a floppy. That binary was called tp3 and nobody paid any attention to it until I, wanting to also learn a bit about COBOL, decided to try it out myself and read the notice that the program output. Something about Pascal. Long story short, I ended up looking into Pascal and using that tp3 "editor" to learn a bit of Pascal, which seemed a lot more fun than COBOL.
- tomcam 7y agoYou definitely win the prize for weirdest story. That was random and very cool.
- DeathArrow 7y agoI toyed with Basic on Z80 as a kid but I have fond memories of Turbo Pascal. When I was 14 and I first got access to a PC at school, Turbo Pascal was the first proper programming language I got access to. It got a compiler, strong typing, an IDE and a help page. Help page was invaluable since we didn't have Internet access nor did I owned Pascal books. Pascal made me think anything is possible, from games to line of business apps. It provided low level access and I toyed with rebooting the PC and entering BIOS and bypassing BIOS password by writing to some hardware register. My journey with Pascal didn't last much, as I discovered C and C++ which seemed even more amazing and flexible.
- DeathArrow 7y agoSince many of the problems we have today to solve were solved in the '80s and '90s with tiny tools such as Turbo Pascal, we can conclude that faster hardware and lots of memory are allowing us to bloat the software by using layers upon layers of abstraction, SOLID and DDD principles, virtualizations inside virtualizations inside virtualizations, emulators running on emulators, totally inefficient interpreters. Using Python with its Global Interpreter Lock seems like a total antipattern when it comes to use resources wisely.
- gmueckl 7y agoWell, some things are enabled by more involved software architectures that would not have been realistically achievable back then. Turbo Pascal was limited to only showing the first error it encountered when compiling your program. It did move the cursor to the location of the suspected error. It wouldn't have been able to generate error markers in th e background while you type. Autocompletion would not have been realistically achievable either. That doesn't mean that lots of programs aren't bloated by overly complicated internal designs. Sometimes this is a concession to the development team structure. Sometimes this is incompetence. It is hard for me to tell from the outside.
- Certhas 7y agoBut it compiled instantaneously. So "compile" was simply the command used to "jump to next error".
- badsectoracula 7y agoTBH in practice i never found showing more than one error useful since way more often than not these errors are either related or the first error also causes the other errors. I only find it useful when the compilation process is very slow, but i try to avoid slow compilers whenever possible and always just recompile whenever i fix the first error. Most IDEs move your cursor to the error position so the build key also acts as a "move to next error" key :-P.
- gmueckl 7y ago
- yread 7y agoI think the only relevant comparisons are the other binaries. Why is the touch so large?
- wglb 7y agoWritten by Anders Hejlsberg https://en.m.wikipedia.org/wiki/Anders_Hejlsberg https://en.m.wikipedia.org/wiki/Anders_Hejlsberg, who is also lead architect of C#. I was writing a pascal compiler at the same time and was rather blown away by what Turbo Pascal was able to do.
- downerending 7y agoIn the 80s, had an internship at a government outfit with very high security. This was before the days when PC security was really understood. I could easily have run off with all sorts of very secret stuff. What I did run off with was a copy of Turbo Pascal.
- ca98am79 7y agoTurbo Pascal was pivotal for me growing up. I often think back on the complete joy of creating, when I was first learning to program as a kid. I have been trying to arrange my life in a way so that I can get back to that feeling. You can see some stuff I did long ago here: https://github.com/ca98am79/my-first-programs https://github.com/ca98am79/my-first-programs