Intermediate commit.

This commit is contained in:
C. Guy Yarvin 2014-12-16 15:46:12 -08:00
parent c31b87a755
commit a7ff16b0b9
5 changed files with 83 additions and 14 deletions

View File

@ -7,7 +7,7 @@
:: %jael is logically homogeneous, but please follow these conventions: :: %jael is logically homogeneous, but please follow these conventions:
:: ::
:: /cap :: foreign app keys :: /cap :: foreign app keys
:: /service :: service name, eg %face :: /service :: service name, eg %face for FB
:: /appid :: your ship's app-id :: /appid :: your ship's app-id
:: /@uvH :: by hash :: /@uvH :: by hash
:: /@ud :: by number :: /@ud :: by number
@ -25,7 +25,7 @@
:: structures :: structures
|% |%
++ axle :: %jael state ++ axle :: %jael state
$: %0 :: $: %0 :: %jael version
ent=@ :: entropy ent=@ :: entropy
sef=safe :: secret tree sef=safe :: secret tree
red=(map duct (set path)) :: reverse subscribers red=(map duct (set path)) :: reverse subscribers
@ -36,22 +36,69 @@
== :: == ::
++ kiss :: in request ->$ ++ kiss :: in request ->$
$% [%kill p=path] :: discard secret $% [%kill p=path] :: discard secret
[%make p=@uw q=(unit ,@da) r=@ud s=path] :: create secret [%make p=@uw q=(unit ,@da) r=@ud s=path] :: generate random
[%nuke ~] :: erase subscriber [%nuke ~] :: erase subscriber
[%prim p=@uw q=(unit ,@da) r=perm s=path] :: forge prime
[%tell p=@uw q=(unit ,@da) r=path] :: save secret [%tell p=@uw q=(unit ,@da) r=path] :: save secret
== :: == ::
++ move ,[p=duct q=[%give p=gift]] :: local move ++ move ,[p=duct q=(mold note gift)] :: typed move
++ note :: out request $->
$% $: %t :: to %time
$% [%wait p=@da] ::
[%rest p=@da] ::
== == == ::
++ perm (pair ,@ud (list ,@ud)) :: prime definition ++ perm (pair ,@ud (list ,@ud)) :: prime definition
++ safe :: ++ safe ::
$: nub=@uw :: secret $: nub=(unit ,@uw) :: secret
dex=(unit ,@da) :: expiration dex=(unit ,@da) :: expiration
sud=(set duct) :: subscribers sud=(set duct) :: subscribers
kin=(map term safe) :: children
== :: == ::
-- :: -- ::
:: programs
|%
++ bu
|_ $: xap=path
fes=(list safe)
moz=(list move)
==
axle
::
++ bu-abet :: resolve
^- axle
?~ xap +<+
%= bu-abet
xap t.xap
fes t.fes
sef %= i.fes
kin
?: =(*safe sef)
(~(del by kin.i.fes) i.xap)
(~(put by kin.i.fes) i.xap sef)
==
==
::
++ bu-kill :: destroy
^+ .
=+ dus=(~(tap by
::
++ bu-ajar :: descend
|= pax=path
^+ +>
?~ pax +>.$
%= $
pax t.pax
xap [i.pax xap]
fes [sef fes]
sef (fall (~(get by kin.sef) i.pax) *safe)
==
--
++ bury
|= [pax=path lex=axle]
(~(bu-ajar bu [~ ~ ~] tof.lex lex) pax)
--
. == . ==
=| axle =| axle
=* lex -
|= [now=@da eny=@ ski=sled] :: activate |= [now=@da eny=@ ski=sled] :: activate
^? :: opaque core ^? :: opaque core
|% :: |% ::
@ -59,7 +106,16 @@
|= [hen=duct hic=(hypo (hobo kiss))] |= [hen=duct hic=(hypo (hobo kiss))]
^- [p=(list move) q=_..^$] ^- [p=(list move) q=_..^$]
=> .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic))) => .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic)))
!! =^ moz +>+>-
=< bu-abet
?- -.p.q.hic
%kill
kill:(bury p.p.q.hic +>+>-)
::
%make
%nuke
%tell
==
:: ::
++ doze ++ doze
|= [now=@da hen=duct] |= [now=@da hen=duct]

View File

