XCODX |

COW Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  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.
Success
Operation completed

About COW

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.

Hello World in COW

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.

When to use COW

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.

Common questions

Is COW just Brainfuck with different spelling?

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.

How do loops work in COW?

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.

Can COW programs read user input?

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.

How COW runs on XCODX

Sandbox filename
main.cow
Entry point
single main source file
Editor grammar
plain text — no highlighter ships for this language
Reading stdin
Moo
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO