Loli

From Esolang
Jump to navigation Jump to search

Loli is an esolang made by User:Huanying04, that makes the code looks like a little girl's daily or something.

Specification

School Bag

Declaring a value will initially put it inside the school bag. If the variable is inside the school bag, the variable is unusable, you must take it out to use it.

Location

It must be home when the program ends, or it is too dangerous for a little girl to stay outside. (Or the program will warn you!)

Commands

Command Function Example
Awake It is necessary to starting a program. Awake
Sleep End the program. Sleep
Say VAR Print VAR on screen.
If there's whitespaces in the string, it must stay in the quotation mark.
It also allow escape sequences like \n, \t, \r, \b, \0, \\, \', \"
Say A prints a
Say "Hello, world!" prints Hello, world!
Put VAR into school bag

Declares a variable that initially be inside school bag, or if VAR is in hand, it will put VAR into school bag.
The variable initial value is the sum of the weight of each character in the variable name. (case-insensitive)

Variable character weights
Character Weight Character Weight Character Weight
0 1 a 8 n 6
1 1 b 1 o 7
2 1 c 2 p 1
3 1 d 4 q 1
4 1 e 12 r 5
5 1 f 2 s 6
6 1 g 2 t 9
7 1 h 6 u 2
8 1 i 6 v 1
9 1 j 1 w 2
k 1 x 1
l 4 y 2
m 2 z 1

Put chocolate into school bag declares a value whose initial value is 57.

Take out VAR from school bag Take out VAR from school bag. Take out chocolate from school bag
Speak VAR
Show VAR
Prints the value of VAR Speak English
Show chocolate
Clearly speak VAR
Simply speak VAR
Clearly show VAR
Simply show VAR
Prints the value of VAR without fraction. Simply speak English
Clearly show chocolate
Call VAR Prints the character that the unicode is same as the value of VAR Call chocolate
Have VAR
Take VAR
Save the input value to VAR.
If the input value is not a number, it saves the sum of the unicode of each character in the input.
Have lunch
Go LOCATION
Go to LOCATION
Go to the location whose name is LOCATION Go to school
Dump VAR
Eat VAR
Drink VAR
Delete variable VAR Eat cake
Replace V1 with V2
Throw away V1 and replace with V2
Same as C V1 = V2 Replace sugar with salt
Add V1 to V2 Same as C V2 += V1 Add egg to bowl
Add A and B together into C
Mix A and B together into C
Put A and B together into C
Same as JavaScript var C = A + B Mix salt and water together into glass
Take V1 out of V2
Drop V1 out of V2
Drop V1 from V2
Give out V1 from V2
Same as C V2 -= V1 Take paper out of folder
Slice V1 into N1 C and take N2
Cut V1 into N1 C and take N2
Split V1 into N1 C and take N2
Same as C V1 = V1 / N1 * N2
C can be any measure word.
Slice cake into 3 pieces and take 1
Keep V When V is not 0, it loops the script under this line that starts with 1 tab, even the line is empty must also add a tab into it.
Keep a
	Slice b into j parts and take -1
	Drop 1 from a
Fuck Any line contains the word will throw an error an stop running.

Examples

Hello World

Awake
Say "Hello world!\n"
Sleep

truth-machine

Awake

Put b into school bag
Take out b from school bag

Take input

Slice input into 2 parts and take 1
Add b and input together into whatever

Keep input
	Clearly show input
	Replace input with whatever

Clearly show input

Sleep

Disan Count

Awake

Take book

Put zero into school bag
Take out zero from school bag
Drop zero from zero

Put chocolate into school bag
Take out chocolate from school bag
Replace chocolate with book
Drop chocolate from zero
Replace chocolate with zero
Add zero and book together into another book
Replace zero with another book
Dump another book

Put b into school bag
Take out b from school bag

Put cake into school bag
Take out cake from school bag
Replace cake with b

Keep chocolate
	Add chocolate and book together into chocolate book
	
	Put strawberry book into school bag
	Take out strawberry book from school bag
	Replace strawberry book with chocolate book
	
	Keep chocolate book
		Slice cake into b parts and take -1
		Drop b from chocolate book
	
	Add cake and b together into blueberry cake
	Replace cake with blueberry cake
	Eat blueberry cake
	
	Keep cake
		Clearly show strawberry book
		Say " is even!"
		Drop b from cake
		Drop b from cake
	
	Replace cake with b
	
	Add chocolate and b together into blueberry chocolate
	Replace chocolate with blueberry chocolate
	Eat blueberry chocolate
	
	Eat chocolate book
	Eat strawberry book

Sleep

99 bottles of beer

Awake

Put ou programming language into school bag
Take out ou programming language from school bag

Put 1 into school bag
Take out 1 from school bag

Put ca into school bag
Take out ca from school bag

Put whatever into school bag
Take out whatever from school bag

Keep ou programming language
	Clearly show ou programming language
	Say " bottles of beer on the wall, "
	
	Clearly show ou programming language
	Say " bottles of beer."
	
	Call ca
	
	Say "Take one down, pass it around, "
	
	Drop 1 from ou programming language
	Clearly show ou programming language
	Say " bottles of beer on the wall."
	
	Call ca
	Call ca

Sleep

Fibonacci sequence

Awake

Take purse

Put $ into school bag
Take out $ from school bag

Put % into school bag
Take out % from school bag

Put Mif into school bag
Take out Mif from school bag

Drop $ out of purse
Drop % out of purse

Clearly show $
Call Mif
Clearly show %
Call Mif

Keep purse
	Add $ and % together into delicious thing
	Replace $ with %
	Replace % with delicious thing
	Clearly show delicious thing
	Eat delicious thing
	Call Mif
	Drop 1 from purse

Sleep

Calculator

But when multiplying, the multiplier must not be fraction number or the program will never end.

Awake

Take paper
Take pigment
Take fragment

Put uwu water into school bag
Take out uwu water from school bag

Put folder into school bag
Take out folder from school bag
Drop folder from folder
Drop uwu water from folder
Replace uwu water with folder
Drop uwu water from folder

Add uwu water to pigment

Keep pigment
	Drop 1 from pigment
	Keep pigment
		Drop bb from pigment
		Keep pigment
			Cut paper into fragment shape and take 1
			Show paper
			Sleep
		Drop fragment from paper
		Show paper
		Sleep
	Add paper to fragment
	Show fragment
	Sleep

Keep fragment
	Add paper to folder
	Drop 1 from fragment
Show folder

Sleep

External resources