3 ms·
It mentions WebGL as one of its targets. Would it be possible to run Racket in the browser and have a fully browser-based live-coding environment?
by vanderZwan 6y ago
It mentions WebGL as one of its targets. Would it be possible to run Racket in the browser and have a fully browser-based live-coding environment?
- shadowgovt 6y agoIt would have to be done carefully, but it doesn't strike me as strictly impossible. The challenge for a live coding browser environment is proper partitioning of the environment running the editor from the environment running code under development. The JavaScript environment in the browser is not multithreaded, so if the code under development hangs forever (and thanks to the halting problem, you can't guarantee it won't), you'll have a bad time because you can't access your tools to stop the code or modify the behavior. However, that doesn't mean it's impossible. There are multiple avenues I would suggest exploring that might ameliorate that problem (web workers, wasm, possibly iframes). As for the question of running racket in the browser in general, there are options. https://cs.brown.edu/~sk/Publications/Papers/Published/yk-whalesong-racket-browser/ https://cs.brown.edu/~sk/Publications/Papers/Published/yk-wh...
- vanderZwan 6y ago> The JavaScript environment in the browser is not multithreaded Well, there's WebWorkers. They're a bit limited due to the whole message passing thing but still quite powerful. Aside from that: could whomever downvoted the person above me explain what's misinformative about their comment? https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...