Live data from Hacker News

Pascal at Apple

blog.fogus.me

71–80 of 145 posts

Re: Pascal at Apple

#71
post #4

When opened w/o Javascript you see only the first paragraph and the timeline at the bottom. I almost skipped over this because I thought there wasn't anything interesting there.

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.

The point of the post was supposed to be: Gee-- it's interesting that the site doesn't look visibly "broken" when viewed w/o Javascript, and that might cause people to just skip it.

It doesn't bother me to turn on Javascript when a site needs it. (If I complained about every site posted to HN that needlessly required Javascript I'd never get anything done...)

I'll turn it on by default as soon as websites stop abusing my CPU, battery, and bandwidth with their gluttonous scripts. On my machine, with sites I visit, the browsing experience is perceptibly better (and the machine stays much cooler on my lap) w/ Javascript selectively enabled.

Re: Pascal at Apple

#72
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…

I liked nested functions in Pascal, and put them in D. They turn out to be surprisingly useful: 1. Properly encapsulating their scope, as opposed to having static functions sit awkwardly somewhere else. 2. Factoring out common code within the function. 3. A lot of my need for goto statements vanished with nested functions. 4. Take the address of a nested function, and it serves as a lambda. 5. No need to create "Cont…

C# has just implemented nested functions.

Re: Pascal at Apple

#73
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 :-)

They tried to fix that with ISO Extended Pascal, but by then compatibility with Turbo Pascal extensions was more relevant.

Re: Pascal at Apple

#74
post #27
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…

Intro to computer science freshman year of high school in 2004 was still using turbo pascal and it was great. Dropping into BGI graphics mode was a great beginner friendly way to draw shapes and make some cool things. It's what got me into game development in earnest. I wish I could get this same setup to teach people with but BGI doesn't work in later versions of Windows.

This is why C++ standard folks want a simple basic 2D library available as part of the standard.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p026...

Re: Pascal at Apple

#75
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…

Lazarus looks interesting, but what holds me back is that the language doesn't seem to have evolved. I enjoy functional languages much more these days, and I prefer not to go back to an old language. I would be happy to be proven wrong on this

The language has evolved, but it still falls squarely in the imperative, OO camp.

And besides, you mentioned than you'd prefer to stick with more functional languages. It's hard to prove someone's preference wrong. :)

I mostly share your preference, but I make an exception for Pascal. There's just something about it that draws me in, even though I've only used it for fun, and not professionally.

Re: Pascal at Apple

#76
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…

[deleted]

Re: Pascal at Apple

#77
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…

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 should add that C's strings were semantically busted, too, and in more dangerous ways. No way to win :-)

I think trading some programmer inconvenience for a world with no buffer overruns would have been a good thing, in retrospect!

Re: Pascal at Apple

#78
I learned to program with Turbo Pascal on my PC back in the early 90s. Language lite is fun.

And yet, when I clicked on this part of me was really just hoping this was referring to nvidia's Pascal architecture, a hint that maybe they were finally dropping the Radeon line and getting some decent video cards into their machines.

One can but dream I guess.

Re: Pascal at Apple

#79
post #67
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…

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.

Re: Pascal at Apple

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

Coming from Basic that wasn't a problem.

It always felt quite natural to me.

Post reply on HN