News for hackers. Stuff that matters.
Re:Fluxus – A 3D game engine for live-coding worlds into exi... by vanderZwan on Sunday February 14, 2021 @08:38AM (#26132286)
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?
Re:Fluxus – A 3D game engine for live-coding worlds into exi... by shadowgovt on Sunday February 14, 2021 @01:43PM (#26134904)
It 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-wh...

Re:Fluxus – A 3D game engine for live-coding worlds into exi... by vanderZwan on Sunday February 14, 2021 @02:21PM (#26135297)
> 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...