All,
I've completed a new version of my "Installing and Using Research Unix
Version 7 in the SimH PDP-11/45 and 11/70 Emulators" tutorial/document
(wow, that's a mouthful). I'm calling it Version 2.0 - It is a
completely reorganized, updated, and edited version of the document.
The blog post announcement is on the blog: https://decuser.blogspot.com/
and the pdf is on google drive:
https://drive.google.com/file/d/1gDBxULlpLwezH-1RO_3ou_W7trElgSgT/view?usp=…
The new doc covers building a working v7 instance from tape files that
will run on the SimH emulator. First, the reader is led through the
restoration of a pristine v7 instance from tape to disk. Next, the
reader is led through adding a regular user, making the system
multi-user. Then, the reader is shown how to make the system
multi-session cable allowing multiple simultaneous sessions. Finally,
the system is put to use with hello world, DMR style, and the learn
system is enabled. It also includes a hyperlinked table of contents.
My hope is that the new version will be more useful than the prior
version, as well as more accurate. I really appreciate the input and
feedback y'all have given me over the intervening years.
Regards,
Will
> From: John Cowan
> Why use C syntax? What was wrong with Fortran, Lisp, or Cobol syntax,
> extended to do what you wanted?
Why do all hammers look basically the same? Because there's an 'ideal
hammer', and over time hammer design has asymtoted toward that 'ideal hammer'
design. One can't just keep improving the design indefinitely - diminishing
returns set in.
So I suspect there is, to some degree, a Platonic 'ideal syntax' for a
'classic block-structured' programming language, and to me, C came pretty
close to it.
I except LISP from that assessment, because LISP is built around a
fundamentally different model of how computations/algorithms are organized,
and C and LISP aren't directly comparable.
But that realization points to a deeper bug with the 'Platonic ideal
language' concept above, which is that languages are fundamentally, albeit at
a very deep conceptual level, tied to the basic concept of the computing
hardware they are to run on. C/COBOL/FORTRAN/etc are all for von Neumann-like
(in a broad sense) computing engines - a single thread of computation, which
happens sequentially.
But we've pushed that paradigm about as far as it can go, we're into
diminishing returns territory on that one. The future, starting with the
hardware, will be very different - and will need quite different languages.
(Go, from what little I know of it, is a baby step in this direction - it is
intended to make it easy to use multiple simultaneous loci of execution,
making use of the mutiple cores that are common now.)
I suspect we'll be shifting to radically different paradigms, 50 years from
now - massively parallel computing meshes (think Connection Machines on
steroids - or the human brain), and those will use fundamentally different
computing paradigms, and programming languages for them, which in turn will
need very different syntax.
Noel
> Lisp, _that's_ elegant.
The machine shines through Lisp even more brightly than it does
through C. Lisp attains incredible power from a tiny base: car, cdr,
cons, cond, T, F, null, lambda, def, exuding elegance that survives
even in a raging sea of parentheses.
For Lisp-friendly applications nowadays, I prefer Haskell, which is
much further away from the machine. Haskell code approaches--and
sometimes surpasses--the cleanliness of good mathematical notation.
For string processing, I remember Snobol 3 with great fondness.
But for everyday work with arrays and numbers, C is the workhorse.
Still, I wish that C would evaluate comma expressions in parallel
rather than in series, as in (a,b) = (b,a).
Doug
I enabled user accounting on my v7 instance and I noticed it "growing
without bound" and while this is noted as a possibility in the ac(1) man
page, I was pretty sure the original authors didn't mean 30k a second. I
scratched my head and thought for a while and then started experimenting
to see what the heck was going on. I removed /usr/adm/wtmp (which I had
created to enable accounting in the first place) and the little red disk
write arrow on my mac went away, but not the little green disk read
arrow... hmm. Something was keeping my v7 instance very busy reading
disk, that was for sure. I went through a few (dozens) more tests and
experiments, reread a bunch of man pages, Ritchie's v7 install note, and
thought some more and here's what I came up with...
If you modify your system to add dci lines and you enable some ttys in
/etc/ttys and you enable user accounting. Then, the next time you boot
into a kernel that doesn't have dci support, init or some other process
will try and fail to read the enabled ttys, log something in
/usr/adm/wtmp, if it exists, and then loop (very quickly), over and over
and over. If you aren't paying attention, this will hardly be noticeable
on modern hardware running simh, but I'm guessing this would have been
disastrous, back in the day.
The simple solution is to boot w/dci enabled when you have ttys enabled,
and only boot w/o dci enabled when you have disabled the ttys.
I'm guessing that this wasn't really ever an issue, back in the day, as
folks prolly didn't just yank their dci's and reboot a different kernel?
But, such are the joys of simulation.
Anyhow, if this doesn't sound like a very likely or reasonable analysis
of what was happening, I'd appreciate your letting me know, or if you've
experienced something like it before, it'd be great to know that I'm not
alone in this silliness.
Will
I'm pretty sure that I asked about learn ages back, but I couldn't find
any reference to it in the archives. So, I thought I would close the
possibly imaginary loop on it. Cuz, I figured it out, and it may prove
useful to others or with my track record, even myself in the future :).
Learn works fine in v7. It just needs to be properly installed. The
command is there already, so you may not need to follow all of the steps
below, but it doesn't hurt:
I did this as root, but it could possibly be done as another user, I'm
not sure.
cd /usr/src/cmd/learn
make
make lessons
make play; make log
That's it. make will complain about missing files that it tries to
delete, but these can be safely ignored, since make then creates them
anyway.
Here's the result run as a normal user:
$ learn
These are the available courses -
 files
 editor
 morefiles
 macros
 eqn
 C
