Reviving the 1973 Unix Programmer's Manual
spinellis.gr
spinellis.gr
I guess I should have known, but I had no idea that anyone had written a 50,000-word 300-page manual in ed. It has a bit of a, uh, reputation.
https://www.youtube.com/watch?v=RCCigccBzIU&feature=youtu.be...
> Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
i.e., ?
cat > myfile.txt << EOF
works fine in many situation. Sure, if one can't think straight, makes a lot of typos and errors that cannot be quickly fixed with a simple backspace, needs a lot (and I mean a lot) of complicated refactoring to be done many times over, then sure - ed is not for them. (Also, do not forget ed's close cousin - sed, a "stream editor" that is widely used even today.) cat > myfile.txt
You can terminate input by sending ascii EOT (Ctrl-D). It makes sense once you realize that heredocs are just a way of explicitly setting the contents of stdin. By not using a heredoc, cat opens stdin and writes it through to 'myfile' or wherever until stdin gets closed, which the terminal driver does for us when we send EOT.I suppose it's possible to have a version of cat that offers line-editing, but I'm not aware of one (nor do I think it's a particularly good idea to make one, "unix philosophy" and all that). Slap it into an rlwrap, maybe ;)
Actually, I'm confused on how the kernel knows to associate keyboard input with any particular file at all. If we have several terminals open, then presumably there are several ttys to which keyboard events could eventually propogate to. There's gotta be some way to mark which file a line buffer writes to.
If you're running a graphical environment, it doesn't: the kernel hands the keypress events to X or to Wayland, and they are then responsible for multiplexing them (X uses the focus capabilities in Xlib; I haven't poked around much with Wayland but it must do something similar).
If you're on the console in Linux, there's a set of ioctls[1] that control how the kernel multiplexes virtual terminals. These can be set by the userland utility chvt. (Other Unixes do this differently; e.g. NetBSD and OpenBSD make a wsconsole abstract device with syscalls to associate it with a given TTY.)
1: https://linux.die.net/man/4/console_ioctl (scroll down to VT_ACTIVATE for the relevant parts)
-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs
Yeah, now I want to see he talking about GNU ls and the -h option.From where are you quoting this? I don't see it in TFA.
https://dspinellis.github.io/unix-v4man/v4man.pdf
> This manual was set by a Graphic Systems phototypesetter driven by the troff formatting program operating under the UNIX system. The text of the manual was prepared using the ed text editor.
Understatement of the year, 1973.
I seem to have a personal difficulty imagining the level of sophistication that existed prior my own awareness a particular technology; in the same way that it might sometimes appear that before color photography, the world was black-and-white.
I'm grateful to the technology archaeologist who set the record straight.
I think this is something that happens in our industry specifically - every few years (to me it seems like every 4 years) - we go through these phases of amnesia. I honestly think it has to do with comp-sci grads launching themselves into the industry, and .. rather than catch up on their history, re-invent things that have been standard for decades.
As you get more experience in this industry (in my case, 30+ years worth) you start to see this more and more. Something to do with the cyclomatic complexity of comp-sci history, in my opinion ..
This also has the side effect of stoking my interest in the history of ∗nix and computing in general. It's kind of fun tracing posix arcana, terminal voodoo, or whatever back to it's, often haphazard, historical origins.
The story of why we have /usr/{bin,lib,sbin} etc is somewhat infamous. A cute one is how sed is a portmanteau of 's' and 'ed' from the 's' (substitute) command in ed, and grep is similarly shorthand for the "global" command 'g/RE/p' where RE stands for "regular expression".
Anyway, I ramble.
It's also amusing that we discovered it wasn't a compelling means of user interaction 20-30 years before siri.
Nowadays, I think speech interaction has its place. If we get butler-level AI (where the machine knows what you want without you even telling it what you think you want), it will get away again, but that’s a big if.
Speak turns a stream of words into utterances and outputs them to a voice synthesizer ,or to a specified out-put file.
Nice also to see the permuted index and BUGS sections.
Lastly, wonderfully literate. Finding things like hapax legomena is great.
Logging out.
There are three ways to log out:
1) You can simply hang up the phone.It's amazing how much they got so right in design philosophy. And of course I'm a huge fan of the readability of their documentation. All documentation should be this good.
> When you type to UNIX,a gnome deep in the system is gathering your characters and saving them in a secret place. The characters will not be given to a program until you type a return (or new-line), as described above in Logging in.
The files for the Fourth Edition papers did not survive, only what is what is archived at ftp://minnie.tuhs.org/UnixArchive/Distributions/Research/Dennis_v4/
Look at http://www.tuhs.org/Archive/Distributions/Boot_Images/ for software (you have to look around in the readmes a little). Debian and Ubuntu both have SIMH packages.
Edit: This article (https://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-102/8...) explains how to run some of these old Unices, and the author also builds and uses an IRC client on 2.11BSD. It's written in French, but Google translate does an OK job on it.