From 2f6449503ac6294c90d17a069224ad425700178f Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 17 Dec 2014 10:05:38 -0800 Subject: [PATCH] Various fixes and improvements. --- main/app/rodeo/core.hook | 181 ++++++++++++++++++++++++++----- main/app/talk/core.hook | 22 +++- main/mar/radio-command/door.hook | 3 +- main/mar/radio-report/door.hook | 4 +- main/sur/radio/core.hook | 7 +- 5 files changed, 184 insertions(+), 33 deletions(-) diff --git a/main/app/rodeo/core.hook b/main/app/rodeo/core.hook index f89b12ba5e..3731c2be48 100644 --- a/main/app/rodeo/core.hook +++ b/main/app/rodeo/core.hook @@ -18,12 +18,13 @@ general=(set bone) :: meta-subscribe outbox=(pair ,@ud (map ,@ud thought)) :: urbit outbox sent=(map tid:twit serial) :: own tweets + folks=(map ship human) :: human identities == :: ++ party :: a conversation $: count=@ud :: (lent grams) grams=(list telegram) :: all history - locals=(map ship (pair ,@da presence)) :: local presence - remotes=(map station (map ship status)) :: remote presence + locals=(map ship (pair ,@da status)) :: local presence + remotes=(map station atlas) :: remote presence sequence=(map station ,@ud) :: stations heard shape=config :: configuration known=(map serial ,@ud) :: messages heard @@ -49,7 +50,10 @@ $% [%mean p=ares] :: cancel [%nice ~] :: acknowledge [%rust %radio-report report] :: refresh - == == == :: + == == :: + $: %t :: + $% [%wake ~] :: timer wakeup + == == == ++ move ,[p=bone q=(mold note gift)] :: all actions ++ hapt ,[p=ship q=path] :: app instance ++ note :: requests @@ -60,6 +64,9 @@ $% [%mess p=hapt q=ship r=cage] :: message [%nuke p=hapt q=ship] :: cancel [%show p=hapt q=ship r=path] :: subscribe + == == + $: %t :: + $% [%wait p=@da] :: == == == :: ++ twim :: twitter endpoints $%([%mine p=span] [%stat p=@uv]) @@ -143,12 +150,7 @@ :: %review ra-ever:(ra-think | her +.cod) %publish ra-ever:(ra-think & her +.cod) - %ping - =+ pur=(~(get by parties) p.cod) - ?~ pur - (ra-evil %radio-no-party) - =< ra-ever =< pa-abet - (~(pa-notify pa p.cod u.pur) her q.cod) + %ping (ra-notice +.cod) == :: ++ ra-config :: configure party @@ -166,9 +168,21 @@ ?~ pur ~& [%ra-friend-none man] +>.$ pa-abet:(~(pa-friend pa man u.pur) sih) :: + ++ ra-stalk :: %stalk response + |= [man=span tay=station sih=sign] + ^+ +> + =+ pur=(~(get by parties) man) + ?~ pur ~& [%ra-stalk-none man] +>.$ + pa-abet:(~(pa-stalk pa man u.pur) tay sih) + :: ++ ra-timer :: timeout - |- ^+ + - !! + ^+ . + =+ paz=parties + |- ^+ +> + ?~ paz +>.$ + =. +>.$ $(paz l.paz) + =. +>.$ $(paz r.paz) + pa-abet:~(pa-timer pa p.n.paz q.n.paz) :: ++ ra-twitter :: %twitter response |= [met=twim sih=sign] @@ -271,6 +285,47 @@ ?~ aud +>.^$ $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip)) :: + ++ ra-notice :: declare presence + |= [her=ship las=atlas] + ^+ +> + =+ sul=(~(tap by las) ~) + |- ^+ +>.^$ + ?~ sul ra-ever + =. +>.^$ $(sul t.sul) + ?- -.p.i.sul + %| +>.^$ + %& ?: =(p.p.i.sul our.hid) + (ra-appear q.p.i.sul q.i.sul) + ?: =(her our.hid) + (ra-provoke p.p.i.sul i.sul) + (ra-evil %radio-unauthorized-presence) + == + :: + ++ ra-appear :: review presence + |= [her=ship man=span per=presence] + =^ who folks + =+ who=(~(get by folks) her) + ?^ who [u.who folks] + =+ who=*human :: XX do right + [who (~(put by folks) who her)] + =+ pur=(~(get by parties) man) + ?~ pur + ~& [%bad-appear man] + (ra-evil %radio-no-party) + pa-abet:(~(pa-notify pa man u.pur) her who per) + :: + ++ ra-provoke :: forward presence + |= [him=ship tay=station per=presence] + %+ ra-emit ost + :* %pass + /provoke + %g + %mess + [him /rodeo] + our.hid + [%radio-command !>(`command`[%ping [[tay per] ~ ~]])] + == + :: ++ ra-conduct :: thought to station |= [pub=? her=ship tay=station tip=thought] ^+ +> @@ -341,9 +396,15 @@ ::== & :: - ++ pa-present :: XX - ^- (map ship status) - ~ + ++ pa-timer :: timer expire + ^+ . + =+ cul=(~(tap by locals) ~) + =+ ^= hay + %+ skim cul + |= [a=ship b=@da c=status] + (lte lat.hid (add ~m2 b)) + ?: =(cul hay) +> + pa-display(locals (~(gas by *(map ship (pair ,@da status))) hay)) :: ++ pa-watch :: watch presence |= her=ship @@ -361,12 +422,17 @@ (pa-sauce ost [[%rust %radio-report %config shape] ~]) :: ++ pa-display :: update presence - =+ vew=viewers + =+ :- vew=viewers + ^= reg + :_ remotes + |- ^- atlas + ?~ locals ~ + [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)] |- ^+ +> ?~ vew +> =. +> $(vew l.vew) =. +> $(vew r.vew) - (pa-sauce n.vew [[%rust %radio-report %group pa-present] ~]) + (pa-sauce n.vew [[%rust %radio-report %group reg] ~]) :: ++ pa-monitor :: update config =+ owe=owners @@ -393,6 +459,22 @@ == == :: + ++ pa-stalk :: subscribed present + |= [tay=station sih=sign] + ^+ +> + ?+ sih ~&([%radio-bad-friend sih] !!) + [%g %nice ~] + ~& %pa-friend-nice + +>.$ + :: + [%g %rust %radio-report *] + ~& [%pa-friend-report +>+.sih] + ?+ -.+>+.sih ~&([%radio-odd-friend sih] !!) + %group + (pa-remind tay +.+>+.sih) + == + == + :: ++ pa-scrub :: pass forward |= [ost=bone bub=(list (pair path note))] %_ +>.$ @@ -410,13 +492,17 @@ ++ pa-abjure :: unsubscribe move |= tal=(list station) %+ pa-scrub 0 + %- zing %+ turn tal |= tay=station ?- -.tay %| !! %& ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] - :- /friend/nuke/[man] - [%g %nuke [p.p.tay /rodeo] our.hid] + :~ :- /friend/nuke/[man] + [%g %nuke [p.p.tay /rodeo] our.hid] + :- /stalk/nuke/[man] + [%g %nuke [p.p.tay /rodeo] our.hid] + == == :: ++ pa-acquire :: subscribe to @@ -437,7 +523,7 @@ %& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] :~ :- /friend/show/[man] [%g %show [p.p.tay /rodeo] our.hid /fm/[q.p.tay]/(scot %ud num)] - :- /friend/view/[man] + :- /stalk/show/[man]/(scot %p p.p.tay)/[q.p.tay] [%g %show [p.p.tay /rodeo] our.hid /am/[q.p.tay]] == == @@ -460,11 +546,37 @@ =. guests (~(del in guests) ost) (pa-sauce ost [[%mean ~] ~]) :: - ++ pa-notify :: new presence + ++ pa-notify :: local presence |= [her=ship per=presence] ^+ +> - !! - :: pa-display(present (~(put by present) her [per lat.hid *human])) + =+ guz=(~(get by locals) her) + =. locals (~(put by locals) her lat.hid per) + ?. |(?=(~ guz) !=(per q.u.guz)) + +>.$ + pa-display + :: + ++ pa-remind :: remote presence + |= [tay=station loc=atlas rem=(map station atlas)] + =+ ^= buk + =+ mer=(turn (~(tap by rem) ~) |=([* a=atlas] a)) + |- ^- atlas + ?~ mer loc + =. loc $(mer t.mer) + =+ dur=`(list (pair ship status))`(~(tap by q.i.mer) ~) + |- ^- atlas + ?~ dur loc + =. loc $(dur t.dur) + =+ fuy=(~(get by loc) p.i.dur) + ?~ fuy (~(put by loc) p.i.dur q.i.dur) + ?: =(`presence`p.q.i.dur `presence`p.u.fuy) + loc + ?- p.u.fuy + %talk loc + %hear (~(put by loc) p.i.dur q.i.dur) + == + ?. |(?=(~ gub) =(buk u.gub)) + +>.$ + pa-display(remotes (~(put by remotes) tay buk)) :: ++ pa-start :: start stream |= riv=river @@ -520,12 +632,12 @@ =+ lef=$(guests l.guests) =+ rit=$(guests r.guests) =+ old=[p=(welp p.lef p.rit) q=(welp q.lef q.rit)] - ?: ?- -.q.q.n.guests :: after the end + ?: ?- -.q.q.n.guests :: after the end %ud (lte p.q.q.n.guests num) %da (lte p.q.q.n.guests p.r.q.gam) == [[p.n.guests p.old] [[p.n.guests %give %mean ~] q.old]] - ?: ?- -.p.q.n.guests :: before the start + ?: ?- -.p.q.n.guests :: before the start %ud (gth p.p.q.n.guests num) %da (gth p.p.q.n.guests p.r.q.gam) == @@ -592,6 +704,13 @@ :: ~& sih=sih =+ sih=((hard sign) sih) ?+ pax ~& [%rodeo-strange-path pax] !! + :: + [%provoke ~] [~ +>.$] + [%time ~] + ?> ?=(0 ost) + =^ moz +>.$ ra-abet:~(ra-timer ra 0 ~) + :_(+>.$ :_(moz [0 %pass /time %t %wait (add ~s10 lat.hid)])) + :: [%twitter *] =- ra-abet:(~(ra-twitter ra ost ~) met sih) ^= met @@ -601,12 +720,21 @@ [%stat @ ~] [i.t.pax (slav %uv i.t.t.pax)] == + :: [%friend *] ?> ?=([@ @ ~] t.pax) ?. =(%show i.t.pax) ~& [%pour-friend-nuke-nuke pax] [~ +>.$] ra-abet:(~(ra-friend ra ost ~) i.t.t.pax sih) + :: + [%stalk *] + ?> ?=([@ @ @ ~] t.pax) + ?. =(%show i.t.pax) + ~& [%pour-friend-nuke-nuke pax] + [~ +>.$] + =+ [man tay]=[i.t.t.pax %& (scot %p i.t.t.t.pax) i.t.t.t.t.pax] + ra-abet:(~(ra-stalk ra ost ~) man tay sih) :: [%repeat *] ?> ?=([@ @ @ ~] t.pax) @@ -617,12 +745,13 @@ ++ prep |= old=(unit (unit house)) ^- [(list move) _+>] + :- [0 %pass /time %t %wait (add ~s10 lat.hid)]~ ?> ?=(^ old) ?^ u.old ~& %rodeo-prep-old - [~ +>(+<+ u.u.old)] + +>(+<+ u.u.old) ~& %rodeo-prep-new - [~ +:ra-abet:(~(ra-apply ra 0 ~) our.hid %design %main `[~ [%| ~]])] + +:ra-abet:(~(ra-apply ra 0 ~) our.hid %design %main `[~ [%| ~]]) :: ++ pull |= ost=bone diff --git a/main/app/talk/core.hook b/main/app/talk/core.hook index ae6c3abcc9..15f2d6d554 100644 --- a/main/app/talk/core.hook +++ b/main/app/talk/core.hook @@ -53,7 +53,10 @@ $% [%mess p=hapt q=ship r=cage] [%nuke p=hapt q=ship] [%show p=hapt q=ship r=path] - == == == + == == + $: %t :: + $% [%wait p=@da] :: + == == == :: ++ sign $? $: %g $% [%mean p=ares] @@ -67,6 +70,9 @@ $% [%txt p=cord] [%radio-report p=report] == == + == == + $: %t :: + $% [%wake ~] :: timer wakeup == == == -- !: @@ -392,6 +398,19 @@ ?> ?=(%txt -.p.sih) (pour-shell ost p.p.sih) == + :: + %time + :_ +>.$ + :* [0 %pass /time %t %wait (add ~s10 lat.hid)] + ?~ targets + ~ + :_ ~ + %+ send-rodeo 0 + :- %ping + %- ~(gas by *(map station presence)) + %+ turn (~(tap by targets) ~) + |=(a=station [a %hear]) + == :: %command ?> ?=(?(%mean %nice) +<.sih) @@ -442,6 +461,7 @@ ^- [(list move) _+>] :_ +> :~ [ost %pass /cmd-in %g %show [our.hid +.imp.hid] you /in/[-.imp.hid]] + [0 %pass /time %t %wait (add ~s10 lat.hid)]~ ^- move :* ost %pass /server %g %show diff --git a/main/mar/radio-command/door.hook b/main/mar/radio-command/door.hook index c1b043391e..eee32b9ed2 100644 --- a/main/mar/radio-command/door.hook +++ b/main/mar/radio-command/door.hook @@ -16,7 +16,7 @@ =< :~ publish/(ar thot) review/(ar thot) design/(ot party/so config/(mu conf) ~) - ping/(ot party/so presence/(ci (soft presence) so) ~) + ping/auri == |% ++ op :: parse keys of map @@ -58,6 +58,7 @@ == :: ++ audi (op stati (ci (soft delivery) so)) :: audience + ++ auri (op stati (ci (soft presence) so)) :: ++ stati ^- $+(nail (like station)) diff --git a/main/mar/radio-report/door.hook b/main/mar/radio-report/door.hook index c387f05026..ca125c5500 100644 --- a/main/mar/radio-report/door.hook +++ b/main/mar/radio-report/door.hook @@ -20,8 +20,8 @@ %config ~! rep (conf +.rep) %house [%a (turn (~(tap by +.rep)) joce)] %grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~) - %group (grop +.rep) - :: (jobe global/(grop p.rep) local/%.(q.rep (jome stan grop)) ~) + ::%group (grop +.rep) + %group (jobe local/(grop p.rep) global/%.(q.rep (jome stan grop)) ~) == ++ joce |=(a=span [%s a]) ++ jope |=(a=ship (jape +:)) ::[%s (crip +:(scow %p a))]) diff --git a/main/sur/radio/core.hook b/main/sur/radio/core.hook index 1512bc7e68..911d43cae9 100644 --- a/main/sur/radio/core.hook +++ b/main/sur/radio/core.hook @@ -3,18 +3,19 @@ :: |% ++ audience (map station delivery) :: destination/state +++ atlas (map ship status) :: presence map ++ command :: effect on party $% [%design (pair span (unit config))] :: configure/destroy [%publish (list thought)] :: originate [%review (list thought)] :: deliver - [%ping (pair span presence)] :: declare status + [%ping (map station presence)] :: declare status == :: ++ config :: party configuration $: sources=(set station) :: pulls from cordon=(each (set ship) (set ship)) :: white/blacklist == :: ++ cousin (pair ship span) :: domestic flow -++ delivery ?(%pending %received %rejected) :: delivery state +++ delivery ?(%pending %received %rejected %released) :: delivery state ++ human :: human identifier $: true=(unit (trel ,@t (unit ,@t) ,@t)) :: true name hand=(unit ,@t) :: handle @@ -26,7 +27,7 @@ ++ report :: unified rush/rust $% [%house (set span)] :: meta-changes [%grams (pair ,@ud (list telegram))] :: thoughts - [%group (map ship status)] :: presence + [%group (pair atlas (map station atlas)] :: presence [%config config] :: reconfigure == :: ++ serial ,@uvH :: unique identity