Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Quine (computing)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Self-replicating program}} [[File:Java implementation of a quine program.png|thumb|300px|A quine's output is exactly the same as its source code.]] A '''quine''' is a [[computer program]] that takes no input and produces a copy of its own [[source code]] as its only output. The standard terms for these programs in the [[computability theory]] and [[computer science]] literature are "self-replicating programs", "self-reproducing programs", and "self-copying programs". A quine is a [[Fixed point (mathematics)|fixed point]] of an execution environment, when that environment is viewed as a [[Function (mathematics)|function]] transforming programs into their outputs. Quines are possible in any [[Turing completeness|Turing-complete]] programming language, as a direct consequence of [[Kleene's recursion theorem]]. For amusement, programmers sometimes attempt to develop the shortest possible quine in any given [[programming language]]. == Name == The name "quine" was coined by [[Douglas Hofstadter]], in his popular 1979 science book ''[[GΓΆdel, Escher, Bach]]'', in honor of philosopher [[Willard Van Orman Quine]] (1908β2000), who made an extensive study of [[indirect self-reference]], and in particular for the following paradox-producing expression, known as [[Quine's paradox]]: <blockquote> "Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation. </blockquote> ==History== [[John von Neumann]] theorized about [[Von Neumann universal constructor|self-reproducing automata]] in the 1940s. Later, Paul Bratley and Jean Millo's article "Computer Recreations: Self-Reproducing Automata" discussed them in 1972.<ref name="Bratley_Millo">{{cite journal | last1 = Bratley | first1 = Paul | author-link1 = Paul Bratley | last2 = Millo | first2 = Jean | title = Computer Recreations: Self-Reproducing Automata | journal = Software: Practice and Experience | volume = 2 | issue = 4 | year = 1972 | pages = 397β400 | doi=10.1002/spe.4380020411 | s2cid = 222194376 }}</ref> Bratley first became interested in self-reproducing programs after seeing the first known such program written in [[Atlas Autocode]] at Edinburgh in the 1960s by the [[University of Edinburgh]] lecturer and researcher [[Hamish Dewar]]. The "download source" requirement of the [[GNU Affero General Public License]] is based on the idea of a quine.<ref name="Stet_and_AGPLV3">{{cite web | url = http://www.softwarefreedom.org/technology/blog/2007/nov/21/stet-and-agplv3/ | title = stet and AGPLv3 | access-date = June 14, 2008 | last = Kuhn | first = Bradley M. | author-link = Bradley M. Kuhn | date = November 21, 2007 | publisher = Software Freedom Law Center | archive-url = https://web.archive.org/web/20080315231323/http://www.softwarefreedom.org/technology/blog/2007/nov/21/stet-and-agplv3/ | archive-date = March 15, 2008 | url-status = dead }}</ref> ==Examples== ===Constructive quines=== In general, the method used to create a quine in any programming language is to have, within the program, two pieces: (a) [[Source code|code]] used to do the actual printing and (b) [[data]] that represents the textual form of the code. The code functions by using the data to print the code (which makes sense since the data represents the textual form of the code), but it also uses the data, processed in a simple way, to print the textual representation of the data itself. Here are three small examples in Python3: <syntaxhighlight lang="python3"> # Example A. chr(39) == "'". a = 'a = {}{}{}; print(a.format(chr(39), a, chr(39)))'; print(a.format(chr(39), a, chr(39))) </syntaxhighlight> <syntaxhighlight lang="python3"> # Example B. chr(39) == "'". b = 'b = %s%s%s; print(b %% (chr(39), b, chr(39)))'; print(b % (chr(39), b, chr(39))) </syntaxhighlight> <syntaxhighlight lang="python3"> # Example C. %r will quote automatically. c = 'c = %r; print(c %% c)'; print(c % c) </syntaxhighlight>The following [[Java (programming language)|Java]] code demonstrates the basic structure of a quine. <syntaxhighlight lang="java"> public class Quine { public static void main(String[] args) { char q = 34; // Quotation mark character String[] l = { // Array of source code "public class Quine", "{", " public static void main(String[] args)", " {", " char q = 34; // Quotation mark character", " String[] l = { // Array of source code", " ", " };", " for (int i = 0; i < 6; i++) // Print opening code", " System.out.println(l[i]);", " for (int i = 0; i < l.length; i++) // Print string array", " System.out.println(l[6] + q + l[i] + q + ',');", " for (int i = 7; i < l.length; i++) // Print this code", " System.out.println(l[i]);", " }", "}", }; for (int i = 0; i < 6; i++) // Print opening code System.out.println(l[i]); for (int i = 0; i < l.length; i++) // Print string array System.out.println(l[6] + q + l[i] + q + ','); for (int i = 7; i < l.length; i++) // Print this code System.out.println(l[i]); } }</syntaxhighlight> The source code contains a string array of itself, which is output twice, once inside quotation marks. This code was adapted from an original post from c2.com, where the author, Jason Wilson, posted it as a minimalistic version of a Quine, without Java comments.<ref>{{cite web |url=http://wiki.c2.com/?QuineProgram |title=Quine Program |website=wiki.c2.com}}</ref> Thanks to new [https://openjdk.java.net/jeps/378 text blocks] feature in Java 15 (or newer), a more readable and simpler version is possible:<ref>{{Cite web|url=https://gist.github.com/destan/c0db5a237e9875a56141403aaa6cb9c7|title=Simple Java quine, self replicating (Self copying) Java code, with text blocks. This code can be run with Java 15+ or Java 13+ with special flags. License is public domain, no rights reserved}}</ref> <syntaxhighlight lang="java"> public class Quine { public static void main(String[] args) { String textBlockQuotes = new String(new char[]{'"', '"', '"'}); char newLine = 10; String source = """ public class Quine { public static void main(String[] args) { String textBlockQuotes = new String(new char[]{'"', '"', '"'}); char newLine = 10; String source = %s; System.out.print(source.formatted(textBlockQuotes + newLine + source + textBlockQuotes)); } } """; System.out.print(source.formatted(textBlockQuotes + newLine + source + textBlockQuotes)); } } </syntaxhighlight>The same idea is used in the following [[SQL]] quine:<syntaxhighlight lang="sql"> SELECT REPLACE(REPLACE('SELECT REPLACE(REPLACE("$",CHAR(34),CHAR(39)),CHAR(36),"$") AS Quine',CHAR(34),CHAR(39)),CHAR(36),'SELECT REPLACE(REPLACE("$",CHAR(34),CHAR(39)),CHAR(36),"$") AS Quine') AS Quine </syntaxhighlight> ===Eval quines=== Some programming languages have the ability to evaluate a string as a program. Quines can take advantage of this feature. For example, this [[Ruby (programming language)|Ruby]] quine: <syntaxhighlight lang="ruby">eval s="print 'eval s=';p s"</syntaxhighlight> [[Lua (programming language)|Lua]] can do: <syntaxhighlight lang="lua">s="print(string.format('s=%c%s%c; load(s)()',34,s,34))"; load(s)()</syntaxhighlight> In Python 3.8: <syntaxhighlight lang="python3"> exec(s:='print("exec(s:=%r)"%s)') </syntaxhighlight> ==="Cheating" quines=== ==== Self-evaluation ==== In many functional languages, including [[Scheme (programming language)|Scheme]] and other [[Lisp (programming language)|Lisps]], and interactive languages such as [[APL (programming language)|APL]], numbers are self-evaluating. In [[TI-BASIC]], if the last line of a program returns a value, the returned value is displayed on the screen. Therefore, in such languages a program consisting of only a single digit results in a 1-byte quine. Since such code does not ''construct'' itself, this is often considered cheating. <syntaxhighlight lang="basic"> 1 </syntaxhighlight> ==== Empty quines ==== In some languages, particularly [[scripting language]]s but also [[C (programming language)|C]], an empty source file is a fixed point of the language, being a valid program that produces no output.{{efn|1=Examples include [[Bash (Unix shell)|Bash]], [[Perl]], and [[Python (programming language)|Python]]}} Such an empty program, submitted as "the world's smallest self reproducing program", once won the "worst abuse of the rules" prize in the [[International Obfuscated C Code Contest]].<ref>{{cite web |url = http://www0.us.ioccc.org/1994/smr.hint |title = IOCCC 1994 Worst Abuse of the Rules |archive-url=https://web.archive.org/web/20201112015540/http://www0.us.ioccc.org/1994/smr.hint |archive-date=12 November 2020 |url-status=dead}}</ref> The program was not actually compiled, but used <code>cp</code> to copy the file into another file, which could be executed to print nothing.<ref>{{cite web |title=Makefile |url=http://www0.us.ioccc.org/1994/Makefile |website=IOCCC.org |access-date=4 April 2019 |archive-date=23 April 2019 |archive-url=https://web.archive.org/web/20190423002150/http://www0.us.ioccc.org/1994/Makefile |url-status=dead }}</ref> ==== Source code inspection ==== Quines, per definition, cannot receive ''any'' form of input, including reading a file, which means a quine is considered to be "cheating" if it looks at its own source code. The following [[Unix shell|shell]] script is not a quine: <syntaxhighlight lang="bash"> #!/bin/sh # Invalid quine. # Reading the executed file from disk is cheating. cat $0 </syntaxhighlight> A shorter variant, exploiting the behaviour of [[Shebang (Unix)|shebang]] directives: <syntaxhighlight lang="bash"> #!/bin/cat </syntaxhighlight> Other questionable techniques include making use of compiler messages; for example, in the [[GW-BASIC]] environment, entering "Syntax Error" will cause the interpreter to respond with "Syntax Error". Quine code can also be outputted visually, for example it's used to visualize the neutral zone in [[Yars' Revenge]], along with [[Syntactic_sugar#Syntactic_saccharin|syntactic saccharin]], to obfuscate the source code. ==Ouroboros programs== The quine concept can be extended to multiple levels of recursion, giving rise to "[[ouroboros]] programs", or quine-relays. This should not be confused with [[#Multiquines|multiquines]]. ===Example=== This Java program outputs the source for a C++ program that outputs the original Java code. <!-- NOTE TO EDITORS: The following code is very fragile. If you edit it, be very careful not to break it -- verify that the output of the Java program is identical to the C++ program, and that the output of the C++ program is identical to the Java program. --> <div style="width: 49%; overflow: auto; float: right; padding-left: 1%;" > <syntaxhighlight lang="cpp"> #include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { char q = 34; string l[] = { " ", "=============<<<<<<<< C++ Code >>>>>>>>=============", "#include <iostream>", "#include <string>", "using namespace std;", "", "int main(int argc, char* argv[])", "{", " char q = 34;", " string l[] = {", " };", " for(int i = 20; i <= 25; i++)", " cout << l[i] << endl;", " for(int i = 0; i <= 34; i++)", " cout << l[0] + q + l[i] + q + ',' << endl;", " for(int i = 26; i <= 34; i++)", " cout << l[i] << endl;", " return 0;", "}", "=============<<<<<<<< Java Code >>>>>>>>=============", "public class Quine", "{", " public static void main(String[] args)", " {", " char q = 34;", " String[] l = {", " };", " for(int i = 2; i <= 9; i++)", " System.out.println(l[i]);", " for(int i = 0; i < l.length; i++)", " System.out.println(l[0] + q + l[i] + q + ',');", " for(int i = 10; i <= 18; i++)", " System.out.println(l[i]);", " }", "}", }; for(int i = 20; i <= 25; i++) cout << l[i] << endl; for(int i = 0; i <= 34; i++) cout << l[0] + q + l[i] + q + ',' << endl; for(int i = 26; i <= 34; i++) cout << l[i] << endl; return 0; }</syntaxhighlight> </div><div style="width: 49%; overflow: auto; float: left; padding-right: 1%;" > <syntaxhighlight lang="java">public class Quine { public static void main(String[] args) { char q = 34; String[] l = { " ", "=============<<<<<<<< C++ Code >>>>>>>>=============", "#include <iostream>", "#include <string>", "using namespace std;", "", "int main(int argc, char* argv[])", "{", " char q = 34;", " string l[] = {", " };", " for(int i = 20; i <= 25; i++)", " cout << l[i] << endl;", " for(int i = 0; i <= 34; i++)", " cout << l[0] + q + l[i] + q + ',' << endl;", " for(int i = 26; i <= 34; i++)", " cout << l[i] << endl;", " return 0;", "}", "=============<<<<<<<< Java Code >>>>>>>>=============", "public class Quine", "{", " public static void main(String[] args)", " {", " char q = 34;", " String[] l = {", " };", " for(int i = 2; i <= 9; i++)", " System.out.println(l[i]);", " for(int i = 0; i < l.length; i++)", " System.out.println(l[0] + q + l[i] + q + ',');", " for(int i = 10; i <= 18; i++)", " System.out.println(l[i]);", " }", "}", }; for(int i = 2; i <= 9; i++) System.out.println(l[i]); for(int i = 0; i < l.length; i++) System.out.println(l[0] + q + l[i] + q + ','); for(int i = 10; i <= 18; i++) System.out.println(l[i]); } }</syntaxhighlight></div> Such programs have been produced with various cycle lengths: * [[Haskell (programming language)|Haskell]] β [[Python (programming language)|Python]] β [[Ruby (programming language)|Ruby]]<ref>{{cite web |url = http://blog.sigfpe.com/2008/02/third-order-quine-in-three-languages.html |title = A Third Order Quine in Three Languages |author = Dan Piponi |date = 5 February 2008 }}</ref> * [[Python (programming language)|Python]] β [[Bash (Unix shell)|Bash]] β [[Perl]]<ref>{{cite web |url = http://www.stratigery.com/source.html#Ouroboros |title = Ask and ye shall receive: Self-replicating program that goes through three generations, Python, Bash, Perl |author = Bruce Ediger |access-date = 2011-03-17 |archive-date = 2011-02-23 |archive-url = https://web.archive.org/web/20110223164033/http://www.stratigery.com/source.html#Ouroboros |url-status = dead }}</ref> * [[C (programming language)|C]] β [[Haskell (programming language)|Haskell]] β [[Python (programming language)|Python]] β [[Perl]]<ref>{{cite web |url = http://hpaste.org/43501/multiquine |title = multiquine |author = b.m. |date = 1 February 2011 |archive-url = https://archive.today/20130415050710/http://hpaste.org/43501/multiquine |archive-date = 2013-04-15 |url-status = dead }}</ref> * [[Haskell (programming language)|Haskell]] β [[Perl]] β [[Python (programming language)|Python]] β [[Ruby (programming language)|Ruby]] β [[C (programming language)|C]] β [[Java (programming language)|Java]]<ref>{{cite web |url = http://blog.sigfpe.com/2011/01/quine-central.html |title = Quine Central |author = Dan Piponi |date = 30 January 2011 }}</ref> * [[Ruby (programming language)|Ruby]] β [[Java (programming language)|Java]] β [[C Sharp (programming language)|C#]] β [[Python (programming language)|Python]]<ref>{{cite web |url = http://ruslan.ibragimov.by/20-04-2013.quine-ruby-java-c-python |title = Quine Ruby -> Java -> C# -> Python |author = Ruslan Ibragimov |date = 20 April 2013 |language = ru |access-date = 20 April 2013 |archive-date = 4 March 2016 |archive-url = https://web.archive.org/web/20160304040341/http://ruslan.ibragimov.by/20-04-2013.quine-ruby-java-c-python |url-status = dead }}</ref> * [[C (programming language)|C]] β [[C++]] β [[Ruby (programming language)|Ruby]] β [[Python (programming language)|Python]] β [[PHP]] β [[Perl]]<ref>{{cite web |url = http://golf.shinh.org/reveal.rb?Quine/shinh+%28C+C%2B%2B+Ruby+Python+PHP+Perl%29_1194650418&rb |title = Quine by shinh (C C++ Ruby Python PHP Perl) |author = Shinichiro Hamaji |date = 10 November 2007 }} (this one is also a [[Polyglot (computing)|polyglot]])</ref> * [[Ruby (programming language)|Ruby]] β [[Python (programming language)|Python]] β [[Perl]] β [[Lua (programming language)|Lua]] β [[OCaml]] β [[Haskell (programming language)|Haskell]] β [[C (programming language)|C]] β [[Java (programming language)|Java]] β [[Brainfuck]] β [[Whitespace (programming language)|Whitespace]] β [[Unlambda]]<ref>{{cite web |url = http://asiajin.com/blog/2009/09/22/uroboros-programming-with-11-programming-languages/ |title = Uroboros Programming With 11 Programming Languages |author = Ku-ma-me |date = 22 September 2009 |access-date = 17 March 2011 |archive-date = 29 August 2011 |archive-url = https://web.archive.org/web/20110829204605/http://asiajin.com/blog/2009/09/22/uroboros-programming-with-11-programming-languages/ |url-status = dead }}</ref> * [[Ruby (programming language)|Ruby]] β [[Scala (programming language)|Scala]] β [[Scheme (programming language)|Scheme]] β [[Scilab]] β [[Bash (Unix shell)|Shell (bash)]] β [[S (programming language)|S-Lang]] β [[Smalltalk]] β [[Squirrel (programming language)|Squirrel3]] β [[Standard ML]] β ... β [[Rexx]] (128 (and formerly 50) programming languages)<ref>{{cite web |url = https://github.com/mame/quine-relay |title = Quine Relay - An uroboros program with 100+ programming languages |author = Yusuke Endoh |website = [[GitHub]] |date = 2 November 2021 }}</ref> * Web application β [[C (programming language)|C]] (web application source code consists of [[HTML]], [[JavaScript]], and [[CSS]])<ref>{{cite web |url = http://michaelwehar.com/quines/c_prints_javascript.html |title = C Prints JavaScript |author = Michael Wehar |date = 10 November 2019 |language = en }}</ref> ==Multiquines== David Madore, creator of [[Unlambda]], describes multiquines as follows:<ref>{{cite web |url = http://www.madore.org/~david/computers/quine.html |title = Quines (self-replicating programs) |author = David Madore }}</ref> <blockquote> "A multiquine is a set of r different programs (in r different languages β without this condition we could take them all equal to a single quine), each of which is able to print any of the r programs (including itself) according to the command line argument it is passed. (Cheating is not allowed: the command line arguments must not be too long β passing the full text of a program is considered cheating)." </blockquote> A multiquine consisting of 2 languages (or biquine) would be a program which: * When run, is a quine in language X. * When supplied with a user-defined command line argument, would print a second program in language Y. * Given the second program in language Y, when run normally, would also be a quine in language Y. * Given the second program in language Y, and supplied with a user-defined command line argument, would produce the original program in language X. A biquine could then be seen as a set of two programs, both of which are able to print either of the two, depending on the command line argument supplied. Theoretically, there is no limit on the number of languages in a multiquine. A 5-part multiquine (or pentaquine) has been produced with [[Python (programming language)|Python]], [[Perl]], [[C (programming language)|C]], [[NewLISP]], and [[F Sharp (programming language)|F#]]<ref>{{cite web |url = https://github.com/rvantonder/pentaquine |title = Pentaquine - 5 part multiquine |author = Rijnard van Tonder |website = [[GitHub]] |date = 14 January 2020 }}</ref> and there is also a 25-language multiquine.<ref>{{cite web |url = https://github.com/coolwanglu/quine-chameleon#variants |title = Quine Chameleon#Variants |author = Lu Wang |website = [[GitHub]] |date = 21 May 2021 }}</ref> ==Polyglot== Similar to, but unlike a multiquine, a [[polyglot (computing)|polyglot]] program is a computer program or script written in a valid form of multiple programming languages or file formats by combining their syntax. A polyglot program is not required to have a self-reproducing quality, although a polyglot program can also be a quine in one or more of its possible ways to execute. Unlike quines and multiquines, polyglot programs are not guaranteed to exist between arbitrary sets of languages as a result of Kleene's recursion theorem, because they rely on the interplay between the syntaxes, and not a provable property that one can always be embedded within another. =={{Anchor|RADIATION}}Radiation-hardened== A radiation-hardened quine is a quine that can have any single character removed and still produces the original program with no missing character. Of necessity, such quines are much more convoluted than ordinary quines, as is seen by the following example in [[Ruby (programming language)|Ruby]]:<ref>{{cite web | url = https://github.com/mame/radiation-hardened-quine | title = Radiation-hardened Quine | access-date = 2014-02-24 | author = Yusuke Endoh | website = [[GitHub]] }}</ref> <syntaxhighlight lang="ruby"> eval='eval$q=%q(puts %q(10210/#{1 1 if 1==21}}/.i rescue##/ 1 1"[13,213].max_by{|s|s.size}#"##").gsub(/\d/){["=\47eval$q=%q(#$q)#\47##\47 ",:eval,:instance_,"||=9"][eval$&]} exit)#'##' instance_eval='eval$q=%q(puts %q(10210/#{1 1 if 1==21}}/.i rescue##/ 1 1"[13,213].max_by{|s|s.size}#"##").gsub(/\d/){["=\47eval$q=%q(#$q)#\47##\47 ",:eval,:instance_,"||=9"][eval$&]} exit)#'##' /#{eval eval if eval==instance_eval}}/.i rescue##/ eval eval"[eval||=9,instance_eval||=9].max_by{|s|s.size}#"##" </syntaxhighlight> == Automatic generation == Using [[relational programming]] techniques, it is possible to generate quines automatically by transforming the interpreter (or equivalently, the compiler and runtime) of a language into a relational program, and then solving for a [[fixed point (mathematics)|fixed point]].<ref>{{Cite book |last1=Byrd |first1=William E. |last2=Holk |first2=Eric |last3=Friedman |first3=Daniel P. |chapter=MiniKanren, live and untagged: Quine generation via relational interpreters (Programming pearl) |date=2012-09-09 |title=Proceedings of the 2012 Annual Workshop on Scheme and Functional Programming |chapter-url=http://webyrd.net/quines/quines.pdf |series=Scheme '12 |location=New York, NY, USA |publisher=Association for Computing Machinery |pages=8β29 |doi=10.1145/2661103.2661105 |isbn=978-1-4503-1895-2}}</ref> ==See also== {{Portal|Computer programming}} {{cols}} * [[Diagonal lemma]] * [[Droste effect]] * [[Fixed point combinator]] * [[Self-modifying code]] * [[Self-interpreter]] * [[Self-replicating machine]] * [[Self-replication]] * [[Self-relocation]] * [[TiddlyWiki]] * [[Tupper's self-referential formula]] * [[Programming languages]] * [[Quine's paradox]] * [[Polyglot (computing)]] {{colend}} ==Notes== {{Notelist|30em}} ==References== {{Reflist|30em}} ==Further reading== *[[Douglas Hofstadter]]: ''[[GΓΆdel, Escher, Bach: An Eternal Golden Braid]]'' *[[Ken Thompson]]: "[https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thompson.pdf Reflections on Trusting Trust]" (''[[Communications of the ACM]]'', '''27'''(8):761-3) ==External links== {{Div col|colwidth=30em}} *[http://tiddlywiki.com/#Quine:Quine%20HelloThere%20GettingStarted%20Community TiddlyWiki, a quine manifested as a wiki] *[http://www.nyx.net/~gthompso/quine.htm The Quine Page (by Gary P. Thompson)] *[http://michaelwehar.com/quines/ A Brief Guide to Self-Referential Programs] *[http://c2.com/cgi/wiki?QuineProgram QuineProgram at the Portland Pattern Repository Wiki] *[http://www.madore.org/~david/computers/quine.html David Madore's Discussion of Quines] *[http://www.steike.com/code/useless/zip-file-quine/ Zip File Quine] *[http://research.swtch.com/2010/03/zip-files-all-way-down.html Zip Files All The Way Down] *[http://johannesloetzsch.de/software/quines/ An Introduction to Quines β in particular, quines using more than one language] *[http://www.win.tue.nl/~wstomv/edu/javascript/quine.html Quine Web Page: A standards-conforming HTML+JavaScript web page that shows its own source code] *[https://no-gravity.github.io/html-quine/ HTML Quine: An HTML page that only uses HTML and CSS to show its own source code] *[http://www.win.tue.nl/~wstomv/edu/javascript/challenge.html Quine Challenge for Tom's JavaScript Machine], with a series of interactive hints *[http://www-verimag.imag.fr/~monniaux/download/JavaQuine.zip A Java Quine built straight from Kleene's fixed point theorem, composition and s-n-m] *[http://quaxio.com/qrquine/ A QR code quine] {{Div col end}} {{Standard test item}} {{DEFAULTSORT:Quine (Computing)}} [[Category:Source code]] [[Category:Articles with example C code]] [[Category:Willard Van Orman Quine]] [[Category:Test items in computer languages]] [[Category:Computer programming folklore]] [[Category:Self-replication]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Colend
(
edit
)
Template:Cols
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:Efn
(
edit
)
Template:Notelist
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Standard test item
(
edit
)