Merge branch 'talk-split' into remaint-merge-talk

Uncompiled. Untested.

# Conflicts:
#	app/talk.hoon
#	lib/helm.hoon
#	lib/talk.hoon
#	mar/talk/command.hoon
#	mar/talk/report.hoon
#	mar/talk/telegrams.hoon
#	sur/talk.hoon
This commit is contained in:
Fang 2017-10-06 14:46:46 +02:00
commit bb5150819c
13 changed files with 4860 additions and 2682 deletions

2125
app/talk-agent.hoon Normal file

File diff suppressed because it is too large Load Diff

2116
app/talk-guardian.hoon Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,6 @@
:: :: :: :: :: ::
/? 310 :: version /? 310 :: version
/- sole /- sole
/+ talk
[. sole] [. sole]
:: :: :: :: :: ::
:::: :: :: :::: :: ::
@ -59,7 +58,6 @@
++ move (pair bone card) :: user-level move ++ move (pair bone card) :: user-level move
++ pear :: poke fruit ++ pear :: poke fruit
$% {$hood-unsync desk ship desk} :: $% {$hood-unsync desk ship desk} ::
{$talk-command command:talk} ::
{$ask-mail cord} :: {$ask-mail cord} ::
{$helm-hi cord} :: {$helm-hi cord} ::
== :: == ::
@ -155,12 +153,6 @@
=+ fil=.^(@ %cx (welp way /hoon)) =+ fil=.^(@ %cx (welp way /hoon))
[%flog /reload [%veer ?:(=('z' tip) %$ tip) way fil]] [%flog /reload [%veer ?:(=('z' tip) %$ tip) way fil]]
:: ::
++ poke-invite :: send invite; fake
|= {who/@p myl/@t} =< abet
%^ emit %poke /helm/invite
:- [our %talk]
(said:talk our %helm now eny [%leaf "invited: {<who>} at {(trip myl)}"]~)
::
++ poke-reset :: reset system ++ poke-reset :: reset system
|= hood-reset =< abet |= hood-reset =< abet
%- emil %- emil

View File

