Jump to content

Talk:Quine (computing)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

ACM Spam?

[edit]

The link to "Reflections on Trusting Trust" (section "Further reading") is

http://www.acm.org/classics/sep95/

which redirects to

http://portal.acm.org/toc.cfm?id=SERIES11430&type=series&coll=ACM&dl=ACM

which is a site that doesn't even contain the words "reflections" or "trust". Can anyone repair that link, or should we remove this spam entirely?

Vog (talk) 18:51, 20 January 2008 (UTC)[reply]

Sigh. This sort of thing makes me want to hurt someone badly. I really wish webmasters had a compulsory course in the importance of lasting and durable URL's. Well, I put up another link to the same text. Thanks for pointing this out. --Gro-Tsen (talk) 00:06, 21 January 2008 (UTC)[reply]

current javascript example are not Quines!

[edit]

Because of Quine's paradox, Quines should not read source of those. Programs that use toSource, (implicitly or explicitly) toString, innerHTML, innerText ,etc. should not be consider to Quine.

History and the name

[edit]

I think the self-producing programs are known in recursion theory decades before the article cited. Also the article does not give references who has coined the name Quine, in recursion theory/logic literature it is simply called a self-reproducing program, I have not seen any book calling it a Quine program, so I think it is not a common name unless someone provides sources justifying the name, IMHO, the page should be moved to self-reproducing programs.

It seems that the only source for this name is the book GEB (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.164.5131&rep=rep1&type=pdf) and there does not seem any adoption of this name in literature. My search on Google scholar for "Quine Program" -philosophy returns only 4 results, one from 2007 and the rest from 2009/2010. I don't think it is good practice to change the name of a well-established concept in literature to a name coined by a popular science book which has not been adopted by experts in the area even after 31 years. 128.100.3.43 (talk) 16:00, 1 October 2010 (UTC)[reply]

