4 ms·
> Sixth-edition Unix, released in 1975, was the first widely used version of the operating system. It included a number of other core Unix concepts, including t
by jamesfinlayson 5y ago
> Sixth-edition Unix, released in 1975, was the first widely used version of the operating system. It included a number of other core Unix concepts, including the hierarchical filesystem, devices represented as files, a programmable shell, regular expressions, and more. All of this was implemented in about 9,000 lines of C code.
Probably old news but fascinating all the same - clearly it was a simpler time.
- userbinator 5y agoThis was before OOP and "overabstraction" really took off and distorted our perception of how much code is actually necessary to accomplish something. It's important to remember that Kernighan and the others who worked on it at the time weren't really "code-golfing"; this was just their normal "code density".
- deleted 5y ago[deleted]
- mjevans 5y agoThe article quotes the model of the first (rather than 0th) edition system as a PDP-11/20; which the architecture page on Wikipedia says: "So originally, a fully expanded PDP-11 had 28K words, or 56 kbytes in modern terms." 28K instructions / data ops for the 'OS' and all guest programs, with 4K words (also 16 bit) of memory mapped IO / device registers. It's clear the entire system would have been constructed in what today might be thought of as a 'Minimum Viable Product' format. Powerful functions and operations, but focused on a very narrow tolerance for inputs. The intelligence of even 'dumb' terminals makes a ton of sense and this gives me a greater perspective of the relative power required for early laser printers (rasterizing vector graphics on the fly) in the 80s.
- jdougan 5y agoMore importantly, thay had no major back compatibility requirements, a small amount of hardware to write drivers for, and fairly simple algorithmic choices would work. ("When in doubt, use brute force" -- Ken Thompson).
- jamesfinlayson 5y agoAnd no need to worry about the Internet (as we know it) or cybersecurity.
- jdougan 5y agoExactly. A large chunk of their security needs were taken care of by locking the server and terminal rooms.
- xenadu02 5y agoI mean... original UNIX was multi-process but single-thread. It time shared by swapping the current process out to disk entirely and swapping in the next runnable task. When you get to ignore concurrency that makes life simpler but I don't think you'd enjoy using a system designed that way today. And that's just one part of what most of us consider a "minimal" OS today yet was absent in UNIX originally. I guess this is the coding equivalent of 1950s Nuclear Family nostalgia? Pining for something you'd hate if you had to suffer under it, idealizing the past, and ignoring how and why we got to modern times (the past sucked in a lot of ways).
- userbinator 5y agoYou might want to look up Xv6. Very similar to the original V6 kernel, just as compact, but runs on standard x86 PCs, and also supports SMP. There's a few articles on HN about it.
- mpweiher 5y agoSure you got the right culprit here? The Alto ran a full-fledged mouse-driven GUI, IDE + programming language with rich class library, E-Mail, text-processing in 64KB memory (128KB RAM, half of that for the screen) and 2.5MB disk.
- pjmlp 5y agoAnd safe systems programming languages on top of that.
- zibzab 5y agoI don't find the SerenityOS - where kernel and user-land is all C++ - really that "overabstracted".
- ComodoHacker 5y agoThey were actually "code-squeezing", and that was normal, because computing power was really scarse those days.
- pletnes 5y agoPeople keep doing it to this day on embedded systems.
- jandrese 5y agoIt is also because the code didn't include much error handling or documentation. Everybody can remember their first experience with the editor 'ed'. Nor did it handle complex things like non-English characters or smart terminals. The system was minimal in the extreme because the hardware they were working on was shockingly underpowered by today's standards. A full lab worth of users would be sharing 56kB of RAM on their PDP11. When your environment is that constrained you don't have the luxury of writing bloated code.
- geocrasher 5y agoIsn't it amazing to think that the Sixth edition of Unix was 2.3% the size of a base Wordpress install.
- derekp7 5y agoI just checked the line count of a simple tar implementation I'm working on, and so far it is around 4K lines and I'm not even finished yet.