Cached at:
08/28/26, 11:36 AM
# Doug McIlroy ~ tmp.0ut Staff
Source: https://tmpout.sh/5/2.html
┌───────────────────────┐
▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄
│ │ █ █ █ █ █ █ │ │
█ █ █ █ █▀▀▀▀
│ │ █ █ █ █ █ │ │
█ █ █ █ █▄▄▄▄
│ │ █ █ █ █ █ │ │
█ █ █ █ █ │
│ ▄▄▄▄▄ │ │ █ █ │ │ █ █ │ │ █▄▄▄█ │
│ ▄ ▄ │ │ █ █ │ │ █ █ │ │ █▄▄▄█ │
│ ▄▄▄▄▄ │ │ █ │
Interview: Doug McIlroy │ █ │
~ tmp.0ut Staff └───────────────────█ ──┘
In October 2025, tmp.0ut Staff got the opportunity to talk with Doug McIlroy. Born in 1932, Doug is a computing pioneer who was on the ground floor for the creation of Unix and C, and contributed to many of the core utilities and languages that we use daily. His design approach and methodology is based a foundation of meticulous study of code and its documentation. From the get go, Doug has been dedicated to understanding the machine on a fundamental level. Across multiple generations of computing, Doug has been thinking about what the next step is to elevate the domain as a whole, while doing more with less. Doug is attributed with the quote "The real hero of programming is the one who writes negative code".
tmp.0ut staff and others were invited to Dartmouth College to do a week-long series of lectures called "Binary Fun Week", focusing on everything from file formats, malware, reverse engineering, exploit development, and Binary Golf. Our interview was conducted in the Dartmouth CS lab with several speakers present, as well as some students, who also asked questions of Doug and are included in this interview.
┌──────────────────────────────────────────────────────────────────────────────┘
▄▄▄▄▄ █ [ So you wrote echo? ] █▀▀▀▀ █▄▄▄▄
▄▄▄▄▄ That was the first C program I ever wrote.
█ █ █▀▀▀█ █ █ [ o.0 wow ]
▄▄▄▄▄ █ █ █▀▀█▀ And little did I know that it was going to become a well-known program.
█ █ ▄ █ [ echo was your program? ]
█ █▄▄▄▄ ▄ ▄ First C program. When C was just invented.
█ █ ▀▀▀▀█ ▄▄▄▄█ [ What year was this? ]
<<<<< <<<<< <<<<< About '72. <<<<<
▄ ▄ █ █ [ There's a long list of programs you wrote, diff, sort. You wrote sort? ]
█ █ █▄▄▄█ ▄▄ ▄ I didn't write the first one, but I put in most of the options for sort.
█▀▄ █ Although I'm opposed to lots of options in programs like ls, which is
█ ▀▄█ run through both upper and lower case flags.
█ ▀█ ▄▄▄▄▄ █ sort was originally written by Ken Thompson. It had an amusing remark in
█ the manual "wide options are available" but it didn't say what those
▄▄█▄▄ options were.
▄ ▄ █ █ ▄▀▀▀▄ I asked Ken, "well, what are they?" and he said, "well, all you have to
█ █ do is go put them in the source." So, I did.
\>editor's note: $ ls -transubstantiationalist
[ What was it like working with Ken Thompson and Dennis Ritchie? ]
They were great. Ken is certainly one of the greatest programming geniuses I've known. He's just incredible. I mean, not only did he do Unix, he did the first chess machine to become master rated. His architecture for the chess machine was then imitated by Deep Blue and put in silicon.
[ IBM. It was Gary Kasparov who got beat by Deep Blue, right? ]
Yeah. At IBM.
[ So Ken Thompson wrote one of the first chess programs ]
Yep, and made a machine with which he had some grand adventures. He got invited to take the machine to Russia by Botvinnik, who was the world champion or a past world champion.
[ Do you keep up with chess news? ]
No.
└──────────────────────────────────────────────────────────────────────────────┐
▄▄▄▄▄ [ What was your education background before Bell Labs? ]
█ █▀▀▀▀ █▄▄▄▄ I was an undergraduate in engineering physics at Cornell. This was
▄▄▄▄ back in the day, when Cornell thought it was going to set a new trend,
█ █ where undergraduate engineers had a five-year curriculum. That lasted
█ █ about a decade, I guess. Cornell realized that other colleges weren't
█▄▄▄█ going along with it. If you could go to MIT for four years, you'd get
▄ ▄ a cheaper degree.
█ █ █ █ █▄▄▄█ [ And you did go to MIT as well, didn't you? ]
▄▄▄▄▄ █ ▀ █ I did go on to MIT because they had the Whirlwind 2 computer, which
█▄▄▄█ was a gigantic machine.
▄▄▄▄▄ █ █ █▀▀▀█ [ The Whirlwind 2? ]
█ █ ▄▄▄▄▄ █ Whirlwind 2[1]. It was built in 1952. It was built there in 1954. The
█ machine occupied three stories of a building. The basement was rotating
█ equipment to convert AC to DC. The first floor was electronic power
▄▄▄▄▄ supplies. The second floor was the computer itself. You could walk
█ inside the mainframe. There were 16 bits of the accumulator, each of
█ which was an eight-foot-high relay rack.
▄▄█▄▄ ▄▄▄▄▄ █ █ [ Each bit was an eight-foot-high relay rack? ]
█ █ █▄▄▄█ ▄▄ ▄ Yes. Then at the far end was one of its two great innovations, core
█▀▄ █ memory. That was just one relay rack. The memory itself was about this
█ ▀▄█ big. \*\*holds hands up wide\*\*
█ ▀█ It was absolutely gigantic. The one at Cornell, the CQC, had 24 words of memory. It was not stored programming. The little ones had a thousand 16 bit words, 2K. The register was eight feet tall. Each one of those bits in the accumulator. In the CPU.
[ So you said each register is eight feet tall? That's nuts man. ]
Yeah. Jay Forrester, who was the project manager, told me once that he thought his greatest invention was marginal testing.
[ Marginal testing? ]
Do you know what that is?
[ I don't. ]
So every morning before work began, they would take the machine down for an hour with preventative maintenance. And during that hour, they would run the voltages up and down. The idea was that if you were going to break something, you broke it during testing, rather than during the day.
[ Okay, so almost like stress testing. ]
Yes. I may be getting my machines mixed up. I saw the Bell Labs relay computer but I never used it.
[ When you were studying at MIT, you did a math degree? ]
I did a math degree.
[ It sounds like you did a pretty interesting dissertation, conical shells? ]
Really boring.
[ It sounds interesting. Conical shells? Like, nautilus shells? ]
Yes. Just... You've got a sheet metal cone and you bend it, how does it bend? That's... Very classical...
[ I'm sure you're oversimplifying it. ]
So the notion was, it gets you a degree. Although, I was there because of the computer. Really early on, maybe 1948 or 49, von Neumann and Goldstein wrote this paper[2] about how many digits you had to carry to do matrix inversion. Their estimates were very pessimistic. To do a 10x10, you probably needed 40 decimal digits. Everybody at the time was inverting 10x10s with 8 digits. If von Neumann and Goldstein couldn't make a good estimate, what chance was there for me? So I didn't do it. It didn't work in numerical analysis. It was in 1979 that Wilkinson in England invented backwards error analysis. Finally, people began to be able to really get good estimates on the accuracy of numerical computations. I was too early for that.
┌──────────────────────────────────────────────────────────────────────────────┘
▄▄▄▄ █ █ [ How did you get to Bell Labs? ]
█▀▀▀▄ █▄▄▄▀ ▄▄▄▄▄ I had two summer jobs before 1953 and 1957, I guess, before joining the
█ labs in 58. When the recruiters showed up at MIT, I was well primed and
█▀▀▀▀ eager to join.
█▄▄▄▄ ▄ █ [ What was the path that led you to working on Multics and Unix? ]
█ █▄▄▄▄ ▄ Oh, the usual thing is if you arrive at Bell Labs for a PhD, you're left
█ to find out what you're going to do. At first, I played with integer
█ linear programming and proved an incorrect theorem. Gomory at IBM proved
█▄▄▄▄ the correct one, and called me one day to tell me about it.
<<<<< <<<<< <<<<<
Then I worked on macros. Macro-processing became very popular. In fact,
<<<<< macros became such a thing in Bell Labs that the folks making switching
▄ systems invented a programming language, which was just a set of macros.
█ They used this very heavily.
█ █▄▄▄▄ ▄▄▄▄▄ I remember the director of that division once telling me, "we are the
█ █ greatest users of computing at Bell Labs. We use more time than anybody
█▀▀▀█ else. We depend on it much more." And that was because they're using a
█ █ macro-processor, which runs slow by about a factor of a hundred, rather
▄▄▄▄▄ than a regular compiler. He was just blissfully unaware that macros were
█ █ great for defining a language, but once they had it, they should have
█▀▀▀▄ built a compiler.
█▄▄▄▀ ▄▄▄▄▄ █ [ So between when you started in 1958 and when they created Unix... ]
▀▀▀▀█ ▄▄▄▄█ Oh yeah, that was eleven years.
[ What else were you working on? ]
Um...besides the macros, what else did I do? Lots of consulting. I worked with Dick Hamming, of the Hamming crew.
[ Hamming? Did you keep your distance? ]
Yes. They wrote a couple of papers about macros in there, but what else, what else did I do? Oh, worked out. Multics, that's it. Yeah.
[ Multics, okay. ]
Multics started in 1964, beginning with picking the hardware. At the same time, I had gotten myself onto the PL1 design committee. When Multics was choosing what language they were going to write in, there were several candidates around, and one... all of them, almost vaporware. PL1 was just getting its first compilers written. I was responsible for making sure that PL1 had enough facilities that it looked like a decent language to write in. I was responsible for bringing that in. Then I contracted with an outfit in California called Digitech, which had a terrific business of making Fortran compilers. They were really good. These Fortran compilers could even run on very small machines. Dynamically allocated internal tables. They could grow and move, so they'd get really the most out of every machine. They went for this contract, thinking they'd get in on the ground floor of a new language. But they put a new employee on, didn't supervise him, and the people who knew how to use their compilers didn't pay much attention to it, and he screwed up terribly. So there we were a year later with no compilers and Multics waiting for one. Bob Morris and I, when Bob Morris started it, decided we'd write a compiler in TMG. Do you know what TMG is?
[ No. What is TMG? ]
It was a compiler writing language from Bob McClure at Texas Instruments. He had sent it to me. He wrote it for the CDC 1620, which was a 36-bit machine, and he hand transliterated it on the green coding sheets into machine language for the IBM 704, 7090 by then. It was an interesting debugging thing. I knew the program logic was right, but there were opcodes like CAL and CLA (clear and add and clear and add logical), and you could get the wrong one if you were hand translating. So debugging was all finding clerical errors. And I had brought that up. We wrote the first Multics compiler in a couple of months in TMG. That lasted Multics until about 1970, when finally GE made a really good compiler for us. So that's what I was doing in that interval. TMG, Multics, and we had this big GE 645 in our attic. Three of us would be beavering the way out. MIT was the prime instigator of Multics. They had one in Cambridge, and they let us use their Cambridge time sharing system. We really, really stressed that time sharing system by writing the, by running a TMG written compiler, which had long compile times. They were optimized for short times. Their whole scheduling said, always prefer the short program. A really long program actually ran in the meantime between failures, and that meant you ran the long program twice. We were really screwing up MIT's computation center. The Multics project crept on and on, never got anywhere. Finally, higher management at Bell Labs said, "let's cut our losses". We were paying a million dollars a year rental or something like that on this machine. And it was supporting three people. Oh, that's enough about Multics, I guess.
[ Then Unix followed? ]
Ken Thompson in the background had been playing with these ideas for Little Machine. Thompson and Richie and Joe Ossanna lobbied hard to continue the work on operating systems. Our management, once burned, didn't like the idea. They thought it would be nice to have a PDP-10. Eventually Thompson finds this cast off PDP-7 and in three weeks builds the whole operating system.
[ That's wild. Three weeks?? ]
The assembler and the operating system. His wife was away for vacation. He allocated himself one week to build an assembler, one week to build an operating system, and one week to build the file system.
[ That's nuts. ]
They had been thinking about the file system. The design was ready to go. How he came up with the API for the operating system, I actually don't know. So clean. He threw out a lot of things. He had good ideas from Multics, like the hierarchical file system. Although he implemented it in an entirely different way. The shell, the separate shell that came from Multics, he had it up and running.
[ What do you mean by "separate shell" that came from Multics? ]
The command language for operating systems up until that time had been built into the operating system. The user space shell was a new idea of Multics. Not quite a totally new idea. The Dartmouth time sharing system had something, their idea was to just put a shell in user space, but they didn't think of it as a substitutable program. Everybody used the same shell, but it was in user space. Almost like the dynamic linker today. In Unix, several shells actually did get written. Although nowadays everybody uses the same one.
[ What shell was it? Was it a named shell? ]
It was a progentior of the Bourne shell.
[ How long was it until they started networking Unix machines together? ]
Well at the same time we had Sandy Fraser in the computer science department who was a real proselytizer and designer and builder of networks. Unfortunately, although he thought networking and digital data was the future, the big guns at AT&T said, "Digital data is 4% of our business, why should we worry about that?" Sandy didn't get near the support that he deserved. But anyway, he made these networks that we had used in the lab among our machines probably starting in 1972 or 73. We ran through about three generations of those. Eventually got onto CSNet, Computer Science Net, a version of ARPANET was not available to the industry.
[ What was CSNet? ]
CSNet was kind of an interim between ARPANET and the internet.
[ Was it between colleges? ]
Yes. CS departments.
[ What was the communication medium? ]
It was both... It had dial-up and... I even forgot the name of the protocol. But it was almost called dial-up. It had a little bit. And a bridge to the ARPANET. A bridge to ARPANET.
[ What was the speed? ]
Oh, I remember when we went to 1200 (baud). That was blindingly fast.
[ What time period was that? Was that still early 70s? ]
That would have been... I'm trying to think... When the cu utility was put into Unix. cu is call up another Unix system.
[ I'm not familiar with that. I've never used that. ]
Do you know my... So called Unix reader[3]? You'll find it on my website. Anyway, it has a very useful table of contents of all of research generations of Unix. Which I refer to when I need to know one of these things. I can tell you from that table of contents just when networking began.
└──────────────────────────────────────────────────────────────────────────────┐
▄▄▄▄▄ [ student: I'm still thinking about that whole Switching team at Bell
█ █ Labs using macros as a programming language instead of just writing
█▀▀▀▀ their own programming language and compiler. What was the reason for
█ this? ]
▄▄▄▄▄ █ █ █▀▀█▀ I can't think of anything special.
█ █ ▄▄▄▄▄ █ █ How can they write big systems that consist only of machine language?
█ █ █▄▄▄█ ▄▄▄▄▄ How can people write big systems in general?
█ █ ▀█ █▄▄▄█ We do, but as you say, they're often debugged into existence rather
▄▄▄▄▄ than cleanly designed into existence.