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.

Moggler

From Esolang
Jump to navigation Jump to search

Moggler is an esoteric programming language by User:Dragoneater67. Its primary goal is to demonstrate the power of The Oracle.

Overview

The program is a list of newline-separated commands. An unbounded nonnegative integer accumulator intialized to 0 is used for data storage. The program halts the program when the end of the program is reached. Halting also resets The Oracle.

Commands
Command Description
+ Increment the accumulator.
- Decrement the accumulator.
[x] Runs x while the accumulator is not 0.
1 Output 1.
0 Output 0.
(x) Send the value of the accumulator to The Oracle. Runs x if it returns 1.

The Oracle

The Oracle is a program with a persistent internal unbounded nonnegative integer accumulator initialized to 1, it compares the value of the input to the internal accumulator, if its equal, it increments the internal accumulator and returns 1, else, it returns 0.

Examples

Looping counter

+
[
(
[
-
1
]
0
)
+
]

Quine

0

External resources