Shims (implementations of built-in functionality missing from your current interpreter) are a mature concept in JS. I love that there are even standards now, setting expectations for how to plug them in: https://github.com/es-shims/es-shim-api
(An incomplete, best-effort shim is a "sham"!)
miniblog.
Related Posts
I'm trying mini projects to exercise my new programming language and find gaps.
So far I've done fizzbuzz, JSON parsing, and a crude scheme interpreter.
Any ideas for additional projects? They need to be well scoped because I keep finding e.g. stdlib crashes.
I'm implementing an interpreter, and wondering how often I should check for interruptions (e.g. Ctrl-C).
I don't want to spend too much CPU time checking whether I've been interrupted, but I also want slow programs to stop promptly. It's tricky.
I've been experimenting with an 'evaluate up to cursor' mode for my PL project.
I love evaluating self-contained snippets in Lisp, this generalises the idea.
The interpreter remembers the arguments when you run tests, then can re-use them when you say 'eval up to here'.
What do you think?