esolang
Languages · Families100 languages

Self-modifying

100 languages in the esolangs.org category Self-modifying, by group.

Turing tarpits

Subleq

A computer with one instruction: subtract, and jump if the result is zero or less. No opcodes, just numbers in threes.

1988●●○runnable

BitBitJump

One instruction that does not even compute: copy one bit, then jump. Every if is made by copying a bit into a jump address.

2009●●●runnable

Aubergine

Four instructions, four variables and one constant. The program is its own memory.

2008●●○runnable

Self-modifying Brainfuck

brainfuck whose program sits on its own tape, so writing a cell rewrites the code that runs next.

2006runnable

Subskin

One instruction, subtract and skip if negative, and a whole interpreter in 148 bytes of Ruby.

2005●●○runnable

Extended Brainfuck Type I

Brainfuck with one spare byte, bit shifts, logic and a stop command.

●○○runnable

Bauberqueue

A queue for every integer, and the program is what the first few queues hold at the start.

2017●●●runnable

Purple

Every instruction is three letters and does one subtraction. The program lives in the memory it changes.

2015●●●runnable

Self-modifying Brainfuck#

Brainfuck whose tape starts with its own source code, and whose data pointer starts on the first character of it.

2023●●○runnable

Silberjoder

Self-modifying Brainfuck and Aubergine merged into one language, so that every program in either still runs.

2016●●●runnable

OISC:2bis

Every instruction is two memory addresses. Their signs decide what the instruction is, and a decimal point makes one indirect.

2022●●●runnable

AddSubJump

One instruction. It adds or subtracts, depending on a fourth cell, and always jumps.

●●●runnable

Brian & Chuck

Two brainfuck-like programs, where each one's source code is the other one's memory.

2015●●●runnable

Selt

There are no variables. To keep a number, a program writes it into its own text, after a label.

2022●●○runnable

SMITHb

The program and the stack are one list, eaten at the front and grown at the back.

●●●runnable

UberGenes

Aubergine with the restrictions taken off. Where the program stops, it prints itself.

2015●●●runnable

Circlefuck

Brainfuck on a ring of bytes that starts out as the program. Code and data share every cell.

2012●●○runnable

dual tape

Two instructions. One turns a dial of seventeen rules, the other runs whatever the dial points at.

2021●●●runnable

dual tape ez

The easy one. Every cell holds a letter for what it does and a number to do it with.

2021●●○runnable

Quiney

A brainfuck whose tape is its own source code, so printing the tape prints the program.

2014●●○runnable

S₅

Eight words, every one a form of "set", over ordered sets of sets.

2026●●●runnable

Agony

Brainfuck whose program is loaded into its own memory, four bits per instruction.

2013●●●runnable

Bitflipper

Five instructions on a row of bits, and below bit 0 lies the program itself.

2022●●○runnable

Braille

Programs are written in Unicode braille. Each symbol is a byte, and its left column of dots says what to do.

2014●●○runnable

Byte-based Instruction Jumping

Every byte is eight instructions at once, one per bit, and the program rewrites itself as it runs.

2022●●●runnable

COPYCAT

One instruction. It copies a byte, and the program counter is just another byte to copy into.

2026●●●runnable

Intcode

A machine language that grew one puzzle at a time, in Advent of Code 2019.

2019●●○runnable

LAIN

No if statement. A program decides by working out which line to jump to, and rewrites its own lines as it goes.

2022●●○runnable

Mimsy

Assembly with one Hand, where a jump finds its target by counting semicolons at run time.

●●●runnable

Self-modifying Turing machine

The states, the current state, the data pointer, the input and the output all live on one tape of bits.

2020●●●runnable

SMISC

The program is the memory. Four instructions move its own lines around, and it halts only once it has wiped them out.

2026●●○runnable

Erase

Five commands, and the only memory is the program's own text.

2025●●○runnable

SwapLoad

One instruction. Swap the pointer with what it points at, then load a constant there.

2025●○○runnable

Tarflex

A tarpit of counters and jumps that can rewrite its own program while it runs.

2012●●○runnable

Functional and concatenative

Emmental

A language with no loops and no conditionals, only an instruction that rewrites the interpreter. Every loop you write is the interpreter changing itself.

2007●●●runnable

Smurf

No loops, no jumps, no numbers. To repeat anything, a Smurf program writes a new program and hands over control for good.

2001●●●runnable

StaPLe

The program is a stack too, and any stack can become the program.

2014●●●runnable

GASOIL

The program is a stack too. Every instruction is popped off it and gone, so a loop has to put itself back.

2009●●○runnable

Mutating Stack Machine

The program is the stack. Code is eaten from the bottom while data piles up on top.

2013●●●runnable

STXTRM

One stack holds the program and the data. Code is eaten from the bottom while results pile up on top.

2013●●●runnable

?index.php

A stack of strings that wants to be a shell, a script and a markdown page at once. It loops by appending itself to itself.

2026●●○runnable

ForWhile

One loop that counts down, so every program stops, unless it writes more of itself.

2023●●●runnable

Lazy Bird

Unlambda with the whole aviary of To Mock a Mockingbird, and lambdas you may write by hand.

2008●●●runnable

Functoid

Befunge's grid with lambda calculus inside. There is no stack; the whole state is one lambda term, and every command applies the term to something.

2018●●●runnable

Xihcute

A stack machine in 256 bytes, where the program reads its own text as data.

2014●●○runnable

Rewriting

Spatial (2D and up)

Befunge

Code on a grid. The instruction pointer walks in four directions, wraps at the edges, and can rewrite the grid it walks on.

1993●●○runnable

Befunge-96 and Funge-97 (MTFI)

The drafts between Befunge-93 and Funge-98, from one line up to seven dimensions, with a stack that can be worked from the bottom.

1993●●●runnable

Fish (><>)

A fish swims through a 2D codebox, bouncing off mirrors, carrying a stack of stacks. One wrong move and something smells fishy.

2009●●○runnable

Befunge-98

Befunge without walls. The grid never ends, a program can hold a stack of stacks, and one instruction splits the pointer in two.

1998●●●runnable

Unefunge and Trefunge

Befunge’s commands on a line (Unefunge) and in three dimensions (Trefunge), from the Funge-98 family.

1998runnable

Unefunge-98 and Trefunge-98

Funge-98 on a line and in a cube. The same instructions as Befunge-98, with one direction pair fewer or one more.

1998●●●runnable

Argh!

A Befunge where the letter case says which way to look: uppercase reads the cell above, lowercase the cell below.

2004●●○runnable

"*><> (Starfish)"

><> with functions, a way to swim past code without running it, and a fisherman who pulls the fish down a line and back.

2016●●○runnable

Beeswax

Bees crawl over a hexagonal honeycomb, each carrying a stack of three numbers.

2015●●●runnable

Left-Right March

One line of cells, a pointer that marches both ways, and every command reads the two digits in front of it.

2021●●○runnable

Shove

A 2D language that never overwrites code. It shoves strings in, and the rest of the row slides out of the way.

2008●●●runnable

Backhand

A one-line program read three cells at a time, bouncing back and forth off its ends like a ball.

2018●●○runnable

Befalse

FALSE's stack, Befunge's grid and SNUSP's mirrors and calls, glued together without a single letter.

2005●●○runnable

Blockfunge

Befunge cut into boxes. Each box is a function, and an arrow points at it from its name.

2019●●○runnable

BooleanFunge

A fungeoid where every turn leaves a boolean on the stack.

2023●●●runnable

Flobnar

Befunge turned functional. Nothing moves; every cell is an expression that asks its neighbours for values.

2011●●●runnable

Klein

A 2D language that runs on a surface of your choosing: a torus, a Klein bottle, a projective plane.

2017●●○runnable

Lost

The pointer starts on a random cell, moving in a random direction. A program has to find it and lead it home.

2017●●●runnable

Reversible-2D

Threads crawl over a grid and trade values with it. Every step is meant to run backwards as well as forwards.

2010●●○runnable

DominoScript

A program is a table of dominoes. The dots are the code, and the way the pieces lie is the control flow.

2024●●●runnable

Versert

What happens to Befunge when you take away its stack? Two registers and a pointer into the code are left.

2005●●○runnable

Swap

A grid of stack commands where every command, once it has run, turns into its opposite.

2009●●●runnable

Hostile

Camouflage

Strange time

Jokes

Artificial life