NEIQ

From Esolang
Jump to navigation Jump to search

NEIQ, short for "Name Error, Iterating Quine", is a modification of NameError without a quine with a quine without a quine with a quine without a quine with an iterating quine, in which the iterating quine actually works. Simply, NEIQ reinterprets its output. It also has a special feature that if a program has multiple lines, then the output of those lines as programs are outputted one by one, before that itself is reinterpreted.

Example

The program:

secret quine code

initially prints:

Cut it out!

which is then interpreted, which then prints:

Fuck off!

that is itself reinterpreted, outputting:

Cut it out!

which is part of a former state, which means it loops forever.

Numeric NEIQ(NNEIQ)

NEIQ has a numeric variant, in which each unique program/output has a godel encoding:

secret quine code -> 1
Cut it out! -> 2
Fuck off! -> 3
lol no quinz foryou -> 4
sercret quine code -> 5
take a look back at the original -> 6
Traceback (most recent call first): 
 File "<stdin>", line 1, in <module>
JustAnError: Why did you imitate the NameError? -> 7
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
NameError: name 'Traceback (most recent call last):' is not defined -> 8
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
NameError: name '9' is not defined -> 9

and 9 is identical to every other possible program, and ofcourse prints 9 aswell(as shown above). In NEIQ, newlines arent needed, unlike in normal NEIQ. All other characters are ignored.