GizStack
View .mdOpen in ChatGPTOpen in Claude

Learn Gizlang

Purpose: Choose a learning path, then run source-backed examples and complete labs. Repository: gizlang:main, gizstack:main Language: English

This page is the learning layer over the canonical documentation. It starts with a platform tour, then gives role-based paths and complete labs. It does not duplicate language, SQL, web, database or runtime references. The ownership rules are in DOCUMENTATION.md.

Fast path

  1. Quickstart
  2. Platform tour
  3. Language guide
  4. Command line
  5. Todo application lab
  6. Agent SDK and GizDesk lab

Choose a path

You are hereRead in this orderYou will finish with
New to GizlangQuickstart → Platform tour → Language guideA typed native program
A TypeScript developerQuickstart → TypeScript differences → Language guideFamiliar syntax with native builds
Building an applicationQuickstart → Models → Data access → GizWeb → Todo labA tested web application
Building an AI systemQuickstart → Compute → Agent SDK → GizDesk labA model-backed agent
Operating the platformGizDB server → Storage range → BenchmarksAn evidence-backed deployment
Contributing to the runtimeLanguage reference → Compiler internals → Runtime internals → PerformanceA source-level change with proof

Each path names a result and points to the owner of each fact. Use the guides for procedures, references for exact rules, and internals for implementation decisions.

Volumes

Volume 1: Language and tooling

Read the language reference, the language guide, the command-line guide, compiler internals, tools internals, and the runtime and system contracts.

Volume 2: Application engineering

Read models, data access, and GizWeb, then complete the real-time Todo lab.

