Talk:Quine: Difference between revisions

Content added Content deleted
(minute response. (sorry...))
(full response)
Line 13: Line 13:
:: And it's this idea that makes up a Quine - A piece of code, applied to itself, once quoted and once unquoted. (BTW, this then again is the same technique used to prove undecidability theorems.) And the extra requirement "should '''print''' it's output" is one way to enforce that the quoting has to be done by the program itself, not by some external read-eval-print loop.
:: And it's this idea that makes up a Quine - A piece of code, applied to itself, once quoted and once unquoted. (BTW, this then again is the same technique used to prove undecidability theorems.) And the extra requirement "should '''print''' it's output" is one way to enforce that the quoting has to be done by the program itself, not by some external read-eval-print loop.
:: The task is bad enough as it is (it doesn't really help in comparing programming languages), and it's not improved by allowing "fortunate" border cases which take away the main point. Ok, so what's the procedure to resolve differences in opinion? [[User:Dirkt|Dirkt]] 14:16, 21 November 2007 (MST)
:: The task is bad enough as it is (it doesn't really help in comparing programming languages), and it's not improved by allowing "fortunate" border cases which take away the main point. Ok, so what's the procedure to resolve differences in opinion? [[User:Dirkt|Dirkt]] 14:16, 21 November 2007 (MST)
::: To quote the Wikipedia page in question:
:::No official procedure; Just talk about it. I'm at work, currently; I'll be back this evening. You're probably right, but I need to give more thought to it. --[[User:Short Circuit|Short Circuit]] 16:24, 21 November 2007 (MST)
<pre>In computing, a quine is a program, a form of metaprogram, that produces its complete source code as its only output. For amusement, programmers sometimes attempt to develop the shortest possible quine in any given programming language.

Note that programs that take input are not considered quines. This would allow the source code to be fed to the program via keyboard input, opening the source file of the program, and similar mechanisms. Also, a quine that contains no code is ruled out as trivial; in many programming languages executing such a program will output the code (i.e. nothing). Such an empty program once won the "worst abuse of the rules" prize in the Obfuscated C contest.</pre>
::: While the question that Quine investigated implies the quote-interpreting solution, the definition of the problem (per Wikipedia, anyway), doesn't require it. Reading it over, I'll agree that the Lisp example doesn't demonstrate anything one wouldn't get from [[Empty Program]], and would be better replaced with the Scheme/Common Lisp example from the Wikipedia page. I'd have no problem modifying the task description to discard empty programs as trivial, or even requiring the program to use a human-readable output method. Still, the task can still serve to compare languages. Some languages make accessing the source simple, like in the Forth example, or the JavaScript example on the Wikipedia page. Even the string-modifying solution allows for differences between languages; Different languages have different best solutions for replacing a substring.
::: It's not a 1:1 technique comparison, but neither is any task with both functional and procedural language examples. Would you be reasonably satisified if the task was changed to require human-readable output and exclude empty programs? --[[User:Short Circuit|Short Circuit]] 21:35, 21 November 2007 (MST)