Lurker News
Had some fun with shared array buffers over many months of free time.

Skip to the end to play around with the final app.
Open to ideas on how to simulate more whilst staying in js land.

Comments (70) 25 threads

Earlier comments
thomasfromcdnjs2 replies#
Inspiring tutorial!

Does anyone know why/how it maintains state if you tab out? Does Chrome eventually try to clean up the cache or is it locked in?

lukan#
Usually inactive tabs are just paused and their state saved.
SamBam#
requestAnimationFrame won't fire while you're tabbed out.
iEchoic#
Very cool, thank you for sharing.

Has anyone done similar experimentation and/or benchmarking on using webgpu for neural nets in JS?

itvision#
I've saved it to Web Archive just in case, sadly it doesn't work that way.
lbj1 reply#
Anyone else having trouble with that web vscode he's using?
aap_2 replies#
Yeah, no idea how to run the code. There are links to the final demo at the end, but everything else just links to this editor :/
rustystump1 reply#
This was prototyped on codesandbox before they nuked their product. Each link goes to a specific version which you can test by running bun http.ts in the terminal which serves the content. I updated the article to include this info.

In the future I will keep everything self hosted to avoid this issue. I appreciate the patience.

pkilgore#
For security reasons you cannot use some of the features in this code without setting a specific header (the blog mentions this).

The sandbox has a button that's basically "Open a preview in a separate tab". If you click that, the header will be sent, and the demo will work.
If you only use the "in-editor" preview, the proper header will not be sent.
Agree not intuitive. Hope it helps, it was a super cool demo.

Load more comments