Add Content Addressing page under CEK Machine
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 15m20s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 15m20s
Dedicated page documenting and demonstrating content-addressed computation. How it works, why it matters, the path to IPFS. Live demo: counter + name widget with CID generation, history, and restore-from-CID input. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1481,6 +1481,12 @@ PLATFORM_JS_POST = '''
|
||||
|
||||
|
||||
PLATFORM_CEK_JS = '''
|
||||
// String/number utilities needed by transpiled spec code (content-hash etc)
|
||||
PRIMITIVES["char-code-at"] = function(s, i) { return s.charCodeAt(i); };
|
||||
var charCodeAt = PRIMITIVES["char-code-at"];
|
||||
PRIMITIVES["to-hex"] = function(n) { return (n >>> 0).toString(16); };
|
||||
var toHex = PRIMITIVES["to-hex"];
|
||||
|
||||
// =========================================================================
|
||||
// Platform: CEK module — explicit CEK machine
|
||||
// =========================================================================
|
||||
@@ -1532,10 +1538,6 @@ CEK_FIXUPS_JS = '''
|
||||
PRIMITIVES["is-html-tag?"] = function(n) { return HTML_TAGS.indexOf(n) >= 0; };
|
||||
PRIMITIVES["make-env"] = function() { return merge(componentEnv, PRIMITIVES); };
|
||||
|
||||
// String/number utilities for content addressing
|
||||
PRIMITIVES["char-code-at"] = function(s, i) { return s.charCodeAt(i); };
|
||||
PRIMITIVES["to-hex"] = function(n) { return (n >>> 0).toString(16); };
|
||||
|
||||
// localStorage — defined here (before boot) so islands can use at hydration
|
||||
PRIMITIVES["local-storage-get"] = function(key) {
|
||||
try { var v = localStorage.getItem(key); return v === null ? NIL : v; }
|
||||
|
||||
Reference in New Issue
Block a user