Skip to main content

CMRA — Creative Minimal Recursive Automaton language runtime

Project description

🐉 CMRA Language (Chimera)

"Where code breathes fire and flows like flame..."

CMRA (Chimera) is an esoteric programming language exploring reversible execution and direction control through a dragon-inspired syntax. Programs can soar up or dive down through code at runtime.

🔥 GitHub: TeapotChimera418/cmra
🌐 Playground: cmra-esolang.vercel.app/playground.html
📚 Docs: cmra-esolang.vercel.app
📖 User Guide: GUIDE.md


🙌 Origin

CMRA began as a workshop project I attended by Tushar Sadhwani during a college multifest. The prototype we built is in prototype.py. For a non‑aliased baseline, see Tushar's esolangs repository. You can also read his blog at tush.ar.

This is a tiny side project made for fun and learning. If you build something cool or want to improve the interpreter, feel free to reach out on GitHub (@TeapotChimera418) or Discord gamingchimera.

✨ Try it Online

🔥 Launch the Interactive Playground

Write and run CMRA code directly in your browser — no installation needed. Powered by Pyodide.


⚡ Installation & Quick Start

pip install (recommended)

# Install from PyPI:
pip install cmra

# Or install from source (development):
pip install -e .

# Now use `cmra` and `cmrash` from anywhere inside the venv:
cmra "test cases\test.cmra"
cmrash "test cases\test.cmrash"

No-install PowerShell wrapper

.\cmra.ps1 "test cases\test.cmra"

Run with Python directly

python -m cmra.cli "test cases\test.cmra"
python cmra.py "test cases cmra\test.cmra"          # legacy single-file
python cmra_simplified.py "test cases cmra_simplified\test.cmrasim"

🔱 The Twin Dragons

Dragon Entry point Keywords
🐲 Fire Dragon cmra.py / src/cmra/fire.py bind roar sniff dive soar murmur
🌑 Shadow Dragon cmra_simplified.py / src/cmra/shadow.py = print check reverse ;
🐉 Ancient Wyrm prototype.py Compact baseline, inline sniff only

🐲 Language at a Glance

murmur Fire Dragon — count 0 to 5
i bind 0
flag bind 1
sniff i <= 5 : sniff flag == 0 : dive
flag bind 0
sniff flag == 0 : roar i
sniff flag == 0 : i bind i + 1
flag bind 1
sniff i <= 5 : sniff flag == 1 : soar
  • bind — assign variable
  • roar — print
  • sniff … : action — conditional (inline or block)
  • dive / soar — set execution direction forward / reverse
  • No loop keyword — direction reversal + flag guards make loops

→ See GUIDE.md for the full walkthrough.


⚡ Execution Model

A global DIRECTION (1 or -1) steps through lines. soar reverses it; dive restores forward. When direction goes past the first or last line, the program ends. Block sniff/check enters at the first (forward) or last (reverse) line of the block.


🎮 Test Cases & Projects

# Test cases (pip-installed cmra)
cmra "test cases\test.cmra"
cmra "test cases\test_strings.cmra"
cmra "test cases\test_arith.cmra"

# Projects
cmra projects\calculator.cmra
cmra projects\countdown.cmra
cmra projects\fizzbuzz.cmra
cmra projects\story_adventure.cmra

Test cases live in test cases/ (.cmra) and test cases cmra_simplified/ (.cmrasim).
Projects live in projects/: calculator, countdown, fizzbuzz, story_adventure.


📦 File Inventory

Path Purpose
src/cmra/ Installable Python package
src/cmra/cli.py Entry point for the cmra command
src/cmra/fire.py Fire Dragon interpreter
src/cmra/shadow.py Shadow Dragon interpreter
src/cmra/runner.py Shared dispatch logic
cmra.py Legacy Fire Dragon single-file
cmra_simplified.py Legacy Shadow Dragon single-file
prototype.py Original workshop prototype
cmra.ps1 / cmra.bat No-install launchers
pyproject.toml Package metadata (pip install)
index.html + styles.css Static docs site
playground.html Browser REPL (Pyodide)
GUIDE.md Full user guide
keybind.txt Fire ↔ Shadow keyword cheatsheet
projects/ Showcase programs
test cases/ Regression tests (.cmra)
test cases cmra_simplified/ Regression tests (.cmrasim)

📜 License

CMRA is a learning project. Use freely, learn deeply, code fiercely! 🔥


May your code burn bright and your loops reverse true! 🐉🔥

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmra-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmra-0.1.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file cmra-0.1.0.tar.gz.

File metadata

  • Download URL: cmra-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for cmra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5bbfe6035195b7118ac5eaaeff702bb02fc601771a3c923065c94abdd895d270
MD5 a28aeb35f28a252ca4c1ea07a88eeb3e
BLAKE2b-256 faf88dd73539a8ec0f09a5ea94cad0191d5c977bb06d54a038fc57a7e1529eab

See more details on using hashes here.

File details

Details for the file cmra-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cmra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for cmra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3779a4be051fe023484133871eb19585508956c5a1314590ab823c297f426d99
MD5 67f00e7879f918002f5ee7bcb9c123e7
BLAKE2b-256 054880f90b01b2f7e81963320b76b45b988b3ee35e400253a429f2c091320997

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page