@@ -31,10 +31,10 @@ Another generator is `+hood/merge`. Try running `+hood/merge` with the
3131normal arguments for `|merge`:
3232
3333```
34− ~fintud-macrep:dojo> +hood/merge %home our %they
35− [syd=%home her=~fintud-macrep sud=%they gem=%auto]
36− ~fintud-macrep:dojo> +hood/merge %home our %they, =gem %this
37− [syd=%home her=~fintud-macrep sud=%they gem=%auto]
34+~fintud-macrep:dojo> +hood/merge %home our %they
35+[syd=%home her=~fintud-macrep sud=%they gem=%auto]
36+~fintud-macrep:dojo> +hood/merge %home our %they, =gem %this
37+[syd=%home her=~fintud-macrep sud=%they gem=%auto]
3838```
3939
4040This didn't run any merge, it just constructed the command that, if sent
@@ -66,66 +66,63 @@ it lets the user optionally specify the message as well.
6666We'll need a new mark for our arguments. Let's call it
6767`examples-ping-message`.
6868
69−> For app-specific marks, it's good style to prefix the name of the mark
70−> with the name of the app. Since many apps have several such marks,
71−> subdirectories in `/mar` are rendered as `-`, so that `ping-message`
72−> is written in (/mar/examples/ping/message.hoon).
69+> For app-specific marks, it's good style to prefix the name of the mark with the name of the app. Since many apps have several such marks, subdirectories in `/mar` are rendered as `-`, so that `ping-message` is written in (/mar/examples/ping/message.hoon).
7370
7471```
75− ::
76− :::: /hoon/message/ping/examples/app
77− ::
78− /? 314
79− |_ [to=@p message=@t]
80− ++ grab
81− |%
82− ++ noun [@p @t]
83− --
84− --
72+::
73+:::: /hoon/message/ping/examples/app
74+ ::
75+/? 314
76+|_ [to=@p message=@t]
77+++ grab
78+ |%
79+ ++ noun [@p @t]
80+ --
81+--
8582```
8683
8784The app can easily be modified to use this (`/app/examples/ping.hoon`):
8885
8986```
90− :: Allows one ship to ping another with a string of text
91− ::
92− :::: /hoon/ping/examples/app
93− ::
94− /? 314
95− |%
96− ++ move [bone term wire *]
97− --
98− !:
99− |_ [bowl:gall state=$~]
100− ::
101− ++ poke-examples-ping-message
102− |= [to=@p message/@t}
103− ~& 'sent'
104− ^- [(list move) _+>.$]
105− :- ^- (list move)
106− :~ `move`[ost %poke /sending [to dap] %atom message]
107− ==
108− +>.$
109− ::
110− ++ poke-atom
111− |= arg=@
112− ~& 'received'
113− ^- [(list move) _+>.$]
114− ::
115− ~& [%receiving (@t arg)]
116− [~ +>.$]
117− ::
118− ++ coup |=(* `+>)
119− --
87+:: Allows one ship to ping another with a string of text
88+::
89+:::: /hoon/ping/examples/app
90+ ::
91+/? 314
92+|%
93+ ++ move [bone term wire *]
94+--
95+!:
96+|_ [bowl:gall state=$~]
97+::
98+++ poke-examples-ping-message
99+ |= [to=@p message/@t}
100+ ~& 'sent'
101+ ^- [(list move) _+>.$]
102+ :- ^- (list move)
103+ :~ `move`[ost %poke /sending [to dap] %atom message]
104+ ==
105+ +>.$
106+::
107+++ poke-atom
108+ |= arg=@
109+ ~& 'received'
110+ ^- [(list move) _+>.$]
111+ ::
112+ ~& [%receiving (@t arg)]
113+ [~ +>.$]
114+::
115+++ coup |=(* `+>)
116+--
120117```
121118
122119Now we can run this with:
123120
124121```
125− ~fintud-macrep:dojo> |start %examples-ping
126− >=
127− ~fintud-macrep:dojo> :examples-ping &examples-ping-message [~sampel-sipnym 'heyya']
128− >=
122+~fintud-macrep:dojo> |start %examples-ping
123+>=
124+~fintud-macrep:dojo> :examples-ping &examples-ping-message [~sampel-sipnym 'heyya']
125+>=
129126```
130127
131128And on `~sampel-sipnym`, assuming it's running `:examples-ping` as well,
@@ -137,9 +134,9 @@ mandatory, and optional arguments are hard. Let's make a generator,
137134`:examples-ping`, let's put it in `/gen/examples/ping/send.hoon`:
138135
139136```
140− :- %say
141− |= [^ [to=@p message=?($~ [text=@t $~])] $~]
142− [%examples-ping-message to ?~(message 'howdy' text.message)]
137+:- %say
138+|= [^ [to=@p message=?($~ [text=@t $~])] $~]
139+[%examples-ping-message to ?~(message 'howdy' text.message)]
143140```
144141
145142A couple of new things here. Firstly, `message=?($~ [text=@t $~])`
@@ -154,10 +151,10 @@ anything that's in either `a` or `b`. Thus, in our case,
154151This is run as follows:
155152
156153```
157− ~fintud-macrep:dojo> :examples-ping|send ~sampel-sipnym
158− >=
159− ~fintud-macrep:dojo> :examples-ping|send ~sampel-sipnym 'how do you do'
160− >=
154+~fintud-macrep:dojo> :examples-ping|send ~sampel-sipnym
155+>=
156+~fintud-macrep:dojo> :examples-ping|send ~sampel-sipnym 'how do you do'
157+>=
161158```
162159
163160Which causes `~sampel-sipnym` to print `[%receiving 'howdy']` and