Just imagining the future, I think the next step of signal would be Atomic Signal where it can propagate effects across worker/thread 🤔 (akin to Go channel + reactive variable)
Hah! I started working on this. The question ultimately is: why would it be valuable in JS? The cost of sending between worker/thread in the browser isn't worth it.
Yes! I have been thinking about this a lot lately... I feel it should be possible with .notify and .wait.
Good inspiration: javascript.plainenglish.io/buildin... they use a SharedArrayBuffer with atomics only for updating indices to update a float arraybuffer.
Oo waw github.com/Bnaya/objectbuffer this project is so so crazy. A proxy implementation of an object w (shared)arraybuffer under the hood. Serializes the schema somehow in the arraybuffer... Wild stuff.
Someone please slap reactivity on top of this plz.
Oo waw github.com/Bnaya/objectbuffer this project is so so crazy. A proxy implementation of an object w (shared)arraybuffer under the hood. Serializes the schema somehow in the arraybuffer... Wild stuff.
Wait, Struct of Array backed by virtual memory (SharedArrayBuffer)!? That's wild!
I think I've done something similar but it just something on a whim for creative coding. (not yet using futex like Aomics.waitAsync and Atomics.notify)
Just imagining the future, I think the next step of signal would be Atomic Signal where it can propagate effects across worker/thread 🤔 (akin to Go channel + reactive variable)
Hah! I started working on this. The question ultimately is: why would it be valuable in JS? The cost of sending between worker/thread in the browser isn't worth it.
Not if you use SharedArrayBuffer and model every instance of reactive variable as StructOfArray. The crazy part is on when to use the mutex guard 😂
Atomic Signal is very valuable on apps/games that utilize OffscreenCanvas. Writing both heavy rendering and logic off-main-thread is a deal breaker.
Yes! I have been thinking about this a lot lately... I feel it should be possible with .notify and .wait.
Good inspiration: javascript.plainenglish.io/buildin... they use a SharedArrayBuffer with atomics only for updating indices to update a float arraybuffer.
Oo waw github.com/Bnaya/objectbuffer this project is so so crazy. A proxy implementation of an object w (shared)arraybuffer under the hood. Serializes the schema somehow in the arraybuffer... Wild stuff.
Someone please slap reactivity on top of this plz.
I did some slapping
Wait, Struct of Array backed by virtual memory (SharedArrayBuffer)!? That's wild!
I think I've done something similar but it just something on a whim for creative coding. (not yet using futex like Aomics.waitAsync and Atomics.notify)
fosstodon.org/@drsensor/1093552594...
Is called fine-grained reactivity after all and crossing the worker boundaries for fine-grained values is likely not optimal.
However something for more course-grained messages that can feed into fine-grained reactive graphs should work.
Is postMessage slow? (Surma, 2019)
Thanks for sharing this! It reinvigorates my interest in exploring the idea in future :)
If you're interested I have a collection of links here
Thanks!!!