Talk:Quine: Difference between revisions

1,322 bytes added ,  3 years ago
m
(→‎REXX Quine: added some comments. -- ~~~~)
 
(2 intermediate revisions by 2 users not shown)
Line 65:
 
:This is the same problem as "if you allow programs which print their source, won't 10 LIST be a quine in classic BASIC?". Or, isn't 42 a Lisp quine? Typing 42 into the REPL produces 42! The answer is that a quine must not depend on some trivial self-evaluating properties built into an object, or built in self-reference which pulls out the source code. A quine must be some kind of '''computation''' which produces its own image. Self-evaluating objects do not compute anything: they appeal to the axiom of self-evaluation which is built into the language. Self-regurgitating programs likewise do not compute anything, they appeal to built-in access to the program source. (Many of the programs put up here so far fail these criteria.) [[Special:Contributions/24.85.131.247|24.85.131.247]] 05:59, 2 October 2011 (UTC)
 
:I just added an example for a compilable Haskell Quine. --[[User:Jgriebler|JMG]] ([[User talk:Jgriebler|talk]]) 22:14, 13 May 2015 (UTC)
 
== C quine ==
Line 126 ⟶ 128:
: I suspect that using <tt>sourceline()</tt> falls squarely into the category of "opening the source file of the program and similar mechanisms" which disqualifies it as a Quine. --[[User:Alansam|Alansam]] 06:05, 28 June 2012 (UTC)
 
:: I have a slightly different definition of squarely. The REXX program doesn't open the source file of the program. It doesn't read (or take) the source file through any other mechanism. Reading a copy of the file that is on (or in) a virtual device might be considered taking (reading?) a copy of the source. Putting a number of lines in a stack and then "reading" (or pulling) is "taking" some input could qualify as a method disallowed in the Wiki definition of a quine. I hesitate to call a stack (internal or external queue) a device, albetitalbeit a virtual one. There isn't much difference between a stack and a virtual device. I don't begrudge your method nor will I call it names, and I certainly wouldn't call it a kind of cheat. I think debating the definition(s) of a quine (as it applies here) would just lead to endless arguments about the wording of a quine (and/or what the words mean), and what specifically should/could be disqualified, and what qualifies as reading a copy of the program from an input. It's just another method that can be used. My only concern was that the (original) program as I observed it didn't produce a quine. I don't question the method. The REXX method for REXX versions 1 and 2 can also be used, for instance, in CMS when using the NUCXLOAD function which further distances a program from its source, which in simple terms, can load a copy of a REXX program (or it could be any kind of file) in virtual memory (and also rename it), and the original source deleted or disconneteddisconnected (no longer available to the user). The program can be (much) later be invoked (even by another user) and still work as intended. This method lends itself to a persistent program, surviving what most people call a re-boot (or re-IPL, in CMS terminology), even though the source code is longer present in any form. This subject was of much interest when that capability was introduced into CMS and via ''saved systems'', and it made for some interesting programming techniques, the least of which was to hide the REXX code from the user. This is a lot of discourse on a simple error in the original REXX program (as it existed on Rosetta Code), just admitting that the 52-line version didn't reproduce itself due to a missing blank line. -- [[User:Gerard Schildberger|Gerard Schildberger]] 08:00, 28 June 2012 (UTC)
 
 
== origins of the word &nbsp; ''quine'' ==
 
I first came across these thingys (quines) in 1967 or so ─── they weren't known as '''quines''' when I first encountered them, &nbsp; they were known simply as "reproduce (type/print) the (a) computer program language source to the console (terminal) or printer &nbsp; ─── &nbsp; or somesuch phraseology. &nbsp; I had never heard of a &nbsp; ''quine'' &nbsp; before I saw it mentioned here on Rosetta Code when this task was created. &nbsp; By the way, the word &nbsp; '''quine''' &nbsp; was introduced in 1979. &nbsp; Nor have I ever heard of another name for it: &nbsp; ''Computer Recreations: Self-Reproducing Automata'' (1972). &nbsp; Now that is a four-bit phrase. &nbsp; Other terms are &nbsp; ''self-replicating programs'', &nbsp; ''self-reproducing programs'', &nbsp; and ''self-copying programs''. &nbsp; I have added these terms and others to the '''quine''' Rosetta Code task so as to make this task easier to find in case one doesn't know of the '''quine''' word or what it means. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 22:27, 8 June 2020 (UTC)