diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-19 16:31:46 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-11-19 16:31:46 -0500 |
| commit | 6b92ce62a59b7324c6b7da0f4469b55cf64b1d7b (patch) | |
| tree | 13a3a7c6a13c381503124a0ed0dc44ff5342150e /implementation | |
| parent | 87691594710f5c6213388641ce51b30e7e486299 (diff) | |
Update documentation on calling formatter (f.bqn)
Diffstat (limited to 'implementation')
| -rw-r--r-- | implementation/vm.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/implementation/vm.md b/implementation/vm.md index e03887e5..462625f1 100644 --- a/implementation/vm.md +++ b/implementation/vm.md @@ -239,7 +239,7 @@ The following steps give a working BQN system, assuming a working VM and core ru * Evaluate the bytecode `$ src/cjs.bqn r`, passing the core runtime `provide` in the constants array. The result is a BQN list of a full runtime, and a function `SetPrims`. * Optionally, call `SetPrims` on a two-element list `⟨Decompose, PrimInd⟩`. * Evaluate the bytecode `$ src/cjs.bqn c`, which uses primitives from the runtime in its constants array. This is the compiler. -* Evaluate the bytecode `$ src/cjs.bqn f`. This returns a 1-modifier. To obtain the formatter, call it on a four-element operand list `⟨Type, Decompose, Glyph, FmtNum⟩`. +* Evaluate the bytecode `$ src/cjs.bqn f`. This returns a function. Then call it on a four-element list `⟨Type, Decompose, Glyph, FmtNum⟩` to obtain the two-element list `⟨•Fmt, •Repr⟩`. The compiler takes the runtime as `𝕨` and source code as `𝕩`. To evaluate BQN source code, convert it into a BQN string (rank-1 array of characters), pass this string and runtime to the compiler, and evaluate the result as bytecode. Results can be formatted with the formatter for use in a REPL, or used from the implementation language. |
