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
> From: Clem Cole
> Try it on V6 or V7 and you will get 'directory exists' as an error.
The V6 'mv' is prepared to move a directory _within_ a directory (i.e.
'rename' functionality). I'm not sure why it's not prepared to move within
a partition; probably whoever wrote it wasn't prepared to deal with all the
extra work for that (unlink from the old '..', then link to the '..' in the
new directory, etc, etc).
(The MIT PWB1 had a 'mvdir' written by Jeff Schiller, so PWB1 didn't have
'move directory' functionality before that. MIT must have been using the PWB1
system for 6.031, which I didn't recall; the comments in 'mvdir' refer to it
being used there.)
The V6 'mv' is fairly complicated (as I found out when I tried to modify it
to use 'smdate()', so that moving a file didn't change its 'last write'
date). Oddly enough, it is prepared to do cross-partition 'moves' (it forks a
'cp' to do the move). Although on V6, 'cp' only does one file; 'cp *.c
{dest}' was not supported, there was 'cpall' for that. (Why no 'mvall', I
wonder? It would have been trivial to clone 'cpall'.)
Run fact; the V6 'mv' is the place that has the famous (?) "values of B will
give rise to dom!" error message (in the directory-moing section).
> if the BSD mv command for 4.1 supported it. If it did then it was not
> atomic -- it would have had to create the new directory, move the
> contents independently and then remove the old one.
Speaking of atomic operation, in V6 'mkdir' (not being a system call) was
not atomic, so if interrupted at 'just the right time', it could leave
the FS in an inconsistent state. That's the best reason I've come across
to make 'mkdir' a system call - it can be made atomic that way.
Noel
> what was the last Unix version
> that let users make arbitrary links, such that the file system was no
> longer a DAG? I recall in v6 days hearing that earlier Unix allowed
> this, and that cleanup (via icheck and friends) got to be near
> impossible.
>From v1 on (I'm not sure about PDP-7 Unix) only the superuser could do
that, so what you heard strikes me as urban legend. Perhaps some
installations abused root privilege to scramble the file system, but I
certainly didn't see that happen in Research systems.
Doug
On Dec 29, 2021, at 8:01 AM, Bakul Shah <bakul(a)iitbombay.org> wrote:
> On Dec 29, 2021, at 7:18 AM, Clem Cole <clemc(a)ccc.com> wrote:
>>
>> Think about the UNIX FS and the link system call. How is mv implemented? You link the file to the new directory and the unlink it from the old one. But a directory file can not be in two directories at the same time as the .. link would fail.
>
> Don’t see why linking a dir in two places is a problem.
To expand on this a bit, the “cd ..” case can be handled by not storing a ..
link in a dir. in the first place! Store the $PWD path in the u struct. Then
cd .. would simply lop off the last component, if one exists. Thus .. takes
you back only on the path you used! This also takes care of the issue with
symlinks (& does what csh did in user code).
The first specific mention of moving directories in Research is in
v10, but I'm sure that was implemented considerably earlier. The only
things special about moving a directory were that it needed root
privilege and checked against moving a directory into itself. As with
ordinary files, copying (with loss of hard links) happened only when
moving between different file systems. As far as I know, no atomicity
precautions were taken.
The core system of svr2 distributed by ATT for the 3b2-400 doesn't come
with manpages installed. Does anybody know of a set of manpages for SVR2
that can be installed into the system? It's not the end of the world, if
not... the user guide is available as a pdf, but it'd be handy to have
man on the system.
Will
Is it possible to use echo to send a vt-100 escape sequence in v6/v7/sysvr2?
I can write a c program to clear the screen and go home in sysvr2:
#define ASCII_ESC 27
main()
{
printf( "%c[2J", ASCII_ESC );
printf( "%c[H", ASCII_ESC );
}
and it works fine. I can type the escape sequences in as well, but I'd
just as soon write a shell script with an echo '[[2J;[[H' or something
similar without having to compile a clear command. Is it possible and
what do I need to know :)?.
Thanks,
Will
> From: Will Senn
> anything similar to modern behavior when handling the delete/backspace
> key where the character is deleted from the input and rubbed out? The
> default, like in v6/v7 for erase and kill is # and @. I can live with
> this, if I can't get it to do the rubout, because at least you can see
> the # in the input
I use ASCII 'backspace' (^H) on my V6, and it 'sort of' works; it doesn't
erase the deleted character on the screen, but if one then types corrected
characters, they overlay the deleted ones, leaving the corrected input. That
should work on everything later than V6.
The MIT PWB1 tty handler (link in a prior message) not only supported a 'kill
line' (we generally used '^U') which actually visibly deleted the old line
contents (on screen terminals, of course; on printing terminals you're
stuck), it also had suppport for '^R' (re-type line) and some other stuff.
Noel
Did svr2 have anything similar to modern behavior when handling the
delete/backspace key where the character is deleted from the input and
rubbed out? The default, like in v6/v7 for erase and kill is # and @. I
can live with this, if I can't get it to do the rubout, because at least
you can see the # in the input, but if I can figure out how to get it to
rubout the last character, I'd map erase to DEL, which I believe to be
^U (but since it's invisible, it's confusing when it doesn't rubout).
Will
All,
Are there any bootable media available for any SVR 2 systems available
online? Or are they all under IP lock and key? If so, what's the closest
system that is available to get a feel for that variety of OS?
Happy holidays, folks.
Will
Hi all, I received an e-mail looking for the ksh-88 source code. A quick
search for it on-line doesn't reveal it. Does anybody have a copy?
Cheers, Warren
Original e-mail:
I recently built a PiDP11 and have been enjoying going back in time
to 2.11BSD.. I was at UC Davis in the the early 1980's and we had
a few PDP-11/70's running 2.8/2.9 BSD. Back then we reached out to
David Korn and he sent us the source for KSH -- this would have been
in 1985ish if I remember, and we compiled it for 2.9 & 4.1BSD, Xenix,
and some other variants that used K&R C. It may have been what was
later called ksh88. I wish I still had the files from then..
I was wondering if you might know if there's an older version like this
or one that's been ported for 2.11BSD?
Many thanks,
Joe
Hey Warren,
First and foremost; Thank you so much for maintaining this mailing list, and for including me within the subscribers list. I find myself intrigued by some of the topics that transfer over to the “COFF” mailing list. Could you include me on that mailing list as well?
Peace.
Thomas Paulsen:
bash is clearly more advanced. ksh is retro computing.
====
Shell wars are, in the end, no more interesting than editor wars.
I use bash on Linux systems because it's the least-poorly
supported of the Bourne-family shells, besides which bash
is there by default. Ksh isn't.
I use ksh on OpenBSD systems because it's the least-poorly
supported of the Bourne-family shells, besides which kh
is there by default. Bash isn't.
I don't actually care for most of the extra crap in either
of those shells. I don't want my shell to do line editing
or auto-completion, and I find the csh-derived history
mechanisms more annoying than useful so I turn them off
too. To my mind, the Research 10/e sh had it about right,
including the simple way functions were exported and the
whatis built-in that told you whether something was a
variable or a shell function or an external executable,
and printed the first two in forms easily edited on the
screen and re-used.
Terminal programs that don't let you easily edit input
or output from the screen and re-send it, and programs
that abet them by spouting gratuitous ANSI control
sequences: now THAT's what I call retro-computing.
Probably further discussion of any of this belongs in
COFF.
Norman Wilson
Toronto ON
John Cowan:
Unfortunately, approximately nobody except you has access to
[the 10/e sh] man page. Can you post or email it?
===
I am happy to remind you that you're a few years out of date:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V10/man/man1/sh.1
Norman Wilson
Toronto ON
So a number of Unix luminaries were photographed as part of the "Faces of
Open Source" project. I have to admit, the photos themselves are quite
good: https://www.facesofopensource.com/collect/
It seems that the photographer is now selling NFTs based on those photos,
which is...a thing.
- Dan C.
> From: Paul Ruizendaal
> Does anyone remember, was this a real life bug back in 6th edition
The 'V6' at MIT (actually, PWB1) never had an issue, but then again,
its TTY driver (here:
http://ana-3.lcs.mit.edu/~jnc/tech/unix/mit/dmr/tty.c
if anyone wants to see it) was heavily re-written. But from the below,
it's almost certainlynothing to do with the TTY code...
> From: Dave Plonka
> one experiment we did was to redirection the bas(1)ic program's output
> to a file and what we found was that (a) characters would still
> sometimes be lost
Good test.
If you all want to chase this down (I can lend V6 expertise, if needed), I'd
say the first step is to work out whether it's the application, or the
system, losing the characters. To do that, I'd put a little bit of code in
write() to store a copy of data sent through that in a circular buffer, along
with tagging it with the writing process, etc.
Once you figure out where it's getting lost, then you can move on to
how/why.
> From: Clem Cole
> First Sixth Edition does not have support for either the 11/23
Yeah, but it's super-trivial to add /23 support to V6:
http://gunkies.org/wiki/Running_UNIX_V6_on_an_-11/23
The only places where change is needed (no LKS register, no switch register,
and support for more than 256KB of main memory - and that one one can get by
without), it's hard to see how they could cause this problem.
> One other thought, I'm pretty sure that Noel's V6+ system from MIT can
> support a 23
No, we never ran than on a /23 BITD (no need, no mass storage); and I have
yet to bring the V6+ system up (although I have all the bits, and intend to,
at some point, to get its TCP/IP running). I've been using stock (well,
hacked a bit, in a number of ways - e.g. 8-bit serial line output) V6.
Noel
I am making some slow progress on the topic of Tom Reiser’s 32V with virtual memory.
Two more names popped up of folks who worked with his virtual memory code base at Bell Labs / USG in the early 80’s: Robert (Bob) Baron and Jim McCormick. Bob Barron was later working on Mach at CMU.
If anybody on this list has contact suggestions for these two folks, please send a private message.
Paul
> While doing some end of year retrocomputing revisiting, I thought some
> of you might enjoy this - there is hope for the next generation(s)! ;)
> https://www.youtube.com/watch?v=_Zyng5Ob-e8 <https://www.youtube.com/watch?v=_Zyng5Ob-e8>
Thanks for that video link!
I noticed the bit at the end about V6 and the occasional dropped character and that this was not a serial line issue. I have the same issue in my V6 port to the TI-990 and always assumed that it was a bug I introduced myself when hacking the tty driver.
Does anyone remember, was this a real life bug back in 6th edition back in the 1970’s? Maybe only showing at higher baud rates?
Paul
> there was a commercial package called Spag i which claimed to un-spagatti-ify your code which i always wanted but, could never afford.
You needed struct(1) in v7. It did precisely that, converting Fortran
to Ratfor. Amazingly (to me, anyway) it embodied a theorem: a Fortran
program has a canonical form. People found the converted code to be
easier to understand--even when they had written the original code
themselves.
Doug
hi,
having supported Pafec and then in a different job flow3d, i was most interested in anything that could make large fortran packages more manageable.
there was a commercial package called Spag i which claimed to un-spagatti-ify your code which i always wanted but, could never afford.
the best i managed was sed and awk scripts to split huge fortran files into one file per function and build a makefile. this at least made rebuilds quicker.
i do not miss maintaining fortran code hacked by dozens of people over many decades.
-Steve
Hi folks!
While doing some end of year retrocomputing revisiting, I thought some
of you might enjoy this - there is hope for the next generation(s)! ;)
https://www.youtube.com/watch?v=_Zyng5Ob-e8
In this video I share my personal pick for "best" demo at VCF
Midwest: Gavin's PDP 11/23 running UNIX Version 6! We write and run a
simple BASIC program in Ken Thompson's bas(1), finding some quirks
with this (currently) entirely floppy-based system, possible having to
do with a glitch in disk I/O. (We discovered bas(1) uses a temporary
file as backing store.)
Filmed at the Vintage Computer Festival Midwest: VCF Midwest 16,
September 11, 2021
http://vcfmw.org/
Here's the source code to the simple program we wrote; you can also
run it on modern machines if you install a Research UNIX version using
SimH (pdp-11 simulator).
5 goto 30
10 for col = 1 arg(1)
12 prompt " "
14 next
20 print "Welcome to VCF Midwest!"
25 return
30 for x = 0 55
40 10(x)
50 next
60 for x = _56 _1
70 10(_x)
80 next
--
dave(a)plonka.us http://www.cs.wisc.edu/~plonka/
Hi TUHS folks!
After having reincarnated ratfor, I am wondering about Stuart Feldman's
efl (extended fortran language). It was a real compiler that let you
define structs, and generated more or less readable Fortran code.
I have the impression that it was pretty cool, but that it just didn't
catch on. So:
- Did anyone here ever use it personally?
- Is my impression that it didn't catch on correct? Or am I ignorant?
Thoughts etc. welcome. :-)
Thanks,
Arnold
Spurred on by Bryan, I thought I should properly introduce myself:
I am a fairly young Unix devotee, having gotten my start with System V on a Wang word processing system (believe it or not, they made one!), at my mother’s office, in the late 1980s. My first personal system, which ran SLS Linux, came about in 1992.
I am a member of the Vintage Computing Federation, and have given talks and made exhibits on Unix history at VCF’s museum, in Wall, New Jersey. I have also had the pleasure to show Brian Kernighan and Ken Thompson, who are two of my computing heroes, my exhibit on the origins of BSD Unix on the Intel 386. I learned C from Brian’s book, as probably did many others here.
I have spent my entire professional career supporting Unix, in some form or another. I started with SunOS at the National Institutes of Health, in Bethesda, Maryland, and moved on to Solaris, HP-UX, SCO, and finally Linux. I worked for AT&T, in Virginia, in the early 2000s, but there were few vestiges of Unix present, other than some 3b1 and 3b2 monitors and keyboards.
I current work for Red Hat, in Tyson’s Corner, Virginia, as a principal sales engineer, where I spend most of my time teaching and presenting at conferences, both in person and virtual.
Thank you to everyone here who created the tools that have enabled my career and love of computing!
- Alexander Jacocks