Home

quineprogrammas

Quineprogrammas, or quines, are computer programs that print their own source code when executed, without reading external input. They demonstrate self-reference in a concrete, executable form and are studied in programming language theory and puzzle culture.

The term quine was popularized by Douglas Hofstadter in Gödel, Escher, Bach and named in honor of

Most direct quines exploit a two-part structure: a fragment that outputs a textual representation of another

Quines can be direct, requiring no input and printing exactly their source, or indirect, consisting of two

The construction of quines is related to Kleene’s recursion theorem, which guarantees the existence of fixed

A widespread use is educational or recreational: programmers study quines to learn about language features, parsing,

the
logician
Willard
Van
Orman
Quine.
The
idea
rests
on
fixed
points
in
computation:
a
program
that,
when
run,
yields
a
representation
of
itself.
fragment
and
a
second
fragment
that
provides
that
text,
arranged
so
that
the
concatenation
reproduces
the
full
program.
In
practical
terms,
a
quine
uses
string
literals
and
the
program’s
own
control
flow
to
reconstruct
its
source.
separate
programs
that
print
each
other.
There
are
also
multilingual
quines
that
print
source
in
multiple
languages
and
quine
relays
that
pass
the
self-printing
through
several
languages.
points
for
computable
transformations.
Quines
are
primarily
exercises
in
self-reference
and
language
syntax
rather
than
practical
tools.
and
string
handling;
they
also
appear
in
programming
contests
and
code-golf
communities.