If you want more information about the courses,
or if you have never used 'learn' before,
type 'return'; otherwise type the name of
the course you want, followed by 'return'.
macros
If you were in the middle of this subject
and want to start where you left off, type
the last lesson number the computer printed.
To start at the beginning, just hit return.
This script deals with the use of the "-ms" macro
package to produce Bell Laboratories style documents.
Before trying it, you should be familiar with the
editor. To test that, please enter the file
typed below, exactly as is, into file "decl". Then
type "ready".
.PP
When in the course of human events, it becomes
necessary for one people to dissolve the political bands which have
connected them with another, and to assume among the
powers of the earth the separate and equal station to which
the laws of Nature and of Nature's God entitle them, a decent
respect to the opinions of mankind requires that they should
declare the causes which impel them to the separation.
$ ed decl
?decl
a
.PP
When in the course of human events, it becomes
necessary for one people to dissolve the political bands which have
connected them with another, and to assume among the
powers of the earth the separate and equal station to which
the laws of Nature and of Nature's God entitle them, a decent
respect to the opinions of mankind requires that they should
declare the causes which impel them to the separation.
.
w
410
q
$ ready
Good. Lesson 1.1a (1)
When you have some document typed in "-ms" style,
you run it off on your terminal by saying:
 nroff -ms file
