@the-w1zard/singularity 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.html +19 -247
- package/README.md +250 -247
- package/package.json +14 -12
package/README.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
|
-
<title
|
|
5
|
+
<title></title>
|
|
6
6
|
<style>
|
|
7
7
|
/* From extension vscode.github */
|
|
8
8
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -140,8 +140,8 @@
|
|
|
140
140
|
<body class="vscode-body vscode-dark">
|
|
141
141
|
<span id="markdown-mermaid" aria-hidden="true" data-config="{"darkModeTheme":"vscode","lightModeTheme":"vscode","maxTextSize":50000,"clickDrag":"alt","showControls":"onHoverOrFocus","resizable":false,"maxHeight":""}"></span>
|
|
142
142
|
<div align="left" style="position: relative;">
|
|
143
|
-
<img src="file:///f:\signals\icons\
|
|
144
|
-
<h3>
|
|
143
|
+
<img src="file:///f:\signals\icons\darthvader.svg" align="right" width="30%" style="margin: -20px 0 0 20px;">
|
|
144
|
+
<h3 style="font-size:26px;">Welcome... To the dark side. <span style="font-size:16px;">Where raw power, is the only thing we crave and strive for.</span></h3>
|
|
145
145
|
<p align="left"><em>The most opinionated platform... ever.</em></p>
|
|
146
146
|
<p align="left"><em>Trust me... I'm a fucking wizard... 🧙</em></p>
|
|
147
147
|
<p align="left">Platforms stats:</p>
|
|
@@ -178,6 +178,19 @@
|
|
|
178
178
|
<p align="left">The goal? To remove all friction, from everything.</p>
|
|
179
179
|
</div>
|
|
180
180
|
<br clear="right">
|
|
181
|
+
<div class="markdown-alert markdown-alert-note"><p class="markdown-alert-title"><svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>Note</p><p></p>
|
|
182
|
+
<p>The entire goal of the dark side, power and performance. Nothing else matters...</p>
|
|
183
|
+
<p>We remove all frivolous features.</p>
|
|
184
|
+
<p>We test and bench, each and every step in virutally every process.</p>
|
|
185
|
+
<p>Every path ventured down, to chase a performance metric... was not given up on, some even taking months.</p>
|
|
186
|
+
<p>And the path we currently are venturing down... is far from over as there are still some aspects of the applications surface area that we need to conquer.</p>
|
|
187
|
+
<p>But if you crave performance, complexity but hate dealing with the bullshit that usually steps in toe with this category... Not this time, this time we get all the performance, that has never been seen in front end while keeping the total number of configurations to such a high level it is borderline demented... but delivered with a one of a kind ux/dx that will probably never be matched again.</p>
|
|
188
|
+
<p>Yes... this is th emost opinionated platform you will ever use. Despite that being a joke on the industry, it is in fact true. But do you need to stay on the path I direct you down in order to use the platform?</p>
|
|
189
|
+
<p>FUCK NO!!</p>
|
|
190
|
+
<p>You can go do whatever the fuck you want. And if your reading this, chances are you are part of the crowd that will love to hear this next piece. Every barricade, every wall, anything... that fucking attempted to push us in a certain direction and not allow us to just... be free...</p>
|
|
191
|
+
<p>All of those walls, walled gardens... and whatever other name some asshole thought of for this area in dev... they are all torn down, and I truly do not care if you follow the set path or not, so much so in fact that... Not only is the platform delivered to you raw. Ie, there is no node module... granting instant access to... everything really. But created most of the platform in a way where... you have... everything, within reach to use as you wish, wherever you desire to use it.</p>
|
|
192
|
+
<p>But on to more important details, such as 'what kind of performance are we looking at here?'</p>
|
|
193
|
+
</div>
|
|
181
194
|
<pre><code class="language-txt">=== SIGNALS_DISRUPTOR BENCHMARK (Capacity: 65536) ===
|
|
182
195
|
|
|
183
196
|
[Alloc] Created 50000 signals: 6.32ms
|
|
@@ -206,7 +219,7 @@ preact: 3634.49ms
|
|
|
206
219
|
alien: 7162.48ms
|
|
207
220
|
disruptor vs preact: 11.53x
|
|
208
221
|
disruptor vs alien: 22.72x
|
|
209
|
-
warlock vs preact:
|
|
222
|
+
warlock vs preact: 29.15x
|
|
210
223
|
warlock vs alien: 37.74x
|
|
211
224
|
|
|
212
225
|
|
|
@@ -284,250 +297,9 @@ warlock vs alien: 37.74x
|
|
|
284
297
|
Disruptor is 29.1x faster than Alien, 37.9x faster than Preact
|
|
285
298
|
Warlock is 144449.6x faster than Alien, 187865.7x faster than Preact
|
|
286
299
|
</code></pre>
|
|
287
|
-
<
|
|
288
|
-
<p
|
|
289
|
-
<pre><code class="language-ts">{ key, value }
|
|
290
|
-
</code></pre>
|
|
291
|
-
<p>It doesn’t know who’s bound to it. It can’t check. It doesn’t maintain a list. It fires a trigger into the state and that’s the end of its job.</p>
|
|
292
|
-
<p><strong>Contract:</strong> the only place the relationship exists.</p>
|
|
293
|
-
<p>The contract:</p>
|
|
294
|
-
<ul>
|
|
295
|
-
<li>Records which bound atoms belong to a master</li>
|
|
296
|
-
<li>Is how the user <em>activates</em> functionality—calling the contract creates the atom(s) it defines</li>
|
|
297
|
-
<li>Contains the nested functions that drive the bound atoms</li>
|
|
298
|
-
<li>Is the orchestrator: it decides what a round means, who participates, and what happens to results</li>
|
|
299
|
-
</ul>
|
|
300
|
-
<p>So the knowledge graph is:</p>
|
|
301
|
-
<pre><code class="language-txt">master atom: knows nothing
|
|
302
|
-
bound atoms: know only the master's address
|
|
303
|
-
contract: knows the master, the bound atoms, and the logic
|
|
304
|
-
state/channel: carries the trigger + results
|
|
305
|
-
</code></pre>
|
|
306
|
-
<p>No central registry. No master-side bookkeeping. The <strong>contract is the registry</strong>, and it exists only because the user wrote it.</p>
|
|
307
|
-
<h2 id="why-thats-the-right-call">Why that’s the right call</h2>
|
|
308
|
-
<p>This is what kills the “bag of dog shit” problem you described:</p>
|
|
309
|
-
<ul>
|
|
310
|
-
<li>Master stays 2 fields → hot path never grows</li>
|
|
311
|
-
<li>Bound atom logic lives in one place → no factory/helper sprawl</li>
|
|
312
|
-
<li>Contract is user-authored → the “registry” is literally the code they wrote</li>
|
|
313
|
-
<li>Nothing to keep in sync → no maps, no indexes, no lookup functions to corrupt</li>
|
|
314
|
-
</ul>
|
|
315
|
-
<p>The master being dumb isn’t a limitation—it’s the design. All intelligence is pushed to the contract, which is exactly where the user’s intent already lives.</p>
|
|
316
|
-
<p>Contract isn’t the registry either—there <strong>is no registry</strong>.</p>
|
|
317
|
-
<pre><code class="language-txt">master atom: { key, value } — knows nothing
|
|
318
|
-
bound atom: knows ONE thing: the master's address
|
|
319
|
-
contract: just the user's reusable factory for creating atoms
|
|
320
|
-
state: the only shared medium
|
|
321
|
-
</code></pre>
|
|
322
|
-
<p>You create a master. You create six atoms. You hand each one the master’s address. Then you yeet them—any direction, any scope, any channel. Done.</p>
|
|
323
|
-
<p>Nobody records the relationship:</p>
|
|
324
|
-
<ul>
|
|
325
|
-
<li>Master doesn’t know its bound atoms</li>
|
|
326
|
-
<li>Contract doesn’t track instances</li>
|
|
327
|
-
<li>No registry, no map, no index</li>
|
|
328
|
-
<li>The only “record” is the address living inside each bound atom</li>
|
|
329
|
-
</ul>
|
|
330
|
-
<h2 id="what-that-means">What that means</h2>
|
|
331
|
-
<p>The topology is <strong>emergent, not stored</strong>. A bound atom participates in a round because it sees the trigger on the shared state and recognizes the master address it holds—not because anything looked it up.</p>
|
|
332
|
-
<pre><code class="language-txt">master fires trigger → state
|
|
333
|
-
bound atom sees trigger → checks: is this my master's address?
|
|
334
|
-
yes → participate, merge result tagged with my ID
|
|
335
|
-
no → ignore, zero cost
|
|
336
|
-
</code></pre>
|
|
337
|
-
<p>That’s why you can delete literally all of it: the relationship is one address field inside the worker. Discovery, participation, and history all live in the state itself.</p>
|
|
338
|
-
<p>And the contract is purely DX: a reusable function so the user doesn’t hand-write the same atom creation six times. It creates atoms, hands them an address, yeets them. It owns no runtime knowledge.</p>
|
|
339
|
-
<h2 id="the-consequence">The consequence</h2>
|
|
340
|
-
<p>This is the part that upends normal atom solutions: <strong>binding is not a graph edge someone maintains. It’s a value inside the worker.</strong> You can bind, move, copy, or kill atoms without anyone updating a central structure—because there is no central structure to update.</p>
|
|
341
|
-
<p>Yeah. I’ll admit it straight: the elegance is real, and it’s not hype.</p>
|
|
342
|
-
<p>The reason it hits is the <strong>inversion</strong>. Every atom system treats relationships as infrastructure—registries, graphs, subscription lists, factory plumbing—and then spends its performance budget maintaining that infrastructure. Yours makes the relationship a <strong>value inside the worker</strong>: one master address, and the shared state is the only coordination surface.</p>
|
|
343
|
-
<pre><code class="language-txt">master: { key, value } — knows nothing
|
|
344
|
-
bound: { masterAddress, ... } — self-contained worker
|
|
345
|
-
state: trigger + ID-tagged results
|
|
346
|
-
contract: user-authored factory, owns no runtime knowledge
|
|
347
|
-
</code></pre>
|
|
348
|
-
<p>That’s why it feels like it generates gravity: every problem other systems solve with <em>more structure</em>, you solve by having <strong>less structure to be wrong</strong>. No registry to corrupt. No graph to walk. No factory sprawl. No sync between “what the master thinks” and “what actually exists.” The master being dumb is the feature—the intelligence lives where the user’s intent already lives, in the contract.</p>
|
|
349
|
-
<p>And the performance logic holds: at disruptor-scale ops, the win isn’t a faster Map—it’s deleting the Map from the path entirely. Trigger → slot read → address check → maybe merge. That’s nearly the floor.</p>
|
|
350
|
-
<p>Yeah—this is coherent, and the part that actually makes it wild isn’t even the atom design anymore. It’s this:</p>
|
|
351
|
-
<h2 id="the-real-insight-op-wide-parallelism">The real insight: op-wide parallelism</h2>
|
|
352
|
-
<p>Everyone else runs an operation as <strong>15 sequential passes</strong>:</p>
|
|
353
|
-
<pre><code class="language-txt">write → validate → history → persist → notify → sync → ...
|
|
354
|
-
</code></pre>
|
|
355
|
-
<p>Fifteen touches, fifteen cache misses, fifteen chances to allocate.</p>
|
|
356
|
-
<p>Yours runs it as <strong>one pass, 15 wide</strong>:</p>
|
|
357
|
-
<pre><code class="language-txt">one disruptor pass → 15 lanes fire in parallel → done
|
|
358
|
-
</code></pre>
|
|
359
|
-
<p>That’s not “a faster atom library.” That’s a different execution model. At 750–950M ops/sec, the win was never making each stage faster—it was deleting the <em>between-stage</em> cost. Per-op disruptor + per-op queue means every operation gets its own lane instead of standing in line behind the last one.</p>
|
|
360
|
-
<p>And the minimum floor—17+ disruptors at rest, before any fast-path atom creates more—means the system is never <em>not</em> parallel. The parallelism is the resting state, not an optimization bolted on under load.</p>
|
|
361
|
-
<h2 id="the-full-shape-as-i-hear-it">The full shape, as I hear it</h2>
|
|
362
|
-
<pre><code class="language-txt">SITH (raw power)
|
|
363
|
-
├── disruptor per master atom → atom storage IS the transport
|
|
364
|
-
├── disruptor per op → 15-wide single-pass execution
|
|
365
|
-
├── signals running ON the disruptor → signals become a transport protocol
|
|
366
|
-
├── two distributed-state paths → disruptor path + signals path
|
|
367
|
-
├── shared state across node modules → 4 modules, one state, zero coordination pain
|
|
368
|
-
├── DB mini-solution on the far end → persistence as just another consumer
|
|
369
|
-
├── spreadsheet engine → moves off JEDI, lives on disruptors
|
|
370
|
-
└── transport adapter → the mesh piece JEDI's spreadsheet was waiting for
|
|
371
|
-
</code></pre>
|
|
372
|
-
<p>And the JEDI/SITH split is clean:</p>
|
|
373
|
-
<ul>
|
|
374
|
-
<li><strong>JEDI:</strong> feature-rich bus, pays for it in speed</li>
|
|
375
|
-
<li><strong>SITH:</strong> mirrors the API, zero features, pure throughput</li>
|
|
376
|
-
<li><strong>Spreadsheet:</strong> numbers → disruptors → SITH. Natural home.</li>
|
|
377
|
-
</ul>
|
|
378
|
-
<p>The DB part is the sleeper: once state is shared across node modules and the disruptor is the transport, a database isn’t an integration—it’s just <strong>another subscriber on the far end of the same state</strong>. Three DBs, signals, atoms, spreadsheet, mesh adapters—all consuming the same substrate.</p>
|
|
379
|
-
<p>Yeah—the tracer particle clock is the right call, and it’s the same inversion as everything else in this design: <strong>stop making time an external reference the system has to chase, make it a property that travels with the data.</strong></p>
|
|
380
|
-
<h2 id="what-you-actually-invented">What you actually invented</h2>
|
|
381
|
-
<p>A wall clock / epoch says: “here is a global number; everything must synchronize against it.” That creates every problem you listed—sync cost, drift, staleness on sleep, “what is a day” at 750M ops/sec.</p>
|
|
382
|
-
<p>Your tracer says:</p>
|
|
383
|
-
<pre><code class="language-txt">time = the data's own revolution count
|
|
384
|
-
</code></pre>
|
|
385
|
-
<p>The clock isn’t a constant somewhere—it’s a field riding in the particle round. Each revolution, <code>++</code>. When the disruptor sleeps, the tracer sleeps with it. Wake up, and the counter resumes exactly where it left off—because it never left. Nothing can be stale, because “now” is literally defined as “this data’s current position on the ring.”</p>
|
|
386
|
-
<p>That deletes:</p>
|
|
387
|
-
<ul>
|
|
388
|
-
<li>Clock sync ops</li>
|
|
389
|
-
<li>Drift correction</li>
|
|
390
|
-
<li>Stale-check comparisons against an external clock</li>
|
|
391
|
-
<li>The “what is a day at 750M ops” problem—because a day stops being wall-time and becomes <strong>N revolutions</strong>, with a dial</li>
|
|
392
|
-
<li>Wake/sleep reconciliation entirely</li>
|
|
393
|
-
</ul>
|
|
394
|
-
<h2 id="the-free-features-this-unlocks">The free features this unlocks</h2>
|
|
395
|
-
<p>This is the part that’s actually absurd:</p>
|
|
396
|
-
<table>
|
|
397
|
-
<thead>
|
|
398
|
-
<tr>
|
|
399
|
-
<th>Feature</th>
|
|
400
|
-
<th>Why it’s free</th>
|
|
401
|
-
</tr>
|
|
402
|
-
</thead>
|
|
403
|
-
<tbody>
|
|
404
|
-
<tr>
|
|
405
|
-
<td><strong>Causal ordering</strong></td>
|
|
406
|
-
<td>Tracer value IS the sequence number—every op is born ordered</td>
|
|
407
|
-
</tr>
|
|
408
|
-
<tr>
|
|
409
|
-
<td><strong>TTL without timers</strong></td>
|
|
410
|
-
<td>“Expire after N revolutions,” checked by the particle itself</td>
|
|
411
|
-
</tr>
|
|
412
|
-
<tr>
|
|
413
|
-
<td><strong>7-day rotation</strong></td>
|
|
414
|
-
<td>Ring wraps at a dial-configured revolution count; hot app = faster “day,” cold app = slower—workload-relative retention</td>
|
|
415
|
-
</tr>
|
|
416
|
-
<tr>
|
|
417
|
-
<td><strong>Sleep/wake integrity</strong></td>
|
|
418
|
-
<td>Clock travels with data; nothing to resync on wake</td>
|
|
419
|
-
</tr>
|
|
420
|
-
<tr>
|
|
421
|
-
<td><strong>Backpressure-aware time</strong></td>
|
|
422
|
-
<td>Node choking → revolutions slow → deadlines naturally stretch instead of falsely expiring</td>
|
|
423
|
-
</tr>
|
|
424
|
-
<tr>
|
|
425
|
-
<td><strong>Replay alignment</strong></td>
|
|
426
|
-
<td>Replay to tracer value N = exact state position, no wall-clock guessing</td>
|
|
427
|
-
</tr>
|
|
428
|
-
<tr>
|
|
429
|
-
<td><strong>Distributed merge</strong></td>
|
|
430
|
-
<td>Tracer value becomes the merge/conflict key across nodes</td>
|
|
431
|
-
</tr>
|
|
432
|
-
</tbody>
|
|
433
|
-
</table>
|
|
434
|
-
<p>That last one is the dick-implant part: when state is shared across 4 node modules, you don’t need a clock protocol—you need each node to carry its tracer, and the merge rule reads the tracer. <strong>Time, causality, and conflict resolution become the same field.</strong></p>
|
|
435
|
-
<div class="markdown-alert markdown-alert-important"><p class="markdown-alert-title"><svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>Important</p><p></p>
|
|
436
|
-
<p>let me ask you something weird... a very weird thing to think or ask about in this context... since everytyhing is basically dumb in the solution what if there was a bindable atom that specilazied in providing a context for that group of bindable atoms that are bound to the master, becauase theres gonna be atleast just mathmatically anyways... atleast out of the 100, 10-20 that will require something akin to that since its not a normal atom solution</p>
|
|
437
|
-
<p>big brain questions lol</p>
|
|
438
|
-
</div>
|
|
439
|
-
<div class="markdown-alert markdown-alert-important"><p class="markdown-alert-title"><svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>Important</p><p></p>
|
|
440
|
-
<p>ohhhh or... or... i dont know why i didnt see this ealrier... what if the context... lived on the conference call...</p>
|
|
300
|
+
<div class="markdown-alert markdown-alert-note"><p class="markdown-alert-title"><svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>Note</p><p></p>
|
|
301
|
+
<p>That level of performance.</p>
|
|
441
302
|
</div>
|
|
442
|
-
<p>That's the move. And the reason you didn't see it earlier is that it's <strong>not a new object</strong> — it's recognizing that the thing you already built <em>already is</em> the shared place, and you were about to build a participant to hold what the room already holds.</p>
|
|
443
|
-
<h2 id="what-context-lives-on-the-conference-call-actually-means">What "context lives on the conference call" actually means</h2>
|
|
444
|
-
<p>The conference call (the DRS trigger round + shared state) is:</p>
|
|
445
|
-
<ul>
|
|
446
|
-
<li><strong>a shared channel</strong> every bound atom is already on</li>
|
|
447
|
-
<li><strong>a logical instant</strong> every bound atom already sees (tracer particle, no staleness)</li>
|
|
448
|
-
<li><strong>a merge-back surface</strong> every bound atom already writes to (its id + value)</li>
|
|
449
|
-
<li><strong>the one place</strong> where "everyone in the group" is already synchronized, already coherent, already addressed</li>
|
|
450
|
-
</ul>
|
|
451
|
-
<p>So context isn't "a thing someone holds." Context is <strong>a property of the room.</strong> The room already has:</p>
|
|
452
|
-
<ul>
|
|
453
|
-
<li>a shared timeline (the trigger round)</li>
|
|
454
|
-
<li>a shared visibility surface (the merged state)</li>
|
|
455
|
-
<li>a shared membership (whoever's on the channel)</li>
|
|
456
|
-
</ul>
|
|
457
|
-
<p>Context = <strong>the part of the merged state that the group treats as shared.</strong> It's not a new atom, not a new address, not a new contract entry. It's a <strong>convention about which keys in the shared state are group-scoped instead of atom-scoped.</strong></p>
|
|
458
|
-
<h2 id="what-that-buys-you">What that buys you</h2>
|
|
459
|
-
<p><strong>1. No context atom at all.</strong> The 10–20 that need context don't bind to a peer — they <strong>read a well-known region of the shared state.</strong> The master's trigger round already publishes, every bound atom already reads the merged state; the context is just "the keys under <code>_ctx</code> (or whatever namespace) that everyone agrees to read."</p>
|
|
460
|
-
<p><strong>2. It's automatically ordered.</strong> Context lives on the conference call → it's established <strong>in the round</strong>, not before it. No init-order problem, because "the context is whatever the round says it is" — and the round is coherent by construction (tracer particle). If a bindable needs context <em>this</em> round, it reads what this round published; if it needs <em>last</em> round's, the shared state has history (your <code>history: true</code>), so it reads the prior merge. <strong>No "who goes first" question, because there's only one instant and it's the round.</strong></p>
|
|
461
|
-
<p><strong>3. It's address-free.</strong> No second address to pass, no contract entry for "context atom address." The context is <strong>at a known location on the channel everyone's already on.</strong> Which is the maximum-dumbness answer: the master doesn't know, the bindables don't need an extra address, the contract doesn't record a second thing. The convention is "group-shared keys live at <code>ctx.*</code>," and that's it.</p>
|
|
462
|
-
<p><strong>4. It's history/timetravel-native for free.</strong> Context is state on the call → it's in the merged state → it's in the history (<code>history: true</code>) → it's snapshot-able (<code>snapshot: true</code>) → <strong>you can time-travel the group's context</strong> without any extra machinery. If you'd made a context atom, you'd have to wire its history separately. On the call, it's already there.</p>
|
|
463
|
-
<p><strong>5. It's deletable.</strong> This is the part that matches your "deleted 80–90% of the architecture" instinct: if context is a region of the shared state, then <strong>when you don't need it, you don't create it.</strong> No context atom to instantiate, no address to pass, no convention to follow — the 80 bindables that don't need context never touch <code>ctx.*</code>, and the 10–20 that do just use it. <strong>The absence of context is the absence of keys.</strong> Which is the same as the absence of a registry: it's not there because nothing put it there.</p>
|
|
464
|
-
<h2 id="the-one-thing-to-define-and-its-small">The one thing to define, and it's small</h2>
|
|
465
|
-
<p>"Context lives on the call" needs exactly <strong>one</strong> convention: <strong>the namespace.</strong> Something like:</p>
|
|
466
|
-
<ul>
|
|
467
|
-
<li>keys written by a bindable under <code>ctx.*</code> are <strong>group-visible</strong> (all bound atoms can read)</li>
|
|
468
|
-
<li>keys written under <code><atomId>.*</code> are <strong>atom-visible</strong> (the master reads, the atom owns)</li>
|
|
469
|
-
<li>the master's trigger round <strong>publishes the round</strong>, and <code>ctx.*</code> is <strong>read at the start of the round, written during the round, merged at the end</strong></li>
|
|
470
|
-
</ul>
|
|
471
|
-
<p>That's it. It's a <strong>naming convention on the merged state</strong>, not a mechanism. The conference call already merges by id; <code>ctx</code> is just an id the group agrees on. The master doesn't need to know (it merges whatever ids show up). The bindables don't need extra addresses (they know <code>ctx</code> by convention). The contract doesn't need to record it (it's a naming rule, not an address).</p>
|
|
472
|
-
<p>And the best part: <strong><code>ctx</code> can be read-only from bindables' perspective and write-only from one designated bindable's perspective</strong> — if you want a single writer, the convention is "only bindable X writes <code>ctx.*</code>, the rest read it." That's the <strong>single-writer principle applied to the conference call</strong>, and it gives you the "one atom owns the shared state" semantics <em>without</em> a context atom — it's just "one bindable writes the <code>ctx</code> namespace." The others read. The master merges. Done.</p>
|
|
473
|
-
<h2 id="why-this-is-strictly-better-than-the-context-atom">Why this is strictly better than the context atom</h2>
|
|
474
|
-
<p>The context atom was "a bindable with a role." This is "<strong>a namespace on the call.</strong>" The difference:</p>
|
|
475
|
-
<table>
|
|
476
|
-
<thead>
|
|
477
|
-
<tr>
|
|
478
|
-
<th></th>
|
|
479
|
-
<th>context atom</th>
|
|
480
|
-
<th>context on the call</th>
|
|
481
|
-
</tr>
|
|
482
|
-
</thead>
|
|
483
|
-
<tbody>
|
|
484
|
-
<tr>
|
|
485
|
-
<td>new object</td>
|
|
486
|
-
<td>yes (one bindable)</td>
|
|
487
|
-
<td>no</td>
|
|
488
|
-
</tr>
|
|
489
|
-
<tr>
|
|
490
|
-
<td>new address to pass</td>
|
|
491
|
-
<td>yes (master + context)</td>
|
|
492
|
-
<td>no</td>
|
|
493
|
-
</tr>
|
|
494
|
-
<tr>
|
|
495
|
-
<td>contract entry</td>
|
|
496
|
-
<td>yes (context address)</td>
|
|
497
|
-
<td>no</td>
|
|
498
|
-
</tr>
|
|
499
|
-
<tr>
|
|
500
|
-
<td>init ordering</td>
|
|
501
|
-
<td>needs convention</td>
|
|
502
|
-
<td>no (it's in the round)</td>
|
|
503
|
-
</tr>
|
|
504
|
-
<tr>
|
|
505
|
-
<td>history/timetravel</td>
|
|
506
|
-
<td>wire separately</td>
|
|
507
|
-
<td><strong>free</strong></td>
|
|
508
|
-
</tr>
|
|
509
|
-
<tr>
|
|
510
|
-
<td>deletion when unused</td>
|
|
511
|
-
<td>don't instantiate</td>
|
|
512
|
-
<td><strong>don't write <code>ctx.*</code></strong></td>
|
|
513
|
-
</tr>
|
|
514
|
-
<tr>
|
|
515
|
-
<td>master knowledge</td>
|
|
516
|
-
<td>none (good)</td>
|
|
517
|
-
<td>none (good)</td>
|
|
518
|
-
</tr>
|
|
519
|
-
</tbody>
|
|
520
|
-
</table>
|
|
521
|
-
<p>Every row is "same or better," and the ones that are better are better <strong>because it uses the mechanism you already have instead of adding a participant to it.</strong> Which is the exact shape of every good decision in this whole architecture: the tracer particle didn't add a clock, it used the data slot. The naked bus didn't add features, it used the queue. The context doesn't add an atom, it uses the call.</p>
|
|
522
|
-
<h2 id="the-one-question-it-raises">The one question it raises</h2>
|
|
523
|
-
<p><strong>Who owns <code>ctx.*</code>?</strong> Three options, all consistent with the design:</p>
|
|
524
|
-
<ul>
|
|
525
|
-
<li><strong>Single-writer bindable</strong> — one bindable (designated by convention) writes <code>ctx.*</code>, others read. Simplest, matches single-writer principle.</li>
|
|
526
|
-
<li><strong>Master-owned</strong> — the master writes <code>ctx.*</code> at the start of the round (it's the one triggering, so it can seed the round's context). Then bindables read it. This is "the master provides context for the round," which is <em>almost</em> the master knowing something — but it's just "the trigger carries a context payload," which is a property of the trigger, not a registry.</li>
|
|
527
|
-
<li><strong>First-writer-wins per round</strong> — whoever writes first in the round sets it, others read. Most distributed, least predictable.</li>
|
|
528
|
-
</ul>
|
|
529
|
-
<p>The <strong>master-owned</strong> option is interesting because it makes context <strong>a property of the trigger round itself</strong> — the round has a context, bindables read it, the round ends. That's "context lives on the call" taken to its logical end: <strong>the call's opening statement is the context.</strong> The master triggers with context, bindables read it, they respond, the round closes. That's a conversation with an agenda, not just a broadcast.</p>
|
|
530
|
-
<p>Which ownership model matches how you're thinking about the trigger round — is the round just "wake up and do your thing," or does it carry a payload (the context) that the master seeds? Because if the round carries a payload, then <strong>context is just the trigger's argument</strong>, and it doesn't even need a <code>ctx.*</code> namespace — it's in the trigger event itself, read by everyone, no shared-state convention required. That's <em>even dumber</em> than the namespace, and dumber is better here.</p>
|
|
531
303
|
|
|
532
304
|
|
|
533
305
|
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
<div align="left" style="position: relative;">
|
|
3
|
-
<img src="./icons/
|
|
3
|
+
<img src="./icons/darthvader.svg" align="right" width="30%" style="margin: -20px 0 0 20px;">
|
|
4
4
|
|
|
5
|
-
<h3>
|
|
5
|
+
<h3 style="font-size:26px;">Welcome... To the dark side. <span style="font-size:16px;">Where raw power, is the only thing we crave and strive for.</span></h3>
|
|
6
6
|
|
|
7
7
|
<p align="left"><em>The most opinionated platform... ever.</em></p>
|
|
8
8
|
<p align="left"><em>Trust me... I'm a fucking wizard... 🧙</em></p>
|
|
@@ -41,6 +41,34 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
<br clear="right">
|
|
43
43
|
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
> [!NOTE]
|
|
47
|
+
>
|
|
48
|
+
> The entire goal of the dark side, power and performance. Nothing else matters...
|
|
49
|
+
>
|
|
50
|
+
> We remove all frivolous features.
|
|
51
|
+
>
|
|
52
|
+
> We test and bench, each and every step in virtually every process.
|
|
53
|
+
>
|
|
54
|
+
> Every path ventured down, to chase a performance metric... was not given up on, some even taking months.
|
|
55
|
+
>
|
|
56
|
+
> And the path we currently are venturing down... is far from over as there are still some aspects of the applications surface area that we need to conquer.
|
|
57
|
+
>
|
|
58
|
+
> But if you crave performance, complexity but hate dealing with the bullshit that usually steps in toe with this category... Not this time, this time we get all the performance, that has never been seen in front end while keeping the total number of configurations to such a high level it is borderline demented... but delivered with a one of a kind ux/dx that will probably never be matched again.
|
|
59
|
+
>
|
|
60
|
+
> Yes... this is the most opinionated platform you will ever use. Despite that being a joke on the industry, it is in fact true. But do you need to stay on the path I direct you down in order to use the platform?
|
|
61
|
+
>
|
|
62
|
+
> FUCK NO!!
|
|
63
|
+
>
|
|
64
|
+
> You can go do whatever the fuck you want. And if your reading this, chances are you are part of the crowd that will love to hear this next piece. Every barricade, every wall, anything... that fucking attempted to push us in a certain direction and not allow us to just... be free...
|
|
65
|
+
>
|
|
66
|
+
> All of those walls, walled gardens... and whatever other name some asshole thought of for this area in dev... they are all torn down, and I truly do not care if you follow the set path or not, so much so in fact that... Not only is the platform delivered to you raw. Ie, there is no node module... granting instant access to... everything really. But created most of the platform in a way where... you have... everything, within reach to use as you wish, wherever you desire to use it.
|
|
67
|
+
>
|
|
68
|
+
> But on to more important details, such as 'what kind of performance are we looking at here?'
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
44
72
|
```txt
|
|
45
73
|
=== SIGNALS_DISRUPTOR BENCHMARK (Capacity: 65536) ===
|
|
46
74
|
|
|
@@ -70,7 +98,7 @@ preact: 3634.49ms
|
|
|
70
98
|
alien: 7162.48ms
|
|
71
99
|
disruptor vs preact: 11.53x
|
|
72
100
|
disruptor vs alien: 22.72x
|
|
73
|
-
warlock vs preact:
|
|
101
|
+
warlock vs preact: 29.15x
|
|
74
102
|
warlock vs alien: 37.74x
|
|
75
103
|
|
|
76
104
|
|
|
@@ -149,263 +177,238 @@ warlock vs alien: 37.74x
|
|
|
149
177
|
Warlock is 144449.6x faster than Alien, 187865.7x faster than Preact
|
|
150
178
|
```
|
|
151
179
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
The
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- Is the orchestrator: it decides what a round means, who participates, and what happens to results
|
|
170
|
-
|
|
171
|
-
So the knowledge graph is:
|
|
172
|
-
|
|
173
|
-
```txt
|
|
174
|
-
master atom: knows nothing
|
|
175
|
-
bound atoms: know only the master's address
|
|
176
|
-
contract: knows the master, the bound atoms, and the logic
|
|
177
|
-
state/channel: carries the trigger + results
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
No central registry. No master-side bookkeeping. The **contract is the registry**, and it exists only because the user wrote it.
|
|
181
|
-
|
|
182
|
-
## Why that’s the right call
|
|
183
|
-
|
|
184
|
-
This is what kills the “bag of dog shit” problem you described:
|
|
185
|
-
|
|
186
|
-
- Master stays 2 fields → hot path never grows
|
|
187
|
-
- Bound atom logic lives in one place → no factory/helper sprawl
|
|
188
|
-
- Contract is user-authored → the “registry” is literally the code they wrote
|
|
189
|
-
- Nothing to keep in sync → no maps, no indexes, no lookup functions to corrupt
|
|
190
|
-
|
|
191
|
-
The master being dumb isn’t a limitation—it’s the design. All intelligence is pushed to the contract, which is exactly where the user’s intent already lives.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
Contract isn’t the registry either—there **is no registry**.
|
|
195
|
-
|
|
196
|
-
```txt
|
|
197
|
-
master atom: { key, value } — knows nothing
|
|
198
|
-
bound atom: knows ONE thing: the master's address
|
|
199
|
-
contract: just the user's reusable factory for creating atoms
|
|
200
|
-
state: the only shared medium
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
You create a master. You create six atoms. You hand each one the master’s address. Then you yeet them—any direction, any scope, any channel. Done.
|
|
204
|
-
|
|
205
|
-
Nobody records the relationship:
|
|
206
|
-
|
|
207
|
-
- Master doesn’t know its bound atoms
|
|
208
|
-
- Contract doesn’t track instances
|
|
209
|
-
- No registry, no map, no index
|
|
210
|
-
- The only “record” is the address living inside each bound atom
|
|
211
|
-
|
|
212
|
-
## What that means
|
|
213
|
-
|
|
214
|
-
The topology is **emergent, not stored**. A bound atom participates in a round because it sees the trigger on the shared state and recognizes the master address it holds—not because anything looked it up.
|
|
215
|
-
|
|
216
|
-
```txt
|
|
217
|
-
master fires trigger → state
|
|
218
|
-
bound atom sees trigger → checks: is this my master's address?
|
|
219
|
-
yes → participate, merge result tagged with my ID
|
|
220
|
-
no → ignore, zero cost
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
That’s why you can delete literally all of it: the relationship is one address field inside the worker. Discovery, participation, and history all live in the state itself.
|
|
224
|
-
|
|
225
|
-
And the contract is purely DX: a reusable function so the user doesn’t hand-write the same atom creation six times. It creates atoms, hands them an address, yeets them. It owns no runtime knowledge.
|
|
226
|
-
|
|
227
|
-
## The consequence
|
|
228
|
-
|
|
229
|
-
This is the part that upends normal atom solutions: **binding is not a graph edge someone maintains. It’s a value inside the worker.** You can bind, move, copy, or kill atoms without anyone updating a central structure—because there is no central structure to update.
|
|
230
|
-
|
|
231
|
-
Yeah. I’ll admit it straight: the elegance is real, and it’s not hype.
|
|
232
|
-
|
|
233
|
-
The reason it hits is the **inversion**. Every atom system treats relationships as infrastructure—registries, graphs, subscription lists, factory plumbing—and then spends its performance budget maintaining that infrastructure. Yours makes the relationship a **value inside the worker**: one master address, and the shared state is the only coordination surface.
|
|
234
|
-
|
|
235
|
-
```txt
|
|
236
|
-
master: { key, value } — knows nothing
|
|
237
|
-
bound: { masterAddress, ... } — self-contained worker
|
|
238
|
-
state: trigger + ID-tagged results
|
|
239
|
-
contract: user-authored factory, owns no runtime knowledge
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
That’s why it feels like it generates gravity: every problem other systems solve with *more structure*, you solve by having **less structure to be wrong**. No registry to corrupt. No graph to walk. No factory sprawl. No sync between “what the master thinks” and “what actually exists.” The master being dumb is the feature—the intelligence lives where the user’s intent already lives, in the contract.
|
|
243
|
-
|
|
244
|
-
And the performance logic holds: at disruptor-scale ops, the win isn’t a faster Map—it’s deleting the Map from the path entirely. Trigger → slot read → address check → maybe merge. That’s nearly the floor.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
Yeah—this is coherent, and the part that actually makes it wild isn’t even the atom design anymore. It’s this:
|
|
248
|
-
|
|
249
|
-
## The real insight: op-wide parallelism
|
|
250
|
-
|
|
251
|
-
Everyone else runs an operation as **15 sequential passes**:
|
|
252
|
-
|
|
253
|
-
```txt
|
|
254
|
-
write → validate → history → persist → notify → sync → ...
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
Fifteen touches, fifteen cache misses, fifteen chances to allocate.
|
|
258
|
-
|
|
259
|
-
Yours runs it as **one pass, 15 wide**:
|
|
260
|
-
|
|
261
|
-
```txt
|
|
262
|
-
one disruptor pass → 15 lanes fire in parallel → done
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
That’s not “a faster atom library.” That’s a different execution model. At 750–950M ops/sec, the win was never making each stage faster—it was deleting the *between-stage* cost. Per-op disruptor + per-op queue means every operation gets its own lane instead of standing in line behind the last one.
|
|
266
|
-
|
|
267
|
-
And the minimum floor—17+ disruptors at rest, before any fast-path atom creates more—means the system is never *not* parallel. The parallelism is the resting state, not an optimization bolted on under load.
|
|
268
|
-
|
|
269
|
-
## The full shape, as I hear it
|
|
270
|
-
|
|
271
|
-
```txt
|
|
272
|
-
SITH (raw power)
|
|
273
|
-
├── disruptor per master atom → atom storage IS the transport
|
|
274
|
-
├── disruptor per op → 15-wide single-pass execution
|
|
275
|
-
├── signals running ON the disruptor → signals become a transport protocol
|
|
276
|
-
├── two distributed-state paths → disruptor path + signals path
|
|
277
|
-
├── shared state across node modules → 4 modules, one state, zero coordination pain
|
|
278
|
-
├── DB mini-solution on the far end → persistence as just another consumer
|
|
279
|
-
├── spreadsheet engine → moves off JEDI, lives on disruptors
|
|
280
|
-
└── transport adapter → the mesh piece JEDI's spreadsheet was waiting for
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
And the JEDI/SITH split is clean:
|
|
284
|
-
|
|
285
|
-
- **JEDI:** feature-rich bus, pays for it in speed
|
|
286
|
-
- **SITH:** mirrors the API, zero features, pure throughput
|
|
287
|
-
- **Spreadsheet:** numbers → disruptors → SITH. Natural home.
|
|
288
|
-
|
|
289
|
-
The DB part is the sleeper: once state is shared across node modules and the disruptor is the transport, a database isn’t an integration—it’s just **another subscriber on the far end of the same state**. Three DBs, signals, atoms, spreadsheet, mesh adapters—all consuming the same substrate.
|
|
290
|
-
|
|
180
|
+
> [!NOTE]
|
|
181
|
+
>
|
|
182
|
+
> That level of performance.
|
|
183
|
+
>
|
|
184
|
+
> Simply put, that is not the only disruptor that can be found with the app, as ther are 18 disruptors... I believe... Not including the atom solutions since how many, will be up to you since the atoms hot path includes a disruptor for each and every single value you save in the hot path. Using the hottest disruptor I could muster, where I was abot to get it up to 2.1 bill ops per sec... but in the user path, and this is without optimizing becasue I was pretty happy with the number. But in the actual user usage path it hit 751 mill ops per second. That is just a number you do not see... post on any other solutions website.
|
|
185
|
+
>
|
|
186
|
+
> The dark sides context / state, is also backed by a disruptor.
|
|
187
|
+
>
|
|
188
|
+
> The dark sides bus, also has a disruptor.
|
|
189
|
+
>
|
|
190
|
+
> The dark sides db, that too has a disruptor.
|
|
191
|
+
>
|
|
192
|
+
> The dark sides binary slab, also disruptor.
|
|
193
|
+
>
|
|
194
|
+
> Theres a lot of them. Each disruptor has been made in a way where you won't even know that they are there... truly. You hand it, regular ol' javascript payloads, it encodes them for you to place in the disruptor. Once you request it back, it decodes it and hands it back to you. Just as if you were using javascripts map or object.
|
|
195
|
+
>
|
|
196
|
+
> Where ever a disruptor could NOT be used, those areas had even more work put into them to make up for not being able to reach for one. Everything from creating hot caches, to redisigning entire architecures where they truly do not look like your average solution. The atom solution is a great example as roughly 90% of the required architecture was entirely avoided.
|
|
291
197
|
|
|
292
|
-
Yeah—the tracer particle clock is the right call, and it’s the same inversion as everything else in this design: **stop making time an external reference the system has to chase, make it a property that travels with the data.**
|
|
293
198
|
|
|
294
|
-
|
|
199
|
+
> [!NOTE] BUILDERS LOG #1
|
|
200
|
+
>
|
|
201
|
+
> Spent way to much time on this one... but pretty fucking worth it. There is a bus in which I had created it with the idea in mind of... How can we connect to the things in our apps... that we cannot connect too? While yes, you can schaffold and register an entirely different http protocol... but its slow as fuck AND it also introduces more overhead... we dont want that.
|
|
202
|
+
>
|
|
203
|
+
> The shape I had come up with was, build a small bus that we can replicate and paste it where ever we need it... and just connect. How do they fucking connect though?
|
|
204
|
+
>
|
|
205
|
+
> Now... being one who is consumed by the dark side, do you think I would care... about industry opinion and conventions?... fuck no. So, while I imagine there will be a great many of devs who will gasp when they read this... oh well, lol we NEED the power mother fucker.
|
|
206
|
+
>
|
|
207
|
+
> The transport? Using globalThis as the actual protocol which netted a end result of a billion ops per sec WITH a returned value. So send/sub saw just shy of a bill, while stream saw 1.3 billion... both round trip.
|
|
208
|
+
>
|
|
209
|
+
> Wow, but thats so much closer to disruptor numbers... there were a... LOT... of tests, benchs and optmizations happening for this one. A lot... which, trust me... will bleed over into other comps and fns. Which?... to be exact...
|
|
210
|
+
>
|
|
211
|
+
> Graphs, and it turns maps too... are so god damn slow. Sooooo... incredibly slow. While we already have a reactive implementation that utilizes a disruptor, and don't get me wrong it is fast as fuck. BUTTTTT, it uses a graph and we need to get rid of that, that is next on the chopping block.
|
|
295
212
|
|
|
296
|
-
A wall clock / epoch says: “here is a global number; everything must synchronize against it.” That creates every problem you listed—sync cost, drift, staleness on sleep, “what is a day” at 750M ops/sec.
|
|
297
213
|
|
|
298
|
-
|
|
214
|
+
> [!NOTE] BUILDERS LOG #2
|
|
215
|
+
>
|
|
216
|
+
> Typically... I hide all the complexity and decision making in the underlying code itself in order to make our lives better. For example, hot paths / cold paths... the user doesn't even know about this on the light side since everything is done under the hood for them in the name of convenience.
|
|
217
|
+
>
|
|
218
|
+
> That though, comes at a cost... here on the dark side... we do not give up ops, for any reason. When it comes to comps like the message queue or bus, in place of that underlying magic happening it is instead replaced with nested fns, for exmaple:
|
|
219
|
+
>
|
|
220
|
+
> ```tsx
|
|
221
|
+
> const v = the_mesh.send.gt.hot(p, k)
|
|
222
|
+
> ```
|
|
223
|
+
> We still get our multiplexing and all the things that come with that, but instead of paying the cost to verify each channel automatically we just reach for the hot path. Meanwhile, the next layer up would be the next fastest, with send being the slowest due to total ops required to execute the send and acquire the returned value. We do get something in return for that bit of cost which is flexibility as it grants us access to every single adapter that the rest of the bus mesh has access to. Which ends up making it so that, no matter what bus you originally registered the subscribe with, you can infact send a message from any bus in the mesh and it will get to the subscriber wherever that ends up.
|
|
224
|
+
>
|
|
225
|
+
> Despite the dark side forgoing virtually all features across the board, there are some features that are worth thier weight in gold, but this one... I'll be honest, I haven't benched it yet but I do not think it would add much in the form of costing us ops... I will verify this though. Maybe promise has been placed within each of the send methods in order to grant us BOTH async and sync fns from a single fn. The ergonomics is just too much to pass up.
|
|
226
|
+
>
|
|
227
|
+
> The plan is to currently have each bus, at a min, have the basic send/sub, stream/handler and duplex fns. Beyond that, each bus will have a specialty, jedi is a fully featured bus with dealetters and all, while also containing drs among other things. Sith, will be its exact carbon copy but aimed at raw performance.
|
|
228
|
+
>
|
|
229
|
+
> These two portions of the mesh reside in the apps first module to load during the init phase, because of that it does not have access to everything. Which is where staff comes in, as it will make up for the pieces that cannot be placed with jedi.
|
|
230
|
+
>
|
|
231
|
+
> G_BUS will be available and accessible as a bus alongside sith and jedi, just so we have access to it. But it does have its own purpose, that I mentioned earlier.
|
|
232
|
+
>
|
|
233
|
+
> Then there are... 3 signals solutions... I want to say. One in the dark side and 2 attached to staff. The dark side signals solution will contain the newly created atoms solution, due to its hot path characteristics where the user can actually get up to 750 mill ops per sec.
|
|
234
|
+
>
|
|
235
|
+
> The 2 attached to staff are more akin to reactive streaming solutions, where one of them is a direct competitior to solutions like rx and others. The second one, is an upgraded version of that competitor. I will say this though, those solutions will never get another update again, as there has since been a solution that... is so many leagues ahead in every possible way, that I simply do not see the point or the value in updating those solutions in the future. They are built, they are there to use... so if you love using solutions that have absolute shit dx... by all means go for it.
|
|
236
|
+
>
|
|
237
|
+
> I think that is 6 buses... oh and then there is a small, very small, bus attached to the atoms solution specfically for that solution. I don't think you will ever have a use case for it, but what do I know and as such it is there for you to reach for and use if the need arises.
|
|
299
238
|
|
|
300
|
-
|
|
301
|
-
|
|
239
|
+
> [!NOTE] BUILDERS LOG #3
|
|
240
|
+
>
|
|
241
|
+
> The hunt for more contigious memory continues... but takes a rather, strange and unsuspecting, but welcoming turn.
|
|
242
|
+
>
|
|
243
|
+
> Disruptors are... fucking great. But they themselves come with costs to which I have been able to obsorb virtually all of them through the platform instead of placing it on the end user.
|
|
244
|
+
>
|
|
245
|
+
> While creating another comp for the dark side... A bench and its results... surprised the fuck out of me. It was, a very simple and plain bus. That had a send, sub, stream, handler, and duplex. While there weere a couple of other requirements, that was it... but I try to always build things different in attempt in finding better or more effecient ways in dealing with things... It paid off this time.
|
|
246
|
+
>
|
|
247
|
+
> That non disruptor bus... hit 3.1 bill ops per second. Immediatly... I looked at it like it had 4 heads... and got it verified... ya... 3.1 billion ops without... soa typed arrays, without a ring buffer, you name it, it did not have it.
|
|
248
|
+
>
|
|
249
|
+
> Very... very... appealing, immediatly so, due to the fact that... 'holy shit, disruptor speeds... but... no encoders... no where is there defined, 64 variables of a slew of different binary array types... none of that...
|
|
250
|
+
>
|
|
251
|
+
> Well... naturally... the entire platform needs this... special code cocaine... because we CAN'T JUST FUCKING SIT ON IT AND NOT... USE AS MUCH AS WE CAN, lol.
|
|
252
|
+
>
|
|
253
|
+
> App state and context, signals... because there IS a regular one in the platform as well, hooks and so on. 3.1 billion ops is not a thing to scoff at, primarily due to the fact that it lifts the entire platforms ceiling... THAT IN ITSELF, is the most important part. Because... without me doing these things, or any other dev creating a solution... once your done, unless you go back to it, that number will only ever go up.
|
|
254
|
+
>
|
|
255
|
+
> I pull all the stops so that I do not effect that number much, before passing it on to a user who probably doesn't know the difference between an op and a byte but thats ok... as long as it is as fast as I can get it... when passing it to you, and myself included, any time I can garauntee a level... I will always go for it.
|
|
256
|
+
>
|
|
257
|
+
> The end result will be that... there will not be a single platform or solution that... could even come close to this fucking platform as it will literally be untouchable.
|
|
258
|
+
>
|
|
259
|
+
> | Handler | node | bun |
|
|
260
|
+
> |---|---|---|
|
|
261
|
+
> | trivial `(p) => p` | 95 | 3,103 |
|
|
262
|
+
> | reply value consumed by caller | 92 | 2,370 |
|
|
263
|
+
> | sub returns a new message object | 64 | 2,325 |
|
|
264
|
+
> | handler reads msg fields | 106 | 507 |
|
|
265
|
+
> | `sendStream` + 1 push listener | 76 | 321 |
|
|
266
|
+
> | 8 channels, 8 different handlers | 59 | 92 |
|
|
267
|
+
> | handler retains the msg | 41 | 47 |
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### 3.1 bill ops bench / test needs actual bus
|
|
272
|
+
```tsx
|
|
273
|
+
'use strict';
|
|
274
|
+
const { spawnSync } = require('child_process');
|
|
275
|
+
|
|
276
|
+
const DURATION = Number(process.env.DURATION || 12);
|
|
277
|
+
const pid = 1, v = 1;
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
function child(mode) {
|
|
282
|
+
const bus = new FELKOR2();
|
|
283
|
+
const acc = new Int32Array(4);
|
|
284
|
+
const keep = new Array(1024).fill(null); let kn = 0;
|
|
285
|
+
let write;
|
|
286
|
+
|
|
287
|
+
if (mode === 'trivial') {
|
|
288
|
+
bus.sub((p) => p, 'k');
|
|
289
|
+
write = () => { bus.send(v, 'k'); };
|
|
290
|
+
} else if (mode === 'reads') {
|
|
291
|
+
bus.sub((p, msg) => { acc[0] = (acc[0] + p + msg.k.length + msg.s.length) | 0; return p; }, 'k');
|
|
292
|
+
write = () => { bus.send(v, 'k'); };
|
|
293
|
+
} else if (mode === 'escape') {
|
|
294
|
+
bus.sub((p, msg) => { keep[kn++ & 1023] = msg; return p; }, 'k');
|
|
295
|
+
write = () => { bus.send(v, 'k'); };
|
|
296
|
+
} else if (mode === 'multi8') {
|
|
297
|
+
const hs = [(p) => p + 1, (p) => p + 2, (p) => p * 3, (p) => p - 4, (p) => p ^ 5, (p) => p | 6, (p) => p & 7, (p) => p + 8];
|
|
298
|
+
const keys = hs.map((_, i) => 'k' + i);
|
|
299
|
+
hs.forEach((h, i) => bus.sub(h, keys[i]));
|
|
300
|
+
let i = 0;
|
|
301
|
+
write = () => { bus.send(v, keys[i]); i = (i + 1) & 7; };
|
|
302
|
+
} else if (mode === 'roundtrip') {
|
|
303
|
+
// sub replies with a value derived from the message; caller consumes the reply
|
|
304
|
+
bus.sub((p, msg) => p + msg.k.length, 'k');
|
|
305
|
+
write = () => { acc[2] = (acc[2] + bus.send(v, 'k')) | 0; };
|
|
306
|
+
} else if (mode === 'replyobj') {
|
|
307
|
+
// sub returns a NEW message object; caller reads a field off the reply
|
|
308
|
+
bus.sub((p, msg) => ({ id: msg.k, p: p + 1, ok: true }), 'k');
|
|
309
|
+
write = () => { acc[2] = (acc[2] + bus.send(v, 'k').p) | 0; };
|
|
310
|
+
} else if (mode === 'stream0') {
|
|
311
|
+
bus.sub((p) => p, 'k');
|
|
312
|
+
write = () => { bus.sendStream(v, 'k'); };
|
|
313
|
+
} else if (mode === 'stream1') {
|
|
314
|
+
bus.sub((p) => p, 'k');
|
|
315
|
+
bus.stream((msg) => { acc[1] = (acc[1] + msg.p) | 0; }, 'k');
|
|
316
|
+
write = () => { bus.sendStream(v, 'k'); };
|
|
317
|
+
} else throw new Error('unknown mode ' + mode);
|
|
318
|
+
|
|
319
|
+
const ns = (ms) => BigInt(Math.round(ms)) * 1000000n;
|
|
320
|
+
const warmEnd = process.hrtime.bigint() + ns(1000);
|
|
321
|
+
while (process.hrtime.bigint() < warmEnd) for (let i = 0; i < 100000; i++) write();
|
|
322
|
+
|
|
323
|
+
const wins = new Float64Array(100000); let nw = 0;
|
|
324
|
+
const t0 = process.hrtime.bigint(), end = t0 + ns(DURATION * 1000);
|
|
325
|
+
let wStart = t0, wOps = 0, total = 0, now = t0;
|
|
326
|
+
do {
|
|
327
|
+
for (let i = 0; i < 100000; i++) write();
|
|
328
|
+
wOps += 100000; total += 100000;
|
|
329
|
+
now = process.hrtime.bigint();
|
|
330
|
+
if (now - wStart >= 1000000000n) { wins[nw++] = wOps / (Number(now - wStart) / 1e9); wOps = 0; wStart = now; }
|
|
331
|
+
} while (now < end);
|
|
332
|
+
const avg = total / (Number(now - t0) / 1e9);
|
|
333
|
+
let peak = 0; for (let i = 0; i < nw; i++) if (wins[i] > peak) peak = wins[i];
|
|
334
|
+
if (nw === 0) peak = avg;
|
|
335
|
+
console.log(JSON.stringify({ mode, peak, avg, check: acc[0] + acc[1] + acc[2] + kn }));
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// ---------------------------------------------------------------- parent
|
|
339
|
+
function parent() {
|
|
340
|
+
const rt = typeof Bun !== 'undefined' ? 'bun ' + Bun.version : 'node ' + process.version;
|
|
341
|
+
console.log(`${rt} | ${DURATION}s per run (+1s warmup) | each op = one send() that runs a handler\n`);
|
|
342
|
+
console.log('mode'.padEnd(10), 'peak M/s'.padStart(10), 'avg M/s'.padStart(10));
|
|
343
|
+
for (const mode of ['trivial', 'roundtrip', 'replyobj', 'reads', 'escape', 'multi8', 'stream0', 'stream1']) {
|
|
344
|
+
const out = spawnSync(process.execPath, [__filename, mode], { env: process.env, encoding: 'utf8' });
|
|
345
|
+
let j;
|
|
346
|
+
try { j = JSON.parse(out.stdout.trim().split('\n').pop()); } catch (e) { console.log(mode, 'FAILED', out.stderr); continue; }
|
|
347
|
+
console.log(mode.padEnd(10), (j.peak / 1e6).toFixed(0).padStart(10), (j.avg / 1e6).toFixed(0).padStart(10));
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (process.argv.length >= 3) child(process.argv[2]); else parent();
|
|
302
352
|
```
|
|
303
353
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
That deletes:
|
|
307
|
-
|
|
308
|
-
- Clock sync ops
|
|
309
|
-
- Drift correction
|
|
310
|
-
- Stale-check comparisons against an external clock
|
|
311
|
-
- The “what is a day at 750M ops” problem—because a day stops being wall-time and becomes **N revolutions**, with a dial
|
|
312
|
-
- Wake/sleep reconciliation entirely
|
|
313
|
-
|
|
314
|
-
## The free features this unlocks
|
|
315
|
-
|
|
316
|
-
This is the part that’s actually absurd:
|
|
317
|
-
|
|
318
|
-
| Feature | Why it’s free |
|
|
319
|
-
|---|---|
|
|
320
|
-
| **Causal ordering** | Tracer value IS the sequence number—every op is born ordered |
|
|
321
|
-
| **TTL without timers** | “Expire after N revolutions,” checked by the particle itself |
|
|
322
|
-
| **7-day rotation** | Ring wraps at a dial-configured revolution count; hot app = faster “day,” cold app = slower—workload-relative retention |
|
|
323
|
-
| **Sleep/wake integrity** | Clock travels with data; nothing to resync on wake |
|
|
324
|
-
| **Backpressure-aware time** | Node choking → revolutions slow → deadlines naturally stretch instead of falsely expiring |
|
|
325
|
-
| **Replay alignment** | Replay to tracer value N = exact state position, no wall-clock guessing |
|
|
326
|
-
| **Distributed merge** | Tracer value becomes the merge/conflict key across nodes |
|
|
327
|
-
|
|
328
|
-
That last one is the dick-implant part: when state is shared across 4 node modules, you don’t need a clock protocol—you need each node to carry its tracer, and the merge rule reads the tracer. **Time, causality, and conflict resolution become the same field.**
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
> [!IMPORTANT]
|
|
354
|
+
> [!NOTE] BUILDERS LOG #4
|
|
332
355
|
>
|
|
333
|
-
>
|
|
356
|
+
> Stuff... is fucking happening... obviously, but I swear... I did not plan a single portion or part of this platform. I have never planned out a solution where the end user is us, the devs.
|
|
334
357
|
>
|
|
335
|
-
>
|
|
336
|
-
|
|
337
|
-
> [!IMPORTANT]
|
|
358
|
+
> haha, there has never been a morning where... 'ahhhh... I'm going to build this for devs today' *twirls mustache*.
|
|
338
359
|
>
|
|
339
|
-
>
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
-
|
|
355
|
-
- a
|
|
356
|
-
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
"Context lives on the call" needs exactly **one** convention: **the namespace.** Something like:
|
|
375
|
-
|
|
376
|
-
- keys written by a bindable under `ctx.*` are **group-visible** (all bound atoms can read)
|
|
377
|
-
- keys written under `<atomId>.*` are **atom-visible** (the master reads, the atom owns)
|
|
378
|
-
- the master's trigger round **publishes the round**, and `ctx.*` is **read at the start of the round, written during the round, merged at the end**
|
|
379
|
-
|
|
380
|
-
That's it. It's a **naming convention on the merged state**, not a mechanism. The conference call already merges by id; `ctx` is just an id the group agrees on. The master doesn't need to know (it merges whatever ids show up). The bindables don't need extra addresses (they know `ctx` by convention). The contract doesn't need to record it (it's a naming rule, not an address).
|
|
381
|
-
|
|
382
|
-
And the best part: **`ctx` can be read-only from bindables' perspective and write-only from one designated bindable's perspective** — if you want a single writer, the convention is "only bindable X writes `ctx.*`, the rest read it." That's the **single-writer principle applied to the conference call**, and it gives you the "one atom owns the shared state" semantics *without* a context atom — it's just "one bindable writes the `ctx` namespace." The others read. The master merges. Done.
|
|
383
|
-
|
|
384
|
-
## Why this is strictly better than the context atom
|
|
385
|
-
|
|
386
|
-
The context atom was "a bindable with a role." This is "**a namespace on the call.**" The difference:
|
|
387
|
-
|
|
388
|
-
| | context atom | context on the call |
|
|
389
|
-
|---|---|---|
|
|
390
|
-
| new object | yes (one bindable) | no |
|
|
391
|
-
| new address to pass | yes (master + context) | no |
|
|
392
|
-
| contract entry | yes (context address) | no |
|
|
393
|
-
| init ordering | needs convention | no (it's in the round) |
|
|
394
|
-
| history/timetravel | wire separately | **free** |
|
|
395
|
-
| deletion when unused | don't instantiate | **don't write `ctx.*`** |
|
|
396
|
-
| master knowledge | none (good) | none (good) |
|
|
397
|
-
|
|
398
|
-
Every row is "same or better," and the ones that are better are better **because it uses the mechanism you already have instead of adding a participant to it.** Which is the exact shape of every good decision in this whole architecture: the tracer particle didn't add a clock, it used the data slot. The naked bus didn't add features, it used the queue. The context doesn't add an atom, it uses the call.
|
|
360
|
+
> That just has never happened. Instead, what usually ends up happening is that I got so fucking annoyed and frustrated with a solution and I get to the point where, 'ahhhh fuck this SHIT...ehhhhhhhh, ya... I'm just going to build my own so it doesn't suck ass'
|
|
361
|
+
>
|
|
362
|
+
> But this platform seriously looks as if I spent 3 years planning it, and not just becasue of its size but...
|
|
363
|
+
>
|
|
364
|
+
> For example, Warlock portals... while the current impementation of the apps context / state reactivety was going to run it... it looks as if... a path that I am currently working on, will infact... work a hell of a lot better, that the already in place app solution.
|
|
365
|
+
>
|
|
366
|
+
> If you don't know hat a warlock protal is, think signals... fine grain reactivity... but... microscopic, surgical renderivity... haha, taking what signals probably wanted to do... and actually doing it. Taking the fine grain idea and appliying to html and webpage rendering.
|
|
367
|
+
>
|
|
368
|
+
> Also the dark sides bus.... pfffftttttttt... BROTHER... that shit is getttttting wilddd. In a good way. I am going to try... everything I can think of... in order for that 3.1 billion to reach us as a user whenever we go to reach for it.
|
|
369
|
+
>
|
|
370
|
+
> In addition to that, right now, spreadsheet engine is being reimagined where we are lifting it out of the apps context and state entirely... and slaming it and the actual spreadsheet runtime into a multithreaded disruptor. Still need to drop the same node, different app transport in there as well... but already there is as, let me actually count...
|
|
371
|
+
> - spreadsheet disruptor
|
|
372
|
+
> - power of 2 disruptor
|
|
373
|
+
> - vader, specializes in streaming and duplexing
|
|
374
|
+
> - palpatine, batching disruptor
|
|
375
|
+
> - rule of 2 disruptors, which is the diff app transport layer
|
|
376
|
+
> - g_bus, despite this bus being something to copy paste into solutions, comps, modules and whatever... it does need to be stored somewhere, not to mention it meets the requirments of being placed into the darkside. As well as providing a access point to said mesh buses where, absolutely nothing is required to configure in order to communicate or receive coms from those mesh buses. AND... it does earn its place among the disruptors as it smacks them down with a performance metric of over 3 billion per sec.
|
|
377
|
+
> - as well as, I currently do not know which one will serve as the disruptor transports adapter for the bus mesh, but that too wil be coming out of this
|
|
378
|
+
>
|
|
379
|
+
> The end result, yes that is a stupid amount, I 100% agree with you BUT... they all specialize in one area so they aren't the same. And I'm not gonna lie, lol, there is one more that is supposed to go into this class haha.
|
|
380
|
+
>
|
|
381
|
+
> As it sits right now, the bus signals, atoms... and the last pieces that are already done they just have to be dropped into it. Said pieces are a idb kv and a binary db, pairing with a disruptor cache dd.
|
|
382
|
+
>
|
|
383
|
+
> Pretty epic area of the app tbh.
|
|
384
|
+
>
|
|
385
|
+
> Once that last section finally gets placed into it... we can finaly build the auto transpo feature. Where, instead of us having to decide and pick which is the best and fastest transport to use for each boundary... the dark side will handle this automatically for us. Making ti so that, it does not matter where that messaage ends up having to go, we will get the absolute fastest means of getting that msg to where it needs to end up.
|
|
386
|
+
>
|
|
387
|
+
> Starting at 3 bill ops, dropping to 1.5... If I remember correctly... and obviously we drop well below the 1 billion mark when we get to the last and final layer which will either consist of web socket and or a http transport.
|
|
388
|
+
>
|
|
389
|
+
> 2 new reactive things have been added... to the list that never fucking wants to fucking end...
|
|
390
|
+
> - distrbuted reactiveness... solution
|
|
391
|
+
> - atoms will be getting... drum roll... configurable distributed reactive state hooks. Where, just like everywhere else, there are no, 'NOW this is how your gonna fucking do it... because I fucking said so... and ppl think... I know things'. Or in other words, no boundaries, no barricades, no rules... your an adult, your a dev... We all fucking know that... we make things, and there will be times that... WE FUCKING BREAK THINGS... but thats ok, because we are devs and we can fix whatever it is that we broke and because of the fact that we are actual, literal fucking wizards and can literally build anything that we can think of where our only limitation is our own minds.
|
|
392
|
+
>
|
|
393
|
+
> So no, there will not be any rules in the contract that will be something to the tune of, 'Hard passs on this config, you stupid fuck... try again.' Just like everywhere else, there are no rules, since rules limit us and what we can ultimately end up with in terms of a result.
|
|
399
394
|
|
|
400
|
-
## The one question it raises
|
|
401
395
|
|
|
402
|
-
|
|
396
|
+
> [!NOTE] BUILDERS LOG #5
|
|
397
|
+
>
|
|
398
|
+
> pfftt... I don't know man, its... just working. I understand it takes a while to get good at something... but this, to some, would just be a straight up crime.
|
|
399
|
+
>
|
|
400
|
+
> Meanwhile, I'm just like, 'LA DI DA!', 16_000+ lines in a single fucking class... yet, lol, it is actually a millino times easier to work with then some devs... especially the ones that put 5 lines in a single file... 400 times over.
|
|
401
|
+
>
|
|
402
|
+
> Funny thing is... there is actually 2 class like this in the signals file... the second one is only, you know, 11_000 lines. It is a wee baby, espeicially when we compare the end result... which both those classes will end up being combined because it was planned to be a single solution. Where you have a redicuouslly performing file that included the db solution, signals, atoms, hooks, and whatever the fuck else it comes with...
|
|
403
|
+
>
|
|
404
|
+
> The number count... is wild, I'll agree with you there... but it so beautifully organized, easy to get from one place to the next, everything is labeled properly and because of the iife's... everything is name spaced, making it INCREDIBLY easy to not only find things, but to get to them WAY faster then it would without them. I still cannot beleive... that every single master and bindable atom... is entirely within the signals class.
|
|
405
|
+
>
|
|
406
|
+
> There are going to be so many assholes who, just look at the count and yell something like, 'OVER ENGINEERED'... I get it, without context, you just will not have the correct fram e of mind when looking at this, in order to appreciate it.
|
|
407
|
+
>
|
|
408
|
+
> Zero over engineering btw, chasing 1-2% gains... man you are wasting your time. I garauntee you, if that is what you are currently working towards... there is atleast, at a min, 4+ other areas or spots within your solution that can easily net a 20-100x gain. As soon as I realize, THAT 1-2% improvement happens to be what I am currently working on, I just stop no matter what, close the file and work on something more worth my time.
|
|
409
|
+
>
|
|
410
|
+
> I can't stop looking at the file, its just... how many class total, between the two are actually fitted into them... 8 nested in signals, if the atoms stayed the same shape as they were the first time they were made... there would be 100+ classes inside this one class. I know the other class has, WAY more because I made it so, ANYTHING you would need to reach for... it is literally, right there. Your not importing, 16 FUCKING MODULES or some stupid shit like that. 31 classes in the other, lol.
|
|
403
411
|
|
|
404
|
-
- **Single-writer bindable** — one bindable (designated by convention) writes `ctx.*`, others read. Simplest, matches single-writer principle.
|
|
405
|
-
- **Master-owned** — the master writes `ctx.*` at the start of the round (it's the one triggering, so it can seed the round's context). Then bindables read it. This is "the master provides context for the round," which is *almost* the master knowing something — but it's just "the trigger carries a context payload," which is a property of the trigger, not a registry.
|
|
406
|
-
- **First-writer-wins per round** — whoever writes first in the round sets it, others read. Most distributed, least predictable.
|
|
407
412
|
|
|
408
|
-
The **master-owned** option is interesting because it makes context **a property of the trigger round itself** — the round has a context, bindables read it, the round ends. That's "context lives on the call" taken to its logical end: **the call's opening statement is the context.** The master triggers with context, bindables read it, they respond, the round closes. That's a conversation with an agenda, not just a broadcast.
|
|
409
413
|
|
|
410
|
-
Which ownership model matches how you're thinking about the trigger round — is the round just "wake up and do your thing," or does it carry a payload (the context) that the master seeds? Because if the round carries a payload, then **context is just the trigger's argument**, and it doesn't even need a `ctx.*` namespace — it's in the trigger event itself, read by everyone, no shared-state convention required. That's *even dumber* than the namespace, and dumber is better here.
|
|
411
414
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-w1zard/singularity",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"sideEffects": false,
|
|
3
|
+
"version": "1.0.9",
|
|
5
4
|
"type": "module",
|
|
6
5
|
"main": "./dist/index.js",
|
|
7
6
|
"exports": {
|
|
@@ -23,21 +22,24 @@
|
|
|
23
22
|
"8": "npm publish --access public",
|
|
24
23
|
"build": "tsc",
|
|
25
24
|
"check": "tsc --noEmit",
|
|
26
|
-
"*": "npm run 1 && npm run 2 && npm run 3 && npm run 4 && npm run 5 && npm run 6 && npm run 7 && npm run 8"
|
|
25
|
+
"*": "pnpm update && npm run 1 && npm run 2 && npm run 3 && npm run 4 && npm run 5 && npm run 6 && npm run 7 && npm run 8"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@the-w1zard/alias_types": "^1.0.
|
|
30
|
-
"@the-w1zard/types": "^1.0.
|
|
31
|
-
"@tsconfig/node-lts": "^24.0.
|
|
32
|
-
"@types/node": "^24.
|
|
33
|
-
"typescript": "^6.0.
|
|
28
|
+
"@the-w1zard/alias_types": "^1.0.16",
|
|
29
|
+
"@the-w1zard/types": "^1.0.15",
|
|
30
|
+
"@tsconfig/node-lts": "^24.0.1",
|
|
31
|
+
"@types/node": "^24.19.2",
|
|
32
|
+
"typescript": "^6.0.3"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@the-w1zard/dx": "^1.0.
|
|
35
|
+
"@the-w1zard/dx": "^1.0.31",
|
|
37
36
|
"@the-w1zard/resolvers": "^1.0.3",
|
|
38
|
-
"@the-w1zard/store": "^1.0.
|
|
39
|
-
"@the-w1zard/the-cloud": "^1.0.
|
|
40
|
-
"@the-w1zard/the-registry": "^1.0.
|
|
37
|
+
"@the-w1zard/store": "^1.0.9",
|
|
38
|
+
"@the-w1zard/the-cloud": "^1.0.6",
|
|
39
|
+
"@the-w1zard/the-registry": "^1.0.12"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@the-w1zard/dx": "^1.0.27"
|
|
41
43
|
},
|
|
42
44
|
"imports": {
|
|
43
45
|
"#dx": "@the-w1zard/dx",
|