@ -11,35 +11,217 @@
[. ^talk] [. ^talk]
|_ bol/bowl:gall |_ bol/bowl:gall
++ main :: main story ++ main :: main story
|= our/ship ^- cord |= who/ship
=+ can=(clan:title our) ^- cord
=+ can=(clan:title who)
?+ can %porch ?+ can %porch
$czar %court $czar %court
$king %floor $king %floor
== ==
:: ::
::TODO add to zuse?
++ true-self
|= who/ship
?. ?=($earl (clan who)) who
(sein who)
::
++ above
|= who/ship
?: ?=($czar (clan who)) ~zod
(sein who)
::
::TODO remove when on master, use +- key:by instead
++ key-by
|* m/(map)
=| b/(set _?>(?=(^ m) p.n.m))
|- ^+ b
?~ m b
$(m r.m, b $(m l.m, b (~(put in b) p.n.m)))
::
++ said-url :: app url ++ said-url :: app url
|= url/purl:eyre |= url/purl:eyre
:^ ost.bol %poke /said-url :^ ost.bol %poke /said-url
:+ [our.bol %talk] %talk-command :+ [our.bol %talk] %talk-action
^- command ^- action
:- %publish :+ %phrase
:_ ~ [[our.bol (main our.bol)] ~ ~]
^- thought [%app dap.bol (crip (en-purl:html url))]~ :: XX
:+ (shaf %thot eny.bol)
[[[%& our.bol (main our.bol)] [*envelope %pending]] ~ ~]
[now.bol *bouquet [%app dap.bol (crip (en-purl:html url))]] :: XX
:: ::
++ said :: app message ++ said :: app message
|= {our/@p dap/term now/@da eny/@uvJ mes/(list tank)} |= {our/@p dap/term now/@da eny/@uvJ mes/(list tank)}
:- %talk-command :- %talk-action
^- command ^- action
:- %publish :- %convey
|- ^- (list thought) |- ^- (list thought)
?~ mes ~ ?~ mes ~
:_ $(mes t.mes, eny (sham eny mes)) :_ $(mes t.mes, eny (sham eny mes))
^- thought ^- thought
:+ (shaf %thot eny) :+ (shaf %thot eny)
[[[%& our (main our)] [*envelope %pending]] ~ ~] [[our (main our)] ~ ~]
[now *bouquet [%app dap (crip ~(ram re i.mes))]] [now [%app dap (crip ~(ram re i.mes))]]
::
++ uniq
|= eny/@uvJ
^- (quid serial eny)
[(shaf %serial eny) (shax eny)]
::
++ change-glyphs ::< ...
::>
::
|= {gys/(jug char (set circle)) bin/? gyf/char cis/(set circle)}
^+ gys
:: simple bind.
?: bin (~(put ju gys) gyf cis)
:: unbind all of glyph.
?~ cis (~(del by gys) gyf)
:: unbind single.
(~(del ju gys) gyf cis)
::
++ change-nicks ::< change nick map
::> changes a nickname in a map, adding if it doesn't
::> yet exist, removing if the nickname is empty.
::
|= {nis/(map ship cord) who/ship nic/cord}
^+ nis
?: =(nic '')
(~(del by nis) who)
(~(put by nis) who nic)
::
++ change-config ::< apply config diff
::> applies a config diff to the given config.
::
|= {cof/config dif/diff-config}
^+ cof
?- -.dif
$full cof.dif
$caption cof(cap cap.dif)
$filter cof(fit fit.dif)
$remove cof
::
$source
%= cof
src
%. cir.dif
?: add.dif
~(put in src.cof)
~(del in src.cof)
==
::
$permit
%= cof
ses.con
%. sis.dif
?: add.dif
~(uni in ses.con.cof)
~(dif in ses.con.cof)
==
::
$secure
%= cof
sec.con
sec.dif
::
ses.con
?. .= ?=(?($white $green) sec.dif)
?=(?($white $green) sec.con.cof)
~
ses.con.cof
==
==
::
++ change-status ::< apply status diff
::> applies a status diff to the given status.
::
|= {sat/status dif/diff-status}
^+ sat
?- -.dif
$full sat.dif
$presence sat(pec pec.dif)
$remove sat
::
$human
%= sat
man
?- -.dif.dif
$full man.dif.dif
$true [han.man.sat tru.dif.dif]
$handle [han.dif.dif tru.man.sat]
==
==
==
::
::TODO annotate all!
++ depa :: de-pathing core
=> |% ++ grub * :: result
++ weir (list coin) :: parsed wire
++ fist $-(weir grub) :: reparser instance
--
|%
::
++ al
|* {hed/$-(coin *) tal/fist}
|= wir/weir ^+ [*hed *tal]
?~ wir !!
[(hed i.wir) (tal t.wir)]
::
++ at
|* typ/{@tas (pole @tas)}
=+ [i-typ t-typ]=typ
|= wer/weir
^- (tup:dray i-typ t-typ) ::< ie, (tup %p %tas ~) is {@p @tas}
?~ wer !!
?~ t-typ
?^ t.wer !!
((do i-typ) i.wer)
:- ((do i-typ) i.wer)
(^$(typ t-typ) t.wer)
::
++ mu :: true unit
|* wit/fist
|= wer/weir
?~(wer ~ (some (wit wer)))
::
++ af :: object as frond
|* buk/(pole {cord fist})
|= wer/weir
?> ?=({{$$ $tas @tas} *} wer)
?~ buk !!
=+ [[tag wit] t-buk]=buk
?: =(tag q.p.i.wer)
[tag ~|(tag+`@tas`tag (wit t.wer))]
?~ t-buk ~|(bad-tag+`@tas`q.p.i.wer !!)
(^$(buk t-buk) wer)
::
++ or
|* typ/|-($@(@tas {@tas $}))
|= con/coin
::^- _(snag *@ (turn (limo typ) |*(a/@tas [a (odo:raid a)])))
?> ?=($$ -.con)
=/ i-typ ?@(typ typ -.typ)
?: =(i-typ p.p.con)
:- i-typ
^- (odo:raid i-typ)
q.p.con
?@ typ ~|(%bad-odor !!)
(^$(typ +.typ) con)
::
++ do
|* typ/@tas
=/ typecheck `@tas`typ
|= con/coin
^- (odo:raid typ)
?. ?=($$ -.con) ~|(%not-dime !!)
?. =(typ p.p.con) ~|(bad-odor+`@tas`p.p.con !!)
q.p.con
::
++ ul :: null
|=(wer/weir ?~(wer ~ !!))
::
++ un
|* wit/$-(coin *)
|= wer/weir ^+ *wit
?~ wer !!
?^ t.wer !!
(wit i.wer)
--
-- --

View File

