Escape the Local Maxima

The current state of the art in computing with our superscalar-pipelined, speculatively-executed, multi-level cached, multi-core cpus using closed-source BIOS running operating systems built upon layers and layers of ancient buggy code written in ancient programmer-hostle languages with its model based on a physical desk and its fetish-like desire to be general purpose while focusing on the the performance of arithmetic rather than human interaction is a local maximum. Indeed, many local maxima. Let us work together to break free of these and invent the future of computing.

Wishes and dreams

I have a dream of one day possessing a set of devices that together I will call “my computer”. This computer will consist of 1. An earpiece that’s always with me, 2. A pocketable all-screen multi-touch device that’s with me most of the time, 3. A novel-sized all-screen multi-touch device, 4. A larger screen with a proxy for the screen that I can use to manipulate it without moving my arm all across the screen, and 5. A series of input devices like a keyboard.

I will be able to continue working on the same task as I switch devices and if I want use multiple devices at the same time. When consuming content, the text, figures, and images will all be presented in a way to optimize comprehension – There will be no place for navigation chrome, share buttons, or advertisements. Updating software will never make the computer feel slower. Caching will happen aggresively to minimize the latency of the network, entire websites will be slurped down opportunistically – Often used references like wikipedia will be kept locally.

It will be trivially easy to write simple applications. I will be able to assign many shades of trust to others’ applications – Trying something out shouldn’t be scary or permanent in any way. I shouldn’t have to rely on the manufacturer’s reputation, all code should be open for inspection, modification, and research. Payment for the development of applications and profit should be obtained by providing services or non-executable digital assets rather than obscured code.

Important systems, such as cryptography and data integrity, should be formally verified.

Existing research and ideas

A (work-in-progress) breakdown of overlapping projects

Attempts to change the way we read and understand programs

Attempts to reinvent the whole computing stack

Attempts to bootstrap a compiler from nothing

Programming Language Inspiration

Observations

Areas of new research

Guido’s Current Project Status

I’ve decided to slice off and focus on a more tractable, more constrained part of the problem for now. Instead of redesigning a cpu and programming language and computer, I’m going to concentrate on improving the pedagogy of some of the best existing ideas.

Motivation/Problems-to-solve: I love Project Oberon. I think that Niklaus Wirth is a genius and it’s a tragedy that his work has been slept on by the current generation of programmers (myself included). But there’s something about his presentation that doesn’t work for me. For one, there’s way too much seperation between prose and code. It seems like the perfect candidate for a Literate Programming treatment. Second, the top-down approach doesn’t work for me. I can’t concentrate on the UI code if I don’t know how the kernel works. Third, I feel like something is missing. The pieces don’t connect in my head and it makes me wonder why. It’s a little hand-wavy for me. Wirth is complete but not precise. Donald Knuth on the other hand is perfectionist in his precision but not complete. MMIX would be an amazing architecture on which to run Oberon. There is so much defined for analysing performance and understand what is really happening inside the computer. He has a massive archive of heavily studied algorithms written in MMIXAL that could be taken advantage of. TeX would be amazing to presentation of the literate program form of Project Oberon and it would be amazing to use as the foundation of the text layout within the OS, along with MetaPost. Also, both Knuth and Wirth are still slaying the dragons of the 1960s when it comes to parsing. Oberon should be re-written with a simple self-hosting Parsing Expression Grammar.

I’m calling my project Knuth × Wirth.

It will be in the form of a book—readable in bed—along with running code. The book will be formated with either WEB, CWEB, or Org Mode, probably the latter. I really want to strive for understandability.

The intent, the whole reason for the existance of this project, is to provide a single comprehensive description of a modern-ish computer from the CPU (an instance of a MMIX pipelined simulator), through the bootstrapping, compiler, operating system, to basic applications for study by new students to computer science and existing software engineers. We can use this as a resource to understand the computers we are currently using or as a base in which to study new computer architectures or ways of programming.

I want it to be an attempt at a realization of Knuth’s Literate Programming goal. I want to make something that is read and studying like literature.

The stack will look as follows:

NewUIusingTeXandMetaPostOberonSystemwritteninOberonEnoughofaCcompilertocompileMMIXWareOberonCompilerwrittenwithPEGSelfhostingPEGwritteninMMIXALMMIXSimulator

My plan is as follows:

  1. Bang my head against the wall until I truly understand how PEGs work. Kragen’s PEG Bootstrap so far has been the best teacher. I think that I finally grok it enough to contiune forth with it.
  2. Write a self-hosting PEG in MMIXAL. The MMIX instruction set is simple enough that I should be able to also generate runnable object code directly without the need for a seperate assembler. I might add a small StoneKnifeForth layer in the bootstrap layer, but only if it’s really needed.
  3. Produce a tiny bootstrapable core in hex that could conceivably hand entered with switches into a computer.
  4. Moving back up the stack, rewrite the Oberon compiler as a PEG. I have a lot of this finished already. It was difficult because the ambiguity of the published grammar didn’t align well with the hand-written recusive descent parser written in Oberon itself.
  5. Get the Oberon system as a whole running on the MMIX simulator.
  6. Rewrite Project Oberon using techniques from literate programming, either by using WEB directly, or by creating something new, in Oberon, that fits in with a modern sensibility like Org Mode Babel.
  7. Write enough of a C compiler with the PEG and Oberon to be able to compile CWEB and MMIXWare. Note that I am going to go for as minimal of a C system as possible.
  8. Publish it as a book, with the copyright set to Public Domain or one of the Creative Commons licenses.