Version: 0.1.0 For: AI systems quickly referencing Gen Z Lang syntax and APIs
rizz name = value # Declare
name = new_value # Assign
yeet expression # Print
fr fr expression # Emphasized print
rizz input = vibe check "prompt"
rizz input = lowkey ask "prompt"
ngl Single line comment
tea: Multi-line
comment :tea
# If-else
vibe? condition:
statements
no vibe? condition:
statements
dead:
statements
# While loop
keep slaying while condition:
statements
dip # break
skip it # continue
# For loop (range)
grind from i = start to end:
statements
# For loop (iterator)
grind from item in iterable:
statements
main character name(param1, param2):
statements
send it value
result = name(arg1, arg2)
# Arithmetic
+ - * / % ^
# Comparison
no cap # ==
cap # !=
lowkey < # <
lowkey <= # <=
highkey > # >
highkey >= # >=
# Logical
and or nah # AND OR NOT
# Assignment
=
42 # Integer
3.14 # Float
"string" # String
'string' # String
bussin # True
mid # False
Converts value to integer.
rizz num = glow_up("42") # 42
rizz rounded = glow_up(3.9) # 3
Parameters:
value: String or number to convert
Returns: Integer value
Errors: ValueError if conversion fails
Converts value to string.
rizz text = vibe_shift(42) # "42"
rizz bool_str = vibe_shift(bussin) # "True"
Parameters:
value: Any value to convert
Returns: String representation
Converts value to floating-point number.
rizz decimal = energy("3.14") # 3.14
rizz float_num = energy(42) # 42.0
Parameters:
value: String or number to convert
Returns: Float value
Errors: ValueError if conversion fails
Returns length of string or iterable.
rizz len = ick("hello") # 5
rizz str_len = ick("Gen Z") # 5
Parameters:
value: String or iterable
Returns: Length as integer
Errors: TypeError for non-iterable types
Returns current Unix timestamp.
rizz now = slay_time() # e.g., 1703001234
rizz timestamp = slay_time()
Parameters: None
Returns: Current timestamp in seconds since epoch
Returns random number between 0.0 and 1.0.
rizz rand = random_vibe() # e.g., 0.7834521
rizz probability = random_vibe()
Parameters: None
Returns: Random float in range [0.0, 1.0)
program → statement* EOF
statement → varDecl | assignment | printStmt
| ifStmt | whileStmt | forStmt
| funcDef | returnStmt
| breakStmt | continueStmt | exprStmt
varDecl → "rizz" IDENTIFIER "=" expression NEWLINE
assignment → IDENTIFIER "=" expression NEWLINE
printStmt → ("yeet" | "fr" "fr") expression NEWLINE
ifStmt → "vibe?" expression ":" block
("no" "vibe?" expression ":" block)*
("dead" ":" block)?
whileStmt → "keep" "slaying" "while" expression ":" block
forStmt → "grind" "from" IDENTIFIER ("=" expression "to" expression | "in" expression) ":" block
funcDef → "main" "character" IDENTIFIER "(" params? ")" ":" block
returnStmt → "send" "it" expression? NEWLINE
breakStmt → "dip" NEWLINE
continueStmt → "skip" "it" NEWLINE
exprStmt → expression NEWLINE
block → INDENT statement+ DEDENT
params → IDENTIFIER ("," IDENTIFIER)*
arguments → expression ("," expression)*
expression → logical
logical → comparison (("and" | "or") comparison)*
comparison → term (compOp term)*
compOp → "no" "cap" | "cap" | "lowkey" ("<" | "<=") | "highkey" (">" | ">=")
term → factor (("+" | "-") factor)*
factor → unary (("*" | "/" | "%") unary)*
unary → ("-" | "nah")? power
power → primary ("^" primary)*
primary → NUMBER | STRING | "bussin" | "mid"
| IDENTIFIER ("(" arguments? ")")?
| ("vibe" "check" | "lowkey" "ask") expression
| "(" expression ")"| Level | Operators | Associativity | Example |
|---|---|---|---|
| 1 (lowest) | or |
Left | a or b or c |
| 2 | and |
Left | a and b and c |
| 3 | no cap, cap, lowkey <, lowkey <=, highkey >, highkey >= |
Left | a no cap b |
| 4 | +, - |
Left | a + b - c |
| 5 | *, /, % |
Left | a * b / c |
| 6 | nah, - (unary) |
Right | nah a, -a |
| 7 (highest) | ^ |
Right | 2 ^ 3 ^ 2 = 512 |
grind from i = 0 to 9:
yeet i
rizz count = 0
keep slaying while count lowkey < 10:
yeet count
count = count + 1
rizz valid = mid
keep slaying while nah valid:
rizz input = vibe check "Enter number: "
rizz num = glow_up(input)
vibe? num highkey > 0:
valid = bussin
dead:
yeet "Must be positive!"
main character process(value):
vibe? value lowkey < 0:
send it mid
send it bussin
main character factorial(n):
vibe? n lowkey <= 1:
send it 1
send it n * factorial(n - 1)
main character make_counter():
rizz count = 0
main character increment():
count = count + 1
send it count
send it increment
rizz counter = make_counter()
yeet counter() # 1
yeet counter() # 2
main character apply(func, value):
send it func(value)
main character double(x):
send it x * 2
yeet apply(double, 5) # 10
main character create_toggle():
rizz state = mid
main character toggle():
vibe? state:
state = mid
dead:
state = bussin
send it state
send it toggle
rizz switch = create_toggle()
yeet switch() # True
yeet switch() # False
main character filter_positive(size):
rizz result_count = 0
grind from i = 0 to size - 1:
vibe? i highkey > 0:
yeet i
result_count = result_count + 1
send it result_count
rizz message = "Hello"
message = message + ", "
message = message + "World"
message = message + "!"
yeet message # "Hello, World!"
main character safe_divide(a, b):
vibe? b no cap 0:
yeet "Error: Division by zero"
send it 0
send it a / b
main character validate_age(age):
vibe? age lowkey < 0:
send it mid
vibe? age highkey > 150:
send it mid
send it bussin
main character process_data(data):
vibe? data no cap 0:
send it mid
vibe? data lowkey < 0:
send it mid
ngl Main logic here
send it bussin
main character is_number(value):
ngl Try to convert - if it fails, not a number
rizz num = glow_up(value)
vibe? num no cap num: # If conversion succeeded
send it bussin
send it mid
main character stringify(value):
ngl Convert any type to string
send it vibe_shift(value)
main character create_array():
rizz v0 = 0
rizz v1 = 0
rizz v2 = 0
rizz size = 0
main character get(i):
vibe? i no cap 0:
send it v0
no vibe? i no cap 1:
send it v1
no vibe? i no cap 2:
send it v2
send it 0
main character set(i, val):
vibe? i no cap 0:
v0 = val
no vibe? i no cap 1:
v1 = val
no vibe? i no cap 2:
v2 = val
main character api(method):
vibe? method no cap "get":
send it get
no vibe? method no cap "set":
send it set
send it mid
send it api
rizz arr = create_array()
rizz set_func = arr("set")
rizz get_func = arr("get")
set_func(0, 42)
yeet get_func(0) # 42
main character create_dict():
rizz key0 = ""
rizz val0 = 0
rizz key1 = ""
rizz val1 = 0
main character put(k, v):
vibe? key0 no cap "":
key0 = k
val0 = v
no vibe? key1 no cap "":
key1 = k
val1 = v
main character get(k):
vibe? key0 no cap k:
send it val0
no vibe? key1 no cap k:
send it val1
send it 0
main character api(method):
vibe? method no cap "put":
send it put
no vibe? method no cap "get":
send it get
send it mid
send it api
main character binary_search(target, low, high):
keep slaying while low lowkey <= high:
rizz mid = (low + high) / 2
vibe? mid no cap target:
send it mid
no vibe? mid lowkey < target:
low = mid + 1
dead:
high = mid - 1
send it -1
main character bubble_sort(size):
grind from i = 0 to size - 1:
grind from j = 0 to size - i - 2:
ngl Compare and swap
yeet "Sorting..."
main character fibonacci(n):
vibe? n lowkey <= 1:
send it n
send it fibonacci(n - 1) + fibonacci(n - 2)
main character gcd(a, b):
keep slaying while b cap 0:
rizz temp = b
b = a % b
a = temp
send it a
main character power(base, exp):
vibe? exp no cap 0:
send it 1
vibe? exp no cap 1:
send it base
rizz half = power(base, exp / 2)
vibe? exp % 2 no cap 0:
send it half * half
send it base * half * half
main character assert(condition, message):
vibe? nah condition:
yeet "ASSERT FAILED: "
yeet message
dead:
yeet "PASS: "
yeet message
main character run_tests():
yeet "=== Running Tests ==="
ngl Test 1
rizz result1 = my_function(5)
assert(result1 no cap 10, "my_function(5) should equal 10")
ngl Test 2
rizz result2 = my_function(0)
assert(result2 no cap 0, "my_function(0) should equal 0")
yeet "Tests complete"
genz program.genzpython3 -c "
from genzlang.lexer import Lexer
from genzlang.parser import Parser
from genzlang.interpreter import Interpreter
source = '''
rizz x = 10
yeet x
'''
lexer = Lexer(source)
tokens = lexer.tokenize()
parser = Parser(tokens)
ast = parser.parse()
interpreter = Interpreter()
interpreter.interpret(ast)
"ngl Program description at top
ngl Helper functions
main character helper1():
statements
main character helper2():
statements
ngl Main program logic
rizz data = init()
process(data)
output(result)
ngl Utility library
ngl Configuration
rizz CONFIG_VALUE = 100
ngl Public API functions
main character public_function1():
statements
main character public_function2():
statements
ngl Private helper functions
main character _private_helper():
statements
ngl Main execution
main character main():
ngl Program entry point
statements
ngl Run main if executed directly
main()
ngl Bad
grind from i = 0 to 100:
yeet expensive_function()
ngl Good
rizz result = expensive_function()
grind from i = 0 to 100:
yeet result
ngl Bad for large n (stack overflow)
main character factorial_recursive(n):
vibe? n lowkey <= 1:
send it 1
send it n * factorial_recursive(n - 1)
ngl Good for large n
main character factorial_iterative(n):
rizz result = 1
grind from i = 2 to n:
result = result * i
send it result
main character find_value(target, size):
grind from i = 0 to size - 1:
vibe? i no cap target:
send it i # Return immediately
send it -1
ngl Expensive check only runs if cheap check passes
vibe? cheap_condition() and expensive_check():
statements
Division always returns float:
rizz result = 5 / 2 # 2.5, not 2
Variables must be declared before use:
main character test():
rizz local = 10
yeet local # ERROR: undefined variable
Functions capture variables from enclosing scope:
rizz x = 10
main character get_x():
send it x # Captures x from outer scope
x = 20
yeet get_x() # 20, not 10
rizz result = 2 + 3 * 4 # 14, not 20
rizz result = 2 ^ 3 ^ 2 # 512, not 64 (right-associative)
vibe? 0: # False
vibe? "": # False
vibe? bussin: # True
vibe? "hello": # True
vibe? 1: # True
| Keyword | Type | Usage |
|---|---|---|
and |
Operator | Logical AND |
bussin |
Literal | True |
cap |
Operator | Not equal (!=) |
dead |
Control | Else |
dip |
Control | Break |
fr |
Output | Part of "fr fr" |
grind |
Control | For loop |
from |
Control | Part of "grind from" |
highkey |
Operator | Greater than prefix |
in |
Control | Iterator |
it |
Control | Part of "send it", "skip it" |
keep |
Control | Part of "keep slaying while" |
lowkey |
Operator | Less than prefix |
main |
Declaration | Part of "main character" |
mid |
Literal | False |
nah |
Operator | NOT |
ngl |
Comment | Single-line comment |
no |
Operator/Control | Part of "no cap", "no vibe?" |
or |
Operator | Logical OR |
rizz |
Declaration | Variable declaration |
send |
Control | Part of "send it" (return) |
skip |
Control | Part of "skip it" (continue) |
slaying |
Control | Part of "keep slaying while" |
tea |
Comment | Multi-line comment delimiters |
to |
Control | Range loop |
vibe |
Input/Control | Part of "vibe check", "vibe?" |
while |
Control | While loop |
yeet |
Output |
These keywords may be added in future versions:
class/squad_type- Classesimport/cop- Modulestry/catch it- Exceptionsasync/wait for it- Async/awaitwith/vibe with- Context managersmatch/check vibes- Pattern matchinglambda/quick- Anonymous functions
This API reference provides complete, quick-access documentation for AI systems building software in Gen Z Lang. All syntax, functions, patterns, and gotchas are documented for easy reference.