Reference

Native standard library

These builtins and modules are implemented inside the native runtime. They do not proxy Python packages.

Built-in cooks

The Python column is a behavior guide; these cooks are implemented natively by Genzimnify.

GenzimnifyPython equivalentPurpose
yap(...)print(...)Print values; optional text keywords glue and micdrop control the separator and ending.
yap back(prompt)input(prompt)Read one line from standard input.
how many(value)len(value)Return the size of text or a collection.
vibes(stop)range(stop)Create an integer range; also accepts start and step.
add up(values)sum(values)Sum numeric values.
least / mostmin / maxFind the minimum or maximum value.
positive(value)abs(value)Return the absolute value.
ranked(values)sorted(values)Return a sorted stack.
index up(values)enumerate(values)Return index/value crews.
link(...values)zip(...values)Zip several collections.
round up(value)round(value)Round a numeric value.
unlock(path, mode)open(path, mode)Open a native file handle.

Conversion cooks

GenzimnifyPython equivalentResult
num(value)int(value)Integer
drip(value)float(value)Floating-point number
text(value)str(value)Text
truth(value)bool(value)Truth value
stack(value)list(value)Mutable ordered stack
crew(value)tuple(value)Tuple-like crew
squad(value)set(value)Unique-value squad
map()dict()Key/value map

Collection methods

Stacks

append, extend, insert, remove, pop, and reverse.

let names be ["amy"]
call up names.append("bob") yo
yap(call up names.pop() yo)

Maps

get, keys, values, items, and pop.

Text

upper, lower, strip, split, replace, startswith, endswith, and join.

Output and sorting options · 2.0.5

yap("no", "cap", glue="-", micdrop="!")
yap()
yap(call up ranked([3, 1, 2], uno_reverse=nocap) yo)

glue defaults to a space and micdrop to a newline; both require text. ranked returns a new sorted list without changing its input. Its keyword-only uno_reverse accepts nocap for descending order or cap (the default) for ascending order. Unsupported and duplicate keyword arguments raise errors. These options also work in Python exports and Studio.

Integer safety · 2.0.6

Native integers use signed int64. Integer addition, subtraction, multiplication, negation, absolute value, and nonnegative powers detect overflow and raise catchable BadVibe errors. Integer powers use exact arithmetic. Nonfinite or out-of-range floating-point conversion to integer also raises BadVibe. Python exports and Studio use Python integers and can represent values outside native int64.

math

pull up math
yap(math.pi)
yap(call up math.sqrt(9) yo)

Exports floor, ceil, sqrt, pow, isfinite, isnan, isinf, pi, and e. The three numeric predicates return truth values and accept numeric input.

system

pull up system
yap(system.args)
yap(call up system.cwd() yo)

Exports args, cwd, getenv, and exit. A top-level args stack is also available.

json

pull up json
let data be call up json.parse("{\"ready\":true}") yo
yap(call up json.stringify(data) yo)

parse converts JSON into native values. stringify(value, pretty) encodes native values.

path

Native filesystem path helpers: join, exists, is_file, is_dir, basename, dirname, extension, and absolute.

encoding

base64_encode(text) and base64_decode(text) provide native Base64 conversion.

luck

Native random utilities: random(), randint(low, high), choice(values), manifest(integer), shuffle(stack), and sample(values, count). shuffle mutates a stack and returns ghost. sample returns a new stack sampled without replacement by position; the input is unchanged. Count must be an integer between zero and collection size.

pull up luck
call up luck.manifest(42) yo
yap(call up luck.randint(1, 100) yo)

manifest resets the shared random sequence. Reusing a seed repeats results within the same runtime; native and exported Python sequences are not guaranteed to match each other or remain identical across runtime versions.

clock and timing

clock.time() returns Unix time. clock.monotonic() returns monotonic seconds for measuring elapsed time; its origin is unspecified. clock.sleep(seconds) and native timing.sleep(seconds) block for at least the requested duration, rounded up to milliseconds. Seconds must be finite and nonnegative, at most 2147483.647. Native async functions execute eagerly and timing.run(value) returns that value; there is no concurrent native event loop. Python exports use asyncio for timing.

Files

roll with unlock("notes.txt", "w") as file:
    call up file.write("the vibes are saved") yo

File handles provide read, readline, write, and close. readline() normalizes CRLF/CR to LF and retains the newline when present and returns empty text at EOF. roll with closes the file handle after its body.

rizzgame

The native 2D game library uses a bundled raylib 5.5 backend. It offers windows, surfaces, events, input, drawing, images, text, sound, frame timing, rectangles, cameras, particles, sprite animation, and easing. See the rizzgame guide.

Local modules

If no native module matches an import, the runtime looks for a corresponding .gzim file. For example, pull up helpers resolves helpers.gzim beside the importing file. Dotted names map to subdirectories.

Module implementation

The modules on this page are implemented by the Genzimnify runtime. The py. namespace described in Python interoperability uses a separate Python bridge.