Merge branch 'radio' of github.com:urbit/urbit-new into radio

This commit is contained in:
Galen Wolfe-Pauly 2014-12-17 12:34:55 -08:00
commit c647846d05
15 changed files with 508 additions and 159 deletions

View File

@ -43,16 +43,6 @@
$: %c ::
$% [%warp p=sock q=riff] ::
== == ::
::S $% $: %b :: to %batz
::S $% [%hail ~] ::
::S [%harm ~] ::
::S [%hook ~] ::
::S [%kill p=~] ::
::S [%line p=@t] ::
::S [%ling ~] ::
::S [%make p=(unit ,@t) q=@ud r=@ s=?] ::
::S [%sith p=@p q=@uw r=?] ::
::S == == ::
$: %d ::
$% [%crud p=@tas q=(list tank)] ::
[%text p=tape] ::
@ -68,20 +58,6 @@
++ riff ,[p=desk q=(unit rave)] :: see %clay
++ sign :: in result $<-
$?
::S $: %b :: by %batz
::S $% [%hail ~] ::
::S [%helo p=path q=prod] ::
::S [%logo p=@] ::
::S [%save p=path q=@] ::
::S [%sage p=path q=*] ::
::S [%talk p=tank] ::
::S [%tell p=(list ,@t)] ::
::S [%text p=tape] ::
::S [%verb ~] ::
::S [%veer p=@ta q=path r=@t] ::
::S [%vega p=path] ::
::S [%warn p=tape] ::
::S == == ::
$: %c ::
$% [%writ p=riot] ::
== == ::
@ -104,6 +80,9 @@
[%veer p=@ta q=path r=@t] ::
[%vega p=path] ::
== == ::
$: %t ::
$% [%wake ~] ::
== ==
$: @tas :: by any
$% [%crud p=@tas q=(list tank)] ::
[%init p=@p] ::
@ -115,6 +94,7 @@
$% [%line p=span] ::
[%res p=span] ::
[%cmd p=char] ::
[%type p=?] ::
== == ::
++ term-line ,[p=[p=cord q=prom r=cord] q=(list cord) r=(list tark)]
++ tark ?(tank [%stem p=tank q=tank]) ::
@ -171,6 +151,13 @@
%right ::
== ::
++ yard :: terminal state
$: p=? :: verbose
q=blur :: display state
r=(map path hist) :: history
s=[p=? q=@da] :: typing?/last typed
== ::
:: XX LEGACY 12-16-2014
++ yord :: old terminal state
$: p=? :: verbose
q=blur :: display state
r=(map path hist) :: history
@ -178,12 +165,12 @@
-- =>
|%
++ dy
|= [hen=duct our=ship def=(unit duct) dug=(map duct yard)]
|= [hen=duct our=ship now=@da def=(unit duct) dug=(map duct yard)]
=+ ^= yar ^- yard
=+ yur=(~(get by dug) hen)
?^ yur u.yur
?^ def (~(got by dug) u.def)
[& [80 ~ *blot] ~]
[& [80 ~ *blot] ~ | *@da]
=| mos=(list move)
|%
++ beep (curb [[%bel ~] ~]) :: send beep
@ -331,36 +318,6 @@
?~ q.+.sih +>.^$
(fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih)
::
::S %helo :: trigger prompt
::S %- edit
::S =| bed=bein
::S =+ ^= hyt ^- hist
::S =+ hyt=(~(get by r.yar) p.+.sih)
::S ?~(hyt *hist u.hyt)
::S ?: &(?=(^ q.q.yar) =(p.+.sih hux.u.q.q.yar))
::S %= u.q.q.yar
::S hyt [+(p.hyt) [%$ q.hyt]]
::S pot q.q.+.sih
::S pol (lent q.q.+.sih)
::S buy p.q.+.sih
::S ==
::S =+ zon=(tuba r.q.+.sih)
::S =+ zow=(lent zon)
::S %= bed
::S bul zow
::S bus zow
::S but zon
::S buy p.q.+.sih
::S hux p.+.sih
::S hiz 0
::S hyt [+(p.hyt) [%$ q.hyt]]
::S pot q.q.+.sih
::S pol (lent q.q.+.sih)
::S ==
::S ::
::S ?(%hail %make %sith)
::S +>.$(mos :_(mos [hen %pass ~ %b +.sih]))
::S ::
%mean ~& %dill-mean +>.$
%nice +>.$
%note ?.(p.yar +>.$ (fume p.+.sih q.+.sih)) :: debug message
@ -408,11 +365,23 @@
?(%init %logo %veer %vega %verb) :: drop-throughs
+>(mos :_(mos [hen %give +.sih]))
%writ :: file exists
%= +>.$
%_ +>.$
mos
:_ mos
[hen %pass /term-show %g %show [our /terminal] our /lines]
==
::
%wake
?: (lte q.s.yar (sub now ~s15))
%_ +>.$
mos
:_ mos
[hen %pass /activity %t %wait (add q.s.yar ~s15)]
==
%_ +>.$
p.s.yar |
mos :_(mos (poke %term-in -:!>(*term-in) / %type %|))
==
==
::
++ lear :: handle request
@ -422,6 +391,16 @@
%flog !!
%noop +>
%belt :: terminal input
=. +>.$
?. ?=(?(%bac %del %txt) -.p.kyz) +>.$
?: p.s.yar +>.$(s.yar [& now])
%_ +>.$
s.yar [& now]
mos
:_ :_ mos
[hen %pass /activity %t %wait (add ?:(p.s.yar q.s.yar now) ~s15)]
(poke %term-in -:!>(*term-in) / %type %&)
==
?~ q.q.yar
%^ furl
"Downloading files from ticketing ship, please wait until"
@ -667,6 +646,7 @@
::
%hail :: refresh
+>.$
::+>.$(mos :_(mos (poke %term-ctrl -:!>(%hail) %hail)))
::
%harm :: all terms hung up
=+ nug=((map duct yard) [[hen (~(get by dug) hen)] ~ ~])
@ -707,7 +687,7 @@
(~(put by dug) hen yar)
--
--
=| $: %0 ::
=| $: %1 ::
our=ship ::
def=(unit duct) ::
dug=(map duct yard) ::
@ -733,7 +713,7 @@
:_ ..^$
%+ turn (~(tap by dug) *(list ,[p=duct q=yard]))
|=([a=duct b=yard] [a %slip %d p.q.hic])
=+ res=yerk:(lear:(dy hen our def dug) q.hic)
=+ res=yerk:(lear:(dy hen our now def dug) q.hic)
[-.res ..^$(our +<.res, dug +>+.res, def +>-.res)]
::
++ doze
@ -741,20 +721,32 @@
^- (unit ,@da)
~
::
++ load
|= old=[%0 our=ship def=(unit duct) dug=(map duct yard)]
++ load :: XX LEGACY 12-16-2014
|= $= old
$% [%0 our=ship def=(unit duct) dug=(map duct yord)]
[%1 our=ship def=(unit duct) dug=(map duct yard)]
==
^+ ..^$
..^$(our our.old, def def.old, dug dug.old)
?- -.old
%1 %_(..^$ our our.old, def def.old, dug dug.old)
%0 %= $
old
%= old
- %1
dug (~(run by dug.old) |=(yor=yord [p q r | *@da]:yor))
==
==
==
::
++ scry
|= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path]
^- (unit (unit (pair mark ,*)))
[~ ~ [%tank >dug<]]
::
++ stay [%0 our def dug]
++ stay [%1 our def dug]
++ take :: process move
|= [tea=wire hen=duct hin=(hypo sign)]
^- [p=(list move) q=_..^$]
=+ res=yerk:(leap:(dy hen our def dug) tea q.hin)
=+ res=yerk:(leap:(dy hen our now def dug) tea q.hin)
[-.res ..^$(our +<.res, dug +>+.res, def +>-.res)]
--

View File

@ -1151,15 +1151,27 @@
(yawl [%pull ~] leaf/"pulling" u.huv.sat [[%atom %ud] ost])
::
%mess
=+ ^= cog ^- term
?: =(%$ p.q.kon) %poke
=+ ^- [hyp=? cog=term]
=- ?^(- - ?:((warm %pock) [& %pock] [| %poke]))
?: =(%$ p.q.kon)
~
=+ guc=(cat 3 'pock-' p.q.kon)
?: (warm guc)
[& guc]
=+ goc=(cat 3 'poke-' p.q.kon)
?:((warm goc) goc %poke)
?: (warm goc)
[| goc]
~
?. (warm cog)
(give(qic.sat ~) %mean ~ %poke-find-fail ~)
?> ?=(^ huv.sat)
=+ sam=:(slop [[%atom %ud] ost] [[%atom %p] p.kon] q.q.kon)
=+ err=?.(=(%poke cog) <cog> "%poke with mark <p.q.kon>")
=+ ^= sam
;: slop
[[%atom %ud] ost]
[[%atom %p] p.kon]
?.(hyp q.q.kon (slop !>(p.q.q.kon) q.q.kon))
==
=+ err=?.(?=(?(%poke %pock) cog) <cog> "{<cog>} with mark <p.q.kon>")
:: ~& [%mess-poke cog]
%+ ford /s/poke
:+ %dude leaf/"poking {err}"

