mirror of
https://github.com/jackfoxy/urQL.git
synced 2024-09-11 11:55:33 +03:00
more agent
This commit is contained in:
parent
0319ab201b
commit
7030e15b6c
@ -16,7 +16,7 @@
|
||||
|
||||
|_ =bowl:gall
|
||||
+* this .
|
||||
default ~(. (default-agent this %|) bowl)
|
||||
default ~(. (default-agent this %n) bowl)
|
||||
++ on-init
|
||||
^- (quip card _this)
|
||||
~& > '%obelisk init'
|
||||
@ -30,13 +30,36 @@
|
||||
^- (quip card _this)
|
||||
`this(state !<(state-0 old))
|
||||
::++ on-poke |=(cage !!)
|
||||
++ on-poke on-poke:default
|
||||
++ on-poke ::on-poke:default
|
||||
|= [=mark =vase]
|
||||
^- (quip card _this)
|
||||
?> ?=(%charlie-action mark)
|
||||
=/ act !<(action vase)
|
||||
?- -.act
|
||||
%push
|
||||
?: =(our.bowl target.act)
|
||||
`this(values [value.act values])
|
||||
?> =(our.bowl src.bowl)
|
||||
:_ this
|
||||
[%pass /pokes %agent [target.act %charlie] %poke mark vase]~
|
||||
::
|
||||
%pop
|
||||
?: =(our.bowl target.act)
|
||||
`this(values ?~(values ~ t.values))
|
||||
?> =(our.bowl src.bowl)
|
||||
:_ this
|
||||
[%pass /pokes %agent [target.act %charlie] %poke mark vase]~
|
||||
::++ on-watch |=(path !!)
|
||||
++ on-watch on-watch:default
|
||||
::++ on-leave |=(path `..on-init)
|
||||
++ on-leave on-leave:default
|
||||
::++ on-peek |=(path ~)
|
||||
++ on-peek on-peek:default
|
||||
++ on-peek :: on-peek:default
|
||||
|= =path
|
||||
^- (unit (unit cage))
|
||||
?+ path (on-peek:default path)
|
||||
[%x %values ~] ``noun+!>(values)
|
||||
==
|
||||
::++ on-agent |=([wire sign:agent:gall] !!)
|
||||
++ on-agent on-agent:default
|
||||
::++ on-arvo |=([wire sign-arvo] !!)
|
||||
|
34
urql/mar/bill.hoon
Normal file
34
urql/mar/bill.hoon
Normal file
@ -0,0 +1,34 @@
|
||||
|_ bil=(list dude:gall)
|
||||
++ grow
|
||||
|%
|
||||
++ mime `^mime`[/text/x-bill (as-octs:mimes:html hoon)]
|
||||
++ noun bil
|
||||
++ hoon
|
||||
^- @t
|
||||
|^ (crip (of-wall:format (wrap-lines (spit-duz bil))))
|
||||
::
|
||||
++ wrap-lines
|
||||
|= taz=wall
|
||||
^- wall
|
||||
?~ taz ["~"]~
|
||||
:- (weld ":~ " i.taz)
|
||||
%- snoc :_ "=="
|
||||
(turn t.taz |=(t=tape (weld " " t)))
|
||||
::
|
||||
++ spit-duz
|
||||
|= duz=(list dude:gall)
|
||||
^- wall
|
||||
(turn duz |=(=dude:gall ['%' (trip dude)]))
|
||||
--
|
||||
++ txt (to-wain:format hoon)
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun (list dude:gall)
|
||||
++ mime
|
||||
|= [=mite len=@ud tex=@]
|
||||
~_ tex
|
||||
!<((list dude:gall) (slap !>(~) (ream tex)))
|
||||
--
|
||||
++ grad %noun
|
||||
--
|
Loading…
Reference in New Issue
Block a user