@ -17,8 +17,7 @@
|= a/json ^- command |= a/json ^- command
=- (need ((of -) a)) =- (need ((of -) a))
=< :~ publish+(ar thot) =< :~ publish+(ar thot)
review+(ar thot) bearing+ul
design+(ot party+so config+(mu conf) ~)
== ==
|% |%
++ op :: parse keys of map ++ op :: parse keys of map
@ -42,7 +41,6 @@
|* a/fist |* a/fist
(cu ~(gas in *(set _(need *a))) (ar a)) (cu ~(gas in *(set _(need *a))) (ar a))
:: ::
++ lake |*(a/_* $-(json (unit a)))
++ peach ++ peach
|* a/{rule rule} |* a/{rule rule}
|= tub/nail |= tub/nail
@ -57,13 +55,13 @@
?~ nit ~ ?~ nit ~
(some [u.nit +>->]) (some [u.nit +>->])
:: ::
::
++ thot ++ thot
^- $-(json (unit thought)) ^- $-(json (unit thought))
%- ot :~ %- ot :~
serial+ceri serial+ceri
audience+audi audience+audi
statement+stam date+di
speech+spec
== ==
:: ::
++ ceri ++ ceri
@ -72,56 +70,19 @@
:: ::
++ audi ++ audi
^- $-(json (unit audience)) ^- $-(json (unit audience))
(op parn memb) (as (su circ))
:: ::
++ auri (op parn (ci (soft presence) so)) ++ circ
++ memb (ot [envelope+lope delivery+(ci (soft delivery) so) ~]) ^- $-(nail (like circle))
++ lope (ot [visible+bo sender+(mu (su parn)) ~])
::
++ parn
^- $-(nail (like partner))
%+ peach
;~((glue fas) ;~(pfix sig fed:ag) urs:ab) ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft passport)
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
::
++ speech-or-eval $?(speech {$eval p/@t} {$mor p/(list speech-or-eval)})
++ eval
|= a/(trel @da bouquet speech-or-eval)
^- statement
%= a r ^- speech
|-
?: ?=($mor -.r.a)
[%mor (turn p.r.a |=(b/speech-or-eval ^$(r.a b)))]
?. ?=($eval -.r.a) r.a
=- [%fat tank+- %exp p.r.a]
=+ pax=[&1:% &2:% (scot %da p.a) |3:%]
p:(mule |.([(sell (slap !>(..zuse) (rain pax p.r.a)))]~))
==
::
++ stam
^- $-(json (unit statement))
%+ cu eval
(ot date+di bouquet+(as (ar so)) speech+spec ~)
:: ::
++ spec ++ spec
%+ ke *speech-or-eval |. ^- $-(json (unit speech))
%- of %- of :~
:~ lin+(ot say+bo txt+so ~) lin+(ot say+bo txt+so ~)
url+(su aurf:urlp) url+(su aurf:urlp)
eval+so
mor+(ar spec)
:: exp+(cu |=(a=cord [a ~]) so) :: exp+(cu |=(a=cord [a ~]) so)
:: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~)
== ==
::
++ conf
^- $-(json (unit config))
%- ot :~
sources+(as (su parn))
caption+so
:- %cordon
(ot posture+(ci (soft posture) so) list+(as (su fed:ag)) ~)
==
-- --
-- -- -- --

14
mar/talk/prize.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/prize/talk/mar
::
/? 310
/- talk
!:
[talk .]
|_ piz/prize
::
++ grab :: convert from
|%
++ noun prize :: clam from %noun
--
--

View File

