Jesse Daniel Brown commited on
Commit
3cd80f3
·
1 Parent(s): 0cc915b

Add the play door - hand it anything, 3,200 bytes cross, nothing is saved

Browse files

PLAY, DO NOT SAVE. The play door quants whatever you hand it to a FIXED 3,200
bytes and that is what crosses to the other boats.

MEASURED, two boats:
boat A handed in 500,000 bytes
quanted to 3,200 bytes addr 5701b6b866571515
boat B received 3,200 bytes addr 5701b6b866571515
identical TRUE
saved on either side NOTHING
19 bytes in -> 3,200 out; 500,000 bytes in -> 3,200 out; same input twice ->
byte-identical tuple.

The quant running in the page was checked against the SHIPPED ENGINE on 40 random
cases: 40/40 BYTE-IDENTICAL. It is not a lookalike, it is the same law - a
count-sketch into 1024 buckets then a fixed tail of turbo(1024) + signs(128) +
zeta(1024) + hist(1024). O(N) going in, O(1) coming out.

WHAT CROSSES IS THE LIGHT, NOT THE FILE. You cannot pull 500 KB back out of 3.2 KB
and nothing here pretends otherwise - the tuple is an ADDRESS, not an archive. The
four bands are the shape, the direction, the scale and the distribution; the
photons stay where they are. That is why nothing needs saving: the address is
small enough to carry and the big form only exists while it is being used.

---- original release notes below ----

lightDOORwsMs - a place made of light, with DOORS instead of windows

A DOOR IS A LABEL, NOT A SOCKET. That is the whole idea and it is the thing
people get wrong first. A socket is a numbered slot somebody hands out and there
are about ninety thousand of them, so people assume that is the ceiling. It is
not, because a door here is a NAME and the name is the route. Cutting a second
door does not consume a second slot, it prefixes an existing one - light,
light.kitchen, light.kitchen.tuesday, as deep as you like. THERE IS NO COUNT TO
RUN OUT OF; that ceiling only exists where somebody hands out numbered slots.

MEASURED, two separate boats, linked by hand once:
words through a door crossed
a door cut on one side appeared on the other by itself
words through the new door crossed
a stroke on the shared field crossed
a file, 9,000 bytes arrived BYTE-EXACT
sha-256 sent 78bd367073786b59cfed044eb4c372b1...
sha-256 arrived 78bd367073786b59cfed044eb4c372b1...
exact true
traces kept after contact 0
colours held after contact 1, and it survives a reload

THE COLOUR IS THE ADDRESS. It is the sha-256 of a secret this browser made for
itself the first time the page opened - two brown stops, banded 16..240,
luminance-clamped 32..224. THE SECRET NEVER LEAVES, ONLY THE COLOUR DOES. Nobody
handed you the name so nobody can take it away, and it does not change when a
link does. Two tabs of the same browser come up THE SAME COLOUR and the page says
so rather than pretending they are two people - same machine, same secret, same
boat.

THE TRACE IS SPENT, THE COLOUR IS KEPT. The block passed at the first meeting is
a ONE-TIME INTRODUCTION and the page throws it away on contact; the counter reads
zero afterwards on purpose. What you keep is the colour - not a contact list,
there is no entry, so nothing to delete and nothing to seize. AND THE COLOUR
OUTLIVES THE CONNECTION: if a link drops nobody is lost, and any boat that also
holds that colour can put you back together. Break every link at once and it
reassembles, because WHAT SURVIVED WAS NEVER THE WIRING.

HOW ANYONE ELSE GETS IN: you are INTRODUCED, by somebody who already knows you
both, and the introduction travels the links that already exist. That is the only
directory there is and it is not a list anyone can hold.

WHAT IS FREE AND THE ONE THING THAT ISN'T. No server of ours touches any of it -
words, drawings, files - once a line is open it is browser to browser with
nothing in the middle to store, log or relay. The one thing that is not free,
stated rather than hidden: browsers ask a public STUN server for their own
outside address. Free ones. They see that two addresses asked; THEY NEVER SEE A
WORD OF WHAT YOU SAY. On the same wifi it does not need them at all, and DOWN A
USB CABLE IT NEEDS NOTHING WHATSOEVER - tested, a phone reached this over the
cable with no router and no internet in the path.

WHAT IS NOT HERE YET AND WHY: a coloured QR so the first meeting could be light
itself. THE IDEA IS VERIFIED - the block is 415 characters, fits one version-13
code, OpenCV decodes it back exactly. THE ENCODER DOES NOT YET PRODUCE A VALID
CODE, checked against a reference implementation at all eight mask patterns, no
match at any of them. A CODE THAT HALF-READS IS WORSE THAN NONE because you find
out while holding a phone up in front of somebody. It goes in when it passes.

Two files, one each, no build, no dependency, nothing to fetch.

Jesse Daniel Brown (OP-JESSE). Doors, not windows. Nobody hands out the names.

Files changed (1) hide show
  1. index.html +55 -1
