Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

scores

[]int64 (len=8)

scores is the worked example: eight slots, small enough to check by hand.

Open
OID
0d6e2b…19b7:4
scores details (len=8)

+8 more Inspect slice

holders

[]string (len=5)

stakes is the weighted-draw example. The zero is the interesting entry: a holder with no stake must never be drawn, and that is a property of the search, not of the caller remembering to skip them.

Open
OID
0d6e2b…19b7:6
holders details (len=5)

+5 more Inspect slice

stakes

[]int64 (len=5)

stakes is the weighted-draw example. The zero is the interesting entry: a holder with no stake must never be drawn, and that is a property of the search, not of the caller remembering to skip them.

Open
OID
0d6e2b…19b7:8
stakes details (len=5)

+5 more Inspect slice

Render

func(path string) string

Render renders the demo for gnoweb. Render("") / Render("/") -> the full demo

Open
OID
0d6e2b…19b7:9
Render details

Inspect func

joinInts

func(vals []int64) string

joinInts formats a slice for display. Written out rather than reached for from a library because there is no sensible shared home for it yet.

Open
OID
0d6e2b…19b7:11
joinInts details

Inspect func

pct

func(part int64, whole int64) string

pct renders part/whole as a whole-number percentage. Integer arithmetic throughout: Render output has to be byte-identical on every validating node, and floating point is the usual way that stops being true.

Open
OID
0d6e2b…19b7:12
pct details

Inspect func
scores : []int64 (len=8) Inspect
holders : []string (len=5) Inspect
stakes : []int64 (len=5) Inspect
Render : func(path string) string Inspect
joinInts : func(vals []int64) string Inspect
pct : func(part int64, whole int64) string Inspect