Skip

"UNIX is very simple, it just needs a genius to understand its simplicity."
September 5, 2012 7:41 PM   Subscribe

The UNIX™ System: Making Computers More Productive. A video from 1982 featuring Ken Thompson, Dennis Ritchie, Brian Kernighan, Alfred Aho, and Lorinda Cherry discussing key features of UNIX. One of many videos available from the AT&T Archives. Warning: contains beards. Lots of beards.
posted by grouse (56 comments total) 75 users marked this as a favorite

 
Thanks for the post.

(Great timing, as I actually just downloaded the Unix Hater's Handbook)
posted by churl at 7:51 PM on September 5, 2012 [2 favorites]


Victor A. Vyssotsky presents… In Search Of!
posted by Slap*Happy at 7:55 PM on September 5, 2012 [1 favorite]


You warned me about the beards, but I still wasn't ready.
posted by Stonestock Relentless at 8:00 PM on September 5, 2012 [11 favorites]


Warning: contains beards. Lots of beards.

Not the law is clear?
There is a beard - there is a success.
There is no beard - you are guilty.

(with follow-up.)
posted by benito.strauss at 8:00 PM on September 5, 2012 [12 favorites]


The best part is the watch. He wants to wear the watch, as it is shiny and digital, but his wrist bones and wrist veins will not allow the watch! So he wears it halfway to his elbow.
posted by Slap*Happy at 8:03 PM on September 5, 2012


Warning: contains beards. Lots of beards.

You rang?
posted by hippybear at 8:10 PM on September 5, 2012 [5 favorites]


Lorinda Cherry's bookshelves look just like mine! (i.e. books haphazardly stacked and falling over)

I wish they'd shown her desk, to see if it's as messy as mine.
posted by needled at 8:13 PM on September 5, 2012


So, so, so good. Thank you for this, grouse.
posted by koeselitz at 8:26 PM on September 5, 2012 [1 favorite]


(I adore listening to Brian Kernighan talk – he's so exceedingly good at explaining things. The part where he codes a simple spell-checker as a single piped command is so exciting! And it really demonstrates the power of Unix – even a decade after this, spell-checkers were one of those highly prized commodities that word processors bragged about to demonstrate that they were very advanced. But here it is, clear as air and plain as day, and put together in the most logical and direct way with the simple 'primitives' of Unix. Awesome.)
posted by koeselitz at 8:32 PM on September 5, 2012 [17 favorites]


Making computers more productive. Absolutely goddamn right. [/Captain Willard]
posted by Brak at 8:35 PM on September 5, 2012


I like to think that when these pioneers of computing first saw goatse it was an Oppenheimer moment for them.
posted by srboisvert at 8:43 PM on September 5, 2012 [10 favorites]


One of the strongest indications of just how smart these people were is the simple fact that I just installed Linux on my current desktop machine, to play with GNU Radio. And, for a lot of what I do with it, I use my quadcore, 64-bit, 4.4Ghz machine, with 16 gigs of RAM, exactly that same way, in some cases using somewhat more featureful versions of the exact same commands. After thirty years! On a desktop machine that's probably a thousand times as large as the ones they were demoing on.

These people were on tiny, tiny computers... multi-million dollar machines with maybe a couple of megabytes of RAM. Yet, the system they came up with was so strong, so flexible and extensible, that a noticeable fraction of the computing world, more than thirty years later, on hardware that's inconceivably powerful in comparison, is still using it, every day. And it's not like FORTRAN, which people hate, and mostly use only when they absolutely have to. People use Unix because they like it.

If you need to manipulate data, especially text, and you can describe how it should be manipulated with a keyboard, there's just nothing else that comes close. It's probably not the system you want for drawing, or editing video, or writing a business letter, but to process data, especially in bulk, you want Unix. Still. After all these years.

A year or two ago, I saw brilliance described as hitting a target nobody else can hit, while genius is hitting a target nobody else can see.

The machine sitting under my desk is what these geniuses were shooting at.
posted by Malor at 8:46 PM on September 5, 2012 [24 favorites]


Heh, I recently gave a relative one of my Linux books from 2001, and he commented on how out of date the info must be. I'm going to send him a link to the explanation of the directory structure at 13:18 and say "look, 1982! still relevant!"
posted by helecho at 8:54 PM on September 5, 2012


Beards... On the chin, or below?
posted by Artw at 8:58 PM on September 5, 2012


koeselitz: And it really demonstrates the power of Unix – even a decade after this, spell-checkers were one of those highly prized commodities that word processors bragged about to demonstrate that they were very advanced. But here it is, clear as air and plain as day, and put together in the most logical and direct way with the simple 'primitives' of Unix. Awesome.

Well, you're not being fair there, because you're comparing mainframes, with multiple megabytes of memory, with personal computers. In their first retail generation, they typically had 64K at most. Writing a spellchecker in 64K, where you have the actual checking program, the document, and the dictionary, all of which would really like to be resident in memory at the same time, is a non-trivial problem. And remember that individual documents could take up a large chunk of room on a floppy, not leaving much room for a dictionary. If you've got a meg or two of memory, and multiple megs of swap space, which these million-dollar machines had, it's a trivial problem.

If you're running Linux or OSX, you can do exactly what Mr. Kernighan did, just using the modern names for the commands. (like, say, 'uniq' instead of 'unique'). But that's so easy and fast mostly because of all the RAM you have. In 64K, even if you managed to hack together a Unix-alike that would boot, running that same command string would take a very long time, and would beat the crap out of permanent storage, if it would run at all. A custom-written spellchecker would almost certainly run much faster, though it would be enormously harder to write.
posted by Malor at 9:14 PM on September 5, 2012


Beards are cool.

That is all.
posted by pompomtom at 9:20 PM on September 5, 2012


Thank you - most excellent. Kernighan is awesome.
posted by parki at 9:21 PM on September 5, 2012


Multi megabyte memory capacity was certainly not needed to run these demos. Unix in those days ran quite comfortably with multiple users on a PDP/11 with 256k of memory. At my first job in the early 80s, 20 engineers on VT220 terminals logged into unix on a VAX with 8Mb of memory with no slowdowns.
posted by monotreme at 9:29 PM on September 5, 2012


"Those who don't understand Unix are condemned to reinvent it, poorly." – Henry Spencer
posted by SPrintF at 9:48 PM on September 5, 2012 [5 favorites]


Multi megabyte memory capacity was certainly not needed to run these demos.

Not for the demos, but for an actual, honest, genuine spell checker that was working with pipes in that way, you'd probably want 256K of total system RAM, which was inordinately expensive for a long time. In 1982, when this video was made, having 256K of RAM all to yourself would have been an unbelievable luxury. It would have cost thousands of dollars... and that's not even mainframe-style RAM, which would have cost far more. Years later, in late 1985, mass market RAM was still a hundred dollars per 128K. (and actually went UP, a few years later, because of a RAM shortage -- for awhile, it was well over a thousand dollars a meg.)

Writing a spellchecker was hard on micros, and it was hard because they didn't have much RAM. By the time PCs were routinely at 512K and higher, companies stopped advertising spell checking as more than a bullet point. It was easy, so if a program needed one, it had one.

At my first job in the early 80s, 20 engineers on VT220 terminals logged into unix on a VAX with 8Mb of memory with no slowdowns.

Sure, but that's because they didn't all need memory at the same time. If all those guys were running spellcheckers at once, that machine would have been slow as molasses, and might have crashed.
posted by Malor at 9:50 PM on September 5, 2012


Some of the accents in the videos served to remind me that there was a time when the seat of power in the computing world was not Silicon Valley but New York/New Jersey... oh, and that Lorinda Cherry raced rally cars as a hobby!
posted by rh at 9:50 PM on September 5, 2012 [1 favorite]




That was fun, grouse. Anyone else notice that Alfred Aho sounds interestingly as if he was a model for voice synthesis accents?
posted by DrMew at 9:54 PM on September 5, 2012 [3 favorites]


I heard that you and your band have shaved your Unix beards and bought Unix turtlenecks, because you want to make something real.
posted by i_have_a_computer at 10:32 PM on September 5, 2012 [3 favorites]


churl: "(Great timing, as I actually just downloaded the Unix Hater's Handbook)"

I was learning Unix when this was published, and it was an enlightening perspective for a student of computing history. Didn't deter me however, though I did end up with an Ironic Printout of this on my office wall for a few years.

From Donald Norman's Foreword:
As for me? I switched to the Mac. No more grep, no more piping, no more SED scripts. Just a simple, elegant life: “Your application has unexpectedly quit due to error number –1. OK?”

Donald A. Norman
Apple Fellow
Apple Computer, Inc.
tee hee
posted by vanar sena at 12:01 AM on September 6, 2012 [2 favorites]


.At my first job in the early 80s, 20 engineers on VT220 terminals logged into unix on a VAX with 8Mb of memory with no slowdowns.

We had maybe 40 VT220's in college on a VAX 11/780, and yes if everyone was just pottling around typing it was fine, but when you and 10 other people tried to compile their 150-line Pascal programs you could literally take a 30 minute break waiting for it to finish.
posted by GallonOfAlan at 12:38 AM on September 6, 2012 [1 favorite]


Hey, great timing! My dad, who studied computer science in the 80s, was just telling me about Unix and ungodly prices for memory. (I was dumbfounded at the idea that the whole computer lab in their university only had two floppy disks for student use, because by the time I went to school, they were pennies a piece.) So Tuesday night was my introduction to pipes.

Anyway! So cool. I'll share this with my dad.
posted by undue influence at 2:24 AM on September 6, 2012


The machine sitting under my desk is what these geniuses were shooting at.

Interestingly, Windows PowerShell is arguably closer to that original target of a collection of programs that do one thing well and are chained together. UNIX's overloading of commands with options only got worse since K&P wrote the seminal paper complaining about cat -v (pdf).
posted by fightorflight at 2:59 AM on September 6, 2012


It's interesting that the narrator presents UNIX as something that was discovered, like a mathematical theorem, not invented.

That pipeline example is cool and a great example of why I love UNIX. That said...why don't I have a makewords? (lowercase could probably be simulated with tr.) I need to write one of those, because I often spend a lot of effort in my (very long) one-liners breaking and rejoining lines.
posted by DU at 4:15 AM on September 6, 2012


You know what else contains lots of beards?



Most of history. Certain Fascist governments, not so much.
posted by Kirth Gerson at 4:27 AM on September 6, 2012


At my first job in the early 80s, 20 engineers on VT220 terminals logged into unix on a VAX with 8Mb of memory with no slowdowns.

Sounds like my first job and my CS undergrad days. What wasn't obvious was how much work this was for the sysadmins. My wife ran the Vaxen for work and she spent a lot of time actively tuning the OS to keep as few processes as possible in memory. I recall one day when the swapper itself got swapped out - an emergency reboot soon followed.
posted by tommasz at 5:53 AM on September 6, 2012 [2 favorites]


DU: if you want makewords you could xargs -n 1 echo < sentencefile without having to re-invent any wheels :)

That's one of the things I like about Unix systems -- there's always more than one way to do what you want, and even after 25 years I'm still finding new ways of doing things.
posted by nonspecialist at 6:06 AM on September 6, 2012


Great post, grouse, though if you want to see a lot of beards nowadays you have to visit a Ruby on Rails development shop in Melbourne. Any one will do.
posted by nonspecialist at 6:07 AM on September 6, 2012


In 1985 I was in grad school, learning Unix, C, and vi on an early Sun workstation. I didn't really appreciate then how new Unix was, or how I'd still be using them nearly 30 years later. The Unix way of doing things by putting together small programs was amazing to me at the time.

At home I had a Kaypro II, a CPM machine, and Turbo Pascal. Turbo Pascal had a way of chaining from one program to another, while sharing variables from one program to the next. So I used this to write my own version of a shell with globbing, redirection and pipes, and copied some of the simple Unix utilities. Fun times for a geeky kid with no life.

I will, however, never forgive Kernighan and Ritchie for popularizing that brace style...
posted by DarkForest at 6:44 AM on September 6, 2012


For years, I would tell people how my fingers "spoke ed and vi". When decent code editing programs came along with UIs, I'd still end up dropping wayward semicolons in the content instead of hitting Ctrl-F or something to search.
posted by thanotopsis at 7:00 AM on September 6, 2012


I just finished reading Patterns of Software by Richard Gabriel last night. It's kind of an odd but interesting collection of essays. The first half is him comparing Christopher Alexander's work on architecture with software development. Then there are a couple of essays about Lisp, and then the rest is basically his memoirs. Anyway, he brings up UNIX as an example of something that was far from perfect, but which provided a minimal subset of things that users needed, and which could spread virally, both of which helped it to succeed. He gives at least one example of a way that UNIX didn't work so well in his Worse Is Better essay (the "PC loser-ing" problem). It's kind of an interesting comparison between an "always implement the right thing, no matter the cost" and an "implement just enough so that the thing is usable" mindset.
posted by A dead Quaker at 7:10 AM on September 6, 2012


Timeshare is in my spellcheck today. Everything else seemed pretty up to date.

(spellcheck ain't there yet)
posted by bukvich at 7:25 AM on September 6, 2012


rh: "Some of the accents in the videos served to remind me that there was a time when the seat of power in the computing world was not Silicon Valley but New York/New Jersey... oh, and that Lorinda Cherry raced rally cars as a hobby!"

I miss the Bell Labs. I mean, the building is still there and all. I drive by it every day going to work. But it's just not the same.
posted by Karmakaze at 7:43 AM on September 6, 2012


And what's wrong with beards? I bet there was someone with a beard who was important in your life, grouse. (Someone with a mustache too, but we'll pretend I didn't say that).
posted by ubiquity at 7:44 AM on September 6, 2012 [1 favorite]


if you want makewords you could xargs -n 1 echo < sentencefile without having to re-invent any wheels

Right, or tr " " "\n" < sentencefile (although that probably fails on multispaced lines). My point wasn't that I'd need to write a program exactly but that I'd have to make a script that captured that as an "atom" for easy inclusion in longer lines.

For years, I would tell people how my fingers "spoke ed and vi". When decent code editing programs came along with UIs...

I was right there with you up until "UIs". My fingers still speak text at 10x the rate my coworkers can click.
posted by DU at 8:38 AM on September 6, 2012


Warning: contains beards. Lots of beards.


8 years ago I went to a house party for a certain Unix-oriented-crowed inhabiting the Left Bank of the Charles River.

Among the guests was a 4-5 month old baby, whom I managed to frighten by being the first beardless man he had ever seen.
posted by ocschwar at 8:40 AM on September 6, 2012 [10 favorites]


DU: My point wasn't that I'd need to write a program exactly but that I'd have to make a script that captured that as an "atom" for easy inclusion in longer lines.

Right, and that's what Lorinda was trying to express, but was chopped up badly -- they didn't seem to respect her as much as the other speakers. She was trying to point out that you can make your own functions, and then integrate them into your environment just as completely as any of the original 'first class' (ie, what came with the OS) functions.

For instance, say we want to re-implement the lowercase command, lost to history. From the command prompt, this appears to do the trick. I don't know the full specifications of the original lowercase, but it looks right:

tr [:upper:] [:lower:]

That turns all uppercase characters into the equivalent lowercase ones.

But, say I don't want to type that every time. 'lowercase' is much easier to remember. So I can just edit a text file called 'lowercase':

#!/bin/sh

tr [:upper:] [:lower:]


Now, I have to put an 'executable' bit on it, to show the OS that it's okay to try to run this as a program, it's not just an ordinary file:

chmod u+x lowercase

Now, if I put that file somewhere in my PATH, it becomes part of my environment. An old standard in Unix was to make a 'bin' directory under your user account, and then edit the login script to add that directory to the PATH variable. As you write new shortcuts, you just stick them in your bin directory, and voila.

So, copy lowercase into your path somewhere, and now you've got a new command:

cat sometextfile | lowercase
or
lowercase <sometextfile

And that's what they cut out of Lorinda's talk, which they shouldn't have. That's THE BIG THING about Unix, the really brilliant thing that makes it all work. Most things in Unix are sentences constructed from words, but you can make your own words. When it was created, mostly people used either shell scripting (like the lowercase command we just made) or C, but the facility is generic enough that anything can be used. Whole new classes of languages have come along, like Perl and Python and Haskell and Java, and they can be used to create new words that function just as well as anything else in the OS. They become first-class citizens of the environment, even though their creators were probably in diapers when Unix was first designed.

And, with the advent of super-incredible programs like Secure Shell, (ssh), you can blend the entire power of remote machines into the command line of YOUR desktop. Want to process a local file on a supercomputer, and then get the results back locally?

cat mydatafile | ssh myusername@supercomputer.example.com "/path/to/processing/application" | cat >processed_data

And that's it. You've just tied a billion-dollar machine into your local command flow. (the cat programs there are a bit superfluous, but they make the logic easier to parse.)

All languages, and even all remote Unix machines (a new development since the 1980s) can be made into 'first class citizens' of your computer, easily integrated into your environment, as if they'd always been there. There's no bright line between users and programmers; users and programmers are the same thing. Just writing that little tr shell script was programming; if you did that, you've just become a programmer. It's almost impossible to use Unix in any kind of serious way without becoming a programmer to some degree. It's not something you need to Explicitly Go Do, it's not a project, it just happens.

In my opinion, that's the most important thing of all, but I fear it got short shrift because the woman was delivering the message.
posted by Malor at 10:32 AM on September 6, 2012 [8 favorites]


In rereading, I should expand on this just a tiny bit:

Most things in Unix are sentences constructed from words, but you can make your own words.

More completely, once you have sentences you like, you can trivially turn them into words, which you can then use in even more complex sentences.
posted by Malor at 10:37 AM on September 6, 2012


Malor, you are so right. 'chmod +x' is the core of the genius (well, that plus pipes). I once read an explanation of the early days of Unix, and how the fact that the commands you were executing at the command line were just files sitting somewhere in the file system, just like any other files, was so mind-blowing and different. With other 'shells', adding functionality required a complete re-compile and re-install of the shell.

The same principle of core system elements and user-supplied elements being implemented the exact same way always re-assures me when I see it. It means fewer ugly surprises. It's part of why I feel good about Haskell, and bad about every programming tool from Microsoft I've ever used.
posted by benito.strauss at 12:31 PM on September 6, 2012 [1 favorite]


At my first job in the early 80s, 20 engineers on VT220 terminals logged into unix on a VAX with 8Mb of memory with no slowdowns.

Luxury! *cracks knuckles* In the early 70s, Minnesota's MERITTS time-sharing system tied together a few dozen schools and (IIRC) ran their phone lines into a single 32K (core?) central processor with a host of buffers to do the I/O. Yes, all of the users programs were being run on one CPU. The (model 33 paper-roll) teletypes were set up so that when you typed a key, you didn't see a letter printed until it was processed and echoed back.

The delay of that echo told you how busy the CPU was. 20 or 30 users wasn't too bad ... latency of about a second. On busy afternoons though, when over 100 people were trying to use the "system" ... and I do not exaggerate ... it could take over 20 seconds to echo back each character of your password. On such days, to choose wisely meant adding your batch job to the queue.

THAT was the era in which Unix came of age. Splains quite a bit, eh Lucy?
posted by Twang at 12:57 PM on September 6, 2012


Malor: "One of the strongest indications of just how smart these people were is the simple fact that I just installed Linux on my current desktop machine, to play with GNU Radio."

I too recently installed Linux for the express purpose of playing with GNU Radio. Well, I installed it to use one specific GNU Radio block. (gr-air-modes)

Isn't it interesting how GNU Radio uses essentially the same concepts? Interchangeable blocks that take generic input and output strung together to make a radio are quite flexible.
posted by wierdo at 1:53 PM on September 6, 2012


We use a lot of Fortran in my lab, Malor. I wasn't aware that we're supposed to do so grudgingly and with ill feelings. It's a very good tool for numerical computing, even if I prefer Python + NumPy myself.
posted by wintermind at 2:16 PM on September 6, 2012


Whelp, I know what we're doing next in the Technical Writing class I teach! I assigned a chapter on technology for Tuesday. Videos from the AT&T Archives will supplement it perfectly. Thanks for posting.
posted by Tesseractive at 2:42 PM on September 6, 2012


Isn't it interesting how GNU Radio uses essentially the same concepts?

Yeah, I debated mentioning that, as I spent a fair bit of time thinking how Unixy GNU Radio is, but I just don't yet feel familiar enough with the software to speak authoritatively about it. But, yes, it does seem very much like Unix does, with interchangeable modules you use to work on piped data, in sequence.

However, the complexity of the data it's dealing with is a lot higher, and while you can certainly assemble, say, an FM radio out of the component parts, it looks very much non-trivial to make your own actual components. It looks very hairy indeed.

We use a lot of Fortran in my lab, Malor. I wasn't aware that we're supposed to do so grudgingly and with ill feelings.

Well, I dunno how unusual you are, but it seems like the great majority of places that use Fortran (I just looked it up, and I guess you're not supposed to capitalize it anymore) do so only to maintain ancient mainframe programs that just keep trucking along. I haven't read much about that in a long time, so maybe even that use is finally passing out of computing, but wow, the sheer resentment toward the language in the general IT crowd seems extraordinary.

I was trying to draw a differentiation between old technology that people keep using because it's too expensive to switch to more modern systems, and old technology that people keep using because it's good. Fortran seemed like the ideal counter-example, something that sucked but was kept around because of inertia, but maybe it wasn't. :)
posted by Malor at 2:48 PM on September 6, 2012


alias makewords='fmt -1'
posted by fings at 4:57 PM on September 6, 2012 [2 favorites]


Malor, I think the issue with GNURadio is much like the issue that most people have with the command line in general and pipes, redirection, and such in particular. It is very simple, but its simplicity is in itself complex, because there are no great instructions on how exactly the pieces fit together, much as there was no documentation telling you how to build a spell checker from piped together commands available on System V in the mid 70s.

There certainly are blocks to be written that are very complex and would require expert level knowledge of many fields to get right, but the complexity isn't really in the framework, it's in the problem itself. I've only been working with (or hacking at with a rusty knife, if you prefer) gr-air-modes so far, so I don't know much about how other blocks are written, but if you take a look at it it's actually pretty understandable even if you're not a c++ and python expert.

Not that I'm any sort of expert, but that's my impression so far.
posted by wierdo at 2:04 AM on September 7, 2012


Yeah, I didn't mean it as a criticism of the program, just that the math in radio itself is pretty intimidating. It's not exactly intuitively obvious how this stuff works.
posted by Malor at 9:44 AM on September 7, 2012


Malor, on behalf of comp.unix.shell I present you the Useless Use of Cat Award!

Finally I get it off my shelf and onto someone else's.

All kidding aside, your ssh example can be rewritten like so:

ssh user@host "sort" < /tmp/input_file > /tmp/output_file

Or, less intuitively, like so:

> /tmp/output_file < /tmp/input_file ssh user@host "sort"
posted by popechunk at 7:04 AM on September 10, 2012


Yes, popechunk, I explicitly said that cat was superfluous in that example. In the very next line! I used it to make the data flow clearer.

If you're going to criticize, at least read what you're criticizing.
posted by Malor at 12:20 PM on September 10, 2012


"Useless use of cat" needs to go away. Starting every pipeline with 'cat filename' is a good idea. My own reasons are here and here.
posted by benito.strauss at 1:32 PM on September 10, 2012 [1 favorite]


Sorry, Malor, I apologize. You can keep the award, though, I don't want it back.
posted by popechunk at 3:26 PM on September 11, 2012 [1 favorite]


« Older You Stutterin Prick!   |   Making a case for making your own laptop case Newer »


This thread has been archived and is closed to new comments



Post