Eternal Software Initiative

eigenhombre1 pts0 comments

Eternal Software Initiative - Preserving Software for a Thousand Years

An open-source technology stack to preserve today's software in runnable form for 1,000 years. Try it!

Problem

Software Doesn't Last

So much of today's culture - art, science, story, work and play - is<br>represented by or accessed through software. But software is inherently ephemeral.

Cultures of the past can be reconstructed from individual physical artifacts<br>like objects and books, but software depends on a vast ecosystem - operating<br>systems, compilers, frameworks, hardware - that must also be preserved.<br>This ecosystem is complex and fragile, decaying over time, and much of it is proprietary and incompletely<br>documented. Reconstructing<br>the ecosystem in fully functional form in the far future may be impossible.

Without an active effort to preserve our software in usable form, today's culture<br>will largely be invisible to far-future generations.

Clay tablet lifespan<br>5,000+ years<br>and still readable today

Software half-life<br>~10 years<br>before dependencies become obsolete

Without active preservation<br>Zero chance<br>of running today's software in 100 years

Why Emulation Isn't The Solution

One approach is to translate hardware into a software emulator. Projects like QEMU do this for<br>contemporary hardware. However, these emulators are necessarily almost as complex as the hardware<br>they simulate: millions of lines of code, dependent on specific programming languages, libraries,<br>and operating systems. Emulators can preserve hardware for decades, but not centuries.

You can't preserve the complex by wrapping it in more complexity. You have to simplify.

Solution

The Eternal Computer

We started from the simplest possible target: a computer architecture with<br>one instruction - so minimal that someone a thousand years from now<br>could reimplement it without any specialized knowledge of our era's technology.

Then we built a production-grade LLVM compiler backend that compiles standard C and C++<br>programs directly for this target, with no source modifications required. We ported Linux<br>to run natively on the architecture, giving preserved software the full infrastructure<br>it expects: process management, file systems, preemptive multitasking.

Software, OS, and all dependencies get packaged into a single self-contained<br>capsule - a sequence of numbers that encodes an entire software stack.<br>We provide example capsules; with our open-source toolchain<br>(available now on GitHub),<br>anyone can build capsules from their own software.

A reference virtual machine to run capsules is written in C and is less than a page of code.<br>The complete specification is short enough to fit on a napkin, so that someone in the future can<br>build a working VM from scratch in under an hour and revive the software inside a capsule.

Architecture

Subleq+

One instruction: SU btract and B ranch if L ess than or<br>EQ ual to zero.

The entire instruction set is: subleq a, b, c - subtract<br>mem[a] from mem[b]; if the result is ≤ 0,<br>jump to c. That's it.

The + in Subleq+ adds indirect addressing - pointer support that<br>enables re-entrant code. This is what makes it possible to run a full modern operating<br>system with preemptive multitasking, without resorting to self-modifying code.

Despite having only one instruction, Subleq+ can represent any computation: from<br>bitwise operations to full floating-point arithmetic. Implementing the virtual machine<br>requires no knowledge of any specific programming language, OS, or hardware - only<br>the ability to store numbers, subtract, and compare.

The One Instruction

mem[b] = mem[b] - mem[a]<br>if mem[b] ≤ 0 then<br>pc ← c

With I/O:&ensp;b = -1 outputs a character&ensp;·&ensp;a = -1 reads input

Capsules

Preserved Software

A capsule is a sequence of numbers that encodes an entire software stack - OS,<br>libraries, applications - into a single self-contained artifact.<br>Run on any Eternal Computer VM, today or millennia from now.

Eternal Linux

A complete Linux operating system port with C/C++ runtimes, booting to a shell on the Eternal Computer.

vmlinux.bootimage

The numbers in a capsule can be stored in physical<br>form on a durable medium - for example, etched onto a titanium cylinder or<br>inscribed in glass - which will last for millennia without degradation.

Virtual Machine

~30 Lines of Code

The entire Eternal Computer virtual machine, capable of running Linux and all preserved<br>software, fits in around 30 lines of pseudocode - simple enough to write on a napkin.<br>A reference C implementation is available on<br>GitHub,<br>in two versions: text-only console output and framebuffer graphics.

Eternal Computer - Complete Pseudocode

function run_eternal_computer(capsule):<br>mem ← 402,653,184 number slots, all 0<br>pc ← 0<br>timer ← 0

- Load capsule: read numbers into mem -<br>for i from 0 to length(capsule) - 1:<br>element i of mem ← element i of capsule

- Fetch one operand -<br>function fetch:<br>operand ← element pc of mem<br>pc ← pc + 1<br>if operand is odd: return element (operand - 1) ÷ 4...

software from eternal capsule years today

Related Articles