Friday, May 22, 2009

A slightly better operating system philosophy than UNIX

Please note that this is a conceptual joke.

In the spirit of ideas like this, I'd like to outline an entirely new operating system philosophy.

It's based on the following concepts:

  • Everything is an email. All user data, and peripherals are accessible only through POP3 and SMTP daemons built into the operating system, sorted in different accounts depending on their tasks.

  • No program has any particular task it does very well, but all of them can send or receive emails. The latter is in fact a prerequisite to be called a 'program'.

  • When you start a program, it gets an account in the mail system. This is the only means of IPC.

  • The GUI is also managed with emails. It is server based like X11, except it's wrapped in email protocols. A program wanting to change it's title would for example send an email to the GUI server asking for it to do so.

  • The default command line shell is a mail client of user choice. The default is crude, reminiscent of a raw telnet session to an SMTP server, but other options such as mutt, pine or emacs (reduced to it's mail-manipulation capabilities only) are also available.

Example: How to write a Hello World program in C, compile it, and run it.

MAIL: Compose
TO: code@filesystem
TITLE: hello-world.c

#include <mailos.h>

int main(int argc, char* argv[]) {
/* To be a program, it must by definition be able to deal with emails */
mail* mail_create("output");
mprintf(mail, "Hello World!\n");

-- END

MAIL: Compose
TO: process-starter@system
TITLE: compiler

SERVER: filesystem
USER: code

WHAT: hello-world.c
WHERE: compiler@processes

MAIL: Compose
TO: process-starter@system
TITLE: a.out
Hello World!


The possibilities are endless: Spam mail can be used to generate entropy for the random number generator, and system backup could rely on gmail. Clusters could be managed with mailing lists.


  1. What you speak of exists; it's called emacs. Stay tuned for the next iteration which will be called 'Skynet'.

  2. It really is a quite disturbing coincidence that EMACS just happens to be written in LISP, which is like -the- go-to language for artificial intelligence.