First program
A Genzimnify source file ends in .gzim. The native runtime parses, checks, and executes the file.
Create a project
Make an empty directory, enter it, and ask the CLI for a starter file:
mkdir hello-gzim
cd hello-gzim
gzim initThis creates main.gzim and a project manifest named gzim.toml. Replace the source file’s contents with:
let name be "world"
cook greet(who):
send it glow"Hello, {who}"
yap(call up greet(name) yo)
Run the program
gzim main.gzimOutput:
Hello, world
gzim run main.gzim is equivalent to gzim main.gzim. Both commands use the native runtime.
Understand the code
Genzimnify is not Python and does not translate to Python during execution. The last column lists the closest Python syntax for comparison.
| Genzimnify | Meaning | Python equivalent |
|---|---|---|
let name be "world" | Declare a mutable variable. | name = "world" |
cook greet(who): | Define a function named greet. | def greet(who): |
send it value | Return a value from a cook. | return value |
glow"Hello {name}" | Interpolate expressions into text. | f"Hello {name}" |
call up greet(name) yo | Call a function as an expression. | greet(name) |
yap(value) | Print values to standard output. | print(value) |
Check without running
gzim check main.gzimThe semantic checker catches invalid assignments, locked-variable changes, misplaced returns, invalid loop control, and other caps before execution.
Pass command-line arguments
Arguments after the file name are available as the global args stack:
vibecheck call up how many(args) yo > 0:
yap(glow"yo {args[0]}")
otherwise:
yap("yo stranger")gzim main.gzim chat
# yo chat
REPL
gzim replType one or more lines, then submit a blank line to run the current input. Press Ctrl+D to leave.