Vat

From Erights

Revision as of 11:34, 21 April 2007 by Mscheffler (Talk)
Jump to: navigation, search

See [1].


Example: How to create a new Vat

introducer.onTheAir()
# value: ["3DES_SDH_M2", "3DES_SDH_M"]

? def  seedVatAuthor := <elang:interp.seedVatAuthor>(<unsafe>).virtualize((introducer))
# value: <virtualSeedVat>

? def scriptSource:="def run(thing) {println(`Thing: $thing`)}"
# value: "def run(thing) {println(`Thing: $thing`)}"

? def [scriptObj, vat] := seedVatAuthor(scriptSource)
# value: [<Promise>, <Vat newVirtualSeedVat in <runs in newVirtualSeedVat>>]

? scriptObj<-run("Hello Vat")
# value: <Remote Promise>

? Thing: Hello Vat
Personal tools
more tools