Eniuq

Eniuq is a stack- and queue-based esoteric programming language in which it is impossible to write nontrivial quines, but flow control is done by the methods normally used for quines. It was invented by Edward Cree.

This is because the "output" operators actually append to the program stream (the 'queue' in eniuq terminology); the only way to output something is to encounter an invalid operator.

All operators are single characters, but not all characters are operators; those that are not will be output and otherwise have no effect.

All values are 32-bit unsigned integers.

Eniuq has no built-in facilities for named variables, procedures, or functions.

Operators
The operators are:

There is a preprocessor,, which encodes backtick  followed by any character to something that will store that character on the stack. So, for instance,  becomes. Also, any text enclosed in "double quotes" is converted into reversed backtick form; thus  is equivalent to.

Quines
Any program which does not contain any operators is trivially a quine; for instance, while we can't write a Hello World program (because  and , being operators, can't be output), we can write the following: 'Sup, Earth This is a quine, because none of its constituent characters is a valid operator, so each is written to stdout with no side-effects.

No program containing operators is a quine.

Flow Control
It's quite difficult to do flow control, because there aren't any conditional statements. What you typically have to do is have your actual program code on the stack, and then compute bits of your program, write them to the queue, and thus have them executed. So, a simple loop would be: `O`5`D`5`A5D5O This prints an infinite sequence of AAAAAAAAAAAAAAAAAAAAA...

A more sophisticated loop, with a termination condition, appears in "unary.en", which nukes the loop body code with a `K' when the termination condition is true (that is, when the loop counter reaches zero), and otherwise reiterates it with an `O'.

Implementation
The interpreter can be found here (Version 0.3, source tarball).

The tarball also contains documentation and some sample programs (of sharply limited utility).

Implementation Limits
The stack is limited to 256 items, and the queue to 1024 instructions. Overflowing either of these limits produces a runtime error; for example, try running qoverrun.enp, which is designed to produce a queue overrun: each time it executes one, it queues two more of them.

Interpreter Usage
To run an .enp file, use. The switch -d enables debugging output; it's rather voluminously verbose.

To preprocess an .en file, use.