Cutw
Brainfuck spelled in eight cute letters.
2023 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Cutw is brainfuck with each of the eight commands swapped for a letter the specification calls cute. The letters are j, i, w, t, u, c, n and m, and every other character is skipped. The specification gives its own interpreter in JavaScript, and this implementation runs programs the way that interpreter does.
The machine
| Letter | Brainfuck | Does |
|---|---|---|
j | > | Move the pointer right |
i | < | Move the pointer left |
n | + | Add 1 to the cell |
m | - | Take 1 from the cell |
w | , | Read a character into the cell, 0 at the end of input |
t | . | Print the cell as a character |
u | [ | Jump past the matching c if the cell is 0 |
c | ] | Jump back to the matching u if the cell is not 0 |
The tape has 1,000,000 cells that wrap from 255 to 0. Moving off either end of it is an error.
Example
The first program puts 8 in the first cell and adds 13 to the second cell 8 times, which makes 104, an h.
The first program puts 8 in the first cell and adds 13 to the second cell 8 times, which makes 104, an h. One more n makes 105, an i. The specification calls the second program a cat, but it copies just one character.
Patterns it teaches
- Turing tarpit: brainfuck under another alphabet.
Further
See also
Cutw builds on Brainfuck.
Brainfuck equivalents
Write your own in Run Convert a program from Cutw
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: cutw.
Command line
shib run cutw -e 'wt' --input 'x'shib manual cutwSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/cutw.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org