Literally every golflang ever/Esopage
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
This is literally every golflang ever but looks more like a normal esolang page.
The original description was a little bit vague, so I used my best guess.
The language is stack-based.
There are three datatypes: numbers, strings, and lambdas.
The stack contains a single item - the input at beginning.
Commands
Hello Worlds and 99 bottles of beer
There are 8 commands devoted to printing out variations of "Hello World".
Command | Hello World printed |
---|---|
h |
prints Hello world
|
H |
prints Hello World
|
h, |
prints Hello, world
|
H, |
prints Hello, World
|
h! |
prints Hello world!
|
H! |
prints Hello World!
|
h,! |
prints Hello, world!
|
H,! |
prints Hello, World!
|
b
prints the lyrics to 99 bottles of beer, last lyric being "0 bottles of beer on the wall, 0 bottles of beer!"
B
prints the lyrics to 99 bottles of beer, last lyric being "0 bottles of beer on the wall, 0 bottles of beer!\nGo to the store and buy some more, 99 bottles of beer on the wall!"
Stack Manipulation
These are the commands that manipulate the stack in some way.
Command | What it does |
---|---|
f |
push the [POP]th fibbonacci number
|
l |
push the [POP]th lucas number
|
! |
push [POP] factorial
|
p |
push the [POP]th prime number
|
P |
If the string [POP] is a palindrome, push 1. else, push 0.
|
D |
push the number [POP]'s digital root
|
% |
swap
|
+ |
increment top of stack
|
- |
decrement top of stack
|
"[string]" |
push string to stack. Escape codes:\\ → \, \" → "
|
'[character] |
a quick way to push a single character. 'x is equivalent to "x". |
0 |
pushes 0
|
1 |
pushes 1
|
2 |
pushes 2
|
3 |
pushes 3
|
4 |
pushes 4
|
5 |
pushes 5
|
6 |
pushes 6
|
7 |
pushes 7
|
8 |
pushes 8
|
9 |
pushes 9
|
q |
pushes 10
|
w |
pushes 11
|
e |
pushes 12
|
t |
pushes 13
|
y |
pushes 14
|
u |
pushes 15
|
o |
pushes 16
|
a |
pushes 17
|
s |
pushes 18
|
g |
pushes 19
|
j |
pushes 20
|
k |
pushes 21
|
n |
pushes 22
|
Q |
pushes 23
|
W |
pushes 24
|
E |
pushes 25
|
R |
pushes 26
|
T |
pushes 27
|
U |
pushes 28
|
O |
pushes 29
|
A |
pushes 30
|
G |
pushes 31
|
J |
pushes 32
|
L |
pushes 33
|
V |
pushes 34
|
N |
pushes 35
|
M |
pushes 36
|
< |
Pop two values, the program, then the text input. Then interpret as brainfuck code with the given input.EOF=0.
|
> |
Interprets deadfish with the initial accumulator set to [POP]
|
^ |
Evaluate top of stack as code.
|
i |
push a string containing the the first [POP] digits of pi.
|
r |
push the ROT13 encrypted version of [POP]
|
$ |
convert top of stack to leetspeak
|
& |
pop top two values, then push their bitwise and
|
pop top two values, then push their bitwise or
| |
~ |
pop top value, then push it's bitwise NOT. Strings are treated as UTF-8 and numbers are two's complement.
|
, |
pop and discard top of stack
|
* |
pop top two values x and y, then push x/y. x is popped first.
|
= |
Pop two values x and y.push a random number between 1 and x if x is equal to y, otherwise push a string containing the contents of y.
|
. |
print and discard top of stack
|
Lambda handling
There are some commands that handle lambdas (anonymous functions).
Commands | What it does |
---|---|
` |
pops top two lambdas x and y, then push the result of y(x).x is popped first.
|
I |
pushes the lambda λx. x
|
K |
pushes the lambda λxy. x
|
S |
pushes the lambda λxyz. xz(yz)
|
M |
pushes the lambda λx. xx
|
X |
pushes the lambda λf. F(λx. f(xx))
|
Y |
pushes the lambda λf. (λx. f(xx))(λx. f(xx))
|
y |
pushes the lambda (λxy. y(xxy))(λxy. y(xxy))
|
X |
pushes the lambda λf. F(λx. f(xx))
|
Z |
pushes the lambda λf. F(λx. f(λv. xxv))
|
x |
pushes the lambda F(λxy. y(xxy))
|
z |
pushes the lambda F(λxyz. y(xxy)z)
|
In the above table, F=λx. x x
Control Flow
Command | What it does |
---|---|
# |
loop to start of program
|
/ |
halts execution
|
(space) |
nop
|
\ |
halts with a segfault
|
_ |
performs a command at random
|
[ |
Jumps to the matching ] if the top of stack is zero
|
] |
Jumps to the matching [ if the top of stack isn't zero
|
{ |
Jumps to the matching } if the top of stack isn't zero
|
} |
Jumps to the matching { if the top of stack is zero
|
( |
Jumps to the matching ) if the top of stack is zero
|
: |
Jumps to the matching ; if the top of stack isn't zero
|
) |
Label for (
|
; |
Label for :
|
Other commands
Command | What it does |
---|---|
d |
runs the disan count program
|
? |
runs the truth machine program
|
F |
Run the FizzBuzz program
|
F! |
Run the FizzBuzz program but every Fizz and Buzz is prepended with an exclamation mark
|
c |
Pop two values x and y, then count from x to y in unary.x is popped first.
|
C |
Pop two values x and y, then count from x to y in decimal.x is popped first.
|
@ |
print the letter @
|
s |
print the letter s
|
Special commands
m
pops 5 values w,h,x,y,s
,then prints a cropped ASCII art Mandelbrot set zoomed s times at the point (x,y). You can only see a rectangle crop from it that starts from (x-(w/2),y-(h/2)) and has a width of (w,h). The ASCII grdient used is " .:-=+*#%@"
v
runs the executable C:\Riot Games\VALORANT\live\VALORANT.exe
if it can find it. This was created as a joke.