mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 22:55:03 +03:00
Newly updated in-between commit for delta-model talk. tmp
This commit is contained in:
parent
076f3a0ac4
commit
23cd3ad758
@ -224,6 +224,37 @@
|
||||
^+ +>
|
||||
sh-done:(~(sh-reaction sh cli) rac)
|
||||
::
|
||||
++ ta-change ::< apply change
|
||||
::>
|
||||
::
|
||||
|= dif/delta
|
||||
^+ +>
|
||||
?+ -.dif
|
||||
~& [%ignoring-delta -.dif]
|
||||
+>
|
||||
::
|
||||
$mor
|
||||
|- ^+ +>.^$
|
||||
?~ mor.dif +>.^$
|
||||
$(+>.^$ ^$(dif i.mor.dif), mor.dif t.mor.dif)
|
||||
::
|
||||
$cir
|
||||
(ta-change-circle +.dif)
|
||||
==
|
||||
::
|
||||
++ ta-change-circle ::< apply circle change
|
||||
::>
|
||||
::
|
||||
|= {cir/circle dif/delta-circle}
|
||||
^+ +>
|
||||
?+ -.dif
|
||||
~& [%ignoring-delta-circle -.dif]
|
||||
+>
|
||||
::
|
||||
$put
|
||||
(ta-low-grams count.cli gaz.dif)
|
||||
==
|
||||
::
|
||||
++ ta-low ::< apply lowdown
|
||||
::> processes a talk lowdown
|
||||
::
|
||||
@ -2120,6 +2151,14 @@
|
||||
[~ +>]
|
||||
ta-done:ta-console:ta
|
||||
::
|
||||
++ diff-talk-delta ::< accept change
|
||||
::>
|
||||
::TODO ++feel
|
||||
::
|
||||
|= {way/wire dif/delta}
|
||||
^- (quip move +>)
|
||||
ta-done:(ta-change:ta dif)
|
||||
::
|
||||
++ diff-talk-lowdown ::< accept lowdown
|
||||
::> incoming talk-lowdown. process it.
|
||||
::> we *could* use the wire to identify what story
|
||||
|
File diff suppressed because it is too large
Load Diff
113
lib/talk.hoon
113
lib/talk.hoon
@ -42,6 +42,117 @@
|
||||
::
|
||||
++ uniq
|
||||
|= eny/@uvJ
|
||||
^- {@uvH _eny}
|
||||
^- (quid serial eny)
|
||||
[(shaf %serial eny) (shax eny)]
|
||||
::
|
||||
++ change-glyphs ::< ...
|
||||
::>
|
||||
::
|
||||
|= {gys/(jug char (set partner)) bin/? gyf/char pas/(set partner)}
|
||||
^+ gys
|
||||
:: simple bind.
|
||||
?: bin (~(put ju gys) gyf pas)
|
||||
:: unbind all of glyph.
|
||||
?~ pas (~(del by gys) gyf)
|
||||
:: unbind single.
|
||||
(~(del ju gys) gyf pas)
|
||||
::
|
||||
++ change-nicks ::< ...
|
||||
::>
|
||||
::
|
||||
|= {nis/(map ship cord) who/ship nic/cord}
|
||||
^+ nis
|
||||
?: =(nic '')
|
||||
(~(del by nis) who)
|
||||
(~(put by nis) who nic)
|
||||
::
|
||||
++ change-friends ::< ...
|
||||
::>
|
||||
::
|
||||
|= {cis/(set circle) add/? cir/circle}
|
||||
^+ cis
|
||||
%. cir
|
||||
?: add
|
||||
~(put in cis)
|
||||
~(del in cis)
|
||||
::
|
||||
++ change-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
|
||||
%. `(set partner)`pas.dif ::TODO? why do we *need* to cast?
|
||||
?: add.dif
|
||||
~(uni in src.cof)
|
||||
~(dif 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
|
||||
==
|
||||
::
|
||||
$federal
|
||||
%= cof
|
||||
fes.fed
|
||||
?. fed.dif fes.fed.cof
|
||||
%. sis.dif
|
||||
?: add.dif
|
||||
~(uni in fes.fed.cof)
|
||||
~(dif in fes.fed.cof)
|
||||
::
|
||||
may.fed
|
||||
?: fed.dif may.fed.cof
|
||||
%. sis.dif
|
||||
?: add.dif
|
||||
~(uni in may.fed.cof)
|
||||
~(dif in may.fed.cof)
|
||||
==
|
||||
==
|
||||
::
|
||||
++ change-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 [tru.dif.dif han.man.sat]
|
||||
$handle [tru.man.sat han.dif.dif]
|
||||
==
|
||||
==
|
||||
==
|
||||
--
|
||||
|
@ -4,6 +4,91 @@
|
||||
|%
|
||||
::
|
||||
::> ||
|
||||
::> || %query-models
|
||||
::> ||
|
||||
::> models relating to queries, their results and updates.
|
||||
::+|
|
||||
::
|
||||
::TODO path parsing/casting: ;;(query pax) or ((hard query) pax)
|
||||
:: or (raid /~zod/5 /[%p]/[%ud])
|
||||
:: ...but it's still shit.
|
||||
++ query ::> query paths
|
||||
$% {$reader $~} ::< shared ui state
|
||||
{$friend $~} ::< publicly joined
|
||||
{$circle nom/knot ran/range} ::< story query
|
||||
== ::
|
||||
++ range (unit {hed/@ t/(unit {tal/@ $~})}) ::< msg range, @ud/@da
|
||||
++ prize ::> query result
|
||||
$% $: $reader ::< /reader
|
||||
gys/(jug char (set partner)) ::< glyph bindings
|
||||
nis/(map ship cord) ::< nicknames
|
||||
== ::
|
||||
{$friend cis/(set circle)} ::< /friend
|
||||
$: $circle ::< /circle
|
||||
gaz/(list telegram) ::< queried messages
|
||||
cos/lobby ::< configs
|
||||
pes/crowd ::< presences
|
||||
== ::
|
||||
== ::
|
||||
++ rumor ::< query result change
|
||||
$% $: $reader ::< /reader
|
||||
$= dif ::
|
||||
$% {$glyph diff-glyph} ::
|
||||
{$nick diff-nick} ::
|
||||
== ::
|
||||
== ::
|
||||
{$friend add/? cir/circle} ::< /friend
|
||||
{$circle dif/diff-story} ::< /circle
|
||||
== ::
|
||||
::TODO deltas into app
|
||||
++ delta ::
|
||||
$% ::TODO no more %more, just produce/take list instead!
|
||||
{$more mor/(list delta)} ::< multiple changes
|
||||
:: messaging state ::
|
||||
{$out cir/circle out/(list thought)} ::< msgs into outbox
|
||||
{$done don/(map @ud {partner ?})} ::< msgs delivered
|
||||
:: shared ui state ::
|
||||
{$glyph diff-glyph} ::< un/bound glyph
|
||||
{$nick diff-nick} ::< changed nickname
|
||||
:: story state ::
|
||||
{$story nom/knot dif/diff-story} ::< change to story
|
||||
:: side-effects ::
|
||||
{$bear cir/circle} ::< %burden command
|
||||
{$react ost/bone rac/reaction} ::TODO ost.bol? ::< reaction to action
|
||||
{$quit ost/bone} ::< force unsubscribe
|
||||
== ::
|
||||
++ diff-glyph {bin/? gyf/char pas/(set partner)} ::< un/bound glyph
|
||||
++ diff-nick {who/ship nic/cord} ::< changed nickname
|
||||
++ diff-story ::
|
||||
$% {$new con/config} ::< new story
|
||||
{$grams gaz/(list telegram)} ::< new/changed msgs
|
||||
{$config cir/circle dif/diff-config} ::< new/changed config
|
||||
{$status pan/partner who/ship dif/diff-status} ::< new/changed status
|
||||
{$remove $~} ::< removed story
|
||||
== ::
|
||||
++ diff-config ::> config change
|
||||
$% {$full cof/config} ::< fully changed config
|
||||
{$source add/? pas/(set partner)} ::< add/rem sources
|
||||
{$caption cap/cord} ::< changed description
|
||||
{$filter fit/filter} ::< changed filter
|
||||
{$permit add/? sis/(set ship)} ::< add/rem to b/w-list
|
||||
{$secure sec/security} ::< changed security
|
||||
{$federal add/? fed/? sis/(set ship)} ::< add/rem may/fes
|
||||
{$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.
|
||||
@ -26,8 +111,8 @@
|
||||
::TODO change to target partners, not only our circles.
|
||||
{$status nos/(set knot) sat/status} ::< our status update
|
||||
:: changing shared ui ::
|
||||
{$human sip/ship man/human} ::< new identity
|
||||
{$glyph gyf/char pas/(set partner) bin/?} ::< un/bind a glyph
|
||||
{$nick who/ship nic/knot} ::< new identity
|
||||
== ::
|
||||
++ reaction ::> user information
|
||||
$: res/?($info $fail) ::< result
|
||||
|
Loading…
Reference in New Issue
Block a user