Renamed ++naem to ++name.

This commit is contained in:
Fang 2017-12-18 14:20:45 +01:00
parent 84c0e6013f
commit 06b3355556
3 changed files with 90 additions and 91 deletions

View File

@ -30,9 +30,9 @@
:> state data structures
+|
++ state :> application state
$: stories/(map naem story) :< conversations
$: stories/(map name story) :< conversations
outbox/(map serial tracking) :< sent messages
log/(map naem @ud) :< logged to clay
log/(map name @ud) :< logged to clay
nicks/(map ship nick) :< local nicknames
binds/(jug char audience) :< circle glyph lookup
public/(set circle) :< publicly member of
@ -68,13 +68,13 @@
{$glyph diff-glyph} :< un/bound glyph
{$nick diff-nick} :< changed nickname
:: story state ::
{$story nom/naem det/delta-story} :< change to story
{$story nom/name det/delta-story} :< change to story
:: side-effects ::
{$init $~} :< initialize
{$observe who/ship} :< watch burden bearer
$: $present :> send %present cmd
hos/ship ::
nos/(set naem) ::
nos/(set name) ::
dif/diff-status ::
== ::
== ::
@ -108,7 +108,7 @@
== ::
++ weir :> parsed wire
$% {$repeat cir/circle ses/(list serial)} :< messaging wire
{$circle nom/naem src/source} :< subscription wire
{$circle nom/name src/source} :< subscription wire
== ::
--
::
@ -221,7 +221,7 @@
:> {nom} exists, calls the gate with a story core.
:> if it doesn't, does nothing.
::
|= nom/naem
|= nom/name
|= fun/$-(_so _ta)
^+ +>+>
=+ pur=(~(get by stories) nom)
@ -243,11 +243,11 @@
::
:: create default circles.
=> %+ roll
^- (list {security naem cord})
^- (list {security name cord})
:~ [%mailbox %inbox 'default home']
[%journal %public 'visible activity']
==
|= {{typ/security nom/naem des/cord} _ta}
|= {{typ/security nom/name des/cord} _ta}
(ta-action [%create nom des typ])
%- ta-deltas
:: if needed, subscribe to our parent's /burden.
@ -283,7 +283,7 @@
:> sets status for the indicated stories,
:> but only if they have write permission there.
::
|= {who/ship nos/(set naem) dif/diff-status}
|= {who/ship nos/(set name) dif/diff-status}
^+ +>
=+ nol=~(tap in nos)
|-
@ -340,7 +340,7 @@
:> store a delta about a story. if the story
:> does not exist, crash.
::
|= {nom/naem det/delta-story}
|= {nom/name det/delta-story}
?: (~(has by stories) nom)
(impact nom det)
(ta-evil (crip "no story {(trip nom)}"))
@ -350,7 +350,7 @@
:>
:> Store a delta about a story.
::
|= {nom/naem det/delta-story}
|= {nom/name det/delta-story}
(ta-delta %story nom det)
::
++ present
@ -359,9 +359,9 @@
|= {aud/audience dif/diff-status}
^+ ..ta-action
=/ cic
^- (jug ship naem)
^- (jug ship name)
%- ~(rep in aud)
|= {c/circle m/(jug ship naem)}
|= {c/circle m/(jug ship name)}
(~(put ju m) hos.c nom.c)
=? ..ta-action (~(has by cic) our.bol)
=+ nos=~(tap in (~(get ju cic) our.bol))
@ -372,12 +372,12 @@
$(nos t.nos)
::TODO runtime error
::%- ~(rep in (~(get ju cic) our.bol))
::|= {n/naem _ta} :: beware, urbit/arvo#447
::|= {n/name _ta} :: beware, urbit/arvo#447
::(affect n %status [our.bol n] our.bol dif)
=. cic (~(del by cic) our.bol)
%- ta-deltas
%- ~(rep by cic)
|= {{h/ship s/(set naem)} l/(list delta)}
|= {{h/ship s/(set name)} l/(list delta)}
:_ l
[%present h s dif]
::
@ -386,7 +386,7 @@
++ action-create
:> creates a story with the specified parameters.
::
|= {nom/naem des/cord typ/security}
|= {nom/name des/cord typ/security}
^+ ..ta-action
?. (~(has in stories) nom)
%^ impact nom %new
@ -405,7 +405,7 @@
:> delete story {nom}, optionally announcing the
:> event with message {mes}.
::
|= {nom/naem mes/(unit cord)}
|= {nom/name mes/(unit cord)}
^+ ..ta-action
=? ..ta-action ?=(^ mes)
%+ action-phrase
@ -416,7 +416,7 @@
++ action-depict
:> change description of story {nom} to {des}.
::
|= {nom/naem cap/cord}
|= {nom/name cap/cord}
(affect nom %config [our.bol nom] %caption cap)
::
++ action-filter
@ -425,13 +425,13 @@
:> replaces the story's current filter with the
:> specified one.
::
|= {nom/naem fit/filter}
|= {nom/name fit/filter}
(affect nom %config [our.bol nom] %filter fit)
::
++ action-permit
:> invite to/banish from story {nom} all {sis}.
::
|= {nom/naem inv/? sis/(set ship)}
|= {nom/name inv/? sis/(set ship)}
=+ soy=(~(get by stories) nom)
?~ soy
(ta-evil (crip "no story {(trip nom)}"))
@ -440,7 +440,7 @@
++ action-source
:> add/remove {pos} as sources for story {nom}.
::
|= {nom/naem sub/? srs/(set source)}
|= {nom/name sub/? srs/(set source)}
=+ soy=(~(get by stories) nom)
?~ soy
(ta-evil (crip "no story {(trip nom)}"))
@ -557,7 +557,7 @@
:>
:> store a started subscription as source.
::
|= {nom/naem src/source}
|= {nom/name src/source}
%- (ta-know nom) |= sor/_so =< so-done
(so-greet:sor src)
::
@ -566,7 +566,7 @@
:>
:> removes {src} from story {nom}'s sources.
::
|= {nom/naem src/source}
|= {nom/name src/source}
%- (ta-know nom) |= sor/_so =< so-done
(so-leave:sor src)
::
@ -599,7 +599,7 @@
$(sos t.sos)
::TODO runtime error
::%+ roll ~(tap by sos.piz)
::|= {{n/naem b/burden} _..ta-take}
::|= {{n/name b/burden} _..ta-take}
::=+ (fall (~(get by stories) n) *story)
::so-done:(~(so-bear so n ~ -) b)
::
@ -673,7 +673,7 @@
:> when a subscription gets dropped by gall, we
:> resubscribe.
::
|= {nom/naem src/source}
|= {nom/name src/source}
^+ +>
%- (ta-know nom) |= sor/_so =< so-done
(so-resub:sor src)
@ -730,7 +730,7 @@
:>
:> add or update telegram {gam} in story {nom}.
::
|= {nom/naem gam/telegram}
|= {nom/name gam/telegram}
%- (ta-know nom) |= sor/_so =< so-done
(so-learn:sor [our.bol nom] gam)
::
@ -754,7 +754,7 @@
:> acs: hall actions issued due to changes.
:: story is faceless to ease data access.
::
$: nom/naem
$: nom/name
acs/(list action)
story
==
@ -1458,7 +1458,7 @@
++ da-present
:> send %present cmd
::
|= {hos/ship nos/(set naem) dif/diff-status}
|= {hos/ship nos/(set name) dif/diff-status}
^+ +>
%- da-emit
:* ost.bol
@ -1611,7 +1611,7 @@
:> in case of a new or deleted story, specialized
:> arms are called.
::
|= {nom/naem det/delta-story}
|= {nom/name det/delta-story}
^+ +>
?+ -.det
=< sa-done
@ -1629,7 +1629,7 @@
:>
:> creates story {nom} with config {con}.
::
|= {nom/naem cof/config}
|= {nom/name cof/config}
^+ +>
=< sa-done
%- ~(sa-change sa nom *story)
@ -1640,7 +1640,7 @@
:>
:> calls the story core to delete story {nom}.
::
|= nom/naem
|= nom/name
^+ +>
=. +>
%- da-emil
@ -1655,7 +1655,7 @@
|_ :> nom: story name in {stories}.
:: story is faceless to ease data access.
::
$: nom/naem
$: nom/name
story
==
:> # %resolve
@ -1979,7 +1979,7 @@
:> constructs a /circle %peer path for subscribing
:> {nom} to a source.
::
|= {nom/naem wat/(list circle-data) source}
|= {nom/name wat/(list circle-data) source}
^- wire
;: weld
/circle/[nom]/(scot %p hos.cir)/[nom.cir]
@ -2050,7 +2050,7 @@
::
|= $: wir/wire
$= fun
$- {nom/naem src/source}
$- {nom/name src/source}
{(list move) _.}
==
=+ wer=(etch wir)
@ -2088,7 +2088,7 @@
?. =(who our.bol) [bon %quit ~]~
%- zing
%+ turn ~(tap in ~(key by stories))
|= n/naem
|= n/name
^- (list move)
:~ :^ 0 %poke /
:+ [our.bol dap.bol] %hall-action
@ -2144,10 +2144,10 @@
::
$circles
=- ``[%circles -]
%- ~(gas in *(set naem))
%- ~(gas in *(set name))
%+ murn ~(tap by stories)
|= {n/naem s/story}
^- (unit naem)
|= {n/name s/story}
^- (unit name)
?:((~(so-visible so:ta n ~ s) who.qer) `n ~)
::
$public
@ -2156,10 +2156,10 @@
$burden
:+ ~ ~
:- %burden
%- ~(gas in *(map naem burden))
%- ~(gas in *(map name burden))
%+ murn ~(tap by stories)
|= {n/naem s/story}
^- (unit (pair naem burden))
|= {n/name s/story}
^- (unit (pair name burden))
:: only auto-federate channels for now.
?. ?=($channel sec.con.shape.s) ~
:+ ~ n
@ -2209,7 +2209,7 @@
:> modify a %story diff to make it about their ship
:> instead of ours.
::
|= {who/ship nom/naem det/delta-story}
|= {who/ship nom/name det/delta-story}
^- rumor-story
?+ -.det det
::
@ -2251,7 +2251,7 @@
:> for a given story. assumes both story and
:> telegram are known.
::
|= {nom/naem gam/telegram}
|= {nom/name gam/telegram}
^- envelope
:_ gam
%. uid.gam
@ -2261,7 +2261,7 @@
::
|= $: wer/(unit circle)
wat/(set circle-data)
nom/naem
nom/name
det/delta-story
==
^- ?
@ -2665,7 +2665,7 @@
|= wir/wire
^- (quip move _+>)
%+ etch-circle [%circle wir]
|= {nom/naem src/source}
|= {nom/name src/source}
%- pre-bake
ta-done:(ta-resub:ta nom src)
::
@ -2694,7 +2694,7 @@
:> to be re-loaded by ++poke-hall-load.
::TODO maybe update to also store sourced list.
::
|= nom/naem
|= nom/name
^- (quip move _+>)
=/ paf/path
/(scot %p our.bol)/home/(scot %da now.bol)/hall/[nom]/hall-telegrams
@ -2711,7 +2711,7 @@
++ poke-load-legacy
:> loads legacy messages into the story {nom}.
::
|= nom/naem
|= nom/name
^- (quip move _+>)
=/ jams/json
.^ json
@ -2731,7 +2731,7 @@
:> loads the telegrams of story {nom} into our state,
:> as saved in ++poke-hall-save.
::
|= nom/naem
|= nom/name
^- (quip move _+>)
=/ grams
.^ (list telegram)
@ -2746,7 +2746,7 @@
++ poke-hall-log
:> starts logging story {nom}'s messages.
::
|= nom/naem
|= nom/name
^- (quip move _+>)
:- [(log-to-file nom) ~]
%= +>.$
@ -2758,7 +2758,7 @@
++ poke-hall-unlog
:> stops logging story {nom}'s messages.
::
|= nom/naem
|= nom/name
^- (quip move _+>)
:- ~
+>.$(log (~(del by log) nom))
@ -2773,11 +2773,11 @@
:_ %_ .
log
%- ~(urn by log)
|= {nom/naem len/@ud}
|= {nom/name len/@ud}
count:(~(got by stories) nom)
==
%+ murn ~(tap by log)
|= {nom/naem len/@ud}
|= {nom/name len/@ud}
^- (unit move)
?: (gte len count:(~(got by stories) nom))
~
@ -2786,7 +2786,7 @@
++ log-to-file
:> logs all grams of story {nom} to a file.
::
|= nom/naem
|= nom/name
^- move
=+ ^- paf/path
=+ day=(year %*(. (yore now.bol) +.t +:*tarp))
@ -2809,7 +2809,7 @@
~& 'verifying message reference integrity...'
=- ~&(- [~ +>.$])
%- ~(urn by stories)
|= {n/naem s/story}
|= {n/name s/story}
=+ %- ~(rep by known.s)
|= {{u/serial a/@ud} k/@ud m/@ud}
:- ?:((gth a k) a k)
@ -2829,7 +2829,7 @@
~& 'rebuilding message references...'
=- [~ +>.$(stories -)]
%- ~(urn by stories)
|= {nom/naem soy/story}
|= {nom/name soy/story}
=+ %+ roll grams.soy
|= {t/telegram c/@ud k/(map serial @ud) s/(map circle (list @ud))}
:+ +(c) (~(put by k) uid.t c)
@ -2857,7 +2857,7 @@
?: =(a 'sources')
~& 'sources per story:'
~& %- ~(urn by stories)
|= {n/naem s/story}
|= {n/name s/story}
[n src.shape.s]
[~ +>]
[~ +>]

View File

@ -69,14 +69,14 @@
$% :: circle management ::
{$join (map circle range)} ::< subscribe to
{$leave audience} ::< unsubscribe from
{$create security naem cord} ::< create circle
{$delete naem (unit cord)} ::< delete circle
{$depict naem cord} ::< change description
{$filter naem ? ?} ::< change message rules
{$invite naem (set ship)} ::< give permission
{$banish naem (set ship)} ::< deny permission
{$source naem (map circle range)} ::< add source
{$unsource naem (map circle range)} ::< remove source
{$create security name cord} ::< create circle
{$delete name (unit cord)} ::< delete circle
{$depict name cord} ::< change description
{$filter name ? ?} ::< change message rules
{$invite name (set ship)} ::< give permission
{$banish name (set ship)} ::< deny permission
{$source name (map circle range)} ::< add source
{$unsource name (map circle range)} ::< remove source
:: personal metadata ::
{$attend audience (unit presence)} ::< set our presence
{$name audience human} ::< set our name
@ -138,7 +138,7 @@
++ inbox ::< client's circle name
::> produces the name of the circle used by this
::> client for all its operations
^- naem
^- name
%inbox
::
++ incir ::< client's circle
@ -727,7 +727,7 @@
==
::
;~ plug (perk %delete ~)
;~(pfix ;~(plug ace cen) sym)
;~(pfix ace cire)
;~ pose
(cook some ;~(pfix ace qut))
(easy ~)
@ -949,7 +949,7 @@
$unsource (source | +.job)
:: personal metadata
$attend (attend +.job)
$name (name +.job)
$name (set-name +.job)
:: messaging
$say (say +.job)
$eval (eval +.job)
@ -1084,7 +1084,7 @@
++ create ::< %create
::> creates circle {nom} with specified config.
::
|= {sec/security nom/naem txt/cord}
|= {sec/security nom/name txt/cord}
^+ ..sh-work
=. ..sh-work
(sh-act %create nom txt sec)
@ -1094,14 +1094,14 @@
::> deletes our circle {nom}, after optionally
::> sending a last announce message {say}.
::
|= {nom/naem say/(unit cord)}
|= {nom/name say/(unit cord)}
^+ ..sh-work
(sh-act %delete nom say)
::
++ depict ::< %depict
::> changes the description of {nom} to {txt}.
::
|= {nom/naem txt/cord}
|= {nom/name txt/cord}
^+ ..sh-work
(sh-act %depict nom txt)
::
@ -1109,19 +1109,19 @@
::> invites or banishes {sis} to/from our
::> circle {nom}.
::
|= {inv/? nom/naem sis/(set ship)}
|= {inv/? nom/name sis/(set ship)}
^+ ..sh-work
(sh-act %permit nom inv sis)
::
++ filter
|= {nom/naem cus/? utf/?}
|= {nom/name cus/? utf/?}
^+ ..sh-work
(sh-act %filter nom cus utf)
::
++ source ::< %source
::> adds {pas} to {nom}'s src.
::
|= {sub/? nom/naem pos/(map circle range)}
|= {sub/? nom/name pos/(map circle range)}
^+ ..sh-work
(sh-act %source nom sub pos)
::
@ -1137,7 +1137,7 @@
^+ ..sh-work
(sh-act %notify aud pec)
::
++ name ::< set our name
++ set-name ::< set our name
::> sets our name to {man} for {aud}.
::
|= {aud/audience man/human}

View File

@ -13,8 +13,7 @@
::> wrapper molds, for semantic clarity.
::+|
::
::TODO rename
++ naem term ::< circle name
++ name term ::< circle name
++ nick cord ::< local nickname
::
::> ||
@ -27,11 +26,11 @@
$% {$client $~} ::< shared ui state
{$circles who/ship} ::< readable circles
{$public $~} ::< public memberships
{$burden who/ship} ::TODO eventually, nom/naem. ::< duties to share
{$burden who/ship} ::TODO eventually, nom/name. ::< duties to share
{$report $~} ::< duty reports
{$peers nom/naem} ::< readers of story
{$peers nom/name} ::< readers of story
$: $circle ::> story query
nom/naem ::< circle name
nom/name ::< circle name
wer/(unit circle) ::< from source
wat/(set circle-data) ::< data to get
ran/range ::< query duration
@ -57,9 +56,9 @@
== ::
++ prize ::> query result
$% {$client prize-client} ::< /client
{$circles cis/(set naem)} ::< /circles
{$circles cis/(set name)} ::< /circles
{$public cis/(set circle)} ::< /public
{$burden sos/(map naem burden)} ::< /burden
{$burden sos/(map name burden)} ::< /burden
{$report $~} ::< /report
{$peers pes/(jar ship query)} ::< /peers
{$circle package} ::< /circle
@ -70,9 +69,9 @@
== ::
++ rumor ::> query result change
$% {$client rum/rumor-client} ::< /client
{$circles add/? cir/naem} ::< /circles
{$circles add/? cir/name} ::< /circles
{$public add/? cir/circle} ::< /public
{$burden nom/naem rum/rumor-story} ::< /burden
{$burden nom/name rum/rumor-story} ::< /burden
{$peers add/? who/ship qer/query} ::< /peers
{$circle rum/rumor-story} ::< /circle
== ::
@ -135,12 +134,12 @@
::
++ 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/? srs/(set source)} ::< un/sub to/from src
{$create nom/name des/cord sec/security} ::< create circle
{$delete nom/name why/(unit cord)} ::< delete + announce
{$depict nom/name des/cord} ::< change description
{$filter nom/name fit/filter} ::< change message rules
{$permit nom/name inv/? sis/(set ship)} ::< invite/banish
{$source nom/name sub/? srs/(set source)} ::< un/sub to/from src
:: messaging ::
{$convey tos/(list thought)} ::< post exact
{$phrase aud/audience ses/(list speech)} ::< post easy
@ -162,7 +161,7 @@
::
++ command ::> effect on story
$% {$publish tos/(list thought)} ::< deliver
{$present nos/(set naem) dif/diff-status} ::< status update
{$present nos/(set name) dif/diff-status} ::< status update
{$bearing $~} ::< prompt to listen
== ::
::
@ -172,7 +171,7 @@
::> messaging targets and their metadata.
::+|
::
++ circle {hos/ship nom/naem} ::< native target
++ circle {hos/ship nom/name} ::< native target
:: circle configurations. ::
++ lobby {loc/config rem/(map circle config)} ::< our & srcs configs
++ config ::> circle config