Next: , Previous: , Up: Guile Blocks   [Contents]


1 Introduction

Guile Blocks is an Org Mode inspired implementation of source blocks in Guile Scheme. It provides tooling to embed snippets of arbitrary code into a Guile Scheme program. These snippets can be executed using a variety of languages, and the snippets and any output they generate can be output to various formats.

Guile Blocks aims to be easily extensible to different languages and output formats.

A typical execution pipeline looks like this:

  1. Code is stored in a string
  2. Code is passed to a 1-argument function, called an evaluator
  3. The evaluator provides the code to a subprocess
  4. The subprocess executes the code and returns a result
  5. The code and result are formatted appropriately for the output format
  6. The formatted code and result are stored in a container data structure

Guile Blocks has built-in support for many languages, such as Python, Elixir, Ruby, C, and Guile. This includes languages that aren’t computer programming languages, such as PlantUML, ngspice, and Gnuplot.