1package compact23import "strings"45// ExampleRender pins the page's skeleton: the title and the three sections6// that are always there, whatever the board holds.7//8// Only the invariant lines, on purpose. Everything else on the page is9// derived from the current fragmentation, and an Example runs after every10// Test in the package and sees whatever state they left. The variable half is11// pinned by TestRenderShowsBothIntegersAndTheAction, which controls the board12// first.13func ExampleRender() {14 for _, line := range strings.Split(Render(""), "\n") {15 switch {16 case strings.HasPrefix(line, "# "),17 strings.HasPrefix(line, "## "),18 strings.HasPrefix(line, "Soft-deleting"):19 print(line + "\n")20 }21 }22 // Output:23 // # Compact24 // Soft-deleting an entry frees nothing: the tree node stays, the bytes stay locked, and every read still walks past the hole. Compacting drops those nodes and the chain refunds their deposit **to whoever signs the transaction**. The only question is when.25 // ## The two integers26 // ## Why allocated minus live is not the answer27 // ## Board28}29Add(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, text string) int
Compact(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}) int
Drop(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, index int)
Fragmentation() (live int, allocated int)
Quote() struct{Bytes int64; Refund int64; Fee int64; Net int64; BreakEven int64}
Reclaimable() int
Render(path string) string
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.