4 ms·
First C compiler source code from 1972
- cpr 2y agoWow, that brings back memories! First saw the C compiler sources on Geoff Steckel (local guru)'s desk around 1973 at the Harvard graduate computing center, and was absolutely floored at this fascinating-looking language. (Harvard got the first Unix tapes outside of Bell Labs; not sure of the connection there.) All upper-case, of course, as the DEC lineprinters didn't have lower case yet. Real upper case was struck-through upper.
- ytch 2y agoDupe of: https://news.ycombinator.com/item?id=43433030 https://news.ycombinator.com/item?id=43433030
- zahlman 2y ago> These are not capable of being compiled today with modern c compilers like gcc Is that only because it includes PDP-11 assembly code, or has the language changed too much?
- sanxiyn 2y agoAs documented in http://cs.bell-labs.co/who/dmr/chist.html http://cs.bell-labs.co/who/dmr/chist.html, the primary incompatibility is uses of =+ for +=. Grep for =+ in the repository.
- makeset 2y agoThat's sed-able, if it were just that.
- vaxman 2y agoPDP-7 Macro Assembler BTW, Unix on DEC hardware was never really popular outside of academia so DEC's machines were primarily programmed in FORTRAN, BASIC or Macro assembler, but there were still several third-party C compilers (for RT11, RSX11, RSTS/E, TOPS and VMS). My shop had spun off of Bell Labs so we had just a few Unix weirdos running things, but the bazillion dollar VAXcluster only ran VMS, so they made us all use Whitesmith's C (which they would incorrectly pronounce with three syllables) which was horrible - so was constantly getting in trouble for continuing to work the evil FORTRAN77 ways 'til one day a Lead (pear-shaped Unix grandmaster smellable from 20 feet away) dropped this on my desk with a thud http://www.bitsavers.org/pdf/dec/vax/lang/c/AA-L370A-TE_Programming_in_VAX_C_1.0_198205.pdf http://www.bitsavers.org/pdf/dec/vax/lang/c/AA-L370A-TE_Prog... Soon, I was spending my hard earned dollars on Lattice and Aztec C licenses for my own home-brew systems too. I resisted Unix to the very End tho #rofl
- webprofusion 2y agoIt's cool but it's not getting any more newsworthy. Submitted 9 times to HN so far since 2013.
- n4r9 2y agoIt's good to revisit old topics from time to time.
- rajamaka 2y agoI browse HN daily and have never seen it
- johnisgood 2y agohttps://news.ycombinator.com/item?id=43433030 https://news.ycombinator.com/item?id=43433030 (submitted 3 days ago, ~370 points). It is fine to not see it, however, that is why I am giving you the link, although someone else already posted it 6 hours ago (from now).
- qq66 2y agoHow was the first C compiler written in C?
- zerr 2y agoIf I remember correctly, it was written in B.
- deleted 2y ago[deleted]
- mystified5016 2y agoIt wasn't. You typically bootstrap a compiler by first writing a compiler in an existing language. Then you get a compiler that can sort of compile your langauge, but the bootstrapping language contaminates your assembly. So you iteratively compile the compiler with itself until it's purely in the new language. The very first compilers were bootstrapped from handwritten assembly. C was famously bootstrapped from B. GCC started in assembly I think and has been compiling itself for decades.
- deleted 2y ago[deleted]