December 1, 2026 at 12:00:00 AM UTC
Paintbrush, a language you paint
paintbrushclanguage
Paintbrush is a language whose programs are pictures: each token is a two-colour cell pattern on a square canvas. The commits from 1 December add the compiler, the examples and the conformance matrix in one pass.
- Tokens encode as cell patterns, and an assembler paints and reads programs as text.
- Canvases read and write as square PNGs, and a
paintbrushcommand runs them. - A compiler translates canvases to C11, and reports errors in Paintbrush terms.
- C23 features are added in the compiler: typeof, nullptr, static_assert, alignof and alignas, _Generic, bit-fields, compound literals, inline and noreturn, volatile and restrict, and variadic functions.
- Differential tests compare canvases against equivalent C, and a conformance matrix tracks C99 to C23 parity against existing cases.
- Examples include hello, FizzBuzz, factorial, primes and cat, and a spinning torus (donut) engine.
The repository also has a language reference, a Nix dev shell, and CI on Ubuntu and macOS.
all entries