nib
nib — the tour
nib/

The tour

Six steps. Each one is a file and a run — compiled and run against this tree on every deploy of this site.

00 — what you needThe whole tool, one screen

Thirteen commands. The tour uses two: --run and --wire.

the tool's own --help · byte-checked on every deploy

01 — a program with a seamFour declarations

An interface names a promise. An effector answers it. A module uses it. A wire binds them. --arg fills the module's parameter from the command line.

snippets/first.nib · the seam is one line

two runs · --arg who=Ada, then --arg who=Grace

02 — the four declarationsWho names whom

The tour's spine, labeled. The module names the interface; the effector implements it; the wire binds the instance. The body never calls the instance (checked).

L4 interface Greeting hello(name: String) -> String names the promise L9 effector English implements Greeting · say() = "Hello…" the world L14 module Hello main :: -> String ! Greeting @Greeting.hello("World") L19 wire W with Greeting = Hello.English the seam names answered by entry the instance
hello.nib · the instance name appears on two lines (checked)
snippets/hello.nib · 19 lines · 4 declarations

03 — every name answeredWhat the compiler refuses

The module below asks for two interfaces and the wire answers one. A wire is not a suggestion: the refusal names what is missing.

snippets/unbound.nib · one name unanswered exit 1

the refusal · requires effectors [Hi.Cfg, Io.Out] but the mapping supplies [Io.Out]

04 — the wire injects the worldThe receipt is printed

One wire answers two interfaces at once. --run prints the inferred receipt — every run the function may touch — before anything executes.

snippets/receipt.nib · two names, two answerers

the receipt · func main : —> String ! Config, Out

05 — runs in the real worldThe page you are reading

This site is one module behind one wire: Http.Serve = Listen, one socket on port 8390. The deploy runs ./result/bin/nibc --serve --wire Serve app/main.nib.

app/main.nib · two wires — a printer and a listener

06 — nextTwo more pages

What the language guarantees, with a snippet per claim — and what it is not, measured where a measure exists.

what it guarantees → what it is not → back home