News for hackers. Stuff that matters.
Re:Some of the error messages produced by Apple's MPW C comp... by Veserv on Sunday February 06, 2022 @09:10PM (#30239330)
Just for some context, the MPW C compiler that produced those messages was actually not developed internally at Apple, but was rather done by Green Hills Software [1] under contract as mentioned on the wikipedia page [2] and its source [3] which is funnily enough about this exact same topic.

[1] https://en.m.wikipedia.org/wiki/Green_Hills_Software

[2] https://en.m.wikipedia.org/wiki/Macintosh_Programmer%27s_Wor...

[3] https://web.archive.org/web/20140528005901/http://lists.appl...

Re:Some of the error messages produced by Apple's MPW C comp... by kabdib on Sunday February 06, 2022 @09:47PM (#30239656)
I forget what happened to the Green Hills folks, but the official MPW C compiler was an offshoot of the MPW Pascal compiler, and was written by Roger Lawrence at Apple in about a year (around 1987-1988) largely as a reaction to what he thought was a terrible contract.

The Green Hills folks were likewise upset at Roger's effort. "Anyone who says they can write a compiler in a year should be fired." Roger himself held the same opinion, a couple of years later :-)

I sat next to Roger while he wrote that thing, he was in the next cubie over (I was working on the MPW linker and some other tools). He types really fast.

Re:Some of the error messages produced by Apple's MPW C comp... by jsrcout on Sunday February 06, 2022 @11:06PM (#30240277)
Hello from a guy who used your and Roger's work every day back then. Still one of my favorite developer experiences. (I ported an old-school AI application from its original Sun workstation environment to the Macintosh. Had a blast but our product crashed and burned with the AI winter).
Re:Some of the error messages produced by Apple's MPW C comp... by wglb on Sunday February 06, 2022 @10:13PM (#30239861)
> Anyone who says they can write a compiler in a year should be fired." Roger himself held the same opinion, a couple of years later

Nonsense.

Three of us did it in a year compiling a language similar to PL/M written in Bliss 36 on a PDP-10. And that was when compilers were much harder to do then than they are now.

Re:Some of the error messages produced by Apple's MPW C comp... by moonchild on Sunday February 06, 2022 @09:49PM (#30239676)
> Anyone who says they can write a compiler in a year should be fired.

...why?

Re:Some of the error messages produced by Apple's MPW C comp... by kabdib on Sunday February 06, 2022 @09:55PM (#30239725)
Well, they were clearly upset at losing the contract.

But mostly they were trying to say, "Okay, you probably have a guy who can do that. But it will be a buggy mess and it will go better if you don't give that dev permission to be a hero."

Re:Some of the error messages produced by Apple's MPW C comp... by moonchild on Monday February 07, 2022 @07:27PM (#30253489)
I still don't follow. A year seems like plenty of time to build a c compiler. Maybe it won't generate the best code, but no compiler did, back in the day.
Re:Some of the error messages produced by Apple's MPW C comp... by dls2016 on Sunday February 06, 2022 @09:27PM (#30239490)
I forget why I went into their building, but I always remember a giant T-rex skull in their entryway. I'm not making this up, am I?

I did find this press release, but it really just raises more questions than answers anything. https://www.prnewswire.com/news-releases/ubm-electronics-and...

Re:Some of the error messages produced by Apple's MPW C comp... by jsrcout on Sunday February 06, 2022 @11:03PM (#30240248)
I found a Green Hills page with a little more info.

https://www.ghs.com/news/20110427_esc_silicon_valley11.html

Sounds like GH's founder just really likes dinosaurs. (To be clear, if I was in that kind of financial position, I'd absolutely have a T-rex skull, or better yet the whole dinosaur, on display in the lobby).

Re:Some of the error messages produced by Apple's MPW C comp... by watersb on Sunday February 06, 2022 @08:28PM (#30239027)
MPW is the Macintosh Programmer's Workbench.

I had forgotten about these.

I think my first real push with MPW was using it as an environment to host the AT&T C++ compiler, which at that time was still a bunch of preprocessor macros written by Bjarne himself.

Re:Some of the error messages produced by Apple's MPW C comp... by JKCalhoun on Sunday February 06, 2022 @09:46PM (#30239652)
I was introduced to MPW when I started at Apple in 1995. I started on Quickdraw GX (if anyone remembers that).

Not specifically related to MPW, more about the times, a clean compile of the Quickdraw GX framework took something like eight hours. (Fortunately incremental builds were much quicker.) Nonetheless, it was common to kick off a clean build as you were leaving the office for the night.

Funny to think about that compiler compiling all night as I had dinner, watched a little cable TV, got some sleep....

Re:Some of the error messages produced by Apple's MPW C comp... by kabdib on Sunday February 06, 2022 @09:52PM (#30239693)
The Mac you compiled that on likely had a 5Mhz (yes, FIVE MEGAHERTZ) SCSI bus for its disk I/O. And none of the headers had "#pragma once" . . .

Was QuickDraw GX also known as Skia, perhaps earlier in its life?

Re:Some of the error messages produced by Apple's MPW C comp... by mwcremer on Sunday February 06, 2022 @10:28PM (#30239975)
Skia was the graphics part. The printing part was “El Kabong” (Quick Draw McGraw’s alter ego.)
Re:Some of the error messages produced by Apple's MPW C comp... by mistrial9 on Sunday February 06, 2022 @08:35PM (#30239056)
I was a cfront beta site using MPW; for people that don't know, that was the self-compiling C++ from C, before the first AT&T C++ compiler, in the late 1980s.
Re:Some of the error messages produced by Apple's MPW C comp... by rjsw on Sunday February 06, 2022 @09:19PM (#30239412)
Cfront was from AT&T, it compiled C++ to C. I had the source to Cfront 1.2, which was before multiple inheritance was added to the language.
Re:Some of the error messages produced by Apple's MPW C comp... by mistrial9 on Sunday February 06, 2022 @09:52PM (#30239691)
I agree and we are saying the same thing. There was no C++ compiler, the C++ language was processed by cfront, similar to the preprocessor and include compile phase. AT&T supplied cfront. The language spec was changing. I wrote applications with it, not checking "language lawyer" syntax problems. I wrote general feedback on performance, and things that would make the language practical. It is hard to describe those days, but concepts of object-oriented programming were new to many people, and I was quite interested in building actual applications. The linker was the common linker for multiple other languages, like gcc today.
Re:Some of the error messages produced by Apple's MPW C comp... by scroot on Sunday February 06, 2022 @09:07PM (#30239306)
I booted up MPW in an emulator last year to check it out. Definitely a unique experience. Very cool.
Re:Some of the error messages produced by Apple's MPW C comp... by unfocussed_mike on Sunday February 06, 2022 @08:54PM (#30239207)
Ahh, I saw the "too many errors on one line" report once when playing with MPW.

A very underrated, idiosyncratic, clever development environment, somehow more reminiscent of Poplog than anything else I've used.

Re:Some of the error messages produced by Apple's MPW C comp... by mastax on Sunday February 06, 2022 @08:32PM (#30239044)
Is anyone at Apple allowed to have a sense of humor anymore?
Re:Some of the error messages produced by Apple's MPW C comp... by Austin_Conlon on Sunday February 06, 2022 @09:10PM (#30239322)
As long as it doesn’t contravene the Apple Style Guide:

“Humor can enhance documentation by adding to a reader’s enjoyment and by helping to lighten the tone. Humor usually works best in examples, where it’s less likely to distract the reader. Be careful that your humor is in good taste—one reader’s joke can be another reader’s insult—and keep in mind that humor may not translate well in localized text.”

https://help.apple.com/applestyleguide/#/apsg9dac5903

Re:Some of the error messages produced by Apple's MPW C comp... by threeseed on Sunday February 06, 2022 @09:10PM (#30239325)
As a developer I don't want my compiler to be funny.

I want it to give helpful, accurate advice as succinctly as possible.

Re:Some of the error messages produced by Apple's MPW C comp... by glhaynes on Monday February 07, 2022 @11:14AM (#30246785)
It blows my mind how common taking a silly tone in error messages has become. It's _exactly_ the time the user shouldn't get the impression that you're taking a haha oh well attitude.
Re:Some of the error messages produced by Apple's MPW C comp... by memco on Sunday February 06, 2022 @08:40PM (#30239090)
Craig Federighi finds a way.
Re:Some of the error messages produced by Apple's MPW C comp... by smoldesu on Sunday February 06, 2022 @09:39PM (#30239595)
Humor is subjective, but I've always found Craig's performative sense of humor to be more annoying than anything else. The smug brainiac shtick is so old at this point that the dude practically steps on Steve Ballmer's feet.
Re:Some of the error messages produced by Apple's MPW C comp... by doctor_eval on Sunday February 06, 2022 @08:50PM (#30239175)
Hair Force One FTW!
Re:Some of the error messages produced by Apple's MPW C comp... by nojito on Sunday February 06, 2022 @09:07PM (#30239304)
Their test OS for iPhone's is hilarious