Asking for academic references about quines is a little like asking for academic references about Pokémon: there is nothing interesting to say about them, academically, so they aren't mentioned, under one name or another. Nor are there any "experts" or publications about them. The only thing worth mentioning, scientifically, is Kleene's fixed point theorem. However, amateur enthusiasts, i.e., the people who actually write these things, have largely adopted the word "Quine" (because Hofstadter's book was such a success with them). Anyway, discussing what the principal name of an article should be is a generally infertile activity, as whether it should be spelled "color" or "colour"... The article should, in any case, mention all common names and should be accessible from all of them: let's make that happen. --Gro-Tsen (talk) 00:00, 3 October 2010 (UTC)[reply]
No, it is not like "color" and "colour". There are well-established names for these programs in computer science (computability/recursion theory, computer security, ... ), and they are interesting and well studied. Search for expression like "self-replicating program", "self-reproducing program", or "self-copying program" (http://scholar.google.ca/scholar?hl=en&q=%22self-reproducing+program%22 http://scholar.google.ca/scholar?hl=en&q=%22self-replicating+program%22) on Google or Google Scholar (the first article for "self-reproducing program" on Google Scholar is paper by Ken Thompson from 1984!), check the definition of a computer virus, ... . The names for well-established concepts are not defined by pop-sci books, we have already a name, and to be clear, there is no relation between Quine and these programs to call them Quine programs. We can mention that they are also called "Quine programs" by hobbyists loving the pop-sci book GEB, but the main name for the article should be the one which is used in the literature. 128.100.3.41 (talk) 22:40, 4 November 2010 (UTC)[reply]
ps: I am having trouble in finding a reference on "Quine's Paradox" as mentioned in this article and its wiki page other than GEB (and articles citing it or wiki), so that is probably another name coined by the author of GEB. If you know sources other than GEB for calling that sentence Quine's Paradox, please add it to the Quine's Paradox page. Thanks. 128.100.3.41 (talk) 23:23, 4 November 2010 (UTC)[reply]
A Quine is completely unlike a computer virus, and computer viruses (and worms, etc.) don't use techniques related to Quines to reproduce themselves. Don't confuse programs that duplicate their executable code with those that output their source code. Gavia immer (talk) 23:50, 4 November 2010 (UTC)[reply]

multiquine

[edit]

why is there no mention of multiquines, that is programs that are quines in different programming language using the same sourcecode? —Preceding unsigned comment added by 213.61.9.74 (talk) 11:24, 24 March 2011 (UTC)[reply]

There is. A few days ago I added a section called "Ouroboros programs". I now changed the section title to "Multiquines". --Waldir talk 15:04, 24 March 2011 (UTC)[reply]

What about a program x which outputs another program y which outputs program x again, but where x and y are written in the same language? Isn't that also a multiquine, or at least an object of interest? Do the languages absolutely have to be different? 188.169.229.30 (talk) 17:23, 16 February 2013 (UTC)[reply]

The idea of a multiquine needs to be cleared up. A multiquine is not a quine-relay, or Ouroboros pogram. Have a look at David Madore's post on quines: http://www.madore.org/~david/computers/quine.html. Summarized: "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. (Note that cheating is not allowed: the command line arguments must not be too long — passing the full text of a program is considered cheating)." — Preceding unsigned comment added by 146.232.77.178 (talk) 09:32, 15 August 2013 (UTC)[reply]

"First appeared"

[edit]

At the moment, the article contains the phrase

The idea of self-reproducing programs first appeared in Paul Bratley and Jean Millo's article "Computer Recreations: Self-Reproducing Automata" in 1972.[2] Bratley first became interested in self-reproducing programs after seeing the first known such program written in Atlas Autocode at Edinburgh in the 1960s

I guess I'm missing something: if he had already become interested in them in the 1960s, how can it be that the idea only first appeared in 1972?! Perhaps the intention was that that was the first time the idea was mentioned in an article? I'm not fixing it myself, as I don't really know much about it and don't know if what I wrote is correct. 188.169.229.30 (talk) 17:21, 16 February 2013 (UTC)[reply]

It is implied in context that "first appeared" means "first appeared in professional literature".TricksterWolf (talk) 14:55, 12 August 2014 (UTC)[reply]

Did Hofstadter coin the name "quine" for self-reproducing programs?

[edit]

The article states that the name "quine" was coined by Douglas Hofstadter in his 1979 book GEB. In the context in which this is presented, this gives the impression that it is claimed here that Hofstadter coined the name "quine" for self-reproducing programs. However, in GEB Hofstadter only introduced the term "quine" as a verb (as in "to quine a phrase"), and only in the meaning of prepending a quoted copy of a phrase to that phrase. For example, if you quine  FOOBAZ  you get  "FOOBAZ" FOOBAZ. Though related to self-reproduction, this is nevertheless really something else.  --Lambiam 19:16, 14 February 2016 (UTC)[reply]

[edit]

Hello fellow Wikipedians,

I have just modified 2 external links on Quine (computing). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 15:22, 21 July 2016 (UTC)[reply]

PostScript quine

[edit]

Here is a PostScript Quine from Stan Switzer at https://donhopkins.com/home/archive/NeWS/news-tape/fun/quine/quine

{{[ exch /dup load /exec load ] cvx} dup exec}

That is an executable array (i.e. a PostScript a function), that when executed, reconstructs a duplicate of itself on the stack, be re-using another executable array as both data and code ("dup exec" passes the function as data to the function as code, kind of like the y-combinator). Xardox (talk) 20:24, 1 September 2019 (UTC)[reply]

C empty program?

[edit]

The article says "In some languages, particularly scripting languages but also C, an empty source file is a fixed point of the language, being a valid program that produces no output." What? I don't think an empty program is legal in C. I think it needs a main function. Is there some source that says an empty program is valid in C? Bugefun (talk) 05:39, 20 January 2020 (UTC)[reply]

Java Example wrong?

[edit]

The example of using blockquotes for java is wrong:

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.println(source.formatted(textBlockQuotes + newLine + source + textBlockQuotes));
	}
}
""";
        System.out.println(source.formatted(textBlockQuotes + newLine + source + textBlockQuotes));
	}
}

Its missing the double print

Error quine

[edit]

This is not a serious suggestion for modifying the article; just a piece of computer geekery for folks who like to hang around in talk pages. It is possible to construct an 'error quine' for a given compiler (or interpreter) such that a program when submitted to the compiler causes the compiler to print out the source code of the program as an error message. Dezaxa (talk) 01:20, 5 October 2021 (UTC)[reply]