ABPLWNL
Designed by | Mario0Fan |
---|---|
Appeared in | 2022 |
Dimensions | one-dimensional |
Computational class | Total |
Reference implementation | Interpreter and compiler |
Influenced by | brainfuck |
Influenced | ABPLWNL but with stack !I!M!P!O!S!S!I!B!L!E! |
File extension(s) | {{{files}}} |
- Who needs loops? - Mario0Fan 2022
A Bad Programming Language With No Loops is a Esolang made by User:Mario0Fan
Commands
ABPLWNL has only 2 variables you can use, 10 commands and no loops
Command | Description |
---|---|
1 | Increments A by 1. |
2 | Decrements A by 1 if its not 0 |
3 | Swaps A and B. |
4 | If B is not 0, B is decremented by 1 and A is incremented by 1. |
5 | Adds the value of B to A and sets B to 0. |
6 | Prints the value of B |
7 | Prints an unicode character corresponding to the unicode value of B |
8 | Sets A to 0 |
9 | Sets B to an integer the user has typed in. |
a | Skips the next command if A is equal to 0 |
I didn't know what shortcut to give to these commands, so they're numbers and random letters.
Examples
Here are some examples.
Simple Adder
939536
How it works
First it asks for input (9)
Then it moves the input from B to A (3)
Asks for input again (9)
Adds B to A (5)
The answer is in A so we swap (3) and then print out the value (6)
Hello World program
- thats what you get for not having loops
11111111111111111111111111111111111111111111111111111111111111111111111137311111111111111111111111111111373111111137731113711111111111111111111111111111111111111111111373222222222222372222222222222222222222223731111111111111111111111113731113732222223732222222237137
A hello world program prints out "Hello World!" to the screen. Looking at this... brainfuck isn't that scary now
brainfuck's hello world program:
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
How it works
im not even gonna answer that you just put some numbers in and it works
One Time Cat program
A cat program repeats what you said. But since you cant input a string, it will repeat a integer you said. And since this esolang has no loops its not forever
96
How it works.
It asks the user for input (9)
and prints it out (6)
Interpreter and Compiler
Interpreter
The interpreter I made is made in python, and at the end of the program the interpreter prints out the variables (ex. a= 0 b= 4)
Click here to open the interpreter in replit
Compiler
The compiler just asks for the code and prints out some python code that will do the same thing as the interpreter would if you run the code.