pack ringbuf for importScripts (and get rid of mlworkerscripts.js)
frantic0 opened this issue · comments
Francisco Bernardo commented
mlworkerscripts was hacked into existence for PAdenot's class Ringbuffer to be loaded with importScripts into the WorkerGlobalSpace.
That forced other issues such as having a bunch of code all dynamically loaded with geval, including:
MLSABOutputTransducer
createOutputChannel
input
output
outputSABs
inputSABs
Francisco Bernardo commented
The resolution was to standardise RingBuffer across the solution, import it directly from ringbuf.js (it has named export for the class RingBuffer) an assign it to a variable in the WorkerGlobalScope.
This still supports dynamic code eval in the worker.