10 ms·
Turbo Pascal Compiler in JavaScript
- jstanley 6y agoThe author's blog post is quite enjoyable: https://www.teamten.com/lawrence/projects/turbo_pascal_compiler/ https://www.teamten.com/lawrence/projects/turbo_pascal_compi... > My friend Fredrik Fatemi and I spent the summer after high school (1989) writing graphics programs in Turbo Pascal on his 286 PC (with EGA!) in his basement while watching The Princess Bride again and again on his VCR. He recently found some 3½" diskettes with our programs on it. I couldn’t find a good way to run them on my Mac, so naturally I wrote a Turbo Pascal compiler. It’s web based and you can try it here.[1] [1] https://www.teamten.com/lawrence/projects/turbo_pascal_compiler/demo/ https://www.teamten.com/lawrence/projects/turbo_pascal_compi...
- iagovar 6y agoA bit offtopic, but I recently discovered Lazarus, and I was pleasantly reminded that the language I learned in high school is still kicking.
- unnouinceput 6y agoEven better than that, it also runs natively on Raspberry Pi, so you can go down at bare metal on embedded projects.
- iagovar 6y agoYou mean ObjPascal or the IDE?
- unnouinceput 6y agoLazarus is the IDE. Free Pascal is the language. Both go together in Raspberry Pi without a problem. Create beautiful GUI that can run on touchscreen too. Use a $50 3.5 inch touchscreen + $35 RPi and you can have a beautiful IoT doing whatever you want.
- chadcmulligan 6y agoDelphi is also a commercial product still - I use it every day :-)
- jonpalmisc 6y agoCan I ask what kind of projects you work on as a Delphi developer today? I loved using it back in the day but I understand the market for it is quite slim now.
- dejv 6y agoI spent two decades as a Delphi contractor. Not doing it anymore, but I still see a lot of control software for industrial machinery and lab equipment (at least those made in EU), POS and kiosk software as well as custom ERP and ERP style software. I am currently working on NIR spectrometer and I am actually thinking about using Lazarus for driving touch screen instead of web based dashboard.
- pjmlp 6y agoFor example this company uses Delphi on their software products, https://www.lab-services.nl/en/home https://www.lab-services.nl/en/home In Germany, there are still conferences with Delphi contents (EKON 24 and BASTA), and some magazines have occasional Delphi content.
- chadcmulligan 6y agoA lot of medical software was written in Delphi and still going - it was written by Doctors and grew.
- AndrewDavis 6y agoPascal was my first programming language at University (circa 2016). Alas in 2018 they succumbed to student feedback (university admin was big on that) complaining about learning a "dead language". Missing the point that it is a brilliant teaching language for a beginner to learn fundamental concepts.
- pjmlp 6y agoFor Turbo Pascal 5.5, the Web IDE looks pretty much like Turbo Pascal 3.0. Oh well, cool achievement anyway. Playing with it right now.
- Narishma 6y agoIt's just a shallow copy and doesn't support the default wordstar keybindings in the editing mode.
- virgulino 6y ago^Y delete line, ^KB block begin, ^KK block end, ^KC copy block, ^KY delete block, ^PH for accents. Amazing, I don't know how many years (decades?) I haven't used it, but some keybindings are still in my memory!
- mromanuk 6y ago> I couldn’t find a good way to run them on my Mac, so naturally I wrote a Turbo Pascal compiler Of course, it’s the natural thing to do. Amazing, writing a compiler
- 082349872349872 6y agoNiklaus Wirth was annoyed that no recent computers had drivers for his favorite mouse (a gift from his sabbatical at Xerox), so instead of writing a driver, he built a new computer system (CPU architecture on up) that would talk to it...
- jll29 6y agoPascal was quite an accomplishment: a compact, elegant, easy-to-learn, easy-to-read language. And Wirth's "Compilerbau" (Compiler Construction) booklet (about the size and less than the weight of a bar of chocolate) is a true gem; it makes it all look very simple.
- Quekid5 6y ago> elegant, easy-to-learn, easy-to-read language. Compared to C? Yes, obviously. Compared to languages we have now? Not so much.
- unnouinceput 6y agoCare to tell me an example of one we have now? That Delphi (spiritual successor of Pascal) is not just as elegant? Because I can't think of one.
- Quekid5 6y agoObviously, these things are subjective, but... Python? Haskell? Scala? Heck, even modern Java?
- unnouinceput 6y agoJava elegant? Where you actually have the need for an IDE to be on a ultra-wide monitor because otherwise you can't read the name of a class? And you call that elegant? Python elegant? Probably you meant easy to learn, but elegant is something else entirely. Not to mention is still interpreted (though for the life of me I can't phantom why none writes a compiler for it. Would be a huge advantage) Haskell is the only one that I would call elegant on this list. But we were talking about modern. Haskell is 30 years old, I would not call that modern. Also Haskel and Lisp can be written (just like C macros if you want) to birth an entire different syntax if that's your kink.
- Quekid5 6y ago
- nathell 6y agoIn 1996, I wrote programs in TP 6.0 on a 486DX2/66 with 4 MB RAM. The IDE weighed in at a few megs, compiled my stuff in less than a second, and produced standalone .EXEs that ran on every DOS PC. In 2021, I'm writing programs for iOS in React Native. I need Xcode that weighs in at ~8GB _compressed_, node.js, and RN plus the whole slew of dependencies. On my 2020 Intel Mac mini w/ 32 GB of RAM, Xcode takes multiple minutes to build just the native part of the project from scratch. Where, where on earth did I go wrong?
- Quekid5 6y agoDid your programs in 1996 do anything close to as much as they do now? It's easy to feel a lot of nostalgia, but those truly were simpler times when we expected a lot less of our computers/programs.
- trav4225 6y agoSoftware did less in 1996. That's why it was so much better! :-)
- Quekid5 6y agoThat's actually not a terrible point :). I do remember WordPerfect (the DOS version) being absolutely incredible... in no small part because you could "reveal codes" (or whatever the name of that feature was). I helped my dad produce a couple of textbooks using WP and the most difficult thing we ever encountered was... printer drivers. (Which is still a pain point today if you're not using Windows/Mac.)
- mrlonglong 6y agoThat reminds me I should dig out my old TP sources and put them somewhere for others to enjoy. Yes, for sure, the dawn of computing was a simpler time.
- themodelplumber 6y ago> I sorted the five original Pascal programs by complexity and was driven to implement the minimal set of features to see each run in turn. Subsetting like this is so underrated. In case anyone is wondering why one person could do this without an engineering team, and act like it was so enjoyable ;-)
- orionblastar 6y agohttps://www.freepascal.org/ https://www.freepascal.org/ Free Pascal tries to be compatible with Turbo Pascal and is ported to dozens of systems.
- sashavingardt2 6y agoI still have all of my code from '95-'97. Wrote 3D tetris, and a flight simulator among other things.
- elvis70 6y agoI am relearning TP and DOS as a hobby. I would be interested if you decided to share you code. I lost all of my TP programs from '92-'02 as the result of a dramatic neglicence.
- lovedswain 6y agoIn case anyone is compelled to watch ROSE.PAS to its finale, the caterpillar simply stops moving.
- threeio 6y agoSo much pascal in my youth.. my BBS software was pascal and a mix of assembly.. been a long time.
- mikewarot 6y agoPascal, the boring tool that just keeps working for decades. I wrote a program to control a large water meter calibration system in the 1980s, using TP7 on MS-DOS. I did graphics and multitasking, along with monitoring the pumps, flow meters, etc. I was contacted in 2004 when it stopped working... because they had inadvertently swapped the two IO cables when replacing the PC it ran on. Y2K had zero effect on it.