Benedictum

March 14, 2026 · View on GitHub

A Latin-themed esoteric programming language.

Benedictum is a Turing-complete esoteric language inspired by Brainfuck, replacing cryptic symbols with Latin commands. Every program is a benediction — a blessing whispered to the machine.

Every word that isn't a command is silently ignored, so your source code can be written as flowing Latin prose with instructions woven in.


CI

Language Reference

Core Commands (v1.0)

CommandLatin MeaningBrainfuckDescription
benegood+Increment the current cell (wraps 255 → 0)
malebadly-Decrement the current cell (wraps 0 → 255)
dexright>Move tape pointer right
sinleft<Move tape pointer left
dicspeak.Output current cell as ASCII character
audilisten,Read one byte from stdin into current cell
orapray[Begin loop — skip to matching amen if cell is 0
amenso be it]End loop — jump back to matching ora if cell is non-zero

Extended Commands (v1.1)

CommandLatin MeaningDescription
luxlightPrint current cell as a decimal number
noxnightPrint a newline character
fatumfateSet current cell to a random value (0–255)
requiemrestHalt the program immediately
sanctusholyZero the current cell (shorthand for [male])
numerusnumberRead a decimal integer from stdin into the current cell

Build

# compile
make

# or manually
gcc -Wall -Wextra -O2 -std=c99 -o benedictum src/benedictum.c

On Windows, make produces benedictum.exe. Requires GCC (e.g. WinLibs) or any C99-compatible compiler.


Usage

benedictum [options] <file.ben>

Options

FlagDescription
--gloriaVerbose mode — dumps the full tape state after every instruction
--lexTokenize only — prints the instruction list and exits (great for debugging)
--versionPrint version and exit
--helpPrint help and exit

Examples

./benedictum benedictum/hello.ben
./benedictum benedictum/dice.ben
./benedictum --gloria benedictum/pax.ben
./benedictum --lex benedictum/fibonacci.ben

Example Programs

All examples live in the benedictum/ directory.

FileDescription
hello.benPrints Hello World!
alphabet.benPrints ABCDEFGHIJKLMNOPQRSTUVWXYZ
countdown.benPrints 9876543210
echo.benReads stdin and echoes it back
pax.benCounts down 9 → 0, one number per line
bottles.benCounts down 10 → 0 (ten bottles of beer)
fibonacci.benPrints the first 14 Fibonacci numbers
oracle.benPrints a random number (uses fatum)
three_fates.benThree random fate dice — Clotho, Lachesis, Atropos
dice.benRolls a fair d6 (uses fatum + mod 6 algorithm)
sanctus.benDemonstrates the sanctus command
domine.benReads a character, prints its ASCII value
numerus.benReads a number and doubles it

How It Works

Benedictum is a tape machine:

  • A tape of 30,000 cells, each holding an unsigned value from 0–255
  • A pointer that starts at cell 0
  • Commands move the pointer, modify cells, perform I/O, or loop

The only control flow is ora/amen loops: if the current cell is zero, ora skips to the matching amen; if non-zero, amen jumps back to the matching ora. This is enough to be Turing-complete.


Comments and Prose

Any text that is not a recognised command is silently ignored. This lets you write flowing prose around your code:

This is a prayer to the machine.
Let us begin with a blessing.

bene bene bene bene bene bene bene bene bene
ora dex bene bene bene bene bene bene bene male amen

The cell has been sanctified. Now speak.

dex dic

⚠️ Gotcha: some common English and Latin words are also Benedictum commands — sin, male, amen, ora, fatum, lux. If these appear in your prose at a word boundary they will be tokenized as instructions. Use --lex to inspect what the tokenizer actually sees.


Converting from Brainfuck

Any Brainfuck program translates directly:

BrainfuckBenedictum
+bene
-male
>dex
<sin
.dic
,audi
[ora
]amen

File Extension

Benedictum source files use the .ben extension.


System Requirements

  • A C99-compatible compiler: GCC, Clang, or MSVC
  • Works on Linux, macOS, and Windows

License

MIT — see LICENSE


Author

BeneGitHub · Portfolio