func Render
Render renders the demo for gnoweb.
Example
1Render("") / Render("/") -> the full demo
Package fenwickdemo is a small gnoweb demo of the Binary Indexed Tree provided by the [p/moul/x/daily/fenwick](/p/mou...
gno.land/r/moul/x/daily/fenwickdemo/v0A gnoweb demo of the p/moul/x/daily/fenwick
library: prefix sums, range queries, the internal ranges that make a Binary
Indexed Tree legible, and the weighted draw that is the reason to use one.
It holds no tree logic of its own and no state. Every figure on the page is
computed from two fixed tables in the source, never from chain state, which is
what lets ExampleRender pin the whole page: the pinned block is copied from
what gno printed, so a change in the library shows up as a diff in the test
rather than as prose nobody re-reads.
The page is in five parts, and the last two are the ones worth reading:
Covers turns that from a claim into a table.30 is the interesting row: it
is the first past the first holder's share and it skips the zero-stake holder
entirely, because a zero does not advance the prefix.Rendering is deterministic and costs no chain reads, so the page is the same on every node and at every height.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
Package fenwickdemo is a small gnoweb demo of the Binary Indexed Tree provided by the p/moul/x/daily/fenwick(/p/moul/x/daily/fenwick/v0) library: prefix sums, range queries, the internal ranges that make the structure legible, and the weighted draw that is the reason to use one.
It contains no tree logic of its own. Stateless, so Render is deterministic: every figure below is computed from the fixed tables at the top of this file, never from chain state, which is what lets an example test pin the page.