Merge branch 'test' of https://github.com/urbit/urbit into test

This commit is contained in:
Anton Dyudin 2015-01-25 20:49:39 -08:00
commit bfe432e189
5 changed files with 149 additions and 108 deletions

View File

@ -36,8 +36,8 @@
$: 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
remotes=(map partner atlas) :: remote presence
sequence=(map partner ,@ud) :: partners heard
shape=config :: configuration
known=(map serial ,@ud) :: messages heard
guests=(map bone river) :: message followers
@ -114,16 +114,16 @@
|= [pax=path hiz=hiss]
(ra-emit ost %pass pax %e %them ~ hiz)
::
++ ra-house :: emit stations
++ ra-house :: emit partners
|= ost=bone
%+ ra-emit ost
:^ %give %rush %rodeo-report
:- %house
%- ~(gas in *(set span))
^- (list span)
(turn (~(tap by stories) ~) |=([a=span *] a))
%- ~(gas in *(map span (pair posture cord)))
%+ turn (~(tap by stories))
|=([a=span b=story] [a p.cordon.shape.b caption.shape.b])
::
++ ra-homes :: update stations
++ ra-homes :: update partners
=+ gel=general
|- ^+ +>
?~ gel +>
@ -136,7 +136,7 @@
%+ ra-apply our.hid
:+ %design (main our.hid)
:- ~
:_ [%| ~]
:_ [%default ?:((gte our.hid 65.536) %brown %black) ~]
?:(=(sir our.hid) ~ [[%& sir (main sir)] ~ ~])
::
++ ra-apply :: apply command
@ -175,7 +175,7 @@
pa-abet:(~(pa-friend pa man u.pur) her sih)
::
++ ra-stalk :: %stalk response
|= [man=span tay=station sih=sign]
|= [man=span tay=partner sih=sign]
^+ +>
=+ pur=(~(get by stories) man)
?~ pur ~& [%ra-stalk-none man] +>.$
@ -192,8 +192,9 @@
?~ oot ~& [%ra-repeat-none num] +>.$
=. q.outbox (~(del by q.outbox) num)
=. q.u.oot
%+ ~(put by q.u.oot)
[%& her man]
=+ olg=(~(got by q.u.oot) [%& her man])
%+ ~(put by q.u.oot) [%& her man]
:- -.olg
?+ sih !!
[%g %mean *] ~&([%rodeo-repeat-rejected num her man sih] %rejected)
[%g %nice ~] %received
@ -252,13 +253,13 @@
::
++ ra-consume :: consume thought
|= [pub=? her=ship tip=thought]
=+ aud=`(list (pair station delivery))`(~(tap by q.tip) ~)
=+ aud=(~(tap by q.tip) ~)
|- ^+ +>.^$
?~ aud +>.^$
$(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip))
::
++ ra-conduct :: thought to station
|= [pub=? her=ship tay=station tip=thought]
++ ra-conduct :: thought to partner
|= [pub=? her=ship tay=partner tip=thought]
^+ +>
:: ~& [%ra-conduct pub her tay]
?- -.tay
@ -286,7 +287,7 @@
pa-abet:(~(pa-learn pa man u.pur) gam)
::
++ ra-transmit :: send to neighbor
|= [cuz=cousin tip=thought]
|= [cuz=station tip=thought]
^+ +>
=. +>
%+ ra-emit ost
@ -344,7 +345,6 @@
?~ vew +>.^$
=. +>.^$ $(vew l.vew)
=. +>.^$ $(vew r.vew)
~& [%pa-display n.vew]
(pa-sauce n.vew [[%rush %rodeo-report %group reg] ~])
::
++ pa-monitor :: update config
@ -362,6 +362,9 @@
?+ sih ~&([%rodeo-bad-friend sih] !!)
[%g %nice ~]
:: ~& %pa-friend-nice
+>.$
[%g %mean *]
~& %pa-friend-mean
+>.$
::
[%g %rush %rodeo-report *]
@ -378,7 +381,7 @@
==
::
++ pa-stalk :: subscribed present
|= [tay=station sih=sign]
|= [tay=partner sih=sign]
^+ +>
?+ sih ~&([%rodeo-bad-friend sih] !!)
[%g %nice ~]
@ -407,11 +410,11 @@
==
::
++ pa-abjure :: unsubscribe move
|= tal=(list station)
|= tal=(list partner)
%+ pa-scrub 0
%- zing
%+ turn tal
|= tay=station
|= tay=partner
?- -.tay
%| ~& tweet-abjure/p.p.tay
!!
@ -425,11 +428,11 @@
==
::
++ pa-acquire :: subscribe to
|= tal=(list station)
|= tal=(list partner)
%+ pa-scrub 0
%- zing
%+ turn tal
|= tay=station
|= tay=partner
^- (list (pair path note))
=+ num=(fall (~(get by sequence) tay) 0)
?- -.tay
@ -444,11 +447,11 @@
::
++ 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)))
=+ ^= dif ^- (pair (list partner) (list partner))
=+ old=`(list partner)`(~(tap in sources.shape) ~)
=+ new=`(list partner)`(~(tap in sources.cof) ~)
:- (skip new |=(a=partner (~(has in sources.shape) a)))
(skip old |=(a=partner (~(has in sources.cof) a)))
=. +>.$ (pa-acquire p.dif)
=. +>.$ (pa-abjure q.dif)
=. shape cof
@ -466,13 +469,13 @@
^+ +>
=+ ^= nol
?: =(%gone p.saz)
(~(del by locals) p.saz)
(~(del by locals) her)
(~(put by locals) her lat.hid saz)
?: =(nol locals) +>.$
(pa-display(locals nol) viewers)
::
++ pa-remind :: remote presence
|= [tay=station loc=atlas rem=(map station atlas)]
|= [tay=partner loc=atlas rem=(map partner atlas)]
=+ ^= buk
=+ mer=(turn (~(tap by rem) ~) |=([* a=atlas] a))
|- ^- atlas
@ -583,7 +586,10 @@
?. (pa-admire p.gam)
~& %pa-admire-rejected
+>.$
=. q.q.gam (~(put by q.q.gam) [%& our.hid man] %received)
=. q.q.gam
=+ ole=(~(get by q.q.gam) [%& our.hid man])
?~ ole q.q.gam
(~(put by q.q.gam) [%& our.hid man] -.u.ole %received)
=+ old=(~(get by known) p.q.gam)
?~ old
(pa-append gam)
@ -710,7 +716,7 @@
locals=~
remotes=~
sequence=~
shape=[.(cordon [%| ~])]:*config
shape=[.(cordon [%black ~])]:*config
^= known %- mo ^- (list ,[serial @]) =< +
(roll grams |=([telegram a=@ b=(list ,[serial @])] [+(a) [a p.q] b]))
guests=~
@ -725,7 +731,7 @@
=+ (turn a |=(d=span leaf/(trip d)))
(crip ~(ram re %rose ["_" ~ ~] -))
:- par
=+ aud=`audience`[[[%& our.hid par] %received] `~]
=+ aud=`audience`[[[%& our.hid par] *envelope %received] `~]
=+ ^= spe
|= r=_r:*zong ^- speech
?- -.r
@ -735,5 +741,5 @@
==
%+ turn b
|= d=zong ^- telegram
[q.d (sham eny.hid d) aud p.d (spe r.d)]
[q.d (sham eny.hid d) aud p.d ~ (spe r.d)]
--

