We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Narcissus

From Esolang
Jump to navigation Jump to search

Narcissus is an esolang invented by User:None1 where every program is a Narcissist or Narcissus program.

Every program in this esolang reads input. If the input is the same as the source code, print 1, otherwise 0.

Examples

Narcissist

Any text can go here

Or:

N

Interpreter

Python

import sys
code=open(sys.argv[1]).read()
print(int(sys.stdin.read()==code))