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.
Urban Müller wrote Brainfuck in 1993 while trying to build the smallest possible compiler for the Amiga, and its eight commands have defined the Turing tarpit genre ever since. The language exposes nothing but a tape of memory cells, a data pointer, and single-character instructions for moving, incrementing, looping, and byte I/O. It is the canonical first stop on the Esolang wiki, a fixture on Anarchy Golf and Code Golf Stack Exchange, and the ancestor of countless derivative languages. Running it on XCODX means a real terminal rather than a static output box: the comma instruction blocks on stdin, and you type your input live while the tape program is executing.
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
How it works: nested loops seed a few tape cells with useful starting values near the ASCII letter ranges; the pointer then walks from cell to cell nudging each value slightly before printing so every character of the greeting costs only a handful of instructions!
Brainfuck remains a rite of passage for esolang explorers and a live category on Anarchy Golf, where shaving single instructions off a solution is the whole sport. It is widely used in CS teaching to demonstrate Turing completeness from almost nothing, and writing a Brainfuck interpreter is itself a classic exercise. Golfers also study cell-value arithmetic here before tackling constant-generation problems in other tarpit languages.
Yes, given an unbounded tape. The combination of increment, decrement, pointer movement, and the conditional loop bracket pair is enough to simulate any Turing machine, which has been formally shown via translations from other complete models. Practical interpreters use finite tapes, commonly 30,000 cells, which is ample for real programs including compilers and interpreters written in Brainfuck itself.
The comma command reads one byte from stdin into the current cell. Implementations differ on end-of-file behavior, typically storing 0, storing 255, or leaving the cell unchanged, so golfers check which convention an interpreter uses. In the XCODX terminal the read is genuinely interactive: execution pauses at the comma until you type a character.
Because reaching a value like 72 with bare plus signs costs 72 instructions. A loop acts as multiplication, so a counter of 8 that adds 9 to a neighbor builds 72 in far fewer commands. Golfed programs set up several cells at once inside one loop, then make small adjustments per character, which is why competitive hello worlds hover around one hundred instructions.
main.bftext/x-brainfuck,++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.