Caca
Every command is a way of saying caca.
Mari, 2024 · Turing complete: unknown · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Mari made Caca on 22 May 2024, after a running joke on a Discord server, and wrote the first interpreter in Scratch. The commands are icaca, icacac, icac, cacaca72 and so on, so a program is a column of near identical words. Scratch's word filter blocked one of them, which is why the test for zero is zecaca?. Every command also has a readable name in nourmaelscript, out, inc, dec, repeat72, with the same meaning.
The machine
A row of integers, one at the start, and one of them selected. The memory is called a stack but works like a tape.
| Caca | Plain | Does |
|---|---|---|
icacac icac icacan | inc dec sq | Add 1, take 1, square |
icaca youcaca | out input | Print as a character, add a number read from input |
cacacaN | repeatN | Run the next line N times |
cacatoN | gotoN | Jump to line N |
nocaca yescaca | prev next | Select the value before or after |
newcaca cacacaca | addnum copy | Add a 0 or a copy at the end |
icaca? nocaca? zecaca? | ifp ifn ifz | Run the next line only if positive, negative, zero |
Example
The hello world program counts up to 72, prints, counts down 3, prints, and so on.
The hello world program counts up to 72, prints, counts down 3, prints, and so on. The letters come out as capitals.
The truth machine. A 0 jumps to line 12, which counts a fresh value up to 48 and prints it once.
Ideas it shows
See also
Cell-based
Write your own in Run Convert a program from Caca
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: caca.
Command line
shib run caca -e 'cacaca67
icacac
icaca
cacaca30
icacac
icaca
cacaca2
icacac
icaca
cacaca2
icac
icaca'shib manual cacaSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/caca.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org