Linked Questions

1
vote
1answer
433 views

Write a self-aware program [duplicate]

A standard (but disputed) test of self-awareness is the mirror test: An animal is considered self aware if it can recognize itself in the mirror. Your task is to write a program that is self-aware ...
1
vote
1answer
230 views

Write a narcissist program! [duplicate]

A narcissist program is simple. It is related to a quine. If the input is equal to it's source code, it prints a truthy value, if not it prints a falsy one. That is it. Rules: It can't read it's ...
1
vote
0answers
120 views

“Know Thyself” Program [duplicate]

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 ...
204
votes
340answers
46k views

Golf you a quine for great good!

Using your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- that means ...
343
votes
1answer
110k views

Regex that only matches itself

There are some pretty cool challenges out there involving regex (Self-matching regex, Regex validating regex) This may well be impossible, but is there a regex that will ONLY match itself? NOTE, ...
21
votes
11answers
1k views

Cross-matching regular expressions

Your task here is to write two regular expressions, each of which matches the other one but does not match itself. Both regular expressions should have this form: ...
21
votes
11answers
2k views

Interpret your lang, but not yourself?

There are many challenges that say "interpret X", where X is a simple language. In my opinion, that is way too boring. To give all the procrastinating people on the internet something interesting to ...
21
votes
11answers
3k views

Is it a substring of itself?

Given a string, return whether the string is a substring of the program's source code. Standard quine rules apply, meaning you cannot read your own source code. The length of the input is guaranteed ...
19
votes
8answers
2k views

Narcissistic Quine

Write a program/method that: Becomes a quine when the input matches the source code; Doesn't halt otherwise. This is code-golf, so shortest solution wins. Avoid any standard loopholes.
10
votes
15answers
804 views

Transformers in Disguise (Cops' Thread)

The robber's thread is here The cops task is to write a function or program that, when given an input of itself, outputs a finite deterministic string. If the program is given a different input, it ...
3
votes
1answer
173 views

Check if input is permutation of source [duplicate]

Inspired by Input ∩ Source Code. Task Your task is to determine whether the input is a permutation of the source code. Input A string. Input is flexible; it should be able to handle the character ...
1
vote
1answer
114 views

Self-loathing program/function [duplicate]

Simple task, write a program/function that returns error if and only if presented with itself. The program must give a valid output for any input other than itself. For the error part, you can only ...