Live data from Hacker News

Dennis Ritchie’s first C compiler (c. 1972)

github.com

121–130 of 163 posts

Re: Dennis Ritchie’s first C compiler (c. 1972)

#121
post #93
post #66

Earlier quoted context omitted.

> ask a non programmer Why should a non programmer understand programming terms? Words have different meanings in different contexts. That's how words work. There is no need to make these terms understandable to anyone. The layman does not need to understand the meaning of long or word in C source code. Ask a non-golf player what is an eagle or ask a physicist, a mathematician and a politic the meaning of power. Word…

> Ask a non-golf player what is an eagle or ask a physicist, a mathematician and a politic (sic) the meaning of power. All those fields could do with less jargon. Especially since in many cases there is a common word. Lawyers especially give me the impression that they use jargon to obscure their field from regular folks. Our field, being new, should not make the same mistakes, but yet, here we are, where the default…

> Lawyers especially give me the impression that they use jargon to obscure their field from regular folks.

Really? You think that lawyers (and physicians) use Latin/Greek words in order to confuse regular folks?

These fields are very old, and changing the meaning of something Mens Rea or lateral malleolus is going to require A) an exact drop-in replacement which will probably just as obscure, B) retraining of an entire set of people.

Our field is similar in that we have a mountain of jargon that's largely inaccessible to regular folks. The point of those words are not to converse with regular folks but to convey information to others in the field with as little ambiguity as possible.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#122
post #20

I have to say, the way indentation and brackets were done here looks like it's just inviting subtle bugs. Take this for example: if (peekc) { c = peekc; peekc = 0; } else if (eof) return(0); else c = getchar();

The difference between Dennis Ritchie and the average programmer of today is, Dennis Ritchie did not write bugs in the first place.

Well, some say (I disagree) that C is a bug.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#123
post #61
post #33

Earlier quoted context omitted.

Why not just: char waste[however-many-bytes-are-needed]; ?

That's allocated in a different segment.

It is now. Was it then? AFAICT from https://en.wikipedia.org/wiki/PDP-11 none of the PDP-X machines had a segmented architecture.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#124
Brings back some memories because this was the first "large" program available to me for study when I was first learning to program, around 1978.

Having talked my way into using the local university EE dept's 11/45, I found the source tree was mounted (they had a 90MB CDC "washing machine" drive) and decided to print it out on the 132-col Tally dot-matrix printer.

Some minutes into this, the sysadmin bursts into the terminal room, angrily asking "who's running this big print job".

I timidly raise my hand. He asks what I'm printing. I tell him the C compiler source code because I want to figure out how it works. He responds "Oh, that's ok then, no problem, let me know if you need more paper loaded or a new ribbon".

Re: Dennis Ritchie’s first C compiler (c. 1972)

#125
post #63

Earlier quoted context omitted.

> Steve Woz's BASIC for the Apple II was "hand-assembled", as he put it. Very cool - so basically (haha) Woz's integer BASIC was bootstrapped by writing it in assembly language and translating it into machine code by hand. I wonder if someone (Woz?) has written a 6502 assembler in integer BASIC to allow it to bootstrap itself?

The Apple ][ has a monitor in ROM that allows to enter machine code directly. The legend says that for the Apple I, Woz knew the complete integer basic machine code and could type it live into the monitor.

Also, the monitor on pre-][+ machines with integer BASIC also had a mini-assembler, so short assembly programs could be typed in as such instead of keying in the bytes. Both versions of the monitor had a mini-disassembler.

On the other hand, I still remember at least a few 6502 hex opcodes, not that I have any use for that information anymore. The instruction set is small enough that it doesn't surprise me that Woz would have it memorized.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#126
post #116

Earlier quoted context omitted.

Jargon that builds on intuition can be its own problem. Jargon, by its very definition, has explicit technical meaning in a specific domain. Intuition in words is based on vernacular usage. It is vanishingly unlikely that the vernacular usage aligns with the domain-specific usage of a given term. This leads to plenty of false assumptions, and forces people to disambiguate jargon-usage vs vernacular-usage, which may b…

> Jargon that builds on intuition can be its own problem. Sure it can, which is why you gotta be double-careful naming things and not try to take metaphors too far. A jargon term needs to crisply identify the crux of the concept and not confuse with irrelevant or misleading details.

> A jargon term needs to crisply identify the crux of the concept and not confuse with irrelevant or misleading details.

Agreed. I've never seen a vernacular term fill this role well.

If you need to learn the technical concepts either way to be effective, might as well give them a name that doesn't conflict with another definition most people know.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#127
post #43

So do I get this right: this is not the first C compiler (since that one would be written in B) and the first C compiler written in C?

Thank you for pointing this out. It obviously can't be his first C compiler because it's written in C! :) I'm not even sure it's the first C compiler written in C, though - it just says in the github description "the very first c compiler known to exist in the wild." Regardless, if it's from 1972 it's a very early version.

