on master help sign in
gall-reference: change unit to list in %fact card
commit82a8ced86d025c3cb0018647a00c568f8adc8eae authorLiam Fitzgerald <liam@urizen.co> dateTue 31 Mar 2020, 09:15 (7 years ago) parent7e013fc
1 file changed+10−4
reference/vane-apis/gall.md+10−4
reference/vane-apis/gall.md+10−4
@@ -84,7 +84,7 @@ exposes a scry namespace to inspect everyone's number.
8484 :: Increment local counter and send new counter to subscribers
8585 ::
8686 [%increment ~]
87− :- [%give %fact `/local %atom !>(+(local))]~
87+ :- [%give %fact ~[/local] %atom !>(+(local))]~
8888 this(local +(local))
8989 ::
9090 :: Send remote %increment poke
@@ -412,7 +412,7 @@ List of cards and new agent.
412412 :: Increment local counter and send new counter to subscribers
413413 ::
414414 [%increment ~]
415− :- [%give %fact `/local %atom !>(+(local))]~
415+ :- [%give %fact ~[/local] %atom !>(+(local))]~
416416 this(local +(local))
417417 ::
418418 :: Send remote %increment poke
@@ -819,10 +819,10 @@ subscription content for all subscribers on a given path.
819819#### Structure
820820
821821```hoon
822−[%fact (unit path) =cage]
822+[%fact (list path) =cage]
823823```
824824
825−`(unit path)` is the path of the subscription being updated. If no path is
825+`(list path)` is a list of the paths to send the update on. If no path is
826826 given, then the update is only given to the program that instigated the
827827 request. Typical use of this mode is in `+on-watch` to give an initial update
828828 to a new subscriber to get them up to date.
@@ -836,6 +836,12 @@ subscription content for all subscribers on a given path.
836836::
837837:: Gives current local state to new subscribers.
838838[%give %fact ~ %atom !>(local.sta)]
839+
840+
841+:: From ++on-poke in reference agent
842+::
843+:: Gives incremented local state to any subscribers on /local
844+[%give %fact ~[/local] %atom !>(+(local))]
839845```
840846
841847### `%kick`