Interactively Run a Technique Procedure
Run a Technique
This release introduces the first preview of a runner that interactively executes a procedure in a Technique document!
When technique run in a terminal, the Technique is walked through step by step, showing you the task to be done and prompting you for the result.
Results are written to disk in the Procedure interchange Format For Transferring Techniques format (PFFTT), which durably records the time of events, the fully qualified path identifying the procedure, section, step, substep, or other scoe, and the result, be it Done, whether it was Skipped, or whether it Failed.
The compiler has been enhanced with two new phases. After "parsing" the document is represented in-memory in an internal abstract syntax tree, but this is suitable for representing the surface language as input by the author. The "translation" phase converts this tree to a series of Operations and ensures names and symbols within the document such as invocations of other procedures resolve. Finally the "linking" phase ensures that all functions to be executed within code blocks are available, ether by built-in pure functions and coercions, or by effectful functions provided by the Library for that domain.
Once fully resolved, the Program tree is passed to the evaluator and a walk of that tree is commenced. Each part of the document is printed to the console in turn, and the user is prompted to record the result. For the common case of just marking a step as "done" the user can just press and the program will continue, prompting with the next step in line.
Runs can be stopped and then later continued using technique resume. There's also a --mode=automatic option to instead run the procedure to completion without prompting, allowing Technique to be used as a scripting language.
- Introduce translation phase by @istathar in #101
- Interactive runner that walks a Technique by @istathar in #103
- Define PFFTT for use in running Technique documents by @istathar in technique-lang/specification#9
- Refactor state store to revised PFFTT format by @istathar in #104
- Implement evaluation of foreach and repeat keywords by @istathar in #106
- Introduce linking phase to compiler by @istathar in #108
- Dynamic user interface by @istathar in #110
- Refine console output by @istathar in #112
- Defer external invocation targets in translation by @istathar in #111
- Fix descent display by @istathar in #113
- Integration test for runner by @istathar in #114
- Improve comprehension for running Techniques by @istathar in #116
Language improvements
Support for lists ([]), placeholder holes (?), and type wildcards (*) have been added to the compiler.
- Unify List and Tablet syntax by @istathar in technique-lang/specification#10
- Add variable holes and type wildcards by @istathar in technique-lang/specification#11
- Define core and sytems builtin functions by @istathar in #109
- Implement Lists of values by @istathar in #107
- Include Spans on internal parser AST objects by @istathar in #100
- Support placeholder holes and prompt for implicit values when needed by @istathar in #115
Ongoing improvements
A number of correctness fixes have been made and the test suite coverage improved throughout this series of work.
- Fix parsing of dependent sub-substeps by @istathar in #99
- Improve recipe and checklist adapters by @istathar in #102
- Specify page size when rendering by @istathar in #105
- Fix duplicate invocations by @istathar in #117
Full Changelog: v0.5.4...v0.6.1