mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
Merge branch 'radio'
Conflicts: urb/urbit.pill urb/zod/arvo/hoon.hoon urb/zod/main/app/talk/core.hook
This commit is contained in:
commit
a76eb4f661
@ -374,7 +374,7 @@
|
||||
==
|
||||
::
|
||||
%wake
|
||||
?: (lte q.s.yar (sub now ~s15))
|
||||
?: (lte (sub now ~s15) q.s.yar)
|
||||
%_ +>.$
|
||||
mos
|
||||
:_ mos
|
||||
|
@ -115,6 +115,8 @@
|
||||
== ::
|
||||
++ calx :: concrete cache line
|
||||
$% [%hood p=calm q=(pair beam cage) r=hood] :: compile
|
||||
[%slit p=calm q=[p=type q=type] r=type] :: slam type
|
||||
[%slim p=calm q=[p=type q=twig] r=(pair type nock)]:: mint
|
||||
[%slap p=calm q=[p=vase q=twig] r=vase] :: compute
|
||||
[%slam p=calm q=[p=vase q=vase] r=vase] :: compute
|
||||
== ::
|
||||
@ -132,6 +134,8 @@
|
||||
%hood ?>(?=(%hood -.cax) r.cax)
|
||||
%slap ?>(?=(%slap -.cax) r.cax)
|
||||
%slam ?>(?=(%slam -.cax) r.cax)
|
||||
%slim ?>(?=(%slim -.cax) r.cax)
|
||||
%slit ?>(?=(%slit -.cax) r.cax)
|
||||
==
|
||||
::
|
||||
++ calk :: cache lookup
|
||||
@ -814,18 +818,24 @@
|
||||
|= [cof=cafe yed=vase]
|
||||
^$(cof cof, for i.yaw, yaw t.yaw, vax yed)
|
||||
::
|
||||
++ mail :: cached mint
|
||||
|= [cof=cafe sut=type gen=twig]
|
||||
^- (bolt (pair type nock))
|
||||
%+ (clef %slim) (fine cof sut gen)
|
||||
|= [cof=cafe sut=type gen=twig]
|
||||
=+ puz=(mule |.((~(mint ut sut) [%noun gen])))
|
||||
?- -.puz
|
||||
| (flaw cof p.puz)
|
||||
& (fine cof p.puz)
|
||||
==
|
||||
::
|
||||
++ maim :: slap
|
||||
|= [cof=cafe vax=vase gen=twig]
|
||||
^- (bolt vase)
|
||||
%+ (clef %slap) (fine cof vax gen)
|
||||
|= [cof=cafe vax=vase gen=twig]
|
||||
=+ puz=(mule |.((~(mint ut p.vax) [%noun gen])))
|
||||
?- -.puz
|
||||
| (flaw cof p.puz)
|
||||
& %+ (coup cof) (mock [q.vax q.p.puz] (mole ska))
|
||||
|= val=*
|
||||
`vase`[p.p.puz val]
|
||||
==
|
||||
%+ cope (mail cof p.vax gen)
|
||||
|= [cof=cafe typ=type fol=nock]
|
||||
%+ (coup cof) (mock [q.vax fol] (mole ska))
|
||||
|=(val=* `vase`[typ val])
|
||||
::
|
||||
++ make :: reduce silk
|
||||
|= [cof=cafe kas=silk]
|
||||
@ -912,18 +922,24 @@
|
||||
(fine cof `cage`[p.kas vax])
|
||||
==
|
||||
::
|
||||
++ malt :: cached slit
|
||||
|= [cof=cafe gat=type sam=type]
|
||||
^- (bolt type)
|
||||
%+ (clef %slit) (fine cof gat sam)
|
||||
|= [cof=cafe gat=type sam=type]
|
||||
=+ top=(mule |.((slit gat sam)))
|
||||
?- -.top
|
||||
| (flaw cof p.top)
|
||||
& (fine cof p.top)
|
||||
==
|
||||
::
|
||||
++ maul :: slam
|
||||
|= [cof=cafe gat=vase sam=vase]
|
||||
^- (bolt vase)
|
||||
%+ (clef %slam) (fine cof gat sam)
|
||||
|= [cof=cafe gat=vase sam=vase]
|
||||
=+ top=(mule |.((slit p.gat p.sam)))
|
||||
?- -.top
|
||||
| (flaw cof p.top)
|
||||
& %+ (coup cof) (mong [q.gat q.sam] (mole ska))
|
||||
|= val=*
|
||||
`vase`[p.top val]
|
||||
==
|
||||
%+ cope (malt cof p.gat p.sam)
|
||||
|= [cof=cafe typ=type]
|
||||
%+ (coup cof) (mong [q.gat q.sam] (mole ska))
|
||||
|=(val=* `vase`[typ val])
|
||||
::
|
||||
++ meow :: assemble
|
||||
|= [how=beam arg=heel]
|
||||
@ -1214,12 +1230,14 @@
|
||||
exec(q.kig (~(del by q.kig) tik))
|
||||
--
|
||||
--
|
||||
::
|
||||
--
|
||||
. ==
|
||||
=| axle
|
||||
=* lex -
|
||||
|= [now=@da eny=@ ski=sled] :: activate
|
||||
^? :: opaque core
|
||||
~% %ford-d +>+>+>+>+>+> ~
|
||||
|% ::
|
||||
++ call :: request
|
||||
|= [hen=duct hic=(hypo (hobo kiss))]
|
||||
|
319
arvo/hoon.hoon
319
arvo/hoon.hoon
@ -25,6 +25,7 @@
|
||||
~
|
||||
|% ::
|
||||
++ abel typo :: original sin: type
|
||||
++ ache |*([a=$+(* *) b=$+(* *)] $%([| p=b] [& p=a])) :: each, b default
|
||||
++ axis ,@ :: tree address
|
||||
++ also ,[p=term q=wing r=type] :: alias
|
||||
++ base ?([%atom p=odor] %noun %cell %bean %null) :: axils, @ * ^ ? ~
|
||||
@ -413,7 +414,11 @@
|
||||
[%unit p=term q=wine] ::
|
||||
== ::
|
||||
++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq)) ::
|
||||
:: ::
|
||||
++ worm :: compiler cache
|
||||
$: nes=(set ,^) :: ++nest
|
||||
pay=(map (pair type twig) type) :: ++play
|
||||
mit=(map (pair type twig) (pair type nock)) :: ++mint
|
||||
== ::
|
||||
:: ::
|
||||
++ map |* [a=_,* b=_,*] :: associative tree
|
||||
$|(~ [n=[p=a q=b] l=(map a b) r=(map a b)]) ::
|
||||
@ -6150,6 +6155,71 @@
|
||||
++ wash :: render tank at width
|
||||
|= [[tab=@ edg=@] tac=tank] ^- wall
|
||||
(~(win re tac) tab edg)
|
||||
::
|
||||
++ wa :: cached compile
|
||||
!:
|
||||
|_ worm
|
||||
++ nell |=(ref=type (nest [%cell %noun %noun] ref)) :: nest in cell
|
||||
++ nest :: nest:ut
|
||||
|= [sut=type ref=type]
|
||||
^- [? worm]
|
||||
?: (~(has in nes) [sut ref]) [& +>+<]
|
||||
?. (~(nest ut sut) | ref) [| +>+<]
|
||||
[& +>+<(nes (~(put in nes) [sut ref]))]
|
||||
::
|
||||
++ nets :: typeless nest
|
||||
|= [sut=type ref=*]
|
||||
^- [? worm]
|
||||
?: (~(has in nes) [sut ref]) [& +>+<]
|
||||
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
|
||||
?. (,? .*(gat(+< [sut ref]) -.gat))
|
||||
[| +>+<.$]
|
||||
[& +>+<.$(nes (~(put in nes) [sut ref]))]
|
||||
::
|
||||
++ play :: play:ut
|
||||
|= [sut=type gen=twig]
|
||||
^- [type worm]
|
||||
=+ old=(~(get by pay) [sut gen])
|
||||
?^ old [u.old +>+<.$]
|
||||
=+ new=(~(play ut sut) gen)
|
||||
[new +>+<.$(pay (~(put by pay) [sut gen] new))]
|
||||
::
|
||||
++ mint :: mint:ut to noun
|
||||
|= [sut=type gen=twig]
|
||||
^- [(pair type nock) worm]
|
||||
=+ old=(~(get by mit) [sut gen])
|
||||
?^ old [u.old +>+<.$]
|
||||
=+ new=(~(mint ut sut) %noun gen)
|
||||
[new +>+<.$(mit (~(put by mit) [sut gen] new))]
|
||||
::
|
||||
++ slap :: ++slap, cached
|
||||
|= [vax=vase gen=twig]
|
||||
^- [vase worm]
|
||||
=^ gun +>+< (mint p.vax gen)
|
||||
[[p.gun .*(q.vax q.gun)] +>+<.$]
|
||||
::
|
||||
++ slot :: ++slot, cached
|
||||
|= [axe=@ vax=vase]
|
||||
^- [vase worm]
|
||||
=^ gun +>+< (mint p.vax [%$ axe])
|
||||
[[p.gun .*(q.vax [0 axe])] +>+<.$]
|
||||
::
|
||||
++ spec :: specialize vase
|
||||
|= vax=vase
|
||||
^- [vase worm]
|
||||
=+ ^= gen ^- twig
|
||||
?@ q.vax [%wtts [%axil [%atom %$]] [%$ 1]~]
|
||||
?@ -.q.vax [%wtts [%leaf %tas -.q.vax] [%$ 2]~]
|
||||
[%wtts [%axil %cell] [%$ 1]~]
|
||||
=^ typ +>+<.$ (play p.vax [%wtgr gen [%$ 1]])
|
||||
[[typ q.vax] +>+<.$]
|
||||
::
|
||||
++ spot :: slot and spec
|
||||
|= [axe=@ vax=vase]
|
||||
^- [vase worm]
|
||||
=^ xav +>+< (slot axe vax)
|
||||
(spec xav)
|
||||
--
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:: section 2fB, macro expansion ::
|
||||
::
|
||||
@ -9518,6 +9588,8 @@
|
||||
glu=@ud :: samples in glue
|
||||
mal=@ud :: samples in alloc
|
||||
far=@ud :: samples in frag
|
||||
coy=@ud :: samples in copy
|
||||
euq=@ud :: samples in equal
|
||||
== ::
|
||||
::
|
||||
++ hump
|
||||
@ -9561,10 +9633,12 @@
|
||||
%glu mon(glu +(glu.mon))
|
||||
%mal mon(mal +(mal.mon))
|
||||
%far mon(far +(far.mon))
|
||||
%coy mon(coy +(coy.mon))
|
||||
%euq mon(euq +(euq.mon))
|
||||
==
|
||||
++ pi-moth :: count sample
|
||||
|= mon=moan ^- @ud
|
||||
:(add fun.mon noc.mon glu.mon mal.mon far.mon)
|
||||
:(add fun.mon noc.mon glu.mon mal.mon far.mon coy.mon euq.mon)
|
||||
::
|
||||
++ pi-mumm :: print sample
|
||||
|= mon=moan ^- tape
|
||||
@ -9589,6 +9663,14 @@
|
||||
^- tape
|
||||
?: =(0 far.mon) ~
|
||||
(welp (scow %ud (div (mul 100 far.mon) tot)) "f ")
|
||||
::
|
||||
^- tape
|
||||
?: =(0 coy.mon) ~
|
||||
(welp (scow %ud (div (mul 100 coy.mon) tot)) "y ")
|
||||
::
|
||||
^- tape
|
||||
?: =(0 euq.mon) ~
|
||||
(welp (scow %ud (div (mul 100 euq.mon) tot)) "e ")
|
||||
==
|
||||
::
|
||||
++ pi-tell :: produce dump
|
||||
@ -9713,7 +9795,7 @@
|
||||
++ sled $+ [(unit (set monk)) term beam] :: namespace function
|
||||
(unit (unit cage)) ::
|
||||
++ slut $+(* (unit (unit))) :: old namespace
|
||||
++ vile :: reflexive constants
|
||||
++ vile :: reflexive constants
|
||||
$: typ=type :: -:!>(*type)
|
||||
duc=type :: -:!>(*duct)
|
||||
pah=type :: -:!>(*path)
|
||||
@ -9748,21 +9830,21 @@
|
||||
:: section 3bE, Arvo core ::
|
||||
::
|
||||
++ vent :: vane core
|
||||
|= [lal=@tas vil=vile bud=vase ves=vase]
|
||||
|= [lal=@tas vil=vile bud=vase sew=(pair worm vase)]
|
||||
~% %vent +>+ ~
|
||||
|%
|
||||
++ ruck :: update vase
|
||||
|= [pax=path txt=@ta]
|
||||
^+ +>
|
||||
=+ arg=[~2000.1.1 0 =>(~ |+(* ~))]
|
||||
=+ rig=(slym ves arg)
|
||||
=+ rig=(slym q.sew arg)
|
||||
=+ rev=(slym (slap bud (rain pax txt)) bud)
|
||||
=+ syg=(slym rev arg)
|
||||
+>.$(ves (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
|
||||
+>.$(q.sew (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay])))
|
||||
::
|
||||
++ wink :: deploy
|
||||
|= [now=@da eny=@ ski=sled]
|
||||
=+ rig=(slym ves +<) :: activate vane
|
||||
=+ rig=(slym q.sew +<) :: activate vane
|
||||
~% %wink +>+> ~
|
||||
|%
|
||||
++ doze
|
||||
@ -9770,14 +9852,6 @@
|
||||
^- (unit ,@da)
|
||||
((hard (unit ,@da)) q:(slym (slap rig [%cnzy %doze]) +<))
|
||||
::
|
||||
++ sike :: check metatype
|
||||
~/ %sike
|
||||
|= [sub=type ref=*]
|
||||
^- ?
|
||||
:: ?: =(~ ~) &
|
||||
=+ gat=|=([a=type b=type] (~(nest ut a) | b))
|
||||
(,? .*(gat(+< [sub ref]) -.gat))
|
||||
::
|
||||
++ slid
|
||||
|= [hed=mill tal=mill]
|
||||
^- mill
|
||||
@ -9793,56 +9867,74 @@
|
||||
| [%| [%cell typ.vil p.p.hil] p.hil]
|
||||
==
|
||||
::
|
||||
++ slur
|
||||
++ slur :: call gate on
|
||||
|= [gat=vase hil=mill]
|
||||
^- (unit vase)
|
||||
^- (unit (pair vase worm))
|
||||
=+ sam=(slot 6 gat)
|
||||
?. ?- -.hil
|
||||
& (souk p.sam p.p.hil)
|
||||
| (sike p.sam p.p.hil)
|
||||
== ~
|
||||
`(slym gat +>.hil)
|
||||
=+ ^= hig
|
||||
?- -.hil
|
||||
& (~(nest wa p.sew) p.sam p.p.hil)
|
||||
| (~(nets wa p.sew) p.sam p.p.hil)
|
||||
==
|
||||
?.(-.hig ~ `[(slym gat +>.hil) +.hig])
|
||||
::
|
||||
++ souk :: check type
|
||||
~/ %souk
|
||||
|= [sub=type ref=type]
|
||||
:: ?: =(~ ~) &
|
||||
(~(nest ut sub) | ref)
|
||||
++ slur-a ~/(%slur-a |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-b ~/(%slur-b |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-c ~/(%slur-c |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-d ~/(%slur-d |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-e ~/(%slur-e |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-f ~/(%slur-f |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-g ~/(%slur-g |=([gat=vase hil=mill] (slur gat hil)))
|
||||
++ slur-z ~/(%slur-z |=([gat=vase hil=mill] (slur gat hil)))
|
||||
::
|
||||
++ sunk :: type is cell
|
||||
|= ref=type
|
||||
:: ?: =(~ ~) &
|
||||
(souk [%cell %noun %noun] ref)
|
||||
++ slur-pro :: profiling slur
|
||||
~/ %slur-pro
|
||||
|= [lal=@tas gat=vase hil=mill]
|
||||
?+ lal (slur-z gat hil)
|
||||
%a (slur-a gat hil)
|
||||
%b (slur-b gat hil)
|
||||
%c (slur-c gat hil)
|
||||
%d (slur-d gat hil)
|
||||
%e (slur-e gat hil)
|
||||
%f (slur-f gat hil)
|
||||
%g (slur-g gat hil)
|
||||
==
|
||||
::
|
||||
++ song :: reduce metacard
|
||||
~/ %song ::
|
||||
|= mex=vase :: mex: vase of card
|
||||
^- (unit mill) ::
|
||||
?. (sunk p.mex) ~ :: a card is a cell
|
||||
?. ?=(%meta -.q.mex) `[%& mex] :: ordinary card
|
||||
=+ tiv=(slot 3 mex) :: tiv: vase of vase
|
||||
?. (sunk p.tiv) ~ :: a vase is a cell
|
||||
?. (souk typ.vil p:(slot 2 tiv)) ~ :: vase head is type
|
||||
%- biff :_ |=(a=milt `[%| a]) :: milt to mill
|
||||
^- (unit (pair mill worm)) ::
|
||||
=^ hip p.sew (~(nell wa p.sew) p.mex) ::
|
||||
?. hip ~ :: a card is a cell
|
||||
?. ?=(%meta -.q.mex) `[[%& mex] p.sew] :: ordinary card
|
||||
=^ tiv p.sew (~(slot wa p.sew) 3 mex) ::
|
||||
=^ hip p.sew (~(nell wa p.sew) p.tiv) ::
|
||||
?. hip ~ :: a vase is a cell
|
||||
=^ vax p.sew (~(slot wa p.sew) 2 tiv) ::
|
||||
=^ hip p.sew (~(nest wa p.sew) typ.vil p.vax) ::
|
||||
?. hip ~ :: vase head is type
|
||||
%- biff ::
|
||||
:_ |=(a=(pair milt worm) `[[%| p.a] q.a]) :: milt to mill
|
||||
=+ mut=(milt q.tiv) :: card type, value
|
||||
|- ^- (unit milt) ::
|
||||
?. ?=([%meta p=* q=milt] q.mut) `mut :: ordinary metacard
|
||||
?. (sike mev.vil p.mut) ~ :: meta-metacard
|
||||
|- ^- (unit (pair milt worm)) ::
|
||||
?. ?=([%meta p=* q=milt] q.mut) `[mut p.sew] :: ordinary metacard
|
||||
=^ hip p.sew (~(nets wa p.sew) mev.vil p.mut) ::
|
||||
?. hip ~ :: meta-metacard
|
||||
$(mut +.q.mut) :: descend into meta
|
||||
::
|
||||
++ sump :: vase to move
|
||||
~/ %sump
|
||||
|= wec=vase
|
||||
^- (unit move)
|
||||
^- (unit (pair move worm))
|
||||
%+ biff ((soft duct) -.q.wec)
|
||||
|= a=duct
|
||||
%- bind :_ |=(b=arvo `move`[a b])
|
||||
%- bind :_ |=(b=(pair arvo worm) [`move`[a p.b] q.b])
|
||||
=- ?- -.har
|
||||
| ~& [%dead-card p.har] ~ :: XX properly log?
|
||||
& (some p.har)
|
||||
==
|
||||
^= har ^- (each arvo term)
|
||||
=+ caq=(spec (slot 3 wec))
|
||||
^= har ^- (each (pair arvo worm) term)
|
||||
=^ caq p.sew (~(spot wa p.sew) 3 wec)
|
||||
?+ q.caq [%| (cat 3 %funk (,@tas q.caq))]
|
||||
::
|
||||
[%pass p=* q=@tas r=[p=@tas q=*]]
|
||||
@ -9852,37 +9944,45 @@
|
||||
?. ((sane %tas) lal) ~
|
||||
%+ biff ((soft path) p.q.caq)
|
||||
|= pax=path
|
||||
%+ bind (song (spec (slot 15 caq)))
|
||||
|= hil=mill
|
||||
[%& %pass pax lal hil]
|
||||
=^ yav p.sew (~(spot wa p.sew) 15 caq)
|
||||
%+ bind (song yav)
|
||||
|= [hil=mill vel=worm]
|
||||
[%& [%pass pax lal hil] vel]
|
||||
::
|
||||
[%give p=[p=@tas q=*]]
|
||||
%- (bond |.([%| p.p.q.caq]))
|
||||
%+ bind (song (spec (slot 3 caq)))
|
||||
|= hil=mill
|
||||
[%& %give hil]
|
||||
=^ yav p.sew (~(spot wa p.sew) 3 caq)
|
||||
%+ bind (song yav)
|
||||
|= [hil=mill vel=worm]
|
||||
[%& [%give hil] vel]
|
||||
::
|
||||
[%sick p=[p=@tas q=*]]
|
||||
%- (bond |.([%| p.p.q.caq]))
|
||||
%+ bind (song (spec (slot 3 caq)))
|
||||
|= hil=mill
|
||||
[%& %sick hil]
|
||||
=^ yav p.sew (~(spot wa p.sew) 3 caq)
|
||||
%+ bind (song yav)
|
||||
|= [hil=mill vel=worm]
|
||||
[%& [%sick hil] vel]
|
||||
::
|
||||
[%slip p=@tas q=[p=@tas q=*]]
|
||||
%- (bond |.([%| p.q.q.caq]))
|
||||
%+ biff ((soft ,@) p.q.caq)
|
||||
|= lal=@tas
|
||||
?. ((sane %tas) lal) ~
|
||||
%+ bind (song (spec (slot 7 caq)))
|
||||
|= hil=mill
|
||||
[%& %slip lal hil]
|
||||
=^ yav p.sew (~(spot wa p.sew) 7 caq)
|
||||
%+ bind (song yav)
|
||||
|= [hil=mill vel=worm]
|
||||
[%& [%slip lal hil] vel]
|
||||
==
|
||||
::
|
||||
++ said :: vase to (list move)
|
||||
|= vud=vase
|
||||
|- ^- (list move)
|
||||
?: =(~ q.vud) ~
|
||||
[(need (sump (slot 2 vud))) $(vud (slot 3 vud))]
|
||||
|- ^- (pair (list move) worm)
|
||||
?: =(~ q.vud) [~ p.sew]
|
||||
=^ hed p.sew (~(slot wa p.sew) 2 vud)
|
||||
=^ tal p.sew (~(slot wa p.sew) 3 vud)
|
||||
=^ mov p.sew (need (sump hed))
|
||||
=^ moz p.sew $(vud tal)
|
||||
[[mov moz] p.sew]
|
||||
::
|
||||
++ scry :: read namespace
|
||||
~/ %scry
|
||||
@ -9896,7 +9996,7 @@
|
||||
:* fur
|
||||
ren
|
||||
p.bed
|
||||
q.bed
|
||||
q.bed
|
||||
`coin`[%$ r.bed]
|
||||
(flop s.bed)
|
||||
==
|
||||
@ -9910,8 +10010,8 @@
|
||||
++ soar :: scrub vane
|
||||
|= sev=vase
|
||||
^- vase
|
||||
?: &(=(-.q.ves -.q.sev) =(+>.q.ves +>.q.sev))
|
||||
ves :: unchanged, use old
|
||||
?: &(=(-.q.q.sew -.q.sev) =(+>.q.q.sew +>.q.sev))
|
||||
q.sew :: unchanged, use old
|
||||
sev(+<.q [*@da *@ =>(~ |+(* ~))]) :: clear to stop leak
|
||||
::
|
||||
++ swim
|
||||
@ -9921,14 +10021,17 @@
|
||||
hen=duct
|
||||
hil=mill
|
||||
==
|
||||
^- [p=(list move) q=vase]
|
||||
^- [[p=(list move) q=worm] q=vase]
|
||||
:: ~& [%swim-wyt `@ud`~(wyt in p.sew)]
|
||||
=+ ^= pru
|
||||
?~ pux
|
||||
=- ?^(- - ~&([%swim-call-vane lal] -))
|
||||
%+ slur (slap rig [%cnzy %call])
|
||||
~| [%swim-call-vane lal]
|
||||
=^ vax p.sew (~(slap wa p.sew) rig [%cnzy %call])
|
||||
%^ slur-pro lal vax
|
||||
(slid [%& duc.vil hen] (slix hil))
|
||||
=- ?^(- - ~&([%swim-take-vane lal] -))
|
||||
%+ slur (slap rig [%cnzy %take])
|
||||
~| [%swim-take-vane lal]
|
||||
=^ vax p.sew (~(slap wa p.sew) rig [%cnzy %take])
|
||||
%^ slur-pro lal vax
|
||||
;: slid
|
||||
[%& pah.vil u.pux]
|
||||
[%& duc.vil hen]
|
||||
@ -9936,17 +10039,17 @@
|
||||
==
|
||||
?~ pru
|
||||
~& [%swim-lost lal (,@tas +>-.hil)]
|
||||
~> %slog.[1 (skol ?~(-.hil +<.hil (type +<.hil)))]
|
||||
[~ ves]
|
||||
=+ pro=(need pru)
|
||||
:- (said (slap pro [%cnzy %p]))
|
||||
(soar (slap pro [%cnzy %q]))
|
||||
[[~ p.sew] q.sew]
|
||||
=^ pro p.sew (need pru)
|
||||
=^ moz p.sew (~(slap wa p.sew) pro [%cnzy %p])
|
||||
=^ vem p.sew (~(slap wa p.sew) pro [%cnzy %q])
|
||||
[(said moz) (soar vem)]
|
||||
--
|
||||
--
|
||||
::
|
||||
++ vint :: create vane
|
||||
|= [lal=@tas vil=vile bud=vase pax=path txt=@ta] ::
|
||||
(vent lal vil bud (slym (slap bud (rain pax txt)) bud))
|
||||
(vent lal vil bud *worm (slym (slap bud (rain pax txt)) bud))
|
||||
::
|
||||
++ viol :: vane tools
|
||||
|= but=type
|
||||
@ -9959,7 +10062,7 @@
|
||||
==
|
||||
::
|
||||
++ is :: operate in time
|
||||
|= [vil=vile eny=@ bud=vase fan=(list ,[p=@tas q=vase])]
|
||||
|= [vil=vile eny=@ bud=vase niz=(pair worm (list ,[p=@tas q=vase]))]
|
||||
|_ now=@da
|
||||
++ beck
|
||||
^- sled
|
||||
@ -9969,14 +10072,14 @@
|
||||
=+ lal=(end 3 1 ron)
|
||||
=+ ren=(care (rsh 3 1 ron))
|
||||
|- ^- (unit (unit cage))
|
||||
?~ fan ~
|
||||
?. =(lal p.i.fan) $(fan t.fan)
|
||||
%- scry:(wink:(vent lal vil bud q.i.fan) now (shax now) ..^$)
|
||||
?~ q.niz ~
|
||||
?. =(lal p.i.q.niz) $(q.niz t.q.niz)
|
||||
%- scry:(wink:(vent lal vil bud p.niz q.i.q.niz) now (shax now) ..^$)
|
||||
[fur ren bed]
|
||||
::
|
||||
++ dink :: vase by char
|
||||
|= din=@tas ^- vase
|
||||
?~(fan !! ?:(=(din p.i.fan) q.i.fan $(fan t.fan)))
|
||||
?~(q.niz !! ?:(=(din p.i.q.niz) q.i.q.niz $(q.niz t.q.niz)))
|
||||
::
|
||||
++ dint :: input routing
|
||||
|= hap=path ^- @tas
|
||||
@ -9992,12 +10095,12 @@
|
||||
++ doos :: sleep until
|
||||
|= hap=path ^- (unit ,@da)
|
||||
=+ lal=(dint hap)
|
||||
(doze:(wink:(vent lal vil bud (dink lal)) now 0 beck) now [hap ~])
|
||||
(doze:(wink:(vent lal vil bud p.niz (dink lal)) now 0 beck) now [hap ~])
|
||||
::
|
||||
++ hurl :: start loop
|
||||
|= [lac=? ovo=ovum]
|
||||
~? &(!lac !=(%belt -.q.ovo)) [%unix -.q.ovo p.ovo]
|
||||
^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
|
||||
^- [p=(list ovum) q=(pair worm (list ,[p=@tas q=vase]))]
|
||||
?> ?=(^ p.ovo)
|
||||
%+ kick lac
|
||||
:~ :* i.p.ovo
|
||||
@ -10012,27 +10115,27 @@
|
||||
::
|
||||
++ race :: take
|
||||
|= [org=@tas lal=@tas pux=(unit wire) hen=duct hil=mill ves=vase]
|
||||
^- [p=(list move) q=vase]
|
||||
=+ ven=(vent lal vil bud ves)
|
||||
^- [p=[p=(list move) q=worm] q=vase]
|
||||
=+ ven=(vent lal vil bud [p.niz ves])
|
||||
=+ win=(wink:ven now (shax now) beck)
|
||||
(swim:win org pux hen hil)
|
||||
::
|
||||
++ fire :: execute
|
||||
|= [org=term lal=term pux=(unit wire) hen=duct hil=mill]
|
||||
?: &(?=(^ pux) ?=(~ hen))
|
||||
[[[[lal u.pux] (curd +>.hil)]~ ~] fan]
|
||||
=+ naf=fan
|
||||
|- ^- [[p=(list ovum) q=(list muse)] _fan]
|
||||
?~ naf [[~ ~] ~]
|
||||
[[[[lal u.pux] (curd +>.hil)]~ ~] niz]
|
||||
=+ naf=q.niz
|
||||
|- ^- [[p=(list ovum) q=(list muse)] _niz]
|
||||
?~ naf [[~ ~] [p.niz ~]]
|
||||
?. =(lal p.i.naf)
|
||||
=+ tuh=$(naf t.naf)
|
||||
[-.tuh [i.naf +.tuh]]
|
||||
[-.tuh [+<.tuh [i.naf +>.tuh]]]
|
||||
=+ fiq=(race org lal pux hen hil q.i.naf)
|
||||
[[~ (turn p.fiq |=(a=move [lal a]))] [[p.i.naf q.fiq] t.naf]]
|
||||
[[~ (turn p.p.fiq |=(a=move [lal a]))] [q.p.fiq [[p.i.naf q.fiq] t.naf]]]
|
||||
::
|
||||
++ jack :: dispatch card
|
||||
|= [lac=? gum=muse]
|
||||
^- [[p=(list ovum) q=(list muse)] _fan]
|
||||
^- [[p=(list ovum) q=(list muse)] _niz]
|
||||
=. lac |(lac ?=(?(%g %f) p.gum))
|
||||
%+ fire
|
||||
p.gum
|
||||
@ -10068,9 +10171,9 @@
|
||||
++ kick :: new main loop
|
||||
|= [lac=? mor=(list muse)]
|
||||
=| ova=(list ovum)
|
||||
|- ^- [p=(list ovum) q=(list ,[p=@tas q=vase])]
|
||||
?~ mor [(flop ova) fan]
|
||||
=^ nyx fan (jack lac i.mor)
|
||||
|- ^- [p=(list ovum) q=(pair worm (list ,[p=@tas q=vase]))]
|
||||
?~ mor [(flop ova) niz]
|
||||
=^ nyx niz (jack lac i.mor)
|
||||
$(ova (weld p.nyx ova), mor (weld q.nyx t.mor))
|
||||
--
|
||||
--
|
||||
@ -10084,7 +10187,7 @@
|
||||
=+ vil=(viol p.bud) :: cached reflexives
|
||||
=| $: lac=? :: laconic bit
|
||||
eny=@ :: entropy
|
||||
fan=(list ,[p=@tas q=vase]) :: modules
|
||||
niz=(pair worm (list ,[p=@tas q=vase])) :: modules
|
||||
== ::
|
||||
=< |%
|
||||
++ come |= [@ (list ovum) pone] :: 11
|
||||
@ -10128,13 +10231,13 @@
|
||||
++ keep :: wakeup delay
|
||||
|= [now=@da hap=path]
|
||||
=> .(+< ((hard ,[now=@da hap=path]) +<))
|
||||
(~(doos (is vil eny bud fan) now) hap)
|
||||
(~(doos (is vil eny bud niz) now) hap)
|
||||
::
|
||||
++ load :: load compatible
|
||||
|= [yen=@ ova=(list ovum) nyf=pane]
|
||||
^+ [ova +>]
|
||||
=: eny yen
|
||||
fan nyf
|
||||
q.niz nyf
|
||||
==
|
||||
|- ^+ [ova +>.^$]
|
||||
?~ ova
|
||||
@ -10149,7 +10252,7 @@
|
||||
|= [now=@da hap=path]
|
||||
^- (unit)
|
||||
?~ hap [~ hoon]
|
||||
=+ rob=((slod ~(beck (is vil eny bud fan) now)) hap)
|
||||
=+ rob=((slod ~(beck (is vil eny bud niz) now)) hap)
|
||||
?~ rob ~
|
||||
?~ u.rob ~
|
||||
[~ u.u.rob]
|
||||
@ -10159,8 +10262,8 @@
|
||||
=. eny (mix eny (shax now))
|
||||
:: ~& [%poke -.q.ovo]
|
||||
^- [(list ovum) _+>]
|
||||
=^ zef fan
|
||||
(~(hurl (is vil eny bud fan) now) lac ovo)
|
||||
=^ zef niz
|
||||
(~(hurl (is vil eny bud niz) now) lac ovo)
|
||||
[zef +>.$]
|
||||
::
|
||||
++ vega :: reboot kernel
|
||||
@ -10179,7 +10282,7 @@
|
||||
~& [%vega-compiled hoon nex]
|
||||
?> (lte nex hoon)
|
||||
=+ gat=.*(ken .*(ken [0 ?:(=(nex hoon) 86 11)]))
|
||||
=+ sam=[eny ova fan]
|
||||
=+ sam=[eny ova q.niz]
|
||||
=+ raw=.*([-.gat [sam +>.gat]] -.gat)
|
||||
[[[~ %vega hap] ((list ovum) -.raw)] +.raw]
|
||||
::
|
||||
@ -10192,15 +10295,17 @@
|
||||
=+ vax=(slap pit gen)
|
||||
+>.$(bud vax)
|
||||
%_ +>
|
||||
fan
|
||||
|- ^+ fan
|
||||
?~ fan
|
||||
q.niz
|
||||
|- ^+ q.niz
|
||||
?~ q.niz
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
[[lal.fav ves:(vint lal.fav vil bud pax.fav txt.fav)] fan]
|
||||
?. =(lal.fav p.i.fan)
|
||||
[i.fan $(fan t.fan)]
|
||||
[[lal.fav q.sew:(vint lal.fav vil bud pax.fav txt.fav)] q.niz]
|
||||
?. =(lal.fav p.i.q.niz)
|
||||
[i.q.niz $(q.niz t.q.niz)]
|
||||
~& [%vane `@tas`lal.fav pax.fav `@p`(mug txt.fav)]
|
||||
[[p.i.fan ves:(ruck:(vent lal.fav vil bud q.i.fan) pax.fav txt.fav)] t.fan]
|
||||
:_ t.q.niz
|
||||
:- p.i.q.niz
|
||||
q.sew:(ruck:(vent lal.fav vil bud [p.niz q.i.q.niz]) pax.fav txt.fav)
|
||||
==
|
||||
::
|
||||
++ wish :: external compute
|
||||
|
@ -62,7 +62,7 @@
|
||||
=+ lox=((soft axle) old)
|
||||
^+ ..^$
|
||||
?~ lox
|
||||
~& %lunt-reset
|
||||
~& %khan-reset
|
||||
..^$
|
||||
..^$(+>- u.lox)
|
||||
::
|
||||
|
793
main/app/rodeo/core.hook
Normal file
793
main/app/rodeo/core.hook
Normal file
@ -0,0 +1,793 @@
|
||||
::
|
||||
:::: /hook/core/rodeo/app
|
||||
::
|
||||
/? 314
|
||||
/- *rodeo
|
||||
/+ rodeo
|
||||
::
|
||||
::::
|
||||
::
|
||||
!:
|
||||
=> |% :: 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 ::
|
||||
$: stories=(map span story) :: conversations
|
||||
general=(set bone) :: meta-subscribe
|
||||
outbox=(pair ,@ud (map ,@ud thought)) :: urbit outbox
|
||||
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 ::
|
||||
$% [%do p=@t] ::
|
||||
[%exp p=@t q=tank] ::
|
||||
[%say p=@t] ::
|
||||
== == == ::
|
||||
++ story :: 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 %rodeo-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 %rodeo-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
|
||||
$% $: %c ::
|
||||
$% [%info p=@p q=@tas r=nori] ::
|
||||
== == ::
|
||||
$: %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]
|
||||
++ 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 %rodeo-report
|
||||
:- %house
|
||||
%- ~(gas in *(set span))
|
||||
^- (list span)
|
||||
(turn (~(tap by stories) ~) |=([a=span *] a))
|
||||
::
|
||||
++ ra-homes :: update stations
|
||||
=+ gel=general
|
||||
|- ^+ +>
|
||||
?~ gel +>
|
||||
=. +> $(gel l.gel)
|
||||
=. +> $(gel r.gel)
|
||||
(ra-house n.gel)
|
||||
::
|
||||
++ ra-init :: initialize rodeo
|
||||
=+ sir=(sein our.hid)
|
||||
%+ ra-apply our.hid
|
||||
:+ %design (main our.hid)
|
||||
:- ~
|
||||
:_ [%| ~]
|
||||
?:(=(sir our.hid) ~ [[%& sir (main sir)] ~ ~])
|
||||
::
|
||||
++ ra-apply :: apply command
|
||||
|= [her=ship cod=command]
|
||||
^+ +>
|
||||
:: ~& [%ra-apply cod]
|
||||
?- -.cod
|
||||
%design
|
||||
?. =(her our.hid)
|
||||
(ra-evil %rodeo-no-owner)
|
||||
?~ q.cod
|
||||
?. (~(has by stories) p.cod)
|
||||
(ra-evil %rodeo-no-story)
|
||||
=. +>.$ (ra-config p.cod *config)
|
||||
ra-ever(stories (~(del by stories) 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 story
|
||||
|= [man=span con=config]
|
||||
^+ +>
|
||||
=+ :- neu=(~(has by stories) man)
|
||||
pur=(fall (~(get by stories) man) *story)
|
||||
=. +>.$ pa-abet:(~(pa-reform pa man pur) con)
|
||||
?:(neu +>.$ ra-homes)
|
||||
::
|
||||
++ ra-friend :: %friend response
|
||||
|= [man=span sih=sign]
|
||||
^+ +>
|
||||
=+ pur=(~(get by stories) 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 stories) man)
|
||||
?~ pur ~& [%ra-stalk-none man] +>.$
|
||||
pa-abet:(~(pa-stalk pa man u.pur) tay sih)
|
||||
::
|
||||
++ ra-timer :: timeout
|
||||
^+ .
|
||||
=+ paz=stories
|
||||
|- ^+ +>
|
||||
?~ 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]
|
||||
^+ +>
|
||||
!!
|
||||
::
|
||||
++ 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 *] ~&([%rodeo-repeat-rejected num her man sih] %rejected)
|
||||
[%g %nice ~] %received
|
||||
==
|
||||
(ra-think | our.hid u.oot ~)
|
||||
::
|
||||
++ ra-cancel :: drop a bone
|
||||
%_ .
|
||||
general (~(del in general) ost)
|
||||
stories
|
||||
|- ^- (map span story)
|
||||
?~ stories ~
|
||||
:- :- p.n.stories
|
||||
%= q.n.stories
|
||||
guests (~(del by guests.q.n.stories) ost)
|
||||
viewers (~(del in viewers.q.n.stories) ost)
|
||||
owners (~(del in owners.q.n.stories) ost)
|
||||
==
|
||||
[$(stories l.stories) $(stories r.stories)]
|
||||
==
|
||||
::
|
||||
++ ra-subscribe :: listen to
|
||||
|= [her=ship pax=path]
|
||||
^+ +>
|
||||
:: ~& [%ra-subscribe her pax]
|
||||
?: ?=(~ pax)
|
||||
(ra-house(general (~(put in general) ost)) ost)
|
||||
?. ?=([@ @ *] pax)
|
||||
(ra-evil %rodeo-bad-path)
|
||||
=+ ^= vab ^- (set ,@tas)
|
||||
=| vab=(set ,@tas)
|
||||
|- ^+ vab
|
||||
?: =(0 i.pax) vab
|
||||
$(i.pax (rsh 3 1 i.pax), vab (~(put in vab) (end 3 1 i.pax)))
|
||||
=+ pur=(~(get by stories) i.t.pax)
|
||||
?~ pur
|
||||
~& [%bad-subscribe-story-c i.t.pax]
|
||||
(ra-evil %rodeo-no-story)
|
||||
=+ soy=~(. pa i.t.pax u.pur)
|
||||
=. soy ?.((~(has in vab) %a) soy (pa-watch:soy her))
|
||||
=. soy ?.((~(has in vab) %x) soy (pa-master:soy her))
|
||||
=. soy ?.((~(has in vab) %f) soy (pa-listen:soy her t.t.pax))
|
||||
pa-abet:soy
|
||||
::
|
||||
++ 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 %rodeo-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 stories) man)
|
||||
?~ pur
|
||||
~& [%bad-appear man]
|
||||
(ra-evil %rodeo-no-story)
|
||||
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
|
||||
[%rodeo-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-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
|
||||
!!
|
||||
== ==
|
||||
::
|
||||
++ ra-record :: add to story
|
||||
|= [man=span gam=telegram]
|
||||
^+ +>
|
||||
=+ pur=(~(get by stories) man)
|
||||
?~ pur
|
||||
~& [%no-story 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
|
||||
[%rodeo-command !>(`command`[%review tip ~])]
|
||||
==
|
||||
+>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
|
||||
::
|
||||
++ pa :: story core
|
||||
|_ $: man=span
|
||||
story
|
||||
==
|
||||
++ pa-abet
|
||||
^+ +>
|
||||
+>(stories (~(put by stories) man `story`+<+))
|
||||
::
|
||||
++ 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 ~ %rodeo-watch-unauthorized ~] ~])
|
||||
=. viewers (~(put in viewers) ost)
|
||||
(pa-display ost ~ ~)
|
||||
::
|
||||
++ pa-master :: hear config
|
||||
|= her=ship
|
||||
?. (pa-admire her)
|
||||
(pa-sauce ost [[%mean ~ %rodeo-master-unauthorized ~] ~])
|
||||
=. owners (~(put in owners) ost)
|
||||
:: ~& [%pa-master her man shape]
|
||||
(pa-sauce ost [[%rust %rodeo-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 %rodeo-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 %rodeo-report %config shape] ~])
|
||||
::
|
||||
++ pa-friend :: subscribed update
|
||||
|= sih=sign
|
||||
^+ +>
|
||||
?+ sih ~&([%rodeo-bad-friend sih] !!)
|
||||
[%g %nice ~]
|
||||
:: ~& %pa-friend-nice
|
||||
+>.$
|
||||
::
|
||||
[%g %rust %rodeo-report *]
|
||||
:: ~& [%pa-friend-report +>+.sih]
|
||||
?+ -.+>+.sih ~&([%rodeo-odd-friend sih] !!)
|
||||
%config +>.$
|
||||
%group +>.$
|
||||
%grams (pa-lesson q.+.+>+.sih)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ pa-stalk :: subscribed present
|
||||
|= [tay=station sih=sign]
|
||||
^+ +>
|
||||
?+ sih ~&([%rodeo-bad-friend sih] !!)
|
||||
[%g %nice ~]
|
||||
:: ~& %pa-stalk-nice
|
||||
+>.$
|
||||
::
|
||||
[%g %rust %rodeo-report *]
|
||||
?+ -.+>+.sih ~&([%rodeo-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
|
||||
!!
|
||||
::
|
||||
%& :: ~& [%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
|
||||
!!
|
||||
::
|
||||
%& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
|
||||
:~ :- /friend/show/[man]
|
||||
[%g %show [p.p.tay /rodeo] our.hid /af/[q.p.tay]/(scot %ud num)]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ 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
|
||||
%gone (~(del by loc) p.i.dur q.i.dur)
|
||||
%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 %rodeo-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-watch her)
|
||||
=. +> (pa-master her)
|
||||
?. (pa-admire her)
|
||||
(pa-sauce ost [[%mean ~ %rodeo-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)]
|
||||
:: ~& [%pa-listen her pax ruv]
|
||||
?~ ruv
|
||||
(pa-sauce ost [[%mean ~ %rodeo-malformed ~] ~])
|
||||
(pa-start u.ruv)
|
||||
::
|
||||
++ pa-refresh :: update stream
|
||||
|= [num=@ud gam=telegram]
|
||||
:: ~& [%pa-refresh num gam]
|
||||
=+ ^= moy
|
||||
|- ^- (pair (list bone) (list move))
|
||||
?~ guests [~ ~]
|
||||
:: ~& [%pa-refresh num n.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 %rodeo-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-rodeo-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) _+>]
|
||||
:: ~& sih=sih
|
||||
=+ sih=((hard sign) sih)
|
||||
:: ~& [%rodeo-pour ost pax 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 ~)
|
||||
::
|
||||
++ poke-bit
|
||||
|= [ost=bone you=ship ~]
|
||||
^- [(list move) _+>]
|
||||
:_ +>.$
|
||||
=+ paf=/(scot %p our.hid)/try/(scot %da lat.hid)/rodeo/backlog/jam
|
||||
[ost %pass /jamfile %c %info our.hid (foal paf (jam +<+.+>.$))]~
|
||||
::
|
||||
++ prep
|
||||
|= old=(unit (unit house-any))
|
||||
^- [(list move) _+>]
|
||||
?> ?=(^ old)
|
||||
=+ moz=`(list move)`[0 %pass /time %t %wait (add ~s10 lat.hid)]~
|
||||
|-
|
||||
?~ u.old
|
||||
=+ paf=/(scot %p our.hid)/try/(scot %da lat.hid)/rodeo/backlog/jam
|
||||
?. ?=([%0 %0 %0] [.^(%cy paf)])
|
||||
$(u.old (some ((hard house-any) (cue ((hard ,@) .^(%cx paf))))))
|
||||
~& %rodeo-prep-new
|
||||
ra-abet:~(ra-init ra 0 moz)
|
||||
~& %rodeo-prep-old
|
||||
:- moz
|
||||
|-
|
||||
?- -.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
|
||||
=- :* stories=-
|
||||
general=~
|
||||
outbox=[0 ~]
|
||||
sent=~
|
||||
folks=~
|
||||
==
|
||||
^- (map span story)
|
||||
=- %- ~(run by -)
|
||||
|= grams=(list telegram)
|
||||
^- story
|
||||
:* 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 [%lin %& p.r]
|
||||
%do [%lin %| p.r]
|
||||
%exp [%fat [%tank q.r ~] [%exp p.r]]
|
||||
==
|
||||
%+ turn b
|
||||
|= d=zong ^- telegram
|
||||
[q.d (sham eny.hid d) aud p.d (spe r.d)]
|
||||
--
|
File diff suppressed because it is too large
Load Diff
@ -119,7 +119,7 @@
|
||||
?- gal
|
||||
%term [ost %give %rust %hymn page] :: hymn front end
|
||||
%lines [ost %give %rust %term-line tel] :: term-line output
|
||||
==
|
||||
==
|
||||
==
|
||||
::
|
||||
++ poke
|
||||
|
19
main/lib/rodeo/core.hook
Normal file
19
main/lib/rodeo/core.hook
Normal file
@ -0,0 +1,19 @@
|
||||
::
|
||||
:::: /hook/core/rodeo/lib
|
||||
::
|
||||
:: This file is in the public domain.
|
||||
::
|
||||
/? 314
|
||||
/- *rodeo
|
||||
::
|
||||
::::
|
||||
::
|
||||
|%
|
||||
++ main :: main story
|
||||
|= our=ship ^- cord
|
||||
=+ can=(clan our)
|
||||
?+ can %porch
|
||||
%czar %court
|
||||
%king %floor
|
||||
==
|
||||
--
|
91
main/mar/rodeo-command/door.hook
Normal file
91
main/mar/rodeo-command/door.hook
Normal file
@ -0,0 +1,91 @@
|
||||
::
|
||||
:::: /hook/door/rodeo-command/mar
|
||||
::
|
||||
/? 314
|
||||
/- *rodeo
|
||||
!:
|
||||
|_ cod=command
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun command :: clam from %noun
|
||||
++ json
|
||||
=> [jo ..command]
|
||||
|= a=json ^- command
|
||||
=- (need ((of -) a))
|
||||
=< :~ publish/(ar thot)
|
||||
review/(ar thot)
|
||||
design/(ot party/so config/(mu conf) ~)
|
||||
ping/auri
|
||||
==
|
||||
|%
|
||||
++ op :: parse keys of map
|
||||
|* [fel=_rule wit=fist]
|
||||
%+ cu mo
|
||||
%- ci :_ (om wit)
|
||||
|= a=(map cord ,_(need *wit))
|
||||
^- (unit (list ,_[(wonk *fel) (need *wit)]))
|
||||
(zl (turn (~(tap by a)) (head-rush fel)))
|
||||
::
|
||||
++ as :: array as set
|
||||
:: |*(a=fist (cu sa (ar a))) :: XX types
|
||||
|* a=fist
|
||||
%- cu :_ (ar a)
|
||||
~(gas in *(set ,_(need *a)))
|
||||
::
|
||||
++ lake |*(a=_,* $+(json (unit a)))
|
||||
++ peach
|
||||
|* a=_[rule rule]
|
||||
|= tub=nail
|
||||
^- (like (each ,_(wonk (-.a)) ,_(wonk (+.a))))
|
||||
%. tub
|
||||
;~(pose (stag %& -.a) (stag %| +.a))
|
||||
::
|
||||
++ head-rush
|
||||
|* a=_rule
|
||||
|* [b=cord c=*]
|
||||
=+ nit=(rush b a)
|
||||
?~ nit ~
|
||||
(some [u.nit c])
|
||||
::
|
||||
::
|
||||
++ thot
|
||||
^- $+(json (unit thought))
|
||||
%- ot :~
|
||||
serial/(ci (slat %uv) so)
|
||||
audience/audi
|
||||
statement/stam
|
||||
==
|
||||
::
|
||||
++ audi (op stati (ci (soft delivery) so)) :: audience
|
||||
++ auri (op stati (ci (soft presence) so))
|
||||
::
|
||||
++ stati
|
||||
^- $+(nail (like station))
|
||||
%+ peach
|
||||
;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
|
||||
%+ sear (soft partner)
|
||||
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
|
||||
::
|
||||
++ stam
|
||||
^- $+(json (unit statement))
|
||||
=- (ot now/di speech/(of -) ~)
|
||||
:~ own/so
|
||||
say/so
|
||||
lin/(ot say/bo txt/so ~)
|
||||
:: exp/(cu |=(a=cord [a ~]) so)
|
||||
:: inv/(ot ship/(su fed:ag) party/(su urs:ab) ~)
|
||||
==
|
||||
::
|
||||
::
|
||||
++ conf
|
||||
^- $+(json (unit config))
|
||||
%- ot :~
|
||||
sources/(as (su stati))
|
||||
:- %cordon
|
||||
%+ cu |*(a=^ ?~(-.a a a)) :: XX do type stuff
|
||||
(ot white/bu list/(as (su fed:ag)) ~)
|
||||
==
|
||||
--
|
||||
-- --
|
||||
|
93
main/mar/rodeo-report/door.hook
Normal file
93
main/mar/rodeo-report/door.hook
Normal file
@ -0,0 +1,93 @@
|
||||
::
|
||||
:::: /hook/door/rodeo-report/mar
|
||||
::
|
||||
/? 314
|
||||
/- *rodeo
|
||||
!:
|
||||
|_ rep=report
|
||||
::
|
||||
++ grab :: convert from
|
||||
|%
|
||||
++ noun report :: clam from %noun
|
||||
--
|
||||
++ grow
|
||||
|%
|
||||
++ mime [/text/json (taco (crip (pojo json)))]
|
||||
++ json
|
||||
=> +
|
||||
|^ %+ joba -.rep
|
||||
?- -.rep
|
||||
%config ~! rep (conf +.rep)
|
||||
%house [%a (turn (~(tap by +.rep)) joce)]
|
||||
%grams (jobe num/(jone p.rep) tele/[%a (turn q.rep gram)] ~)
|
||||
::%group (grop +.rep)
|
||||
%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))])
|
||||
++ 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)))
|
||||
:: ++ jase
|
||||
:: |* a=,json
|
||||
:: |= b=(set ,_+<.a) ^- json
|
||||
:: ~! b
|
||||
:: [%a (turn (~(tap in b)) a)]
|
||||
::
|
||||
++ jome :: stringify keys
|
||||
|* [a=_cord b=_json]
|
||||
|= c=(map ,_+<.a ,_+<.b)
|
||||
(jobe (turn (~(tap by c)) (both a b)))
|
||||
::
|
||||
++ both :: cons two gates
|
||||
|* [a=_,* b=_,*]
|
||||
|=(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
|
||||
(jobe serial/(jape <p>) audience/(audi q) statement/(stam r) ~)
|
||||
::
|
||||
++ audi (jome stan joce)
|
||||
++ stan
|
||||
|= a=station ^- 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) ~))
|
||||
++ spec
|
||||
|= a=speech
|
||||
%+ joba -.a
|
||||
?+ -.a !!
|
||||
?(%own %say) [%s p.a]
|
||||
%lin (jobe say/[%b p.a] txt/[%s q.a] ~)
|
||||
%exp (jobe code/[%s p.a] done/?~(q.a ~ (joke u.q.a)) ~)
|
||||
:: %inv (jobe ship/(jope p.a) party/[%s q.a] ~)
|
||||
==
|
||||
::
|
||||
++ huma
|
||||
|= human
|
||||
%^ jobe
|
||||
hand/?~(hand ~ [%s u.hand])
|
||||
:- %true
|
||||
?~ true ~
|
||||
=+ u.true
|
||||
(jobe first/[%s p] middle/?~(q ~ [%s u.q]) last/[%s r] ~)
|
||||
~
|
||||
::
|
||||
++ 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
|
||||
==
|
||||
--
|
||||
-- --
|
||||
|
70
main/sur/rodeo/core.hook
Normal file
70
main/sur/rodeo/core.hook
Normal file
@ -0,0 +1,70 @@
|
||||
::
|
||||
:::: /hook/core/rodeo/sur
|
||||
::
|
||||
|%
|
||||
++ ache |*([a=$+(* *) b=$+(* *)] $%([| p=b] [& p=a])) :: PM 314
|
||||
++ 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 (map station presence)] :: declare status
|
||||
== ::
|
||||
++ config :: party configuration
|
||||
$: sources=(set station) :: pulls from
|
||||
cordon=control :: & white, | black
|
||||
== ::
|
||||
++ cousin (pair ship span) :: domestic flow
|
||||
++ control (ache (set ship) (set ship)) :: & white, | black
|
||||
++ delivery :: delivery state
|
||||
$? %pending :: undelivered
|
||||
%received :: delivered
|
||||
%rejected :: undeliverable
|
||||
%released :: sent one-way
|
||||
%accepted :: fully processed
|
||||
== ::
|
||||
++ human :: human identifier
|
||||
$: true=(unit (trel ,@t (unit ,@t) ,@t)) :: true name
|
||||
hand=(unit ,@t) :: handle
|
||||
== ::
|
||||
++ partner :: foreign flow
|
||||
$% [%twitter p=@t] :: twitter
|
||||
== ::
|
||||
++ presence ?(%gone %hear %talk) :: status type
|
||||
++ register (pair atlas (map station atlas)) :: ping me, ping srcs
|
||||
++ report :: unified rush/rust
|
||||
$% [%house (set span)] :: meta-changes
|
||||
[%grams (pair ,@ud (list telegram))] :: beginning, thoughts
|
||||
[%group register] :: presence
|
||||
[%config config] :: reconfigure
|
||||
== ::
|
||||
++ speech :: narrative action
|
||||
:: XX unify %own and %say to %lin
|
||||
::
|
||||
$% [%lan p=span q=@t] :: local announce
|
||||
[%own p=@t] :: XX @ or /me
|
||||
[%exp p=@t] :: hoon line
|
||||
[%non ~] :: no content
|
||||
[%ext p=@tas q=*] :: extended action
|
||||
[%fat p=torso q=speech] :: attachment
|
||||
:: [%inv p=station] :: invite to station
|
||||
[%ire p=serial q=speech] :: in-reply-to
|
||||
[%lin p=? q=@t] :: no=@, text line
|
||||
[%mor p=(list speech)] :: XX deleteme
|
||||
[%say p=@t] :: XX normal line
|
||||
== ::
|
||||
++ serial ,@uvH :: unique identity
|
||||
++ station (each cousin partner) :: interlocutor
|
||||
++ status (pair presence human) :: participant
|
||||
++ statement (pair ,@da speech) :: when this
|
||||
++ telegram (pair ship thought) :: who which whom what
|
||||
++ thought (trel serial audience statement) :: which whom what
|
||||
++ torso :: attachment
|
||||
$% [%text (list ,@t)] :: text lines
|
||||
[%tank (list tank)] :: tank list
|
||||
== ::
|
||||
:: markdown
|
||||
:: image
|
||||
:: mime object
|
||||
--
|
Loading…
Reference in New Issue
Block a user