> 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.
Noel
> 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:
https://www.multicians.org/mepap.html
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.
Noel
> 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.
Noel
> 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
them.]
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':
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/c/c
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:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/doc/c/c5
(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:
insym(&defloc, "define");
insym(&incloc, "include");
insym(&eifloc, "endif");
insym(&ifdloc, "ifdef");
insym(&ifnloc, "ifndef");
insym(&unxloc, "unix");
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,
though):
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/cc.c
Although we don't have the source to 'cc' to show it, V4 also appears to have
had it, per the man page:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man1/cc.1
"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:
http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/nsys
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:
https://ewe2.ninja/computers/cno/
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.
Noel
Do we really need another boring old editor war? The topic
is not specific to UNIX in the least; nor, alas, is it historic.
Norman Wilson
Toronto ON
(typing this in qed)
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
> <tuhs(a)tuhs.org>
> 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
> FreeBSD
> >> default for vi.
> >
> > I was gonna stay out of this thread (it has the feel of old folks
> somehow)
> > 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.
-bch
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
events?
Also, anybody know where the term superblock originated? With what filesystem?
Jon
below... -- warning veering a little from pure UNIX history, but trying to
clarify what I can and then moving to COFF for follow up.
On Wed, Jan 8, 2020 at 12:23 AM Brian Walden <tuhs(a)cuzuco.com> wrote:
> ....
>
> - CMU's ALGOL68S from 1978 list all these ways --
> co comment
> comment comment
> pr pragmat
> pragmat pragmat
> # (comment symbol) comment
> :: (pragmat symbol) pragmat
> (its for UNIX v6 or v7 so not surprising # is a comment)
> http://www.softwarepreservation.org/projects/ALGOL/manual/a68s.txt/view
Be careful of overthinking here. The comment in that note says was it was
for* PDP-11's *and lists V6 and V7 was *a possible target*, but it did not
say it was. Also, the Speach and Vision PDP-11/40e based systems ran a
very hacked v6 (which a special C compiler that supported CMU's csv/cret
instructions in the microcode), which would have been the target systems.
[1]
To my knowledge/memory, the CMU Algol68 compiler never ran anywhere but
Hydra (and also used custom microcode). IIRC there was some talk to move
it to *OS (Star OS for CM*) I've sent a note to dvk to see if he remembers
it otherwise. I also ask Liebensperger what he remembers, he was hacking on
*OS in those days. Again, IIRC Prof. Peter Hibbard was the mastermind
behind the CMU Algol68 system. He was a Brit from Cambridge (and taught
the parallel computing course which I took from him at the time).
FWIW: I also don't think the CMU Algol68 compiler was ever completely
self-hosting, and like BLISS, required the PDP-10 to support it. As to why
it was not moved to the Vax, I was leaving/had left by that time, but I
suspect the students involved graduated and by then the Perq's had become
the hot machine for language types and ADA would start being what the gvt
would give research $s too.
>
>
> ...
>
> But look! The very first line of that file! It is a single # sitting all
> by itself. Why? you ask. Well this is a hold over from when the C
> preprocessor was new. C orginally did not have it and was added later.
> PL/I had a %INCLUDE so Ritchie eventaully made a #include -- but pre 7th
> Edition the C preprocessor would not be inkoved unless the very first
> character of the C source file was an #
>
That was true of V7 and Typesetter C too. It was a separate program (
/lib/cpp) that the cc command called if needed.
> Since v7 the preprocessor always run on it. The first C preprocessor was
> Ritchie's work with no nested includes and no macros. v7's was by John
> Reiser which added those parts.
>
Right, this is what I was referring too last night in reference to Sean
comments. As I said, the /bin/cc command was a shell script and it peaked
at the first character to see if it was #. I still find myself starting
all C programs with a # on a line by itself ;-)
Note that the Ritchie cpp was influenced by Brian's Ratfor work, so using #
is not surprising.
This leads to a question/thought for this group, although I think needs to
move to COFF (which I have CC'ed for follow up).
I have often contended, that one of the reasons why C, Fortran, and PL/1
were so popular as commercial production languages were because they could
be preprocessed. For a commercial place where lots of different targets is
possible, that was hugely important. Pascal, for instance, has semantics
that makes writing a preprocessor like cpp or Ratfor difficult (which was
one of the things Brian talks about in his "*Why Pascal is not my favorite
Programming Language <http://www.lysator.liu.se/c/bwk-on-pascal.html>*"
paper). [2]
So, if you went to commercial ISV's and looked at what they wrote in. It
was usually some sort of preprocessed language. Some used Ratfor like a
number of commercial HPC apps vendors, Tektronix wrote PLOT10 in MORTRAN.
I believe it was Morgan-Stanley had a front-end for PL/1, which I can not
recall the name. But you get the point ... if you had to target different
runtime environments, it was best for your base code to not be specific.
However ... as C became the system programming language, the preprocessor
was important. In fact, it even gave birth the other tools like autoconfig
to help control them. Simply, the idiom:
#ifdef SYSTEMX
#define SOME_VAR (1)
... do something specific
#endif /* SYSTEMX */
While loathsome to read, it actually worked well in practice.
That fact is I hate the preprocessor in many ways but love it for what it
for the freedom it actually gave us to move code. Having programmed since
the 1960s, I remember how hard it was to move things, even if the language
was the same.
Today, modern languages try to forego the preprocessor. C++'s solution is
to throw the kitchen sink into the language and have 'frameworks', none of
which work together. Java's and its family tries to control it with the
JVM. Go is a little too new to see if its going to work (I don't see a lot
of production ISV code in it yet).
Note: A difference between then and now, is 1) we have few target
architectures and 2) we have fewer target operating environments, 3) ISV
don't like multiple different versions of their SW, they much prefer very
few for maintenance reasons so they like # 1 and #2 [i.e. Cole's law of
economics in operation here].
So ... my question, particularly for those like Doug who have programmed
longer and at least as long as I, what do you think? You lived the same
time I did and know the difficulties we faced. Is the loss of a
preprocessor good or bad?
Clem
[1] Historical footnote about CMU. I was the person that brought V7 into
CMU and I never updated the Speach or Vision systems and I don't think
anyone did after I left. We ran a CMU V7 variant mostly on the 11/34s (and
later on a couple of 11/44s I believe) that had started to pop up.
Although later if it was a DEC system, CS was moving to Vaxen when they
could get the $s (but the Alto's and Perq's had become popular with the CMU
SPICE proposal). Departments like bio-engineering, mech ee, ran the
cheaper systems on-site and then networked over the Computer Center's Vaxen
and PDP-20's when they needed address space).
[2] Note: Knuth wrote "Web" to handle a number of the issues, Kernighan
talks about - but he had to use an extended Pascal superset and his program
was notable for not being portable (he wrote for it for the PDP-10
Pascal). [BTW: Ward Cunningham, TW Cook and I once counted over 8
different 'Tek Pascal' variants and 14 different 'HP Basics'].