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.

User contributions for Dragoneater67

From Esolang
Jump to navigation Jump to search

User contributions for Dragoneater67 is an esoteric programming language made by User:Dragoneater67 in 2026.

Overview

The program is a sequence of instructions executed left-to-right, it halts after the last instruction has been executed. There is an unbounded deque of bytes and a direction bit, if the direction bit is 0, the instructions push/pop, else they inject/eject. The instruction set is stored in a hash table where keys are bytes and values are a pair of an unbounded queue of bytes that represents the instruction's code and a byte that represents the flags. Here is the initial instruction set:

User contributions for Dragoneater67 initial instruction table
Instruction Description
1 Push/inject 1.
+ Pop/eject 2 bytes, add them, push/inject the result.
! Pop/eject 2 bytes, enqeueue the 2nd byte to the code of the instruction at the 1st byte. Does nothing if the instruction's code is immutable.
? Pop/eject a byte, dequeue a byte from the code of the instruction at the popped/ejected byte and push/inject the dequeued byte.
` Pop/eject 2 bytes, set the flags of the instruction at the 1st byte to the 2nd byte. Does nothing if the instruction's flags are immutable.
~ Pop/eject a byte, push/inject the flags of the instruction at the popped/ejected byte.
. Pop/eject a byte, output it as an ASCII character.
, Input an ASCII character and execute it as an instruction.
| Flip the direction bit.
Everything else Do nothing.

All flags are initially set to 0, except for ,, whose flags are initially 00100000. The flags are encoded in a byte in this format (note that bits are 0-indexed and are big-endian):

Flag encoding table
Bit number Meaning
0 If set, the instruction's code is immutable.
1 If set, the instruction's flags are immutable.
2 If set, the instruction cannot be executed by an input instruction.
3 If set, the instruction cannot be executed by an another instruction's code.
4 If set, the instruction cannot be executed by the program's code.
5 If set, the instruction is an input instruction.
6 If set, the instruction runs its code instead of following its initial behavior.
7 If set, the instruction halts the program upon execution, this overrides both its code and its initial behaviour.

Examples

XKCD Random Number

1111111111111111111111111111111111111111111111111111+++++++++++++++++++++++++++++++++++++++++++++++++++.

Infinite loop

1111111111111111111111111111111111+++++++++++++++++++++++++++++++++1111111111111111111111111111111111+++++++++++++++++++++++++++++++++!1111111111111111111111111111111111111111111111111111111111111111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++1111111111111111111111111111111111+++++++++++++++++++++++++++++++++`"

Truth machine

Can be seen here

Looping counter

Can be seen here

Self-interpreter

11111111111111111111111111111111111111111111+++++++++++++++++++++++++++++++++++++++++++1111111111111111111111111111111111+++++++++++++++++++++++++++++++++!1111111111111111111111111111111111+++++++++++++++++++++++++++++++++1111111111111111111111111111111111+++++++++++++++++++++++++++++++++!1111111111111111111111111111111111111111111111111111111111111111+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++1111111111111111111111111111111111+++++++++++++++++++++++++++++++++`"