All languages

Glam languageexperimental

A high-level language for composing assembly-level software: an untyped, lazy lambda calculus whose modules are mixins, whose assembly steps are effects, and whose builds are reproducible.

Overview

Glam is a high-level language for composing assembly-level software: a lazy, untyped lambda calculus whose modules are mixins and whose instructions are written as effects. It exists so binaries and filesystem images can be described reproducibly, extensibly, and with metaprogramming over layout.

Code

language g0

n = 42                  # decimal
r = 1/6                 # exact rational, never rounded
flag = 'ready           # atom
text = "Hello, World!"  # raw text, no escapes

sum = n + 1             # 43
Three ideas meet here: values are exact and lazy, names resolve through hierarchical dictionaries that objects override, and machine instructions are plain effects — so do blocks are assembly and asm.result is the output. Shapes follow the project's cheat sheet and samples.

Distinctive traits

  • Untyped and lazy: the assembly is a pure lambda-calculus value, so evaluation is demand-driven and unused modules are never forced.
  • Modules are mixins in one namespace object; every definition is exported and can be overridden (:=) or updated in place (::=).
  • Assembly instructions are effects written with do-notation, so procedures act as assembly macros and targets live in libraries.
  • Pattern matching is a branching effect: match commits to the first complete success, match* returns every result as a lazy list.
  • Interaction nets are the escape hatch: interaction_net builds an opaque graph behind a lambda interface, and anno attaches reflection without changing values.
  • Reproducibility is designed in: imports are content-addressed and reflection cannot influence the pure asm.result.

Status

An experimental bootstrap: the glam assembler is written in Rust under GPL-3.0 and pins its toolchain. Documentation separates intended design from implemented behavior, and no tagged releases exist yet.

Sources & references