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:
@@ -14,7 +14,7 @@
|
||||
// =========================================================================
|
||||
|
||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||
var SX_VERSION = "2026-03-15T00:16:30Z";
|
||||
var SX_VERSION = "2026-03-15T00:27:14Z";
|
||||
|
||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||
@@ -757,6 +757,12 @@
|
||||
var charFromCode = PRIMITIVES["char-from-code"];
|
||||
|
||||
|
||||
// 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
|
||||
// =========================================================================
|
||||
@@ -5795,10 +5801,6 @@ PRIMITIVES["resource"] = resource;
|
||||
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