2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-03-23 03:34:56 +03:00
|
|
|
:::: /hoon/talk/app :: ::
|
2017-03-30 15:17:37 +03:00
|
|
|
:: :: ::
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
::TODO master changes
|
|
|
|
::TODO =/ instead of =+ ^= where possible
|
|
|
|
::TODO avoid lark where possible
|
|
|
|
::TODO remove old/unused code
|
2017-03-30 15:17:37 +03:00
|
|
|
::TODO improve naming. way->wir, rad->rep, etc.
|
|
|
|
::TODO tidiness, remove unnecessary ~&, etc.
|
2017-04-04 22:55:05 +03:00
|
|
|
::TODO maybe ensure every arm has a mini-description at :57 too?
|
|
|
|
::TODO maybe prefix all printfs and other errors with %talk?
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-12 21:09:23 +03:00
|
|
|
::TODO do permission checks for the whole team instead of just a ship, maybe?
|
2017-04-04 22:55:05 +03:00
|
|
|
::TODO sending remotes and mirrors alongside locals and shape no longer makes
|
|
|
|
:: any sense, does it?
|
2017-03-30 15:17:37 +03:00
|
|
|
::TODO crash on pokes/peers we do not expect
|
|
|
|
::TODO rename cores. ra->ta (transaction), pa->to (story).
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
/? 310 :: hoon version
|
|
|
|
/- talk, sole :: structures
|
|
|
|
/+ talk, sole, time-to-id, twitter :: libraries
|
|
|
|
/= seed /~ !>(.)
|
2017-03-30 15:17:37 +03:00
|
|
|
!:
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
|
|
|
::x include talk and sole cores from the /+ include into our subject,
|
|
|
|
::x so we can do some-arm instead of some-arm:talk.
|
|
|
|
[. talk sole]
|
|
|
|
=> |% :: data structures
|
2017-04-12 21:09:23 +03:00
|
|
|
++ house :: broker state
|
2017-03-23 03:34:56 +03:00
|
|
|
$: stories/(map knot story) :: conversations
|
2017-03-24 01:10:28 +03:00
|
|
|
::TODO rename to readers?
|
2017-04-12 14:14:09 +03:00
|
|
|
general/(map bone (set knot)) :: our message readers
|
2017-03-23 03:34:56 +03:00
|
|
|
outbox/(pair @ud (map @ud thought)) :: urbit outbox
|
|
|
|
log/(map knot @ud) :: logged to clay
|
2017-03-24 01:10:28 +03:00
|
|
|
folks/(map ship human) :: human identities
|
|
|
|
nik/(map (set partner) char) :: bound station glyphs
|
|
|
|
nak/(jug char (set partner)) :: station glyph lookup
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
|
|
|
++ story :: wire content
|
|
|
|
$: count/@ud :: (lent grams)
|
|
|
|
grams/(list telegram) :: all history
|
2017-04-03 15:42:09 +03:00
|
|
|
locals/atlas :: local presence
|
2017-04-12 23:37:37 +03:00
|
|
|
remotes/(map partner atlas) :: remote presence
|
2017-03-23 03:34:56 +03:00
|
|
|
shape/config :: configuration
|
2017-04-12 23:37:37 +03:00
|
|
|
mirrors/(map station config) :: remote config
|
|
|
|
::TODO never gets updated. ::
|
|
|
|
sequence/(map partner @ud) :: partners heard
|
2017-03-23 03:34:56 +03:00
|
|
|
known/(map serial @ud) :: messages heard
|
2017-03-25 02:54:56 +03:00
|
|
|
followers/(map bone river) :: subscribers
|
2017-03-23 03:34:56 +03:00
|
|
|
== ::
|
|
|
|
++ river (pair point point) :: stream definition
|
|
|
|
++ point :: stream endpoint
|
|
|
|
$% {$ud p/@ud} :: by number
|
|
|
|
{$da p/@da} :: by date
|
|
|
|
== ::
|
|
|
|
++ move (pair bone card) :: all actions
|
|
|
|
++ lime :: diff fruit
|
|
|
|
$% {$talk-report report} ::
|
2017-03-24 23:10:27 +03:00
|
|
|
{$talk-lowdown lowdown} ::
|
2017-04-10 23:24:25 +03:00
|
|
|
{$talk-reaction reaction} ::
|
2017-03-23 03:34:56 +03:00
|
|
|
{$sole-effect sole-effect} ::
|
|
|
|
== ::
|
|
|
|
++ pear :: poke fruit
|
|
|
|
$% {$talk-command command} ::
|
|
|
|
{$write-comment spur ship cord} ::
|
|
|
|
{$write-fora-post spur ship cord cord} ::
|
|
|
|
== ::
|
|
|
|
++ card :: general card
|
|
|
|
$% {$diff lime} ::
|
|
|
|
{$info wire @p @tas nori} ::
|
|
|
|
{$peer wire dock path} ::
|
|
|
|
{$poke wire dock pear} ::
|
|
|
|
{$pull wire dock $~} ::
|
|
|
|
{$quit $~} ::
|
|
|
|
== ::
|
|
|
|
++ weir :: parsed wire
|
|
|
|
$% {$repeat p/@ud q/@p r/knot} ::
|
|
|
|
{$friend p/knot q/station} ::
|
|
|
|
== ::
|
2017-03-29 18:03:59 +03:00
|
|
|
++ strap |*({k/* v/*} (~(put by *(map _k _v)) k v))
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
|_ {hid/bowl house}
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ ra :: per transaction
|
|
|
|
::x gets called when talk gets poked or otherwise prompted/needs to perform
|
|
|
|
::x an action.
|
|
|
|
::x arms generally modify state, and store moves in ++ra's moves. these get
|
|
|
|
::x produced when calling ++ra-abet.
|
|
|
|
::x in applying commands and making reports, it uses ++pa for story work.
|
|
|
|
::
|
|
|
|
::x moves: moves storage, added to by ++ra-emit and -emil, produced by -abed.
|
|
|
|
|_ moves/(list move)
|
2017-03-30 15:17:37 +03:00
|
|
|
::
|
2017-03-27 18:26:05 +03:00
|
|
|
++ ra-abet :: resolve core
|
2017-03-23 03:34:56 +03:00
|
|
|
::x produces the moves stored in ++ra's moves.
|
|
|
|
::x sole-effects get special treatment to become a single move.
|
2017-03-30 15:17:37 +03:00
|
|
|
::TODO this shouldn't ever make sole-effects anymore, so remove that logic.
|
|
|
|
::TODO instead, we want to squash lowdown %names and %glyphs,
|
|
|
|
:: but figure out if that'll ever be needed first.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
^+ [*(list move) +>]
|
|
|
|
:_ +>
|
|
|
|
::x seperate our sole-effects from other moves.
|
|
|
|
=+ ^= yop
|
|
|
|
|- ^- (pair (list move) (list sole-effect))
|
|
|
|
?~ moves [~ ~]
|
|
|
|
=+ mor=$(moves t.moves)
|
|
|
|
?: ?& =(ost.hid p.i.moves)
|
|
|
|
?=({$diff $sole-effect *} q.i.moves)
|
|
|
|
==
|
|
|
|
[p.mor [+>.q.i.moves q.mor]]
|
|
|
|
[[i.moves p.mor] q.mor]
|
|
|
|
::x flop moves, flop and squash sole-effects into a %mor.
|
|
|
|
=+ :* moz=(flop p.yop)
|
|
|
|
^= foc ^- (unit sole-effect)
|
|
|
|
?~ q.yop ~
|
|
|
|
?~(t.q.yop `i.q.yop `[%mor (flop `(list sole-effect)`q.yop)])
|
|
|
|
==
|
|
|
|
::x produce moves or sole-effects and moves.
|
|
|
|
?~(foc moz [[ost.hid %diff %sole-effect u.foc] moz])
|
|
|
|
::
|
|
|
|
++ ra-emil :: ra-emit move list
|
|
|
|
::x adds multiple moves to the core's list. flops to emulate ++ra-emit.
|
|
|
|
::
|
|
|
|
|= mol/(list move)
|
|
|
|
%_(+> moves (welp (flop mol) moves))
|
|
|
|
::
|
|
|
|
++ ra-emit :: emit a move
|
|
|
|
::x adds a move to the core's list.
|
|
|
|
::
|
|
|
|
|= mov/move
|
|
|
|
%_(+> moves [mov moves])
|
|
|
|
::
|
|
|
|
++ ra-evil :: emit error
|
|
|
|
::x stack trace and crash.
|
|
|
|
::
|
|
|
|
|= msg/cord
|
|
|
|
~| [%ra-evil msg]
|
|
|
|
!!
|
|
|
|
::
|
|
|
|
++ ra-init :: initialize talk
|
|
|
|
::x populate state on first boot. creates our main and public stories.
|
|
|
|
::
|
2017-03-30 15:17:37 +03:00
|
|
|
~& %ra-init
|
2017-03-23 03:34:56 +03:00
|
|
|
%+ roll
|
|
|
|
^- (list {posture knot cord})
|
|
|
|
:~ [%brown (main our.hid) 'default home']
|
|
|
|
[%green ~.public 'visible activity']
|
|
|
|
==
|
|
|
|
|: [[typ=*posture man=*knot des=*cord] ..ra-init] ^+ ..ra-init
|
2017-04-14 01:46:15 +03:00
|
|
|
%+ ra-action ost.hid
|
|
|
|
[%create man des typ]
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ ra-apply :: apply command
|
|
|
|
::x applies the command sent by her.
|
|
|
|
::
|
|
|
|
|= {her/ship cod/command}
|
|
|
|
^+ +>
|
|
|
|
?- -.cod
|
|
|
|
::x used for relaying messages (as a station host).
|
|
|
|
$review (ra-think | her +.cod)
|
|
|
|
==
|
|
|
|
::
|
2017-03-24 23:30:20 +03:00
|
|
|
++ ra-inform ::x new lowdown
|
|
|
|
::x send talk-lowdown to all readers.
|
|
|
|
::
|
|
|
|
|= low/lowdown
|
|
|
|
%- ra-emil
|
2017-04-12 14:14:09 +03:00
|
|
|
%- ~(rep by general)
|
|
|
|
|= {{b/bone *} l/(list move)}
|
2017-03-24 23:30:20 +03:00
|
|
|
[[b %diff %talk-lowdown low] l]
|
|
|
|
::
|
2017-04-10 23:24:25 +03:00
|
|
|
++ ra-react
|
|
|
|
::x send a talk-reaction to a reader.
|
|
|
|
::
|
|
|
|
|= {red/bone rac/reaction}
|
|
|
|
%- ra-emit
|
|
|
|
[red %diff %talk-reaction rac]
|
|
|
|
::
|
|
|
|
++ ra-action
|
|
|
|
::x peforms action sent by a reader.
|
|
|
|
::
|
|
|
|
|= {red/bone act/action}
|
|
|
|
^+ +>
|
|
|
|
?- -.act
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
|
|
|
:: station configuration
|
|
|
|
::
|
|
|
|
$create :: create station
|
2017-04-11 14:24:07 +03:00
|
|
|
?. (~(has in stories) p.act)
|
|
|
|
(ra-config p.act [[%& our.hid p.act] ~ ~] q.act [r.act ~])
|
|
|
|
(ra-react red %fail (crip "{(trip p.act)}: already exists") `act)
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
|
|
|
$permit :: invite/banish
|
2017-04-11 13:18:37 +03:00
|
|
|
%- (ra-affect p.act red `act) |= par/_pa =< pa-abet
|
|
|
|
(pa-permit:par q.act r.act)
|
2017-04-14 00:40:53 +03:00
|
|
|
::
|
|
|
|
$source :: un/sub p to/from r
|
|
|
|
=+ pur=(~(get by stories) p.act)
|
|
|
|
?~ pur
|
|
|
|
%+ ra-react red
|
|
|
|
[%fail (crip "no story {(trip p.act)}") `act]
|
|
|
|
=. sources.shape.u.pur
|
|
|
|
%. r.act
|
|
|
|
?: q.act
|
|
|
|
~(uni in sources.shape.u.pur)
|
|
|
|
~(dif in sources.shape.u.pur)
|
|
|
|
(ra-config p.act shape.u.pur)
|
|
|
|
::
|
|
|
|
:: messaging
|
|
|
|
::
|
|
|
|
$convey :: post exact
|
|
|
|
(ra-think & our.hid +.act)
|
|
|
|
::
|
|
|
|
$phrase :: post easy
|
|
|
|
=- (ra-think & our.hid tos)
|
|
|
|
|- ^- tos/(list thought)
|
|
|
|
?~ q.act ~
|
|
|
|
=^ sir eny.hid (uniq eny.hid)
|
|
|
|
:_ $(q.act t.q.act)
|
|
|
|
:+ sir
|
|
|
|
%- ~(gas by *audience)
|
|
|
|
%+ turn (~(tap in p.act))
|
|
|
|
|=(p/partner [p *envelope %pending])
|
|
|
|
[now.hid ~ i.q.act]
|
2017-04-11 14:00:13 +03:00
|
|
|
::
|
|
|
|
:: personal metadata
|
|
|
|
::
|
|
|
|
$status :: our status update
|
2017-03-24 23:10:27 +03:00
|
|
|
::x for every knot (story) in the set, update our status.
|
2017-03-27 18:26:05 +03:00
|
|
|
|- ^+ +>.^$
|
2017-04-11 14:00:13 +03:00
|
|
|
?~ p.act +>.^$
|
|
|
|
=. +>.^$ $(p.act l.p.act)
|
|
|
|
=. +>.^$ $(p.act r.p.act)
|
|
|
|
%- (ra-affect n.p.act red `act) |= par/_pa =< pa-abet
|
|
|
|
(pa-notify:par our.hid q.act)
|
|
|
|
::
|
|
|
|
:: changing shared ui
|
|
|
|
::
|
|
|
|
$human :: new identity
|
|
|
|
?. =((~(get by folks) p.act) `q.act) +> :: no change
|
2017-03-25 02:24:55 +03:00
|
|
|
=. folks
|
2017-04-11 14:00:13 +03:00
|
|
|
?~ hand.q.act (~(del by folks) p.act)
|
|
|
|
(~(put by folks) p.act q.act)
|
2017-03-24 23:30:20 +03:00
|
|
|
%+ ra-inform %names
|
2017-03-27 13:50:39 +03:00
|
|
|
::TODO think long and hard, do we need unit for delition or is a human
|
|
|
|
:: with [~ ~] good enough? if the latter, agent's $names will change.
|
2017-04-11 14:00:13 +03:00
|
|
|
(strap p.act ?~(hand.q.act ~ `q.act))
|
|
|
|
::
|
|
|
|
$glyph :: bind a glyph
|
|
|
|
=. nik (~(put by nik) q.act p.act)
|
|
|
|
=. nak (~(put ju nak) p.act q.act)
|
2017-03-31 00:56:48 +03:00
|
|
|
(ra-inform %glyph nak)
|
2017-03-24 23:10:27 +03:00
|
|
|
==
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ ra-config :: configure story
|
|
|
|
::x (re)configures story man. if it's a new story, emit our stories.
|
|
|
|
::
|
|
|
|
|= {man/knot con/config}
|
|
|
|
^+ +>
|
2017-04-10 23:35:25 +03:00
|
|
|
=+ :- neu=!(~(has by stories) man)
|
|
|
|
pur=(fall (~(get by stories) man) *story)
|
|
|
|
::x if we just created the story, and it's invite only, make sure we're in.
|
|
|
|
=. con ::TODO =?
|
|
|
|
?. &(neu ?=(?($white $green) p.cordon.con)) con
|
|
|
|
con(q.cordon [our.hid ~ ~])
|
2017-04-10 23:24:25 +03:00
|
|
|
pa-abet:(~(pa-reform pa man ~ pur) con)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-04 17:15:12 +03:00
|
|
|
++ ra-unconfig
|
|
|
|
|= man/knot
|
|
|
|
^+ +>
|
|
|
|
=+ soy=(~(get by stories) man)
|
|
|
|
?~ soy +>.$
|
2017-04-10 23:24:25 +03:00
|
|
|
pa-abet:~(pa-reform-gone pa man ~ u.soy)
|
2017-04-04 17:15:12 +03:00
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ ra-base-hart
|
|
|
|
::x produces our ship's host desk's web address as a hart.
|
|
|
|
::
|
|
|
|
.^(hart %e /(scot %p our.hid)/host/(scot %da now.hid))
|
|
|
|
::
|
|
|
|
++ ra-fora-post
|
|
|
|
::x sends a fora post. if we don't have a channel for posts yet, create one
|
|
|
|
::
|
|
|
|
|= {pax/path sup/spur hed/@t txt/@t}
|
|
|
|
::x tell %hood to submit a fora post.
|
|
|
|
=. ..ra-emit
|
|
|
|
%+ ra-emit ost.hid
|
|
|
|
:* %poke
|
|
|
|
/fora-post
|
|
|
|
[our.hid %hood]
|
|
|
|
[%write-fora-post sup src.hid hed txt]
|
|
|
|
==
|
|
|
|
=+ man=%posts
|
|
|
|
::x if we have a %posts story, go ahead and consume.
|
|
|
|
?: (~(has by stories) man)
|
|
|
|
(ra-consume-fora-post man pax hed txt)
|
|
|
|
::x if we have no %posts story, first create it, then consume.
|
|
|
|
=; new (ra-consume-fora-post:new man pax hed txt)
|
2017-04-14 01:46:15 +03:00
|
|
|
=. ..ra-action
|
|
|
|
%+ ra-action ost.hid
|
|
|
|
[%create man 'towards a community' %brown]
|
2017-03-23 03:34:56 +03:00
|
|
|
::x send informative message to our mailbox.
|
|
|
|
%^ ra-consume & our.hid
|
|
|
|
:^ (shaf %init eny.hid) ::x serial
|
|
|
|
(my [[%& our.hid (main our.hid)] *envelope %pending] ~) ::x audience
|
|
|
|
::x statement
|
|
|
|
now.hid
|
|
|
|
[~ %app %tree 'receiving forum posts, ;join %posts for details']
|
|
|
|
::
|
|
|
|
++ ra-consume-fora-post
|
|
|
|
::x add a message for a fora post to the man story.
|
|
|
|
::
|
|
|
|
|= {man/knot pax/path hed/@t txt/@t} ^+ +>
|
|
|
|
=. pax (welp pax /posts/(crip "{<now.hid>}~"))
|
|
|
|
%^ ra-consume |
|
|
|
|
src.hid
|
|
|
|
:* (shaf %comt eny.hid)
|
|
|
|
(my [[%& our.hid man] *envelope %pending] ~)
|
|
|
|
now.hid
|
|
|
|
(sy /fora-post eyre+pax ~)
|
|
|
|
:- %mor :~
|
|
|
|
[%fat text+(lore txt) [%url [ra-base-hart `pax ~] ~]]
|
|
|
|
[%app %tree (crip "forum post: '{(trip hed)}'")]
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ ra-comment
|
|
|
|
::x sends a comment. if we don't have a channel for them yet, creates one.
|
|
|
|
::
|
|
|
|
|= {pax/path sup/spur txt/@t}
|
|
|
|
=. ..ra-emit
|
|
|
|
%+ ra-emit ost.hid
|
|
|
|
:* %poke
|
|
|
|
/comment
|
|
|
|
[our.hid %hood]
|
|
|
|
[%write-comment sup src.hid txt]
|
|
|
|
==
|
|
|
|
=+ man=%comments
|
|
|
|
?: (~(has by stories) man)
|
|
|
|
(ra-consume-comment man pax sup txt)
|
|
|
|
=; new (ra-consume-comment:new man pax sup txt)
|
2017-04-14 01:46:15 +03:00
|
|
|
=. ..ra-action
|
|
|
|
%+ ra-action ost.hid
|
|
|
|
[%create man 'letters to the editor' %brown]
|
2017-03-23 03:34:56 +03:00
|
|
|
%^ ra-consume & our.hid
|
2017-03-30 15:17:37 +03:00
|
|
|
:^ (shaf %init eny.hid)
|
2017-03-23 03:34:56 +03:00
|
|
|
(my [[%& our.hid (main our.hid)] *envelope %pending] ~)
|
|
|
|
now.hid
|
|
|
|
[~ %app %tree 'receiving comments, ;join %comments for details']
|
|
|
|
::
|
|
|
|
++ ra-consume-comment
|
|
|
|
::x adds a message for a comment to the man story.
|
|
|
|
::
|
|
|
|
|= {man/knot pax/path sup/spur txt/@t} ^+ +>
|
|
|
|
=+ nam=?~(sup "" (trip i.sup)) :: file name
|
|
|
|
=+ fra=(crip (time-to-id now.hid)) :: url fragment
|
|
|
|
%^ ra-consume |
|
|
|
|
src.hid
|
|
|
|
:* (shaf %comt eny.hid)
|
|
|
|
(my [[%& our.hid man] *envelope %pending] ~)
|
|
|
|
now.hid
|
|
|
|
(sy /comment eyre+pax ~)
|
|
|
|
:- %mor :~
|
|
|
|
[%fat text+(lore txt) [%url [ra-base-hart `pax ~] `fra]]
|
|
|
|
[%app %tree (crip "comment on /{nam}")]
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ ra-know :: story monad
|
|
|
|
::x produces a wet core that takes a gate that takes a story core and
|
|
|
|
::x produces updated state.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
|* fun/$-(_pa _+>)
|
|
|
|
^+ +>+>
|
|
|
|
=+ pur=(~(get by stories) man)
|
|
|
|
?~ pur
|
|
|
|
~& [%ra-know-not man] :: XX should crash
|
|
|
|
+>+>.$
|
|
|
|
::x call the sample gate with a ++pa core.
|
2017-04-10 23:24:25 +03:00
|
|
|
(fun ~(. pa man ~ u.pur))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-11 13:18:37 +03:00
|
|
|
++ ra-affect
|
|
|
|
::x attempt to retrieve a story and call a sample gate with it.
|
|
|
|
::x if no such story, react.
|
|
|
|
::
|
|
|
|
|= {man/knot red/bone act/(unit action)}
|
|
|
|
|* fun/$-(_pa _+>)
|
|
|
|
^+ +>+>
|
|
|
|
=+ pur=(~(get by stories) man)
|
|
|
|
?~ pur
|
|
|
|
%+ ra-react red
|
2017-04-11 14:24:07 +03:00
|
|
|
[%fail (crip "no story {(trip man)}") act]
|
2017-04-11 13:18:37 +03:00
|
|
|
(fun ~(. pa man ~ u.pur))
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ ra-diff-talk-report :: subscription update
|
|
|
|
::x process a talk report from cuz into story man.
|
|
|
|
::
|
|
|
|
|= {man/knot cuz/station rad/report}
|
|
|
|
%- (ra-know man) |= par/_pa =< pa-abet
|
|
|
|
(pa-diff-talk-report:par cuz rad)
|
|
|
|
::
|
|
|
|
++ ra-quit :: subscription quit
|
|
|
|
::x removes cuz from the subscribers of story man.
|
|
|
|
::
|
|
|
|
|= {man/knot cuz/station}
|
|
|
|
%- (ra-know man) |= par/_pa =< pa-abet
|
|
|
|
(pa-quit:par %& cuz)
|
|
|
|
::
|
|
|
|
++ ra-retry :: subscription resend
|
|
|
|
::x produce a %peer/subscribe move for cuz to story man.
|
|
|
|
::
|
|
|
|
|= {man/knot cuz/station}
|
|
|
|
%- (ra-know man) |= par/_pa =< pa-abet
|
|
|
|
(pa-acquire:par [%& cuz]~)
|
|
|
|
::
|
|
|
|
++ ra-coup-repeat ::
|
|
|
|
::x assemble partner and call ++ra-repeat.
|
|
|
|
::
|
|
|
|
|= {{num/@ud her/@p man/knot} saw/(unit tang)}
|
|
|
|
(ra-repeat num [%& her man] saw)
|
|
|
|
::
|
|
|
|
++ ra-repeat :: remove from outbox
|
|
|
|
::x take message out of outbox, mark it as received or rejected.
|
|
|
|
::x crashes if pan is not in message's audience.
|
|
|
|
::
|
|
|
|
|= {num/@ud pan/partner saw/(unit tang)}
|
|
|
|
=+ oot=(~(get by q.outbox) num)
|
|
|
|
?~ oot ~|([%ra-repeat-none num] !!)
|
|
|
|
=. q.outbox (~(del by q.outbox) num)
|
|
|
|
=. q.u.oot
|
|
|
|
=+ olg=(~(got by q.u.oot) pan)
|
|
|
|
%+ ~(put by q.u.oot) pan
|
|
|
|
:- -.olg
|
|
|
|
?~ saw %received
|
|
|
|
~> %slog.[0 u.saw]
|
|
|
|
%rejected
|
|
|
|
(ra-think | our.hid u.oot ~)
|
|
|
|
::
|
|
|
|
++ ra-cancel :: drop a bone
|
|
|
|
::x removes a bone from the story in pax.
|
|
|
|
::
|
|
|
|
|= {src/ship pax/path}
|
|
|
|
^+ +>
|
|
|
|
?. ?=({@ @ *} pax)
|
|
|
|
::x if story is not in path, just delete the bone from general.
|
2017-04-12 14:14:09 +03:00
|
|
|
+>(general (~(del by general) ost.hid))
|
2017-04-04 19:47:11 +03:00
|
|
|
%- (ra-know i.pax) |= par/_pa =< pa-abet
|
2017-03-23 03:34:56 +03:00
|
|
|
::x delete bone from all follower groups and set src's status to %gone.
|
|
|
|
(pa-notify:pa-cancel:par src %gone *human)
|
|
|
|
::
|
|
|
|
++ ra-human :: look up person
|
|
|
|
::x get her identity. if she has none, make her one.
|
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^- {human _+>}
|
|
|
|
=^ 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)]
|
|
|
|
[who +>.$]
|
|
|
|
::
|
|
|
|
++ ra-subscribe :: listen to
|
|
|
|
::x subscribe her at pax.
|
|
|
|
::
|
|
|
|
|= {her/ship pax/path}
|
|
|
|
^+ +>
|
|
|
|
::x empty path, meta-subscribe and send report with all our stories.
|
2017-04-12 14:14:09 +03:00
|
|
|
?: ?=({$reader *} pax)
|
2017-03-29 18:03:59 +03:00
|
|
|
?. (team our.hid her)
|
|
|
|
~& [%foreign-reader her]
|
|
|
|
+>
|
2017-04-12 14:14:09 +03:00
|
|
|
(ra-welcome ost.hid t.pax)
|
|
|
|
?. ?=({@ *} pax)
|
|
|
|
(ra-evil %talk-bad-path)
|
2017-03-25 02:54:56 +03:00
|
|
|
=+ pur=(~(get by stories) i.pax)
|
2017-03-23 03:34:56 +03:00
|
|
|
?~ pur
|
2017-03-25 02:54:56 +03:00
|
|
|
~& [%bad-subscribe-story-c i.pax]
|
2017-03-23 03:34:56 +03:00
|
|
|
(ra-evil %talk-no-story)
|
2017-04-14 01:46:15 +03:00
|
|
|
=+ soy=~(. pa i.pax `(list action)`~ u.pur) ::TODO nest-fail if no cast
|
2017-03-25 02:54:56 +03:00
|
|
|
::x she needs read permissions to subscribe.
|
2017-03-23 03:34:56 +03:00
|
|
|
?. (pa-visible:soy her)
|
|
|
|
(ra-evil %talk-no-story)
|
2017-03-25 02:54:56 +03:00
|
|
|
::TODO? or (pa-sauce ost.hid [%quit ~]~) ?
|
2017-04-04 22:55:05 +03:00
|
|
|
=^ who +>.$ (ra-human her)
|
2017-03-25 02:54:56 +03:00
|
|
|
::x send current data to bring her up to date.
|
|
|
|
=. soy (pa-report-cabal:soy ost.hid ~ ~)
|
2017-04-04 22:55:05 +03:00
|
|
|
::=. soy (pa-report-group:soy ost.hid ~ ~) ::TODO reenable if pa-not=dif
|
|
|
|
=. soy (pa-first-grams:soy her t.pax) ::x also adds new sub to followers
|
2017-03-23 03:34:56 +03:00
|
|
|
::x add her status to presence map.
|
|
|
|
=. soy (pa-notify:soy her %hear who)
|
|
|
|
::x apply changes to story.
|
|
|
|
pa-abet:soy
|
|
|
|
::
|
2017-03-29 01:11:12 +03:00
|
|
|
++ ra-welcome
|
2017-04-12 14:14:09 +03:00
|
|
|
::x brings new reader up to date. susbcribes it to the specified story.
|
|
|
|
::
|
|
|
|
|= {new/bone pax/path}
|
|
|
|
=/ sor/knot
|
|
|
|
?: ?=({@tas *} pax) i.pax
|
|
|
|
(main our.hid) :: default to mailbox
|
|
|
|
=. +>.$ ::TODO =?
|
|
|
|
?: (~(has by general) new) +>.$
|
|
|
|
%- ra-emil
|
2017-04-12 23:37:37 +03:00
|
|
|
:~ ::x bound glyphs
|
2017-04-12 14:14:09 +03:00
|
|
|
[new %diff %talk-lowdown %glyph nak]
|
|
|
|
::x nicknames
|
|
|
|
[new %diff %talk-lowdown %names (~(run by folks) some)]
|
|
|
|
==
|
|
|
|
=. +>.$ ::TODO =?
|
|
|
|
?. (~(has by stories) sor) +>.$
|
2017-04-12 23:37:37 +03:00
|
|
|
=+ soy=(~(got by stories) sor)
|
|
|
|
%- ra-emil
|
|
|
|
:~ ::x configurations
|
|
|
|
:* new %diff %talk-lowdown %confs
|
|
|
|
`shape.soy (~(run by mirrors.soy) some)
|
|
|
|
==
|
|
|
|
::x presences
|
|
|
|
[new %diff %talk-lowdown %precs locals.soy remotes.soy]
|
|
|
|
::x messages
|
|
|
|
[new %diff %talk-lowdown %grams 0 grams.soy]
|
2017-04-12 14:14:09 +03:00
|
|
|
==
|
|
|
|
%= +>.$
|
|
|
|
general
|
|
|
|
%+ ~(put by general) new
|
|
|
|
(~(put in (fall (~(get by general) new) ~)) sor)
|
2017-04-04 01:14:06 +03:00
|
|
|
==
|
2017-03-29 01:11:12 +03:00
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ ra-think :: publish+review
|
|
|
|
::x consumes each thought.
|
|
|
|
::
|
|
|
|
|= {pub/? her/ship tiz/(list thought)}
|
|
|
|
^+ +>
|
|
|
|
?~ tiz +>
|
|
|
|
$(tiz t.tiz, +> (ra-consume pub her i.tiz))
|
|
|
|
::
|
|
|
|
++ ra-normal :: normalize
|
|
|
|
::x sanitize %lin speech, enforce lowercase and no special characters.
|
|
|
|
::
|
|
|
|
|= tip/thought
|
|
|
|
^- thought
|
|
|
|
?. ?=({$lin *} r.r.tip) tip
|
|
|
|
%_ tip
|
|
|
|
q.r.r
|
|
|
|
%- crip
|
|
|
|
%+ scag 64
|
|
|
|
%- tufa
|
|
|
|
%+ turn (tuba (trip q.r.r.tip))
|
|
|
|
|= a/@c
|
|
|
|
?: &((gte a 'A') (lte a 'Z'))
|
|
|
|
(add a 32)
|
|
|
|
?: |((lth a 32) (gth a 126))
|
|
|
|
`@`'?'
|
|
|
|
a
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ ra-consume :: consume thought
|
|
|
|
::x if pub is true, sends the thought to each partner in the audience.
|
|
|
|
::x if false, updates the thought in our store.
|
|
|
|
::
|
|
|
|
|= {pub/? her/ship tip/thought}
|
|
|
|
=. tip (ra-normal tip)
|
|
|
|
=+ aud=(~(tap by q.tip) ~) ::x why ~ ?
|
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ aud +>.^$
|
|
|
|
$(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip))
|
|
|
|
::
|
|
|
|
++ ra-conduct :: thought to partner
|
|
|
|
::x record a message or sends it.
|
|
|
|
::
|
|
|
|
|= {pub/? her/ship tay/partner tip/thought}
|
|
|
|
^+ +>
|
|
|
|
?- -.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)
|
|
|
|
$| !!
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ ra-record :: add to story
|
|
|
|
::x add or update a telegram in story man.
|
|
|
|
::
|
|
|
|
|= {man/knot gam/telegram}
|
|
|
|
%- (ra-know man) |= par/_pa =< pa-abet
|
|
|
|
(pa-learn:par gam)
|
|
|
|
::
|
|
|
|
++ ra-transmit :: send to neighbor
|
|
|
|
::x sends a thought to a station, adds it to the outbox.
|
|
|
|
::
|
|
|
|
|= {cuz/station tip/thought}
|
|
|
|
^+ +>
|
|
|
|
=. +>
|
|
|
|
%+ ra-emit ost.hid
|
|
|
|
:* %poke
|
|
|
|
/repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz]
|
2017-03-29 18:03:59 +03:00
|
|
|
[p.cuz %talk-guardian]
|
2017-03-23 03:34:56 +03:00
|
|
|
[%talk-command `command`[%review tip ~]]
|
|
|
|
==
|
|
|
|
+>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip))
|
|
|
|
::
|
|
|
|
++ pa :: story core
|
|
|
|
::x story core, used for doing work on a story.
|
|
|
|
::x as always, an -abet arms is used for applying changes to the state.
|
|
|
|
::x ++pa-watch- arms get called by ++ra-subscribe to add a subscriber.
|
2017-04-10 23:35:25 +03:00
|
|
|
::x bones are used to identify subscribers (source event identifiers).
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|_ ::x man: the knot identifying the story in stories.
|
2017-04-14 01:46:15 +03:00
|
|
|
::x acs: talk actions issued due to changes.
|
2017-04-10 23:35:25 +03:00
|
|
|
::x story doesn't get a face because ease of use.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
$: man/knot
|
2017-04-14 01:46:15 +03:00
|
|
|
acs/(list action)
|
2017-03-23 03:34:56 +03:00
|
|
|
story
|
|
|
|
==
|
|
|
|
++ pa-abet
|
|
|
|
::x apply/fold changes back into the stories map.
|
|
|
|
::
|
|
|
|
^+ +>
|
2017-04-10 23:35:25 +03:00
|
|
|
=. +> +>(stories (~(put by stories) man `story`+<+>))
|
2017-04-14 01:46:15 +03:00
|
|
|
=. acs (flop acs)
|
2017-04-10 23:35:25 +03:00
|
|
|
|- ^+ +>+
|
2017-04-14 01:46:15 +03:00
|
|
|
?~ acs +>+
|
|
|
|
=. +>+ (ra-action ost.hid i.acs)
|
|
|
|
$(acs t.acs)
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2017-04-14 01:46:15 +03:00
|
|
|
++ pa-act
|
|
|
|
::x stores a talk action.
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
2017-04-14 01:46:15 +03:00
|
|
|
|= act/action
|
2017-04-10 23:35:25 +03:00
|
|
|
^+ +>
|
2017-04-14 01:46:15 +03:00
|
|
|
+>(acs [act acs])
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-03-25 02:54:56 +03:00
|
|
|
++ pa-followers
|
|
|
|
^- (set bone)
|
|
|
|
%- ~(gas in *(set bone))
|
|
|
|
%+ turn (~(tap by followers))
|
|
|
|
|= {b/bone *} b
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ pa-admire :: accept from
|
|
|
|
::x should be checking her write permissions, but defaults to allowed.
|
|
|
|
::x commented code seems to use an older control structure.
|
|
|
|
::x? this seems like an easy fix, why was this ever disabled?
|
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^- ?
|
2017-04-10 23:35:25 +03:00
|
|
|
?- p.cordon.shape
|
|
|
|
$black !(~(has in q.cordon.shape) her) ::x channel, blacklist
|
|
|
|
$green (~(has in q.cordon.shape) her) ::x journal, whitelist
|
|
|
|
$brown !(~(has in q.cordon.shape) her) ::x mailbox, blacklist
|
|
|
|
$white (~(has in q.cordon.shape) her) ::x village, whitelist
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-visible :: display to
|
|
|
|
::x checks her read permissions.
|
|
|
|
::
|
|
|
|
|= her/ship
|
|
|
|
^- ?
|
|
|
|
?- p.cordon.shape
|
2017-04-10 23:35:25 +03:00
|
|
|
$black !(~(has in q.cordon.shape) her) ::x channel, blacklist
|
2017-03-23 03:34:56 +03:00
|
|
|
$green & ::x journal, all
|
|
|
|
$brown (team our.hid her) ::x mailbox, our
|
2017-04-10 23:35:25 +03:00
|
|
|
$white (~(has in q.cordon.shape) her) ::x village, whitelist
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ pa-report :: update
|
|
|
|
::x sends report to all bones.
|
|
|
|
::
|
|
|
|
|= {wac/(set bone) caw/report}
|
|
|
|
:: ~& [%pa-report man -.caw]
|
|
|
|
^+ +>
|
|
|
|
?~ wac +>
|
|
|
|
=. +> $(wac l.wac)
|
|
|
|
=. +> $(wac r.wac)
|
|
|
|
:: ~& [%pa-report-cabal man shape]
|
|
|
|
(pa-sauce n.wac [%diff %talk-report caw]~)
|
|
|
|
::
|
2017-03-29 18:03:59 +03:00
|
|
|
++ pa-inform
|
2017-04-12 14:14:09 +03:00
|
|
|
::x sends lowdown to all interested readers.
|
2017-03-29 18:03:59 +03:00
|
|
|
::
|
|
|
|
|= low/lowdown
|
|
|
|
=. moves
|
2017-04-12 14:14:09 +03:00
|
|
|
%+ weld
|
|
|
|
^- (list move)
|
|
|
|
%+ murn (~(tap by general))
|
|
|
|
|= {b/bone s/(set knot)}
|
|
|
|
^- (unit move)
|
2017-04-12 23:37:37 +03:00
|
|
|
?. (~(has in s) man) ~
|
2017-04-12 14:14:09 +03:00
|
|
|
`[b %diff %talk-lowdown low]
|
|
|
|
moves
|
2017-03-29 18:03:59 +03:00
|
|
|
+>.$
|
|
|
|
::
|
2017-04-03 17:50:35 +03:00
|
|
|
++ pa-remotes
|
|
|
|
::x produces remotes, with all our local presences replaced by their
|
|
|
|
::x versions from their stories.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-03 15:42:09 +03:00
|
|
|
%- ~(urn by remotes) :: XX performance
|
|
|
|
|= {pan/partner atl/atlas} ^- atlas
|
|
|
|
?. &(?=($& -.pan) =(our.hid p.p.pan)) atl
|
|
|
|
=+ soy=(~(get by stories) q.p.pan)
|
|
|
|
?~ soy atl
|
|
|
|
locals.u.soy
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-12 21:09:23 +03:00
|
|
|
++ pa-report-group :: update presence
|
2017-04-03 17:50:35 +03:00
|
|
|
::x build a group report, containing our different presence maps, and
|
|
|
|
::x send it to all bones.
|
|
|
|
::x we send remote presences to facilitate federation. aka "relay"
|
|
|
|
::
|
|
|
|
|= vew/(set bone)
|
|
|
|
(pa-report vew %group locals pa-remotes)
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ pa-report-cabal :: update config
|
2017-03-25 02:54:56 +03:00
|
|
|
::x a cabal report, containing our and remote configs, to all bones.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-03-25 02:54:56 +03:00
|
|
|
|= vew/(set bone)
|
2017-04-03 15:42:09 +03:00
|
|
|
(pa-report vew %cabal shape mirrors)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-cabal
|
|
|
|
::x add station's config to our remote config map.
|
|
|
|
::
|
2017-04-03 15:42:09 +03:00
|
|
|
|= {cuz/station con/config ham/(map station config)}
|
2017-03-23 03:34:56 +03:00
|
|
|
^+ +>
|
2017-04-03 15:42:09 +03:00
|
|
|
=+ old=mirrors
|
|
|
|
=. mirrors (~(put by mirrors) cuz con)
|
|
|
|
?: =(mirrors old) +>.$
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +>.$ (pa-inform %confs `shape (strap cuz `con))
|
2017-04-03 15:42:09 +03:00
|
|
|
(pa-report-cabal pa-followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-diff-talk-report :: subscribed update
|
|
|
|
::x process a talk report from cuz.
|
|
|
|
::
|
|
|
|
|= {cuz/station rad/report}
|
|
|
|
^+ +>
|
|
|
|
::x verify we are supposed to receive reports from cuz.
|
|
|
|
?. (~(has in sources.shape) [%& cuz])
|
2017-04-04 22:55:05 +03:00
|
|
|
~& [%pa-diff-unexpected cuz -.rad]
|
2017-03-23 03:34:56 +03:00
|
|
|
+>
|
2017-03-29 21:17:21 +03:00
|
|
|
?- -.rad
|
2017-04-03 15:42:09 +03:00
|
|
|
$cabal (pa-cabal cuz +.rad)
|
|
|
|
$group (pa-remind [%& cuz] +.rad)
|
2017-03-23 03:34:56 +03:00
|
|
|
$grams (pa-lesson q.+.rad)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ pa-quit :: stop subscription
|
|
|
|
::x delete tay from our subscriptions, then send an updated capal report.
|
|
|
|
::
|
|
|
|
|= tay/partner
|
2017-04-11 18:01:25 +03:00
|
|
|
^+ +>
|
|
|
|
?. (~(has in sources.shape) tay) +>
|
|
|
|
=. sources.shape (~(del in sources.shape) tay)
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +> (pa-inform %confs `shape ~)
|
2017-04-11 18:01:25 +03:00
|
|
|
(pa-report-cabal pa-followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-sauce :: send backward
|
|
|
|
::x turns cards into moves, reverse order, prepend to existing moves.
|
|
|
|
::
|
|
|
|
|= {ost/bone cub/(list card)}
|
|
|
|
%_ +>.$
|
|
|
|
moves
|
|
|
|
(welp (flop (turn cub |=(a/card [ost a]))) moves)
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ pa-abjure :: unsubscribe move
|
|
|
|
::x for each partner, produce a %pull/unsubscribe move.
|
|
|
|
::
|
|
|
|
|= tal/(list partner)
|
2017-03-24 01:07:35 +03:00
|
|
|
%+ pa-sauce 0 ::x subscription is caused by this app
|
2017-03-23 03:34:56 +03:00
|
|
|
%- zing
|
|
|
|
%+ turn tal
|
|
|
|
|= tay/partner
|
|
|
|
^- (list card)
|
|
|
|
?- -.tay
|
|
|
|
$| ~& tweet-abjure+p.p.tay
|
|
|
|
!!
|
|
|
|
::
|
2017-03-30 15:17:37 +03:00
|
|
|
$& ~& [%pa-abjure /[man]/(scot %p p.p.tay)/[q.p.tay]]
|
2017-03-23 03:34:56 +03:00
|
|
|
:_ ~
|
|
|
|
:* %pull
|
|
|
|
/friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
|
2017-03-29 18:03:59 +03:00
|
|
|
[p.p.tay %talk-guardian]
|
2017-03-23 03:34:56 +03:00
|
|
|
~
|
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ pa-acquire :: subscribe to
|
2017-04-12 23:37:37 +03:00
|
|
|
::x subscribe this story to the partners.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= tal/(list partner)
|
2017-03-30 15:17:37 +03:00
|
|
|
%+ pa-sauce 0 ::x subscription is caused by this app
|
2017-03-23 03:34:56 +03:00
|
|
|
%- zing
|
|
|
|
%+ turn tal
|
|
|
|
|= tay/partner
|
|
|
|
^- (list card)
|
|
|
|
=+ num=(~(get by sequence) tay)
|
|
|
|
=+ old=(sub now.hid ~d1) :: XX full backlog
|
|
|
|
::x subscribe starting at the last message we read,
|
|
|
|
::x or if we haven't read any yet, messages from up to a day ago.
|
|
|
|
=+ ini=?^(num (scot %ud u.num) (scot %da old))
|
|
|
|
?- -.tay
|
|
|
|
$| !!
|
2017-04-12 21:09:23 +03:00
|
|
|
$& :_ ~
|
2017-03-23 03:34:56 +03:00
|
|
|
:* %peer
|
|
|
|
/friend/show/[man]/(scot %p p.p.tay)/[q.p.tay]
|
2017-03-29 18:03:59 +03:00
|
|
|
[p.p.tay %talk-guardian]
|
2017-03-25 02:54:56 +03:00
|
|
|
/[q.p.tay]/[ini]
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ pa-reform :: reconfigure, ugly
|
|
|
|
::x change config of current story, subscribe/unsubscribe to/from the
|
|
|
|
::x partners we gained/lost, and send out an updated cabal report.
|
|
|
|
::
|
|
|
|
|= cof/config
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +>.$ (pa-inform %confs `cof ~)
|
2017-03-23 03:34:56 +03:00
|
|
|
=+ ^= dif ^- (pair (list partner) (list partner))
|
|
|
|
=+ old=`(list partner)`(~(tap in sources.shape) ~)
|
|
|
|
=+ new=`(list partner)`(~(tap in sources.cof) ~)
|
|
|
|
:- (skip new |=(a/partner (~(has in sources.shape) a)))
|
|
|
|
(skip old |=(a/partner (~(has in sources.cof) a)))
|
|
|
|
=. +>.$ (pa-acquire p.dif)
|
|
|
|
=. +>.$ (pa-abjure q.dif)
|
|
|
|
=. shape cof
|
2017-03-28 00:17:09 +03:00
|
|
|
(pa-report-cabal pa-followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-04 17:15:12 +03:00
|
|
|
++ pa-reform-gone
|
2017-04-11 18:01:25 +03:00
|
|
|
=. stories (~(del by stories) man)
|
2017-04-12 23:37:37 +03:00
|
|
|
=. . (pa-inform %confs ~ ~)
|
2017-04-04 17:15:12 +03:00
|
|
|
=. . (pa-report-cabal pa-followers)
|
|
|
|
(pa-abjure (~(tap in sources.shape)))
|
|
|
|
::
|
2017-03-23 03:34:56 +03:00
|
|
|
++ pa-cancel :: unsubscribe from
|
|
|
|
::x deletes the current ost.hid from all follower groups.
|
|
|
|
::
|
|
|
|
:: ~& [%pa-cancel ost.hid]
|
2017-03-25 02:54:56 +03:00
|
|
|
.(followers (~(del by followers) ost.hid))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-notify :: local presence
|
|
|
|
::x add her status to our presence map. if this changes it, send report.
|
|
|
|
::
|
|
|
|
|= {her/ship saz/status}
|
|
|
|
^+ +>
|
2017-03-27 18:26:05 +03:00
|
|
|
=/ nol (~(put by locals) her saz)
|
2017-03-23 03:34:56 +03:00
|
|
|
?: =(nol locals) +>.$
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +>.$ (pa-inform %precs (strap her saz) ~)
|
2017-03-25 02:54:56 +03:00
|
|
|
(pa-report-group(locals nol) pa-followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
2017-04-03 15:42:09 +03:00
|
|
|
++ pa-remind :: remote presence
|
2017-03-23 03:34:56 +03:00
|
|
|
::x adds tay's loc to our remote presence map, after merging with rem.
|
|
|
|
::x if this changes anything, send update report.
|
|
|
|
::
|
2017-04-03 15:42:09 +03:00
|
|
|
|= {tay/partner loc/atlas rem/(map partner atlas)}
|
|
|
|
::x remove this story from the presence map, since it's in local already.
|
|
|
|
=. rem (~(del by rem) %& our.hid man) :: superceded by local data
|
|
|
|
=/ buk (~(uni by remotes) rem) ::TODO drop?
|
|
|
|
=. buk (~(put by buk) tay loc)
|
|
|
|
?: =(buk remotes) +>.$
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +>.$ (pa-inform %precs ~ (~(dif in buk) remotes))
|
2017-04-03 15:42:09 +03:00
|
|
|
(pa-report-group(remotes buk) pa-followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-start :: start stream
|
|
|
|
::x grab all telegrams that fall within the river and send them in a
|
|
|
|
::x grams report to ost.hid.
|
|
|
|
::
|
|
|
|
|= riv/river
|
|
|
|
^+ +>
|
2017-03-24 01:07:35 +03:00
|
|
|
::TODO use =; lab/{dun/? end/@u zeg/(list telegram)}
|
2017-03-23 03:34:56 +03:00
|
|
|
=- :: ~& [%pa-start riv lab]
|
|
|
|
=. +>.$
|
2017-04-04 22:55:05 +03:00
|
|
|
(pa-sauce ost.hid [[%diff %talk-report %grams q.lab r.lab] ~])
|
2017-03-23 03:34:56 +03:00
|
|
|
?: p.lab ::x? dun never gets changed, so always | ?
|
|
|
|
(pa-sauce ost.hid [[%quit ~] ~])
|
2017-03-25 02:54:56 +03:00
|
|
|
+>.$(followers (~(put by followers) ost.hid riv))
|
2017-03-23 03:34:56 +03:00
|
|
|
^= lab
|
|
|
|
=+ [end=count gaz=grams dun=| zeg=*(list telegram)]
|
|
|
|
|- ^- (trel ? @ud (list telegram))
|
|
|
|
?~ gaz [dun end zeg]
|
|
|
|
?: ?- -.q.riv :: after the end
|
|
|
|
$ud (lte p.q.riv end)
|
|
|
|
$da (lte p.q.riv p.r.q.i.gaz)
|
|
|
|
==
|
|
|
|
::x if we're past the river, continue browsing back.
|
2017-03-24 01:07:35 +03:00
|
|
|
$(end (dec end), gaz t.gaz) ::TODO dun &
|
2017-03-23 03:34:56 +03:00
|
|
|
?: ?- -.p.riv :: before the start
|
|
|
|
$ud (lth end p.p.riv)
|
|
|
|
$da (lth p.r.q.i.gaz p.p.riv)
|
|
|
|
==
|
|
|
|
::x if we're before the river, we're done.
|
|
|
|
[dun end zeg]
|
|
|
|
::x if we're in the river, add this gram and continue.
|
|
|
|
$(end (dec end), gaz t.gaz, zeg [i.gaz zeg])
|
|
|
|
::
|
2017-03-25 02:54:56 +03:00
|
|
|
++ pa-first-grams :: subscribe messages
|
2017-03-23 03:34:56 +03:00
|
|
|
::x (called upon subscribe) send backlog of grams to her.
|
|
|
|
::x deduces which messages to send from pax.
|
|
|
|
::
|
|
|
|
|= {her/ship pax/path}
|
|
|
|
^+ +>
|
2017-04-10 23:35:25 +03:00
|
|
|
?. (pa-visible her)
|
|
|
|
~& [%pa-first-grams-visible ~]
|
2017-03-23 03:34:56 +03:00
|
|
|
(pa-sauce ost.hid [%quit ~]~)
|
|
|
|
::x find the range of grams to send.
|
|
|
|
=+ ^= ruv ^- (unit river)
|
|
|
|
%+ biff ::x collapse unit list.
|
|
|
|
(zl:jo (turn pax ;~(biff slay |=(a/coin `(unit dime)`?~(-.a a ~)))))
|
|
|
|
|= paf/(list dime)
|
|
|
|
?~ paf
|
|
|
|
$(paf [%ud (sub (max 64 count) 64)]~)
|
|
|
|
?~ t.paf
|
|
|
|
$(t.paf [%da (dec (bex 128))]~)
|
|
|
|
?. ?=({{?($ud $da) @} {?($ud $da) @} $~} paf)
|
|
|
|
~
|
2017-03-24 01:07:35 +03:00
|
|
|
`[[?+(- . $ud .)]:i.paf [?+(- . $ud .)]:i.t.paf] ::XX arvo issue #366
|
2017-03-25 02:54:56 +03:00
|
|
|
:: ~& [%pa-first-grams her pax ruv]
|
2017-03-23 03:34:56 +03:00
|
|
|
?~ ruv
|
2017-03-25 02:54:56 +03:00
|
|
|
~& [%pa-first-grams-malformed pax]
|
2017-03-23 03:34:56 +03:00
|
|
|
(pa-sauce ost.hid [%quit ~]~)
|
|
|
|
(pa-start u.ruv)
|
|
|
|
::
|
|
|
|
++ pa-refresh :: update to listeners
|
|
|
|
::x called when grams get added or changed. calculates the changes and
|
2017-03-25 02:54:56 +03:00
|
|
|
::x sends them to all followers. if we run into any followers that are
|
|
|
|
::x no longer interested in this story, remove them.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= {num/@ud gam/telegram}
|
|
|
|
^+ +>
|
2017-04-12 14:14:09 +03:00
|
|
|
::x notify the interested readers.
|
2017-04-12 23:37:37 +03:00
|
|
|
=. +> (pa-inform %grams num gam ~)
|
2017-03-29 01:11:12 +03:00
|
|
|
::x notify only the followers who are currently interested.
|
2017-03-23 03:34:56 +03:00
|
|
|
=+ ^= moy
|
|
|
|
|- ^- (pair (list bone) (list move))
|
2017-03-25 02:54:56 +03:00
|
|
|
?~ followers [~ ~]
|
|
|
|
:: ~& [%pa-refresh num n.followers]
|
|
|
|
=+ lef=$(followers l.followers)
|
|
|
|
=+ rit=$(followers r.followers)
|
2017-03-23 03:34:56 +03:00
|
|
|
=+ old=[p=(welp p.lef p.rit) q=(welp q.lef q.rit)]
|
2017-03-25 02:54:56 +03:00
|
|
|
?: ?- -.q.q.n.followers :: after the end
|
|
|
|
$ud (lte p.q.q.n.followers num)
|
|
|
|
$da (lte p.q.q.n.followers p.r.q.gam)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
2017-03-25 02:54:56 +03:00
|
|
|
[[p.n.followers p.old] [[p.n.followers %quit ~] q.old]]
|
|
|
|
?: ?- -.p.q.n.followers :: before the start
|
|
|
|
$ud (gth p.p.q.n.followers num)
|
|
|
|
$da (gth p.p.q.n.followers p.r.q.gam)
|
2017-03-23 03:34:56 +03:00
|
|
|
==
|
|
|
|
old
|
|
|
|
:- p.old
|
2017-03-25 02:54:56 +03:00
|
|
|
[[p.n.followers %diff %talk-report %grams num gam ~] q.old]
|
2017-03-29 18:03:59 +03:00
|
|
|
=. moves (welp q.moy moves)
|
2017-03-23 03:34:56 +03:00
|
|
|
|- ^+ +>.^$
|
|
|
|
?~ p.moy +>.^$
|
2017-03-25 02:54:56 +03:00
|
|
|
$(p.moy t.p.moy, followers (~(del by followers) i.p.moy))
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ pa-lesson :: learn multiple
|
|
|
|
::x learn all telegrams in a list.
|
|
|
|
::
|
|
|
|
|= gaz/(list telegram)
|
|
|
|
^+ +>
|
|
|
|
?~ gaz +>
|
|
|
|
$(gaz t.gaz, +> (pa-learn i.gaz))
|
|
|
|
::
|
|
|
|
++ pa-learn :: learn message
|
|
|
|
::x store an incoming telegram, modifying audience to say we received it.
|
|
|
|
::x update existing telegram if it already exists.
|
|
|
|
::
|
|
|
|
|= gam/telegram
|
|
|
|
^+ +>
|
|
|
|
::x if author isn't allowed to write here, reject.
|
|
|
|
?. (pa-admire p.gam)
|
|
|
|
+>.$
|
|
|
|
=. q.q.gam
|
|
|
|
::x if we are in the audience, mark us as having received it.
|
|
|
|
=+ ole=(~(get by q.q.gam) [%& our.hid man])
|
|
|
|
?^ ole (~(put by q.q.gam) [%& our.hid man] -.u.ole %received)
|
|
|
|
:: for fedearted stations, pretend station src/foo is also our/foo
|
|
|
|
:: XX pass src through explicitly instead of relying on implicit
|
|
|
|
:: value in hid from the subscription to src/foo
|
|
|
|
=+ ole=(~(get by q.q.gam) [%& src.hid man])
|
|
|
|
?~ ole q.q.gam
|
|
|
|
::x as described above, fake src into our.
|
|
|
|
=. q.q.gam (~(del by q.q.gam) [%& src.hid man])
|
|
|
|
(~(put by q.q.gam) [%& our.hid man] -.u.ole %received)
|
|
|
|
=+ old=(~(get by known) p.q.gam)
|
|
|
|
?~ old
|
|
|
|
(pa-append gam) ::x add
|
|
|
|
(pa-revise u.old gam) ::x modify
|
|
|
|
::
|
|
|
|
++ pa-append :: append new
|
|
|
|
::x add gram to our story, and update our subscribers.
|
|
|
|
::
|
|
|
|
|= gam/telegram
|
|
|
|
^+ +>
|
|
|
|
%+ %= pa-refresh
|
|
|
|
grams [gam grams]
|
|
|
|
count +(count)
|
|
|
|
known (~(put by known) p.q.gam count)
|
|
|
|
==
|
|
|
|
count
|
|
|
|
gam
|
|
|
|
::
|
|
|
|
++ pa-revise :: revise existing
|
|
|
|
::x modify a gram in our story, and update our subscribers.
|
|
|
|
::
|
|
|
|
|= {num/@ud gam/telegram}
|
|
|
|
=+ way=(sub count num)
|
|
|
|
?: =(gam (snag (dec way) grams))
|
2017-03-30 15:17:37 +03:00
|
|
|
+>.$ :: no change
|
2017-03-23 03:34:56 +03:00
|
|
|
=. grams (welp (scag (dec way) grams) [gam (slag way grams)])
|
|
|
|
(pa-refresh num gam)
|
2017-04-10 23:35:25 +03:00
|
|
|
::
|
|
|
|
++ pa-unearth
|
|
|
|
::x find the bones in our follower list than belong to a ship in sis.
|
|
|
|
::
|
|
|
|
|= sis/(set ship)
|
|
|
|
^- (set bone)
|
|
|
|
%- ~(rep in sup.hid)
|
|
|
|
|= {{b/bone s/ship p/path} c/(set bone)}
|
|
|
|
?. ?& (~(has in sis) s)
|
|
|
|
(~(has by followers) b)
|
|
|
|
?=({@tas *} p)
|
|
|
|
=(i.p man)
|
|
|
|
==
|
|
|
|
c
|
|
|
|
(~(put in c) b)
|
|
|
|
::
|
|
|
|
++ pa-permit
|
|
|
|
::x invite/banish ships to/from this station.
|
|
|
|
::
|
|
|
|
|= {inv/? sis/(set ship)}
|
|
|
|
^+ +>
|
|
|
|
=/ white/? ?=(?($white $green) p.cordon.shape) :: whitelist?
|
|
|
|
=/ add/? =(inv white) :: add to list?
|
|
|
|
=. followers ::TODO =?
|
|
|
|
?: inv followers
|
|
|
|
%- ~(rep in (pa-unearth sis))
|
|
|
|
|= {b/bone f/_followers}
|
|
|
|
=. f ?~ f followers f ::TODO =?
|
|
|
|
(~(del by f) b)
|
|
|
|
=. +>.$
|
2017-04-14 01:46:15 +03:00
|
|
|
%- pa-act
|
|
|
|
:- %phrase
|
2017-04-10 23:35:25 +03:00
|
|
|
%- ~(rep in sis)
|
2017-04-14 01:46:15 +03:00
|
|
|
|= {s/ship a/(set partner) t/(list speech)}
|
|
|
|
:- (~(put in a) [%& s (main s)])
|
|
|
|
[[%inv inv [our.hid man]] t]
|
2017-04-10 23:35:25 +03:00
|
|
|
%- pa-reform
|
|
|
|
%= shape
|
|
|
|
q.cordon
|
|
|
|
%. sis
|
|
|
|
?: add
|
|
|
|
~(uni in q.cordon.shape)
|
|
|
|
~(dif in q.cordon.shape)
|
|
|
|
==
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|
|
|
|
--
|
|
|
|
::
|
|
|
|
++ peer :: accept subscription
|
|
|
|
::x incoming subscription on pax.
|
|
|
|
::
|
|
|
|
|= pax/path
|
|
|
|
^+ [*(list move) +>]
|
2017-03-27 18:26:05 +03:00
|
|
|
~? !(team src.hid our.hid) [%peer-talk-stranger src.hid]
|
2017-04-04 22:55:05 +03:00
|
|
|
?: ?=({$sole *} pax) ~&(%broker-no-sole !!)
|
2017-03-23 03:34:56 +03:00
|
|
|
ra-abet:(ra-subscribe:ra src.hid pax)
|
|
|
|
::
|
|
|
|
++ poke-talk-command :: accept command
|
|
|
|
::x incoming talk command. process it and update logs.
|
|
|
|
::
|
|
|
|
|= cod/command
|
|
|
|
^+ [*(list move) +>]
|
|
|
|
:: ~& [%talk-poke-command src.hid cod]
|
|
|
|
=^ mos +>.$
|
|
|
|
ra-abet:(ra-apply:ra src.hid cod)
|
|
|
|
=^ mow +>.$ log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
|
|
|
::
|
2017-04-10 23:24:25 +03:00
|
|
|
++ poke-talk-action :: accept action
|
|
|
|
::x incoming talk action. process it.
|
|
|
|
::
|
|
|
|
|= act/action
|
|
|
|
?. (team src.hid our.hid)
|
|
|
|
~& [%talk-action-stranger src.hid]
|
|
|
|
[~ +>]
|
|
|
|
ra-abet:(ra-action:ra ost.hid act)
|
|
|
|
::
|
2017-03-30 15:17:37 +03:00
|
|
|
++ diff-talk-report :: accept report
|
2017-03-23 03:34:56 +03:00
|
|
|
::x incoming talk-report. process it and update logs.
|
|
|
|
::
|
|
|
|
|= {way/wire rad/report}
|
|
|
|
^- (quip move +>)
|
|
|
|
=^ mos +>.$
|
|
|
|
%+ etch-friend way |= {man/knot cuz/station}
|
|
|
|
ra-abet:(ra-diff-talk-report:ra man cuz rad)
|
|
|
|
=^ mow +>.$ log-all-to-file
|
|
|
|
[(welp mos mow) +>.$]
|
|
|
|
::
|
|
|
|
++ coup-repeat ::
|
|
|
|
::x ack from ++ra-transmit. mark the message as received or rejected.
|
|
|
|
::
|
|
|
|
|= {way/wire saw/(unit tang)}
|
|
|
|
%+ etch-repeat [%repeat way] |= {num/@ud src/@p man/knot}
|
|
|
|
ra-abet:(ra-coup-repeat:ra [num src man] saw)
|
|
|
|
::
|
|
|
|
++ etch :: parse wire
|
|
|
|
::x parse wire to obtain either %friend with story and station or %repeat
|
|
|
|
::x with message number, source ship and story.
|
|
|
|
::
|
|
|
|
|= way/wire
|
|
|
|
^- weir
|
|
|
|
?+ -.way !!
|
2017-03-30 15:17:37 +03:00
|
|
|
$friend
|
2017-03-23 03:34:56 +03:00
|
|
|
?> ?=({$show @ @ @ $~} t.way)
|
|
|
|
[%friend i.t.t.way (slav %p i.t.t.t.way) i.t.t.t.t.way]
|
|
|
|
::
|
|
|
|
$repeat
|
|
|
|
?> ?=({@ @ @ $~} t.way)
|
|
|
|
[%repeat (slav %ud i.t.way) (slav %p i.t.t.way) i.t.t.t.way]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ etch-friend ::
|
|
|
|
::x parse a /friend wire, call gate with resulting data.
|
|
|
|
::
|
|
|
|
|= {way/wire fun/$-({man/knot cuz/station} {(list move) _.})}
|
|
|
|
=+ wer=(etch way)
|
|
|
|
?>(?=($friend -.wer) (fun p.wer q.wer))
|
|
|
|
::
|
|
|
|
++ etch-repeat ::
|
|
|
|
::x parse a /repeat wire, call gate with resulting data.
|
|
|
|
::
|
|
|
|
|= {way/wire fun/$-({num/@ud src/@p man/knot} {(list move) _.})}
|
|
|
|
=+ wer=(etch way)
|
|
|
|
?>(?=($repeat -.wer) (fun p.wer q.wer r.wer))
|
|
|
|
::
|
|
|
|
++ reap-friend ::
|
|
|
|
::x subscription n/ack. if it failed, remove their subscription from state.
|
|
|
|
::
|
|
|
|
|= {way/wire saw/(unit tang)}
|
|
|
|
^- (quip move +>)
|
|
|
|
?~ saw [~ +>]
|
|
|
|
%+ etch-friend [%friend way] |= {man/knot cuz/station}
|
|
|
|
=. u.saw [>%reap-friend-fail man cuz< u.saw]
|
|
|
|
%- (slog (flop u.saw))
|
|
|
|
ra-abet:(ra-quit:ra man cuz)
|
|
|
|
::
|
|
|
|
++ quit-friend ::
|
|
|
|
::x resubscribe.
|
|
|
|
::
|
|
|
|
|= way/wire
|
|
|
|
%+ etch-friend [%friend way] |= {man/knot cuz/station}
|
|
|
|
ra-abet:(ra-retry:ra man cuz)
|
|
|
|
::
|
|
|
|
++ pull ::
|
2017-03-30 15:17:37 +03:00
|
|
|
::x unsubscribe.
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
|= pax/path
|
|
|
|
^+ [*(list move) +>]
|
|
|
|
:: ~& [%talk-pull src.hid ost.hid pax]
|
2017-03-27 18:26:05 +03:00
|
|
|
ra-abet:(ra-cancel:ra src.hid pax)
|
2017-03-23 03:34:56 +03:00
|
|
|
::
|
|
|
|
++ log-all-to-file
|
|
|
|
::x for every story we're logging, (over)write all their grams to log files,
|
|
|
|
::x if new ones have arrived.
|
|
|
|
::
|
|
|
|
^- (quip move .)
|
|
|
|
?: & [~ .] :: XXX!!!!
|
|
|
|
:_ %_ .
|
|
|
|
log %- ~(urn by log)
|
|
|
|
|=({man/knot len/@ud} count:(~(got by stories) man))
|
|
|
|
==
|
|
|
|
%+ murn (~(tap by log))
|
|
|
|
|= {man/knot len/@ud}
|
|
|
|
^- (unit move)
|
|
|
|
?: (gte len count:(~(got by stories) man))
|
|
|
|
~
|
|
|
|
`(log-to-file man)
|
|
|
|
::
|
|
|
|
++ log-to-file
|
|
|
|
::x log all grams of story man to a file.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
^- move
|
|
|
|
=+ ^- paf/path
|
|
|
|
=+ day=(year %*(. (yore now.hid) +.t +:*tarp))
|
|
|
|
%+ tope [our.hid %home da+now.hid]
|
|
|
|
/talk-telegrams/(scot %da day)/[man]/talk
|
|
|
|
=+ grams:(~(got by stories) man)
|
|
|
|
[ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])]
|
|
|
|
::
|
|
|
|
++ poke-talk-comment
|
|
|
|
::x send a comment.
|
|
|
|
::
|
|
|
|
|= {pax/path sup/spur txt/@t} ^- (quip move +>)
|
|
|
|
ra-abet:(ra-comment:ra pax sup txt)
|
|
|
|
::
|
|
|
|
++ poke-talk-fora-post
|
|
|
|
::x send a fora post.
|
|
|
|
::
|
|
|
|
|= {pax/path sup/spur hed/@t txt/@t} ^- (quip move +>)
|
|
|
|
ra-abet:(ra-fora-post:ra pax sup hed txt)
|
|
|
|
::
|
|
|
|
++ poke-talk-save
|
|
|
|
::x store the talk telegrams of story man in a log file.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
^- (quip move +>)
|
|
|
|
=+ paf=/(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams
|
|
|
|
=+ grams:(~(got by stories) man)
|
|
|
|
[[ost.hid %info /jamfile our.hid (foal paf [%talk-telegrams !>(-)])]~ +>.$]
|
|
|
|
::
|
|
|
|
++ poke-talk-load
|
|
|
|
::x load/update the story man into our state, as saved in ++poke-talk-save.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
=+ ^= grams
|
|
|
|
.^ (list telegram)
|
|
|
|
%cx
|
|
|
|
/(scot %p our.hid)/home/(scot %da now.hid)/talk/[man]/talk-telegrams
|
|
|
|
==
|
|
|
|
=+ toy=(~(got by stories) man)
|
|
|
|
[~ +>.$(stories (~(put by stories) man toy(grams grams, count (lent grams))))]
|
|
|
|
::
|
|
|
|
++ poke-talk-log
|
|
|
|
::x start logging story man.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
~& %poke-log
|
|
|
|
^- (quip move +>)
|
|
|
|
:- [(log-to-file man) ~]
|
|
|
|
+>.$(log (~(put by log) man count:(~(got by stories) man)))
|
|
|
|
::
|
|
|
|
++ poke-talk-unlog
|
|
|
|
::x stop logging story man.
|
|
|
|
::
|
|
|
|
|= man/knot
|
|
|
|
^- (quip move +>)
|
|
|
|
:- ~
|
|
|
|
+>.$(log (~(del by log) man))
|
|
|
|
::
|
|
|
|
++ prep
|
|
|
|
::x state adapter.
|
|
|
|
::
|
|
|
|
|= old/(unit house)
|
2017-03-30 15:17:37 +03:00
|
|
|
::^- (quip move ..prep)
|
|
|
|
::?~ old
|
2017-03-23 03:34:56 +03:00
|
|
|
ra-abet:ra-init:ra
|
2017-03-30 15:17:37 +03:00
|
|
|
::[~ ..prep(+<+ u.old)]
|
2017-03-23 03:34:56 +03:00
|
|
|
--
|