Live data from Hacker News

Pascal at Apple

blog.fogus.me

131–140 of 145 posts

Re: Pascal at Apple

#132

It may seem quaint now, but Apple Pascal was a serious tool. I took AP Computer Science in 1985 and the language taught was UCSD Pascal on the Apple ][+. (In the 80's, C on an Apple ][ was impossible. The only C compiler you could get was for a card that went in the expansion slot that included a Z80 processor.) When I went to college in 1986, Pascal was the primary language used in all entry-level courses at Virgini…

ORCA/C was available since the mid/late 1980's (IIRC). It is still being sold too https://store.syndicomm.com/syn/complete-c-bundle/.

They also had a pascal. Granted it was targeted to the IIGS rather than the straight II line, but given my personal experiences running apple pascal on a machine with only a single floppy drive it was just as well. In a way Jobs was right, BASIC+assembly were a better target for the 8 bit apple II than pcode and the long development turnaround time for pascal. Worse the resulting applications were slow, not just running but the extra delay loading the pascal system from 5.25" disk rarely made for a good user experience.

That said, to this day, I compare all new languages I learn to object pascal/delphi, and frankly I have yet to find one that seems as polished, productive, well documented, resistant to bugs, etc.

Re: Pascal at Apple

#133
post #84

I'm reminded of a really great interview with Bill Atkinson where he describes (among many other things) how he initially brought Pascal to Apple and the Apple II. https://youtu.be/6tUWoy1tJkE?t=45m The Pascal bits are from 45:00 to about 50:00. ... My manager at the time said, no, we don't want to do this [Pascal], people are happy with what they got. I overrode him and went to Jobs, and Jobs said "Well, I'm not con…

Not to take away any of Woz's brilliantness, but coding the 6502 in hex was something many of us did every day in the 80's. He's right that branches are a tad tricky, but the number of instructions you usually use are few enough to remember the hex codes(and number of cycles) for along with the various hardware registers(CIAS, VIC-II and SID mostly for me) and bits within those registers.

That's true. Although I used pen and paper to calculate offsets, I could write simple routines right away in machine code when I was 12 years old.

Re: Pascal at Apple

#135
post #98
post #60

I wrote a fair amount of Pascal in my 680x0 Mac days, both in MPW (the Macintosh Programmer's Workshop) and THINK Pascal. Back then Modula-2 was available on VAXen and "big" machines, but Pascal was almost "portable" across Mac/PC/VAXen and was amazingly fast, so it was pretty fun. I eventually moved to C (also using THINK C - see retrospective link below for a sample of those heady times) and never looked back until…

>It builds fast, tiny, entirely native apps in less than a second, and is an excellent example of how far Pascal went despite falling off the mainstream wagon. D meets some of your criteria too, at least somewhat small fast, native apps. Build speed is decent (or more) too, and it is designed for that - doesn't have C's repeated overhead of pulling in include files. [1] Haven't tried the GUI toolkits for D though (ye…

>doesn't have C's repeated overhead of pulling in include files.

Sorry, typo - I meant to say "C++'s repeated ..."

C may have it too, don't remember if so or not right now.

The video mentioned in my above comment has some details on why this is such an issue in C++ - from the source, i.e. Stroustrup, the creator of C++. There's a bit of humor around that fragment of the talk - it is somewhere near the end, IIRC.

Re: Pascal at Apple

#136

Earlier quoted context omitted.

And the string length is in the 0 byte, meaning no strings longer than 255 bytes. At least in old Turbo Pascal anyway!

Yes, this is not a limitation in Free Pascal or Delphi. The ShortString type still exists and is limited to 255 bytes. But the AnsiString, WideString, and UnicodeString types are variable length and can be up to 2 gigabytes: http://docwiki.embarcadero.com/RADStudio/Berlin/en/String_Ty...

In the case of classic Mac OS it was part of the API.

Re: Pascal at Apple

#137
The UCSD Pascal system, which ran on Apple II and many other computers in the late 70s - early 80s, always displayed a menu (for whatever program was running) across the top line of the screen. I wonder if that was the inspiration for the Macintosh menu bar.

Re: Pascal at Apple

#138
post #124
post #43

Earlier quoted context omitted.

Off-topic, but nested functions are one of my favorite gcc extensions.

In the past I've sometimes used standard C++ local structs to nest functions. E.g.: int f() { struct local { static int nested_func() { return 123; } }; return local::nested_func(); }

I've done that, too. It's clumsy and only does half the job (doesn't provide access to locals). At some point one just gets tired of the workarounds :-)

Re: Pascal at Apple

#139
post #72

Earlier quoted context omitted.

C# has just implemented nested functions.

There is a nice blog post that concisely explains why local functions are better than lambdas: https://asizikov.github.io/2016/04/15/thoughts-on-local-func...

C#: "Local functions can not be static."

Static nested (i.e. local) functions in D can be static. What that does is prevent the function for accessing locals in the enclosing scope(s).

Re: Pascal at Apple

#140

It may seem quaint now, but Apple Pascal was a serious tool. I took AP Computer Science in 1985 and the language taught was UCSD Pascal on the Apple ][+. (In the 80's, C on an Apple ][ was impossible. The only C compiler you could get was for a card that went in the expansion slot that included a Z80 processor.) When I went to college in 1986, Pascal was the primary language used in all entry-level courses at Virgini…

> When I went to college in 1986, Pascal was the primary language used in all entry-level courses at Virginia Tech.

When did Virginia Tech switch from Pascal to C++? I did my undergrad there in CS between 2002 and 2006 and the introduction courses were in C++ by then (though I believe they now have switched to Java and Python).

The only exposure I had to Pascal was implementing a compiler for an undergraduate and graduate level course for a subset of the language's features.

Post reply on HN