Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Welcome to XCODX Online Compiler
Quick Start:
Ctrl+Enter Run code
Ctrl+S Save / Download
Ctrl+L Clear output
Select a language and start coding.
Bovine to its core, COW is a joke esoteric language created by Sean Heber in 2003 that reskins the Brainfuck machine model with twelve instructions, each a three-letter casing variation of the word moo. The tape, pointer, and loop semantics will feel familiar to anyone who has done tarpit programming, but COW adds a register for copy and paste tricks plus dedicated instructions for integer input and output, which its famous Fibonacci demo shows off. Everything that is not one of the twelve commands is ignored. On XCODX the interpreter runs in a true interactive terminal, so the instructions that read integers or characters from stdin actually pause and wait for your keystrokes, no local setup required.
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO OOM
How it works: each of the ten identical instructions adds one to the current memory cell; the final instruction then writes that cell to the screen as the integer 10. Loop instructions let larger COW programs build big values the same way Brainfuck does.
COW is prime material for esolang tourism: it teaches the same tape-machine reasoning as Brainfuck while being funnier to read aloud, which makes it a hit in classroom demos of Turing completeness. Golfers occasionally answer novelty challenges in it, and translating a small Brainfuck program into COW, working out how the extra register changes constant generation, is a satisfying puzzle in its own right.
Mostly, but not exactly. Eight instructions map closely onto Brainfuck's tape movement, arithmetic, loops, and character I/O. COW then adds extras Brainfuck lacks: an instruction that zeroes the current cell, a register that copies a cell value and pastes it back, and dedicated integer read and print instructions, which make numeric programs like the classic Fibonacci example much shorter.
The all-caps MOO instruction ends a loop and its lowercase counterpart begins one, skipping ahead when the current cell is zero. A quirk of the original specification is the search behavior when matching loop commands, which trips up interpreter authors, so writing a compliant COW interpreter has become a small rite of passage on the Esolang wiki.
Yes. One instruction reads a single character into the current cell, and the integer output instruction has a matching input form: when the cell is zero, the character command instead reads from stdin. In the XCODX terminal these reads are live, so execution blocks until you type, exactly as the 2003 interpreter behaved on a local console.
main.cowplain text — no highlighter ships for this languageMooMoO MoO MoO MoO MoO MoO MoO MoO MoO MoO