Implementing scope in an interpreter using shift/reset for delimited continuations: https://blog.moertel.com/posts/2005-09-13-scope-herding-with-delimited-continuations.html
It's arguably overkill for the problem, but it's a well-argued introduction to shift and reset.
miniblog.
Related Posts
Some novel (to me) AI workflows from OpenAI in https://openai.com/index/open-source-codex-orchestration-symphony/
(1) Adding the ability for the LLM to create follow-up tasks in the issue tracker.
(2) Identifying weaknesses in the spec by implementing in several different languages.
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.
The Bitter Lesson: how implementing generic search and scaling compute outperforms custom logic in many situations: