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●●○runnableBitBitJump
One instruction that does not even compute: copy one bit, then jump. Every if is made by copying a bit into a jump address.
Aubergine
Four instructions, four variables and one constant. The program is its own memory.
2008●●○runnableSelf-modifying Brainfuck
brainfuck whose program sits on its own tape, so writing a cell rewrites the code that runs next.
2006runnableSubskin
One instruction, subtract and skip if negative, and a whole interpreter in 148 bytes of Ruby.
2005●●○runnableExtended Brainfuck Type I
Brainfuck with one spare byte, bit shifts, logic and a stop command.
●○○runnableBauberqueue
A queue for every integer, and the program is what the first few queues hold at the start.
2017●●●runnablePurple
Every instruction is three letters and does one subtraction. The program lives in the memory it changes.
2015●●●runnableSelf-modifying Brainfuck#
Brainfuck whose tape starts with its own source code, and whose data pointer starts on the first character of it.
2023●●○runnableSilberjoder
Self-modifying Brainfuck and Aubergine merged into one language, so that every program in either still runs.
2016●●●runnableOISC:2bis
Every instruction is two memory addresses. Their signs decide what the instruction is, and a decimal point makes one indirect.
2022●●●runnableAddSubJump
One instruction. It adds or subtracts, depending on a fourth cell, and always jumps.
●●●runnableBrian & Chuck
Two brainfuck-like programs, where each one's source code is the other one's memory.
2015●●●runnableSelt
There are no variables. To keep a number, a program writes it into its own text, after a label.
2022●●○runnableSMITHb
The program and the stack are one list, eaten at the front and grown at the back.
●●●runnableUberGenes
Aubergine with the restrictions taken off. Where the program stops, it prints itself.
2015●●●runnableCirclefuck
Brainfuck on a ring of bytes that starts out as the program. Code and data share every cell.
2012●●○runnabledual tape
Two instructions. One turns a dial of seventeen rules, the other runs whatever the dial points at.
2021●●●runnabledual tape ez
The easy one. Every cell holds a letter for what it does and a number to do it with.
2021●●○runnableQuiney
A brainfuck whose tape is its own source code, so printing the tape prints the program.
2014●●○runnableS₅
Eight words, every one a form of "set", over ordered sets of sets.
2026●●●runnableAgony
Brainfuck whose program is loaded into its own memory, four bits per instruction.
2013●●●runnableBitflipper
Five instructions on a row of bits, and below bit 0 lies the program itself.
2022●●○runnableBraille
Programs are written in Unicode braille. Each symbol is a byte, and its left column of dots says what to do.
2014●●○runnableByte-based Instruction Jumping
Every byte is eight instructions at once, one per bit, and the program rewrites itself as it runs.
2022●●●runnableCOPYCAT
One instruction. It copies a byte, and the program counter is just another byte to copy into.
2026●●●runnableIntcode
A machine language that grew one puzzle at a time, in Advent of Code 2019.
2019●●○runnableLAIN
No if statement. A program decides by working out which line to jump to, and rewrites its own lines as it goes.
2022●●○runnableMimsy
Assembly with one Hand, where a jump finds its target by counting semicolons at run time.
●●●runnableSelf-modifying Turing machine
The states, the current state, the data pointer, the input and the output all live on one tape of bits.
2020●●●runnableSMISC
The program is the memory. Four instructions move its own lines around, and it halts only once it has wiped them out.
2026●●○runnableErase
Five commands, and the only memory is the program's own text.
2025●●○runnableSwapLoad
One instruction. Swap the pointer with what it points at, then load a constant there.
2025●○○runnableTarflex
A tarpit of counters and jumps that can rewrite its own program while it runs.
2012●●○runnableFunctional 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●●●runnableSmurf
No loops, no jumps, no numbers. To repeat anything, a Smurf program writes a new program and hands over control for good.
2001●●●runnableStaPLe
The program is a stack too, and any stack can become the program.
2014●●●runnableGASOIL
The program is a stack too. Every instruction is popped off it and gone, so a loop has to put itself back.
2009●●○runnableMutating Stack Machine
The program is the stack. Code is eaten from the bottom while data piles up on top.
2013●●●runnableSTXTRM
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●●○runnableForWhile
One loop that counts down, so every program stops, unless it writes more of itself.
2023●●●runnableLazy Bird
Unlambda with the whole aviary of To Mock a Mockingbird, and lambdas you may write by hand.
2008●●●runnableFunctoid
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●●●runnableXihcute
A stack machine in 256 bytes, where the program reads its own text as data.
2014●●○runnableRewriting
///
Find-and-replace as a whole language. Each substitution rewrites the rest of the program, so the program edits itself as it runs.
2006●●○runnableItflabtijtslwi
A relative of /// that can also read its input, so its rewriting programs can work on what the user types.
2006runnableYpsilax
The rules are drawn in the same grid they rewrite, so a rule can rewrite another rule.
2001●●●runnableA=B
One line of text, and a list of replacements tried from the top until none fits.
2022●○○runnableNLRNIS
No loops, recursion neither if statements. Only string variables, and a jump back to the start.
2021●○○runnableRandom
The program is its only memory, and every plain character it runs makes it one character longer.
2006●●○runnableDerpScrp
Three strings and five commands. One of the strings is the console, and one is the program.
2019●○○runnableDogless
One string with a marker in it. Each step rewrites the string, and what is left at the end is the output.
●●○runnableFull Stack
The program is a queue of its own bytes, and a small stack language rewrites what is left of it.
2019●●●runnableLines
/// with input. A \| is not a bar but the next character you type.
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●●○runnableBefunge-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●●●runnableFish (><>)
A fish swims through a 2D codebox, bouncing off mirrors, carrying a stack of stacks. One wrong move and something smells fishy.
2009●●○runnableBefunge-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●●●runnableUnefunge and Trefunge
Befunge’s commands on a line (Unefunge) and in three dimensions (Trefunge), from the Funge-98 family.
1998runnableUnefunge-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●●●runnableArgh!
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●●○runnableBeeswax
Bees crawl over a hexagonal honeycomb, each carrying a stack of three numbers.
2015●●●runnableLeft-Right March
One line of cells, a pointer that marches both ways, and every command reads the two digits in front of it.
2021●●○runnableShove
A 2D language that never overwrites code. It shoves strings in, and the rest of the row slides out of the way.
2008●●●runnableBackhand
A one-line program read three cells at a time, bouncing back and forth off its ends like a ball.
2018●●○runnableBefalse
FALSE's stack, Befunge's grid and SNUSP's mirrors and calls, glued together without a single letter.
2005●●○runnableBlockfunge
Befunge cut into boxes. Each box is a function, and an arrow points at it from its name.
2019●●○runnableBooleanFunge
A fungeoid where every turn leaves a boolean on the stack.
2023●●●runnableFlobnar
Befunge turned functional. Nothing moves; every cell is an expression that asks its neighbours for values.
2011●●●runnableKlein
A 2D language that runs on a surface of your choosing: a torus, a Klein bottle, a projective plane.
2017●●○runnableLost
The pointer starts on a random cell, moving in a random direction. A program has to find it and lead it home.
2017●●●runnableReversible-2D
Threads crawl over a grid and trade values with it. Every step is meant to run backwards as well as forwards.
2010●●○runnableDominoScript
A program is a table of dominoes. The dots are the code, and the way the pieces lie is the control flow.
2024●●●runnableVersert
What happens to Befunge when you take away its stack? Two registers and a pointer into the code are left.
2005●●○runnableSwap
A grid of stack commands where every command, once it has run, turns into its opposite.
2009●●●runnableHostile
Malbolge
A ternary machine whose instructions depend on where they sit and encrypt themselves after running. Its first program was found by search, not written.
1998●●●runnableDis
Malbolge with the encryption taken out, which leaves it merely extremely painful.
1998●●●runnableBRB
Brainfuck with 102 commands, where every tape is code, data and the parent of another tape.
2011●●●runnableDaoyu
A bit tape is a tree. You never point at a bit; you halve your view of it and merge it back.
2016●●●runnablePyhton [sic]
A Hello World that is its own output. The program is the text, and running it as code prints it.
2019●●●runnablePit
Meant to make most other esoteric languages look like BASIC. Even a letter goes out one bit at a time.
2012●●●runnableKyu
The script language of an operating system built in Scratch, where printing a computed value means rewriting your own code.
2021●●○runnableCamouflage
Chicken
The only word is "chicken". The number of chickens on a line is the instruction, and the code lives on the same stack as the data.
2013●●○runnablel33t
Brainfuck written in leet speak. Only the digits in each word count.
●●○runnableMeowlang
Every program is a cat talking. The more meows in a row, the higher the number.
●●○runnable23
A program is a column of blank lines. Their lengths are the numbers in memory, and the numbers are the program.
2002●●○runnableMеmоrу
A to-do list that keeps adding "Remember" entries to itself, and prints whatever it forgot.
2024●●●runnableLythnology
Every word is a variable, the commands too. Write DOG IS BLUE and the word DOG means BLUE.
2025●●○runnableStrange time
Forte
LET 9=7, and from then on six times nine is forty-two.
A0A0
Every line is a queue. It gives up one command each time the run passes, and a loop is a line that copies itself.
2013●●●runnableAFTL
Every command destroys itself once it has run, and then the program runs again on what is left.
2015●●●runnableJokes
2 Bits, 1 Byte
A whole computer in one byte. The program is its memory, its memory is four instructions, and the output is the memory.
2021●○○runnable3 Bits, 3 Bytes
A whole computer in 24 bits. The program is the memory, and the memory is three characters.
●●○runnable4 bits, 8 bytes
A whole computer in eight characters, where the program is the memory and the memory is the program.
2023●●○runnable3 pentits, 25 pentytes
A base-5 computer with 25 cells. The program is 25 characters, and those characters are the memory.
2026●●○runnable2 undigits, 121 undigytes
A base-11 computer with seven registers and 121 words. The program is the memory it starts with.
2026●●○runnableArtificial life
Game of Life
Not a language but a universe with two rules. The program is the starting pattern, and it can be a computer, or a machine that copies itself.
1970●○○runnableRedcode (Core War)
Assembly for an arena. Two programs share one circular memory, and each tries to make the other run into a DAT.