1
\$\begingroup\$

Challenge

Write a program that takes as input a text and output "That's me!" if the input is equal to the program own source code, and "That's not me!" otherwise.

Notes

  • This is codegolf, in each programming language the shortest program wins.
  • The input can be taken from program arguments or function argument, and the ouput can be printed or given as a return value.
  • Standard loopholes are forbidden.
\$\endgroup\$
  • \$\begingroup\$ I've also VTC as a duplicate, although it may not be that simple to port any answer from that challenge to this one. Grounds for keeping this variant? \$\endgroup\$ – Jonathan Allan Sep 8 '19 at 14:54
  • 1
    \$\begingroup\$ @JonathanAllan The differences I can see aren't enough IMO, it's very unlikely that a solution from that challenge can't easily change its input source while its language is able to compete here, and the difference in the output strings is negligible. Also, there's a standard "template" for quines in most languages that's probably already used in the other challenge. I have a hammer too, though. \$\endgroup\$ – Erik the Outgolfer Sep 8 '19 at 15:04
  • 1
    \$\begingroup\$ I've voted to reopen this challenge as I feel that, given that it's a quine challenge, the difference between outputting true/anything and outputting 1 of 2 strings make this sufficiently different. Yes, there will be a few solutions to the dupe target that can be trivially modified to be competitive here but there will also be solutions that will need to take a different approach. \$\endgroup\$ – Shaggy Sep 8 '19 at 22:23
  • 4
    \$\begingroup\$ I don't see this as sufficiently different to merit being left open. Looking at the answers to the other challenges, the vast majority of them (at least those in languages I understand) are payload-capable quines to which one could add code to print specified strings, which is enough to make a duplicate. Additionally, this appears to be taking a pre-existing challenge with flexible IO and adding a cumbersome output format, which is a thing to avoid when writing challenges \$\endgroup\$ – pppery Sep 8 '19 at 23:33