Checkin commit, not compiling.

This commit is contained in:
C. Guy Yarvin 2016-09-11 18:07:23 -07:00
parent 97aeaea2b7
commit 3ff5a2258d
2 changed files with 204 additions and 94 deletions

View File

@ -32,7 +32,7 @@
dey/(unit @t) :: display name dey/(unit @t) :: display name
== :: == ::
++ jael-urbit :: objective urbit ++ jael-urbit :: objective urbit
$: pub/gree :: all public state $: pug/gree :: all public state
pry/(map ship jael-ship) :: all private state pry/(map ship jael-ship) :: all private state
== :: == ::
++ jael-ship :: objective by ship ++ jael-ship :: objective by ship
@ -45,28 +45,23 @@
lab/(nap jael-right) :: promises to lab/(nap jael-right) :: promises to
vow/(set duct) :: watchers vow/(set duct) :: watchers
== :: == ::
++ jael-inference :: learning result
$% {$hard p/ship} :: rough update to
{$meet p/ship} :: first contact with
{$soft p/ship} :: soft update to
{$sign p/ship q/gree} :: return signature
== ::
++ jael-right :: urbit commitment ++ jael-right :: urbit commitment
$% {$block p/pile} :: address block $% {$block p/pile} :: reserved block
{$email p/(set @ta)} :: email addresses {$email p/(set @ta)} :: email addresses
{$entry p/(map hand (pair @da code))} :: symmetric keys {$entry p/(map hand (pair @da code))} :: symmetric keys
{$final p/(map ship @uvG)} :: tickets {$final p/(map ship @uvG)} :: ticketed ships
{$fungi p/(map term @ud)} :: fungibles {$fungi p/(map term @ud)} :: fungibles
{$guest $~} :: refugee visa
{$lived p/life} :: PKI commitment {$lived p/life} :: PKI commitment
== :: == ::
++ jael-task :: operations on ++ jael-task :: operations on
$% {$give p/ship q/(nap jael-right)} :: add rights $% {$give p/ship q/(nap jael-right)} :: add rights
{$line p/ship q/@da r/code} :: outbound symkey {$line p/ship q/@da r/code} :: outbound symkey
{$link p/ship q/@da r/code} :: inbound symkey {$link p/ship q/@da r/code} :: inbound symkey
{$meet p/gree} :: integrate truth {$meet p/ship q/gree} :: integrate pki from
{$over p/ship q/jael-task} :: mirror operation {$over p/ship q/jael-task} :: mirror operation
{$pall p/ship q/life} :: our life acked {$pall p/ship q/life} :: our life acked
{$ring p/? q/(map chip (pair @ta @t)) r/ring} :: update private key {$step p/lamp} :: update private key
{$take p/ship q/(nap jael-right)} :: subtract rights {$take p/ship q/(nap jael-right)} :: subtract rights
{$vain $~} :: watch self {$vain $~} :: watch self
{$vest $~} :: watch assets {$vest $~} :: watch assets
@ -92,6 +87,9 @@
$: dif/(list (trel ship ? (nap jael-right))) :: who, +/-, what $: dif/(list (trel ship ? (nap jael-right))) :: who, +/-, what
== :: == ::
:: :: :: ::
++ jael-note :: out request $->
$% {$x $mess p/ship q/path r/*} :: send message
== ::
++ jael-gift :: output ++ jael-gift :: output
$? {$cash jael-report-cash} :: asset dump $? {$cash jael-report-cash} :: asset dump
{$clue jael-report-them} :: channel dump {$clue jael-report-them} :: channel dump
@ -101,58 +99,118 @@
== :: == ::
++ jael-message :: p2p message ++ jael-message :: p2p message
$% {$hail p/(nap jael-right)} :: re/set rights $% {$hail p/(nap jael-right)} :: re/set rights
{$ping $~} :: ping {$ping p/gree} :: propagate
{$seed p/gree} :: propagate
== :: == ::
++ jael-action :: pki change ++ jael-edit :: pki change
$: why/?($hear $make) :: import or create $: why/?($hear $make) :: import or create
gut/jael-change :: new information gut/jael-change :: new information
== :: == ::
++ jael-effect :: objective effect
$% {$kick p/ship} :: major update
{$site p/(list @ta)} ::
{$slap p/ship q/ship} :: relationship update
{$ping p/ship q/gree} :: propagate pki to
== ::
++ jael-change :: pki delta ++ jael-change :: pki delta
$% {$step p/ship q/life r/lace} :: new deed $% {$step p/ship q/life r/lace} :: new deed
{$sure p/ship q/life r/mind s/@} :: new signature {$sure p/ship q/life r/mind s/@} :: new signature
== :: == ::
++ move {p/duct q/{$gift jael-gift}} :: local move ++ move {p/duct q/(wind jael-note jael-gift)} :: local move
-- :: -- ::
. == :: . == ::
=| lex/jael-state :: kernel state =| lex/jael-state :: kernel state
|= {now/@da eny/@ ski/sley} :: current invocation |= $: now/@da :: current time
=< |% :: vane interface eny/@ :: unique entropy
ski/sley :: current invocation
==
:: :: ::
:::: :::::: interface
:: :: ::
=< |%
:: ::
++ call :: request ++ call :: request
|= $: hen/duct |= $: :: hen: cause of this event
:: hic: event data
::
hen/duct
hic/(hypo (hobo jael-task)) hic/(hypo (hobo jael-task))
== ==
=> .(q.hic ?.(?=($soft -.q.hic) q.hic ((hard jael-task) p.q.hic))) => .(q.hic ?.(?=($soft -.q.hic) q.hic ((hard jael-task) p.q.hic)))
^- {p/(list move) q/_..^$} ^- {p/(list move) q/_..^$}
=^ did lex (^call hen q.hic) =^ did lex abet:(^call hen q.hic)
[did ..^$] [did ..^$]
:: ::
++ doze :: await
|= $: :: now: current time
:: hen: cause (XX why we need this?)
:: ::
++ doze :: sleep now/@da
|= {now/@da hen/duct} hen/duct
==
^- (unit @da) ^- (unit @da)
~ ~
:: :: ::
++ load :: upgrade ++ load :: upgrade
|= old/jael-state |= $: :: old: previous state
^+ ..^$
~& %jael-reload
..^$(lex old)
:: ::
++ scry old/jael-state
|= {fur/(unit (set monk)) ren/@tas why/shop syd/desk lot/coin tyl/path} ==
^+ ..^$
..^$(lex old)
:: ::
++ scry :: inspect
|= $: :: fur: event security
:: ren: access mode
:: why: owner
:: syd: desk (branch)
:: lot: case (version)
:: tyl: rest of path
::
fur/(unit (set monk))
ren/@tas
why/shop
syd/desk
lot/coin
tyl/spur
==
^- (unit (unit cage)) ^- (unit (unit cage))
!! !!
:: ::
++ stay :: preserve
lex
:: ::
++ take :: accept
|= $: :: tea: order
:: hen: cause
:: hin: result
:: ::
++ stay lex tea/wire
++ take :: accept response hen/duct
|= {tea/wire hen/duct hin/(hypo sign-arvo)} hin/(hypo sign-arvo)
==
^- {p/(list move) q/_..^$} ^- {p/(list move) q/_..^$}
[~ ..^$] [~ ..^$]
-- --
|% :: :: ::
++ call :::: :::::: control
:: :: ::
=< =+ moz/(list move)
|%
:: ::
++ abet :: resolve
[(flop moz) lex]
:: ::
++ emil :: effects
|= moz/(list move)
^+(moz (weld (flop moz) ^moz))
:: ::
++ emit :: effect
|= mov/move
^+(moz [mov moz])
:: ::
++ call :: invoke
|= {hen/duct tac/jael-task} |= {hen/duct tac/jael-task}
^- {(list move) jael-state} ^+ +>
?+ -.tac !! ?+ -.tac !!
$give $give
=< abet =< abet
@ -160,21 +218,24 @@
(give:(unto:(from our) p.tac) q.tac) (give:(unto:(from our) p.tac) q.tac)
:: ::
$link $link
=* ryt `jael-right`[%entry [[(shaf %hand r.tac) q.tac r.tac] ~ ~]] =* ryt [%entry [[(shaf %hand r.tac) q.tac r.tac] ~ ~]]
=< abet =< abet
=< abet =< abet
(give:(unto:(from our) p.tac) `(nap jael-right)`[ryt ~ ~]) (give:(unto:(from our) p.tac) [ryt ~ ~])
:: ::
$line $line
=* ryt `jael-right`[%entry [[(shaf %hand r.tac) q.tac r.tac] ~ ~]] =* ryt [%entry [[(shaf %hand r.tac) q.tac r.tac] ~ ~]]
=< abet =< abet
=< abet =< abet
(give:(unto:(from p.tac) our) `(nap jael-right)`[ryt ~ ~]) (give:(unto:(from p.tac) our) [ryt ~ ~])
:: ::
$meet $meet
:: :: =^ fur pub.urb.nav.lex (~(meet da pub.urb.nav.lex) p.tac) =/ rod urb (~(meet ur urb) p.tac q.tac)
:: [~ lex] |- ^+ ..call
!! ?~ rod ..call
=. ..call (join i.rod)
$(rod t.rod, ..call (make:(join i.rod) i.rod))
:: ::
$over $over
$(our p.tac, tac q.tac) $(our p.tac, tac q.tac)
@ -185,7 +246,48 @@
:: =< abet :: =< abet
:: (pall:(unto:(from our) p.tac) q.tac) :: (pall:(unto:(from our) p.tac) q.tac)
== ==
:: --
:: ::
:::: :: system
:: ::::::
|%
:: :: ur
++ ur :: urbit core
=| $: :: now: current time
:: eny: unique entropy
:: +>+: all urbit state
::
now/@da
eny/@e
jael-urbit
==
=* urb +>+
::
:: rod: output from this core
::
=| rod/(list jael-effect)
|%
:: :: abet:ur
++ abet :: resolve
[(flop rod) urb]
::
++ join :: join:ur
|= $: :: fex: literal changes to pki
::
fex/(list jael-edit)
^+ +>
|= fex/(list jael-edit)
:: :: make:ur
++ make :: propagate edits
|= $: :: fex: literal changes to pki
::
fex/(list jael-edit)
==
^- (list jael-effect)
--
:: :: meet:ur
++ meet :: merge worlds ++ meet :: merge worlds
|= $: :: via: source of new info |= $: :: via: source of new info
:: new: new pki info :: new: new pki info
@ -194,50 +296,57 @@
via/@p via/@p
new/gree new/gree
== ==
^- (list jael-action) ^- (list jael-edit)
|^ :: |^ ::
:: check new info ship by ship :: check new info ship by ship
:: ::
=+ (~(tap by new)) =+ (~(tap by new))
|- ^- (list jael-action) |- ^- (list jael-edit)
?~ +< ~ ?~ +< ~
(weld (boat i.+<) $(+< t.+<)) (weld (boat i.+<) $(+< t.+<))
:: :: :: ::
++ boat :: merge per ship ++ boat :: merge ships
|= $: :: who: this ship |= $: :: who: this ship
:: gur: new will for this ship :: gur: new will for this ship
:: ::
who/ship who/ship
gur/grue gur/grue
== ==
^- (list jael-action) ^- (list jael-edit)
:: ::
:: rug: old will for this ship :: rug: old will for this ship
:: ::
=+ rug=(fall (~(get by pub.urb.nav.lex) who) *grue) =+ rug=(fall (~(get by pug.urb.nav.lex) who) *grue)
?: =(gur rug) ~ ?: =(gur rug) ~
=+ :* :: =+ :* ::
:: num: counter :: num: life counter
:: end: last life in old or new ship :: end: last life in old or new ship
:: ::
num=1 num=`life`1
end=(max p.gur p.rug) end=(max p.gur p.rug)
== ==
=| $: :: pre: previous deed =| $: :: pre: previous deed
:: fex: actions in reverse order :: fex: edits in reverse order
:: ::
pre/(unit lama) pre/(unit lama)
fex/(list jael-action) fex/(list jael-edit)
== ==
|- ^+ fex |- ^+ fex
::
:: merge all lives in :%
::
?: (gth num end) ?: (gth num end)
(flop fex) (flop fex)
=+ lub=(bolo who num pre (~(get by q.rug) num) (~(get by q.gur) num)) =+ lub=(bonk who num pre (~(get by q.rug) num) (~(get by q.gur) num))
$(num +(num), pre `p.lub, fex (weld (flop q.lub) fex)) %= $
num +(num)
pre `p.lub
fex (weld (flop q.lub) fex)
==
:: :: :: ::
++ bolo :: merge per life ++ bonk :: merge lives
|= $: :: who: ship we're integrating |= $: :: who: ship we're merging
:: num: life we're integrating :: num: life we're merging
:: pre: previous deed :: pre: previous deed
:: lod: old deed :: lod: old deed
:: wan: new deed :: wan: new deed
@ -249,10 +358,10 @@
wan/(unit lace) wan/(unit lace)
== ==
^- $: :: p: next previous deed ^- $: :: p: next previous deed
:: q: actions in order :: q: edits in order
:: ::
p/lama p/lama
q/(list jael-action) q/(list jael-edit)
== ==
:: ::
:: if no new information, do nothing :: if no new information, do nothing
@ -295,10 +404,10 @@
:: sow: all new signatures :: sow: all new signatures
:: ::
=+ sow=`(list (trel ship life @))`(~(tap by syg.u.wan)) =+ sow=`(list (trel ship life @))`(~(tap by syg.u.wan))
|- ^- (list jael-action) |- ^- (list jael-edit)
?~ sow ~ ?~ sow ~
:: ::
:: mor: all further actions :: mor: all further edits
:: och: old signature for this signer :: och: old signature for this signer
:: ::
=+ mor=$(sow t.sow) =+ mor=$(sow t.sow)
@ -365,7 +474,7 @@
:: rig: secret key of parent :: rig: secret key of parent
:: val: new signature :: val: new signature
:: ::
=* lyf p:(~(got by pub.urb.nav.lex) dad) =* lyf p:(~(got by pug.urb.nav.lex) dad)
=* rig (~(got by own:(~(got by pry.urb.nav.lex) dad)) lyf) =* rig (~(got by own:(~(got by pry.urb.nav.lex) dad)) lyf)
=* val (sign:as:(nol:nu:crub rig) *@ ash) =* val (sign:as:(nol:nu:crub rig) *@ ash)
[tep [%make %sure who num [dad lyf] val] ~] [tep [%make %sure who num [dad lyf] val] ~]
@ -381,10 +490,10 @@
:: ::
:: cascade search over old and new, new first :: cascade search over old and new, new first
:: ::
|^ ((bond |.((need find))) find(pub.urb.nav.lex new)) |^ ((bond |.((need find))) find(pug.urb.nav.lex new))
++ find ++ find
^- (unit @) ^- (unit @)
%+ biff (~(get by pub.urb.nav.lex) who.myn) %+ biff (~(get by pug.urb.nav.lex) who.myn)
|= gur/grue |= gur/grue
:: ::
:: crash if this life is revoked :: crash if this life is revoked
@ -400,22 +509,24 @@
?>(=(ash (need (sure:as:(com:nu:crub (look myn)) *code val))) &) ?>(=(ash (need (sure:as:(com:nu:crub (look myn)) *code val))) &)
-- --
:: ::
++
:: ::
++ etch ::
|=
++ from ++ from
|= rex/ship |= rex/ship
=+ :* nex=*(list move) =+ ((bond |.(*jael-ship)) (~(get by pry.urb.nav.lex) rex))
((bond |.(*jael-ship)) (~(get by pry.urb.nav.lex) rex))
==
|% |%
++ abet ++ abet
^- {(list move) jael-state} ^+ ..from
:- (flop nex) ..from(pry.urb.nav (~(put by pry.urb.nav.lex) rex `jael-ship`+<))
lex(pry.urb.nav (~(put by pry.urb.nav.lex) rex `jael-ship`+<+))
:: ::
++ unto ++ unto
|= pal/ship |= pal/ship
=+ ((bond |.(*jael-friend)) (~(get by rel) pal)) =+ ((bond |.(*jael-friend)) (~(get by rel) pal))
|% |%
++ abet :: resolve ++ abet :: resolve
^+ ..unto
..unto(rel (~(put by rel) pal `jael-friend`+<)) ..unto(rel (~(put by rel) pal `jael-friend`+<))
:: ::
++ give ++ give

View File

@ -3635,9 +3635,8 @@
++ lamp :: cert metadata ++ lamp :: cert metadata
$: dad/@p :: parent $: dad/@p :: parent
dob/? :: & clean, | dirty dob/? :: & clean, | dirty
exp/@da :: expiration date
nym/(map chip (pair @ta @t)) :: identity strings nym/(map chip (pair @ta @t)) :: identity strings
own/@p :: declared owner urn/(unit @p) :: declared owner
== :: == ::
++ chip :: standard identity ++ chip :: standard identity
$? $bus :: business name $? $bus :: business name