Capitalism in it's current form, known as Late Stage Capitalism, is not sustainable and, as such, it will not be sustained. A drastic change in how our global civilization is structured will soon be necessitated by the failures of our current model. There is a lot to be said about the paths such a collapse might take but it is likely that "Rome will not fall in a day," so to speak.

It is arguable whether we are presently living in the early stages of global collapse. Personally I would say it's obvious that we are, but plenty out there disagree with me.

I think they're wrong. However, we're not here to pontificate on the possibilities; rather, we are here to discuss how computing technology might survive catastrophic failures in physical and procedural infrastructure and government bodies.

The Fallacy of "Human Nature"

Our popular media have instilled in us certain biases when it comes to our perception of basic human inclinations. Our media, whether set in post-collapse settings or not, generally tends to inform us that "Human Nature" is an ugly, selfish, and sociopathic beast that lives within all of us.

Regardless of our inclination to believe we can tell fiction from fantasy, we have all internalized this belief to some degree. It is a useful fiction for the owning class, but it is far from accurate. Anthropological studies for generations have made it pretty clear that during times of disaster, and in times of scarcity, human communities come together to support one another.

There are many scientific refutations of the common philosophical ideology that is known as "The State of Nature," from evidence that barter systems were rarely used outside of niche cases, to demonstrations that anarchist societies have been the norm for most of human history but, again, this is not our topic of discussion today.

This context is important to keep in mind, however, as it drives some common misconceptions about what a modern, high scarcity environment will look like should we see a continued decline in States' ability to address citizen needs.

It is often imagined that a post-collapse society would have little to no access to electricity or electronic technologies. We may think of small clusters of survivors all fending for themselves, with plenty of infighting and cross-community raiding. These are the tropes of fiction, however, and are not likely how a real-world scenario will play out.

While it is certainly possible – probable in some parts of the world – that sectarian violence will occur during or otherwise drive the local collapse, it is unlikely we will simply revert to some kind of stone age.

Electricity is actually relatively simple to produce, and the knowledge on how to do it is well documented. Many Integrated Circuit (IC) designs are simple enough that even a basic fabrication operation with entry level equipment and minimal staff could produce them in useful numbers.

Communities are much more likely to come together effectively in time of crises than they are to turn on one another. This means community projects can lead to continued production and support of many electronic technologies well after we enter a high-scarcity ecosystem; though access to common high-end technologies may become much more limited to specialized experts. The internet itself may become damaged, reducing access in some places, but is very unlikely it will go extinct unless we do.

There is also often an assumption made that computing technology, in particular, will not be useful in a post-collapse society. This assumption really makes no sense when you think about it. Computer development, throughout its history, has been driven by necessity. Communities will still need computing tools for engineering, in particular, as well as physical infrastructure automation and monitoring. Society will not simply abandon these tools because States begin to fail, they were always valuable and will remain so well beyond our lifetimes.

With that context out of the way, let's take a look at one of today's focused efforts to preserve access to computing in even the most dire of collapse scenarios; DuskOS and CollapseOS.

Midnight is Coming

Virgil Dupras is a brilliant computer scientist who sees the ongoing troubles and how they might play out quite clearly. His work lays out several stages of the collapse, and several types of collapse that may occur. He acknowledges that his work will only be useful in certain types of collapse scenarios; for example, it won't really help anyone if humanity literally goes extinct. You can read more about his concerns here.

Virgil's projects, DuskOS and CollapseOS are minimalist, self-hosting, self-bootstrapping operating systems implementing a Forth language interface. CollapseOS is for 8-bit systems, primarily z80, but supports multiple ISAs. DuskOS is for x86 and is intended to run on a modern desktop system. It implements the same, minimal Forth interface.

The primary goal of these projects is to allow post-collapse and high-scarcity communities to effectively program microcontrollers; largely for the purposes of implementing physical or electrical infrastructure components. Imagine a community building a small, hydro-electric dam and having the capacity to measure its production, control the operation of floodgates, and alert on capacity problems. Readers may be surprised to learn that many of these tasks are performed by microcontrollers in even the most advanced of operational environments.

CollapseOS is designed for a world in which high-performance computers are rarely available and difficult to maintain. Where x86 and similar platforms are not able to be manufactured or, if they are, are highly protected by those groups who can manufacture them. Virgil imagines CollapseOS being usable by even the most tech-deprived communities, allowing an operator to bootstrap a system built from scavanged parts on a literal breadboard. It also aims to be implementable on simple 8-bit CPUs, which may be easier for post-collapse societies to fabricate than the common 32-bit and 64-bit standards of today.

Since societal collapse is likely to come in stages, and may find itself recovering if those stages yield adequate changes to the system, DuskOS is here to deal with the first stage of the collapse. This is defined as a period where there are still a plethora of x86 32/64 bit computers available to the masses. Manufacturing is likely to become problematic as scarcity increases, reducing the number of new systems available and increasing their cost. There will, presumably, still be ongoing fabrication of x86 platforms for much of this stage but the majority of new users may need to rely on refurbished or used hardware.