Volume 3: GizDB {#volume-3-gizdb}

Read GizDB, data access, vector search, server operations, SQL, and database internals.

Volume 4: Agents and generative systems

Read Agents and GizDesk, then complete the GizDesk workspace lab.

Volume 5: Machine learning and hardware {#volume-5-machine-learning-and-hardware}

Read compute, machine learning, hardware, compute internals, and SQL ML.

Volume 6: Systems and platform {#volume-6-systems-and-platform}

Read compiler, runtime, memory, system, VM, tools, storage, and localization.

Volume 7: Operations and benchmark proof

Use the benchmark record, performance rules, and the release history.

Example catalog

The tour examples are deliberately small. Use these complete examples when you need a realistic starting point:

ExampleWhat to inspectFollow-up
examples/cli/wordcount.gizFiles, maps, errors and exit codesCommand line guide
examples/cli/orders.gizA model-backed command-line workflowModel guide
examples/web/notesRoutes, forms, database access and testsGizWeb guide
examples/web/adminGenerated pages and data policiesData access guide
examples/todoA small live applicationTodo lab
examples/mlDatasets, experiments and standalone inferenceMachine learning guide
examples/tourOne program per platform subsystemPlatform tour

Every example is source code in the repository. A documentation snippet is complete only when the docs test can check or run it; hardware, model downloads and external-service examples identify their separate prerequisites.

📸 Empirical Visual Screenshot Catalog

This page includes 23 live screenshots captured directly from running daemons and headless Chrome CDP sessions. Every gizdesk-*.png is captured from a running Desk; the base catalog uses giz run tools/browser/guidebook.giz BASE docs/images/guidebook, and sample-state captures use agent-browser after loading synthetic data (GizDesk lab):

Image FileDescriptionOwning Chapter
todo-app-initial.pngFresh Todo app with empty list and auto-provisioned DDLTodo lab
todo-app-active.pngCollaborative Todo app with multiple tasks, drafts, and completed badgesTodo lab
gizdesk-connections.pngGizDesk model accounts, quota state, and rotation orderGizDesk lab
gizdesk-computers.pngGizDesk computers the agent works on, each command approval-gatedGizDesk lab
gizdesk-drive.pngThe Desk's own Drive with a Markdown file open, its tags and commentsGizDesk lab
gizdesk-drive-grid.pngDrive folders as tilesGizDesk lab
gizdesk-drive-search.pngDrive search across names and contentsGizDesk lab
gizdesk-drive-share.pngDrive share dialog: invitations, a link's role, password and expiryGizDesk lab
gizdesk-drive-link.pngA share link's page, served by the Desk without an accountGizDesk lab
gizdesk-drive-activity.pngDrive activity: every change through the app, the API and agentsGizDesk lab
gizdesk-drive-phone.pngDrive on a phoneGizDesk lab
gizdesk-drive-s3.pngDrive S3 access: the endpoint, bucket and access keys for any S3 clientGizDesk lab
gizdesk-services.pngConnections Services: the mailer and the office engine you runGizDesk lab
gizdesk-drive-office.pngA document preview offering Edit in Office through the connected engineGizDesk lab
gizdesk-data-studio.pngData Studio with sample sales data, schema, query results and exportGizDesk lab
gizdesk-data-studio-chart.pngData Studio sample sales chartGizDesk lab
gizdesk-metrics-catalog.pngGoverned metric catalog with reusable query definitionGizDesk lab
gizdesk-data-builder.pngApproval-gated no-code collection builderGizDesk lab
gizdesk-ml.pngData & ML completed regression comparison and deployment approvalGizDesk lab
gizdesk-workspace.pngGizDesk conversation and workspace overviewGizDesk lab
gizdesk-knowledge-panel.pngGizDesk agent knowledge, skills and MCP connectionsGizDesk lab
gizai-agent-plugins-tools.pngGizDesk agent editor and MCP plugin configurationGizDesk lab

Platform tour

<a id="platform-tour"></a>

Each section below is a small, runnable example. The source files live under examples/tour and the documentation test checks their output.

The language

Types are checked when you compile. A union of object types is narrowed by its kind, and an error is thrown and caught as in TypeScript.

typescriptRun
// The language: TypeScript compiled to native code. Types, unions, switch and exceptions.
type Shape = { kind: "circle"; r: number } | { kind: "square"; side: number };

function area(s: Shape): number {
    switch (s.kind) {
        case "circle": return Math.PI * s.r * s.r;
        case "square": return s.side * s.side;
    }
}

function half(n: number): number {
    if (n % 2 !== 0) throw new Error(`${n} is odd`);
    return n / 2;
}

function main(): void {
    const shapes: Shape[] = [{ kind: "circle", r: 1 }, { kind: "square", side: 2 }];
    for (const s of shapes) console.log(`area ${area(s).toFixed(2)}`);
    for (const n of [12, 6]) {
        try {
            console.log(`${n} / 4 = ${half(half(n))}`);
        } catch (e) {
            console.log(`${n}: ${e.message}`);
        }
    }
}
text
area 3.14
area 4.00
12 / 4 = 3
6: 3 is odd

Next: the language guide, and the differences from TypeScript.

Tasks

Task.parallel runs a body on each core, and gives the results in index order. The standard library (gizlang:) also has threads, channels, timers and async I/O.

typescriptRun
// Tasks: Task.parallel runs a body on every core and gives the results in order.
import * as Task from "gizlang:task";

function main(): void {
    const squares = Task.parallel(8, (i: i64): i64 => { return i * i; });
    let sum = 0;
    for (const s of squares) { sum += s; }
    print(`${squares.map((s: i64): string => { return string(s); }).join(" ")} sum ${sum}`);
}
text
0 1 4 9 16 25 36 49 sum 140

Next: the standard library reference.

GizDB

GizDB is a database in your program: a folder, SQL with parameters, transactions, and no server to run. The same engine is also a server that PostgreSQL clients use.

typescript
// GizDB in the program: a database in a folder, SQL with parameters, no server.
import {System} from "gizlang:system";
import * as Embedded from "gizdb:embedded";

function main(sys: System): void {
    const folder = sys.temporaryDir();
    const db = Embedded.open(sys, folder.temporaryPath());
    db.exec("CREATE TABLE notes (id INT PRIMARY KEY, title TEXT, stars INT)");
    db.query("INSERT INTO notes VALUES ($1, $2, $3)", ["1", "Buy milk", "2"]);
    db.query("INSERT INTO notes VALUES ($1, $2, $3)", ["2", "Write the tour", "5"]);
    for (const row of db.query("SELECT title, stars FROM notes WHERE stars > $1", ["3"]).rows) {
        print(`${row[0] ?? ""} ${row[1] ?? ""}`);
    }
    db.close();
}
text
Write the tour 5

Next: use GizDB, model your data, access external databases, vector search, machine learning in SQL, run the GizDB server.

GizWeb

A GizWeb site can be a folder of pages: each .ghtml, .md and .html file under pages/ is an address. A .ghtml file is HTML with Gizlang in braces. This is examples/web/pages:

typescript
// A site from files, like PHP or Next.js: every .ghtml, .md and .html file of pages/ is an address (docs/reference/ghtml.md).
// Run: giz examples/web/pages/main.giz, then open http://127.0.0.1:8080
import {System} from "gizlang:system";
import * as Web from "gizweb";
import * as Pages from "gizweb:pages";
import {site} from "./pages/.routes";

function main(sys: System): i64 {
    return Web.listen(
        sys,
        8080,
        Pages.shell(""),
        Web.serving(),
        (own: System) => Pages.handler(site(), Pages.shell(""), Pages.standalone(own))
    );
}
html
<script>
    const slug = params.get("slug");
</script>
<article>
  <h1>Post: {slug}</h1>
  <p><a href="/blog">All posts</a></p>
</article>

giz examples/web/pages/main.giz serves it at http://127.0.0.1:8080, and /blog/hello shows "Post: hello".

Next: build a web app, where one model gives the table, the form, the checks and the API.

Compute

gizai has tensors, fused elementwise chains, gradients and models. The same calls run on a GPU when the machine has one.

typescriptRun
// gizai: tensors on the CPU, or on a GPU when the machine has one.
import * as TensorCore from "gizai:tensor/core";

function main(): void {
    const a = TensorCore.tensor([2, 3], [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]);
    const b = TensorCore.tensor([3, 2], [1.0, 0.0, 0.0, 1.0, 1.0, 1.0]);
    print(a.matmul(b).text());
}
text
[[4, 5], [10, 11]]

Next: tensors, GPU kernels and gradients.

Storage

gizfs keeps buckets and objects. Here it is embedded in the program; the same calls reach a range of machines or gizstack.com.

typescript
// gizfs: buckets and objects, here in an embedded store in a folder.
import {System} from "gizlang:system";
import {embedded} from "gizfs:node";
import * as Object from "gizfs:object";

function main(sys: System): void {
    const folder = sys.temporaryDir()!;
    const store = embedded(sys, folder.temporaryPath()!, "me").unwrap();
    store.changeObject(Object.Command.bucket("me", "photos", false)).unwrap();
    store.put("photos", "2026/hello.txt", utf8("Hello"), "text/plain").unwrap();
    print(string(store.get("photos", "2026/hello.txt", 0).unwrap()));
    store.close();
}
text
Hello

Next: use storage, run a storage range.

Devices

gizhw reads and drives the machine: GPUs, NPUs, cameras, audio, video codecs and sensors. This program prints the platform and each sensor that the operating system shows, so its output is that of your machine.

typescript
// gizhw: the machine's devices and sensors, read from the operating system.
import {System} from "gizlang:system";
import * as Device from "gizhw:device";

function main(sys: System): void {
    print(Device.platform(sys));
    for (const s of Device.sensors(sys).valueOr([])) { print(`${s.device} ${s.channel} ${s.value}`); }
}

Next: hardware and devices, compute on the GPU.

AI models

gizai:ai runs models by name on your machine: chat and embeddings; gizai:tasks/image and gizai:tasks/video make images and videos, gizai:studio holds an app's models, and gizai:serve is an OpenAI-compatible server. The first use downloads the weights.

sh
giz ai chat qwen3.5-4b "Name three rivers."

Next: compute and generative AI, classical ML, typed agent tools and the GizDesk application.

JavaScript and Python

The giz command also runs JavaScript, TypeScript and Python on the Gizlang VM, with npm packages, Node's modules and Python's standard library.

typescript
// TypeScript on the Gizlang VM: Node's modules work, with no Node.js installed.
import { createHash } from "node:crypto";

const words: string[] = "the cat and the dog".split(" ");
const counts = new Map<string, number>();
for (const w of words) counts.set(w, (counts.get(w) ?? 0) + 1);
console.log([...counts].map(([w, n]) => `${w}=${n}`).join(" "));
console.log(createHash("sha256").update("gizlang").digest("hex").slice(0, 16));
text
the=2 cat=1 and=1 dog=1
db69adfa269a71dd
python
# Python on the Gizlang VM: the program runs in the VM's interpreter and JIT.
import json

counts = {}
for word in "the cat and the dog".split():
    counts[word] = counts.get(word, 0) + 1
print(json.dumps(counts, sort_keys=True))
text
{"and": 1, "cat": 1, "dog": 1, "the": 2}

Next: JavaScript, TypeScript and Python.

More programs

ProgramShows
examples/cli/wordcount.gizA command-line tool: files, throws and try/catch, maps and the exit code
examples/cli/orders.gizOne record type gives the DDL, the form checks, the rows and the JSON (model your data)
examples/web/httpA server-rendered app on gizlang:http alone: routes, markup components and a form
examples/web/notesThe same app on GizWeb, with unit tests and a journey test (build a web app)
examples/web/adminAn admin app from one annotated record type, with no page or action written