View File

@ -24,12 +24,14 @@
++ terminal :: terminal state
$: present=presence :: presence state
== ::
++ story :: persona
$: link=(grip bridge) :: connection
++ story :: station content
$: poe=posture :: security posture
desc=@t :: description
link=(grip bridge) :: connection
count=@ud :: message counter
mike=(pair ,? (set station)) :: passive/voice
mike=(pair ,? (set partner)) :: passive/voice
quiet=? :: !verbose
past=(list station) :: past received auds
past=(list partner) :: past received auds
== ::
++ bridge :: remote state
$: xm=config :: configuration
@ -41,14 +43,14 @@
[%mor (list work)] :: sequence
[%rub work-adjust] :: configure story
[%say speech] :: publish in voice
[%who (unit station)] :: show presence
[%who (unit partner)] :: show presence
[%wry work-construct] :: configure system
== ::
++ work-adjust :: adjust story
$% [%dark p=(set ship)] :: toggle blacklist
[%lite p=(set ship)] :: toggle whitelist
[%love p=(set station)] :: toggle stations
[%whom p=? q=(set station)] :: active/voice
[%love p=(set partner)] :: toggle partners
[%whom p=? q=(set partner)] :: active/voice
[%wind p=@dr] :: rewind by date
== ::
++ work-construct :: configure system
@ -158,7 +160,7 @@
|=(a=(list ^ship) (~(gas in *(set ^ship)) a))
(most ;~(plug com (star ace)) ship)
::
++ stat :: station
++ stat :: partner
%+ posh
;~ plug
ship
@ -170,9 +172,9 @@
==
==
::
++ staz :: station set
++ staz :: partner set
%+ cook
|=(a=(list station) (~(gas in *(set station)) a))
|=(a=(list partner) (~(gas in *(set partner)) a))
(most ;~(plug com (star ace)) stat)
::
++ step :: rollback interval
@ -217,7 +219,7 @@
;~(pfix cen (stag %exp wide:vag))
::
%+ cook
|= [a=(set station) b=(unit ,[%lin p=? q=@t])]
|= [a=(set partner) b=(unit ,[%lin p=? q=@t])]
^- ^work
=. b ?~(b ~ ?:(=(0 q.u.b) ~ b))
=+ c=[%rub %whom %& a]
@ -231,8 +233,8 @@
==
--
::
++ swatch :: print station set
|= [our=ship tou=(set station)]
++ swatch :: print partner set
|= [our=ship tou=(set partner)]
=+ tuo=(~(tap in tou))
|- ^- tape
?~ tuo ~
@ -307,8 +309,8 @@
::
++ sy-audience :: speech audience
%- ~(gas by *audience)
%+ turn `(list station)`[[%& our.hid man] (~(tap in q.mike))]
|=(a=station [a %pending])
%+ turn `(list partner)`[[%& our.hid man] (~(tap in q.mike))]
|=(a=partner [a *envelope %pending])
::
++ sy-message :: print message
|= msg=tape
@ -318,10 +320,10 @@
|= [msg=tape tay=(list tank)]
=. tay (welp tay `(list tank)`[%leaf "::"]~)
=. tay :_(tay [%leaf ":{(trip man)}: {msg}:: "])
%_(+>.$ moz hy-abet:(hy-display:(hype moz) (flop tay)))
%_(+>.$ moz hy-abet:(hy-display:(hype moz) tay))
::
++ sy-prompt
|= tou=(set station)
|= tou=(set partner)
^- tape
;: welp
(scow %p our.hid)
@ -331,7 +333,7 @@
==
::
++ sy-voice :: set targets
|= [pas=? tou=(set station)]
|= [pas=? tou=(set partner)]
?: &(!p.mike pas) +>
%_ +>.$
mike [pas tou]
@ -362,8 +364,8 @@
=+ suz=sy-live
?~ suz (sy-message "not connected")
?- +<.job
%lite sz-abet:(sz-cordon:u.suz [%| +>.job])
%dark sz-abet:(sz-cordon:u.suz [%& +>.job])
%lite sz-abet:(sz-cordon:u.suz [%white +>.job])
%dark sz-abet:(sz-cordon:u.suz [%black +>.job])
%love sz-abet:(sz-sources:u.suz +>.job)
==
::
@ -373,7 +375,7 @@
moz
=< hy-abet
%- ~(hy-transmit hy moz hid)
[%publish [[sir sy-audience [lat.hid +.job]] ~]]
[%publish [[sir sy-audience [lat.hid ~ +.job]] ~]]
==
::
%wry ~&(%sy-work-wry !!)
@ -388,14 +390,14 @@
=< hy-abet
%- hy-render:(hype moz)
=* sta r.q.gam
?+ -.q.sta ~&([%strange-gram -.q.sta] !!)
?+ -.r.sta ~&([%strange-gram -.r.sta] !!)
::
%lin
:- %txt
%+ rap 3
:~ (scot %ud num) ')'
(scot %p p.gam) ?:(p.q.sta ': ' ' ')
q.q.sta
(scot %p p.gam) ?:(p.r.sta ': ' ' ')
q.r.sta
==
==
==
@ -466,23 +468,16 @@
%_(+>+> link why)
::
++ sz-cordon :: design cordon
|= con=(ache (set ship) (set ship))
|= con=control
^+ +>
=. cordon.xm.big
?- -.cordon.xm.big
%& ?- -.con
%& [%& (stog p.con p.cordon.xm.big)]
%| con
==
%| ?- -.con
%& con
%| [%| (stog p.con p.cordon.xm.big)]
==
==
?: =(p.cordon.xm.big p.con)
[p.con (stog q.con q.cordon.xm.big)]
con
+>.$(moz hy-abet:(hy-transmit:(hype moz) [%design man ~ xm.big]))
::
++ sz-sources :: design sources
|= src=(set station)
|= src=(set partner)
^+ +>
=. sources.xm.big (stog src sources.xm.big)
+>.$(moz hy-abet:(hy-transmit:(hype moz) [%design man ~ xm.big]))
@ -538,17 +533,24 @@
(ny-amid(live ~) sy-unsubscribe:(need (novel moz)))
::
++ ny-tell :: hear from server
|= sap=(set span)
|= sap=(map span (pair posture cord))
^+ +>
=. +> ?.(&(?=(^ live) !(~(has in sap) u.live)) +> ny-stop)
=. +> ?.(&(?=(^ live) !(~(has by sap) u.live)) +> ny-stop)
=. stories
=+ ros=(skim (~(tap by stories)) |=([a=span *] (~(has in sap) a)))
=+ pas=(~(tap in sap))
=+ pas=(~(tap by sap))
=+ ros=(skim (~(tap by stories)) |=([a=span *] (~(has by sap) a)))
%- ~(gas by *(map span story))
|- ^- (list (pair span story))
?~ pas ros
?~ pas
%+ turn ros
|= [a=span b=story]
=+ hig=(~(get by sap) a)
[a ?~(hig b b(poe p.u.hig, desc q.u.hig))]
=+ sor=$(pas t.pas)
?:((~(has by stories) i.pas) sor [[i.pas *story] sor])
?: (~(has by stories) i.pas)
sor
=+ soy=*story
[[p.i.pas soy(poe p.q.i.pas, desc q.q.i.pas)] sor]
?^ live +>.$
?~ stories +>.$
?: (~(has by `(map span story)`stories) (main our.hid))
@ -558,10 +560,14 @@
++ ny-work :: user command
|= jaw=work-construct
^+ +>
?- -.jaw
%raze +>(moz hy-abet:(hy-transmit:(hype moz) [%design p.jaw ~]))
%make +>(moz hy-abet:(hy-transmit:(hype moz) [%design p.jaw [~ ~ %| ~]]))
%tune (ny-tune p.jaw)
?- -.jaw
%raze +>(moz hy-abet:(hy-transmit:(hype moz) [%design p.jaw ~]))
%tune (ny-tune p.jaw)
%make
%= +>
moz
hy-abet:(hy-transmit:(hype moz) [%design p.jaw [~ ~ %default %black ~]])
==
==
--
::

