Very simple, write a program that at first glance appears to be a quine, but is not. Upon running, the program actually prints the source to a real quine, obviously distinct from the original program in some way, preferably creative, but since this is a popularity contest, the answer with the most upvotes wins.

Standard Loopholes which are no longer funny are forbidden.

  • \$\begingroup\$ Can I allow requiring specific input in my answer, or does my program have to work regardless of input? \$\endgroup\$ May 13, 2015 at 17:13
  • \$\begingroup\$ I think it has to work regardless of the input. \$\endgroup\$ May 13, 2015 at 21:05
  • \$\begingroup\$ Why does this question have so many dislikes? \$\endgroup\$
    – xenia
    May 31, 2015 at 12:15
  • \$\begingroup\$ @loovjo I have no idea. Vague? Open ended? \$\endgroup\$ May 31, 2015 at 23:13
  • 4
    \$\begingroup\$ I'm voting to close this question as off-topic because it's an [underhanded] challenge, which was on-topic a year ago, but is now off-topic by community consensus. \$\endgroup\$
    – DJMcMayhem
    Apr 23, 2016 at 20:21

5 Answers 5




Well, whether this looks like a real quine to you depends on whether you're used to CJam or GolfScript, but anyway, it looks like and prints the standard quine:


Wait, isn't that the same thing?

Nope, there's a space at the end of the first code. I believe the same thing would work in almost any language with almost any quine.

Test it here.

  • 3
    \$\begingroup\$ CJam. What can it do? Everything, apparently... \$\endgroup\$ Apr 29, 2015 at 16:44


"Hello, world!"

It's easy: In H9+, anything other than H, 9, or + is ignored, and therefore, this is a quine. Or is it?

Nope. H actually outputs Hello, world!, with no quotes.





The output actually has single quotes instead of double quotes.

Try it here



This one can be quite tricky to newer users.

Function[Print[StringJoin[ToString[FullForm[#0]], "[];"]]][];


Some people might not notice the #0 as not being part of the FullForm. In the output, it is replaced with Slot[0]. Everything else is the same.



Recursion can be tricky at times.

let s = "let s = " ++ show s ++ " in putStrLn s" in putStrLn s

This actually outputs the same as 's = "let s = " ++ show s in putStrLn s', namely 'let s = "let s = \"let s = \\\"let s = \\\\\\\"let s = \\\\\\\\\\\\\\\"let s = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"...'

Basically, Haskell is trying to let s be equal to itself, with let s = appended to it, and escaping the string.

Obviously, in order to escape " you need \", and in order to escape \ you get \\, which is how the long stream of backslashes is formed.


Not the answer you're looking for? Browse other questions tagged or ask your own question.