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

Dashboard
Notifications
Mark all as read
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

Why does this post require moderator attention?
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!

Why does this post require moderator attention?
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!

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

+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`
Why does this post require moderator attention?
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!

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

67 bytes (1 comment)

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!