A blazingly fast interpreter for Brainfuck-like esoteric language with a modern command set.
- Fast: Optimized build (
-O3), optional CPU-specific optimization viamake NATIVE=1 - Modern Syntax: Readable command names (no
>and<, no+and-) - Loop Syntax: Ruby-inspired
repeat N ... endblocks instead of[and] - Execution Pipeline:
- Tokenization
- Parsing
- Multi-pass optimization
- Direct execution of optimized instructions
- Buffered output (4KB)
yascript/
├── src/ # Interpreter implementation
├── include/ # Header files
├── examples/ # Example .ys programs
├── tests/ # Test suite
├── docs/ # Design and optimization documentation
├── Makefile # Build system
└── README.md
- Install:
./install.sh- Uninstall:
./uninstall.shRun inline code:
./yascript -e "repeat 72 add; end; output;"Run from a .ys file:
./yascript hello.ys| Command | Syntax | Description |
|---|---|---|
| Move left | left [N] |
Move pointer N cells left (default 1) |
| Move right | rght [N] |
Move pointer N cells right (default 1) |
| Increment | add [N] |
Add N to current cell (default 1) |
| Decrement | sub [N] |
Subtract N from current cell (default 1) |
| Set value | set N |
Set current cell to N |
| Direct Seek | goto TARGET |
Seek tape pointer directly to cell TARGET |
| Output | output |
Output current cell as ASCII |
| Input | read |
Read one byte to current cell |
| Print number | print |
Output current cell as decimal number |
| Zero cell | zero |
Set current cell to 0 |
| Loop start | repeat N |
Start loop, repeat N times |
| Loop end | end |
End loop block |
- Tape: Unlimited dynamically-expanding tape (zero-initialized)
- Cells: 64-bit unsigned integers (uint64_t)
- Comments:
#and// - Extension:
.ys
./yascript test.ysOutput: A
makeOptional CPU-optimized build:
make NATIVE=1Run tests:
make testInstall:
sudo make installUninstall:
sudo make uninstallThe image ./docs/assets/logo.png was created using generative AI, or the image is AI generated.