index.html CHANGED
@@ -80,6 +80,7 @@ canvas.paint{width:100%;height:100%;display:block;background:#050309;
80
  <button data-door="paint">paint</button>
81
  <button data-door="carry">carry</button>
82
  <button data-door="play">play</button>
 
83
  <button data-door="all">◇ all</button>
84
  <button data-door="what">what is this</button>
85
  <span class="me"><span class="key" id="mykey"></span><span id="myid">—</span>
@@ -338,6 +339,58 @@ const DOORS={
338
  };
339
  p._draw();
340
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  play:(b,p)=>{
342
  b.style.padding="8px";
343
  b.innerHTML="<h4>hand anything in — it leaves as 3.1 KB</h4>"+
@@ -715,7 +768,8 @@ document.querySelectorAll("#sill button[data-door]").forEach(btn=>{
715
  btn.onclick=()=>{ const d=btn.dataset.door;
716
  if(open.has(d)){ open.get(d).remove(); open.delete(d); lit(); return; }
717
  pane(d,d==="what"?"what is this":d,DOORS[d],
718
- d==="paint"||d==="play"?420:340, d==="what"?420:d==="play"?380:320); };
 
719
  });
720
  (async()=>{ /* a colour before anyone arrives, from this browser alone */
721
  let s=null; try{s=localStorage.getItem("ld.seed")}catch(e){}
 
80
  <button data-door="paint">paint</button>
81
  <button data-door="carry">carry</button>
82
  <button data-door="play">play</button>
83
+ <button data-door="rooms">rooms</button>
84
  <button data-door="all">◇ all</button>
85
  <button data-door="what">what is this</button>
86
  <span class="me"><span class="key" id="mykey"></span><span id="myid">—</span>
 
339
  };
340
  p._draw();
341
  },
342
+ rooms:(b,p)=>{
343
+ b.style.padding="8px";
344
+ b.innerHTML="<h4>open any room &mdash; no table, no server, no clock</h4>"+
345
+ '<input id=rn placeholder="a room number &mdash; 0, 50000000, even 10^30" value="0">'+
346
+ '<canvas id=rc style="width:100%;height:150px;display:block;'+
347
+ 'border:1px solid var(--line);border-radius:8px;margin:6px 0"></canvas>'+
348
+ '<div class=row><span class=k>address (short)</span><span id=ra class=acc>&mdash;</span></div>'+
349
+ '<div class=row><span class=k>address (full)</span><span id=rf class=k style="font-size:10px">&mdash;</span></div>'+
350
+ '<div class=row><span class=k>opened</span><span id=rb>&mdash;</span></div>'+
351
+ '<div class=row><span class=k>minted in</span><span id=rt>&mdash;</span></div>'+
352
+ '<button class="btn" id=rgo>open the room</button>'+
353
+ '<button class="btn g" id=rrand>a random one</button>'+
354
+ "<p><small>The room's address is <b>sha256(\"CUBE|n\")</b> &mdash; the same law "+
355
+ "the registration office uses for its items, computed right here in the light. "+
356
+ "The body is its 3,200-byte tuple, from the address alone. <b>Nothing is stored "+
357
+ "and no number is too big</b> &mdash; room 10^30 costs what room 0 costs, because "+
358
+ "there is no table to walk.</small></p>";
359
+ const CUBE="b40b3e1726b0e81d";
360
+ const c=b.querySelector("#rc"), g=c.getContext("2d");
361
+ p._fit=()=>{const r=c.getBoundingClientRect();
362
+ c.width=Math.max(2,r.width*2); c.height=Math.max(2,r.height*2); if(p._t)show(p._t);};
363
+ function show(t){ p._t=t;
364
+ const W=c.width,H=c.height,N=32,cw=W/N,ch=H/N;
365
+ g.fillStyle="#050309"; g.fillRect(0,0,W,H);
366
+ for(let i=0;i<1024;i++){
367
+ const R=Math.min(255,Math.abs(t[i]<<24>>24)*2), G=(15-t[1152+i])*17, B=t[2176+i];
368
+ const neg=(t[1024+(i>>3)]>>(i&7))&1;
369
+ g.fillStyle="rgb("+(neg?B:R)+","+G+","+(neg?R:B)+")";
370
+ g.fillRect((i%N)*cw,((i/N)|0)*ch,cw+1,ch+1);
371
+ }
372
+ }
373
+ async function open(n){
374
+ const t0=performance.now();
375
+ const full=await sha(CUBE+"|"+n); /* office law: sha256("CUBE|n") */
376
+ const shortA=full.slice(0,16);
377
+ const seed=new TextEncoder().encode(full);
378
+ const tuple=quant(seed); /* the address is the content */
379
+ const ms=(performance.now()-t0).toFixed(2);
380
+ b.querySelector("#ra").textContent=shortA;
381
+ b.querySelector("#rf").textContent=full;
382
+ b.querySelector("#rb").textContent=tuple.length+" bytes";
383
+ b.querySelector("#rt").textContent=ms+" ms";
384
+ show(tuple); absorb(shortA);
385
+ }
386
+ b.querySelector("#rgo").onclick=()=>open((b.querySelector("#rn").value||"0").trim());
387
+ b.querySelector("#rn").onkeydown=e=>{ if(e.key==="Enter") open((e.target.value||"0").trim()); };
388
+ b.querySelector("#rrand").onclick=()=>{
389
+ const n=(BigInt(Math.floor(Math.random()*1e15))*1000003n).toString();
390
+ b.querySelector("#rn").value=n; open(n);
391
+ };
392
+ setTimeout(()=>{p._fit(); open("0");},60);
393
+ },
394
  play:(b,p)=>{
395
  b.style.padding="8px";
396
  b.innerHTML="<h4>hand anything in — it leaves as 3.1 KB</h4>"+
 
768
  btn.onclick=()=>{ const d=btn.dataset.door;
769
  if(open.has(d)){ open.get(d).remove(); open.delete(d); lit(); return; }
770
  pane(d,d==="what"?"what is this":d,DOORS[d],
771
+ d==="paint"||d==="play"||d==="rooms"?420:340,
772
+ d==="what"?420:d==="play"||d==="rooms"?400:320); };
773
  });
774
  (async()=>{ /* a colour before anyone arrives, from this browser alone */
775
  let s=null; try{s=localStorage.getItem("ld.seed")}catch(e){}