Reverse your quine
Challenge
Write a program that prints its reversed self. For example, if your code is
foo()
Then it'll output:
)(oof
Make sure that the quine is a valid one, as defined here:
No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either.
Additionally, your quine may not consist of only one data section. This includes HTML programs without tags (thus only printing their source), and the Golfscript program
1.
Further Rules
- Function answers aren't allowed.
- This is code-golf, so the shortest program in each language wins!
JavaScript (Node.js), 60 bytes …
4y ago
[Haskell], 78 bytes …
4y ago
[Python 3], 69 bytes …
4y ago
Vyxal `D`, 10 bytes ``` `: …
4y ago
4 answers
JavaScript (Node.js), 60 bytes
f=a=>console.log(`)(f;${[...f+``].reverse``.join``}=f`);f()
0 comment threads
Haskell, 78 bytes
main=putStr$reverse$a++show a where a="main=putStr$reverse$a++show a where a="
0 comment threads
Vyxal D, 10 bytes
`:qpṘ`:qpṘ
`:qp `:qp # Standard quine structure
Ṙ Ṙ # Reverse
Or, more interestingly...
Vyxal D, 31 bytes
`q\`:Ė#\`+øm`:Ė#Ė:`mø+`\#Ė:`\q`
`q\`:Ė \`+ `:Ė # Standard eval quine structure
# # Append a #
øm # Palindromise
#... # Padding to make it a palindrome
#Ė:`mø+`\#Ė:`\q`

1 comment thread