How Orchard works: REPL-powered introspection
masterOrchard is designed for building programmer tooling that inspects the state of a running REPL.
Key Mental Model: Unlike static analysis tools that read source code files, Orchard relies primarily on runtime information. This means it can only inspect code that has been loaded and evaluated in the current REPL session.
Design Principles:
- No Runtime Dependencies: Orchard is designed to run alongside your application without introducing dependency collisions.
- API Optimized for Editors: Most functions accept a combination of a namespace and a symbol (e.g.,
nsandname) rather than avar. This allows editors to resolve symbols without needing a direct reference to the var object. - REPL Agnostic: It works with nREPL, socket REPLs, or
prepl.