code wiki / _hdl_build / nx_geohash_gate.nx

nx_geohash_gate.nx

buildroot/runtime/_hdl_build/nx_geohash_gate.nx

3127 B61 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_geohash_gate.nx -- GATE (runnable) for the geohash spatial index (nx_geo). Proves: CANONICAL : encode (57.64911, 10.40744) -> shares a long prefix with the world-standard geohash "u4pruydqqvj" (proves our encoder interoperates with every geohash tool) PROXIMITY : two points ~3 m apart share a long common prefix (>=6); Denmark vs Sydney share ~0 -> the index property that turns O(N) fence scans into O(1) prefix bucketing DETERMINISM: same input -> identical hash (pure integer, no float) Evidence -> knowledge/status/geohash_gate.log (GEOHASHGATE authored=organ ... verdict=GREEN). license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_geo.nx nx_syscalls.nx nx_geohash_gate.nx

imports: nx_geo.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap geo_geohash geo_prefix_common gh_emit gh_w sys_write gh_wn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close

structs

none

consts

13const GH_LOG: *u8 = "knowledge/status/geohash_gate.log"

functions

15func gh_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: gh_emit calls 1: sys_write
16func gh_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 }
called by 1: gh_emit calls 2: sys_mmapsys_write
18func gh_emit(fd: i64, kat: i64, near: i64, far: i64, det: i64, hashA: *u8, ok: i64) -> i64
called by 1: main calls 2: gh_wgh_wn
28func main() -> i64