Smurf Interpreter

This page contains a Javascript interpreter for the esoteric programming language Smurf. Smurf was designed by Matthew Westcott, who wanted to produce a minimalistic version of the Muriel language. Smurf has no looping commands — instead program must produce copies of themselves and then execute this code. This interpreter gives the same error messages (lyrics from They Might Be Giants songs) as the specification suggests. The original specification does not clearly define the behaviour of the ‘i’ (input) operator — it seems that it should take all user input currently available, and that is the behaviour of this interpreter. An illegal escape code, such as \x, is interpreted as \\x (that is, the interpreter assumes the programmer intended to escape the \ character). The example code below is the quine from the specification.




This article was last edited on 3rd August 2011. The author can be contacted using the form below.
Back to home page
Bookmark with: