diff --git a/arvo/clay.hoon b/arvo/clay.hoon index ce0c2c163..12d171386 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -3,8 +3,9 @@ !: |= pit=vase => |% +++ bead ,[p=(set beam) q=cage] :: ford result ++ 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 <-$ $% [%ergo p=@p q=@tas r=@ud] :: version update [%note p=@tD q=tank] :: debug message @@ -40,6 +41,9 @@ == == :: $: %d :: $% [%flog p=[%crud p=@tas q=(list tank)]] :: to %dill + == == :: + $: %f :: + $% [%exec p=@p q=(unit silk)] :: == == :: $: %t :: $% [%wait p=@da] :: @@ -52,6 +56,9 @@ == == :: $: %c :: by %clay $% [%writ p=riot] :: + == == :: + $: %f :: + $% [%made p=(each bead (list tank))] :: == == :: $: %t :: $% [%wake ~] :: timer activate @@ -59,6 +66,23 @@ $: @tas :: by any $% [%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 $: fat=(map ship room) :: domestic hoy=(map ship rung) :: foreign @@ -73,6 +97,7 @@ $: lim=@da :: complete to qyx=cult :: subscribers ref=(unit rind) :: outgoing requests + wok=work :: outstanding diffs dom=dome :: revision state == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist @@ -90,6 +115,10 @@ ++ rove (each mood moot) :: stored request ++ rung $: rus=(map desk rede) :: neighbor desks == :: +++ work :: + $: sot=(list ,[p=path q=misu]) :: + lon=(list path) :: + == :: -- => :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 4cA, filesystem logic :: @@ -105,7 +134,7 @@ =| byn=(list ,[p=duct q=riot]) =| vag=(list ,[p=duct q=gift]) =| 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 ^- [(list move) rede] @@ -273,9 +302,65 @@ ++ edit :: apply changes |= [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 - +>.$(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 |= nak=nako @@ -491,7 +576,7 @@ ?^(rug u.rug *rung) =+ ^= red ^- rede =+ 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) :: ++ posh @@ -511,7 +596,10 @@ ++ abet ruf(fat (~(put by fat.ruf) who yar)) ++ pish |= [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 =+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a)) @@ -527,7 +615,7 @@ =+ ^= saq ^- dojo =+ saq=(~(get by dos.yar) syd) ?~(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 %crud [[[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 ?> ?=([@ @ ~] tea) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index cba966932..d4bee3555 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1048,6 +1048,28 @@ == :: ++ 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] ++ aeon-to-tako ~(got by hit) ++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki) @@ -1072,7 +1094,7 @@ [%direct (mug p) p q] :: ++ make-delta :: make blob delta - |= [p=lobe q=udon] + |= [p=lobe q=cage] ^- blob =+ t=[%delta 0 p q] =+ z=(blob-to-noun t) @@ -1098,6 +1120,14 @@ %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 @@ -1276,7 +1306,7 @@ (~(put by gar) pat p.bar) :: ++ apply-changes :: apply-changes:ze - |= lar=(list ,[p=path q=miso]) :: store changes + |= lar=(list ,[p=path q=misu]) :: store changes ^- (map path blob) =+ ^= hat :: current state ?: =(let 0) :: initial commit @@ -1311,8 +1341,6 @@ (make-delta u.har p.mys) %+ ~(put by bar) pat (make-delta p.u.ber p.mys) - %mut - !! == ++ checkout-ankh :: checkout-ankh:ze |= hat=(map path lobe) :: checkout commit @@ -1332,7 +1360,7 @@ == :: ++ forge-yaki :: forge-yaki:ze - |= [wen=@da par=(unit tako) lem=soba] :: forge yaki + |= [wen=@da par=(unit tako) lem=suba] :: forge yaki =+ ^= per ?~ par ~ ~[u.par] @@ -1823,7 +1851,7 @@ =((lobe-to-noun u.zat) (lobe-to-noun lob)) :: ++ edit :: edit:ze - |= [wen=@da lem=nori] :: edit + |= [wen=@da lem=nuri] :: edit ^+ +> ?- -.lem & =^ yak lat :: merge objects @@ -2725,8 +2753,8 @@ pac=rock :: packet data == :: ++ blob $% [%delta p=lobe q=lobe r=cage] :: delta on q - [%direct p=lobe q=* r=umph] :: - [%indirect p=lobe q=* r=cage s=lobe] :: + [%direct p=lobe q=cage] :: + [%indirect p=lobe q=cage r=cage s=lobe] :: == :: ++ boat ,[(list slip) tart] :: user stage ++ boon :: fort output @@ -3018,6 +3046,11 @@ [%dif p=cage] :: mutate from diff [%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 ++ moar ,[p=@ud q=@ud] :: normal change range ++ moat ,[p=case q=case r=path] :: change range @@ -3038,6 +3071,10 @@ $% [& p=soba] :: delta [| p=@tas] :: label == :: +++ nuri :: repository action + $% [& p=suba] :: delta + [| p=@tas] :: label + == :: ++ octs ,[p=@ud q=@] :: octet-stream ++ oryx ,@t :: CSRF secret ++ pail ?(%none %warm %cold) :: connection status @@ -3146,6 +3183,7 @@ ++ sock ,[p=ship q=ship] :: outgoing [from to] ++ spur path :: ship desk case spur ++ step ,[p=bray q=gens r=pass] :: identity stage +++ suba ,[p=cart q=(list ,[p=path q=misu])] :: delta ++ tako ,@ :: yaki ref ++ tart $+([@da path note] bowl) :: process core ++ taxi ,[p=lane q=rock] :: routed packet