Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Reverse your quine

+2
−0

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

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

New line at the end (2 comments)

4 answers

+3
−0

JavaScript (Node.js), 60 bytes


f=a=>console.log(`)(f;${[...f+``].reverse``.join``}=f`);f()

Try it online!

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+3
−0

Haskell, 78 bytes

main=putStr$reverse$a++show a where a="main=putStr$reverse$a++show a where a="

Try it online!

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

+2
−0

Python 3, 69 bytes

i="))43,]1-::[i,43,73(%ci(tnirp;%c%s%c=i";print(i%(37,34,i[::-1],34))

Try it online!

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

67 bytes (1 comment)
+2
−0

Vyxal D, 10 bytes

`:qpṘ`:qpṘ

Try it Online!

`:qp `:qp  # Standard quine structure
    Ṙ    Ṙ # Reverse

Or, more interestingly...

Vyxal D, 31 bytes

`q\`:Ė#\`+øm`:Ė#Ė:`mø+`\#Ė:`\q`

Try it Online!

`q\`:Ė \`+  `:Ė     # Standard eval quine structure
      #             # Append a #
          øm        # Palindromise
               #... # Padding to make it a palindrome

#Ė:`mø+`\#Ė:`\q`
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »