[HN Gopher] Turbo Pascal Compiler in JavaScript
___________________________________________________________________
Turbo Pascal Compiler in JavaScript
Author : mariuz
Score : 63 points
Date : 2021-02-20 20:27 UTC (2 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| pjmlp wrote:
| For 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 wrote:
| It's just a shallow copy and doesn't support the default
| wordstar keybindings in the editing mode.
| virgulino wrote:
| ^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!
| jstanley wrote:
| The author's blog post is quite enjoyable:
| 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 31/2"
| 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_compi...
| mseepgood wrote:
| > I couldn't find a good way to run them on my Mac
|
| Dosbox / Boxer
| mromanuk wrote:
| > 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
| iagovar wrote:
| A bit offtopic, but I recently discovered Lazarus, and I was
| pleasantly reminded that the language I learned in high school is
| still kicking.
| jll29 wrote:
| Pascal 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 wrote:
| > elegant, easy-to-learn, easy-to-read language.
|
| Compared to C? Yes, obviously.
|
| Compared to languages we have now? Not so much.
| nathell wrote:
| In 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 wrote:
| Did 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 wrote:
| Software did less in 1996. That's why it was so much better!
| :-)
| Swizec wrote:
| How long would it take you to build everything you get from RN
| and all the libraries in TP6?
|
| From what I remember of TP6 it would take me a few years. Maybe
| even a decade. Oh and a lot of libraries (like mouse support)
| used assembly code and prob only worked on a limited numbed of
| computers.
___________________________________________________________________
(page generated 2021-02-20 23:00 UTC)