where "file" is the name of the file it is on. For example,
the file "decl" in this directory is in a suitable format
for running off this way. Do so. Then type "ready".
$
Interrupt.
Want to go on? n
Bye.
$
Pretty slick, really, once you realize that the $ prompt isn't really
your shell, it's a shell within learn. Also, there's no learn manpage
although there is a document in vol2 of the programmer's manual that
describes the program. I couldn't figure out the canonical way to exit,
so I just CTRL-DELETE on my mac, which I figure it CTRL-BREAK (^C?).
That seems to work.
Oh, and according to /usr/src/cmd/learn/README, if you have any trouble:
Please report problems, bad lessons, etc., to
Brian Kernighan, MH 6021, 2C-518, or
Mike Lesk, MH 6377, 2C-572. Thanks.
Enjoy, and happy New Year, folks!
Will
> Joy’s original 2BSD tape will give you UCB Pascal.
While I agree with Kernighan that Pascal is not my favorite
programming language, UCB Pascal is my favorite compiler because of
its spectacularly good syntax diagnostics. The diagnostics are
automatically generated, so they have a completely consistent style
and never go down rabbit holes trying to explain an error.
The UCB trick is to report the exact spot where LR parsing chokes and
suggest a canonical alternate token that allows progress. This simple
strategy is startlingly effective; the compiler taught me Pascal in an
evening.
It occurred to me that Pascal would be a suitable language in which to
express a certain algorithm. Having skimmed the Pascal report a year
or more earlier, I knew it was a pretty typical language, so I grabbed
a sample program from somewhere and plowed ahead. I made mistake after
mistake, but every diagnostic was instantly suggestive. By the end of
the session I had a polished working program. In due time it was
accepted for publication.
Doug
I'm tooling around doing my annual dive into operating systems ancient
and not-so-ancient and I've gotten back around to v7 because it has a
working f77 in baseline. The 3b2 has f77 as an installable package but
it crashes and burns with read statements like: read *,var - in both
sysvr2 and sysvr3. After consulting with the fortran expert, I'm gonna
chalk it up to "man there's a lot of backstory to these seemingly simple
issues" and just work with v7... in full disclosure f77 also seems to
work fine on 211bsd, but that's too new for today's dive :).
Anyhow, I ran through my install notes from back in 2017 and did a few
updates on them to update urls (would everyone just go ahead and move to
https already?), fix some clunky examples, fix some typos, and update to
a more recent host environment (although some would argue that Mojave is
out of date - just give me a drop in replacement for Adobe Acrobat Pro X
(a 32 bit app) that doesn't phone home every 5 minutes and I'll move to
Monterey). Version 1.7 of the doc is posted on the blog:
https://decuser.blogspot.com/
Anyway, now I'm ready to add stuff to my shiny new v7 instance and
document the additions. So, on to the question of the hour... I did some
looking around and couldn't easily locate any v7 software archives for
additional software that will run on v7 (not the distros, which are
adequately hosted in the Unix Archive). Stuff like pascal, fortran iv,
fortran 90, basic, lisp and the ilk. Do y'all know of any good caches?
Later,
Will
So, I was bemoaning the fact that I couldn't really make sense of the
bas command in v7. In sysv2, it works and is similar enough to modern
dialects that I was able to get a simple example working, but with v7,
the best I was able to do was use it interactively, as a calculator.
Then I went looking for v7 videos on youtube and came across this Dr.
Dave's Diversions video: https://www.youtube.com/watch?v=LZUMNZTUJos
In it Dr. Dave demos a few simple versions of 99 bottles of beer in v7.
Wow! I wondered how he'd glommed the inner workings of bas - did he read
a book, just know it naturally, phone a friend, or what? Well, as it
turned out, he... wait for it... read the bas(1) man page! Wha?!
Ridiculous. So, I pulled out my v7 phone book and read the bas(1) man
page and sure enough, it was all there... how '_' is used for negation,
how those arcane for loops work, arrays?!, function calls?!, etc and so
on, all in 3 short pages.
So, two observations:
1. Those man pages from back in the day - wow. So terse, yet so well
written. With a little help from a friend (thanks, Dr Dave), they're
really all you need, sometimes.
2. Those early apps - wow. So obscure these days, but so ahead of their
time, too (thanks, Ken for making Dec 2021 interesting by doing what you
did back in the early 70's).
And a question (you knew it was coming): Besides the bas(1) page, is
there anything else written on Ken's basic out there in the wild? Oh,
and a bonus question, draw and erase from v5 appear to still be around
in v7, but not documented in the man page. Did it work and has anyone
written a Tektronix 611 emulator that works with v7?
Thanks,
Will
I'm a little flummoxed in trying to move some directories around in
svr2. Shouldn't the following work?
   mkdir a
   mkdir b
   mv a b
I get the following error:
mv: b exists
I tried many of the possible variants including:
mv a b/
mv: b/ exists
mv a b/a
mv: directory rename only
cd b
mv ../a .
mv: . exists
mv ../a ./
mv: ./ exists
mv ../a ./a
mv: directory rename only
If moving directories into existing directories wasn't allowed in those
days, 1) how were directories managed? and 2) when did moving
directories into directories become a thing?
Are there any extant 2.11 manuals other than the online manual and various install and configure PDFs, available for download?
Also, am I understanding correctly that 2.11 is 2.10 plus some 4.3 backports and a ton of patches? If there aren’t any 2.11 specific docs, what would be the closest of what is available?
Will
Sent from my iPhone