Clone me on GitHub

mIX

The mini system, running in this page

IX · The machine · What to try · Its speed · How it is in a page · t-IX, the tiny system

Each program of IX comes in two sizes. The mini ones, m-IX, are the faithful ones: Plan 9's programs written again in OCaml. Below, they run on a Raspberry Pi 1 that is itself one of them: mini-qemu, the emulator, compiled to JavaScript, boots mini-9pi, Plan 9's kernel in OCaml, from its SD card, with the shell, the utilities, the window system, the editors and the games on it. Everything on the board is IX's own code, compiled for ARM by its own compilers.

This is an early version: it takes some twenty seconds to the shell's prompt, after 16 MB fetched, and the board is a slow one, of ten to twenty million instructions a second. The tiny system's page, t-IX, starts at once.


The machine


The machine needs JavaScript.

What to try

The board has two ways in, as a real one has. Its serial line is the text under the screen: just type, wherever the mouse is, and the keys go there. Its screen has a keyboard and a mouse: click the screen, and a blue frame says the keys are the screen's (a click outside it gives them back to the serial line). The mouse on the screen is the board's, with its three buttons; its cursor is your browser's, in the shape the kernel gives it. The kernel prints its boot on both, then the shell's prompt, %.

Its speed

The line under the text says two numbers. The first is the ARM instructions the board ran in the last second: under a million when it waits, ten to twenty when a game runs; a real Pi 1 runs some hundreds. The second is the board's clock against yours. The board counts its time in instructions, and the page sets how many make a second by what your browser is measured to run: the clock then keeps yours, and a faster browser is a faster board. What is written to the card is kept in memory, and lost with the page.

Three things make it fast enough to use, each apart from the simple emulator, which is still what runs in a terminal:

After this page's address, to see what each is worth (several with & between them):

MiniQemuWeb.ml's first comment has them all.

How it is in a page

js_of_ocaml compiles them to 200 KB of JavaScript. The page fetches that, the kernel's image (2.3 MB compressed) and the card's (13 MB compressed, 128 MB on the board): no server runs anything. On the board, mini-9pi is the kernel, and the card's programs are IX's (the README has them all, a line each).

From a checkout, ./mini-pi -g mini-9pi runs the same kernel and card under mini-qemu in a window of your own machine, far faster, and ./mini-pi -g -q mini-9pi under QEMU.


Back to IX