Non

From Esolang
Jump to navigation Jump to search

Non

Non
Paradigm(s) stack based
Designed by HeckYeah100
Appeared in 2025
Computational class Turing complete
Reference implementation Unimplemented
Influenced by BF
File extension(s) .non

This programming language is similar to BF and is intentionally designed to be complex. The script is stack based and has only pure digit output and therefore has no graphical output capabilities.

Commands

The characters/commands of Non are the following:

Instruction Description
`^` Increments the object on the stack.
`,` Decrements the object on the stack.
`p;` Pops the object on the stack and displays its ASCII value (print function).
`s;` Sets a number defined immediately after the `;` and adds it to the top of the stack.
`c;` Clears the stack.
`p; noop` A variation of `p;` that pops the last value but doesn't print; effectively a discard function.
`m;` Sets the top of the stack to a random memory spot, and prints the memory spot's randomly generated name.
`a;` Jumps the program execution back to the top of the script, ignoring the second time it encounters this command (a single loop).

Syntax and Rules

The name of the language is Non for a reason. There is a "non" prefix rule and specific syntax error conditions:

Prohibited Sequences

The compiler checks for specific, strict syntax errors. Please note these rules only apply to the immediately preceding command on the previous line.

  • You can't call `^` (increment) immediately after `,` (decrement).
  • You cannot call `^` (increment) immediately after `p;` (print).
  • You cannot use `,` (decrement) immediately after calling `s;` (set number).

If these rules are not followed, the compiler discards any output upon seeing the syntax error, and also clears the editor, so making a tiny syntax fumble on a big program could cost you the ENTIRE PROGRAM.

If you clear the stack using `c;`, you cannot use `p; noop` anymore for the duration of the program.

Inversion rule (non prefix)

Now, if you're still here, give yourself a pat on the back. but now, prepare to feel pain! Before every line of code, you must precede it with the keyword `non` to invert the operation that follows.

This chart describes the inverse of every operation:

Normal Command Inverse Command (`non [command]`) Description of Inverse
`^` (increment) `,` Decrements the object on the stack.
`,` (decrement) `^` Increments the object on the stack.
`p;` (print) `s;` Sets a number defined after the `;` and adds it to the stack (no print).
`s;` (set number) `p;` Pops the object on the stack and displays its ASCII value.
`c;` (clear stack) `a;` Jumps execution back to the top of the script once.
`m;` (random memory set) `p; noop` Pops the last value but doesn't print (discards it).

Examples

Hello World

Although the syntax rules are diabolical, saying something simple like hello world is easy, or atleast in ascii. To output "Hello World", we must use the inverted form (`non s; [value]`) to print each character, ensuring every line starts with `non`:

non s; 72
non s; 101
non s; 108
non s; 108
non s; 11
non s; 32
non s; 87
non s; 111
non s; 114
non s; 108
non s; 100