8 releases (5 stable)
Uses new Rust 2024
| 1.1.0 | May 7, 2026 |
|---|---|
| 1.0.3 | May 2, 2026 |
| 1.0.1 | Apr 30, 2026 |
| 0.2.0 | Apr 27, 2026 |
| 0.1.1 | Apr 25, 2026 |
#559 in Command line utilities
54KB
1K
SLoC
brainpurr
description
brainpurr is a Turing complete programming language made entirely of cat noises: meow, mrow, mrp, purr, :3c, >:3, nya and :3. it is based on brainfuck [crate]
you can find some examples of brainpurr code in the examples directory
how it works
the way brainpurr works is that it stores in memory 4 different things:
- the array of instructions (see list below)
- a pointer tracking the current position in the instruction array
- a one dimensional array of 1 byte intergers of unlimited size each being 0 by default (implemented as a vector that grows dynamically as needed)
- a pointer tracking the current position in the one dimensional array
| Name | Instructions |
|---|---|
| meow | increments the pointer by 1 |
| mrow | decrements the pointer by 1 |
| mrp | increments the integer at the index of the pointer by 1 |
| purr | decrements the integer at the index of the pointer by 1 |
| :3c | outputs the byte at the index of the pointer |
| >:3 | replaces the byte at the index of the pointer by a byte input by the user |
| nya | if the current byte is 0 then move to the instruction after the matching :3 instead of going to the next instruction |
| :3 | if the current byte isn't 0 then move to the instruction after the matching nya instead of going to the next instruction |
Dependencies
~0.8–1.4MB
~25K SLoC