View File

@ -7,7 +7,7 @@
:: %jael is logically homogeneous, but please follow these conventions:
::
:: /cap :: foreign app keys
:: /service :: service name, eg %face
:: /service :: service name, eg %face for FB
:: /appid :: your ship's app-id
:: /@uvH :: by hash
:: /@ud :: by number
@ -25,7 +25,7 @@
:: structures
|%
++ axle :: %jael state
$: %0 ::
$: %0 :: %jael version
ent=@ :: entropy
sef=safe :: secret tree
red=(map duct (set path)) :: reverse subscribers
@ -36,22 +36,69 @@
== ::
++ kiss :: in request ->$
$% [%kill p=path] :: discard secret
[%make p=@uw q=(unit ,@da) r=@ud s=path] :: create secret
[%make p=@uw q=(unit ,@da) r=@ud s=path] :: generate random
[%nuke ~] :: erase subscriber
[%prim p=@uw q=(unit ,@da) r=perm s=path] :: forge prime
[%tell p=@uw q=(unit ,@da) r=path] :: save secret
== ::
++ move ,[p=duct q=[%give p=gift]] :: local move
++ move ,[p=duct q=(mold note gift)] :: typed move
++ note :: out request $->
$% $: %t :: to %time
$% [%wait p=@da] ::
[%rest p=@da] ::
== == == ::
++ perm (pair ,@ud (list ,@ud)) :: prime definition
++ safe ::
$: nub=@uw :: secret
$: nub=(unit ,@uw) :: secret
dex=(unit ,@da) :: expiration
sud=(set duct) :: subscribers
kin=(map term safe) :: children
== ::
-- ::
:: programs
|%
++ bu
|_ $: xap=path
fes=(list safe)
moz=(list move)
==
axle
::
++ bu-abet :: resolve
^- axle
?~ xap +<+
%= bu-abet
xap t.xap
fes t.fes
sef %= i.fes
kin
?: =(*safe sef)
(~(del by kin.i.fes) i.xap)
(~(put by kin.i.fes) i.xap sef)
==
==
::
++ bu-kill :: destroy
^+ .
=+ dus=(~(tap by
::
++ bu-ajar :: descend
|= pax=path
^+ +>
?~ pax +>.$
%= $
pax t.pax
xap [i.pax xap]
fes [sef fes]
sef (fall (~(get by kin.sef) i.pax) *safe)
==
--
++ bury
|= [pax=path lex=axle]
(~(bu-ajar bu [~ ~ ~] tof.lex lex) pax)
--
. ==
=| axle
=* lex -
|= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core
|% ::
@ -59,7 +106,16 @@
|= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
!!
=^ moz +>+>-
=< bu-abet
?- -.p.q.hic
%kill
kill:(bury p.p.q.hic +>+>-)
::
%make
%nuke
%tell
==
::
++ doze
|= [now=@da hen=duct]

View File

@ -1,5 +1,13 @@
!:
|_ [hide ~]
++ lima |*(a=(pole) ?~(a ~ [i t]=a(+ (..$ +.a))))
++ poke-bang-args
|* [ost=bone @ a=^ ~]
:_(+> [ost %pass / a]~)
--
|* [ost=bone @ a=[* (pole)]]
=> .(a ^.(lima a))
:_(+> (turn a |*(b=_i.a [ost %pass / b])))
::
++ pour
|= [ost=bone * sih=*]
~& bang-resp/;;(,[term term] [&1 &2]:sih)
:_(+> [ost %pass / %g %cide %$]~)
--

View File

@ -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

14
main/app/poke/core.hook Normal file
View File

@ -0,0 +1,14 @@
!:
|_ [hide ~]
++ mess ,[p=path q=[@ *] ~]
++ pock-poke-args
|= [ost=bone @ a=type b=?(mess [her=ship mess])]
=- :_(+>.$ [ost %pass / %g %mess -]~)
?^ |2.b [[her p]:b our -.q.b (slot 29 [a b])] :: +.&3
[[our p.b] our -.q.b (slot 13 [a b])] :: +.&2
::
++ pour
|= [ost=bone * sih=*]
~& poke-resp/;;(,[term term] [&1 &2]:sih)
:_(+> [ost %pass / %g %cide %$]~)
--

View File

@ -1,4 +1,4 @@
/- mess,user,users,zing,zong
/- mess,user,users,zing,zong,*radio
!:
=> |%
++ axle
@ -53,6 +53,25 @@
==
==
::
++ mamed
^- (map span (list telegram))
%- mo %+ turn (~(tap by p.vat))
|= [a=path b=(list zong) c=(map ship ,?)]
=+ =+ (turn a |=(d=span leaf/(trip d)))
par=(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)]
::
++ poke-zing
|= [ost=bone you=ship zig=zing]
^- [(list move) _+>]
@ -69,6 +88,7 @@
|= [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" ~]

View File

@ -17,11 +17,14 @@
$: 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
== ::
++ party :: a conversation
$: count=@ud :: (lent grams)
grams=(list telegram) :: all history
present=(map ship status) :: presence state
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
@ -47,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
@ -58,9 +64,12 @@
$% [%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 %stat)
$%([%mine p=span] [%stat p=@uv])
--
|_ [hid=hide house]
++ ti
@ -141,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 her +.cod)
==
::
++ ra-config :: configure party
@ -164,6 +168,22 @@
?~ 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]
^+ +>
@ -171,22 +191,26 @@
?. &(=(2 (div p.p.sih 100)) ?=(^ r.p.sih))
~& [%twit-lost met [p `(unit ,[@ @t])`r]:[p.sih .]]
+>
?- met
?- -.met
%stat
~& [%tweet-ack p.p.sih]
=+ 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
=+ ^- toz=(list thought)
%+ turn (need %.(q.u.r.p.sih ;~(biff poja line:ti)))
|= [id=@u who=@ta now=@da txt=@t]
^- thought
:* (shaf %twit id)
[[(sta:ti who) %received] `~]
now
[%say txt]
==
~& timemine-found/toz
(ra-think | our.hid toz)
=+ 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
@ -261,6 +285,47 @@
?~ 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 :: 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]
^+ +>
@ -283,9 +348,10 @@
%say "{<her>}: {(trip p.q.r.tip)}"
%own "{<her>} {(trip p.q.r.tip)}"
==
?< (gth (lent msg) 140)
?: (gth (lent msg) 140)
(ra-evil %radio-tweet-long)
%+ ra-hiss
/twitter/stat
/twitter/stat/(scot %uv p.tip)
(post:ti (crip msg))
== ==
::
@ -330,12 +396,23 @@
::==
&
::
++ 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-sauce ost [[%rust %radio-report %group present] ~])
(pa-display ost ~ ~)
::
++ pa-master :: hear config
|= her=ship
@ -346,13 +423,17 @@
(pa-sauce ost [[%rust %radio-report %config shape] ~])
::
++ pa-display :: update presence
=+ vew=viewers
|- ^+ +>
?~ vew +>
=. +> $(vew l.vew)
=. +> $(vew r.vew)
(pa-sauce n.vew [[%rust %radio-report %group present] ~])
::
|= vew=(set bone)
=+ ^= 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 reg] ~])
::
++ pa-monitor :: update config
=+ owe=owners
@ -379,6 +460,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))]
%_ +>.$
@ -396,29 +493,45 @@
++ 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]
:~ :- /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-asked/p.p.tay
:- /twitter/mine/[p.p.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)]
:~ :- /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
@ -439,10 +552,38 @@
=. guests (~(del in guests) ost)
(pa-sauce ost [[%mean ~] ~])
::
++ pa-notify :: new presence
|= [her=ship per=presence]
++ pa-notify :: local presence
|= [her=ship saz=status]
^+ +>
pa-display(present (~(put by present) her [per lat.hid *human]))
=+ guz=(~(get by locals) her)
=. locals (~(put by locals) her lat.hid saz)
?. |(?=(~ guz) !=(per 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)
?. |(?=(~ gub) =(buk u.gub))
+>.$
(pa-display(remotes (~(put by remotes) tay buk)) viewers)
::
++ pa-start :: start stream
|= riv=river
@ -498,12 +639,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)
==
@ -570,15 +711,37 @@
:: ~& 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 *]
?> ?=([twim *] t.pax)
ra-abet:(~(ra-twitter ra ost ~) i.t.pax sih)
=- 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 `station`[%& (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)
@ -589,12 +752,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

View File

@ -10,7 +10,8 @@
::
|% ::
++ axle ::
$: pid=@u :: next process id
$: tiv=? :: typing?
pid=@u :: next process id
pax=_`path`/=try= :: working directory
act=(unit span) :: active child
pip=(map span span) :: pipe out->in
@ -33,8 +34,9 @@
++ gilt ::
$% [%term-line p=term-line] ::
[%txt p=cord] ::
[%type p=?] ::
== ::
++ glas $|(%out [%in p=cord]) ::
++ glas ?(%out [%in p=cord] [%active p=cord]) ::
++ hapt ,[p=ship q=path] ::
++ move ,[p=bone q=(mold note gift)] ::
++ note ::
@ -66,6 +68,7 @@
$% $: %g ::
$% [%gone p=hapt] ::
[%init p=@p] ::
[%dumb ~] ::
[%mean p=ares] ::
[%nice ~] ::
[%rush p=mark q=*] ::
@ -316,12 +319,20 @@
==
::
++ next-act :: rotate active task
=+ opt=[i=`(unit span)`~ t=(turn cubs |=(a=span `(unit span)`[~ a]))]
|-
?~ t.opt ~
?: =(act i.opt)
i.t.opt
$(opt t.opt)
=+ ^- nex=(unit span)
=+ opt=[i=`(unit span)`~ t=(turn cubs |=(a=span `(unit span)`[~ a]))]
|-
?~ t.opt ~
?: =(act i.opt)
i.t.opt
$(opt t.opt)
?. tiv +(act nex)
%- blab(act nex)
%+ weld
?~ nex ~
(spam /active/[u.nex] %rush %type %&)
?~ act ~
(spam /active/[u.act] %rush %type %|)
::
++ peer
|= [you=ship gal=glas]
@ -330,6 +341,8 @@
%_ +>.$
mow :_(mow [ost %give %rush %term-line prompt ~ ~])
==
?: ?=(%active -.gal)
(blab [ost %give %rush %type %|] ~)
?. (~(has by cub.hid) p.gal) +>.$
?: (~(has by pop) p.gal) +>.$
=. act `p.gal
@ -350,12 +363,12 @@
[ost %give %nice ~]
[ost %give %logo ~]
~
(eat-end(act next-act) %& (slav %ud u.act))
(eat-end:next-act %& (slav %ud u.act))
%g =+ =- tak=rose/[" " "[" "]"]^(turn cubs -)
|= a=span
leaf/(trip (rap 3 (~(got by cub.hid) a) '(' a ')' ~))
(blab [ost give/nice/~] (print tak))
%x =. act next-act
%x =. +>.$ next-act
(blab [ost %give %nice ~] ping)
==
::
@ -374,6 +387,16 @@
=. +>.$ (blab (stash txt))
+>.$(mow :_(mow [ost %give %nice ~]))
::
++ poke-type
|= [you=ship tiv=?]
^+ +>
=. tiv tiv
?^ act
%+ blab
[ost %give %nice ~]
(spam /active/[u.act] %rush %type tiv)
(blab [ost %give %nice ~] ~)
::
++ print |=(a=tank (print-vase !>(`(list tank)`[a ~])))
++ print-vase
|= tan=vase :: [p=p:!>(*(list tank)) q=*]
@ -449,10 +472,11 @@
|= [ost=bone you=ship pax=path]
^- [(list move) _+>]
?~ pax `+>.$
?. ?=(?(%in %out) i.pax) `+>.$
?. ?=(?(%in %out %active) i.pax) `+>.$
=+ ^= gal
?: ?=(%out i.pax) %out
[%in ?<(?=(~ t.pax) i.t.pax)]
?: ?=(%in i.pax) [%in ?<(?=(~ t.pax) i.t.pax)]
[%active ?<(?=(~ t.pax) i.t.pax)]
=+ abet:(peer:(ve hid ost vat) you gal)
[-< +>.$(vat ->)]
::
@ -468,11 +492,19 @@
=+ abet:(poke-txt:(ve hid ost vat) you txt)
[-< +>.$(vat ->)]
::
++ poke-type :: handle command
|= [ost=bone you=ship tiv=?]
^- [(list move) _+>]
=+ abet:(poke-type:(ve hid ost vat) you tiv)
[-< +>.$(vat ->)]
::
++ purr
|= [ost=bone pax=path typ=type sih=sign]
^- [(list move) _+>]
?: ?=(%init +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%dumb +<.sih) :: sleep
[~ +>.$]
?: ?=(%sage +<.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?: ?=(%verb +<.sih) :: vomit

View File

@ -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]
@ -61,12 +64,16 @@
$: %rush
$= p
$% [%txt p=cord]
[%type p=?]
== ==
$: %rust
$= p
$% [%txt p=cord]
[%radio-report p=report]
== ==
== ==
$: %t ::
$% [%wake ~] :: timer wakeup
== == ==
--
!:
@ -88,6 +95,10 @@
(stag %def mess)
==
|%
++ posh
|* [a=_rule b=_rule]
;~(pose (stag %& a) (stag %| b))
::
++ peach :: either ++each branch
|* a=_[rule rule]
|= tub=nail
@ -348,13 +359,13 @@
[~ +>.$(parties (~(put by parties) man u.pur(shape `cof)))]
::
++ pour-group
|= [ost=bone man=span lup=(map ship status)]
|= [ost=bone man=span reg=(pair atlas (map station atlas))]
^- [(list move) _+>]
=+ pur=(~(get by parties) man)
?~ pur
~& [%no-party man]
[~ +>.$]
[~ +>.$(parties (~(put by parties) man u.pur(present lup)))]
[~ +>.$(parties (~(put by parties) man u.pur(present p.reg)))]
::
++ prompt
^- cord
@ -381,13 +392,36 @@
?~ pax ~& talk-pour-strange-path/pax !!
?+ i.pax ~& talk-pour-strange-path/pax !!
%cmd-in
?- +<.sih
?+ +<.sih !!
%nice [~ +>.$]
%mean [(send /out %give +.sih) +>.$]
?(%rush %rust)
?> ?=(%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 in u.targets) ~)
|=(a=station [a %hear])
==
::
%cmd-ac
?+ +<.sih !!
%nice [~ +>.$]
%mean [(send /out %give +.sih) +>.$]
?(%rush %rust)
?> ?=(%type -.p.sih)
~& [%talk-inputting p.p.sih]
[~ +>.$]
==
::
%command
?> ?=(?(%mean %nice) +<.sih)
@ -409,7 +443,7 @@
%mean ~&(%am-mean [~ +>.$])
%rust
?> ?=([%radio-report %group *] +>.sih)
(pour-group ost i.t.pax `(map ship status)`+>.+>.sih)
(pour-group ost i.t.pax +>.+>.sih)
==
::
%xm
@ -438,6 +472,8 @@
^- [(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)]
[ost %pass /cmd-ac %g %show [our.hid +.imp.hid] you /active/[-.imp.hid]]
^- move
:* ost %pass /server
%g %show

View File

@ -33,6 +33,7 @@
++ mess ::
$% [%txt p=(hypo cord)] ::
[%kyev p=(hypo kyev)] ::
[%type p=(hypo ,?)] ::
== ::
++ move ,[p=bone q=(mold note gift)] ::
++ note ::
@ -127,7 +128,7 @@
==
::
++ poke
|= jof=$%([%line p=span] [%res p=span] [%cmd p=char])
|= jof=$%([%line p=span] [%res p=span] [%cmd p=char] [%type p=?])
^+ +>
?- -.jof
%res :: restart shell
@ -159,13 +160,16 @@
(send %kyev -:!>(*kyev) [[%ctrl ~ ~] p.jof])
%r $(jof [%res 'shell'])
==
::
%type
(send %type -:!>(*?) p.jof)
==
::
++ poke-ctrl
.(mow :_(mow [ost %give %rush %term-line [p q ~]:tel]))
::
++ pour
|= [dis=?(%fork %resp %txt %kyev) sih=sign]
|= [dis=?(%fork %resp %txt %kyev %type) sih=sign]
^+ +>
?- dis
%fork ?>(?=(%gone +<.sih) +>.$) :: XX maybe mean?
@ -180,7 +184,7 @@
==
==
::
?(%txt %kyev)
?(%txt %kyev %type)
?+ +<.sih !!
%nice +>.$(mow :_(mow [ost %give +.sih]))
%mean
@ -256,7 +260,7 @@
?: ?=(?(%sage %init %logo %verb %veer %vega) &2.sih) :: vomit
[[ost %give +.sih]~ +>.$]
?~ pax !!
?. ?=(?(%fork %resp %txt %kyev) i.pax) !!
?. ?=(?(%fork %resp %txt %kyev %type) i.pax) !!
=+ abet:(pour:(se hid ost our.hid hiz t.pax) i.pax sih)
[-< +>.$(hiz ->)]
::

