Bogo engine, rewritten in Javascript.