From 40dd771754b0fc65e16fd7d272277fccc54d4f12 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 6 Jan 2015 17:53:32 -0500 Subject: [PATCH 01/73] waypoint --- arvo/hoon.hoon | 1 + arvo/zuse.hoon | 60 ++++++++++++++++++++++------------------- main/mar/mime/door.hook | 4 +-- main/mar/txt/door.hook | 7 +++++ 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 50d50f44e..0e93c027c 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -9607,6 +9607,7 @@ ++ desk ,@tas :: ship desk case spur ++ cage (cask vase) :: global metadata ++ cask |*(a=$+(* *) (pair mark a)) :: global data +++ cave (cask vase) :: global diff ++ cuff :: permissions $: p=kirk :: readers q=(set monk) :: authors diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index a63873826..7a6da1672 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1010,7 +1010,8 @@ ?- -.mis %del [%ins p.mis] %ins [%del p.mis] - %mut [%mut (limp p.mis)] + %dif [%dif (limp p.mis)] + %mut [%mut q.mis p.mis] == :: ++ cosh :: locally rehash @@ -1039,10 +1040,11 @@ ++ blob-to-lobe :: p.blob |= p=blob ^- lobe - ?- -.p - %delta p.p - %direct p.p - %indirect p.p + => p + ?- - + %delta p + %direct p + %indirect p == :: ++ ze !: @@ -1111,7 +1113,7 @@ =+ veq=(lobe-to-blob u.leb) =+ voq=(lobe-to-blob u.lob) %+ ~(put by yeb) pat - :- %mut + :- %dif ?: &(?=(%delta -.voq) =(u.leb q.voq)) :: avoid diff r.voq =+ zeq=(blob-to-noun veq) @@ -1300,8 +1302,8 @@ %del :: delete if exists ?. |((~(has by hat) pat) (~(has by bar) pat)) !! (~(del by bar) pat) - %mut :: mutate, must exist - =+ ber=(~(get by bar) pat) + %dif :: mutate, must exist + =+ ber=(~(get by bar) pat) :: XX typed ?~ ber =+ har=(~(get by hat) pat) ?~ har !! @@ -1309,6 +1311,8 @@ (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 @@ -1530,13 +1534,13 @@ |* [us=[ship desk] th=[ship desk] pat=path p=miso q=miso r=(list) con=?] ^- miso :: in case of conflict ~| %qeal-fail - ?> ?=(%mut -.p) - ?> ?=(%mut -.q) + ?> ?=(%dif -.p) + ?> ?=(%dif -.q) ?> ?=(%c -.q.p.p) ?> ?=(%c -.q.p.q) =+ s=(clean p.q.p.p) =+ t=(clean p.q.p.q) - :- %mut + :- %dif :- %c :: todo is this p.p.p? :- %c |- ^- (urge) @@ -1610,7 +1614,7 @@ :- (lore ((hard ,@) p.u.q)) ~ %del p - %mut ?> ?=(%mut -.u.q) + %dif ?> ?=(%dif -.u.q) %- some %^ qeal us th :^ pat u.p u.q :: merge p,q @@ -1653,7 +1657,7 @@ %ins :: new file %+ ~(put by res) pat %+ make-direct p.v %c :: TODO content type? - %mut :: patch from r + %dif :: patch from r %+ ~(put by res) pat %- make-direct :_ %c @@ -1825,8 +1829,8 @@ & =^ yak lat :: merge objects %+ forge-yaki wen ?: =(let 0) :: initial import - [~ q.lem] - [(some r:(aeon-to-yaki let)) q.lem] + [~ p.lem] + [(some r:(aeon-to-yaki let)) p.lem] ?. ?| =(0 let) !=((lent p.yak) 1) !(equiv q.yak q:(aeon-to-yaki let)) @@ -1889,7 +1893,7 @@ ?~(way +> $(way t.way, +> (descend i.way))) :: ++ overwrite :: write over - |= [pum=umph val=(unit ,[p=cash q=*])] + |= [pum=umph val=(unit ,[p=cash q=cage])] ^+ +> ?~ q.ank ?~ val +> @@ -1897,7 +1901,7 @@ ?~ val (push-change %del q.u.q.ank) ?: =(q.u.val q.u.q.ank) +> - (push-change %mut ((diff pum) q.u.q.ank q.u.val)) + (push-change %mut q.u.q.ank q.u.val) :: ++ change-tree :: modify tree |= [pum=umph bus=ankh] @@ -1938,7 +1942,7 @@ =+ sam=(sham p.mis) +>.$(p.ank (mix sam p.ank), q.ank [~ sam p.mis]) :: - %mut + %dif ?> ?=(^ q.ank) =+ nex=(lump p.mis q.u.q.ank) =+ sam=(sham nex) @@ -1973,7 +1977,7 @@ ^- miso =+ dir=((hard arch) .^(%cy pax)) ?~ q.dir [%ins val] - :- %mut + :- %dif ^- udon [%a %a .^(%cx pax) val] :: @@ -2698,7 +2702,7 @@ ++ agon (map ,[p=ship q=desk] ,[p=@ud q=@ud r=waks]) :: mergepts ++ ankh :: fs node (new) $: p=cash :: recursive hash - q=(unit ,[p=cash q=*]) :: file + q=(unit ,[p=cash q=cage]) :: file r=(map ,@ta ankh) :: folders == :: ++ ankz ,[p=@ (map ,@ta ankz)] :: trimmed ankh @@ -2720,9 +2724,9 @@ lys=@da :: last sent pac=rock :: packet data == :: -++ blob $% [%delta p=lobe q=lobe r=udon] :: delta on q +++ blob $% [%delta p=lobe q=lobe r=cave] :: delta on q [%direct p=lobe q=* r=umph] :: - [%indirect p=lobe q=* r=udon s=lobe] :: + [%indirect p=lobe q=* r=cave s=lobe] :: == :: ++ boat ,[(list slip) tart] :: user stage ++ boon :: fort output @@ -3006,11 +3010,13 @@ %put :: PUT %trac :: TRACE == :: +++ mime ,[p=mite q=octs] :: mimetyped data ++ mite (list ,@ta) :: mime type ++ miso :: ankh delta - $% [%del p=*] :: delete - [%ins p=*] :: insert - [%mut p=udon] :: mutate + $% [%del p=cage] :: delete + [%ins p=cage] :: insert + [%dif p=cave] :: mutate from diff + [%mut p=cage q=cage] :: mutate from raw == :: ++ mizu ,[p=@u q=(map ,@ud tako) r=rang] :: new state ++ moar ,[p=@ud q=@ud] :: normal change range @@ -3029,7 +3035,7 @@ goad :: == :: ++ nori :: repository action - $% [& q=soba] :: delta + $% [& p=soba] :: delta [| p=@tas] :: label == :: ++ octs ,[p=@ud q=@] :: octet-stream @@ -3070,7 +3076,7 @@ ++ rant :: namespace binding $: p=[p=care q=case r=@tas] :: clade release book q=path :: spur - r=* :: data + r=cage :: data == :: ++ rave :: general request $% [& p=mood] :: single request diff --git a/main/mar/mime/door.hook b/main/mar/mime/door.hook index 10bbc1b63..83866004d 100644 --- a/main/mar/mime/door.hook +++ b/main/mar/mime/door.hook @@ -2,9 +2,9 @@ :::: /hoon/core/mime/mar :: /? 314 -|_ own=[p=mite q=octs] +|_ own=mime ++ grab :: convert from |% - ++ noun ,[mite octs] :: clam from %noun + ++ noun mime :: clam from %noun -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index fe6784bca..b0c5dce58 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -6,11 +6,18 @@ :: ++ grab :: convert from |% + ++ mime |=(^mime q.q) ++ noun ,@t :: clam from %noun ++ json (cork so:jo need) -- ++ grow |% + ++ mime [/text/plain (taco txt)] ++ psal ;div: {(trip txt)} -- +++ grad + |% + ++ diff |=(cord *(urge cord)) + ++ patch |=((urge cord) *cord) + -- -- From 0d73a1bbba2b6f5bcd07d48647a267bd78a004d5 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 6 Jan 2015 20:26:19 -0500 Subject: [PATCH 02/73] waypoint --- arvo/ford.hoon | 41 +++++++++++++++++++++++++++++++++++++++++ arvo/hoon.hoon | 1 - arvo/zuse.hoon | 7 +++---- main/mar/txt/door.hook | 4 ++-- 4 files changed, 46 insertions(+), 7 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 34fb6ce99..7575d3805 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -69,10 +69,12 @@ [%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 @@ -383,6 +385,34 @@ ^+ +> %_(+> jav.bay q.cof) :: + ++ diff + |= [cof=cafe vax=cage vox=cage] + ^- (bolt cage) + ?. =(p.vax p.vox) + %^ flaw cof + leaf/"diff on data of different marks: {(trip p.vax)} {(trip p.vox)}" + ~ + %+ cope (fang cof p.vax [our %main %da now]) + |= [cof=cafe pro=vase] + ?. (slab %grad p.pro) + (flaw cof leaf/"no ++grad" ~) + =+ gar=(slap pro [%cnzy %grad])) + ?. (slab %diff p.gar) + (flaw cof leaf/"no ++diff:grad" ~) + ?. (slab %mark p.gar) + (flaw cof leaf/"no ++mark:grad" ~) + %+ cope (keel cof pro [[%& 6]~ vax]~) + |= [cof=cafe pox=vase] + %+ cope + %^ maul cof + (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) + vox + |= [cof=cafe dif=vase] + =+ for=((soft ,@tas) q:(slap gar [%cnzy %mark])) + ?~ for + (flaw cof leaf/"bad ++mark:grad") + (fine cof u.for dif) + :: ++ exec :: execute app ^+ ..zo ?: !=(~ q.kig) ..zo @@ -876,6 +906,16 @@ %+ cope (link cof p.kas p.cay [our %main %da now] q.cay) |= [cof=cafe vax=vase] (fine cof [p.kas vax]) + :: + %diff + %+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}") + %. [cof p.kas q.kas] + %+ cope + ;~ coax + |=([cof=cafe p=silk q=silk] ^$(cof cof, kas p)) + |=([cof=cafe p=silk q=silk] ^$(cof cof, kas q)) + == + diff :: %done [cof %0 p.kas q.kas] %dude (cool |.(p.kas) $(kas q.kas)) @@ -884,6 +924,7 @@ $(kas [%done p.kas u.q.kas]) :: %mute (kale cof p.kas q.kas) + %pact !! %plan %+ cope (abut:(meow p.kas q.kas) cof r.kas) |= [cof=cafe vax=vase] diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 0e93c027c..50d50f44e 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -9607,7 +9607,6 @@ ++ desk ,@tas :: ship desk case spur ++ cage (cask vase) :: global metadata ++ cask |*(a=$+(* *) (pair mark a)) :: global data -++ cave (cask vase) :: global diff ++ cuff :: permissions $: p=kirk :: readers q=(set monk) :: authors diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 7a6da1672..cba966932 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2724,9 +2724,9 @@ lys=@da :: last sent pac=rock :: packet data == :: -++ blob $% [%delta p=lobe q=lobe r=cave] :: delta on q +++ blob $% [%delta p=lobe q=lobe r=cage] :: delta on q [%direct p=lobe q=* r=umph] :: - [%indirect p=lobe q=* r=cave s=lobe] :: + [%indirect p=lobe q=* r=cage s=lobe] :: == :: ++ boat ,[(list slip) tart] :: user stage ++ boon :: fort output @@ -3015,7 +3015,7 @@ ++ miso :: ankh delta $% [%del p=cage] :: delete [%ins p=cage] :: insert - [%dif p=cave] :: mutate from diff + [%dif p=cage] :: mutate from diff [%mut p=cage q=cage] :: mutate from raw == :: ++ mizu ,[p=@u q=(map ,@ud tako) r=rang] :: new state @@ -3040,7 +3040,6 @@ == :: ++ octs ,[p=@ud q=@] :: octet-stream ++ oryx ,@t :: CSRF secret -++ pact path :: routed path ++ pail ?(%none %warm %cold) :: connection status ++ plan (trel view (pair ,@da (unit ,@dr)) path) :: subscription ++ plea ,[p=@ud q=[p=? q=@t]] :: live prompt diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index b0c5dce58..09e84c163 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -17,7 +17,7 @@ -- ++ grad |% - ++ diff |=(cord *(urge cord)) - ++ patch |=((urge cord) *cord) + ++ diff |=(cord *(urge cord)) + ++ pact |=((urge cord) *cord) -- -- From 37a8309a5a20fb7519b5c33106ca0bf855dec5e1 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 6 Jan 2015 20:46:53 -0500 Subject: [PATCH 03/73] ford compiles --- arvo/ford.hoon | 21 +++++++++++---------- main/mar/mime/door.hook | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 7575d3805..165e474b9 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -386,31 +386,31 @@ %_(+> jav.bay q.cof) :: ++ diff - |= [cof=cafe vax=cage vox=cage] + |= [cof=cafe cay=cage coy=cage] ^- (bolt cage) - ?. =(p.vax p.vox) + ?. =(p.cay p.coy) %^ flaw cof - leaf/"diff on data of different marks: {(trip p.vax)} {(trip p.vox)}" + leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}" ~ - %+ cope (fang cof p.vax [our %main %da now]) + %+ cope (fang cof p.cay [our %main %da now]) |= [cof=cafe pro=vase] ?. (slab %grad p.pro) (flaw cof leaf/"no ++grad" ~) - =+ gar=(slap pro [%cnzy %grad])) + =+ gar=(slap pro [%cnzy %grad]) ?. (slab %diff p.gar) (flaw cof leaf/"no ++diff:grad" ~) ?. (slab %mark p.gar) (flaw cof leaf/"no ++mark:grad" ~) - %+ cope (keel cof pro [[%& 6]~ vax]~) + %+ cope (keel cof pro [[%& 6]~ q.cay]~) |= [cof=cafe pox=vase] %+ cope %^ maul cof (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) - vox + q.coy |= [cof=cafe dif=vase] =+ for=((soft ,@tas) q:(slap gar [%cnzy %mark])) ?~ for - (flaw cof leaf/"bad ++mark:grad") + (flaw cof leaf/"bad ++mark:grad" ~) (fine cof u.for dif) :: ++ exec :: execute app @@ -910,12 +910,13 @@ %diff %+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}") %. [cof p.kas q.kas] - %+ cope + ;~ cope ;~ coax |=([cof=cafe p=silk q=silk] ^$(cof cof, kas p)) |=([cof=cafe p=silk q=silk] ^$(cof cof, kas q)) == - diff + diff + == :: %done [cof %0 p.kas q.kas] %dude (cool |.(p.kas) $(kas q.kas)) diff --git a/main/mar/mime/door.hook b/main/mar/mime/door.hook index 83866004d..fbeae94d8 100644 --- a/main/mar/mime/door.hook +++ b/main/mar/mime/door.hook @@ -2,9 +2,9 @@ :::: /hoon/core/mime/mar :: /? 314 -|_ own=mime +|_ own=[p=mite q=octs] ++ grab :: convert from |% - ++ noun mime :: clam from %noun + ++ noun ,[p=mite q=octs] :: clam from %noun -- -- From 667b40bf57b12025ae20e2aa0af4bef1ff664d97 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 7 Jan 2015 20:01:33 -0500 Subject: [PATCH 04/73] diff and pact working --- arvo/ford.hoon | 115 ++++++++++++++++++++++++++++------------ main/mar/hook/door.hook | 19 +++++-- main/mar/txt/door.hook | 24 ++++++--- 3 files changed, 114 insertions(+), 44 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 165e474b9..b1b239ae0 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -386,32 +386,44 @@ %_(+> jav.bay q.cof) :: ++ diff - |= [cof=cafe cay=cage coy=cage] + |= [cof=cafe kas=silk kos=silk] ^- (bolt cage) - ?. =(p.cay p.coy) - %^ flaw cof + %. [cof kas kos] + ;~ cope + ;~ coax + |=([cof=cafe p=silk q=silk] (make cof p)) + |=([cof=cafe p=silk q=silk] (make cof q)) + == + |= [cof=cafe cay=cage coy=cage] + ?. =(p.cay p.coy) + %+ flaw cof :_ ~ leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}" - ~ - %+ cope (fang cof p.cay [our %main %da now]) - |= [cof=cafe pro=vase] - ?. (slab %grad p.pro) - (flaw cof leaf/"no ++grad" ~) - =+ gar=(slap pro [%cnzy %grad]) - ?. (slab %diff p.gar) - (flaw cof leaf/"no ++diff:grad" ~) - ?. (slab %mark p.gar) - (flaw cof leaf/"no ++mark:grad" ~) - %+ cope (keel cof pro [[%& 6]~ q.cay]~) - |= [cof=cafe pox=vase] - %+ cope - %^ maul cof - (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) - q.coy - |= [cof=cafe dif=vase] - =+ for=((soft ,@tas) q:(slap gar [%cnzy %mark])) - ?~ for - (flaw cof leaf/"bad ++mark:grad" ~) - (fine cof u.for dif) + %+ cope (fang cof p.cay [our %main %da now]) + |= [cof=cafe pro=vase] + ?. (slab %grad p.pro) + (flaw cof leaf/"no ++grad" ~) + =+ gar=(slap pro [%cnzy %grad]) + ?. (slab %mork p.gar) :: XX mork + ?. (slab %sted p.gar) + (flaw cof leaf/"no ++mork:grad nor ++sted:grad" ~) + =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) + ?~ for + (flaw cof leaf/"bad ++sted:grad" ~) + (make cof %diff [%cast u.for kas] [%cast u.for kos]) + ?. (slab %deff p.gar) :: XX deff + (flaw cof leaf/"no ++diff:grad" ~) + %+ cope (keel cof pro [[%& 6]~ q.cay]~) + |= [cof=cafe pox=vase] + %+ cope + %^ maul cof + (slap (slap pox [%cnzy %grad]) [%cnzy %deff]) + q.coy + |= [cof=cafe dif=vase] + =+ for=((soft ,@tas) q:(slap gar [%cnzy %mork])) :: XX mork + ?~ for + (flaw cof leaf/"bad ++mork:grad" ~) + (fine cof u.for dif) + == :: ++ exec :: execute app ^+ ..zo @@ -909,14 +921,7 @@ :: %diff %+ cool |.(leaf/"ford: diff {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}") - %. [cof p.kas q.kas] - ;~ cope - ;~ coax - |=([cof=cafe p=silk q=silk] ^$(cof cof, kas p)) - |=([cof=cafe p=silk q=silk] ^$(cof cof, kas q)) - == - diff - == + (diff cof p.kas q.kas) :: %done [cof %0 p.kas q.kas] %dude (cool |.(p.kas) $(kas q.kas)) @@ -925,7 +930,10 @@ $(kas [%done p.kas u.q.kas]) :: %mute (kale cof p.kas q.kas) - %pact !! + %pact + %+ cool |.(leaf/"ford: pact {<`@p`(mug p.kas)>} {<`@p`(mug q.kas)>}") + (pact cof p.kas q.kas) + :: %plan %+ cope (abut:(meow p.kas q.kas) cof r.kas) |= [cof=cafe vax=vase] @@ -1238,6 +1246,47 @@ == -- :: + ++ pact + |= [cof=cafe kas=silk kos=silk] + ^- (bolt cage) + %. [cof kas kos] + ;~ cope + ;~ coax + |=([cof=cafe p=silk q=silk] (make cof p)) + |=([cof=cafe p=silk q=silk] (make cof q)) + == + |= [cof=cafe cay=cage coy=cage] + %+ cope (fang cof p.cay [our %main %da now]) + |= [cof=cafe pro=vase] + ?. (slab %grad p.pro) + (flaw cof leaf/"no ++grad" ~) + =+ gar=(slap pro [%cnzy %grad]) + ?. (slab %mork p.gar) :: XX mork + ?. (slab %sted p.gar) + (flaw cof leaf/"no ++mork:grad nor ++sted:grad" ~) + =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) + ?~ for + (flaw cof leaf/"bad ++sted:grad" ~) + (make cof %cast p.cay %pact [%cast u.for kas] kos) + =+ for=((soft ,@tas) q:(slap gar [%cnzy %mork])) + ?~ for + (flaw cof leaf/"bad ++mork:grad" ~) + ?. =(u.for p.coy) + %+ flaw cof :_ ~ + =< leaf/"pact on data with wrong mork: {-} {+<} {+>}" + [(trip p.cay) (trip u.for) (trip p.coy)] + ?. (slab %pact p.gar) + (flaw cof leaf/"no ++pact:grad" ~) + %+ cope (keel cof pro [[%& 6]~ q.cay]~) + |= [cof=cafe pox=vase] + %+ cope + %^ maul cof + (slap (slap pox [%cnzy %grad]) [%cnzy %pact]) + q.coy + |= [cof=cafe pat=vase] + (fine cof p.cay pat) + == + :: ++ resp |= [tik=@ud rot=riot] ^+ ..zo diff --git a/main/mar/hook/door.hook b/main/mar/hook/door.hook index af29a81de..9a8d48280 100644 --- a/main/mar/hook/door.hook +++ b/main/mar/hook/door.hook @@ -2,6 +2,7 @@ :::: /hook/door/hook/mar :: /? 314 +!: |_ own=@t :: ++ grow :: convert to @@ -9,7 +10,19 @@ ++ mime [/text/hoon (taco own)] :: convert to %mime ++ psal ;div:(pre:"{(trip own)}") :: convert to %html ++ hymn ;html:(head:title:"Source" "+{psal}") + ++ txt + (lore (cat 3 own '\0a')) -- -++ grab |% :: convert from - ++ noun ,@t :: clam from %noun --- -- +++ grab + |% :: convert from + ++ noun ,@t :: clam from %noun + ++ txt + |= wan=wain + =+ (role wan) + (end 3 (dec (met 3 -)) -) + -- +++ grad + |% + ++ sted %txt + -- +-- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 09e84c163..956e892d8 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -2,22 +2,30 @@ :::: /hook/door/term-line/mar :: /? 314 -|_ txt=cord +!: +|_ txt=wain :: ++ grab :: convert from |% - ++ mime |=(^mime q.q) - ++ noun ,@t :: clam from %noun - ++ json (cork so:jo need) + ++ mime |=([p=mite q=octs] (lore q.q)) + ++ noun wain :: clam from %noun + ++ json :(corl lore need so:jo) -- ++ grow |% - ++ mime [/text/plain (taco txt)] - ++ psal ;div: {(trip txt)} + ++ mime [/text/plain (taco (role txt))] + ++ psal ;div: {(trip (role txt))} -- ++ grad |% - ++ diff |=(cord *(urge cord)) - ++ pact |=((urge cord) *cord) + ++ mork %txt-diff + ++ deff + |= tyt=wain + ^- (urge cord) + (lusk txt tyt (loss txt tyt)) + ++ pact + |= dif=(urge cord) + ^- wain + (lurk txt dif) -- -- From ab548781358b5d30600e1e0237571c41234b58d2 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 7 Jan 2015 20:07:40 -0500 Subject: [PATCH 05/73] mork->form deff->diff --- arvo/ford.hoon | 22 +++++++++++----------- main/mar/txt/door.hook | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index b1b239ae0..5215c9051 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -403,25 +403,25 @@ ?. (slab %grad p.pro) (flaw cof leaf/"no ++grad" ~) =+ gar=(slap pro [%cnzy %grad]) - ?. (slab %mork p.gar) :: XX mork + ?. (slab %form p.gar) ?. (slab %sted p.gar) - (flaw cof leaf/"no ++mork:grad nor ++sted:grad" ~) + (flaw cof leaf/"no ++form:grad nor ++sted:grad" ~) =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) ?~ for (flaw cof leaf/"bad ++sted:grad" ~) (make cof %diff [%cast u.for kas] [%cast u.for kos]) - ?. (slab %deff p.gar) :: XX deff + ?. (slab %diff p.gar) (flaw cof leaf/"no ++diff:grad" ~) %+ cope (keel cof pro [[%& 6]~ q.cay]~) |= [cof=cafe pox=vase] %+ cope %^ maul cof - (slap (slap pox [%cnzy %grad]) [%cnzy %deff]) + (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) q.coy |= [cof=cafe dif=vase] - =+ for=((soft ,@tas) q:(slap gar [%cnzy %mork])) :: XX mork + =+ for=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ for - (flaw cof leaf/"bad ++mork:grad" ~) + (flaw cof leaf/"bad ++form:grad" ~) (fine cof u.for dif) == :: @@ -1261,19 +1261,19 @@ ?. (slab %grad p.pro) (flaw cof leaf/"no ++grad" ~) =+ gar=(slap pro [%cnzy %grad]) - ?. (slab %mork p.gar) :: XX mork + ?. (slab %form p.gar) ?. (slab %sted p.gar) - (flaw cof leaf/"no ++mork:grad nor ++sted:grad" ~) + (flaw cof leaf/"no ++form:grad nor ++sted:grad" ~) =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) ?~ for (flaw cof leaf/"bad ++sted:grad" ~) (make cof %cast p.cay %pact [%cast u.for kas] kos) - =+ for=((soft ,@tas) q:(slap gar [%cnzy %mork])) + =+ for=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ for - (flaw cof leaf/"bad ++mork:grad" ~) + (flaw cof leaf/"bad ++form:grad" ~) ?. =(u.for p.coy) %+ flaw cof :_ ~ - =< leaf/"pact on data with wrong mork: {-} {+<} {+>}" + =< leaf/"pact on data with wrong form: {-} {+<} {+>}" [(trip p.cay) (trip u.for) (trip p.coy)] ?. (slab %pact p.gar) (flaw cof leaf/"no ++pact:grad" ~) diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 956e892d8..1544895bb 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -18,8 +18,8 @@ -- ++ grad |% - ++ mork %txt-diff - ++ deff + ++ form %txt-diff + ++ diff |= tyt=wain ^- (urge cord) (lusk txt tyt (loss txt tyt)) From 75583c3f8c14156753892f5ceef340a5258c72cd Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 7 Jan 2015 20:33:08 -0500 Subject: [PATCH 06/73] comments --- arvo/ford.hoon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 5215c9051..3e145e508 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -385,7 +385,7 @@ ^+ +> %_(+> jav.bay q.cof) :: - ++ diff + ++ diff :: diff |= [cof=cafe kas=silk kos=silk] ^- (bolt cage) %. [cof kas kos] @@ -1246,7 +1246,7 @@ == -- :: - ++ pact + ++ pact :: patch |= [cof=cafe kas=silk kos=silk] ^- (bolt cage) %. [cof kas kos] From 0844c4e043df26b334c316b64de70d3af7006246 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 9 Jan 2015 17:11:43 -0500 Subject: [PATCH 07/73] waypoint --- arvo/clay.hoon | 113 ++++++++++++++++++++++++++++++++++++++++++++++--- arvo/zuse.hoon | 54 +++++++++++++++++++---- 2 files changed, 152 insertions(+), 15 deletions(-) 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 From 308fca2ea22299a2e0b963584b405ed7f65c8b30 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 12 Jan 2015 20:50:41 -0500 Subject: [PATCH 08/73] waypoint --- arvo/clay.hoon | 59 ++-- arvo/zuse.hoon | 714 +++++++++++++++++++++++-------------------------- 2 files changed, 371 insertions(+), 402 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 12d171386..9ba939333 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -78,7 +78,6 @@ [%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] @@ -97,7 +96,7 @@ $: lim=@da :: complete to qyx=cult :: subscribers ref=(unit rind) :: outgoing requests - wok=work :: outstanding diffs + wok=(unit work) :: outstanding diffs dom=dome :: revision state == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist @@ -290,58 +289,61 @@ | :_ yel [hen %note '=' %leaf :(weld (trip p.lem) " " (spud pre))] & |- ^+ yel - ?~ q.q.lem yel - :_ $(q.q.lem t.q.q.lem) + ?~ q.p.lem yel + :_ $(q.p.lem t.q.p.lem) :- hen :+ %note - ?-(-.q.i.q.q.lem %del '-', %ins '+', %mut ':') - [%leaf (spud (weld pre p.i.q.q.lem))] + ?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';') + [%leaf (spud (weld pre p.i.q.p.lem))] == == :: ++ edit :: apply changes |= [wen=@da lem=nori] ^+ +> - ?. -.lem + ?: ?=(%| -.lem) =+ axe=(~(edit ze lim dom ran) wen lem) =+ `[l=@da d=dome r=rang]`+<.axe - +>.$(dom d, ran r) - ?^ wok + +>.$(dom d, ran r) :: XX checkout-ankh + ?. =(~ wok) ~& %already-applying-changes !! =+ ^- lon=(list path) - (murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ `a))) + (murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ (some a)))) =+ ^- sot=(list ,[p=path q=misu]) - (murn q.p.lem |=([a=path b=miso] ?:(?=(%mut -.b) ~ `[a `misu`b]))) - =. wok `[sot lon] + %+ murn q.p.lem + |=([a=path b=miso] ?:(?=(%mut -.b) ~ (some [a `misu`b]))) + =. wok `[sot lon] ?~ lon - apply-edit + (apply-edit wen) =+ ^- los=(list ,[duct path note]) - (murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ `(silkify a b)))) + %+ murn q.p.lem + |=([a=path b=miso] ?.(?=(%mut -.b) ~ (some (silkify wen a b)))) %_(+>.$ tag (welp los tag)) :: ++ silkify - |= [a=path %mut b=cage c=cage] + |= [wen=@da a=path %mut b=cage c=cage] ^- [duct path note] :+ hen - [%diffing (scot %p who) syd a] + [%diffing (scot %p who) syd (scot %da wen) a] [%f %exec who ~ %diff [%done ~ b] [%done ~ c]] :: ++ apply-edit - ^- . + |= wen=@da + ^+ +> ?~ wok ~& %no-changes !! ?^ lon.u.wok ~& %not-done-diffing !! - =+ axe=(~(edit ze lim dom ran) wen %& *cart wok.wok) + =+ axe=(~(edit ze lim dom ran) wen %& *cart sot.u.wok) =+ `[l=@da d=dome r=rang]`+<.axe - +>(dom d, ran r, wok ~) + +>.$(dom d, ran r, wok ~) :: XX checkout-ankh :: ++ take-diff - |= [pax=path res=(each bead (list tank))] + |= [wen=@da pax=path res=(each bead (list tank))] ^+ +> ?~ wok ~& %clay-unexpected-made !! ?. (lien lon.u.wok |=(path =(+< pax))) ~& %clay-strange-made !! - ?. -.res + ?: ?=(%| -.res) %_ +>.$ wok ~ tag @@ -349,17 +351,17 @@ ^- (list ,[duct path note]) %+ murn lon.u.wok |= a=path - ?: =(pax a) - `[hen [%diffing (scot %p who) syd a] %f %exec who ~] + ?: =(pax a) ~ + `[hen [%diffing (scot %p who) syd (scot %da wen) 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.u.wok (skip lon.u.wok |=(path =(+< pax))) + sot.u.wok [[pax %dif q.p.res] sot.u.wok] == ?~ lon.wok - apply-edit + (apply-edit wen) +>.$ :: ++ edis :: apply subscription @@ -797,12 +799,13 @@ [[[hen %slip %d %flog +.q.hin] ~] ..^$] :: %made - ?> ?=([%diffing @ @ *] tea) + ?> ?=([%diffing @ @ @ *] tea) =+ who=(slav %p i.t.tea) =+ syd=(slav %tas i.t.t.tea) + =+ wen=(slav %da i.t.t.t.tea) =^ mos ruf =+ ^= zat - (take-diff:(di:wake:une syd) t.t.t.tea p.q.hin) + (take-diff:(di:wake:une syd) t.t.t.t.tea p.q.hin) =+ zot=abet.zat [-.zot abet:(pish:une syd +.zot ran.zat)] [mos ..^$] diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index d4bee3555..9de08ebb0 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2,6 +2,7 @@ :: zuse (3), standard library (tang) :: ~% %zuse + ~ +!: |% :::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :::: chapter 3b, Arvo libraries :::: @@ -1010,7 +1011,7 @@ ?- -.mis %del [%ins p.mis] %ins [%del p.mis] - %dif [%dif (limp p.mis)] + %dif [%dif p.mis] :: XX incorrect %mut [%mut q.mis p.mis] == :: @@ -1048,28 +1049,6 @@ == :: ++ 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) @@ -1083,72 +1062,57 @@ :: ++ tako-to-yaki ~(got by hut) :: grab yaki ++ lobe-to-blob ~(got by lat) :: grab blob - ++ lobe-to-noun :: grab blob - |= p=lobe :: ^- * - %- blob-to-noun + ++ lobe-to-cage :: grab blob + |= p=lobe :: ^- maybe cage + ^- (each cage ,*) + %- blob-to-cage (lobe-to-blob p) :: ++ make-direct :: make blob - |= [p=* q=umph] + |= [p=cage] ^- blob - [%direct (mug p) p q] + [%direct (mug p) p] :: ++ make-delta :: make blob delta |= [p=lobe q=cage] ^- blob =+ t=[%delta 0 p q] - =+ z=(blob-to-noun t) + =+ z=(blob-to-cage t) =+ ^= has %^ cat 7 (sham [%blob z]) (sham [%lobe z]) [%delta has p q] :: - ++ blob-to-umph :: blob umph [prep] - |= p=blob :: used in merge - ^- umph - ?- -.p - %delta p.r.p - %direct r.p - %indirect p.r.p - == - :: - ++ blob-to-noun :: grab blob - |= p=blob - ?- -.p - %delta (lump r.p (lobe-to-noun q.p)) - %direct q.p - %indirect q.p - == - :: - ++ new-blob-to-cage + ++ blob-to-cage |= p=blob :: ^- (each cage ,[cage this]) ?- -.p %direct [%& q.p] %indirect [%& q.p] - %delta [%| r.p $(p q.p)] + %delta [%| r.p $(p (lobe-to-blob q.p))] == :: :: ++ diff-yakis :: fundamental diff |= [p=yaki q=yaki] ^- (map path miso) - %+ roll (~(tap in (luth q.p q.q)) ~) - |= [pat=path yeb=(map path miso)] - =+ leb=(~(get by q.p) pat) - =+ lob=(~(get by q.q) pat) - ?~ leb (~(put by yeb) pat [%ins (lobe-to-noun (need lob))]) - ?~ lob (~(put by yeb) pat [%del (lobe-to-noun (need leb))]) - ?: =(u.leb u.lob) yeb - =+ veq=(lobe-to-blob u.leb) - =+ voq=(lobe-to-blob u.lob) - %+ ~(put by yeb) pat - :- %dif - ?: &(?=(%delta -.voq) =(u.leb q.voq)) :: avoid diff - r.voq - =+ zeq=(blob-to-noun veq) - =+ zoq=(blob-to-noun voq) - ((diff (blob-to-umph (lobe-to-blob u.leb))) zeq zoq) + !! + :: %+ roll (~(tap in (luth q.p q.q)) ~) + :: |= [pat=path yeb=(map path miso)] + :: =+ leb=(~(get by q.p) pat) + :: =+ lob=(~(get by q.q) pat) + :: ?~ leb (~(put by yeb) pat [%ins (lobe-to-cage (need lob))]) + :: ?~ lob (~(put by yeb) pat [%del (lobe-to-cage (need leb))]) + :: ?: =(u.leb u.lob) yeb + :: =+ veq=(lobe-to-blob u.leb) + :: =+ voq=(lobe-to-blob u.lob) + :: %+ ~(put by yeb) pat + :: :- %dif + :: ?: &(?=(%delta -.voq) =(u.leb q.voq)) :: avoid diff + :: r.voq + :: =+ zeq=(blob-to-noun veq) + :: =+ zoq=(blob-to-noun voq) + :: ((diff (blob-to-umph (lobe-to-blob u.leb))) zeq zoq) :: ++ lobes-at-path :: lobes-at-path:ze |= [yon=aeon pax=path] :: data at path @@ -1322,13 +1286,13 @@ (~(put by bat) pat (lobe-to-blob gar)) :: use original ^= bar ^- (map path blob) %+ roll lar - |= [[pat=path mys=miso] bar=(map path blob)] + |= [[pat=path mys=misu] bar=(map path blob)] ^+ bar ?- -.mys %ins :: insert if not exist ?: (~(has by bar) pat) !! :: ?: (~(has by hat) pat) !! :: - (~(put by bar) pat (make-direct p.mys %c)) :: TODO content type? + (~(put by bar) pat (make-direct p.mys)) %del :: delete if exists ?. |((~(has by hat) pat) (~(has by bar) pat)) !! (~(del by bar) pat) @@ -1351,8 +1315,9 @@ ^- ankh %- cosh ?~ pat - =+ zar=(lobe-to-noun bar) - ank(q [~ (sham zar) zar]) + =+ zar=(lobe-to-cage bar) + ?> ?=(%& -.zar) + ank(q [~ (sham `cage`p.zar) p.zar]) =+ nak=(~(get by r.ank) i.pat) %= ank r %+ ~(put by r.ank) i.pat @@ -1558,261 +1523,260 @@ == == == - ++ qeal :: merge p,q - |* [us=[ship desk] th=[ship desk] pat=path p=miso q=miso r=(list) con=?] - ^- miso :: in case of conflict - ~| %qeal-fail - ?> ?=(%dif -.p) - ?> ?=(%dif -.q) - ?> ?=(%c -.q.p.p) - ?> ?=(%c -.q.p.q) - =+ s=(clean p.q.p.p) - =+ t=(clean p.q.p.q) - :- %dif - :- %c :: todo is this p.p.p? - :- %c - |- ^- (urge) - ::?~ s ?: (qual t) t - :: ~| %qail-conflict !! - ::?~ t ?: (qual s) s - :: ~| %qail-conflict !! - ?~ s t - ?~ t s - ?- -.i.s - %& - ?- -.i.t - %& - ?: =(p.i.s p.i.t) - [i.s $(s t.s, t t.t, r (slag p.i.s r))] - ?: (gth p.i.s p.i.t) - [i.t $(t t.t, p.i.s (sub p.i.s p.i.t), r (slag p.i.t r))] - [i.s $(s t.s, p.i.t (sub p.i.t p.i.s), r (slag p.i.s r))] - %| - ?: =(p.i.s (lent p.i.t)) - [i.t $(s t.s, t t.t, r (slag p.i.s r))] - ?: (gth p.i.s (lent p.i.t)) - :- i.t - $(t t.t, p.i.s (sub p.i.s (lent p.i.t)), r (slag (lent p.i.t) r)) - ?. con ~| %quil-conflict !! :: conflict - ~& [%quil-conflict-soft pat] - =+ mar=(match-conflict us th s t r) - [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] - == - %| - ?- -.i.t - %| - ?. con ~| %quil-conflict !! - ~& [%quil-conflict-soft pat] - =+ mar=(match-conflict us th s t r) - [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] - %& - ?: =(p.i.t (lent p.i.s)) - [i.s $(s t.s, t t.t, r (slag p.i.t r))] - ?: (gth p.i.t (lent p.i.s)) - :- i.s - $(s t.s, p.i.t (sub p.i.t (lent p.i.s)), r (slag (lent p.i.s) r)) - ?. con ~| %quil-conflict !! - ~& [%quil-conflict-soft pat] - =+ mar=(match-conflict us th s t r) - [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] - == - == - ++ quil :: merge p,q - |= $: us=[ship desk] - th=[ship desk] - pat=path - p=(unit miso) - q=(unit miso) - r=(unit (list)) - con=? - == - ^- (unit miso) - ?~ p q :: trivial - ?~ q p :: trivial - ?- -.u.p - %ins ?> ?=(%ins -.u.q) - ?. con !! - %- some - :- %ins - %- role - %- annotate - :- us - :- th - :- (lore ((hard ,@) p.u.p)) - :- (lore ((hard ,@) p.u.q)) - ~ - %del p - %dif ?> ?=(%dif -.u.q) - %- some - %^ qeal us th - :^ pat u.p u.q :: merge p,q - :- %- need r - con - == - :: - ++ meld :: merge p,q from r - |= [p=yaki q=yaki r=yaki con=? us=[ship desk] th=[ship desk]] - ^- (map path blob) - =+ s=(diff-yakis r p) - =+ t=(diff-yakis r q) - =+ lut=(luth s t) - %- |= res=(map path blob) :: add old - ^- (map path blob) - %- ~(uni by res) - %- mo - %+ turn - %+ skip (~(tap by q.r) ~) :: loop through old - |= [pat=path bar=lobe] ^- ? - (~(has in lut) pat) :: skip updated - |= [pat=path bar=lobe] ^- [path blob] - [pat (lobe-to-blob bar)] :: lookup objects - %+ roll (~(tap in (luth s t)) ~) - |= [pat=path res=(map path blob)] - =+ ^= v - %- need - %^ quil us th - :- pat - :+ (~(get by s) pat) - (~(get by t) pat) - :_ con - %- %- lift lore - %- %- lift %- hard ,@ :: for %c - %- %- lift lobe-to-noun - %- ~(get by q.r) - pat - ?- -.v - %del res :: no longer exists - %ins :: new file - %+ ~(put by res) pat - %+ make-direct p.v %c :: TODO content type? - %dif :: patch from r - %+ ~(put by res) pat - %- make-direct - :_ %c - %+ lump p.v - %- lobe-to-noun - %- ~(got by q.r) pat - == - :: - :: merge types - :: - ++ mate :: merge p,q - |= con=? :: %mate, %meld - |= [p=yaki q=yaki us=[ship desk] th=[ship desk]] - ^- (map path blob) - =+ r=(~(tap in (find-merge-points p q)) ~) - ?~ r - ~|(%mate-no-ancestor !!) - ?: =(1 (lent r)) - (meld p q i.r con us th) - ~|(%mate-criss-cross !!) - :: - ++ keep :: %this - |= [p=yaki q=yaki [ship desk] [ship desk]] - ^- (map path blob) - %+ roll (~(tap by q.p) ~) - |= [[pat=path lob=lobe] zar=(map path blob)] - ^- (map path blob) - (~(put by zar) pat (lobe-to-blob lob)) - :: - ++ drop :: %that - |= [p=yaki q=yaki r=[ship desk] s=[ship desk]] - ^- (map path blob) - (keep q p r s) - :: - ++ forge :: %forge - |= [p=yaki q=yaki s=[ship desk] t=[ship desk]] - ^- (map path blob) - =+ r=(~(tap in (find-merge-points p q)) ~) - ?~ r - ~|(%forge-no-ancestor !!) - %- |= [r=yaki lut=(map lobe blob) hat=(map tako yaki)] - =. lat lut - =. hut hat - (meld p q r & s t) :: fake merge - %+ roll t.r :: fake ancestor - |= [par=yaki [for=_i.r lut=_lat hat=_hut]] - =. lat lut - =+ ^= far - ^- (map path lobe) - %- ~(urn by (forge par for s t)) - |= [k=path v=blob] (blob-to-lobe v) - =+ u=(make-yaki [r.par r.for ~] far `@da`0) :: fake yaki - :- u - :_ (~(put by hat) r.u u) - =< - - %- update-lat - :_ ~ - %- ~(urn by q.u) - |= [path k=lobe] - (lobe-to-blob k) - :: - :: actual merge - :: - ++ merge - |= [us=[ship desk] th=[ship desk]] - |= [p=yaki q=yaki r=@da s=$+([yaki yaki [ship desk] [ship desk]] (map path blob))] - ^- [yaki (map path blob)] - =+ u=(s p q us th) - =+ ^= t - ^- (map path lobe) - %+ roll (~(tap by u) ~) - |= [[pat=path bar=blob] yeb=(map path lobe)] - (~(put by yeb) pat (blob-to-lobe bar)) - :_ u - (make-yaki [r.p r.q ~] t r) - :: - ++ strategy :: merge strategy - |= gem=?(%meld %mate %that %this) - ?- gem - %meld (mate %.y) - %mate (mate %.n) - %this keep - %that drop - == - :: - ++ construct-merge :: construct-merge:ze - |= [gem=germ who=ship des=desk sab=saba now=@da] :: construct merge - ^- (unit (unit mizu)) :::::: - =+ for=s.sab :: foreign dome - =+ mer=(merge [who des] [p.sab q.sab]) - ?- gem - %init :: force fine - ?. =(let 0) :: hell no - !! - =+ hot=(~(put by *(map aeon tako)) 1 (~(got by hit.for) let.for)) - [~ [~ [1 hot hut lat]]] :: trivial - %fine - =+ der=(~(got by hit.for) let.for) - =+ owr=(~(got by hit) let) - ?: =(der owr) - [~ ~] - ?: (~(has in (reachable-takos owr)) der) - [~ ~] - ?. (~(has in (reachable-takos der)) owr) - ~ :: not a fast forward - ~& [%merge-fine p.sab q.sab] - [~ [~ [+(let) (~(put by hit) +(let) der) hut lat]]] - ?(%mate %that %this %meld) - =+ foreign-head=(tako-to-yaki (~(got by hit.for) let.for)) - =+ our-head=(tako-to-yaki (~(got by hit) let)) - ?: =(r.foreign-head r.our-head) - [~ ~] :: up to date - ?: (~(has in (reachable-takos r.our-head)) r.foreign-head) - [~ ~] :: up to date - ?: ?& |(=(gem %mate) =(gem %meld)) - (~(has in (reachable-takos r.foreign-head)) r.our-head) - == - $(gem %fine) :: use fast forward - =+ gar=(mer our-head foreign-head now (strategy gem)) - =+ yak=-.gar - =+ hek=+.gar - =. lat -:(update-lat hek ~) :: add new blobs - =. hut (~(put by *(map tako yaki)) r.yak yak) - =. let +(let) - =. hit (~(put by *(map aeon tako)) let r.yak) - [~ [~ [let hit hut lat]]] - == + :: ++ qeal :: merge p,q + :: |* [us=[ship desk] th=[ship desk] pat=path p=miso q=miso r=(list) con=?] + :: ^- miso :: in case of conflict + :: ~| %qeal-fail + :: ?> ?=(%dif -.p) + :: ?> ?=(%dif -.q) + :: ?> ?=(%c -.q.p.p) + :: ?> ?=(%c -.q.p.q) + :: =+ s=(clean p.q.p.p) + :: =+ t=(clean p.q.p.q) + :: :- %dif + :: :- %c :: todo is this p.p.p? + :: :- %c + :: |- ^- (urge) + :: ::?~ s ?: (qual t) t + :: :: ~| %qail-conflict !! + :: ::?~ t ?: (qual s) s + :: :: ~| %qail-conflict !! + :: ?~ s t + :: ?~ t s + :: ?- -.i.s + :: %& + :: ?- -.i.t + :: %& + :: ?: =(p.i.s p.i.t) + :: [i.s $(s t.s, t t.t, r (slag p.i.s r))] + :: ?: (gth p.i.s p.i.t) + :: [i.t $(t t.t, p.i.s (sub p.i.s p.i.t), r (slag p.i.t r))] + :: [i.s $(s t.s, p.i.t (sub p.i.t p.i.s), r (slag p.i.s r))] + :: %| + :: ?: =(p.i.s (lent p.i.t)) + :: [i.t $(s t.s, t t.t, r (slag p.i.s r))] + :: ?: (gth p.i.s (lent p.i.t)) + :: :- i.t + :: $(t t.t, p.i.s (sub p.i.s (lent p.i.t)), r (slag (lent p.i.t) r)) + :: ?. con ~| %quil-conflict !! :: conflict + :: ~& [%quil-conflict-soft pat] + :: =+ mar=(match-conflict us th s t r) + :: [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] + :: == + :: %| + :: ?- -.i.t + :: %| + :: ?. con ~| %quil-conflict !! + :: ~& [%quil-conflict-soft pat] + :: =+ mar=(match-conflict us th s t r) + :: [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] + :: %& + :: ?: =(p.i.t (lent p.i.s)) + :: [i.s $(s t.s, t t.t, r (slag p.i.t r))] + :: ?: (gth p.i.t (lent p.i.s)) + :: :- i.s + :: $(s t.s, p.i.t (sub p.i.t (lent p.i.s)), r (slag (lent p.i.s) r)) + :: ?. con ~| %quil-conflict !! + :: ~& [%quil-conflict-soft pat] + :: =+ mar=(match-conflict us th s t r) + :: [[%| p.mar] $(s p.q.mar, t q.q.mar, r r.q.mar)] + :: == + :: == + :: ++ quil :: merge p,q + :: |= $: us=[ship desk] + :: th=[ship desk] + :: pat=path + :: p=(unit miso) + :: q=(unit miso) + :: r=(unit (list)) + :: con=? + :: == + :: ^- (unit miso) + :: ?~ p q :: trivial + :: ?~ q p :: trivial + :: ?- -.u.p + :: %ins ?> ?=(%ins -.u.q) + :: ?. con !! + :: %- some + :: :- %ins + :: %- role + :: %- annotate + :: :- us + :: :- th + :: :- (lore ((hard ,@) p.u.p)) + :: :- (lore ((hard ,@) p.u.q)) + :: ~ + :: %del p + :: %dif ?> ?=(%dif -.u.q) + :: %- some + :: %^ qeal us th + :: :^ pat u.p u.q :: merge p,q + :: :- %- need r + :: con + :: == + :: :: + :: ++ meld :: merge p,q from r + :: |= [p=yaki q=yaki r=yaki con=? us=[ship desk] th=[ship desk]] + :: ^- (map path blob) + :: =+ s=(diff-yakis r p) + :: =+ t=(diff-yakis r q) + :: =+ lut=(luth s t) + :: %- |= res=(map path blob) :: add old + :: ^- (map path blob) + :: %- ~(uni by res) + :: %- mo + :: %+ turn + :: %+ skip (~(tap by q.r) ~) :: loop through old + :: |= [pat=path bar=lobe] ^- ? + :: (~(has in lut) pat) :: skip updated + :: |= [pat=path bar=lobe] ^- [path blob] + :: [pat (lobe-to-blob bar)] :: lookup objects + :: %+ roll (~(tap in (luth s t)) ~) + :: |= [pat=path res=(map path blob)] + :: =+ ^= v + :: %- need + :: %^ quil us th + :: :- pat + :: :+ (~(get by s) pat) + :: (~(get by t) pat) + :: :_ con + :: %- %- lift lore + :: %- %- lift %- hard ,@ :: for %c + :: %- %- lift lobe-to-cage + :: %- ~(get by q.r) + :: pat + :: ?- -.v + :: %del res :: no longer exists + :: %ins :: new file + :: %+ ~(put by res) pat + :: (make-direct p.v) + :: %dif :: patch from r + :: %+ ~(put by res) pat + :: %- make-direct + :: %+ lump p.v + :: %- lobe-to-cage + :: %- ~(got by q.r) pat + :: == + :: :: + :: :: merge types + :: :: + :: ++ mate :: merge p,q + :: |= con=? :: %mate, %meld + :: |= [p=yaki q=yaki us=[ship desk] th=[ship desk]] + :: ^- (map path blob) + :: =+ r=(~(tap in (find-merge-points p q)) ~) + :: ?~ r + :: ~|(%mate-no-ancestor !!) + :: ?: =(1 (lent r)) + :: (meld p q i.r con us th) + :: ~|(%mate-criss-cross !!) + :: :: + :: ++ keep :: %this + :: |= [p=yaki q=yaki [ship desk] [ship desk]] + :: ^- (map path blob) + :: %+ roll (~(tap by q.p) ~) + :: |= [[pat=path lob=lobe] zar=(map path blob)] + :: ^- (map path blob) + :: (~(put by zar) pat (lobe-to-blob lob)) + :: :: + :: ++ drop :: %that + :: |= [p=yaki q=yaki r=[ship desk] s=[ship desk]] + :: ^- (map path blob) + :: (keep q p r s) + :: :: + :: ++ forge :: %forge + :: |= [p=yaki q=yaki s=[ship desk] t=[ship desk]] + :: ^- (map path blob) + :: =+ r=(~(tap in (find-merge-points p q)) ~) + :: ?~ r + :: ~|(%forge-no-ancestor !!) + :: %- |= [r=yaki lut=(map lobe blob) hat=(map tako yaki)] + :: =. lat lut + :: =. hut hat + :: (meld p q r & s t) :: fake merge + :: %+ roll t.r :: fake ancestor + :: |= [par=yaki [for=_i.r lut=_lat hat=_hut]] + :: =. lat lut + :: =+ ^= far + :: ^- (map path lobe) + :: %- ~(urn by (forge par for s t)) + :: |= [k=path v=blob] (blob-to-lobe v) + :: =+ u=(make-yaki [r.par r.for ~] far `@da`0) :: fake yaki + :: :- u + :: :_ (~(put by hat) r.u u) + :: =< - + :: %- update-lat + :: :_ ~ + :: %- ~(urn by q.u) + :: |= [path k=lobe] + :: (lobe-to-blob k) + :: :: + :: :: actual merge + :: :: + :: ++ merge + :: |= [us=[ship desk] th=[ship desk]] + :: |= [p=yaki q=yaki r=@da s=$+([yaki yaki [ship desk] [ship desk]] (map path blob))] + :: ^- [yaki (map path blob)] + :: =+ u=(s p q us th) + :: =+ ^= t + :: ^- (map path lobe) + :: %+ roll (~(tap by u) ~) + :: |= [[pat=path bar=blob] yeb=(map path lobe)] + :: (~(put by yeb) pat (blob-to-lobe bar)) + :: :_ u + :: (make-yaki [r.p r.q ~] t r) + :: :: + :: ++ strategy :: merge strategy + :: |= gem=?(%meld %mate %that %this) + :: ?- gem + :: %meld (mate %.y) + :: %mate (mate %.n) + :: %this keep + :: %that drop + :: == + :: :: + :: ++ construct-merge :: construct-merge:ze + :: |= [gem=germ who=ship des=desk sab=saba now=@da] :: construct merge + :: ^- (unit (unit mizu)) :::::: + :: =+ for=s.sab :: foreign dome + :: =+ mer=(merge [who des] [p.sab q.sab]) + :: ?- gem + :: %init :: force fine + :: ?. =(let 0) :: hell no + :: !! + :: =+ hot=(~(put by *(map aeon tako)) 1 (~(got by hit.for) let.for)) + :: [~ [~ [1 hot hut lat]]] :: trivial + :: %fine + :: =+ der=(~(got by hit.for) let.for) + :: =+ owr=(~(got by hit) let) + :: ?: =(der owr) + :: [~ ~] + :: ?: (~(has in (reachable-takos owr)) der) + :: [~ ~] + :: ?. (~(has in (reachable-takos der)) owr) + :: ~ :: not a fast forward + :: ~& [%merge-fine p.sab q.sab] + :: [~ [~ [+(let) (~(put by hit) +(let) der) hut lat]]] + :: ?(%mate %that %this %meld) + :: =+ foreign-head=(tako-to-yaki (~(got by hit.for) let.for)) + :: =+ our-head=(tako-to-yaki (~(got by hit) let)) + :: ?: =(r.foreign-head r.our-head) + :: [~ ~] :: up to date + :: ?: (~(has in (reachable-takos r.our-head)) r.foreign-head) + :: [~ ~] :: up to date + :: ?: ?& |(=(gem %mate) =(gem %meld)) + :: (~(has in (reachable-takos r.foreign-head)) r.our-head) + :: == + :: $(gem %fine) :: use fast forward + :: =+ gar=(mer our-head foreign-head now (strategy gem)) + :: =+ yak=-.gar + :: =+ hek=+.gar + :: =. lat -:(update-lat hek ~) :: add new blobs + :: =. hut (~(put by *(map tako yaki)) r.yak yak) + :: =. let +(let) + :: =. hit (~(put by *(map aeon tako)) let r.yak) + :: [~ [~ [let hit hut lat]]] + :: == :: ++ read :: read:ze |= mun=mood :: read at point @@ -1848,7 +1812,7 @@ |= [pat=path lob=lobe] =+ zat=(~(get by q) pat) ?~ zat %.n - =((lobe-to-noun u.zat) (lobe-to-noun lob)) + =((lobe-to-cage u.zat) (lobe-to-cage lob)) :: ++ edit :: edit:ze |= [wen=@da lem=nuri] :: edit @@ -1868,7 +1832,8 @@ hit (~(put by hit) +(let) r.yak) hut (~(put by hut) r.yak yak) == - +>.$(ank (checkout-ankh q.yak)) + +>.$ + :: +>.$(ank (checkout-ankh q.yak)) | +>.$(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let))) == -- @@ -1954,60 +1919,58 @@ =. +.^$ rm-r:(descend p.i.dyr) $(dyr t.dyr) :: - ++ drum :: apply effect - |= [pax=path mis=miso] :: XX unused (++dune) - ^+ +> - ?^ pax - update-hash:(ascend:$(pax t.pax, +> (descend i.pax)) i.pax ank) - ~| %clay-fail - ?- -.mis - %del - ?> &(?=(^ q.ank) =(q.u.q.ank p.mis)) - +>.$(p.ank (mix p.u.q.ank p.ank), q.ank ~) - :: - %ins - ?> ?=(~ q.ank) - =+ sam=(sham p.mis) - +>.$(p.ank (mix sam p.ank), q.ank [~ sam p.mis]) - :: - %dif - ?> ?=(^ q.ank) - =+ nex=(lump p.mis q.u.q.ank) - =+ sam=(sham nex) - +>.$(p.ank :(mix sam p.u.q.ank p.ank), q.ank [~ sam nex]) - == - :: - ++ dune :: apply - |- ^+ + :: XX unused (++durn) - ?~ myz + - => .(+ (drum p.i.myz q.i.myz)) - $(myz ?>(?=(^ myz) t.myz)) - :: - ++ durn :: apply forward - |= nyp=soba :: XX unused - ^+ +> - ?: =([0 0] p.nyp) - dune(myz q.nyp) - => ?: =(p.ank p.p.nyp) . - ~& [%durn-in-wrong p.ank p.p.nyp] - . - =. +> dune(myz q.nyp) - => ?: =(p.ank q.p.nyp) . - ~& [%durn-out-wrong p.ank q.p.nyp] - . - +> + ::++ drum :: apply effect + :: |= [pax=path mis=miso] :: XX unused (++dune) + :: ^+ +> + :: ?^ pax + :: update-hash:(ascend:$(pax t.pax, +> (descend i.pax)) i.pax ank) + :: ~| %clay-fail + :: ?- -.mis + :: %del + :: ?> &(?=(^ q.ank) =(q.u.q.ank p.mis)) + :: +>.$(p.ank (mix p.u.q.ank p.ank), q.ank ~) + :: :: + :: %ins + :: ?> ?=(~ q.ank) + :: =+ sam=(sham p.mis) + :: +>.$(p.ank (mix sam p.ank), q.ank [~ sam p.mis]) + :: :: + :: %dif + :: ?> ?=(^ q.ank) + :: =+ nex=(lump p.mis q.u.q.ank) + :: =+ sam=(sham nex) + :: +>.$(p.ank :(mix sam p.u.q.ank p.ank), q.ank [~ sam nex]) + :: == + :::: + ::++ dune :: apply + :: |- ^+ + :: XX unused (++durn) + :: ?~ myz + + :: => .(+ (drum p.i.myz q.i.myz)) + :: $(myz ?>(?=(^ myz) t.myz)) + :::: + ::++ durn :: apply forward + :: |= nyp=soba :: XX unused + :: ^+ +> + :: ?: =([0 0] p.nyp) + :: dune(myz q.nyp) + :: => ?: =(p.ank p.p.nyp) . + :: ~& [%durn-in-wrong p.ank p.p.nyp] + :: . + :: =. +> dune(myz q.nyp) + :: => ?: =(p.ank q.p.nyp) . + :: ~& [%durn-out-wrong p.ank q.p.nyp] + :: . + :: +> -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bF, filesystem interface :: :: ++ feel :: simple file write - |= [pax=path val=*] + |= [pax=path val=cage] ^- miso =+ dir=((hard arch) .^(%cy pax)) ?~ q.dir [%ins val] - :- %dif - ^- udon - [%a %a .^(%cx pax) val] + [%mut ((hard cage) .^(%cx pax)) val] :: ++ file :: simple file load |= pax=path @@ -2016,7 +1979,7 @@ ?~(q.dir ~ [~ .^(%cx pax)]) :: ++ foal :: high-level write - |= [pax=path val=*] + |= [pax=path val=cage] ^- toro ?> ?=([* * * *] pax) [i.t.pax [%& [*cart [[t.t.t.pax (feel pax val)] ~]]]] @@ -2025,7 +1988,7 @@ |= pax=path ^- toro ?> ?=([* * * *] pax) - [i.t.pax [%& [*cart [[t.t.t.pax [%del .^(%cx pax)]] ~]]]] + [i.t.pax [%& [*cart [[t.t.t.pax [%del %$ !>(.^(%cx pax))]] ~]]]] :: ++ furl :: unify changes |= [one=toro two=toro] @@ -2034,7 +1997,7 @@ ?> ?& =(p.one p.two) :: same path &(?=(& -.q.one) ?=(& -.q.two)) :: both deltas == - [p.one [%& [*cart (weld q.q.q.one q.q.q.two)]]] + [p.one [%& [*cart (weld q.p.q.one q.p.q.two)]]] :: ++ meat :: kite to .^ path |= kit=kite @@ -2756,6 +2719,9 @@ [%direct p=lobe q=cage] :: [%indirect p=lobe q=cage r=cage s=lobe] :: == :: +++ blub $% [%direct p=lobe q=cage] :: + [%indirect p=lobe q=cage r=cage s=lobe] :: + == :: ++ boat ,[(list slip) tart] :: user stage ++ boon :: fort output $% [%beer p=ship q=@uvG] :: gained ownership From d1b313d514f48b36a192815b09253d10cebaa3f2 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 13 Jan 2015 17:56:48 -0500 Subject: [PATCH 09/73] everything compiles --- arvo/clay.hoon | 281 ++++++++++++++++++++++++++++++++++--------------- arvo/zuse.hoon | 34 +++--- 2 files changed, 218 insertions(+), 97 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 9ba939333..4637590b9 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -5,7 +5,7 @@ => |% ++ bead ,[p=(set beam) q=cage] :: ford result ++ cult (map duct rove) :: subscriptions -++ dojo ,[p=cult q=(unit work) r=dome] :: domestic desk state +++ dojo ,[p=cult q=(unit dork) r=(unit pork) s=dome] :: domestic desk state ++ gift :: out result <-$ $% [%ergo p=@p q=@tas r=@ud] :: version update [%note p=@tD q=tank] :: debug message @@ -96,7 +96,8 @@ $: lim=@da :: complete to qyx=cult :: subscribers ref=(unit rind) :: outgoing requests - wok=(unit work) :: outstanding diffs + dok=(unit dork) :: outstanding diffs + pok=(unit pork) :: outstanding patches dom=dome :: revision state == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist @@ -114,10 +115,14 @@ ++ rove (each mood moot) :: stored request ++ rung $: rus=(map desk rede) :: neighbor desks == :: -++ work :: +++ dork :: diff work $: sot=(list ,[p=path q=misu]) :: lon=(list path) :: == :: +++ pork :: patch work + $: sot=(map path bulb) :: + lon=(list path) :: + == :: -- => :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 4cA, filesystem logic :: @@ -126,7 +131,7 @@ :: |% ++ de :: per desk - |= [now=@da hun=duct hez=(unit duct)] + |= [now=@da hen=duct hun=duct hez=(unit duct)] |= [[who=@p for=@p] syd=@ta rede ran=rang] =* red +<+>- =| yel=(list ,[p=duct q=gift]) @@ -198,7 +203,7 @@ %_(+> byn [[hen ~] byn]) :: ++ duce :: produce request - |= [hen=duct rov=rove] + |= rov=rove ^+ +> =. qyx (~(put by qyx) hen rov) ?~ ref @@ -217,24 +222,23 @@ == :: ++ ease :: release request - |= hen=duct - ^+ +> + ^+ . ?~ ref =+ rov=(~(got by qyx) hen) =. qyx (~(del by qyx) hen) (mabe rov (cury best hen)) =. qyx (~(del by qyx) hen) - |- ^+ +>+.$ + |- ^+ +.$ =+ nux=(~(get by fod.u.ref) hen) - ?~ nux +>+.$ - %= +>+.$ + ?~ nux +.$ + %= +.$ say [[hen [(scot %ud u.nux) ~] for [u.nux syd ~]] say] fod.u.ref (~(del by fod.u.ref) hen) bom.u.ref (~(del by bom.u.ref) u.nux) == :: ++ eave :: subscribe - |= [hen=duct rav=rave] + |= rav=rave ^+ +> ?- -.rav & @@ -243,7 +247,7 @@ !! =+ ver=(aver p.rav) ?~ ver - (duce hen rav) + (duce rav) ?~ u.ver (blub hen) (blab hen p.rav u.u.ver) @@ -252,7 +256,7 @@ =+ nab=(~(case-to-aeon ze lim dom ran) p.p.rav) ?~ nab ?> =(~ (~(case-to-aeon ze lim dom ran) q.p.rav)) - (duce hen (rive rav)) + (duce (rive rav)) =+ huy=(~(case-to-aeon ze lim dom ran) q.p.rav) ?: &(?=(^ huy) |((lth u.huy u.nab) &(=(0 u.huy) =(0 u.nab)))) (blub hen) @@ -267,22 +271,22 @@ (blub hen) =+ ^= ptr ^- case [%ud +(let.dom)] - (duce hen `rove`[%| ptr q.p.rav r.p.rav ear]) + (duce `rove`[%| ptr q.p.rav r.p.rav ear]) == :: ++ echa :: announce raw - |= [hen=duct wen=@da mer=mizu] + |= [wen=@da mer=mizu] ^+ +> %= +> - vag ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + vag vag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) ::yel [[hen %note '=' %leaf ~] yel] :: XX do better == :: ++ echo :: announce changes - |= [hen=duct wen=@da lem=nori] + |= [wen=@da lem=nori] ^+ +> %= +> - vag ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + vag vag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) yel =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] ?- -.lem @@ -302,17 +306,19 @@ |= [wen=@da lem=nori] ^+ +> ?: ?=(%| -.lem) - =+ axe=(~(edit ze lim dom ran) wen lem) + =+ [hat axe]=(~(edit ze lim dom ran) wen lem) =+ `[l=@da d=dome r=rang]`+<.axe - +>.$(dom d, ran r) :: XX checkout-ankh - ?. =(~ wok) + ?~ hat + +>.$(dom d, ran r) + (checkout-ankh(dom d, ran r) u.hat) + ?. =(~ dok) ~& %already-applying-changes !! =+ ^- lon=(list path) (murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ (some a)))) =+ ^- sot=(list ,[p=path q=misu]) %+ murn q.p.lem |=([a=path b=miso] ?:(?=(%mut -.b) ~ (some [a `misu`b]))) - =. wok `[sot lon] + =. dok `[sot lon] ?~ lon (apply-edit wen) =+ ^- los=(list ,[duct path note]) @@ -321,49 +327,133 @@ %_(+>.$ tag (welp los tag)) :: ++ silkify - |= [wen=@da a=path %mut b=cage c=cage] + |= [wen=@da pax=path %mut a=cage b=cage] ^- [duct path note] :+ hen - [%diffing (scot %p who) syd (scot %da wen) a] - [%f %exec who ~ %diff [%done ~ b] [%done ~ c]] + [%diffing (scot %p who) syd (scot %da wen) pax] + [%f %exec who ~ %diff [%done ~ a] [%done ~ b]] + :: + ++ patch + |= [pax=path bar=lobe] + ^- [duct path note] + :^ hen + [%patching (scot %p who) syd pax] + %f + :^ %exec who ~ + |- ^- silk + =+ bob=(~(got by lat.ran) bar) + ?- -.bob + %direct [%done ~ q.bob] + %indirect [%done ~ q.bob] + %delta [%pact $(bar q.bob) [%done ~ r.bob]] + == :: ++ apply-edit |= wen=@da ^+ +> - ?~ wok ~& %no-changes !! - ?^ lon.u.wok ~& %not-done-diffing !! - =+ axe=(~(edit ze lim dom ran) wen %& *cart sot.u.wok) + ?~ dok ~& %no-changes !! + ?^ lon.u.dok ~& %not-done-diffing !! + =+ [hat axe]=(~(edit ze lim dom ran) wen %& *cart sot.u.dok) =+ `[l=@da d=dome r=rang]`+<.axe - +>.$(dom d, ran r, wok ~) :: XX checkout-ankh + ?~ hat + +>.$(dom d, ran r, dok ~) + (checkout-ankh(dom d, ran r, dok ~) u.hat) + :: + ++ apply-patches + ^+ . + ?~ pok ~& %no-patches !! + ?^ lon.u.pok ~& %not-done-patching !! + =+ ank=(~(checkout-ankh ze lim dom ran) sot.u.pok) + +(ank.dom ank, dok ~) :: ++ take-diff |= [wen=@da pax=path res=(each bead (list tank))] ^+ +> - ?~ wok + ?~ dok ~& %clay-unexpected-made !! - ?. (lien lon.u.wok |=(path =(+< pax))) + ?. (lien lon.u.dok |=(path =(+< pax))) ~& %clay-strange-made !! ?: ?=(%| -.res) %_ +>.$ - wok ~ + dok ~ tag %- welp :_ tag ^- (list ,[duct path note]) - %+ murn lon.u.wok + %+ murn lon.u.dok |= a=path + ^- (unit ,[duct path note]) ?: =(pax a) ~ `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] :: yel [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] == - =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) - sot.u.wok [[pax %dif q.p.res] sot.u.wok] + =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) + sot.u.dok [[pax %dif q.p.res] sot.u.dok] == - ?~ lon.wok + ?~ lon.u.dok (apply-edit wen) +>.$ :: + ++ take-patch + |= [pax=path res=(each bead (list tank))] + ^+ +> + ?~ pok + ~& %clay-unexpected-made !! + ?. (lien lon.u.pok |=(path =(+< pax))) + ~& %clay-strange-made !! + ?: ?=(%| -.res) + %_ +>.$ + pok ~ + tag + %- welp :_ tag + ^- (list ,[duct path note]) + %+ murn lon.u.pok + |= a=path + ^- (unit ,[duct path note]) + ?: =(pax a) ~ + `[hen [%patching (scot %p who) syd a] %f %exec who ~] + :: + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] + == + =: lon.u.pok (skip lon.u.pok |=(path =(+< pax))) + sot.u.pok (~(put by sot.u.pok) pax %direct (mug q.p.res) q.p.res) + == + ?~ lon.u.pok + apply-patches + +>.$ + :: + ++ checkout-ankh + |= hat=(map path lobe) + ?. =(~ pok) + ~& %already-applying-patches !! + =+ ^- lon=(list path) + %+ murn (~(tap by hat)) + |= [a=path b=lobe] + =+ bob=(~(got by lat.ran) b) + ?.(?=(%delta -.bob) ~ (some a)) + =+ ^- sot=(map path bulb) + %- mo + ^- (list ,[path bulb]) + %+ murn (~(tap by hat)) + |= [a=path b=lobe] + ^- (unit ,[path bulb]) + =+ bob=(~(got by lat.ran) b) + ?:(?=(%delta -.bob) ~ `[a `bulb`bob]) + =. pok `[sot lon] + ?~ lon + apply-patches + =+ ^- los=(list ,[duct path note]) + %+ murn (~(tap by hat)) + |= [pax=path bar=lobe] + ^- (unit ,[duct path note]) + =+ bob=(~(got by lat.ran) bar) + ?. ?=(%delta -.bob) + ~ + `(patch pax bar) + %_(+>.$ tag (welp los tag)) + :: ++ edis :: apply subscription |= nak=nako ^+ +> @@ -382,12 +472,12 @@ == :: ++ exec :: change and update - |= [hen=duct wen=@da lem=nori] + |= [wen=@da lem=nori] ^+ +> - (echo:wake:(edit wen lem) hen wen lem) + (echo:wake:(edit wen lem) wen lem) :: ++ exem :: execute merge - |= [hen=duct wen=@da mer=mizu] :: aka direct change + |= [wen=@da mer=mizu] :: aka direct change ?. (gte p.mer let.dom) !! :: no =. +>.$ %= +>.$ hut.ran (~(uni by hut.r.mer) hut.ran) @@ -400,9 +490,7 @@ %- ~(got by hut.ran) %- ~(got by hit.dom) let.dom - =. ank.dom :: real checkout - (~(checkout-ankh ze lim dom ran) hed) - (echa:wake hen wen mer) :: notify or w/e + (echa:wake:(checkout-ankh hed)) :: ++ knit :: external change |= [inx=@ud rot=riot] @@ -473,7 +561,7 @@ [%| p.p.rav q.p.rav r.p.rav ~] :: ++ sync - |= [hen=duct her=@p sud=@tas rot=riot] + |= [her=@p sud=@tas rot=riot] ^+ +>.$ ?~ rot ~& "autosync from {} on {} to {} on {} stopped" @@ -493,12 +581,13 @@ =+ der=((hard dome) r.u.rot) =+ ^= lum ^- (unit (unit mizu)) - %^ ~(construct-merge ze now dom ran) - ?:(=(0 let.dom) %init %meld) - who - :+ syd - `saba`[her sud [0 let.der] der] - now + ~ + ::%^ ~(construct-merge ze now dom ran) + :: ?:(=(0 let.dom) %init %meld) + :: who + :::+ syd + :: `saba`[her sud [0 let.der] der] + ::now =. tag :_ tag :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/y @@ -572,14 +661,14 @@ -- :: ++ do - |= [now=@da [who=ship him=ship] syd=@tas ruf=raft] + |= [now=@da hen=duct [who=ship him=ship] syd=@tas ruf=raft] =+ ^= rug ^- rung =+ rug=(~(get by hoy.ruf) him) ?^(rug u.rug *rung) =+ ^= red ^- rede =+ yit=(~(get by rus.rug) syd) - ?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] ~ *dome]) - ((de now ~ ~) [who him] syd red ran.ruf) + ?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] ~ ~ *dome]) + ((de now hen ~ ~) [who him] syd red ran.ruf) :: ++ posh |= [him=ship syd=desk red=rede ruf=raft] @@ -590,7 +679,7 @@ ruf(hoy (~(put by hoy.ruf) him rug(rus (~(put by rus.rug) syd red)))) :: ++ un :: domestic ship - |= [who=@p now=@da ruf=raft] + |= [who=@p now=@da hen=duct ruf=raft] =+ ^= yar ^- room =+ yar=(~(get by fat.ruf) who) ?~(yar *room u.yar) @@ -600,7 +689,7 @@ |= [syd=@ta red=rede run=rang] %_ +> ran.ruf run - dos.yar (~(put by dos.yar) syd [qyx.red wok.red dom.red]) + dos.yar (~(put by dos.yar) syd [qyx.red dok.red pok.red dom.red]) == :: ++ wake @@ -617,7 +706,10 @@ =+ ^= saq ^- dojo =+ saq=(~(get by dos.yar) syd) ?~(saq *dojo u.saq) - ((de now hun.yar hez.yar) [who who] syd [now p.saq ~ r.saq q.saq] ran.ruf) + %^ (de now hen hun.yar hez.yar) + [who who] + syd + [[now p.saq ~ q.saq r.saq s.saq] ran.ruf] -- -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -671,9 +763,9 @@ =+ yar=(need (~(get by fat.ruf) p.q.hic)) [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))] =^ mos ruf - =+ une=(un p.q.hic now ruf) + =+ une=(un p.q.hic now hen ruf) =+ ^= zat - (exec:(di:wake:une q.q.hic) hen now r.q.hic) + (exec:(di:wake:une q.q.hic) now r.q.hic) =+ zot=abet.zat :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) @@ -686,9 +778,9 @@ =+ yar=(need (~(get by fat.ruf) p.q.hic)) [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))] =^ mos ruf - =+ une=(un p.q.hic now ruf) + =+ une=(un p.q.hic now hen ruf) =+ ^= zat - (exec:(di:wake:une q.q.hic) hen now r.q.hic) + (exec:(di:wake:une q.q.hic) now r.q.hic) =+ zot=abet:zat :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) @@ -697,9 +789,9 @@ :: %merg :: direct state up =^ mos ruf - =+ une=(un p.q.hic now ruf) + =+ une=(un p.q.hic now hen ruf) =+ ^= zat - (exem:(di:wake:une q.q.hic) hen now r.q.hic) + (exem:(di:wake:une q.q.hic) now r.q.hic) =+ zot=abet.zat :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) @@ -723,20 +815,20 @@ %warp =^ mos ruf ?: =(p.p.q.hic q.p.q.hic) - =+ une=(un p.p.q.hic now ruf) + =+ une=(un p.p.q.hic now hen ruf) =+ wex=(di:une p.q.q.hic) =+ ^= wao ?~ q.q.q.hic - (ease:wex hen) - (eave:wex hen u.q.q.q.hic) + ease:wex + (eave:wex u.q.q.q.hic) =+ ^= woo abet:wao [-.woo abet:(pish:une p.q.q.hic +.woo ran.wao)] - =+ wex=(do now p.q.hic p.q.q.hic ruf) + =+ wex=(do now hen p.q.hic p.q.q.hic ruf) =+ ^= woo ?~ q.q.q.hic - abet:(ease:wex hen) - abet:(eave:wex hen u.q.q.q.hic) + abet:ease:wex + abet:(eave:wex u.q.q.q.hic) [-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)] [mos ..^$] :: @@ -775,8 +867,8 @@ %. [u.run u.luk tyl] =< aver ?: got - (di:(un his now ruf) syd) - (do now [his his] syd ruf) + (di:(un his now ~ ruf) syd) + (do now ~ [his his] syd ruf) |=(a=(unit) (bind a |=(b=* [%noun b]))) :: ++ stay [%0 ruf] @@ -789,9 +881,9 @@ =* sud i.t.t.tea =+ her=(slav %p i.t.t.t.tea) =* syd i.t.t.t.t.tea - =+ une=(un our now ruf) + =+ une=(un our now hen ruf) =+ wex=(di:une syd) - =+ wao=(sync:wex hen her sud p.q.hin) + =+ wao=(sync:wex her sud p.q.hin) =+ woo=abet:wao [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] ?- -.+.q.hin @@ -799,16 +891,39 @@ [[[hen %slip %d %flog +.q.hin] ~] ..^$] :: %made - ?> ?=([%diffing @ @ @ *] tea) - =+ who=(slav %p i.t.tea) - =+ syd=(slav %tas i.t.t.tea) - =+ wen=(slav %da i.t.t.t.tea) - =^ mos ruf - =+ ^= zat - (take-diff:(di:wake:une syd) t.t.t.t.tea p.q.hin) - =+ zot=abet.zat - [-.zot abet:(pish:une syd +.zot ran.zat)] - [mos ..^$] + ?~ tea !! + ?+ -.tea !! + %diffing + ?> ?=([@ @ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =+ wen=(slav %da i.t.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-diff:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + [mos ..^$] + :: + %patching + ?> ?=([@ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =^ mos ruf + ?: (~(has by fat.ruf) who) + =+ une=(un who now hen ruf) + =+ ^= zat + (take-patch:(di:wake:une syd) t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + =+ zax=(do now hen [who who] syd ruf) + =+ ^= zat + (take-patch:zax t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot (posh who syd +.zot ruf)] + [mos ..^$] + == :: %waft ?> ?=([@ @ ~] tea) @@ -816,7 +931,7 @@ =+ inx=(need (slaw %ud i.t.tea)) =+ ^= zat =< wake - (knit:(do now p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)]) + (knit:(do now hen p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)]) =^ mos ruf =+ zot=abet.zat [-.zot (posh q.p.+.q.hin syd +.zot ruf)] @@ -827,7 +942,7 @@ =| mos=(list move) |- ^- [p=(list move) q=_..^^$] ?~ dal [mos ..^^$] - =+ une=(un i.dal now ruf) + =+ une=(un i.dal now hen ruf) =^ som une wake:une $(dal t.dal, ruf abet:une, mos (weld som mos)) :: diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 9de08ebb0..7abd6ebc2 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1083,6 +1083,11 @@ (sham [%lobe z]) [%delta has p q] :: + ++ bulb-to-cage + |= p=bulb + ^- cage + ?-(-.p %direct q.p, %indirect q.p) + :: ++ blob-to-cage |= p=blob :: ^- (each cage ,[cage this]) @@ -1256,7 +1261,8 @@ ^+ +> ?: =(let yon) +> ?: (gth yon let) !! :: don't have version - +>(ank (checkout-ankh q:(aeon-to-yaki yon)), let yon) + !! + :: +>(ank (checkout-ankh q:(aeon-to-yaki yon)), let yon) :: :::: ++ update-lat :: update-lat:ze @@ -1306,18 +1312,18 @@ %+ ~(put by bar) pat (make-delta p.u.ber p.mys) == + :: ++ checkout-ankh :: checkout-ankh:ze - |= hat=(map path lobe) :: checkout commit + |= hat=(map path bulb) :: checkout commit ^- ankh %- cosh %+ roll (~(tap by hat) ~) - |= [[pat=path bar=lobe] ank=ankh] + |= [[pat=path bar=bulb] ank=ankh] ^- ankh %- cosh ?~ pat - =+ zar=(lobe-to-cage bar) - ?> ?=(%& -.zar) - ank(q [~ (sham `cage`p.zar) p.zar]) + =+ zar=(bulb-to-cage bar) + ank(q [~ (sham `cage`zar) zar]) =+ nak=(~(get by r.ank) i.pat) %= ank r %+ ~(put by r.ank) i.pat @@ -1816,7 +1822,7 @@ :: ++ edit :: edit:ze |= [wen=@da lem=nuri] :: edit - ^+ +> + ^- [(unit (map path lobe)) _+>] ?- -.lem & =^ yak lat :: merge objects %+ forge-yaki wen @@ -1827,14 +1833,14 @@ !=((lent p.yak) 1) !(equiv q.yak q:(aeon-to-yaki let)) == - +>.$ :: silently ignore + `+>.$ :: silently ignore =: let +(let) hit (~(put by hit) +(let) r.yak) hut (~(put by hut) r.yak yak) == - +>.$ + [`q.yak +>.$] :: +>.$(ank (checkout-ankh q.yak)) - | +>.$(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let))) + | [~ +>.$(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let)))] == -- :: @@ -2719,9 +2725,6 @@ [%direct p=lobe q=cage] :: [%indirect p=lobe q=cage r=cage s=lobe] :: == :: -++ blub $% [%direct p=lobe q=cage] :: - [%indirect p=lobe q=cage r=cage s=lobe] :: - == :: ++ boat ,[(list slip) tart] :: user stage ++ boon :: fort output $% [%beer p=ship q=@uvG] :: gained ownership @@ -2737,6 +2740,9 @@ ++ bray ,[p=life q=(unit life) r=ship s=@da] :: our parent us now ++ brow ,[p=@da q=@tas] :: browser version ++ buck ,[p=mace q=will] :: all security data +++ bulb $% [%direct p=lobe q=cage] :: + [%indirect p=lobe q=cage r=cage s=lobe] :: + == :: ++ cake ,[p=sock q=skin r=@] :: top level packet ++ cape :: end-to-end result $? %good :: delivered @@ -3078,7 +3084,7 @@ ++ rant :: namespace binding $: p=[p=care q=case r=@tas] :: clade release book q=path :: spur - r=cage :: data + r=* :: data == :: ++ rave :: general request $% [& p=mood] :: single request From edfaa3ee5d2681b75db57680dc0efb437d2b3fef Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 13 Jan 2015 20:58:25 -0500 Subject: [PATCH 10/73] boots now (sort of) --- arvo/clay.hoon | 7 ++++++- arvo/zuse.hoon | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 4637590b9..0a52499d8 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -730,7 +730,11 @@ q.hic ^- kiss ?: ?=(%soft -.q.hic) - ((hard kiss) p.q.hic) + =+ ((soft kiss) p.q.hic) + ?~ - + ~& [%clay-bad-soft -.p.q.hic] + !! + u.- ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic ~& [%clay-call-flub (,@tas `*`-.q.hic)] ((hard kiss) q.hic) @@ -770,6 +774,7 @@ :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen])) + ~& %intoing [mos ..^$] :: ?(%ingo %invo) :: not yet used diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 7abd6ebc2..ee191ef66 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1024,7 +1024,7 @@ ^- soba :- [p.ank p.bus] %- flop - myz:(change-tree:(zu ank) %c bus) + myz:(change-tree:(zu ank) bus) :: ++ loth |= pat=(map path ,*) @@ -1892,7 +1892,7 @@ ?~(way +> $(way t.way, +> (descend i.way))) :: ++ overwrite :: write over - |= [pum=umph val=(unit ,[p=cash q=cage])] + |= val=(unit ,[p=cash q=cage]) ^+ +> ?~ q.ank ?~ val +> @@ -1903,9 +1903,9 @@ (push-change %mut q.u.q.ank q.u.val) :: ++ change-tree :: modify tree - |= [pum=umph bus=ankh] + |= bus=ankh ^+ +> - =. +> (overwrite pum q.bus) + =. +> (overwrite q.bus) =+ [yeg=(~(tap by r.ank) ~) gey=(~(tap by r.bus) ~)] =. +>.$ |- ^+ +>.^$ From 6742a73fcc290401c36f0baae03604f35bfe848a Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 14 Jan 2015 19:01:59 -0500 Subject: [PATCH 11/73] boots to terminal, then hangs --- arvo/clay.hoon | 25 ++++++++---------- arvo/ford.hoon | 6 ++--- arvo/zuse.hoon | 52 ++++++++++++++++++++++++------------- main/app/shell/core.hook | 4 +-- main/app/terminal/core.hook | 24 ++++++++--------- main/mar/hook/door.hook | 1 + 6 files changed, 63 insertions(+), 49 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0a52499d8..add00afb8 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -105,7 +105,7 @@ $: nix=@ud :: request index bom=(map ,@ud ,[p=duct q=rave]) :: outstanding fod=(map duct ,@ud) :: current requests - haw=(map mood (unit)) :: simple cache + haw=(map mood (unit cage)) :: simple cache == :: ++ room :: fs per ship $: hun=duct :: terminal duct @@ -164,7 +164,7 @@ :: ++ aver :: read |= mun=mood - ^- (unit (unit ,*)) + ^- (unit (unit cage)) ?: &(=(p.mun %u) !=(p.q.mun now)) :: prevent bad things ~& [%clay-fail p.q.mun %now now] !! @@ -189,14 +189,14 @@ %_(+> tag :_(tag [hen /tyme %t %rest tym])) :: ++ blab :: ship result - |= [hen=duct mun=mood dat=*] + |= [hen=duct mun=mood dat=cage] ^+ +> +>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn]) :: ++ bleb :: ship sequence |= [hen=duct ins=@ud hip=nako] ^+ +> - (blab hen [%w [%ud ins] ~] hip) + (blab hen [%w [%ud ins] ~] %nako !>(hip)) :: ++ blub :: ship stop |= hen=duct @@ -524,7 +524,7 @@ ?~ nex +>+.^$ ?~ u.nex +>+.^$ :: should never happen =. +>+.^$ - =+ roo=(edis ((hard nako) u.u.nex)) + =+ roo=(edis ((hard nako) q.q.u.u.nex)) ?>(?=(^ ref.roo) roo) %= $ haw.u.ref (~(del by haw.u.ref) nez) @@ -774,7 +774,6 @@ :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen])) - ~& %intoing [mos ..^$] :: ?(%ingo %invo) :: not yet used @@ -860,7 +859,7 @@ :: ++ scry :: inspect |= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path] - ^- (unit (unit (pair mark ,*))) + ^- (unit (unit cage)) =+ got=(~(has by fat.ruf) his) =+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot)) ?~ luk [~ ~] @@ -868,13 +867,11 @@ [~ ~] =+ run=((soft care) ren) ?~ run [~ ~] - %+ bind - %. [u.run u.luk tyl] - =< aver - ?: got - (di:(un his now ~ ruf) syd) - (do now ~ [his his] syd ruf) - |=(a=(unit) (bind a |=(b=* [%noun b]))) + %. [u.run u.luk tyl] + =< aver + ?: got + (di:(un his now ~ ruf) syd) + (do now ~ [his his] syd ruf) :: ++ stay [%0 ruf] ++ take :: accept response diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 3e145e508..564b30a1f 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -700,7 +700,7 @@ ^- (bolt beam) =+ von=(ska %cw (tope bem(s ~))) ?~ von [p=cof q=[%1 [%w bem ~] ~ ~]] - (fine cof bem(r [%ud ((hard ,@) (need u.von))])) + (fine cof bem(r [%ud ((hard ,@) +:(need u.von))])) :: ++ lave :: validate |= [cof=cafe for=mark his=ship som=*] @@ -725,7 +725,7 @@ ^- (bolt arch) =+ von=(ska %cy (tope bem)) ?~ von [p=cof q=[%1 [%y bem ~] ~ ~]] - (fine cof ((hard arch) (need u.von))) + (fine cof ((hard arch) +:(need u.von))) :: ++ liar :: load vase |= [cof=cafe bem=beam] @@ -735,7 +735,7 @@ [p=*cafe q=[%1 [[%x bem ~] ~ ~]]] ?~ u.von (flaw cof (smyt (tope bem)) ~) - (fine cof ?^(u.u.von [%cell %noun %noun] [%atom %$]) u.u.von) + (fine cof ((hard vase) u.u.von)) :: ++ lily :: translation targets |= [cof=cafe for=mark bek=beak] diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index ee191ef66..488197f90 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1247,22 +1247,31 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::: ++ query :: query:ze |= ren=?(%u %v %x %y %z) :: endpoint query - ^- (unit ,*) + ^- (unit cage) ?- ren - %u [~ `rang`+<+>.query] - %v [~ `dome`+<+<.query] + %u [~ %rang !>(`rang`+<+>.query)] + %v [~ %done !>(`dome`+<+<.query)] %x ?~(q.ank ~ [~ q.u.q.ank]) - %y [~ as-arch] - %z [~ ank] + %y [~ %arch !>(as-arch)] + %z [~ %ankh !>(ank)] == :: ++ rewind :: rewind:ze |= yon=aeon :: rewind to aeon - ^+ +> - ?: =(let yon) +> + ^- (unit ,_+>) + ?: =(let yon) `+> ?: (gth yon let) !! :: don't have version - !! - :: +>(ank (checkout-ankh q:(aeon-to-yaki yon)), let yon) + =+ hat=q:(aeon-to-yaki yon) + ?: (~(any by hat) |=(a=lobe ?=(%delta [-:(lobe-to-blob a)]))) + ~ + =+ ^- (map path bulb) + %- ~(run by hat) + |= a=lobe + ^- bulb + =+ (lobe-to-blob a) + ?< ?=(%delta -.-) + - + `+>.$(ank (checkout-ankh -), let yon) :: :::: ++ update-lat :: update-lat:ze @@ -1298,7 +1307,11 @@ %ins :: insert if not exist ?: (~(has by bar) pat) !! :: ?: (~(has by hat) pat) !! :: - (~(put by bar) pat (make-direct p.mys)) + %+ ~(put by bar) pat + %- make-direct + ?: &(?=(%mime -.p.mys) =([%hook ~] (slag (dec (lent pat)) pat))) + `cage`[%hook [%atom %t] +.+.q.q.p.mys] + p.mys %del :: delete if exists ?. |((~(has by hat) pat) (~(has by bar) pat)) !! (~(del by bar) pat) @@ -1786,25 +1799,28 @@ :: ++ read :: read:ze |= mun=mood :: read at point - ^- (unit) + ^- (unit cage) ?: ?=(%v p.mun) - [~ `dome`+<+<.read] + [~ %dome !>(`dome`+<+<.read)] ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) - ?^(r.mun ~ [~ let]) + ?^(r.mun ~ [~ %aeon !>(let)]) ?: ?=(%w p.mun) =+ ^= yak %- aeon-to-yaki let - ?^(r.mun ~ [~ [t.yak (forge-nori yak)]]) + ?^(r.mun ~ [~ %w !>([t.yak (forge-nori yak)])]) ::?> ?=(^ hit) ?^(r.mun ~ [~ i.hit]) :: what do?? need [@da nori] (query(ank ank:(descend-path:(zu ank) r.mun)) p.mun) :: ++ read-at-aeon :: read-at-aeon:ze |= [yon=aeon mun=mood] :: seek and read - ^- (unit) + ^- (unit cage) ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) :: NB only for speed - ?^(r.mun ~ [~ yon]) - (read:(rewind yon) mun) + ?^(r.mun ~ [~ %aeon !>(yon)]) + %+ biff + (rewind yon) + |= a=_+>.$ + (read:a mun) :: ++ equiv :: test paths |= [p=(map path lobe) q=(map path lobe)] @@ -3084,7 +3100,7 @@ ++ rant :: namespace binding $: p=[p=care q=case r=@tas] :: clade release book q=path :: spur - r=* :: data + r=cage :: data == :: ++ rave :: general request $% [& p=mood] :: single request diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index e3310b36b..120871489 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -236,7 +236,7 @@ %+ chew-file paf ?^ (file paf) ["! exists" ~] :- "written" - `(foal paf q:(exec (fall gen [%bczp atom/%t]))) + `(foal paf %$ (exec (fall gen [%bczp atom/%t]))) :: ++ eat-mut |= [paf=path gen=twig] @@ -245,7 +245,7 @@ %- blab %+ chew-file paf ?^ (file paf) ["! none" ~] - ["changed" `(foal paf q:(exec gen))] + ["changed" `(foal paf %$ (exec gen))] :: ++ eat-path |= paf=path diff --git a/main/app/terminal/core.hook b/main/app/terminal/core.hook index 319d82588..5572beab8 100644 --- a/main/app/terminal/core.hook +++ b/main/app/terminal/core.hook @@ -4,7 +4,7 @@ :: /? 314 :: need urbit 314 /- term-line, term-in, term-ctrl, kyev -/= stat /:/%%/:/hymn/ +::/= stat /:/%%/:/hymn/ :: :::: structures :: @@ -103,18 +103,18 @@ [(flop mow) (~(put by hiz) pax tel)] :: ++ page -:: ;html -:: ;head -:: ;title: Not yet -:: == -:: ;body; -:: == - %. stat - %+ inject - ~[%html %head] - ;= ;script: urb.appl = "{(trip app.hid)}" - ;script: urb.term = \{pax: "{(spud pax)}"} + ;html + ;head + ;title: Not yet + == + ;body; == +:: %. stat +:: %+ inject +:: ~[%html %head] +:: ;= ;script: urb.appl = "{(trip app.hid)}" +:: ;script: urb.term = \{pax: "{(spud pax)}"} +:: == :: ++ peer |= gal=glas diff --git a/main/mar/hook/door.hook b/main/mar/hook/door.hook index 9a8d48280..88789caa3 100644 --- a/main/mar/hook/door.hook +++ b/main/mar/hook/door.hook @@ -15,6 +15,7 @@ -- ++ grab |% :: convert from + ++ mime |=([p=mite q=octs] q.q) ++ noun ,@t :: clam from %noun ++ txt |= wan=wain From c31d9c6d3b6dcfa3a265cf401d6c208ec9beee56 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 14 Jan 2015 19:15:39 -0500 Subject: [PATCH 12/73] boots and accepts input --- arvo/gall.hoon | 2 +- main/app/shell/core.hook | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arvo/gall.hoon b/arvo/gall.hoon index db0b7c312..0308da4ae 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -954,7 +954,7 @@ :: %w :: autoboot ?> ?=([%drug @ @ ~] t.pax) - =+ :* sin=((hard ,[%c %writ p=riot]) q.hin) + =+ :* sin=((hard ,[%c %writ p=(unit)]) q.hin) our=(need (slaw %p i.t.t.pax)) syd=(need ((sand %tas) i.t.t.t.pax)) == diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index 120871489..4283fb3d3 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -258,7 +258,7 @@ ^+ +> :: =. +>.$ (blab (print leaf/"+ :{(trip p.mad)}")) ?: .= [0 0 0] - .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/app/[p.mad]) + +:[.^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/app/[p.mad])] (blab (print leaf/"{} does not exist")) =| inp=(unit span) =< +>.$ From 5b97583293764804122699bb56b7e534f18fc1c2 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 14 Jan 2015 19:43:39 -0500 Subject: [PATCH 13/73] self-perpetuation ftw --- arvo/hoon.hoon | 2 +- main/app/reload/core.hook | 2 +- main/app/solid/core.hook | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 50d50f44e..ae8af3d11 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -6005,7 +6005,7 @@ :: ++ reck :: parse hoon file |= bon=path - (rain bon ((hard ,@t) .^(%cx (weld bon `path`[%hoon ~])))) + (rain bon ((hard ,@t) +.+.+:.^(%cx (weld bon `path`[%hoon ~])))) :: ++ seed :: hoon/hoon core vase ^- vase diff --git a/main/app/reload/core.hook b/main/app/reload/core.hook index c82c17efa..4fa46fe5e 100644 --- a/main/app/reload/core.hook +++ b/main/app/reload/core.hook @@ -8,7 +8,7 @@ |= nam=@tas =+ tip=(end 3 1 nam) =+ pax=[(scot %p our.hid) %arvo (scot %da lat.hid) nam %hoon ~] - [ost %give %veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))] + [ost %give %veer ?:(=('z' tip) %$ tip) pax (,@ +.+.+:.^(%cx pax))] :- [ost %give %nice ~] %+ turn (~(tap by sup.hid)) |= [ost=bone *] diff --git a/main/app/solid/core.hook b/main/app/solid/core.hook index ddbc42ef0..dd86c0641 100644 --- a/main/app/solid/core.hook +++ b/main/app/solid/core.hook @@ -25,7 +25,7 @@ |- ^+ all ?~ vay all =+ pax=(weld top `path`[q.i.vay ~]) - =+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~]))) + =+ txt=((hard ,@) +.+.+:.^(%cx (weld pax `path`[%hoon ~]))) =+ sam=[lat.hid `ovum`[[%gold ~] [%veer p.i.vay pax txt]]] ~& [%solid-veer i.vay] =+ gat=.*(all .*(all [0 42])) From 38b289bad3a684f27073b579902c393df00f64a9 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 15 Jan 2015 15:57:13 -0500 Subject: [PATCH 14/73] waypoint --- arvo/clay.hoon | 16 ++++++++++------ arvo/zuse.hoon | 7 +++---- main/app/cat/core.hook | 4 ++-- main/app/ls/core.hook | 2 +- main/app/solid/core.hook | 12 ------------ main/mar/mime/door.hook | 10 ++++++++-- main/mar/txt/door.hook | 3 ++- 7 files changed, 26 insertions(+), 28 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index add00afb8..177b423bc 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -329,9 +329,12 @@ ++ silkify |= [wen=@da pax=path %mut a=cage b=cage] ^- [duct path note] + =+ =+ (slag (dec (lent pax)) pax) + =+ ?~(- %$ i.-) + [%cast - [%done ~ b]] :+ hen [%diffing (scot %p who) syd (scot %da wen) pax] - [%f %exec who ~ %diff [%done ~ a] [%done ~ b]] + [%f %exec who ~ %diff [%done ~ a] -] :: ++ patch |= [pax=path bar=lobe] @@ -364,15 +367,15 @@ ?~ pok ~& %no-patches !! ?^ lon.u.pok ~& %not-done-patching !! =+ ank=(~(checkout-ankh ze lim dom ran) sot.u.pok) - +(ank.dom ank, dok ~) + +(ank.dom ank, pok ~) :: ++ take-diff |= [wen=@da pax=path res=(each bead (list tank))] ^+ +> ?~ dok - ~& %clay-unexpected-made !! + ~& %clay-unexpected-made +>.$ ?. (lien lon.u.dok |=(path =(+< pax))) - ~& %clay-strange-made !! + ~& %clay-strange-made +>.$ ?: ?=(%| -.res) %_ +>.$ dok ~ @@ -426,8 +429,9 @@ :: ++ checkout-ankh |= hat=(map path lobe) - ?. =(~ pok) - ~& %already-applying-patches !! + ^+ +> + ::?. =(~ pok) + :: ~& %already-applying-patches +>.$ =+ ^- lon=(list path) %+ murn (~(tap by hat)) |= [a=path b=lobe] diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 488197f90..330e9527d 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1077,10 +1077,9 @@ |= [p=lobe q=cage] ^- blob =+ t=[%delta 0 p q] - =+ z=(blob-to-cage t) =+ ^= has - %^ cat 7 (sham [%blob z]) - (sham [%lobe z]) + %^ cat 7 (sham [%blob q.q.q]) + (sham [%lobe p]) [%delta has p q] :: ++ bulb-to-cage @@ -1336,7 +1335,7 @@ %- cosh ?~ pat =+ zar=(bulb-to-cage bar) - ank(q [~ (sham `cage`zar) zar]) + ank(q [~ (sham q.q.zar) zar]) =+ nak=(~(get by r.ank) i.pat) %= ank r %+ ~(put by r.ank) i.pat diff --git a/main/app/cat/core.hook b/main/app/cat/core.hook index 6c1aaa591..f476a5583 100644 --- a/main/app/cat/core.hook +++ b/main/app/cat/core.hook @@ -14,10 +14,10 @@ %- zing %+ turn arg |= pax=path - =+ ark=;;(arch .^(%cy pax)) + =+ ark=;;(arch +:.^(%cy pax)) ?~ q.ark ~[leaf/"file {} not available"] :- leaf/(spud pax) - %+ turn (lore ;;(,@t .^(%cx pax))) + %+ turn (lore ;;(,@t +:.^(%cx pax))) |= a=cord leaf/(trip a) == diff --git a/main/app/ls/core.hook b/main/app/ls/core.hook index a9f0f6f61..b4225101c 100644 --- a/main/app/ls/core.hook +++ b/main/app/ls/core.hook @@ -2,7 +2,7 @@ |_ [hid=hide ~] ++ poke-ls-args |= [ost=bone you=ship arg=path ~] - =+ lon=((hard arch) .^(%cy arg)) + =+ lon=((hard arch) +:.^(%cy arg)) :_ +>.$ :* [ost %pass / %g %cide %$] [ost %give %nice ~] diff --git a/main/app/solid/core.hook b/main/app/solid/core.hook index dd86c0641..bffc05aba 100644 --- a/main/app/solid/core.hook +++ b/main/app/solid/core.hook @@ -35,18 +35,6 @@ [ost %pass / %g %cide %$] [ost %give %nice ~] == -:: ~& %solid-jamming -:: =+ pac=(jam [ken all]) -:: ~& %solid-finished -:: =+ nax=/(scot %p our.hid)/try/(scot %da lat.hid)/urbit/pill -:: :* [ost %pass /cp %c %info our.hid (foal nax pac)] -:: [ost %give %nice ~] -:: %+ turn (~(tap by sup.hid)) -:: |= [ost=bone *] -:: :^ ost %give %rush -:: :- %tang :_ ~ -:: leaf/"done" -:: == ++ peer |= * diff --git a/main/mar/mime/door.hook b/main/mar/mime/door.hook index fbeae94d8..d7c54deac 100644 --- a/main/mar/mime/door.hook +++ b/main/mar/mime/door.hook @@ -2,9 +2,15 @@ :::: /hoon/core/mime/mar :: /? 314 -|_ own=[p=mite q=octs] +|_ own=mime ++ grab :: convert from |% - ++ noun ,[p=mite q=octs] :: clam from %noun + ++ noun mime :: clam from %noun + -- +++ grad + |% + ++ form %mime + ++ diff |=(mime +<) + ++ pact |=(mime +<) -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 1544895bb..054389260 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -1,4 +1,4 @@ -:: +:: maybe :::: /hook/door/term-line/mar :: /? 314 @@ -22,6 +22,7 @@ ++ diff |= tyt=wain ^- (urge cord) + =- ~& [%first (scag 1 txt) (scag 1 tyt)] - (lusk txt tyt (loss txt tyt)) ++ pact |= dif=(urge cord) From 782a416793e2447fb14705ed1bf102051903b4d2 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 16 Jan 2015 00:59:05 -0500 Subject: [PATCH 15/73] waypoint --- arvo/clay.hoon | 6 +----- arvo/ford.hoon | 29 +++++++++++++++-------------- arvo/hoon.hoon | 4 ++-- arvo/zuse.hoon | 2 ++ main/app/ls/subdir.hoon | 2 +- main/app/reboot/core.hook | 2 +- main/app/solid/core.hook | 2 +- 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 177b423bc..c71e4016a 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -734,11 +734,7 @@ q.hic ^- kiss ?: ?=(%soft -.q.hic) - =+ ((soft kiss) p.q.hic) - ?~ - - ~& [%clay-bad-soft -.p.q.hic] - !! - u.- + ~|([%bad-soft (,@t -.p.q.hic)] ((hard kiss) p.q.hic)) ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic ~& [%clay-call-flub (,@tas `*`-.q.hic)] ((hard kiss) q.hic) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 67c463995..0f5702f4e 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -192,7 +192,7 @@ == :: $: now=@da :: event date eny=@ :: unique entropy - ska=$+(* (unit (unit))) :: system namespace + ska=sled :: system namespace == :: mow=(list move) :: pending actions == :: @@ -480,7 +480,7 @@ :_ pax ?: &(=(p.bek our) =(q.bek %main)) bek =+ oak=[our %main %da now] - ?: ?=([~ ~ *] (ska %cy (tope [oak pax]))) + ?: ?=([~ ~ *] (ska ~ %cy [oak pax])) oak bek (cope (fade cof %hook bem) abut:(meow bem ~)) @@ -709,9 +709,10 @@ |= [cof=cafe bem=beam] ^- (bolt beam) ?: ?=(%ud -.r.bem) (fine cof bem) - =+ von=(ska %cw (tope bem(s ~))) + =+ von=(ska ~ %cw bem(s ~)) ?~ von [p=cof q=[%1 [%w bem ~] ~ ~]] - (fine cof bem(r [%ud ((hard ,@) +:(need u.von))])) + ~& `*`+.+.+:(need u.von) + (fine cof bem(r [%ud ((hard ,@) +.+.+:(need u.von))])) :: ++ lave :: validate |= [cof=cafe for=mark his=ship som=*] @@ -734,19 +735,19 @@ ++ lend :: load arch |= [cof=cafe bem=beam] ^- (bolt arch) - =+ von=(ska %cy (tope bem)) + =+ von=(ska ~ %cy bem) ?~ von [p=cof q=[%1 [%y bem ~] ~ ~]] - (fine cof ((hard arch) +:(need u.von))) + (fine cof ((hard arch) +.q.q:(need u.von))) :: ++ liar :: load vase |= [cof=cafe bem=beam] ^- (bolt vase) - =+ von=(ska %cx (tope bem)) + =+ von=(ska ~ %cx bem) ?~ von [p=*cafe q=[%1 [[%x bem ~] ~ ~]]] ?~ u.von (flaw cof (smyt (tope bem)) ~) - (fine cof ((hard vase) u.u.von)) + (fine cof (slot 3 q.u.u.von)) :: ++ lily :: translation targets |= [cof=cafe for=mark bek=beak] @@ -876,7 +877,7 @@ ^- (bolt vase) %+ cope (mail cof p.vax gen) |= [cof=cafe typ=type fol=nock] - %+ (coup cof) (mock [q.vax fol] (mole ska)) + %+ (coup cof) (mock [q.vax fol] (mole (slod ska))) |=(val=* `vase`[typ val]) :: ++ make :: reduce silk @@ -932,6 +933,8 @@ %+ cool |.(leaf/"ford: cast {}") %+ cope $(kas q.kas) |= [cof=cafe cay=cage] + ^- (bolt cage) + %+ cool |.(leaf/"ford: casting {} to {}") %+ cope (link cof p.kas p.cay [our %main %da now] q.cay) |= [cof=cafe vax=vase] (fine cof [p.kas vax]) @@ -988,7 +991,7 @@ ^- (bolt vase) %+ cope (malt cof p.gat p.sam) |= [cof=cafe typ=type] - %+ (coup cof) (mong [q.gat q.sam] (mole ska)) + %+ (coup cof) (mong [q.gat q.sam] (mole (slod ska))) |=(val=* `vase`[typ val]) :: ++ meow :: assemble @@ -1334,7 +1337,6 @@ |= [hen=duct hic=(hypo (hobo kiss))] ^- [p=(list move) q=_..^$] => .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss) p.q.hic))) - =+ ska=(slod ski) =+ ^= our ^- @p ?- -.q.hic %exec p.q.hic @@ -1343,7 +1345,7 @@ =+ buy=(~(get by pol.lex) our) ?~(buy *baby u.buy) =^ mos bay - abet:(~(apex za [[our hen] [now eny ska] ~] bay) q.q.hic) + abet:(~(apex za [[our hen] [now eny ski] ~] bay) q.q.hic) [mos ..^$(pol (~(put by pol) our bay))] :: ++ doze @@ -1379,7 +1381,6 @@ ++ take :: response |= [tea=wire hen=duct hin=(hypo sign)] ^- [p=(list move) q=_..^$] - =+ ska=(slod ski) ?> ?=([@ @ @ ~] tea) =+ :* our=(need (slaw %p i.tea)) num=(need (slaw %ud i.t.tea)) @@ -1387,6 +1388,6 @@ == =+ bay=(~(got by pol.lex) our) =^ mos bay - abet:(~(axon za [[our hen] [now eny ska] ~] bay) num tik q.hin) + abet:(~(axon za [[our hen] [now eny ski] ~] bay) num tik q.hin) [mos ..^$(pol (~(put by pol) our bay))] -- diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 71e2c8903..d55d772dd 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -6062,7 +6062,7 @@ :: ++ reck :: parse hoon file |= bon=path - (rain bon ((hard ,@t) +.+.+:.^(%cx (weld bon `path`[%hoon ~])))) + (rain bon ((hard ,@t) +:.^(%cx (weld bon `path`[%hoon ~])))) :: ++ seed :: hoon/hoon core vase ^- vase @@ -10005,7 +10005,7 @@ ?~ q.pro ~ ?~ +.q.pro [~ ~] =+ dat=(slot 7 pro) - [~ ~ (mark q.dat) (slot 3 dat)] + [~ ~ (mark -.q.dat) +.q.dat] :: ++ soar :: scrub vane |= sev=vase diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 5dad7f5a8..05fca4389 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1323,6 +1323,8 @@ %- make-direct ?: &(?=(%mime -.p.mys) =([%hook ~] (slag (dec (lent pat)) pat))) `cage`[%hook [%atom %t] +.+.q.q.p.mys] + ?: &(?=(%mime -.p.mys) =([%hoon ~] (slag (dec (lent pat)) pat))) + `cage`[%hoon [%atom %t] +.+.q.q.p.mys] p.mys %del :: delete if exists ?. |((~(has by hat) pat) (~(has by bar) pat)) !! diff --git a/main/app/ls/subdir.hoon b/main/app/ls/subdir.hoon index a665d47ba..449a6cc90 100644 --- a/main/app/ls/subdir.hoon +++ b/main/app/ls/subdir.hoon @@ -9,7 +9,7 @@ =- :+ %rose ["/" ~ ?:(dir "/" ~)] (turn paf |=(a=span leaf/(trip a))) |- ^- [dir=? paf=path] - =+ arf=;;(arch .^(%cy (weld pax paf))) + =+ arf=;;(arch +:.^(%cy (weld pax paf))) ?^ q.arf [| paf] ?~ r.arf diff --git a/main/app/reboot/core.hook b/main/app/reboot/core.hook index 167eec343..1a66cbab8 100644 --- a/main/app/reboot/core.hook +++ b/main/app/reboot/core.hook @@ -16,7 +16,7 @@ %- turn :_ |= [tip=@tasD nam=@tas] =+ pax=[(scot %p our.hid) %arvo (scot %da lat.hid) nam %hoon ~] - [%veer tip pax (,@ .^(%cx pax))] + [%veer tip pax (,@ +:.^(%cx pax))] %- flop ^- (list ,[p=@tas q=@tas]) :~ [%$ %zuse] diff --git a/main/app/solid/core.hook b/main/app/solid/core.hook index 8a11acee7..6ccf4adc5 100644 --- a/main/app/solid/core.hook +++ b/main/app/solid/core.hook @@ -28,7 +28,7 @@ |- ^+ all ?~ vay all =+ pax=(weld top `path`[q.i.vay ~]) - =+ txt=((hard ,@) +.+.+:.^(%cx (weld pax `path`[%hoon ~]))) + =+ txt=((hard ,@) +:.^(%cx (weld pax `path`[%hoon ~]))) =+ sam=[lat.hid `ovum`[[%gold ~] [%veer p.i.vay pax txt]]] ~& [%solid-veer i.vay] =+ gat=.*(all .*(all [0 42])) From 4466b6ff46dff4b9ac672e17a44de7e173c3b696 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 21 Jan 2015 20:47:49 -0500 Subject: [PATCH 16/73] boots again --- arvo/ames.hoon | 6 +- arvo/clay.hoon | 146 +++++++++++++++++++++++++++++++------- arvo/dill.hoon | 4 +- arvo/ford.hoon | 16 ++--- arvo/gall.hoon | 4 +- arvo/hoon.hoon | 20 +++--- main/app/cat/core.hook | 4 +- main/app/ls/core.hook | 2 +- main/app/ls/subdir.hoon | 2 +- main/app/reload/core.hook | 4 +- main/app/shell/core.hook | 2 +- main/app/solid/core.hook | 2 +- main/mar/css/door.hook | 7 +- main/mar/js/door.hook | 12 +++- main/mar/json/door.hook | 8 ++- main/mar/md/door.hook | 12 ++++ main/mar/txt/door.hook | 2 +- 17 files changed, 188 insertions(+), 65 deletions(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index 034f5bca6..1010a61d8 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -1625,7 +1625,7 @@ :: ++ scry |= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path] - ^- (unit (unit (pair mark ,*))) + ^- (unit (unit cage)) ?~ tyl [~ ~] =+ hun=(slaw %p i.tyl) ?~ hun [~ ~] @@ -1637,13 +1637,13 @@ [%$ %ud @] %+ bind (perm who u.hun q.p.lot [syd t.tyl]) - |=(a=* [%noun a]) + |=(a=* [%noun !>(a)]) :: [%$ %da @] ?. =(now q.p.lot) ~ %+ bind (temp who u.hun [syd t.tyl]) - |=(a=* [%noun a]) + |=(a=* [%noun !>(a)]) == :: ++ stay fox diff --git a/arvo/clay.hoon b/arvo/clay.hoon index c71e4016a..727164f98 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -16,7 +16,7 @@ [%info p=@p q=@tas r=nori] :: internal edit [%ingo p=@p q=@tas r=nori] :: internal noun edit [%init p=@p] :: report install - [%into p=@p q=@tas r=nori] :: external edit + [%into p=@p q=@tas r=ankh] :: external edit [%invo p=@p q=@tas r=nori] :: external noun edit [%merg p=@p q=@tas r=mizu] :: internal change [%plug p=@p q=@tas r=@p s=@tas] :: unset upstream @@ -36,6 +36,7 @@ == == :: $: %c :: to %clay $% [%font p=@p q=@tas r=@p s=@tas] :: + [%info p=@p q=@tas r=nori] :: internal edit [%merg p=@p q=@tas r=mizu] :: [%warp p=sock q=riff] :: == == :: @@ -313,28 +314,51 @@ (checkout-ankh(dom d, ran r) u.hat) ?. =(~ dok) ~& %already-applying-changes !! + =+ ^= sop + |= [a=path b=miso] + ^- ? + ?| ?=(%del -.b) + ?& ?=(%ins -.b) + ?=(%mime p.p.b) + =+ (slag (dec (lent a)) a) + ?| =([%hook ~] -) + =([%hoon ~] -) + == == == =+ ^- lon=(list path) - (murn q.p.lem |=([a=path b=miso] ?.(?=(%mut -.b) ~ (some a)))) + (murn q.p.lem |=([a=path b=miso] ?:((sop a b) ~ (some a)))) =+ ^- sot=(list ,[p=path q=misu]) %+ murn q.p.lem - |=([a=path b=miso] ?:(?=(%mut -.b) ~ (some [a `misu`b]))) + |=([a=path b=miso] ?.((sop a b) ~ (some [a ((hard misu) b)]))) =. dok `[sot lon] ?~ lon (apply-edit wen) =+ ^- los=(list ,[duct path note]) %+ murn q.p.lem - |=([a=path b=miso] ?.(?=(%mut -.b) ~ (some (silkify wen a b)))) + |=([a=path b=miso] ?:((sop a b) ~ (some (silkify wen a b)))) %_(+>.$ tag (welp los tag)) :: ++ silkify - |= [wen=@da pax=path %mut a=cage b=cage] + |= [wen=@da pax=path mis=miso] ^- [duct path note] - =+ =+ (slag (dec (lent pax)) pax) - =+ ?~(- %$ i.-) - [%cast - [%done ~ b]] - :+ hen - [%diffing (scot %p who) syd (scot %da wen) pax] - [%f %exec who ~ %diff [%done ~ a] -] + :- hen + ?+ -.mis !! + %mut + :- [%diffing (scot %p who) syd (scot %da wen) pax] + :^ %f %exec who :- ~ + ^- silk + =+ =+ (slag (dec (lent pax)) pax) + =+ ?~(- %$ i.-) + [%cast - [%done ~ q.mis]] + [%diff [%done ~ p.mis] -] + :: + %ins + :- [%casting (scot %p who) syd (scot %da wen) pax] + :^ %f %exec who :- ~ + ^- silk + =+ (slag (dec (lent pax)) pax) + =+ ?~(- %$ i.-) + [%cast - [%done ~ p.mis]] + == :: ++ patch |= [pax=path bar=lobe] @@ -369,6 +393,36 @@ =+ ank=(~(checkout-ankh ze lim dom ran) sot.u.pok) +(ank.dom ank, pok ~) :: + ++ take-cast + |= [wen=@da pax=path res=(each bead (list tank))] + ^+ +> + ?~ dok + ~& %clay-unexpected-made +>.$ + ?. (lien lon.u.dok |=(path =(+< pax))) + ~& %clay-strange-made +>.$ + ?: ?=(%| -.res) + %_ +>.$ + dok ~ + :: XX should be here + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.dok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] + :: + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] + == + =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) + sot.u.dok [[pax %ins q.p.res] sot.u.dok] + == + ?~ lon.u.dok + (apply-edit wen) + +>.$ + :: ++ take-diff |= [wen=@da pax=path res=(each bead (list tank))] ^+ +> @@ -741,16 +795,6 @@ == ^- [p=(list move) q=_..^$] ?- -.q.hic - %init - :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~])) - =+ bos=(sein p.q.hic) - ~& [%bos bos p.q.hic] - ?: =(bos p.q.hic) ~ - ^- (list move) - %+ turn (limo ~[%main %arvo %try]) - |= syd=@tas - [hen %pass / %c %font p.q.hic syd bos syd] - :: %font ?: (~(has by sor.ruf) +.q.hic) `..^$ :_ ..^$(sor.ruf (~(put by sor.ruf) +.q.hic hen)) @@ -761,11 +805,20 @@ == == :: - ?(%info %into) + %init + :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~])) + =+ bos=(sein p.q.hic) + ~& [%bos bos p.q.hic] + ?: =(bos p.q.hic) ~ + ^- (list move) + %+ turn (limo ~[%main %arvo %try]) + |= syd=@tas + [hen %pass / %c %font p.q.hic syd bos syd] + :: + %info + ~& [%infoing p.q.hic q.q.hic ?.(?=(%& -.r.q.hic) ~ (lent q.p.r.q.hic))] ?: =(%$ q.q.hic) - ?. ?=(%into -.q.hic) [~ ..^$] - =+ yar=(need (~(get by fat.ruf) p.q.hic)) - [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))] + [~ ..^$] =^ mos ruf =+ une=(un p.q.hic now hen ruf) =+ ^= zat @@ -773,8 +826,36 @@ =+ zot=abet.zat :- -.zot =. une (pish:une q.q.hic +.zot ran.zat) - abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen])) + abet:une [mos ..^$] + :: + %into + ~& [%intoing p.q.hic q.q.hic] + =+ yar=(~(got by fat.ruf) p.q.hic) + :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen]))) + ^- (list move) + ?: =(%$ q.q.hic) + ~& %blipping + ~ + =+ dos=(~(get by dos.yar) q.q.hic) + ?: &(?=(^ dos) !=(0 +>-.+>+.+.dos)) :: ank.s.u.dos + ?: =(ank.s.u.dos q.q.hic) + ~ + [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.s.u.dos)]~ + ~& [%first-timer p.q.hic q.q.hic] + =+ cos=(cost r.q.hic *ankh) + =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] + %+ skid q.cos + |= [a=path b=miso] + ?& ?=(%ins -.b) + ?=(%mime p.p.b) + =+ (slag (dec (lent a)) a) + ?| =([%hook ~] -) + =([%hoon ~] -) + == == + :~ [hen %slip %c %info p.q.hic q.q.hic %& p.cos one] + [hen %slip %c %info p.q.hic q.q.hic %& p.cos two] + == :: ?(%ingo %invo) :: not yet used ?: =(%$ q.q.hic) @@ -895,6 +976,19 @@ %made ?~ tea !! ?+ -.tea !! + %casting + ?> ?=([@ @ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =+ wen=(slav %da i.t.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-cast:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + [mos ..^$] + :: %diffing ?> ?=([@ @ @ *] t.tea) =+ who=(slav %p i.t.tea) diff --git a/arvo/dill.hoon b/arvo/dill.hoon index cf5c95535..9d8d3822e 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -742,8 +742,8 @@ :: ++ scry |= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path] - ^- (unit (unit (pair mark ,*))) - [~ ~ [%tank >dug<]] + ^- (unit (unit cage)) + [~ ~ [%tank !>(>dug<)]] :: ++ stay [%1 our def dug] ++ take :: process move diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 0f5702f4e..e9b117119 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -711,8 +711,8 @@ ?: ?=(%ud -.r.bem) (fine cof bem) =+ von=(ska ~ %cw bem(s ~)) ?~ von [p=cof q=[%1 [%w bem ~] ~ ~]] - ~& `*`+.+.+:(need u.von) - (fine cof bem(r [%ud ((hard ,@) +.+.+:(need u.von))])) + ~& `*`+.+:(need u.von) + (fine cof bem(r [%ud ((hard ,@) +.+:(need u.von))])) :: ++ lave :: validate |= [cof=cafe for=mark his=ship som=*] @@ -737,7 +737,7 @@ ^- (bolt arch) =+ von=(ska ~ %cy bem) ?~ von [p=cof q=[%1 [%y bem ~] ~ ~]] - (fine cof ((hard arch) +.q.q:(need u.von))) + (fine cof ((hard arch) q.q:(need u.von))) :: ++ liar :: load vase |= [cof=cafe bem=beam] @@ -746,8 +746,8 @@ ?~ von [p=*cafe q=[%1 [[%x bem ~] ~ ~]]] ?~ u.von - (flaw cof (smyt (tope bem)) ~) - (fine cof (slot 3 q.u.u.von)) + (flaw cof leaf/"file unavailable" (smyt (tope bem)) ~) + (fine cof q.u.u.von) :: ++ lily :: translation targets |= [cof=cafe for=mark bek=beak] @@ -794,7 +794,7 @@ |= [cof=cafe vux=(unit vase)] ?^ vux (fine cof u.vux) ?~ s.mob - (flaw cof (smyt (tope bem)) ~) + (flaw cof leaf/"beam unavailable" (smyt (tope bem)) ~) ^$(s.mob t.s.mob, mer [i.s.mob mer]) :: ++ link :: translate @@ -902,7 +902,7 @@ %+ cope (lima cof p.kas q.kas r.kas) |= [cof=cafe vux=(unit vase)] ?~ vux - (flaw cof (smyt (tope q.kas)) ~) + (flaw cof leaf/"bake failed" (smyt (tope q.kas)) ~) (fine cof [p.kas u.vux]) :: %boil @@ -1372,7 +1372,7 @@ :: ++ scry |= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path] - ^- (unit (unit (pair mark ,*))) + ^- (unit (unit cage)) [~ ~] :: ++ stay :: save w/o cache diff --git a/arvo/gall.hoon b/arvo/gall.hoon index cd5e33f1a..7ac2624ab 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -287,7 +287,7 @@ lot=coin tyl=path == - ^- (unit (unit (pair mark ,*))) + ^- (unit (unit cage)) =+ ^= vew ^- lens :: XX future scry %. :- use :- [who syd ((hard case) p.lot)] @@ -305,7 +305,7 @@ %y y.vew %z z.vew == - |=(a=(unit) (bind a |=(b=* [%noun b]))) + |=(a=(unit) (bind a |=(b=* [%noun !>(b)]))) :: ++ doze |= [now=@da hen=duct] diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index d55d772dd..6a0725923 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -6062,7 +6062,7 @@ :: ++ reck :: parse hoon file |= bon=path - (rain bon ((hard ,@t) +:.^(%cx (weld bon `path`[%hoon ~])))) + (rain bon ((hard ,@t) .^(%cx (weld bon `path`[%hoon ~])))) :: ++ seed :: hoon/hoon core vase ^- vase @@ -9794,6 +9794,8 @@ ++ ship ,@p :: network identity ++ sled $+ [(unit (set monk)) term beam] :: namespace function (unit (unit cage)) :: +++ slad $+ [(unit (set monk)) term beam] :: undertyped + (unit (unit (cask ,*))) :: ++ slut $+(* (unit (unit))) :: old namespace ++ vile :: reflexive constants $: typ=type :: -:!>(*type) @@ -9804,7 +9806,7 @@ ++ wire path :: event pretext ::::: hacks ++ slod - |= sed=sled + |= sed=slad ^- slut |= raw=* =+ pux=((soft path) raw) @@ -9825,7 +9827,7 @@ =+ bop=(sed ~ ron bed) ?~ bop ~ ?~ u.bop [~ ~] - [~ ~ q.q.u.u.bop] + [~ ~ +.q.u.u.bop] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bE, Arvo core :: :: @@ -9843,7 +9845,7 @@ +>.$(q.sew (slam (slap syg [%cnzy %load]) (slap rig [%cnzy %stay]))) :: ++ wink :: deploy - |= [now=@da eny=@ ski=sled] + |= [now=@da eny=@ ski=slad] =+ rig=(slym q.sew +<) :: activate vane ~% %wink +>+> ~ |% @@ -9990,7 +9992,7 @@ ren=care bed=beam == - ^- (unit (unit cage)) + ^- (unit (unit (cask ,*))) :: ~& [%arvo-scry ren bed] =+ ^= old :* fur @@ -10000,7 +10002,7 @@ `coin`[%$ r.bed] (flop s.bed) == - ^- (unit (unit cage)) + ^- (unit (unit (cask ,*))) =+ pro=(slym (slap rig [%cnzy %scry]) old) ?~ q.pro ~ ?~ +.q.pro [~ ~] @@ -10065,13 +10067,13 @@ |= [vil=vile eny=@ bud=vase niz=(pair worm (list ,[p=@tas q=vase]))] |_ now=@da ++ beck - ^- sled + ^- slad |= [fur=(unit (set monk)) ron=term bed=beam] - ^- (unit (unit cage)) + ^- (unit (unit (cask ,*))) => .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous =+ lal=(end 3 1 ron) =+ ren=(care (rsh 3 1 ron)) - |- ^- (unit (unit cage)) + |- ^- (unit (unit (cask ,*))) ?~ q.niz ~ ?. =(lal p.i.q.niz) $(q.niz t.q.niz) %- scry:(wink:(vent lal vil bud p.niz q.i.q.niz) now (shax now) ..^$) diff --git a/main/app/cat/core.hook b/main/app/cat/core.hook index d08d38e4e..51cd5a617 100644 --- a/main/app/cat/core.hook +++ b/main/app/cat/core.hook @@ -16,10 +16,10 @@ %+ turn arg |= pax=path ^- (list tank) - =+ ark=;;(arch +:.^(%cy pax)) + =+ ark=;;(arch .^(%cy pax)) ?^ q.ark :- leaf/(spud pax) - %+ turn (lore ;;(@t +:.^(%cx pax))) + %+ turn (lore ;;(@t .^(%cx pax))) |=(a=cord leaf/(trip a)) ?- r.ark :: handle ambiguity ~ diff --git a/main/app/ls/core.hook b/main/app/ls/core.hook index 38522d52f..9a47fa0d2 100644 --- a/main/app/ls/core.hook +++ b/main/app/ls/core.hook @@ -12,6 +12,6 @@ ++ poke-ls-args %+ args-into-gate . |= [arg=path ~] - =+ lon=((hard arch) +:.^(%cy arg)) + =+ lon=((hard arch) .^(%cy arg)) tang/[?~(r.lon leaf/"~" (subdir arg r.lon))]~ -- diff --git a/main/app/ls/subdir.hoon b/main/app/ls/subdir.hoon index 449a6cc90..a665d47ba 100644 --- a/main/app/ls/subdir.hoon +++ b/main/app/ls/subdir.hoon @@ -9,7 +9,7 @@ =- :+ %rose ["/" ~ ?:(dir "/" ~)] (turn paf |=(a=span leaf/(trip a))) |- ^- [dir=? paf=path] - =+ arf=;;(arch +:.^(%cy (weld pax paf))) + =+ arf=;;(arch .^(%cy (weld pax paf))) ?^ q.arf [| paf] ?~ r.arf diff --git a/main/app/reload/core.hook b/main/app/reload/core.hook index 6e646eaa6..bb76d9945 100644 --- a/main/app/reload/core.hook +++ b/main/app/reload/core.hook @@ -14,7 +14,7 @@ %+ args-into-resp . |= all=(list ,@tas) %+ turn (flop all) - =+ ark=(arch +:.^(%cy /(scot %p our.hid)/arvo/(scot %da lat.hid))) + =+ ark=(arch .^(%cy /(scot %p our.hid)/arvo/(scot %da lat.hid))) =+ van=(~(tap by r.ark)) |= nam=@tas =. nam @@ -26,5 +26,5 @@ `term`p.i.zaz =+ tip=(end 3 1 nam) =+ pax=[(scot %p our.hid) %arvo (scot %da lat.hid) nam %hoon ~] - [%veer ?:(=('z' tip) %$ tip) pax (,@ +:.^(%cx pax))] + [%veer ?:(=('z' tip) %$ tip) pax (,@ .^(%cx pax))] -- diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index e61f9ecd8..6e3c96f58 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -272,7 +272,7 @@ ^+ +> :: =. +>.$ (blab (print leaf/"+ :{(trip p.mad)}")) ?. =- (~(has by r:(arch -)) %core) - +:.^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/app/[p.mad]) + .^(%cy /(scot %p our.hid)/main/(scot %da lat.hid)/app/[p.mad]) (blab (print leaf/"app {} does not exist")) =| inp=(unit span) =< +>.$ diff --git a/main/app/solid/core.hook b/main/app/solid/core.hook index 6ccf4adc5..54e355070 100644 --- a/main/app/solid/core.hook +++ b/main/app/solid/core.hook @@ -28,7 +28,7 @@ |- ^+ all ?~ vay all =+ pax=(weld top `path`[q.i.vay ~]) - =+ txt=((hard ,@) +:.^(%cx (weld pax `path`[%hoon ~]))) + =+ txt=((hard ,@) .^(%cx (weld pax `path`[%hoon ~]))) =+ sam=[lat.hid `ovum`[[%gold ~] [%veer p.i.vay pax txt]]] ~& [%solid-veer i.vay] =+ gat=.*(all .*(all [0 42])) diff --git a/main/mar/css/door.hook b/main/mar/css/door.hook index 149e621ba..cf2792a7a 100644 --- a/main/mar/css/door.hook +++ b/main/mar/css/door.hook @@ -11,4 +11,9 @@ -- ++ grab |% :: convert from ++ noun ,@t :: clam from %noun --- -- + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/js/door.hook b/main/mar/js/door.hook index 1b9c8f19f..3c11cd08c 100644 --- a/main/mar/js/door.hook +++ b/main/mar/js/door.hook @@ -9,6 +9,12 @@ == ++ hymn ;html:(head:"+{psal}" body) -- -++ grab |% :: convert from - ++ noun cord :: clam from %noun --- -- +++ grab + |% :: convert from + ++ noun cord :: clam from %noun + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/json/door.hook b/main/mar/json/door.hook index 212b8fa74..60d0115af 100644 --- a/main/mar/json/door.hook +++ b/main/mar/json/door.hook @@ -14,5 +14,9 @@ -- ++ grab |% :: convert from ++ noun json :: clam from %noun --- -- - + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/md/door.hook b/main/mar/md/door.hook index dab26d9dd..50516fdc1 100644 --- a/main/mar/md/door.hook +++ b/main/mar/md/door.hook @@ -4,4 +4,16 @@ /? 314 |_ mud=@t ++ garb [%down ~] +++ grow + |% + ++ mime [/text/x-markdown (taco mud)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + -- +++ grad + |% + ++ sted %mime + -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 054389260..494adb54b 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -1,4 +1,4 @@ -:: maybe +:: maybz :::: /hook/door/term-line/mar :: /? 314 From 6aa9e8bc0f209a14bea7c802632959ce58dc8713 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 22 Jan 2015 19:28:32 -0500 Subject: [PATCH 17/73] syncs in from unix --- arvo/clay.hoon | 40 ++++++++++++++++++---------------------- arvo/ford.hoon | 1 - main/app/into/core.hook | 2 +- main/mar/css/door.hook | 8 +++++--- main/mar/js/door.hook | 15 +++++++++------ main/mar/json/door.hook | 8 +++++--- main/mar/txt/door.hook | 8 ++++---- 7 files changed, 42 insertions(+), 40 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 727164f98..b58c980ab 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -433,14 +433,14 @@ ?: ?=(%| -.res) %_ +>.$ dok ~ - tag - %- welp :_ tag - ^- (list ,[duct path note]) - %+ murn lon.u.dok - |= a=path - ^- (unit ,[duct path note]) - ?: =(pax a) ~ - `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.dok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] :: yel [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] @@ -456,20 +456,20 @@ |= [pax=path res=(each bead (list tank))] ^+ +> ?~ pok - ~& %clay-unexpected-made !! + ~& %clay-patch-unexpected-made +> ?. (lien lon.u.pok |=(path =(+< pax))) - ~& %clay-strange-made !! + ~& %clay-patch-strange-made +> ?: ?=(%| -.res) %_ +>.$ pok ~ - tag - %- welp :_ tag - ^- (list ,[duct path note]) - %+ murn lon.u.pok - |= a=path - ^- (unit ,[duct path note]) - ?: =(pax a) ~ - `[hen [%patching (scot %p who) syd a] %f %exec who ~] + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.pok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%patching (scot %p who) syd a] %f %exec who ~] :: yel [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] @@ -816,7 +816,6 @@ [hen %pass / %c %font p.q.hic syd bos syd] :: %info - ~& [%infoing p.q.hic q.q.hic ?.(?=(%& -.r.q.hic) ~ (lent q.p.r.q.hic))] ?: =(%$ q.q.hic) [~ ..^$] =^ mos ruf @@ -830,19 +829,16 @@ [mos ..^$] :: %into - ~& [%intoing p.q.hic q.q.hic] =+ yar=(~(got by fat.ruf) p.q.hic) :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen]))) ^- (list move) ?: =(%$ q.q.hic) - ~& %blipping ~ =+ dos=(~(get by dos.yar) q.q.hic) ?: &(?=(^ dos) !=(0 +>-.+>+.+.dos)) :: ank.s.u.dos ?: =(ank.s.u.dos q.q.hic) ~ [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.s.u.dos)]~ - ~& [%first-timer p.q.hic q.q.hic] =+ cos=(cost r.q.hic *ankh) =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] %+ skid q.cos diff --git a/arvo/ford.hoon b/arvo/ford.hoon index e9b117119..b005ae474 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -711,7 +711,6 @@ ?: ?=(%ud -.r.bem) (fine cof bem) =+ von=(ska ~ %cw bem(s ~)) ?~ von [p=cof q=[%1 [%w bem ~] ~ ~]] - ~& `*`+.+:(need u.von) (fine cof bem(r [%ud ((hard ,@) +.+:(need u.von))])) :: ++ lave :: validate diff --git a/main/app/into/core.hook b/main/app/into/core.hook index 25f92812d..f0c87422e 100644 --- a/main/app/into/core.hook +++ b/main/app/into/core.hook @@ -4,7 +4,7 @@ |_ [hid=hide ~] ++ peer ,_`. ++ poke-into-args - |= [ost=bone you=ship pax=path dat=@ ~] + |= [ost=bone you=ship pax=path dat=cage ~] :_ +>.$ :* [ost %pass /into %c %info our.hid (foal pax dat)] [ost %pass / %g %cide %$] diff --git a/main/mar/css/door.hook b/main/mar/css/door.hook index cf2792a7a..ecf3f0fb0 100644 --- a/main/mar/css/door.hook +++ b/main/mar/css/door.hook @@ -9,9 +9,11 @@ == ++ hymn ;html:(head:"{psal}" body) -- -++ grab |% :: convert from - ++ noun ,@t :: clam from %noun - -- +++ grab + |% :: convert from + ++ mime |=([p=mite q=octs] (,@t q.q)) + ++ noun ,@t :: clam from %noun + -- ++ grad |% ++ sted %mime diff --git a/main/mar/js/door.hook b/main/mar/js/door.hook index 3c11cd08c..9a49f2dcb 100644 --- a/main/mar/js/door.hook +++ b/main/mar/js/door.hook @@ -1,16 +1,19 @@ :: :::: /hoon/core/js/mar :: -|_ mud=@t +!: +|_ mud=@ ++ grow - |% ++ mime [/application/javascript (taco mud)] - ++ psal ;script - ;- (trip mud) - == - ++ hymn ;html:(head:"+{psal}" body) + |% + ++ mime [/application/javascript (taco (,@t mud))] + ++ psal ;script + ;- (trip (,@t mud)) + == + ++ hymn ;html:(head:"+{psal}" body) -- ++ grab |% :: convert from + ++ mime |=([p=mite q=octs] (,@t q.q)) ++ noun cord :: clam from %noun -- ++ grad diff --git a/main/mar/json/door.hook b/main/mar/json/door.hook index 60d0115af..6e157f997 100644 --- a/main/mar/json/door.hook +++ b/main/mar/json/door.hook @@ -12,9 +12,11 @@ ++ mime :: convert to %mime [/text/json (taco (crip (pojo jon)))] -- -++ grab |% :: convert from - ++ noun json :: clam from %noun - -- +++ grab + |% :: convert from + ++ mime |=([p=mite q=octs] *json) ::(fall (rush (,@t q.q) apex:poja) *json)) + ++ noun json :: clam from %noun + -- ++ grad |% ++ sted %mime diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 494adb54b..7deb77c64 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -1,4 +1,4 @@ -:: maybz +:: maybe :::: /hook/door/term-line/mar :: /? 314 @@ -12,9 +12,10 @@ ++ json :(corl lore need so:jo) -- ++ grow + => v=. |% - ++ mime [/text/plain (taco (role txt))] - ++ psal ;div: {(trip (role txt))} + ++ mime => v [/text/plain (taco (role txt))] + ++ psal => v ;div: {(trip (role txt))} -- ++ grad |% @@ -22,7 +23,6 @@ ++ diff |= tyt=wain ^- (urge cord) - =- ~& [%first (scag 1 txt) (scag 1 tyt)] - (lusk txt tyt (loss txt tyt)) ++ pact |= dif=(urge cord) From f7626f1fea8fcb72a431e0d2e6d03470b60a13df Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 22 Jan 2015 19:33:14 -0500 Subject: [PATCH 18/73] extra marks --- main/mar/eot/door.hook | 23 +++++++++++++++++++++++ main/mar/hoon/door.hook | 31 +++++++++++++++++++++++++++++++ main/mar/otf/door.hook | 23 +++++++++++++++++++++++ main/mar/styl/door.hook | 19 +++++++++++++++++++ main/mar/txt-diff/door.hook | 11 +++++++++++ main/mar/woff/door.hook | 23 +++++++++++++++++++++++ 6 files changed, 130 insertions(+) create mode 100644 main/mar/eot/door.hook create mode 100644 main/mar/hoon/door.hook create mode 100644 main/mar/otf/door.hook create mode 100644 main/mar/styl/door.hook create mode 100644 main/mar/txt-diff/door.hook create mode 100644 main/mar/woff/door.hook diff --git a/main/mar/eot/door.hook b/main/mar/eot/door.hook new file mode 100644 index 000000000..8e851ef87 --- /dev/null +++ b/main/mar/eot/door.hook @@ -0,0 +1,23 @@ +:: probly +:::: /hoon/core/eot/pro + :: +/? 314 + :: +:::: compute + :: +|_ otf=@ +:: +++ grow :: convert to + |% + ++ mime :: convert to %mime + [/font/eot (taco otf)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/hoon/door.hook b/main/mar/hoon/door.hook new file mode 100644 index 000000000..46a6f0283 --- /dev/null +++ b/main/mar/hoon/door.hook @@ -0,0 +1,31 @@ +:: +:::: /hook/door/hook/mar + :: +/? 314 +!: +|_ own=@t +:: +++ grow :: convert to + |% + ++ mime [/text/hoon (taco own)] :: convert to %mime + ++ psal ;div:(pre:"{(trip own)}") :: convert to %html + ++ hymn ;html:(head:title:"Source" "+{psal}") + ++ txt + (lore (cat 3 own '\0a')) + -- +++ grab + => v=. + |% :: convert from + ++ mime => v |=([p=mite q=octs] q.q) + ++ noun => v ,@t :: clam from %noun + ++ txt => v + |= wan=wain + ^- @t + =+ (role wan) + (end 3 (dec (met 3 -)) -) + -- +++ grad + |% + ++ sted %txt + -- +-- diff --git a/main/mar/otf/door.hook b/main/mar/otf/door.hook new file mode 100644 index 000000000..90da852db --- /dev/null +++ b/main/mar/otf/door.hook @@ -0,0 +1,23 @@ +:: +:::: /hoon/core/otf/pro + :: +/? 314 + :: +:::: compute + :: +|_ otf=@ +:: +++ grow :: convert to + |% + ++ mime :: convert to %mime + [/font/otf (taco otf)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/styl/door.hook b/main/mar/styl/door.hook new file mode 100644 index 000000000..c6c11d9be --- /dev/null +++ b/main/mar/styl/door.hook @@ -0,0 +1,19 @@ +:: +:::: /hoon/core/md/pro + :: +/? 314 +|_ mud=@t +++ garb [%down ~] +++ grow + |% + ++ mime [/text/styl (taco mud)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + -- +++ grad + |% + ++ sted %mime + -- +-- diff --git a/main/mar/txt-diff/door.hook b/main/mar/txt-diff/door.hook new file mode 100644 index 000000000..ee94a8e97 --- /dev/null +++ b/main/mar/txt-diff/door.hook @@ -0,0 +1,11 @@ +:: +:::: /hook/door/term-line/mar + :: +/? 314 +|_ txt-diff=(urge cord) +:: +++ grab :: convert from + |% + ++ noun ,(urge cord) :: clam from %noun + -- +-- diff --git a/main/mar/woff/door.hook b/main/mar/woff/door.hook new file mode 100644 index 000000000..43cc4c585 --- /dev/null +++ b/main/mar/woff/door.hook @@ -0,0 +1,23 @@ +:: +:::: /hoon/core/otf/pro + :: +/? 314 + :: +:::: compute + :: +|_ otf=@ +:: +++ grow :: convert to + |% + ++ mime :: convert to %mime + [/application/font-woff (taco otf)] + -- +++ grab + |% + ++ mime |=([p=mite q=octs] q.q) + -- +++ grad + |% + ++ sted %mime + -- +-- From 95c206465cb3564c3e0866c92b0f705776c63b4f Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 23 Jan 2015 14:36:36 -0500 Subject: [PATCH 19/73] optimizations --- arvo/clay.hoon | 12 +++++++----- arvo/ford.hoon | 2 ++ main/mar/txt/door.hook | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index b58c980ab..2d04ebed4 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -311,7 +311,7 @@ =+ `[l=@da d=dome r=rang]`+<.axe ?~ hat +>.$(dom d, ran r) - (checkout-ankh(dom d, ran r) u.hat) + (echo:(checkout-ankh(dom d, ran r) u.hat) wen lem) ?. =(~ dok) ~& %already-applying-changes !! =+ ^= sop @@ -383,8 +383,8 @@ =+ [hat axe]=(~(edit ze lim dom ran) wen %& *cart sot.u.dok) =+ `[l=@da d=dome r=rang]`+<.axe ?~ hat - +>.$(dom d, ran r, dok ~) - (checkout-ankh(dom d, ran r, dok ~) u.hat) + (echo(dom d, ran r, dok ~) wen %& *cart sot.u.dok) + (echo:(checkout-ankh(dom d, ran r, dok ~) u.hat) wen %& *cart sot.u.dok) :: ++ apply-patches ^+ . @@ -446,7 +446,9 @@ [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] == =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) - sot.u.dok [[pax %dif q.p.res] sot.u.dok] + sot.u.dok ?: =(%null p.q.p.res) + sot.u.dok + [[pax %dif q.p.res] sot.u.dok] == ?~ lon.u.dok (apply-edit wen) @@ -532,7 +534,7 @@ ++ exec :: change and update |= [wen=@da lem=nori] ^+ +> - (echo:wake:(edit wen lem) wen lem) + wake:(edit wen lem) :: ++ exem :: execute merge |= [wen=@da mer=mizu] :: aka direct change diff --git a/arvo/ford.hoon b/arvo/ford.hoon index b005ae474..e2221e7a2 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -398,6 +398,8 @@ ?. =(p.cay p.coy) %+ flaw cof :_ ~ leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}" + ?: =(q.q.cay q.q.coy) + (fine cof %null [%atom %n] ~) %+ cope (fang cof p.cay [our %main %da now]) |= [cof=cafe pro=vase] ?. (slab %grad p.pro) diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 7deb77c64..d34475f6d 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -1,4 +1,4 @@ -:: maybe +:: maybze :::: /hook/door/term-line/mar :: /? 314 From ab5723ce36e2fd8f98ca9bf37fef28255a92cc6b Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 23 Jan 2015 19:13:29 -0500 Subject: [PATCH 20/73] start in/out split --- arvo/clay.hoon | 6 +++++- main/mar/txt/door.hook | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 2d04ebed4..6954aa287 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -790,7 +790,11 @@ q.hic ^- kiss ?: ?=(%soft -.q.hic) - ~|([%bad-soft (,@t -.p.q.hic)] ((hard kiss) p.q.hic)) + =+ + ~|([%bad-soft (,@t -.p.q.hic)] ((soft kiss) p.q.hic)) + ?~ - + ~& [%bad-softing (,@t -.p.q.hic)] !! + u.- ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic ~& [%clay-call-flub (,@tas `*`-.q.hic)] ((hard kiss) q.hic) diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index d34475f6d..c8ee2c38d 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -1,4 +1,4 @@ -:: maybze +:: maybeze :::: /hook/door/term-line/mar :: /? 314 From 829411ed7490a4838a5fb98742a0f96b4ddaad50 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 27 Jan 2015 19:57:24 -0500 Subject: [PATCH 21/73] waypoint --- arvo/clay.hoon | 104 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 90 insertions(+), 14 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 6954aa287..0e1560a02 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -5,9 +5,15 @@ => |% ++ bead ,[p=(set beam) q=cage] :: ford result ++ cult (map duct rove) :: subscriptions -++ dojo ,[p=cult q=(unit dork) r=(unit pork) s=dome] :: domestic desk state +++ dojo :: domestic desk state + $: qyx=cult :: subscribers + dom=dome :: desk data + dok=(unit dork) :: outstanding diffs + pok=(unit pork) :: outstanding patches + wok=(unit work) :: outstanding ergos + == :: ++ gift :: out result <-$ - $% [%ergo p=@p q=@tas r=@ud] :: version update + $% [%ergo p=@p q=@tas r=@ud s=(list ,[path mime])] :: version update [%note p=@tD q=tank] :: debug message [%writ p=riot] :: response == :: @@ -97,9 +103,10 @@ $: lim=@da :: complete to qyx=cult :: subscribers ref=(unit rind) :: outgoing requests + dom=dome :: revision state dok=(unit dork) :: outstanding diffs pok=(unit pork) :: outstanding patches - dom=dome :: revision state + wok=(unit work) :: outstanding ergos == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist ++ rind :: request manager @@ -124,6 +131,10 @@ $: sot=(map path bulb) :: lon=(list path) :: == :: +++ work :: + $: sot=(list ,[p=path q=mime]) :: + lon=(list path) :: + == :: -- => :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 4cA, filesystem logic :: @@ -279,16 +290,15 @@ |= [wen=@da mer=mizu] ^+ +> %= +> - vag vag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) - ::yel [[hen %note '=' %leaf ~] yel] :: XX do better + vag ~& %merge-announce vag + :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + :: yel [[hen %note '=' %leaf ~] yel] :: XX do better == :: ++ echo :: announce changes |= [wen=@da lem=nori] ^+ +> - %= +> - vag vag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) - yel + =. yel =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] ?- -.lem | :_ yel @@ -301,6 +311,23 @@ ?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';') [%leaf (spud (weld pre p.i.q.p.lem))] == + ?~ hez +>.$ + ?. ?=(%& -.lem) +>.$ + ?~ q.p.lem + apply-ergo(wok [~ ~ ~]) + %_ +>.$ + tag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + %- welp :_ tag + %+ turn `(list ,[path miso])`q.p.lem + |= [a=path *] + :+ u.hez + [%ergoing (scot %p who) syd a] + :* %f %exec who ~ %cast %mime %done ~ + ~|(%bad-echo (need (~(read ze lim dom ran) %x [%ud let.dom] a))) + == + :: + wok + [~ ~ (turn `(list ,[path miso])`q.p.lem |=([a=path *] a))] == :: ++ edit :: apply changes @@ -386,6 +413,13 @@ (echo(dom d, ran r, dok ~) wen %& *cart sot.u.dok) (echo:(checkout-ankh(dom d, ran r, dok ~) u.hat) wen %& *cart sot.u.dok) :: + ++ apply-ergo + ^+ . + ?~ wok ~& %no-ergos !! + ?^ lon.u.wok ~& %not-done-ergoing !! + ?~ hez ~& %no-sync-duct !! + .(wok ~, vag :_(vag [u.hez %ergo who syd let.dom sot.u.wok])) + :: ++ apply-patches ^+ . ?~ pok ~& %no-patches !! @@ -483,6 +517,35 @@ apply-patches +>.$ :: + ++ take-ergo + |= [pax=path res=(each bead (list tank))] + ^+ +> + ?~ wok + ~& %clay-ergo-unexpected-made +> + ?. (lien lon.u.wok |=(path =(+< pax))) + ~& %clay-ergo-strange-made +> + ?: ?=(%| -.res) + %_ +>.$ + wok ~ + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.wok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%ergoing (scot %p who) syd a] %f %exec who ~] + :: + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] + == + =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) + sot.u.wok [[pax ((hard mime) q.q.q.p.res)] sot.u.wok] + == + ?~ lon.u.wok + apply-ergo + +>.$ + :: ++ checkout-ankh |= hat=(map path lobe) ^+ +> @@ -727,7 +790,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 hen ~ ~) [who him] syd red ran.ruf) :: ++ posh @@ -748,8 +811,9 @@ ++ pish |= [syd=@ta red=rede run=rang] %_ +> - ran.ruf run - dos.yar (~(put by dos.yar) syd [qyx.red dok.red pok.red dom.red]) + ran.ruf run + dos.yar + (~(put by dos.yar) syd [qyx.red dom.red dok.red pok.red wok.red]) == :: ++ wake @@ -769,7 +833,7 @@ %^ (de now hen hun.yar hez.yar) [who who] syd - [[now p.saq ~ q.saq r.saq s.saq] ran.ruf] + [[now qyx.saq ~ dom.saq dok.saq pok.saq wok.saq] ran.ruf] -- -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -842,9 +906,9 @@ ~ =+ dos=(~(get by dos.yar) q.q.hic) ?: &(?=(^ dos) !=(0 +>-.+>+.+.dos)) :: ank.s.u.dos - ?: =(ank.s.u.dos q.q.hic) + ?: =(ank.dom.u.dos q.q.hic) ~ - [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.s.u.dos)]~ + [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.dom.u.dos)]~ =+ cos=(cost r.q.hic *ankh) =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] %+ skid q.cos @@ -1021,6 +1085,18 @@ =+ zot=abet.zat [-.zot (posh who syd +.zot ruf)] [mos ..^$] + :: + %ergoing + ?> ?=([@ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-ergo:(di:wake:une syd) t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + [mos ..^$] == :: %waft From abb97d78d659562a2cbee48b6ef09f22070bb914 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 28 Jan 2015 20:28:10 -0500 Subject: [PATCH 22/73] waypoint --- arvo/clay.hoon | 52 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0e1560a02..620411e0d 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -126,6 +126,7 @@ ++ dork :: diff work $: sot=(list ,[p=path q=misu]) :: lon=(list path) :: + mim=(map path mime) :: == :: ++ pork :: patch work $: sot=(map path bulb) :: @@ -296,7 +297,7 @@ == :: ++ echo :: announce changes - |= [wen=@da lem=nori] + |= [wen=@da mim=(map path mime) lem=nori] ^+ +> =. yel =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] @@ -313,21 +314,31 @@ == ?~ hez +>.$ ?. ?=(%& -.lem) +>.$ - ?~ q.p.lem - apply-ergo(wok [~ ~ ~]) + =+ ^= ceq + |= a=miso + |(&(?=(%ins -.a) ?=(%mime -.+.a)) &(?=(%mut -.a) ?=(%mime -.+>.a))) + =. wok + :+ ~ + (~(tap by mim)) + %+ murn `(list ,[path miso])`q.p.lem + |=([a=path b=miso] ?:((ceq b) ~ (some a))) + ?> ?=(^ wok) + ?~ lon.u.wok + apply-ergo %_ +>.$ tag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) %- welp :_ tag - %+ turn `(list ,[path miso])`q.p.lem - |= [a=path *] + ^- (list ,[duct path note]) + %+ murn `(list ,[path miso])`q.p.lem + |= [a=path b=miso] + ?: (ceq b) + ~ + %- some :+ u.hez [%ergoing (scot %p who) syd a] :* %f %exec who ~ %cast %mime %done ~ ~|(%bad-echo (need (~(read ze lim dom ran) %x [%ud let.dom] a))) == - :: - wok - [~ ~ (turn `(list ,[path miso])`q.p.lem |=([a=path *] a))] == :: ++ edit :: apply changes @@ -338,7 +349,7 @@ =+ `[l=@da d=dome r=rang]`+<.axe ?~ hat +>.$(dom d, ran r) - (echo:(checkout-ankh(dom d, ran r) u.hat) wen lem) + (echo:(checkout-ankh(dom d, ran r) u.hat) wen ~ lem) ?. =(~ dok) ~& %already-applying-changes !! =+ ^= sop @@ -356,7 +367,18 @@ =+ ^- sot=(list ,[p=path q=misu]) %+ murn q.p.lem |=([a=path b=miso] ?.((sop a b) ~ (some [a ((hard misu) b)]))) - =. dok `[sot lon] + =+ ^- mim=(map path mime) + %- mo + ^- (list ,[path mime]) + %+ murn q.p.lem + |= [a=path b=miso] + ?- -.b + %del ~ + %ins ?.(?=(%mime p.p.b) ~ (some a ((hard mime) q.q.p.b))) + %dif ~ + %mut ?.(?=(%mime p.q.b) ~ (some a ((hard mime) q.q.q.b))) + == + =. dok `[sot lon mim] ?~ lon (apply-edit wen) =+ ^- los=(list ,[duct path note]) @@ -410,10 +432,14 @@ =+ [hat axe]=(~(edit ze lim dom ran) wen %& *cart sot.u.dok) =+ `[l=@da d=dome r=rang]`+<.axe ?~ hat - (echo(dom d, ran r, dok ~) wen %& *cart sot.u.dok) - (echo:(checkout-ankh(dom d, ran r, dok ~) u.hat) wen %& *cart sot.u.dok) + (echo(dom d, ran r, dok ~) wen mim.u.dok %& *cart sot.u.dok) + %^ echo:(checkout-ankh(dom d, ran r, dok ~) u.hat) + wen + mim.u.dok + [%& *cart sot.u.dok] :: ++ apply-ergo + ~& %apply-ergoing ^+ . ?~ wok ~& %no-ergos !! ?^ lon.u.wok ~& %not-done-ergoing !! @@ -905,7 +931,7 @@ ?: =(%$ q.q.hic) ~ =+ dos=(~(get by dos.yar) q.q.hic) - ?: &(?=(^ dos) !=(0 +>-.+>+.+.dos)) :: ank.s.u.dos + ?: &(?=(^ dos) !=(0 +>-.+<.+.dos)) :: ank.s.u.dos ?: =(ank.dom.u.dos q.q.hic) ~ [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.dom.u.dos)]~ From 381a0761bc8b49f695bebfc8dd5de48442ed8819 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 29 Jan 2015 14:47:51 -0500 Subject: [PATCH 23/73] working in/out --- arvo/clay.hoon | 15 ++++++++------- try/readme.md | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 620411e0d..0aeb3ae08 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -149,7 +149,7 @@ =* red +<+>- =| yel=(list ,[p=duct q=gift]) =| byn=(list ,[p=duct q=riot]) - =| vag=(list ,[p=duct q=gift]) + =| reg=(list ,[p=duct q=gift]) =| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]]) =| tag=(list ,[p=duct q=path r=note]) |% @@ -163,7 +163,7 @@ %+ turn (flop byn) |=([a=duct b=riot] [a %give [%writ b]]) :: - %+ turn (flop vag) + %+ turn (flop reg) |=([a=duct b=gift] [a %give b]) :: %+ turn (flop say) @@ -291,8 +291,8 @@ |= [wen=@da mer=mizu] ^+ +> %= +> - vag ~& %merge-announce vag - :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + reg ~& %merge-announce reg + :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) :: yel [[hen %note '=' %leaf ~] yel] :: XX do better == :: @@ -319,14 +319,15 @@ |(&(?=(%ins -.a) ?=(%mime -.+.a)) &(?=(%mut -.a) ?=(%mime -.+>.a))) =. wok :+ ~ - (~(tap by mim)) + %+ murn `(list ,[path miso])`q.p.lem + |=([a=path *] (bind (~(get by mim) a) |=(b=mime [a b]))) %+ murn `(list ,[path miso])`q.p.lem |=([a=path b=miso] ?:((ceq b) ~ (some a))) ?> ?=(^ wok) ?~ lon.u.wok apply-ergo %_ +>.$ - tag :: ?~(hez vag :_(vag [u.hez [%ergo who syd let.dom]])) + tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) %- welp :_ tag ^- (list ,[duct path note]) %+ murn `(list ,[path miso])`q.p.lem @@ -444,7 +445,7 @@ ?~ wok ~& %no-ergos !! ?^ lon.u.wok ~& %not-done-ergoing !! ?~ hez ~& %no-sync-duct !! - .(wok ~, vag :_(vag [u.hez %ergo who syd let.dom sot.u.wok])) + .(wok ~, reg :_(reg [u.hez %ergo who syd let.dom sot.u.wok])) :: ++ apply-patches ^+ . diff --git a/try/readme.md b/try/readme.md index fe6f61a36..947838894 100644 --- a/try/readme.md +++ b/try/readme.md @@ -1,3 +1,3 @@ /=main=/try/ -This is the try desk. Feel free to try out whatever you want here. \ No newline at end of file +yeehaw This is the try desk. Feel free to try out whatever you want here. From 15d18285677373df5ac321d16fed289597651ede Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 29 Jan 2015 20:06:02 -0500 Subject: [PATCH 24/73] waypoint --- arvo/clay.hoon | 22 ++++++++++++++++------ try/readme.md | 4 +++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0aeb3ae08..acc49afc4 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -13,10 +13,15 @@ wok=(unit work) :: outstanding ergos == :: ++ gift :: out result <-$ - $% [%ergo p=@p q=@tas r=@ud s=(list ,[path mime])] :: version update + $% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])] + :: version update [%note p=@tD q=tank] :: debug message [%writ p=riot] :: response == :: +++ khan :: + $: fil=(unit cage) :: + dir=(map ,@ta khan) :: + == :: ++ kiss :: in request ->$ $% [%font p=@p q=@tas r=@p s=@tas] :: set upstream [%info p=@p q=@tas r=nori] :: internal edit @@ -133,7 +138,7 @@ lon=(list path) :: == :: ++ work :: - $: sot=(list ,[p=path q=mime]) :: + $: sot=(list ,[p=path q=(unit mime)]) :: lon=(list path) :: == :: -- => @@ -316,11 +321,16 @@ ?. ?=(%& -.lem) +>.$ =+ ^= ceq |= a=miso - |(&(?=(%ins -.a) ?=(%mime -.+.a)) &(?=(%mut -.a) ?=(%mime -.+>.a))) + ?| ?=(%del -.a) + &(?=(%ins -.a) ?=(%mime -.+.a)) + &(?=(%mut -.a) ?=(%mime -.+>.a)) + == =. wok :+ ~ %+ murn `(list ,[path miso])`q.p.lem - |=([a=path *] (bind (~(get by mim) a) |=(b=mime [a b]))) + |= [a=path b=miso] + ?: ?=(%del -.b) (some a ~) + (bind (~(get by mim) a) |=(c=mime [a (some c)])) %+ murn `(list ,[path miso])`q.p.lem |=([a=path b=miso] ?:((ceq b) ~ (some a))) ?> ?=(^ wok) @@ -392,7 +402,7 @@ ^- [duct path note] :- hen ?+ -.mis !! - %mut + %mut :- [%diffing (scot %p who) syd (scot %da wen) pax] :^ %f %exec who :- ~ ^- silk @@ -567,7 +577,7 @@ [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] == =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) - sot.u.wok [[pax ((hard mime) q.q.q.p.res)] sot.u.wok] + sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok] == ?~ lon.u.wok apply-ergo diff --git a/try/readme.md b/try/readme.md index 947838894..6f710d5f5 100644 --- a/try/readme.md +++ b/try/readme.md @@ -1,3 +1,5 @@ /=main=/try/ -yeehaw This is the try desk. Feel free to try out whatever you want here. +This is the try desk. Feel free to try out whatever you want here. + +yeehaw From 73f286afb1b3f691706fb2791558fd147956f4d9 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 30 Jan 2015 19:40:07 -0500 Subject: [PATCH 25/73] deletion works --- arvo/clay.hoon | 73 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index acc49afc4..3ba555622 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -19,16 +19,14 @@ [%writ p=riot] :: response == :: ++ khan :: - $: fil=(unit cage) :: + $: fil=(unit (unit cage)) :: dir=(map ,@ta khan) :: == :: ++ kiss :: in request ->$ $% [%font p=@p q=@tas r=@p s=@tas] :: set upstream [%info p=@p q=@tas r=nori] :: internal edit - [%ingo p=@p q=@tas r=nori] :: internal noun edit [%init p=@p] :: report install - [%into p=@p q=@tas r=ankh] :: external edit - [%invo p=@p q=@tas r=nori] :: external noun edit + [%into p=@p q=@tas r=khan] :: external edit [%merg p=@p q=@tas r=mizu] :: internal change [%plug p=@p q=@tas r=@p s=@tas] :: unset upstream [%wart p=sock q=@tas r=path s=*] :: network request @@ -945,8 +943,11 @@ ?: &(?=(^ dos) !=(0 +>-.+<.+.dos)) :: ank.s.u.dos ?: =(ank.dom.u.dos q.q.hic) ~ - [hen %slip %c %info p.q.hic q.q.hic %& (cost r.q.hic ank.dom.u.dos)]~ - =+ cos=(cost r.q.hic *ankh) + :_ ~ + :* hen %slip %c %info p.q.hic q.q.hic %& + (khan-to-soba `ank.dom.u.dos `r.q.hic) + == + =+ cos=(khan-to-soba ~ `r.q.hic) =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] %+ skid q.cos |= [a=path b=miso] @@ -959,21 +960,6 @@ :~ [hen %slip %c %info p.q.hic q.q.hic %& p.cos one] [hen %slip %c %info p.q.hic q.q.hic %& p.cos two] == - :: - ?(%ingo %invo) :: not yet used - ?: =(%$ q.q.hic) - ?. ?=(%invo -.q.hic) [~ ..^$] - =+ yar=(need (~(get by fat.ruf) p.q.hic)) - [~ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen])))] - =^ mos ruf - =+ une=(un p.q.hic now hen ruf) - =+ ^= zat - (exec:(di:wake:une q.q.hic) now r.q.hic) - =+ zot=abet:zat - :- -.zot - =. une (pish:une q.q.hic +.zot ran.zat) - abet:une(hez.yar ?.(=(%invo -.q.hic) hez.yar.une [~ hen])) - [mos ..^$] :: %merg :: direct state up =^ mos ruf @@ -1171,4 +1157,49 @@ ~& [%clay-lost p.+.q.hin tea] [~ ..^$] == + ++ khan-to-soba + |= [ank=(unit ankh) kan=(unit khan)] + ^- soba + :- *cart + =| pax=path + |- ^- (list ,[p=path q=miso]) + ?~ ank + ?~ kan + ~ + =+ =+ (~(tap by dir.u.kan)) + |-(?~(+< ~ (weld ^$(pax [p.i pax], kan `q.i) $(+< t)))) + ?~ fil.u.kan + - + ?~ u.fil.u.kan + - + [[(flop pax) %ins u.u.fil.u.kan] -] + ?~ kan + =+ =+ (~(tap by r.u.ank)) + |-(?~(+< ~ (weld ^$(pax [p.i pax], ank `q.i) $(+< t)))) + ?~ q.u.ank + - + [[(flop pax) %del q.u.q.u.ank] -] + =+ %+ weld + =+ (~(tap by r.u.ank)) + |- ^- (list ,[p=path q=miso]) + ?~ +< ~ + %- weld :_ $(+< t) + ^$(pax [p.i pax], ank `q.i, kan (~(get by dir.u.kan) p.i)) + =+ (~(tap by dir.u.kan)) + |- ^- (list ,[p=path q=miso]) + ?~ +< ~ + ?: (~(has by r.u.ank) p.i) ~ + %- weld :_ $(+< t) + ^$(pax [p.i pax], kan `q.i, ank (~(get by r.u.ank) p.i)) + ?~ q.u.ank + ?~ fil.u.kan + - + ?~ u.fil.u.kan + - + [[(flop pax) %ins u.u.fil.u.kan] -] + ?~ fil.u.kan + - + ?~ u.fil.u.kan + [[(flop pax) %del q.u.q.u.ank] -] + [[(flop pax) %mut q.u.q.u.ank u.u.fil.u.kan] -] -- From 28311b857a19daaf85e59a6dd0ea6c643f7c25df Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 2 Feb 2015 19:50:45 -0500 Subject: [PATCH 26/73] performance --- arvo/clay.hoon | 2 +- try/readme.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 3ba555622..9c104d966 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -375,7 +375,7 @@ (murn q.p.lem |=([a=path b=miso] ?:((sop a b) ~ (some a)))) =+ ^- sot=(list ,[p=path q=misu]) %+ murn q.p.lem - |=([a=path b=miso] ?.((sop a b) ~ (some [a ((hard misu) b)]))) + |=([a=path b=miso] ?.((sop a b) ~ (some [a ?<(?=(%mut -.b) b)]))) =+ ^- mim=(map path mime) %- mo ^- (list ,[path mime]) diff --git a/try/readme.md b/try/readme.md index 6f710d5f5..e6f35087b 100644 --- a/try/readme.md +++ b/try/readme.md @@ -1,5 +1,3 @@ /=main=/try/ This is the try desk. Feel free to try out whatever you want here. - -yeehaw From d5e20e9f3d1b6b75edd74e76e36245c4b4b3647e Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 3 Feb 2015 16:26:09 -0500 Subject: [PATCH 27/73] fixed clay changed-files processing --- arvo/clay.hoon | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 9c104d966..2c411d5a1 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1,6 +1,6 @@ !: :: clay (4c), revision control -!: +:: |= pit=vase => |% ++ bead ,[p=(set beam) q=cage] :: ford result @@ -448,7 +448,6 @@ [%& *cart sot.u.dok] :: ++ apply-ergo - ~& %apply-ergoing ^+ . ?~ wok ~& %no-ergos !! ?^ lon.u.wok ~& %not-done-ergoing !! @@ -1188,9 +1187,9 @@ =+ (~(tap by dir.u.kan)) |- ^- (list ,[p=path q=miso]) ?~ +< ~ - ?: (~(has by r.u.ank) p.i) ~ + ?: (~(has by r.u.ank) p.i) $(+< t) %- weld :_ $(+< t) - ^$(pax [p.i pax], kan `q.i, ank (~(get by r.u.ank) p.i)) + ^$(pax [p.i pax], kan `q.i, ank ~) ?~ q.u.ank ?~ fil.u.kan - From 43ffa183ce2c4e1be117dd1ea7e7d65ab011dc00 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 4 Feb 2015 14:15:35 -0500 Subject: [PATCH 28/73] typo --- arvo/zuse.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 05fca4389..3afe272b8 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1262,7 +1262,7 @@ ^- (unit cage) ?- ren %u [~ %rang !>(`rang`+<+>.query)] - %v [~ %done !>(`dome`+<+<.query)] + %v [~ %dome !>(`dome`+<+<.query)] %x ?~(q.ank ~ [~ q.u.q.ank]) %y [~ %arch !>(as-arch)] %z [~ %ankh !>(ank)] From 72ce8e7b5216cef881b461f0514c86e1e7bf3754 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 9 Feb 2015 18:38:03 -0500 Subject: [PATCH 29/73] added preliminary ++gage --- arvo/clay.hoon | 6 ++++- arvo/ford.hoon | 68 ++++++++++++++++++++++++++++++++------------------ arvo/gall.hoon | 11 +++++--- arvo/hoon.hoon | 5 ++++ 4 files changed, 61 insertions(+), 29 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 2c411d5a1..ce454ffca 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -3,7 +3,7 @@ :: |= pit=vase => |% -++ bead ,[p=(set beam) q=cage] :: ford result +++ bead ,[p=(set beam) q=gage] :: ford result ++ cult (map duct rove) :: subscriptions ++ dojo :: domestic desk state $: qyx=cult :: subscribers @@ -484,6 +484,7 @@ yel [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) sot.u.dok [[pax %ins q.p.res] sot.u.dok] == @@ -513,6 +514,7 @@ yel [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) sot.u.dok ?: =(%null p.q.p.res) sot.u.dok @@ -544,6 +546,7 @@ yel [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! =: lon.u.pok (skip lon.u.pok |=(path =(+< pax))) sot.u.pok (~(put by sot.u.pok) pax %direct (mug q.p.res) q.p.res) == @@ -573,6 +576,7 @@ yel [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok] == diff --git a/arvo/ford.hoon b/arvo/ford.hoon index e2221e7a2..333bbcce7 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -7,7 +7,7 @@ :: structures |% :: -++ bead ,[p=(set beam) q=cage] :: computed result +++ bead ,[p=(set beam) q=gage] :: computed result ++ gift :: out result <-$ $% [%made p=(each bead (list tank))] :: computed result == :: @@ -71,14 +71,15 @@ [%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 + [%done p=(set beam) q=gage] :: literal [%dude p=tank q=silk] :: error wrap - [%dune p=(set beam) q=(unit cage)] :: unit literal + [%dune p=(set beam) q=(unit gage)] :: 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 + [%tabl p=(list (pair silk silk))] :: list [%vale p=mark q=ship r=*] :: validate [our his] == :: -- :: @@ -116,7 +117,7 @@ dep=(set beam) :: dependencies == :: ++ calx :: concrete cache line - $% [%hood p=calm q=(pair beam cage) r=hood] :: compile + $% [%hood p=calm q=(pair beam gage) r=hood] :: compile [%slit p=calm q=[p=type q=type] r=type] :: slam type [%slim p=calm q=[p=type q=twig] r=(pair type nock)]:: mint [%slap p=calm q=[p=vase q=twig] r=vase] :: compute @@ -158,8 +159,8 @@ ^- cafe :: [(grom p.a p.b) (grum q.a q.b)] :: :: :: -++ faun |=([a=cafe b=vase] (fine a `cage`noun/b)) :: vase to cage -++ feel |=([a=cafe b=cage] (fine a q.b)) :: cage to vase +++ faun |=([a=cafe b=vase] (fine a `gage`noun/b)) :: vase to gage +++ feel |=([a=cafe b=gage] (fine a q.b)) :: gage to vase ++ fest |*([a=cafe b=*] (fine a [~ u=b])) :: bolt to unit ++ fine |* [a=cafe b=*] :: bolt from data [p=`cafe`a q=[%0 p=*(set beam) q=b]] :: @@ -387,14 +388,17 @@ :: ++ diff :: diff |= [cof=cafe kas=silk kos=silk] - ^- (bolt cage) + ^- (bolt gage) %. [cof kas kos] ;~ cope ;~ coax |=([cof=cafe p=silk q=silk] (make cof p)) |=([cof=cafe p=silk q=silk] (make cof q)) == - |= [cof=cafe cay=cage coy=cage] + |= [cof=cafe cay=gage coy=gage] + ?. &(?=(@ p.cay) ?=(@ p.coy)) + ~| %bad-diff-marc + !! ?. =(p.cay p.coy) %+ flaw cof :_ ~ leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}" @@ -462,10 +466,10 @@ ^- (bolt hood) %+ cool |.(leaf/"ford: fade {<[(tope bem)]>}") %+ cope (make cof [%bake for bem ~]) - |= [cof=cafe cay=cage] + |= [cof=cafe cay=gage] %+ (clef %hood) (fine cof bem cay) - ^- (burg (pair beam cage) hood) - |= [cof=cafe bum=beam cay=cage] + ^- (burg (pair beam gage) hood) + |= [cof=cafe bum=beam cay=gage] =+ rul=(fair bem) ?. ?=(@ q.q.cay) (flaw cof ~) @@ -636,18 +640,18 @@ :: ++ kale :: mutate |= [cof=cafe kas=silk muy=(list (pair wing silk))] - ^- (bolt cage) + ^- (bolt gage) %+ cope |- ^- (bolt (list (pair wing vase))) ?~ muy (fine cof ~) %+ cope (make cof q.i.muy) - |= [cof=cafe cay=cage] + |= [cof=cafe cay=gage] %+ cope ^$(muy t.muy) |= [cof=cafe rex=(list (pair wing vase))] (fine cof [[p.i.muy q.cay] rex]) |= [cof=cafe yom=(list (pair wing vase))] %+ cope (make cof kas) - |= [cof=cafe cay=cage] + |= [cof=cafe cay=gage] %+ cope (keel cof q.cay yom) |= [cof=cafe vax=vase] (fine cof p.cay vax) @@ -782,7 +786,7 @@ ?~ wuy (fine cof ~) ?> ?=(^ u.wuy) %+ cope (make cof %bake i.u.wuy bem arg) - |= [cof=cafe hoc=cage] + |= [cof=cafe hoc=gage] %+ cope (lope cof i.u.wuy t.u.wuy -.bem q.hoc) |= [cof=cafe vax=vase] (fine cof ~ vax) @@ -883,7 +887,7 @@ :: ++ make :: reduce silk |= [cof=cafe kas=silk] - ^- (bolt cage) + ^- (bolt gage) :: ~& [%make -.kas] ?- -.kas ^ @@ -894,7 +898,7 @@ |=([cof=cafe p=silk q=silk] ^$(cof cof, kas q.kas)) == :: - |= [cof=cafe bor=cage heg=cage] ^- (bolt cage) + |= [cof=cafe bor=gage heg=gage] ^- (bolt gage) [p=cof q=[%0 ~ [%$ (slop q.bor q.heg)]]] == :: @@ -912,7 +916,7 @@ |= [cof=cafe bem=beam] %+ cope (lime cof p.kas bem r.kas) |= [cof=cafe vax=vase] - (fine cof `cage`[p.kas vax]) + (fine cof `gage`[p.kas vax]) :: %call %+ cool |.(leaf/"ford: call {<`@p`(mug kas)>}") @@ -923,7 +927,7 @@ |=([cof=cafe p=silk q=silk] ^$(cof cof, kas q)) == :: - |= [cof=cafe gat=cage sam=cage] + |= [cof=cafe gat=gage sam=gage] (maul cof q.gat q.sam) :: |= [cof=cafe vax=vase] @@ -933,9 +937,10 @@ %cast %+ cool |.(leaf/"ford: cast {}") %+ cope $(kas q.kas) - |= [cof=cafe cay=cage] - ^- (bolt cage) + |= [cof=cafe cay=gage] + ^- (bolt gage) %+ cool |.(leaf/"ford: casting {} to {}") + ?. ?=(@ p.cay) ~| %bad-cast-marc !! %+ cope (link cof p.kas p.cay [our %main %da now] q.cay) |= [cof=cafe vax=vase] (fine cof [p.kas vax]) @@ -964,10 +969,24 @@ %ride %+ cool |.(leaf/"ford: ride {<`@p`(mug kas)>}") %+ cope $(kas q.kas) - |= [cof=cafe cay=cage] + |= [cof=cafe cay=gage] %+ cope (maim cof q.cay p.kas) |= [cof=cafe vax=vase] (fine cof %noun vax) + :: + %tabl + %+ cope + |- ^- (bolt (pair (list (pair marc marc)) vase)) + ?~ p.kas (fine cof ~ *vase) + %+ cope (make cof p.i.p.kas) + |= [cof=cafe key=gage] + %+ cope (make cof q.i.p.kas) + |= [cof=cafe val=gage] + %+ cope ^^$(p.kas t.p.kas) + |= [cof=cafe rex=(list (pair marc marc)) rey=vase] + (fine cof [[p.key p.val] rex] (slop (slop q.key q.val) rey)) + |= [cof=cafe rex=(list (pair marc marc)) rey=vase] + (fine cof [%tabl rex] !>(rex)) :: %vale %+ cool |.(leaf/"ford: vale {} {} {<`@p`(mug r.kas)>}") @@ -1276,14 +1295,15 @@ :: ++ pact :: patch |= [cof=cafe kas=silk kos=silk] - ^- (bolt cage) + ^- (bolt gage) %. [cof kas kos] ;~ cope ;~ coax |=([cof=cafe p=silk q=silk] (make cof p)) |=([cof=cafe p=silk q=silk] (make cof q)) == - |= [cof=cafe cay=cage coy=cage] + |= [cof=cafe cay=gage coy=gage] + ?. &(?=(@ p.cay) ?=(@ p.coy)) ~| %bad-pact-marc !! %+ cope (fang cof p.cay [our %main %da now]) |= [cof=cafe pro=vase] ?. (slab %grad p.pro) diff --git a/arvo/gall.hoon b/arvo/gall.hoon index 7ac2624ab..a67a57fc0 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -8,7 +8,7 @@ $: %0 :: state version pol=(map ship mast) :: apps by ship == :: -++ bead ,[p=(set beam) q=cage] :: computed result +++ bead ,[p=(set beam) q=gage] :: computed result ++ bone ,@ud :: opaque duct ++ gift :: out result <-$ $% [%back p=?] :: %mess ack good/bad @@ -392,7 +392,8 @@ [%give %crud %gasp-crud p.p.+.sih] :: %& - =+ cay=`cage`q.p.p.+.sih + =+ cay=`gage`q.p.p.+.sih + ?. ?=(@ p.cay) ~| %bad-marc !! ?+ -.pax !! %d [%give (best %rush cay)] %f [%give (best %rust cay)] @@ -417,7 +418,8 @@ :_ ~ :- hen ?- -.p.+.sih %| [%give %mean ~ %ford-fail p.p.+.sih] - %& [%pass [%r pax] %g %mess [our imp] you `cage`q.p.p.+.sih] + %& ?. ?=(@ p.q.p.p.+.sih) ~| %bad-marc !! + [%pass [%r pax] %g %mess [our imp] you `cage`q.p.p.+.sih] == :: %g @@ -822,7 +824,8 @@ ^- [(unit cage) _+>] ?> ?=(%f -.sih) ?- -.p.+.sih - & [`q.p.p.+.sih +>.$] + & ?. ?=(@ p.q.p.p.+.sih) ~| %bad-marc !! + [`q.p.p.+.sih +>.$] | [~ (give %crud %murk-made p.p.+.sih)] == :: diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 8e8a6fe44..6c61346f3 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -9745,6 +9745,7 @@ == :: ++ curd ,[p=@tas q=*] :: typeless card ++ duct (list wire) :: causal history +++ gage (pair marc vase) :: structured cage ++ hide :: standard app state $: $: our=ship :: owner/operator app=term :: app identity @@ -9774,6 +9775,10 @@ ++ y *(unit (unit arch)) :: directory ++ z *(unit (unit cage)) :: current subtree -- :: +++ marc :: structured mark + $| mark :: plain mark + $% [%tabl p=(list (pair marc marc))] :: map + == :: ++ mark ,@tas :: content type ++ mill (each vase milt) :: vase/metavase ++ milt ,[p=* q=*] :: metavase From b2b6fe4949dba19c14d19968130d5058da6fbb0a Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 9 Feb 2015 21:26:47 -0500 Subject: [PATCH 30/73] waypoint --- arvo/clay.hoon | 2305 +++++++++++++++++++++++++++--------------------- arvo/zuse.hoon | 3 +- 2 files changed, 1284 insertions(+), 1024 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index ce454ffca..b62b59016 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -9,7 +9,6 @@ $: qyx=cult :: subscribers dom=dome :: desk data dok=(unit dork) :: outstanding diffs - pok=(unit pork) :: outstanding patches wok=(unit work) :: outstanding ergos == :: ++ gift :: out result <-$ @@ -27,7 +26,7 @@ [%info p=@p q=@tas r=nori] :: internal edit [%init p=@p] :: report install [%into p=@p q=@tas r=khan] :: external edit - [%merg p=@p q=@tas r=mizu] :: internal change + [%merg p=@p q=@tas r=@p s=@tas t=germ] :: merge desks [%plug p=@p q=@tas r=@p s=@tas] :: unset upstream [%wart p=sock q=@tas r=path s=*] :: network request [%warp p=sock q=riff] :: file request @@ -108,7 +107,6 @@ ref=(unit rind) :: outgoing requests dom=dome :: revision state dok=(unit dork) :: outstanding diffs - pok=(unit pork) :: outstanding patches wok=(unit work) :: outstanding ergos == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist @@ -131,1078 +129,1341 @@ lon=(list path) :: mim=(map path mime) :: == :: -++ pork :: patch work - $: sot=(map path bulb) :: - lon=(list path) :: - == :: ++ work :: $: sot=(list ,[p=path q=(unit mime)]) :: lon=(list path) :: == :: -- => - :::::::::::::::::::::::::::::::::::::::::::::::::::::::: - :: section 4cA, filesystem logic :: - :: - :: - :: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: section 4cA, filesystem logic :: +:: +:: +:: +|% +++ de :: per desk + |= [now=@da hen=duct hun=duct hez=(unit duct)] + |= [[who=@p for=@p] syd=@ta rede ran=rang] + =* red +<+>- + =| yel=(list ,[p=duct q=gift]) + =| byn=(list ,[p=duct q=riot]) + =| reg=(list ,[p=duct q=gift]) + =| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]]) + =| tag=(list ,[p=duct q=path r=note]) |% - ++ de :: per desk - |= [now=@da hen=duct hun=duct hez=(unit duct)] - |= [[who=@p for=@p] syd=@ta rede ran=rang] - =* red +<+>- - =| yel=(list ,[p=duct q=gift]) - =| byn=(list ,[p=duct q=riot]) - =| reg=(list ,[p=duct q=gift]) - =| say=(list ,[p=duct q=path r=ship s=[p=@ud q=riff]]) - =| tag=(list ,[p=duct q=path r=note]) - |% - ++ abet - ^- [(list move) rede] - :_ red - ;: weld - %+ turn (flop yel) - |=([a=duct b=gift] [hun %give b]) - :: - %+ turn (flop byn) - |=([a=duct b=riot] [a %give [%writ b]]) - :: - %+ turn (flop reg) - |=([a=duct b=gift] [a %give b]) - :: - %+ turn (flop say) - |= [a=duct b=path c=ship d=[p=@ud q=riff]] - :- a - [%pass b %a %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d] - :: - %+ turn (flop tag) - |=([a=duct b=path c=note] [a %pass b c]) - == + ++ abet + ^- [(list move) rede] + :_ red + ;: weld + %+ turn (flop yel) + |=([a=duct b=gift] [hun %give b]) :: - ++ aver :: read - |= mun=mood - ^- (unit (unit cage)) - ?: &(=(p.mun %u) !=(p.q.mun now)) :: prevent bad things - ~& [%clay-fail p.q.mun %now now] - !! - =+ ezy=?~(ref ~ (~(get by haw.u.ref) mun)) - ?^ ezy ezy - =+ nao=(~(case-to-aeon ze lim dom ran) q.mun) - :: ~& [%aver-mun nao [%from syd lim q.mun]] - ?~(nao ~ [~ (~(read-at-aeon ze lim dom ran) u.nao mun)]) + %+ turn (flop byn) + |=([a=duct b=riot] [a %give [%writ b]]) :: - ++ balk :: read and send - |= [hen=duct yon=@ud mun=mood] - ^+ +> - =+ vid=(~(read-at-aeon ze lim dom ran) yon mun) - ?~ vid (blub hen) (blab hen mun u.vid) + %+ turn (flop reg) + |=([a=duct b=gift] [a %give b]) :: - ++ bait - |= [hen=duct tym=@da] - %_(+> tag :_(tag [hen /tyme %t %wait tym])) + %+ turn (flop say) + |= [a=duct b=path c=ship d=[p=@ud q=riff]] + :- a + [%pass b %a %want [who c] [%q %re p.q.d (scot %ud p.d) ~] q.d] :: - ++ best - |= [hen=duct tym=@da] - %_(+> tag :_(tag [hen /tyme %t %rest tym])) - :: - ++ blab :: ship result - |= [hen=duct mun=mood dat=cage] - ^+ +> - +>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn]) - :: - ++ bleb :: ship sequence - |= [hen=duct ins=@ud hip=nako] - ^+ +> - (blab hen [%w [%ud ins] ~] %nako !>(hip)) - :: - ++ blub :: ship stop - |= hen=duct - %_(+> byn [[hen ~] byn]) - :: - ++ duce :: produce request - |= rov=rove - ^+ +> - =. qyx (~(put by qyx) hen rov) - ?~ ref - (mabe rov (cury bait hen)) - |- ^+ +>+.$ :: XX why? - =+ rav=(reve rov) - =+ ^= vaw ^- rave - ?. ?=([%& %v *] rav) rav - [%| [%ud let.dom] `case`q.p.rav r.p.rav] - =+ inx=nix.u.ref - %= +>+.$ - say [[hen [(scot %ud inx) ~] for [inx syd ~ vaw]] say] - nix.u.ref +(nix.u.ref) - bom.u.ref (~(put by bom.u.ref) inx [hen vaw]) - fod.u.ref (~(put by fod.u.ref) hen inx) - == - :: - ++ ease :: release request - ^+ . - ?~ ref - =+ rov=(~(got by qyx) hen) - =. qyx (~(del by qyx) hen) - (mabe rov (cury best hen)) + %+ turn (flop tag) + |=([a=duct b=path c=note] [a %pass b c]) + == + :: + ++ aver :: read + |= mun=mood + ^- (unit (unit cage)) + ?: &(=(p.mun %u) !=(p.q.mun now)) :: prevent bad things + ~& [%clay-fail p.q.mun %now now] + !! + =+ ezy=?~(ref ~ (~(get by haw.u.ref) mun)) + ?^ ezy ezy + =+ nao=(case-to-aeon:ze q.mun) + :: ~& [%aver-mun nao [%from syd lim q.mun]] + ?~(nao ~ [~ (read-at-aeon:ze u.nao mun)]) + :: + ++ balk :: read and send + |= [hen=duct yon=@ud mun=mood] + ^+ +> + =+ vid=(read-at-aeon:ze yon mun) + ?~ vid (blub hen) (blab hen mun u.vid) + :: + ++ bait + |= [hen=duct tym=@da] + %_(+> tag :_(tag [hen /tyme %t %wait tym])) + :: + ++ best + |= [hen=duct tym=@da] + %_(+> tag :_(tag [hen /tyme %t %rest tym])) + :: + ++ blab :: ship result + |= [hen=duct mun=mood dat=cage] + ^+ +> + +>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn]) + :: + ++ bleb :: ship sequence + |= [hen=duct ins=@ud hip=nako] + ^+ +> + (blab hen [%w [%ud ins] ~] %nako !>(hip)) + :: + ++ blub :: ship stop + |= hen=duct + %_(+> byn [[hen ~] byn]) + :: + ++ duce :: produce request + |= rov=rove + ^+ +> + =. qyx (~(put by qyx) hen rov) + ?~ ref + (mabe rov (cury bait hen)) + |- ^+ +>+.$ :: XX why? + =+ rav=(reve rov) + =+ ^= vaw ^- rave + ?. ?=([%& %v *] rav) rav + [%| [%ud let.dom] `case`q.p.rav r.p.rav] + =+ inx=nix.u.ref + %= +>+.$ + say [[hen [(scot %ud inx) ~] for [inx syd ~ vaw]] say] + nix.u.ref +(nix.u.ref) + bom.u.ref (~(put by bom.u.ref) inx [hen vaw]) + fod.u.ref (~(put by fod.u.ref) hen inx) + == + :: + ++ ease :: release request + ^+ . + ?~ ref + =+ rov=(~(got by qyx) hen) =. qyx (~(del by qyx) hen) - |- ^+ +.$ - =+ nux=(~(get by fod.u.ref) hen) - ?~ nux +.$ - %= +.$ - say [[hen [(scot %ud u.nux) ~] for [u.nux syd ~]] say] - fod.u.ref (~(del by fod.u.ref) hen) - bom.u.ref (~(del by bom.u.ref) u.nux) - == + (mabe rov (cury best hen)) + =. qyx (~(del by qyx) hen) + |- ^+ +.$ + =+ nux=(~(get by fod.u.ref) hen) + ?~ nux +.$ + %= +.$ + say [[hen [(scot %ud u.nux) ~] for [u.nux syd ~]] say] + fod.u.ref (~(del by fod.u.ref) hen) + bom.u.ref (~(del by bom.u.ref) u.nux) + == + :: + ++ eave :: subscribe + |= rav=rave + ^+ +> + ?- -.rav + & + ?: &(=(p.p.rav %u) !=(p.q.p.rav now)) + ~& [%clay-fail p.q.p.rav %now now] + !! + =+ ver=(aver p.rav) + ?~ ver + (duce rav) + ?~ u.ver + (blub hen) + (blab hen p.rav u.u.ver) :: - ++ eave :: subscribe - |= rav=rave - ^+ +> - ?- -.rav - & - ?: &(=(p.p.rav %u) !=(p.q.p.rav now)) - ~& [%clay-fail p.q.p.rav %now now] - !! - =+ ver=(aver p.rav) - ?~ ver - (duce rav) - ?~ u.ver - (blub hen) - (blab hen p.rav u.u.ver) - :: - | - =+ nab=(~(case-to-aeon ze lim dom ran) p.p.rav) - ?~ nab - ?> =(~ (~(case-to-aeon ze lim dom ran) q.p.rav)) - (duce (rive rav)) - =+ huy=(~(case-to-aeon ze lim dom ran) q.p.rav) - ?: &(?=(^ huy) |((lth u.huy u.nab) &(=(0 u.huy) =(0 u.nab)))) - (blub hen) - =+ top=?~(huy let.dom u.huy) - =+ sar=(~(lobes-at-path ze lim dom ran) u.nab r.p.rav) - =+ ear=(~(lobes-at-path ze lim dom ran) top r.p.rav) - =. +>.$ - ?: =(sar ear) +>.$ - =+ fud=(~(make-nako ze lim dom ran) u.nab top) - (bleb hen u.nab fud) - ?^ huy - (blub hen) - =+ ^= ptr ^- case - [%ud +(let.dom)] - (duce `rove`[%| ptr q.p.rav r.p.rav ear]) + | + =+ nab=(case-to-aeon:ze p.p.rav) + ?~ nab + ?> =(~ (case-to-aeon:ze q.p.rav)) + (duce (rive rav)) + =+ huy=(case-to-aeon:ze q.p.rav) + ?: &(?=(^ huy) |((lth u.huy u.nab) &(=(0 u.huy) =(0 u.nab)))) + (blub hen) + =+ top=?~(huy let.dom u.huy) + =+ sar=(lobes-at-path:ze u.nab r.p.rav) + =+ ear=(lobes-at-path:ze top r.p.rav) + =. +>.$ + ?: =(sar ear) +>.$ + =+ fud=(make-nako:ze u.nab top) + (bleb hen u.nab fud) + ?^ huy + (blub hen) + =+ ^= ptr ^- case + [%ud +(let.dom)] + (duce `rove`[%| ptr q.p.rav r.p.rav ear]) + == + :: + ++ echa :: announce raw + |= [wen=@da mer=mizu] + ^+ +> + %= +> + reg ~& %merge-announce reg + :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) + :: yel [[hen %note '=' %leaf ~] yel] :: XX do better + == + :: + ++ echo :: announce changes + |= [wen=@da mim=(map path mime) lem=nori] + ^+ +> + =. yel + =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] + ?- -.lem + | :_ yel + [hen %note '=' %leaf :(weld (trip p.lem) " " (spud pre))] + & |- ^+ yel + ?~ q.p.lem yel + :_ $(q.p.lem t.q.p.lem) + :- hen + :+ %note + ?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';') + [%leaf (spud (weld pre p.i.q.p.lem))] == - :: - ++ echa :: announce raw - |= [wen=@da mer=mizu] - ^+ +> - %= +> - reg ~& %merge-announce reg - :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) - :: yel [[hen %note '=' %leaf ~] yel] :: XX do better - == - :: - ++ echo :: announce changes - |= [wen=@da mim=(map path mime) lem=nori] - ^+ +> - =. yel - =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] - ?- -.lem - | :_ yel - [hen %note '=' %leaf :(weld (trip p.lem) " " (spud pre))] - & |- ^+ yel - ?~ q.p.lem yel - :_ $(q.p.lem t.q.p.lem) - :- hen - :+ %note - ?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';') - [%leaf (spud (weld pre p.i.q.p.lem))] + ?~ hez +>.$ + ?. ?=(%& -.lem) +>.$ + =+ ^= ceq + |= a=miso + ?| ?=(%del -.a) + &(?=(%ins -.a) ?=(%mime -.+.a)) + &(?=(%mut -.a) ?=(%mime -.+>.a)) == - ?~ hez +>.$ - ?. ?=(%& -.lem) +>.$ - =+ ^= ceq - |= a=miso - ?| ?=(%del -.a) - &(?=(%ins -.a) ?=(%mime -.+.a)) - &(?=(%mut -.a) ?=(%mime -.+>.a)) - == - =. wok - :+ ~ - %+ murn `(list ,[path miso])`q.p.lem - |= [a=path b=miso] - ?: ?=(%del -.b) (some a ~) - (bind (~(get by mim) a) |=(c=mime [a (some c)])) - %+ murn `(list ,[path miso])`q.p.lem - |=([a=path b=miso] ?:((ceq b) ~ (some a))) - ?> ?=(^ wok) - ?~ lon.u.wok - apply-ergo - %_ +>.$ - tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) - %- welp :_ tag - ^- (list ,[duct path note]) + =. wok + :+ ~ %+ murn `(list ,[path miso])`q.p.lem |= [a=path b=miso] - ?: (ceq b) - ~ - %- some - :+ u.hez - [%ergoing (scot %p who) syd a] - :* %f %exec who ~ %cast %mime %done ~ - ~|(%bad-echo (need (~(read ze lim dom ran) %x [%ud let.dom] a))) + ?: ?=(%del -.b) (some a ~) + (bind (~(get by mim) a) |=(c=mime [a (some c)])) + %+ murn `(list ,[path miso])`q.p.lem + |=([a=path b=miso] ?:((ceq b) ~ (some a))) + ?> ?=(^ wok) + ?~ lon.u.wok + apply-ergo + %_ +>.$ + tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) + %- welp :_ tag + ^- (list ,[duct path note]) + %+ murn `(list ,[path miso])`q.p.lem + |= [a=path b=miso] + ?: (ceq b) + ~ + %- some + :+ u.hez + [%ergoing (scot %p who) syd a] + :* %f %exec who ~ %cast %mime %done ~ + ~|(%bad-echo (need (read:ze %x [%ud let.dom] a))) + == + == + :: + ++ edit :: apply changes + |= [wen=@da lem=nori] + ^+ +> + ?: ?=(%| -.lem) + =^ hat +>.$ + (edit:ze wen lem) + ?~ hat + +>.$ + (echo:(checkout-ankh u.hat) wen ~ lem) + ?. =(~ dok) + ~& %already-applying-changes !! + =+ ^= sop + |= [a=path b=miso] + ^- ? + ?| ?=(%del -.b) + ?& ?=(%ins -.b) + ?=(%mime p.p.b) + =+ (slag (dec (lent a)) a) + ?| =([%hook ~] -) + =([%hoon ~] -) + == == == + =+ ^- lon=(list path) + (murn q.p.lem |=([a=path b=miso] ?:((sop a b) ~ (some a)))) + =+ ^- sot=(list ,[p=path q=misu]) + %+ murn q.p.lem + |=([a=path b=miso] ?.((sop a b) ~ (some [a ?<(?=(%mut -.b) b)]))) + =+ ^- mim=(map path mime) + %- mo + ^- (list ,[path mime]) + %+ murn q.p.lem + |= [a=path b=miso] + ?- -.b + %del ~ + %ins ?.(?=(%mime p.p.b) ~ (some a ((hard mime) q.q.p.b))) + %dif ~ + %mut ?.(?=(%mime p.q.b) ~ (some a ((hard mime) q.q.q.b))) == - == + =. dok `[sot lon mim] + ?~ lon + (apply-edit wen) + =+ ^- los=(list ,[duct path note]) + %+ murn q.p.lem + |=([a=path b=miso] ?:((sop a b) ~ (some (silkify wen a b)))) + %_(+>.$ tag (welp los tag)) + :: + ++ silkify + |= [wen=@da pax=path mis=miso] + ^- [duct path note] + :- hen + ?+ -.mis !! + %mut + :- [%diffing (scot %p who) syd (scot %da wen) pax] + :^ %f %exec who :- ~ + ^- silk + =+ =+ (slag (dec (lent pax)) pax) + =+ ?~(- %$ i.-) + [%cast - [%done ~ q.mis]] + [%diff [%done ~ p.mis] -] :: - ++ edit :: apply changes - |= [wen=@da lem=nori] - ^+ +> - ?: ?=(%| -.lem) - =+ [hat axe]=(~(edit ze lim dom ran) wen lem) - =+ `[l=@da d=dome r=rang]`+<.axe - ?~ hat - +>.$(dom d, ran r) - (echo:(checkout-ankh(dom d, ran r) u.hat) wen ~ lem) - ?. =(~ dok) - ~& %already-applying-changes !! - =+ ^= sop - |= [a=path b=miso] - ^- ? - ?| ?=(%del -.b) - ?& ?=(%ins -.b) - ?=(%mime p.p.b) - =+ (slag (dec (lent a)) a) - ?| =([%hook ~] -) - =([%hoon ~] -) - == == == - =+ ^- lon=(list path) - (murn q.p.lem |=([a=path b=miso] ?:((sop a b) ~ (some a)))) - =+ ^- sot=(list ,[p=path q=misu]) - %+ murn q.p.lem - |=([a=path b=miso] ?.((sop a b) ~ (some [a ?<(?=(%mut -.b) b)]))) - =+ ^- mim=(map path mime) - %- mo - ^- (list ,[path mime]) - %+ murn q.p.lem - |= [a=path b=miso] - ?- -.b - %del ~ - %ins ?.(?=(%mime p.p.b) ~ (some a ((hard mime) q.q.p.b))) - %dif ~ - %mut ?.(?=(%mime p.q.b) ~ (some a ((hard mime) q.q.q.b))) - == - =. dok `[sot lon mim] - ?~ lon - (apply-edit wen) - =+ ^- los=(list ,[duct path note]) - %+ murn q.p.lem - |=([a=path b=miso] ?:((sop a b) ~ (some (silkify wen a b)))) - %_(+>.$ tag (welp los tag)) - :: - ++ silkify - |= [wen=@da pax=path mis=miso] - ^- [duct path note] - :- hen - ?+ -.mis !! - %mut - :- [%diffing (scot %p who) syd (scot %da wen) pax] - :^ %f %exec who :- ~ - ^- silk - =+ =+ (slag (dec (lent pax)) pax) - =+ ?~(- %$ i.-) - [%cast - [%done ~ q.mis]] - [%diff [%done ~ p.mis] -] + %ins + :- [%casting (scot %p who) syd (scot %da wen) pax] + :^ %f %exec who :- ~ + ^- silk + =+ (slag (dec (lent pax)) pax) + =+ ?~(- %$ i.-) + [%cast - [%done ~ p.mis]] + == + :: + ++ patch + |= [pax=path bar=lobe] + ^- [duct path note] + :^ hen + [%patching (scot %p who) syd pax] + %f + :^ %exec who ~ + |- ^- silk + =+ bob=(~(got by lat.ran) bar) + ?- -.bob + %direct [%done ~ q.bob] + %indirect [%done ~ q.bob] + %delta [%pact $(bar q.bob) [%done ~ r.bob]] + == + :: + ++ apply-edit + |= wen=@da + ^+ +> + =^ hat +>.$ + (edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) + ?~ dok ~& %no-changes !! + ?^ lon.u.dok ~& %not-done-diffing !! + ?~ hat + (echo(dok ~) wen mim.u.dok %& *cart sot.u.dok) + %^ echo:(checkout-ankh(dok ~) u.hat) + wen + mim.u.dok + [%& *cart sot.u.dok] + :: + ++ apply-ergo + ^+ . + ?~ wok ~& %no-ergos !! + ?^ lon.u.wok ~& %not-done-ergoing !! + ?~ hez ~& %no-sync-duct !! + .(wok ~, reg :_(reg [u.hez %ergo who syd let.dom sot.u.wok])) + :: + ++ take-cast + |= [wen=@da pax=path res=(each bead (list tank))] + ^+ +> + ?~ dok + ~& %clay-unexpected-made +>.$ + ?. (lien lon.u.dok |=(path =(+< pax))) + ~& %clay-strange-made +>.$ + ?: ?=(%| -.res) + %_ +>.$ + dok ~ + :: XX should be here + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.dok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] :: - %ins - :- [%casting (scot %p who) syd (scot %da wen) pax] - :^ %f %exec who :- ~ - ^- silk - =+ (slag (dec (lent pax)) pax) - =+ ?~(- %$ i.-) - [%cast - [%done ~ p.mis]] + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] == - :: - ++ patch - |= [pax=path bar=lobe] - ^- [duct path note] + ?. ?=(@ p.q.p.res) ~| %bad-marc !! + =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) + sot.u.dok [[pax %ins q.p.res] sot.u.dok] + == + ?~ lon.u.dok + (apply-edit wen) + +>.$ + :: + ++ take-diff + |= [wen=@da pax=path res=(each bead (list tank))] + ^+ +> + ?~ dok + ~& %clay-unexpected-made +>.$ + ?. (lien lon.u.dok |=(path =(+< pax))) + ~& %clay-strange-made +>.$ + ?: ?=(%| -.res) + %_ +>.$ + dok ~ + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.dok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] + :: + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] + == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! + =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) + sot.u.dok ?: =(%null p.q.p.res) + sot.u.dok + [[pax %dif q.p.res] sot.u.dok] + == + ?~ lon.u.dok + (apply-edit wen) + +>.$ + :: + ++ take-patch + |= [pax=path res=(each bead (list tank))] + ^+ +> + ?: ?=(%| -.res) + %_ +>.$ + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] + == + %_ +>.$ + ank.dom + =+ cay=q.p.res + ?@ p.cay ~| %patch-bad-marc !! + %- checkout-ankh:ze + %- mo + |- ^- (list ,[path cage]) + ?~ p.p.cay + ~ + :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?. ?=(%path p.i.p.p.cay) + ~| %patch-strange-marc-a + !! + ?. ?=(@ q.i.p.p.cay) + ~| %patch-strange-marc-b + !! + =+ coy=(slot 2 q.cay) + ?@ q.coy + ~| %patch-strange-coy + !! + :- ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + == + :: + ++ take-ergo + |= [pax=path res=(each bead (list tank))] + ^+ +> + ?~ wok + ~& %clay-ergo-unexpected-made +> + ?. (lien lon.u.wok |=(path =(+< pax))) + ~& %clay-ergo-strange-made +> + ?: ?=(%| -.res) + %_ +>.$ + wok ~ + :: tag + :: %- welp :_ tag + :: ^- (list ,[duct path note]) + :: %+ murn lon.u.wok + :: |= a=path + :: ^- (unit ,[duct path note]) + :: ?: =(pax a) ~ + :: `[hen [%ergoing (scot %p who) syd a] %f %exec who ~] + :: + yel + [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] + == + ?. ?=(@ p.q.p.res) ~| %bad-marc !! + =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) + sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok] + == + ?~ lon.u.wok + apply-ergo + +>.$ + :: + ++ checkout-ankh + |= hat=(map path lobe) + ^+ +> + %_ +>.$ + tag + :_ tag :^ hen [%patching (scot %p who) syd pax] %f - :^ %exec who ~ + :^ %exec who ~ :- %tabl + ^- (list (pair silk)) + %+ turn (~(tap by hat)) + |= [a=path b=lobe] + ^- (pair silk silk) + :- [%done ~ %path !>(a)] |- ^- silk - =+ bob=(~(got by lat.ran) bar) + =+ bob=(~(got by lat.ran) b) ?- -.bob - %direct [%done ~ q.bob] - %indirect [%done ~ q.bob] - %delta [%pact $(bar q.bob) [%done ~ r.bob]] + %direct [%done ~ q.bob] + %indirect [%done ~ q.bob] + %delta [%pact $(bar q.bob) [%done ~ r.bob]] == - :: - ++ apply-edit - |= wen=@da - ^+ +> - ?~ dok ~& %no-changes !! - ?^ lon.u.dok ~& %not-done-diffing !! - =+ [hat axe]=(~(edit ze lim dom ran) wen %& *cart sot.u.dok) - =+ `[l=@da d=dome r=rang]`+<.axe - ?~ hat - (echo(dom d, ran r, dok ~) wen mim.u.dok %& *cart sot.u.dok) - %^ echo:(checkout-ankh(dom d, ran r, dok ~) u.hat) - wen - mim.u.dok - [%& *cart sot.u.dok] - :: - ++ apply-ergo - ^+ . - ?~ wok ~& %no-ergos !! - ?^ lon.u.wok ~& %not-done-ergoing !! - ?~ hez ~& %no-sync-duct !! - .(wok ~, reg :_(reg [u.hez %ergo who syd let.dom sot.u.wok])) - :: - ++ apply-patches - ^+ . - ?~ pok ~& %no-patches !! - ?^ lon.u.pok ~& %not-done-patching !! - =+ ank=(~(checkout-ankh ze lim dom ran) sot.u.pok) - +(ank.dom ank, pok ~) - :: - ++ take-cast - |= [wen=@da pax=path res=(each bead (list tank))] - ^+ +> - ?~ dok - ~& %clay-unexpected-made +>.$ - ?. (lien lon.u.dok |=(path =(+< pax))) - ~& %clay-strange-made +>.$ - ?: ?=(%| -.res) - %_ +>.$ - dok ~ - :: XX should be here - :: tag - :: %- welp :_ tag - :: ^- (list ,[duct path note]) - :: %+ murn lon.u.dok - :: |= a=path - :: ^- (unit ,[duct path note]) - :: ?: =(pax a) ~ - :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] - :: - yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] + == + :: + ++ edis :: apply subscription + |= nak=nako + ^+ +> + %= +> + hit.dom (~(uni by hit.dom) gar.nak) + let.dom let.nak + lat.ran %+ roll (~(tap in bar.nak) ~) + =< .(yeb lat.ran) + |= [sar=blob yeb=(map lobe blob)] + =+ zax=(blob-to-lobe sar) + %+ ~(put by yeb) zax sar + hut.ran %+ roll (~(tap in lar.nak) ~) + =< .(yeb hut.ran) + |= [sar=yaki yeb=(map tako yaki)] + %+ ~(put by yeb) r.sar sar + == + :: + ++ exec :: change and update + |= [wen=@da lem=nori] + ^+ +> + wake:(edit wen lem) + :: + ++ exem :: execute merge + |= [wen=@da her=@p sud=@tas gem=germ] :: aka direct change + !! + :: ?. (gte p.mer let.dom) !! :: no + :: =. +>.$ %= +>.$ + :: hut.ran (~(uni by hut.r.mer) hut.ran) + :: lat.ran (~(uni by lat.r.mer) lat.ran) + :: let.dom p.mer + :: hit.dom (~(uni by q.mer) hit.dom) + :: == + :: =+ ^= hed :: head commit + :: =< q + :: %- ~(got by hut.ran) + :: %- ~(got by hit.dom) + :: let.dom + :: (echa:wake:(checkout-ankh hed)) + :: + ++ knit :: external change + |= [inx=@ud rot=riot] + ^+ +> + ?> ?=(^ ref) + |- ^+ +>+.$ + =+ ruv=(~(get by bom.u.ref) inx) + ?~ ruv +>+.$ + => ?. |(?=(~ rot) ?=(& -.q.u.ruv)) . + %_ . + bom.u.ref (~(del by bom.u.ref) inx) + fod.u.ref (~(del by fod.u.ref) p.u.ruv) == - ?. ?=(@ p.q.p.res) ~| %bad-marc !! - =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) - sot.u.dok [[pax %ins q.p.res] sot.u.dok] + ?~ rot + =+ rav=`rave`q.u.ruv + %= +>+.$ + lim + ?.(&(?=(| -.rav) ?=(%da -.q.p.rav)) lim `@da`p.q.p.rav) + :: + haw.u.ref + ?. ?=(& -.rav) haw.u.ref + (~(put by haw.u.ref) p.rav ~) == - ?~ lon.u.dok - (apply-edit wen) + ?< ?=(%v p.p.u.rot) + =. haw.u.ref + (~(put by haw.u.ref) [p.p.u.rot q.p.u.rot q.u.rot] ~ r.u.rot) + ?. ?=(%w p.p.u.rot) +>+.$ + |- ^+ +>+.^$ + =+ nez=[%w [%ud let.dom] ~] + =+ nex=(~(get by haw.u.ref) nez) + ?~ nex +>+.^$ + ?~ u.nex +>+.^$ :: should never happen + =. +>+.^$ + =+ roo=(edis ((hard nako) q.q.u.u.nex)) + ?>(?=(^ ref.roo) roo) + %= $ + haw.u.ref (~(del by haw.u.ref) nez) + == + :: + ++ mabe :: maybe fire function + |* [rov=rove fun=$+(@da _+>.^$)] + ^+ +>.$ + %- fall :_ +>.$ + %- bind :_ fun + ^- (unit ,@da) + ?- -.rov + %& + ?. ?=(%da -.q.p.rov) ~ + `p.q.p.rov + %| + =* mot p.rov + %+ hunt + ?. ?=(%da -.p.mot) ~ + ?.((lth now p.p.mot) ~ [~ p.p.mot]) + ?. ?=(%da -.q.mot) ~ + ?.((lth now p.q.mot) [~ now] [~ p.q.mot]) + == + :: + ++ reve + |= rov=rove + ^- rave + ?: ?=(%& -.rov) rov + [%| p.p.rov q.p.rov r.p.rov] + :: + ++ rive + |= rav=[%| p=moat] + ^- rove + [%| p.p.rav q.p.rav r.p.rav ~] + :: + ++ merge-desks + |= [her=@p sud=@tas gem=germ rot=riot] + ^+ +>.$ + ?~ rot + ~& "autosync from {} on {} to {} on {} stopped" +>.$ - :: - ++ take-diff - |= [wen=@da pax=path res=(each bead (list tank))] - ^+ +> - ?~ dok - ~& %clay-unexpected-made +>.$ - ?. (lien lon.u.dok |=(path =(+< pax))) - ~& %clay-strange-made +>.$ - ?: ?=(%| -.res) - %_ +>.$ - dok ~ - :: tag - :: %- welp :_ tag - :: ^- (list ,[duct path note]) - :: %+ murn lon.u.dok - :: |= a=path - :: ^- (unit ,[duct path note]) - :: ?: =(pax a) ~ - :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] - :: - yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] - == - ?. ?=(@ p.q.p.res) ~| %bad-marc !! - =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) - sot.u.dok ?: =(%null p.q.p.res) - sot.u.dok - [[pax %dif q.p.res] sot.u.dok] - == - ?~ lon.u.dok - (apply-edit wen) - +>.$ - :: - ++ take-patch - |= [pax=path res=(each bead (list tank))] - ^+ +> - ?~ pok - ~& %clay-patch-unexpected-made +> - ?. (lien lon.u.pok |=(path =(+< pax))) - ~& %clay-patch-strange-made +> - ?: ?=(%| -.res) - %_ +>.$ - pok ~ - :: tag - :: %- welp :_ tag - :: ^- (list ,[duct path note]) - :: %+ murn lon.u.pok - :: |= a=path - :: ^- (unit ,[duct path note]) - :: ?: =(pax a) ~ - :: `[hen [%patching (scot %p who) syd a] %f %exec who ~] - :: - yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] - == - ?. ?=(@ p.q.p.res) ~| %bad-marc !! - =: lon.u.pok (skip lon.u.pok |=(path =(+< pax))) - sot.u.pok (~(put by sot.u.pok) pax %direct (mug q.p.res) q.p.res) - == - ?~ lon.u.pok - apply-patches - +>.$ - :: - ++ take-ergo - |= [pax=path res=(each bead (list tank))] - ^+ +> - ?~ wok - ~& %clay-ergo-unexpected-made +> - ?. (lien lon.u.wok |=(path =(+< pax))) - ~& %clay-ergo-strange-made +> - ?: ?=(%| -.res) - %_ +>.$ - wok ~ - :: tag - :: %- welp :_ tag - :: ^- (list ,[duct path note]) - :: %+ murn lon.u.wok - :: |= a=path - :: ^- (unit ,[duct path note]) - :: ?: =(pax a) ~ - :: `[hen [%ergoing (scot %p who) syd a] %f %exec who ~] - :: - yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] - == - ?. ?=(@ p.q.p.res) ~| %bad-marc !! - =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) - sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok] - == - ?~ lon.u.wok - apply-ergo - +>.$ - :: - ++ checkout-ankh - |= hat=(map path lobe) - ^+ +> - ::?. =(~ pok) - :: ~& %already-applying-patches +>.$ - =+ ^- lon=(list path) - %+ murn (~(tap by hat)) - |= [a=path b=lobe] - =+ bob=(~(got by lat.ran) b) - ?.(?=(%delta -.bob) ~ (some a)) - =+ ^- sot=(map path bulb) - %- mo - ^- (list ,[path bulb]) - %+ murn (~(tap by hat)) - |= [a=path b=lobe] - ^- (unit ,[path bulb]) - =+ bob=(~(got by lat.ran) b) - ?:(?=(%delta -.bob) ~ `[a `bulb`bob]) - =. pok `[sot lon] - ?~ lon - apply-patches - =+ ^- los=(list ,[duct path note]) - %+ murn (~(tap by hat)) - |= [pax=path bar=lobe] - ^- (unit ,[duct path note]) - =+ bob=(~(got by lat.ran) bar) - ?. ?=(%delta -.bob) - ~ - `(patch pax bar) - %_(+>.$ tag (welp los tag)) - :: - ++ edis :: apply subscription - |= nak=nako - ^+ +> - %= +> - hit.dom (~(uni by hit.dom) gar.nak) - let.dom let.nak - lat.ran %+ roll (~(tap in bar.nak) ~) - =< .(yeb lat.ran) - |= [sar=blob yeb=(map lobe blob)] - =+ zax=(blob-to-lobe sar) - %+ ~(put by yeb) zax sar - hut.ran %+ roll (~(tap in lar.nak) ~) - =< .(yeb hut.ran) - |= [sar=yaki yeb=(map tako yaki)] - %+ ~(put by yeb) r.sar sar - == - :: - ++ exec :: change and update - |= [wen=@da lem=nori] - ^+ +> - wake:(edit wen lem) - :: - ++ exem :: execute merge - |= [wen=@da mer=mizu] :: aka direct change - ?. (gte p.mer let.dom) !! :: no - =. +>.$ %= +>.$ - hut.ran (~(uni by hut.r.mer) hut.ran) - lat.ran (~(uni by lat.r.mer) lat.ran) - let.dom p.mer - hit.dom (~(uni by q.mer) hit.dom) - == - =+ ^= hed :: head commit - =< q - %- ~(got by hut.ran) - %- ~(got by hit.dom) - let.dom - (echa:wake:(checkout-ankh hed)) - :: - ++ knit :: external change - |= [inx=@ud rot=riot] - ^+ +> - ?> ?=(^ ref) - |- ^+ +>+.$ - =+ ruv=(~(get by bom.u.ref) inx) - ?~ ruv +>+.$ - => ?. |(?=(~ rot) ?=(& -.q.u.ruv)) . - %_ . - bom.u.ref (~(del by bom.u.ref) inx) - fod.u.ref (~(del by fod.u.ref) p.u.ruv) - == - ?~ rot - =+ rav=`rave`q.u.ruv - %= +>+.$ - lim - ?.(&(?=(| -.rav) ?=(%da -.q.p.rav)) lim `@da`p.q.p.rav) - :: - haw.u.ref - ?. ?=(& -.rav) haw.u.ref - (~(put by haw.u.ref) p.rav ~) - == - ?< ?=(%v p.p.u.rot) - =. haw.u.ref - (~(put by haw.u.ref) [p.p.u.rot q.p.u.rot q.u.rot] ~ r.u.rot) - ?. ?=(%w p.p.u.rot) +>+.$ - |- ^+ +>+.^$ - =+ nez=[%w [%ud let.dom] ~] - =+ nex=(~(get by haw.u.ref) nez) - ?~ nex +>+.^$ - ?~ u.nex +>+.^$ :: should never happen - =. +>+.^$ - =+ roo=(edis ((hard nako) q.q.u.u.nex)) - ?>(?=(^ ref.roo) roo) - %= $ - haw.u.ref (~(del by haw.u.ref) nez) - == - :: - ++ mabe :: maybe fire function - |* [rov=rove fun=$+(@da _+>.^$)] - ^+ +>.$ - %- fall :_ +>.$ - %- bind :_ fun - ^- (unit ,@da) - ?- -.rov - %& - ?. ?=(%da -.q.p.rov) ~ - `p.q.p.rov - %| - =* mot p.rov - %+ hunt - ?. ?=(%da -.p.mot) ~ - ?.((lth now p.p.mot) ~ [~ p.p.mot]) - ?. ?=(%da -.q.mot) ~ - ?.((lth now p.q.mot) [~ now] [~ p.q.mot]) - == - :: - ++ reve - |= rov=rove - ^- rave - ?: ?=(%& -.rov) rov - [%| p.p.rov q.p.rov r.p.rov] - :: - ++ rive - |= rav=[%| p=moat] - ^- rove - [%| p.p.rav q.p.rav r.p.rav ~] - :: - ++ sync - |= [her=@p sud=@tas rot=riot] - ^+ +>.$ - ?~ rot - ~& "autosync from {} on {} to {} on {} stopped" - +>.$ - ?: ?=(%y p.p.u.rot) - %= +>.$ - yel - [[hen %note ';' %leaf "starting to sync desk {(trip syd)}..."] yel] - tag - :_ tag - :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/v - %c %warp [who her] sud - `[%& %v q.p.u.rot /] - == - == - ?> ?=(%v p.p.u.rot) - =+ der=((hard dome) r.u.rot) - =+ ^= lum - ^- (unit (unit mizu)) - ~ - ::%^ ~(construct-merge ze now dom ran) - :: ?:(=(0 let.dom) %init %meld) - :: who - :::+ syd - :: `saba`[her sud [0 let.der] der] - ::now - =. tag - :_ tag - :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/y - %c %warp [who her] sud - `[%& %y [%ud +(let.der)] /] - == - ?~ lum - ~& "autosync from {} on {} to {} on {} failed" - ~& "please merge manually" - +>.$ - ?~ u.lum - ~& "autosync from {} on {} to {} on {} up to date" - +>.$ + ?: ?=(%y p.p.u.rot) %= +>.$ yel - [[hen %note ';' %leaf "successfully synced desk {(trip syd)}..."] yel] + [[hen %note ';' %leaf "starting to sync desk {(trip syd)}..."] yel] tag :_ tag - :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/merg - %c %merg who syd u.u.lum + :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/v + %c %warp [who her] sud + `[%& %v q.p.u.rot /] == == + ?> ?=(%v p.p.u.rot) + =+ der=((hard dome) r.u.rot) + =+ ^= lum + ^- (unit (unit mizu)) + ~ + ::%^ construct-merge:ze + :: ?:(=(0 let.dom) %init %meld) + :: who + :::+ syd + :: `saba`[her sud [0 let.der] der] + ::now + ?~ lum + ~& "autosync from {} on {} to {} on {} failed" + ~& "please merge manually" + +>.$ + ?~ u.lum + ~& "autosync from {} on {} to {} on {} up to date" + +>.$ + %= +>.$ + yel + [[hen %note ';' %leaf "successfully synced desk {(trip syd)}..."] yel] + tag + :_ tag + :* hen /auto/(scot %p who)/[syd]/(scot %p her)/[sud]/merg + %c %merg who syd u.u.lum + == + == + :: + ++ wake :: update subscribers + ^+ . + =+ xiq=(~(tap by qyx) ~) + =| xaq=(list ,[p=duct q=rove]) + |- ^+ ..wake + ?~ xiq + ..wake(qyx (~(gas by *cult) xaq)) + ?- -.q.i.xiq + & + =+ cas=?~(ref ~ (~(get by haw.u.ref) `mood`p.q.i.xiq)) + ?^ cas + %= $ + xiq t.xiq + ..wake ?~ u.cas (blub p.i.xiq) + (blab p.i.xiq p.q.i.xiq u.u.cas) + == + =+ nao=(case-to-aeon:ze q.p.q.i.xiq) + ?~ nao $(xiq t.xiq, xaq [i.xiq xaq]) + $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) :: - ++ wake :: update subscribers - ^+ . - =+ xiq=(~(tap by qyx) ~) - =| xaq=(list ,[p=duct q=rove]) - |- ^+ ..wake - ?~ xiq - ..wake(qyx (~(gas by *cult) xaq)) - ?- -.q.i.xiq - & - =+ cas=?~(ref ~ (~(get by haw.u.ref) `mood`p.q.i.xiq)) - ?^ cas - %= $ - xiq t.xiq - ..wake ?~ u.cas (blub p.i.xiq) - (blab p.i.xiq p.q.i.xiq u.u.cas) - == - =+ nao=(~(case-to-aeon ze lim dom ran) q.p.q.i.xiq) - ?~ nao $(xiq t.xiq, xaq [i.xiq xaq]) - $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) - :: - | - =+ mot=`moot`p.q.i.xiq - =+ nab=(~(case-to-aeon ze lim dom ran) p.mot) - ?~ nab - $(xiq t.xiq, xaq [i.xiq xaq]) - =+ huy=(~(case-to-aeon ze lim dom ran) q.mot) - ?~ huy - =+ ptr=[%ud +(let.dom)] - %= $ - xiq t.xiq - xaq [[p.i.xiq [%| ptr q.mot r.mot s.mot]] xaq] - ..wake =+ ^= ear - (~(lobes-at-path ze lim dom ran) let.dom r.p.q.i.xiq) - ?: =(s.p.q.i.xiq ear) ..wake - =+ fud=(~(make-nako ze lim dom ran) u.nab let.dom) - (bleb p.i.xiq let.dom fud) - == + | + =+ mot=`moot`p.q.i.xiq + =+ nab=(case-to-aeon:ze p.mot) + ?~ nab + $(xiq t.xiq, xaq [i.xiq xaq]) + =+ huy=(case-to-aeon:ze q.mot) + ?~ huy + =+ ptr=[%ud +(let.dom)] %= $ xiq t.xiq - ..wake =- (blub:- p.i.xiq) - =+ ^= ear - (~(lobes-at-path ze lim dom ran) u.huy r.p.q.i.xiq) - ?: =(s.p.q.i.xiq ear) (blub p.i.xiq) - =+ fud=(~(make-nako ze lim dom ran) u.nab u.huy) - (bleb p.i.xiq +(u.nab) fud) + xaq [[p.i.xiq [%| ptr q.mot r.mot s.mot]] xaq] + ..wake =+ ^= ear + (lobes-at-path:ze let.dom r.p.q.i.xiq) + ?: =(s.p.q.i.xiq ear) ..wake + =+ fud=(make-nako:ze u.nab let.dom) + (bleb p.i.xiq let.dom fud) == + %= $ + xiq t.xiq + ..wake =- (blub:- p.i.xiq) + =+ ^= ear + (lobes-at-path:ze u.huy r.p.q.i.xiq) + ?: =(s.p.q.i.xiq ear) (blub p.i.xiq) + =+ fud=(make-nako:ze u.nab u.huy) + (bleb p.i.xiq +(u.nab) fud) == - -- - :: - ++ do - |= [now=@da hen=duct [who=ship him=ship] syd=@tas ruf=raft] - =+ ^= rug ^- rung - =+ rug=(~(get by hoy.ruf) him) - ?^(rug u.rug *rung) - =+ ^= red ^- rede - =+ yit=(~(get by rus.rug) syd) - ?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome ~ ~ ~]) - ((de now hen ~ ~) [who him] syd red ran.ruf) - :: - ++ posh - |= [him=ship syd=desk red=rede ruf=raft] - ^- raft - =+ ^= rug ^- rung - =+ rug=(~(get by hoy.ruf) him) - ?^(rug u.rug *rung) - ruf(hoy (~(put by hoy.ruf) him rug(rus (~(put by rus.rug) syd red)))) - :: - ++ un :: domestic ship - |= [who=@p now=@da hen=duct ruf=raft] - =+ ^= yar ^- room - =+ yar=(~(get by fat.ruf) who) - ?~(yar *room u.yar) + == + ++ ze |% - ++ abet ruf(fat (~(put by fat.ruf) who yar)) - ++ pish - |= [syd=@ta red=rede run=rang] - %_ +> - ran.ruf run - dos.yar - (~(put by dos.yar) syd [qyx.red dom.red dok.red pok.red wok.red]) + ++ aeon-to-tako ~(got by hit.dom) + ++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki) + ++ lobe-to-blob ~(got by lat.ran) :: grab blob + ++ tako-to-yaki ~(got by hut.ran) + ++ make-direct :: make blob + |= [p=cage] + ^- blob + [%direct (mug p) p] + :: + ++ make-delta :: make blob delta + |= [p=lobe q=cage] + ^- blob + =+ t=[%delta 0 p q] + =+ ^= has + %^ cat 7 (sham [%blob q.q.q]) + (sham [%lobe p]) + [%delta has p q] + :: + ++ make-yaki :: make yaki + |= [p=(list tako) q=(map path lobe) t=@da] + ^- yaki + =+ ^= has + %^ cat 7 (sham [%yaki (roll p add) q t]) + (sham [%tako (roll p add) q t]) + [p q has t] + :: + ++ apply-changes :: apply-changes:ze + |= lar=(list ,[p=path q=misu]) :: store changes + ^- (map path blob) + =+ ^= hat :: current state + ?: =(let.dom 0) :: initial commit + ~ :: has nothing + =< q + %- aeon-to-yaki + let.dom + =- =+ sar=(sa (turn lar |=([p=path *] p))) :: changed paths + %+ roll (~(tap by hat) ~) :: find unchanged + |= [[pat=path gar=lobe] bat=_bar] + ?: (~(has in sar) pat) :: has update + bat + (~(put by bat) pat (lobe-to-blob gar)) :: use original + ^= bar ^- (map path blob) + %+ roll lar + |= [[pat=path mys=misu] bar=(map path blob)] + ^+ bar + ?- -.mys + %ins :: insert if not exist + ?: (~(has by bar) pat) !! :: + ?: (~(has by hat) pat) !! :: + %+ ~(put by bar) pat + %- make-direct + ?: &(?=(%mime -.p.mys) =([%hook ~] (slag (dec (lent pat)) pat))) + `cage`[%hook [%atom %t] +.+.q.q.p.mys] + ?: &(?=(%mime -.p.mys) =([%hoon ~] (slag (dec (lent pat)) pat))) + `cage`[%hoon [%atom %t] +.+.q.q.p.mys] + p.mys + %del :: delete if exists + ?. |((~(has by hat) pat) (~(has by bar) pat)) !! + (~(del by bar) pat) + %dif :: mutate, must exist + =+ ber=(~(get by bar) pat) :: XX typed + ?~ ber + =+ har=(~(get by hat) pat) + ?~ har !! + %+ ~(put by bar) pat + (make-delta u.har p.mys) + %+ ~(put by bar) pat + (make-delta p.u.ber p.mys) == :: - ++ wake - =+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a)) - =| moz=(list move) - =< [moz ..wake] - |- ^+ + - ?~ saz + - =+ sog=abet:wake:(di i.saz) - $(saz t.saz, moz (weld moz -.sog), ..wake (pish i.saz +.sog ran.ruf)) + ++ as-arch + ^- arch + :+ p.ank.dom + ?~(q.ank.dom ~ [~ p.u.q.ank.dom]) + |- ^- (map ,@ta ,~) + ?~ r.ank.dom ~ + [[p.n.r.ank.dom ~] $(r.ank.dom l.r.ank.dom) $(r.ank.dom r.r.ank.dom)] :: - ++ di - |= syd=@ta - =+ ^= saq ^- dojo - =+ saq=(~(get by dos.yar) syd) - ?~(saq *dojo u.saq) - %^ (de now hen hun.yar hez.yar) - [who who] - syd - [[now qyx.saq ~ dom.saq dok.saq pok.saq wok.saq] ran.ruf] + ++ case-to-aeon :: case-to-aeon:ze + |= lok=case :: act count through + ^- (unit aeon) + ?- -.lok + %da + ?: (gth p.lok lim) ~ + |- ^- (unit aeon) + ?: =(0 let.dom) [~ 0] :: avoid underflow + ?: %+ gte p.lok + =< t + %- aeon-to-yaki + let.dom + [~ let.dom] + $(let.dom (dec let.dom)) + :: + %tas (~(get by lab.dom) p.lok) + %ud ?:((gth p.lok let.dom) ~ [~ p.lok]) + == + :: + ++ checkout-ankh + |= hat=(map path cage) + ^- ankh + %- cosh + %+ roll (~(tap by hat) ~) + |= [[pat=path zar=cage] ank=ankh] + ^- ankh + %- cosh + ?~ pat + ank(q [~ (sham q.q.zar) zar]) + =+ nak=(~(get by r.ank) i.pat) + %= ank + r %+ ~(put by r.ank) i.pat + $(pat t.pat, ank (fall nak *ankh)) + == + :: + ++ cosh + |= ank=ankh + %_ ank + p + ^- cash + %+ mix ?~(q.ank 0 p.u.q.ank) + =+ axe=1 + |- ^- cash + ?~ r.ank *@ + ;: mix + (shaf %dash (mix axe (shaf %dush (mix p.n.r.ank p.q.n.r.ank)))) + $(r.ank l.r.ank, axe (peg axe 2)) + $(r.ank r.r.ank, axe (peg axe 3)) + == + == + :: + ++ construct-merge + |= [gem=germ her=ship sud=desk] + !! + :: + ++ edit :: edit:ze + |= [wen=@da lem=nuri] :: edit + ^- [(unit (map path lobe)) _..ze] + ?- -.lem + & =^ yak lat.ran :: merge objects + %+ forge-yaki wen + ?: =(let.dom 0) :: initial import + [~ p.lem] + [(some r:(aeon-to-yaki let.dom)) p.lem] + ?. ?| =(0 let.dom) + !=((lent p.yak) 1) + !(equiv q.yak q:(aeon-to-yaki let.dom)) + == + `..ze :: silently ignore + =: let.dom +(let.dom) + hit.dom (~(put by hit.dom) +(let.dom) r.yak) + hut.ran (~(put by hut.ran) r.yak yak) + == + [`q.yak ..ze] + :: +>.$(ank (checkout-ankh q.yak)) + | ?< (~(has by lab.dom) p.lem) + [~ ..ze(lab.dom (~(put by lab.dom) p.lem let.dom))] + == + :: + ++ equiv :: test paths + |= [p=(map path lobe) q=(map path lobe)] + ^- ? + =- ?. qat %.n + %+ levy (~(tap by q) ~) + |= [pat=path lob=lobe] + (~(has by p) pat) + ^= qat + %+ levy (~(tap by p) ~) + |= [pat=path lob=lobe] + =+ zat=(~(get by q) pat) + ?~ zat %.n + =(u.zat lob) + :: =((lobe-to-cage u.zat) (lobe-to-cage lob)) + :: + ++ forge-nori :: forge-nori:ze + |= yak=yaki :: forge nori + ^- nori + !! + :: ?~ p.yak !! :: no parent, no diff + :: :+ %& *cart :: diff w/ 1st parent + :: (~(tap by (diff-yakis (tako-to-yaki i.p.yak) yak)) ~) + ++ forge-yaki :: forge-yaki:ze + |= [wen=@da par=(unit tako) lem=suba] :: forge yaki + =+ ^= per + ?~ par ~ + ~[u.par] + =+ gar=(update-lat (apply-changes q.lem) lat.ran) + :- %^ make-yaki per +.gar wen :: from existing diff + -.gar :: fix lat + :: + ++ lobes-at-path :: lobes-at-path:ze + |= [yon=aeon pax=path] :: data at path + ^- (map path lobe) + ?: =(0 yon) ~ + %- mo + %+ skim + %. ~ + %~ tap by + =< q + %- aeon-to-yaki + yon + |= [p=path q=lobe] + ?| ?=(~ pax) + ?& !?=(~ p) + =(-.pax -.p) + $(p +.p, pax +.pax) + == == + :: + ++ query :: query:ze + |= ren=?(%u %v %x %y %z) :: endpoint query + ^- (unit cage) + ?- ren + %u [~ %rang !>(ran)] + %v [~ %dome !>(dom)] + %x ?~(q.ank.dom ~ [~ q.u.q.ank.dom]) + %y [~ %arch !>(as-arch)] + %z [~ %ankh !>(ank.dom)] + == + :: + ++ read :: read:ze + |= mun=mood :: read at point + ^- (unit cage) + ?: ?=(%v p.mun) + [~ %dome !>(dom)] + ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) + ?^(r.mun ~ [~ %aeon !>(let.dom)]) + ?: ?=(%w p.mun) + =+ ^= yak + %- aeon-to-yaki + let.dom + ?^(r.mun ~ [~ %w !>([t.yak (forge-nori yak)])]) + (query(ank.dom ank:(descend-path:(zu ank.dom) r.mun)) p.mun) + :: + ++ read-at-aeon :: read-at-aeon:ze + |= [yon=aeon mun=mood] :: seek and read + ^- (unit cage) + ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) :: NB only for speed + ?^(r.mun ~ [~ %aeon !>(yon)]) + %+ biff + (rewind yon) + |= a=_+>.$ + (read:a mun) + :: + ++ rewind :: rewind:ze + |= yon=aeon :: rewind to aeon + ^- (unit ,_+>) + ?: =(let.dom yon) `+> + ?: (gth yon let.dom) !! :: don't have version + =+ hat=q:(aeon-to-yaki yon) + ?: (~(any by hat) |=(a=lobe ?=(%delta [-:(lobe-to-blob a)]))) + ~ + =+ ^- (map path cage) + %- ~(run by hat) + |= a=lobe + =+ (lobe-to-blob a) + ?-(-.- %direct q.-, %indirect q.-, %delta !!) + `+>.$(ank.dom (checkout-ankh -), let.dom yon) + :: + ++ update-lat :: update-lat:ze + |= [lag=(map path blob) sta=(map lobe blob)] :: fix lat + ^- [(map lobe blob) (map path lobe)] + %+ roll (~(tap by lag) ~) + |= [[pat=path bar=blob] [lut=_sta gar=(map path lobe)]] + ?~ (~(has by lut) p.bar) + [lut (~(put by gar) pat p.bar)] + :- (~(put by lut) p.bar bar) + (~(put by gar) pat p.bar) + ++ zu :: filesystem + |= ank=ankh :: filesystem state + =| ram=path :: reverse path into + |% + ++ descend :: descend + |= lol=@ta + ^+ +> + =+ you=(~(get by r.ank) lol) + +>.$(ram [lol ram], ank ?~(you [*cash ~ ~] u.you)) + :: + ++ descend-path :: descend recursively + |= way=path + ^+ +> + ?~(way +> $(way t.way, +> (descend i.way))) + :: + -- -- +-- +:: +++ do + |= [now=@da hen=duct [who=ship him=ship] syd=@tas ruf=raft] + =+ ^= rug ^- rung + =+ rug=(~(get by hoy.ruf) him) + ?^(rug u.rug *rung) + =+ ^= red ^- rede + =+ yit=(~(get by rus.rug) syd) + ?^(yit u.yit `rede`[~2000.1.1 ~ [~ *rind] *dome ~ ~]) + ((de now hen ~ ~) [who him] syd red ran.ruf) +:: +++ posh + |= [him=ship syd=desk red=rede ruf=raft] + ^- raft + =+ ^= rug ^- rung + =+ rug=(~(get by hoy.ruf) him) + ?^(rug u.rug *rung) + ruf(hoy (~(put by hoy.ruf) him rug(rus (~(put by rus.rug) syd red)))) +:: +++ un :: domestic ship + |= [who=@p now=@da hen=duct ruf=raft] + =+ ^= yar ^- room + =+ yar=(~(get by fat.ruf) who) + ?~(yar *room u.yar) + |% + ++ abet ruf(fat (~(put by fat.ruf) who yar)) + ++ pish + |= [syd=@ta red=rede run=rang] + %_ +> + ran.ruf run + dos.yar + (~(put by dos.yar) syd [qyx.red dom.red dok.red wok.red]) + == + :: + ++ wake + =+ saz=(turn (~(tap by dos.yar) ~) |=([a=@tas b=*] a)) + =| moz=(list move) + =< [moz ..wake] + |- ^+ + + ?~ saz + + =+ sog=abet:wake:(di i.saz) + $(saz t.saz, moz (weld moz -.sog), ..wake (pish i.saz +.sog ran.ruf)) + :: + ++ di + |= syd=@ta + =+ ^= saq ^- dojo + =+ saq=(~(get by dos.yar) syd) + ?~(saq *dojo u.saq) + %^ (de now hen hun.yar hez.yar) + [who who] + syd + [[now qyx.saq ~ dom.saq dok.saq wok.saq] ran.ruf] -- - :::::::::::::::::::::::::::::::::::::::::::::::::::::::: - :: section 4cA, filesystem vane :: - :: :: - =| :: instrument state - $: %0 :: vane version - ruf=raft :: revision tree - == :: - |= [now=@da eny=@ ski=sled] :: activate - ^? :: opaque core - |% :: - ++ call :: handle request - |= $: hen=duct - hic=(hypo (hobo kiss)) +-- +:::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: section 4cA, filesystem vane :: +:: :: +=| :: instrument state + $: %0 :: vane version + ruf=raft :: revision tree + == :: +|= [now=@da eny=@ ski=sled] :: activate +^? :: opaque core +|% :: +++ call :: handle request + |= $: hen=duct + hic=(hypo (hobo kiss)) + == + => %= . :: XX temporary + q.hic + ^- kiss + ?: ?=(%soft -.q.hic) + =+ + ~|([%bad-soft (,@t -.p.q.hic)] ((soft kiss) p.q.hic)) + ?~ - + ~& [%bad-softing (,@t -.p.q.hic)] !! + u.- + ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic + ~& [%clay-call-flub (,@tas `*`-.q.hic)] + ((hard kiss) q.hic) + == + ^- [p=(list move) q=_..^$] + ?- -.q.hic + %font + ?: (~(has by sor.ruf) +.q.hic) `..^$ + :_ ..^$(sor.ruf (~(put by sor.ruf) +.q.hic hen)) + :: XX pass %merg and handle response + :~ :* hen %pass + /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y + %c %warp [p.q.hic r.q.hic] s.q.hic + `[%& %y [%da now] /] == - => %= . :: XX temporary - q.hic - ^- kiss - ?: ?=(%soft -.q.hic) - =+ - ~|([%bad-soft (,@t -.p.q.hic)] ((soft kiss) p.q.hic)) - ?~ - - ~& [%bad-softing (,@t -.p.q.hic)] !! - u.- - ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic - ~& [%clay-call-flub (,@tas `*`-.q.hic)] - ((hard kiss) q.hic) - == - ^- [p=(list move) q=_..^$] - ?- -.q.hic - %font - ?: (~(has by sor.ruf) +.q.hic) `..^$ - :_ ..^$(sor.ruf (~(put by sor.ruf) +.q.hic hen)) - :~ :* hen %pass - /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y - %c %warp [p.q.hic r.q.hic] s.q.hic - `[%& %y [%da now] /] - == - == - :: - %init - :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~])) - =+ bos=(sein p.q.hic) - ~& [%bos bos p.q.hic] - ?: =(bos p.q.hic) ~ - ^- (list move) - %+ turn (limo ~[%main %arvo %try]) - |= syd=@tas - [hen %pass / %c %font p.q.hic syd bos syd] - :: - %info - ?: =(%$ q.q.hic) - [~ ..^$] - =^ mos ruf - =+ une=(un p.q.hic now hen ruf) - =+ ^= zat - (exec:(di:wake:une q.q.hic) now r.q.hic) - =+ zot=abet.zat - :- -.zot - =. une (pish:une q.q.hic +.zot ran.zat) - abet:une - [mos ..^$] - :: - %into - =+ yar=(~(got by fat.ruf) p.q.hic) - :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen]))) - ^- (list move) - ?: =(%$ q.q.hic) - ~ - =+ dos=(~(get by dos.yar) q.q.hic) - ?: &(?=(^ dos) !=(0 +>-.+<.+.dos)) :: ank.s.u.dos - ?: =(ank.dom.u.dos q.q.hic) - ~ - :_ ~ - :* hen %slip %c %info p.q.hic q.q.hic %& - (khan-to-soba `ank.dom.u.dos `r.q.hic) - == - =+ cos=(khan-to-soba ~ `r.q.hic) - =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] - %+ skid q.cos - |= [a=path b=miso] - ?& ?=(%ins -.b) - ?=(%mime p.p.b) - =+ (slag (dec (lent a)) a) - ?| =([%hook ~] -) - =([%hoon ~] -) - == == - :~ [hen %slip %c %info p.q.hic q.q.hic %& p.cos one] - [hen %slip %c %info p.q.hic q.q.hic %& p.cos two] - == - :: - %merg :: direct state up - =^ mos ruf - =+ une=(un p.q.hic now hen ruf) - =+ ^= zat - (exem:(di:wake:une q.q.hic) now r.q.hic) - =+ zot=abet.zat - :- -.zot - =. une (pish:une q.q.hic +.zot ran.zat) - abet:une(hez.yar ?.(=(%into -.q.hic) hez.yar.une [~ hen])) - [mos ..^$] - :: - %plug - ?. (~(has by sor.ruf) +.q.hic) `..^$ - :_ ..^$(sor.ruf (~(del by sor.ruf) +.q.hic)) - =+ hyn=(~(got by sor.ruf) +.q.hic) - :~ :* hyn %pass - /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y - %c %warp [p.q.hic r.q.hic] s.q.hic ~ - == - :* hyn %pass - /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/v - %c %warp [p.q.hic r.q.hic] s.q.hic ~ - == - == - :: - %warp - =^ mos ruf - ?: =(p.p.q.hic q.p.q.hic) - =+ une=(un p.p.q.hic now hen ruf) - =+ wex=(di:une p.q.q.hic) - =+ ^= wao - ?~ q.q.q.hic - ease:wex - (eave:wex u.q.q.q.hic) - =+ ^= woo - abet:wao - [-.woo abet:(pish:une p.q.q.hic +.woo ran.wao)] - =+ wex=(do now hen p.q.hic p.q.q.hic ruf) - =+ ^= woo - ?~ q.q.q.hic - abet:ease:wex - abet:(eave:wex u.q.q.q.hic) - [-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)] - [mos ..^$] - :: - %wart - ?> ?=(%re q.q.hic) - =+ ryf=((hard riff) s.q.hic) - :_ ..^$ - :~ :- hen - :^ %pass [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic] - %c - [%warp [p.p.q.hic p.p.q.hic] ryf] - == == :: - ++ doze - |= [now=@da hen=duct] - ^- (unit ,@da) - ~ + %init + :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic [hen ~ ~])) + =+ bos=(sein p.q.hic) + ~& [%bos bos p.q.hic] + ?: =(bos p.q.hic) ~ + ^- (list move) + %+ turn (limo ~[%main %arvo %try]) + |= syd=@tas + [hen %pass / %c %font p.q.hic syd bos syd] :: - ++ load - |= old=[%0 ruf=raft] - ^+ ..^$ - ..^$(ruf ruf.old) - :: - ++ scry :: inspect - |= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path] - ^- (unit (unit cage)) - =+ got=(~(has by fat.ruf) his) - =+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot)) - ?~ luk [~ ~] - ?: =(%$ ren) - [~ ~] - =+ run=((soft care) ren) - ?~ run [~ ~] - %. [u.run u.luk tyl] - =< aver - ?: got - (di:(un his now ~ ruf) syd) - (do now ~ [his his] syd ruf) - :: - ++ stay [%0 ruf] - ++ take :: accept response - |= [tea=wire hen=duct hin=(hypo sign)] - ^- [p=(list move) q=_..^$] - ?: ?=([%auto @ @ @ @ ?(%y %v) ~] tea) - ?> ?=(%writ -.+.q.hin) - =+ our=(slav %p i.t.tea) - =* sud i.t.t.tea - =+ her=(slav %p i.t.t.t.tea) - =* syd i.t.t.t.t.tea - =+ une=(un our now hen ruf) - =+ wex=(di:une syd) - =+ wao=(sync:wex her sud p.q.hin) - =+ woo=abet:wao - [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] - ?- -.+.q.hin - %crud - [[[hen %slip %d %flog +.q.hin] ~] ..^$] - :: - %made - ?~ tea !! - ?+ -.tea !! - %casting - ?> ?=([@ @ @ *] t.tea) - =+ who=(slav %p i.t.tea) - =+ syd=(slav %tas i.t.t.tea) - =+ wen=(slav %da i.t.t.t.tea) - =^ mos ruf - =+ une=(un who now hen ruf) - =+ ^= zat - (take-cast:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) - =+ zot=abet.zat - [-.zot abet:(pish:une syd +.zot ran.zat)] - [mos ..^$] - :: - %diffing - ?> ?=([@ @ @ *] t.tea) - =+ who=(slav %p i.t.tea) - =+ syd=(slav %tas i.t.t.tea) - =+ wen=(slav %da i.t.t.t.tea) - =^ mos ruf - =+ une=(un who now hen ruf) - =+ ^= zat - (take-diff:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) - =+ zot=abet.zat - [-.zot abet:(pish:une syd +.zot ran.zat)] - [mos ..^$] - :: - %patching - ?> ?=([@ @ *] t.tea) - =+ who=(slav %p i.t.tea) - =+ syd=(slav %tas i.t.t.tea) - =^ mos ruf - ?: (~(has by fat.ruf) who) - =+ une=(un who now hen ruf) - =+ ^= zat - (take-patch:(di:wake:une syd) t.t.t.tea p.q.hin) - =+ zot=abet.zat - [-.zot abet:(pish:une syd +.zot ran.zat)] - =+ zax=(do now hen [who who] syd ruf) - =+ ^= zat - (take-patch:zax t.t.t.tea p.q.hin) - =+ zot=abet.zat - [-.zot (posh who syd +.zot ruf)] - [mos ..^$] - :: - %ergoing - ?> ?=([@ @ *] t.tea) - =+ who=(slav %p i.t.tea) - =+ syd=(slav %tas i.t.t.tea) - =^ mos ruf - =+ une=(un who now hen ruf) - =+ ^= zat - (take-ergo:(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) - =+ syd=(need (slaw %tas i.tea)) - =+ inx=(need (slaw %ud i.t.tea)) - =+ ^= zat - =< wake - (knit:(do now hen p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)]) - =^ mos ruf - =+ zot=abet.zat - [-.zot (posh q.p.+.q.hin syd +.zot ruf)] - [mos ..^$(ran.ruf ran.zat)] :: merge in new obj - :: - %wake - =+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a)) - =| mos=(list move) - |- ^- [p=(list move) q=_..^^$] - ?~ dal [mos ..^^$] - =+ une=(un i.dal now hen ruf) - =^ som une wake:une - $(dal t.dal, ruf abet:une, mos (weld som mos)) - :: - %writ - ?> ?=([@ @ *] tea) - =+ our=(need (slaw %p i.tea)) - =+ him=(need (slaw %p i.t.tea)) - :_ ..^$ - :~ :- hen - [%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]] - == - :: - %went - ?: =(%good q.+.q.hin) [~ ..^$] - ~& [%clay-lost p.+.q.hin tea] + %info + ?: =(%$ q.q.hic) [~ ..^$] - == - ++ khan-to-soba - |= [ank=(unit ankh) kan=(unit khan)] - ^- soba - :- *cart - =| pax=path - |- ^- (list ,[p=path q=miso]) - ?~ ank - ?~ kan + =^ mos ruf + =+ une=(un p.q.hic now hen ruf) + =+ ^= zat + (exec:(di:wake:une q.q.hic) now r.q.hic) + =+ zot=abet.zat + :- -.zot + =. une (pish:une q.q.hic +.zot ran.zat) + abet:une + [mos ..^$] + :: + %into + =+ yar=(~(got by fat.ruf) p.q.hic) + :_ ..^$(fat.ruf (~(put by fat.ruf) p.q.hic yar(hez [~ hen]))) + ^- (list move) + ?: =(%$ q.q.hic) + ~ + =+ dos=(~(get by dos.yar) q.q.hic) + ?: &(?=(^ dos) !=(0 +>-.+<.+.dos)) :: ank.s.u.dos + ?: =(ank.dom.u.dos q.q.hic) ~ - =+ =+ (~(tap by dir.u.kan)) - |-(?~(+< ~ (weld ^$(pax [p.i pax], kan `q.i) $(+< t)))) - ?~ fil.u.kan - - - ?~ u.fil.u.kan - - - [[(flop pax) %ins u.u.fil.u.kan] -] + :_ ~ + :* hen %slip %c %info p.q.hic q.q.hic %& + (khan-to-soba `ank.dom.u.dos `r.q.hic) + == + =+ cos=(khan-to-soba ~ `r.q.hic) + =+ ^- [one=(list ,[path miso]) two=(list ,[path miso])] + %+ skid q.cos + |= [a=path b=miso] + ?& ?=(%ins -.b) + ?=(%mime p.p.b) + =+ (slag (dec (lent a)) a) + ?| =([%hook ~] -) + =([%hoon ~] -) + == == + :~ [hen %slip %c %info p.q.hic q.q.hic %& p.cos one] + [hen %slip %c %info p.q.hic q.q.hic %& p.cos two] + == + :: + %merg :: direct state up + :_ ..^$ + :~ :* hen %pass + /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y + %c %warp [p.q.hic r.q.hic] s.q.hic + `[%& %y [%da now] /] + == + == + :: + %plug + ?. (~(has by sor.ruf) +.q.hic) `..^$ + :_ ..^$(sor.ruf (~(del by sor.ruf) +.q.hic)) + =+ hyn=(~(got by sor.ruf) +.q.hic) + :~ :* hyn %pass + /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y + %c %warp [p.q.hic r.q.hic] s.q.hic ~ + == + :* hyn %pass + /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/v + %c %warp [p.q.hic r.q.hic] s.q.hic ~ + == + == + :: + %warp + =^ mos ruf + ?: =(p.p.q.hic q.p.q.hic) + =+ une=(un p.p.q.hic now hen ruf) + =+ wex=(di:une p.q.q.hic) + =+ ^= wao + ?~ q.q.q.hic + ease:wex + (eave:wex u.q.q.q.hic) + =+ ^= woo + abet:wao + [-.woo abet:(pish:une p.q.q.hic +.woo ran.wao)] + =+ wex=(do now hen p.q.hic p.q.q.hic ruf) + =+ ^= woo + ?~ q.q.q.hic + abet:ease:wex + abet:(eave:wex u.q.q.q.hic) + [-.woo (posh q.p.q.hic p.q.q.hic +.woo ruf)] + [mos ..^$] + :: + %wart + ?> ?=(%re q.q.hic) + =+ ryf=((hard riff) s.q.hic) + :_ ..^$ + :~ :- hen + :^ %pass [(scot %p p.p.q.hic) (scot %p q.p.q.hic) r.q.hic] + %c + [%warp [p.p.q.hic p.p.q.hic] ryf] + == + == +:: +++ doze + |= [now=@da hen=duct] + ^- (unit ,@da) + ~ +:: +++ load + |= old=[%0 ruf=raft] + ^+ ..^$ + ..^$(ruf ruf.old) +:: +++ scry :: inspect + |= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path] + ^- (unit (unit cage)) + =+ got=(~(has by fat.ruf) his) + =+ luk=?.(?=(%$ -.lot) ~ ((soft case) p.lot)) + ?~ luk [~ ~] + ?: =(%$ ren) + [~ ~] + =+ run=((soft care) ren) + ?~ run [~ ~] + %. [u.run u.luk tyl] + =< aver + ?: got + (di:(un his now ~ ruf) syd) + (do now ~ [his his] syd ruf) +:: +++ stay [%0 ruf] +++ take :: accept response + |= [tea=wire hen=duct hin=(hypo sign)] + ^- [p=(list move) q=_..^$] + ?: ?=([%auto @ @ @ @ germ ?(%y %v) ~] tea) + ?> ?=(%writ -.+.q.hin) + =+ our=(slav %p i.t.tea) + =* syd i.t.t.tea + =+ her=(slav %p i.t.t.t.tea) + =* sud i.t.t.t.t.tea + =+ gem=i.t.t.t.t.t.tea + =+ une=(un our now hen ruf) + =+ wex=(di:une syd) + =+ wao=(merge-desks:wex her sud gem p.q.hin) + =+ woo=abet:wao + [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] + ?- -.+.q.hin + %crud + [[[hen %slip %d %flog +.q.hin] ~] ..^$] + :: + %made + ?~ tea !! + ?+ -.tea !! + %casting + ?> ?=([@ @ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =+ wen=(slav %da i.t.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-cast:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + [mos ..^$] + :: + %diffing + ?> ?=([@ @ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =+ wen=(slav %da i.t.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-diff:(di:wake:une syd) wen t.t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + [mos ..^$] + :: + %patching + ?> ?=([@ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =^ mos ruf + ?: (~(has by fat.ruf) who) + =+ une=(un who now hen ruf) + =+ ^= zat + (take-patch:(di:wake:une syd) t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot abet:(pish:une syd +.zot ran.zat)] + =+ zax=(do now hen [who who] syd ruf) + =+ ^= zat + (take-patch:zax t.t.t.tea p.q.hin) + =+ zot=abet.zat + [-.zot (posh who syd +.zot ruf)] + [mos ..^$] + :: + %ergoing + ?> ?=([@ @ *] t.tea) + =+ who=(slav %p i.t.tea) + =+ syd=(slav %tas i.t.t.tea) + =^ mos ruf + =+ une=(un who now hen ruf) + =+ ^= zat + (take-ergo:(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) + =+ syd=(need (slaw %tas i.tea)) + =+ inx=(need (slaw %ud i.t.tea)) + =+ ^= zat + =< wake + (knit:(do now hen p.+.q.hin syd ruf) [inx ((hard riot) q.+.q.hin)]) + =^ mos ruf + =+ zot=abet.zat + [-.zot (posh q.p.+.q.hin syd +.zot ruf)] + [mos ..^$(ran.ruf ran.zat)] :: merge in new obj + :: + %wake + =+ dal=(turn (~(tap by fat.ruf) ~) |=([a=@p b=room] a)) + =| mos=(list move) + |- ^- [p=(list move) q=_..^^$] + ?~ dal [mos ..^^$] + =+ une=(un i.dal now hen ruf) + =^ som une wake:une + $(dal t.dal, ruf abet:une, mos (weld som mos)) + :: + %writ + ?> ?=([@ @ *] tea) + =+ our=(need (slaw %p i.tea)) + =+ him=(need (slaw %p i.t.tea)) + :_ ..^$ + :~ :- hen + [%pass ~ %a [%want [our him] [%r %re %c t.t.tea] p.+.q.hin]] + == + :: + %went + ?: =(%good q.+.q.hin) [~ ..^$] + ~& [%clay-lost p.+.q.hin tea] + [~ ..^$] + == +++ khan-to-soba + |= [ank=(unit ankh) kan=(unit khan)] + ^- soba + :- *cart + =| pax=path + |- ^- (list ,[p=path q=miso]) + ?~ ank ?~ kan - =+ =+ (~(tap by r.u.ank)) - |-(?~(+< ~ (weld ^$(pax [p.i pax], ank `q.i) $(+< t)))) - ?~ q.u.ank - - - [[(flop pax) %del q.u.q.u.ank] -] - =+ %+ weld - =+ (~(tap by r.u.ank)) - |- ^- (list ,[p=path q=miso]) - ?~ +< ~ - %- weld :_ $(+< t) - ^$(pax [p.i pax], ank `q.i, kan (~(get by dir.u.kan) p.i)) - =+ (~(tap by dir.u.kan)) - |- ^- (list ,[p=path q=miso]) - ?~ +< ~ - ?: (~(has by r.u.ank) p.i) $(+< t) - %- weld :_ $(+< t) - ^$(pax [p.i pax], kan `q.i, ank ~) - ?~ q.u.ank - ?~ fil.u.kan - - - ?~ u.fil.u.kan - - - [[(flop pax) %ins u.u.fil.u.kan] -] + ~ + =+ =+ (~(tap by dir.u.kan)) + |-(?~(+< ~ (weld ^$(pax [p.i pax], kan `q.i) $(+< t)))) ?~ fil.u.kan - ?~ u.fil.u.kan - [[(flop pax) %del q.u.q.u.ank] -] - [[(flop pax) %mut q.u.q.u.ank u.u.fil.u.kan] -] - -- + - + [[(flop pax) %ins u.u.fil.u.kan] -] + ?~ kan + =+ =+ (~(tap by r.u.ank)) + |-(?~(+< ~ (weld ^$(pax [p.i pax], ank `q.i) $(+< t)))) + ?~ q.u.ank + - + [[(flop pax) %del q.u.q.u.ank] -] + =+ %+ weld + =+ (~(tap by r.u.ank)) + |- ^- (list ,[p=path q=miso]) + ?~ +< ~ + %- weld :_ $(+< t) + ^$(pax [p.i pax], ank `q.i, kan (~(get by dir.u.kan) p.i)) + =+ (~(tap by dir.u.kan)) + |- ^- (list ,[p=path q=miso]) + ?~ +< ~ + ?: (~(has by r.u.ank) p.i) $(+< t) + %- weld :_ $(+< t) + ^$(pax [p.i pax], kan `q.i, ank ~) + ?~ q.u.ank + ?~ fil.u.kan + - + ?~ u.fil.u.kan + - + [[(flop pax) %ins u.u.fil.u.kan] -] + ?~ fil.u.kan + - + ?~ u.fil.u.kan + [[(flop pax) %del q.u.q.u.ank] -] + [[(flop pax) %mut q.u.q.u.ank u.u.fil.u.kan] -] +-- diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 3afe272b8..75c20c60b 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2828,8 +2828,7 @@ == :: ++ deed ,[p=@ q=step r=?] :: sig, stage, fake? ++ dome :: project state - $: ang=agon :: pedigree - ank=ankh :: state + $: ank=ankh :: state let=@ud :: top id hit=(map ,@ud tako) :: changes by id lab=(map ,@tas ,@ud) :: labels From 0e128a1a3e5cf4f54df63c226e974d247ecb4f20 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 10 Feb 2015 20:36:02 -0500 Subject: [PATCH 31/73] waypoint --- arvo/clay.hoon | 31 +++++++++++++++++++++---------- arvo/ford.hoon | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index b62b59016..cb81aee78 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -82,13 +82,14 @@ [%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 + [%done p=(set beam) q=gage] :: literal [%dude p=tank q=silk] :: error wrap - [%dune p=(set beam) q=(unit cage)] :: unit literal + [%dune p=(set beam) q=(unit gage)] :: unit literal [%mute p=silk q=(list (pair wing silk))] :: mutant [%pact p=silk q=silk] :: patch [%reef ~] :: kernel reef [%ride p=twig q=silk] :: silk thru twig + [%tabl p=(list (pair silk silk))] :: list [%vale p=mark q=ship r=*] :: validate [our his] == :: ++ raft :: filesystem @@ -347,6 +348,7 @@ ++ edit :: apply changes |= [wen=@da lem=nori] ^+ +> + ~& > [%editing syd] ?: ?=(%| -.lem) =^ hat +>.$ (edit:ze wen lem) @@ -512,7 +514,7 @@ +>.$ :: ++ take-patch - |= [pax=path res=(each bead (list tank))] + |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) %_ +>.$ @@ -576,14 +578,15 @@ ++ checkout-ankh |= hat=(map path lobe) ^+ +> + ~& > [%first-checkout syd (lent (~(tap by hat)))] %_ +>.$ tag :_ tag :^ hen - [%patching (scot %p who) syd pax] + [%patching (scot %p who) syd ~] %f :^ %exec who ~ :- %tabl - ^- (list (pair silk)) + ^- (list (pair silk silk)) %+ turn (~(tap by hat)) |= [a=path b=lobe] ^- (pair silk silk) @@ -593,7 +596,7 @@ ?- -.bob %direct [%done ~ q.bob] %indirect [%done ~ q.bob] - %delta [%pact $(bar q.bob) [%done ~ r.bob]] + %delta [%pact $(b q.bob) [%done ~ r.bob]] == == :: @@ -835,7 +838,8 @@ let.dom =- =+ sar=(sa (turn lar |=([p=path *] p))) :: changed paths %+ roll (~(tap by hat) ~) :: find unchanged - |= [[pat=path gar=lobe] bat=_bar] + =< .(bat bar) + |= [[pat=path gar=lobe] bat=(map path blob)] ?: (~(has in sar) pat) :: has update bat (~(put by bat) pat (lobe-to-blob gar)) :: use original @@ -977,6 +981,7 @@ :: ?~ p.yak !! :: no parent, no diff :: :+ %& *cart :: diff w/ 1st parent :: (~(tap by (diff-yakis (tako-to-yaki i.p.yak) yak)) ~) + :: ++ forge-yaki :: forge-yaki:ze |= [wen=@da par=(unit tako) lem=suba] :: forge yaki =+ ^= per @@ -1004,6 +1009,11 @@ $(p +.p, pax +.pax) == == :: + ++ make-nako :: gack a through b + |= [a=aeon b=aeon] + ^- [(map aeon tako) aeon (set yaki) (set blob)] + !! + :: ++ query :: query:ze |= ren=?(%u %v %x %y %z) :: endpoint query ^- (unit cage) @@ -1063,6 +1073,7 @@ [lut (~(put by gar) pat p.bar)] :- (~(put by lut) p.bar bar) (~(put by gar) pat p.bar) + :: ++ zu :: filesystem |= ank=ankh :: filesystem state =| ram=path :: reverse path into @@ -1356,19 +1367,19 @@ [mos ..^$] :: %patching - ?> ?=([@ @ *] t.tea) + ?> ?=([@ @ ~] t.tea) =+ who=(slav %p i.t.tea) =+ syd=(slav %tas i.t.t.tea) =^ mos ruf ?: (~(has by fat.ruf) who) =+ une=(un who now hen ruf) =+ ^= zat - (take-patch:(di:wake:une syd) t.t.t.tea p.q.hin) + (take-patch:(di:wake:une syd) p.q.hin) =+ zot=abet.zat [-.zot abet:(pish:une syd +.zot ran.zat)] =+ zax=(do now hen [who who] syd ruf) =+ ^= zat - (take-patch:zax t.t.t.tea p.q.hin) + (take-patch:zax p.q.hin) =+ zot=abet.zat [-.zot (posh who syd +.zot ruf)] [mos ..^$] diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 333bbcce7..922d1137e 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -986,7 +986,7 @@ |= [cof=cafe rex=(list (pair marc marc)) rey=vase] (fine cof [[p.key p.val] rex] (slop (slop q.key q.val) rey)) |= [cof=cafe rex=(list (pair marc marc)) rey=vase] - (fine cof [%tabl rex] !>(rex)) + (fine cof [%tabl rex] rey) :: %vale %+ cool |.(leaf/"ford: vale {} {} {<`@p`(mug r.kas)>}") From 428aaa0674526a7d713e9224badb82aae3558e30 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 11 Feb 2015 20:41:05 -0500 Subject: [PATCH 32/73] waypoint --- arvo/clay.hoon | 156 ++++++++++++++++++++++----------------- main/app/shell/core.hook | 8 +- 2 files changed, 92 insertions(+), 72 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index cb81aee78..b71d0f2f2 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -297,7 +297,9 @@ ++ echo :: announce changes |= [wen=@da mim=(map path mime) lem=nori] ^+ +> - =. yel + ~& [%echoing syd] + %_ +>.$ + yel =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] ?- -.lem | :_ yel @@ -310,39 +312,6 @@ ?-(-.q.i.q.p.lem %del '-', %ins '+', %mut ':', %dif ';') [%leaf (spud (weld pre p.i.q.p.lem))] == - ?~ hez +>.$ - ?. ?=(%& -.lem) +>.$ - =+ ^= ceq - |= a=miso - ?| ?=(%del -.a) - &(?=(%ins -.a) ?=(%mime -.+.a)) - &(?=(%mut -.a) ?=(%mime -.+>.a)) - == - =. wok - :+ ~ - %+ murn `(list ,[path miso])`q.p.lem - |= [a=path b=miso] - ?: ?=(%del -.b) (some a ~) - (bind (~(get by mim) a) |=(c=mime [a (some c)])) - %+ murn `(list ,[path miso])`q.p.lem - |=([a=path b=miso] ?:((ceq b) ~ (some a))) - ?> ?=(^ wok) - ?~ lon.u.wok - apply-ergo - %_ +>.$ - tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) - %- welp :_ tag - ^- (list ,[duct path note]) - %+ murn `(list ,[path miso])`q.p.lem - |= [a=path b=miso] - ?: (ceq b) - ~ - %- some - :+ u.hez - [%ergoing (scot %p who) syd a] - :* %f %exec who ~ %cast %mime %done ~ - ~|(%bad-echo (need (read:ze %x [%ud let.dom] a))) - == == :: ++ edit :: apply changes @@ -356,7 +325,7 @@ +>.$ (echo:(checkout-ankh u.hat) wen ~ lem) ?. =(~ dok) - ~& %already-applying-changes !! + ~& %already-applying-changes +> =+ ^= sop |= [a=path b=miso] ^- ? @@ -432,16 +401,14 @@ ++ apply-edit |= wen=@da ^+ +> - =^ hat +>.$ - (edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) + ~& [%applying-edit syd] + =+ ^= hat + (edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) ?~ dok ~& %no-changes !! ?^ lon.u.dok ~& %not-done-diffing !! - ?~ hat - (echo(dok ~) wen mim.u.dok %& *cart sot.u.dok) - %^ echo:(checkout-ankh(dok ~) u.hat) - wen - mim.u.dok - [%& *cart sot.u.dok] + ?~ -.hat + ([echo(dok ~)]:.(+>.$ +.hat) wen mim.u.dok %& *cart sot.u.dok) + (checkout-ankh u.-.hat) :: ++ apply-ergo ^+ . @@ -516,33 +483,81 @@ ++ take-patch |= res=(each bead (list tank)) ^+ +> + ~& [%taking-patch syd] ?: ?=(%| -.res) %_ +>.$ + dok ~ yel [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] == + =^ hat +>.$ + (edit:ze now %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) + ?~ dok ~& %no-dok +>.$ + ?^ lon.u.dok ~& %not-done-diffing !! + => + %= . + +>.$ + ?< ?=(~ hat) + %^ echo:(checkout-ankh u.hat) + now + mim.u.dok + [%& *cart sot.u.dok] + == + ?~ dok ~& %no-dok +>.$ + ?^ lon.u.dok ~& %not-done-diffing !! + =+ cay=q.p.res + ?@ p.cay ~| %patch-bad-marc !! + =+ ^= can + |- ^- (list ,[path cage]) + ?~ p.p.cay + ~ + :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?. ?=(%path p.i.p.p.cay) + ~| %patch-strange-marc-a + !! + ?. ?=(@ q.i.p.p.cay) + ~| %patch-strange-marc-b + !! + =+ coy=(slot 2 q.cay) + ?@ q.coy + ~| %patch-strange-coy + !! + :- ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + =. ank.dom (checkout-ankh:ze (mo can)) + ?~ hez +>.$(dok ~) + =+ ^= ceq + |= a=miso + ?| ?=(%del -.a) + &(?=(%ins -.a) ?=(%mime -.+.a)) + &(?=(%mut -.a) ?=(%mime -.+>.a)) + == + =. wok + :+ ~ + %+ murn sot.u.dok + |= [a=path b=miso] + ?: ?=(%del -.b) (some a ~) + (bind (~(get by mim.u.dok) a) |=(c=mime [a (some c)])) + %+ murn sot.u.dok + |=([a=path b=miso] ?:((ceq b) ~ (some a))) + ?> ?=(^ wok) + ?~ lon.u.wok + apply-ergo(dok ~) %_ +>.$ - ank.dom - =+ cay=q.p.res - ?@ p.cay ~| %patch-bad-marc !! - %- checkout-ankh:ze - %- mo - |- ^- (list ,[path cage]) - ?~ p.p.cay + dok ~ + tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) + %- welp :_ tag + ^- (list ,[duct path note]) + %+ murn sot.u.dok + |= [a=path b=miso] + ?: (ceq b) ~ - :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?. ?=(%path p.i.p.p.cay) - ~| %patch-strange-marc-a - !! - ?. ?=(@ q.i.p.p.cay) - ~| %patch-strange-marc-b - !! - =+ coy=(slot 2 q.cay) - ?@ q.coy - ~| %patch-strange-coy - !! - :- ((hard path) -.q.coy) - [q.i.p.p.cay (slot 3 coy)] + %- some + :+ u.hez + [%ergoing (scot %p who) syd a] + :* %f %exec who ~ %cast %mime %done ~ + ~|((crip <[%bad-echo syd let.dom a]>) (need (read:ze %x [%ud let.dom] a))) + == == :: ++ take-ergo @@ -769,8 +784,8 @@ (blab p.i.xiq p.q.i.xiq u.u.cas) == =+ nao=(case-to-aeon:ze q.p.q.i.xiq) - ?~ nao $(xiq t.xiq, xaq [i.xiq xaq]) - $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) + ?~ nao ~& [%not-waking syd] $(xiq t.xiq, xaq [i.xiq xaq]) + ~& [%waking syd] $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) :: | =+ mot=`moot`p.q.i.xiq @@ -842,7 +857,8 @@ |= [[pat=path gar=lobe] bat=(map path blob)] ?: (~(has in sar) pat) :: has update bat - (~(put by bat) pat (lobe-to-blob gar)) :: use original + %+ ~(put by bat) pat + ~|((crip ) (lobe-to-blob gar)) :: use original ^= bar ^- (map path blob) %+ roll lar |= [[pat=path mys=misu] bar=(map path blob)] @@ -1012,7 +1028,10 @@ ++ make-nako :: gack a through b |= [a=aeon b=aeon] ^- [(map aeon tako) aeon (set yaki) (set blob)] - !! + :^ hit.dom + let.dom + (sa `(list yaki)`(turn (~(tap by hut.ran)) |=([tako yaki] +<+))) + (sa `(list blob)`(turn (~(tap by lat.ran)) |=([lobe blob] +<+))) :: ++ query :: query:ze |= ren=?(%u %v %x %y %z) :: endpoint query @@ -1068,7 +1087,8 @@ |= [lag=(map path blob) sta=(map lobe blob)] :: fix lat ^- [(map lobe blob) (map path lobe)] %+ roll (~(tap by lag) ~) - |= [[pat=path bar=blob] [lut=_sta gar=(map path lobe)]] + =< .(lut sta) + |= [[pat=path bar=blob] [lut=(map lobe blob) gar=(map path lobe)]] ?~ (~(has by lut) p.bar) [lut (~(put by gar) pat p.bar)] :- (~(put by lut) p.bar bar) diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index c1e6c9693..636e2214c 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -113,11 +113,11 @@ ;~ pose (stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col))) (stag %end ;~(pfix col sem ;~(pose (stag %& dem) (stag %| sym)))) - (stag %del ;~(pfix hep ace loca)) - (stag %mut ;~(pfix col ace ;~(plug loca expg))) - (stag %ins ;~(pfix lus ace ;~(plug loca (opts expg)))) +:: (stag %del ;~(pfix hep ace loca)) +:: (stag %mut ;~(pfix col ace ;~(plug loca expg))) +:: (stag %ins ;~(pfix lus ace ;~(plug loca (opts expg)))) (stag %help ;~(pfix wut ace ;~(pfix col sym))) - (stag %path (full ;~(sfix loca(pax paf) (star ace)))) +:: (stag %path (full ;~(sfix loca(pax paf) (star ace)))) (stag %var ;~(plug ;~(pfix tis sym) expg)) (stag %rvar ;~(pfix ;~(plug tis tis) sym)) (stag %hoon expr) From aefc104137302110cdc8fb5d00b16d911dd3b5d0 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 12 Feb 2015 14:54:39 -0500 Subject: [PATCH 33/73] boots --- arvo/clay.hoon | 8 ++++++-- arvo/dill.hoon | 4 +++- arvo/hoon.hoon | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index b71d0f2f2..207e8ed89 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -189,6 +189,7 @@ |= [hen=duct yon=@ud mun=mood] ^+ +> =+ vid=(read-at-aeon:ze yon mun) + ~& >> [%balking =(~ vid)] ?~ vid (blub hen) (blab hen mun u.vid) :: ++ bait @@ -202,6 +203,7 @@ ++ blab :: ship result |= [hen=duct mun=mood dat=cage] ^+ +> + ~& >> [%blabbering hen] +>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn]) :: ++ bleb :: ship sequence @@ -408,7 +410,7 @@ ?^ lon.u.dok ~& %not-done-diffing !! ?~ -.hat ([echo(dok ~)]:.(+>.$ +.hat) wen mim.u.dok %& *cart sot.u.dok) - (checkout-ankh u.-.hat) + (checkout-ankh(lat.ran lat.ran.+.hat) u.-.hat) :: ++ apply-ergo ^+ . @@ -492,13 +494,14 @@ == =^ hat +>.$ (edit:ze now %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) + =. +>.$ wake ?~ dok ~& %no-dok +>.$ ?^ lon.u.dok ~& %not-done-diffing !! => %= . +>.$ ?< ?=(~ hat) - %^ echo:(checkout-ankh u.hat) + %^ echo :: :(checkout-ankh u.hat) now mim.u.dok [%& *cart sot.u.dok] @@ -1396,6 +1399,7 @@ =+ ^= zat (take-patch:(di:wake:une syd) p.q.hin) =+ zot=abet.zat + ~& >> [%moving-along (turn -.zot |=([duct *] +<-))] [-.zot abet:(pish:une syd +.zot ran.zat)] =+ zax=(do now hen [who who] syd ruf) =+ ^= zat diff --git a/arvo/dill.hoon b/arvo/dill.hoon index 9d8d3822e..e5f4510ac 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -319,9 +319,10 @@ (fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih) :: %mean ~& %dill-mean +>.$ - %nice +>.$ + %nice ~& >> %dill-got-nice +>.$ %note ?.(p.yar +>.$ (fume p.+.sih q.+.sih)) :: debug message ?(%rush %rust) :: XX reset prompt + ~& >> %dill-got-rusht ?> ?=(%term-line +>-.sih) =. +>.$ =+ lis=?-(-.+.sih %rust (scag 1.000 r.q.sih), %rush r.q.sih) @@ -367,6 +368,7 @@ ?(%init %logo %veer %vega %verb) :: drop-throughs +>(mos :_(mos [hen %give +.sih])) %writ :: file exists + ~& >> %dill-got-writ %_ +>.$ mos :_ mos diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 6c61346f3..2575514bc 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -639,7 +639,7 @@ :: ++ need :: demand |* a=(unit) - ?~ a !! + ?~ a ~|(%need !!) u.a :: ++ some :: lift (pure) @@ -3326,7 +3326,7 @@ :: %f ?: =(& q.p.lot) - ['.' 'y' rex] + ['.' 'm' 'o' 's' 't' 'a' 's' 's' 'u' 'r' 'r' 'e' 'd' 'l' 'y' rex] ?:(=(| q.p.lot) ['.' 'n' rex] (z-co q.p.lot)) :: %n ['~' rex] From 856a4b486310e8ea4c73c9e75e14a6fc35f6f375 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 12 Feb 2015 17:58:37 -0500 Subject: [PATCH 34/73] boots clean --- arvo/clay.hoon | 123 ++++++++++++++++++++----------------------------- arvo/dill.hoon | 4 +- 2 files changed, 51 insertions(+), 76 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 207e8ed89..99e81e457 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -9,7 +9,6 @@ $: qyx=cult :: subscribers dom=dome :: desk data dok=(unit dork) :: outstanding diffs - wok=(unit work) :: outstanding ergos == :: ++ gift :: out result <-$ $% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])] @@ -108,7 +107,6 @@ ref=(unit rind) :: outgoing requests dom=dome :: revision state dok=(unit dork) :: outstanding diffs - wok=(unit work) :: outstanding ergos == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist ++ rind :: request manager @@ -130,10 +128,6 @@ lon=(list path) :: mim=(map path mime) :: == :: -++ work :: - $: sot=(list ,[p=path q=(unit mime)]) :: - lon=(list path) :: - == :: -- => :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 4cA, filesystem logic :: @@ -189,7 +183,6 @@ |= [hen=duct yon=@ud mun=mood] ^+ +> =+ vid=(read-at-aeon:ze yon mun) - ~& >> [%balking =(~ vid)] ?~ vid (blub hen) (blab hen mun u.vid) :: ++ bait @@ -203,7 +196,6 @@ ++ blab :: ship result |= [hen=duct mun=mood dat=cage] ^+ +> - ~& >> [%blabbering hen] +>(byn [[hen ~ [p.mun q.mun syd] r.mun dat] byn]) :: ++ bleb :: ship sequence @@ -299,7 +291,6 @@ ++ echo :: announce changes |= [wen=@da mim=(map path mime) lem=nori] ^+ +> - ~& [%echoing syd] %_ +>.$ yel =+ pre=`path`~[(scot %p for) syd (scot %ud let.dom)] @@ -319,7 +310,6 @@ ++ edit :: apply changes |= [wen=@da lem=nori] ^+ +> - ~& > [%editing syd] ?: ?=(%| -.lem) =^ hat +>.$ (edit:ze wen lem) @@ -403,7 +393,6 @@ ++ apply-edit |= wen=@da ^+ +> - ~& [%applying-edit syd] =+ ^= hat (edit:ze wen %& *cart ?~(dok ~|(%no-changes !!) sot.u.dok)) ?~ dok ~& %no-changes !! @@ -412,13 +401,6 @@ ([echo(dok ~)]:.(+>.$ +.hat) wen mim.u.dok %& *cart sot.u.dok) (checkout-ankh(lat.ran lat.ran.+.hat) u.-.hat) :: - ++ apply-ergo - ^+ . - ?~ wok ~& %no-ergos !! - ?^ lon.u.wok ~& %not-done-ergoing !! - ?~ hez ~& %no-sync-duct !! - .(wok ~, reg :_(reg [u.hez %ergo who syd let.dom sot.u.wok])) - :: ++ take-cast |= [wen=@da pax=path res=(each bead (list tank))] ^+ +> @@ -485,7 +467,6 @@ ++ take-patch |= res=(each bead (list tank)) ^+ +> - ~& [%taking-patch syd] ?: ?=(%| -.res) %_ +>.$ dok ~ @@ -535,68 +516,65 @@ &(?=(%ins -.a) ?=(%mime -.+.a)) &(?=(%mut -.a) ?=(%mime -.+>.a)) == - =. wok - :+ ~ - %+ murn sot.u.dok - |= [a=path b=miso] - ?: ?=(%del -.b) (some a ~) - (bind (~(get by mim.u.dok) a) |=(c=mime [a (some c)])) - %+ murn sot.u.dok - |=([a=path b=miso] ?:((ceq b) ~ (some a))) - ?> ?=(^ wok) - ?~ lon.u.wok - apply-ergo(dok ~) %_ +>.$ dok ~ tag :: ?~(hez reg :_(reg [u.hez [%ergo who syd let.dom]])) - %- welp :_ tag - ^- (list ,[duct path note]) - %+ murn sot.u.dok - |= [a=path b=miso] - ?: (ceq b) - ~ - %- some - :+ u.hez - [%ergoing (scot %p who) syd a] - :* %f %exec who ~ %cast %mime %done ~ - ~|((crip <[%bad-echo syd let.dom a]>) (need (read:ze %x [%ud let.dom] a))) - == + :_ tag + :^ hen + [%ergoing (scot %p who) syd ~] + %f + :^ %exec who ~ :- %tabl + ^- (list (pair silk silk)) + %+ turn sot.u.dok + |= [a=path b=misu] + ^- (pair silk silk) + :- [%done ~ %path !>(a)] + ?: ?=(%del -.b) + [%done ~ %null !>(~)] + :^ %cast %mime %done + =+ (~(get by mim.u.dok) a) + `?^(- [%mime !>(u.-)] (need (read:ze %x [%ud let.dom] a))) == :: ++ take-ergo - |= [pax=path res=(each bead (list tank))] + |= res=(each bead (list tank)) ^+ +> - ?~ wok - ~& %clay-ergo-unexpected-made +> - ?. (lien lon.u.wok |=(path =(+< pax))) - ~& %clay-ergo-strange-made +> ?: ?=(%| -.res) %_ +>.$ - wok ~ - :: tag - :: %- welp :_ tag - :: ^- (list ,[duct path note]) - :: %+ murn lon.u.wok - :: |= a=path - :: ^- (unit ,[duct path note]) - :: ?: =(pax a) ~ - :: `[hen [%ergoing (scot %p who) syd a] %f %exec who ~] - :: yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay patch failed" p.res] yel] + [[hen %note '!' %rose [" " "" ""] leaf/"clay ergo failed" p.res] yel] + == + ?~ hez ~& %no-sync-duct !! + =+ cay=q.p.res + ?@ p.cay ~| %patch-bad-marc !! + %= +>.$ + reg + :_ reg + :* u.hez %ergo who syd let.dom + |- ^- (list ,[path (unit mime)]) + ?~ p.p.cay + ~ + :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?. ?=(%path p.i.p.p.cay) + ~| %ergo-strange-marc-a + !! + ?. ?=(@ q.i.p.p.cay) + ~| %ergo-strange-marc-b + !! + =+ coy=(slot 2 q.cay) + ?@ q.coy + ~| %ergo-strange-coy + !! + :- ((hard path) -.q.coy) + ?. ?=(%mime q.i.p.p.cay) + ~ + `((hard mime) q:(slot 3 coy)) == - ?. ?=(@ p.q.p.res) ~| %bad-marc !! - =: lon.u.wok (skip lon.u.wok |=(path =(+< pax))) - sot.u.wok [[pax `((hard mime) q.q.q.p.res)] sot.u.wok] == - ?~ lon.u.wok - apply-ergo - +>.$ :: ++ checkout-ankh |= hat=(map path lobe) ^+ +> - ~& > [%first-checkout syd (lent (~(tap by hat)))] %_ +>.$ tag :_ tag @@ -787,8 +765,8 @@ (blab p.i.xiq p.q.i.xiq u.u.cas) == =+ nao=(case-to-aeon:ze q.p.q.i.xiq) - ?~ nao ~& [%not-waking syd] $(xiq t.xiq, xaq [i.xiq xaq]) - ~& [%waking syd] $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) + ?~ nao $(xiq t.xiq, xaq [i.xiq xaq]) + $(xiq t.xiq, ..wake (balk p.i.xiq u.nao p.q.i.xiq)) :: | =+ mot=`moot`p.q.i.xiq @@ -1123,7 +1101,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 hen ~ ~) [who him] syd red ran.ruf) :: ++ posh @@ -1146,7 +1124,7 @@ %_ +> ran.ruf run dos.yar - (~(put by dos.yar) syd [qyx.red dom.red dok.red wok.red]) + (~(put by dos.yar) syd [qyx.red dom.red dok.red]) == :: ++ wake @@ -1166,7 +1144,7 @@ %^ (de now hen hun.yar hez.yar) [who who] syd - [[now qyx.saq ~ dom.saq dok.saq wok.saq] ran.ruf] + [[now qyx.saq ~ dom.saq dok.saq] ran.ruf] -- -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -1399,7 +1377,6 @@ =+ ^= zat (take-patch:(di:wake:une syd) p.q.hin) =+ zot=abet.zat - ~& >> [%moving-along (turn -.zot |=([duct *] +<-))] [-.zot abet:(pish:une syd +.zot ran.zat)] =+ zax=(do now hen [who who] syd ruf) =+ ^= zat @@ -1409,13 +1386,13 @@ [mos ..^$] :: %ergoing - ?> ?=([@ @ *] t.tea) + ?> ?=([@ @ ~] t.tea) =+ who=(slav %p i.t.tea) =+ syd=(slav %tas i.t.t.tea) =^ mos ruf =+ une=(un who now hen ruf) =+ ^= zat - (take-ergo:(di:wake:une syd) t.t.t.tea p.q.hin) + (take-ergo:(di:wake:une syd) p.q.hin) =+ zot=abet.zat [-.zot abet:(pish:une syd +.zot ran.zat)] [mos ..^$] diff --git a/arvo/dill.hoon b/arvo/dill.hoon index e5f4510ac..9d8d3822e 100644 --- a/arvo/dill.hoon +++ b/arvo/dill.hoon @@ -319,10 +319,9 @@ (fume:$(q.+.sih t.q.+.sih) '!' `tank`i.q.+.sih) :: %mean ~& %dill-mean +>.$ - %nice ~& >> %dill-got-nice +>.$ + %nice +>.$ %note ?.(p.yar +>.$ (fume p.+.sih q.+.sih)) :: debug message ?(%rush %rust) :: XX reset prompt - ~& >> %dill-got-rusht ?> ?=(%term-line +>-.sih) =. +>.$ =+ lis=?-(-.+.sih %rust (scag 1.000 r.q.sih), %rush r.q.sih) @@ -368,7 +367,6 @@ ?(%init %logo %veer %vega %verb) :: drop-throughs +>(mos :_(mos [hen %give +.sih])) %writ :: file exists - ~& >> %dill-got-writ %_ +>.$ mos :_ mos From 94ee8be8f2885588ca5d1987066d20cbc69973f2 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 12 Feb 2015 20:15:01 -0500 Subject: [PATCH 35/73] waypoint --- arvo/clay.hoon | 157 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 152 insertions(+), 5 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 99e81e457..c69ab0ef8 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -9,6 +9,7 @@ $: qyx=cult :: subscribers dom=dome :: desk data dok=(unit dork) :: outstanding diffs + mer=(map (pair ship desk) mery) :: outstanding merges == :: ++ gift :: out result <-$ $% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])] @@ -30,6 +31,16 @@ [%wart p=sock q=@tas r=path s=*] :: network request [%warp p=sock q=riff] :: file request == :: +++ mery :: + $: gem=germ :: strategy + ali=yaki :: ali's commit + bob=yaki :: bob's commit + bas=yaki :: mergebase + dal=(map path cage) :: diff(bas,ali) + dob=(map path cage) :: diff(bas,bob) + new=yaki :: merge(dal,dob) + ank=ankh :: new state + == :: ++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range ++ move ,[p=duct q=(mold note gift)] :: local move ++ nako $: gar=(map ,@ud tako) :: new ids @@ -107,6 +118,7 @@ ref=(unit rind) :: outgoing requests dom=dome :: revision state dok=(unit dork) :: outstanding diffs + mer=(map (pair ship desk) mery) :: outstanding merges == :: ++ riff ,[p=desk q=(unit rave)] :: request/desist ++ rind :: request manager @@ -703,6 +715,141 @@ ^- rove [%| p.p.rav q.p.rav r.p.rav ~] :: + ++ me :: merge ali into bob + |= ali=(pair ship desk) :: from + =+ bob=`(pair ship desk)`[who syd] :: to + =+ dat=(fall (~(get by mer) ali) *mery) :: merge data + =| gon=? :: keep going + |% + ++ abet + ^+ ..me + ..me(mer ?:(gon (~(put by mer) dat) (~(del by mer) dat))) + :: + ++ route + |= [sat=term res=(each bead (list tank))] :: XX bad type (%c) + ^+ +>.$ + %. res + ?+ sat ~|((crip <[%bad-stage sat]>) !!) + %ali fetched-ali + %diff-ali diffed-ali + %diff-bob diffed-bob + %merge merged + %checkout checked-out + %ergo ergoed + == + :: + ++ start + |= gem=germ + ^+ +> + ?: (~(has by mer) ali) + ~| (crip <[%already-merging ali bob]>) + !! + =. gem.dat gem + =. bob.dat (~(got by hut.ran) (~(got by hit.dom) let.dom)) + fetch-ali + :: + ++ fetch-ali + ^+ . + =- %_(. tag [- tag]) + :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ali] + %c %warp [p.bob p.ali] q.ali + `[%& %v [%da now] /] + == + :: + ++ fetched-ali + |= rot=riot + ^+ +> + ?~ rot + ~| (crip <[%bad-fetch-ali ali bob]>) + !! + =+ dum=((hard dome) q.q.r.u.rot) + =. ali.dat (~(got by hut.ran) (~(got by hit.dum) let.dum)) + ?- gem.dat + %init + ?. =(let.dom 0) + ~| (crip <[%bad-init-merge ali bob]>) + !! + =. new.dat (make-yaki ~ q.q.ali now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + checkout + :: + %fine + ?: =(r.ali.dat r.bob.dat) + +>.$(gon |) + ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) + +>.$(gon |) + ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) + ~| (crip <[%bad-fine-merge ali bob]>) + !! + =. new.dat ali.dat + =. let.dom +(let.dom) + =. hit.dom (~(put by hit) let.dom r.new.dat) + checkout + :: + %this + !! + :: + %that + !! + :: + %mate + !! + :: + %meld + !! + == + :: + ++ diff-ali + ^+ . + =- %_(. tag [- tag]) + :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + !! + == + :: + ++ diffed-ali + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ diff-bob + ^+ . + !! + :: + ++ diffed-bob + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ merge + ^+ . + !! + :: + ++ merged + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ checkout + ^+ . + !! + :: + ++ checked-out + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ ergo + ^+ . + !! + :: + ++ ergoed + |= res=(each bead (list tank)) + ^+ +> + !! + -- + :: ++ merge-desks |= [her=@p sud=@tas gem=germ rot=riot] ^+ +>.$ @@ -1101,7 +1248,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 hen ~ ~) [who him] syd red ran.ruf) :: ++ posh @@ -1124,7 +1271,7 @@ %_ +> ran.ruf run dos.yar - (~(put by dos.yar) syd [qyx.red dom.red dok.red]) + (~(put by dos.yar) syd [qyx.red dom.red dok.red mer.red]) == :: ++ wake @@ -1322,16 +1469,16 @@ ++ take :: accept response |= [tea=wire hen=duct hin=(hypo sign)] ^- [p=(list move) q=_..^$] - ?: ?=([%auto @ @ @ @ germ ?(%y %v) ~] tea) + ?: ?=([%merge @ @ @ @ @ ~] tea) ?> ?=(%writ -.+.q.hin) =+ our=(slav %p i.t.tea) =* syd i.t.t.tea =+ her=(slav %p i.t.t.t.tea) =* sud i.t.t.t.t.tea - =+ gem=i.t.t.t.t.t.tea + =* sat i.t.t.t.t.t.tea =+ une=(un our now hen ruf) =+ wex=(di:une syd) - =+ wao=(merge-desks:wex her sud gem p.q.hin) + =+ wao=abet:(route:(me:wex her sud) sat p.q.hin) =+ woo=abet:wao [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] ?- -.+.q.hin From 1af61fe25fa223f9a0aef1cee4308ca23febe325 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 12 Feb 2015 20:19:13 -0500 Subject: [PATCH 36/73] waypoint --- arvo/clay.hoon | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index c69ab0ef8..568870374 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -723,7 +723,7 @@ |% ++ abet ^+ ..me - ..me(mer ?:(gon (~(put by mer) dat) (~(del by mer) dat))) + ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) dat))) :: ++ route |= [sat=term res=(each bead (list tank))] :: XX bad type (%c) @@ -750,8 +750,8 @@ :: ++ fetch-ali ^+ . - =- %_(. tag [- tag]) - :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ali] + =- %_(+ tag [- tag]) + :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ali ~] %c %warp [p.bob p.ali] q.ali `[%& %v [%da now] /] == @@ -781,7 +781,7 @@ ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) ~| (crip <[%bad-fine-merge ali bob]>) !! - =. new.dat ali.dat + =. new.dat ali.dat =. let.dom +(let.dom) =. hit.dom (~(put by hit) let.dom r.new.dat) checkout @@ -801,8 +801,8 @@ :: ++ diff-ali ^+ . - =- %_(. tag [- tag]) - :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali] + =- %_(+ tag [- tag]) + :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali ~] %f %exec p.bob ~ %tabl ^- (list (pair silk silk)) !! From 4bf41c153980384a92b7b93093eb683a8a8a9956 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 13 Feb 2015 17:39:31 -0500 Subject: [PATCH 37/73] compiles and boots --- arvo/clay.hoon | 400 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 262 insertions(+), 138 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 568870374..ce16d7eef 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -33,6 +33,7 @@ == :: ++ mery :: $: gem=germ :: strategy + cas=case :: ali's case ali=yaki :: ali's commit bob=yaki :: bob's commit bas=yaki :: mergebase @@ -40,6 +41,7 @@ dob=(map path cage) :: diff(bas,bob) new=yaki :: merge(dal,dob) ank=ankh :: new state + erg=(map path ,?) :: ergoable changes == :: ++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range ++ move ,[p=duct q=(mold note gift)] :: local move @@ -715,141 +717,6 @@ ^- rove [%| p.p.rav q.p.rav r.p.rav ~] :: - ++ me :: merge ali into bob - |= ali=(pair ship desk) :: from - =+ bob=`(pair ship desk)`[who syd] :: to - =+ dat=(fall (~(get by mer) ali) *mery) :: merge data - =| gon=? :: keep going - |% - ++ abet - ^+ ..me - ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) dat))) - :: - ++ route - |= [sat=term res=(each bead (list tank))] :: XX bad type (%c) - ^+ +>.$ - %. res - ?+ sat ~|((crip <[%bad-stage sat]>) !!) - %ali fetched-ali - %diff-ali diffed-ali - %diff-bob diffed-bob - %merge merged - %checkout checked-out - %ergo ergoed - == - :: - ++ start - |= gem=germ - ^+ +> - ?: (~(has by mer) ali) - ~| (crip <[%already-merging ali bob]>) - !! - =. gem.dat gem - =. bob.dat (~(got by hut.ran) (~(got by hit.dom) let.dom)) - fetch-ali - :: - ++ fetch-ali - ^+ . - =- %_(+ tag [- tag]) - :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ali ~] - %c %warp [p.bob p.ali] q.ali - `[%& %v [%da now] /] - == - :: - ++ fetched-ali - |= rot=riot - ^+ +> - ?~ rot - ~| (crip <[%bad-fetch-ali ali bob]>) - !! - =+ dum=((hard dome) q.q.r.u.rot) - =. ali.dat (~(got by hut.ran) (~(got by hit.dum) let.dum)) - ?- gem.dat - %init - ?. =(let.dom 0) - ~| (crip <[%bad-init-merge ali bob]>) - !! - =. new.dat (make-yaki ~ q.q.ali now) - =. hut.ran (~(put by hut.ran) r.new.dat new.dat) - checkout - :: - %fine - ?: =(r.ali.dat r.bob.dat) - +>.$(gon |) - ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.$(gon |) - ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) - ~| (crip <[%bad-fine-merge ali bob]>) - !! - =. new.dat ali.dat - =. let.dom +(let.dom) - =. hit.dom (~(put by hit) let.dom r.new.dat) - checkout - :: - %this - !! - :: - %that - !! - :: - %mate - !! - :: - %meld - !! - == - :: - ++ diff-ali - ^+ . - =- %_(+ tag [- tag]) - :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali ~] - %f %exec p.bob ~ %tabl - ^- (list (pair silk silk)) - !! - == - :: - ++ diffed-ali - |= res=(each bead (list tank)) - ^+ +> - !! - :: - ++ diff-bob - ^+ . - !! - :: - ++ diffed-bob - |= res=(each bead (list tank)) - ^+ +> - !! - :: - ++ merge - ^+ . - !! - :: - ++ merged - |= res=(each bead (list tank)) - ^+ +> - !! - :: - ++ checkout - ^+ . - !! - :: - ++ checked-out - |= res=(each bead (list tank)) - ^+ +> - !! - :: - ++ ergo - ^+ . - !! - :: - ++ ergoed - |= res=(each bead (list tank)) - ^+ +> - !! - -- - :: ++ merge-desks |= [her=@p sud=@tas gem=germ rot=riot] ^+ +>.$ @@ -1172,6 +1039,18 @@ %z [~ %ankh !>(ank.dom)] == :: + ++ reachable-takos :: reachable + |= p=tako :: XX slow + ^- (set tako) + =+ y=(tako-to-yaki p) + =+ t=(~(put in *(set tako)) p) + %+ roll p.y + =< .(s t) + |= [q=tako s=(set tako)] + ?: (~(has in s) q) :: already done + s :: hence skip + (~(uni in s) ^$(p q)) :: otherwise traverse + :: ++ read :: read:ze |= mun=mood :: read at point ^- (unit cage) @@ -1238,6 +1117,250 @@ ?~(way +> $(way t.way, +> (descend i.way))) :: -- + :: + ++ me :: merge ali into bob + |= ali=(pair ship desk) :: from + =+ bob=`(pair ship desk)`[who syd] :: to + =+ dat=(fall (~(get by mer) ali) *mery) :: merge data + =| gon=? :: keep going + |% + ++ abet + ^+ ..me + ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) dat))) + :: + ++ route + |= [sat=term res=(each riot (each bead (list tank)))] + ^+ +>.$ + ?+ sat ~|((crip <[%bad-stage sat]>) !!) + %ali %- fetched-ali ?> ?=(%& -.res) p.res + %diff-ali %- diffed-ali ?> ?=(%| -.res) p.res + %diff-bob %- diffed-bob ?> ?=(%| -.res) p.res + %merge %- merged ?> ?=(%| -.res) p.res + %checkout %- checked-out ?> ?=(%| -.res) p.res + %ergo %- ergoed ?> ?=(%| -.res) p.res + == + :: + ++ start + |= gem=germ + ^+ +> + ?: (~(has by mer) ali) + ~| (crip <[%already-merging ali bob]>) + !! + =. gem.dat gem + =. cas.dat [%da now] + =. bob.dat (~(got by hut.ran) (~(got by hit.dom) let.dom)) + fetch-ali + :: + ++ fetch-ali + ^+ . + =- %_(+ tag [- tag]) + :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ali ~] + %c %warp [p.bob p.ali] q.ali + `[%& %v cas.dat /] + == + :: + ++ fetched-ali + |= rot=riot + ^+ +> + ?~ rot + ~| (crip <[%bad-fetch-ali ali bob]>) + !! + =+ dum=((hard dome) q.q.r.u.rot) + =. ali.dat (~(got by hut.ran) (~(got by hit.dum) let.dum)) + |- + ?- gem.dat + %init + ?. =(let.dom 0) + ~| (crip <[%bad-init-merge ali bob]>) + !! + =. new.dat (make-yaki ~ q.ali.dat now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + checkout + :: + %fine + ?: =(r.ali.dat r.bob.dat) + +>.^$(gon |) + ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) + +>.^$(gon |) + ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) + ~| (crip <[%bad-fine-merge ali bob]>) + !! + =. new.dat ali.dat + checkout + :: + %this + ?: =(r.ali.dat r.bob.dat) + +>.^$(gon |) + ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) + +>.^$(gon |) + =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.bob.dat now) + checkout + :: + %that + ?: =(r.ali.dat r.bob.dat) + +>.^$(gon |) + ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) + +>.^$(gon |) + =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now) + checkout + :: + %mate + !! + :: + %meld + !! + == + :: + ++ diff-ali + ^+ . + =- %_(+ tag [- tag]) + :* hen + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali ~] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + !! + == + :: + ++ diffed-ali + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ diff-bob + ^+ . + !! + :: + ++ diffed-bob + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ merge + ^+ . + !! + :: + ++ merged + |= res=(each bead (list tank)) + ^+ +> + !! + :: + ++ checkout + ^+ . + =- %_(+ tag [- tag]) + :* hen + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %checkout ~] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + %+ turn (~(tap by q.new.dat)) + |= [a=path b=lobe] + ^- (pair silk silk) + :- [%done ~ %path !>(a)] + |- ^- silk + =+ bob=(~(got by lat.ran) b) + ?- -.bob + %direct [%done ~ q.bob] + %indirect [%done ~ q.bob] + %delta [%pact $(b q.bob) [%done ~ r.bob]] + == + == + :: + ++ checked-out + |= res=(each bead (list tank)) + ^+ +> + ?: ?=(%| -.res) + %_ +>.$ + dok ~ + yel + :_ yel + :* hen %note '!' %rose [" " "" ""] + leaf/"merge checkout failed" p.res + == + == + =. let.dom +(let.dom) + =. hit.dom (~(put by hit.dom) let.dom r.new.dat) + =+ cay=q.p.res + ?@ p.cay ~| %patch-bad-marc !! + =. ank.dat + %- checkout-ankh:ze + %- mo + |- ^- (list ,[path cage]) + ?~ p.p.cay + ~ + :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?. ?=(%path p.i.p.p.cay) + ~| %patch-strange-marc-a + !! + ?. ?=(@ q.i.p.p.cay) + ~| %patch-strange-marc-b + !! + =+ coy=(slot 2 q.cay) + ?@ q.coy + ~| %patch-strange-coy + !! + :- ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + ?~ hez + +>.$(gon |) :: XX resolve + ergo + :: + ++ ergo + ^+ . + =- %_(+ tag [- tag]) + =+ zez=ze(ank.dom ank.dat) + :* hen + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %ergo ~] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + %+ turn (~(tap by erg.dat)) + |= [a=path b=?] + ^- (pair silk silk) + :- [%done ~ %path !>(a)] + ?. b + [%done ~ %null !>(~)] + :^ %cast %mime %done + `(need (read:zez %x [%ud let.dom] a)) + == + :: + ++ ergoed + |= res=(each bead (list tank)) + ^+ +> + ?: ?=(%| -.res) + %_ +>.$ + yel + :_ yel + [hen %note '!' %rose [" " "" ""] leaf/"merge ergo failed" p.res] + == + ?~ hez + ~| (crip <[%no-hez ali bob]>) + !! + =+ cay=q.p.res + ?@ p.cay ~| %patch-bad-marc !! + %= +>.$ + gon | + reg + :_ reg + :* u.hez %ergo who syd let.dom + |- ^- (list ,[path (unit mime)]) + ?~ p.p.cay + ~ + :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?. ?=(%path p.i.p.p.cay) + ~| %ergo-strange-marc-a + !! + ?. ?=(@ q.i.p.p.cay) + ~| %ergo-strange-marc-b + !! + =+ coy=(slot 2 q.cay) + ?@ q.coy + ~| %ergo-strange-coy + !! + :- ((hard path) -.q.coy) + ?. ?=(%mime q.i.p.p.cay) + ~ + `((hard mime) q:(slot 3 coy)) + == + == + -- -- -- :: @@ -1291,7 +1414,7 @@ %^ (de now hen hun.yar hez.yar) [who who] syd - [[now qyx.saq ~ dom.saq dok.saq] ran.ruf] + [[now qyx.saq ~ dom.saq dok.saq mer.saq] ran.ruf] -- -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::: @@ -1470,7 +1593,7 @@ |= [tea=wire hen=duct hin=(hypo sign)] ^- [p=(list move) q=_..^$] ?: ?=([%merge @ @ @ @ @ ~] tea) - ?> ?=(%writ -.+.q.hin) + ?> ?=(?(%writ %made) +<.q.hin) =+ our=(slav %p i.t.tea) =* syd i.t.t.tea =+ her=(slav %p i.t.t.t.tea) @@ -1478,7 +1601,8 @@ =* sat i.t.t.t.t.t.tea =+ une=(un our now hen ruf) =+ wex=(di:une syd) - =+ wao=abet:(route:(me:wex her sud) sat p.q.hin) + =+ dat=?-(+<.q.hin %writ [%& p.q.hin], %made [%| p.q.hin]) + =+ wao=abet:(route:(me:ze:wex her sud) sat dat) =+ woo=abet:wao [-.woo ..^$(ruf abet:(pish:une syd +.woo ran.wao))] ?- -.+.q.hin From b1c880ba2e78a3f6bd93b3ba8d38db58c6944ae1 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 13 Feb 2015 18:38:09 -0500 Subject: [PATCH 38/73] %init works except sync --- arvo/clay.hoon | 29 ++++++++++++++++++++--------- main/app/merge/core.hook | 16 ++++++++++++++++ 2 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 main/app/merge/core.hook diff --git a/arvo/clay.hoon b/arvo/clay.hoon index ce16d7eef..2529832c7 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1148,7 +1148,9 @@ !! =. gem.dat gem =. cas.dat [%da now] - =. bob.dat (~(got by hut.ran) (~(got by hit.dom) let.dom)) + =. bob.dat + ?: ?=(%init gem) bob.dat + (~(got by hut.ran) (~(got by hit.dom) let.dom)) fetch-ali :: ++ fetch-ali @@ -1165,7 +1167,9 @@ ?~ rot ~| (crip <[%bad-fetch-ali ali bob]>) !! - =+ dum=((hard dome) q.q.r.u.rot) + =+ ^= dum + %- (hard ,[ank=* let=@ud hit=(map ,@ud tako) lab=(map ,@tas ,@ud)]) + q.q.r.u.rot =. ali.dat (~(got by hut.ran) (~(got by hit.dum) let.dum)) |- ?- gem.dat @@ -1246,6 +1250,7 @@ :: ++ checkout ^+ . + ~& > %checking-out =- %_(+ tag [- tag]) :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %checkout ~] @@ -1280,6 +1285,7 @@ =. hit.dom (~(put by hit.dom) let.dom r.new.dat) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! + ~& > [%checked-out (lent p.p.cay)] =. ank.dat %- checkout-ankh:ze %- mo @@ -1299,6 +1305,7 @@ !! :- ((hard path) -.q.coy) [q.i.p.p.cay (slot 3 coy)] + =. ank.dom ank.dat ?~ hez +>.$(gon |) :: XX resolve ergo @@ -1509,13 +1516,17 @@ == :: %merg :: direct state up - :_ ..^$ - :~ :* hen %pass - /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic]/y - %c %warp [p.q.hic r.q.hic] s.q.hic - `[%& %y [%da now] /] - == - == + ?: =(%$ q.q.hic) + [~ ..^$] + =^ mos ruf + =+ une=(un p.q.hic now hen ruf) + =+ ^= zat + abet:(start:(me:ze:(di:wake:une q.q.hic) r.q.hic s.q.hic) t.q.hic) + =+ zot=abet.zat + :- -.zot + =. une (pish:une q.q.hic +.zot ran.zat) + abet:une + [mos ..^$] :: %plug ?. (~(has by sor.ruf) +.q.hic) `..^$ diff --git a/main/app/merge/core.hook b/main/app/merge/core.hook new file mode 100644 index 000000000..59455d8e9 --- /dev/null +++ b/main/app/merge/core.hook @@ -0,0 +1,16 @@ +:: Desk sync +:: +:::: /hook/core/sync/app + :: +/+ sh-utils +!: +:::: + :: +|_ [hid=hide ~] +++ peer ,_`. +++ poke--args + %+ gate-bang + |= [syd=@tas her=@p sud=@tas gem=?([germ ~] ~)] + [%c %merg our.hid syd her sud ?~(gem %fine -.gem)] + (args-into-gate . ,_[%txt 'synced']) +-- From 34ab4060b66b7b9f20bae46a0203e2428584bbea Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 13 Feb 2015 19:56:38 -0500 Subject: [PATCH 39/73] %init merge works --- arvo/clay.hoon | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 2529832c7..0752a9db0 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1179,6 +1179,7 @@ !! =. new.dat (make-yaki ~ q.ali.dat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) checkout :: %fine @@ -1190,6 +1191,9 @@ ~| (crip <[%bad-fine-merge ali bob]>) !! =. new.dat ali.dat + =. erg.dat + %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) + `(map path ,?)`(~(run by q.ali.dat) |=(lobe %&)) checkout :: %this @@ -1198,6 +1202,7 @@ ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) +>.^$(gon |) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.bob.dat now) + =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) :: XX needed? checkout :: %that @@ -1206,6 +1211,9 @@ ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) +>.^$(gon |) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now) + =. erg.dat + %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) + `(map path ,?)`(~(run by q.ali.dat) |=(lobe %&)) checkout :: %mate From 39ea84d2a3332f401be113569dd388f3d8ae5ed3 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 16 Feb 2015 18:09:13 -0500 Subject: [PATCH 40/73] %init, %fine, %this, and %that work --- arvo/clay.hoon | 11 ++++++----- arvo/hoon.hoon | 12 ++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0752a9db0..cf830cad1 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1126,7 +1126,7 @@ |% ++ abet ^+ ..me - ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) dat))) + ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) ali))) :: ++ route |= [sat=term res=(each riot (each bead (list tank)))] @@ -1177,7 +1177,7 @@ ?. =(let.dom 0) ~| (crip <[%bad-init-merge ali bob]>) !! - =. new.dat (make-yaki ~ q.ali.dat now) + =. new.dat ali.dat =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) checkout @@ -1202,7 +1202,8 @@ ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) +>.^$(gon |) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.bob.dat now) - =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) :: XX needed? + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + =. erg.dat ~ checkout :: %that @@ -1211,6 +1212,7 @@ ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) +>.^$(gon |) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) `(map path ,?)`(~(run by q.ali.dat) |=(lobe %&)) @@ -1258,7 +1260,6 @@ :: ++ checkout ^+ . - ~& > %checking-out =- %_(+ tag [- tag]) :* hen [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %checkout ~] @@ -1293,7 +1294,6 @@ =. hit.dom (~(put by hit.dom) let.dom r.new.dat) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! - ~& > [%checked-out (lent p.p.cay)] =. ank.dat %- checkout-ankh:ze %- mo @@ -1341,6 +1341,7 @@ ^+ +> ?: ?=(%| -.res) %_ +>.$ + gon | yel :_ yel [hen %note '!' %rose [" " "" ""] leaf/"merge ergo failed" p.res] diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 2575514bc..17573424c 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -1955,8 +1955,8 @@ |= a=(tree ,[p=* q=*]) ?~ a & - ?& ?~(l.a & ?&((vor p.n.a p.n.l.a) (hor p.n.l.a p.n.a))) - ?~(r.a & ?&((vor p.n.a p.n.r.a) (hor p.n.a p.n.r.a))) + ?& ?~(l.a & ?&((vor p.n.a p.n.l.a) (gor p.n.l.a p.n.a))) + ?~(r.a & ?&((vor p.n.a p.n.r.a) (gor p.n.a p.n.r.a))) == :: ++ ja :: jar engine @@ -2088,12 +2088,12 @@ ?: (vor p.n.a p.n.b) ?: =(p.n.b p.n.a) [n.b $(a l.a, b l.b) $(a r.a, b r.b)] - ?: (hor p.n.b p.n.a) + ?: (gor p.n.b p.n.a) %- uni(+< $(a l.a, b [n.b l.b ~])) $(b r.b) %- uni(+< $(a r.a, b [n.b ~ r.b])) $(b l.b) ?: =(p.n.a p.n.b) [n.b $(b l.b, a l.a) $(b r.b, a r.a)] - ?: (hor p.n.a p.n.b) + ?: (gor p.n.a p.n.b) %- uni(+< $(b l.b, a [n.a l.a ~])) $(a r.a) %- uni(+< $(b r.b, a [n.a ~ r.a])) $(a l.a) :: @@ -2166,12 +2166,12 @@ ?: (vor p.n.a p.n.b) ?: =(p.n.b p.n.a) [n.b $(a l.a, b l.b) $(a r.a, b r.b)] - ?: (hor p.n.b p.n.a) + ?: (gor p.n.b p.n.a) $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b) $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b) ?: =(p.n.a p.n.b) [n.b $(b l.b, a l.a) $(b r.b, a r.a)] - ?: (hor p.n.a p.n.b) + ?: (gor p.n.a p.n.b) $(b [n.b $(b l.b, a [n.a l.a ~]) r.b], a r.a) $(b [n.b l.b $(b r.b, a [n.a ~ r.a])], a l.a) :: From 9d3911a41c7bca0e3e65c48c0be4035c783c19a6 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 16 Feb 2015 20:02:28 -0500 Subject: [PATCH 41/73] first pass at explicit errors --- arvo/clay.hoon | 144 ++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 75 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index cf830cad1..7a3d1b44e 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -14,6 +14,7 @@ ++ gift :: out result <-$ $% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])] :: version update + [%mere p=ares] :: merge result [%note p=@tD q=tank] :: debug message [%writ p=riot] :: response == :: @@ -1115,18 +1116,19 @@ |= way=path ^+ +> ?~(way +> $(way t.way, +> (descend i.way))) - :: -- :: ++ me :: merge ali into bob |= ali=(pair ship desk) :: from =+ bob=`(pair ship desk)`[who syd] :: to =+ dat=(fall (~(get by mer) ali) *mery) :: merge data - =| gon=? :: keep going + =| gon=(unit ares) :: keep going |% ++ abet ^+ ..me - ..me(mer ?:(gon (~(put by mer) ali dat) (~(del by mer) ali))) + ?~ gon + ..me(mer (~(put by mer) ali dat)) + ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere u.gon])) :: ++ route |= [sat=term res=(each riot (each bead (list tank)))] @@ -1144,8 +1146,7 @@ |= gem=germ ^+ +> ?: (~(has by mer) ali) - ~| (crip <[%already-merging ali bob]>) - !! + +>.$(gon ``[%already-merging >[ali bob]< ~]) =. gem.dat gem =. cas.dat [%da now] =. bob.dat @@ -1165,8 +1166,7 @@ |= rot=riot ^+ +> ?~ rot - ~| (crip <[%bad-fetch-ali ali bob]>) - !! + +>.$(gon ``[%bad-fetch-ali >[ali bob]< ~]) =+ ^= dum %- (hard ,[ank=* let=@ud hit=(map ,@ud tako) lab=(map ,@tas ,@ud)]) q.q.r.u.rot @@ -1175,8 +1175,7 @@ ?- gem.dat %init ?. =(let.dom 0) - ~| (crip <[%bad-init-merge ali bob]>) - !! + +>.^$(gon ``[%bad-init-merge >[ali bob]< ~]) =. new.dat ali.dat =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) @@ -1184,12 +1183,11 @@ :: %fine ?: =(r.ali.dat r.bob.dat) - +>.^$(gon |) + +>.^$(gon `~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon |) + +>.^$(gon `~) ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) - ~| (crip <[%bad-fine-merge ali bob]>) - !! + +>.^$(gon ``[%bad-fine-merge >[ali bob]< ~]) =. new.dat ali.dat =. erg.dat %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) @@ -1198,9 +1196,9 @@ :: %this ?: =(r.ali.dat r.bob.dat) - +>.^$(gon |) + +>.^$(gon `~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon |) + +>.^$(gon `~) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.bob.dat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat ~ @@ -1208,9 +1206,9 @@ :: %that ?: =(r.ali.dat r.bob.dat) - +>.^$(gon |) + +>.^$(gon `~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon |) + +>.^$(gon `~) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat @@ -1219,10 +1217,10 @@ checkout :: %mate - !! + +>.^$(gon ``[%mate-not-implemented >[ali bob]< ~]) :: %meld - !! + +>.^$(gon ``[%meld-not-implemented >[ali bob]< ~]) == :: ++ diff-ali @@ -1282,40 +1280,38 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - %_ +>.$ - dok ~ - yel - :_ yel - :* hen %note '!' %rose [" " "" ""] - leaf/"merge checkout failed" p.res - == - == - =. let.dom +(let.dom) - =. hit.dom (~(put by hit.dom) let.dom r.new.dat) + +>.$(gon ``[%checkout-bad-made leaf/"merge checkout failed" p.res]) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! - =. ank.dat - %- checkout-ankh:ze - %- mo - |- ^- (list ,[path cage]) + =| can=(list ,[path cage]) + => + |- ^+ + ?~ p.p.cay - ~ - :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + +.$(can ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?^ gon.tal + tal ?. ?=(%path p.i.p.p.cay) - ~| %patch-strange-marc-a - !! + +.$(gon ``[%patch-strange-marc-a >[ali bob]< >p.i.p.p.cay< ~]) ?. ?=(@ q.i.p.p.cay) - ~| %patch-strange-marc-b - !! + +.$(gon ``[%patch-strange-marc-b >[ali bob]< >p.i.p.p.cay< ~]) =+ coy=(slot 2 q.cay) ?@ q.coy - ~| %patch-strange-coy - !! - :- ((hard path) -.q.coy) - [q.i.p.p.cay (slot 3 coy)] + +.$(gon ``[%patch-strange-coy >[ali bob]< ~]) + %_ +.$ + can + :_ can:tal + :- ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + == + ?^ gon + +>.$ + =. let.dom +(let.dom) + =. hit.dom (~(put by hit.dom) let.dom r.new.dat) + =. ank.dat (checkout-ankh:ze (mo can)) =. ank.dom ank.dat ?~ hez - +>.$(gon |) :: XX resolve + +>.$(gon `~) :: XX resolve ergo :: ++ ergo @@ -1340,41 +1336,39 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - %_ +>.$ - gon | - yel - :_ yel - [hen %note '!' %rose [" " "" ""] leaf/"merge ergo failed" p.res] - == + +>.$(gon ``[%ergo-bad-made leaf/"merge ergo failed" p.res]) ?~ hez - ~| (crip <[%no-hez ali bob]>) - !! + +>.$(gon ``[%ergo-no-hez >[ali bob]< ~]) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! - %= +>.$ - gon | - reg - :_ reg - :* u.hez %ergo who syd let.dom - |- ^- (list ,[path (unit mime)]) - ?~ p.p.cay - ~ - :_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?. ?=(%path p.i.p.p.cay) - ~| %ergo-strange-marc-a - !! - ?. ?=(@ q.i.p.p.cay) - ~| %ergo-strange-marc-b - !! - =+ coy=(slot 2 q.cay) - ?@ q.coy - ~| %ergo-strange-coy - !! - :- ((hard path) -.q.coy) - ?. ?=(%mime q.i.p.p.cay) - ~ - `((hard mime) q:(slot 3 coy)) + =| can=(list ,[path (unit mime)]) + => + |- ^+ + + ?~ p.p.cay + +.$(can ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?^ gon.tal + tal + ?. ?=(%path p.i.p.p.cay) + +.$(gon ``[%patch-strange-marc-a >[ali bob]< >p.i.p.p.cay< ~]) + ?. ?=(@ q.i.p.p.cay) + +.$(gon ``[%patch-strange-marc-b >[ali bob]< >p.i.p.p.cay< ~]) + =+ coy=(slot 2 q.cay) + ?@ q.coy + +.$(gon ``[%patch-strange-coy >[ali bob]< ~]) + %_ +.$ + can + :_ can:tal + :- ((hard path) -.q.coy) + ?. ?=(%mime q.i.p.p.cay) + ~ + `((hard mime) q:(slot 3 coy)) == + ?^ gon + +>.$ + %= +>.$ + gon `~ + reg [[u.hez %ergo who syd let.dom can] reg] == -- -- From 5b3233f30f5f0445b4834a0fc04eb9845e84c7d7 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 17 Feb 2015 15:06:28 -0500 Subject: [PATCH 42/73] fixed explicit merge errors --- arvo/clay.hoon | 15 +++++++++++---- main/app/merge/core.hook | 22 ++++++++++++++++++---- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 7a3d1b44e..59c4a5df0 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1147,12 +1147,19 @@ ^+ +> ?: (~(has by mer) ali) +>.$(gon ``[%already-merging >[ali bob]< ~]) + ?: &(=(0 let.dom) !?=(%init gem)) + +>.$(gon ``[%no-desk >[ali bob]< ~]) =. gem.dat gem =. cas.dat [%da now] - =. bob.dat - ?: ?=(%init gem) bob.dat - (~(got by hut.ran) (~(got by hit.dom) let.dom)) - fetch-ali + ?: ?=(%init gem) + fetch-ali + =+ (~(get by hit.dom) let.dom) + ?~ - + +>.$(gon ``[%no-version >[ali bob]< ~]) + =+ (~(get by hut.ran) u.-) + ?~ - + +>.$(gon ``[%no-commit >[ali bob]< ~]) + fetch-ali(bob.dat u.-) :: ++ fetch-ali ^+ . diff --git a/main/app/merge/core.hook b/main/app/merge/core.hook index 59455d8e9..1e86c3497 100644 --- a/main/app/merge/core.hook +++ b/main/app/merge/core.hook @@ -9,8 +9,22 @@ |_ [hid=hide ~] ++ peer ,_`. ++ poke--args - %+ gate-bang - |= [syd=@tas her=@p sud=@tas gem=?([germ ~] ~)] - [%c %merg our.hid syd her sud ?~(gem %fine -.gem)] - (args-into-gate . ,_[%txt 'synced']) + |= [ost=bone you=ship syd=@tas her=@p sud=@tas gem=?([germ ~] ~)] + [[ost %pass / %c %merg our.hid syd her sud ?~(gem %fine -.gem)]~ +>.$] +:: +++ pour + |= [ost=bone pax=path sih=*] + :_ +>.$ + =+ ^- tan=(list tank) + =+ ((soft ,[%c %mere are=ares]) sih) + ?~ - + [leaf/"not working so well" >sih< ~] + ?~ are.u + [leaf/"synced" ~] + [leaf/"failed to sync" >p.u.are.u< q.u.are.u] + %- flop + :- i=[ost %pass / %g %cide %$] + ^= t + %+ turn (~(tap in (~(get ju pus.hid) /out))) + |=(ost=bone [ost %give %rush %tang (flop tan)]) -- From c33156be9da21649775f21d421ad393e0527670b Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 17 Feb 2015 18:40:53 -0500 Subject: [PATCH 43/73] mate waypoint --- arvo/clay.hoon | 253 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 194 insertions(+), 59 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 59c4a5df0..8beb35636 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -393,17 +393,9 @@ ++ patch |= [pax=path bar=lobe] ^- [duct path note] - :^ hen - [%patching (scot %p who) syd pax] - %f - :^ %exec who ~ - |- ^- silk - =+ bob=(~(got by lat.ran) bar) - ?- -.bob - %direct [%done ~ q.bob] - %indirect [%done ~ q.bob] - %delta [%pact $(bar q.bob) [%done ~ r.bob]] - == + :+ hen + [%patching (scot %p who) syd pax] + [%f %exec who ~ (lobe-to-silk:ze bar)] :: ++ apply-edit |= wen=@da @@ -816,6 +808,16 @@ ++ aeon-to-yaki (cork aeon-to-tako tako-to-yaki) ++ lobe-to-blob ~(got by lat.ran) :: grab blob ++ tako-to-yaki ~(got by hut.ran) + ++ lobe-to-silk + |= a=lobe + |- ^- silk + =+ bob=(~(got by lat.ran) a) + ?- -.bob + %direct [%done ~ q.bob] + %indirect [%done ~ q.bob] + %delta [%pact $(a q.bob) [%done ~ r.bob]] + == + :: ++ make-direct :: make blob |= [p=cage] ^- blob @@ -842,7 +844,7 @@ |= lar=(list ,[p=path q=misu]) :: store changes ^- (map path blob) =+ ^= hat :: current state - ?: =(let.dom 0) :: initial commit + ?: =(let.dom 0) :: initial commit ~ :: has nothing =< q %- aeon-to-yaki @@ -943,10 +945,6 @@ == == :: - ++ construct-merge - |= [gem=germ her=ship sud=desk] - !! - :: ++ edit :: edit:ze |= [wen=@da lem=nuri] :: edit ^- [(unit (map path lobe)) _..ze] @@ -1146,19 +1144,19 @@ |= gem=germ ^+ +> ?: (~(has by mer) ali) - +>.$(gon ``[%already-merging >[ali bob]< ~]) + +>.$(gon ``[%already-merging >ali< >bob< ~]) ?: &(=(0 let.dom) !?=(%init gem)) - +>.$(gon ``[%no-desk >[ali bob]< ~]) + +>.$(gon ``[%no-bob-desk >ali< >bob< ~]) =. gem.dat gem =. cas.dat [%da now] - ?: ?=(%init gem) + ?: ?=(%init gem.dat) fetch-ali =+ (~(get by hit.dom) let.dom) ?~ - - +>.$(gon ``[%no-version >[ali bob]< ~]) + +>.$(gon ``[%no-bob--version >ali< >bob< ~]) =+ (~(get by hut.ran) u.-) ?~ - - +>.$(gon ``[%no-commit >[ali bob]< ~]) + +>.$(gon ``[%no-bob-commit >ali< >bob< ~]) fetch-ali(bob.dat u.-) :: ++ fetch-ali @@ -1173,16 +1171,24 @@ |= rot=riot ^+ +> ?~ rot - +>.$(gon ``[%bad-fetch-ali >[ali bob]< ~]) + +>.$(gon ``[%bad-fetch-ali >ali< >bob< ~]) =+ ^= dum %- (hard ,[ank=* let=@ud hit=(map ,@ud tako) lab=(map ,@tas ,@ud)]) q.q.r.u.rot - =. ali.dat (~(got by hut.ran) (~(got by hit.dum) let.dum)) + ?: =(0 let.dum) + +>.$(gon ``[%no-ali-desk >ali< >bob< ~]) + =+ (~(get by hit.dum) let.dum) + ?~ - + +>.$(gon ``[%no-ali-version >ali< >bob< ~]) + =+ (~(get by hut.ran) u.-) + ?~ - + +>.$(gon ``[%no-ali-commit >ali< >bob< ~]) + =. ali.dat u.- |- ?- gem.dat %init ?. =(let.dom 0) - +>.^$(gon ``[%bad-init-merge >[ali bob]< ~]) + +>.^$(gon ``[%bad-init-merge >ali< >bob< ~]) =. new.dat ali.dat =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) @@ -1194,7 +1200,7 @@ ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) +>.^$(gon `~) ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) - +>.^$(gon ``[%bad-fine-merge >[ali bob]< ~]) + +>.^$(gon ``[%bad-fine-merge >ali< >bob< ~]) =. new.dat ali.dat =. erg.dat %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) @@ -1223,45 +1229,136 @@ `(map path ,?)`(~(run by q.ali.dat) |=(lobe %&)) checkout :: - %mate - +>.^$(gon ``[%mate-not-implemented >[ali bob]< ~]) - :: - %meld - +>.^$(gon ``[%meld-not-implemented >[ali bob]< ~]) + ?(%mate %meld) + ?: =(r.ali.dat r.bob.dat) + +>.^$(gon `~) + ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) + +>.^$(gon `~) + ?: (~(has in (reachable-takos r.ali.dat)) r.bob.dat) + $(gem.dat %fine) + =+ r=(find-merge-points:he ali.dat bob.dat) + ?~ r + +>.^$(gon ``[%mate-no-merge-base >ali< >bob< ~]) + ?. ?=([* ~ ~] r) + +>.^$(gon ``[%mate-criss-cross >ali< >bob< ~]) + =. bas.dat n.r + diff-ali + == + :: + ++ diff-bas + |= [nam=term yak=yaki] + ^+ +> + =- %_(+>.$ tag [- tag]) + :* hen + =+ (cat 3 %diff- nam) + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali - ~] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + %+ welp + ^- (list (pair silk silk)) + %+ murn (~(tap by q.bas.dat)) + |= [pax=path lob=lobe] + ^- (unit (pair silk silk)) + =+ (~(get by q.yak) lob) + ?~ - + ~ + ?: =(lob u.-) + ~ + :- ~ + :- [%done ~ %path !>(pax)] + [%diff (lobe-to-silk lob) (lobe-to-silk u.-)] + %+ turn + %+ skip (~(tap by q.yak)) + |=([path lobe] (~(has by q.bas.dat) +<-)) + |= [pax=path lob=lobe] + ^- (pair silk silk) + [[%done ~ %path !>(pax)] (lobe-to-silk lob)] == :: ++ diff-ali ^+ . - =- %_(+ tag [- tag]) - :* hen - [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %diff-ali ~] - %f %exec p.bob ~ %tabl - ^- (list (pair silk silk)) - !! - == + (diff-bas %ali ali.dat) :: ++ diffed-ali |= res=(each bead (list tank)) ^+ +> - !! + ?: ?=(%| -.res) + +>.$(gon ``[%diff-ali-bad-made leaf/"merge diff ali failed" p.res]) + =+ cay=q.p.res + ?@ p.cay + +>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~]) + =| dal=(map path cage) + => + |- ^+ + + ?~ p.p.cay + +.$(dal ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?^ gon.tal + tal + ?. ?=(%path p.i.p.p.cay) + +.$(gon ``[%diff-ali-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + ?. ?=(@ q.i.p.p.cay) + +.$(gon ``[%diff-ali-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + =+ coy=(slot 2 q.cay) + ?@ q.coy + +.$(gon ``[%diff-ali-strange-coy >ali< >bob< ~]) + %_ +.$ + dal + %+ ~(put by dal:tal) + ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + == + ?^ gon + +>.$ + =. dal.dat dal + diff-bob :: ++ diff-bob ^+ . - !! + (diff-bas %bob bob.dat) :: ++ diffed-bob |= res=(each bead (list tank)) ^+ +> - !! + ?: ?=(%| -.res) + +>.$(gon ``[%diff-bob-bad-made leaf/"merge diff bob failed" p.res]) + =+ cay=q.p.res + ?@ p.cay + +>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~]) + =| dal=(map path cage) + => + |- ^+ + + ?~ p.p.cay + +.$(dal ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?^ gon.tal + tal + ?. ?=(%path p.i.p.p.cay) + +.$(gon ``[%diff-bob-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + ?. ?=(@ q.i.p.p.cay) + +.$(gon ``[%diff-bob-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + =+ coy=(slot 2 q.cay) + ?@ q.coy + +.$(gon ``[%diff-bob-strange-coy >ali< >bob< ~]) + %_ +.$ + dal + %+ ~(put by dal:tal) + ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + == + ?^ gon + +>.$ + =. dob.dat dal + merge :: ++ merge ^+ . - !! + .(gon ``[%merge-not-implemented ~]) :: ++ merged |= res=(each bead (list tank)) ^+ +> - !! + +>.$(gon ``[%merged-not-implemented ~]) :: ++ checkout ^+ . @@ -1273,14 +1370,7 @@ %+ turn (~(tap by q.new.dat)) |= [a=path b=lobe] ^- (pair silk silk) - :- [%done ~ %path !>(a)] - |- ^- silk - =+ bob=(~(got by lat.ran) b) - ?- -.bob - %direct [%done ~ q.bob] - %indirect [%done ~ q.bob] - %delta [%pact $(b q.bob) [%done ~ r.bob]] - == + [[%done ~ %path !>(a)] (lobe-to-silk b)] == :: ++ checked-out @@ -1289,7 +1379,8 @@ ?: ?=(%| -.res) +>.$(gon ``[%checkout-bad-made leaf/"merge checkout failed" p.res]) =+ cay=q.p.res - ?@ p.cay ~| %patch-bad-marc !! + ?@ p.cay + +>.$(gon ``[%patch-bad-marc >ali< >bob< >p.cay< ~]) =| can=(list ,[path cage]) => |- ^+ + @@ -1299,12 +1390,12 @@ ?^ gon.tal tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-a >[ali bob]< >p.i.p.p.cay< ~]) + +.$(gon ``[%patch-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-b >[ali bob]< >p.i.p.p.cay< ~]) + +.$(gon ``[%patch-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%patch-strange-coy >[ali bob]< ~]) + +.$(gon ``[%patch-strange-coy >ali< >bob< ~]) %_ +.$ can :_ can:tal @@ -1345,7 +1436,7 @@ ?: ?=(%| -.res) +>.$(gon ``[%ergo-bad-made leaf/"merge ergo failed" p.res]) ?~ hez - +>.$(gon ``[%ergo-no-hez >[ali bob]< ~]) + +>.$(gon ``[%ergo-no-hez >ali< >bob< ~]) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! =| can=(list ,[path (unit mime)]) @@ -1357,12 +1448,12 @@ ?^ gon.tal tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-a >[ali bob]< >p.i.p.p.cay< ~]) + +.$(gon ``[%patch-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-b >[ali bob]< >p.i.p.p.cay< ~]) + +.$(gon ``[%patch-strange-marc-b >ali< >bob< >p.i.p.p.cay< ~]) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%patch-strange-coy >[ali bob]< ~]) + +.$(gon ``[%patch-strange-coy >ali< >bob< ~]) %_ +.$ can :_ can:tal @@ -1377,9 +1468,53 @@ gon `~ reg [[u.hez %ergo who syd let.dom can] reg] == + :: + ++ he + |% + ++ find-merge-points + |= [p=yaki q=yaki] :: maybe need jet + ^- (set yaki) + %- reduce-merge-points + =+ r=(reachable-takos r.p) + |- ^- (set yaki) + ?: (~(has in r) r.q) (~(put in *(set yaki)) q) + %+ roll p.q + |= [t=tako s=(set yaki)] + ?: (~(has in r) t) + (~(put in s) (tako-to-yaki t)) :: found + (~(uni in s) ^$(q (tako-to-yaki t))) :: traverse + :: + ++ reduce-merge-points + |= unk=(set yaki) :: maybe need jet + =| gud=(set yaki) + =+ ^= zar + ^- (map tako (set tako)) + %+ roll (~(tap in unk)) + |= [yak=yaki qar=(map tako (set tako))] + (~(put by qar) r.yak (reachable-takos r.yak)) + |- + ^- (set yaki) + ?~ unk gud + =+ bun=(~(del in `(set yaki)`unk) n.unk) + ?: %+ levy (~(tap by (~(uni in gud) bun)) ~) + |= yak=yaki + !(~(has in (~(got by zar) r.yak)) n.unk) + :: I'm pretty sure this is just wrong, but given + :: the relative intelligence levels of me and Jared, + :: I'm going to keep it here for a little bit + :: ?: %+ roll (~(tap by (~(uni in gud) bun)) ~) + :: |= [tak=yaki god=?] :: only good + unknown + :: ^- ? + :: ?. god god + :: (~(has in (~(got by zar) r.tak)) n.unk) + :: Also, I'd be curious how often this actually + :: elminates merge points + $(gud (~(put in gud) n.unk), unk bun) + $(unk bun) + -- -- -- --- + -- :: ++ do |= [now=@da hen=duct [who=ship him=ship] syd=@tas ruf=raft] From 26aef3ab54678ccd9327fbb0204f89e783a40495 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Tue, 17 Feb 2015 20:31:27 -0500 Subject: [PATCH 44/73] %mate works --- arvo/clay.hoon | 27 +++++++++++++++++++++++++-- arvo/zuse.hoon | 5 ++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 8beb35636..c21ef301a 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -819,7 +819,7 @@ == :: ++ make-direct :: make blob - |= [p=cage] + |= p=cage ^- blob [%direct (mug p) p] :: @@ -1353,7 +1353,30 @@ :: ++ merge ^+ . - .(gon ``[%merge-not-implemented ~]) + ?+ gem.dat ~| %merge-weird-gem !! + %mate + =+ (~(int by dal.dat) dob.dat) + ?^ - + +(gon ``[%mate-conflict >ali< >bob< >[-]< ~]) + =^ new lat.ran :: XX forgot deletes + ^- [(map path lobe) (map lobe blob)] + %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) + =< .(lat lat.ran) + |= [[pax=path cay=cage] new=(map path lobe) lat=(map lobe blob)] + =+ ^= bol + =+ (~(get by q.bas.dat) pax) + ?~ - + (make-direct cay) + (make-delta u.- cay) + [(~(put by new) pax p.bol) (~(put by lat) p.bol bol)] + =. new.dat + (make-yaki [r.ali.dat r.bob.dat ~] (~(uni by q.bas.dat) new) now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + =. erg.dat (~(run by new) |=(lobe %&)) + checkout + :: + %meld .(gon ``[%merge-not-implemented ~]) + == :: ++ merged |= res=(each bead (list tank)) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 75c20c60b..b1954567d 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1084,14 +1084,13 @@ ++ make-direct :: make blob |= [p=cage] ^- blob - [%direct (mug p) p] + [%direct (mug p.p q.q.p) p] :: ++ make-delta :: make blob delta |= [p=lobe q=cage] ^- blob - =+ t=[%delta 0 p q] =+ ^= has - %^ cat 7 (sham [%blob q.q.q]) + %^ cat 7 (sham [%blob p.q q.q.q]) (sham [%lobe p]) [%delta has p q] :: From 979898f2bf89e3bcaff2ab98fdd1fa450e8b859c Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 18 Feb 2015 19:53:28 -0500 Subject: [PATCH 45/73] ford %join --- arvo/clay.hoon | 75 ++++++++++++++++++++++++++-------------- arvo/ford.hoon | 66 +++++++++++++++++++++++++++++++---- arvo/hoon.hoon | 2 +- arvo/zuse.hoon | 2 +- main/app/merge/core.hook | 4 +-- main/mar/mime/door.hook | 1 + main/mar/txt/door.hook | 4 +++ 7 files changed, 117 insertions(+), 37 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index c21ef301a..0626b00ee 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -38,8 +38,8 @@ ali=yaki :: ali's commit bob=yaki :: bob's commit bas=yaki :: mergebase - dal=(map path cage) :: diff(bas,ali) - dob=(map path cage) :: diff(bas,bob) + dal=(map path (unit cage)) :: diff(bas,ali) + dob=(map path (unit cage)) :: diff(bas,bob) new=yaki :: merge(dal,dob) ank=ankh :: new state erg=(map path ,?) :: ergoable changes @@ -98,6 +98,7 @@ [%done p=(set beam) q=gage] :: literal [%dude p=tank q=silk] :: error wrap [%dune p=(set beam) q=(unit gage)] :: unit literal + [%join p=mark q=silk r=silk] :: merge [%mute p=silk q=(list (pair wing silk))] :: mutant [%pact p=silk q=silk] :: patch [%reef ~] :: kernel reef @@ -1229,7 +1230,7 @@ `(map path ,?)`(~(run by q.ali.dat) |=(lobe %&)) checkout :: - ?(%mate %meld) + ?(%meet %mate %meld) ?: =(r.ali.dat r.bob.dat) +>.^$(gon `~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) @@ -1238,9 +1239,9 @@ $(gem.dat %fine) =+ r=(find-merge-points:he ali.dat bob.dat) ?~ r - +>.^$(gon ``[%mate-no-merge-base >ali< >bob< ~]) + +>.^$(gon ``[%merge-no-merge-base >ali< >bob< ~]) ?. ?=([* ~ ~] r) - +>.^$(gon ``[%mate-criss-cross >ali< >bob< ~]) + +>.^$(gon ``[%merge-criss-cross >ali< >bob< ~]) =. bas.dat n.r diff-ali == @@ -1259,9 +1260,11 @@ %+ murn (~(tap by q.bas.dat)) |= [pax=path lob=lobe] ^- (unit (pair silk silk)) - =+ (~(get by q.yak) lob) + =+ (~(get by q.yak) pax) ?~ - - ~ + :- ~ + :- [%done ~ %path !>(pax)] + [%done ~ %null !>(~)] ?: =(lob u.-) ~ :- ~ @@ -1287,7 +1290,7 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~]) - =| dal=(map path cage) + =| dal=(map path (unit cage)) => |- ^+ + ?~ p.p.cay @@ -1306,7 +1309,9 @@ dal %+ ~(put by dal:tal) ((hard path) -.q.coy) - [q.i.p.p.cay (slot 3 coy)] + ?: ?=(%null q.i.p.p.cay) + ~ + `[q.i.p.p.cay (slot 3 coy)] == ?^ gon +>.$ @@ -1325,7 +1330,7 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~]) - =| dal=(map path cage) + =| dal=(map path (unit cage)) => |- ^+ + ?~ p.p.cay @@ -1344,7 +1349,9 @@ dal %+ ~(put by dal:tal) ((hard path) -.q.coy) - [q.i.p.p.cay (slot 3 coy)] + ?: ?=(%null q.i.p.p.cay) + ~ + `[q.i.p.p.cay (slot 3 coy)] == ?^ gon +>.$ @@ -1354,28 +1361,44 @@ ++ merge ^+ . ?+ gem.dat ~| %merge-weird-gem !! - %mate + %meet =+ (~(int by dal.dat) dob.dat) ?^ - - +(gon ``[%mate-conflict >ali< >bob< >[-]< ~]) - =^ new lat.ran :: XX forgot deletes - ^- [(map path lobe) (map lobe blob)] + +(gon ``[%meet-conflict >ali< >bob< >[-]< ~]) + =^ new lat.ran + ^- [(map path lobe) (map lobe blob)] + %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) + =< .(lat lat.ran) + |= $: [pax=path cay=(unit cage)] + new=(map path lobe) + lat=(map lobe blob) + == + ?~ cay + [new lat] + =+ ^= bol + =+ (~(get by q.bas.dat) pax) + ?~ - + (make-direct u.cay) + (make-delta u.- u.cay) + [(~(put by new) pax p.bol) (~(put by lat) p.bol bol)] + =+ ^- [del=(map path ,?) old=(map path lobe)] %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) - =< .(lat lat.ran) - |= [[pax=path cay=cage] new=(map path lobe) lat=(map lobe blob)] - =+ ^= bol - =+ (~(get by q.bas.dat) pax) - ?~ - - (make-direct cay) - (make-delta u.- cay) - [(~(put by new) pax p.bol) (~(put by lat) p.bol bol)] + =< .(old q.bas.dat) + |= $: [pax=path cay=(unit cage)] + del=(map path ,?) + old=(map path lobe) + == + ?^ cay + [del old] + [(~(put by del) pax %|) (~(del by old) pax)] =. new.dat - (make-yaki [r.ali.dat r.bob.dat ~] (~(uni by q.bas.dat) new) now) + (make-yaki [r.ali.dat r.bob.dat ~] (~(uni by old) new) now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) - =. erg.dat (~(run by new) |=(lobe %&)) + =. erg.dat %- ~(uni by del) + `(map path ,?)`(~(run by new) |=(lobe %&)) checkout :: - %meld .(gon ``[%merge-not-implemented ~]) + ?(%mate %meld) .(gon ``[%merge-not-implemented ~]) == :: ++ merged diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 922d1137e..0c90afa50 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -74,6 +74,7 @@ [%done p=(set beam) q=gage] :: literal [%dude p=tank q=silk] :: error wrap [%dune p=(set beam) q=(unit gage)] :: unit literal + [%join p=mark q=silk r=silk] :: merge [%mute p=silk q=(list (pair wing silk))] :: mutant [%pact p=silk q=silk] :: patch [%plan p=beam q=spur r=hood] :: structured assembly @@ -397,8 +398,7 @@ == |= [cof=cafe cay=gage coy=gage] ?. &(?=(@ p.cay) ?=(@ p.coy)) - ~| %bad-diff-marc - !! + (flaw cof leaf/"bad diff marc" ~) ?. =(p.cay p.coy) %+ flaw cof :_ ~ leaf/"diff on data of different marks: {(trip p.cay)} {(trip p.coy)}" @@ -415,7 +415,9 @@ =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) ?~ for (flaw cof leaf/"bad ++sted:grad" ~) - (make cof %diff [%cast u.for kas] [%cast u.for kos]) + %^ make cof %diff + :- [%cast u.for [%done ~ cay]] + [%cast u.for [%done ~ coy]] ?. (slab %diff p.gar) (flaw cof leaf/"no ++diff:grad" ~) %+ cope (keel cof pro [[%& 6]~ q.cay]~) @@ -423,7 +425,7 @@ %+ cope %^ maul cof (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) - q.coy + (slop q.cay q.coy) |= [cof=cafe dif=vase] =+ for=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ for @@ -638,6 +640,48 @@ -- -- :: + ++ join + |= [cof=cafe for=mark kas=silk kos=silk] + ^- (bolt gage) + %. [cof kas kos] + ;~ cope + ;~ coax + |=([cof=cafe p=silk q=silk] (make cof p)) + |=([cof=cafe p=silk q=silk] (make cof q)) + == + |= [cof=cafe cay=gage coy=gage] + ?. &(?=(@ p.cay) ?=(@ p.coy)) + (flaw cof leaf/"bad join marc: {} {}" ~) + %+ cope (fang cof for [our %main %da now]) + |= [cof=cafe pro=vase] + ?. (slab %grad p.pro) + (flaw cof leaf/"no ++grad" ~) + =+ gar=(slap pro [%cnzy %grad]) + ?. (slab %form p.gar) + ?. (slab %sted p.gar) + (flaw cof leaf/"no ++form:grad nor ++sted:grad" ~) + =+ too=((soft ,@tas) q:(slap gar [%cnzy %sted])) + ?~ too + (flaw cof leaf/"bad ++sted:grad" ~) + (make cof %join u.too [%done ~ cay] [%done ~ coy]) + =+ fom=((soft ,@tas) q:(slap gar [%cnzy %form])) + ?~ fom + (flaw cof leaf/"bad ++form:grad" ~) + ?. &(=(fom p.cay) =(fom p.coy)) + %+ flaw cof :_ ~ + leaf/"join on data of bad marks: {(trip p.cay)} {(trip p.coy)}" + ?: =(q.q.cay q.q.coy) + (fine cof cay) + ?. (slab %join p.gar) + (flaw cof leaf/"no ++join:grad" ~) + %+ cope + %^ maul cof + (slap (slap pro [%cnzy %grad]) [%cnzy %join]) + q.coy + |= [cof=cafe dif=vase] + (fine cof p.cay dif) + == + :: ++ kale :: mutate |= [cof=cafe kas=silk muy=(list (pair wing silk))] ^- (bolt gage) @@ -940,7 +984,8 @@ |= [cof=cafe cay=gage] ^- (bolt gage) %+ cool |.(leaf/"ford: casting {} to {}") - ?. ?=(@ p.cay) ~| %bad-cast-marc !! + ?. ?=(@ p.cay) + (flaw cof leaf/"bad cast marc" ~) %+ cope (link cof p.kas p.cay [our %main %da now] q.cay) |= [cof=cafe vax=vase] (fine cof [p.kas vax]) @@ -954,6 +999,12 @@ %dune ?~ q.kas [cof [%2 [%leaf "no data"]~]] $(kas [%done p.kas u.q.kas]) + :: + %join + %+ cool + |. + leaf/"ford: join {} {<`@p`(mug q.kas)>} {<`@p`(mug r.kas)>}" + (join cof p.kas q.kas r.kas) :: %mute (kale cof p.kas q.kas) %pact @@ -1303,7 +1354,8 @@ |=([cof=cafe p=silk q=silk] (make cof q)) == |= [cof=cafe cay=gage coy=gage] - ?. &(?=(@ p.cay) ?=(@ p.coy)) ~| %bad-pact-marc !! + ?. &(?=(@ p.cay) ?=(@ p.coy)) + (flaw cof leaf/"bad pact marc" ~) %+ cope (fang cof p.cay [our %main %da now]) |= [cof=cafe pro=vase] ?. (slab %grad p.pro) @@ -1315,7 +1367,7 @@ =+ for=((soft ,@tas) q:(slap gar [%cnzy %sted])) ?~ for (flaw cof leaf/"bad ++sted:grad" ~) - (make cof %cast p.cay %pact [%cast u.for kas] kos) + (make cof %cast p.cay %pact [%cast u.for [%done ~ cay]] [%done ~ coy]) =+ for=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ for (flaw cof leaf/"bad ++form:grad" ~) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 17573424c..6405afca6 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -50,7 +50,7 @@ [std=term kel=@] :: kelvin version [ven=term pro=term kel=@] :: vendor and product [ven=term pro=term ver=@ kel=@] :: all of the above - == + == :: ++ clue ,[p=chum q=nock r=(list (pair term nock))] :: battery definition ++ coil $: p=?(%gold %iron %lead %zinc) :: core type q=type :: diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index b1954567d..599220c64 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -2902,7 +2902,7 @@ == :: ++ gilt ,[@tas *] :: presumed gift ++ gens ,[p=lang q=gcos] :: general identity -++ germ ?(%init %fine %that %this %mate %meld) :: merge style +++ germ ?(%init %fine %that %this %mate %meet %meld) :: merge style ++ gcos :: id description $% [%czar ~] :: 8-bit ship [%duke p=what] :: 32-bit ship diff --git a/main/app/merge/core.hook b/main/app/merge/core.hook index 1e86c3497..87fea2f02 100644 --- a/main/app/merge/core.hook +++ b/main/app/merge/core.hook @@ -20,8 +20,8 @@ ?~ - [leaf/"not working so well" >sih< ~] ?~ are.u - [leaf/"synced" ~] - [leaf/"failed to sync" >p.u.are.u< q.u.are.u] + [leaf/"merged" ~] + [leaf/"failed to merge" >p.u.are.u< q.u.are.u] %- flop :- i=[ost %pass / %g %cide %$] ^= t diff --git a/main/mar/mime/door.hook b/main/mar/mime/door.hook index d7c54deac..7f61733c9 100644 --- a/main/mar/mime/door.hook +++ b/main/mar/mime/door.hook @@ -12,5 +12,6 @@ ++ form %mime ++ diff |=(mime +<) ++ pact |=(mime +<) + ++ join |=([mime mime] +<-) -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index c8ee2c38d..326cdc32e 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -28,5 +28,9 @@ |= dif=(urge cord) ^- wain (lurk txt dif) + ++ join + |= [ali=(urge cord) bob=(urge cord)] + ^- (urge cord) + ali -- -- From c826908afe0fcc73eea05b7dae2f4f2d0beabff1 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 18 Feb 2015 20:51:02 -0500 Subject: [PATCH 46/73] fix %eyre --- arvo/clay.hoon | 4 +++- arvo/eyre.hoon | 5 +++-- arvo/ford.hoon | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0626b00ee..3cef81b77 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -452,6 +452,7 @@ dok ~ :: tag :: %- welp :_ tag + :: ^- (list ,[duct path note]) :: %+ murn lon.u.dok :: |= a=path @@ -460,7 +461,8 @@ :: `[hen [%diffing (scot %p who) syd (scot %da wen) a] %f %exec who ~] :: yel - [[hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" p.res] yel] + :_ yel + [hen %note '!' %rose [" " "" ""] leaf/"clay diff failed" >pax< p.res] == ?. ?=(@ p.q.p.res) ~| %bad-marc !! =: lon.u.dok (skip lon.u.dok |=(path =(+< pax))) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 59272d6be..355fa08b1 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -4,7 +4,7 @@ |= pit=vase => =~ |% :: interfaces -++ bead ,[p=(set beam) q=cage] :: computed result +++ bead ,[p=(set beam) q=gage] :: computed result ++ chop ,[p=@ud q=@da] :: see ++ gift :: out result <-$ $% [%thou p=httr] :: raw http response @@ -455,6 +455,7 @@ ?- -.p.+.sih %& =* mab t.t.t.t.tea + ?> ?=(@ p.q.p.p.sih) %= +>.$ mow :_ mow @@ -1968,7 +1969,7 @@ :+ 500 ~[content-type/'text/html'] [~ (tact (poxo mad))] - & [%fin (lofa mog (lopo q.p.p.pez.pip))] + & [%fin (lofa mog (lopo [?>(?=(@ p) .)]:q.p.p.pez.pip))] == == :: diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 0c90afa50..facd1d816 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -416,8 +416,9 @@ ?~ for (flaw cof leaf/"bad ++sted:grad" ~) %^ make cof %diff - :- [%cast u.for [%done ~ cay]] - [%cast u.for [%done ~ coy]] + [kas kos] +:: :- [%cast u.for [%done ~ cay]] +:: [%cast u.for [%done ~ coy]] ?. (slab %diff p.gar) (flaw cof leaf/"no ++diff:grad" ~) %+ cope (keel cof pro [[%& 6]~ q.cay]~) From bee28f639ab2c386337cb4d730b769f5d8724256 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 19 Feb 2015 13:39:28 -0500 Subject: [PATCH 47/73] fixed diff bug --- arvo/ford.hoon | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index facd1d816..7cfafa89f 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -416,9 +416,8 @@ ?~ for (flaw cof leaf/"bad ++sted:grad" ~) %^ make cof %diff - [kas kos] -:: :- [%cast u.for [%done ~ cay]] -:: [%cast u.for [%done ~ coy]] + :- [%cast u.for [%done ~ cay]] + [%cast u.for [%done ~ coy]] ?. (slab %diff p.gar) (flaw cof leaf/"no ++diff:grad" ~) %+ cope (keel cof pro [[%& 6]~ q.cay]~) @@ -426,7 +425,7 @@ %+ cope %^ maul cof (slap (slap pox [%cnzy %grad]) [%cnzy %diff]) - (slop q.cay q.coy) + q.coy |= [cof=cafe dif=vase] =+ for=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ for @@ -678,7 +677,7 @@ %+ cope %^ maul cof (slap (slap pro [%cnzy %grad]) [%cnzy %join]) - q.coy + (slop q.cay q.coy) |= [cof=cafe dif=vase] (fine cof p.cay dif) == From 9d4daa1e2c8063639e994e073ea2be555d43ab76 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 19 Feb 2015 20:01:30 -0500 Subject: [PATCH 48/73] waypoint --- arvo/clay.hoon | 98 +++++++++++++++++++++++++++++++++++++----- arvo/ford.hoon | 4 +- main/mar/txt/door.hook | 2 +- 3 files changed, 92 insertions(+), 12 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 3cef81b77..980c6eeff 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1332,11 +1332,11 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~]) - =| dal=(map path (unit cage)) + =| dob=(map path (unit cage)) => |- ^+ + ?~ p.p.cay - +.$(dal ~) + +.$(dob ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) ?^ gon.tal tal @@ -1348,8 +1348,8 @@ ?@ q.coy +.$(gon ``[%diff-bob-strange-coy >ali< >bob< ~]) %_ +.$ - dal - %+ ~(put by dal:tal) + dob + %+ ~(put by dob:tal) ((hard path) -.q.coy) ?: ?=(%null q.i.p.p.cay) ~ @@ -1357,16 +1357,17 @@ == ?^ gon +>.$ - =. dob.dat dal + =. dob.dat dob merge :: ++ merge ^+ . + |- ?+ gem.dat ~| %merge-weird-gem !! %meet - =+ (~(int by dal.dat) dob.dat) - ?^ - - +(gon ``[%meet-conflict >ali< >bob< >[-]< ~]) + =+ bof=(~(int by dal.dat) dob.dat) + ?^ bof + +.$(gon ``[%meet-conflict >ali< >bob< >bof< ~]) =^ new lat.ran ^- [(map path lobe) (map lobe blob)] %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) @@ -1400,13 +1401,90 @@ `(map path ,?)`(~(run by new) |=(lobe %&)) checkout :: - ?(%mate %meld) .(gon ``[%merge-not-implemented ~]) + %mate + =+ bof=(~(int by dal.dat) dob.dat) + ?~ bof + $(gem.dat %meet) + =- %_(+.$ tag [- tag]) + :* hen + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali - ~] + %f %exec p.bob ~ %tabl + ^- (list (pair silk silk)) + %+ murn (~(tap by u.bof)) + |= [pax=path cay=(unit cage)] + ^- (unit (pair silk silk)) + =+ cal=(~(got by dal.dat) pax) + =+ cob=(~(got by dob.dat) pax) + ?~ cal + ?~ cob + ~ :: both delete + ~ :: conflict + ?~ cob + ~ :: conflict + :- ~ + :- [%done ~ %path !>(pax)] + [%join for [%done ~ u.cal] [%done ~ u.cob]] + == + :: + %meld .(gon ``[%meld-not-implemented ~]) == :: ++ merged |= res=(each bead (list tank)) ^+ +> - +>.$(gon ``[%merged-not-implemented ~]) + ?+ gem.dat ~| %merge-weird-gem !! + %mate + ?: ?=(%| -.res) + +>.$(gon ``[%merge-bad-made leaf/"merging failed" p.res]) + =+ cay=q.p.res + ?@ p.cay + +>.$(gon ``[%merge-bad-marc >ali< >bob< >p.cay< ~]) + =| bof=(map path cage) + => + |- ^+ + + ?~ p.p.cay + +.$(bof ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?^ gon.tal + tal + ?. ?=(%path p.i.p.p.cay) + +.$(gon ``[%merge-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + ?. ?=(@ q.i.p.p.cay) + +.$(gon ``[%merge-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + =+ coy=(slot 2 q.cay) + ?@ q.coy + +.$(gon ``[%merge-strange-coy >ali< >bob< ~]) + %_ +.$ + bof + %+ ~(put by bof:tal) + ((hard path) -.q.coy) + [q.i.p.p.cay (slot 3 coy)] + == + ?^ gon + +>.$ + =+ ^- con=(set path) + %- sa + =- %- (~(run by -) |=([pax *] +<-)) + %+ skim (~(tap by u.bof)) + |= [pax=path cay=(unit cage)] + =+ cal=(~(got by dal.dat) pax) + =+ cob=(~(got by dob.dat) pax) + ?| &(?=(~ cal) ?=(^ cob)) + &(?=(^ cal) ?=(~ cob)) + == + !! + :: + %meld + +>.$(gon ``[%meld-not-implemented ~]) + == + + :: %+ skim (~(tap by u.bof)) + :: |= [pax=path cay=(unit cage)] + :: =+ cal=(~(got by dal.dat) pax) + :: =+ cob=(~(got by dob.dat) pax) + :: ?| &(?=(~ cal) ?=(^ cob)) + :: &(?=(^ cal) ?=(~ cob)) + :: == :: ++ checkout ^+ . diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 7cfafa89f..6bdfbdf1a 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -679,7 +679,9 @@ (slap (slap pro [%cnzy %grad]) [%cnzy %join]) (slop q.cay q.coy) |= [cof=cafe dif=vase] - (fine cof p.cay dif) + ?@ q.dif + (fine cof %null dif) + (fine cof u.fom (slot 3 dif)) == :: ++ kale :: mutate diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 326cdc32e..67761339c 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -30,7 +30,7 @@ (lurk txt dif) ++ join |= [ali=(urge cord) bob=(urge cord)] - ^- (urge cord) + ^- (unit (urge cord)) ali -- -- From 4ced937e60576eace2399358698b1ffb8e0f7484 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Fri, 20 Feb 2015 21:07:45 -0500 Subject: [PATCH 49/73] %mate conflict detection --- arvo/clay.hoon | 236 ++++++++++++++++++++++++---------------- main/mar/mime/door.hook | 2 +- main/mar/txt/door.hook | 2 +- 3 files changed, 142 insertions(+), 98 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 980c6eeff..e8c25fd82 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -4,6 +4,11 @@ |= pit=vase => |% ++ bead ,[p=(set beam) q=gage] :: ford result +++ cane :: change set + $: new=(map path lobe) :: new files + can=(map path cage) :: diffs + old=(map path ,~) :: deleted files + == :: ++ cult (map duct rove) :: subscriptions ++ dojo :: domestic desk state $: qyx=cult :: subscribers @@ -38,8 +43,8 @@ ali=yaki :: ali's commit bob=yaki :: bob's commit bas=yaki :: mergebase - dal=(map path (unit cage)) :: diff(bas,ali) - dob=(map path (unit cage)) :: diff(bas,bob) + dal=cane :: diff(bas,ali) + dob=cane :: diff(bas,bob) new=yaki :: merge(dal,dob) ank=ankh :: new state erg=(map path ,?) :: ergoable changes @@ -1257,27 +1262,26 @@ [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali - ~] %f %exec p.bob ~ %tabl ^- (list (pair silk silk)) - %+ welp - ^- (list (pair silk silk)) - %+ murn (~(tap by q.bas.dat)) - |= [pax=path lob=lobe] - ^- (unit (pair silk silk)) - =+ (~(get by q.yak) pax) - ?~ - - :- ~ - :- [%done ~ %path !>(pax)] - [%done ~ %null !>(~)] - ?: =(lob u.-) - ~ - :- ~ - :- [%done ~ %path !>(pax)] - [%diff (lobe-to-silk lob) (lobe-to-silk u.-)] - %+ turn - %+ skip (~(tap by q.yak)) - |=([path lobe] (~(has by q.bas.dat) +<-)) + %+ murn (~(tap by q.bas.dat)) |= [pax=path lob=lobe] - ^- (pair silk silk) - [[%done ~ %path !>(pax)] (lobe-to-silk lob)] + ^- (unit (pair silk silk)) + =+ (~(get by q.yak) pax) + ?~ - + ~ + :: :- ~ + :: :- [%done ~ %path !>(pax)] + :: [%done ~ %null !>(~)] + ?: =(lob u.-) + ~ + :- ~ + :- [%done ~ %path !>(pax)] + [%diff (lobe-to-silk lob) (lobe-to-silk u.-)] + ::%+ turn + :: %+ skip (~(tap by q.yak)) + :: |=([path lobe] (~(has by q.bas.dat) +<-)) + ::|= [pax=path lob=lobe] + ::^- (pair silk silk) + ::[[%done ~ %path !>(pax)] (lobe-to-silk lob)] == :: ++ diff-ali @@ -1292,11 +1296,11 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~]) - =| dal=(map path (unit cage)) + =| can=(map path cage) => |- ^+ + ?~ p.p.cay - +.$(dal ~) + +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) ?^ gon.tal tal @@ -1308,16 +1312,26 @@ ?@ q.coy +.$(gon ``[%diff-ali-strange-coy >ali< >bob< ~]) %_ +.$ - dal - %+ ~(put by dal:tal) + can + %+ ~(put by can:tal) ((hard path) -.q.coy) - ?: ?=(%null q.i.p.p.cay) - ~ - `[q.i.p.p.cay (slot 3 coy)] + [q.i.p.p.cay (slot 3 coy)] == ?^ gon +>.$ - =. dal.dat dal + =. new.dal.dat + %- mo + %+ skip (~(tap by q.ali.dat)) + |= [pax=path lob=lobe] + (~(has by q.bas.dat) pax) + =. can.dal.dat can + =. old.dal.dat + %- mo ^- (list ,[path ~]) + %+ murn (~(tap by q.bas.dat)) + |= [pax=path lob=lobe] + ?. =(~ (~(get by q.ali.dat) pax)) + ~ + (some pax ~) diff-bob :: ++ diff-bob @@ -1332,11 +1346,11 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~]) - =| dob=(map path (unit cage)) + =| can=(map path cage) => |- ^+ + ?~ p.p.cay - +.$(dob ~) + +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) ?^ gon.tal tal @@ -1348,85 +1362,100 @@ ?@ q.coy +.$(gon ``[%diff-bob-strange-coy >ali< >bob< ~]) %_ +.$ - dob - %+ ~(put by dob:tal) + can + %+ ~(put by can:tal) ((hard path) -.q.coy) - ?: ?=(%null q.i.p.p.cay) - ~ - `[q.i.p.p.cay (slot 3 coy)] + [q.i.p.p.cay (slot 3 coy)] == ?^ gon +>.$ - =. dob.dat dob + =. new.dob.dat + %- mo + %+ skip (~(tap by q.bob.dat)) + |= [pax=path lob=lobe] + (~(has by q.bas.dat) pax) + =. can.dob.dat can + =. old.dob.dat + %- mo ^- (list ,[path ~]) + %+ murn (~(tap by q.bas.dat)) + |= [pax=path lob=lobe] + ?. =(~ (~(get by q.bob.dat) pax)) + ~ + (some pax ~) merge :: ++ merge ^+ . - |- + |- ^+ +.$ ?+ gem.dat ~| %merge-weird-gem !! %meet - =+ bof=(~(int by dal.dat) dob.dat) + =+ ^= bof + %- %~ int by + %- ~(uni by `(map path ,*)`new.dal.dat) + %- ~(uni by `(map path ,*)`can.dal.dat) + `(map path ,*)`old.dal.dat + %- ~(uni by `(map path ,*)`new.dob.dat) + %- ~(uni by `(map path ,*)`can.dob.dat) + `(map path ,*)`old.dob.dat ?^ bof - +.$(gon ``[%meet-conflict >ali< >bob< >bof< ~]) + =- +.$(gon ``[%meet-conflict >ali< >bob< >[-]< ~]) + (~(run by `(map path ,*)`bof) ,_~) =^ new lat.ran ^- [(map path lobe) (map lobe blob)] - %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) + %+ roll (~(tap by (~(uni by can.dal.dat) can.dob.dat))) =< .(lat lat.ran) - |= $: [pax=path cay=(unit cage)] - new=(map path lobe) - lat=(map lobe blob) - == - ?~ cay - [new lat] + |= [[pax=path cay=cage] new=(map path lobe) lat=(map lobe blob)] =+ ^= bol =+ (~(get by q.bas.dat) pax) ?~ - - (make-direct u.cay) - (make-delta u.- u.cay) + ~| %strange-diff-no-base + !! + (make-delta u.- cay) [(~(put by new) pax p.bol) (~(put by lat) p.bol bol)] - =+ ^- [del=(map path ,?) old=(map path lobe)] - %+ roll (~(tap by (~(uni by dal.dat) dob.dat))) + =. new (~(uni by new) new.dal.dat) + =. new (~(uni by new) new.dob.dat) + =+ del=(~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) + =+ ^- old=(map path lobe) + %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) =< .(old q.bas.dat) - |= $: [pax=path cay=(unit cage)] - del=(map path ,?) - old=(map path lobe) - == - ?^ cay - [del old] - [(~(put by del) pax %|) (~(del by old) pax)] + |= [[pax=path ~] old=(map path lobe)] + (~(del by old) pax) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] (~(uni by old) new) now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) - =. erg.dat %- ~(uni by del) + =. erg.dat %- ~(uni by `(map path ,?)`del) `(map path ,?)`(~(run by new) |=(lobe %&)) checkout :: %mate - =+ bof=(~(int by dal.dat) dob.dat) + =+ ^= bof + %- %~ int by + %- ~(uni by `(map path ,*)`new.dal.dat) + %- ~(uni by `(map path ,*)`can.dal.dat) + `(map path ,*)`old.dal.dat + %- ~(uni by `(map path ,*)`new.dob.dat) + %- ~(uni by `(map path ,*)`can.dob.dat) + `(map path ,*)`old.dob.dat ?~ bof $(gem.dat %meet) =- %_(+.$ tag [- tag]) :* hen - [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali - ~] + [%merge (scot %p p.bob) q.bob (scot %p p.ali) q.ali %merge ~] %f %exec p.bob ~ %tabl ^- (list (pair silk silk)) - %+ murn (~(tap by u.bof)) - |= [pax=path cay=(unit cage)] - ^- (unit (pair silk silk)) - =+ cal=(~(got by dal.dat) pax) - =+ cob=(~(got by dob.dat) pax) - ?~ cal - ?~ cob - ~ :: both delete - ~ :: conflict - ?~ cob - ~ :: conflict - :- ~ + %+ turn (~(tap by (~(int by can.dal.dat) can.dob.dat))) + |= [pax=path *] + ^- (pair silk silk) + =+ cal=(~(got by can.dal.dat) pax) + =+ cob=(~(got by can.dob.dat) pax) + =+ ^= for + =+ (slag (dec (lent pax)) pax) + ?~(- %$ i.-) :- [%done ~ %path !>(pax)] - [%join for [%done ~ u.cal] [%done ~ u.cob]] + [%join for [%done ~ cal] [%done ~ cob]] == :: - %meld .(gon ``[%meld-not-implemented ~]) + %meld +.$(gon ``[%meld-not-implemented ~]) == :: ++ merged @@ -1439,7 +1468,7 @@ =+ cay=q.p.res ?@ p.cay +>.$(gon ``[%merge-bad-marc >ali< >bob< >p.cay< ~]) - =| bof=(map path cage) + =| bof=(map path (unit cage)) => |- ^+ + ?~ p.p.cay @@ -1458,33 +1487,48 @@ bof %+ ~(put by bof:tal) ((hard path) -.q.coy) - [q.i.p.p.cay (slot 3 coy)] + ?: ?=(%null q.i.p.p.cay) + ~ + `[q.i.p.p.cay (slot 3 coy)] == ?^ gon +>.$ - =+ ^- con=(set path) - %- sa - =- %- (~(run by -) |=([pax *] +<-)) - %+ skim (~(tap by u.bof)) - |= [pax=path cay=(unit cage)] - =+ cal=(~(got by dal.dat) pax) - =+ cob=(~(got by dob.dat) pax) - ?| &(?=(~ cal) ?=(^ cob)) - &(?=(^ cal) ?=(~ cob)) - == + =+ ^- con=(map path ,*) + %- mo + %+ skim (~(tap by bof)) + |=([pax=path cay=(unit cage)] ?=(~ cay)) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skim (~(tap by old.dal.dat)) + |= [pax=path ~] + ?: (~(has by new.dob.dat) pax) + ~| %strange-add-and-del + !! + (~(has by can.dob.dat) pax) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skim (~(tap by old.dob.dat)) + |= [pax=path ~] + ?: (~(has by new.dal.dat) pax) + ~| %strange-del-and-add + !! + (~(has by can.dal.dat) pax) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skip (~(tap by (~(int by new.dal.dat) new.dob.dat))) + |= [pax=path *] + =((~(got by new.dal.dat) pax) (~(got by new.dob.dat) pax)) + ?^ con + =+ (turn (~(tap by `(map path ,*)`con)) |=([path *] >[+<-]<)) + +>.$(gon ``[%mate-conflict >ali< >bob< -]) !! :: %meld +>.$(gon ``[%meld-not-implemented ~]) == - - :: %+ skim (~(tap by u.bof)) - :: |= [pax=path cay=(unit cage)] - :: =+ cal=(~(got by dal.dat) pax) - :: =+ cob=(~(got by dob.dat) pax) - :: ?| &(?=(~ cal) ?=(^ cob)) - :: &(?=(^ cal) ?=(~ cob)) - :: == :: ++ checkout ^+ . diff --git a/main/mar/mime/door.hook b/main/mar/mime/door.hook index 7f61733c9..c796d8b43 100644 --- a/main/mar/mime/door.hook +++ b/main/mar/mime/door.hook @@ -12,6 +12,6 @@ ++ form %mime ++ diff |=(mime +<) ++ pact |=(mime +<) - ++ join |=([mime mime] +<-) + ++ join |=([mime mime] `(unit mime)``+<-) -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index 67761339c..c5c64ccef 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -31,6 +31,6 @@ ++ join |= [ali=(urge cord) bob=(urge cord)] ^- (unit (urge cord)) - ali + `ali -- -- From ae63f74ef5f2632cd0794512f5fb15e1692e6ce0 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 23 Feb 2015 17:35:22 -0500 Subject: [PATCH 50/73] %mate works? --- arvo/clay.hoon | 77 +++++++++++++++++++++++++++++++++++++------------- arvo/ford.hoon | 7 +++-- 2 files changed, 62 insertions(+), 22 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index e8c25fd82..0a006bfe6 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1400,31 +1400,35 @@ ?^ bof =- +.$(gon ``[%meet-conflict >ali< >bob< >[-]< ~]) (~(run by `(map path ,*)`bof) ,_~) - =^ new lat.ran - ^- [(map path lobe) (map lobe blob)] - %+ roll (~(tap by (~(uni by can.dal.dat) can.dob.dat))) - =< .(lat lat.ran) - |= [[pax=path cay=cage] new=(map path lobe) lat=(map lobe blob)] - =+ ^= bol - =+ (~(get by q.bas.dat) pax) - ?~ - - ~| %strange-diff-no-base - !! - (make-delta u.- cay) - [(~(put by new) pax p.bol) (~(put by lat) p.bol bol)] - =. new (~(uni by new) new.dal.dat) - =. new (~(uni by new) new.dob.dat) - =+ del=(~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) =+ ^- old=(map path lobe) %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) =< .(old q.bas.dat) |= [[pax=path ~] old=(map path lobe)] (~(del by old) pax) + =^ hat lat.ran + ^- [(map path lobe) (map lobe blob)] + %+ roll (~(tap by (~(uni by can.dal.dat) can.dob.dat))) + =< .(lat lat.ran) + |= [[pax=path cay=cage] hat=(map path lobe) lat=(map lobe blob)] + =+ ^= bol + =+ (~(get by q.bas.dat) pax) + ?~ - + ~| %meet-strange-diff-no-base + !! + (make-delta u.- cay) + [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] + =. hat + %- ~(uni by old) + %- ~(uni by new.dal.dat) + %- ~(uni by new.dob.dat) + hat + =+ ^- del=(map path ,?) + (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) =. new.dat - (make-yaki [r.ali.dat r.bob.dat ~] (~(uni by old) new) now) + (make-yaki [r.ali.dat r.bob.dat ~] hat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) - =. erg.dat %- ~(uni by `(map path ,?)`del) - `(map path ,?)`(~(run by new) |=(lobe %&)) + =. erg.dat %- ~(uni by del) + `(map path ,?)`(~(run by hat) |=(lobe %&)) checkout :: %mate @@ -1524,7 +1528,42 @@ ?^ con =+ (turn (~(tap by `(map path ,*)`con)) |=([path *] >[+<-]<)) +>.$(gon ``[%mate-conflict >ali< >bob< -]) - !! + =+ ^- old=(map path lobe) + %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) + =< .(old q.bas.dat) + |= [[pax=path ~] old=(map path lobe)] + (~(del by old) pax) + =+ ^- can=(map path cage) + %- ~(uni by can.dal.dat) + %- ~(uni by can.dob.dat) + %- ~(run by bof) + |= cay=(unit cage) + (need cay) + =^ hat lat.ran + ^- [(map path lobe) (map lobe blob)] + %+ roll (~(tap by can)) + =< .(lat lat.ran) + |= [[pax=path cay=cage] hat=(map path lobe) lat=(map lobe blob)] + =+ ^= bol + =+ (~(get by q.bas.dat) pax) + ?~ - + ~| %mate-strange-diff-no-base + !! + (make-delta u.- cay) + [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] + =. hat + %- ~(uni by old) + %- ~(uni by new.dal.dat) + %- ~(uni by new.dob.dat) + hat + =+ ^- del=(map path ,?) + (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) + =. new.dat + (make-yaki [r.ali.dat r.bob.dat ~] hat now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + =. erg.dat %- ~(uni by del) + `(map path ,?)`(~(run by hat) |=(lobe %&)) + checkout :: %meld +>.$(gon ``[%meld-not-implemented ~]) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 6bdfbdf1a..37d10c082 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -667,9 +667,10 @@ =+ fom=((soft ,@tas) q:(slap gar [%cnzy %form])) ?~ fom (flaw cof leaf/"bad ++form:grad" ~) - ?. &(=(fom p.cay) =(fom p.coy)) - %+ flaw cof :_ ~ - leaf/"join on data of bad marks: {(trip p.cay)} {(trip p.coy)}" + ?. &(=(u.fom p.cay) =(u.fom p.coy)) + %+ flaw cof :_ :_ ~ + leaf/"join on data of bad marks: {(trip p.cay)} {(trip p.coy)}" + leaf/"expected mark {(trip u.fom)}" ?: =(q.q.cay q.q.coy) (fine cof cay) ?. (slab %join p.gar) From a22cef74f74254fb73662b8a6a6579989f4e75c5 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Mon, 23 Feb 2015 20:21:53 -0500 Subject: [PATCH 51/73] fix false positives in crisscross detection --- arvo/clay.hoon | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 0a006bfe6..9f8051506 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1248,7 +1248,8 @@ ?~ r +>.^$(gon ``[%merge-no-merge-base >ali< >bob< ~]) ?. ?=([* ~ ~] r) - +>.^$(gon ``[%merge-criss-cross >ali< >bob< ~]) + =- +>.^$(gon ``[%merge-criss-cross >ali< >bob< >[-]< ~]) + (lent (~(tap in `(set yaki)`r))) =. bas.dat n.r diff-ali == @@ -1707,7 +1708,7 @@ =+ bun=(~(del in `(set yaki)`unk) n.unk) ?: %+ levy (~(tap by (~(uni in gud) bun)) ~) |= yak=yaki - !(~(has in (~(got by zar) r.yak)) n.unk) + !(~(has in (~(got by zar) r.yak)) r.n.unk) :: I'm pretty sure this is just wrong, but given :: the relative intelligence levels of me and Jared, :: I'm going to keep it here for a little bit From 5d4ef54ca156cadd8de919948e1c8e64ac00f078 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 25 Feb 2015 17:58:47 -0500 Subject: [PATCH 52/73] first crack at `%meld` --- arvo/clay.hoon | 345 +++++++++++++++++++-------------------- main/app/merge/core.hook | 8 +- 2 files changed, 176 insertions(+), 177 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 9f8051506..76ea2c67b 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -19,7 +19,8 @@ ++ gift :: out result <-$ $% [%ergo p=@p q=@tas r=@ud s=(list ,[path (unit mime)])] :: version update - [%mere p=ares] :: merge result + [%mere p=(each (set path) (pair term (list tank)))] + :: merge result [%note p=@tD q=tank] :: debug message [%writ p=riot] :: response == :: @@ -48,6 +49,7 @@ new=yaki :: merge(dal,dob) ank=ankh :: new state erg=(map path ,?) :: ergoable changes + gon=(each (set path) (pair term (list tank))) :: return value == :: ++ moot ,[p=case q=case r=path s=(map path lobe)] :: stored change range ++ move ,[p=duct q=(mold note gift)] :: local move @@ -1128,13 +1130,13 @@ |= ali=(pair ship desk) :: from =+ bob=`(pair ship desk)`[who syd] :: to =+ dat=(fall (~(get by mer) ali) *mery) :: merge data - =| gon=(unit ares) :: keep going + =| don=? :: keep going |% ++ abet ^+ ..me - ?~ gon + ?~ don ..me(mer (~(put by mer) ali dat)) - ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere u.gon])) + ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat])) :: ++ route |= [sat=term res=(each riot (each bead (list tank)))] @@ -1152,19 +1154,19 @@ |= gem=germ ^+ +> ?: (~(has by mer) ali) - +>.$(gon ``[%already-merging >ali< >bob< ~]) + (error:he %already-merging ~) ?: &(=(0 let.dom) !?=(%init gem)) - +>.$(gon ``[%no-bob-desk >ali< >bob< ~]) + (error:he %no-bob-desk ~) =. gem.dat gem =. cas.dat [%da now] ?: ?=(%init gem.dat) fetch-ali =+ (~(get by hit.dom) let.dom) ?~ - - +>.$(gon ``[%no-bob--version >ali< >bob< ~]) + (error:he %no-bob--version ~) =+ (~(get by hut.ran) u.-) ?~ - - +>.$(gon ``[%no-bob-commit >ali< >bob< ~]) + (error:he %no-bob-commit ~) fetch-ali(bob.dat u.-) :: ++ fetch-ali @@ -1179,24 +1181,24 @@ |= rot=riot ^+ +> ?~ rot - +>.$(gon ``[%bad-fetch-ali >ali< >bob< ~]) + (error:he %bad-fetch-ali ~) =+ ^= dum %- (hard ,[ank=* let=@ud hit=(map ,@ud tako) lab=(map ,@tas ,@ud)]) q.q.r.u.rot ?: =(0 let.dum) - +>.$(gon ``[%no-ali-desk >ali< >bob< ~]) + (error:he %no-ali-desk ~) =+ (~(get by hit.dum) let.dum) ?~ - - +>.$(gon ``[%no-ali-version >ali< >bob< ~]) + (error:he %no-ali-version ~) =+ (~(get by hut.ran) u.-) ?~ - - +>.$(gon ``[%no-ali-commit >ali< >bob< ~]) + (error:he %no-ali-commit ~) =. ali.dat u.- |- ?- gem.dat %init ?. =(let.dom 0) - +>.^$(gon ``[%bad-init-merge >ali< >bob< ~]) + (error:he %bad-init-merge ~) =. new.dat ali.dat =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat (~(run by q.ali.dat) |=(lobe %&)) @@ -1204,11 +1206,11 @@ :: %fine ?: =(r.ali.dat r.bob.dat) - +>.^$(gon `~) + (done:he ~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon `~) + (done:he ~) ?. (~(has in (reachable-takos r.ali.dat)) r.bob.dat) - +>.^$(gon ``[%bad-fine-merge >ali< >bob< ~]) + (error:he %bad-fine-merge ~) =. new.dat ali.dat =. erg.dat %- ~(uni by `(map path ,?)`(~(run by q.bob.dat) |=(lobe %|))) @@ -1217,9 +1219,9 @@ :: %this ?: =(r.ali.dat r.bob.dat) - +>.^$(gon `~) + (done:he ~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon `~) + (done:he ~) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.bob.dat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat ~ @@ -1227,9 +1229,9 @@ :: %that ?: =(r.ali.dat r.bob.dat) - +>.^$(gon `~) + (done:he ~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon `~) + (done:he ~) =. new.dat (make-yaki [r.ali.dat r.bob.dat ~] q.ali.dat now) =. hut.ran (~(put by hut.ran) r.new.dat new.dat) =. erg.dat @@ -1239,17 +1241,17 @@ :: ?(%meet %mate %meld) ?: =(r.ali.dat r.bob.dat) - +>.^$(gon `~) + (done:he ~) ?: (~(has in (reachable-takos r.bob.dat)) r.ali.dat) - +>.^$(gon `~) + (done:he ~) ?: (~(has in (reachable-takos r.ali.dat)) r.bob.dat) $(gem.dat %fine) =+ r=(find-merge-points:he ali.dat bob.dat) ?~ r - +>.^$(gon ``[%merge-no-merge-base >ali< >bob< ~]) + (error:he %merge-no-merge-base ~) ?. ?=([* ~ ~] r) - =- +>.^$(gon ``[%merge-criss-cross >ali< >bob< >[-]< ~]) - (lent (~(tap in `(set yaki)`r))) + =+ (lent (~(tap in `(set yaki)`r))) + (error:he %merge-criss-cross >[-]< ~) =. bas.dat n.r diff-ali == @@ -1269,20 +1271,11 @@ =+ (~(get by q.yak) pax) ?~ - ~ - :: :- ~ - :: :- [%done ~ %path !>(pax)] - :: [%done ~ %null !>(~)] ?: =(lob u.-) ~ :- ~ :- [%done ~ %path !>(pax)] [%diff (lobe-to-silk lob) (lobe-to-silk u.-)] - ::%+ turn - :: %+ skip (~(tap by q.yak)) - :: |=([path lobe] (~(has by q.bas.dat) +<-)) - ::|= [pax=path lob=lobe] - ::^- (pair silk silk) - ::[[%done ~ %path !>(pax)] (lobe-to-silk lob)] == :: ++ diff-ali @@ -1293,32 +1286,32 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - +>.$(gon ``[%diff-ali-bad-made leaf/"merge diff ali failed" p.res]) + (error:he %diff-ali-bad-made leaf/"merge diff ali failed" p.res) =+ cay=q.p.res ?@ p.cay - +>.$(gon ``[%diff-ali-bad-marc >ali< >bob< >p.cay< ~]) + (error:he %diff-ali-bad-marc >p.cay< ~) =| can=(map path cage) => |- ^+ + ?~ p.p.cay +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?^ gon.tal + ?: ?=(%| -.gon.dat.tal) tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%diff-ali-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + +.$(+>.$ (error:he %diff-ali-strange-marc-a >p.i.p.p.cay< ~)) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%diff-ali-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + +.$(+>.$ (error:he %diff-ali-strange-marc-b >q.i.p.p.cay< ~)) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%diff-ali-strange-coy >ali< >bob< ~]) + +.$(+>.$ (error:he %diff-ali-strange-coy ~)) %_ +.$ can %+ ~(put by can:tal) ((hard path) -.q.coy) [q.i.p.p.cay (slot 3 coy)] == - ?^ gon + ?: ?=(%| -.gon.dat) +>.$ =. new.dal.dat %- mo @@ -1343,32 +1336,32 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - +>.$(gon ``[%diff-bob-bad-made leaf/"merge diff bob failed" p.res]) + (error:he %diff-bob-bad-made leaf/"merge diff bob failed" p.res) =+ cay=q.p.res ?@ p.cay - +>.$(gon ``[%diff-bob-bad-marc >ali< >bob< >p.cay< ~]) + (error:he %diff-bob-bad-marc >p.cay< ~) =| can=(map path cage) => |- ^+ + ?~ p.p.cay +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?^ gon.tal + ?: ?=(%| -.gon.dat.tal) tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%diff-bob-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + +.$(+>.$ (error:he %diff-bob-strange-marc-a >p.i.p.p.cay< ~)) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%diff-bob-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + +.$(+>.$ (error:he %diff-bob-strange-marc-b >q.i.p.p.cay< ~)) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%diff-bob-strange-coy >ali< >bob< ~]) + +.$(+>.$ (error:he %diff-bob-strange-coy ~)) %_ +.$ can %+ ~(put by can:tal) ((hard path) -.q.coy) [q.i.p.p.cay (slot 3 coy)] == - ?^ gon + ?: ?=(%| -.gon.dat) +>.$ =. new.dob.dat %- mo @@ -1399,8 +1392,7 @@ %- ~(uni by `(map path ,*)`can.dob.dat) `(map path ,*)`old.dob.dat ?^ bof - =- +.$(gon ``[%meet-conflict >ali< >bob< >[-]< ~]) - (~(run by `(map path ,*)`bof) ,_~) + (error:he %meet-conflict >(~(run by `(map path ,*)`bof) ,_~)< ~) =+ ^- old=(map path lobe) %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) =< .(old q.bas.dat) @@ -1432,7 +1424,7 @@ `(map path ,?)`(~(run by hat) |=(lobe %&)) checkout :: - %mate + ?(%mate %meld) =+ ^= bof %- %~ int by %- ~(uni by `(map path ,*)`new.dal.dat) @@ -1459,116 +1451,114 @@ :- [%done ~ %path !>(pax)] [%join for [%done ~ cal] [%done ~ cob]] == - :: - %meld +.$(gon ``[%meld-not-implemented ~]) == :: ++ merged |= res=(each bead (list tank)) ^+ +> - ?+ gem.dat ~| %merge-weird-gem !! - %mate - ?: ?=(%| -.res) - +>.$(gon ``[%merge-bad-made leaf/"merging failed" p.res]) - =+ cay=q.p.res - ?@ p.cay - +>.$(gon ``[%merge-bad-marc >ali< >bob< >p.cay< ~]) - =| bof=(map path (unit cage)) - => - |- ^+ + - ?~ p.p.cay - +.$(bof ~) - =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?^ gon.tal - tal - ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%merge-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) - ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%merge-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) - =+ coy=(slot 2 q.cay) - ?@ q.coy - +.$(gon ``[%merge-strange-coy >ali< >bob< ~]) - %_ +.$ - bof - %+ ~(put by bof:tal) - ((hard path) -.q.coy) - ?: ?=(%null q.i.p.p.cay) - ~ - `[q.i.p.p.cay (slot 3 coy)] - == - ?^ gon - +>.$ - =+ ^- con=(map path ,*) - %- mo - %+ skim (~(tap by bof)) - |=([pax=path cay=(unit cage)] ?=(~ cay)) - =. con - %- ~(uni by con) - %- mo ^- (list ,[path *]) - %+ skim (~(tap by old.dal.dat)) - |= [pax=path ~] - ?: (~(has by new.dob.dat) pax) - ~| %strange-add-and-del - !! - (~(has by can.dob.dat) pax) - =. con - %- ~(uni by con) - %- mo ^- (list ,[path *]) - %+ skim (~(tap by old.dob.dat)) - |= [pax=path ~] - ?: (~(has by new.dal.dat) pax) - ~| %strange-del-and-add - !! - (~(has by can.dal.dat) pax) - =. con - %- ~(uni by con) - %- mo ^- (list ,[path *]) - %+ skip (~(tap by (~(int by new.dal.dat) new.dob.dat))) - |= [pax=path *] - =((~(got by new.dal.dat) pax) (~(got by new.dob.dat) pax)) - ?^ con - =+ (turn (~(tap by `(map path ,*)`con)) |=([path *] >[+<-]<)) - +>.$(gon ``[%mate-conflict >ali< >bob< -]) - =+ ^- old=(map path lobe) - %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) - =< .(old q.bas.dat) - |= [[pax=path ~] old=(map path lobe)] - (~(del by old) pax) - =+ ^- can=(map path cage) - %- ~(uni by can.dal.dat) - %- ~(uni by can.dob.dat) - %- ~(run by bof) - |= cay=(unit cage) - (need cay) - =^ hat lat.ran - ^- [(map path lobe) (map lobe blob)] - %+ roll (~(tap by can)) - =< .(lat lat.ran) - |= [[pax=path cay=cage] hat=(map path lobe) lat=(map lobe blob)] - =+ ^= bol - =+ (~(get by q.bas.dat) pax) - ?~ - - ~| %mate-strange-diff-no-base - !! - (make-delta u.- cay) - [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] - =. hat - %- ~(uni by old) - %- ~(uni by new.dal.dat) - %- ~(uni by new.dob.dat) - hat - =+ ^- del=(map path ,?) - (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) - =. new.dat - (make-yaki [r.ali.dat r.bob.dat ~] hat now) - =. hut.ran (~(put by hut.ran) r.new.dat new.dat) - =. erg.dat %- ~(uni by del) - `(map path ,?)`(~(run by hat) |=(lobe %&)) - checkout - :: - %meld - +>.$(gon ``[%meld-not-implemented ~]) - == + ?: ?=(%| -.res) + (error:he %merge-bad-made leaf/"merging failed" p.res) + =+ cay=q.p.res + ?@ p.cay + (error:he %merge-bad-marc >p.cay< ~) + =| bof=(map path (unit cage)) + => + |- ^+ + + ?~ p.p.cay + +.$(bof ~) + =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) + ?: ?=(%| -.gon.dat.tal) + tal + ?. ?=(%path p.i.p.p.cay) + +.$(+>.$ (error:he %merge-strange-marc-a >p.i.p.p.cay< ~)) + ?. ?=(@ q.i.p.p.cay) + +.$(+>.$ (error:he %merge-strange-marc-b >q.i.p.p.cay< ~)) + =+ coy=(slot 2 q.cay) + ?@ q.coy + +.$(+>.$ (error:he %merge-strange-coy ~)) + %_ +.$ + bof + %+ ~(put by bof:tal) + ((hard path) -.q.coy) + ?: ?=(%null q.i.p.p.cay) + ~ + `[q.i.p.p.cay (slot 3 coy)] + == + ?: ?=(%| -.gon.dat) + +>.$ + =+ ^- con=(map path ,*) + %- mo + %+ skim (~(tap by bof)) + |=([pax=path cay=(unit cage)] ?=(~ cay)) + =+ ^- cas=(map path lobe) + %- ~(urn by con) + |= [pax=path *] + (~(got by q.bas.dat) pax) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skim (~(tap by old.dal.dat)) + |= [pax=path ~] + ?: (~(has by new.dob.dat) pax) + ~| %strange-add-and-del + !! + (~(has by can.dob.dat) pax) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skim (~(tap by old.dob.dat)) + |= [pax=path ~] + ?: (~(has by new.dal.dat) pax) + ~| %strange-del-and-add + !! + (~(has by can.dal.dat) pax) + =. con + %- ~(uni by con) + %- mo ^- (list ,[path *]) + %+ skip (~(tap by (~(int by new.dal.dat) new.dob.dat))) + |= [pax=path *] + =((~(got by new.dal.dat) pax) (~(got by new.dob.dat) pax)) + ?: &(?=(%mate gem.dat) ?=(^ con)) + =+ (turn (~(tap by `(map path ,*)`con)) |=([path *] >[+<-]<)) + (error:he %mate-conflict -) + =+ ^- old=(map path lobe) + %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) + =< .(old q.bas.dat) + |= [[pax=path ~] old=(map path lobe)] + (~(del by old) pax) + =+ ^- can=(map path cage) + %- ~(uni by can.dal.dat) + %- ~(uni by can.dob.dat) + %- ~(run by bof) + |= cay=(unit cage) + (need cay) + =^ hat lat.ran + ^- [(map path lobe) (map lobe blob)] + %+ roll (~(tap by can)) + =< .(lat lat.ran) + |= [[pax=path cay=cage] hat=(map path lobe) lat=(map lobe blob)] + =+ ^= bol + =+ (~(get by q.bas.dat) pax) + ?~ - + ~| %mate-strange-diff-no-base + !! + (make-delta u.- cay) + [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] + =. hat + %- ~(uni by old) + %- ~(uni by new.dal.dat) + %- ~(uni by new.dob.dat) + %- ~(uni by cas) + hat + =+ ^- del=(map path ,?) + (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) + =. gon.dat [%& (sa (turn (~(tap by con)) |=([path *] +<-)))] + =. new.dat + (make-yaki [r.ali.dat r.bob.dat ~] hat now) + =. hut.ran (~(put by hut.ran) r.new.dat new.dat) + =. erg.dat %- ~(uni by del) + `(map path ,?)`(~(run by hat) |=(lobe %&)) + checkout :: ++ checkout ^+ . @@ -1587,39 +1577,39 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - +>.$(gon ``[%checkout-bad-made leaf/"merge checkout failed" p.res]) + (error:he %checkout-bad-made leaf/"merge checkout failed" p.res) =+ cay=q.p.res ?@ p.cay - +>.$(gon ``[%patch-bad-marc >ali< >bob< >p.cay< ~]) + (error:he %patch-bad-marc >p.cay< ~) =| can=(list ,[path cage]) => |- ^+ + ?~ p.p.cay +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?^ gon.tal + ?: ?=(%| -.gon.dat.tal) tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + +.$(+>.$ (error:he %patch-strange-marc-a >p.i.p.p.cay< ~)) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-b >ali< >bob< >q.i.p.p.cay< ~]) + +.$(+>.$ (error:he %patch-strange-marc-b >q.i.p.p.cay< ~)) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%patch-strange-coy >ali< >bob< ~]) + +.$(+>.$ (error:he %patch-strange-coy ~)) %_ +.$ can :_ can:tal :- ((hard path) -.q.coy) [q.i.p.p.cay (slot 3 coy)] == - ?^ gon + ?: ?=(%| -.gon.dat) +>.$ =. let.dom +(let.dom) =. hit.dom (~(put by hit.dom) let.dom r.new.dat) =. ank.dat (checkout-ankh:ze (mo can)) =. ank.dom ank.dat ?~ hez - +>.$(gon `~) :: XX resolve + (done:he ~) ergo :: ++ ergo @@ -1644,9 +1634,7 @@ |= res=(each bead (list tank)) ^+ +> ?: ?=(%| -.res) - +>.$(gon ``[%ergo-bad-made leaf/"merge ergo failed" p.res]) - ?~ hez - +>.$(gon ``[%ergo-no-hez >ali< >bob< ~]) + (error:he %ergo-bad-made leaf/"merge ergo failed" p.res) =+ cay=q.p.res ?@ p.cay ~| %patch-bad-marc !! =| can=(list ,[path (unit mime)]) @@ -1655,15 +1643,15 @@ ?~ p.p.cay +.$(can ~) =+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) - ?^ gon.tal + ?: ?=(%| -.gon.dat.tal) tal ?. ?=(%path p.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-a >ali< >bob< >p.i.p.p.cay< ~]) + +.$(+>.$ (error:he %patch-strange-marc-a >p.i.p.p.cay< ~)) ?. ?=(@ q.i.p.p.cay) - +.$(gon ``[%patch-strange-marc-b >ali< >bob< >p.i.p.p.cay< ~]) + +.$(+>.$ (error:he %patch-strange-marc-b >p.i.p.p.cay< ~)) =+ coy=(slot 2 q.cay) ?@ q.coy - +.$(gon ``[%patch-strange-coy >ali< >bob< ~]) + +.$(+>.$ (error:he %patch-strange-coy ~)) %_ +.$ can :_ can:tal @@ -1672,15 +1660,26 @@ ~ `((hard mime) q:(slot 3 coy)) == - ?^ gon + ?~ hez + (error:he %ergo-no-hez ~) + ?: ?=(%| -.gon.dat) +>.$ %= +>.$ - gon `~ + don %| reg [[u.hez %ergo who syd let.dom can] reg] == :: ++ he |% + ++ done + |= con=(set path) + ^+ ..he + ..he(don |, gon.dat [%& con]) + ++ error + |= [err=term tan=(list tank)] + ^+ ..he + ..he(don |, gon.dat [%| err >ali< >bob< tan]) + :: ++ find-merge-points |= [p=yaki q=yaki] :: maybe need jet ^- (set yaki) diff --git a/main/app/merge/core.hook b/main/app/merge/core.hook index 87fea2f02..1fb27b80c 100644 --- a/main/app/merge/core.hook +++ b/main/app/merge/core.hook @@ -16,12 +16,12 @@ |= [ost=bone pax=path sih=*] :_ +>.$ =+ ^- tan=(list tank) - =+ ((soft ,[%c %mere are=ares]) sih) + =+ ((soft ,[%c %mere are=(each (set path) (pair term (list tank)))]) sih) ?~ - [leaf/"not working so well" >sih< ~] - ?~ are.u - [leaf/"merged" ~] - [leaf/"failed to merge" >p.u.are.u< q.u.are.u] + ?: ?=(%& -.are.u) + [leaf/"merged" ?~(p.are.u ~ [>`(set path)`p.are.u< ~])] + [leaf/"failed to merge" >p.p.are.u< q.p.are.u] %- flop :- i=[ost %pass / %g %cide %$] ^= t From fe5821eb734fa285701bde9f6afb12881a4f9003 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Wed, 25 Feb 2015 20:16:24 -0500 Subject: [PATCH 53/73] real text merge --- arvo/clay.hoon | 33 +++++++++++++++----------- main/mar/md/door.hook | 8 ++++++- main/mar/txt/door.hook | 54 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 16 deletions(-) diff --git a/arvo/clay.hoon b/arvo/clay.hoon index 76ea2c67b..1e26c3c6a 100644 --- a/arvo/clay.hoon +++ b/arvo/clay.hoon @@ -1486,15 +1486,15 @@ == ?: ?=(%| -.gon.dat) +>.$ - =+ ^- con=(map path ,*) + =+ ^- con=(map path ,*) :: 2-change conflict %- mo %+ skim (~(tap by bof)) |=([pax=path cay=(unit cage)] ?=(~ cay)) - =+ ^- cas=(map path lobe) + =+ ^- cas=(map path lobe) :: conflict base %- ~(urn by con) |= [pax=path *] (~(got by q.bas.dat) pax) - =. con + =. con :: add/del conflict %- ~(uni by con) %- mo ^- (list ,[path *]) %+ skim (~(tap by old.dal.dat)) @@ -1503,7 +1503,7 @@ ~| %strange-add-and-del !! (~(has by can.dob.dat) pax) - =. con + =. con :: add/del conflict %- ~(uni by con) %- mo ^- (list ,[path *]) %+ skim (~(tap by old.dob.dat)) @@ -1512,7 +1512,7 @@ ~| %strange-del-and-add !! (~(has by can.dal.dat) pax) - =. con + =. con :: add/add conflict %- ~(uni by con) %- mo ^- (list ,[path *]) %+ skip (~(tap by (~(int by new.dal.dat) new.dob.dat))) @@ -1521,18 +1521,23 @@ ?: &(?=(%mate gem.dat) ?=(^ con)) =+ (turn (~(tap by `(map path ,*)`con)) |=([path *] >[+<-]<)) (error:he %mate-conflict -) - =+ ^- old=(map path lobe) + =+ ^- old=(map path lobe) :: oldies but goodies %+ roll (~(tap by (~(uni by old.dal.dat) old.dob.dat))) =< .(old q.bas.dat) |= [[pax=path ~] old=(map path lobe)] (~(del by old) pax) - =+ ^- can=(map path cage) + =+ ^- can=(map path cage) :: content changes %- ~(uni by can.dal.dat) %- ~(uni by can.dob.dat) - %- ~(run by bof) - |= cay=(unit cage) - (need cay) - =^ hat lat.ran + %- mo + ^- (list (pair path cage)) + %+ murn (~(tap by bof)) + |= [pax=path cay=(unit cage)] + ^- (unit (pair path cage)) + ?~ cay + ~ + `[pax u.cay] + =^ hat lat.ran :: new content ^- [(map path lobe) (map lobe blob)] %+ roll (~(tap by can)) =< .(lat lat.ran) @@ -1544,12 +1549,12 @@ !! (make-delta u.- cay) [(~(put by hat) pax p.bol) (~(put by lat) p.bol bol)] - =. hat + =. hat :: all the content %- ~(uni by old) %- ~(uni by new.dal.dat) %- ~(uni by new.dob.dat) - %- ~(uni by cas) - hat + %- ~(uni by hat) + cas =+ ^- del=(map path ,?) (~(run by (~(uni by old.dal.dat) old.dob.dat)) |=(~ %|)) =. gon.dat [%& (sa (turn (~(tap by con)) |=([path *] +<-)))] diff --git a/main/mar/md/door.hook b/main/mar/md/door.hook index 50516fdc1..1e7c8dd88 100644 --- a/main/mar/md/door.hook +++ b/main/mar/md/door.hook @@ -7,13 +7,19 @@ ++ grow |% ++ mime [/text/x-markdown (taco mud)] + ++ txt + (lore (cat 3 mud '\0a')) -- ++ grab |% ++ mime |=([p=mite q=octs] q.q) + ++ txt + |= wan=wain + =+ (role wan) + (end 3 (dec (met 3 -)) -) -- ++ grad |% - ++ sted %mime + ++ sted %txt -- -- diff --git a/main/mar/txt/door.hook b/main/mar/txt/door.hook index c5c64ccef..06e4884cf 100644 --- a/main/mar/txt/door.hook +++ b/main/mar/txt/door.hook @@ -31,6 +31,58 @@ ++ join |= [ali=(urge cord) bob=(urge cord)] ^- (unit (urge cord)) - `ali + |^ + =. ali (clean ali) + =. bob (clean bob) + |- ^- (unit (urge cord)) + ?~ ali `bob + ?~ bob `ali + ?- -.i.ali + %& + ?- -.i.bob + %& + ?: =(p.i.ali p.i.bob) + %+ bind $(ali t.ali, bob t.bob) + |=(cud=(urge cord) [i.ali cud]) + ?: (gth p.i.ali p.i.bob) + %+ bind $(p.i.ali (sub p.i.ali p.i.bob), bob t.bob) + |=(cud=(urge cord) [i.bob cud]) + %+ bind $(ali t.ali, p.i.bob (sub p.i.bob p.i.ali)) + |=(cud=(urge cord) [i.ali cud]) + %| + ?: =(p.i.ali (lent p.i.bob)) + %+ bind $(ali t.ali, bob t.bob) + |=(cud=(urge cord) [i.bob cud]) + ?: (gth p.i.ali (lent p.i.bob)) + %+ bind $(p.i.ali (sub p.i.ali (lent p.i.bob)), bob t.bob) + |=(cud=(urge cord) [i.bob cud]) + ~ + == + %| + ?- -.i.bob + %| ~ + %& + ?: =(p.i.bob (lent p.i.ali)) + %+ bind $(ali t.ali, bob t.bob) + |=(cud=(urge cord) [i.ali cud]) + ?: (gth p.i.bob (lent p.i.ali)) + %+ bind $(ali t.ali, p.i.bob (sub p.i.bob (lent p.i.ali))) + |=(cud=(urge cord) [i.ali cud]) + ~ + == + == + ++ clean :: clean + |= wig=(urge cord) + ^- (urge cord) + ?~ wig ~ + ?~ t.wig wig + ?: ?=(%& -.i.wig) + ?: ?=(%& -.i.t.wig) + $(wig [[%& (add p.i.wig p.i.t.wig)] t.t.wig]) + [i.wig $(wig t.wig)] + ?: ?=(%| -.i.t.wig) + $(wig [[%| (welp p.i.wig p.i.t.wig) (welp q.i.wig q.i.t.wig)] t.t.wig]) + [i.wig $(wig t.wig)] + -- -- -- From c9b832d811c3b7778de1daa7829cbfb08e6adcfc Mon Sep 17 00:00:00 2001 From: Florian Steinel Date: Fri, 1 May 2015 15:18:01 +0200 Subject: [PATCH 54/73] fix link to the guides --- base/pub/doc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/pub/doc.md b/base/pub/doc.md index 55c6d4fae..1c19051eb 100644 --- a/base/pub/doc.md +++ b/base/pub/doc.md @@ -12,5 +12,5 @@ is a general-purpose computing stack designed to live in the cloud. ------------------------------------------------------------------------ If you're new to the system, take a look at some of the -[guides](doc/guides) to get oriented. Come join us on `:chat` to ask +[guides](doc/guide) to get oriented. Come join us on `:chat` to ask questions and get help. From 46264b255d5f751e4bbe031fe904d42588894978 Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Fri, 1 May 2015 18:06:28 -0700 Subject: [PATCH 55/73] minor talk fixes --- base/pub/talk/src/css/main.css | 3 +++ base/pub/talk/src/css/main.styl | 3 +++ base/pub/talk/src/js/main.js | 46 ++++++++++++++++---------------- base/pub/talk/src/js/util.coffee | 2 +- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/base/pub/talk/src/css/main.css b/base/pub/talk/src/css/main.css index 61b020ada..0919771ee 100644 --- a/base/pub/talk/src/css/main.css +++ b/base/pub/talk/src/css/main.css @@ -341,6 +341,8 @@ a { } .audi { white-space: nowrap; + overflow: hidden; + background-color: #fff; } .audi > div { margin-right: 0.3rem; @@ -415,6 +417,7 @@ a { margin-right: -0.2rem; outline: none; overflow: hidden; + max-width: 9rem; } .valid-false { color: #ff2f2f; diff --git a/base/pub/talk/src/css/main.styl b/base/pub/talk/src/css/main.styl index 658e0de36..3bb5b79ed 100644 --- a/base/pub/talk/src/css/main.styl +++ b/base/pub/talk/src/css/main.styl @@ -280,6 +280,8 @@ a .audi white-space nowrap + overflow hidden + background-color #fff .audi > div margin-right .3rem @@ -359,6 +361,7 @@ a margin-right -.2rem outline none overflow hidden + max-width 9rem .valid-false color #ff2f2f diff --git a/base/pub/talk/src/js/main.js b/base/pub/talk/src/js/main.js index 5c617d886..9b0ee3ce0 100644 --- a/base/pub/talk/src/js/main.js +++ b/base/pub/talk/src/js/main.js @@ -1,4 +1,4 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o - if @isScrolling() + if window.util.isScrolling() $('body').addClass 'scrolling' else $('body').removeClass 'scrolling' \ No newline at end of file From 3ef2611ff93722623507a955e104ee78576a20ec Mon Sep 17 00:00:00 2001 From: Max G Date: Sun, 3 May 2015 15:26:42 +0300 Subject: [PATCH 56/73] Jetted scrypt --- base/arvo/hoon.hoon | 178 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) diff --git a/base/arvo/hoon.hoon b/base/arvo/hoon.hoon index 2d38911a6..4f8e2b413 100644 --- a/base/arvo/hoon.hoon +++ b/base/arvo/hoon.hoon @@ -4930,6 +4930,184 @@ =((scam bb ss) (ward u.rr (scam u.aa h))) :: -- +:: +++ scr :: scrypt + ~% %scr + ~ + |% + ++ sal |= [x=@ r=@] :: salsa20 hash + ?> =((mod r 2) 0) :: with r rounds + =+ few==>(fe .(a 5)) + =+ ^= rot + |= [a=@ b=@] + (mix (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b)) + =+ ^= lea + |= [a=@ b=@] + (net:few (sum:few (net:few a) (net:few b))) + => |% ++ qr :: quarterround + |= y=[@ @ @ @ ~] + =+ zb=(mix &2.y (rot 7 (sum:few &1.y &4.y))) + =+ zc=(mix &3.y (rot 9 (sum:few zb &1.y))) + =+ zd=(mix &4.y (rot 13 (sum:few zc zb))) + =+ za=(mix &1.y (rot 18 (sum:few zd zc))) + ~[za zb zc zd] + ++ rr :: rowround + |= [y=(list ,@)] + =+ za=(qr ~[&1.y &2.y &3.y &4.y]) + =+ zb=(qr ~[&6.y &7.y &8.y &5.y]) + =+ zc=(qr ~[&11.y &12.y &9.y &10.y]) + =+ zd=(qr ~[&16.y &13.y &14.y &15.y]) + ^- (list ,@) :~ + &1.za &2.za &3.za &4.za + &4.zb &1.zb &2.zb &3.zb + &3.zc &4.zc &1.zc &2.zc + &2.zd &3.zd &4.zd &1.zd + == + ++ cr :: columnround + |= [x=(list ,@)] + =+ ^= y %- rr ^- (list ,@) :~ + &1.x &5.x &9.x &13.x + &2.x &6.x &10.x &14.x + &3.x &7.x &11.x &15.x + &4.x &8.x &12.x &16.x + == + ^- (list ,@) :~ + &1.y &5.y &9.y &13.y + &2.y &6.y &10.y &14.y + &3.y &7.y &11.y &15.y + &4.y &8.y &12.y &16.y + == + ++ dr :: doubleround + |= [x=(list ,@)] + (rr (cr x)) + ++ al :: add two lists + |= [a=(list ,@) b=(list ,@)] + |- ^- (list ,@) + ?~ a ~ ?~ b ~ + [i=(sum:few -.a -.b) t=$(a +.a, b +.b)] + -- + =+ xw=(rpp 5 16 x) + =+ ^= ow |- ^- (list ,@) + ?~ r xw + $(xw (dr xw), r (sub r 2)) + (rep 5 (al xw ow)) + :: + ++ rpp |= [a=bloq b=@ c=@] :: rip w/filler blocks + =+ q=(rip a c) + =+ w=(lent q) + ?. =(w b) + ?. (lth w b) (slag (sub w b) q) + ^+ q (weld q (reap (sub b (lent q)) 0)) + q + :: + ++ xrl |= [a=(list ,@) b=(list ,@)] :: xor lists + |- ^- (list ,@) + ?~ a b ?~ b a + [i=(mix -.a -.b) t=$(a +.a, b +.b)] + :: + ++ xrm |= [a=(list (list ,@)) b=(list (list ,@))] + |- ^- (list (list ,@)) + ?~ a b ?~ b a + [i=(xrl -.a -.b) t=$(a +.a, b +.b)] + :: + ++ bls |= [a=@ b=(list ,@)] :: split to sublists + ?> =((mod (lent b) a) 0) + |- ^- (list (list ,@)) + ?~ b ~ + [i=(scag a `(list ,@)`b) t=$(b (slag a `(list ,@)`b))] + :: + ++ slb |= [a=(list (list ,@))] + |- ^- (list ,@) + ?~ a ~ + (weld `(list ,@)`-.a $(a +.a)) + :: + ++ sbm |= [r=@ b=(list ,@)] :: scryptBlockMix + ?> =((lent b) (mul 2 r)) + =+ [x=(snag (dec (mul 2 r)) b) c=0] + =| [ya=(list ,@) yb=(list ,@)] + |- ^- (list ,@) + ?~ b (flop (weld yb ya)) + =. x (sal (mix x -.b) 8) + ?~ (mod c 2) + $(c +(c), b +.b, ya [i=x t=ya]) + $(c +(c), b +.b, yb [i=x t=yb]) + :: + ++ srm |= [r=@ b=(list ,@) n=@] :: scryptROMix + ?> ?& + =((lent b) (mul 2 r)) + =(n (bex (dec (xeb n)))) + (lth n (bex (mul r 16))) + == + =| v=(list (list ,@)) + =+ c=0 + =. v + |- ^- (list (list ,@)) + =+ w=(sbm r b) + ?: =(c n) (flop v) + $(c +(c), v [i=[b] t=v], b w) + =+ x=(sbm r (snag (dec n) v)) + |- ^- (list ,@) + ?: =(c n) x + =+ q=(snag (dec (mul r 2)) x) + $(x (sbm r (xrl x (snag (mod q n) v))), c +(c)) + :: + ++ hmc |= [k=@ t=@] :: HMAC-SHA-256 + (hml k (met 3 k) t (met 3 t)) + :: + ++ hml |= [k=@ kl=@ t=@ tl=@] :: w/length + =. k (end 3 kl k) =. t (end 3 tl t) + =+ b=64 + =. k ?. (gth kl b) k (shay kl k) + =+ ^= q %+ shay (add b tl) + (add (lsh 3 b t) (mix k (fil 3 b 0x36))) + %+ shay (add b 32) + (add (lsh 3 b q) (mix k (fil 3 b 0x5c))) + :: + ++ pbk ~/ %pbk :: PBKDF2-HMAC-SHA256 + |= [p=@ s=@ c=@ d=@] + (pbl p (met 3 p) s (met 3 s) c d) + :: + ++ pbl ~/ %pbl :: w/length + |= [p=@ pl=@ s=@ sl=@ c=@ d=@] + =. p (end 3 pl p) =. s (end 3 sl s) + =+ h=32 + ?> (lte d (mul h (dec (bex 32)))) + =+ ^= l ?~ (mod d h) + (div d h) + +((div d h)) + =+ r=(sub d (mul h (dec l))) + =+ [t=0 j=1 k=1] + =. t |- ^- @ + ?: (gth j l) t + =+ u=(add s (lsh 3 sl (rep 3 (flop (rpp 3 4 j))))) + =+ f=0 =. f |- ^- @ + ?: (gth k c) f + =+ q=(hml p pl u ?:(=(k 1) (add sl 4) h)) + $(u q, f (mix f q), k +(k)) + $(t (add t (lsh 3 (mul (dec j) h) f)), j +(j)) + (end 3 d t) + :: + ++ hsh ~/ %hsh :: scrypt + |= [p=@ s=@ n=@ r=@ z=@ d=@] + (hsl p (met 3 p) s (met 3 s) n r z d) + :: + ++ hsl ~/ %hsl :: w/length + |= [p=@ pl=@ s=@ sl=@ n=@ r=@ z=@ d=@] + =| v=(list (list ,@)) + =. p (end 3 pl p) =. s (end 3 sl s) + =+ u=(mul (mul 128 r) z) + ?> =(n (bex (dec (xeb n)))) :: n is power of 2 + =+ ^= b =+ %^ rpp 3 u + (pbl p pl s sl 1 u) + %+ turn (bls (mul 128 r) -) + |=(a=(list ,@) (rpp 9 (mul 2 r) (rep 3 a))) + ?> =((lent b) z) + =+ ^= q + =+ |- ?~ b (flop v) + $(b +.b, v [i=(srm r -.b n) t=v]) + %+ turn `(list (list ,@))`- + |=(a=(list ,@) (rpp 3 (mul 128 r) (rep 9 a))) + (pbl p pl (rep 3 (slb q)) u 1 d) + -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eY, SHA-256 (move me) :: :: From ffbc4366be128fe13e95f89fb1fb827e51c604bb Mon Sep 17 00:00:00 2001 From: Max G Date: Sun, 3 May 2015 23:45:41 +0300 Subject: [PATCH 57/73] new bounds --- base/arvo/hoon.hoon | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/base/arvo/hoon.hoon b/base/arvo/hoon.hoon index 4f8e2b413..763134027 100644 --- a/base/arvo/hoon.hoon +++ b/base/arvo/hoon.hoon @@ -5070,7 +5070,10 @@ |= [p=@ pl=@ s=@ sl=@ c=@ d=@] =. p (end 3 pl p) =. s (end 3 sl s) =+ h=32 - ?> (lte d (mul h (dec (bex 32)))) + ?> ?& (lte d (bex 30)) :: max key length 1GB + (lte c (bex 28)) :: max iterations 2^28 + !=(c 0) + == =+ ^= l ?~ (mod d h) (div d h) +((div d h)) @@ -5095,7 +5098,14 @@ =| v=(list (list ,@)) =. p (end 3 pl p) =. s (end 3 sl s) =+ u=(mul (mul 128 r) z) - ?> =(n (bex (dec (xeb n)))) :: n is power of 2 + ?> ?& =(n (bex (dec (xeb n)))) :: n is power of 2 + !=(r 0) !=(z 0) + %+ lte :: max 1GB memory + (mul (mul 128 r) (dec (add n z))) + (bex 30) + (lth pl (bex 31)) + (lth sl (bex 31)) + == =+ ^= b =+ %^ rpp 3 u (pbl p pl s sl 1 u) %+ turn (bls (mul 128 r) -) From 7d6815b0092bc7efefd3e63652bdc56cbecbcba1 Mon Sep 17 00:00:00 2001 From: cgyarvin Date: Sun, 3 May 2015 16:28:51 -0700 Subject: [PATCH 58/73] Revert "Jetted scrypt" --- base/arvo/hoon.hoon | 188 -------------------------------------------- 1 file changed, 188 deletions(-) diff --git a/base/arvo/hoon.hoon b/base/arvo/hoon.hoon index 763134027..2d38911a6 100644 --- a/base/arvo/hoon.hoon +++ b/base/arvo/hoon.hoon @@ -4930,194 +4930,6 @@ =((scam bb ss) (ward u.rr (scam u.aa h))) :: -- -:: -++ scr :: scrypt - ~% %scr + ~ - |% - ++ sal |= [x=@ r=@] :: salsa20 hash - ?> =((mod r 2) 0) :: with r rounds - =+ few==>(fe .(a 5)) - =+ ^= rot - |= [a=@ b=@] - (mix (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b)) - =+ ^= lea - |= [a=@ b=@] - (net:few (sum:few (net:few a) (net:few b))) - => |% ++ qr :: quarterround - |= y=[@ @ @ @ ~] - =+ zb=(mix &2.y (rot 7 (sum:few &1.y &4.y))) - =+ zc=(mix &3.y (rot 9 (sum:few zb &1.y))) - =+ zd=(mix &4.y (rot 13 (sum:few zc zb))) - =+ za=(mix &1.y (rot 18 (sum:few zd zc))) - ~[za zb zc zd] - ++ rr :: rowround - |= [y=(list ,@)] - =+ za=(qr ~[&1.y &2.y &3.y &4.y]) - =+ zb=(qr ~[&6.y &7.y &8.y &5.y]) - =+ zc=(qr ~[&11.y &12.y &9.y &10.y]) - =+ zd=(qr ~[&16.y &13.y &14.y &15.y]) - ^- (list ,@) :~ - &1.za &2.za &3.za &4.za - &4.zb &1.zb &2.zb &3.zb - &3.zc &4.zc &1.zc &2.zc - &2.zd &3.zd &4.zd &1.zd - == - ++ cr :: columnround - |= [x=(list ,@)] - =+ ^= y %- rr ^- (list ,@) :~ - &1.x &5.x &9.x &13.x - &2.x &6.x &10.x &14.x - &3.x &7.x &11.x &15.x - &4.x &8.x &12.x &16.x - == - ^- (list ,@) :~ - &1.y &5.y &9.y &13.y - &2.y &6.y &10.y &14.y - &3.y &7.y &11.y &15.y - &4.y &8.y &12.y &16.y - == - ++ dr :: doubleround - |= [x=(list ,@)] - (rr (cr x)) - ++ al :: add two lists - |= [a=(list ,@) b=(list ,@)] - |- ^- (list ,@) - ?~ a ~ ?~ b ~ - [i=(sum:few -.a -.b) t=$(a +.a, b +.b)] - -- - =+ xw=(rpp 5 16 x) - =+ ^= ow |- ^- (list ,@) - ?~ r xw - $(xw (dr xw), r (sub r 2)) - (rep 5 (al xw ow)) - :: - ++ rpp |= [a=bloq b=@ c=@] :: rip w/filler blocks - =+ q=(rip a c) - =+ w=(lent q) - ?. =(w b) - ?. (lth w b) (slag (sub w b) q) - ^+ q (weld q (reap (sub b (lent q)) 0)) - q - :: - ++ xrl |= [a=(list ,@) b=(list ,@)] :: xor lists - |- ^- (list ,@) - ?~ a b ?~ b a - [i=(mix -.a -.b) t=$(a +.a, b +.b)] - :: - ++ xrm |= [a=(list (list ,@)) b=(list (list ,@))] - |- ^- (list (list ,@)) - ?~ a b ?~ b a - [i=(xrl -.a -.b) t=$(a +.a, b +.b)] - :: - ++ bls |= [a=@ b=(list ,@)] :: split to sublists - ?> =((mod (lent b) a) 0) - |- ^- (list (list ,@)) - ?~ b ~ - [i=(scag a `(list ,@)`b) t=$(b (slag a `(list ,@)`b))] - :: - ++ slb |= [a=(list (list ,@))] - |- ^- (list ,@) - ?~ a ~ - (weld `(list ,@)`-.a $(a +.a)) - :: - ++ sbm |= [r=@ b=(list ,@)] :: scryptBlockMix - ?> =((lent b) (mul 2 r)) - =+ [x=(snag (dec (mul 2 r)) b) c=0] - =| [ya=(list ,@) yb=(list ,@)] - |- ^- (list ,@) - ?~ b (flop (weld yb ya)) - =. x (sal (mix x -.b) 8) - ?~ (mod c 2) - $(c +(c), b +.b, ya [i=x t=ya]) - $(c +(c), b +.b, yb [i=x t=yb]) - :: - ++ srm |= [r=@ b=(list ,@) n=@] :: scryptROMix - ?> ?& - =((lent b) (mul 2 r)) - =(n (bex (dec (xeb n)))) - (lth n (bex (mul r 16))) - == - =| v=(list (list ,@)) - =+ c=0 - =. v - |- ^- (list (list ,@)) - =+ w=(sbm r b) - ?: =(c n) (flop v) - $(c +(c), v [i=[b] t=v], b w) - =+ x=(sbm r (snag (dec n) v)) - |- ^- (list ,@) - ?: =(c n) x - =+ q=(snag (dec (mul r 2)) x) - $(x (sbm r (xrl x (snag (mod q n) v))), c +(c)) - :: - ++ hmc |= [k=@ t=@] :: HMAC-SHA-256 - (hml k (met 3 k) t (met 3 t)) - :: - ++ hml |= [k=@ kl=@ t=@ tl=@] :: w/length - =. k (end 3 kl k) =. t (end 3 tl t) - =+ b=64 - =. k ?. (gth kl b) k (shay kl k) - =+ ^= q %+ shay (add b tl) - (add (lsh 3 b t) (mix k (fil 3 b 0x36))) - %+ shay (add b 32) - (add (lsh 3 b q) (mix k (fil 3 b 0x5c))) - :: - ++ pbk ~/ %pbk :: PBKDF2-HMAC-SHA256 - |= [p=@ s=@ c=@ d=@] - (pbl p (met 3 p) s (met 3 s) c d) - :: - ++ pbl ~/ %pbl :: w/length - |= [p=@ pl=@ s=@ sl=@ c=@ d=@] - =. p (end 3 pl p) =. s (end 3 sl s) - =+ h=32 - ?> ?& (lte d (bex 30)) :: max key length 1GB - (lte c (bex 28)) :: max iterations 2^28 - !=(c 0) - == - =+ ^= l ?~ (mod d h) - (div d h) - +((div d h)) - =+ r=(sub d (mul h (dec l))) - =+ [t=0 j=1 k=1] - =. t |- ^- @ - ?: (gth j l) t - =+ u=(add s (lsh 3 sl (rep 3 (flop (rpp 3 4 j))))) - =+ f=0 =. f |- ^- @ - ?: (gth k c) f - =+ q=(hml p pl u ?:(=(k 1) (add sl 4) h)) - $(u q, f (mix f q), k +(k)) - $(t (add t (lsh 3 (mul (dec j) h) f)), j +(j)) - (end 3 d t) - :: - ++ hsh ~/ %hsh :: scrypt - |= [p=@ s=@ n=@ r=@ z=@ d=@] - (hsl p (met 3 p) s (met 3 s) n r z d) - :: - ++ hsl ~/ %hsl :: w/length - |= [p=@ pl=@ s=@ sl=@ n=@ r=@ z=@ d=@] - =| v=(list (list ,@)) - =. p (end 3 pl p) =. s (end 3 sl s) - =+ u=(mul (mul 128 r) z) - ?> ?& =(n (bex (dec (xeb n)))) :: n is power of 2 - !=(r 0) !=(z 0) - %+ lte :: max 1GB memory - (mul (mul 128 r) (dec (add n z))) - (bex 30) - (lth pl (bex 31)) - (lth sl (bex 31)) - == - =+ ^= b =+ %^ rpp 3 u - (pbl p pl s sl 1 u) - %+ turn (bls (mul 128 r) -) - |=(a=(list ,@) (rpp 9 (mul 2 r) (rep 3 a))) - ?> =((lent b) z) - =+ ^= q - =+ |- ?~ b (flop v) - $(b +.b, v [i=(srm r -.b n) t=v]) - %+ turn `(list (list ,@))`- - |=(a=(list ,@) (rpp 3 (mul 128 r) (rep 9 a))) - (pbl p pl (rep 3 (slb q)) u 1 d) - -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eY, SHA-256 (move me) :: :: From 62cb2f2812dd78146453ea8a642f211653546390 Mon Sep 17 00:00:00 2001 From: cgyarvin Date: Sun, 3 May 2015 16:31:45 -0700 Subject: [PATCH 59/73] Revert "Revert "Jetted scrypt"" --- base/arvo/hoon.hoon | 188 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/base/arvo/hoon.hoon b/base/arvo/hoon.hoon index 2d38911a6..763134027 100644 --- a/base/arvo/hoon.hoon +++ b/base/arvo/hoon.hoon @@ -4930,6 +4930,194 @@ =((scam bb ss) (ward u.rr (scam u.aa h))) :: -- +:: +++ scr :: scrypt + ~% %scr + ~ + |% + ++ sal |= [x=@ r=@] :: salsa20 hash + ?> =((mod r 2) 0) :: with r rounds + =+ few==>(fe .(a 5)) + =+ ^= rot + |= [a=@ b=@] + (mix (end 5 1 (lsh 0 a b)) (rsh 0 (sub 32 a) b)) + =+ ^= lea + |= [a=@ b=@] + (net:few (sum:few (net:few a) (net:few b))) + => |% ++ qr :: quarterround + |= y=[@ @ @ @ ~] + =+ zb=(mix &2.y (rot 7 (sum:few &1.y &4.y))) + =+ zc=(mix &3.y (rot 9 (sum:few zb &1.y))) + =+ zd=(mix &4.y (rot 13 (sum:few zc zb))) + =+ za=(mix &1.y (rot 18 (sum:few zd zc))) + ~[za zb zc zd] + ++ rr :: rowround + |= [y=(list ,@)] + =+ za=(qr ~[&1.y &2.y &3.y &4.y]) + =+ zb=(qr ~[&6.y &7.y &8.y &5.y]) + =+ zc=(qr ~[&11.y &12.y &9.y &10.y]) + =+ zd=(qr ~[&16.y &13.y &14.y &15.y]) + ^- (list ,@) :~ + &1.za &2.za &3.za &4.za + &4.zb &1.zb &2.zb &3.zb + &3.zc &4.zc &1.zc &2.zc + &2.zd &3.zd &4.zd &1.zd + == + ++ cr :: columnround + |= [x=(list ,@)] + =+ ^= y %- rr ^- (list ,@) :~ + &1.x &5.x &9.x &13.x + &2.x &6.x &10.x &14.x + &3.x &7.x &11.x &15.x + &4.x &8.x &12.x &16.x + == + ^- (list ,@) :~ + &1.y &5.y &9.y &13.y + &2.y &6.y &10.y &14.y + &3.y &7.y &11.y &15.y + &4.y &8.y &12.y &16.y + == + ++ dr :: doubleround + |= [x=(list ,@)] + (rr (cr x)) + ++ al :: add two lists + |= [a=(list ,@) b=(list ,@)] + |- ^- (list ,@) + ?~ a ~ ?~ b ~ + [i=(sum:few -.a -.b) t=$(a +.a, b +.b)] + -- + =+ xw=(rpp 5 16 x) + =+ ^= ow |- ^- (list ,@) + ?~ r xw + $(xw (dr xw), r (sub r 2)) + (rep 5 (al xw ow)) + :: + ++ rpp |= [a=bloq b=@ c=@] :: rip w/filler blocks + =+ q=(rip a c) + =+ w=(lent q) + ?. =(w b) + ?. (lth w b) (slag (sub w b) q) + ^+ q (weld q (reap (sub b (lent q)) 0)) + q + :: + ++ xrl |= [a=(list ,@) b=(list ,@)] :: xor lists + |- ^- (list ,@) + ?~ a b ?~ b a + [i=(mix -.a -.b) t=$(a +.a, b +.b)] + :: + ++ xrm |= [a=(list (list ,@)) b=(list (list ,@))] + |- ^- (list (list ,@)) + ?~ a b ?~ b a + [i=(xrl -.a -.b) t=$(a +.a, b +.b)] + :: + ++ bls |= [a=@ b=(list ,@)] :: split to sublists + ?> =((mod (lent b) a) 0) + |- ^- (list (list ,@)) + ?~ b ~ + [i=(scag a `(list ,@)`b) t=$(b (slag a `(list ,@)`b))] + :: + ++ slb |= [a=(list (list ,@))] + |- ^- (list ,@) + ?~ a ~ + (weld `(list ,@)`-.a $(a +.a)) + :: + ++ sbm |= [r=@ b=(list ,@)] :: scryptBlockMix + ?> =((lent b) (mul 2 r)) + =+ [x=(snag (dec (mul 2 r)) b) c=0] + =| [ya=(list ,@) yb=(list ,@)] + |- ^- (list ,@) + ?~ b (flop (weld yb ya)) + =. x (sal (mix x -.b) 8) + ?~ (mod c 2) + $(c +(c), b +.b, ya [i=x t=ya]) + $(c +(c), b +.b, yb [i=x t=yb]) + :: + ++ srm |= [r=@ b=(list ,@) n=@] :: scryptROMix + ?> ?& + =((lent b) (mul 2 r)) + =(n (bex (dec (xeb n)))) + (lth n (bex (mul r 16))) + == + =| v=(list (list ,@)) + =+ c=0 + =. v + |- ^- (list (list ,@)) + =+ w=(sbm r b) + ?: =(c n) (flop v) + $(c +(c), v [i=[b] t=v], b w) + =+ x=(sbm r (snag (dec n) v)) + |- ^- (list ,@) + ?: =(c n) x + =+ q=(snag (dec (mul r 2)) x) + $(x (sbm r (xrl x (snag (mod q n) v))), c +(c)) + :: + ++ hmc |= [k=@ t=@] :: HMAC-SHA-256 + (hml k (met 3 k) t (met 3 t)) + :: + ++ hml |= [k=@ kl=@ t=@ tl=@] :: w/length + =. k (end 3 kl k) =. t (end 3 tl t) + =+ b=64 + =. k ?. (gth kl b) k (shay kl k) + =+ ^= q %+ shay (add b tl) + (add (lsh 3 b t) (mix k (fil 3 b 0x36))) + %+ shay (add b 32) + (add (lsh 3 b q) (mix k (fil 3 b 0x5c))) + :: + ++ pbk ~/ %pbk :: PBKDF2-HMAC-SHA256 + |= [p=@ s=@ c=@ d=@] + (pbl p (met 3 p) s (met 3 s) c d) + :: + ++ pbl ~/ %pbl :: w/length + |= [p=@ pl=@ s=@ sl=@ c=@ d=@] + =. p (end 3 pl p) =. s (end 3 sl s) + =+ h=32 + ?> ?& (lte d (bex 30)) :: max key length 1GB + (lte c (bex 28)) :: max iterations 2^28 + !=(c 0) + == + =+ ^= l ?~ (mod d h) + (div d h) + +((div d h)) + =+ r=(sub d (mul h (dec l))) + =+ [t=0 j=1 k=1] + =. t |- ^- @ + ?: (gth j l) t + =+ u=(add s (lsh 3 sl (rep 3 (flop (rpp 3 4 j))))) + =+ f=0 =. f |- ^- @ + ?: (gth k c) f + =+ q=(hml p pl u ?:(=(k 1) (add sl 4) h)) + $(u q, f (mix f q), k +(k)) + $(t (add t (lsh 3 (mul (dec j) h) f)), j +(j)) + (end 3 d t) + :: + ++ hsh ~/ %hsh :: scrypt + |= [p=@ s=@ n=@ r=@ z=@ d=@] + (hsl p (met 3 p) s (met 3 s) n r z d) + :: + ++ hsl ~/ %hsl :: w/length + |= [p=@ pl=@ s=@ sl=@ n=@ r=@ z=@ d=@] + =| v=(list (list ,@)) + =. p (end 3 pl p) =. s (end 3 sl s) + =+ u=(mul (mul 128 r) z) + ?> ?& =(n (bex (dec (xeb n)))) :: n is power of 2 + !=(r 0) !=(z 0) + %+ lte :: max 1GB memory + (mul (mul 128 r) (dec (add n z))) + (bex 30) + (lth pl (bex 31)) + (lth sl (bex 31)) + == + =+ ^= b =+ %^ rpp 3 u + (pbl p pl s sl 1 u) + %+ turn (bls (mul 128 r) -) + |=(a=(list ,@) (rpp 9 (mul 2 r) (rep 3 a))) + ?> =((lent b) z) + =+ ^= q + =+ |- ?~ b (flop v) + $(b +.b, v [i=(srm r -.b n) t=v]) + %+ turn `(list (list ,@))`- + |=(a=(list ,@) (rpp 3 (mul 128 r) (rep 9 a))) + (pbl p pl (rep 3 (slb q)) u 1 d) + -- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eY, SHA-256 (move me) :: :: From acce20899f2d884e7bd461940bca1aa655826a6c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 3 May 2015 16:57:35 -0700 Subject: [PATCH 60/73] Continuity breach with new protocol 4. --- base/arvo/ames.hoon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 564688a90..4f2f75c11 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -440,7 +440,7 @@ vix=(bex +((cut 0 [25 2] mag))) :: width of sender tay=(cut 0 [27 5] mag) :: message type == - ?> =(3 vez) + ?> =(4 vez) ?> =(chk (end 0 20 (mug bod))) :+ [(end 3 wix bod) (cut 3 [wix vix] bod)] (kins tay) @@ -460,7 +460,7 @@ =+ tay=(ksin q.kec) %+ mix %+ can 0 - :~ [3 3] + :~ [3 4] [20 (mug bod)] [2 yax] [2 qax] @@ -1043,7 +1043,7 @@ ++ gnaw :: gnaw:am |= [kay=cape ryn=lane pac=rock] :: process packet ^- [p=(list boon) q=fort] - ?. =(3 (end 0 3 pac)) [~ fox] + ?. =(4 (end 0 3 pac)) [~ fox] =+ kec=(bite pac) ?: (goop p.p.kec) [~ fox] ?. (~(has by urb.ton.fox) q.p.kec) From fb14b6717aefe35d3022f3eaf530ee1f1ce964bf Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 6 May 2015 15:58:54 -0700 Subject: [PATCH 61/73] Restrict authenticated requests to /~~ and /~/as paths --- base/arvo/eyre.hoon | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/base/arvo/eyre.hoon b/base/arvo/eyre.hoon index 018f46453..f4c08dff9 100644 --- a/base/arvo/eyre.hoon +++ b/base/arvo/eyre.hoon @@ -422,7 +422,7 @@ =. p.p.pul |(p.p.pul ?=(hoke r.p.pul)) =+ her=(host-to-ship r.p.pul) ?: |(?=(~ her) =(our u.her)) - (handle pul q.+.kyz [p.heq maf s.heq]) + (handle pul [q.+.kyz anon] [p.heq maf s.heq]) =+ han=(sham hen) =. pox (~(put by pox) han hen) (ames-gram u.her [%get ~] han +.kyz) @@ -671,7 +671,7 @@ :: ++ handle |= $: [hat=hart pok=pork quy=quay] :: purl, parsed url - cip=clip :: client ip + [cip=clip him=ship] :: client ip, ship [mef=meth maf=math bod=(unit octs)] :: method/headers/body == =< apex @@ -930,8 +930,7 @@ %mess :- %| =^ orx ..ya ?:(is-anon new-view:for-client [(need grab-oryx) ..ya]) - =+ vew=(ire-ix (oryx-to-ixor orx)) - =+ [him=him.vew cay=[%json !>(`json`s.hem)]] + =+ [vew=(ire-ix (oryx-to-ixor orx)) cay=[%json !>(`json`s.hem)]] ?: ?=(%json q.hem) ((teba new-mess.vew) p.hem r.hem cay) %+ pass-note [%to (oryx-to-ixor orx) (scot %p p.p.hem) q.p.hem r.hem] (ford-req root-beak [%cast q.hem %done ~ cay]) @@ -989,7 +988,7 @@ %get ~| aute/ham ?: |(=(anon him.ham) (~(has in aut.yac) him.ham)) - process(pok rem.ham, ..ya abet.yac(him him.ham)) + process(him him.ham, pok rem.ham) ?. =(our him.ham) [%| ((teba foreign-auth.yac) him.ham hat rem.ham quy)] (show-login-page ~) @@ -1028,7 +1027,7 @@ (new-ya (rsh 3 1 (scot %p (end 6 1 ney)))) ~| bad-cookie/u.lig =+ cyz=(~(got by wup) u.lig) - ~(. ya u.lig cyz(cug ~)) + ~(. ya u.lig cyz(him him, cug ~)) :: ++ new-ya |=(ses=hole ~(. ya ses (new-cyst ses))) ++ new-cyst From f7de17cf48d4c8f253071e79beaad76f8f8c75fd Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Wed, 6 May 2015 17:01:13 -0700 Subject: [PATCH 62/73] window.urb injection collision avoidance --- base/arvo/eyre.hoon | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/base/arvo/eyre.hoon b/base/arvo/eyre.hoon index f4c08dff9..a59aec9b3 100644 --- a/base/arvo/eyre.hoon +++ b/base/arvo/eyre.hoon @@ -234,7 +234,12 @@ :: ++ add-json :: inject window.urb |= [urb=json jaz=cord] ^- cord - (cat 3 (crip "window.urb = {(pojo urb)}\0a") jaz) + =- (cat 3 (crip -) jaz) + """ + var _urb = {(pojo urb)} + window.urb = window.urb || \{}; for(k in _urb) window.urb[k] = _urb[k] + + """ :: ++ ares-to-json |= err=ares ^- json @@ -266,7 +271,7 @@ urb.tries = 0 urb.call = function() { urb.wreq = new XMLHttpRequest() - urb.wreq.open('GET', urb.poll, true) + urb.wreq.open('GET', urb.wurl, true) urb.wreq.addEventListener('load', function() { // if(~~(this.status / 100) == 4) // return document.write(this.responseText) @@ -285,11 +290,11 @@ } urb.call() urb.wasp = function(deh){ - var old = /[^/]*$/.exec(urb.poll)[0] + var old = /[^/]*$/.exec(urb.wurl)[0] var deps = old.replace(/^on.json\?|.json$/,'').split('&') if (deps.indexOf(deh) !== -1) return; deps.push(deh) - urb.poll = "/~/on.json?"+deps.join('&') + urb.wurl = "/~/on.json?"+deps.join('&') urb.wreq.abort() // trigger keep } ''' @@ -938,7 +943,7 @@ %poll ?: ?=([~ %js] p.pok) :: XX treat non-json cases? =+ polling-url=['/' (apex:earn %| pok(u.p %json) quy)] - [%& %js (add-json (joba %poll (jape polling-url)) poll:js)] + [%& %js (add-json (joba %wurl (jape polling-url)) poll:js)] |- =. done (new-dependency i.p.hem %& hen) ?~ t.p.hem [%| done] From 3295f1797bf9a0799173d96b3e27b298f1bd225d Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 May 2015 18:41:20 -0700 Subject: [PATCH 63/73] Hand-merged ford, zuse and hoon from newgall. --- base/arvo/ford.hoon | 4 ---- base/arvo/hoon.hoon | 20 +++++++++++++++++--- base/arvo/zuse.hoon | 4 ---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/base/arvo/ford.hoon b/base/arvo/ford.hoon index c16d98bfd..25834deb1 100644 --- a/base/arvo/ford.hoon +++ b/base/arvo/ford.hoon @@ -210,10 +210,6 @@ =+ gib=(wox p.n.r.arc) ?~(gib rac [[u.gib p.n.r.arc] rac]) :: -++ slob :: XX belongs in h/h - |= [cog=@tas typ=type] - (~(has in (sa (sloe typ))) cog) -:: ++ norm :: normalize beam rev |= [ska=sled bem=beam] %_ bem diff --git a/base/arvo/hoon.hoon b/base/arvo/hoon.hoon index 2d38911a6..f01c4a201 100644 --- a/base/arvo/hoon.hoon +++ b/base/arvo/hoon.hoon @@ -61,6 +61,7 @@ [%many p=(list coin)] :: == :: ++ cord ,@t :: text atom (UTF-8) +++ dock (pair ,@p term) :: message target ++ date ,[[a=? y=@ud] m=@ud t=tarp] :: parsed date ++ dime ,[p=@ta q=@] :: ++ each |*([a=$+(* *) b=$+(* *)] $%([& p=a] [| p=b])) :: either a or b @@ -101,6 +102,8 @@ ++ nail ,[p=hair q=tape] :: parsing input ++ numb ,@ :: just a number ++ pair |*([a=$+(* *) b=$+(* *)] ,[p=a q=b]) :: just a pair +++ quid |*([a=$+(* *) b=*] ,[a _b]) :: for =^ +++ quip |*([a=$+(* *) b=*] ,[(list a) _b]) :: for =^ ++ wand |* a=(pole $+(* *)) :: hetero list |= b=* :: ?~ a ~ :: @@ -5781,6 +5784,14 @@ |= [cog=@tas typ=type] !=(~ q:(~(fino ut typ) 0 %free cog)) :: +++ slob :: superficial arm + |= [cog=@tas typ=type] + ^- ? + ?+ typ | + [%hold *] $(typ ~(repo ut typ)) + [%core *] (~(has by q.r.q.typ) cog) + == +:: ++ sloe :: get arms in core |= typ=type ^- (list term) @@ -9016,7 +9027,7 @@ ++ expv |.(;~(gunk lobe wisp)) :: tile, core tail ++ expw |.(;~(gunk lobe teak)) :: tile and tiki ++ expx |.((butt ;~(gunk teak race))) :: tiki, [tile twig]s - ++ expy |.((butt ;~(gunk teak loaf race))) :: tiki twig [tile twig]s + ++ expy |.((butt ;~(gunk teak loaf race))) :: tk twig [tile twig]s ++ expz |.(loaf(bug &)) :: twig with tracing :: Hint syntaces (nock 10) ++ hinb |.(;~(gunk bont loaf)) :: hint and twig @@ -9397,12 +9408,13 @@ ++ cage (cask vase) :: global metadata ++ cask |*(a=_,* (pair mark a)) :: global data ++ cuff :: permissions - $: p=kirk :: readers - q=(set monk) :: authors + $: p=(unit (set monk)) :: can be read by + q=(set monk) :: caused or created by == :: ++ curd ,[p=@tas q=*] :: typeless card ++ duct (list wire) :: causal history ++ gage (pair marc vase) :: structured cage +++ from ,[ost=bone src=ship] :: forward problem ++ hide :: standard app state $: $: our=ship :: owner/operator app=term :: app identity @@ -9458,6 +9470,7 @@ ++ slad $+ [(unit (set monk)) term beam] :: undertyped (unit (unit (cask))) :: ++ slut $+(* (unit (unit))) :: old namespace +++ then ,[ost=bone src=ship way=wire] :: backward problem ++ vile :: reflexive constants $: typ=type :: -:!>(*type) duc=type :: -:!>(*duct) @@ -9801,6 +9814,7 @@ |= [lac=? gum=muse] ^- [[p=(list ovum) q=(list muse)] _niz] :: =. lac |(lac ?=(?(%g %f) p.gum)) + :: =. lac &(lac !?=(%b p.gum)) %+ fire p.gum ?- -.r.gum diff --git a/base/arvo/zuse.hoon b/base/arvo/zuse.hoon index baecf03bd..a229aa8f7 100644 --- a/base/arvo/zuse.hoon +++ b/base/arvo/zuse.hoon @@ -1894,10 +1894,6 @@ cip=(each ,@if ,@is) :: client IP cum=(map ,@tas ,*) :: custom dirt == :: -++ cuff :: permissions - $: p=(unit (set monk)) :: readers - q=(set monk) :: authors - == :: ++ deed ,[p=@ q=step r=?] :: sig, stage, fake? ++ dome :: project state $: ank=ankh :: state From f1533c8972f8f366eaafcab72a1b08edb952f8d3 Mon Sep 17 00:00:00 2001 From: Kingdon Date: Wed, 6 May 2015 21:53:05 -0400 Subject: [PATCH 64/73] necessary --- base/pub/doc/arvo/util.md | 2 +- base/pub/doc/guide.md | 2 +- base/pub/doc/guide/c-gall.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/pub/doc/arvo/util.md b/base/pub/doc/arvo/util.md index 2e4f764f3..d53607020 100644 --- a/base/pub/doc/arvo/util.md +++ b/base/pub/doc/arvo/util.md @@ -15,7 +15,7 @@ You can find them in `/main/app`. `~zod/try=> :begin [~ship-name [~valid-ticket-for-ship]]` -Start a ship. `:begin` collects all of the necesarry information to +Start a ship. `:begin` collects all of the necessary information to start an Urbit ship. Takes an option `[~ship-name]` or `[~ship-name [~valid-ticket-for-ship]]` pair. diff --git a/base/pub/doc/guide.md b/base/pub/doc/guide.md index 961c8fb37..7a3d77898 100644 --- a/base/pub/doc/guide.md +++ b/base/pub/doc/guide.md @@ -5,7 +5,7 @@ Guides These guides are designed to get you oriented in urbit. -Each one covers a specific topic. Although it's not necesarry to follow +Each one covers a specific topic. Although it's not necessary to follow them in order, they do get increasingly complex. diff --git a/base/pub/doc/guide/c-gall.md b/base/pub/doc/guide/c-gall.md index bd0b354ae..899c2eb7b 100644 --- a/base/pub/doc/guide/c-gall.md +++ b/base/pub/doc/guide/c-gall.md @@ -3,7 +3,7 @@ vane. To show off how we store and distribute data in Urbit we're going to examine a simple webapp. Some of the material here expects that you have looked over the [`%ford` guide](). If you haven't, it's a good idea to start there. There's also more information in the [`%gall` -overview]() and [`%gall` commentary]() but it's not necesarry that you +overview]() and [`%gall` commentary]() but it's not necessary that you read those before going forward. One important thing to keep in mind is that `%gall` services aren't From 2af8dd2263da7b2b4589b14c146fa6afae888e0c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 May 2015 19:00:58 -0700 Subject: [PATCH 65/73] Hand-merge ames and time from newgall. --- base/arvo/ames.hoon | 46 ++++++++++++++++++++++++++++++++++++++++++--- base/arvo/time.hoon | 6 ++++++ 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 564688a90..f2f33d32c 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -8,6 +8,12 @@ $% [%crud p=@tas q=(list tank)] :: [%text p=tape] :: == :: +++ cuft :: internal gift + $% [%coup p=(unit tang)] :: poke result + [%diff p=cage] :: subscription output + [%quit ~] :: close subscription + [%reap p=(unit tang)] :: peer result + == :: ++ gift :: out result <-$ $% [%hear p=lane q=@] :: receive packet [%init p=@p] :: report install @@ -39,6 +45,11 @@ == == :: $: %a :: to %ames $% [%kick p=@da] :: + == == :: + $: %b :: to %behn + $% [%rote p=sack q=path r=*] :: + [%roth p=sack q=path r=*] :: + [%mess p=[@p %ye ~] q=@p r=cage] :: == == :: $: %g :: to %gall $% [%rote p=sack q=path r=*] :: @@ -53,6 +64,10 @@ ++ sign :: in result $<- $? $: %a :: from %ames $% [%went p=ship q=cape] :: + == == :: + $: %b :: from %gall + $% [%unto p=cuft] :: + [%mack p=(unit tang)] :: message ack == == :: $: %g :: from %gall $% [%mean p=ares] :: @@ -1054,7 +1069,7 @@ %- ~(chew la:(ho:(um q.p.kec) p.p.kec) kay ryn %none (shaf %flap pac)) [q.kec r.kec] :: - ++ goop + ++ goop :: blacklist |= him=ship | :: @@ -1621,6 +1636,7 @@ ++ load |= old=fort ^+ ..^$ + ~& %ames-reload ..^$(fox old) :: ++ scry @@ -1667,6 +1683,7 @@ [hen [%slip %a %kick now]] [hen [%slip %e %init p.bon]] [hen [%slip %g %init p.bon]] + [hen [%slip %b %init p.bon]] :: temporary %behn [hen [%slip %d %init p.bon]] :: must be after gall ~ == @@ -1697,7 +1714,7 @@ :+ (scot %p p.p.bon) (scot %p q.p.bon) q.q.bon - [hen %pass pax %g %rote p.bon /helm 0 %m %will wil]~ + [hen %pass pax %b %rote p.bon /helm 0 %m %will wil]~ ?> ?=([@ @ *] t.q.q.bon) :_ fox =+ [cak=i.t.q.q.bon ven=i.t.t.q.q.bon] @@ -1772,6 +1789,26 @@ :~ :- (claw p.p.bon) [%sick %wart p.bon i.t.q.q.bon t.t.q.q.bon r.bon] == + :: + %be :: %behn request + =* imp t.t.q.q.bon + ?> (levy imp (sane %ta)) + =+ ^= pax + :+ (scot %p p.p.bon) + (scot %p q.p.bon) + q.q.bon + :: ~& [%ames-behn-request p.bon imp pax] + :_ fox [hen %pass pax %b %rote p.bon imp r.bon]~ + :: + %bh :: %behn response + =* imp t.t.q.q.bon + ?> (levy imp (sane %ta)) + =+ ^= pax + :+ (scot %p p.p.bon) + (scot %p q.p.bon) + q.q.bon + :: ~& [%ames-behn-response p.bon imp pax] + :_ fox [hen %pass pax %b %roth p.bon imp r.bon]~ :: %ge :: %gall request =* imp t.t.q.q.bon @@ -1819,16 +1856,19 @@ ?- +<.sih %crud [[[hen [%slip %d %flog +.sih]] ~] +>] %went [~ +>] + %mack ?~ +>.sih $(sih [%g %nice ~]) + $(sih [%g %mean `[%mack +>+.sih]]) + %unto ~|([%ames-unto tea hen +>-.sih] !!) ?(%mean %nice) ?: ?=([%ye ~] tea) [~ +>.$] ?> ?=([@ @ @ *] tea) =+ soq=[(slav %p i.tea) (slav %p i.t.tea)] =+ pax=t.t.tea - :: ~& [%knap soq num pax] =+ ^= fuy =< zork =< zank %^ ~(rack am [now fox]) soq pax + :: ~& [%knap-ack ?-(+<.sih %mean `p.+.sih, %nice ~)] ?-(+<.sih %mean `p.+.sih, %nice ~) => %_(. fox q.fuy) =| out=(list move) diff --git a/base/arvo/time.hoon b/base/arvo/time.hoon index 4a90500fb..984483939 100644 --- a/base/arvo/time.hoon +++ b/base/arvo/time.hoon @@ -12,8 +12,11 @@ == :: ++ broq |* [a=_,* b=_,*] :: brodal skew qeu (list (sqeu a b)) :: +++ weight + (each noun (list (pair tape weight))) ++ gift :: out result <-$ $% [%wake ~] :: wakey-wakey + [%wegh weight] :: == :: ++ kiss :: in request ->$ $% [%rest p=@da] :: cancel alarm @@ -186,6 +189,9 @@ == [mof ..^$] :: +++ foo + %bar +:: ++ doze |= [now=@da hen=duct] ^- (unit ,@da) From 61610b46692619146db31527fbcdbf46f6394fcf Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 May 2015 19:18:06 -0700 Subject: [PATCH 66/73] Revert to less broken console library. --- base/lib/sole/core.hook | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/base/lib/sole/core.hook b/base/lib/sole/core.hook index dcbc30bfd..4ffa639f3 100644 --- a/base/lib/sole/core.hook +++ b/base/lib/sole/core.hook @@ -65,7 +65,7 @@ ?- -.dex %del ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) %ins ?: =(p.sin p.dex) - ?:((lth q.sin q.dex) dex dex(p +(p.dex))) + ?:((gth q.sin q.dex) dex dex(p +(p.dex))) ?:((lte p.sin p.dex) dex(p +(p.dex)) dex) == == @@ -85,8 +85,7 @@ ++ inverse :: relative inverse |= ted=sole-edit ^- sole-edit - :: =. ted ?.(?=([%mor * ~] ted) ted i.p.ted) :: XX why? - ~| [ted abet] + =. ted ?.(?=([%mor * ~] ted) ted i.p.ted) ?- -.ted %del [%ins p.ted (snag p.ted buf)] %ins [%del p.ted] @@ -103,14 +102,13 @@ ++ receive :: naturalize event |= sole-change ^- [sole-edit sole-share] - ~| [ler ven] ?> &(=(his.ler his.ven) (lte own.ler own.ven)) - ?> |(!=(own.ler own.ven) =(haw (sham buf)) =(haw 0)) :: trust the clock + ?> &(=(his.ler his.ven) (lte own.ler own.ven)) + ?> |(!=(own.ler own.ven) =(0 haw) =(haw (sham buf))) =. leg (scag (sub own.ven own.ler) leg) :: ~? !=(own.ler own.ven) [%miss-leg leg] - =+ dat=(transmute [%mor (flop leg)] ted) + =+ dat=(transmute [%mor leg] ted) :: ~? !=(~ leg) [%transmute from/ted to/dat ~] - :: =- ~& (tufa buf) - [dat abet:(apply(his.ven +(his.ven)) dat)] :: ++ remit :: conditional accept @@ -126,7 +124,6 @@ ++ transmit :: outgoing change |= ted=sole-edit ^- [sole-change sole-share] - :: =- ~& (tufa buf) - [[[his.ven own.ven] (sham buf) ted] (commit ted)] :: ++ transceive :: receive and invert From 9d55c17455c15a39a14d090d0b080c3e2c2a544a Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 May 2015 19:25:10 -0700 Subject: [PATCH 67/73] Hand-merge behn and gall. --- base/arvo/behn.hoon | 1145 +++++++++++++++++++++++++++++++++++++++++++ base/arvo/gall.hoon | 24 + 2 files changed, 1169 insertions(+) create mode 100644 base/arvo/behn.hoon diff --git a/base/arvo/behn.hoon b/base/arvo/behn.hoon new file mode 100644 index 000000000..5f3546e84 --- /dev/null +++ b/base/arvo/behn.hoon @@ -0,0 +1,1145 @@ +!: :: %behn, agent execution +!? 163 +:::: +|= pit=vase +=> =~ +|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: rest of arvo + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +++ hood :: assembly plan + $: zus=@ud :: zuse kelvin + sur=(list hoot) :: structures + lib=(list hoof) :: libraries + fan=(list horn) :: resources + src=(list hoop) :: program + == :: +++ hoof (pair term (unit (pair case ship))) :: resource reference +++ hoot (pair bean hoof) :: structure gate/core +++ hoop :: source in hood + $% [%& p=twig] :: direct twig + [%| p=beam] :: resource location + == :: +++ horn :: resource tree + $% [%ape p=twig] :: /~ twig by hand + [%arg p=twig] :: /$ argument + [%day p=horn] :: /| list by @dr + [%dub p=term q=horn] :: /= apply face + [%fan p=(list horn)] :: /. list + [%for p=path q=horn] :: /, descend + [%hel p=@ud q=horn] :: /% propagate heel + [%hub p=horn] :: /@ list by @ud + [%man p=(map span horn)] :: /* hetero map + [%nap p=horn] :: /_ homo map + [%now p=horn] :: /& list by @da + [%saw p=twig q=horn] :: /; operate on + [%see p=beam q=horn] :: /: relative to + [%sic p=tile q=horn] :: /^ cast + [%toy p=mark] :: /mark/ static + == :: +++ 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 + [%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 + [%plan p=beam q=spur r=hood] :: structured build + [%reef ~] :: kernel reef + [%ride p=twig q=silk] :: silk thru twig + [%vale p=mark q=ship r=*] :: validate [our his] + == :: +++ volt ?(%low %high) :: voltage +++ torc $|(?(%iron %gold) [%lead p=ship]) :: security control +++ roon :: reverse ames msg + $% [%d p=mark q=*] :: diff (diff) + [%x ~] :: + == :: +++ rook :: forward ames msg + $% [%m p=mark q=*] :: message + [%s p=path] :: subscribe + [%u ~] :: cancel/unsubscribe + == :: +-- :: +|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: local arvo + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +++ club :: agent action + $% [%peer p=path] :: subscribe + [%poke p=cage] :: apply + [%pull ~] :: unsubscribe + [%pump ~] :: subscription ack + == :: +++ culm :: config action + $% [%load p=scup] :: load/reload + :: [%kick ~] :: restart everything + :: [%stop ~] :: toggle suspend + :: [%wipe ~] :: destroy all state + == :: +++ cuss (pair dude club) :: internal kiss +++ cuft :: internal gift + $% [%coup p=(unit tang)] :: poke result + [%diff p=cage] :: subscription output + [%quit ~] :: close subscription + [%reap p=(unit tang)] :: peer result + == :: +++ cote :: ++ap note + $% [%meta p=@tas q=vase] :: + [%send p=ship q=cuss] :: + == :: +++ cove (pair duct (mold cote cuft)) :: internal move +++ cute (pair bone (mold cote cuft)) :: internal move +++ dude term :: local identity +++ scup (pair ship desk) :: autoupdate +++ suss (trel dude ,@tas ,@da) :: config report +++ tang (list tank) :: error abstraction +-- :: +|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: %behn cards + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +++ kiss-ames :: + $% [%wont p=sock q=path r=*] :: + == :: +++ kiss-behn :: incoming request + $% [%conf p=dock q=culm] :: configure app + [%init p=ship] :: set owner + [%deal p=sock q=cuss] :: full transmission + [%rote p=sack q=path r=*] :: remote request + [%roth p=sack q=path r=*] :: remote response + == :: +++ kiss-ford :: + $% [%exec p=@p q=(unit silk)] :: make / kill + [%wasp p=@p q=@uvH] :: depends query + == :: +++ gift-ames :: + $% [%woot p=ship q=(unit ares)] :: e2e reaction message + == :: +++ gift-behn :: outgoing result + $% [%onto p=(each suss tang)] :: about agent + [%unto p=cuft] :: within agent + [%mack p=(unit tang)] :: message ack + == :: +++ gift-ford :: out result <-$ + $% [%made p=@uvH q=(each cage tang)] :: computed result + [%news ~] :: fresh depends + == :: +++ sign-behn :: incoming result + $% [%a gift-ames] + [%b gift-behn] :: + [%f gift-ford] :: + == :: +++ note-behn :: outgoing request + $? [@tas %meta p=vase] :: + $% [%a kiss-ames] :: + [%b kiss-behn] :: + [%f kiss-ford] :: + == == :: +++ move ,[p=duct q=(mold note-behn gift-behn)] :: typed move +-- :: +|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: %behn state + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +++ axle :: all state + $: %0 :: state version + pol=(map ship mast) :: apps by ship + == :: +++ gest :: subscriber data + $: sup=(map bone (pair ship path)) :: subscribers + pus=(jug path bone) :: srebircsbus + qel=(map bone ,@ud) :: queue meter + == :: +++ mast :: ship state + $: sys=duct :: system duct + sap=(map ship scad) :: foreign contacts + bum=(map dude seat) :: running agents + wub=(map dude sofa) :: waiting queue + == :: +++ ffuc :: new cuff + $: p=(unit (set ship)) :: disclosing to + q=ship :: attributed to + == :: +++ prey (pair volt ffuc) :: privilege +++ scad :: foreign connection + $: p=@ud :: index + q=(map duct ,@ud) :: by duct + r=(map ,@ud duct) :: by index + == :: +++ scar :: opaque input + $: p=@ud :: bone sequence + q=(map duct bone) :: by duct + r=(map bone duct) :: by bone + == :: +++ seat :: agent state + $: mom=duct :: control duct + liv=? :: unstopped + toc=torc :: privilege + tyc=stic :: statistics + ged=gest :: subscribers + hav=vase :: running state + pup=scup :: update control + zam=scar :: opaque ducts + == :: +++ sofa :: queue for blocked + $: kys=(qeu (trel duct prey club)) :: queued kisses + == :: +++ stic :: statistics + $: act=@ud :: change number + eny=@uvI :: entropy + lat=@da :: time + == :: +-- :: + :::::::::::::::::::::::::::::::::::::::::::::::::::::: vane header + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +. == +=| all=axle :: all vane state +|= $: now=@da :: urban time + eny=@uvI :: entropy + ska=sled :: activate + == :: opaque core +|% :::::::::::::::::::::::::::::::::::::::::::::::::::::: state machine + :::::::::::::::::::::::::::::::::::::::::::::::::::::: +++ mo + |_ $: $: our=@p + hen=duct + moz=(list move) + == + mast + == + ++ mo-abed :: initialize + |= [our=@p hen=duct] + ^+ +> + %_ +> + our our + hen hen + +<+ (~(got by pol.all) our) + == + :: + ++ mo-abet :: resolve to + ^- [(list move) _+>+] + :_ +>+(pol.all (~(put by pol.all) our +<+)) + %- flop + %+ turn moz + |= a=move + ?. ?=(%pass -.q.a) a + [p.a %pass [(scot %p our) p.q.a] q.q.a] + :: + ++ mo-conf :: configure + |= [dap=dude lum=culm] + (mo-boot dap ?:((~(has by bum) dap) %old %new) p.lum) + :: + ++ mo-pass :: standard pass + |= [pax=path noh=note-behn] + %_(+> moz :_(moz [hen %pass pax noh])) + :: + ++ mo-give + |= git=gift-behn + %_(+> moz :_(moz [hen %give git])) + :: + ++ mo-okay :: valid agent core + |= vax=vase + ^- ? + (~(nest ut -:!>(*hide)) %| p:(slot 12 vax)) + :: + ++ mo-boom :: complete new boot + |= [dap=dude pup=scup dep=@uvH cux=(each cage tang)] + ^+ +> + ?- -.cux + %| (mo-give %onto %| p.cux) + %& + ?. (mo-okay q.p.cux) + (mo-give %onto %| [%leaf "{}: bogus core"]~) + =. +> (mo-bold dap dep) + =. +> (mo-born dap pup q.p.cux) + =+ old=+>.$ + =+ wag=(ap-prop:(ap-abed:ap dap [%high [~ our]]) ~) + ?^ -.wag + =. +>.$ old + (mo-give %onto %| u.-.wag) + =. +>.$ ap-abet:+.wag + (mo-give:(mo-claw dap) %onto %& dap %boot now) + == + :: + ++ mo-born :: new seat + |= [dap=dude pup=scup hav=vase] + =+ sat=*seat + %_ +>.$ + bum + %+ ~(put by bum) dap + %_ sat + mom hen + pup pup + hav hav + p.zam 1 + q.zam [[~ 0] ~ ~] + r.zam [[0 ~] ~ ~] + == + == + :: + ++ mo-boon :: complete old boot + |= [dap=dude pup=scup dep=@uvH cux=(each cage tang)] + ^+ +> + ?. (~(has by bum) dap) + ~& [%behn-old-boon dap] + +> + =. +> (mo-bold dap dep) + ?- -.cux + %| (mo-give %onto %| p.cux) + %& ap-abet:(ap-peep:(ap-abed:ap dap [%high [~ our]]) q.p.cux) + == + :: + ++ mo-bold :: wait for dep + |= [dap=dude dep=@uvH] + ^+ +> + %+ mo-pass [%sys %dep dap ~] + [%f %wasp our dep] + :: + ++ mo-boot :: create ship + |= [dap=dude how=?(%new %old) pup=scup] + ^+ +> + :: ~& [%mo-boot dap how pup] + %+ mo-pass [%sys how dap (scot %p p.pup) q.pup ~] + ^- note-behn + [%f %exec our `[%boil %core [[p.pup q.pup [%da now]] [dap %ape ~]] ~]] + :: + ++ mo-away :: foreign request + |= [him=ship caz=cuss] :: + ^+ +> + :: ~& [%mo-away him caz] + ?: ?=(%pump -.q.caz) + :: + :: you'd think this would send an ack for the diff + :: that caused this pump. it would, but we already + :: sent it when we got the diff in ++mo-cyst. then + :: we'd have to save the network duct and connect it + :: to this returning pump. + :: + +> + =^ num +>.$ (mo-bale him) + =+ ^= roc ^- rook + ?- -.q.caz + %poke [%m p.p.q.caz q.q.p.q.caz] + %pull [%u ~] + %peer [%s p.q.caz] + == + %+ mo-pass + [%sys %way -.q.caz ~] + `note-behn`[%a %wont [our him] [%q %be p.caz ~] [num roc]] + :: + ++ mo-baal :: error convert a + |= art=(unit ares) + ^- ares + ?~(art ~ ?~(u.art `[%blank ~] u.art)) + :: + ++ mo-baba :: error convert b + |= ars=ares + ^- (unit tang) + ?~ ars ~ + `[[%leaf (trip p.u.ars)] q.u.ars] + :: + ++ mo-awed :: foreign response + |= [him=ship why=?(%peer %poke %pull) art=(unit ares)] + ^+ +> + :: ~& [%mo-awed him why art] + =+ tug=(mo-baba (mo-baal art)) + ?- why + %peer (mo-give %unto %reap tug) + %poke (mo-give %unto %coup tug) + %pull ~& [%pull-fail tug] + +>.$ + == + :: + ++ mo-bale :: assign outbone + |= him=ship + ^- [@ud _+>] + =+ sad=(fall (~(get by sap) him) `scad`[1 ~ ~]) + =+ nom=(~(get by q.sad) hen) + ?^ nom [u.nom +>.$] + :- p.sad + %_ +>.$ + sap + %+ ~(put by sap) him + %_ sad + p +(p.sad) + q (~(put by q.sad) hen p.sad) + r (~(put by r.sad) p.sad hen) + == + == + :: + ++ mo-ball :: outbone by index + |= [him=ship num=@ud] + ^- duct + (~(got by r:(~(got by sap) him)) num) + :: + ++ mo-come :: handle locally + |= [her=ship caz=cuss] + ^+ +> + =+ pry=`prey`[%high [~ her]] + (mo-club p.caz pry q.caz) + :: + ++ mo-coup :: back from mo-away + |= [dap=dude him=ship cup=ares] + %^ mo-give %unto %coup + ?~ cup ~ + [~ `tang`[[%leaf (trip p.u.cup)] q.u.cup]] + :: + ++ mo-cyst :: take in /sys + |= [pax=path sih=sign-behn] + ^+ +> + ?+ -.pax !! + %dep :: update + ?> ?=([%f %news *] sih) + ?> ?=([@ ~] t.pax) + =+ sot=(~(get by bum) i.t.pax) + ?~ sot + ~& [%mo-cyst-none i.t.pax] + +>.$ + (mo-boot i.t.pax %old pup.u.sot) + :: + %new + ?> ?=([%f %made *] sih) + ?> ?=([@ @ @ ~] t.pax) + (mo-boom i.t.pax [(slav %p i.t.t.pax) i.t.t.t.pax] +>.sih) + :: + %old :: reload old + ?> ?=([%f %made *] sih) + ?> ?=([@ @ @ ~] t.pax) + (mo-boon i.t.pax [(slav %p i.t.t.pax) i.t.t.t.pax] +>.sih) + :: + %red :: diff ack + ?> ?=([@ @ @ ~] t.pax) + ?> ?=([%a %woot *] sih) + =+ :* him=(slav %p i.t.pax) + dap=i.t.t.pax + num=(slav %ud i.t.t.t.pax) + == + => .(pax `path`[%req t.pax]) + ?~ q.+>.sih + (mo-pass [%sys pax] %b %deal [him our] dap %pump ~) + ~& [%diff-bad-ack q.+>.sih] :: should not happen + =. +>.$ (mo-pass [%sys pax] %b %deal [him our] dap %pull ~) + (mo-pass [%sys pax] %a %wont [our him] [%q %bh dap ~] [num %x ~]) + :: + %rep :: reverse request + ?> ?=([@ @ @ ~] t.pax) + ?> ?=([%f %made *] sih) + =+ :* him=(slav %p i.t.pax) + dap=i.t.t.pax + num=(slav %ud i.t.t.t.pax) + == + ?- -.q.+>.sih + %| (mo-give %mack `p.q.+>.sih) :: XX should crash + %& =. +>.$ (mo-give %mack ~) :: XX pump should ack + (mo-give(hen (mo-ball him num)) %unto %diff `cage`p.q.+>.sih) + == + :: + %req :: inbound request + ?> ?=([@ @ @ ~] t.pax) + =+ :* him=(slav %p i.t.pax) + dap=i.t.t.pax + num=(slav %ud i.t.t.t.pax) + == + ?: ?=([%f %made *] sih) + ?- -.q.+>.sih + %| (mo-give %mack `p.q.+>.sih) :: XX should crash + %& (mo-pass [%sys pax] %b %deal [him our] i.t.t.pax %poke p.q.+>.sih) + == + ?: ?=([%a %woot *] sih) +>.$ :: quit ack, boring + ?> ?=([%b %unto *] sih) + =+ cuf=`cuft`+>.sih + ?- -.cuf + %coup (mo-give %mack p.cuf) + %diff %+ mo-pass [%sys %red t.pax] + [%a %wont [our him] [%q %bh dap ~] [num %d p.p.cuf q.q.p.cuf]] + %quit %+ mo-pass [%sys pax] + [%a %wont [our him] [%q %bh dap ~] [num %x ~]] + %reap (mo-give %mack p.cuf) + == + :: + %way :: outbound request + ?> ?=([%a %woot *] sih) + ?> ?=([@ ~] t.pax) + %- mo-awed + :* p.+>.sih + (?(%peer %poke %pull) i.t.pax) + +>+.sih + == + == + :: + ++ mo-cook :: take in /use + |= [pax=path hin=(hypo sign-behn)] + ^+ +> + ?. ?=([@ @ ?(%inn %out) *] pax) + ~& [%mo-cook-bad-pax pax] + !! + =+ dap=`@tas`i.pax + =+ pry=`prey`[%high [~ (slav %p i.t.pax)]] + =+ pap=(ap-abed:ap dap pry) + =+ vax=(slot 3 `vase`hin) + ?- i.t.t.pax + %inn ap-abet:(ap-pour:pap t.t.t.pax (slot 3 `vase`hin)) + %out ?. ?=([%b %unto *] q.hin) + ~& [%mo-cook-weird q.hin] + ~& [%mo-cook-weird-path pax] + +>.$ + ap-abet:(ap-pout:pap t.t.t.pax +>.q.hin) + == + :: + ++ mo-claw :: clear queue + |= dap=dude + ^+ +> + ?. (~(has by bum) dap) +> + =+ suf=(~(get by wub) dap) + =+ neh=hen + ?~ suf +>.$ + |- ^+ +>.^$ + ?: =(~ kys.u.suf) + +>.^$(hen neh, wub (~(del by wub) dap)) + =^ lep kys.u.suf [p q]:~(get to kys.u.suf) + :: ~& [%mo-claw-play dap r.lep] + $(+>.^$ ap-abet:(ap-club:(ap-abed:ap(hen p.lep) dap q.lep) r.lep)) + :: + ++ mo-club :: local action + |= [dap=dude pry=prey cub=club] + ^+ +> + ?: |(!(~(has by bum) dap) (~(has by wub) dap)) + :: ~& [%mo-club-qeu dap cub] + =+ syf=(fall (~(get by wub) dap) *sofa) + +>.$(wub (~(put by wub) dap syf(kys (~(put to kys.syf) [hen pry cub])))) + ap-abet:(ap-club:(ap-abed:ap dap pry) cub) + :: + ++ mo-gawk :: ames forward + |= [him=@p dap=dude num=@ud rok=rook] + %+ mo-pass + [%sys %req (scot %p him) dap (scot %ud num) ~] + ^- note-behn + ?- -.rok + %m [%f %exec our ~ %vale p.rok our q.rok] :: XX use build beak + %s [%b %deal [him our] dap %peer p.rok] + %u [%b %deal [him our] dap %pull ~] + == + :: + ++ mo-gawd :: ames backward + |= [him=@p dap=dude num=@ud ron=roon] + ?- -.ron + %d + %+ mo-pass + [%sys %rep (scot %p him) dap (scot %ud num) ~] + [%f %exec our ~ %vale p.ron our q.ron] + :: + %x (mo-give(hen (mo-ball him num)) %unto %quit ~) + == + :: + ++ ap :: agent engine + |_ $: $: dap=dude + pry=prey + ost=bone + zip=(list cute) + dub=(list (each suss tang)) + == + seat + == + :: + ++ ap-abed :: initialize + |= [dap=dude pry=prey] + ^+ +> + =: ^dap dap + ^pry pry + +>+<+ `seat`(~(got by bum) dap) + == + =+ unt=(~(get by q.zam) hen) + =: act.tyc +(act.tyc) + eny.tyc (shax (mix (add dap act.tyc) eny)) + lat.tyc now + == + ?^ unt + +>.$(ost u.unt) + %= +>.$ + ost p.zam + p.zam +(p.zam) + q.zam (~(put by q.zam) hen p.zam) + r.zam (~(put by r.zam) p.zam hen) + == + :: + ++ ap-abet :: resolve + ^+ +> + => ap-abut + %_ +> + bum (~(put by bum) dap +<+) + moz :(weld (turn zip ap-aver) (turn dub ap-avid) moz) + == + :: + ++ ap-abut :: track queue + ^+ . + =+ [pyz=zip ful=*(set bone)] + |- ^+ +> + ?~ pyz + =+ ded=(~(tap in ful) ~) + |- ^+ +>.^$ + ?~ ded +>.^$ + $(ded t.ded, +>.^$ ap-kill(ost i.ded)) + ?. ?=([%give %diff *] q.i.pyz) + $(pyz t.pyz) + =^ vad +> ap-fill + $(pyz t.pyz, ful ?:(vad ful (~(put in ful) p.i.pyz))) + :: + ++ ap-aver :: cute to move + |= cov=cute + ^- move + =+ fuk=(~(get by r.zam) p.cov) + ?~ fuk + ~& [%ap-aver-fuk p.cov] + !! + :- (~(got by r.zam) p.cov) + ?- -.q.cov + ?(%slip %sick) !! + %give [%give %unto p.q.cov] + %pass + :+ %pass `path`[%use dap p.q.cov] + ?- -.q.q.cov + %send `note-behn`[%b %deal [our p.q.q.cov] q.q.q.cov] + %meta `note-behn`[`@tas`p.q.q.cov %meta `vase`q.q.q.cov] + == + == + :: + ++ ap-avid :: onto results + |=([a=(each suss tang)] [hen %give %onto a]) + :: + ++ ap-call :: call into server + |= [cog=term arg=vase] + ^- [(unit tang) _+>] + =. +> ap-hide + =+ arm=(ap-farm cog) + ?: ?=(%| -.arm) [`p.arm +>.$] + =+ zem=(ap-slam cog p.arm arg) + ?: ?=(%| -.zem) [`p.zem +>.$] + (ap-sake p.zem) + :: + ++ ap-club :: apply effect + |= cub=club + ^+ +> + ?- -.cub + %poke (ap-poke +.cub) + %peer (ap-peer +.cub) + %pull ap-pull + %pump ap-fall + == + :: + ++ ap-diff :: pour a diff + |= [her=ship pax=path cag=cage] + =. q.cag (spec q.cag) + =+ cug=(ap-find [%diff p.cag pax]) + ?~ cug + (ap-pump:(ap-lame %diff (ap-suck "pour: no diff")) | her pax) + =+ ^= arg ^- vase + %- slop + ?: =(0 p.u.cug) + [!>([`@ud`ost `@p`q.q.pry `path`+.pax]) !>(cag)] + [!>([`@ud`ost `@p`q.q.pry (slag (dec p.u.cug) `path`+.pax)]) q.cag] + =^ cam +>.$ (ap-call q.u.cug arg) + ?^ cam + (ap-pump:(ap-lame q.u.cug u.cam) | her pax) + (ap-pump & her pax) + :: + ++ ap-pump :: break subscription + |= [oak=? her=ship pax=path] + =+ way=[(scot %p her) %out pax] + :: ~& [%ap-pump-path oak pax] + ?: oak + (ap-pass way %send her -.pax %pump ~) + (ap-pass:(ap-give %quit ~) way %send her -.pax %pull ~) + :: + ++ ap-fall :: drop from queue + ^+ . + =+ soy=(~(get by qel.ged) ost) + ?: |(?=(~ soy) =(0 u.soy)) + ~& [%ap-fill-under [our dap] q.q.pry ost] + + + =. u.soy (dec u.soy) + :: ~& [%ap-fill-sub [[our dap] q.q.pry ost] u.soy] + ?: =(0 u.soy) + +(qel.ged (~(del by qel.ged) ost)) + +(qel.ged (~(put by qel.ged) ost u.soy)) + :: + ++ ap-farm :: produce arm + |= cog=term + ^- (each vase tang) + =+ puz=(mule |.((~(mint ut p.hav) [%noun [%cnzy cog]]))) + ?: ?=(%| -.puz) [%| p.puz] + =+ ton=(mock [q.hav q.p.puz] ap-sled) + ?- -.ton + %0 [%& p.p.puz p.ton] + %1 [%| (turn p.ton |=(a=* (smyt (path a))))] + %2 [%| p.ton] + == + :: + ++ ap-fill :: add to queue + ^- [? _.] + =+ suy=(fall (~(get by qel.ged) ost) 0) + ?: =(10 suy) + ~& [%ap-fill-full [our dap] q.q.pry ost] + [%| +] + :: ~? !=(10 suy) [%ap-fill-add [[our dap] q.q.pry ost] +(suy)] + [%& +(qel.ged (~(put by qel.ged) ost +(suy)))] + :: + ++ ap-find :: general arm + |= [cog=term pax=path] + =+ dep=0 + |- ^- (unit (pair ,@ud term)) + =+ ^= spu + ?~ pax ~ + $(pax t.pax, dep +(dep), cog (ap-hype cog i.pax)) + ?^ spu spu + ?.((ap-fond cog) ~ `[dep cog]) + :: + ++ ap-fond :: check for arm + |= cog=term + ^- ? + (slob cog p.hav) + :: + ++ ap-give :: return result + |= cit=cuft + ^+ +> + +>(zip :_(zip [ost %give cit])) + :: + ++ ap-hide :: set up hide + %_ . + +12.q.hav + ^- hide + :* :* our + dap + ~ + == + ~ + sup.ged + pus.ged + tyc + == + == + :: + ++ ap-hype :: hyphenate + |=([a=term b=term] `term`(cat 3 a (cat 3 '-' b))) + :: + ++ ap-move :: process each move + |= vax=vase + ^- (each cute tang) + ?@ q.vax [%| (ap-suck "move: invalid move (atom)")] + ?^ -.q.vax [%| (ap-suck "move: invalid move (bone)")] + ?@ +.q.vax [%| (ap-suck "move: invalid move (card)")] + =+ hun=(~(get by r.zam) -.q.vax) + ?. (~(has by r.zam) -.q.vax) + [%| (ap-suck "move: invalid card (bone {<-.q.vax>})")] + =+ cav=(slot 3 (spec (slot 3 vax))) + ?+ +<.q.vax + (ap-move-pass -.q.vax +<.q.vax cav) + %diff (ap-move-diff -.q.vax cav) + %peer (ap-move-peer -.q.vax cav) + %pull (ap-move-pull -.q.vax cav) + %poke (ap-move-poke -.q.vax cav) + %send (ap-move-send -.q.vax cav) + %quit (ap-move-quit -.q.vax cav) + == + :: + ++ ap-move-quit :: give quit move + |= [sto=bone vax=vase] + ^- (each cute tang) + ?^ q.vax [%| (ap-suck "move: improper quit")] + [%& `cute`[sto %give `cuft`[%quit ~]]] + :: + ++ ap-move-diff :: give diff move + |= [sto=bone vax=vase] + ^- (each cute tang) + ?. &(?=(^ q.vax) ?=(@ -.q.vax) ((sane %tas) -.q.vax)) + [%| (ap-suck "move: improper diff")] + [%& sto %give %diff `cage`[-.q.vax (slot 3 vax)]] + :: + ++ ap-move-mess :: extract path, target + |= vax=vase + ^- (each (trel path ship term) tang) + ?. ?& ?=([p=* [q=@ r=@] s=*] q.vax) + (gte 1 (met 7 q.q.vax)) + == + [%| (ap-suck "move: malformed target")] + =+ pux=((soft path) p.q.vax) + ?. &(?=(^ pux) (levy u.pux (sane %ta))) + [%| (ap-suck "move: malformed path")] + [%& [(scot %p q.q.vax) %out r.q.vax u.pux] q.q.vax r.q.vax] + :: + ++ ap-move-pass :: pass general move + |= [sto=bone wut=* vax=vase] + ^- (each cute tang) + ?. &(?=(@ wut) ((sane %tas) wut)) + [%| (ap-suck "move: malformed card")] + =+ pux=((soft path) -.q.vax) + ?. &(?=(^ pux) (levy u.pux (sane %ta))) + [%| (ap-suck "move: malformed path")] + =+ huj=(ap-vain wut) + ?~ huj [%| (ap-suck "move: unknown note {(trip wut)}")] + :^ %& sto %pass + :- [(scot %p q.q.pry) %inn u.pux] + [%meta u.huj (slop (ap-term %tas wut) (slot 3 vax))] + :: + ++ ap-move-poke :: pass %poke + |= [sto=bone vax=vase] + ^- (each cute tang) + =+ yep=(ap-move-mess vax) + ?: ?=(%| -.yep) yep + =+ gaw=(slot 7 vax) + ?. &(?=([p=@ q=*] q.gaw) ((sane %tas) p.q.gaw)) + [%| (ap-suck "poke: malformed cage")] + :^ %& sto %pass + :- p.p.yep + [%send q.p.yep r.p.yep %poke p.q.gaw (slot 3 (spec gaw))] + :: + ++ ap-move-peer :: pass %peer + |= [sto=bone vax=vase] + ^- (each cute tang) + =+ yep=(ap-move-mess vax) + ?: ?=(%| -.yep) yep + =+ pux=((soft path) +>.q.vax) + ?. &(?=(^ pux) (levy u.pux (sane %ta))) + [%| (ap-suck "peer: malformed path")] + :^ %& sto %pass + :- p.p.yep + [%send q.p.yep r.p.yep %peer u.pux] + :: + ++ ap-move-pull :: pass %pull + |= [sto=bone vax=vase] + ^- (each cute tang) + =+ yep=(ap-move-mess vax) + ?: ?=(%| -.yep) yep + ?. =(~ +>.q.vax) + [%| (ap-suck "pull: malformed card")] + :^ %& sto %pass + :- p.p.yep + [%send q.p.yep r.p.yep %pull ~] + :: + ++ ap-move-send :: pass gall action + |= [sto=bone vax=vase] + ^- (each cute tang) + ?. ?& ?=([p=* [q=@ r=@] [s=@ t=*]] q.vax) + (gte 1 (met 7 q.q.vax)) + ((sane %tas) r.q.vax) + == + [%| (ap-suck "move: malformed send")] + =+ pux=((soft path) p.q.vax) + ?. &(?=(^ pux) (levy u.pux (sane %ta))) + [%| (ap-suck "move: malformed path")] + ?: ?=(%poke s.q.vax) + =+ gav=(spec (slot 7 vax)) + ?> =(%poke -.q.gav) + ?. ?& ?=([p=@ q=*] t.q.vax) + ((sane %tas) p.t.q.vax) + == + [%| (ap-suck "move: malformed poke")] + :^ %& sto %pass + :- [(scot %p q.q.vax) %out r.q.vax u.pux] + ^- cote + :: ~& [%ap-move-send `path`[(scot %p q.q.vax) %out r.q.vax u.pux]] + [%send q.q.vax r.q.vax %poke p.t.q.vax (slot 3 (spec (slot 3 gav)))] + =+ cob=((soft club) [s t]:q.vax) + ?~ cob + [%| (ap-suck "move: malformed club")] + :^ %& sto %pass + :- [(scot %p q.q.vax) %out r.q.vax u.pux] + :: ~& [%ap-move-send `path`[(scot %p q.q.vax) %out r.q.vax u.pux]] + [%send q.q.vax r.q.vax u.cob] + :: + ++ ap-pass :: request action + |= [pax=path coh=cote] + ^+ +> + +>(zip :_(zip [ost %pass pax coh])) + :: + ++ ap-peep :: reinstall + |= vax=vase + ^+ +> + (ap-prep(hav vax) `hav) + :: + ++ ap-peer :: apply %peer + |= pax=path + ^+ +> + =+ cug=(ap-find %peer pax) + ?~ cug + (ap-peon pax) + =^ cam +>.$ + %+ ap-call q.u.cug + !>([[`@ud`ost `@p`q.q.pry] `path`(slag p.u.cug pax)]) + ?^ cam + (ap-give %reap cam) + (ap-give:(ap-peon pax) %reap ~) + :: + ++ ap-peon :: add subscriber + |= pax=path + %_ +>.$ + sup.ged (~(put by sup.ged) ost [q.q.pry pax]) + pus.ged (~(put ju pus.ged) pax ost) + == + :: + ++ ap-poke :: apply %poke + |= cag=cage + ^+ +> + =+ cug=(ap-find %poke p.cag ~) + ?~ cug + (ap-give %coup `(ap-suck "no poke arm")) + :: ~& [%ap-poke dap p.cag cug] + =^ tur +>.$ + %+ ap-call q.u.cug + %+ slop + !>([`@ud`ost `@p`q.q.pry]) + ?. =(0 p.u.cug) q.cag + (slop (ap-term %tas p.cag) q.cag) + (ap-give %coup tur) + :: + ++ ap-lame :: pour error + |= [wut=@tas why=tang] + ^+ +> + =+ cug=(ap-find /lame) + ?~ cug + ~& [%ap-lame wut why] + +>.$ + =^ cam +>.$ + %+ ap-call q.u.cug + !>([[`@ud`ost `@p`q.q.pry] wut why]) + ?^ cam + ~&([%ap-lame-lame u.cam] +>.$) + +>.$ + :: + ++ ap-pour :: generic take + |= [pax=path vax=vase] + ^+ +> + ?. &(?=([@ *] q.vax) ((sane %tas) -.q.vax)) + (ap-lame %pour (ap-suck "pour: malformed card")) + =+ cug=(ap-find [-.q.vax pax]) + ?~ cug + (ap-lame -.q.vax (ap-suck "pour: no {(trip -.q.vax)}: {}")) + =^ cam +>.$ + %+ ap-call q.u.cug + %+ slop + !>([`@ud`ost `@p`q.q.pry `path`(slag p.u.cug pax)]) + (slot 3 vax) + ?^ cam (ap-lame -.q.vax u.cam) + +>.$ + :: + ++ ap-pout :: specific take + |= [pax=path cuf=cuft] + ^+ +> + ?- -.cuf + %coup (ap-punk q.q.pry %coup +.pax `!>(p.cuf)) + %diff (ap-diff q.q.pry pax p.cuf) + %quit (ap-punk q.q.pry %quit +.pax ~) + %reap (ap-punk q.q.pry %reap +.pax `!>(p.cuf)) + == + :: + ++ ap-prep :: install + |= vux=(unit vase) + ^+ +> + =^ gac +>.$ (ap-prop vux) + %= +>.$ + dub + :_(dub ?~(gac [%& dap ?~(vux %boot %bump) now] [%| u.gac])) + == + :: + ++ ap-prop :: install + |= vux=(unit vase) + ^- [(unit tang) _+>] + ?. (ap-fond %prep) + ?~ vux + `+>.$ + ?. (~(nest ut p:(slot 13 hav)) %| p:(slot 13 u.vux)) + :_(+>.$ `(ap-suck "prep mismatch")) + `+>.$(+13.q.hav +13.q.u.vux) + =^ tur +>.$ + %+ ap-call %prep + %+ slop + !>([`@ud`ost `@p`q.q.pry]) + ?~(vux !>(~) (slop !>(~) (slot 13 u.vux))) + ?~(tur `+>.$ :_(+>.$ `u.tur)) + :: + ++ ap-pull :: pull inbound + =+ wim=(~(get by sup.ged) ost) + ?~ wim ~&(%ap-pull-none +) + =: sup.ged (~(del by sup.ged) ost) + pus.ged (~(del ju pus.ged) q.u.wim ost) + qel.ged (~(del by qel.ged) ost) + == + =+ cug=(ap-find %pull q.u.wim) + ?~ cug +> + =^ cam +> + %+ ap-call q.u.cug + !>([[`@ud`ost `@p`q.q.pry] (slag p.u.cug q.u.wim)]) + ?^ cam (ap-lame q.u.cug u.cam) + +>+ + :: + ++ ap-kill :: queue kill + ~& [%ap-kill dap ost] + (ap-give:ap-pull %quit ~) + :: + ++ ap-punk :: non-diff gall take + |= [her=ship cog=term pax=path vux=(unit vase)] + ^+ +> + =+ cug=(ap-find cog pax) + ?~ cug + ~& [%ap-punk-none pax] + +>.$ + =^ cam +>.$ + %+ ap-call q.u.cug + =+ den=!>([`@ud`ost `@p`q.q.pry (slag p.u.cug pax)]) + ?~(vux den (slop den u.vux)) + ?^ cam (ap-lame q.u.cug u.cam) + +>.$ + :: + ++ ap-safe :: process move list + |= vax=vase + ^- (each (list cute) tang) + ?~ q.vax [%& ~] + ?@ q.vax [%| (ap-suck "move: malformed list")] + =+ sud=(ap-move (slot 2 vax)) + ?: ?=(%| -.sud) sud + =+ res=$(vax (slot 3 vax)) + ?: ?=(%| -.res) res + [%& p.sud p.res] + :: + ++ ap-sake :: handle result + |= vax=vase + ^- [(unit tang) _+>] + ?: ?=(@ q.vax) + [`(ap-suck "sake: invalid product (atom)") +>.$] + =+ muz=(ap-safe (slot 2 vax)) + ?: ?=(%| -.muz) [`p.muz +>.$] + =+ sav=(ap-save (slot 3 vax)) + ?: ?=(%| -.sav) [`p.sav +>.$] + :- ~ + %_ +>.$ + zip (weld (flop p.muz) zip) + hav p.sav + == + :: + ++ ap-save :: verify core + |= vax=vase + ^- (each vase tang) + ?. (~(nest ut p.hav) %| p.vax) + [%| (ap-suck "invalid core")] + [%& vax] + :: + ++ ap-slam :: virtual slam + |= [cog=term gat=vase arg=vase] + ^- (each vase tang) + =+ wiz=(mule |.((slit p.gat p.arg))) + ?: ?=(%| -.wiz) + ~& %ap-slam-mismatch + ~> %slog.[0 ~(duck ut p.arg)] + ~> %slog.[0 ~(duck ut (~(peek ut p.gat) %free 6))] + [%| (ap-suck "call: {}: type mismatch")] + =+ ton=(mong [q.gat q.arg] ap-sled) + ?- -.ton + %0 [%& p.wiz p.ton] + %1 [%| (turn p.ton |=(a=* (smyt (path a))))] + %2 [%| p.ton] + == + :: + ++ ap-sled (mole (slod ska)) :: namespace view + ++ ap-suck :: standard tang + |= msg=tape + ^- tang + [%leaf (weld "behn: {}: " msg)]~ + :: + ++ ap-term :: atomic vase + |= [a=@tas b=@] + ^- vase + [[%cube b %atom a] b] + :: + ++ ap-vain :: card to vane + |= sep=@tas + ^- (unit ,@tas) + ?+ sep ~& [%ap-vain sep] + ~ + %cash `%a + %conf `%b + %deal `%b + %exec `%f + %flog `%d + %mess `%g + %nuke `%g + %show `%g + %took `%g + %plug `%c + %want `%a + == + -- + -- +++ call :: request + |= [hen=duct hic=(hypo (hobo kiss-behn))] + ^- [p=(list move) q=_..^$] + => .(q.hic ?.(?=(%soft -.q.hic) q.hic ((hard kiss-behn) p.q.hic))) + ?- -.q.hic + %conf + ?. (~(has by pol.all) p.p.q.hic) + ~& [%behn-not-ours p.p.q.hic] + [~ ..^$] + mo-abet:(mo-conf:(mo-abed:mo p.p.q.hic hen) q.p.q.hic q.q.hic) + :: + %deal + =< mo-abet + ?. (~(has by pol.all) q.p.q.hic) :: either to us + ?> (~(has by pol.all) p.p.q.hic) :: or from us + (mo-away:(mo-abed:mo p.p.q.hic hen) q.p.q.hic q.q.hic) + (mo-come:(mo-abed:mo q.p.q.hic hen) p.p.q.hic q.q.hic) + :: + %init + ~& [%behn-init p.q.hic] + [~ ..^$(pol.all (~(put by pol.all) p.q.hic [hen ~ ~ ~]))] + :: + %rote + :: ~& [%behn-rote p.q.hic] + ?. (~(has by pol.all) p.p.q.hic) + ~& [%behn-not-ours p.q.hic] + [~ ..^$] + ?> ?=([@ ~] q.q.hic) + =+ dap=i.q.q.hic + =+ our=p.p.q.hic + =+ him=q.p.q.hic + =+ mes=((hard ,[@ud rook]) r.q.hic) + =< mo-abet + (mo-gawk:(mo-abed:mo our hen) him dap mes) + :: + %roth + :: ~& [%behn-roth p.q.hic] + ?. (~(has by pol.all) p.p.q.hic) + ~& [%behn-not-ours p.q.hic] + [~ ..^$] + ?> ?=([@ ~] q.q.hic) + =+ dap=i.q.q.hic + =+ our=p.p.q.hic + =+ him=q.p.q.hic + =+ mes=((hard ,[@ud roon]) r.q.hic) + =< mo-abet + (mo-gawd:(mo-abed:mo our hen) him dap mes) + == +:: +++ doze :: sleep until + |= [now=@da hen=duct] + ^- (unit ,@da) + ~ +:: +++ load :: recreate vane + |= old=axle + ^+ ..^$ + ..^$(all old) +:: +++ scry + |= [fur=(unit (set monk)) ren=@tas who=ship syd=desk lot=coin tyl=path] + ^- (unit (unit (pair mark ,*))) + [~ ~] +:: +++ stay :: save w/o cache + `axle`all +:: +++ take :: response + |= [tea=wire hen=duct hin=(hypo sign-behn)] + ^- [p=(list move) q=_..^$] + ~| [%behn-take tea] + ?> ?=([@ ?(%sys %use) *] tea) + =+ our=(need (slaw %p i.tea)) + =+ mow=(mo-abed:mo our hen) + ?: ?=(%sys i.t.tea) + mo-abet:(mo-cyst:mow t.t.tea q.hin) + ?> ?=(%use i.t.tea) + mo-abet:(mo-cook:mow t.t.tea hin) +-- diff --git a/base/arvo/gall.hoon b/base/arvo/gall.hoon index e237849d8..53c36944d 100644 --- a/base/arvo/gall.hoon +++ b/base/arvo/gall.hoon @@ -10,6 +10,20 @@ == :: ++ bead ,[p=(set beam) q=gage] :: computed result ++ bone ,@ud :: opaque duct +++ club :: agent action + $% [%peer p=path] :: subscribe + [%poke p=cage] :: apply + [%pull ~] :: unsubscribe + [%pump ~] :: pump yes/no + == :: +++ cuft :: internal gift + $% [%coup p=(unit tang)] :: poke result + [%diff p=cage] :: subscription output + [%quit ~] :: close subscription + [%reap p=(unit tang)] :: peer result + == :: +++ cuss (pair term club) :: internal kiss +++ suss (trel term ,@tas ,@da) :: config report ++ gift :: out result <-$ $% [%back p=?] :: %mess ack good/bad [%crud p=@tas q=(list tank)] :: physical error @@ -57,6 +71,12 @@ ++ note :: out request $-> $? $: %a :: to %ames $% [%wont p=sock q=path r=*] :: + == == :: + $: %b :: to %behn + $% [%deal p=sock q=cuss] :: full transmission + == == :: + $: %c :: to %clay + $% [%warp p=sock q=riff] :: == == :: $: %f :: to %ford $% [%exec p=@p q=beak r=(unit silk)] :: @@ -136,6 +156,10 @@ $% [%init p=@p] :: only for :begin [%woot p=ship q=coop] :: [%went p=ship q=cape] :: only for apps + == == :: + $: %b :: by %behn + $% [%onto p=(each suss tang)] :: + [%unto p=cuft] :: == == :: $: %g :: by %gall $% [%init p=@p] :: From de801786272db90bc7bc0341a61f47687371ed20 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 6 May 2015 19:31:54 -0700 Subject: [PATCH 68/73] Hand-merge in all newgall files. --- base/ape/acto/core.hook | 122 +++ base/ape/dojo/core.hook | 744 ++++++++++++++++ base/ape/helm/core.hook | 183 ++++ base/ape/sole/core.hook | 679 +++++++++++++++ base/ape/talk/core.hook | 1733 ++++++++++++++++++++++++++++++++++++++ base/arvo/doll.hoon | 480 +++++++++++ base/dog/solid/gate.hook | 1 + 7 files changed, 3942 insertions(+) create mode 100644 base/ape/acto/core.hook create mode 100644 base/ape/dojo/core.hook create mode 100644 base/ape/helm/core.hook create mode 100644 base/ape/sole/core.hook create mode 100644 base/ape/talk/core.hook create mode 100644 base/arvo/doll.hoon diff --git a/base/ape/acto/core.hook b/base/ape/acto/core.hook new file mode 100644 index 000000000..34fe28395 --- /dev/null +++ b/base/ape/acto/core.hook @@ -0,0 +1,122 @@ +:: :: :: +:::: /hook/core/acto/ape :: :: + :: :: :: +/- *sole :: structures +/+ sole :: libraries +:: :: +:::: :: + !: :: +=> |% :: board logic + ++ board ,@ :: one-player bitfield + ++ point ,[x=@ y=@] :: coordinate + ++ bo :: board core + |_ bud=board :: state + ++ off |=(point (add x (mul 3 y))) :: bitfield address + ++ get |=(point =(1 (cut 0 [(off +<) 1] bud))) :: get point + ++ set |=(point (con bud (bex (off +<)))) :: set point + ++ win %- lien :_ |=(a=@ =(a (dis a bud))) :: test for win + (rip 4 0wl04h0.4A0Aw.4A00s.0e070) :: with bitmasks + -- :: + -- :: +=> |% :: game logic + ++ game ,[tun=? box=board boo=board] :: game state + ++ go :: game core + |_ game :: + ++ pro ": {?:(tun "X" "O")} to move (x/y): " :: prompt + ++ say |= point :: point value + ?: (~(get bo box) +<) 'X' + ?: (~(get bo boo) +<) 'O' '.' + :: + ++ mov :: move at + |= point + ^- [bean game] + ?: |((~(get bo box) +<) (~(get bo boo) +<)) + [| +>+<] + :- & ?: tun + +>+<(tun |, box (~(set bo box) +<)) + +>+<(tun &, boo (~(set bo boo) +<)) + :: + ++ res ^- (unit tape) :: result + ?: ~(win bo box) `"X wins!" + ?: ~(win bo boo) `"O wins!" + ?: =(511 (con boo box)) `"X and O tied." ~ + :: + ++ ray :: render row + |= y=@ ^- tape + :~ (add y '1') + ' ' (say y 0) + ' ' (say y 1) + ' ' (say y 2) + == + ++ red ~["+ 1 2 3" (ray 0) (ray 1) (ray 2)] :: render board + -- + -- +=> |% :: arvo tools + ++ card ,[%diff %sole-effect sole-effect] :: + ++ move (pair bone card) + ++ room (pair sole-share game) + -- +|_ $: hid=hide :: system state + hoc=(map bone room) + == +++ yo + |_ [[ost=bone moz=(list move)] rom=room] + ++ abet :: resolve + ^- (quip move +>) + [(flop moz) +>(hoc (~(put by hoc) ost rom))] + :: + ++ emit :: produce move + |= fec=sole-effect + ^+ +> + +>(moz [[ost %diff %sole-effect fec] moz]) + :: + ++ emil :: emit multiple + |= fex=(list sole-effect) + ?~(fex +> $(fex t.fex, +> (emit i.fex))) + :: + ++ show :: update ui + %+ emil [%pro & %toe ~(pro go q.rom)] + (turn ~(red go q.rom) |=(a=tape [%txt a])) + :: + ++ wipe :: clear input line + =^ cal p.rom (~(transmit cs p.rom) [%set ~]) + (emit %det cal) + :: + ++ numb (cook |=(a=@ (sub a '1')) (shim '1' '3')) :: row/column + ++ come ;~(plug numb ;~(pfix fas numb)) :: command + ++ good |=(a=(list ,@c) -:(rose (tufa a) come)) :: validate + ++ work :: + |= act=sole-action + ^+ +> + ?- -.act + %det + =^ cul p.rom (~(remit cs p.rom) +.act good) + ?~(cul +>.$ (emit ~[%mor bel/~ det/u.cul])) + :: + %ret + =+ dur=(rust (tufa buf.p.rom) come) + ?~ dur (emit %bel ~) + =^ dud q.rom (~(mov go q.rom) u.dur) + ?. dud (emit %bel ~) + =+ rus=~(res go q.rom) + =< show + ?~ rus wipe + wipe:(emit(q.rom *game) %txt u.rus) + == + -- +++ peer-sole :: console-subscribe + |= [from pax=path] + ^- (quip move +>) + ?> =(src our.hid) + abet:~(show yo [ost ~] *room) +:: +++ poke-sole-action :: console command + |= [from act=sole-action] + ^- (quip move +>) + ?> =(src our.hid) + abet:(~(work yo [ost ~] (~(got by hoc) ost)) act) +:: +++ pull :: stop subscription + |= then + [~ +>(hoc (~(del by hoc) ost))] +-- diff --git a/base/ape/dojo/core.hook b/base/ape/dojo/core.hook new file mode 100644 index 000000000..685173943 --- /dev/null +++ b/base/ape/dojo/core.hook @@ -0,0 +1,744 @@ +:: :: :: +:::: /hook/core/dojo/app :: :::: + :: :: :: +/? 314 :: arvo kelvin +/- *sole :: console structures +/+ sole :: console library +:: :: :: +:::: :: :::: + !: :: :: +=> |% :: external structures + ++ house :: all state + $: hoc=(map bone session) :: conversations + == :: + ++ session :: per conversation + $: say=sole-share :: command-line state + syd=desk :: active desk + luc=(unit case) :: special case + poy=(unit dojo-project) :: working + var=(map term cage) :: variable state + old=(set term) :: used TLVs + == :: + ++ dojo-command :: + $% [%flat p=path q=dojo-source] :: noun to unix atom + [%pill p=path q=dojo-source] :: noun to unix pill + :: [%tree p=path q=dojo-source] :: noun to unix tree + [%poke p=goal q=dojo-source] :: make and poke + [%show p=dojo-source] :: print + [%verb p=term q=dojo-source] :: store variable + == :: + ++ dojo-source :: construction node + $: p=@ud :: assembly index + q=dojo-build :: general build + == :: + ++ dojo-build :: one ford step + $% [%ex p=twig] :: hoon expression + [%di p=dojo-model] :: dialog + [%dv p=path] :: gate from source + [%fi p=dojo-filter q=dojo-source] :: filter + [%ge p=dojo-model] :: generator + [%sc p=dojo-model] :: script + [%tu p=(list dojo-source)] :: tuple + [%va p=term] :: dojo variable + == :: + ++ dojo-filter :: pipeline filter + $% [%a p=twig] :: function gate + [%b p=mark] :: simple transmute + [%c p=dojo-model] :: formal filter + == :: + ++ dojo-model :: data construction + $: p=dojo-server :: core source + q=dojo-config :: configuration + == :: + ++ dojo-server :: numbered device + $: p=@ud :: assembly index + q=path :: gate path + == :: + ++ dojo-config :: configuration + $: p=(list dojo-source) :: by order + q=(map term (unit dojo-source)) :: by keyword + == :: + ++ dojo-project :: construction state + $: mad=dojo-command :: operation + num=@ud :: number of tasks + cud=(unit dojo-source) :: now solving + pux=(unit path) :: ford working + pro=(unit vase) :: prompting loop + per=(unit sole-edit) :: pending reverse + job=(map ,@ud dojo-build) :: problems + rez=(map ,@ud cage) :: results + == :: + ++ bead ,[p=(set beam) q=cage] :: computed result + ++ goal ,[p=ship q=term] :: flat application + ++ note :: general note + $% [%exec @p (unit silk)] :: + [%deal sock term club] :: + == :: + ++ clap :: action, user + $% [%peer p=path] :: subscribe + [%poke p=term q=*] :: apply + [%pull ~] :: unsubscribe + == :: + ++ club :: action, system + $% [%peer p=path] :: subscribe + [%poke p=cage] :: apply + [%pull ~] :: unsubscribe + == :: + ++ card :: general card + $% [%diff %sole-effect sole-effect] :: + [%send wire [ship term] clap] :: + [%exec wire @p (unit silk)] :: + [%deal wire sock term club] :: + == :: + ++ move (pair bone card) :: user-level move + ++ hapt ,[p=ship q=path] :: + ++ cuft :: internal gift + $% [%coup p=(unit tang)] :: poke result + [%diff p=cage] :: subscription output + [%quit ~] :: close subscription + [%reap p=(unit tang)] :: peer result + == :: + ++ hood :: assembly plan + $: zus=@ud :: zuse kelvin + sur=(list hoot) :: structures + lib=(list hoof) :: libraries + fan=(list horn) :: resources + src=(list hoop) :: program + == :: + ++ hoof (pair term (unit (pair case ship))) :: resource reference + ++ hoot (pair bean hoof) :: structure gate/core + ++ hoop :: source in hood + $% [%& p=twig] :: direct twig + [%| p=beam] :: resource location + == :: + ++ horn :: resource tree + $% [%ape p=twig] :: /~ twig by hand + [%arg p=twig] :: /$ argument + [%day p=horn] :: /| list by @dr + [%dub p=term q=horn] :: /= apply face + [%fan p=(list horn)] :: /. list + [%for p=path q=horn] :: /, descend + [%hel p=@ud q=horn] :: /% propagate heel + [%hub p=horn] :: /@ list by @ud + [%man p=(map span horn)] :: /* hetero map + [%nap p=horn] :: /_ homo map + [%now p=horn] :: /& list by @da + [%saw p=twig q=horn] :: /; operate on + [%see p=beam q=horn] :: /: relative to + [%sic p=tile q=horn] :: /^ cast + [%toy p=mark] :: /mark/ static + == :: + ++ 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 + [%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 + [%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] + == :: + ++ sign :: + $% [%made p=@uvH q=(each cage tang)] :: + [%unto p=cuft] :: + == :: + -- :: +:: :: +:::: :: + :: :: +|_ $: hid=hide :: system state + house :: program state + == :: +++ he :: per session + |_ [[ost=bone moz=(list move)] session] :: + ++ dp :: dojo parser + |% + ++ dp-command :: ++dojo-command + %+ knee *dojo-command |. ~+ + ;~ pose + %+ stag %poke + ;~ pfix col + %+ cook + |= [a=goal b=(each dojo-source (trel term path dojo-config))] + ^- (pair goal dojo-source) + :- a + ?- -.b + %& p.b + %| ?+ p.p.b !! + %di [0 %di [0 [%dog q.a q.p.b]] r.p.b] + %ge [0 %ge [0 [%cat q.a q.p.b]] r.p.b] + %sc [0 %sc [0 [%pig q.a q.p.b]] r.p.b] + == + == + ;~ plug + dp-goal + ;~ pose + (stag %& ;~(pfix ace dp-source)) + %+ stag %| + ;~ plug + ;~ pose + (cold %di wut) + (cold %ge lus) + (cold %sc pam) + == + (most fas sym) + dp-config + == + == + == + == + :: + %+ stag %verb + ;~ pfix tis + ;~(plug sym ;~(pfix ace dp-source)) + == + :: + %+ stag %flat + ;~ pfix pat + ;~(plug (most fas sym) ;~(pfix ace dp-source)) + == + :: + %+ stag %pill + ;~ pfix dot + ;~(plug (most fas sym) ;~(pfix ace dp-source)) + == + :: + (stag %show dp-source) + == + ++ dp-source (stag 0 dp-build) :: ++dojo-source + ++ dp-build :: ++dojo-build + %+ knee *dojo-build |. ~+ + ;~ pose + ;~(pfix lus (stag %ge dp-model-cat)) + ;~(pfix wut (stag %di dp-model-dog)) + ;~(pfix pam (stag %sc dp-model-pig)) + ;~(pfix buc (stag %va sym)) + (stag %ex dp-twig) + (ifix [sel ser] (stag %tu (most ace dp-source))) + == + :: + ++ dp-goal :: ++goal + %+ cook |=(a=goal a) + ;~ pose + ;~ plug + ;~(pfix sig fed:ag) + ;~(pfix fas sym) + == + (cook |=(a=term `goal`[our.hid a]) sym) + (easy [our.hid %helm]) + == + ++ dp-model-cat ;~(plug dp-server-cat dp-config) :: ++dojo-model + ++ dp-model-dog ;~(plug dp-server-dog dp-config) :: ++dojo-model + ++ dp-model-pig ;~(plug dp-server-pig dp-config) :: ++dojo-model + ++ dp-server-cat (stag 0 (stag %cat dp-device)) :: ++dojo-server + ++ dp-server-dog (stag 0 (stag %dog dp-device)) :: ++dojo-server + ++ dp-server-pig (stag 0 (stag %pig dp-device)) :: ++dojo-server + ++ dp-twig wide:(vang & ~) :: ++twig + ++ dp-device (most fas sym) :: ++dojo-device + ++ dp-value :: ++dojo-source + %+ cook |=(a=dojo-source a) + %+ stag 0 + ;~ pose + (ifix [kel ker] (stag %tu (most ace dp-source))) + (stag %va ;~(pfix buc sym)) + (stag %ex dp-twig) + == + :: + ++ dp-config :: ++dojo-config + %+ cook |=(a=dojo-config a) + ;~ plug + (star ;~(pfix ace dp-value)) + %+ cook + ~(gas by *(map term (unit dojo-source))) + %+ more + ;~(plug com ace) + ;~ plug + ;~(pfix tis sym) + ;~ pose + ;~(pfix ace (stag ~ dp-value)) + (easy ~) + == + == + == + -- + :: + ++ dy :: project work + |_ dojo-project :: + ++ dy-abet +>(poy `+<) :: resolve + ++ dy-amok +>(poy ~) :: terminate + ++ dy-ford :: send work to ford + |= [way=wire kas=silk] + ^+ +>+> + ?> ?=(~ pux) + (he-card(poy `+>+<(pux `way)) %exec way our.hid `kas) + :: + ++ dy-stop :: stop work + ^+ +> + ?~ pux +> + (he-card(poy ~) %exec u.pux our.hid ~) + :: + ++ dy-slam :: call by ford + |= [way=wire gat=vase sam=vase] + ^+ +>+> + (dy-ford way %call [%done ~ %noun gat] [%done ~ %noun sam]) + :: + ++ dy-diff :: send effects, abet + |= fec=sole-effect + ^+ +>+> + (he-diff(poy `+>+<) fec) + :: + ++ dy-rash :: send effects, amok + |= fec=sole-effect + ^+ +>+> + (he-diff(poy ~) fec) + :: + ++ dy-init-command :: ++dojo-command + |= mad=dojo-command + ^+ [mad +>] + ?- -.mad + %flat =^(src +>.$ (dy-init-source q.mad) [[%flat p.mad src] +>.$]) + %pill =^(src +>.$ (dy-init-source q.mad) [[%pill p.mad src] +>.$]) + %poke =^(src +>.$ (dy-init-source q.mad) [[%poke p.mad src] +>.$]) + %show =^(src +>.$ (dy-init-source p.mad) [[%show src] +>.$]) + %verb =^(src +>.$ (dy-init-source q.mad) [[%verb p.mad src] +>.$]) + == + :: + ++ dy-init-source-unit :: (unit dojo-source) + |= urc=(unit dojo-source) + ^+ [urc +>] + ?~ urc [~ +>] + =^ src +> (dy-init-source u.urc) + [`src +>.$] + :: + ++ dy-init-source :: ++dojo-source + |= src=dojo-source + ^+ [src +>] + =^ bul +> (dy-init-build q.src) + =: p.src num + q.src bul + == + [src +>.$(num +(num), job (~(put by job) num q.src))] + :: + ++ dy-init-build :: ++dojo-build + |= bul=dojo-build + ^+ [bul +>] + ?- -.bul + %ex [bul +>.$] + %di =^(mod +>.$ (dy-init-model p.bul) [[%di mod] +>.$]) + %dv [bul +>.$] + %fi !! + %ge =^(mod +>.$ (dy-init-model p.bul) [[%ge mod] +>.$]) + %sc !! + %tu =^ dof +>.$ + |- ^+ [p.bul +>.^$] + ?~ p.bul [~ +>.^$] + =^ dis +>.^$ (dy-init-source i.p.bul) + =^ mor +>.^$ $(p.bul t.p.bul) + [[dis mor] +>.^$] + [[%tu dof] +>.$] + %va [bul +>.$] + == + :: + ++ dy-init-model :: ++dojo-model + |= mol=dojo-model + ^+ [mol +>] + =^ one +>.$ (dy-init-server p.mol) + =^ two +>.$ (dy-init-config q.mol) + [[one two] +>.$] + :: + ++ dy-init-server :: ++dojo-server + |= srv=dojo-server + =. p.srv num + [srv +>.$(num +(num), job (~(put by job) num [%dv q.srv]))] + :: + ++ dy-init-config :: prepare config + |= cig=dojo-config + ^+ [cig +>] + =^ ord +>.$ (dy-init-ordered p.cig) + =^ key +>.$ (dy-init-named q.cig) + [[ord key] +>.$] + :: + ++ dy-init-ordered :: (list dojo-source) + |= ord=(list dojo-source) + ^+ [ord +>] + ?~ ord [~ +>.$] + =^ fir +>.$ (dy-init-source i.ord) + =^ mor +>.$ $(ord t.ord) + [[fir mor] +>.$] + :: + ++ dy-init-named :: (map @tas dojo-src) + |= key=(map term (unit dojo-source)) + ^+ [key +>.$] + ?~ key [~ +>.$] + =^ top +>.$ (dy-init-source-unit q.n.key) + =^ lef +>.$ $(key l.key) + =^ rit +>.$ $(key r.key) + [[[p.n.key top] lef rit] +>.$] + :: + ++ dy-init :: full initialize + ^+ . + =^(dam . (dy-init-command mad) +(mad dam)) + :: + ++ dy-hand :: complete step + |= cag=cage + ^+ +>+> + ?> ?=(^ cud) + (dy-step(cud ~, rez (~(put by rez) p.u.cud cag)) +(p.u.cud)) + :: + ++ dy-meal :: vase to cage + |= vax=vase + ?. &(?=(@ -.q.vax) ((sane %tas) -.q.vax)) + ~& %dy-meal-cage + (dy-rash %bel ~) + (dy-hand -.q.vax (slot 3 vax)) + :: + ++ dy-made-edit :: sole edit + |= cag=cage + ^+ +>+> + ?> ?=(^ per) + ?: ?| ?=(^ q.q.cag) + =((lent buf.say) q.q.cag) + !&(?=(%del -.u.per) =(+(p.u.per) (lent buf.say))) + == + dy-abet(per ~) + =^ lic say (~(transmit cs say) u.per) + (dy-diff(per ~) %mor [%det lic] [%err q.q.cag] ~) + :: + ++ dy-done :: dialog submit + |= txt=tape + ?> ?=(^ pro) + (dy-slam /dial u.pro !>(txt)) + :: + ++ dy-over :: finish construction + ^+ +> + ?- -.mad + %poke + %- he-card(poy ~) + :* %deal + /poke + [our.hid p.p.mad] + q.p.mad + %poke + (~(got by rez) p.q.mad) + == + :: + %flat + =+ out=q.q:(~(got by rez) p.q.mad) + ?^ out + (dy-rash %tan [%leaf "not an atom"]~) + (dy-rash %sav p.mad out) + :: + %pill + (dy-rash %sag p.mad q.q:(~(got by rez) p.q.mad)) + :: + %verb + dy-amok(var (~(put by var) p.mad (~(got by rez) p.q.mad))) + :: + %show + (dy-rash %tan (sell q:(~(got by rez) p.p.mad)) ~) + == + :: + ++ dy-edit :: handle edit + |= cal=sole-change + ^+ +>+> + =^ dat say (~(transceive cs say) cal) + ?: |(?=(^ per) ?=(^ pux) ?=(~ pro)) + ~& %dy-edit-busy + =^ lic say (~(transmit cs say) dat) + (dy-diff %mor [%det lic] [%bel ~] ~) + (dy-slam(per `dat) /edit u.pro !>((tufa buf.say))) + :: + ++ dy-type :: sole action + |= act=sole-action + ?- -.act + %det (dy-edit +.act) + %ret (dy-done (tufa buf.say)) + == + :: + ++ dy-cage |=(num=@ud (~(got by rez) num)) :: known cage + ++ dy-vase |=(num=@ud q:(dy-cage num)) :: known vase + ++ dy-silk-vase |=(vax=vase [%done ~ %noun vax]) :: vase to silk + ++ dy-silk-config :: configure + |= [cag=cage cig=dojo-config] + ^- silk + :+ %ride [%cnzy %$] + :+ %mute [%done ~ cag] + ^- (list (pair wing silk)) + :* :- [[~ 12] ~] + (dy-silk-vase !>([now=lat.hid eny=eny.hid bec=he-beak])) + :: + :- [[~ 26] ~] + %- dy-silk-vase + |- ^- vase + ?~ p.cig !>(~) + (slop (dy-vase p.i.p.cig) $(p.cig t.p.cig)) + :: + %+ turn (~(tap by q.cig)) + |= [a=term b=(unit dojo-source)] + ^- (pair wing silk) + :- [a [~ 27] ~] + %- dy-silk-vase + ?~(b !>([~ ~]) (dy-vase p.u.b)) + == + :: + ++ dy-silk-init-modo :: init and config + |= [cag=cage cig=dojo-config] + ^- silk + (dy-silk-config cag cig) + :: + ++ dy-silk-device :: device to silk + |= way=wire + ^- silk + [%boil %gate [he-beak (flop way)] ~] + :: + ++ dy-made-dial :: dialog product + |= cag=cage + ^+ +>+> + ?. ?=(^ q.q.cag) + (dy-diff %err q.q.cag) + =+ tan=((list tank) +2.q.q.cag) + =. +>+>.$ (he-diff %tan tan) + =+ vax=(spec (slot 3 q.cag)) + ?+ -.q.vax !! + %& + ?~ +.q.vax + ~& %dy-made-dial-abort + (dy-rash %bel ~) + (dy-meal (slot 7 vax)) + :: + %| + =< he-pone + %- dy-diff(pro `(slap (slot 7 vax) [%cnzy %q])) + =+ pom=(sole-prompt +<.q.vax) + [%pro pom(cad [':' ' ' cad.pom])] + == + :: + ++ dy-made-gent :: generator product + |= cag=cage + (dy-meal q.cag) + :: + ++ dy-make :: build step + ^+ +> + ?> ?=(^ cud) + %- dy-ford + ^- (pair path silk) + ?+ -.q.u.cud !! + %di [/dial (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)] + %ge [/gent (dy-silk-init-modo (dy-cage p.p.p.q.u.cud) q.p.q.u.cud)] + %dv [/hand (dy-silk-device p.q.u.cud)] + %ex [/hand [%ride p.q.u.cud [%reef ~]]] + %tu :- /hand + :+ %done ~ + :- %noun + |- ^- vase + ?~ p.q.u.cud !! + =+ hed=(dy-vase p.i.p.q.u.cud) + ?~ t.p.q.u.cud hed + (slop hed $(p.q.u.cud t.p.q.u.cud)) + == + :: + ++ dy-step :: advance project + |= nex=@ud + ^+ +>+> + ?> ?=(~ cud) + ?: =(nex num) + dy-over + dy-make(cud `[nex (~(got by job) nex)]) + -- + :: + ++ he-dope :: sole user of ++dp + |= txt=tape :: + ^- (each (unit dojo-command) hair) :: prefix/result + =+ vex=(dp-command:dp [1 1] txt) :: + ?. =(+((lent txt)) q.p.vex) :: fully parsed + [%| p.p.vex (dec q.p.vex)] :: syntax error + [%& ?~(q.vex ~ `p.u.q.vex)] :: prefix/complete + :: + ++ he-duke :: ++he-dope variant + |= txt=tape + ^- (each dojo-command ,@ud) + =+ foy=(he-dope txt) + ?- -.foy + %| [%| q.p.foy] + %& ?~(p.foy [%| (lent txt)] [%& u.p.foy]) + == + :: + ++ he-abet :: resolve + [(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] + :: + ++ he-beak :: logical beam + ^- beak + [our.hid syd ?^(luc u.luc [%da lat.hid])] + :: + ++ he-card :: emit gift + |= cad=card + ^+ +> + %_(+> moz [[ost cad] moz]) + :: + ++ he-send + |= [way=wire him=ship dap=term cop=clap] + ^+ +> + (he-card %send way [him dap] cop) + :: + ++ he-diff :: emit update + |= fec=sole-effect + ^+ +> + (he-card %diff %sole-effect fec) + :: + ++ he-stop :: abort work + ^+ . + ?~(poy . ~(dy-stop dy u.poy)) + :: + ++ he-peer :: subscribe to + he-prom + :: + ++ he-pine :: restore prompt + ^+ . + ?^ poy . + he-prom:he-pone + :: + ++ he-pone :: clear prompt + ^+ . + =^ cal say (~(transmit cs say) [%set ~]) + (he-diff %mor [%det cal] ~) + :: + ++ he-prom :: send prompt + %- he-diff + :- %pro + [& %$ "> "] + :: + ++ he-made :: result from ford + |= [way=wire dep=@uvH rey=(each cage tang)] + ^+ +> + ?> ?=(^ poy) + =< he-pine + ?- -.rey + %& %. p.rey + =+ dye=~(. dy u.poy(pux ~)) + ?+ way !! + [%hand ~] dy-hand:dye + [%dial ~] dy-made-dial:dye + [%gent ~] dy-made-gent:dye + [%edit ~] dy-made-edit:dye + == + %| ~& [%he-made-fail way] + (he-diff(poy ~) %tan p.rey) + == + :: + ++ he-unto :: result from behn + |= cit=cuft + ^+ +> + ?> ?=(%coup -.cit) + ?~ p.cit + (he-diff %txt ">=") + (he-diff %tan u.p.cit) + :: + ++ he-like :: accept line + |= buf=(list ,@c) + =(%& -:(he-dope (tufa buf))) + :: + ++ he-stir :: apply change + |= cal=sole-change + ^+ +> + :: ~& [%his-clock ler.cal] + :: ~& [%our-clock ven.say] + =^ dat say (~(transceive cs say) cal) + ?. ?& ?=(%del -.dat) + =(+(p.dat) (lent buf.say)) + == + +>.$ + =+ foy=(he-dope (tufa buf.say)) + ?: ?=(%& -.foy) +>.$ + :: ~& [%bad-change dat ted.cal] + =^ lic say (~(transmit cs say) dat) + :: ~& [%our-leg leg.say] + (he-diff %mor [%det lic] [%err q.p.foy] ~) + :: + ++ he-plan :: execute command + |= mad=dojo-command + ^+ +> + ?> ?=(~ poy) + he-pine:(dy-step:~(dy-init dy mad [0 ~ ~ ~ ~ ~ ~]) 0) + :: + ++ he-done :: parse command + |= txt=tape + ^+ +> + ?~ txt + %- he-diff + :~ %mor + [%txt "> "] + [%nex ~] + == + =+ doy=(he-duke txt) + ?- -.doy + %| (he-diff [%err p.doy]) + %& + =+ old=(weld "> " (tufa buf.say)) + =^ cal say (~(transmit cs say) [%set ~]) + %. p.doy + =< he-plan + %- he-diff + :~ %mor + [%txt old] + [%nex ~] + [%det cal] + == + == + :: + ++ he-type :: apply input + |= act=sole-action + ^+ +> + ?^ poy + he-pine:(~(dy-type dy u.poy) act) + ?- -.act + %det (he-stir +.act) + %ret (he-done (tufa buf.say)) + == + -- +:: +++ peer + |= [from pax=path] + ^- (quip move +>) + ~? !=(src our.hid) [%dojo-peer-stranger ost src pax] + :: ?> =(src our.hid) + ?< (~(has by hoc) ost) + ?> =(/sole pax) + =< he-abet + %~ he-peer he + :- [ost ~] + ^- session + :* *sole-share :: say=sole-share + %main :: syd=desk + ~ :: luc=(unit case) + ~ :: poy=(unit dojo-project) + ~ :: var=(map term cage) + ~ :: old=(set term) + == +:: +++ poke-sole-action + |= [from act=sole-action] + ^- (quip move +>) + :: ~& [%dojo-poke ost src act] + :: ~? !=(src our.hid) [%dojo-poke ost src] + he-abet:(~(he-type he [ost ~] (~(got by hoc) ost)) act) +:: +++ made + |= [then dep=@uvH rey=(each cage tang)] + he-abet:(~(he-made he [[ost ~] (~(got by hoc) ost)]) way dep rey) +:: +++ unto + |= [then cit=cuft] + he-abet:(~(he-unto he [[ost ~] (~(got by hoc) ost)]) cit) +:: +++ pull + |= [from pax=path] + ^- (quip move +>) + =^ moz +> + he-abet:~(he-stop he [[ost ~] (~(got by hoc) ost)]) + [moz +>.$(hoc (~(del by hoc) ost))] +-- diff --git a/base/ape/helm/core.hook b/base/ape/helm/core.hook new file mode 100644 index 000000000..e75c15d01 --- /dev/null +++ b/base/ape/helm/core.hook @@ -0,0 +1,183 @@ +:: :: :: +:::: /hook/core/helm/ape :: :: + :: :: :: +/? 314 :: zuse version +/- *sole :: structures +/+ sole :: libraries +:: :: :: +:::: :: :: + !: :: :: +=> |% :: principal structures + ++ helm-house :: all state + $: %0 :: state version + bur=(unit (pair ship mace)) :: requesting ticket + hoc=(map bone helm-session) :: consoles + == :: + ++ helm-session :: + $: say=sole-share :: + mud=(unit (sole-dialog ,@ud)) :: + == :: + ++ funk (pair ,@ ,@) :: + ++ begs ,[his=@p tic=@p eny=@t ges=gens] :: begin data + ++ suss ,[term @tas @da] :: config report + ++ helm-wish :: + $| $? %reset :: reset kernel + %verb :: verbose mode + == :: + $% [%reload p=(list term)] :: reload vanes + == :: + ++ dill :: sent to %dill + $% [%crud p=term q=(list tank)] :: fat report + [%text p=tape] :: thin report + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: + ++ card :: + $% [%cash wire p=@p q=buck] :: + [%conf wire dock %load ship term] :: + [%flog wire dill] :: + [%plug wire @p @tas @p @tas] :: + [%want wire sock path *] :: send message + == :: + ++ move (pair bone card) :: user-level move + -- :: +:: :: +:::: :: + :: :: +|_ $: hid=hide :: system state + helm-house :: program state + == :: +++ he :: per session + |_ [[ost=bone moz=(list move)] helm-session] :: + ++ he-abet :: resolve + [(flop moz) %_(+> hoc (~(put by hoc) ost +<+))] :: + :: :: + ++ he-wish-start + |= dap=term + %_(+> moz :_(moz [ost %conf /start [our.hid dap] %load our.hid %main])) + :: + ++ he-wish-reset + ^+ . + =- %_(+ moz (weld zum moz)) + ^= zum %- flop ^- (list move) + =+ top=`path`/(scot %p our.hid)/arvo/(scot %da lat.hid) + :- [ost %flog /reset %vega (weld top `path`/hoon)] + %+ turn + ^- (list ,[p=@tas q=@tas]) + :~ [%$ %zuse] + [%a %ames] + [%c %clay] + [%d %dill] + [%e %eyre] + [%f %ford] + [%g %gall] + [%t %time] + == + |= [p=@tas q=@tas] + =+ way=`path`(welp top /[q]) + =+ txt=((hard ,@) .^(%cx (welp way /hoon))) + [ost %flog /reset %veer p way txt] + :: + ++ he-wish-reload + |= all=(list term) + %_ +>.$ + moz + %- weld + :_ moz + %+ turn all + =+ ark=(arch .^(%cy /(scot %p our.hid)/arvo/(scot %da lat.hid))) + =+ van=(~(tap by r.ark)) + |= nam=@tas + =. nam + ?. =(1 (met 3 nam)) + nam + =+ ^- zaz=(list ,[p=span ~]) + (skim van |=([a=term ~] =(nam (end 3 1 a)))) + ?> ?=([[@ ~] ~] zaz) + `term`p.i.zaz + =+ tip=(end 3 1 nam) + =+ way=[(scot %p our.hid) %arvo (scot %da lat.hid) nam %hoon ~] + =+ fil=(,@ .^(%cx way)) + :* ost + %flog + /reload + [%veer ?:(=('z' tip) %$ tip) way (,@ .^(%cx way))] + == + == + :: + ++ he-wish-verb + %_ . + moz + :_ moz + [ost %flog /verb %verb ~] + == + ++ he-wish-init + |= him=ship + %_ +>.$ + moz + :_ moz + [ost %flog /init %crud %hax-init leaf/(scow %p him) ~] + == + -- +:: +++ hake :: poke core + |= [ost=bone src=ship] + ?> =(src our.hid) + ~(. he [ost ~] (fall (~(get by hoc) ost) *helm-session)) +:: +++ poke-helm-reset + |= [from ~] + ~& %poke-helm-reset + he-abet:he-wish-reset:(hake ost src) +:: +++ poke-helm-verb + |= [from ~] + ~& %poke-helm-verb + he-abet:he-wish-verb:(hake ost src) +:: +++ poke-helm-init + |= [from him=ship] + ~& %poke-helm-init + he-abet:(he-wish-init:(hake ost src) him) +:: +++ poke-helm-reload + |= [from all=(list term)] + he-abet:(he-wish-reload:(hake ost src) all) +:: +++ poke-helm-start + |= [from dap=term] + he-abet:(he-wish-start:(hake ost src) dap) +:: +++ poke-helm-begin + |= [from begs] + ~& %behn-helm-begin + ?> ?=(~ bur) + =+ buz=(shax :(mix (jam ges) eny)) + =+ loy=(bruw 2.048 buz) + :_ +>.$(bur `[his [0 sec:ex:loy]~]) + :~ :* ost %want /ticketing [our.hid (sein his)] /q/ta + his tic ges pub:ex:loy + == + == +:: +++ poke-will + |= [from wil=(unit will)] + ?> ?=(^ bur) + :_ +>.$(bur ~) + ?~ wil + !! + :~ [ost %cash ~ p.u.bur q.u.bur u.wil] + [ost %plug ~ our.hid %main (sein our.hid) %main] + [ost %plug ~ our.hid %arvo (sein our.hid) %arvo] + [ost %plug ~ our.hid %try (sein our.hid) %try] + == +:: +++ onto + |= [then saw=(each suss tang)] + :_ +> :_ ~ + ?- -.saw + %| [ost %pass ~ %flog %crud `@tas`-.way `tang`p.saw] + %& [ost %pass ~ %flog %text "<{}>"] + == +-- diff --git a/base/ape/sole/core.hook b/base/ape/sole/core.hook new file mode 100644 index 000000000..16245cc26 --- /dev/null +++ b/base/ape/sole/core.hook @@ -0,0 +1,679 @@ +:: :: :: +:::: /hook/core/sole/app :: :: + :: :: :: +/? 314 :: zuse version +/- *sole :: console structures +/+ sole :: console library +:: :: :: +:::: :: :: + !: :: :: +=> |% :: data structures + ++ house :: all state + $: bin=(map bone source) :: input devices + == :: + ++ source :: input device + $: edg=_79 :: terminal columns + off=@ud :: window offset + kil=(unit (list ,@c)) :: kill buffer + apt=(list gill) :: application ring + maz=master :: master window + feg=(map gill target) :: live applications + mir=(pair ,@ud (list ,@c)) :: mirrored terminal + == :: + ++ master :: master buffer + $: liv=? :: master is live + tar=target :: master target + == :: + ++ history :: past input + $: pos=@ud :: input position + num=@ud :: number of entries + lay=(map ,@ud (list ,@c)) :: editing overlay + old=(list (list ,@c)) :: entries proper + == :: + ++ search :: reverse-i-search + $: pos=@ud :: search position + str=(list ,@c) :: search string + == :: + ++ target :: application target + $: ris=(unit search) :: reverse-i-search + hit=history :: all past input + pom=sole-prompt :: static prompt + inp=sole-command :: input state + == :: + ++ ukase :: master command + $% [%add p=(list gill)] :: add agents + [%del p=(list gill)] :: delete agents + == :: + ++ suss ,[term @tas @da] :: config report + ++ dill :: *forward* to %dill + $% [%crud p=term q=(list tank)] :: fat report + [%text p=tape] :: thin report + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: + ++ pear :: request + $% [%sole-action p=sole-action] :: + == :: + ++ lime :: update + $% [%dill-blit dill-blit] :: + == :: + ++ card :: general card + $% [%conf wire dock %load ship term] :: + [%diff lime] :: + [%flog wire dill] :: + [%peer wire dock path] :: + [%poke wire dock pear] :: + [%pull wire dock ~] :: + [%pass wire note] :: + == :: + ++ move (pair bone card) :: user-level move + -- :: +|_ $: hid=hide :: system state + house :: program state + == :: +++ sp + |% ++ sp-ukase + %+ knee *ukase |. ~+ + ;~ pose + (stag %add ;~(pfix lus sp-gills)) + (stag %del ;~(pfix hep sp-gills)) + == + :: + ++ sp-gills + ;~ pose + (most ;~(plug com ace) sp-gill) + %+ cook + |= a=ship + [[a %dojo] [a %talk] ~] + ;~(pfix sig fed:ag) + == + :: + ++ sp-gill + ;~ pose + (stag our.hid sym) + ;~ plug + ;~(pfix sig fed:ag) + ;~(pfix fas sym) + == + == + -- +++ se :: per source + |_ $: [moz=(list move) biz=(list dill-blit)] + [src=ship ost=bone] + source + == + ++ se-abet :: resolve + :_ %_(+> bin (~(put by bin) ost +<+>)) + %+ welp (flop moz) + ^- (list move) + ?~ biz ~ + [ost %diff %dill-blit ?~(t.biz i.biz [%mor (flop biz)])]~ + :: + ++ se-belt :: handle input + |= bet=dill-belt + ^+ +> + ?: ?=(%rez -.bet) + +>(edg (dec p.bet)) + ?: ?=(%yow -.bet) + (se-link p.bet) + =+ gyl=?^(apt i.apt [~zod %$]) + =+ taz=~(. ta [& liv.maz gyl] ?:(liv.maz tar.maz (~(got by feg) gyl))) + =< ta-abet + ?- -.bet + %aro (ta-aro:taz p.bet) + %bac ta-bac:taz + %cru (ta-cru:taz p.bet q.bet) + %ctl (ta-ctl:taz p.bet) + %del ta-del:taz + %met (ta-met:taz p.bet) + %ret ta-ret:taz + %txt (ta-txt:taz p.bet) + == + :: + ++ se-drop :: passive drop + |= gyl=gill + ^+ +> + =< se-prom + ?> (~(has by feg) gyl) + %_ +> + feg (~(del by feg) gyl) + apt (skip apt |=(a=gill =(gyl a))) + liv.maz ?~(apt & liv.maz) + == + :: + ++ se-join :: add connection + |= gyl=gill + ^+ +> + =< se-prom + ?: (~(has by feg) gyl) + (se-blit %bel ~) + +>(liv.maz |, apt [gyl apt], feg (~(put by feg) gyl *target)) + :: + ++ se-nuke :: active drop + |= gyl=gill + ^+ +> + (se-drop:(se-pull(liv.maz |) gyl) gyl) + :: + ++ se-like :: act in master + |= kus=ukase + ?- -.kus + %add + |- ^+ +>.^$ + ?~ p.kus +>.^$ + $(p.kus t.p.kus, +>.^$ (se-link i.p.kus)) + :: + %del + |- ^+ +>.^$ + ?~ p.kus +>.^$ + $(p.kus t.p.kus, +>.^$ (se-nuke i.p.kus)) + == + :: + ++ se-prom :: set master prompt + ^+ . + %_ . + cad.pom.tar.maz + ^- tape + %+ welp + (scow %p our.hid) + =+ ^= mux + |- ^- tape + ?~ apt ~ + =+ ^= mor ^- tape + ?~ t.apt ~ + [',' ' ' $(apt t.apt)] + %+ welp + ^- tape + =+ txt=(trip q.i.apt) + ?: =(our.hid p.i.apt) + txt + :(welp "~" (scow %p p.i.apt) "/" txt) + mor + ?~ mux + "# " + :(welp ":" mux "# ") + == + :: + ++ se-link :: connect to app + |= gyl=gill + ^+ +> + =. +> ?. =(p.gyl src) +> + (se-emit ost %conf (se-path gyl) gyl %load src %main) + (se-join:(se-peer gyl /sole) gyl) + :: + ++ se-blit :: give output + |= bil=dill-blit + +>(biz [bil biz]) + :: + ++ se-show :: show buffer, raw + |= lin=(pair ,@ud (list ,@c)) + ^+ +> + ?: =(mir lin) +> + =. +> ?:(=(q.mir q.lin) +> (se-blit %pro q.lin)) + =. +> ?:(=(p.mir p.lin) +> (se-blit %hop p.lin)) + +>(mir lin) + :: + ++ se-just :: adjusted buffer + |= lin=(pair ,@ud (list ,@c)) + ^+ +> + =. off ?:((lth p.lin edg) 0 (sub p.lin edg)) + (se-show (sub p.lin off) (scag edg (slag off q.lin))) + :: + ++ se-view :: flush buffer + ?: liv.maz + (se-just ~(ta-vew ta [& & ~zod %$] tar.maz)) + ?~ apt + se-view(liv.maz &) + %- se-just + ~(ta-vew ta [& | i.apt] (~(got by feg) i.apt)) + :: + ++ se-kill :: kill a source + =+ tup=apt + |- ^+ +> + ?~ tup +>(apt ~) + $(tup +.tup, +> (se-nuke i.tup)) + :: + ++ se-emit :: emit move + |= mov=move + %_(+> moz [mov moz]) + :: + ++ se-path :: standard path + |= gyl=gill + [(scot %p src) (scot %p p.gyl) q.gyl ~] + :: + ++ se-poke :: send a poke + |= [gyl=gill par=pear] + (se-emit ost %poke (se-path gyl) gyl par) + :: + ++ se-peer + |= [gyl=gill pax=path] + (se-emit ost %peer (se-path gyl) gyl pax) + :: + ++ se-pull + |= gyl=gill + (se-emit ost %pull (se-path gyl) gyl ~) + :: + ++ se-pass :: pass an action + |= [gyl=gill noh=note] + (se-emit ost %pass (se-path gyl) noh) + :: + ++ se-tame + |= gyl=gill + ^+ ta + ~(. ta [& %| gyl] (~(got by feg) gyl)) + :: + ++ se-diff :: receive results + |= [gyl=gill fec=sole-effect] + ^+ +> + ta-abet:(ta-fec:(se-tame gyl) fec) + :: + ++ ta :: per target + |_ $: $: liv=? :: don't delete + mav=? :: showing master + gyl=gill :: target app + == :: + target :: target state + == :: + ++ ta-abet :: resolve + ^+ ..ta + =. liv.maz mav + ?: mav + ?. liv + (se-blit `dill-blit`[%qit ~]) + +>(tar.maz +<+) + ?. liv + =. ..ta (se-nuke gyl) + ..ta(liv.maz =(~ apt)) + %_(+> feg (~(put by feg) gyl +<+)) + :: + ++ ta-ant :: toggle master + ^+ . + ?: mav + ?~ apt ta-bel + %_ . + mav | + +<+ (~(got by feg) gyl) + tar.maz +<+ + == + %_ . + mav & + +<+ tar.maz + feg (~(put by feg) gyl +<+) + == + :: + ++ ta-act :: send action + |= act=sole-action + ^+ +> + ?: mav + +>.$ + +>.$(+> (se-poke gyl %sole-action act)) + :: + ++ ta-aro :: hear arrow + |= key=?(%d %l %r %u) + ^+ +> + ?- key + %d =. ris ~ + ?. =(num.hit pos.hit) + (ta-mov +(pos.hit)) + ?: =(0 (lent buf.say.inp)) + ta-bel + (ta-hom:ta-nex %set ~) + %l ?^ ris ta-bel + ?: =(0 pos.inp) ta-bel + +>(pos.inp (dec pos.inp)) + %r ?^ ris ta-bel + ?: =((lent buf.say.inp) pos.inp) + ta-bel + +>(pos.inp +(pos.inp)) + %u =. ris ~ + ?:(=(0 pos.hit) ta-bel (ta-mov (dec pos.hit))) + == + :: + ++ ta-bel .(+> (se-blit %bel ~)) :: beep + ++ ta-cat :: mass insert + |= [pos=@ud txt=(list ,@c)] + ^- sole-edit + :- %mor + |- ^- (list sole-edit) + ?~ txt ~ + [[%ins pos i.txt] $(pos +(pos), txt t.txt)] + :: + ++ ta-cut :: mass delete + |= [pos=@ud num=@ud] + ^- sole-edit + :- %mor + |-(?:(=(0 num) ~ [[%del pos] $(num (dec num))])) + :: + ++ ta-det :: send edit + |= ted=sole-edit + ^+ +> + (ta-act %det [[his.ven.say.inp own.ven.say.inp] (sham buf.say.inp) ted]) + :: + ++ ta-bac :: hear backspace + ^+ . + ?^ ris + ?: =(~ str.u.ris) + ta-bel + .(str.u.ris (scag (dec (lent str.u.ris)) str.u.ris)) + ?: =(0 pos.inp) + .(+> (se-blit %bel ~)) + =+ pre=(dec pos.inp) + (ta-hom(pos.inp pre) %del pre) + :: + ++ ta-ctl :: hear control + |= key=@ud + ^+ +> + ?+ key ta-bel + %a +>(pos.inp 0) + %b (ta-aro %l) + %c ta-bel(ris ~) + %d ?: &(=(0 pos.inp) =(0 (lent buf.say.inp))) + +>(liv |) + ta-del + %e +>(pos.inp (lent buf.say.inp)) + %f (ta-aro %r) + %g ta-bel(ris ~) + %k =+ len=(lent buf.say.inp) + ?: =(pos.inp len) + ta-bel + %- ta-hom(kil `(slag pos.inp buf.say.inp)) + (ta-cut pos.inp (sub len pos.inp)) + %l +>(+> (se-blit %clr ~)) + %n (ta-aro %d) + %p (ta-aro %u) + %r ?~ ris + +>(ris `[pos.hit ~]) + ?: =(0 pos.u.ris) + ta-bel + (ta-ser ~) + %t =+ len=(lent buf.say.inp) + ?: |(=(0 pos.inp) (lth len 2)) + ta-bel + =+ sop=?:(=(len pos.inp) (dec pos.inp) pos.inp) + =. pos.inp +(sop) + %- ta-hom + :~ %mor + [%del sop] + [%ins (dec sop) (snag sop buf.say.inp)] + == + %u ?: =(0 pos.inp) + ta-bel + %- ta-hom(pos.inp 0, kil `(scag pos.inp buf.say.inp)) + (ta-cut 0 pos.inp) + %v ta-ant + %x ?: =(~ apt) ta-bel + ?: mav ta-bel + +>(apt (welp (slag 1 apt) [(snag 0 apt) ~])) + %y ?~ kil ta-bel + %- ta-hom(pos.inp (add pos.inp (lent u.kil))) + (ta-cat pos.inp u.kil) + == + :: + ++ ta-cru :: hear crud + |= [lab=@tas tac=(list tank)] + =. +>+> (se-blit %out (tuba (trip lab))) + (ta-tan tac) + :: + ++ ta-del :: hear delete + ^+ . + ?: =((lent buf.say.inp) pos.inp) + .(+> (se-blit %bel ~)) + (ta-hom %del pos.inp) + :: + ++ ta-erl :: hear local error + |= pos=@ud + ta-bel(pos.inp (min pos (lent buf.say.inp))) + :: + ++ ta-err :: hear remote error + |= pos=@ud + (ta-erl (~(transpose cs say.inp) pos)) + :: + ++ ta-fec :: apply effect + |= fec=sole-effect + ^+ +> + ?- -.fec + %bel ta-bel + %blk +> + %clr +>(+> (se-blit fec)) + %det (ta-got +.fec) + %err (ta-err +.fec) + %mor |- ^+ +>.^$ + ?~ p.fec +>.^$ + $(p.fec t.p.fec, +>.^$ ^$(fec i.p.fec)) + %nex ta-nex + %pro (ta-pro +.fec) + %tan (ta-tan p.fec) + %sag +>(+> (se-blit fec)) + %sav +>(+> (se-blit fec)) + %txt $(fec [%tan [%leaf p.fec]~]) + == + :: + ++ ta-dog :: change cursor + |= ted=sole-edit + %_ +> + pos.inp + =+ len=(lent buf.say.inp) + %+ min len + |- ^- @ud + ?- -.ted + %del ?:((gth pos.inp p.ted) (dec pos.inp) pos.inp) + %ins ?:((lte pos.inp p.ted) +(pos.inp) pos.inp) + %mor |- ^- @ud + ?~ p.ted pos.inp + $(p.ted t.p.ted, pos.inp ^$(ted i.p.ted)) + %nop pos.inp + %set len + == + == + :: + ++ ta-got :: apply change + |= cal=sole-change + =^ ted say.inp (~(receive cs say.inp) cal) + (ta-dog ted) + :: + ++ ta-hom :: local edit + |= ted=sole-edit + ^+ +> + =. +> (ta-det ted) + =. +> (ta-dog(say.inp (~(commit cs say.inp) ted)) ted) + +> + :: + ++ ta-met :: meta key + |= key=@ud + ~& [%ta-met key] + +> + :: + ++ ta-mov :: move in history + |= sop=@ud + ^+ +> + ?: =(sop pos.hit) +> + %+ %= ta-hom + pos.hit sop + lay.hit %+ ~(put by lay.hit) + pos.hit + buf.say.inp + == + %set + %- (bond |.((snag (sub num.hit +(sop)) old.hit))) + (~(get by lay.hit) sop) + :: + ++ ta-nex :: advance history + %_ . + num.hit +(num.hit) + pos.hit +(num.hit) + ris ~ + lay.hit ~ + old.hit [buf.say.inp old.hit] + == + :: + ++ ta-pro :: set prompt + |= pom=sole-prompt + +>(pom pom(cad :(welp (scow %p p.gyl) ":" (trip q.gyl) cad.pom))) + :: + ++ ta-ret :: hear return + ?. mav + (ta-act %ret ~) + =+ txt=(tufa buf.say.inp) + =+ fey=(rose txt sp-ukase:sp) + ?- -.fey + %| (ta-erl (lent (tuba (scag p.fey txt)))) + %& ?~ p.fey + (ta-erl (lent buf.say.inp)) + =. +>+> (se-like u.p.fey) + =. pom pom.tar.maz + (ta-hom:ta-nex %set ~) + == + :: + ++ ta-ser :: reverse search + |= ext=(list ,@c) + ^+ +> + ?: |(?=(~ ris) =(0 pos.u.ris)) ta-bel + =+ tot=(weld str.u.ris ext) + =+ dol=(slag (sub num.hit pos.u.ris) old.hit) + =+ sop=pos.u.ris + =+ ^= ser + =+ ^= beg + |= [a=(list ,@c) b=(list ,@c)] ^- ? + ?~(a & ?~(b | &(=(i.a i.b) $(a t.a, b t.b)))) + |= [a=(list ,@c) b=(list ,@c)] ^- ? + ?~(a & ?~(b | |((beg a b) $(b t.b)))) + =+ ^= sup + |- ^- (unit ,@ud) + ?~ dol ~ + ?: (ser tot i.dol) + `sop + $(sop (dec sop), dol t.dol) + ?~ sup ta-bel + (ta-mov(str.u.ris tot, pos.u.ris (dec u.sup)) (dec u.sup)) + :: + ++ ta-tan :: print tanks + |= tac=(list tank) + =+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg])))) + |- ^+ +>.^$ + ?~ wol +>.^$ + $(wol t.wol, +>+>.^$ (se-blit %out (tuba i.wol))) + :: + ++ ta-txt :: hear text + |= txt=(list ,@c) + ^+ +> + ?^ ris + (ta-ser txt) + %- ta-hom(pos.inp (add (lent txt) pos.inp)) + :- %mor + |- ^- (list sole-edit) + ?~ txt ~ + [[%ins pos.inp i.txt] $(pos.inp +(pos.inp), txt t.txt)] + :: + ++ ta-vew :: computed prompt + |- ^- (pair ,@ud (list ,@c)) + ?^ ris + %= $ + ris ~ + cad.pom + :(welp "(reverse-i-search)'" (tufa str.u.ris) "': ") + == + =- [(add pos.inp (lent p.vew)) (weld (tuba p.vew) q.vew)] + ^= vew ^- (pair tape (list ,@c)) + ?: vis.pom [cad.pom buf.say.inp] + :- ;: welp + cad.pom + ?~ buf.say.inp ~ + ;: welp + "<" + (scow %p (end 4 1 (sham buf.say.inp))) + "> " + == + == + =+ len=(lent buf.say.inp) + |- ^- (list ,@c) + ?:(=(0 len) ~ [`@c`'*' $(len (dec len))]) + -- + -- +++ peer + |= [from pax=path] + ^- (quip move +>) + :: ~& [%sole-peer ost src pax] + ?< (~(has by bin) ost) + :- [ost %diff %dill-blit %pro [`@c`0x23 `@c`0x20 ~]]~ + %= +> + bin + %+ ~(put by bin) ost + ^- source + :* 80 + 0 + ~ + ~ + :* %& + *(unit search) + *history + `sole-prompt`[%& %sole "{(scow %p our.hid)}# "] + *sole-command + == + ~ + [0 ~] + == + == +:: +++ poke-dill-belt + |= [from bet=dill-belt] + ^- (quip move +>) + :: ~& [%sole-poke ost src bet] + =+ yog=(~(get by bin) ost) + ?~ yog + ~& [%sole-poke-stale ost] + [~ +>.$] + =< se-abet + =< se-view + (~(se-belt se [~ ~] [src ost] u.yog) bet) +:: +++ diff-sole-effect + |= [then fec=sole-effect] + ^- (quip move +>) + :: ~& [%diff-sole-effect way] + =+ yog=(~(get by bin) ost) + ?~ yog + ~& [%sole-diff-stale ost way] + [~ +>.$] + ?> ?=([@ @ @ ~] way) + =< se-abet + =< se-view + =+ gyl=[(slav %p i.t.way) i.t.t.way] + (~(se-diff se [~ ~] [(slav %p i.way) ost] u.yog) gyl fec) +:: +++ coup + |= [then saw=(unit tang)] + ^- (quip move +>) + ?~ saw [~ +>] + :_ +> :_ ~ + [ost %flog ~ %crud %coup u.saw] +:: +++ reap + |= [then saw=(unit tang)] + ^- (quip move +>) + ?~ saw [~ +>] + :_ +> :_ ~ + `move`[ost %flog ~ %crud %reap u.saw] +:: +++ quit + |= then + ^- (quip move +>) + [~ +>] +:: +++ onto + |= [then saw=(each suss tang)] + :_ +> :_ ~ + ?- -.saw + %| [ost %flog ~ %crud `@tas`-.way `tang`p.saw] + %& [ost %flog ~ %text "<{}>"] + == +:: +++ pull + |= from + ^- (quip move +>) + :: ~& [%sole-pull ost] + =^ moz +> + =< se-abet + =< se-view + ~(se-kill se [~ ~] [our.hid ost] (~(got by bin) ost)) + [moz +>.$(bin (~(del by bin) ost))] +-- diff --git a/base/ape/talk/core.hook b/base/ape/talk/core.hook new file mode 100644 index 000000000..7c21752bb --- /dev/null +++ b/base/ape/talk/core.hook @@ -0,0 +1,1733 @@ +:: +:::: /hook/core/talk/app + :: +/? 314 +/- *talk, *sole +/+ talk, sole +:: +:::: + :: +!: +=> |% :: data structures + ++ house ,[%1 house-1] :: full state + ++ house-any :: app history + $% [%1 house-1] :: 1: talk + == :: + ++ house-1 :: + $: stories=(map span story) :: conversations + general=(set bone) :: meta-subscribe + outbox=(pair ,@ud (map ,@ud thought)) :: urbit outbox + folks=(map ship human) :: human identities + shells=(map bone shell) :: interaction state + == :: + :: :: + ++ story :: wire content + $: count=@ud :: (lent grams) + grams=(list telegram) :: all history + locals=(map ship (pair ,@da status)) :: local presence + remotes=(map partner atlas) :: remote presence + mirrors=(map station config) :: remote config + sequence=(map partner ,@ud) :: partners heard + shape=config :: configuration + known=(map serial ,@ud) :: messages heard + guests=(map bone river) :: message followers + viewers=(set bone) :: presence followers + owners=(set bone) :: config followers + == :: + ++ shell :: console session + $: her=ship :: client identity + man=span :: mailbox + count=@ud :: messages shown + say=sole-share :: console state + active=(unit (set partner)) :: active targets + passive=(set partner) :: passive targets + guests=register :: presence mirror + harbor=(map span (pair posture cord)) :: stations mirror + system=cabal :: config mirror + == :: + ++ 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] :: + [%sole-effect sole-effect] :: + == :: + ++ pear :: poke fruit + $% [%talk-command command] :: + == :: + ++ card :: general card + $% [%diff lime] :: + [%info wire @p @tas nori] :: + [%peer wire dock path] :: + [%poke wire dock pear] :: + [%pull wire dock ~] :: + [%pass wire note] :: + [%quit ~] :: + == :: + ++ weir :: parsed wire + $% [%repeat p=@ud q=@p r=span] :: + [%friend p=span q=station] :: + == :: + :: :: + ++ work :: interface action + $% [%number p=? q=@ud] :: activate by number + [%join p=(set partner)] :: + [%say p=speech] :: + [%invite p=span q=(list partner)] :: + [%banish p=span q=(list partner)] :: + [%target p=(set partner)] :: set active targets + :: [%destroy p=span] :: + [%create p=posture q=span r=cord] :: + [%probe p=station] :: + == :: + :: :: + ++ sigh :: assemble label + |= [len=@ud pre=tape yiz=cord] + ^- tape + =+ nez=(trip yiz) + =+ lez=(lent nez) + ?> (gth len (lent pre)) + =. len (sub len (lent pre)) + ?. (gth lez len) + =. nez (welp pre nez) + ?. (lth lez len) nez + (runt [(sub len lez) '-'] nez) + :(welp pre (scag (dec len) nez) "+") + -- +|_ [hid=hide house] +++ ra :: per transaction + |_ [ost=bone moves=(list move)] + ++ sh :: per console + |_ $: coz=(list command) :: talk actions + she=shell + == + ++ sh-scad :: command parser + =+ vag=(vang | [&1:% &2:% '0' |3:%]) + =< work + |% + ++ dare :: @dr + %+ sear + |= a=coin + ?. ?=([%$ %dr @] a) ~ + (some `@dr`+>.a) + nuck:so + :: + ++ ship ;~(pfix sig fed:ag) :: ship + ++ shiz :: ship set + %+ cook + |=(a=(list ^ship) (~(gas in *(set ^ship)) a)) + (most ;~(plug com (star ace)) ship) + :: + ++ pasp :: passport + ;~ pfix pat + ;~ pose + (stag %twitter ;~(pfix ;~(plug (jest 't') col) urs:ab)) + == + == + :: + ++ stan :: station + ;~ pose + (cold [our.hid man.she] tis) + ;~(pfix cen (cook |=(a=term [our.hid a]) sym)) + ;~(pfix fas (cook |=(a=term [(sein our.hid) a]) sym)) + :: + %+ cook + |= [a=@p b=(unit term)] + [a ?^(b u.b (main a))] + ;~ plug + ship + ;~(pose (stag ~ ;~(pfix fas urs:ab)) (easy ~)) + == + == + :: + ++ parn :: partner + ;~ pose + (stag %& stan) + (stag %| pasp) + == + ++ parq :: non-empty partners + %+ cook + |=(a=(list partner) (~(gas in *(set partner)) a)) + (most ;~(plug com (star ace)) parn) + :: + ++ parz :: partner set + %+ cook + |=(a=(list partner) (~(gas in *(set partner)) a)) + (more ;~(plug com (star ace)) parn) + :: + ++ nump :: number reference + ;~ pose + (stag %& dem:ag) + (stag %| ;~(pfix (just '0') dem:ag)) + == + :: + ++ pore :: posture + ;~ pose + (cold %black (jest %channel)) + (cold %white (jest %village)) + (cold %green (jest %journal)) + (cold %brown (jest %mailbox)) + == + :: + ++ work + %+ knee *^work |. ~+ + ;~ pose + %+ stag %create + ;~ pfix (jest %create) + ;~ plug + ;~(pfix ace pore) + ;~(pfix ;~(plug ace cen) sym) + ;~(pfix ace qut) + == + == + :: + %+ stag %join + ;~(pfix (jest %join) ;~(pfix ace parq)) + :: + (stag %number nump) + (stag %target parz) + == + -- + ++ sh-abet + ^+ +> + =+ zoc=(flop coz) + |- ^+ +>+> + ?~ zoc +>+>.$(shells (~(put by shells) ost she)) + $(zoc t.zoc, +>.$ (sh-deal i.zoc)) + :: + ++ sh-deal :: apply from shell + |= cod=command + ^+ +> + ?- -.cod + %design + ?~ q.cod + =. +>+>.$ (ra-config p.cod *config) + +>.$(stories (~(del by stories) p.cod)) + +>(+> (ra-config p.cod u.q.cod)) + :: + %review +>(+> (ra-think | her.she +.cod)) + %publish +>(+> (ra-think & her.she +.cod)) + == + :: + ++ sh-fact :: send console effect + |= fec=sole-effect + ^+ +> + +>(moves :_(moves [ost %diff %sole-effect fec])) + :: + ++ sh-peep :: peer to path + |= pax=path + ^+ +> + +>(+> (~(ra-subscribe ra ost ~) her.she pax)) + :: + ++ sh-peer :: subscribe shell + =< sh-prod + %_ . + +> + %- ra-subscribe:(~(ra-subscribe ra ost ~) her.she ~) + [her.she [%afx man.she ~]] + == + :: + ++ sh-prod :: show prompt + ^+ . + %+ sh-fact %pro + :+ & %talk-line + ^- tape + =+ ^= rew ^- (pair (pair ,@t ,@t) (set partner)) + ?~ active.she + [['(' ')'] passive.she] + [['[' ']'] u.active.she] + =+ por=~(te-prom te man.she q.rew) + (weld `tape`[p.p.rew por] `tape`[q.p.rew ' ' ~]) + :: + ++ sh-pact :: update active aud + |= lix=(set partner) + ^+ +> + =+ act=?~(lix ~ `(sh-pare lix)) + ?: =(active.she act) +>.$ + sh-prod(active.she act) + :: + ++ sh-pare :: adjust target list + |= paz=(set partner) + ?: (sh-pear paz) paz + (~(put in paz) [%& our.hid man.she]) + :: + ++ sh-pear :: hearback + |= paz=(set partner) + ?~ paz | + ?| $(paz l.paz) + $(paz r.paz) + (~(has in sources.shape:(~(got by stories) man.she)) `partner`n.paz) + == + :: + ++ sh-pass :: passive from aud + |= aud=audience + %- sh-poss + %- ~(gas in *(set partner)) + (turn (~(tap by aud)) |=([a=partner *] a)) + :: + :: + ++ sh-poss :: passive update + |= lix=(set partner) + =+ sap=(sh-pare lix) + ?: =(sap passive.she) + +>.$ + sh-prod(passive.she sap) + :: + ++ sh-pest :: report listen + |= tay=partner + ^+ +> + ?. ?=(%& -.tay) +> + =+ sib=(~(get by ham.system.she) `station`p.tay) + ?. |(?=(~ sib) !?=(%white p.cordon.u.sib)) + +>.$ + (sh-poss [tay ~ ~]) + :: + ++ sh-rend :: print on one line + |= gam=telegram + (sh-pass:(sh-fact %txt ~(tr-line tr man.she gam)) q.q.gam) + :: + ++ sh-numb :: print msg number + |= num=@ud + ^+ +> + =+ bun=(scow %ud num) + :: =+ pad=(sub 36 (lent bun)) + :: =+ now=`@da`(dis lat.hid 0xffff.ffff.ffff.ffff.0000.0000.0000.0000) + %+ sh-fact %txt + (runt [(sub 15 (lent bun)) '-'] "[{bun}]") + :: + ++ sh-repo-house-diff + |= [one=shelf two=shelf] + =| $= ret + $: old=(list (pair span (pair posture cord))) + new=(list (pair span (pair posture cord))) + cha=(list (pair span (pair posture cord))) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + =+ unt=(~(get by two) p.i.eno) + ?~ unt + ret(old [i.eno old.ret]) + ?: =(q.i.eno u.unt) ret + ret(cha [[p.i.eno u.unt] cha.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has by one) p.i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-repo-atlas-diff + |= [one=atlas two=atlas] + =| $= ret + $: old=(list (pair ship status)) + new=(list (pair ship status)) + cha=(list (pair ship status)) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + =+ unt=(~(get by two) p.i.eno) + ?~ unt + ret(old [i.eno old.ret]) + ?: =(q.i.eno u.unt) ret + ret(cha [[p.i.eno u.unt] cha.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has by one) p.i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-repo-cabal-diff + |= [one=(map station config) two=(map station config)] + =| $= ret + $: old=(list (pair station config)) + new=(list (pair station config)) + cha=(list (pair station config)) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + =+ unt=(~(get by two) p.i.eno) + ?~ unt + ret(old [i.eno old.ret]) + ?: =(q.i.eno u.unt) ret + ret(cha [[p.i.eno u.unt] cha.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has by one) p.i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-repo-rogue-diff + |= [one=(map partner atlas) two=(map partner atlas)] + =| $= ret + $: old=(list (pair partner atlas)) + new=(list (pair partner atlas)) + cha=(list (pair partner atlas)) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + =+ unt=(~(get by two) p.i.eno) + ?~ unt + ret(old [i.eno old.ret]) + ?: =(q.i.eno u.unt) ret + ret(cha [[p.i.eno u.unt] cha.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has by one) p.i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-repo-whom-diff + |= [one=(set partner) two=(set partner)] + =| $= ret + $: old=(list partner) + new=(list partner) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + ?: (~(has in two) i.eno) + ret + ret(old [i.eno old.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has in one) i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-repo-ship-diff + |= [one=(set ship) two=(set ship)] + =| $= ret + $: old=(list ship) + new=(list ship) + == + ^+ ret + =. ret + =+ eno=(~(tap by one)) + |- ^+ ret + ?~ eno ret + =. ret $(eno t.eno) + ?: (~(has in two) i.eno) + ret + ret(old [i.eno old.ret]) + =. ret + =+ owt=(~(tap by two)) + |- ^+ ret + ?~ owt ret + =. ret $(owt t.owt) + ?: (~(has in one) i.owt) + ret + ret(new [i.owt new.ret]) + ret + :: + ++ sh-puss + |= a=posture ^- tape + ?- a + %black "channel" + %brown "mailbox" + %white "village" + %green "journal" + == + :: + ++ sh-repo-config-exceptions + |= [pre=tape por=posture old=(list ship) new=(list ship)] + =+ out=?:(?=(?(%black %brown) por) "try " "cut ") + =+ inn=?:(?=(?(%black %brown) por) "ban " "add ") + =. +>.$ + |- ^+ +>.^$ + ?~ old +>.^$ + =. +>.^$ $(old t.old) + (sh-note :(weld pre out " " (scow %p i.old))) + =. +>.$ + |- ^+ +>.^$ + ?~ new +>.^$ + =. +>.^$ $(new t.new) + (sh-note :(weld pre out " " (scow %p i.new))) + +>.$ + :: + ++ sh-repo-config-sources + |= [pre=tape old=(list partner) new=(list partner)] + ^+ +> + =. +>.$ + |- ^+ +>.^$ + ?~ old +>.^$ + =. +>.^$ $(old t.old) + (sh-note (weld pre "off {~(ta-full ta man.she i.old)}")) + =. +>.$ + |- ^+ +>.^$ + ?~ new +>.^$ + =. +>.^$ $(new t.new) + (sh-note (weld pre "hey {~(ta-full ta man.she i.new)}")) + +>.$ + :: + ++ sh-repo-config-show + |= [pre=tape laz=config loc=config] + ^+ +> + =. +>.$ + ?: =(caption.loc caption.laz) +>.$ + (sh-note :(weld pre "cap " (trip caption.loc))) + =. +>.$ + %+ sh-repo-config-sources + (weld (trip man.she) ": ") + (sh-repo-whom-diff sources.laz sources.loc) + ?: !=(p.cordon.loc p.cordon.laz) + =. +>.$ (sh-note :(weld pre "but " (sh-puss p.cordon.loc))) + %^ sh-repo-config-exceptions + (weld (trip man.she) ": ") + p.cordon.loc + [~ (~(tap in q.cordon.loc))] + %^ sh-repo-config-exceptions + (weld (trip man.she) ": ") + p.cordon.loc + (sh-repo-ship-diff q.cordon.laz q.cordon.loc) + :: + ++ sh-repo-cabal-changes + |= $: laz=(map station config) + old=(list (pair station config)) + new=(list (pair station config)) + cha=(list (pair station config)) + == + =. +>.$ + |- ^+ +>.^$ + ?~ new +>.^$ + =. +>.^$ $(new t.new) + =. +>.^$ (sh-pest [%& p.i.new]) + %+ sh-repo-config-show + (weld ~(sn-phat sn man.she p.i.new) ": ") + [*config q.i.new] + =. +>.$ + |- ^+ +>.^$ + ?~ cha +>.^$ + =. +>.^$ $(cha t.cha) + %+ sh-repo-config-show + (weld ~(sn-phat sn man.she p.i.cha) ": ") + [(~(got by laz) `station`p.i.cha) q.i.cha] + +>.$ + :: + ++ sh-repo-cabal + |= bal=cabal + ^+ +> + =+ laz=system.she + =. system.she bal + =. +>.$ + %+ sh-repo-cabal-changes ham.laz + (sh-repo-cabal-diff ham.laz ham.bal) + (sh-repo-config-show "" loc.laz loc.bal) + :: + ++ sh-repo-house + |= awl=(map span (pair posture cord)) + ^+ +> + =+ dif=(sh-repo-house-diff harbor.she awl) + =. harbor.she awl + =. +>.$ + |- ^+ +>.^$ + ?~ old.dif +>.^$ + =. +>.^$ $(old.dif t.old.dif) + (sh-note "cut {(sh-puss p.q.i.old.dif)} %{(trip p.i.old.dif)}") + =. +>.$ + |- ^+ +>.^$ + ?~ new.dif +>.^$ + =. +>.^$ $(new.dif t.new.dif) + =+ :* nam=(trip p.i.new.dif) + por=(sh-puss p.q.i.new.dif) + des=(trip q.q.i.new.dif) + == + (sh-note "new {por} %{nam}: {des}") + =. +>.$ + |- ^+ +>.^$ + ?~ cha.dif +>.^$ + =. +>.^$ $(cha.dif t.cha.dif) + =+ :* nam=(trip p.i.cha.dif) + por=(sh-puss p.q.i.cha.dif) + des=(trip q.q.i.cha.dif) + == + (sh-note "mod %{nam}: {por}, {des}") + +>.$ + :: + ++ sh-note :: shell message + |= txt=tape + ^+ +> + (sh-fact %txt (runt [16 '-'] `tape`['|' ' ' (scag 62 txt)])) + :: + ++ sh-spaz :: print status + |= saz=status + ^- tape + ['%' (trip p.saz)] + :: + ++ sh-repo-group-diff-here :: print atlas diff + |= $: pre=tape + $= cul + $: old=(list (pair ship status)) + new=(list (pair ship status)) + cha=(list (pair ship status)) + == + == + =. +>.$ + |- ^+ +>.^$ + ?~ old.cul +>.^$ + =. +>.^$ $(old.cul t.old.cul) + (sh-note (weld pre "bye {(scow %p p.i.old.cul)}")) + =. +>.$ + |- ^+ +>.^$ + ?~ new.cul +>.^$ + =. +>.^$ $(new.cul t.new.cul) + %- sh-note + (weld pre "met {(scow %p p.i.new.cul)} {(sh-spaz q.i.new.cul)}") + =. +>.$ + |- ^+ +>.^$ + ?~ cha.cul +>.^$ + %- sh-note + (weld pre "set {(scow %p p.i.cha.cul)} {(sh-spaz q.i.cha.cul)}") + +>.$ + :: + ++ sh-repo-group-here :: update local + |= loc=atlas + ^+ +> + =+ cul=(sh-repo-atlas-diff p.guests.she loc) + =. p.guests.she loc + (sh-repo-group-diff-here "" cul) + :: + ++ sh-repo-group-there :: update foreign + |= yid=(map partner atlas) + =+ day=(sh-repo-rogue-diff q.guests.she yid) + =+ dun=q.guests.she + =. q.guests.she yid + =. +>.$ + |- ^+ +>.^$ + ?~ old.day +>.^$ + =. +>.^$ $(old.day t.old.day) + (sh-note (weld "not " (~(ta-show ta man.she p.i.old.day) ~))) + =. +>.$ + |- ^+ +>.^$ + ?~ new.day +>.^$ + =. +>.^$ $(new.day t.new.day) + =. +>.^$ + (sh-note (weld "new " (~(ta-show ta man.she p.i.new.day) ~))) + (sh-repo-group-diff-here "--" ~ (~(tap by q.i.new.day)) ~) + =. +>.$ + |- ^+ +>.^$ + ?~ cha.day +>.^$ + =. +>.^$ $(cha.day t.cha.day) + =. +>.^$ + (sh-note (weld "for " (~(ta-show ta man.she p.i.cha.day) ~))) + =+ yez=(~(got by dun) p.i.cha.day) + %+ sh-repo-group-diff-here "--" + (sh-repo-atlas-diff yez q.i.cha.day) + +>.$ + :: + ++ sh-repo-group + |= ges=register + ^+ +> + =. +> (sh-repo-group-here p.ges) + =. +> (sh-repo-group-there q.ges) + +> + :: + ++ sh-repo-gram + |= [num=@ud gam=telegram] + ^+ +> + ?: =(num count.she) + =. +> ?:(=(0 (mod num 5)) (sh-numb num) +>) + (sh-rend(count.she +(num)) gam) + ?: (gth num count.she) + =. +> (sh-numb num) + (sh-rend(count.she +(num)) gam) + +> + :: + ++ sh-repo-grams :: apply telegrams + |= [num=@ud gaz=(list telegram)] + ^+ +> + ?~ gaz +> + $(gaz t.gaz, num +(num), +> (sh-repo-gram num i.gaz)) + :: + ++ sh-repo :: apply report + |= rad=report + ^+ +> + :: ~& [%sh-repo rad] + ?- -.rad + %cabal (sh-repo-cabal +.rad) + %grams (sh-repo-grams +.rad) + %group (sh-repo-group +.rad) + %house (sh-repo-house +.rad) + == + :: + ++ sh-sane-chat :: sanitize chatter + |= buf=(list ,@c) + ^- (list sole-edit) + =+ :- inx=0 + ^= fix + |= [inx=@ud cha=@t lit=(list sole-edit)] + ^+ lit + [[%mor [%del inx] [%ins inx `@c`cha] ~] lit] + |- ^- (list sole-edit) + ?: =(62 inx) + |- ^- (list sole-edit) + ?~(buf ~ [[%del 62] $(buf t.buf)]) + ?~ buf ~ + =+ lit=$(inx +(inx), buf t.buf) + ?: |((lth i.buf 32) (gth i.buf 126)) + (fix inx '?' lit) + ?: &((gte i.buf 'A') (lte i.buf 'Z')) + (fix inx (add 32 i.buf) lit) + :: ?: &(=('/' i.buf) ?=([47 *] t.buf)) + :: (fix inx '\\' lit) + lit + :: + ++ sh-sane-rule :: sanitize by rule + |* sef=_rule + |= [inv=sole-edit txt=tape] + ^- (list sole-edit) + =+ ryv=(rose txt sef) + ?:(-.ryv ~ [inv ~]) + :: + ++ sh-sane :: sanitize input + |= [inv=sole-edit buf=(list ,@c)] + ^- (list sole-edit) + ?~ buf ~ + ?: =(';' i.buf) + ((sh-sane-rule sh-scad) inv (tufa t.buf)) + ?: =('@' i.buf) + (sh-sane-chat +.buf) + (sh-sane-chat buf) + :: + ++ sh-slug :: edit to sanity + |= lit=(list sole-edit) + ^+ +> + ?~ lit +> + =^ lic say.she + (~(transmit cs say.she) `sole-edit`?~(t.lit i.lit [%mor lit])) + (sh-fact [%mor [%det lic] ~]) + :: + ++ sh-stir :: apply edit + |= cal=sole-change + ^+ +> + =^ inv say.she (~(transceive cs say.she) cal) + =+ lit=(sh-sane inv buf.say.she) + ?~ lit + +>.$ + (sh-slug lit) + :: + ++ sh-pork :: parse work + ^- (unit work) + ?~ buf.say.she ~ + ?: =(';' -.buf.say.she) + (rust (tufa +.buf.say.she) sh-scad) + ?: =('@' -.buf.say.she) + `[%say %lin | (crip (tufa +.buf.say.she))] + `[%say %lin & (crip (tufa buf.say.she))] + :: + ++ sh-lame :: send error + |= txt=tape + (sh-fact [%txt txt]) + :: + ++ sh-whom :: current audience + ^- audience + %- ~(gas by *audience) + %+ turn (~(tap in ?~(active.she passive.she u.active.she))) + |=(a=partner [a *envelope %pending]) + :: + ++ sh-tell :: add command + |= cod=command + %_(+> coz [cod coz]) + :: + ++ sh-work :: do work + |= job=work + ^+ +> + =+ roy=(~(got by stories) man.she) + =< work + |% + ++ work + ?- -.job + %number (number +.job) + %join (join +.job) + %invite (invite +.job) + %banish (banish +.job) + %create (create +.job) + %target (target +.job) + %probe (probe +.job) + %say (say +.job) + == + :: + ++ activate :: from %number + |= gam=telegram + ^+ +>+>+> + ~& [%activate gam] + sh-prod(active.she `~(tr-pals tr man.she gam)) + :: + ++ join :: %join + |= lix=(set partner) + ^+ +>+>+> + =+ loc=loc.system.she + %^ sh-tell %design man.she + :- ~ + =+ tal=(~(tap in lix)) + %_ loc + sources + |- ^- (set partner) + ?~ tal sources.loc + ?: (~(has in sources.loc) i.tal) + $(tal t.tal, sources.loc (~(del in sources.loc) i.tal)) + $(tal t.tal, sources.loc (~(put in sources.loc) i.tal)) + == + :: + ++ invite :: %invite + |= [nom=span tal=(list partner)] + ^+ +>+>+> + !! + :: + ++ banish :: %banish + |= [nom=span tal=(list partner)] + ^+ +>+>+> + !! + :: + ++ create :: %create + |= [por=posture nom=span txt=cord] + ^+ +>+>+> + ?: (~(has in stories) nom) + (sh-lame "{(trip nom)}: already exists") + =. +>+>+> + %^ sh-tell %design nom + :- ~ + :+ *(set partner) + (end 3 62 txt) + [por ~] + (join [[%& our.hid nom] ~ ~]) + :: + ++ target :: %target + |= lix=(set partner) + (sh-pact lix) + :: + ++ number :: %number + |= [rel=? num=@ud] + ^+ +>+>+> + =+ roy=(~(got by stories) man.she) + =. num + ?. rel num + =+ dog=|-(?:(=(0 num) 1 (mul 10 $(num (div num 10))))) + (add num (mul dog (div count.roy dog))) + ?: (gte num count.roy) + (sh-lame "{(scow %ud num)}: no such telegram") + (activate (snag (sub count.roy +(num)) grams.roy)) + :: + ++ probe :: inquire + |= cuz=station + ^+ +>+>+> + ~& [%probe cuz] + +>+>+> + :: + ++ say :: publish + |= sep=speech + ^+ +>+>+> + =^ sir +>+>+> sh-uniq + %= +>+>+>.$ + coz :_ coz + [%publish [[sir sh-whom [lat.hid ~ sep]] ~]] + == + -- + :: + ++ sh-done :: apply result + =+ lit=(sh-sane [%nop ~] buf.say.she) + ?^ lit + (sh-slug lit) + =+ jub=sh-pork + ?~ jub (sh-fact %bel ~) + =. +> (sh-work u.jub) + =+ buf=buf.say.she + =^ cal say.she (~(transmit cs say.she) [%set ~]) + %- sh-fact + :* %mor + [%nex ~] + [%det cal] + ?. ?=([%';' *] buf) ~ + :_ ~ + [%txt (weld "----------------| " (tufa buf))] + == + :: + ++ sh-sole :: apply edit + |= act=sole-action + ^+ +> + ?- -.act + %det (sh-stir +.act) + %ret sh-done + == + :: + ++ sh-uniq + ^- [serial _.] + [(shaf %serial eny.hid) .(eny.hid (shax eny.hid))] + -- + ++ ra-abed :: resolve core + ^- [(list move) _+>] + :_ +> + =+ ^= yop + |- ^- (pair (list move) (list sole-effect)) + ?~ moves [~ ~] + =+ mor=$(moves t.moves) + ?: ?& =(ost p.i.moves) + ?=([%diff %sole-effect *] q.i.moves) + == + [p.mor [+>.q.i.moves q.mor]] + [[i.moves p.mor] q.mor] + =+ :* moz=(flop p.yop) + ^= foc ^- (unit sole-effect) + ?~ q.yop ~ + ?~(t.q.yop `i.q.yop `[%mor (flop `(list sole-effect)`q.yop)]) + == + ?~(foc moz [[ost %diff %sole-effect u.foc] moz]) + :: + ++ ra-abet :: complete core + ra-abed:ra-axel + :: + ++ ra-axel :: rebound reports + ^+ . + =+ ^= rey + |- ^- (pair (list move) (list (pair bone report))) + ?~ moves + [~ ~] + =+ mor=$(moves t.moves) + ?. ?& (~(has by shells) `bone`p.i.moves) + ?=([%diff %talk-report *] q.i.moves) + == + [[i.moves p.mor] q.mor] + [p.mor [[p.i.moves +>.q.i.moves] q.mor]] + =. moves p.rey + ?: =(q.rey ~) + + =. q.rey (flop q.rey) + |- ^+ +> + ?~ q.rey ra-axel + $(q.rey t.q.rey, +> (ra-back(ost p.i.q.rey) q.i.q.rey)) + :: + ++ ra-back + |= rad=report + ^+ +> + sh-abet:(~(sh-repo sh ~ (~(got by shells) ost)) rad) + :: + ++ ra-sole + |= act=sole-action + ^+ +> + =+ shu=(~(get by shells) ost) + ?~ shu + ~& [%ra-console-broken ost] + +>.$ + sh-abet:(~(sh-sole sh ~ (~(got by shells) ost)) act) + :: + ++ ra-emil :: ra-emit move list + |= mol=(list move) + %_(+> moves (welp (flop mol) moves)) + :: + ++ ra-emit :: emit a move + |= mov=move + %_(+> moves [mov moves]) + :: + ++ ra-ever :: emit success + . + :: + ++ ra-evil :: emit error + |= msg=cord + ~& [%ra-evil msg] + +> + :: + ++ ra-house :: emit partners + |= ost=bone + %+ ra-emit ost + :+ %diff %talk-report + :- %house + %- ~(gas in *(map span (pair posture cord))) + %+ turn (~(tap by stories)) + |=([a=span b=story] [a p.cordon.shape.b caption.shape.b]) + :: + ++ ra-homes :: update partners + =+ gel=general + |- ^+ +> + ?~ gel +> + =. +> $(gel l.gel) + =. +> $(gel r.gel) + (ra-house n.gel) + :: + ++ ra-init :: initialize talk + %+ ra-apply our.hid + :+ %design (main our.hid) + :- ~ :- ~ + :- 'default home' + [%brown ~] + :: + ++ ra-apply :: apply command + |= [her=ship cod=command] + ^+ +> + ?- -.cod + %design + ?. =(her our.hid) + (ra-evil %talk-no-owner) + ?~ q.cod + ?. (~(has by stories) p.cod) + (ra-evil %talk-no-story) + =. +>.$ (ra-config p.cod *config) + ra-ever(stories (~(del by stories) p.cod)) + =. +>.$ (ra-config p.cod u.q.cod) + ra-ever + :: + %review ra-ever:(ra-think | her +.cod) + %publish ra-ever:(ra-think & her +.cod) + == + :: + ++ ra-config :: configure story + |= [man=span con=config] + ^+ +> + =+ :- neu=(~(has by stories) man) + pur=(fall (~(get by stories) man) *story) + =. +>.$ pa-abet:(~(pa-reform pa man pur) con) + ?:(neu +>.$ ra-homes) + :: + ++ ra-know :: story monad + |= man=span + |* fun=$+(_pa _+>+>) + ^+ +>+> + =+ pur=(~(get by stories) man) + ?~ pur + ~& [%ra-know-not man] :: XX should crash + +>+>.$ + (fun ~(. pa man u.pur)) + :: + ++ ra-diff-talk-report :: subscription update + |= [man=span cuz=station rad=report] + %- (ra-know man) |= par=_pa =< pa-abet + (pa-diff-talk-report:par cuz rad) + :: + ++ ra-quit :: subscription quit + |= [man=span cuz=station] + %- (ra-know man) |= par=_pa =< pa-abet + (pa-quit:par %& cuz) + :: + ++ ra-coup-repeat :: + |= [[num=@ud her=@p man=span] saw=(unit tang)] + (ra-repeat num [%& her man] saw) + :: + ++ ra-repeat :: remove from outbox + |= [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 + ^+ . + =+ hep=(~(get by sup.hid) ost) + ?~ hep + + ?. ?=([@ @ *] q.u.hep) + +(general (~(del in general) ost)) + %- (ra-know i.t.q.u.hep) |= par=_pa =< pa-abet + (pa-notify:pa-cancel:par p.u.hep %gone *human) + :: + ++ ra-human :: look up person + |= 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-console :: console subscribe + |= [her=ship pax=path] + ^+ +> + =+ man=`span`?~(pax (main her) ?>(?=(~ t.pax) i.pax)) + =+ ^= she ^- shell + [her man 0 *sole-share ~ [[%& our.hid man] ~ ~] [~ ~] ~ *cabal] + sh-abet:~(sh-peer sh ~ she) + :: + ++ ra-subscribe :: listen to + |= [her=ship pax=path] + ^+ +> + :: ~& [%ra-subscribe ost her pax] + ?: ?=(~ pax) + (ra-house(general (~(put in general) ost)) ost) + ?. ?=([@ @ *] pax) + (ra-evil %talk-bad-path) + =+ ^= vab ^- (set ,@tas) + =| vab=(set ,@tas) + |- ^+ vab + ?: =(0 i.pax) vab + $(i.pax (rsh 3 1 i.pax), vab (~(put in vab) (end 3 1 i.pax))) + =+ pur=(~(get by stories) i.t.pax) + ?~ pur + ~& [%bad-subscribe-story-c i.t.pax] + (ra-evil %talk-no-story) + =+ soy=~(. pa i.t.pax u.pur) + =. soy ?.((~(has in vab) %a) soy (pa-watch:soy her)) + =. soy ?.((~(has in vab) %x) soy (pa-master:soy her)) + =. soy ?.((~(has in vab) %f) soy (pa-listen:soy her t.t.pax)) + =^ who +>.$ (ra-human her) + pa-abet:(pa-notify:soy her %hear who) + :: + ++ ra-think :: publish/review + |= [pub=? her=ship tiz=(list thought)] + ^+ +> + ?~ tiz +> + $(tiz t.tiz, +> (ra-consume pub her i.tiz)) + :: + ++ ra-normal :: normalize + |= tip=thought + ^- thought + ?. ?=([%lin *] r.r.tip) tip + %_ tip + q.r.r + %- crip + %+ scag 62 + %- 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 + |= [pub=? her=ship tip=thought] + =. tip (ra-normal tip) + =+ aud=(~(tap by q.tip) ~) + |- ^+ +>.^$ + ?~ aud +>.^$ + $(aud t.aud, +>.^$ (ra-conduct pub her p.i.aud tip)) + :: + ++ ra-conduct :: thought to partner + |= [pub=? her=ship tay=partner tip=thought] + ^+ +> + :: ~& [%ra-conduct pub her tay] + ?- -.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 + |= [man=span gam=telegram] + %- (ra-know man) |= par=_pa =< pa-abet + (pa-learn:par gam) + :: + ++ ra-transmit :: send to neighbor + |= [cuz=station tip=thought] + ^+ +> + =. +> + %+ ra-emit ost + :* %poke + /repeat/(scot %ud p.outbox)/(scot %p p.cuz)/[q.cuz] + [p.cuz %talk] + [%talk-command `command`[%review tip ~]] + == + +>(p.outbox +(p.outbox), q.outbox (~(put by q.outbox) p.outbox tip)) + :: + ++ pa :: story core + |_ $: man=span + story + == + ++ pa-abet + ^+ +> + +>(stories (~(put by stories) man `story`+<+)) + :: + ++ pa-admire :: accept from + |= her=ship + ^- ? + ::?- -.cordon.shape + :: %& (~(has in p.cordon.shape) her) + :: %| !(~(has in p.cordon.shape) her) + ::== + & + :: + ++ pa-watch :: watch presence + |= her=ship + ?. (pa-admire her) + (pa-sauce ost [%quit ~]~) + =. viewers (~(put in viewers) ost) + (pa-display ost ~ ~) + :: + ++ pa-master :: hear config + |= her=ship + ?. (pa-admire her) + ~& [%pa-admire-not her] + (pa-sauce ost [%quit ~]~) + =. owners (~(put in owners) ost) + :: ~& [%pa-master her man shape] + (pa-sauce ost [[%diff %talk-report %cabal shape mirrors] ~]) + :: + ++ pa-display :: update presence + |= vew=(set bone) + =+ ^= reg + :_ remotes + |- ^- atlas + ?~ locals ~ + [[p.n.locals q.q.n.locals] $(locals l.locals) $(locals r.locals)] + :: ~& [%pa-display man reg] + |- ^+ +>.^$ + ?~ vew +>.^$ + =. +>.^$ $(vew l.vew) + =. +>.^$ $(vew r.vew) + (pa-sauce n.vew [[%diff %talk-report %group reg] ~]) + :: + ++ pa-monitor :: update config + =+ owe=owners + |- ^+ +> + ?~ owe +> + =. +> $(owe l.owe) + =. +> $(owe r.owe) + :: ~& [%pa-monitor man shape] + (pa-sauce n.owe [[%diff %talk-report %cabal shape mirrors] ~]) + :: + ++ pa-cabal + |= [cuz=station con=config ham=(map station config)] + ^+ +> + =+ old=mirrors + =. mirrors (~(put by mirrors) cuz con) + ?: =(mirrors old) + +>.$ + pa-monitor + :: + ++ pa-diff-talk-report :: subscribed update + |= [cuz=station rad=report] + ^+ +> + ?+ -.rad ~|([%talk-odd-friend rad] !!) + %cabal (pa-cabal cuz +.rad) + %group (pa-remind [%& cuz] +.rad) + %grams (pa-lesson q.+.rad) + == + :: + ++ pa-quit :: stop subscription + |= tay=partner + pa-monitor(sources.shape (~(del in sources.shape) tay)) + :: + ++ pa-sauce :: send backward + |= [ost=bone cub=(list card)] + %_ +>.$ + moves + (welp (flop (turn cub |=(a=card [ost a]))) moves) + == + :: + ++ pa-abjure :: unsubscribe move + |= tal=(list partner) + %+ pa-sauce 0 + %- zing + %+ turn tal + |= tay=partner + ^- (list card) + ?- -.tay + %| ~& tweet-abjure/p.p.tay + !! + :: + %& ~& [%pa-abjure [our.hid man] [p.p.tay q.p.tay]] + :_ ~ + :* %pull + /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] + [p.p.tay %talk] + ~ + == + == + :: + ++ pa-acquire :: subscribe to + |= tal=(list partner) + %+ pa-sauce 0 + %- zing + %+ turn tal + |= tay=partner + ^- (list card) + =+ num=(fall (~(get by sequence) tay) 0) + ?- -.tay + %| !! + %& :: ~& [%pa-acquire [our.hid man] [p.p.tay q.p.tay]] + :_ ~ + :* %peer + /friend/show/[man]/(scot %p p.p.tay)/[q.p.tay] + [p.p.tay %talk] + /afx/[q.p.tay]/(scot %ud num) + == + == + :: + ++ pa-reform :: reconfigure, ugly + |= cof=config + =+ ^= 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 + pa-monitor + :: + ++ pa-cancel :: unsubscribe from + :: ~& [%pa-cancel ost] + %_ . + guests (~(del by guests) ost) + viewers (~(del in viewers) ost) + owners (~(del in owners) ost) + == + :: + ++ pa-notify :: local presence + |= [her=ship saz=status] + ^+ +> + =+ ^= nol + ?: =(%gone p.saz) + (~(del by locals) her) + (~(put by locals) her lat.hid saz) + ?: =(nol locals) +>.$ + (pa-display(locals nol) viewers) + :: + ++ pa-remind :: remote presence + |= [tay=partner loc=atlas rem=(map partner atlas)] + =+ ^= buk + =+ mer=(turn (~(tap by rem) ~) |=([* a=atlas] a)) + |- ^- atlas + ?~ mer loc + =. loc $(mer t.mer) + =+ dur=`(list (pair ship status))`(~(tap by i.mer) ~) + |- ^- atlas + ?~ dur loc + =. loc $(dur t.dur) + =+ fuy=(~(get by loc) p.i.dur) + ?~ fuy (~(put by loc) p.i.dur q.i.dur) + ?: =(`presence`p.q.i.dur `presence`p.u.fuy) + loc + ?- p.u.fuy + %gone (~(del by loc) p.i.dur q.i.dur) + %talk loc + %hear (~(put by loc) p.i.dur q.i.dur) + == + =+ gub=(~(get by remotes) tay) + :: ~& [%pa-remind tay gub buk] + ?. |(?=(~ gub) !=(buk u.gub)) + +>.$ + =. remotes (~(put by remotes) tay buk) + (pa-display viewers) + :: + ++ pa-start :: start stream + |= riv=river + ^+ +> + =- :: ~& [%pa-start riv lab] + =. +>.$ (pa-sauce ost [[%diff %talk-report %grams q.lab r.lab] ~]) + ?: p.lab + (pa-sauce ost [[%quit ~] ~]) + +>.$(guests (~(put by guests) ost riv)) + ^= 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) + == + $(end (dec end), gaz t.gaz) + ?: ?- -.p.riv :: before the start + %ud (lth end p.p.riv) + %da (lth p.r.q.i.gaz p.p.riv) + == + [dun end zeg] + $(end (dec end), gaz t.gaz, zeg [i.gaz zeg]) + :: + ++ pa-listen :: subscribe + |= [her=ship pax=path] + ^+ +> + ?. (pa-admire her) + ~& [%pa-listen-admire ~] + (pa-sauce ost [%quit ~]~) + =+ ^= ruv ^- (unit river) + ?: ?=(~ pax) + `[[%ud count] [%da (dec (bex 128))]] + ?: ?=([@ ~] pax) + =+ say=(slay i.pax) + ?. ?=([~ %$ ?(%ud %da) @] say) ~ + `[(point +>.say) [%da (dec (bex 128))]] + ?. ?=([@ @ ~] pax) ~ + =+ [say=(slay i.pax) den=(slay i.t.pax)] + ?. ?=([~ %$ ?(%ud %da) @] say) ~ + ?. ?=([~ %$ ?(%ud %da) @] den) ~ + `[(point +>.say) (point +>.den)] + :: ~& [%pa-listen her pax ruv] + ?~ ruv + ~& [%pa-listen-malformed pax] + (pa-sauce ost [%quit ~]~) + (pa-start u.ruv) + :: + ++ pa-refresh :: update to guests + |= [num=@ud gam=telegram] + ^+ +> + =+ ^= moy + |- ^- (pair (list bone) (list move)) + ?~ guests [~ ~] + :: ~& [%pa-refresh num n.guests] + =+ lef=$(guests l.guests) + =+ rit=$(guests r.guests) + =+ old=[p=(welp p.lef p.rit) q=(welp q.lef q.rit)] + ?: ?- -.q.q.n.guests :: after the end + %ud (lte p.q.q.n.guests num) + %da (lte p.q.q.n.guests p.r.q.gam) + == + [[p.n.guests p.old] [[p.n.guests %quit ~] q.old]] + ?: ?- -.p.q.n.guests :: before the start + %ud (gth p.p.q.n.guests num) + %da (gth p.p.q.n.guests p.r.q.gam) + == + old + :- p.old + [[p.n.guests %diff %talk-report %grams num gam ~] q.old] + =. moves (welp q.moy moves) + |- ^+ +>.^$ + ?~ p.moy +>.^$ + $(p.moy t.p.moy, guests (~(del by guests) i.p.moy)) + :: + ++ pa-lesson :: learn multiple + |= gaz=(list telegram) + ^+ +> + ?~ gaz +> + $(gaz t.gaz, +> (pa-learn i.gaz)) + :: + ++ pa-learn :: learn message + |= gam=telegram + ^+ +> + ?. (pa-admire p.gam) + ~& %pa-admire-rejected + +>.$ + =. q.q.gam + =+ ole=(~(get by q.q.gam) [%& our.hid man]) + ?~ ole q.q.gam + (~(put by q.q.gam) [%& our.hid man] -.u.ole %received) + =+ old=(~(get by known) p.q.gam) + ?~ old + (pa-append gam) + (pa-revise u.old gam) + :: + ++ pa-append :: append new + |= gam=telegram + ^+ +> + %+ %= pa-refresh + grams [gam grams] + count +(count) + known (~(put by known) p.q.gam count) + == + count + gam + :: + ++ pa-revise :: revise existing + |= [num=@ud gam=telegram] + =+ way=(sub count num) + =. grams (welp (scag (dec way) grams) [gam (slag way grams)]) + (pa-refresh num gam) + -- + -- +:: +++ sn :: station render core + |_ [man=span one=station] + ++ sn-best :: best to show + |= two=station + ^- ? + ?: =(our.hid p.one) + ?: =(our.hid p.two) + ?< =(q.one q.two) + ?: =((main p.one) q.one) %& + ?: =((main p.two) q.two) %| + (lth q.one q.two) + %& + ?: =(our.hid p.two) + %| + ?: =(p.one p.two) + (lth q.one q.two) + (lth p.one q.one) + :: + ++ sn-curt :: render name in 14 + |= mup=? + ^- tape + =+ ^= syl + |= [len=@ud sez=(list cord)] + ?> !=(0 len) + |- ^- tape + ?~ sez ~ + =+ nez=(trip i.sez) + =+ nel=(lent nez) + ?: (gte nel len) + (welp (scag (dec len) nez) ">") + (welp nez $(sez t.sez)) + :: + ?: =(p.one our.hid) + ?: =(q.one man) + (sigh 14 ?:(mup "*=" "=") %$) + (sigh 14 ?:(mup "*%" "%") q.one) + ?: =(p.one (sein our.hid)) + (sigh 14 ?:(mup "*/" "/") q.one) + =+ rac=(clan p.one) + =+ raw=(scow %p p.one) + =. raw ?.(mup raw ['*' (slag 2 raw)]) + ?- rac + %czar (weld " " raw) + %king (weld " " raw) + %duke raw + %earl :(welp (scag 7 raw) "^" (scag 6 (slag 22 raw))) + %pawn :(welp (scag 7 raw) "_" (scag 6 (slag 51 raw))) + == + :: + ++ sn-phat :: render accurately + ^- tape + ?: =(p.one our.hid) + ?: =(q.one man) + "=" + ['%' (trip q.one)] + ?: =(p.one (sein our.hid)) + ['/' (trip q.one)] + =+ wun=(scow %p p.one) + ?: =(q.one (main p.one)) + wun + :(welp wun "/" (trip q.one)) + -- +:: +++ ta :: partner core + |_ [man=span one=partner] + ++ ta-beat :: more relevant + |= two=partner ^- ? + ?- -.one + %& + ?- -.two + %| %& + %& (~(sn-best sn man p.one) p.two) + == + :: + %| + ?- -.two + %& %| + %| ?: =(-.p.two -.p.one) + (lth (mug +.p.one) (mug +.p.two)) + (lth -.p.two -.p.one) + == + == + ++ ta-best :: most relevant + |=(two=partner ?:((ta-beat two) one two)) + :: + ++ ta-full (ta-show ~) :: render full width + ++ ta-show :: render partner + |= moy=(unit ,?) + ^- tape + ?- -.one + %& + ?~ moy + ~(sn-phat sn man p.one) + (~(sn-curt sn man p.one) u.moy) + :: + %| + =+ ^= pre ^- tape + ?- -.p.one + %twitter "@t:" + == + ?~ moy + (weld pre (trip p.p.one)) + =. pre ?.(=(& u.moy) pre ['*' pre]) + (sigh 14 pre p.p.one) + == + -- +:: +++ te :: audience renderer + |_ [man=span lix=(set partner)] + ++ te-best ^- (unit partner) + ?~ lix ~ + :- ~ + |- ^- partner + =+ lef=`(unit partner)`te-best(lix l.lix) + =+ rit=`(unit partner)`te-best(lix r.lix) + =. n.lix ?~(lef n.lix (~(ta-best ta man n.lix) u.lef)) + =. n.lix ?~(rit n.lix (~(ta-best ta man n.lix) u.rit)) + n.lix + :: + ++ te-deaf ^+ . :: except for self + .(lix (~(del in lix) `partner`[%& our.hid man])) + :: + ++ te-maud ^- ? :: multiple audience + =. . te-deaf + ?~ lix %| + |(!=(~ l.lix) !=(~ r.lix)) + :: + ++ te-prom ^- tape :: render targets + =. . te-deaf + =+ ^= all + %+ sort `(list partner)`(~(tap in lix)) + |= [a=partner b=partner] + (~(ta-beat ta man a) b) + =+ fir=& + |- ^- tape + ?~ all ~ + ;: welp + ?:(fir "" " ") + (~(ta-show ta man i.all) ~) + $(all t.all, fir |) + == + :: + ++ te-whom :: render sender + (~(ta-show ta man (need te-best)) ~ te-maud) + -- +:: +++ tr :: telegram renderer + |_ $: man=span + who=ship + sen=serial + aud=audience + wen=@da + bou=(set flavor) + sep=speech + == + ++ tr-line ^- tape :: one-line print + =+ oug==(who our.hid) + =+ txt=(tr-text oug) + ?: =(~ txt) "" + =+ eck=?:((~(has by aud) [%& our.hid man]) '*' '-') + =+ heb=?:(oug '>' '<') + =+ ^= baw + ?: oug + ~(te-whom te man tr-pals) + (~(sn-curt sn man [who (main who)]) |) + [heb eck (weld baw txt)] + :: + ++ tr-pals + ^- (set partner) + %- ~(gas in *(set partner)) + (turn (~(tap by aud)) |=([a=partner *] a)) + :: + ++ tr-text + |= oug=? + ^- tape + ?+ -.sep "" + %lin + =+ txt=(trip q.sep) + ?: p.sep + (weld ": " txt) + ?: oug + (weld "@ " txt) + (weld " " txt) + == + -- +:: +++ peer :: accept subscription + |= [from pax=path] + ^- [(list move) _+>] + ?: ?=([%sole *] pax) + ?> =(our.hid src) + ?< (~(has by shells) ost) + ra-abet:(~(ra-console ra ost ~) src t.pax) + :: ~& [%talk-peer-data ost src pax] + ra-abet:(~(ra-subscribe ra ost ~) src pax) +:: +++ poke-talk-command :: accept command + |= [from cod=command] + ^- [(list move) _+>] + :: ~& [%talk-poke-command src cod] + ra-abet:(~(ra-apply ra ost ~) src cod) +:: +++ poke-sole-action :: accept console + |= [from act=sole-action] + ra-abet:(~(ra-sole ra ost ~) act) +:: +++ diff-talk-report :: + |= [then rad=report] + %+ etch-friend way |= [man=span cuz=station] + ra-abet:(~(ra-diff-talk-report ra ost ~) man cuz rad) +:: +++ coup-repeat :: + |= [then saw=(unit tang)] + %+ etch-repeat way |= [num=@ud src=@p man=span] + ra-abet:(~(ra-coup-repeat ra ost ~) [num src man] saw) +:: +++ etch :: parse wire + |= way=wire + ^- weir + ?+ -.way !! + %friend + ?> ?=([%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 :: + |= [way=wire fun=$+([man=span cuz=station] [(list move) _+>])] + =+ wer=(etch way) + ?>(?=(%friend -.wer) (fun p.wer q.wer)) +:: +++ etch-repeat :: + |= [way=wire fun=$+([num=@ud src=@p man=span] [(list move) _+>])] + =+ wer=(etch way) + ?>(?=(%repeat -.wer) (fun p.wer q.wer r.wer)) +:: +++ quit-friend :: + |= then + %+ etch-friend way |= [man=span cuz=station] + ra-abet:(~(ra-quit ra ost ~) man cuz) +:: +++ pull :: + |= [from ~] + ^- [(list move) _+>] + :: ~& [%talk-pull `*`ost] + =^ moz +>.$ ra-abet:ra-ever:~(ra-cancel ra ost ~) + [moz +>.$(shells (~(del by shells) ost))] +:: +++ poke-bit + |= [from ~] + ^- (quip move +>) + :_ +>.$ + =+ paf=/(scot %p our.hid)/try/(scot %da lat.hid)/talk/backlog/jam + [ost %info /jamfile our.hid (foal paf (jam +<+.+>.$))]~ +:: +++ prep + |= [from old=(unit house)] + ^- (quip move +>) + ?~ old + ra-abet:~(ra-init ra 0 ~) + [~ +>(+<+ u.old)] +-- diff --git a/base/arvo/doll.hoon b/base/arvo/doll.hoon new file mode 100644 index 000000000..bfde6dbcb --- /dev/null +++ b/base/arvo/doll.hoon @@ -0,0 +1,480 @@ +!: +:: dill (4d), terminal handling +:: +|= pit=vase +=> |% :: interface tiles +++ console-action :: console to app + $% [%det console-change] :: edit prompt line + [%inn ~] :: enter session + [%out ~] :: exit session + [%ret ~] :: submit and clear + == :: +++ console-buffer (list ,@c) :: command state +++ console-change :: network change + $: ler=console-clock :: destination clock + haw=@uvH :: source hash + ted=console-edit :: state change + == :: +++ console-clock ,[own=@ud his=@ud] :: vector clock +++ console-edit :: shared state change + $% [%del p=@ud] :: delete one at + [%ins p=@ud q=@c] :: insert at + [%mor p=(list console-edit)] :: combination + [%nop ~] :: no-op + [%set p=console-buffer] :: discontinuity + == :: +++ console-effect :: app to console + $% [%bel ~] :: beep + [%blk p=@ud q=@c] :: blink/match char at + [%clr ~] :: clear screen + [%det console-change] :: edit input + [%nex ~] :: save and clear input + [%tan p=(list tank)] :: classic tank + :: [%taq p=tanq] :: modern tank + [%txt p=tape] :: text line + == :: +++ dill-belt :: console input + $% [%aro p=?(%d %l %r %u)] :: arrow key + [%bac ~] :: true backspace + [%cru p=@tas q=(list tank)] :: echo error + [%ctl p=@c] :: control-key + [%del ~] :: true delete + [%met p=@c] :: meta-key + [%ret ~] :: return + [%rez p=@ud q=@ud] :: resize, cols, rows + [%txt p=(list ,@c)] :: utf32 text + [%yow p=gill] :: connect to app + == :: +++ dill-blit :: console output + $% [%bel ~] :: make a noise + [%clr ~] :: clear the screen + [%hop p=@ud] :: set cursor position + [%mor p=(list dill-blit)] :: multiple blits + [%pro p=(list ,@c)] :: show as cursor/line + [%qit ~] :: close console + [%out p=(list ,@c)] :: send output line + [%sag p=path q=*] :: save to jamfile + [%sav p=path q=@] :: save to file + == :: +++ gill (pair ship term) :: general contact +-- :: +=> |% :: console protocol +++ axle :: all dill state + $: %2 :: + ore=(unit ship) :: identity once set + hey=(unit duct) :: default duct + dug=(map duct axon) :: conversations + == :: +++ axon :: dill per duct + $: ram=term :: console program + tem=(unit (list dill-belt)) :: pending, reverse + wid=_80 :: terminal width + pos=@ud :: cursor position + see=(list ,@c) :: current line + == :: +-- => :: +|% :: protocol below +++ blew ,[p=@ud q=@ud] :: columns rows +++ belt :: raw console input + $% [%aro p=?(%d %l %r %u)] :: arrow key + [%bac ~] :: true backspace + [%ctl p=@c] :: control-key + [%del ~] :: true delete + [%met p=@c] :: meta-key + [%ret ~] :: return + [%txt p=(list ,@c)] :: utf32 text + == :: +++ blit :: raw console output + $% [%bel ~] :: make a noise + [%clr ~] :: clear the screen + [%hop p=@ud] :: set cursor position + [%lin p=(list ,@c)] :: set current line + [%mor ~] :: newline + [%sag p=path q=*] :: save to jamfile + [%sav p=path q=@] :: save to file + == :: +++ flog :: sent to %dill + $% [%crud p=@tas q=(list tank)] :: + [%text p=tape] :: + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: +++ gift :: out result <-$ + $% [%bbye ~] :: reset prompt + [%blit p=(list blit)] :: terminal output + [%init p=@p] :: set owner + [%logo ~] :: logout + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: +++ kiss :: in request ->$ + $% [%belt p=belt] :: terminal input + [%blew p=blew] :: terminal config + [%boot p=*] :: weird %dill boot + [%crud p=@tas q=(list tank)] :: error with trace + [%flog p=flog] :: wrapped error + [%flow p=@tas q=(list gill)] :: terminal config + [%hail ~] :: terminal refresh + [%hook ~] :: this term hung up + [%harm ~] :: all terms hung up + [%init p=ship] :: after gall ready + [%noop ~] :: no operation + [%talk p=tank] :: + [%text p=tape] :: + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: +-- => :: +|% :: protocol outward +++ mess :: + $% [%dill-belt p=(hypo dill-belt)] :: + == :: +++ club :: agent action + $% [%peer p=path] :: subscribe + [%poke p=cage] :: apply + [%pull ~] :: unsubscribe + [%pump ~] :: pump yes/no + == :: +++ cuft :: internal gift + $% [%coup p=(unit tang)] :: poke result + [%quit ~] :: close subscription + [%reap p=(unit tang)] :: peer result + [%diff p=cage] :: subscription output + == :: +++ cuss (pair term club) :: internal kiss +++ suss (trel term ,@tas ,@da) :: config report +++ move ,[p=duct q=(mold note gift)] :: local move +++ note-ames :: weird ames move + $% [%make p=(unit ,@t) q=@ud r=@ s=?] :: + [%sith p=@p q=@uw r=?] :: + == :: +++ note-clay :: + $% [%font p=@p q=@tas r=@p s=@tas] :: + [%warp p=sock q=riff] :: wait for clay, hack + == :: +++ note-dill :: note to self, odd + $% [%crud p=@tas q=(list tank)] :: + [%init p=ship] :: + [%text p=tape] :: + [%veer p=@ta q=path r=@t] :: install vane + [%vega p=path] :: reboot by path + [%verb ~] :: verbose mode + == :: +++ note-behn :: + $% [%conf dock %load ship desk] :: + [%deal p=sock q=cuss] :: + == :: +++ note :: out request $-> + $% [%a note-ames] :: + [%b note-behn] :: + [%c note-clay] :: + [%d note-dill] :: + == :: +++ riff ,[p=desk q=(unit rave)] :: see %clay +++ sign-ames :: + $% [%nice ~] :: + [%init p=ship] :: + == :: +++ sign-behn :: see %behn + $% [%onto p=(unit tang)] :: + == :: +++ sign-clay :: + $% [%mere p=(each (set path) (pair term tang))] :: + [%note p=@tD q=tank] :: + [%writ p=riot] :: + == :: +++ sign-dill :: + $% [%blit p=(list blit)] :: + == :: +++ sign-behn :: + $% [%onto p=(each suss tang)] :: + [%unto p=cuft] :: + == :: +++ sign-time :: + $% [%wake ~] :: + == :: +++ sign :: in result $<- + $% [%a sign-ames] :: + [%b sign-behn] :: + [%c sign-clay] :: + [%d sign-dill] :: + [%t sign-time] :: + == :: +:::::::: :: dill tiles +-- +=| all=axle +|= [now=@da eny=@ ski=sled] :: current invocation +=> |% + ++ as :: per cause + |_ $: [moz=(list move) hen=duct our=ship] + axon + == + ++ abet :: resolve + ^- [(list move) axle] + [(flop moz) all(dug (~(put by dug.all) hen +<+))] + :: + ++ call :: receive input + |= kyz=kiss + ^+ +> + ?+ -.kyz ~& [%strange-kiss -.kyz] +> + %flow +> + %harm +> + %hail +> + %belt (send `dill-belt`p.kyz) + %text (from %out (tuba p.kyz)) + %crud :: (send `dill-belt`[%cru p.kyz q.kyz]) + (crud p.kyz q.kyz) + %blew (send %rez p.p.kyz q.p.kyz) + %veer (dump kyz) + %vega (dump kyz) + %verb (dump kyz) + == + :: + ++ crud + |= [err=@tas tac=(list tank)] + =+ ^= wol ^- wall + :- (trip err) + (zing (turn tac |=(a=tank (~(win re a) [0 wid])))) + |- ^+ +>.^$ + ?~ wol +>.^$ + $(wol t.wol, +>.^$ (from %out (tuba i.wol))) + :: + ++ dump :: pass down to hey + |= git=gift + ?> ?=(^ hey.all) + +>(moz [[u.hey.all %give git] moz]) + :: + ++ done :: return gift + |= git=gift + +>(moz :_(moz [hen %give git])) + :: + ++ from :: receive belt + |= bit=dill-blit + ^+ +> + ?: ?=(%mor -.bit) + |- ^+ +>.^$ + ?~ p.bit +>.^$ + $(p.bit t.p.bit, +>.^$ ^$(bit i.p.bit)) + ?: ?=(%out -.bit) + %+ done %blit + :~ [%lin p.bit] + [%mor ~] + [%lin see] + [%hop pos] + == + ?: ?=(%pro -.bit) + (done(see p.bit) %blit [[%lin p.bit] [%hop pos] ~]) + ?: ?=(%hop -.bit) + (done(pos p.bit) %blit [bit ~]) + ?: ?=(%qit -.bit) + (dump %logo ~) + (done %blit [bit ~]) + :: + ++ init :: initialize + ~& [%dill-init our] + =+ myt=(flop (need tem)) + =. tem ~ +<<<<<<< HEAD:urb/zod/base/arvo/dill.hoon + =. moz :_(moz [hen %pass / %c %font our %home our %base]) + =. moz :_(moz [hen %pass / %g %show [our [ram ~]] our ~]) +======= + =. moz :_(moz [hen %pass ~ %b %conf [[our ram] %load our %main]]) + =. moz :_(moz [hen %pass ~ %b %deal [our our] ram %peer ~]) +>>>>>>> newgall^:urb/zod/arvo/dill.hoon + |- ^+ +> + ?~ myt +> + $(myt t.myt, +> (send i.myt)) + :: + ++ into :: preinitialize + |= gyl=(list gill) + %_ +> + tem `(turn gyl |=(a=gill [%yow a])) + moz + :_ moz + :* hen + %pass + / + %c + [%warp [our our] %base `[%sing %y [%ud 1] /]] + == + == + :: + ++ send :: send action + |= bet=dill-belt + ?^ tem + +>(tem `[bet u.tem]) + %_ +> + moz + :_ moz + [hen %pass ~ %b %deal [our our] ram %poke [%dill-belt -:!>(bet) bet]] + == + :: + ++ pump :: send diff ack + %_ . + moz + :_(moz [hen %pass ~ %b %deal [our our] ram %pump ~]) + == + :: + ++ take :: receive + |= sih=sign + ^+ +> + ?- sih + [%a %nice *] + :: ~& [%take-nice-ames sih] + +> + :: + [%a %init *] + +>(moz :_(moz [hen %give +.sih])) + :: + [%c %mere *] + ?: ?=(%& -.p.sih) + +>.$ + ~| %dill-mere-fail + ~| p.p.p.sih + |- + ?~ q.p.p.sih !! + ~> %mean.|.(i.q.p.p.sih) :: interpolate ford fail into stack trace + $(q.p.p.sih t.q.p.p.sih) + :: + [%b %onto *] + :: ~& [%take-behn-onto +>.sih] + ?- -.+>.sih + %| (crud %onto p.p.+>.sih) + %& (done %blit [%lin (tuba "{}")]~) + == + :: + [%b %unto *] + :: ~& [%take-behn-unto +>.sih] + ?- -.+>.sih + %coup ?~(p.p.+>.sih +>.$ (crud %coup u.p.p.+>.sih)) + %quit !! :: ?? + %reap ?~(p.p.+>.sih +>.$ (crud %reap u.p.p.+>.sih)) + %diff pump:(from ((hard dill-blit) q:`vase`+>+>.sih)) + == + :: + [%c %note *] + (from %out (tuba p.sih ' ' ~(ram re q.sih))) + :: + [%c %writ *] + init + :: + [%d %blit *] + (done +.sih) + :: + [%t %wake *] + :: ~& %dill-wake + +> + == + -- + :: + ++ ax :: make ++as + |= [hen=duct kyz=kiss] :: + ?~ ore.all ~ + =+ nux=(~(get by dug.all) hen) + ?^ nux + (some ~(. as [~ hen u.ore.all] u.nux)) + ?. ?=(%flow -.kyz) ~ + %- some + %. q.kyz + %~ into as + :- [~ hen u.ore.all] + :* p.kyz + [~ ~] + 80 + 0 + (tuba "<{(trip p.kyz)}>") + == + -- +|% :: poke/peek pattern +++ call :: handle request + |= $: hen=duct + hic=(hypo (hobo kiss)) + == + ^- [p=(list move) q=_..^$] + => %= . :: XX temporary + q.hic + ^- kiss + ?: ?=(%soft -.q.hic) + :: ~& [%dill-call-soft (,@tas `*`-.p.q.hic)] + ((hard kiss) p.q.hic) + ?: (~(nest ut -:!>(*kiss)) | p.hic) q.hic + ~& [%dill-call-flub (,@tas `*`-.q.hic)] + ((hard kiss) q.hic) + == + ?: ?=(%boot -.q.hic) + :_(..^$ [hen %pass ~ (note %a p.q.hic)]~) + ?: ?=(%flog -.q.hic) + :: ~& [%dill-flog +.q.hic] + ?: ?=([%crud %hax-init [%leaf *] ~] p.q.hic) + =+ him=(slav %p (crip p.i.q.p.q.hic)) + :_(..^$ ?~(hey.all ~ [u.hey.all %give %init him]~)) + :_(..^$ ?~(hey.all ~ [u.hey.all %slip %d p.q.hic]~)) + =. hey.all ?^(hey.all hey.all `hen) + ?: ?=(%init -.q.hic) + :: ~& [%call-init hen] + ?: =(ore.all `p.q.hic) + [[hen %give q.hic]~ ..^$] + =: ore.all `p.q.hic + dug.all ~ + == + =+ ^= flo ^- (list (pair ship term)) + =+ myr=(clan p.q.hic) + ?: =(%pawn myr) + [[p.q.hic %dojo] ~] + ?: =(%earl myr) + =+ fap=(sein p.q.hic) + [[fap %dojo] [fap %talk] [fap %helm] ~] + [[p.q.hic %dojo] [p.q.hic %talk] [p.q.hic %helm] ~] + =^ moz all abet:(need (ax (need hey.all) [%flow %sole flo])) + ?: |((lth p.q.hic 256) (gte p.q.hic (bex 64))) [moz ..^$] :: XX HORRIBLE + [:_(moz [(need hey.all) %give %init p.q.hic]) ..^$] + =+ nus=(ax hen q.hic) + ?~ nus + ~& [%dill-no-flow q.hic] + [~ ..^$] + =^ moz all abet:(call:u.nus q.hic) + [moz ..^$] +:: +++ doze + |= [now=@da hen=duct] + ^- (unit ,@da) + ~ +:: +++ load :: trivial + |= old=axle + ..^$(all old) + :: |= old=* :: diable + :: ..^$(ore.all `~zod) +:: +++ scry + |= [fur=(unit (set monk)) ren=@tas his=ship syd=desk lot=coin tyl=path] + ^- (unit (unit cage)) + [~ ~] +:: +++ stay all +:: +++ take :: process move + |= [tea=wire hen=duct hin=(hypo sign)] + ^- [p=(list move) q=_..^$] + ?: =(~ ore.all) + ?: ?=([%a %init *] q.hin) + :: ~& [%take-init hen] + =. hey.all ?^(hey.all hey.all `hen) + [[[hen %give +.q.hin] ~] ..^$] + :: [~ ..^$] + ~& [%take-back q.hin] + [~ ..^$] + ?. (~(has by dug.all) hen) + ~& [%take-weird-sign q.hin] + ~& [%take-weird-hen hen] + [~ ..^$] + =+ our=?>(?=(^ ore.all) u.ore.all) + =^ moz all + abet:(~(take as [~ hen our] (~(got by dug.all) hen)) q.hin) + [moz ..^$] +-- + +:: good test diff --git a/base/dog/solid/gate.hook b/base/dog/solid/gate.hook index 37f65e490..abad320cf 100644 --- a/base/dog/solid/gate.hook +++ b/base/dog/solid/gate.hook @@ -21,6 +21,7 @@ =+ all=.*(0 ken) =+ ^= vay ^- (list ,[p=@tas q=@tas]) :~ [%$ %zuse] + [%b %behn] [%g %gall] [%f %ford] [%a %ames] From b8c3720c28c299cc2af33c01d15b84d334426237 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 7 May 2015 10:36:29 -0700 Subject: [PATCH 69/73] continuity roll 5 --- base/arvo/ames.hoon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 44406d338..372559a5a 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -457,7 +457,7 @@ vix=(bex +((cut 0 [25 2] mag))) :: width of sender tay=(cut 0 [27 5] mag) :: message type == - ?> =(4 vez) + ?> =(5 vez) ?> =(chk (end 0 20 (mug bod))) :+ [(end 3 wix bod) (cut 3 [wix vix] bod)] (kins tay) @@ -477,7 +477,7 @@ =+ tay=(ksin q.kec) %+ mix %+ can 0 - :~ [3 4] + :~ [3 5] [20 (mug bod)] [2 yax] [2 qax] @@ -1060,7 +1060,7 @@ ++ gnaw :: gnaw:am |= [kay=cape ryn=lane pac=rock] :: process packet ^- [p=(list boon) q=fort] - ?. =(4 (end 0 3 pac)) [~ fox] + ?. =(5 (end 0 3 pac)) [~ fox] =+ kec=(bite pac) ?: (goop p.p.kec) [~ fox] ?. (~(has by urb.ton.fox) q.p.kec) From c45ab986540a9aa467c5357b90d5bc8600753f54 Mon Sep 17 00:00:00 2001 From: vere Date: Thu, 7 May 2015 18:44:32 +0000 Subject: [PATCH 70/73] test roll 6 --- base/arvo/ames.hoon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 372559a5a..08474b94f 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -457,7 +457,7 @@ vix=(bex +((cut 0 [25 2] mag))) :: width of sender tay=(cut 0 [27 5] mag) :: message type == - ?> =(5 vez) + ?> =(6 vez) ?> =(chk (end 0 20 (mug bod))) :+ [(end 3 wix bod) (cut 3 [wix vix] bod)] (kins tay) @@ -477,7 +477,7 @@ =+ tay=(ksin q.kec) %+ mix %+ can 0 - :~ [3 5] + :~ [3 6] [20 (mug bod)] [2 yax] [2 qax] @@ -1060,7 +1060,7 @@ ++ gnaw :: gnaw:am |= [kay=cape ryn=lane pac=rock] :: process packet ^- [p=(list boon) q=fort] - ?. =(5 (end 0 3 pac)) [~ fox] + ?. =(6 (end 0 3 pac)) [~ fox] =+ kec=(bite pac) ?: (goop p.p.kec) [~ fox] ?. (~(has by urb.ton.fox) q.p.kec) From becc52fecd4a905178788138ff35fc57f3a52a2d Mon Sep 17 00:00:00 2001 From: vere Date: Thu, 7 May 2015 19:04:47 +0000 Subject: [PATCH 71/73] Revert "test roll 6" This reverts commit 638ad719a81d9e58f285c3d17ef4238741da6ff0. --- base/arvo/ames.hoon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 08474b94f..372559a5a 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -457,7 +457,7 @@ vix=(bex +((cut 0 [25 2] mag))) :: width of sender tay=(cut 0 [27 5] mag) :: message type == - ?> =(6 vez) + ?> =(5 vez) ?> =(chk (end 0 20 (mug bod))) :+ [(end 3 wix bod) (cut 3 [wix vix] bod)] (kins tay) @@ -477,7 +477,7 @@ =+ tay=(ksin q.kec) %+ mix %+ can 0 - :~ [3 6] + :~ [3 5] [20 (mug bod)] [2 yax] [2 qax] @@ -1060,7 +1060,7 @@ ++ gnaw :: gnaw:am |= [kay=cape ryn=lane pac=rock] :: process packet ^- [p=(list boon) q=fort] - ?. =(6 (end 0 3 pac)) [~ fox] + ?. =(5 (end 0 3 pac)) [~ fox] =+ kec=(bite pac) ?: (goop p.p.kec) [~ fox] ?. (~(has by urb.ton.fox) q.p.kec) From eccaacd790ebf1170ca65d03646df6d78a6f5aa1 Mon Sep 17 00:00:00 2001 From: Philip C Monk Date: Thu, 7 May 2015 16:32:37 -0400 Subject: [PATCH 72/73] revert errant clay change --- base/arvo/clay.hoon | 49 ++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/base/arvo/clay.hoon b/base/arvo/clay.hoon index 9de4c056a..6fc027053 100644 --- a/base/arvo/clay.hoon +++ b/base/arvo/clay.hoon @@ -2446,8 +2446,9 @@ :~ ^- move :* hen %pass /auto/(scot %p p.q.hic)/[q.q.hic]/(scot %p r.q.hic)/[s.q.hic] - %c %warp [p.q.hic r.q.hic] s.q.hic ~ %sing - %w [%da now] / + %c %merg [p q r s %init]:q.hic + :: %c %warp [p.q.hic r.q.hic] s.q.hic ~ %sing + :: %w [%da now] / == == :: @@ -2666,28 +2667,30 @@ [[- ~] ..^$] :: %writ - ?~ p.q.hin - ~& "bad %writ response on autosync" - [~ ..^$] - =. sor.ruf - ?. ?=(%w p.p.u.p.q.hin) - sor.ruf - %+ ~(put by sor.ruf) - [our syd her sud] - [((hard ,@ud) q.q.r.u.p.q.hin) hen] =+ nex=let:(~(got by sor.ruf) our syd her sud) - =+ (~(get by fat.ruf) our) - ?~ - - ~& [%autsync-no-local-ship our] - [~ ..^$] - =+ (~(get by dos.u.-) syd) - =+ ^= sar - ?~ - - %init - ?: =(0 let.dom.u.-) - %init - %mate - [[hen %pass tea %c %merg our syd her sud sar]~ ..^$] + [[hen %pass tea %c %merg our syd her sud %mate]~ ..^$] + :: ?~ p.q.hin + :: ~& "bad %writ response on autosync" + :: [~ ..^$] + :: =. sor.ruf + :: ?. ?=(%w p.p.u.p.q.hin) + :: sor.ruf + :: %+ ~(put by sor.ruf) + :: [our syd her sud] + :: [((hard ,@ud) q.q.r.u.p.q.hin) hen] + ::=+ nex=let:(~(got by sor.ruf) our syd her sud) + ::=+ (~(get by fat.ruf) our) + ::?~ - + :: ~& [%autsync-no-local-ship our] + :: [~ ..^$] + ::=+ (~(get by dos.u.-) syd) + ::=+ ^= sar + :: ?~ - + :: %init + :: ?: =(0 let.dom.u.-) + :: %init + :: %mate + ::[[hen %pass tea %c %merg our syd her sud sar]~ ..^$] :: %c %merg [p q r s %init]:q.hic == ?: ?=([%blab care @ @ *] tea) From 60eb11a0f70aef14ce8c0d802b60aafba5c929dd Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Thu, 7 May 2015 14:14:39 -0700 Subject: [PATCH 73/73] fix ames begin to talk to gall --- base/arvo/ames.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/arvo/ames.hoon b/base/arvo/ames.hoon index 372559a5a..2b7c0ae85 100644 --- a/base/arvo/ames.hoon +++ b/base/arvo/ames.hoon @@ -1716,7 +1716,7 @@ :+ (scot %p p.p.bon) (scot %p q.p.bon) q.q.bon - [hen %pass pax %b %rote p.bon /helm 0 %m %will wil]~ + [hen %pass pax %g %rote p.bon /helm 0 %m %will wil]~ ?> ?=([@ @ *] t.q.q.bon) :_ fox =+ [cak=i.t.q.q.bon ven=i.t.t.q.q.bon]