> Thank you for pointing this out. It obviously can't be his first C compiler because it's written in C! :)

This isn't obvious to me.

I just assumed that the first iteration was compiled by hand to bootstrap a minimum workable version. Then the language would be extended slightly, and that version would be compiled with the compiler v. n-1 until a full-feature compiler is made.

It makes sense to write a compiler in a different language, but given the era, I could see hand-compilation still being a thing.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#128
post #78

Earlier quoted context omitted.

Very interesting when you think about it. A language created in 2009 (Go) owes its syntax to a language from 1969 (B), and the latter looks like it does because it was designed during a short transition period between offline editing (1960s) and electronic terminals (1970s). And there are people claiming that computer scientists are not conservative :) To what extend this explanation is correct is another question...…

Actually the transition from "offline editing" and "electronic terminals" was not short at all. Teletypes (aka "typewriters which can recieve content encoded in electricity, next to the user keyboard") date back way beyond computers, and were still in use in the 1980s (but evventually superseded by fax). Teletypes were cheaper, faster and more convenient then video terminals. Don't underestimate of having a printout…

And for a lot of people, the lightbulb goes off once they realize what 'tty' stands for...

Re: Dennis Ritchie’s first C compiler (c. 1972)

#129
post #116

Earlier quoted context omitted.

> Jargon that builds on intuition can be its own problem. Sure it can, which is why you gotta be double-careful naming things and not try to take metaphors too far. A jargon term needs to crisply identify the crux of the concept and not confuse with irrelevant or misleading details.

> A jargon term needs to crisply identify the crux of the concept and not confuse with irrelevant or misleading details. Agreed. I've never seen a vernacular term fill this role well. If you need to learn the technical concepts either way to be effective, might as well give them a name that doesn't conflict with another definition most people know.

I think "binary tree" is a decent example. It's not only a visual depiction of how the data structure is laid out, but the metaphor of "leaves" does also transfer over. It is possible to take it too far, trying to fit "bark" into the concept, which is of course, silly. Calling it a "dubranchion" or some such would be a disaster, IMHO.

Re: Dennis Ritchie’s first C compiler (c. 1972)

#130
post #93

Earlier quoted context omitted.

> Ask a non-golf player what is an eagle or ask a physicist, a mathematician and a politic (sic) the meaning of power. All those fields could do with less jargon. Especially since in many cases there is a common word. Lawyers especially give me the impression that they use jargon to obscure their field from regular folks. Our field, being new, should not make the same mistakes, but yet, here we are, where the default…

> Lawyers especially give me the impression that they use jargon to obscure their field from regular folks. Really? You think that lawyers (and physicians) use Latin/Greek words in order to confuse regular folks ? These fields are very old, and changing the meaning of something Mens Rea or lateral malleolus is going to require A) an exact drop-in replacement which will probably just as obscure, B) retraining of an en…

In England many Latin terms were replaced with English terms in 1998 with the adoption of the new Civil Procedure Rules in an effort to make justice "more accessible" (alongside other reforms). These arguably actually added confusion - for example it's much more obvious that a "writ" is a specialist term versus "claim" which replaced it.
Post reply on HN