[racket] does Racket need a global VM ?

From: Gaspard Bucher (gaspard at teti.ch)
Date: Thu Sep 9 04:14:48 EDT 2010

Hi there !

I am working on an open source software called Rubyk (real-time signal
processing for art, http://rubyk.org) which currently supports Lua and other
specialized DSL scripting.

The scripts send and receive messages and should be totally encapsulated
(concurrency, network transparency, etc). This works well with Lua, each
script having it's own execution context (VM). This is important because
many objects can run concurrently and a processing tree can be
"encapsulated" as a new class with just a couple of inlets and outlets.
Example of a runtime system to filter midi events depending on video

[VideoIn]---> [feature extractor (Lua)]
[MidiIn] ---> [midi filter (Lua)] ---> [MidiOut]

If the VM is global, even if we lock execution to protect state, the fact
that the state is shared will produce unexpected results if the user happens
to use the same global names in different objects (scripts).

So my question is twofold:

1. (ideal solution) Is it possible to have many Racket execution contexts
(VM) in the same process ?
2. (global lock solution) If not, is it possible to protect contexts through
namespaces or other tricks ?

Thanks for any advice,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100909/56b4efff/attachment.html>

Posted on the users mailing list.