UNIX V4 tape from University of Utah
60 points by lorddimwit
60 points by lorddimwit
Pictures, some video, and commentary on the process of reading the tape: https://discuss.systems/@ricci/115747843169814700
tar file extracted from the analogue waveform: http://squoze.net/UNIX/v4/
notes and links about the v4 tape: https://github.com/thaliaarchi/unix-history/blob/main/users/utah/v4.md
Previously on Lobste.rs: https://lobste.rs/s/l5nsnw/unix_v4_tape_found_at_university_utah
I'm fascinated by what appear to be two home directories full of source code, /usr/sys/dmr/ and /usr/sys/ken/. that is definitely not where they would go on a modern machine.
UNIX was largely written by two chaps: the late Dennis Ritchie (DMR) and Ken Thompson, who is alive and well and was recently interviewed at length.
A Computing Legend Speaks https://computerhistory.org/blog/a-computing-legend-speaks/
UNIX, and everything based on UNIX, was largely a personal spare-time project by two guys who wanted to play a videogame on an old spare computer that was lying around. Even the name is a joke by Brian Kernighan, who co-wrote the manual for the new C programming language they invented: Unix is a double pun on the overcomplicated "Multics" that was their day job, which they castrated and cut down to make something quick and simple: a Eunuch made from Multics.
(By the same token, Linus Torvalds is no egomaniac and called his kernel "Freax". Ari Lemmke renamed it "Linux.")
Unix went through 10 major versions, then was rewritten in a smaller, simpler, cleaner form as Plan 9. Then that was rewritten in a smaller CPU-independent form as Inferno.
Unfortunately several earlier versions escaped the labs, got out into industry and became commercially successful. This is why today modern Unixes such as Linux and FreeBSD are gigabyte-sized monsters which no human could completely read and understand in a single lifetime.
That was not the idea. The plan was a small, simple, hobbyist system that was minimal and could be understood.
oh, sorry, yes, I grew up reading anecdotes about all this back on dmr's homepage. I doubt I'd have recognized it as a username if it weren't already "famous" to me
he was quite a guy. his perspective on computing was really inspiring.
Early unix had the kernel source in /usr/sys and for some reason they partitioned it per author. You can see a similar layout in the 6th edition tho it was rearranged before the 7th edition.
Home directories were typically like /usr/ken – /home was a later innovation.
The files are very, very sparsely commented.
~/src/unix_v4
❯ cloc .
363 text files.
347 unique files.
155 files ignored.
github.com/AlDanial/cloc v 2.06 T=0.25 s (1404.6 files/s, 246968.1 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Assembly 210 2161 2 30647
C 123 2749 966 24054
C/C++ Header 14 28 34 373
-------------------------------------------------------------------------------
SUM: 347 4938 1002 55074
-------------------------------------------------------------------------------
The files are very, very sparsely commented.
On the one hand, they were geniuses; on the other, this was a little skunkworks project.
Geniuses don't need comments. As a classic of hacker lore says:
"Real Programmers don't need comments -- the code is obvious."
It also bears noting that probably the most famous code comment of all time is from a later version of this codebase:
/*
* If the new process paused because it was
* swapped out, set the stack level to the last call
* to savu(u_ssav). This means that the return
* which is executed immediately after the call to aretu
* actually returns from the last routine which did
* the savu.
*
* You are not expected to understand this.
*/
In other words, if there are comments, you can expect them to be unhelpful, because they were probably there as aides memoire rather than to explain anything to anyone.
Unix was a quick hack by 2 geniuses in their spare time so that they could use a spare computer (an extremely rare thing in the 1960s!) to play a videogame one of them had written.
The day job project they were working on became unfairly famous for being a bloated mess of a system that was huge and unwieldy. (In fact, it did get released, was used for years, and is missed by its former users.)
These 2 geniuses wrote something tiny and simple and so almost as a joke they used tiny cryptic abbreviations and very short directory names and things.
However, several times, early versions of it went viral and were adopted by industry and academia.
Now, it has grown into a bloated mess a million times bigger than the OS which inspired it. Those jokey cryptic filenames in cryptic folders are now enshrined as holy writ, and the people maintaining the systems have forgotten their origins.
I am not joking or exaggerating!
For example, in recent years, Linux distros are fighting over something called the usr merge. There is a remnant belief that the difference between /bin and /usr/bin and so on is meaningful and important and matters.
It isn't. It doesn't. /usr meant users -- it was where home directories were kept, and dmr and ken were the original users, so the tools they wrote *were the OS itself.
But they only had 1.5MB hard disks so they kept running out of space. When they got a 2nd or 3rd hard disk they made a new tree called /home for home directories but the stuff in /usr now had other things expecting it to be there so they couldn't remove it or move it. So some of it got moved to another drive.
Rob Landley (author of the Toybox replacement for Bruce Perens's BusyBox, as used in Alpine Linux) wrote an excellent explanation of the history of the split on the Busybox mailing list 15 years ago:
Understanding the bin, sbin, usr/bin , usr/sbin split
I highly recommend it. It's short and clear and pithy.
P.S. Alpine has still not managed the Usr Merge in its latest release. This sort of accidental hack gets fossilised, and then becomes very hard to undo.
Unix was a quick hack by 2 geniuses in their spare time so that they could use a spare computer (an extremely rare thing in the 1960s!) to play a videogame one of them had written.
The day job project they were working on became unfairly famous for being a bloated mess of a system that was huge and unwieldy.
I think the timeline was different: Unix was started after Bell Labs left the Multics project. It was full-time work from the start. The initial research goal was as a proof-of-concept for Ken’s ideas about how to implement a filesystem, it wasn’t frivolous. (SpaceWar was originally a spare time hack on Multics.) https://en.wikipedia.org/wiki/History_of_Unix
Hmmm. OK. That is an interesting perspective, and I confess, I have not closely studied the timeline.
A few years ago I spent some time reading up on the very early history. I met Warner "BSDimp" Losh because he was doing a main-programme talk directly beofre mine at FOSDEM in Brussels, I read about his work, I joined the TUHS mailing list, made a few posts, and so on.
So I have been primed for the recent re-discoveries. I have written about the reconstruction of UNIX V2 on the Register, which of course I am not allowed to post here. I just today had an article on the recovery and running UNIX V4 published, which seems to be doing very well.
What is very striking, of course, is how much is unknown or not clearly documented, and how much of the early code is lost, even thought the original core author is alive and well.
The origins of sbin vs bin are even murkier. I chose to believe in the the "statically linked bootup/rescue binaries" mythos.
It’s murky because it depends on which flavour of unix: different ones adopted sbin for different reasons. Solaris uses sbin for static binaries so they can work early in the boot sequence before /usr/lib is available. BSD adopted sbin in 1990 around the time of the Net/2 release or early 4.4BSD, and there its purpose was admin utilities. /stand was for rescue binaries; everything in /sbin and /bin was statically linked for use during boot. https://svnweb.freebsd.org/csrg/share/man/man7/hier.7?revision=43671&view=markup
And here it is up and running!
https://lobste.rs/s/df96zx/unix_v4_tape_running_simh_pdp11_emu_on_irix