JS tuplespace Use Babel to introduce new syntax key <identifier>; translates to let <identifier> = new Key(); where class Key { constructor() { // use protobuf to get new internal id from CPRNG } combineWith(...keys) { // use protobufs to form [this.id, ...keys.map(_ => _.id)] } get r { // use protobuf to form bundle-{this.id} // How to return the proper key safely without // exposing the ability to forge names to users? // Delete constructor property on new instances? } get w { // use protobuf to form bundle+{this.id} } get o { // use protobuf to form bundle0{this.id} } bang(json, nonlinear) { // convert JSON to RÇON // produce into tuplespace } fork(closure, nonlinear) { // closure is only provided if serialization succeeds (see below) // consume from tuplespace } } <keyID>.combineWith(<keys>) <keyID>.r <keyID>.w <keyID>.o <keyID>!(JSON with keys) <keyID>!!(JSON with keys) // Fork semantics. Primitives have built-in serialization. // Runtime error if free var is not serializable. // Matches go to microtask queue. // Patterns are JSON with keys and free vars. for(<pattern> <- <key>) fork { <statements> } for(<pattern> <= <key>) fork { <statements> }
General
Content
Integrations