Skip to content

Interactively Run a Technique Procedure

Choose a tag to compare

@istathar istathar released this 17 Jun 04:37
v0.6.1

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.

Language improvements

Support for lists ([]), placeholder holes (?), and type wildcards (*) have been added to the compiler.

Ongoing improvements

A number of correctness fixes have been made and the test suite coverage improved throughout this series of work.

Full Changelog: v0.5.4...v0.6.1