Browse Source

tutorial: simplify introduction of messaging

The text tries to explain something about `'run`, but it looks like
the sample code has since been updated to wrap `'run` into `a-run` and
`b-run`, so AFAICS this is now just a distraction.
merge-requests/25/head
Arnout Engelen 4 years ago committed by Christine Lemmer-Webber
parent
commit
2058f7b055
No known key found for this signature in database
GPG Key ID: 4BC025925FF8F4D3
  1. 13
      goblins/scribblings/tutorial.scrbl

13
goblins/scribblings/tutorial.scrbl

@ -701,19 +701,6 @@ objects that are near each other (in the same vat).
Fortunately there's something we can do: we can send a message from
Bob to Alice.
But we've never seen message sending in Goblins before, so what is that?
To prototype this, let's use the @id{'run} method on @id{b-vat}.
Remember, we saw the @id{'run} method used before, where it looked like:
@interact[
(a-run
(define alyssa
(spawn ^friend "Alyssa"))
($ alyssa "Ben"))]
So @id{'run} is just a way to run some arbitrary code in an actor context.
That sounds good enough for playing around with sending messages.
We can send messages with @racket[<-] so let's try that:
@interact[

Loading…
Cancel
Save