Built-in realizations and context wrappers, as data.
A realization renders one intent in one language. It declares every capability its text relies on, and the solver admits it only when the profile holds evidence that each one is :yes.
A wrapper is a context emitter: it turns a program in an inner language into a program in an outer one (sh running python3 -c, python running sh -c, ...). Wrappers build context stacks, both for automatic delegation and for an explicitly requested stack.
:render receives an env whose (:lit env) is (fn [lang s] candidates) and returns a lazy seq of candidates (see grammar.candidate).
Built-in realizations and context wrappers, as data. A realization renders one intent in one language. It declares every capability its text relies on, and the solver admits it only when the profile holds evidence that each one is :yes. A wrapper is a context emitter: it turns a program in an inner language into a program in an outer one (sh running python3 -c, python running sh -c, ...). Wrappers build context stacks, both for automatic delegation and for an explicitly requested stack. :render receives an env whose (:lit env) is (fn [lang s] candidates) and returns a lazy seq of candidates (see grammar.candidate).
(bin-cap program)Capability: exec finds program as an executable file on PATH (what python's subprocess needs).
Capability: exec finds program as an executable file on PATH (what python's subprocess needs).
(cmd-cap program)Capability: the shell resolves program as a command word, builtins and applets included (what an sh simple command needs).
Capability: the shell resolves program as a command word, builtins and applets included (what an sh simple command needs).
(py-bytes e)python expression for the UTF-8 bytes of python str expression e. An argv word handed to subprocess as bytes is never encoded with the locale, so a non-ASCII word survives LC_ALL=C with PYTHONUTF8=0. str.encode() with no argument is UTF-8 whatever the locale, and adds no quote character, so a policy forbidding quotes still admits it.
python expression for the UTF-8 bytes of python str expression e. An argv word handed to subprocess as bytes is never encoded with the locale, so a non-ASCII word survives LC_ALL=C with PYTHONUTF8=0. str.encode() with no argument is UTF-8 whatever the locale, and adds no quote character, so a policy forbidding quotes still admits it.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |