[chuck-users] ChucK on the web: NodeJS / HTML5

Kassen signal.automatique at gmail.com
Fri Apr 20 13:22:57 EDT 2012


On Fri, Apr 20, 2012 at 02:02:57PM -0300, Vilson Vieira wrote:
> We can even use Emscripten to convert an entire C/C++ codebase to JavaScript:
> 
> http://emscripten.org/

While I find the choices made in ChucK that lead to the relatively
high cpu usage quite defensible, I think those make ChucK a bad
candidate for such antics...

What I'd do if I were motivated; 

Create a custom build of ChucK; focussed on livecoding so no hid, no
audio in, etc. Harden it by disabling stuff that writes to the disk to
protect your server and also make sure it can only read from a given
directory. Probably also limit the amount of memory a shred or user can
allocate. Have this accept scripts from a editor on your site. Stream
the result using some online radio streamer and have this available on
the same page as the editor. Add a second field for chat.

That way you keep client-side CPU usage way down, putting it in the
reach of devices like netbooks and smartphones. For bonus points;
pre-load a public class to act as a shared clock event and have a
version of the "busses" trick to share audio, for example so I can
generate some sound and send it to your bus so you can treat it before
we all hear it. You may also need some custom stuff to make sure the
result of failed attempts at compiling code only ends up with the
person writing the code.

That'd be fun but personally I'd wait a bit and hope the current
situation where many simple syntax errors lead to full-on seg-faulting
clears up a bit.

Yours,
Kas.


More information about the chuck-users mailing list