wduquette 14 days ago

I'm rather bemused by this, as it's targeting a subset of Turbo Pascal 5.5 while emulating the Turbo Pascal 1.0 UI. I used Turbo Pascal 1.0 on CP/M-80, and Turbo Pascal 1.0 through 4.0 (or thereabouts) on DOS (and UCSD Pascal on three different systems before that), and it's fascinating looking back at it how the notion of the "IDE" developed an expanded over that time.

The IDE shown here is, as I say, pretty much the Turbo Pascal 1.0 IDE...and it truly was an IDE. Being able to run your code with a keystroke or two—and then to see your next syntax error in the editor—it was mindblowing.

  • coldcode 14 days ago

    I bought a copy of Turbo Pascal 1.0 for DOS at the West Coast Computer Faire, where Borland had a little booth. Still is the most productive IDE I have ever used; that sucker was insanely fast. Of course, programming is a lot more complex today, but in 1984, that was magic.

    • wduquette 13 days ago

      I got my first copy about that time. I'd just recently gotten a KayPro 4 (a CP/M-80 computer), and had been playing with Basic and couple of other languages that came with it; and then I saw an ad for Turbo Pascal in Profiles, the KayPro magazine. I'd used UCSD Pascal a lot at that time, and the screen shot looked—well, not the same, but reminiscent. The cost was $49.95 (IIRC) for a real Pascal compiler, at a time when compilers were usually hundreds of dollars. I ordered a copy immediately (that is, in the next five minutes), and when it showed up in my mail box it felt like Christmas.

  • pjmlp 14 days ago

    Yes, it only changed on Turbo Pascal 5, Turbo Pascal 6 brought the Turbo Vision revamp, Turbo Pascal for Windows 1.5 the IDE experience into Windows 3.x, and it finalizing with Turbo Pascal 7 bringing some editor improvements to Turbo Vision based IDE.

    I used to have a 3.5" HD floppy with that classical editor shown here, with MS-DOS 3.3, and a couple of other utilities, to plug into the computers on the high school computer lab.

hnlmorg 14 days ago

> This is a web-based Pascal compiler that runs a subset of Turbo Pascal 5.5 code.

Given how powerful modern computers are, you could run the original TP in an emulated DOS virtual machine from the browser.

I get this is a hobby project though. Looks a fun thing to work on

runlaszlorun 14 days ago

I'll confess that I do have a sweet spot for Pascal. And I was hoping to see some of that sweet TUI action a la v5.5. Now that gives me a reason to add that to my pet project list.

I do think that the Turbo Pascal style TUIs did hit a sweet spot between more complex GUI technology and simplicity. Oberon from Niklas Wirth (RIP) is another interesting one.

  • hnlmorg 14 days ago

    Pascal was also created by Wirth. Albeit I don’t believe he worked directly on Object Pascal nor Turbo Pascal.

pjmlp 14 days ago

TP 5.5 was my introduction to OOP, sweet memories.

  • zamalek 14 days ago

    TP (and Delphi) was such a great language. A lot of the benefits of a compiled language without all the complexity (accidental complexity for 80% of projects) that C++ pulls in.

    • pjmlp 14 days ago

      Indeed, although we should also thank Apple for Object Pascal, whose extensions were the basis for TP 5.5.

whartung 14 days ago

It interesting that they compile into the UCSD P-Code.

Arguably, why not. It’s specifically designed to execute Pascal. Why reinvent the wheel.

One of the most interesting p-code instructions is LOD. This get the value of a local variable. The trick is that it takes two arguments. One them is simply the offset to the variable. The other, however, is from which procedure environment.

Pascal supports nested procedures. And because of that, within each nested procedure, they have access to all of the local variables in scope. So in order to access a parent local variable, the engine has to walk the stack references to the parent scope.

This walk is a first class concept in the p-code. It’s not just simple primitives like CPU. Most are, but much of the meat are the very architecture specific operations.

Similarly, calling procedures work hand in hand with the segment concept built into the system. A segment is much like a library. A collection of procedures, with an offset table for routing.

Much of this segment concept was pretty much lifted wholesale by the original Mac OS, as well as the Apple II GS. It’s a strikingly powerful system lurking within a pretty simple OS.

  • CRConrad 14 days ago

    So "LOD" = "Line of Descent", or some such?

ngcc_hk 14 days ago

I think turbo bridge need 3.3 sadly.

speed_spread 14 days ago

[flagged]

  • pjmlp 14 days ago

    I keep having this prevert thought of writing a UCSD P-Code to WebAssembly converter, making Pascal cool again, riding the WASM hype wave.

    • andsoitis 14 days ago

      You probably already know, but FPC (the Free Pascal Compiler) supports two WASM compilation targets: WASI and embedded - https://wiki.freepascal.org/WebAssembly

      RemObjects' Elements compiler (which supports Object Pascal, C#, Java, Go, and Swift) can also output WASM - https://docs.elementscompiler.com/Platforms/WebAssembly/

      • ksherlock 14 days ago

        boring! UCSD p-code is a stack based virtual machine. WASM is a stack-based virtual machine. Converting one to the other is an interesting project.

      • pjmlp 14 days ago

        I was aware, but not how far they have come already, thanks for heads up.