on master help sign in
gall-guide: scry - add ::s
84be64eTinnus Napbus
content/docs/userspace/gall-guide/10-scry.md+7
@@ -191,12 +191,15 @@ Here's a simple example agent with three scry endpoints:
191|_ =bowl:gall
191|_ =bowl:gall
192+* this .
192+* this .
193 def ~(. (default-agent this %.n) bowl)
193 def ~(. (default-agent this %.n) bowl)
194+::
194++ on-init
195++ on-init
195 ^- (quip card _this)
196 ^- (quip card _this)
196 `this
197 `this
198+::
197++ on-save
199++ on-save
198 ^- vase
200 ^- vase
199 !>(state)
201 !>(state)
202+::
200++ on-load
203++ on-load
201 |= old-state=vase
204 |= old-state=vase
202 ^- (quip card _this)
205 ^- (quip card _this)
@@ -204,6 +207,7 @@ Here's a simple example agent with three scry endpoints:
204 ?- -.old
207 ?- -.old
205 %0 `this(state old)
208 %0 `this(state old)
206 ==
209 ==
210+::
207++ on-poke
211++ on-poke
208 |= [=mark =vase]
212 |= [=mark =vase]
209 ^- (quip card _this)
213 ^- (quip card _this)
@@ -212,8 +216,10 @@ Here's a simple example agent with three scry endpoints:
212 %noun
216 %noun
213 `this(data (~(put by data) !<([@p @t] vase)))
217 `this(data (~(put by data) !<([@p @t] vase)))
214 ==
218 ==
219+::
215++ on-watch on-watch:def
220++ on-watch on-watch:def
216++ on-leave on-leave:def
221++ on-leave on-leave:def
222+::
217++ on-peek
223++ on-peek
218 |= =path
224 |= =path
219 ^- (unit (unit cage))
225 ^- (unit (unit cage))
@@ -231,6 +237,7 @@ Here's a simple example agent with three scry endpoints:
231 [~ ~]
237 [~ ~]
232 ``noun+!>(`@t`u.maybe-res)
238 ``noun+!>(`@t`u.maybe-res)
233 ==
239 ==
240+::
234++ on-agent on-agent:def
241++ on-agent on-agent:def
235++ on-arvo on-arvo:def
242++ on-arvo on-arvo:def
236++ on-fail on-fail:def
243++ on-fail on-fail:def