View File

@ -56,19 +56,21 @@
statement/stam
==
::
++ audi (op stati (ci (soft delivery) so)) :: audience
++ auri (op stati (ci (soft presence) so))
++ audi (op parn memb) :: audience
++ auri (op parn (ci (soft presence) so))
++ memb (ot envelope/lope delivery/(ci (soft delivery) so) ~)
++ lope (ot visible/bo sender/(mu (su parn)) ~)
::
++ stati
^- $+(nail (like station))
++ parn
^- $+(nail (like partner))
%+ peach
;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft partner)
%+ sear (soft passport)
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
::
++ stam
^- $+(json (unit statement))
=- (ot now/di speech/(of -) ~)
=- (ot date/di bouquet/(as (ar so)) speech/(of -) ~)
:~ own/so
say/so
lin/(ot say/bo txt/so ~)
@ -80,10 +82,10 @@
++ conf
^- $+(json (unit config))
%- ot :~
sources/(as (su stati))
sources/(as (su parn))
caption/so
:- %cordon
%+ cu |*(a=^ ?~(-.a a a)) :: XX do type stuff
(ot white/bu list/(as (su fed:ag)) ~)
(ot posture/(ci (soft posture) so) list/(as (su fed:ag)) ~)
==
--
-- --

View File

@ -18,12 +18,21 @@
|^ %+ joba -.rep
?- -.rep
%config ~! rep (conf +.rep)
%house [%a (turn (~(tap by +.rep)) joce)]
%house a/(turn (~(tap by +.rep)) jose)
%grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~)
::%group (grop +.rep)
%group (jobe local/(grop p.rep) global/%.(q.rep (jome stan grop)) ~)
%group (jobe local/(grop p.rep) global/%.(q.rep (jome parn grop)) ~)
==
++ joce |=(a=span [%s a])
++ jose
|= [a=span b=posture c=cord]
(jobe name/[%s a] posture/[%s a] caption/[%s b] ~)
::
++ jove
|= [a=envelope b=delivery]
%- jobe :~
envelope/(jobe visible/[%b p.a] sender/?~(q.a ~ s/(parn u.q.a)) ~)
delivery/[%s b]
==
++ jope |=(a=ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
++ joke |=(a=tank [%s (role (turn (wash 0^80 a) crip))])
++ jode |=(a=time (jone (div (mul (sub a ~1970.1.1) 1.000) ~s1)))
@ -51,16 +60,23 @@
|= thought
(jobe serial/(jape <p>) audience/(audi q) statement/(stam r) ~)
::
++ audi (jome stan joce)
++ stan
|= a=station ^- cord
++ audi (jome parn jove)
++ bouq
|= a=bouquet
a/(turn (~(tap in a)) |=(b=path a/(turn b |=(c=span s/c))))
::
++ parn
|= a=partner ^- cord
%- crip
?~ -.a "{<p.p.a>}/{(trip q.p.a)}"
?- -.p.a
%twitter "{(trip -.p.a)}/{(trip p.p.a)}"
==
::
++ stam |=(statement (jobe time/(jode p) speech/(spec q) ~))
++ stam
|= statement
(jobe date/(jode p) bouquet/(bouq q) speech/(spec r) ~)
::
++ spec
|= a=speech
%+ joba -.a
@ -84,9 +100,10 @@
++ conf
|= config
%- jobe :~
sources/[%a (turn (~(tap in sources)) |=(a=station [%s (stan a)]))]
=- cordon/(jobe white/[%b -.cordon] list/[%a -] ~)
(turn (~(tap in p.cordon)) jope) :: XX jase
sources/[%a (turn (~(tap in sources)) |=(a=partner [%s (parn a)]))]
caption/[%s caption]
=- cordon/(jobe posture/[%s -.cordon] list/[%a -] ~)
(turn (~(tap in q.cordon)) jope) :: XX jase
==
--
-- --

View File

@ -1,21 +1,22 @@
::
:::: /hook/core/rodeo/sur
::
!:
|%
++ ache |*([a=$+(* *) b=$+(* *)] $%([| p=b] [& p=a])) :: PM 314
++ audience (map station delivery) :: destination/state
++ audience (map partner (pair envelope delivery)) :: destination/state
++ atlas (map ship status) :: presence map
++ bouquet (set flavor) :: complete aroma
++ command :: effect on party
$% [%design (pair span (unit config))] :: configure/destroy
[%publish (list thought)] :: originate
[%review (list thought)] :: deliver
== ::
++ config :: party configuration
$: sources=(set station) :: pulls from
cordon=control :: & white, | black
$: sources=(set partner) :: pulls from
caption=cord :: about
cordon=control :: restricted to
== ::
++ cousin (pair ship span) :: domestic flow
++ control (ache (set ship) (set ship)) :: & white, | black
++ control (pair posture (set ship)) :: access control
++ delivery :: delivery state
$? %pending :: undelivered
%received :: delivered
@ -23,21 +24,29 @@
%released :: sent one-way
%accepted :: fully processed
== ::
++ envelope (pair ,? (unit partner)) :: visible, sender
++ flavor path :: content flavor
++ human :: human identifier
$: true=(unit (trel ,@t (unit ,@t) ,@t)) :: true name
hand=(unit ,@t) :: handle
== ::
++ partner :: foreign flow
++ passport :: foreign flow
$% [%twitter p=@t] :: twitter
== ::
++ posture :: security posture
$? %black :: public
%white :: private
%green :: readonly
%brown :: writeonly
== ::
++ presence ?(%gone %hear %talk) :: status type
++ register (pair atlas (map station atlas)) :: ping me, ping srcs
++ register (pair atlas (map partner atlas)) :: ping me, ping srcs
++ report :: radio update
$% [%config config] :: reconfigure
:: [%folder (list report)] :: multiple
[%grams (pair ,@ud (list telegram))] :: beginning, thoughts
[%group register] :: presence
[%house (set span)] :: station set
[%house (map span (pair posture cord))] :: station set
== ::
++ speech :: narrative action
:: XX unify %own and %say to %lin
@ -55,9 +64,10 @@
[%say p=@t] :: XX normal line
== ::
++ serial ,@uvH :: unique identity
++ station (each cousin partner) :: interlocutor
++ partner (each station passport) :: interlocutor
++ status (pair presence human) :: participant
++ statement (pair ,@da speech) :: when this
++ statement (trel ,@da bouquet speech) :: when this
++ station (pair ship span) :: domestic flow
++ telegram (pair ship thought) :: who which whom what
++ thought (trel serial audience statement) :: which whom what
++ torso :: attachment