March 11, 2011

I am a language

Rewinding the programOne of my secret shames as a computer scientist is that I have never written a programming language. I think that to be a proper computer scientist you have to have written a parser and then used it to implement some more or less silly language. I might get around to it someday, and then I can say "Now I am a *real* computer scientist."

However, thanks to Toby Ord I have achieved the next best thing: I have become a programming language: Anders.

The language specification is interesting, especially this point:

A word of warning. Anders is the only language I know of to feature compile-time nondeterminism. That is, the results of two compilations of the very same source file might differ. Indeed, it might cause an error (or non-termination) one time, but work fine another time. Luckily, Anders is bound by a promise that termination is guaranteed for compiling each prime numbered program. That is, the 2nd, 3rd, 5th, 7th, 11th… programs sent to Anders will either successfully compile, or will at least return an error message of some sort.

The real trick is of course to know what my program counter is. Which actually makes me a stateful compiler language, another weird first.

(This all began as a joke during a session in the FHI sofa where I was building and testing a simulation for a SETI-related problem while interacting with Toby and Nick. I highly recommend this kind of "extreme development" where you develop code for small simulations interactively. It was almost like using the computer as a whiteboard.)

Posted by Anders3 at March 11, 2011 10:05 AM
Comments