@@ -6,7 +6,7 @@ template = "doc.html"
66
77In this lesson we'll look at sending and receiving one-off messages called
88`%poke`s. We'll look at the `on-poke` agent arm which handles incoming pokes.
9−We'll also introduce the `on-agent` arm, and look at one kind of response it can
9+We'll also introduce the `on-agent` arm, and look at the one kind of response it can
1010take - a `%poke-ack`.
1111
1212## Receiving a poke
@@ -106,8 +106,8 @@ produce the `(quip card _this)` like so:
106106
107107The [colcab](/docs/hoon/reference/rune/col#_-colcab) (`:_`) rune makes an
108108inverted cell, it's just `:-` but with the head and tail swapped. We use colcab
109−to produce the `(quip card _this)` because the list of cards is typically
110−"heavier" than the new agent core expression (`this`), so it makes it more
109+to produce the `(quip card _this)` because the list of cards is "heavier"
110+here than the new agent core expression (`this`), so it makes it more
111111readable.
112112
113113### Receiving the `%poke-ack`
@@ -144,7 +144,9 @@ The simplest way to handle a `%poke-ack` by passing it to `default-agent`'s
144144`on-agent` arm, which will just print an error message to the terminal if it's a
145145nack, and otherwise do nothing. Sometimes you'll want your agent to do something
146146different depending on whether the poke failed or succeeded (and therefore
147−whether it's a nack or an ack). As stated in the [Precepts](/docs/development/precepts#specifics): "Route on wire before sign, never sign before wire.". Thus we first test the
147+whether it's a nack or an ack).
148+
149+As stated in the [Precepts](/docs/development/precepts#specifics): "Route on wire before sign, never sign before wire.". Thus we first test the
148150`wire` so you can tell what the `%poke-ack` was for. You might do something
149151like:
150152
@@ -216,7 +218,8 @@ receiving pokes. Here's the first, an agent that receives pokes:
216218 %noun
217219 =/ action !<(?(%inc %dec) vase)
218220 ?- action
219− %inc `this(val +(val))
221+ %inc `this(val +(val))
222+ ::
220223 %dec
221224 ?: =(0 val)
222225 ~| "Can't decrement - already zero!"
@@ -324,7 +327,7 @@ dojo: app poke failed
324327### `pokeit.hoon`
325328
326329Here's a second agent. It takes a poke of `%inc` or `%dec` like before, but
327−rather that updating its own state, it sends two pokes to `%pokeme`, so
330+rather than updating its own state, it sends two pokes to `%pokeme`, so
328331`%pokeme`'s state will be incremented or decremented by two.
329332
330333```hoon
@@ -368,6 +371,7 @@ rather that updating its own state, it sends two pokes to `%pokeme`, so
368371 :~ [%pass /inc %agent [our.bowl %pokeme] %poke %noun !>(%inc)]
369372 [%pass /inc %agent [our.bowl %pokeme] %poke %noun !>(%inc)]
370373 ==
374+ ::
371375 %dec
372376 :_ this
373377 :~ [%pass /dec %agent [our.bowl %pokeme] %poke %noun !>(%dec)]
@@ -476,7 +480,7 @@ Let's try it out:
476480
477481`%pokeit` has received positive `%poke-ack`s, which means both pokes succeeded.
478482It could tell they were increments because the `%poke-ack`s came back on the
479−`/inc` path we specified. We can check the state of `%pokeme` to confirm:
483+`/inc` wire we specified. We can check the state of `%pokeme` to confirm:
480484
481485```
482486> 2