@@ -17,18 +17,18 @@ Let's take a look at two apps, `:source` and `:sink`. First,
1717/? 314
1818!:
1919|%
20−++ move ,[bone %diff mark *]
20+++ move {bone $diff mark *}
2121--
22−|_ [hid=bowl state=~]
22+|_ {hid/bowl state/$~}
2323++ poke-noun
24− |= arg=*
25− ^- [(list move) _+>.$]
24+ |= arg/*
25+ ^- {(list move) _+>.$}
2626 :_ +>.$
2727 %+ turn (prey /the-path hid)
28− |=([o=bone *] [o %diff %noun arg])
28+ |=({o/bone *} `move`[o %diff %noun arg])
2929++ peer
30− |= pax=path
31− ^- [(list move) _+>.$]
30+ |= pax/path
31+ ^- {(list move) _+>.$}
3232 ~& [%subscribed-to pax=pax]
3333 [~ +>.$]
3434--
@@ -39,17 +39,17 @@ And secondly, `:sink`:
3939```
4040/? 314
4141|%
42−++ move ,[bone card]
42+++ move {bone card}
4343++ card
44− $% [%peer wire [@p term] path]
45− [%pull wire [@p term] ~]
44+ $% {$peer wire {@p term} path}
45+ {$pull wire {@p term} $~}
4646 ==
4747--
4848!:
49−|_ [bowl available=?]
49+|_ {bowl available/?}
5050++ poke-noun
51− |= arg=*
52− ^- [(list move) _+>.$]
51+ |= arg/*
52+ ^- {(list move) _+>.$}
5353 ?: &(=(%on arg) available)
5454 [[[ost %peer /subscribe [our %source] /the-path] ~] +>.$(available |)]
5555 ?: &(=(%off arg) !available)
@@ -57,13 +57,13 @@ And secondly, `:sink`:
5757 ~& ?:(available %not-subscribed %subscribed)
5858 [~ +>.$]
5959++ diff-noun
60− |= [wir=wire arg=*]
61− ^- [(list move) _+>.$]
60+ |= {wir/wire arg/*}
61+ ^- {(list move) _+>.$}
6262 ~& [%recieved-data arg]
6363 [~ +>.$]
6464++ reap
65− |= [wir=wire error=(unit tang)]
66− ^- [(list move) _+>.$]
65+ |= {wir/wire error/(unit tang)}
66+ ^- {(list move) _+>.$}
6767 ?~ error
6868 ~& %successfully-subscribed
6969 [~ +>.$]
@@ -151,7 +151,7 @@ whenever we poke `:source`, `:sink` gets the update and prints it
151151out. Then we unsubscribe by poking `:sink` with `%off`, and
152152`:sink` stops getting updates. We then resubscribe.
153153
154−There's a fair bit going on in this code, Let's look at
154+There's a fair bit going on in this code. Let's look at
155155`:source` first.
156156
157157Our definition of `move` is fairly specific, since we're only
@@ -176,12 +176,12 @@ In our case, we don't care what path you subscribed on, and all
176176we do is print out that you subscribed. Arvo keeps track of your
177177subscriptions, so you don't have to. You can access your
178178subscribers by looking at `sup` in the bowl that's passed in.
179−`sup` is of type `(map bone ,[@p path])`, which associates bones
179+`sup` is of type `(map bone {@p path})`, which associates bones
180180with the urbit who subscribed, and which path they subscribed on.
181−If you want to talk to your subscribers, send them messages along
181+If you want to communicate with your subscribers, send them messages along
182182their bone.
183183
184−`++poke-noun` spams the given arguement to all our subscribers.
184+`++poke-noun` "spams" the given arguement to all our subscribers.
185185There's a few things we haven't seen before. Firstly, `:_(a b)`
186186is the same as `[b a]`. It's just a convenient way of formatting
187187things when the first thing in a cell is much more complicated
@@ -199,11 +199,11 @@ who are subscribed on a path that begins with the given path.
199199"Prey" is short for "prefix".
200200
201201Now we have the list of relevant subscribers. This a list of
202−triples, `[bone @p path]`, where the only thing we really need is
202+triples, `{bone @p path}`, where the only thing we really need is
203203the bone because we don't care what urbit they are or what exact
204204path they subscribed on. Thus, our transformer function takes
205−`[o=bone *]` and produces `[o %diff %noun arg]`, which is a move
206−that means "tell bone `o` this subscription update: `[%noun
205+`{o=bone *}` and produces `[o %diff %noun arg]`, which is a move
206+that provides bone `o` with this subscription update: `[%noun
207207arg]`". This is fairly dense code, but what it's doing is
208208straightforward.
209209
@@ -227,8 +227,8 @@ this, because its semantics are to cancel any subscriptions
227227coming over this duct. If your bone and wire are the same as
228228when you subscribed, then the cancellation will happen correctly.
229229
230−The only state we need for `:sink` is a loobean to tell whether
231−we're already subscribed to `:source`. We use `available=?`,
230+The only state we need for `:sink` is a boolean to indicate whether
231+we're already subscribed to `:source`. We use `available/?`,
232232where `?` is the sign of type boolean (similar to `*`, `@`) (which defaults to true).
233233
234234In `++poke-noun` we check our input to see both if it's `%on` and
@@ -273,7 +273,7 @@ Moving forward, `++reap` is given the wire we attempted to
273273subscribe over, possibly along with an error message in cases of
274274failure. `(unit type)` means "either `~` or `[~ type]`, which
275275means it's used like Haskell's "maybe" or C's nullability. If
276−`error` is `~`, then the subscription was successful, so we tell
276+`error` is `~`, then the subscription was successful and we tell
277277that to the user. Otherwise, we print out the error message.
278278
279279Excercises XX