Wednesday, October 31, 2007





I want to tell you about my new hobby. I've started to collect inferno emulators. It's a little like trainspotting where the aim is to "spot" a certain type of emulator compiled to run for a particular platform. You get points for running the emulator yourself and bonus points for building the emulator yourself.

Unlike trainspotting, I've come to think this hobby might not be completely pointless.

So far my collection is not large. I can only claim to have run hosted emu on Plan9, MacOSX, Linux, Solaris, and Nt. Even so, I'm proud of it and would like to add more hosts. Imagine for a moment a collection of emulators that runs on every host, past and present, and with the social organization to port it to all significant future hosts.

Wouldn't such a collection be valuable to others? For example, say you are interested in digital preservation, if you could write a program in limbo to interpret your special file format this collection would reduce the risk of that program one day not being able to execute.

The potentially vast expanse of this collection reminds me of Brian Eno's term "big here, long now." ( The small here is the desktop PC we use today, and the short now is the next few years we'll be using it. Small here, short now thinking is when we only consider our own desktop for its useful life and nothing beyond it. The big here is all available computing platforms, and long now is all computing platforms past and hundreds of years in the future.

Only few applications have the potential for such cross platform collections, usually by virtue of C being their implementation language. C and Perl must be two of the most ported programs. Java maybe. But none of these programs can you download a binary collection for all possible hosts.

There is room here for Inferno to stake the claim for being the most widely ported program including a collection of all binaries in one place.

The cdinstall.iso from contains emus for FreeBSD, Irix, Linux, MacOSX, and Nt.

So should this be sold to application developers to use as platform for long term retrieval of file formats? Probably not. The main concern for digital preservation is to write platform emulators, along the lines of simh, qemu, JPC, and MESS. If these emulators were targeted to run on Dis then Inferno would fill the space as universal emulator.

Ironically, programmers writing for most of the machines emulated by SIMH or the games consoles in MESS were not thinking of portability. Yet now that binary code is runnable in perpetuity by virtue of the fact the computing power has advanced so much that it is not difficult to emulate the original hardware.

The advice for the general developer is just to target any significant, popular, current hardware platform, and eventually it will get emulated and the software will be ported via simulation.

This collection may or may not fill the role of universal emulator, but a substantial collection must exist first as evidence that it has at least that potential. However, this alone is not the reason to do this work, because the act of building the collection, the trainspotting, is enough of an interesting pastime to make such a collection exist.


Friday, October 19, 2007

lab 80 - drawterm plugin


lab 80 - drawterm plugin


This post is to show it is possible to use the inferno IE plugin to drawterm to plan9. All the programs involved are part of standard Inferno.


These are the steps I did to get this running locally. It does need factotum etc, so you need to export a file system with all the pieces you need.

 % listen -vA 'tcp!*!7070' {export '#U/'}

For the net you'd probably do this using an unauth'd readonly kfs, for example. Then you need a drawterm script

  % cat /drawterm

bind -b /n/remote/dis /dis
bind -a /n/remote /
bind /n/remote/lib /lib
mkdir /n/remote/n/9win
bind -a /n/remote/n /n
load std
getlines < /n/remote/factotum  {echo $line} > /mnt/factotum/ctl
bind /n/remote/ndb.local /lib/ndb/local
9cpu -h tcp!fir -r -c 'bind -b /mnt/term/n/9win /dev; bind -a
/mnt/term/dev /dev; exec rio'

And then you need the HTML

width="800" height="600">
<PARAM name="init" value="/dis/sh.dis -c 'mount -A
tcp!!7070 /n/remote;  /n/remote/drawterm ' ">

The next steps would be to use secstore to load factotum instead of using he unencrypted file containing the keys. And you'd also need something to prompt for the name and password.