The Evaluator¶
The evaluator’s role is to infer some meaning from the reader-supplied lists of lists.
Evaluation is a slight misnomer. The evaluator has a hidden task which confuses and exasperates in equal measure. If a template is identified then the template is expanded and the result is (re-)evaluated. This is problematic because Idio code is going to be run during evaluation. Ducks in a row, people, ducks in a row.
You get used to it! -ish!
If this was an interpreter then as soon as the evaluator has decided that something is, say, a function call then it can immediately invoke the function value with the argument values (having evaluated everything).
Idio, following in the style of LiSP ([Que94]) instead generates code for the virtual machine and then asks the virtual machine to run it.
Ostensibly, that doesn’t sound terribly different but we’re advancing two causes in this approach:
we’ve stopped using variable names (mostly) – although that’s possible for a interpreter too. See LiSP for the details of a fast interpreter.
we’re generating lean and mean byte code
Sort of. Generating byte code at all is a huge leap forward in terms of processing speed.
There are further opportunities in and around the evaluator as well, primarily in the form of optimisation.
Last built at 2024-12-21T07:11:00Z+0000 from 463152b (dev)