1. 19

  2. 2

    Coincidentally I just got an email from Ken yesterday afternoon.

    if you know me by previous@email, please use my new email address:


    thank you, ken thompson

    I had emailed him a few years back to ask about some story I read that he had snuck an alligator into Bell Labs. Surprisingly, he responded:

    there is a youtube video of a speech i gave describing the alligator. you hae to skip 25-30 minutes to get to me.


    I suspected the email I got yesterday was fraudulent since I hadn’t contacted him in so many years, so I replied and asked if it was legitimate. He responded back saying it was, from the previous email address.

    1. 2

      Another historical gem, for me:

      Normally, a program’s standard input is the user’s console keyboard, and the standard output is the console printer.

      (Emphasis mine)

      Sounds like a cue for the near-obligatory photo of Thompson & Richie at a teletype terminal in front of the PDP-11.

      1. 2

        Wow, this is amazing! Despite working on a Unix shell since 2016, I’ve never seen this paper. [1]

        The paper I think of when I think of Thompson’s shell is “The Unix Time-Sharing System”: https://dsf.berkeley.edu/cs262/unix.pdf

        Section 6 talks about the shell. It talks about command lookup, redirections, pipelines, semicolon / ampersand, and subshells.

        OK that is most of what this paper talks about, but it also has the minor detail of >> for append, the if statement, and goto (which are mentioned but not demonstrated in the former paper).

        It also has the : no-op / null command .

        And it talks about globs, but doesn’t demonstrate them.

        Most importantly, it begins and ends with a “sermonette” on program design! Having only byte streams is a feature not a bug.

        I probably have to write a blog post about this, but I noticed the top comment in this thread on “wishlist OS design” is in total opposition to that:


        Files can have structure! And they do. But the kernel should not know about that structure. Higher levels of the OS can take care of that.

        This is exactly the philosophy behind QSN [2] and QTSV. A QSN string is still a string. Similar to how all ASCII strings are UTF-8 strings (another Thompson design).

        [1] And despite archiving some history here, including on Thompson’s regex, and Korn shell:


        [2] http://www.oilshell.org/release/latest/doc/qsn.html

        1. 4

          In your defense, this looks to be fairly hard to find…

          Along with qmacro, I read the first paragraph and wanted to read more. I was too lazy to go pull this up on my desktop, but the image size and format was a bit tedious on my laptop, so I went hunting for a PDF.

          For anyone more industrious and/or connected…

          1. 2

            Aha. @susam thankfully mooted my effort :)

          2. 3

            “Sermonette” - very appropriate and thank you for ensuring I focused on the first bit instead of just diving into the main body. I have read the first paragraph over and over again, I dunno whether it’s the coffee I’ve had but I find it to be beautifully constructed, playful, and yet laced with absolute seriousness. Here’s that paragraph in copy/pasteable form (the first sentence alone is, to me, very quoteworthy!):

            A program is generally exponentially complicated by the number of notions that it invents for itself. To reduce this complication to a minimum, you have to make the number of notions zero or one, which are two numbers that can be raised to any power without disturbing this concept. Since you cannot achieve much with zero notions, it is my belief that you should base systems on a single notion.

          3. 1

            From the Wayback Machine link in this post:

            The first ever paper that was published on the UNIX shell. This typed copy was published in Infotech State of the Art Report: Structured Programming.

            Uploaded with permission from original author Ken Thompson.

            Uploaded by wesleyneo on February 10, 2018

            1. 4

              Last night, I got Ken Thompson’s permission to combine the scanned images into a single PDF document and redistribute it on the Internet. The combined PDF is available here: github.com/susam/tucl.

              1. 2

                Thank you! I was finding the image format a bit tedious and burned a bit of time looking for any other copies.