Welcome to the official book of MemeLang!
MemeLang is a fun programming lang designed for learning and meme.
yep "Hello, World!"
cookyap and screamsus and nahgrindtouchgrassskillyeet:)Memelang is designed to be fun, easy to learn, and perfect for understanding how programming languages work while enjoying meme-style syntax.
Create variables using any of the following keywords:
letcookspawnsummondropbirth
cook my_var = "Hello, MemeLang!"
spawn num = 42
summon list = [1, 2, 3, 4, 5]
drop flag = true
birth name = "MemeLang"
Display text using any of these keywords:
printyellcow_saymooyapscreamannounceleakbroadcastmeow
print "Hello, World!"
yell "This is MemeLang!"
cow_say "Moo! MemeLang is fun!"
moo "MemeLang is udderly amazing!"
yap "MemeLang is great for learning!"
scream "MemeLang is the best!"
announce "MemeLang is here!"
leak "MemeLang is open source!"
broadcast "MemeLang is taking over the world!"
meow "MemeLang is purrfect!"
Create conditional statements using:
ifsuswhatvibecheckcheckin
if x > 10 {
print "x is greater than 10"
}
sus y == "hello" {
print "y is hello"
}
what z < 5 {
print "z is less than 5"
}
vibecheck a != 0 {
print "a is not zero"
}
checkin b >= 100 {
print "b is at least 100"
}
Use these keywords for alternative execution paths:
elsenahnocapotherwise
if x > 10 {
print "x is greater than 10"
} else {
print "x is not greater than 10"
}
sus y == "hello" {
print "y is hello"
} nah {
print "y is not hello"
}
what z < 5 {
print "z is less than 5"
} no {
print "z is not less than 5"
}
vibecheck a != 0 {
print "a is not zero"
} cap {
print "a is zero"
}
checkin b >= 100 {
print "b is at least 100"
} otherwise {
print "b is less than 100"
}
Repeat code while a condition is true using:
whilegrindfarmloopmaxxing
while x < 10 {
print x
x = x + 1
}
grind y > 0 {
print y
y = y - 1
}
farm z != "done" {
print z
z = get_next()
}
loopmaxxing a <= 100 {
print a
a = a * 2
}
Iterate through collections using:
fortouchgrassrepeatbro
for item in my_list {
print item
}
touchgrass element in my_array {
print element
}
repeatbro num in 1..10 {
print num
}
Define functions using any of these keywords:
fnfunctionskillspellmovetechnique
skill add(a, b) {
yeet a + b
}
function greet(name) {
yeet "Hello, " + name + "!"
}
spell factorial(n) {
if n <= 1 {
yeet 1
} else {
yeet n * factorial(n - 1)
}
}
move max(a, b) {
if a > b {
yeet a
} else {
yeet b
}
}
cook a = 0
cook b = 1
touchgrass item in [1,2,3,4,5,6,7,8] {
yap a
cook next = a + b
a = b
b = next
}
cook i = 1
grind i <= 10 {
yap 5 * i
i = i + 1
}
cook n = 10
grind n > 0 {
yap n
n = n - 1
}
scream "BOOM!"