code wiki / (root) / nx_erotica_craft.nx

nx_erotica_craft.nx source

↩ module page · 43 lines · 3361 B

1// nx_erotica_craft.nx -- R2/R2b GATE (thin): proves nx_erotica_craft_lib.ec_eval discriminates gorgeous from 2// cliche on the sovereign-store rubric+lexicons (7 axes: emotion>physical, sensory, displacement, tension, 3// pacing, afterglow, consent, minus slop). Scores 2 fixtures, prints the breakdown, gates. No 3rd-party. 4// expect_exit: 0 license_tier: ORIGINAL module: nishi-core.erotica.craft 5import "nx_syscalls.nx" 6import "nx_seg_store.nx" 7import "nx_erotica_craft_lib.nx" 8 9func ec_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 10func ec_num(v: i64) -> i64 { 11 if v==0 { sys_write(1,"0" as *u8,1); return 0 } 12 var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } 13 let d: *u8=sys_mmap(24); var k: i64=0 14 while m>0 { d[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } 15 let o: *u8=sys_mmap(24); var i: i64=0; while i<k { o[i]=d[k-1-i]; i=i+1 } sys_write(1,o,k); return 0 16} 17func ec_show(label: *u8, out: *i64, composite: i64) -> i64 { 18 ec_puts(" " as *u8); ec_puts(label) 19 ec_puts(": emotion_ratio=" as *u8); ec_num(out[0]) 20 ec_puts(" sens=" as *u8); ec_num(out[1]); ec_puts(" disp=" as *u8); ec_num(out[2]); ec_puts(" tension=" as *u8); ec_num(out[3]) 21 ec_puts(" pacing=" as *u8); ec_num(out[4]); ec_puts(" afterglow=" as *u8); ec_num(out[5]); ec_puts(" consent=" as *u8); ec_num(out[6]) 22 ec_puts(" slop_pen=" as *u8); ec_num(out[7]); ec_puts(" arc=" as *u8); ec_num(out[8]) 23 ec_puts(" -> CRAFT=" as *u8); ec_num(composite); ec_puts(" permil\n" as *u8) 24 return 0 25} 26func main() -> i64 { 27 ec_puts("=== NISHI EROTICA CRAFT GATE (scorer lib; rubric+lexicons from the sovereign seg_store) ===\n" as *u8) 28 let h: *i64 = ss_open("knowledge/erotica_craft-" as *u8) 29 if h[0]==0 { ec_puts("no store -- run nx_erotica_store first\n" as *u8); sys_exit(1); return 1 } 30 let weak: *u8 = "His throbbing member pressed against her core. She could feel the heat building. Suddenly he gripped her hips and pulled her close. His manhood was engorged and pulsating. She felt herself getting wet as the waves of pleasure began to build. He pushed harder. The exquisite friction was electric." as *u8 31 let strong: *u8 = "Are you sure, he whispered, and she nodded, breathless, trusting him completely. His hand found hers in the candlelight. She had wanted this for so long, not the heat of it but the way he looked at her like she mattered, like she was safe. She pressed closer, needing him near. Later, tangled together, he traced slow circles on her shoulder while their heartbeats settled, and for the first time in months she felt at home." as *u8 32 let ow: *i64 = sys_mmap(8*8) as *i64 33 let os: *i64 = sys_mmap(8*8) as *i64 34 let ws: i64 = ec_eval(weak, h, ow); ec_show("WEAK (cliche/bodies)" as *u8, ow, ws) 35 let ss: i64 = ec_eval(strong, h, os); ec_show("STRONG(feeling/consent)" as *u8, os, ss) 36 ec_puts(" discriminator: strong=" as *u8); ec_num(ss); ec_puts(" must EXCEED weak=" as *u8); ec_num(ws); ec_puts(" and be gorgeous(>=600)\n" as *u8) 37 if ss>ws { if ss>=600 { if ws<600 { 38 ec_puts("EROTICA-CRAFT GREEN (lib scorer discriminates feeling+consent+afterglow+displacement+tension from cliche+bodies)\n" as *u8) 39 sys_exit(0); return 0 40 } } } 41 ec_puts("EROTICA-CRAFT RED (discriminator failed)\n" as *u8) 42 sys_exit(1); return 1 43}