nx_search_emerge.nx
buildroot/runtime/nx_search_emerge.nx
about
nx_search_emerge.nx -- EMERGENCE DETECTION: turn the federated frontier feed into a "where is this field
moving" signal. Fetches arXiv (sorted newest-first) over sovereign TLS (reuses nx_search_extern's fetch),
extracts the <published> year-months, and computes the RECENCY-VELOCITY (share of sampled hits from the
newest month) + TOTAL VOLUME (opensearch:totalResults). High velocity = activity concentrated NOW (emergent
'photonic/quantum'); low + huge volume = mature ('lightbulb'). HONEST: one snapshot = velocity; TRUE
emergence = this signal DRIFTING UP over the daily runs (nx_cap_census check tracks that). license_tier: ORIGINAL
dependencies 4 imports · 1 importers
imports: nx_search_extern.nxnx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nx
imported by: nx_frontier_watch.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const EM_MAGIC_4194304: i64 = 4194304 |
| 12 | const EM_MAGIC_1024: i64 = 1024 |
| 14 | const EM_HOT: i64 = 600 // >=600 permille of sampled hits from the newest month = hot production |
| 15 | const EM_WARM: i64 = 250 |
functions
| 17 | func ep(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 18 | func en(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 } |
| 20 | func em_digit(c: i64) -> i64 { if c>=48 { if c<=57 { return 1 } } return 0 } called by 1: em_int_after |
| 22 | func em_ym7(buf: *u8, pos: i64, out: *u8) -> i64 { var i: i64=0; while i<7 { out[i]=buf[pos+i]; i=i+1 } out[7]=0 as u8; return 0 } called by 1: em_collect_yms |
| 24 | func em_ymcmp(a: *u8, b: *u8) -> i64 { var i: i64=0; while i<7 { let ca: i64=a[i] as i64; let cb: i64=b[i] as i64; if ca<cb { return 0-1 } if ca>cb { return 1 } i=i+1 } return 0 } |
| 26 | func em_collect_yms(buf: *u8, n: i64, openm: *u8, flat: *u8, maxd: i64) -> i64 calls 1: em_ym7 |
| 39 | func em_maxym(flat: *u8, nd: i64, out: *u8) -> i64 calls 1: em_ymcmp |
| 45 | func em_count_eq(flat: *u8, nd: i64, ref: *u8) -> i64 { var c: i64=0; var k: i64=0; while k<nd { let p: *u8=((flat as i64)+k*8) as *u8; if em_ymcmp(p,ref)==0 { c=c+1 } k=k+1 } return c } calls 1: em_ymcmp |
| 46 | func em_find_after(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: em_int_after |
| 54 | func em_int_after(buf: *u8, n: i64, key: *u8) -> i64 |
| 64 | func em_label(share: i64) -> *u8 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |