Pebble is a tiny compiled esoteric programming language.
- Python 3
- GCC (or another C compiler)
Create a text file with the extension .peb.
Example: countdown.peb
+++++[.-]
| Command | Description |
|---|---|
| + | Increment x |
| - | Decrement x |
| . | Print x |
| , | Input x |
| [ | Start loop |
| ] | End loop |
The language has one integer variable called x, which starts at 0.
Run:
python pebble.py countdown.peb countdown.cThis converts the Pebble program into C code.
Compile the generated C code:
gcc countdown.c -o countdownWindows:
countdown.exeLinux/macOS:
./countdownSource:
+++++[.-]
Output:
5
4
3
2
1
program.peb
↓
pebble.py
↓
program.c
↓
GCC
↓
executable