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.

Pear Wiggler

From Esolang
Jump to navigation Jump to search

Pear Wiggler is an esoteric programming language made by User:Dragoneater67 in 2026.

Overview

Pear Wiggler uses variables for data storage, each variable's name is an unbounded integer, and each variable stores an unbounded integer. Negative ineteger literals are not supported. Variables are defined with this syntax:

var a(b, c)

This creates a variable with name a initialized to a random value between b and c inclusive, b and c cannot be equal. For example:

var 67(6, 7)

Variables can be referenced with this syntax:

%a

Which evaluates to variable a's value. References can be nested in a similar way to C pointers:

%%%a

It is possible to modify a variable's value using the following expression:

a + b

Which adds variable b's value to variable a. It is possible to compare 2 values for equality:

a == b

Which evaluates to 1 if values a and b are equal and 0 if they are not. It is also possible to output a value: <a Which outputs the Unicode character corresponding to a. Inputting values is also supported: >a Which inputs a Unicode codepoint into the variable a. Which evaluates to 1 if a and b are equal and 0 if they are not equal. The only way to do control flow is using the when conditions:

when (statement) {
  code
 }

After each line is executed, for each when condition, if its statement evaluates to a non-zero value, its code is executed. The order in which when conditions are checked is random. }

Examples

XKCD Random Number

<52

Truth machine

var 0(0, 1)
>0
<%0
when (%0==49) {
  <%0
}