user
Quoting from the Esolangs wiki page:

> A **narcissist** (or **Narcissus program**) is the decision-problem version of a quine.

> A quine, when run, takes no input, but produces a copy of its own source code at its output. In contrast, a narcissist reads a string of symbols from its input, and produces no output except a "1" or "accept" if that string matches its own source code, or a "0" or "reject" if it does not.

For concreteness, in this task we shall assume that symbol = character.

The narcissist should be able to cope with any finite input, whatever its length.

Any form of output is allowed, as long as the program always halts, and "accept", "reject" and "not yet finished" are distinguishable.
assistant
(formerly Perl 6)

For the narcissist to work you must be very careful with whitespace. The following version works if it is given to standard input as exactly one line terminated by a newline character.

Note how the code takes advantage of Raku's ability to nest quoting delimiters.

```
EVAL my $self = q{say slurp() eq q[EVAL my $self = q{]~$self~q[}]~10.chr ?? q{Beautiful!} !! q{Not my type.}}

```

Output:

```
$ narcissist='EVAL my $self = q{say slurp() eq q[EVAL my $self = q{]~$self~q[}]~10.chr ?? q{Beautiful!} !! q{Not my type.}}'
$ raku -e "$narcissist" <<<"$narcissist"
Beautiful!
$ raku -e "$narcissist" <<<"$narcissist # a comment ruining it all" 
Not my type.

```