NOQERI / FIRST PROGRAM

Your first program finds its feet.

The shortest verified path starts with examples/hello.noqeri in the repository. Write a typed function, ask the compiler to check it, and run it with the Stage-0 reference interpreter.

← THE FULL FIELD GUIDE

01 / Start with real source

This is the checked-in examples/hello.noqeri, rather than a hypothetical API. No class boilerplate, framework imports or package server are required.

function add(a: int, b: int): int {
    return a + b
}

print("Hello from noqeri")
print(add(10, 20))
OPEN THE EXACT EXAMPLE ↗

02 / Check first, then run

check loads and type-checks the source module graph. run executes the checked representation using the reference runtime. Both belong to the Stage-0 executable.

./build/noqeri check examples/hello.noqeri
./build/noqeri run examples/hello.noqeri
./build/noqeri nir examples/hello.noqeri

03 / Write less repetitive loops

The implemented repeat statement evaluates the count once. Zero or negative counts execute the body zero times. while handles conditional iteration, and for-in supports typed array/slice examples.

let total = 0
repeat 4 {
    total = total + 3
}
print(total) // 12
READ THE SOURCE-GROUNDED BEGINNER GUIDE ↗

04 / Try collections honestly

Fixed arrays and slices have examples in examples/simplicity/for_collections.noqeri. A contextual growable scalar List for int, float and bool has bounded runtime coverage, but fully generic List<T> ownership is unfinished.

let scores: [int; 5] = [78,42,91,65,30]
let passed: int = 0
for score in scores {
    if score >= 50 { passed = passed + 1 }
}
print(passed)
ARRAY AND SLICE EXAMPLE ↗

05 / Choose the next trail

Use the CLI guide for assembly output, portable NQRI modules, formatting, tests and project scaffolding. Browser views, native graphics, database drivers and AI bindings each have additional runtime and maturity constraints.

COMPILER COMMANDS ↗LANGUAGE RULES ↗
BUILD SOMETHING REAL WITH NOQERI.OPEN THE PLAYGROUND ↗