Numbers

Numbers is an esolang that I made centered around the fact that all commands are numbers (except for one). You can see its page on the Esolangs Wiki here. There is also a python interpreter with more thorough documentation here

What are the commands?

Assuming you know how these things work, it is stack-based and has 29 commands split into four categories.

Category 1: Operations

CommandAction
10Adds the top two values on the stack
11Subtracts the top two values on the stack
12Multiplies the top two values on the stack
13Divides the top two values on the stack
14Floor divides the top two values on the stack
15Modulos the top two values on the stack
16Increments the top value on the stack
17Decrements the top value on the stack
18Finds the Digital Root of the top value on the stack
19Finds the factorial of the top value on the stack

Category 2: Stack Manipulation

Don't be worried by that title, these are just commands that do things to the actual stack or the order of the items in the stack.

CommandAction
20Pushes its following value onto the stack. This command also has an alias: *. Prepend it to a number to push it to the the stackā€”e.x.: *5 which pushes 5 to the stack and is the same as 20 5 but shorter.
21Reverses the stack
22Swaps the top two values on the stack
23Discards the top value on the stack
24Sets the Control Accumulator to the top value on the stack and discards it
25Pushes the Control Accumulator's value onto the stack
26Duplicates the top value on the stack
27Clears the stack

Category 3: Input/Output

CommandAction
30Outputs the first item on the stack
31Outputs the first item on the stack as an ASCII character
32Outputs the entire stack in the format "1st-item 2nd-item 3rd-item"
33Outputs the entire stack as an ASCII string
34Takes input from the user as an integer and pushes it onto the stack
35Takes input from the user as an ASCII character and pushes its ASCII value onto the stack
36Takes input from the user as an ASCII string and pushes each character's ASCII value onto the stack

Category 4: Control Flow

These are commands that control the flow of the program

CommandAction
40Only does the next instruction if the Control Accumulator is not 0
41Only does the next instruction if the Control Accumulator is 0
42Goto
44Declares functions
45Takes the top value off the stack and treats it as a function, then applies that function to each following number, pushing the results to the stack until finding a closing 45
46Loads modules
~Halts/Ends the program

Why am I still Confused?

That's OK, these sorts of languages are designed to be confusing and downright weird, but it's for fun. I'll give you some example programs. Just copy-past them into the code-runner below

A program that outputs "Hello, world!":
*20 45 72 101 108 108 111 32 87 111 114 108 100 33 45 33

This one repeats what you say
36 33

And the last one is a simple adder that will ask for two addends and output their sum:
34 34 10 30

The Interpreter: code that runs code

Just put your Numbers code in the box, press the button and your output will show below. Enjoy!



Output here...