Tuesday, May 27, 2003

Shiny new icon. Yes, saw Sen to Chihiro no kamikakushi, a.k.a. Spirited Away, this weekend.

Spent my free time this extended weekend doing something entirely too geeky: developing a punchcard-programmed language. Except, well, nobody these days has a punchcard reader, so you put the card on a scanner and it reads the picture file.

The language runs on a Turing VM. Yes, that's right. You get a paper tape (initialised to all zeros or another state dictated by -- you guessed it -- more punchcards). Each instruction reads the value under the "head," and performs an action based on whether the value read was a one or a zero. Each action writes a zero or one, shifts the head left or right, and jumps to a new instruction.

I've even given it a 50's-esque flavour by outputting cryptic errors. E40 means card not found. E41 means card could not be read. And so on. (I'd output messages in EBCDIC rather than ASCII, but that may be going a bit too far...)

You can see the punchcards here (Acrobat format).

No comments: