"Know Thyself" Program

1

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.

Ethan

Posted 2019-09-08T14:41:58.787

Reputation: 127

Question was closed 2019-09-08T23:38:05.620

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? – Jonathan Allan – 2019-09-08T14:54:43.310

1@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. – Erik the Outgolfer – 2019-09-08T15:04:34.697

1I've voted to reopen this challenge as I feel that, given that it's a [tag: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. – Shaggy – 2019-09-08T22:23:09.483

4

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

– pppery – 2019-09-08T23:33:35.717

No answers