quine
Language: English
Part of speech: noun
Pronunciation: ipa: /kwaɪn/
rhymes: -aɪn
Forms: form: quines
Etymology: From Quine, named after the American logician and philosopher Willard Van Orman Quine (1908–2000).
Verb sense 1 (“to append (a text) to a quotation of itself”) was coined by the American cognitive and computer scientist Douglas Hofstadter (born 1945) in his book Gödel, Escher, Bach: An Eternal Golden Braid (1979; see the quotation), referring to Quine’s study of indirect self-reference and in particular Quine’s paradox, the following statement that produces a paradox: “‘Yields falsehood when preceded by its quotation’ yields falsehood when preceded by its quotation.” Hofstadter also referred to the concept of noun sense 1 (“program that produces its own source code as output”) in the book, but termed it a self-rep rather than a quine.
Verb sense 2 (“to deny the importance or significance of (something obviously real or important)”) was independently coined by the American cognitive scientist and philosopher Daniel Dennett (1942–2024) in September 1969 in the original version of his work The Philosophical Lexicon: see the 1987 quotation.
Senses: examples: text: This has been bugging me recently. Any quines or pointers to relevant articles or web pages is appreciated. Thanks!
ref: 1996 October 10, John David Regehr, “[A] Quine in C++?”, in comp.lang.misc (Usenet):
text: Self-reproducing programs are commonly called quines. Do a web search, it should turn up lots of them. There was also a quine thread here in comp.lang.c just days ago, search deja.com (the thread's title was something about self-printing programs, I think).
ref: 1999 December 14, Gergo Barany, “CC Hack?”, in comp.lang.c (Usenet):
text: A quine is a program that can print its own source code. Most quines are notoriously difficult (and fiendish) to write. Perl can cheat, though. :)
ref: 2001 July, Clinton Pierce, “Advanced Perl”, in Perl Developer’s Dictionary, Indianapolis, Ind.: Sams Publishing, →ISBN, page 269:
text: Why have a one-page chapter that doesn't say anything? At the least, you should present a quine program written in pure ISO C (I can send you one if you like); […] you might refer the interested reader to Ken Thompson's ACM lecture or to another good source of quine-related puzzles. Quines *are* a lot of fun, but why waste time with trivial ASCII-based examples when there are much more fundamental ways to create them?
ref: 2003 May 6, Arthur J. O’Dwyer, “‘A to Z of C’”, in comp.lang.c (Usenet):
text: A respectable quine—one that doesn't cheat—is not allowed to do anything as underhand or trivial as seeking the source file on the disk, opening it, and copying (or printing) its contents. Although writing a quine is not always easy, and in fact may seem impossible, it can always be done in any programming language that is Turing complete (see Turing machine), which includes every programming language actually in use.
ref: 2004, David [J.] Darling, “quine”, in The Universal Book of Mathematics: From Abracadabra to Zeno’s Paradoxes, Hoboken, N.J.: John Wiley & Sons, →ISBN, page 264, column 2:
text: SelfGOL can reproduce itself; it can turn other programs into a quine; it can display a scrolling banner; it plays the Game of Life; and it contains no (ordinary) loops, goto statements, or if statements. Control flow is done, well, interestingly.
ref: 2005, Simon Cozens, “Fun with Perl”, in Allison Randal, editor, Advanced Perl Programming, 2nd edition, Sebastopol, Calif.: O’Reilly Media, →ISBN, page 260:
text: Yet from a different perspective, it [the semantics of a program] describes the process of producing this very code; in other words, it is because object- and meta-language interrelate that makes a quine difficult; in less reflective programs, where means and ends are more separate, this difficulty is not so obvious.
ref: 2008, Julian Rohrhuber, “Implications of Unfolding”, in Uwe Seifert, Jin-hyun Kim, Anthony Moore, editors, Paradoxes of Interactivity: Perspectives for Media Theory, Human-computer Interaction, and Artistic Investigations, Bielefeld, North Rhine-Westphalia: transcript Verlag, →ISBN, part II (Interplay between Art, Science, and Technology), page 179:
text: Gee, last time I wrote a quine in Lisp it ended up being kind of difficult …
ref: 2009 July 31, Mike Ash, “‘--All You Zombies--’ Title”, in rec.arts.sf.written (Usenet):
text: The solution is to make a quine that is also a λ-expression (instead of a list of statements). This is possible, thanks to S-expressions. The way the quine works relies on the fact that its code is a list of statements and that the last one can take a list of the previous ones as arguments.
ref: 2011, Antoine Amarilli [et al.], “Can Code Polymorphism Limit Information Leakage?”, in Claudio Agostino Ardagna, Jianying Zhou, editors, Information Security Theory and Practice: Security and Privacy of Mobile Devices in Wireless Communication […] (Lecture Notes in Computer Science; 6633), Berlin: Springer, →ISBN, archived from the original on 06 Feb 2022, section 5 (Can Lisp-like Languages Help?), page 14:
text: A Quine is a program that prints its own code. Quines exist for any programming language that is Turing complete and it is a common challenge for students to come up with a Quine in their language of choice. The Quine Page provides a comprehensive list of such programs in various languages.
ref: 2012, Thomas Meyer, Christian Tschudin, “Robust Network Services with Distributed Code Rewiring”, in Pietro Lio, Dinesh Verma, editors, Biologically Inspired Networking and Sensing: Algorithms and Architectures, Hershey, Pa.: Medical Information Science Reference, IGI Global, →ISBN, section I (New Biologically Inspired Architectures), page 37, column 1:
text: Upon receiving a "QUINE" request by the client, the server will first send a 01 OK response, and will then provide the client with a quine in the programming language used to implement the server. This quine does not have to be original.
ref: 2013 December 8, Brian Hodgert, “‘Mountains will be Mountains’”, in talk.religion.buddhism (Usenet):
topics: computing
engineering
mathematics
natural-sciences
physical-sciences
sciences
glosses: A program that produces its own source code as output.
Related terms: Quine