{ datagubbe }


datagubbe.se » on complex simplicity and simple complexity

On Complex Simplicity and Simple Complexity

We all want the system we can't have.

Summer 2024

Good Ideas From Outer Space

Plan 9 was a research operating system from Bell Labs, developed by the same gang of merry pranksters that brought us Unix. Today, it lives on mostly as a fringe hobbyist project in the form of 9front, which I'll use interchangeably in this text (Mostly in the hope of angering someone on the Internet).

A meme describing the bland appearance of Plan 9
Image stolen from 9front.org.

In many ways, Plan 9 is a crude system. In some ways, it's elegant. The desktop, for lack of a better word, rivals even the most esoteric of tiling window managers in simplistic featurelessness. Text scrolling behaves very differently from mainstream systems. Basic keyboard navigation and shortcuts either don't exist, or behave very differently from other systems. There are no real GUI elements; to make a "button" in the acme text editor, you simply type a command - such as "New" - anywhere in the editor window, and click it with a specific mouse button. Voilà - you've now created a new editing buffer! Other editing actions can be performed by for example marking text and then clicking a number of different mouse buttons in sequence.

The entire workflow depends heavily on this type of mouse acrobatics, a concept called chording. I personally find this kind of rodent abuse extremely cumbersome (there are no keyboard equivalents), but I shouldn't digress into a critique of the Plan 9 UI. The basic idea Plan 9 (and acme) implements through chording is very powerful, especially combined with plumbing - a fitting name for what can best be described as Unix pipes on heavy stimulants.

The Plan 9 plumber examines text strings according to a set of user defined rules. Actions triggered by these rules can, for example, launch an image viewer, text editor, web browser, rc script or any other program depending on the contents of the supplied string. Plumbing can be triggered from anywhere, with any text selection, using the mouse. It can also be invoked from the command line.

Although Plan 9 relies heavily on its command line, it also does away with traditional terminal emulators. For good or ill, it's unburdened by cursor addressing and ANSI escape codes. The entire scrollback buffer is editable, and can be used to repeat and modify previous commands in a way that should feel familiar to users of the Commodore 64. It's otherwise welcoming to Unix aficionados: awk, sed, grep - they're all there. The shell supplied with the system, called rc, is not completely unlike the Bourne shell.

Clearly, the Unix heritage runs deep in Plan 9. Consequently, so does the Unix philosophy. Everything - quite literally everything - is a file. Even the contents of a particular buffer in the acme editor is a file - that can, of course, be cat:ed and echo:ed to. Using webfs, any URL can be treated as a set of files - a fact utilized by both the basic, ancient web browser Mothra and the more recent port of Netsurf. The same goes for the git9 port of git, where each commit is described by a set of files in a directory structure.

Plan 9 development mostly takes place in C, but the 9front developers have rewritten many of the original C programs in rc - such as hget, an approximation of wget. Another example of rc scripting is ircrc, an IRC client. It's not exactly mIRC - heck, it's not even ircII - but it does get the job done.

Complex Simplicity

Getting the job done seems to be a core tenet among 9front developers. Things are polished, but in that highly esoteric, hackerish and hackable way only other hackers might appreciate. The system is superficially bland, offering the novice user nothing but a completely gray screen after booting. Code is simple and to the point. Tools are typically small, generically modular and rarely offer features beyond the strictly necessary. It's the Unix philosophy in its purest implementation yet: provide building blocks that do one thing well, and the myriad end results will be greater than the sum of their parts.

This goes for Unix as well, but while Unix has grown uncontrollably for decades, Plan 9 - though it's dialled the philosophy up to eleven - remains pristine. As such, the userland is little more than a toolbox, albeit a very powerful one. The IRC client mentioned above clocks in at 250 lines of perfectly readable shell script.

This approach can be described as complex simplicity: The complexity and abstraction lacking in the default environment has, in many aspects, been shifted onto the user. A completely customized system can be constructed both on the fly, as in turning text into makeshift GUI buttons - and more permanently, as various scripts and plumbing actions. Considering the system design and the tools supplied, I dare say the user is not just expected, but required to gradually amass a set of personalized glue programs suitable for their own particular workflow.

This requires not only skill, patience and ingenuity, but also a very rigid system: the complexity of heavy customization is dependent on an extremely stable userland. Changing a single, simple detail somewhere could break toolchains that have been perfected for years.

A tinkering developer, comfortable with writing and maintaining code, will thrive in such an environment. For someone who wants to do a bit of spreadsheets or word processing, it might be a threshold too high for comfort.

Simple Complexity

On the other end of the spectrum, we find something like Windows. It's not that Windows is impossible to customize, but it's clearly not one of the core aspects of its intended end user experience. Instead, Microsoft's focus is on providing a set of catch-all defaults acceptable to most casual users. Thus, Windows is a complete system from the start, offering a wide variety of beginner friendly programs and a workflow based around a traditional desktop metaphor.

This philosophy has now been taken to extremes. Over time, many options for customization have been removed and others hidden. Advanced automation is absolutely possible, but it's accessible only through tools and features most end users will probably never see: they're not part of the regular workflow, as opposed to rc and plumbing in Plan 9. Programs are, by and large, not expected to shuffle data around between small tools. Instead they behave like islands, offering exhaustive feature sets rather than modularity.

This isn't necessarily wrong. When treating a computer as a business appliance, few want to be bogged down by curious command line incantations or having to learn programming. Thus, the user is secluded from the internal workings of the system and dissuaded from exploring and exploiting them to suit their needs. This is simple complexity - a highly advanced system hiding behind a facade of shiny icons and animated windows.

The worst of both worlds

There are good and bad aspects of both philosophies. Doing one thing well is easy enough on a system mostly used for experimenting with programming. It's a bit harder to pinpoint what "one thing" means when it comes to desktop publishing, video editing and modern web browsing. That's alright, though: Plan 9 is neither designed nor required for the type of day to day computing most people do.

Windows, on the other hand, is - but it's also rather stifling in its inflexible conformity. Those of us who want a little bit of both are constantly hunting for a middle ground. Most, like me, probably end up with Linux.

Sadly, Linux (like macOS) is flawed in both aspects. The Unix userland is there, in all its tinker-friendly glory. That's fine, as long as you keep to the command line - but it stops there. A bit of fun can be had with programs like xclip, but it's a far cry from, say, Firefox exposing loaded pages to the file system or being able to perform an arbitrary action based on a text selection anywhere, in any program. While you can set up something approximating plumbing, it's not an integrated part of the core system.

Glen and Glenda

Thanks to better driver support and the prevalence of web apps, Linux can now do most things that previously required Windows. At the same time, it lacks the natural fluency of an all-Microsoft system, making the whole experience feel a bit off.

It's not that I dislike Linux. I use it every day, and what it does offer makes it infinitely more endurable to me than recent versions of Windows. I just think it would be nice if there was a system that offered the software support and GUI fluency of Windows, while enforcing strict rules to keep everything that's clever, tinker-friendly and powerful in Plan 9.

In short, I want a system with simply complex applications interfacing with a complexly simple user environment - sort of what ARexx was well on its way to accomplishing on the Amiga.

I think this is one cake we should be able to both have and eat.