code wiki / (root) / nx_shorebird_gate.nx

nx_shorebird_gate.nx

buildroot/runtime/nx_shorebird_gate.nx

13419 B218 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_shorebird_gate.nx -- PG37: THE FIRST ANIMAL, HONESTLY A GULL, IS A CANON ROW OVER THE ONE BIRD PLAN. SUBJECT: nx_creaturegen.cg_shorebird / cg_bird_row_posed (in-process). The rung's done-rule in its own words: two different seeds produce measurably different gulls on the existing diversity ruler, the gull is distinct from every existing bird row on the same ruler, and a canon table without the gull row emits no gull. The ruler is the one nx_diversity_gate T3 composes -- anatstack_render at the ruler's own view and base colour, then pairwise L1 over the pixel buffer -- with the ruler's own species bar. Every value is emitted with gv_kv so a second method can recompute it from the declared inputs. Fixtures are arithmetic: no filesystem state.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_creaturegen.nx nx_shorebird_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_creaturegen.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ cg_bird_canon cgb_fill_songbird cgb_set cgb_fill_gull cgb_set ↻ cg_bird_canon_rows cg_bird_canon_find cgb_get gv_check gv_puts ↻ sg_alloc sys_mmap ↻ sys_mmap ↻ cg_build_bird cg_next cg_range cg_next ↻ as_ellip as_fuzz_last as_caps

structs

none

consts

12const SG_SEED_A: i64 = 4 // the diversity ruler's own seed
13const SG_SEED_B: i64 = 5
14const SG_SEED_C: i64 = 17
15const SG_YAW: i64 = 4800 // the ruler's bird view
16const SG_CAMZ: i64 = 3
17const SG_MAXLAYER: i64 = 1
18const SG_INFLATE: i64 = 42
19const SG_BASE_R: i64 = 140 // the ruler's bird base colour
20const SG_BASE_G: i64 = 96
21const SG_BASE_B: i64 = 58
22const SG_SPECIES_BAR: i64 = 150000 // nx_diversity_gate T2: below this L1 two renders are NOT distinct species
23const SG_PARTS_CAP: i64 = 96 // the ruler's part-table capacity
24const SG_BG: i64 = 2890778 // 26 + 28*256 + 44*65536, anatstack_render's background word
25const SG_TIP_PARTS: i64 = 2
26const SG_FK_EXTRA: i64 = 2 // a posed leg is two capsules, the static leg one
27const SG_WALK_THIGH: i64 = 400 // it4096 walk pose
28const SG_WALK_SHIN: i64 = 200
29const SG_SENTINEL: i64 = 424242
30const SG_NSEEDS: i64 = 3
31const SG_BYTE: i64 = 255
32const SG_BIG: i64 = 1000000000

functions

35func sg_l1(a: *i64, b: *i64, n: i64) -> i64 { var s: i64 = 0; var i: i64 = 0; while i < n { var d: i64 = (a[i] & SG_BYTE) - (b[i] & SG_BYTE); if d < 0 { d = 0 - d } s = s + d; i = i + 1 } return s }
called by 1: main
36func sg_ptab_eq(a: *i64, b: *i64, n: i64) -> i64 { var k: i64 = 0; while k < n*AS_STRIDE { if a[k] != b[k] { return 0 } k = k + 1 } return 1 }
called by 1: main
37func sg_render(P: *i64, n: i64, fb: *i64) -> i64 { return anatstack_render(P, n, SG_YAW, SG_CAMZ, SG_MAXLAYER, SG_INFLATE, SG_BASE_R, SG_BASE_G, SG_BASE_B, fb) }
called by 1: main calls 1: anatstack_render
38func sg_alloc() -> *i64 { return sys_mmap(SG_PARTS_CAP*AS_STRIDE*8) as *i64 }
called by 1: main calls 1: sys_mmap
39func sg_fb() -> *i64 { return sys_mmap(as_w()*as_h()*8) as *i64 }
called by 1: main calls 2: sys_mmapas_h
41func sg_fg(fb: *i64, npx: i64, out: *i64) -> i64
called by 1: main
60func sg_legs(P: *i64, n: i64, leg_rgb: i64, out: *i64) -> i64
called by 1: main
75func main() -> i64