Skip to content

technique-lang/technique

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Technique

This is the Technique Procedure Language, a programming language for describing procedures in a structured but human-readable form. You can consider it a domain-specific language (DSL) for writing procedures and checklists.

This language design has evolved over a long period, 20+ years, starting with on-paper procedures for systems operations tasks, and then going through different iterations of program and approach. The current version is Technique v1, written in Rust.

The Technique language allows you to write instructions to be read and followed other humans. As a result, Technique doesn't look much like programming code, but it is nevertheless a formally defined specification for writing procedures and clear rules for executing them and recording their outcomes.

Usage

The technique program has three subcommands:

  • check
    Validate the syntax, structure, and types in a Technique document.

  • format
    Format the code in the given Technique document, embellished with ANSI syntax highlighting if run in a terminal.

  • render
    Render the Technique document into a printable PDF. This use the Typst typestting language and so requires the typst compiler be installed and on PATH.

Contents

This repository contains the technique binary, which is the compiler for Technique v1, along with a code formatter, and machinery to render procedures as PDFs. Syntax highlighting is available for Vim, the Zed Editor, Sublime Text, and the Typst typesetter. There's a language server, and an extension for Zed, with VS Code and NeoVim on the way.

Examples

To give a sense of the flavour of the language, here are a small selection of Technique source files rendered to PDFs using the technique render command.

Systems and Operations

One of the original use cases behind this work was wanting to document the procedures used in systems administration and network operations. This example shows a simple list of such tasks:

Recipes

Preparing a meal during the holidays is also a list of tasks, but often more than one person needs to do things concurrently:

Instructions

This from a set of instructions guiding staff of what to do when an incident occurs:

Larger processes

Finally, an example showing using Technique to describe a much larger procedure, in this case the entire process of doing systems engineering on a software project. This pushes the limits of what the language is for, but nevertheless illustrates that Technqiue can be used for very large structures as well as very detailed ones:

Detailed examples can be found in the examples/ and tests/ directories. Documents written in Technique have file extension *.tq.

About

Check, simulate, and run procedures written in the Technique procedures language.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •