endojs / Jessie

Tiny subset of JavaScript for ocap-safe universal mobile code
Apache License 2.0
281 stars 16 forks source link

JS-E and Safe Serialization? Data-E, References? #11

Closed dckc closed 6 years ago

dckc commented 6 years ago

Do you expect Safe Serialization Under Mutual Suspicion to work in JS-E? It seems to require not just promises but E-style references. The closest thing in JS seems to be proxies. Does JS-E include proxies? How about TinySES?

p.s. for reference: some work on porting the safe serialization stuff to Monte: https://github.com/dckc/capper-mt (unfortunate name...)

erights commented 6 years ago

Do you expect Safe Serialization Under Mutual Suspicion to work in JS-E? It seems to require not just promises but E-style references.

Some loose adaptation of the ideas maybe could be made to work, but certainly not the literal Data-E approach. E promises enabled the declarative expression of cycles. JS promises cannot. I have not yet tried to create any analog in SES or Jessie.

The closest thing in JS seems to be proxies. Does JS-E include proxies? How about TinySES?

TinySES includes Proxies. Jessie includes WeakMaps and will include some membrane-making abstraction (inspired by @ajvincent 's es-membrane) that will be built out of Proxies and WeakMaps, but Jessie will not include proxies themselves.

p.s. for reference: some work on porting the safe serialization stuff to Monte: https://github.com/dckc/capper-mt (unfortunate name...)

Awesome! Very happy to see this.