A bestiary of single-file implementations of programming languages
my k interpreter[0] is less than 1000 lines of JS. Big compared to many on this list, but still human-scale. Looking back on it I see many opportunities left to simplify.<p>further back, I wrote a compiler for part of the language described in Dijkstra's <i>A Discipline of Programming</i> in a dialect of forth[1].<p>one of my colleagues, Stevan Apter, has a number of interesting toy interpreters on his site[2], particularly concatenative languages.<p>[0] <a href="https://github.com/JohnEarnest/ok/blob/gh-pages/oK.js" rel="nofollow">https://github.com/JohnEarnest/ok/blob/gh-pages/oK.js</a><p>[1] <a href="https://github.com/JohnEarnest/Mako/blob/master/demos/FiDo.fs" rel="nofollow">https://github.com/JohnEarnest/Mako/blob/master/demos/FiDo.f...</a><p>[2] <a href="http://nsl.com" rel="nofollow">http://nsl.com</a>