Live data from Hacker News

Pascal at Apple

blog.fogus.me

51–60 of 145 posts

Re: Pascal at Apple

#51
post #38
post #33

In order to run Apple Pascal on my Apple ][+, I had to buy a "language card". This was bigger than an index card (maybe 3 by 6 inches) and added sixteen whole kilobytes to your computer's RAM, beefing it up to a massive 64K and rendering it capable of running such a system hog as Apple Pascal. I think it was about a hundred bucks in the early 1980s. Meanwhile, the Apple ][+ could only display 40 columns on screen, wh…

Oh, I remember, although in my mind's eye, the 16K expansion card was bigger, about as big as a graphics card of today.

I was lucky enough to have a second hand Apple ][ from a "hacker", it had a ][+ rom and was pretty much loaded to the gills with a "z80 softcard" and etc. The slot 3 80-column card also had 16K RAM and was the only full-sized card in the machine. (It also came with full documentation if you wanted to burn a different font into a ROM.) So I had a 64K machine, but slot 0 was empty. Unfortunately I never had docs for Pascal, so I never bothered learning it and instead was mentally mutilated by BASIC.

A full-sized Apple card was a good bit less tall than a PC AT card and had to be angled to fit the case. e.g. [0]

[0] http://www.applelogic.org/files/AVOChires.jpg

Re: Pascal at Apple

#52
post #15
post #6

Earlier quoted context omitted.

It doesn't matter what year it is, JavaScript provides zero utility on a blog except to give the author analytics. Why do people hate the idea of documents so much? Imagine if you had to suffer through a different app for every single book you read; that is what a js-mandatory page is.

I agree. Rendering static contents shouldn't rely on JavaScript. And I still think disabling JS is like shooting yourself in the foot on purpose. Two wrongs don't make a right. Also I'm tired of people who always have to point out "hurrr durr site don't work without JS". Nobody cares.

'Also I'm tired of people who always have to point out "hurrr durr site don't work without JS". Nobody cares'

Apparently enough nobodies to tire you out.

Re: Pascal at Apple

#53
post #12
post #2

I really miss Pascal; it was a great and safe language for beginners. As it was extended with Objects and Modules, it was great for development. But there are good reasons it was surpassed by C. In early Pascal, you got a pointer by allocating memory; you could not get a pointer to an existing variable. You'd be surprised how often that gets in the way when implementing a data structure. Just try to implement the fol…

How does Pascal compare to python for absolute begginers?

IMO it's the best language for absolute beginners, if we are talking about classic Pascal without Borland extensions. It's very small language which could be taught in a few lessons yet it's powerful enough to learn classic data structures and algorithms.

The main drawback is that Pascal is not commercially successful, so you'll learn it and move on. Python, on the other side, is widely used, so Python knowledge is useful on its own.

Start from Pascal if you want to learn a lot of languages. I specifically would suggest to dive deep after Pascal and learn some assembly language, may be x86. They you'll have good basics and you can learn almost any language you want, C would be good, for example.

Main problem with Python IMO is that it's too high-level, it's dynamic, it uses GC. All those things are too far away from real machine code, so if you'll learn Python first, it might be hard to learn low-level programming and it's useful even if you're using JavaScript.

Re: Pascal at Apple

#54
post #4

Earlier quoted context omitted.

When I drive my car without an engine, it only goes downhill. I almost stopped using cars because I thought there was nothing interesting there. It's 2017. Turn on your JavaScript.

I know 10 years ago turning off Javascript was still a real concern. I tend to be of the mindset that in 2017 a browser without Javascript is like a browser without a mouse/trackpad - technically viable, but no one does it, so depending on Javascript is a given. Know of any good statistics on this however?

I am part of the 1.1% mentioned somewhere in this thread. If some page really and truly looks worth it, I do a click or two in uMatrix and enable the damn thing - for the originating domain, and then for external sources if it still doesn't work and really, really, really looks worth it. If it's clear that I shall be coming back, I make the exceptions permanent. But boy do I keep a mental note that the page is sub-standard. Approach worked well in 1996 (though no uMatrix), and works well in 2017.

Re: Pascal at Apple

#56
post #32

Earlier quoted context omitted.

Speaking of few differences from C and busted string semantics: my least favorite thing about Pascal is that strings and some types are 1-indexed, but dynamic arrays are 0-indexed. https://stackoverflow.com/questions/4083356/array-begin-from...

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...

Re: Pascal at Apple

#57
post #32
post #10

I joined Apple in 1987, about the time they started ditching Pascal in favor of C. C++ (in the form of CFront) was just starting to be a thing. Apple's Pascal had been extended to the point where there were few true differences between it and C, other than - strings with busted semantics (size being part of the type being a huge mistake, leading to a proliferation of types like Str255, Str32, Str31, Str64, etc). I sh…

Speaking of few differences from C and busted string semantics: my least favorite thing about Pascal is that strings and some types are 1-indexed, but dynamic arrays are 0-indexed. https://stackoverflow.com/questions/4083356/array-begin-from...

And an annoying difference between the desktop and mobile compilers for Delphi is that on desktop strings are 1-indexed as they've always been but on mobile strings are 0-indexed:

http://docwiki.embarcadero.com/RADStudio/Berlin/en/Migrating...

Re: Pascal at Apple

#58
post #50
post #32

Earlier quoted context omitted.

Speaking of few differences from C and busted string semantics: my least favorite thing about Pascal is that strings and some types are 1-indexed, but dynamic arrays are 0-indexed. https://stackoverflow.com/questions/4083356/array-begin-from...

Oh lordy, I'd forgotten the array index thing. That was painful.

The Low and High compiler intrinsics make array indexes easy to deal with. You don't need to care about the indexing to iterate over the array. You just go from Low(array) to High(array):

http://docwiki.embarcadero.com/Libraries/Berlin/en/System.Lo...

Re: Pascal at Apple

#59
Does the p-code compiler self host? I've been working on an emulator for an imaginary 8-bit machine (AVR instruction set), and have been looking for languafge options to run on it.

In the last few days, I've gotten FreePascal compiling for it, bit I would also like to have languages that I can compile or interpret on the machine itself.

Re: Pascal at Apple

#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 a couple of weeks ago I set up Lazarus for my kid to play with (there are too many Python GUI development options, and none halfway as good).

Lazarus is _amazing_ (if somewhat odd in today's world), and I really wish we had more IDEs like it instead of all the crappy Electron/web approaches for building desktop apps. 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.

(If anyone knows of anything like it for cross-platform desktop apps, let me know, I'd love to try it out)

- Link about early C dev on the Mac, that also mentions MPW and Pascal in passing - https://retrocomputing.stackexchange.com/questions/3213/what...

Post reply on HN