So, in the last couple months, I have seen several (especially JavaScript) quines told that they are cheating because they stringify a function. Accordingly, I thought that was the standard - it's reading its source, of course it's cheating.
Wikipedia's section on cheating quines includes the following as an example of reading source, and therefore, cheating:
function a() {
document.write(a, "a()");
}
a()
The accepted answer on the "proper quine" question states that
Furthermore, a quine must not access its own source, directly or indirectly.
However, there are several answers posted since then, on "Golf you a quine for great good", that read a JavaScript function's source, such as this one.
So, the question is: Is fetching a function's source cheating in a quine?
"a()"
encodes thea()
at the end"? \$\endgroup\$It must be possible to identify a section of the program which encodes a different part of the program
, is satisfied by this quine, no problem. But the second,Furthermore, a quine must not access its own source, directly or indirectly
, is quite clearly not. \$\endgroup\$