esolang

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

Expected: HELLO WORLD

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.

CacaPlainDoes
icacac icac icacaninc dec sqAdd 1, take 1, square
icaca youcacaout inputPrint as a character, add a number read from input
cacacaNrepeatNRun the next line N times
cacatoNgotoNJump to line N
nocaca yescacaprev nextSelect the value before or after
newcaca cacacacaaddnum copyAdd a 0 or a copy at the end
icaca? nocaca? zecaca?ifp ifn ifzRun 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.

Expected: 0

Further

Ideas it shows

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 caca

Source

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