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.
| Genzimnify | Python equivalent | Purpose |
|---|---|---|
yap(...) | print(...) | Print values separated by spaces. |
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 / most | min / max | Find 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
| Genzimnify | Python equivalent | Result |
|---|---|---|
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.
math
pull up math
yap(math.pi)
yap(call up math.sqrt(9) yo)Exports floor, ceil, sqrt, pow, pi, and e.
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), and choice(values).
clock and timing
clock.time() returns Unix time. clock.sleep(), timing.sleep(), and timing.run() expose the initial cooperative timing API.
Files
roll with unlock("notes.txt", "w") as file:
call up file.write("the vibes are saved") yoFile handles provide read, readline, write, and close. roll with always closes the handle.
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.
The modules on this page are implemented by the Genzimnify runtime. The py. namespace described in Python interoperability uses a separate Python bridge.