One amusing thing that Steve told me which I think I can share is why the
symmetry of case-esac, if-fi was broken with with do-done; it was because
the od command existed so do-od wouldn't work!
As I heard the story in the UNIX room decades ago (and at least five
years after the event), Steve tried and tried to convince Ken to
rename od so that he could have the symmetry he wanted. Ken was
> From: Clem Cole
> when she found out the elevators were hacked and controlled by the
> student's different computers, she stopped using them and would take
> the stairs
It wasn't quite as major as this makes it sound! A couple of inconspicuous
wires were run from the 'TV 11' on the MIT-AI KA10 machine (the -11 that ran
the Knight displays) into the elevator controller, and run onto the terminals
where the wires from the 'down' call buttons on the 8th and 9th floors went.
So it wasn't anything major, and there was really no need for her to take the
stair (especially 8 flights up :-).
The code is still extant, in 'SYSTEM; TV >'. It only worked (I think) from
Knight TV keyboards; typing 'ESC E' called the elevator to the floor
that keyboard was on (there's a table, 'ELETAB', which gives the physical
floor for each keyboard).
The machine could also open the locked 9th floor door to the machine room
(with an 'ESC D'), and there some other less major things, e.g. print screen
hardcopy. I'm not sure what the hardware in the TV-11 was (this was all run
out of the 'keyboard multiplexor'); it may have been something the AI Lab
built from scratch.
> When Bernie Greenberg did EMACS for Multics, he had a similar issue. I
> recall reading a document with an extensive discussion of how they dealt
> with this ... If anyone's really interested in this, and can't find it
> themselves, I can try looking for it.
I got a request for this; a Web search turned up:
which covers the points I mentioned (and more besides, such as why LISP was
chosen). I don't think this is the thing I remembered (which was, IIRC, an
informal note), but it does seem to be a later version of that.
> From: Otto Moerbeek <otto(a)drijf.net>
> I believe it was not only vi itself that was causing the load, it was
> also running many terminals in raw mode that killed performance.
I'm not familiar with the tty driver in late versions of Unix like 4.1 (sic),
but I'm very familiar with the one in V6, and it's not the raw mode _itself_
that caused the load (the code paths in the kernel for cooked and raw aren't
that different), but rather the need to wake up and run a process on every
character that was the real load.
When Bernie Greenberg did EMACS for Multics, he had a similar issue. I recall
reading a document with an extensive discussion of how they dealt with this,
especially when using the system over the ARPANET. IIRC, normal printing
characters were echoed without waking up the process; remotely, when using
the network. If anyone's really interested in this, and can't find it themselves,
I can try looking for it.
> From: Clem Cole <clemc(a)ccc.com>
> So, unless anyone else can illuminate, I'm not sure where the first cpp
> that some of us using v6 had originated.
I recall a prior extensive discussion about 'cpp'. I looked, and found it
(March 30, 2017) but it was a private discussion, not on TUHS (although you
were part of it :-). Here are clips of what I wrote (I don't want to re-post
what others wrote) from what I wrote, which tell most of the story:
There were a series of changes to C before V7 came out, resulting in the
so-called 'phototypsetter C compiler' (previously discussed on TUHS), and they
included the preprocessor. There's that series of short notes describing
changes to C (and the compiler), and they include mention of the preprocessor.
[Available here: http://gunkies.org/wiki/Typesetter_C for those who want to see
The MIT 'V6' Unix (which was, AFAICT, an augmented version of an early version
of PWB Unix) had that C compiler; and if you look at the PWB1 tree online, it
does have the C with 'cpp':
I did a diff of that 'cpp' with the MIT one, and they are basically identical.
I went looking for the C manual in the V6 distro, to see if it mentioned the
pre-processor. And it does:
(Section 12, "Compiler control lines", about half way down.) So, I'm like,
'WTF? I just looked at cc.c and no mention of cpp!'
So I looked a little harder, and if you look at the cc.c in the distro (URL
above), you see this:
The pre-processor is integrated into 'cc' in the initial V6. So we do have a very
early version of it, after all...
So, 'cc' in V5 also included pre-processor support (just #define and #include,
Although we don't have the source to 'cc' to show it, V4 also appears to have
had it, per the man page:
"If the -p flag is used, only the macro prepass is run on all files whose name
ends in .c"; and the V4 system source:
also has .h files.
No sign of it in the man page for cc.1 in V3, though.
This all makes sense. .h files aren't any use with[out] #include, and without
#include, you have to have the structure definition, etc in multiple source
files. So #include would have gotten added very early on.
In V3, the system was apparently still in assembler, so no need.
Also, there's an error in:
when it says "V6 was a very different beast for programming to V7. No c
preprocessor. The practical upshot of this is no #includes." that's
clearly incorrect (see above). Also, if you look at Lions (which is pure
early V6), in the source section, all the .c files have #include's.
Date: Wed, 8 Jan 2020 17:40:10 -0800
> From: Bakul Shah <bakul(a)bitblocks.com>
> To: Larry McVoy <lm(a)mcvoy.com>
> Cc: Warner Losh <imp(a)bsdimp.com>, The Eunuchs Hysterical Society
> Subject: Re: [TUHS] screen editors
> Message-ID: <D192F5A5-2A67-413C-8F5C-FCF195151E4F(a)bitblocks.com>
> Content-Type: text/plain; charset=utf-8
> On Jan 8, 2020, at 5:28 PM, Larry McVoy <lm(a)mcvoy.com> wrote:
> > On Wed, Jan 08, 2020 at 05:08:59PM -0700, Warner Losh wrote:
> >> On Wed, Jan 8, 2020, 4:22 PM Dave Horsfall <dave(a)horsfall.org> wrote:
> >>> On Wed, 8 Jan 2020, Chet Ramey wrote:
> >>>>> That's a real big vi in RHL.
> >>>> It's vim.
> >>> It's also VIM on the Mac.
> >> Nvi is also interesting and 1/10th the size of vim. It's also the
> >> default for vi.
> > I was gonna stay out of this thread (it has the feel of old folks
> > but 2 comments:
> > Keith did nvi (I can't remember why? licensing or something) and he did
> > a pretty faithful bug for bug compatible job. I've always wondered why.
> > I like Keith but it seemed like a waste. There were other people taking
> > vi forward, elvis, xvi (I hacked the crap out of that one, made it mmap
> > the file and had a whole string library that treated \n like NULL) and
> > I think vim was coming along. So doing a compat vi felt like a step
> > backward for me.
> > For all the vim haters, come on. Vim is awesome, it gave me the one
> > thing that I wanted from emacs, multiple windows. I use that all the
> > time. It's got piles of stuff that I don't use, probably should, but
> > it is every bit as good of a vi as the original and then it added more.
> > I'm super grateful that vim came along.
> The first thing I do on a new machine is to install nvi. Very grateful to
> Keith Bostic for implementing it. I do use multiple windows — only
> horizontal splits but that is good enough for me as all my terminal
> windows are 80 chars wide. Not a vim hater but never saw the need.
Not sure if you’re saying horizontal splits are all you need, or all you’re
aware of, but nvi “:E somefile” will split to a top/bottom arrangement and
“:vsplit somefile” will do a left/right arrangement, as well as being able
to “:fg”, “:bg” screens. I too am a (NetBSD) nvi appreciator.
Working on a new project that's unfortunately going to require some changes
to the linux kernel. Lived a lot of my life in the embedded world, haven't
touched a *NIX kernel since 4.3BSD. Am writing a travelogue as I find my way
around the code. Wasn't planning another book but this might end up being
one. Anyway, a few questions...
Was looking at the filesystem super_block structure. A large number of the
members of the structure (but not all) begin with a s_ prefix, and some of
the member names are in the 20 character long range. I recall that using
prefixes was necessary before structures and unions had their own independent
namespaces. But I also seem to recall that that was fixed before long
identifier names happened. Does anybody remember the ordering for these two
Also, anybody know where the term superblock originated? With what filesystem?