4 ms·
The browser version runs in a WebWorker (each team gets one). I didn't even know what WebWorkers were before I programmed this. The server side runs in a NodeJ
by malgorithms 13y ago
The browser version runs in a WebWorker (each team gets one). I didn't even know what WebWorkers were before I programmed this. The server side runs in a NodeJS process (each team gets its own), and your code runs in a fresh VM context. These both provide commonly expected JS such as Math and Date, but not other stuff such as console (which I provide in the webworker case and send messages back to the browser).
- malone 13y agoAny plans to release the nodejs code? Coding in the browser is ok, but it'd be much nicer to be able to code in my usual editor and test locally using the nodejs version.
- cocoflunchy 13y agoYou should submit this to the Mozilla dev derby (https://developer.mozilla.org/en-US/demos/devderby https://developer.mozilla.org/en-US/demos/devderby). This month's theme is Web workers.