Live data from Hacker News

Pascal at Apple

blog.fogus.me

81–90 of 145 posts

Re: Pascal at Apple

#81
post #64

Earlier quoted context omitted.

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

I don't remember if Apple Pascal had those intrinsics or not. But I never saw any code that used them, and I read most of the Pascal code base for MPW and a bunch for the OS.

Turbo Pascal had them.

Re: Pascal at Apple

#82
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!

With 640 KB it wasn't as there was a lot of space to have bigger strings.

Besides, there were arrays as well, and TPW had safer strings without that limitation PCharStr.

Re: Pascal at Apple

#83
post #79
post #67

Earlier quoted context omitted.

I don't know anything like Lazarus, but I do know a language that shares many of the characteristics of Pascal (small, fast, native binaries). That language is Nim and I think there is a good chance we could get something like Lazarus out of it.

If you can do Visual Basic-like forms with it... that's the main appeal of Lazarus for me right now - instant native GUI development.

I really think Sun and MS did a big mistake with their VM approaches instead of following what was common on the 90s.

So we had to wait 20 years, failure of Moore's law, cache optimization issues, competition from new languages, for them to come up with .NET Native, CoreRT and the initial AOT on Java 9

Re: Pascal at Apple

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

Re: Pascal at Apple

#85
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?

Although I use Python extensively and started to forget about Pascal (ex Delphi guy here), Pascal is a much better beginner language IMO.

Start with Python and you're most likely to be stuck with dynamic typing/runtime mindset and it'll distance you too far away from OS level native land.

OTOH starting with Pascal, you'll learn a great deal of low level (well, relatively) stuff and that will make you appreciate the higher level languages when the time comes and will let you leverage them more efficiently. Also as a bonus, a big bonus I think, Pascal will let you feel at home if you ever need C/C++/D in your career.

Re: Pascal at Apple

#86
post #6
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.

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.

MathJax

Re: Pascal at Apple

#87
post #6
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.

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.

It looks like in this case it's not so much a blog post as "I had this thread of discoveries on Twitter, how about I try out Storify to just bung it on my blog"[0], which means using Twitter's JavaScript embedding. Obviously even from a narrative perspective a properly-written blog post would be to prefer but this STILL manages to be way better than linking to the twitter.com feed because Twitter's JS UI is completely unusable to read threads...

[0] https://twitter.com/fogus/status/888076512443998209

Re: Pascal at Apple

#88
post #43

Earlier quoted context omitted.

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

I discovered with C and C++ compilers, if an extension was added that was not in the Standard, nobody would use it - not even the people who requested the extension. It wasn't like the Pascal community, where nobody would use the compiler unless it had a boatload of extensions :-)

I think you're onto something (about C extensions). There was a time, before clang became default on osx, when Apple deprecated nested functions (and perhaps others) in their version of gcc, and afaik no one complained. So I may well be one of the very few. Oh well.

Re: Pascal at Apple

#89

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…

Interesting at my first job I did a little bit on USCD Pascal on apple.

Re: Pascal at Apple

#90
post #51
post #38

Earlier quoted context omitted.

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 Pa…

Back in the day THE Gucci accessory for an Apple ][ was the clear Perspex top cover to show off your collection of expansion cards
Post reply on HN