Talk:Quine: Difference between revisions

5,418 bytes added ,  3 years ago
m
(→‎REXX Quine: clarify what the Rexx Quine submissions should contain.)
 
(3 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 111 ⟶ 113:
:# Compare the results of the output from 3 with those from 2.
: Dollars to doughnuts they'll both be 53 lines long, identical and a quine. (I tried it: they are.) --[[User:Alansam|Alansam]] 06:05, 28 June 2012 (UTC)
 
:: Yes, they are now after the change that was made. I have no doubt that your original program is 53 lines. I wish you would've done the same four steps on the 52-line version as it existed on Rosetta Code, the same program that I used. They didn't agree before the change. I'm not questioning what you meant to do, just what was actually in the sample code (on Rosetta Code). I have no access to any other copy. I'm sorry if the dog ate your homework, no demand for who's reponsible for the changes was made or implied. There's always the history file if want to know who did what. But the original file as it was on Rosetta Code didn't produce an exact copy of itself. The 52-line version didn't produce a quine, the (current) 53 line does. If it old program did produce a quine, you wouldn't have a need to change it. I also don't understand your ad hominem attacks about 'they" posting caveats about merciless editing of things I write in many places. Could you be more specific if you think that would be pertinent here? -- [[User:Gerard Schildberger|Gerard Schildberger]] 08:00, 28 June 2012 (UTC)
 
:: Also, since this discussion is now in the ''talk'' page, I'd like to point out that saying another version is a cheat isn't professional nor appropriate. If it ''is'' a cheat, then flag it as '''incorrect''' and state why. The REXX versions 1 and 2 don't open any external files, as per the task's description/requirements. -- [[User:Gerard Schildberger|Gerard Schildberger]] 02:01, 28 June 2012 (UTC)
 
: I didn't say the other version "is a cheat", I said it was "kind of a cheat", there's a '''huge''' difference in emphasis. Please don't cherry-pick other people's words to score points: that's unprofessional!
 
:: Sorry, a kind of cheat or a cheat is still a cheat. I'm sorry if you think that I thought that name-calling wasn't appropriate. If that is your idea of cherry-picking, then I'll rephrase. Saying another version is a kind of cheat isn't professional ... Saying (just for instance) that something smells or kind of smells sounds like the same thing. It wasn't my intention to provide a "kind of" cheat; the mechanism used is a very simple way to provide what the quine task asked for. I don't even begin to understand what you meant by scoring points. -- [[User:Gerard Schildberger|Gerard Schildberger]] 08:00, 28 June 2012 (UTC)
 
: Now we're here though; if you read the description of what a Quine is supposed to be (see above) with particular reference to the quote from Wikipedia:
<pre>
Line 120 ⟶ 127:
</pre>
: 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, albeit 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 disconnected (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)