From 1864a1bdb82811e117e9d8daf65c9bc27f447437 Mon Sep 17 00:00:00 2001 From: Garret Kelly Date: Mon, 15 Dec 2014 01:30:17 +0000 Subject: [PATCH 1/7] Drop unused assignment from poke-begin-args. --- main/app/begin/core.hook | 1 - 1 file changed, 1 deletion(-) diff --git a/main/app/begin/core.hook b/main/app/begin/core.hook index 6b6e18586b..d547f19618 100644 --- a/main/app/begin/core.hook +++ b/main/app/begin/core.hook @@ -381,7 +381,6 @@ :: ++ poke-begin-args |= [ost=bone you=ship arg=?(~ [his=ship ~])] - =+ sot=?~(arg %begin %his) =^ res +>.$ ^- [[pot=(unit ,[cord prom cord]) tak=(list cord)] _+>.$] ?~ arg From c32ccf9f37e1f676453146ab78aba16e6bc64a8b Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 17 Dec 2014 14:00:40 -0500 Subject: [PATCH 2/7] have :ls kill itself after it's finished --- main/app/ls/core.hook | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/app/ls/core.hook b/main/app/ls/core.hook index f6bc508dcc..a9f0f6f617 100644 --- a/main/app/ls/core.hook +++ b/main/app/ls/core.hook @@ -4,7 +4,8 @@ |= [ost=bone you=ship arg=path ~] =+ lon=((hard arch) .^(%cy arg)) :_ +>.$ - :* [ost %give %nice ~] + :* [ost %pass / %g %cide %$] + [ost %give %nice ~] %+ turn (~(tap by sup.hid)) |= [ost=bone *] :^ ost %give %rush From 1a6b6bd3a22170098e2976d46a5c937201cf0a32 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 17 Dec 2014 18:29:32 -0800 Subject: [PATCH 3/7] Various fixes and improvements. --- main/app/rodeo/core.hook | 40 +++++++++++++++++++++------------------- main/app/talk/core.hook | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 21 deletions(-) diff --git a/main/app/rodeo/core.hook b/main/app/rodeo/core.hook index 70be3b0048..502fb9faeb 100644 --- a/main/app/rodeo/core.hook +++ b/main/app/rodeo/core.hook @@ -135,7 +135,7 @@ ++ ra-apply :: apply command |= [her=ship cod=command] ^+ +> - ~& [%ra-apply cod] + :: ~& [%ra-apply cod] ?- -.cod %design ?. =(her our.hid) @@ -225,7 +225,8 @@ [%g %mean *] ~&([%radio-repeat-rejected num her man sih] %rejected) [%g %nice ~] %received == - (ra-think | her u.oot ~) + ~& [%ra-repeat our.hid u.oot] + (ra-think | our.hid u.oot ~) :: ++ ra-cancel :: drop a bone %_ . @@ -306,7 +307,7 @@ =^ who folks =+ who=(~(get by folks) her) ?^ who [u.who folks] - =+ who=*human :: XX do right + =+ who=`human`[~ `(scot %p her)] :: XX do right [who (~(put by folks) her who)] =+ pur=(~(get by parties) man) ?~ pur @@ -329,15 +330,17 @@ ++ ra-conduct :: thought to station |= [pub=? her=ship tay=station tip=thought] ^+ +> + ~& [%ra-conduct pub her tay] ?- -.tay %& ?: pub =. her our.hid :: XX security! ?: =(her p.p.tay) + ~& [%ra-conduct-record p.tay] (ra-record q.p.tay p.p.tay tip) (ra-transmit p.tay tip) - ?: =(our.hid q.p.tay) + ?. =(our.hid p.p.tay) +> - (ra-record q.p.tay p.p.tay tip) + (ra-record q.p.tay her tip) %| ?. pub +> ?- -.p.tay %twitter @@ -419,7 +422,7 @@ ?. (pa-admire her) (pa-sauce ost [[%mean ~ %radio-master-unauthorized ~] ~]) =. owners (~(put in owners) ost) - ~& [%pa-master her man shape] + :: ~& [%pa-master her man shape] (pa-sauce ost [[%rust %radio-report %config shape] ~]) :: ++ pa-display :: update presence @@ -429,7 +432,7 @@ |- ^- atlas ?~ locals ~ [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)] - ~& [%pa-display man reg] + :: ~& [%pa-display man reg] |- ^+ +>.^$ ?~ vew +>.^$ =. +>.^$ $(vew l.vew) @@ -442,7 +445,7 @@ ?~ owe +> =. +> $(owe l.owe) =. +> $(owe r.owe) - ~& [%pa-monitor man shape] + :: ~& [%pa-monitor man shape] (pa-sauce n.owe [[%rust %radio-report %config shape] ~]) :: ++ pa-friend :: subscribed update @@ -450,11 +453,11 @@ ^+ +> ?+ sih ~&([%radio-bad-friend sih] !!) [%g %nice ~] - ~& %pa-friend-nice + :: ~& %pa-friend-nice +>.$ :: [%g %rust %radio-report *] - ~& [%pa-friend-report +>+.sih] + :: ~& [%pa-friend-report +>+.sih] ?+ -.+>+.sih ~&([%radio-odd-friend sih] !!) %grams (pa-lesson q.+.+>+.sih) @@ -466,7 +469,7 @@ ^+ +> ?+ sih ~&([%radio-bad-friend sih] !!) [%g %nice ~] - ~& %pa-stalk-nice + :: ~& %pa-stalk-nice +>.$ :: [%g %rust %radio-report *] @@ -503,7 +506,7 @@ ?> =(me:ti p.p.tay) [%e %them ~] :: - %& ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] + %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] :~ :- /friend/nuke/[man] [%g %nuke [p.p.tay /rodeo] our.hid] :- /stalk/nuke/[man] @@ -526,7 +529,7 @@ ?> =(me:ti p.p.tay) [%e %them ~ mine:ti] :: - %& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] + %& :: ~& [%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)] :- /stalk/show/[man]/(scot %p p.p.tay)/[q.p.tay] @@ -548,7 +551,7 @@ :: ++ pa-cancel :: unsubscribe from ^+ . - ~& [%pa-cancel ost] + :: ~& [%pa-cancel ost] =. guests (~(del in guests) ost) (pa-sauce ost [[%mean ~] ~]) :: @@ -581,7 +584,7 @@ %hear (~(put by loc) p.i.dur q.i.dur) == =+ gub=(~(get by remotes) tay) - ~& [%pa-remind tay gub buk] + :: ~& [%pa-remind tay gub buk] ?. |(?=(~ gub) !=(buk u.gub)) +>.$ =. remotes (~(put by remotes) tay buk) @@ -596,7 +599,6 @@ +>.$(guests (~(put by guests) ost riv)) ^= lab =+ [end=count gaz=grams dun=| zeg=*(list telegram)] - ~& [%river riv] |- ^- (trel ,? ,@ud (list telegram)) ?~ gaz [dun end (flop zeg)] ?: ?- -.q.riv :: after the end @@ -634,7 +636,7 @@ :: ++ pa-refresh :: update stream |= [num=@ud gam=telegram] - ~& [%pa-refresh num gam] + :: ~& [%pa-refresh num gam] =+ ^= moy |- ^- (pair (list bone) (list move)) ?~ guests [~ ~] @@ -709,7 +711,7 @@ ++ pour |= [ost=bone pax=path sih=*] ^- [(list move) _+>] - ~& [%rodeo-pour ost pax sih] + :: ~& [%rodeo-pour ost pax sih] :: ~& sih=sih =+ sih=((hard sign) sih) ?+ pax ~& [%rodeo-strange-path pax] !! @@ -765,6 +767,6 @@ ++ pull |= ost=bone ^- [(list move) _+>] - ~& [%rodeo-pull ost] + :: ~& [%rodeo-pull ost] ra-abet:~(ra-cancel ra ost ~) -- diff --git a/main/app/talk/core.hook b/main/app/talk/core.hook index 2f45cf3752..cff196f47a 100644 --- a/main/app/talk/core.hook +++ b/main/app/talk/core.hook @@ -175,6 +175,13 @@ ^- (map station presence) (~(run by destination) |=(a=* mode)) :: +++ visible + ^- (map ship status) + ?~ live ~ + =+ pur=(~(get by parties) u.live) + ?~ pur ~ + present.u.pur +:: ++ pour-shell |= [ost=bone txt=cord] ^- [(list move) _+>] @@ -185,6 +192,14 @@ |- ^- [(list move) _+>.^$] ?+ -.u.rey !! %priv $(targets `(sa p.u.rey), u.rey [%def q.u.rey]) + %who + :_ +>.^$ + %^ send /out %give :+ %rush %tang :_ ~ + :+ %rose [", " "" ""] + %+ turn (~(tap by visible) ~) + |= [a=ship b=status] + [%leaf (scow %p a)] + :: %def :: ?> ?=(?([%own %exp %say] -.p.u.rey) ?~ live @@ -370,7 +385,24 @@ ?~ pur ~& [%no-party man] [~ +>.$] - [~ +>.$(parties (~(put by parties) man u.pur(present p.reg)))] + =+ ^= buk + =+ mer=(turn (~(tap by q.reg) ~) |=([* a=atlas] a)) + |- ^- atlas + ?~ mer p.reg + =. p.reg $(mer t.mer) + =+ dur=`(list (pair ship status))`(~(tap by i.mer) ~) + |- ^- atlas + ?~ dur p.reg + =. p.reg $(dur t.dur) + =+ fuy=(~(get by p.reg) p.i.dur) + ?~ fuy (~(put by p.reg) p.i.dur q.i.dur) + ?: =(`presence`p.q.i.dur `presence`p.u.fuy) + p.reg + ?- p.u.fuy + %talk p.reg + %hear (~(put by p.reg) p.i.dur q.i.dur) + == + [~ +>.$(parties (~(put by parties) man u.pur(present buk)))] :: ++ prompt ^- cord @@ -400,7 +432,7 @@ |= [ost=bone pax=path sih=*] ^- [(list move) _+>] => .(sih ((hard sign) sih)) - ~& talk-pour/sih + :: ~& talk-pour/sih ?~ pax ~& talk-pour-strange-path/pax !! ?+ i.pax ~& talk-pour-strange-path/pax !! %cmd-in From edef98f5080d0d42f2097a9c4e840eb2d745ba2d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 17 Dec 2014 18:34:40 -0800 Subject: [PATCH 4/7] Rename rodeo to radio. --- main/app/radio/core.hook | 908 +++++++++++++++++++++++++++++++++++---- main/app/rodeo/core.hook | 833 ----------------------------------- 2 files changed, 813 insertions(+), 928 deletions(-) delete mode 100644 main/app/rodeo/core.hook diff --git a/main/app/radio/core.hook b/main/app/radio/core.hook index 58e1bb1940..0a5241c551 100644 --- a/main/app/radio/core.hook +++ b/main/app/radio/core.hook @@ -1,64 +1,823 @@ -/- mess,user,users,zing,zong,*radio +:: +:::: /hook/core/rodeo/app + :: +/? 314 +/- *radio +/+ twitter +:: +:::: + :: !: -=> |% - ++ axle - $% [%0 p=(map path ,[p=(list zong) q=(map ship ,?)])] - == - ++ blitz - $% [%zong p=zong] - [%user p=user] - == - ++ iron - $% [%zongs p=(list zong)] - [%users p=users] - == - ++ gift - $% [%rush blitz] - [%rust iron] - [%mean ares] - [%nice ~] - == - ++ move ,[p=bone q=(mold note gift)] - ++ note ,~ +=> |% :: data structures + ++ house ,[%1 house-1] :: full state + ++ house-any :: app history + $% [%1 house-1] :: 1: rodeo + [%0 house-0] :: 0: initial version + == :: + ++ house-1 :: + $: parties=(map span party) :: conversations + 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 + == :: + ++ house-0 :: legacy state + %+ map path :: + ,[p=(list zong) q=(map ship ,?)] :: + ++ zong :: legacy messages + $% $: %mess p=@da q=ship :: + $= r :: + $% [%do p=@t] :: + [%exp p=@t q=tank] :: + [%say p=@t] :: + == == == :: + ++ party :: a conversation + $: count=@ud :: (lent grams) + grams=(list telegram) :: all history + 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 + guests=(map bone river) :: message followers + viewers=(set bone) :: presence followers + owners=(set bone) :: config followers + == :: + ++ river (pair point point) :: stream definition + ++ point :: stream endpoint + $% [%ud p=@ud] :: by number + [%da p=@da] :: by date + == :: + ++ gift :: result + $% [%rust %radio-report report] :: refresh + [%mean ares] :: cancel + [%nice ~] :: accept + == :: + ++ sign :: response + $% $: %e :: from %eyre + $% [%thou p=httr] :: HTTP response + == == :: + $: %g :: application + $% [%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 + $% $: %e :: through %eyre + $% [%them p=(unit hiss)] :: HTTP request + == == :: + $: %g :: network + $% [%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]) -- -|_ [hid=hide vat=axle] -++ grab - |= sta=path - (fall (~(get by p.vat) sta) *[p=(list zong) q=(map ship ,?)]) +|_ [hid=hide house] +++ ti + =+ ^= key :: XX use %jael + :* :- 'AP3G1t8ki6rPzeeAqdWCTw03F' + 'VV784LPwZSaAxtF16RWWTnST4F85BHN8VqQKNyv7MprCkA0xZD' + :- '2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl' + 'jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8' + == + => ~(. twit key lat.hid `@`eny.hid) + =+ me=%hoontap :: XX use %khan + |% + ++ sta |=(who=span [%| %twitter who]) + ++ post |=(a=cord `hiss`(stat-upda [%status a]~ ~)) + ++ mine `hiss`(stat-home) + :: + ++ line (ar:jo stat:twir) :: reparse timeline + -- :: -++ ident - |= you=ship - %- (hard ,@t) - .^(%a (scot %p our.hid) %name (scot %da lat.hid) (scot %p you) ~) -:: -++ peer - |= [ost=bone you=ship pax=path] - ^- [(list move) _+>] - ?~ pax - [[ost %give %mean ~ %radio-bad-path ~]~ +>.$] - =+ ya=(grab t.pax) - ?+ -.pax [~ +>.$] - %mensajes - [[ost %give %rust %zongs p.ya]~ +>.$] - %amigos - =. q.ya (~(put by q.ya) you %.y) - :_ +>.$(p.vat (~(put by p.vat) t.pax ya)) - :_ (send pax %give %rush %user %in you (ident you)) - :* ost %give %rust %users - %+ murn (~(tap by q.ya)) - |= [shi=ship liv=?] - ?. liv - ~ - (some [shi (ident shi)]) +++ ra :: transaction core + |_ [ost=bone moves=(list move)] + ++ ra-abet :: resolve core + ^- [(list move) _+>] + [(flop moves) +>] + :: + ++ ra-emil :: ra-emit move list + |= mol=(list move) + %_(+> moves (welp (flop mol) moves)) + :: + ++ ra-emit :: emit a move + |= mov=move + %_(+> moves [mov moves]) + :: + ++ ra-ever :: emit success + (ra-emit ost %give %nice ~) + :: + ++ ra-evil :: emit error + |= msg=cord + ~& [%ra-evil msg] + (ra-emit ost %give %mean ~ msg ~) + :: + ++ ra-hiss :: emit http request + |= [pax=path hiz=hiss] + (ra-emit ost %pass pax %e %them ~ hiz) + :: + ++ ra-house :: emit stations + |= ost=bone + %+ ra-emit ost + :^ %give %rust %radio-report + :- %house + %- ~(gas in *(set span)) + ^- (list span) + (turn (~(tap by parties) ~) |=([a=span *] a)) + :: + ++ ra-homes :: update stations + =+ gel=general + |- ^+ +> + ?~ gel +> + =. +> $(gel l.gel) + =. +> $(gel r.gel) + (ra-house n.gel) + :: + ++ ra-apply :: apply command + |= [her=ship cod=command] + ^+ +> + :: ~& [%ra-apply cod] + ?- -.cod + %design + ?. =(her our.hid) + (ra-evil %radio-no-owner) + ?~ q.cod + ?. (~(has by parties) p.cod) + (ra-evil %radio-no-party) + =. +>.$ (ra-config p.cod *config) + + ra-ever(parties (~(del by parties) p.cod)) + =. +>.$ (ra-config p.cod u.q.cod) + ra-ever + :: + %review ra-ever:(ra-think | her +.cod) + %publish ra-ever:(ra-think & her +.cod) + %ping (ra-notice her +.cod) == + :: + ++ ra-config :: configure party + |= [man=span con=config] + ^+ +> + =+ :- neu=(~(has by parties) man) + pur=(fall (~(get by parties) man) *party) + =. +>.$ pa-abet:(~(pa-reform pa man pur) con) + ?:(neu +>.$ ra-homes) + :: + ++ ra-friend :: %friend response + |= [man=span sih=sign] + ^+ +> + =+ pur=(~(get by parties) man) + ?~ 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] + ^+ +> + ?> ?=(%thou +<.sih) + ?. &(=(2 (div p.p.sih 100)) ?=(^ r.p.sih)) + ~& [%twit-lost met [p `(unit ,[@ @t])`r]:[p.sih .]] + +> + ?- -.met + %stat + =+ sta=(need %.(q.u.r.p.sih ;~(biff poja stat:twir))) + ~& [%tweet-ack p.met sta] + =. sent (~(put by sent) id:sta p.met) + +>.$ + %mine + =+ pur=(~(get by parties) p.met) :: XX all subscribed + ?~ pur ~& [%ra-twitter-none p.met] !! + =< pa-abet + %- ~(pa-lesson pa p.met u.pur) + %+ turn (need %.(q.u.r.p.sih ;~(biff poja line:ti))) + |= [id=tid:twit who=scr:twit now=@da txt=@t] + ^- telegram + :* our.hid + ((bond |.((shaf %twit id))) (~(get by sent) id)) + [[(sta me):ti %received] `~] + now + [%say txt] + == + == + :: + ++ ra-repeat :: %repeat response + |= [num=@ud her=ship man=span sih=sign] + =+ oot=(~(get by q.outbox) num) + ?~ oot ~& [%ra-repeat-none num] +>.$ + =. q.outbox (~(del by q.outbox) num) + =. q.u.oot + %+ ~(put by q.u.oot) + [%& her man] + ?+ sih !! + [%g %mean *] ~&([%radio-repeat-rejected num her man sih] %rejected) + [%g %nice ~] %received + == + ~& [%ra-repeat our.hid u.oot] + (ra-think | our.hid u.oot ~) + :: + ++ ra-cancel :: drop a bone + %_ . + general (~(del in general) ost) + parties + |- ^- (map span party) + ?~ parties ~ + :- :- p.n.parties + %= q.n.parties + guests (~(del by guests.q.n.parties) ost) + viewers (~(del in viewers.q.n.parties) ost) + owners (~(del in owners.q.n.parties) ost) + == + [$(parties l.parties) $(parties r.parties)] + == + :: + ++ ra-subscribe :: listen to + |= [her=ship pax=path] + ^+ +> + :: ~& [%ra-subscribe pax] + ?: ?=(~ pax) + (ra-house(general (~(put in general) ost)) ost) + ?: ?=([%am @ ~] pax) + =+ pur=(~(get by parties) i.t.pax) + ?~ pur + ~& [%bad-subscribe-party-a i.t.pax parties] + (ra-evil %radio-no-party) + pa-abet:(~(pa-watch pa i.t.pax u.pur) her) + ?: ?=([%xm @ ~] pax) + =+ pur=(~(get by parties) i.t.pax) + ?~ pur + ~& [%bad-subscribe-party-b i.t.pax] + (ra-evil %radio-no-party) + pa-abet:(~(pa-master pa i.t.pax u.pur) her) + ?. ?=([%fm *] pax) + ~& [%bad-subscribe-a pax] + (ra-evil %radio-bad-path) + ?. &(?=([@ *] t.pax) ((sane %tas) i.t.pax)) + ~& [%bad-subscribe-b pax] + (ra-evil %radio-bad-path) + =+ pur=(~(get by parties) i.t.pax) + ?~ pur + ~& [%bad-subscribe-party-c i.t.pax] + (ra-evil %radio-no-party) + pa-abet:(~(pa-listen pa i.t.pax u.pur) her t.t.pax) + :: + ++ ra-think :: publish/review + |= [pub=? her=ship tiz=(list thought)] + ^+ +> + ?~ tiz +> + $(tiz t.tiz, +> (ra-consume pub her i.tiz)) + :: + ++ ra-consume :: consume thought + |= [pub=? her=ship tip=thought] + =+ aud=`(list (pair station delivery))`(~(tap by q.tip) ~) + |- ^+ +>.^$ + ?~ aud +>.^$ + $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip)) + :: + ++ ra-notice :: declare presence + |= [her=ship vig=(map station presence)] + ^+ +> + =+ sul=(~(tap by vig) ~) + |- ^+ +>.^$ + ?~ sul ra-ever + =. +>.^$ $(sul t.sul) + ?- -.p.i.sul + %| +>.^$ + %& ?: =(`ship`p.p.p.i.sul our.hid) + (ra-appear her q.p.p.i.sul q.i.sul) + ?: =(her our.hid) + (ra-provoke p.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`[~ `(scot %p her)] :: XX do right + [who (~(put by folks) her who)] + =+ pur=(~(get by parties) man) + ?~ pur + ~& [%bad-appear man] + (ra-evil %radio-no-party) + pa-abet:(~(pa-notify pa man u.pur) her per who) + :: + ++ 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] + ^+ +> + ~& [%ra-conduct pub her tay] + ?- -.tay + %& ?: pub + =. her our.hid :: XX security! + ?: =(her p.p.tay) + ~& [%ra-conduct-record p.tay] + (ra-record q.p.tay p.p.tay tip) + (ra-transmit p.tay tip) + ?. =(our.hid p.p.tay) + +> + (ra-record q.p.tay her tip) + %| ?. pub +> + ?- -.p.tay + %twitter + ~& [%conduct-twitters p.p.tay] + ?> =(me:ti p.p.tay) + =+ ^= msg + ?+ -.q.r.tip !! + %say "{}: {(trip p.q.r.tip)}" + %own "{} {(trip p.q.r.tip)}" + == + ?: (gth (lent msg) 140) + (ra-evil %radio-tweet-long) + %+ ra-hiss + /twitter/stat/(scot %uv p.tip) + (post:ti (crip msg)) + == == + :: + ++ ra-record :: add to party + |= [man=span gam=telegram] + ^+ +> + =+ pur=(~(get by parties) man) + ?~ pur + ~& [%no-party man] + +>.$ + pa-abet:(~(pa-learn pa man u.pur) gam) + :: + ++ ra-transmit :: send to neighbor + |= [cuz=cousin tip=thought] + ^+ +> + =. +> + %+ ra-emit ost + :* %pass + /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz] + %g + %mess + [p.cuz /rodeo] + our.hid + [%radio-command !>(`command`[%review tip ~])] + == + +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip)) + :: + ++ pa :: party core + |_ $: man=span + party + == + ++ pa-abet + ^+ +> + +>(parties (~(put by parties) man `party`+<+)) + :: + ++ pa-admire :: accept from + |= her=ship + ^- ? + ::?- -.cordon.shape + :: %& (~(has in p.cordon.shape) her) + :: %| !(~(has in p.cordon.shape) her) + ::== + & + :: + ++ 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) +> + %. viewers + pa-display(locals (~(gas by *(map ship (pair ,@da status))) hay)) + :: + ++ pa-watch :: watch presence + |= her=ship + ?. (pa-admire her) + (pa-sauce ost [[%mean ~ %radio-watch-unauthorized ~] ~]) + =. viewers (~(put in viewers) ost) + (pa-display ost ~ ~) + :: + ++ pa-master :: hear config + |= her=ship + ?. (pa-admire her) + (pa-sauce ost [[%mean ~ %radio-master-unauthorized ~] ~]) + =. owners (~(put in owners) ost) + :: ~& [%pa-master her man shape] + (pa-sauce ost [[%rust %radio-report %config shape] ~]) + :: + ++ pa-display :: update presence + |= vew=(set bone) + =+ ^= reg + :_ remotes + |- ^- atlas + ?~ locals ~ + [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)] + :: ~& [%pa-display man reg] + |- ^+ +>.^$ + ?~ vew +>.^$ + =. +>.^$ $(vew l.vew) + =. +>.^$ $(vew r.vew) + (pa-sauce n.vew [[%rust %radio-report %group reg] ~]) + :: + ++ pa-monitor :: update config + =+ owe=owners + |- ^+ +> + ?~ owe +> + =. +> $(owe l.owe) + =. +> $(owe r.owe) + :: ~& [%pa-monitor man shape] + (pa-sauce n.owe [[%rust %radio-report %config shape] ~]) + :: + ++ pa-friend :: subscribed update + |= 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] !!) + %grams + (pa-lesson q.+.+>+.sih) + == + == + :: + ++ pa-stalk :: subscribed present + |= [tay=station sih=sign] + ^+ +> + ?+ sih ~&([%radio-bad-friend sih] !!) + [%g %nice ~] + :: ~& %pa-stalk-nice + +>.$ + :: + [%g %rust %radio-report *] + ?+ -.+>+.sih ~&([%radio-odd-friend sih] !!) + %group + (pa-remind tay +.+>+.sih) + == + == + :: + ++ pa-scrub :: pass forward + |= [ost=bone bub=(list (pair path note))] + %_ +>.$ + moves + (welp (flop (turn bub |=(a=(pair path note) [ost %pass a]))) moves) + == + :: + ++ pa-sauce :: send backward + |= [ost=bone gub=(list gift)] + %_ +>.$ + moves + (welp (flop (turn gub |=(a=gift [ost %give a]))) moves) + == + :: + ++ pa-abjure :: unsubscribe move + |= tal=(list station) + %+ pa-scrub 0 + %- zing + %+ turn tal + |= tay=station + ?- -.tay + %| ~& tweet-abjure/p.p.tay + :_ ~ + :- /twitter/mine/[p.p.tay]/[man] + ?> =(me:ti p.p.tay) + [%e %them ~] + :: + %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] + :~ :- /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 + |= tal=(list station) + %+ pa-scrub 0 + %- zing + %+ turn tal + |= tay=station + ^- (list (pair path note)) + =+ num=(fall (~(get by sequence) tay) 0) + ?- -.tay + %| ~& tweet-acquire/p.p.tay + :_ ~ + :- /twitter/mine/[p.p.tay]/[man] + ?> =(me:ti p.p.tay) + [%e %them ~ mine:ti] + :: + %& :: ~& [%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)] + :- /stalk/show/[man]/(scot %p p.p.tay)/[q.p.tay] + [%g %show [p.p.tay /rodeo] our.hid /am/[q.p.tay]] + == + == + :: + ++ pa-reform :: reconfigure, ugly + |= cof=config + =+ ^= dif ^- (pair (list station) (list station)) + =+ old=`(list station)`(~(tap in sources.shape) ~) + =+ new=`(list station)`(~(tap in sources.cof) ~) + :- (skip new |=(a=station (~(has in sources.shape) a))) + (skip old |=(a=station (~(has in sources.cof) a))) + =. +>.$ (pa-acquire p.dif) + =. +>.$ (pa-abjure q.dif) + =. shape cof + pa-monitor + :: + ++ pa-cancel :: unsubscribe from + ^+ . + :: ~& [%pa-cancel ost] + =. guests (~(del in guests) ost) + (pa-sauce ost [[%mean ~] ~]) + :: + ++ pa-notify :: local presence + |= [her=ship saz=status] + ^+ +> + =+ guz=(~(get by locals) her) + =. locals (~(put by locals) her lat.hid saz) + ?. |(?=(~ guz) !=(saz q.u.guz)) + +>.$ + (pa-display viewers) + :: + ++ 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 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=(~(get by remotes) tay) + :: ~& [%pa-remind tay gub buk] + ?. |(?=(~ gub) !=(buk u.gub)) + +>.$ + =. remotes (~(put by remotes) tay buk) + (pa-display viewers) + :: + ++ pa-start :: start stream + |= riv=river + ^+ +> + =- =. +>.$ (pa-sauce ost [[%rust %radio-report %grams q.lab r.lab] ~]) + ?: p.lab + (pa-sauce ost [[%mean ~] ~]) + +>.$(guests (~(put by guests) ost riv)) + ^= lab + =+ [end=count gaz=grams dun=| zeg=*(list telegram)] + |- ^- (trel ,? ,@ud (list telegram)) + ?~ gaz [dun end (flop zeg)] + ?: ?- -.q.riv :: after the end + %ud (lte p.q.riv end) + %da (lte p.q.riv p.r.q.i.gaz) + == + $(end (dec end), gaz t.gaz) + ?: ?- -.p.riv :: before the start + %ud (lth end p.p.riv) + %da (lth p.r.q.i.gaz p.p.riv) + == + [dun end (flop zeg)] + $(end (dec end), gaz t.gaz, zeg [i.gaz zeg]) + :: + ++ pa-listen :: subscribe + |= [her=ship pax=path] + ^+ +> + ?. (pa-admire her) + (pa-sauce ost [[%mean ~ %radio-listen-unauthorized ~] ~]) + =+ ^= ruv ^- (unit river) + ?: ?=(~ pax) + `[[%ud count] [%da (dec (bex 128))]] + ?: ?=([@ ~] pax) + =+ say=(slay i.pax) + ?. ?=([~ %$ ?(%ud %da) @] say) ~ + `[(point +>.say) [%da (dec (bex 128))]] + ?. ?=([@ @ ~] pax) ~ + =+ [say=(slay i.pax) den=(slay i.t.pax)] + ?. ?=([~ %$ ?(%ud %da) @] say) ~ + ?. ?=([~ %$ ?(%ud %da) @] den) ~ + `[(point +>.say) (point +>.den)] + ?~ ruv + (pa-sauce ost [[%mean ~ %radio-malformed ~] ~]) + (pa-start u.ruv) + :: + ++ pa-refresh :: update stream + |= [num=@ud gam=telegram] + :: ~& [%pa-refresh num gam] + =+ ^= moy + |- ^- (pair (list bone) (list move)) + ?~ guests [~ ~] + =+ 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 + %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 + %ud (gth p.p.q.n.guests num) + %da (gth p.p.q.n.guests p.r.q.gam) + == + old + :- p.old + [[p.n.guests %give %rust %radio-report %grams num gam ~] q.old] + =. moves (welp q.moy moves) + |- ^+ +>.^$ + ?~ p.moy +>.^$ + $(p.moy t.p.moy, guests (~(del by guests) i.p.moy)) + :: + ++ pa-lesson :: learn multiple + |= gaz=(list telegram) + ^+ +> + ?~ gaz +> + $(gaz t.gaz, +> (pa-learn i.gaz)) + :: + ++ pa-learn :: learn message + |= gam=telegram + ^+ +> + ?. (pa-admire p.gam) + ~& %pa-admire-rejected + +>.$ + =. q.q.gam (~(put by q.q.gam) [%& our.hid man] %received) + =+ old=(~(get by known) p.q.gam) + ?~ old + (pa-append gam) + (pa-revise u.old gam) + :: + ++ pa-append :: append new + |= gam=telegram + ^+ +> + %+ %= pa-refresh + grams [gam grams] + count +(count) + known (~(put by known) p.q.gam count) + == + count + gam + :: + ++ pa-revise :: revise existing + |= [num=@ud gam=telegram] + =+ way=(sub count num) + =. grams (welp (scag (dec way) grams) [gam (slag way grams)]) + (pa-refresh num gam) + -- + -- +++ peer + |= [ost=bone her=ship pax=path] + ^- [(list move) _+>] + :: ~& [%rodeo-peer ost her pax] + ra-abet:(~(ra-subscribe ra ost ~) her pax) +:: +++ poke-radio-command + |= [ost=bone her=ship cod=command] + ^- [(list move) _+>] + :: ~& [%rodeo-poke-command her cod] + ra-abet:(~(ra-apply ra ost ~) her cod) +:: +++ pour + |= [ost=bone pax=path sih=*] + ^- [(list move) _+>] + :: ~& [%rodeo-pour ost pax sih] + :: ~& 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 + ?+ t.pax ~& [%rodeo-twitter-strange-path pax] !! + [%mine @ @ ~] + [i.t.pax i.t.t.t.pax] + [%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 [%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]] + ra-abet:(~(ra-stalk ra ost ~) man tay sih) + :: + [%repeat *] + ?> ?=([@ @ @ ~] t.pax) + =+ [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax] + ra-abet:(~(ra-repeat ra ost ~) num her man sih) == :: -++ mamed +++ pull + |= ost=bone + ^- [(list move) _+>] + :: ~& [%rodeo-pull ost] + ra-abet:~(ra-cancel ra ost ~) +:: +++ prep + |= old=(unit (unit house-any)) + ^- [(list move) _+>] + :- [0 %pass /time %t %wait (add ~s10 lat.hid)]~ + ?> ?=(^ old) + ?~ u.old + ~& %rodeo-prep-new + +:ra-abet:(~(ra-apply ra 0 ~) our.hid %design %main `[~ [%| ~]]) + ~& %rodeo-prep-old + |- + ?- -.u.u.old + %1 %_(+>.^$ +<+ u.u.old) + %0 $(u.u.old [%1 (house-0-to-house-1 +.u.u.old)]) + == +:: +++ house-0-to-house-1 + |= vat=house-0 + ^- house-1 + =- :* parties=- + general=~ + outbox=[0 ~] + sent=~ + folks=~ + == + ^- (map span party) + =- %- ~(run by -) + |= grams=(list telegram) + ^- party + :* count=(lent grams) + grams=grams + locals=~ + remotes=~ + sequence=~ + shape=[.(cordon [%| ~])]:*config + ^= known %- mo ^- (list ,[serial @]) =< + + (roll grams |=([telegram a=@ b=(list ,[serial @])] [+(a) [a p.q] b])) + guests=~ + viewers=~ + owners=~ + == ^- (map span (list telegram)) - %- mo %+ turn (~(tap by p.vat)) + %- mo %+ turn (~(tap by vat)) |= [a=path b=(list zong) c=(map ship ,?)] - =+ =+ (turn a |=(d=span leaf/(trip d))) - par=(crip ~(ram re %rose ["_" ~ ~] -)) + =+ ^= par + ?: =(/ a) 'hub' + =+ (turn a |=(d=span leaf/(trip d))) + (crip ~(ram re %rose ["_" ~ ~] -)) :- par =+ aud=`audience`[[[%& our.hid par] %received] `~] =+ ^= spe @@ -68,48 +827,7 @@ %do [%own p.r] %exp [%exp p.r [~ q.r]] == - %+ turn b + %+ turn b |= d=zong ^- telegram [q.d (sham eny.hid d) aud p.d (spe r.d)] -:: -++ poke-zing - |= [ost=bone you=ship zig=zing] - ^- [(list move) _+>] - =+ ya=(grab p.zig) - ?. (~(has by q.ya) you) - [[ost %give %mean ~ %no-te-conozco ~]~ +>.$] - =+ zog=`zong`[%mess lat.hid you q.zig] - =. p.vat (~(put by p.vat) p.zig [[zog p.ya] q.ya]) - :_ +>.$ - :- [ost %give %nice ~] - (send mensajes/p.zig %give %rush %zong zog) -:: -++ poke-bit - |= [ost=bone you=ship ~] - ^- [(list move) _+>] - :_ +>.$ - ~& mamed - %+ turn (~(tap by sup.hid)) - |= [ost=bone her=ship pax=path] - [ost %give %mean ~ %reload leaf/"please quit chat and re-enter" ~] -:: -++ pull - |= ost=bone - ^- [(list move) _+>] - =+ ^- (unit ,[his=ship pax=path]) - (~(get by sup.hid) ost) - ?~ - ~& %strange-pull [~ +>.$] - ?. ?=([%mensajes *] pax.u) - [~ +>.$] - =+ sta=(~(got by p.vat) t.pax.u) - =. q.sta %+ ~(put by q.sta) his.u %.n - =. p.vat %+ ~(put by p.vat) t.pax.u sta - [(send amigos/t.pax.u %give %rush %user %out his.u (ident his.u)) +>.$] -:: -++ send - |= [pax=path msg=(mold note gift)] - ^- (list move) - :: ~& [%radi-sub pus.hid] - %+ turn (~(tap in (~(get ju pus.hid) pax))) - |=(ost=bone [ost msg]) -- diff --git a/main/app/rodeo/core.hook b/main/app/rodeo/core.hook deleted file mode 100644 index 0a5241c551..0000000000 --- a/main/app/rodeo/core.hook +++ /dev/null @@ -1,833 +0,0 @@ -:: -:::: /hook/core/rodeo/app - :: -/? 314 -/- *radio -/+ twitter -:: -:::: - :: -!: -=> |% :: data structures - ++ house ,[%1 house-1] :: full state - ++ house-any :: app history - $% [%1 house-1] :: 1: rodeo - [%0 house-0] :: 0: initial version - == :: - ++ house-1 :: - $: parties=(map span party) :: conversations - 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 - == :: - ++ house-0 :: legacy state - %+ map path :: - ,[p=(list zong) q=(map ship ,?)] :: - ++ zong :: legacy messages - $% $: %mess p=@da q=ship :: - $= r :: - $% [%do p=@t] :: - [%exp p=@t q=tank] :: - [%say p=@t] :: - == == == :: - ++ party :: a conversation - $: count=@ud :: (lent grams) - grams=(list telegram) :: all history - 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 - guests=(map bone river) :: message followers - viewers=(set bone) :: presence followers - owners=(set bone) :: config followers - == :: - ++ river (pair point point) :: stream definition - ++ point :: stream endpoint - $% [%ud p=@ud] :: by number - [%da p=@da] :: by date - == :: - ++ gift :: result - $% [%rust %radio-report report] :: refresh - [%mean ares] :: cancel - [%nice ~] :: accept - == :: - ++ sign :: response - $% $: %e :: from %eyre - $% [%thou p=httr] :: HTTP response - == == :: - $: %g :: application - $% [%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 - $% $: %e :: through %eyre - $% [%them p=(unit hiss)] :: HTTP request - == == :: - $: %g :: network - $% [%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]) - -- -|_ [hid=hide house] -++ ti - =+ ^= key :: XX use %jael - :* :- 'AP3G1t8ki6rPzeeAqdWCTw03F' - 'VV784LPwZSaAxtF16RWWTnST4F85BHN8VqQKNyv7MprCkA0xZD' - :- '2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl' - 'jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8' - == - => ~(. twit key lat.hid `@`eny.hid) - =+ me=%hoontap :: XX use %khan - |% - ++ sta |=(who=span [%| %twitter who]) - ++ post |=(a=cord `hiss`(stat-upda [%status a]~ ~)) - ++ mine `hiss`(stat-home) - :: - ++ line (ar:jo stat:twir) :: reparse timeline - -- -:: -++ ra :: transaction core - |_ [ost=bone moves=(list move)] - ++ ra-abet :: resolve core - ^- [(list move) _+>] - [(flop moves) +>] - :: - ++ ra-emil :: ra-emit move list - |= mol=(list move) - %_(+> moves (welp (flop mol) moves)) - :: - ++ ra-emit :: emit a move - |= mov=move - %_(+> moves [mov moves]) - :: - ++ ra-ever :: emit success - (ra-emit ost %give %nice ~) - :: - ++ ra-evil :: emit error - |= msg=cord - ~& [%ra-evil msg] - (ra-emit ost %give %mean ~ msg ~) - :: - ++ ra-hiss :: emit http request - |= [pax=path hiz=hiss] - (ra-emit ost %pass pax %e %them ~ hiz) - :: - ++ ra-house :: emit stations - |= ost=bone - %+ ra-emit ost - :^ %give %rust %radio-report - :- %house - %- ~(gas in *(set span)) - ^- (list span) - (turn (~(tap by parties) ~) |=([a=span *] a)) - :: - ++ ra-homes :: update stations - =+ gel=general - |- ^+ +> - ?~ gel +> - =. +> $(gel l.gel) - =. +> $(gel r.gel) - (ra-house n.gel) - :: - ++ ra-apply :: apply command - |= [her=ship cod=command] - ^+ +> - :: ~& [%ra-apply cod] - ?- -.cod - %design - ?. =(her our.hid) - (ra-evil %radio-no-owner) - ?~ q.cod - ?. (~(has by parties) p.cod) - (ra-evil %radio-no-party) - =. +>.$ (ra-config p.cod *config) - - ra-ever(parties (~(del by parties) p.cod)) - =. +>.$ (ra-config p.cod u.q.cod) - ra-ever - :: - %review ra-ever:(ra-think | her +.cod) - %publish ra-ever:(ra-think & her +.cod) - %ping (ra-notice her +.cod) - == - :: - ++ ra-config :: configure party - |= [man=span con=config] - ^+ +> - =+ :- neu=(~(has by parties) man) - pur=(fall (~(get by parties) man) *party) - =. +>.$ pa-abet:(~(pa-reform pa man pur) con) - ?:(neu +>.$ ra-homes) - :: - ++ ra-friend :: %friend response - |= [man=span sih=sign] - ^+ +> - =+ pur=(~(get by parties) man) - ?~ 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] - ^+ +> - ?> ?=(%thou +<.sih) - ?. &(=(2 (div p.p.sih 100)) ?=(^ r.p.sih)) - ~& [%twit-lost met [p `(unit ,[@ @t])`r]:[p.sih .]] - +> - ?- -.met - %stat - =+ sta=(need %.(q.u.r.p.sih ;~(biff poja stat:twir))) - ~& [%tweet-ack p.met sta] - =. sent (~(put by sent) id:sta p.met) - +>.$ - %mine - =+ pur=(~(get by parties) p.met) :: XX all subscribed - ?~ pur ~& [%ra-twitter-none p.met] !! - =< pa-abet - %- ~(pa-lesson pa p.met u.pur) - %+ turn (need %.(q.u.r.p.sih ;~(biff poja line:ti))) - |= [id=tid:twit who=scr:twit now=@da txt=@t] - ^- telegram - :* our.hid - ((bond |.((shaf %twit id))) (~(get by sent) id)) - [[(sta me):ti %received] `~] - now - [%say txt] - == - == - :: - ++ ra-repeat :: %repeat response - |= [num=@ud her=ship man=span sih=sign] - =+ oot=(~(get by q.outbox) num) - ?~ oot ~& [%ra-repeat-none num] +>.$ - =. q.outbox (~(del by q.outbox) num) - =. q.u.oot - %+ ~(put by q.u.oot) - [%& her man] - ?+ sih !! - [%g %mean *] ~&([%radio-repeat-rejected num her man sih] %rejected) - [%g %nice ~] %received - == - ~& [%ra-repeat our.hid u.oot] - (ra-think | our.hid u.oot ~) - :: - ++ ra-cancel :: drop a bone - %_ . - general (~(del in general) ost) - parties - |- ^- (map span party) - ?~ parties ~ - :- :- p.n.parties - %= q.n.parties - guests (~(del by guests.q.n.parties) ost) - viewers (~(del in viewers.q.n.parties) ost) - owners (~(del in owners.q.n.parties) ost) - == - [$(parties l.parties) $(parties r.parties)] - == - :: - ++ ra-subscribe :: listen to - |= [her=ship pax=path] - ^+ +> - :: ~& [%ra-subscribe pax] - ?: ?=(~ pax) - (ra-house(general (~(put in general) ost)) ost) - ?: ?=([%am @ ~] pax) - =+ pur=(~(get by parties) i.t.pax) - ?~ pur - ~& [%bad-subscribe-party-a i.t.pax parties] - (ra-evil %radio-no-party) - pa-abet:(~(pa-watch pa i.t.pax u.pur) her) - ?: ?=([%xm @ ~] pax) - =+ pur=(~(get by parties) i.t.pax) - ?~ pur - ~& [%bad-subscribe-party-b i.t.pax] - (ra-evil %radio-no-party) - pa-abet:(~(pa-master pa i.t.pax u.pur) her) - ?. ?=([%fm *] pax) - ~& [%bad-subscribe-a pax] - (ra-evil %radio-bad-path) - ?. &(?=([@ *] t.pax) ((sane %tas) i.t.pax)) - ~& [%bad-subscribe-b pax] - (ra-evil %radio-bad-path) - =+ pur=(~(get by parties) i.t.pax) - ?~ pur - ~& [%bad-subscribe-party-c i.t.pax] - (ra-evil %radio-no-party) - pa-abet:(~(pa-listen pa i.t.pax u.pur) her t.t.pax) - :: - ++ ra-think :: publish/review - |= [pub=? her=ship tiz=(list thought)] - ^+ +> - ?~ tiz +> - $(tiz t.tiz, +> (ra-consume pub her i.tiz)) - :: - ++ ra-consume :: consume thought - |= [pub=? her=ship tip=thought] - =+ aud=`(list (pair station delivery))`(~(tap by q.tip) ~) - |- ^+ +>.^$ - ?~ aud +>.^$ - $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip)) - :: - ++ ra-notice :: declare presence - |= [her=ship vig=(map station presence)] - ^+ +> - =+ sul=(~(tap by vig) ~) - |- ^+ +>.^$ - ?~ sul ra-ever - =. +>.^$ $(sul t.sul) - ?- -.p.i.sul - %| +>.^$ - %& ?: =(`ship`p.p.p.i.sul our.hid) - (ra-appear her q.p.p.i.sul q.i.sul) - ?: =(her our.hid) - (ra-provoke p.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`[~ `(scot %p her)] :: XX do right - [who (~(put by folks) her who)] - =+ pur=(~(get by parties) man) - ?~ pur - ~& [%bad-appear man] - (ra-evil %radio-no-party) - pa-abet:(~(pa-notify pa man u.pur) her per who) - :: - ++ 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] - ^+ +> - ~& [%ra-conduct pub her tay] - ?- -.tay - %& ?: pub - =. her our.hid :: XX security! - ?: =(her p.p.tay) - ~& [%ra-conduct-record p.tay] - (ra-record q.p.tay p.p.tay tip) - (ra-transmit p.tay tip) - ?. =(our.hid p.p.tay) - +> - (ra-record q.p.tay her tip) - %| ?. pub +> - ?- -.p.tay - %twitter - ~& [%conduct-twitters p.p.tay] - ?> =(me:ti p.p.tay) - =+ ^= msg - ?+ -.q.r.tip !! - %say "{}: {(trip p.q.r.tip)}" - %own "{} {(trip p.q.r.tip)}" - == - ?: (gth (lent msg) 140) - (ra-evil %radio-tweet-long) - %+ ra-hiss - /twitter/stat/(scot %uv p.tip) - (post:ti (crip msg)) - == == - :: - ++ ra-record :: add to party - |= [man=span gam=telegram] - ^+ +> - =+ pur=(~(get by parties) man) - ?~ pur - ~& [%no-party man] - +>.$ - pa-abet:(~(pa-learn pa man u.pur) gam) - :: - ++ ra-transmit :: send to neighbor - |= [cuz=cousin tip=thought] - ^+ +> - =. +> - %+ ra-emit ost - :* %pass - /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz] - %g - %mess - [p.cuz /rodeo] - our.hid - [%radio-command !>(`command`[%review tip ~])] - == - +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip)) - :: - ++ pa :: party core - |_ $: man=span - party - == - ++ pa-abet - ^+ +> - +>(parties (~(put by parties) man `party`+<+)) - :: - ++ pa-admire :: accept from - |= her=ship - ^- ? - ::?- -.cordon.shape - :: %& (~(has in p.cordon.shape) her) - :: %| !(~(has in p.cordon.shape) her) - ::== - & - :: - ++ 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) +> - %. viewers - pa-display(locals (~(gas by *(map ship (pair ,@da status))) hay)) - :: - ++ pa-watch :: watch presence - |= her=ship - ?. (pa-admire her) - (pa-sauce ost [[%mean ~ %radio-watch-unauthorized ~] ~]) - =. viewers (~(put in viewers) ost) - (pa-display ost ~ ~) - :: - ++ pa-master :: hear config - |= her=ship - ?. (pa-admire her) - (pa-sauce ost [[%mean ~ %radio-master-unauthorized ~] ~]) - =. owners (~(put in owners) ost) - :: ~& [%pa-master her man shape] - (pa-sauce ost [[%rust %radio-report %config shape] ~]) - :: - ++ pa-display :: update presence - |= vew=(set bone) - =+ ^= reg - :_ remotes - |- ^- atlas - ?~ locals ~ - [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)] - :: ~& [%pa-display man reg] - |- ^+ +>.^$ - ?~ vew +>.^$ - =. +>.^$ $(vew l.vew) - =. +>.^$ $(vew r.vew) - (pa-sauce n.vew [[%rust %radio-report %group reg] ~]) - :: - ++ pa-monitor :: update config - =+ owe=owners - |- ^+ +> - ?~ owe +> - =. +> $(owe l.owe) - =. +> $(owe r.owe) - :: ~& [%pa-monitor man shape] - (pa-sauce n.owe [[%rust %radio-report %config shape] ~]) - :: - ++ pa-friend :: subscribed update - |= 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] !!) - %grams - (pa-lesson q.+.+>+.sih) - == - == - :: - ++ pa-stalk :: subscribed present - |= [tay=station sih=sign] - ^+ +> - ?+ sih ~&([%radio-bad-friend sih] !!) - [%g %nice ~] - :: ~& %pa-stalk-nice - +>.$ - :: - [%g %rust %radio-report *] - ?+ -.+>+.sih ~&([%radio-odd-friend sih] !!) - %group - (pa-remind tay +.+>+.sih) - == - == - :: - ++ pa-scrub :: pass forward - |= [ost=bone bub=(list (pair path note))] - %_ +>.$ - moves - (welp (flop (turn bub |=(a=(pair path note) [ost %pass a]))) moves) - == - :: - ++ pa-sauce :: send backward - |= [ost=bone gub=(list gift)] - %_ +>.$ - moves - (welp (flop (turn gub |=(a=gift [ost %give a]))) moves) - == - :: - ++ pa-abjure :: unsubscribe move - |= tal=(list station) - %+ pa-scrub 0 - %- zing - %+ turn tal - |= tay=station - ?- -.tay - %| ~& tweet-abjure/p.p.tay - :_ ~ - :- /twitter/mine/[p.p.tay]/[man] - ?> =(me:ti p.p.tay) - [%e %them ~] - :: - %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] - :~ :- /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 - |= tal=(list station) - %+ pa-scrub 0 - %- zing - %+ turn tal - |= tay=station - ^- (list (pair path note)) - =+ num=(fall (~(get by sequence) tay) 0) - ?- -.tay - %| ~& tweet-acquire/p.p.tay - :_ ~ - :- /twitter/mine/[p.p.tay]/[man] - ?> =(me:ti p.p.tay) - [%e %them ~ mine:ti] - :: - %& :: ~& [%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)] - :- /stalk/show/[man]/(scot %p p.p.tay)/[q.p.tay] - [%g %show [p.p.tay /rodeo] our.hid /am/[q.p.tay]] - == - == - :: - ++ pa-reform :: reconfigure, ugly - |= cof=config - =+ ^= dif ^- (pair (list station) (list station)) - =+ old=`(list station)`(~(tap in sources.shape) ~) - =+ new=`(list station)`(~(tap in sources.cof) ~) - :- (skip new |=(a=station (~(has in sources.shape) a))) - (skip old |=(a=station (~(has in sources.cof) a))) - =. +>.$ (pa-acquire p.dif) - =. +>.$ (pa-abjure q.dif) - =. shape cof - pa-monitor - :: - ++ pa-cancel :: unsubscribe from - ^+ . - :: ~& [%pa-cancel ost] - =. guests (~(del in guests) ost) - (pa-sauce ost [[%mean ~] ~]) - :: - ++ pa-notify :: local presence - |= [her=ship saz=status] - ^+ +> - =+ guz=(~(get by locals) her) - =. locals (~(put by locals) her lat.hid saz) - ?. |(?=(~ guz) !=(saz q.u.guz)) - +>.$ - (pa-display viewers) - :: - ++ 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 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=(~(get by remotes) tay) - :: ~& [%pa-remind tay gub buk] - ?. |(?=(~ gub) !=(buk u.gub)) - +>.$ - =. remotes (~(put by remotes) tay buk) - (pa-display viewers) - :: - ++ pa-start :: start stream - |= riv=river - ^+ +> - =- =. +>.$ (pa-sauce ost [[%rust %radio-report %grams q.lab r.lab] ~]) - ?: p.lab - (pa-sauce ost [[%mean ~] ~]) - +>.$(guests (~(put by guests) ost riv)) - ^= lab - =+ [end=count gaz=grams dun=| zeg=*(list telegram)] - |- ^- (trel ,? ,@ud (list telegram)) - ?~ gaz [dun end (flop zeg)] - ?: ?- -.q.riv :: after the end - %ud (lte p.q.riv end) - %da (lte p.q.riv p.r.q.i.gaz) - == - $(end (dec end), gaz t.gaz) - ?: ?- -.p.riv :: before the start - %ud (lth end p.p.riv) - %da (lth p.r.q.i.gaz p.p.riv) - == - [dun end (flop zeg)] - $(end (dec end), gaz t.gaz, zeg [i.gaz zeg]) - :: - ++ pa-listen :: subscribe - |= [her=ship pax=path] - ^+ +> - ?. (pa-admire her) - (pa-sauce ost [[%mean ~ %radio-listen-unauthorized ~] ~]) - =+ ^= ruv ^- (unit river) - ?: ?=(~ pax) - `[[%ud count] [%da (dec (bex 128))]] - ?: ?=([@ ~] pax) - =+ say=(slay i.pax) - ?. ?=([~ %$ ?(%ud %da) @] say) ~ - `[(point +>.say) [%da (dec (bex 128))]] - ?. ?=([@ @ ~] pax) ~ - =+ [say=(slay i.pax) den=(slay i.t.pax)] - ?. ?=([~ %$ ?(%ud %da) @] say) ~ - ?. ?=([~ %$ ?(%ud %da) @] den) ~ - `[(point +>.say) (point +>.den)] - ?~ ruv - (pa-sauce ost [[%mean ~ %radio-malformed ~] ~]) - (pa-start u.ruv) - :: - ++ pa-refresh :: update stream - |= [num=@ud gam=telegram] - :: ~& [%pa-refresh num gam] - =+ ^= moy - |- ^- (pair (list bone) (list move)) - ?~ guests [~ ~] - =+ 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 - %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 - %ud (gth p.p.q.n.guests num) - %da (gth p.p.q.n.guests p.r.q.gam) - == - old - :- p.old - [[p.n.guests %give %rust %radio-report %grams num gam ~] q.old] - =. moves (welp q.moy moves) - |- ^+ +>.^$ - ?~ p.moy +>.^$ - $(p.moy t.p.moy, guests (~(del by guests) i.p.moy)) - :: - ++ pa-lesson :: learn multiple - |= gaz=(list telegram) - ^+ +> - ?~ gaz +> - $(gaz t.gaz, +> (pa-learn i.gaz)) - :: - ++ pa-learn :: learn message - |= gam=telegram - ^+ +> - ?. (pa-admire p.gam) - ~& %pa-admire-rejected - +>.$ - =. q.q.gam (~(put by q.q.gam) [%& our.hid man] %received) - =+ old=(~(get by known) p.q.gam) - ?~ old - (pa-append gam) - (pa-revise u.old gam) - :: - ++ pa-append :: append new - |= gam=telegram - ^+ +> - %+ %= pa-refresh - grams [gam grams] - count +(count) - known (~(put by known) p.q.gam count) - == - count - gam - :: - ++ pa-revise :: revise existing - |= [num=@ud gam=telegram] - =+ way=(sub count num) - =. grams (welp (scag (dec way) grams) [gam (slag way grams)]) - (pa-refresh num gam) - -- - -- -++ peer - |= [ost=bone her=ship pax=path] - ^- [(list move) _+>] - :: ~& [%rodeo-peer ost her pax] - ra-abet:(~(ra-subscribe ra ost ~) her pax) -:: -++ poke-radio-command - |= [ost=bone her=ship cod=command] - ^- [(list move) _+>] - :: ~& [%rodeo-poke-command her cod] - ra-abet:(~(ra-apply ra ost ~) her cod) -:: -++ pour - |= [ost=bone pax=path sih=*] - ^- [(list move) _+>] - :: ~& [%rodeo-pour ost pax sih] - :: ~& 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 - ?+ t.pax ~& [%rodeo-twitter-strange-path pax] !! - [%mine @ @ ~] - [i.t.pax i.t.t.t.pax] - [%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 [%& (slav %p i.t.t.t.pax) i.t.t.t.t.pax]] - ra-abet:(~(ra-stalk ra ost ~) man tay sih) - :: - [%repeat *] - ?> ?=([@ @ @ ~] t.pax) - =+ [num her man]=[(slav %ud i.t.pax) (slav %p i.t.t.pax) i.t.t.t.pax] - ra-abet:(~(ra-repeat ra ost ~) num her man sih) - == -:: -++ pull - |= ost=bone - ^- [(list move) _+>] - :: ~& [%rodeo-pull ost] - ra-abet:~(ra-cancel ra ost ~) -:: -++ prep - |= old=(unit (unit house-any)) - ^- [(list move) _+>] - :- [0 %pass /time %t %wait (add ~s10 lat.hid)]~ - ?> ?=(^ old) - ?~ u.old - ~& %rodeo-prep-new - +:ra-abet:(~(ra-apply ra 0 ~) our.hid %design %main `[~ [%| ~]]) - ~& %rodeo-prep-old - |- - ?- -.u.u.old - %1 %_(+>.^$ +<+ u.u.old) - %0 $(u.u.old [%1 (house-0-to-house-1 +.u.u.old)]) - == -:: -++ house-0-to-house-1 - |= vat=house-0 - ^- house-1 - =- :* parties=- - general=~ - outbox=[0 ~] - sent=~ - folks=~ - == - ^- (map span party) - =- %- ~(run by -) - |= grams=(list telegram) - ^- party - :* count=(lent grams) - grams=grams - locals=~ - remotes=~ - sequence=~ - shape=[.(cordon [%| ~])]:*config - ^= known %- mo ^- (list ,[serial @]) =< + - (roll grams |=([telegram a=@ b=(list ,[serial @])] [+(a) [a p.q] b])) - guests=~ - viewers=~ - owners=~ - == - ^- (map span (list telegram)) - %- mo %+ turn (~(tap by vat)) - |= [a=path b=(list zong) c=(map ship ,?)] - =+ ^= par - ?: =(/ a) 'hub' - =+ (turn a |=(d=span leaf/(trip d))) - (crip ~(ram re %rose ["_" ~ ~] -)) - :- par - =+ aud=`audience`[[[%& our.hid par] %received] `~] - =+ ^= spe - |= r=_r:*zong ^- speech - ?- -.r - %say [%say p.r] - %do [%own p.r] - %exp [%exp p.r [~ q.r]] - == - %+ turn b - |= d=zong ^- telegram - [q.d (sham eny.hid d) aud p.d (spe r.d)] --- From 71890f0020bf344285cf66293a4aaa76b53546e4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 17 Dec 2014 18:46:05 -0800 Subject: [PATCH 5/7] Rodeo is radio. --- main/app/radio/core.hook | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/main/app/radio/core.hook b/main/app/radio/core.hook index 0a5241c551..b6c4bcf618 100644 --- a/main/app/radio/core.hook +++ b/main/app/radio/core.hook @@ -1,5 +1,5 @@ :: -:::: /hook/core/rodeo/app +:::: /hook/core/radio/app :: /? 314 /- *radio @@ -11,7 +11,7 @@ => |% :: data structures ++ house ,[%1 house-1] :: full state ++ house-any :: app history - $% [%1 house-1] :: 1: rodeo + $% [%1 house-1] :: 1: radio [%0 house-0] :: 0: initial version == :: ++ house-1 :: @@ -24,6 +24,7 @@ ++ house-0 :: legacy state %+ map path :: ,[p=(list zong) q=(map ship ,?)] :: + :: ++ zong :: legacy messages $% $: %mess p=@da q=ship :: $= r :: @@ -334,7 +335,7 @@ /provoke %g %mess - [him /rodeo] + [him /radio] our.hid [%radio-command !>(`command`[%ping [[tay per] ~ ~]])] == @@ -388,7 +389,7 @@ /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz] %g %mess - [p.cuz /rodeo] + [p.cuz /radio] our.hid [%radio-command !>(`command`[%review tip ~])] == @@ -520,9 +521,9 @@ :: %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] :~ :- /friend/nuke/[man] - [%g %nuke [p.p.tay /rodeo] our.hid] + [%g %nuke [p.p.tay /radio] our.hid] :- /stalk/nuke/[man] - [%g %nuke [p.p.tay /rodeo] our.hid] + [%g %nuke [p.p.tay /radio] our.hid] == == :: @@ -543,9 +544,9 @@ :: %& :: ~& [%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)] + [%g %show [p.p.tay /radio] our.hid /fm/[q.p.tay]/(scot %ud num)] :- /stalk/show/[man]/(scot %p p.p.tay)/[q.p.tay] - [%g %show [p.p.tay /rodeo] our.hid /am/[q.p.tay]] + [%g %show [p.p.tay /radio] our.hid /am/[q.p.tay]] == == :: @@ -711,22 +712,22 @@ ++ peer |= [ost=bone her=ship pax=path] ^- [(list move) _+>] - :: ~& [%rodeo-peer ost her pax] + :: ~& [%radio-peer ost her pax] ra-abet:(~(ra-subscribe ra ost ~) her pax) :: ++ poke-radio-command |= [ost=bone her=ship cod=command] ^- [(list move) _+>] - :: ~& [%rodeo-poke-command her cod] + :: ~& [%radio-poke-command her cod] ra-abet:(~(ra-apply ra ost ~) her cod) :: ++ pour |= [ost=bone pax=path sih=*] ^- [(list move) _+>] - :: ~& [%rodeo-pour ost pax sih] + :: ~& [%radio-pour ost pax sih] :: ~& sih=sih =+ sih=((hard sign) sih) - ?+ pax ~& [%rodeo-strange-path pax] !! + ?+ pax ~& [%radio-strange-path pax] !! :: [%provoke ~] [~ +>.$] [%time ~] @@ -737,7 +738,7 @@ [%twitter *] =- ra-abet:(~(ra-twitter ra ost ~) met sih) ^= met - ?+ t.pax ~& [%rodeo-twitter-strange-path pax] !! + ?+ t.pax ~& [%radio-twitter-strange-path pax] !! [%mine @ @ ~] [i.t.pax i.t.t.t.pax] [%stat @ ~] @@ -768,7 +769,7 @@ ++ pull |= ost=bone ^- [(list move) _+>] - :: ~& [%rodeo-pull ost] + :: ~& [%radio-pull ost] ra-abet:~(ra-cancel ra ost ~) :: ++ prep @@ -777,9 +778,9 @@ :- [0 %pass /time %t %wait (add ~s10 lat.hid)]~ ?> ?=(^ old) ?~ u.old - ~& %rodeo-prep-new + ~& %radio-prep-new +:ra-abet:(~(ra-apply ra 0 ~) our.hid %design %main `[~ [%| ~]]) - ~& %rodeo-prep-old + ~& %radio-prep-old |- ?- -.u.u.old %1 %_(+>.^$ +<+ u.u.old) From 62b5dc78e6defaf557bd8cefa78f6314d1d85061 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 18 Dec 2014 10:37:36 -0800 Subject: [PATCH 6/7] Various fixes and improvements. --- main/app/radio-test/core.hook | 54 ----------------------------------- main/app/radio-wipe/core.hook | 13 --------- main/app/radio/core.hook | 4 +-- main/app/talk/core.hook | 34 +++++++++++++++++----- 4 files changed, 28 insertions(+), 77 deletions(-) delete mode 100644 main/app/radio-test/core.hook delete mode 100644 main/app/radio-wipe/core.hook diff --git a/main/app/radio-test/core.hook b/main/app/radio-test/core.hook deleted file mode 100644 index d6b3b22e1c..0000000000 --- a/main/app/radio-test/core.hook +++ /dev/null @@ -1,54 +0,0 @@ -/- *radio -!: -:::: - :: -|_ [hide ~] -++ peek - |= [@ pax=path] -:: ?: | -:: radio-report/(report grams/[7 "foo" ~]) - =+ :+ dat=(trip '{ping: {party:"rom", presence:"talk"}}') - =- dat2=(trip -) - ''' - { publish: - [{ serial: - "0vs.tteei.qlhhr.v09gs.s3iml.7him6.2injj.uiiu6.hg990.fha70.cqdtm", - statement: - { now: Date.now(), - speech: - { say: "Hello world" - } - }, - audience: - { "~zod/rume": "received", - "twitter/_urbit": "pending" - } - }] - } - ''' - ^= js - %- trip - ''' - function come(a){ - urb.send({ - appl: 'radio-test', - mark: 'radio-command', - data: a - }) - } - ''' - :- %hymn - ^- manx - ;html - ;head - ;script(src "/gen/main/lib/urb.js"); - ;script: {js} - ;script: dat = {dat2} - == - ;body:button(onclick "come(dat)"):"Ping" - == -++ poke-radio-command - |= [ost=bone ship com=command] - ~& got/com - [[ost %give /nice]~ +>] --- diff --git a/main/app/radio-wipe/core.hook b/main/app/radio-wipe/core.hook deleted file mode 100644 index 997a2d6d82..0000000000 --- a/main/app/radio-wipe/core.hook +++ /dev/null @@ -1,13 +0,0 @@ -!: -|_ [hid=hide ~] -++ poke-radio-wipe-args - |= [ost=bone you=ship ~] - :_ +>.$ - :~ [ost %pass / %g %mess [our.hid /radio] our.hid %bit !>(~)] - [ost %give %nice ~] - == -++ peer - |= - * - `+> --- diff --git a/main/app/radio/core.hook b/main/app/radio/core.hook index b6c4bcf618..1202f07578 100644 --- a/main/app/radio/core.hook +++ b/main/app/radio/core.hook @@ -238,7 +238,6 @@ [%g %mean *] ~&([%radio-repeat-rejected num her man sih] %rejected) [%g %nice ~] %received == - ~& [%ra-repeat our.hid u.oot] (ra-think | our.hid u.oot ~) :: ++ ra-cancel :: drop a bone @@ -343,12 +342,11 @@ ++ ra-conduct :: thought to station |= [pub=? her=ship tay=station tip=thought] ^+ +> - ~& [%ra-conduct pub her tay] + :: ~& [%ra-conduct pub her tay] ?- -.tay %& ?: pub =. her our.hid :: XX security! ?: =(her p.p.tay) - ~& [%ra-conduct-record p.tay] (ra-record q.p.tay p.p.tay tip) (ra-transmit p.tay tip) ?. =(our.hid p.p.tay) diff --git a/main/app/talk/core.hook b/main/app/talk/core.hook index 7260711810..1abb118f05 100644 --- a/main/app/talk/core.hook +++ b/main/app/talk/core.hook @@ -148,9 +148,16 @@ ++ text (boss 256 (star prn)) ++ stati %+ peach - ;~(plug ;~(pose (cold our tis) (ifix sig^fas fed:ag)) urs:ab) - %+ sear (soft partner) - ;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15} + ;~ pose + ;~(pfix tis (stag our urs:ab)) + ;~ pfix sig + ;~ plug + fed:ag + ;~(pose ;~(pfix fas urs:ab) (easy %main)) + == + == + == + ;~(pfix fas (stag %twitter ;~(pfix ;~(plug (just 'twitter') fas) urs:ab))) -- -- !: @@ -189,9 +196,11 @@ =+ rey=(rush txt talk(lat lat.hid, our our.hid)) ?~ rey [(send /out %give %rush %tang [%leaf "invalid input"] ~) +>.$] + ~& [%rey rey] |- ^- [(list move) _+>.^$] - ?+ -.u.rey !! + ?- -.u.rey %priv $(targets `(sa p.u.rey), u.rey [%def q.u.rey]) + %all $(targets ~, u.rey [%def p.u.rey]) %who :_ +>.^$ %^ send /out %give :+ %rush %tang :_ ~ @@ -408,9 +417,20 @@ ^- cord ?~ live 'waiting...' - ?: =(%main u.live) - '& ' - (cat 3 u.live '& ') + ?~ targets + ?: =(%main u.live) + '& ' + (cat 3 u.live '& ') + =+ taz=(~(tap by u.targets) ~) + |- ^- cord + ?~ taz ' ' + %^ cat 3 '+' + %^ cat 3 + ?- -.i.taz + %& (cat 3 (scot %p p.p.i.taz) (cat 3 '/' q.p.i.taz)) + %| (cat 3 '/' (cat 3 %twitter (cat 3 '/' p.p.i.taz))) + == + $(taz t.taz) :: ++ present ^- (list move) From b45c307e866ec0c2fb7637e6aafc87ce6725ffd2 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 18 Dec 2014 10:43:07 -0800 Subject: [PATCH 7/7] Remove twitter. --- main/app/radio/core.hook | 71 ++++------------------------------------ 1 file changed, 6 insertions(+), 65 deletions(-) diff --git a/main/app/radio/core.hook b/main/app/radio/core.hook index 1202f07578..32489722bb 100644 --- a/main/app/radio/core.hook +++ b/main/app/radio/core.hook @@ -3,7 +3,6 @@ :: /? 314 /- *radio -/+ twitter :: :::: :: @@ -18,13 +17,13 @@ $: parties=(map span party) :: conversations general=(set bone) :: meta-subscribe outbox=(pair ,@ud (map ,@ud thought)) :: urbit outbox - sent=(map tid:twit serial) :: own tweets + sent=(map ,@ud serial) :: own tweets folks=(map ship human) :: human identities == :: ++ house-0 :: legacy state %+ map path :: ,[p=(list zong) q=(map ship ,?)] :: - :: + :: :: ++ zong :: legacy messages $% $: %mess p=@da q=ship :: $= r :: @@ -84,23 +83,6 @@ $%([%mine p=span] [%stat p=@uv]) -- |_ [hid=hide house] -++ ti - =+ ^= key :: XX use %jael - :* :- 'AP3G1t8ki6rPzeeAqdWCTw03F' - 'VV784LPwZSaAxtF16RWWTnST4F85BHN8VqQKNyv7MprCkA0xZD' - :- '2821727326-RZGXSeTn7hCFQfJqR0ViivM3YYpu2O1M71gelBl' - 'jW9VygFPOTsEK0WmrJDHYSoEnofOPdCE1oQRzueemVTl8' - == - => ~(. twit key lat.hid `@`eny.hid) - =+ me=%hoontap :: XX use %khan - |% - ++ sta |=(who=span [%| %twitter who]) - ++ post |=(a=cord `hiss`(stat-upda [%status a]~ ~)) - ++ mine `hiss`(stat-home) - :: - ++ line (ar:jo stat:twir) :: reparse timeline - -- -:: ++ ra :: transaction core |_ [ost=bone moves=(list move)] ++ ra-abet :: resolve core @@ -200,31 +182,7 @@ ++ ra-twitter :: %twitter response |= [met=twim sih=sign] ^+ +> - ?> ?=(%thou +<.sih) - ?. &(=(2 (div p.p.sih 100)) ?=(^ r.p.sih)) - ~& [%twit-lost met [p `(unit ,[@ @t])`r]:[p.sih .]] - +> - ?- -.met - %stat - =+ sta=(need %.(q.u.r.p.sih ;~(biff poja stat:twir))) - ~& [%tweet-ack p.met sta] - =. sent (~(put by sent) id:sta p.met) - +>.$ - %mine - =+ pur=(~(get by parties) p.met) :: XX all subscribed - ?~ pur ~& [%ra-twitter-none p.met] !! - =< pa-abet - %- ~(pa-lesson pa p.met u.pur) - %+ turn (need %.(q.u.r.p.sih ;~(biff poja line:ti))) - |= [id=tid:twit who=scr:twit now=@da txt=@t] - ^- telegram - :* our.hid - ((bond |.((shaf %twit id))) (~(get by sent) id)) - [[(sta me):ti %received] `~] - now - [%say txt] - == - == + !! :: ++ ra-repeat :: %repeat response |= [num=@ud her=ship man=span sih=sign] @@ -355,18 +313,7 @@ %| ?. pub +> ?- -.p.tay %twitter - ~& [%conduct-twitters p.p.tay] - ?> =(me:ti p.p.tay) - =+ ^= msg - ?+ -.q.r.tip !! - %say "{}: {(trip p.q.r.tip)}" - %own "{} {(trip p.q.r.tip)}" - == - ?: (gth (lent msg) 140) - (ra-evil %radio-tweet-long) - %+ ra-hiss - /twitter/stat/(scot %uv p.tip) - (post:ti (crip msg)) + !! == == :: ++ ra-record :: add to party @@ -512,10 +459,7 @@ |= tay=station ?- -.tay %| ~& tweet-abjure/p.p.tay - :_ ~ - :- /twitter/mine/[p.p.tay]/[man] - ?> =(me:ti p.p.tay) - [%e %them ~] + !! :: %& :: ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] :~ :- /friend/nuke/[man] @@ -535,10 +479,7 @@ =+ num=(fall (~(get by sequence) tay) 0) ?- -.tay %| ~& tweet-acquire/p.p.tay - :_ ~ - :- /twitter/mine/[p.p.tay]/[man] - ?> =(me:ti p.p.tay) - [%e %them ~ mine:ti] + !! :: %& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] :~ :- /friend/show/[man]