8 ms·
Unix Edition Zero (1971)
- mbucc 4y agoDraft Unix manual written by Dennis Ritchie circa 1971---at a time when Unix had been running for a "few months" on the PDP-11.
- PeterWhittaker 4y agoI love reading this. It feels perfectly familiar.
- garaetjjte 4y agoCuriously, it describes create instead of creat.
- nishanths 4y agoand ken in the go source tree in 2009: > spell it with an "e" https://go.googlesource.com/go/+/c90d392ce3d3203e0c32b3f98d1e68c4c2b4c49b%5E%21/#F0 https://go.googlesource.com/go/+/c90d392ce3d3203e0c32b3f98d1...
- colejohnson66 4y agoTangent: I've yet to find what I'd deem a "definitive" answer on why the 'e' was dropped. Sure, Ken said it was his biggest mistake, but every answer on why it's missing just point to the quote from him. I've seen suggestions related to a possible six-character limit (from Radix50 - "50" being octal for 64), but "creat" is only five. And being a mistake, why was it never fixed early on?
- userbinator 4y agoAnd being a mistake, why was it never fixed early on? Maybe because it became part of the jargon and served a useful purpose --- if you mention creat, it's certain you're talking about the system call and not creation in general. Personally, I like names which are close enough to an existing concept to be evocative of the meaning, but also distinct enough that, just like "byte" vs "bite" and "nybble" vs "nibble", a (non-stupid) search engine can give relevant results.
- topaz0 4y ago> 50 being octal for 64 Looks like 40 to me... 64 would be 100.
- yencabulator 4y agoI was going based on the theory of "5 characters plus leading underscore hits linker 6-character limit", but then this document talks about a system call named "execute". If "execute" was really called "exec" in the source, then none of the syscall names I saw are longer than "creat".
- colejohnson66 4y agoExcept in this document, it's actually documented as "create" (with an 'e')
- yencabulator 4y agoMaybe this document predates (discovery of) the linker limitation? My understanding is that the linker didn't really limit the identifier length, it's just that only 6 characters were used to match them. So, shortening names create->create, execute->exec might have come afterward, as a clean up round to make it less surprising.
- colejohnson66 4y agoThat would make sense, but it's still speculation. Preferably, we'd be able to get a definitive answer from Mr. Thompson himself.
- blondin 4y agothis is great. i realized that manuals and documentation might have used a lot of paper back then. the new PDF that was typeset using troff is half the length of the original!
- whydoyoucare 4y agoI find reading the scan of the manual more pleasant and nostalgic than the troff version! Haha.
- dboreham 4y agoI don't think so. It's exactly the same as the original (give or take fonts). The original you see is a daisywheel printed version, so much less dense. If someone had output the doc on a phototypesetter way back then, it would have looked much the same as the "new PDF". fwiw the main point of developing Unix was to facilitate this kind of "room-top publishing".
- Lammy 4y agoTIL PDP-11 UNIX had an eight-character file/directory name limit https://retrocomputing.stackexchange.com/questions/23917/origin-of-the-8-3-file-names-scheme https://retrocomputing.stackexchange.com/questions/23917/ori...
- kragen 4y agoin 6th edition it was already 14 https://github.com/memnoth/unix-v6/blob/master/sys/ken/nami.c#L74 https://github.com/memnoth/unix-v6/blob/master/sys/ken/nami.... https://github.com/memnoth/unix-v6/blob/master/sys/param.h#L66 https://github.com/memnoth/unix-v6/blob/master/sys/param.h#L... i guess this 'edition zero' is from 01971, and 6th edition is 01975
- rahen 4y agoTo be pedantic, V0 actually refers to the PDP-7 UNIX released in 1969. 1971 saw the port to the PDP-11/20, which was released as UNIX-11 and soon after, V1 UNIX.
- implements 4y agoPDP-11 running RSTS/E had 6.3 filenames, and iirc no sub-directories (each user account (grouped by project) was a single directory). Remembering what “EDS023.DAT” was for could be a headache on large projects.
- kragen 4y agoseems extremely similar to modern unixes, though of course it's only a small subset main differences seem to be - filenames were only 8 bytes instead of 14 or 255 - devices were in the root directory instead of /dev: /ppt, /bppt, /rppt, /tty, /ctty, /tty1, /tty2, /rtty, /tap0, /tap1 (magtapes), /disk (the disk), and /system (the kernel memory) - there were no groups, just six permission bits (u+r, u+w, o+r, o+w, a+x, and u+s) - creat is spelled with an e (and evidently you couldn't open() nonexistent files) - instead of lseek you only have seek, with a different argument order and presumably only able to handle offsets of up to 64KiB (less of a problem on a "256K word disk", which is presumably 524288 bytes, according to the note on p. 12 that a 64-word block was 128 bytes), which explains the name of lseek - correspondingly, there were no doubly indirect blocks and so the maximum file size actually was 64 KiB - the tty really was a tty, no video terminals! - "i-number" and "i-node" had hyphens, and the "i" stood for "identification" - the shell prompt was "@", and there was no control flow or pipes in the shell; it's not mentioned but I think that around this time there was a `goto` command which would seek standard input until it found the specified label before returning control to the shell. i/o redirection did exist, and so did argument quoting - `cd` was spelled `chdir` even in the shell, and was the only shell builtin - correspondingly, no standard error yet; the famous phototypesetter error printout had not yet happened because there were no pipes - no shell wildcards - no PATH, because no /usr/bin yet (they hadn't bought the /usr disk yet) - no -o flag; `as` always wrote its output to `a.out` and you had to `mv` it if that wasn't what you wanted - `fork()` returned to a different location in the child process, instead of returning a status value and making you test the return value. this would have saved me great embarrassment at my first sysadmin intern position when i accidentally wrote a fork bomb (by getting the test backwards) and ran it on the departmental nfs server - no `execve`, just `execle` (called `execute`) - no `waitpid()`, `wait3()`, etc., just `wait()` - no `select()` or sockets of course, nor any of the other bsd niceties - traps weren't handleable, so there was no SIGINT yet, just SIGQUIT, with the same ^\ keystroke it has today (but no way to attach a signal handler to it); no concept of tty process group (or indeed process groups at all) so ^\ could kill a random background job. but there was an `intr` system call to disable these breaks (presumably so you didn't kill the shell) - no C yet, just B, but evidently the B compiler was already generating native code instead of stack bytecode as it had a few months before. consequently the system calls are documented in terms of machine registers and assembly instructions - no `rename()` system call; `mv` linked and then unlinked the file - no environment variables - `time()` was still provided in sixtieths of a second since "the start of the current year" (so at the time the Unix epoch was the beginning of 01971, not the beginning of 01970) and was 32 bits (the AC and MQ registers) - symbol tables were written to a separate `n.out` file - no `ptrace()` and so no live debugging support (except for the kernel!), just inspecting core files - `tar` is called `tap` and cannot put its archives in files other than actual physical magtapes sadly page a7 is missing from the scan
- philosopher1234 4y agocat-v is such a website. i love it. nothing like it these days
- pjmlp 4y agoDive into Inferno and Limbo documentation, discover where Go roots originated, what Go still misses, and the ideas of an Android like OS with managed userspace.
- mindcrime 4y agoVery happy to find this: http://fortunes.cat-v.org/ http://fortunes.cat-v.org/ I was looking for a source of good stuff to import into my Bugzilla "quips" database, and a lot of these UNIX'y "fortune" entries would make great grist for that mill.
- slim 4y agoit looks like this unix had B programming language (C was still not invented)
- deleted 4y ago[deleted]
- aap_ 4y agoYou can run the PDP-7 version and an early slightly frankenstein'ed PDP-11 version in simh: https://github.com/DoctorWkt/pdp7-unix https://github.com/DoctorWkt/pdp7-unix https://github.com/DoctorWkt/unix-jun72 https://github.com/DoctorWkt/unix-jun72
- dang 4y agoDiscussed at the time (of the McIlroy email): Newly discovered earliest draft of a Unix manual (1971) - https://news.ycombinator.com/item?id=10794189 https://news.ycombinator.com/item?id=10794189 - Dec 2015 (40 comments) The Unix Time-Sharing System, unpublished draft (1971) [pdf] - https://news.ycombinator.com/item?id=10660727 https://news.ycombinator.com/item?id=10660727 - Dec 2015 (1 comment)
- septune 4y agoAmazing stuff, amazing job. Most of what’s written here is still relevant. It’s hard to concieve that all the unixies here are the rock-solid bases of current UNIXes