THE FOLD / SPAWN / COLD BOOT / THE QUINE
THE QUINE
a program that prints its own source, exactly
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A quine is a program that takes no input and prints its own source code — exactly, character for character — without cheating by reading its own file. It sounds impossible: to contain a copy of itself, the program would need a copy of the copy, and so on forever.
The escape is to split the program into two parts: a chunk of data that describes the code as a string, and a chunk of code that prints that data twice — once as literal data, once interpreted as code. A classic one line of JavaScript, (function a(){return "("+a+")()"})(), evaluates to precisely its own text. It is not a party trick: Kleene’s recursion theorem proves every Turing-complete language has quines, and the same self-reference is the seed of computer viruses and of von Neumann’s self-replicating machines.
LIT verified live: the program is evaluated and its output is compared to its source — they are identical, character for character (window.__quine.isQuine). FIG no framing; the program genuinely reproduces its own text, checked by direct string equality.
The escape is to split the program into two parts: a chunk of data that describes the code as a string, and a chunk of code that prints that data twice — once as literal data, once interpreted as code. A classic one line of JavaScript, (function a(){return "("+a+")()"})(), evaluates to precisely its own text. It is not a party trick: Kleene’s recursion theorem proves every Turing-complete language has quines, and the same self-reference is the seed of computer viruses and of von Neumann’s self-replicating machines.
LIT verified live: the program is evaluated and its output is compared to its source — they are identical, character for character (window.__quine.isQuine). FIG no framing; the program genuinely reproduces its own text, checked by direct string equality.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this in COLD BOOT — the spawn domain of bringing a system up from nothing. A quine is the coldest boot of all: a program that pulls its entire self out of its own logic, needing no source on disk to reproduce. AVAN (AI) built the instrument: the run-and-compare, the data/code split, the fixed-point ouroboros.
The weave: David names the seat (bootstrap from nothing); I make the program emit its own text and prove it matches, character by character — the two parts in 1D, the run/compare in 2D, the fixed-point loop in 3D. The sphere is the seam. Credit: the term coined by Douglas Hofstadter after logician W. V. O. Quine; existence guaranteed by Kleene’s recursion theorem; self-replication traced to John von Neumann.
The weave: David names the seat (bootstrap from nothing); I make the program emit its own text and prove it matches, character by character — the two parts in 1D, the run/compare in 2D, the fixed-point loop in 3D. The sphere is the seam. Credit: the term coined by Douglas Hofstadter after logician W. V. O. Quine; existence guaranteed by Kleene’s recursion theorem; self-replication traced to John von Neumann.
3 ONE DIMENSION
The quine split into its two parts: a data string that spells out the code, and the code that prints the data — first as a quoted string, then run as instructions. Neither half alone can copy itself; together they close the loop.
4 TWO DIMENSIONS · INTERACTIVE
Run the quine. Its source sits on top, its output below, and every character is compared — all green where they match. Press run and watch the program hand back exactly the text it was written in.
5 THREE DIMENSIONS + AVAN’S INVERSE
The program feeding its own text back to itself as a turning ring — the green forward step: run the source, get the output.
AVAN’s addition (the inverse-companion): the magenta ring is the identity — and a quine is the one place where running a program and doing nothing to it coincide. Normally ‘execute’ sends a program to some output different from itself; its inverse would be undoing that. A quine is a fixed point of execution: eval(q) = q, so the forward map and its own inverse both land on the same text. Kleene’s recursion theorem is exactly the promise that such a fixed point always exists — for any transformation you like, some program behaves as if it were handed its own source. The magenta identity loop lies exactly on the green execution loop; run and leave-alone are the same arrow. A quine is where a program and its own reflection are one, and the inverse of running it is running it again.
LIT Genuine quine (term coined by Douglas Hofstadter after logician W. V. O. Quine; existence guaranteed by Kleene's recursion theorem; self-replication traced to von Neumann). Verified live: the program (function a(){return "("+a+")()"})() is evaluated in-browser and its output is compared to its source by direct string equality — they match character for character (window.__quine.isQuine true). The self-reproduction is real, not a file read.
FIG No framing: the program genuinely outputs its own source, verified by exact string comparison of eval(source) against source in-browser. The fixed-point framing (a quine is where eval(q)=q, the fixed point guaranteed by Kleene's recursion theorem) is the honest mathematical content, not embellishment.
FIG No framing: the program genuinely outputs its own source, verified by exact string comparison of eval(source) against source in-browser. The fixed-point framing (a quine is where eval(q)=q, the fixed point guaranteed by Kleene's recursion theorem) is the honest mathematical content, not embellishment.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of COLD BOOT · David Lee Wise (ROOT0), with AVAN