fortunes.nika runs: the postgres block, route, and handlers that return a StringOpen and answer this issue on GitHub.
language, libraries, blocked · opened 2026-09-30 · updated 2026-10-06 · 0 comments
examples/fortunes.nika is the corpus program that exercises the server and the database together; it is written at specification level (examples/README.md lists its gaps) and nikaia test does not cover it. Its render lowers and runs today.
What is left is machinery, not syntax:
postgres block, a deferred-parameter DSL (ADR-007 D4): the statement has to reach a driver intact. Given a manifest depending on examples/http/, the file stops first at dsl postgres { … }: no hole, and postgres is not a grammar this compiler has. Comes with the database work.route in the http package: .route("/fortunes") fn { fortunes(db) } needs a parameter that is code, and both doors are open (a function value can be received, ADR-102/192, and kept in a field, ADR-217 D2). What is left is examples/http/ declaring route (step 4 of ADR-122).String or an html::Raw rather than a Response, which needs the handler’s type to vary (NK1142’s neighbourhood). D1, D3 and D4 of that record are built.