Runiq is my attempt to tie together a few ideas from Lisp with some features of JavaScript inside an interpreted language. Syntax, flexibility, data-as-code DNA would come from Lisp, while a JS backing could give reach and a big module ecosystem.<p>Runiq more or less does this translation:<p><pre><code> source: (hack (the) (planet!))
ast: ["hack", ["the"], ["planet!"]]
reduce order: "the" "planet!" -> "hack"
</code></pre>
Function tokens map to predefined CPS JavaScript functions:<p><pre><code> "hack": function(a,b,cb){...}, // add numbers
"the": function(cb){...}, // return 1
"planet!": function(cb){...}, // return 2
</code></pre>
Outputs produce new trees that eventually reduce to a value.<p><pre><code> -> ["hack", ["the"], ["planet!"]]
-> ["hack", 1, 2]
-> [3]
-> 3
</code></pre>
Runiq is very much an experiment, and some design decisions I made have trade-offs (speed, for one). But Runiq could still find a niche somewhere between grown-up projects like Clojure(Script) and single-purpose languages like PuzzleScript, both of which I admire.
Cool! Reminds me of <a href="https://github.com/kanaka/miniMAL" rel="nofollow">https://github.com/kanaka/miniMAL</a>