lumbda/examples
russell@unturf.com d88149a502 proof netspace: envelope teleport + portable hash-table on vectors
Extends proof-netspace RPC with two verbs that let peers exchange the
full solution space in one round-trip:

  (envelope)           → reply (envelope (h1 h2 ...))
  (merge (h1 h2 ...))  → fold hashes into local DB, reply (merged N)

Any node can now bootstrap from a peer's cache instead of re-verifying
every theorem locally. Two nodes that swap envelopes both become
supersets of what either knew — the primitive for mesh-wide spiral.

*proof-db* swapped from linear alist to a hash-set. O(N·M) merge drops
to O(M). The hash-table is a ~20-line pure-Lumbda library over
make-vector / vector-ref / vector-set! — runs unmodified in all three
tiers. No asm hash-table primitive needed.

Also fixes a pre-existing asm defect: bi_makevec clobbered %rax via
the GETARG macro's internal scratch use, causing SIGSEGV on every
(make-vector N fill) call. The bug shipped because asm/test.sh only
covered the variadic (vector ...) constructor; tests/functional.lsp
had one make-vector assert but was never wired into asm's harness.
Added five make-vector assertions to asm/test.sh (132 → 137).

Portal snapshot rewritten to emit (set! *proof-db* ...) so the
top-level binding is actually mutated on restart — previous
(define ...) form bound locally on some code paths, leaving the
in-memory DB empty after load.

Verified: make test-all green (137 asm + 189 functional + Python/C
tests), 3-tier matrix cold+warm+restart all clean.
2026-04-17 21:36:26 -04:00
..
fibonacci.lsp Add peephole optimizer, --help, examples, README update 2026-04-13 16:56:21 -04:00
generator.lsp Add peephole optimizer, --help, examples, README update 2026-04-13 16:56:21 -04:00
http-client-bench.lsp heap-snapshot + native HTTP client + MOAD-0001 cleanup 2026-04-16 20:49:32 -04:00
http-server.lsp heap-snapshot + native HTTP client + MOAD-0001 cleanup 2026-04-16 20:49:32 -04:00
mergesort.lsp Add peephole optimizer, --help, examples, README update 2026-04-13 16:56:21 -04:00
objects.lsp Add peephole optimizer, --help, examples, README update 2026-04-13 16:56:21 -04:00
portal-http-client.lsp portal over HTTP: 9/9 cross-runtime, plus eval-to-global-env fix 2026-04-17 13:41:48 -04:00
portal-http-server.lsp portal over HTTP: 9/9 cross-runtime, plus eval-to-global-env fix 2026-04-17 13:41:48 -04:00
portal-prime.lsp Add portal: serialize and resume VM state across machines 2026-04-13 19:00:11 -04:00
proof-netspace-client.lsp proof netspace: envelope teleport + portable hash-table on vectors 2026-04-17 21:36:26 -04:00
proof-netspace-server.lsp proof netspace: envelope teleport + portable hash-table on vectors 2026-04-17 21:36:26 -04:00
repl-server.lsp S-expressions over sockets — RPC + remote REPL in portable Scheme 2026-04-17 09:00:04 -04:00
rpc-chain-bench.lsp rpc-chain-bench: Python → C relay → asm, timing end-to-end 2026-04-17 09:18:42 -04:00
rpc-client.lsp S-expressions over sockets — RPC + remote REPL in portable Scheme 2026-04-17 09:00:04 -04:00
rpc-relay.lsp rpc-chain-bench: Python → C relay → asm, timing end-to-end 2026-04-17 09:18:42 -04:00
rpc-server.lsp S-expressions over sockets — RPC + remote REPL in portable Scheme 2026-04-17 09:00:04 -04:00