Live data from Hacker News

Some of the error messages produced by Apple's MPW C compiler (2006)

cs.cmu.edu

31–40 of 154 posts

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#31
post #7

Earlier quoted context omitted.

Maybe the daughter sued for copyright infringement when she turned 18. ;) Serious question: Is this possible when a guardian gave consent earlier?

I know you’re joking, but she wasn’t 18 yet before they changed the picture. AFAICT, kids own the copyright to things they create[0], but guardians are responsible and can use it on the child’s interest. IANAL, consult an attorney, etc., etc. 0 - https://www.copyright.gov/help/faq/faq-who.html#:~:text=Can%... .

[deleted]

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#32
post #4

"Call me paranoid but finding '/*' inside this comment makes me suspicious" That, Sir, is none of your business.

...I kind of wish compilers supported nested block comments. So if there's a /* inside of a /*, it would take two */'s to end it.

Idk, maybe that would be a terrible idea in practice. But there are lots of instances where it would have saved me time.

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#33
Tangential to the content of the page: I really enjoyed how many MPW utilities generated output, including error messages, in the form of commands. Your terminal was an editor buffer, so you could cursor up (or click) on the appropriate line then press something like cmd-enter to pull up the file in question (among other things).

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#34
post #4

"Call me paranoid but finding '/*' inside this comment makes me suspicious" That, Sir, is none of your business.

...I kind of wish compilers supported nested block comments. So if there's a /* inside of a /*, it would take two */'s to end it. Idk, maybe that would be a terrible idea in practice. But there are lots of instances where it would have saved me time.

You're probably looking for "#if 0" / "#endif".

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#36
post #16
post #8

Earlier quoted context omitted.

> The compiler is 324k in size Playfulness isn't the only thing we've lost. Software bloat has reached comedic levels.

Your optimizing compiler today will actually optimize. LLVM was recently ported to the 6502 (yes, really) [1]. An example: void outchar (char c) { c = c | 0x80; asm volatile ("jsr $fbfd\n" : : "a" (c): "a"); } void outstr (char* str) { while (*str != 0) outchar(*str++); } void main () { outstr("Hello, world!\n"); } That is compiled to this: lda #$c8 ; ASCII H | 0x80 jsr $fbfd lda #$e5 ; ASCII e | 0x80 jsr $fbfd ... U…

I understand your point, but LLVM-MOS is a bad example. You gain LLVM’s language optimizations, as you point out. But LLVM’s assumed architecture is so different from the 6502 that lowering the code to assembly introduces many superfluous instructions. (As an example, the 6502 has one general purpose register, but LLVM works best with many registers. So LLVM-MOS creates 16 virtual registers in the first page of memory and then generates instructions to move them into the main register as they are used.) It’s of course possible to further optimize this, but the LLVM-MOS project isn’t that mature yet. So assembly programmers can still very much do better.

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#37
post #11

"a typedef name was a complete surprise to me at this point in your program" Ah, the joys of fun compiler messages. I miss those days. I remember getting one from a vendor compiler that was: "No! But they'll only let me warn you. Danger Will Robinson! Danger!" and: "Really! If you are fussing around with void *, just go home or at least back to your editor!" I think the IT manager kept that as a vendor just because o…

Not much of a C programmer, what's the context around void* being a big deal?

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#38
post #4

"Call me paranoid but finding '/*' inside this comment makes me suspicious" That, Sir, is none of your business.

...I kind of wish compilers supported nested block comments. So if there's a /* inside of a /*, it would take two */'s to end it. Idk, maybe that would be a terrible idea in practice. But there are lots of instances where it would have saved me time.

the D Language supports /+ and +/ as a variant of /* which supports nesting. So you can pick which you need for a given comment.

Re: Some of the error messages produced by Apple's MPW C compiler (2006)

#39
post #16
post #8

Earlier quoted context omitted.

> The compiler is 324k in size Playfulness isn't the only thing we've lost. Software bloat has reached comedic levels.

Your optimizing compiler today will actually optimize. LLVM was recently ported to the 6502 (yes, really) [1]. An example: void outchar (char c) { c = c | 0x80; asm volatile ("jsr $fbfd\n" : : "a" (c): "a"); } void outstr (char* str) { while (*str != 0) outchar(*str++); } void main () { outstr("Hello, world!\n"); } That is compiled to this: lda #$c8 ; ASCII H | 0x80 jsr $fbfd lda #$e5 ; ASCII e | 0x80 jsr $fbfd ... U…

Not really that wonder, other that 6502 sucks for C.

"An overview of the PL.8 compiler", circa 1976

https://dl.acm.org/doi/abs/10.1145/989393.989400

Post reply on HN