https://www.theiphonewiki.com/wiki/TigrisAni_15A93720r

Re:Some of the error messages produced by Apple's MPW C comp... by dylan604 on Sunday February 06, 2022 @09:35PM (#30239550)
You must be a hoot at comedy clubs on amateur night. I don't see anything remotely funny about anything in that link.
Re:Some of the error messages produced by Apple's MPW C comp... by j16sdiz on Sunday February 06, 2022 @09:26PM (#30239481)
How so? This is just a minimal test screen
Re:Some of the error messages produced by Apple's MPW C comp... by astrange on Sunday February 06, 2022 @09:59PM (#30239753)
Many people think Nintendo references are the same thing as jokes.
Re:Some of the error messages produced by Apple's MPW C comp... by imoverclocked on Sunday February 06, 2022 @08:40PM (#30239089)
Absolutely.
Re:Some of the error messages produced by Apple's MPW C comp... by nyanpasu64 on Sunday February 06, 2022 @09:24PM (#30239458)
> This label is the target of a goto from outside of the block containing this label AND this block has an automatic variable with an initializer

I get this issue a lot on modern compilers, when trying to write switch/macro-based coroutines (https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html) in C++. Does anyone have a workaround? (I hope it doesn't involve C++20 coroutines... I still don't understand them.)

Re:Some of the error messages produced by Apple's MPW C comp... by josephcsible on Sunday February 06, 2022 @09:37PM (#30239567)
If your variable is a class without a trivial default constructor, then you're out of luck. Otherwise, the workaround is to not initialize the variable, and to instead assign to it immediately after declaring it (e.g., replace "int x = 42;" with "int x; x = 42;").
Re:Some of the error messages produced by Apple's MPW C comp... by secabeen on Sunday February 06, 2022 @09:11PM (#30239333)
> " please go buy a RAM upgrade from your local Apple dealer"

Not possible any more!!!

Re:Some of the error messages produced by Apple's MPW C comp... by Infernal on Sunday February 06, 2022 @09:16PM (#30239382)
It's really expensive but they throw the rest of a new machine in with it as consolation.

EDIT: Sibling beat me by a couple minutes. DO great minds really think alike?

Re:Some of the error messages produced by Apple's MPW C comp... by philpem on Monday February 07, 2022 @09:03AM (#30244975)
Sometimes, but fools' never differ :)
Re:Some of the error messages produced by Apple's MPW C comp... by abrowne on Sunday February 06, 2022 @09:12PM (#30239349)
Sure it is. It just comes with a new Mac.
Re:Some of the error messages produced by Apple's MPW C comp... by chihuahua on Sunday February 06, 2022 @10:00PM (#30239767)
Think different about sustainability.
Re:Some of the error messages produced by Apple's MPW C comp... by Someone on Monday February 07, 2022 @03:27AM (#30241867)
https://www.apple.com/us/search/memory lists 10 products (for the 2018 Mac Mini, 2019 Mac Pro, and 2019/2020 5k iMac)
Re:Some of the error messages produced by Apple's MPW C comp... by smoldesu on Sunday February 06, 2022 @09:35PM (#30239549)
I'm not sure their memory pricing is competitive these days anyways.
Re:Some of the error messages produced by Apple's MPW C comp... by rjsw on Sunday February 06, 2022 @09:15PM (#30239367)
You can still buy RAM to go in 68k Macs, just not from Apple dealers.
Re:Some of the error messages produced by Apple's MPW C comp... by elahieh on Sunday February 06, 2022 @09:28PM (#30239501)
Original source: Tony Cunningham, rec.humor.funny, 7 August 1991

https://groups.google.com/g/rec.humor.funny/c/knG5ONlInXM/m/...

Re:Some of the error messages produced by Apple's MPW C comp... by fghorow on Sunday February 06, 2022 @09:35PM (#30239551)
MPW.

Object Pascal.

MacApp.

Ahh, memories. (Some of them are even _good_ memories! ;-) )

Re:Some of the error messages produced by Apple's MPW C comp... by vba616 on Monday February 07, 2022 @12:48AM (#30240920)
I remember when I compiled a "hello world" with some new OO framework, possibly MacApp, and it was something like 400K, to do nothing, and I thought that was outrageous and obviously much too bloated for real software.