@ -21,7 +21,8 @@
++ party :: a conversation ++ party :: a conversation
$: count=@ud :: (lent grams) $: count=@ud :: (lent grams)
grams=(list telegram) :: all history grams=(list telegram) :: all history
present=(map ship status) :: presence state locals=(map ship (pair ,@da presence)) :: local presence
remotes=(map station (map ship status)) :: remote presence
sequence=(map station ,@ud) :: stations heard sequence=(map station ,@ud) :: stations heard
shape=config :: configuration shape=config :: configuration
known=(map serial ,@ud) :: messages heard known=(map serial ,@ud) :: messages heard
@ -333,7 +334,6 @@
=. +> $(vew r.vew) =. +> $(vew r.vew)
(pa-sauce n.vew [[%rust %radio-report %group present] ~]) (pa-sauce n.vew [[%rust %radio-report %group present] ~])
:: ::
::
++ pa-monitor :: update config ++ pa-monitor :: update config
=+ owe=owners =+ owe=owners
|- ^+ +> |- ^+ +>
@ -388,16 +388,22 @@
++ pa-acquire :: subscribe to ++ pa-acquire :: subscribe to
|= tal=(list station) |= tal=(list station)
%+ pa-scrub 0 %+ pa-scrub 0
%- zing
%+ turn tal %+ turn tal
|= tay=station |= tay=station
^- (list (pair path note))
=+ num=(fall (~(get by sequence) tay) 0) =+ num=(fall (~(get by sequence) tay) 0)
?- -.tay ?- -.tay
%| ~& tweet-asked/p.p.tay %| ~& tweet-asked/p.p.tay
:_ ~
:- /twitter/[p.p.tay] :- /twitter/[p.p.tay]
[%e %them ~ (stalk:ti p.p.tay)] [%e %them ~ (stalk:ti p.p.tay)]
%& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] %& ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]]
:- /friend/show/[man] :~ :- /friend/show/[man]
[%g %show [p.p.tay /rodeo] our.hid /fm/[q.p.tay]/(scot %ud num)] [%g %show [p.p.tay /rodeo] our.hid /fm/[q.p.tay]/(scot %ud num)]
:- /friend/view/[man]
[%g %show [p.p.tay /rodeo] our.hid /am/[q.p.tay]]
==
== ==
:: ::
++ pa-reform :: reconfigure, ugly ++ pa-reform :: reconfigure, ugly
@ -418,9 +424,12 @@
=. guests (~(del in guests) ost) =. guests (~(del in guests) ost)
(pa-sauce ost [[%mean ~] ~]) (pa-sauce ost [[%mean ~] ~])
:: ::
++ pa-
::
++ pa-notify :: new presence ++ pa-notify :: new presence
|= [her=ship per=presence] |= [her=ship per=presence]
^+ +> ^+ +>
=. locals
pa-display(present (~(put by present) her [per lat.hid *human])) pa-display(present (~(put by present) her [per lat.hid *human]))
:: ::
++ pa-start :: start stream ++ pa-start :: start stream

View File

@ -88,6 +88,10 @@
(stag %def mess) (stag %def mess)
== ==
|% |%
++ posh
|* [a=_rule b=_rule]
;~(pose (stag %& a) (stag %| b))
::
++ peach :: either ++each branch ++ peach :: either ++each branch
|* a=_[rule rule] |* a=_[rule rule]
|= tub=nail |= tub=nail

View File

@ -67,7 +67,7 @@
%inv (jobe ship/(jope p.a) party/[%s q.a] ~) %inv (jobe ship/(jope p.a) party/[%s q.a] ~)
== ==
:: ::
++ stas |=(status (jobe presence/(joce p) time/(jode q) human/(huma r) ~)) ++ stas |=(status (jobe presence/(joce p) human/(huma q) ~))
++ huma ++ huma
|= human |= human
%^ jobe %^ jobe

View File

@ -31,7 +31,7 @@
== :: == ::
++ serial ,@uvH :: unique identity ++ serial ,@uvH :: unique identity
++ station (each cousin partner) :: interlocutor ++ station (each cousin partner) :: interlocutor
++ status (trel presence ,@da human) :: participant ++ status (pair presence human) :: participant
++ speech :: party action ++ speech :: party action
$% [%own p=@t] :: @ or /me $% [%own p=@t] :: @ or /me
[%exp p=@t q=(unit tank)] :: program output [%exp p=@t q=(unit tank)] :: program output