News for hackers. Stuff that matters.
Re:A Taste of JavaScript's New Parallel Primitives by kgr on Thursday May 05, 2016 @02:19PM (#11638531)
I'm excited to see progress in the area of JS concurrency, but I'm not sure how useful this is going to be. It lets me share ArrayBuffers between workers, but all of my data is in the form of Objects, not primitive arrays.

One place where I would like to use this is for collision detection, like in this example: http://codepen.io/kgr/pen/GoeeQw

But I'm relying on objects with polymorphic intersects() methods to determine if they intersect with each other, and once I encode everything up as arrays, I lose the convenience and power of objects.

Re:A Taste of JavaScript's New Parallel Primitives by phpnode on Thursday May 05, 2016 @02:40PM (#11638698)
Here's a typed objects system for JS which uses ArrayBuffers for backing storage, in future it will also support SharedArrayBuffer - https://github.com/codemix/reign (disclaimer: I wrote this).