Phase 12.7: Nyash文法革命とANCP 90%圧縮技法の発見 - 文法改革完了とFunctionBox実装

This commit is contained in:
Moe Charm
2025-09-03 20:03:45 +09:00
parent 6d79d7d3ac
commit 7455c9ec97
69 changed files with 3817 additions and 62 deletions

View File

@ -0,0 +1,19 @@
// P2PBox + FunctionBox handler demo
local alice, bob, i
// create two nodes (inprocess transport)
alice = new P2PBox("alice", "inprocess")
bob = new P2PBox("bob", "inprocess")
// register a FunctionBox handler on bob
bob.on("hello", function(intent, from) {
print("[bob] received '" + intent.getName() + "' from " + from)
})
// build Intent and send from alice to bob
i = new IntentBox("hello", new MapBox())
alice.send("bob", i)
print("done")