DuskOS is largely intended to serve as a development platform both for itself and for CollapseOS. It gives operators the same forth environment for both, and the ability to rebuild the OS, port it to other platforms, and generate code for multiple microcontroller platforms; with strong support for AVR at present. DuskOS is really meant to be a way to prepare CollapseOS further for generations that may need it.

CollapseOS and DuskOS are designed to be small enough for an individual to understand the entire system. That being said, Forth is a very obtuse language and understanding the tiny codebase takes a tremendous amount of study. Regardless, the entire operating system and all of its documentation can be printed out into a small packet of pages. This is, in fact, how the system is meant to be distributed.

What if We Don't Need It?

Virgil has made it clear that, should the collapse never arrive, or should it not be severe enough to force communities to scavenge ICs from long dead equipment to meet their basic computing needs (a more likely scenario) that CollapseOS is unlikely to ever be needed. It sits in a space where it is simultaneously a tool to safeguard computing for future generations and a throw away project for fun. Virgil works hard on this project, but it is something done exclusively as time and motivation permits by the author and its community.

When CollapseOS is discussed, a lot of focus is placed on these intended use cases and predicted scenarios. I'd like to take some time to talk about its potential as more than just a post-collapse operating environment. The fact of the matter is that it is a very well designed, robustly capable Forth implementation; granting direct access to underlying hardware and giving the user full, low-level access to the system. We'll refrain from digging into DuskOS in this article, as I have not spent much time with yet, so we'll focus on CollapseOS moving forward. To be clear, DuskOS is CollapseOS, but it supports x86 processors. It will present to you the same, exact, inerface but provides a wider variety of device drivers.

A Potent Forth

Why should we choose CollapseOS over some other Forth language? The true brilliance of CollapseOS is that it is self-bootstrapping. The bulk of the system is, itself, written in Forth. An operator needs only to create a set of important core words using native assembly language for a new platform and the system can use those words to bootstrap itself. The design is reminiscint of the original use cases for Forth and it makes the OS extraordinarily portable.

Other common Forth implementations will largely be tied into another operating system and, while they may serve as a capable operating environment, they are not as useful when attempting to bootstrap a running system from cobbled together components of random parts. Even among those Forth implementations that run on bare metal, like CollapseOS, they tend to remain reliant on assumptions about present peripherals, memory maps, and over-all feature expectations from the executing system. They are far more obfuscated when compared to this well documented, GPL3 licensed project, making them more difficult to customize to specific hardware configurations.

Since the intended use-case of CollapseOS is to bootstrap custom computer designs, – generating usable systems from scavenged components – the tools needed to do so are built into the operating system's core toolset. This is a Forth platform that aims to be a fully customizable, multi-platform development environment.

Another key toolset are cross-compilers. Not only does CollapseOS support compiling AVR assembly language programs, and programming AVR Microcontrollers (MCUs) directly, it can build itself for other supported platforms from any supported platform. An operator must customize their CollapseOS build to include supported cross-compilers, but this process is well documented.

Forth language is very obtuse to look upon, and it is extremely confusing until you start using it. Getting the hang of Forth language takes some hands-on practice, and some serious time studying. To make it more difficult, CollapseOS provides a minimum set of words, meaning it lacks many words implemented by ANSI compliant Forth implementations, such as GNU Forth (gforth.) It also implements some words that are unique to it, or changes some common words to save space (for example, to display a numerical value in hex format, we use the '.X' or '.x' word. In gforth we use the 'hex.' word.)

For this reason it is important to study CollapseOSes documentation carefully. The intro, usage, and dictionary documents are key to making progress with the operating environment.

By implementing a set of important Forth words in assembly language, CollapseOS creates enough of a Forth language foundation to implement the bulk of the OS directly in Forth. The astute will notice this means CollapseOS facilitates the creation of "native words" or Forth words that compile and execute machine language binaries.

As a result, while CollapseOS will sometimes run slower as it traces through its own text based dictionary, critical commands or programs that need to take full advantage of the speed of assembly can do so. This means it is typically far more performant than an interpreted language, but still has many of the benefits of one.

Non-Collapse Use Cases

Regardless of the path our future will take as a species, we are already experiencing increased scarcity. Some of this scarcity is artificial – scarcity caused by greedflation or resource hoarding by the owning class – but some of it is a reflection of true scarcity in supply chains. It seems that we will be facing a future of increased scarcity, even if our government bodies and infrastructures remain viable for generations to come.

As stated in The Case for 8-Bit Computing, 8-bit, handheld workstations are of tremendous value. This is particularly true in a high-scarcity environment, where 32-bit and 64-bit tooling may become less common and more expensive to attain. CollapseOS may have been developed as a means to safeguard the future of computing from catastrophic failure, but it remains an extraordinary example of modern, 8-bit design in operating systems and it has much to teach the inquiring computer scientist.

CollapseOS: Safeguarding Computing Against Societal Collapse

MagesGuild by Magus Gaius Mycelius, Jocundus is licensed under CC BY 4.0