@ -23,21 +23,19 @@
=> + => +
|^ %+ joba -.rep |^ %+ joba -.rep
?- -.rep ?- -.rep
$cabal (cabl +.rep) $lobby (loby cab.rep)
$house a+(turn ~(tap by +.rep) jose) $grams (jobe num+(jone num.rep) tele+[%a (turn gaz.rep gram)] ~)
$glyph ((jome |=(a/char a) nack) +.rep) $crowd %^ jobe
$grams (jobe num+(jone p.rep) tele+[%a (turn q.rep gram)] ~) local+(grop loc.reg.rep)
$group (jobe local+(grop p.rep) global+%.(q.rep (jome parn grop)) ~) global+%.(rem.reg.rep (jome parn grop))
~
== ==
++ joce |=(a/knot [%s a]) ++ joce |=(a/knot [%s a])
++ jose
|= {a/knot b/posture c/cord}
(jobe name+[%s a] posture+[%s a] caption+[%s b] ~)
:: ::
++ jove ++ jove
|= {a/envelope b/delivery} |= {a/envelope b/delivery}
%- jobe :~ %- jobe :~
envelope+(jobe visible+[%b p.a] sender+?~(q.a ~ s+(parn u.q.a)) ~) envelope+(jobe visible+[%b vis.a] sender+?~(sen.a ~ s+(parn u.sen.a)) ~)
delivery+[%s b] delivery+[%s b]
== ==
++ jope |=(a/ship (jape +:<a>)) ::[%s (crip +:(scow %p a))]) ++ jope |=(a/ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
@ -56,11 +54,11 @@
++ nack |=(a/(set (set partner)) [%a (turn ~(tap in a) sorc)]) ++ nack |=(a/(set (set partner)) [%a (turn ~(tap in a) sorc)])
++ grop (jome phon stas) :: (map ship status) ++ grop (jome phon stas) :: (map ship status)
++ phon |=(a/ship (scot %p a)) ++ phon |=(a/ship (scot %p a))
++ stas |=(status (jobe presence+(joce p) human+(huma q) ~)) ++ stas |=(status (jobe presence+(joce pec) human+(huma man) ~))
++ gram |=(telegram (jobe ship+(jope p) thought+(thot q) ~)) ++ gram |=(telegram (jobe ship+(jope aut) thought+(thot tot) ~))
++ thot ++ thot
|= thought |= thought
(jobe serial+(jape <p>) audience+(audi q) statement+(stam r) ~) (jobe serial+(jape <uid>) audience+(audi aud) statement+(stam sam) ~)
:: ::
++ audi (jome parn jove) ++ audi (jome parn jove)
++ bouq ++ bouq
@ -70,31 +68,31 @@
++ parn ++ parn
|= a/partner ^- cord |= a/partner ^- cord
?- -.a ?- -.a
$& (stat p.a) $& (circ p.a)
$| %- crip $| %- crip
?- -.p.a ?- -.p.a
$twitter "{(trip -.p.a)}/{(trip p.p.a)}" $twitter "{(trip -.p.a)}/{(trip p.p.a)}"
== ==
== ==
:: ::
++ stat ++ circ
|= a/station ^- cord |= a/circle ^- cord
(crip "{<p.a>}/{(trip q.a)}") (crip "{<hos.a>}/{(trip nom.a)}")
:: ::
++ stam ++ stam
|= statement |= statement
(jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) (jobe date+(jode wen) bouquet+(bouq boq) speech+(spec sep) ~)
:: ::
++ spec ++ spec
|= a/speech |= a/speech
%+ joba -.a %+ joba -.a
?+ -.a ~|(stub+-.a !!) ?+ -.a ~|(stub+-.a !!)
$lin (jobe txt+[%s q.a] say+[%b p.a] ~) $lin (jobe txt+[%s msg.a] say+[%b pat.a] ~)
$url (joba txt+[%s (crip (earf p.a))]) $url (joba txt+[%s (crip (earf url.a))])
$exp (joba txt+[%s p.a]) $exp (joba txt+[%s exp.a])
$app (jobe txt+[%s q.a] src+[%s p.a] ~) $fat (jobe tor+(tach tac.a) taf+$(a sep.a) ~)
$fat (jobe tor+(tors p.a) taf+$(a q.a) ~) $mor a+(turn ses.a spec)
$mor a+(turn p.a spec) $app (jobe txt+[%s msg.a] src+[%s app.a] ~)
$api $api
%- jobe :~ %- jobe :~
service+s+service.a service+s+service.a
@ -108,30 +106,30 @@
:: %inv (jobe ship+(jope p.a) party+[%s q.a] ~) :: %inv (jobe ship+(jope p.a) party+[%s q.a] ~)
== ==
:: ::
++ tors ++ tach
|= a/torso |= a/attache
%+ joba -.a %+ joba -.a
?- -.a ?- -.a
$text [%s (of-wain +.a)] $text [%s (of-wain +.a)]
$tank [%a (turn +.a joke)] $tank [%a (turn +.a joke)]
$name (jobe nom+s+p.a mon+$(a q.a) ~) $name (jobe nom+s+nom.a mon+$(a tac.a) ~)
== ==
:: ::
++ huma ++ huma
|= human |= human
%^ jobe %^ jobe
hand+?~(hand ~ [%s u.hand]) hand+?~(han ~ [%s u.han])
:- %true :- %true
?~ true ~ ?~ tru ~
=+ u.true =+ u.tru
(jobe first+[%s p] middle+?~(q ~ [%s u.q]) last+[%s r] ~) (jobe first+[%s p] middle+?~(q ~ [%s u.q]) last+[%s r] ~)
~ ~
:: ::
++ cabl ++ loby
|= cabal |= lobby
%- jobe :~ %- jobe :~
loc+(conf loc) loc+(conf loc)
ham+((jome stat conf) ham) ham+((jome circ conf) rem)
== ==
:: ::
++ sorc ++ sorc
@ -141,10 +139,10 @@
++ conf ++ conf
|= config |= config
%- jobe :~ %- jobe :~
sources+(sorc sources) sources+(sorc src)
caption+[%s caption] caption+[%s cap]
=- cordon+(jobe posture+[%s -.cordon] list+[%a -] ~) =- control+(jobe security+[%s -.con] list+[%a -] ~)
(turn ~(tap in q.cordon) jope) :: XX jase (turn (~(tap in ses.con)) jope) :: XX jase
== ==
-- --
-- -- -- --

14
mar/talk/rumor.hoon Normal file
View File

@ -0,0 +1,14 @@
::
:::: /hoon/rumor/talk/mar
::
/? 310
/- talk
!:
[talk .]
|_ dif/rumor
::
++ grab :: convert from
|%
++ noun rumor :: clam from %noun
--
--

View File

@ -19,27 +19,35 @@
++ json ++ json
=> [dejs talk old-zuse] => [dejs talk old-zuse]
|= a/json ^- (list telegram) |= a/json ^- (list telegram)
%. a =- (need ((ar (ot ship+(su fed:ag) thought+thot ~)) a))
|^ (ar (ot ship+(su fed:ag) thought+thot ~)) |%
:: ++ of ++ of
:: |* a/(pole {@tas fist}) |* a/(pole {@tas fist})
:: |= b/json |= b/json
:: %. ((of:jo a) b) %. ((of:jo a) b)
:: %- slog %- slog
:: ?+ b ~ ?+ b ~
:: {$o *} {$o *}
:: %+ murn `(list {@tas fist})`a %+ murn `(list {@tas fist})`a
:: |= {c/term d/fist} ^- (unit tank) |= {c/term d/fist} ^- (unit tank)
:: =+ (~(get by p.b) c) =+ (~(get by p.b) c)
:: ?~ - ~ ?~ - ~
:: =+ (d u) =+ (d u)
:: ?~ - (some >[c u]<) ?~ - (some >[c u]<)
:: ~ ~
:: == ==
++ op :: parse keys of map
|* {fel/rule wit/fist}
%+ cu malt
%+ ci
|= a/(map cord _(need *wit))
^- (unit (list _[(wonk *fel) (need *wit)]))
(zl (turn (~(tap by a)) (head-rush fel)))
(om wit)
:: ::
++ as :: array as set ++ as :: array as set
|* a/fist |* a/fist
(cu ~(gas in *(set _*a)) (ar a)) (cu ~(gas in *(set _(need *a))) (ar a))
:: ::
++ ke :: callbacks ++ ke :: callbacks
|* {gar/* sef/_|.(fist)} |* {gar/* sef/_|.(fist)}
@ -58,25 +66,20 @@
++ thot ++ thot
^- $-(json thought) ^- $-(json thought)
%- ot :~ %- ot :~
serial+`$-(json serial)`(ci (slat %uv) so) serial+`$-(json (unit serial))`(ci (slat %uv) so)
audience+`$-(json audience)`audi audience+`$-(json (unit audience))`audi
statement+`$-(json statement)`stam statement+`$-(json (unit statement))`stam
== ==
:: ::
++ audi `$-(json audience)`(op parn memb) ++ audi `$-(json (unit audience))`circ
++ auri (op parn (ci (soft presence) so)) ++ auri (op circ (ci (soft presence) so))
++ memb ^- $-(json (pair envelope delivery)) ++ lope (ot visible+bo sender+(mu (su circ)) ~)
(ot envelope+lope delivery+(cu (hard delivery) so) ~)
++ lope (ot visible+bo sender+(mu (su parn)) ~)
:: ::
++ parn ++ circ
^- $-(nail (like partner)) ^- $-(nail (like circle))
%+ pick
;~((glue fas) ;~(pfix sig fed:ag) urs:ab) ;~((glue fas) ;~(pfix sig fed:ag) urs:ab)
%+ sear (soft passport)
;~((glue fas) sym urs:ab) :: XX [a-z0-9_]{1,15}
:: ::
++ stam (ot date+di bouquet+(as (ar so)) speech+spec ~) ++ stam (ot date+di speech+spec ~)
++ spec ++ spec
%+ ke *speech |. ~+ %+ ke *speech |. ~+
%- of :~ %- of :~
@ -85,9 +88,6 @@
exp+(ot txt+so ~) exp+(ot txt+so ~)
app+(ot txt+so src+so ~) app+(ot txt+so src+so ~)
fat+(ot tor+tors taf+spec ~) fat+(ot tor+tors taf+spec ~)
ext+(ot nom+so txe+blob ~)
non+ul
mor+(ar spec)
:: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~) :: inv+(ot ship+(su fed:ag) party+(su urs:ab) ~)
== ==
++ tors ++ tors
@ -111,14 +111,7 @@
:- %a :- %a
%+ turn gam %+ turn gam
|= telegram |= telegram
(jobe ship+(jope p) thought+(thot q) ~) (jobe ship+(jope aut) thought+(thot tot) ~)
::
++ 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))]) ++ jope |=(a/ship (jape +:<a>)) ::[%s (crip +:(scow %p a))])
++ joke |=(a/tank (jape (of-wall (wash 0^80 a)))) ++ joke |=(a/tank (jape (of-wall (wash 0^80 a))))
@ -126,46 +119,27 @@
:: ::
++ thot ++ thot
|= thought |= thought
(jobe serial+(jape <p>) audience+(audi q) statement+(stam r) ~) (jobe serial+(jape <uid>) audience+(audi aud) statement+(stam sam) ~)
:: ::
++ audi (map-to-json parn jove) ++ audi (set-to-json circ)
++ bouq
|= a/bouquet
a+(turn ~(tap in a) |=(b/path a+(turn b |=(c/knot s+c))))
:: ::
++ parn ++ circ
|= a/partner ^- cord |= a/circle ^- cord
?- -.a (crip "{<hos.a>}/{(trip nom.a)}")
$& (stat p.a)
$| %- crip
?- -.p.a
$twitter "{(trip -.p.a)}/{(trip p.p.a)}"
==
==
::
++ stat
|= a/station ^- cord
(crip "{<p.a>}/{(trip q.a)}")
:: ::
++ stam ++ stam
|= statement |= statement
(jobe date+(jode p) bouquet+(bouq q) speech+(spec r) ~) (jobe date+(jode wen) speech+(spec sep) ~)
:: ::
++ spec ++ spec
|= a/speech |= a/speech
%+ joba -.a %+ joba -.a
?+ -.a ~|(stub+-.a !!) ?+ -.a ~|(stub+-.a !!)
$lin (jobe txt+[%s q.a] say+[%b p.a] ~) $lin (jobe txt+[%s msg.a] say+[%b pat.a] ~)
$url (joba txt+(jape (earf p.a))) $url (joba txt+(jape (earf url.a)))
$exp (joba txt+[%s p.a]) $exp (joba txt+[%s exp.a])
$app (jobe txt+[%s q.a] src+[%s p.a] ~) $fat (jobe tor+(tors tac.a) taf+$(a sep.a) ~)
$fat (jobe tor+(tors p.a) taf+$(a q.a) ~) $app (jobe txt+[%s msg.a] src+[%s app.a] ~)
$ext (jobe nom+[%s p.a] txe+(jape (sifo (jam +.a))) ~)
$non ~
$mor :- %a
|- ^- (list json)
?~ p.a ~
[^$(a i.p.a) $(p.a t.p.a)]
:: $inv (jobe ship+(jope p.a) party+[%s q.a] ~) :: $inv (jobe ship+(jope p.a) party+[%s q.a] ~)
== ==
:: ::
@ -175,7 +149,7 @@
?- -.a ?- -.a
$text [%s (of-wain +.a)] $text [%s (of-wain +.a)]
$tank (jobe txt+[%a (turn +.a joke)] dat+(jape (sifo (jam +.a))) ~) $tank (jobe txt+[%a (turn +.a joke)] dat+(jape (sifo (jam +.a))) ~)
$name (jobe nom+s+p.a mon+$(a q.a) ~) $name (jobe nom+s+nom.a mon+$(a tac.a) ~)
== ==
:: ::
-- --

View File

@ -1,90 +1,288 @@
:: ::
:::: /hoon/talk/sur :::: /hoon/talk/sur
:: !:
|% |%
++ audience (map partner (pair envelope delivery)) :: destination+state ::
++ atlas (map ship status) :: presence map ::TODO use different words for different kinds of burdens
++ bouquet (set flavor) :: complete aroma ::
++ command :: effect on party ::> ||
$% {$design (pair knot (unit config))} :: configure+destroy ::> || %wrappers
{$publish (list thought)} :: originate ::> ||
{$review (list thought)} :: deliver ::> wrapper molds, for semantic clarity.
::+|
::
::TODO rename
++ naem term ::< circle name
++ nick cord ::< local nickname
::
::> ||
::> || %query-models
::> ||
::> models relating to queries, their results and updates.
::+|
::
++ query ::> query paths
$% {$reader $~} ::< shared ui state
{$burden who/ship} ::< duties to share
{$report $~} ::< duty reports
{$circle nom/naem ran/range} ::< story query
::{$circle nom/naem wat/circle-data} ::< story query
:: okay, the problem here is that we want to have
:: separate subscriptions for the different kinds
:: of story data. we can do that, but then if we
:: want all data and a specific range for the
:: messages (very common) then we need to do
:: three separate subscriptions.
:: possible solution would be adding range to all
:: story queries, but that feels weird irt
:: presence and configs.
:: (also, that would make for poor query design:
:: having a ~ halfway through is ugly.)
::
:: /circle/name/range
:: /circle/name/all
:: /circle/name/grams/range
:: /circle/name/crowd/local
:: /circle/name/grams&crowd/range/local
:: /circle/name/grams
:: /circle/name/crowd
::
::TODO look at graphql and think about doing
:: multiple queries in a single %peer.
== :: == ::
++ cabal :: metaconfiguration ::++ circle-data ::> queried data
$: loc/config :: local config :: $% {$all $~} ::< everything, always
ham/(map station config) :: neighborhood configs :: {$grams ran/range} ::< messages (in range)
:: {$crowd wer/where} ::< presence
:: {$lobby wer/where} ::< configurations
:: == ::
++ range ::> inclusive msg range
%- unit ::< ~ means everything
$: hed/place ::< start of range
tal/(unit place) ::< opt end of range
== :: == ::
++ config :: party configuration ++ place ::> range indicators
$: sources/(set partner) :: pulls from $% {$da @da} ::< date
caption/cord :: about {$ud @ud} ::< message number
cordon/control :: restricted to
== :: == ::
++ control (pair posture (set ship)) :: access control ::TODO overlaps with agent's ++where
++ delivery :: delivery state ::++ where ::> data from
$? $pending :: undelivered :: %- unit ::< ~ means everywhere
$received :: delivered :: ?($local $remote) ::< local or remote only
$rejected :: undeliverable ++ prize ::> query result
$released :: sent one-way $% {$reader prize-reader} ::< /reader
$accepted :: fully processed {$friend cis/(set circle)} ::< /friend
{$burden sos/(map naem burden)} ::< /burden
::TODO do we ever use remote things from remote circles?
{$circle package} ::< /circle
== :: == ::
++ envelope (pair ? (unit partner)) :: visible sender ++ prize-reader ::
++ flavor path :: content flavor $: gys/(jug char (set circle)) ::< glyph bindings
++ human :: human identifier nis/(map ship nick) ::< local nicknames
$: true/(unit (trel @t (unit @t) @t)) :: true name
hand/(unit @t) :: handle
== :: == ::
++ passport :: foreign flow ++ rumor ::< query result change
$% {$twitter p/@t} :: twitter $% {$reader rum/rumor-reader} ::< /reader
{$friend add/? cir/circle} ::< /friend
{$burden nom/naem rum/rumor-story} ::< /burden
{$circle rum/rumor-story} ::< /circle
== :: == ::
++ posture :: security posture ++ rumor-reader ::< changed ui state
$? $black :: channel $% {$glyph diff-glyph} ::< un/bound glyph
$white :: chamber {$nick diff-nick} ::< changed nickname
$green :: journal
$brown :: mailbox
== :: == ::
++ presence ?($gone $hear $talk) :: status type ++ burden ::< full story state
++ register (pair atlas (map partner atlas)) :: ping me, ping srcs $: gaz/(list telegram) ::< all messages
++ shelf (map knot (pair posture cord)) :: ship shape cos/lobby ::< loc & rem configs
++ report :: talk update pes/crowd ::< loc & rem presences
$% {$cabal cabal} :: config neighborhood
:: {$folder (list report)} :: multiple
{$grams (pair @ud (list telegram))} :: beginning thoughts
{$group register} :: presence
{$house shelf} :: station set
{$glyph (jug char (set partner))} :: relevant binding
== :: == ::
++ speech :: narrative action ++ package ::< story state
$% {$lan p/knot q/@t} :: local announce $: nes/(list envelope) ::< messages
{$exp p/@t} :: hoon line cos/lobby ::< loc & rem configs
{$non $~} :: no content (yo) pes/crowd ::< loc & rem presences
{$ext p/@tas q/*} :: extended action
{$fat p/torso q/speech} :: attachment
:: {$inv p/station} :: invite to station
{$url p/purf:eyre} :: parsed url
{$ire p/serial q/speech} :: in-reply-to
{$lin p/? q/@t} :: no/@ text line
{$mor p/(list speech)} :: multiplex
{$app p/@tas q/@t} :: app message
$: $api :: api message
service/@tas :: service name
id/@t :: id on the service
id-url/purf:eyre :: link to id
summary/@t :: summary of event
body/@t :: body of event
url/purf:eyre :: link to event
meta/json :: other data for web
== :: == ::
::TODO deltas into app
++ delta ::
$% :: messaging state ::
{$out cir/circle out/(list thought)} ::< send msgs to circle
{$done cir/circle ses/(list serial) res/delivery} ::< set delivery state
:: shared ui state ::
{$glyph diff-glyph} ::< un/bound glyph
{$nick diff-nick} ::< changed nickname
:: story state ::
{$story nom/naem det/delta-story} ::< change to story
:: side-effects ::
{$init $~} ::< initialize
{$observe who/ship} ::< watch burden bearer
{$present hos/ship nos/(set naem) dif/diff-status}::< send %present cmd
{$quit ost/bone} ::< force unsubscribe
== :: == ::
++ serial @uvH :: unique identity ++ diff-glyph {bin/? gyf/char pas/(set circle)} ::< un/bound glyph
++ partner (each station passport) :: interlocutor ++ diff-nick {who/ship nic/nick} ::< changed nickname
++ status (pair presence human) :: participant ++ delta-story ::> story delta
++ statement (trel @da bouquet speech) :: when this $? diff-story ::< both in & outward
++ station (pair ship knot) :: domestic flow $% {$inherited ihr/?} ::< inherited flag
++ telegram (pair ship thought) :: who which whom what {$follow sub/? cos/(map circle range)} ::< un/subscribe
++ thought (trel serial audience statement) :: which whom what {$sequent cir/circle num/@ud} ::< update last-heard
++ torso :: attachment {$gram gam/telegram} ::< new/changed msgs
$% {$name (pair @t torso)} :: named attachment == == ::
{$text (list @t)} :: text lines ++ diff-story ::> story change
{$tank (list tank)} :: tank list $% {$new cof/config} ::< new story
{$bear bur/burden} ::< new inherited story
{$config cir/circle dif/diff-config} ::< new/changed config
{$status cir/circle who/ship dif/diff-status} ::< new/changed status
{$remove $~} ::< removed story
== ::
++ rumor-story ::> story rumor
$? diff-story ::< both in & outward
$% {$gram nev/envelope} ::< new/changed msgs
== == ::
++ diff-config ::> config change
::TODO maybe just full? think.
$% {$full cof/config} ::< set w/o side-effects
{$source add/? cir/circle} ::< add/rem sources
{$caption cap/cord} ::< changed description
{$filter fit/filter} ::< changed filter
{$secure sec/security} ::< changed security
{$permit add/? sis/(set ship)} ::< add/rem to b/w-list
{$remove $~} ::< removed config
== ::
++ diff-status ::> status change
$% {$full sat/status} ::< fully changed status
{$presence pec/presence} ::< changed presence
{$human dif/diff-human} ::< changed name
{$remove $~} ::< removed config
== ::
++ diff-human ::> name change
$% {$full man/human} ::< fully changed name
{$true tru/(unit (trel cord (unit cord) cord))} ::< changed true name
{$handle han/(unit cord)} ::< changed handle
== ::
::
::> ||
::> || %reader-communication
::> ||
::> broker interfaces for readers.
::+|
::
++ action ::> user action
$% :: circle configuration ::
{$create nom/naem des/cord sec/security} ::< create circle
{$delete nom/naem why/(unit cord)} ::< delete + announce
{$depict nom/naem des/cord} ::< change description
{$filter nom/naem fit/filter} ::< change message rules
{$permit nom/naem inv/? sis/(set ship)} ::< invite/banish
{$source nom/naem sub/? src/(map circle range)} ::< un/sub to/from src
:: messaging ::
{$convey tos/(list thought)} ::< post exact
{$phrase aud/(set circle) ses/(list speech)} ::< post easy
:: personal metadata ::
{$notify cis/(set circle) pes/presence} ::< our presence update
{$naming cis/(set circle) man/human} ::< our name update
:: changing shared ui ::
{$glyph gyf/char pas/(set circle) bin/?} ::< un/bind a glyph
{$nick who/ship nic/nick} ::< new identity
== ::
::
::> ||
::> || %broker-communication
::> ||
::> structures for communicating between brokers.
::+|
::
++ command ::> effect on story
$% {$publish tos/(list thought)} ::< deliver
{$present nos/(set naem) dif/diff-status} ::< status update
{$bearing $~} ::< prompt to listen
== ::
::
::> ||
::> || %circles
::> ||
::> messaging targets and their metadata.
::+|
::
++ circle {hos/ship nom/naem} ::< native target
:: circle configurations. ::
++ lobby {loc/config rem/(map circle config)} ::< our & srcs configs
++ config ::> circle config
$: src/(set circle) ::< active sources
::TODO ^ include range? just remove!
cap/cord ::< description
fit/filter ::< message rules
con/control ::< restrictions
== ::
++ filter ::> content filters
$: cas/? ::< dis/allow capitals
utf/? ::< dis/allow non-ascii
::TODO maybe message length
== ::
++ control {sec/security ses/(set ship)} ::< access control
++ security ::> security mode
$? $black ::< channel, blacklist
$white ::< village, whitelist
$green ::< journal, author list
$brown ::< mailbox, our r, bl w
== ::
:: participant metadata. ::
::TODO think about naming more
++ crowd {loc/group rem/(map circle group)} ::< our & srcs presences
++ group (map ship status) ::< presence map
++ status {pec/presence man/human} ::< participant
++ presence ::> status type
$? $gone ::< absent
$idle ::< idle
$hear ::< present
$talk ::< typing
== ::
++ human ::> human identifier
$: han/(unit cord) ::< handle
tru/(unit (trel cord (unit cord) cord)) ::< true name
== ::
::
::> ||
::> || %message-data
::> ||
::> structures for containing main message data.
::+|
::
::TODO some structure for extra message state
:: local (to readers): delivery state, read flags
:: remote (to halls): sequence nr
++ envelope {num/@ud gam/telegram} ::< outward message
++ telegram {aut/ship thought} ::< whose message
++ thought ::> inner message
$: uid/serial ::< unique identifier
aud/audience ::< destinations
wen/@da ::< timestamp
sep/speech ::< content
== ::
++ speech ::> content body
$% {$lin pat/? msg/cord} ::< no/@ text line
{$url url/purf} ::< parsed url
{$exp exp/cord res/(list tank)} ::< hoon line
{$ire top/serial sep/speech} ::< in reply to
{$fat tac/attache sep/speech} ::< attachment
{$inv inv/? cir/circle} ::< inv/ban for circle
{$app app/term msg/cord} ::< app message
== ::
++ attache ::> attachment
$% {$name nom/cord tac/attache} ::< named attachment
{$text (list cord)} ::< text lines
{$tank (list tank)} ::< tank list
== ::
::
::> ||
::> || %message-metadata
::> ||
:: structures for containing message metadata.
::+|
::
++ serial @uvH ::< unique identifier
++ audience (set circle) ::< destinations
++ tracking (map circle delivery) ::> delivery per target
++ delivery ::> delivery state
$? $pending ::< undelivered
$accepted ::< received
$rejected ::< denied
== :: == ::
-- --