A geometric esoteric language interpreter.
Project description
Geobe
Geobe is a geometric esoteric programming language interpreter written in Python. Programs are 2D grids of Unicode symbols where arrows control flow and shapes carry semantics.
Overview
Geobe programs are rectangular text grids. The interpreter finds every ○
source node and follows directional flow through the grid until a path ends.
The current MVP supports a single deterministic memory cell, input buffering,
output collection, and pluggable △ transforms.
Core symbols:
○read the next input value□store the current value in memory△transform the current value▲change/delta transform the current value▽append the current value to output◀append the current value to output▶traverse the current array by one index▶▶continue the current array loop, or finish when exhausted→,←,↑,↓move execution through the grid«... »read a literal string into the current valuespell ...decode triangle alphabet symbols into lowercase text output
Spaces are treated as empty cells for traversal. Other non-traversable characters stop a path.
Installation
The project targets Python 3.11+.
#cd into project root:
python3 -m pip install .
Running Programs
Run a .geo file:
geobe examples/input_store_transform_output.geo --input hello
Run inline source:
geobe --code "○→▽" --input hello
Run a literal string program:
geobe --code "«hello, Geobe!»→▽"
Read additional input values from standard input:
printf 'first\nsecond\n' | geobe --code "○→▽\n○→▽" --stdin-input
Start the interactive spelling console:
geobe --console
In console mode, lowercase letters are echoed as Geobe's mapped alphabet
symbols. Pressing Enter prints the English equivalent of the current line.
For example, typing hello! displays ▹▶▿▿◂!, then Enter prints hello!.
Trace execution as JSON:
geobe --code "○→□→▽" --input hello --trace
Trace execution in readable text:
geobe --code "○→□→▽" --input hello --trace --trace-format text
Running the package module directly executes the built-in demo program:
python3 -m geobe
Example Program
examples/input_store_transform_output.geo
○→□→△→▽
With input hello, the program stores the value, applies the default identity
transform, and outputs hello.
Array loop:
○→▶→◀→▶▶
With Python input [1, 2, 3], the program traverses the array and outputs
[1, 2, 3].
Spelled text:
spell ▹▶▿▿◂ ◮◂ ◣▿▵!
This decodes to hello world! and outputs it.
Python code can also encode English into the triangle alphabet:
from geobe.parser import encode_spell_text
encoded = encode_spell_text("Hello world!")
Custom Transforms
The △ symbol is backed by a transform registry. The default transform is
identity, and you can register your own behavior in Python code.
See examples/custom_transform.py for a minimal example that returns a custom
formatted value.
Development
Run the test suite:
pytest
Run linting and type checks:
ruff check .
mypy src tests
Project Layout
src/geobe/interpreter, parser, runtime state, and CLIexamples/documented sample programstests/coverage for the CLI, parser, interpreter, and examples
Package Entry Points
geobeCLI:geobe.cli:main- Module entry point:
python3 -m geobe
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geobe-0.1.0.tar.gz.
File metadata
- Download URL: geobe-0.1.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c22bd1d224d5c273a3625b535b33024c990b9abd94c9976793f2f15c1fb4a66
|
|
| MD5 |
8bfadf357bd145c137d9f4884406e5d1
|
|
| BLAKE2b-256 |
09c82a7dab9b273d91888bcb3400180540271bd07a73d2c9484ad9ba6768be09
|
File details
Details for the file geobe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geobe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6db142072f1dd08b16ac4199d1ff95ae1573a90f44645300cd778baa01773f3
|
|
| MD5 |
7842ac4a4c8a294baf25e80d90307317
|
|
| BLAKE2b-256 |
56411dea0842c9fddc9840242ff8595df47b59bd79808da6aa3f3303cf3b7673
|