View File

@ -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))

View File

@ -20,7 +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 %.(+.rep (jome phon stas))
::%group (grop +.rep)
%group (jobe local/(grop p.rep) global/%.(q.rep (jome stan grop)) ~)
==
++ joce |=(a=span [%s a])
++ jope |=(a=ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
@ -42,7 +43,9 @@
|=(c=_[+<.a +<.b] [(a -.c) (b +.c)])
::
::
++ grop (jome phon stas) :: (map ship status)
++ phon |=(a=ship (scot %p a))
++ stas |=(status (jobe presence/(joce p) human/(huma q) ~))
++ gram |=(telegram (jobe ship/(jope p) thought/(thot q) ~))
++ thot
|= thought
@ -67,7 +70,6 @@
%inv (jobe ship/(jope p.a) party/[%s q.a] ~)
==
::
++ stas |=(status (jobe presence/(joce p) time/(jode q) human/(huma r) ~))
++ huma
|= human
%^ jobe

View File

@ -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,12 +27,12 @@
++ 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
++ station (each cousin partner) :: interlocutor
++ status (trel presence ,@da human) :: participant
++ status (pair presence human) :: participant
++ speech :: party action
$% [%own p=@t] :: @ or /me
[%exp p=@t q=(unit tank)] :: program output

View File

@ -1 +1,7 @@
,[pax=path jof=$%([%line p=span] [%res p=span] [%cmd p=char])]
$: pax=path ::
$= jof ::
$% [%line p=span] ::
[%res p=span] ::
[%cmd p=char] ::
[%type p=?] ::
== == ::