This commit is contained in:
Philip C Monk 2015-01-09 17:11:43 -05:00
parent 75583c3f8c
commit 0844c4e043
2 changed files with 152 additions and 15 deletions

View File

@ -3,8 +3,9 @@
!: !:
|= pit=vase |= pit=vase
=> |% => |%
++ bead ,[p=(set beam) q=cage] :: ford result
++ cult (map duct rove) :: subscriptions ++ cult (map duct rove) :: subscriptions
++ dojo ,[p=cult q=dome] :: domestic desk state ++ dojo ,[p=cult q=(unit work) r=dome] :: domestic desk state
++ gift :: out result <-$ ++ gift :: out result <-$
$% [%ergo p=@p q=@tas r=@ud] :: version update $% [%ergo p=@p q=@tas r=@ud] :: version update
[%note p=@tD q=tank] :: debug message [%note p=@tD q=tank] :: debug message
@ -40,6 +41,9 @@
== == :: == == ::
$: %d :: $: %d ::
$% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill $% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill
== == ::
$: %f ::
$% [%exec p=@p q=(unit silk)] ::
== == :: == == ::
$: %t :: $: %t ::
$% [%wait p=@da] :: $% [%wait p=@da] ::
@ -52,6 +56,9 @@
== == :: == == ::
$: %c :: by %clay $: %c :: by %clay
$% [%writ p=riot] :: $% [%writ p=riot] ::
== == ::
$: %f ::
$% [%made p=(each bead (list tank))] ::
== == :: == == ::
$: %t :: $: %t ::
$% [%wake ~] :: timer activate $% [%wake ~] :: timer activate
@ -59,6 +66,23 @@
$: @tas :: by any $: @tas :: by any
$% [%crud p=@tas q=(list tank)] :: $% [%crud p=@tas q=(list tank)] ::
== == == :: == == == ::
++ silk :: construction layer
$& [p=silk q=silk] :: cons
$% [%bake p=mark q=beam r=path] :: local synthesis
[%boil p=mark q=beam r=path] :: general synthesis
[%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate
[%diff p=silk q=silk] :: diff
[%done p=(set beam) q=cage] :: literal
[%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit cage)] :: unit literal
[%mute p=silk q=(list (pair wing silk))] :: mutant
[%pact p=silk q=silk] :: patch
[%plan p=beam q=spur r=hood] :: structured assembly
[%reef ~] :: kernel reef
[%ride p=twig q=silk] :: silk thru twig
[%vale p=mark q=ship r=*] :: validate [our his]
== ::
++ raft :: filesystem ++ raft :: filesystem
$: fat=(map ship room) :: domestic $: fat=(map ship room) :: domestic
hoy=(map ship rung) :: foreign hoy=(map ship rung) :: foreign
@ -73,6 +97,7 @@
$: lim=@da :: complete to $: lim=@da :: complete to
qyx=cult :: subscribers qyx=cult :: subscribers
ref=(unit rind) :: outgoing requests ref=(unit rind) :: outgoing requests
wok=work :: outstanding diffs
dom=dome :: revision state dom=dome :: revision state
== :: == ::
++ riff ,[p=desk q=(unit rave)] :: request/desist ++ riff ,[p=desk q=(unit rave)] :: request/desist
@ -90,6 +115,10 @@
++ rove (each mood moot) :: stored request ++ rove (each mood moot) :: stored request
++ rung $: rus=(map desk rede) :: neighbor desks ++ rung $: rus=(map desk rede) :: neighbor desks
== :: == ::
++ work ::
$: sot=(list ,[p=path q=misu]) ::
lon=(list path) ::
== ::
-- => -- =>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 4cA, filesystem logic :: :: section 4cA, filesystem logic ::
@ -105,7 +134,7 @@
=| byn=(list ,[p=duct q=riot]) =| byn=(list ,[p=duct q=riot])
=| vag=(list ,[p=duct q=gift]) =| vag=(list ,[p=duct q=gift])
=| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]]) =| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]])
=| tag=(list ,[p=duct q=path c=note]) =| tag=(list ,[p=duct q=path r=note])
|% |%
++ abet ++ abet
^- [(list move) rede] ^- [(list move) rede]
@ -273,9 +302,65 @@
++ edit :: apply changes ++ edit :: apply changes
|= [wen=@da lem=nori] |= [wen=@da lem=nori]
^+ +> ^+ +>
=+ axe=(~(edit ze lim dom ran) wen lem) ?. -.lem
=+ axe=(~(edit ze lim dom ran) wen lem)
=+ `[l=@da d=dome r=rang]`+<.axe
+>.$(dom d, ran r)
?^ wok
~& %already-applying-changes !!
=+ ^- lon=(list path)
(murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ `a)))
=+ ^- sot=(list ,[p=path q=misu])
(murn q.p.lem |=([a=path b=miso] ?:(?=(%mut -.b) ~ `[a `misu`b])))
=. wok `[sot lon]
?~ lon
apply-edit
=+ ^- los=(list ,[duct path note])
(murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ `(silkify a b))))
%_(+>.$ tag (welp los tag))
::
++ silkify
|= [a=path %mut b=cage c=cage]
^- [duct path note]
:+ hen
[%diffing (scot %p who) syd a]
[%f %exec who ~ %diff [%done ~ b] [%done ~ c]]
::
++ apply-edit
^- .
?~ wok ~& %no-changes !!
?^ lon.u.wok ~& %not-done-diffing !!
=+ axe=(~(edit ze lim dom ran) wen %& *cart wok.wok)
=+ `[l=@da d=dome r=rang]`+<.axe =+ `[l=@da d=dome r=rang]`+<.axe
+>.$(dom d, ran r) +>(dom d, ran r, wok ~)
::
++ take-diff
|= [pax=path res=(each bead (list tank))]
^+ +>
?~ wok
~& %clay-unexpected-made !!
?. (lien lon.u.wok |=(path =(+< pax)))
~& %clay-strange-made !!
?. -.res
%_ +>.$
wok ~
tag
%- welp :_ tag
^- (list ,[duct path note])
%+ murn lon.u.wok
|= a=path
?: =(pax a)
`[hen [%diffing (scot %p who) syd a] %f %exec who ~]
::
yel
[[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel]
==
=: lon.wok (skip lon.u.wok |=(path =(+< pax)))
sot.wok [[pax %dif q.p.res] sot.u.wok]
==
?~ lon.wok
apply-edit
+>.$
:: ::
++ edis :: apply subscription ++ edis :: apply subscription
|= nak=nako |= nak=nako
@ -491,7 +576,7 @@
?^(rug u.rug *rung) ?^(rug u.rug *rung)
=+ ^= red ^- rede =+ ^= red ^- rede
=+ yit=(~(get by rus.rug) syd) =+ yit=(~(get by rus.rug) syd)
?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome]) ?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] ~ *dome])
((de now ~ ~) [who him] syd red ran.ruf) ((de now ~ ~) [who him] syd red ran.ruf)
:: ::
++ posh ++ posh
@ -511,7 +596,10 @@
++ abet ruf(fat (~(put by fat.ruf) who yar)) ++ abet ruf(fat (~(put by fat.ruf) who yar))
++ pish ++ pish
|= [syd=@ta red=rede run=rang] |= [syd=@ta red=rede run=rang]
%_(+> dos.yar (~(put by dos.yar) syd [qyx.red dom.red]), ran.ruf run) %_ +>
ran.ruf run
dos.yar (~(put by dos.yar) syd [qyx.red wok.red dom.red])
==
:: ::
++ wake ++ wake
=+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a)) =+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a))
@ -527,7 +615,7 @@
=+ ^= saq ^- dojo =+ ^= saq ^- dojo
=+ saq=(~(get by dos.yar) syd) =+ saq=(~(get by dos.yar) syd)
?~(saq *dojo u.saq) ?~(saq *dojo u.saq)
((de now hun.yar hez.yar) [who who] syd [now p.saq ~ q.saq] ran.ruf) ((de now hun.yar hez.yar) [who who] syd [now p.saq ~ r.saq q.saq] ran.ruf)
-- --
-- --
:::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@ -707,6 +795,17 @@
?- -.+.q.hin ?- -.+.q.hin
%crud %crud
[[[hen %slip %d %flog +.q.hin] ~] ..^$] [[[hen %slip %d %flog +.q.hin] ~] ..^$]
::
%made
?> ?=([%diffing @ @ *] tea)
=+ who=(slav %p i.t.tea)
=+ syd=(slav %tas i.t.t.tea)
=^ mos ruf
=+ ^= zat
(take-diff:(di:wake:une syd) t.t.t.tea p.q.hin)
=+ zot=abet.zat
[-.zot abet:(pish:une syd +.zot ran.zat)]
[mos ..^$]
:: ::
%waft %waft
?> ?=([@ @ ~] tea) ?> ?=([@ @ ~] tea)

View File

@ -1048,6 +1048,28 @@
== ==
:: ::
++ ze !: ++ ze !:
=+ ^= silk
$& [p=silk q=silk]
$% [%bake p=mark q=beam r=path]
[%boil p=mark q=beam r=path]
[%call p=silk q=silk]
[%cast p=mark q=silk]
[%diff p=silk q=silk]
[%done p=(set beam) q=cage]
[%dude p=tank q=silk]
[%dune p=(set beam) q=(unit cage)]
[%mute p=silk q=(list (pair wing silk))]
[%pact p=silk q=silk]
[%plan p=beam q=spur r=hood]
[%reef ~]
[%ride p=twig q=silk]
[%vale p=mark q=ship r=*]
==
=+ ^= silk
$% [%diff p=cage q=cage]
[%pact p=cage q=(list cage)]
==
=| mow=(list silk)
|_ [lim=@da dome rang] |_ [lim=@da dome rang]
++ aeon-to-tako ~(got by hit) ++ aeon-to-tako ~(got by hit)
++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki) ++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki)
@ -1072,7 +1094,7 @@
[%direct (mug p) p q] [%direct (mug p) p q]
:: ::
++ make-delta :: make blob delta ++ make-delta :: make blob delta
|= [p=lobe q=udon] |= [p=lobe q=cage]
^- blob ^- blob
=+ t=[%delta 0 p q] =+ t=[%delta 0 p q]
=+ z=(blob-to-noun t) =+ z=(blob-to-noun t)
@ -1098,6 +1120,14 @@
%indirect q.p %indirect q.p
== ==
:: ::
++ new-blob-to-cage
|= p=blob
:: ^- (each cage ,[cage this])
?- -.p
%direct [%& q.p]
%indirect [%& q.p]
%delta [%| r.p $(p q.p)]
==
:: ::
:: ::
++ diff-yakis :: fundamental diff ++ diff-yakis :: fundamental diff
@ -1276,7 +1306,7 @@
(~(put by gar) pat p.bar) (~(put by gar) pat p.bar)
:: ::
++ apply-changes :: apply-changes:ze ++ apply-changes :: apply-changes:ze
|= lar=(list ,[p=path q=miso]) :: store changes |= lar=(list ,[p=path q=misu]) :: store changes
^- (map path blob) ^- (map path blob)
=+ ^= hat :: current state =+ ^= hat :: current state
?: =(let 0) :: initial commit ?: =(let 0) :: initial commit
@ -1311,8 +1341,6 @@
(make-delta u.har p.mys) (make-delta u.har p.mys)
%+ ~(put by bar) pat %+ ~(put by bar) pat
(make-delta p.u.ber p.mys) (make-delta p.u.ber p.mys)
%mut
!!
== ==
++ checkout-ankh :: checkout-ankh:ze ++ checkout-ankh :: checkout-ankh:ze
|= hat=(map path lobe) :: checkout commit |= hat=(map path lobe) :: checkout commit
@ -1332,7 +1360,7 @@
== ==
:: ::
++ forge-yaki :: forge-yaki:ze ++ forge-yaki :: forge-yaki:ze
|= [wen=@da par=(unit tako) lem=soba] :: forge yaki |= [wen=@da par=(unit tako) lem=suba] :: forge yaki
=+ ^= per =+ ^= per
?~ par ~ ?~ par ~
~[u.par] ~[u.par]
@ -1823,7 +1851,7 @@
=((lobe-to-noun u.zat) (lobe-to-noun lob)) =((lobe-to-noun u.zat) (lobe-to-noun lob))
:: ::
++ edit :: edit:ze ++ edit :: edit:ze
|= [wen=@da lem=nori] :: edit |= [wen=@da lem=nuri] :: edit
^+ +> ^+ +>
?- -.lem ?- -.lem
& =^ yak lat :: merge objects & =^ yak lat :: merge objects
@ -2725,8 +2753,8 @@
pac=rock :: packet data pac=rock :: packet data
== :: == ::
++ blob $% [%delta p=lobe q=lobe r=cage] :: delta on q ++ blob $% [%delta p=lobe q=lobe r=cage] :: delta on q
[%direct p=lobe q=* r=umph] :: [%direct p=lobe q=cage] ::
[%indirect p=lobe q=* r=cage s=lobe] :: [%indirect p=lobe q=cage r=cage s=lobe] ::
== :: == ::
++ boat ,[(list slip) tart] :: user stage ++ boat ,[(list slip) tart] :: user stage
++ boon :: fort output ++ boon :: fort output
@ -3018,6 +3046,11 @@
[%dif p=cage] :: mutate from diff [%dif p=cage] :: mutate from diff
[%mut p=cage q=cage] :: mutate from raw [%mut p=cage q=cage] :: mutate from raw
== :: == ::
++ misu :: computed delta
$% [%del p=cage] :: delete
[%ins p=cage] :: insert
[%dif p=cage] :: mutate from diff
== ::
++ mizu ,[p=@u q=(map ,@ud tako) r=rang] :: new state ++ mizu ,[p=@u q=(map ,@ud tako) r=rang] :: new state
++ moar ,[p=@ud q=@ud] :: normal change range ++ moar ,[p=@ud q=@ud] :: normal change range
++ moat ,[p=case q=case r=path] :: change range ++ moat ,[p=case q=case r=path] :: change range
@ -3038,6 +3071,10 @@
$% [& p=soba] :: delta $% [& p=soba] :: delta
[| p=@tas] :: label [| p=@tas] :: label
== :: == ::
++ nuri :: repository action
$% [& p=suba] :: delta
[| p=@tas] :: label
== ::
++ octs ,[p=@ud q=@] :: octet-stream ++ octs ,[p=@ud q=@] :: octet-stream
++ oryx ,@t :: CSRF secret ++ oryx ,@t :: CSRF secret
++ pail ?(%none %warm %cold) :: connection status ++ pail ?(%none %warm %cold) :: connection status
@ -3146,6 +3183,7 @@
++ sock ,[p=ship q=ship] :: outgoing [from to] ++ sock ,[p=ship q=ship] :: outgoing [from to]
++ spur path :: ship desk case spur ++ spur path :: ship desk case spur
++ step ,[p=bray q=gens r=pass] :: identity stage ++ step ,[p=bray q=gens r=pass] :: identity stage
++ suba ,[p=cart q=(list ,[p=path q=misu])] :: delta
++ tako ,@ :: yaki ref ++ tako ,@ :: yaki ref
++ tart $+([@da path note] bowl) :: process core ++ tart $+([@da path note] bowl) :: process core
++ taxi ,[p=lane q=rock] :: routed packet ++ taxi ,[p=lane q=rock] :: routed packet