From 79b91ebd7a06aa0aab19492304f0dc7a2fc79245 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 18 Jul 2014 17:51:22 -0700 Subject: [PATCH 1/4] New ford skeleton; some hoon cleanups --- arvo/ford.hoon | 276 +++++++++++++++++++++++++++++++++++++++++-------- arvo/hoon.hoon | 27 ++--- 2 files changed, 247 insertions(+), 56 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 1468db6d06..06ee62ed1a 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -1,4 +1,4 @@ -:::::: +!::::: :: :: %ford, new execution control !? 164 :::: @@ -11,20 +11,33 @@ $% [%made p=(each bead (list tank))] :: computed result == :: ++ hood :: assembly plan - $: sum=@t :: summary text - mol=(map term beam) :: models - res=(map logo (map term beam)) :: data resources - sys=$|(@ud [@ud @ud]) :: system version - gel=(list hoop) :: telescoping stack + $: [how=beam rem=spur] :: beam and remainder + zus=@ud :: zuse kelvin + pro=(list hoof) :: protocols + lib=(list hoof) :: libraries + :: res=(map term (pair beam horn)) :: resources + src=(list hoop) :: program + == :: +++ hoof :: reference + $% [%here p=term] :: name + [%this p=term q=case] :: name, case + [%that p=term q=case r=ship] :: name, case, ship == :: ++ hoop :: source in hood $% [%code p=twig] :: direct twig [%cone p=beam] :: core from folder [%coop p=(map term hoop)] :: complex core - [%hood p=hood] :: recursive hood - [%hoon p=beam] :: load %hoon + [%hood p=beam] :: recursive hood [%text p=@] :: direct text == :: +++ horn :: resource tree + $| ~ :: leaf + $% [%day p=horn] :: list by time + [%fan p=(map term horn)] :: tuple + [%for p=logo q=horn] :: leaf mark + [%hub p=horn] :: list by number + [%nap p=horn] :: soft map + == :: ++ kiss :: in request ->$ $% [%exec p=@p q=(unit silk)] :: make / kill == :: @@ -51,10 +64,11 @@ [%cast p=logo q=beak r=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 + [%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=silk q=sill] :: twig construction + [%ride p=silk q=sill] :: obsolete old plan [%vale p=logo q=sack r=*] :: validate [our his] == :: ++ sill :: code construction @@ -102,8 +116,9 @@ dep=(set beam) :: dependencies == :: ++ calx :: concrete cache line - $% [%comp p=calm q=(pair path cage) r=twig] :: compile by text + $% [%hood p=calm q=cage r=hood] :: compile to hood [%slap p=calm q=[p=vase q=twig] r=vase] :: slap + [%twig p=calm q=cage r=twig] :: compile to twig == :: ++ task :: problem in progress $: nah=duct :: cause @@ -116,7 +131,7 @@ |* sem=* :: a typesystem hack |= cax=calx ?+ sem !! - %comp ?>(?=(%comp -.cax) r.cax) + %twig ?>(?=(%twig -.cax) r.cax) %slap ?>(?=(%slap -.cax) r.cax) == :: @@ -356,28 +371,87 @@ |= gef=gift %_(+> mow :_(mow [hen %give gef])) :: - ++ fade :: compile - |= [cof=cafe kas=silk] - ^- (bolt twig) - =+ pax=(home kas) - %+ (clef %comp) (maid cof pax kas) - ^- (burg (pair path cage) twig) - |= [cof=cafe pay=(pair path cage)] - ?. ?=(@ q.q.q.pay) + ++ fade :: compile %hood + |= [cof=cafe bem=beam rem=spur] + ^- (bolt hood) + =+ rul=(fair bem rem) + %+ (clef %hood) (make cof [%bake %hoon bem rem]) + ^- (burg cage hood) + |= [cof=cafe cay=cage] + ?. ?=(@ q.q.cay) (flaw cof ~) - =+ rul=(ifix [gay gay] tall:(vang | pax)) - =+ vex=((full rul) [[1 1] (trip q.q.q.pay)]) + =+ vex=((full rul) [[1 1] (trip q.q.cay)]) ?~ q.vex (flaw cof [%leaf "syntax error: {} {}"] ~) (fine cof p.u.q.vex) :: + ++ fane :: compile %hoon + |= [cof=cafe kas=silk] + ^- (bolt twig) + =+ pax=(home kas) + %+ (clef %twig) (make cof kas) + ^- (burg cage twig) + |= [cof=cafe cay=cage] + ?. ?=(@ q.q.cay) + (flaw cof ~) + =+ rul=(ifix [gay gay] tall:(vang | pax)) + =+ vex=((full rul) [[1 1] (trip q.q.cay)]) + ?~ q.vex + (flaw cof [%leaf "syntax error: {} {}"] ~) + (fine cof p.u.q.vex) + :: + ++ fair :: hood parsing rule + |= [bem=beam rem=spur] + =+ vez=(vang | (tope bem)) + =< hood + |% + ++ case + %- sear + :_ nuck:so + |= a=coin + ?. ?=([%$ ?(%da %ud %tas) *] a) ~ + [~ u=(^case a)] + :: + ++ hood + %+ cook |=(a=^hood a) + %+ stag [bem rem] + ;~ plug + (ifix [;~(plug pat wut gap) gap] dem) + hoos + hoos + (star hoop) + == + :: + ++ hoof + %+ cook |=(a=^hoof a) + ;~ pose + %+ stag %that + ;~(plug sym ;~(pfix fas case) ;~(pfix ;~(plug fas sig) fed:ag)) + :: + (stag %this ;~(plug sym ;~(pfix fas case))) + (stag %here sym) + == + :: + ++ hoos + %+ cook |=(a=(list ^hoof) a) + ;~ pose + (ifix [;~(plug pat lus gap) gap] (most ;~(plug com ace) hoof)) + (easy ~) + == + :: + ++ hoop + %+ knee *^hoop |. ~+ + %+ cook |=(a=^hoop a) + (stag %code tall:vez) + -- + :: ++ gush :: sill to twig |= [cof=cafe sil=sill] ^- (bolt twig) ?+ -.sil !! - %dire (fade cof [%done ~ [%atom [%atom %$] p.sil]]) + %dire (fane cof [%done ~ [%atom [%atom %$] p.sil]]) %dirt (fine cof p.sil) - %drag (fade cof [%boil %hoon p.sil q.sil]) + %drag (fane cof [%boil %hoon p.sil q.sil]) %drug %+ cope (make cof p.sil) |= [cof=cafe cay=cage] (fine cof (twig q.q.cay)) @@ -430,12 +504,9 @@ ++ krab :: load to vase |= [cof=cafe for=logo how=logo bem=beam rem=spur] ^- (bolt vase) - %+ cope (fade cof %bake how bem rem) + %+ cope (fane cof %bake how bem rem) |= [cof=cafe gen=twig] (maim cof pit gen) - :: %+ cope (maim cof pit gen) - :: |= [cof=cafe gat=vase] - :: (maul cof gat !>([`beak`[p.bem q.bem r.bem] for +:s.bem rem])) :: ++ lace :: load and check |= [cof=cafe for=logo bem=beam rem=spur] @@ -609,11 +680,24 @@ ^$(cof cof, for i.yaw, yaw t.yaw, vax yed) :: ++ maid :: make with path tag - |= [cof=cafe pax=path kas=silk] + |= [cof=cafe kas=silk] ^- (bolt (pair path cage)) %+ cope (make cof kas) |= [cof=cafe cay=cage] - (fine cof pax cay) + (fine cof (home kas) cay) + :: + ++ maim :: slap + |= [cof=cafe vax=vase gen=twig] + ^- (bolt vase) + %+ (clef %slap) (fine cof vax gen) + |= [cof=cafe vax=vase gen=twig] + =+ puz=(mule |.((~(mint ut p.vax) [%noun gen]))) + ?- -.puz + | (flaw cof p.puz) + & %+ (coup cof) (mock [q.vax q.p.puz] (mole ska)) + |= val=* + `vase`[p.p.puz val] + == :: ++ make :: reduce silk |= [cof=cafe kas=silk] @@ -684,6 +768,11 @@ $(kas [%done p.kas u.q.kas]) :: %mute (kale cof p.kas q.kas) + %plan + %+ cope (abut:(meow p.kas q.kas) cof r.kas) + |= [cof=cafe vax=vase] + (fine cof %noun vax) + :: %reef (fine cof %noun pit) %ride %+ cool |.(leaf/"ford: ride {<`@p`(mug kas)>}") @@ -704,19 +793,6 @@ (fine cof `cage`[p.kas u.vux]) == :: - ++ maim :: slap - |= [cof=cafe vax=vase gen=twig] - ^- (bolt vase) - %+ (clef %slap) (fine cof vax gen) - |= [cof=cafe vax=vase gen=twig] - =+ puz=(mule |.((~(mint ut p.vax) [%noun gen]))) - ?- -.puz - | (flaw cof p.puz) - & %+ (coup cof) (mock [q.vax q.p.puz] (mole ska)) - |= val=* - `vase`[p.p.puz val] - == - :: ++ maul :: slam |= [cof=cafe gat=vase sam=vase] ^- (bolt vase) @@ -728,6 +804,120 @@ `vase`[p.top val] == :: + ++ meow :: assemble + |= [how=beam rem=spur] + =| $: rop=(map term (pair hoof twig)) :: protocols known + bil=(map term (pair hoof twig)) :: libraries known + lot=(list term) :: library stack + zeg=(set term) :: library guard + boy=(list twig) :: body stack + == + |% + ++ abut :: generate + |= [cof=cafe hyd=hood] + %+ cope (apex cof hyd) + |= [cof=cafe sel=_..abut] + (maim cof pit able:sel) + :: + ++ able :: assemble preamble + ^- twig + :+ %tsgr + ?:(=(~ rop) [%$ 1] [%brcn (~(run by rop) |=([* a=twig] [%ash a]))]) + :+ %tsgr + [%tssg (turn (flop lot) |=(a=term q:(need (~(get by bil) a))))] + [%tssg (flop boy)] + :: + ++ apex :: build to body + |= [cof=cafe hyd=hood] + ^- (bolt ,_..apex) + %+ cope (body cof src.hyd) + |= [cof=cafe sel=_..apex] + =. ..apex sel + %+ cope (neck cof lib.hyd) + |= [cof=cafe sel=_..apex] + =. ..apex sel + %+ cope (head cof pro.hyd) + |= [cof=cafe sel=_..apex] + (fine cof sel) + :: + ++ body :: produce functions + |= [cof=cafe src=(list hoop)] + ^- (bolt _..body) + ?~ src (fine cof ..body) + %+ cope (wilt cof i.src) + |= [cof=cafe sel=_..body] + ^$(cof cof, src t.src, ..body sel) + :: + ++ head :: consume protocols + |= [cof=cafe bir=(list hoof)] + |- ^- (bolt ,_..head) + ?~ bir (fine cof ..head) + =+ cog=(heck i.bir) + =+ byf=(~(get by rop) cog) + ?^ byf + ?. =(`hoof`i.bir `hoof`p.u.byf) + (flaw cof [%leaf "protocol mismatch: {<~[cog p.u.byf i.bir]>}"]~) + $(bir t.bir) + =+ bem=(hone %pro i.bir) + %+ cope (fade cof bem ~) + |= [cof=cafe hyd=hood] + %+ cope (apex(lot ~) cof hyd) + |= [cof=cafe sel=_..neck] + =. ..head + %= sel + zeg zeg + rop (~(put by rop) cog [i.bir [%tssg (flop boy.sel)]]) + == + ^^$(cof cof, bir t.bir) + :: + ++ heck :: hoof to name + |= huf=hoof ^- term + ?-(-.huf %here p.huf, %this p.huf, %that p.huf) + :: + ++ hone :: plant hoof + |= [way=@tas huf=hoof] + ^- beam + ?- -.huf + %here how(s ~[p.huf way]) + %this [[p.how %main q.huf] ~[p.huf way]] + %that [[r.huf %main q.huf] ~[p.huf way]] + == + :: + ++ neck :: consume libraries + |= [cof=cafe bir=(list hoof)] + ^- (bolt ,_..neck) + ?~ bir (fine cof ..neck) + =+ cog=(heck i.bir) + ?: (~(has in zeg) cog) + (flaw cof [%leaf "circular dependency: {<~[cog i.bir]>}"]~) + =+ goz=(~(put in zeg) cog) + =+ byf=(~(get by bil) cog) + ?^ byf + ?. =(`hoof`i.bir `hoof`p.u.byf) + (flaw cof [%leaf "library mismatch: {<~[cog p.u.byf i.bir]>}"]~) + $(bir t.bir) + =+ bem=(hone %lib i.bir) + %+ cope (fade cof bem ~) + |= [cof=cafe hyd=hood] + %+ cope (apex(zeg goz, boy ~) cof hyd) + |= [cof=cafe sel=_..neck] + =. ..neck + %= sel + zeg zeg + lot [cog lot] + bil (~(put by bil) cog [i.bir [%tssg (flop boy.sel)]]) + == + ^^$(cof cof, bir t.bir) + :: + ++ wilt :: process body entry + |= [cof=cafe hop=hoop] + ^- (bolt _..wilt) + ?+ -.hop !! + %code (fine cof ..wilt(boy [p.hop boy])) + %hood (cope (fade cof p.hop ~) apex) + == + -- + :: ++ resp |= [tik=@ud rot=riot] ^+ ..zo diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 2b6369f991..a7443f8915 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -15,7 +15,7 @@ :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: ~% %k.164 ~ ~ :: |% :: -++ stub %164 :: version stub +++ hoon %164 :: version stub -- :: :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::: :::::: volume 1, Hoon models :::::: @@ -1435,7 +1435,8 @@ :::::::::::: - ++ add |= [b=@u p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@s a=@u] + ++ add |= [b=@u p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] + ^- [s=? e=@s a=@u] =+ g=(gar:te:fl b n m) ?: ?=(^ g) u.g @@ -1457,7 +1458,8 @@ =+ e2=(sum:si (sun:si dif2) e.n) (pro:te:fl b p [s=|(s.n s.m) e=e2 a=(lia p a3)]) - ++ sub |= [b=@u p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@s a=@u] + ++ sub |= [b=@u p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] + ^- [s=? e=@s a=@u] =+ g=(gar:te:fl b n m) ?: ?=(^ g) u.g @@ -1522,9 +1524,8 @@ ++ gth |= [n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- ? (lte m n) -- - -:: Real interface for @rd -++ rd +:: +++ rd :: core for @rd ~% %rd + ~ |% :: Convert a sign/exp/ari cell into 64 bit atom @@ -6667,10 +6668,10 @@ :: [%zpwt *] ?: ?: ?=(@ p.gen) - (lte stub p.gen) - &((lte stub p.p.gen) (gte stub q.p.gen)) + (lte hoon p.gen) + &((lte hoon p.p.gen) (gte hoon q.p.gen)) q.gen - ~|([%stub-fail stub p.gen] !!) + ~|([%hoon-fail hoon p.gen] !!) :: * gen == @@ -9964,7 +9965,7 @@ ++ peek :: external inspect |= [now=@da hap=path] ^- (unit) - ?~ hap [~ stub] + ?~ hap [~ hoon] =+ rob=((slod ~(beck (is vil eny bud fan) now)) hap) ?~ rob ~ ?~ u.rob ~ @@ -9992,9 +9993,9 @@ =+ ^= nex =+ gat=.*(ken .*(ken [0 87])) (need ((hard (unit ,@)) .*([-.gat [[now ~] +>.gat]] -.gat))) - ~& [%vega-compiled stub nex] - ?> (lte nex stub) - =+ gat=.*(ken .*(ken [0 ?:(=(nex stub) 86 11)])) + ~& [%vega-compiled hoon nex] + ?> (lte nex hoon) + =+ gat=.*(ken .*(ken [0 ?:(=(nex hoon) 86 11)])) =+ sam=[eny ova fan] =+ raw=.*([-.gat [sam +>.gat]] -.gat) [[[~ %vega hap] ((list ovum) -.raw)] +.raw] From ac488f6225a481b7924b9814ede6cd755280fd92 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 18 Jul 2014 19:45:10 -0700 Subject: [PATCH 2/4] We are very close to the memory limit on :solid! --- arvo/ford.hoon | 10 ++- arvo/hoon.hoon | 26 +------ arvo/zuse.hoon | 191 ++----------------------------------------------- 3 files changed, 15 insertions(+), 212 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 06ee62ed1a..1a8238b686 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -1,4 +1,4 @@ -!::::: +:::::: :: :: %ford, new execution control !? 164 :::: @@ -371,7 +371,7 @@ |= gef=gift %_(+> mow :_(mow [hen %give gef])) :: - ++ fade :: compile %hood + ++ fade :: compile %hoo |= [cof=cafe bem=beam rem=spur] ^- (bolt hood) =+ rul=(fair bem rem) @@ -516,6 +516,12 @@ |= [cof=cafe arc=arch] ?^ q.arc (cope (liar cof bem) (lake for bek)) + ?: (~(has by r.arc) %hood) + %+ cope (fade cof bem rem) + |= [cof=cafe hyd=hood] + %+ cope (abut:(meow bem rem) cof hyd) + |= [cof=cafe vax=vase] + (fine cof ~ vax) ?: (~(has by r.arc) %hook) %+ cope (krab cof for %hook bem rem) |= [cof=cafe vax=vase] diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 4c791069f9..a103898fc3 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -1432,8 +1432,6 @@ ?: (zer b p n) [~ "0"] ~ -- - - :::::::::::: ++ add |= [b=@u p=@u n=[s=? e=@s a=@u] m=[s=? e=@s a=@u]] ^- [s=? e=@s a=@u] @@ -3562,7 +3560,7 @@ (stag ~ zust) (stag %many (ifix [cab ;~(plug cab cab)] (more cab nusk))) == - ++ royl !: + ++ royl =+ ^= zer (cook lent (star (just '0'))) =+ ^= voy @@ -9457,7 +9455,6 @@ :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::: :::::: volume 3, Arvo models and skeleton :::::: :::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::: -!: |% ++ arch ,[p=@uvI q=(unit ,@uvI) r=(map ,@ta ,~)] :: fundamental node ++ arvo (mold ,[p=term q=mill] mill) :: arvo card @@ -9536,7 +9533,7 @@ == :: ++ wire path :: event pretext ::::: hacks -++ slod !: +++ slod |= sed=sled ^- slut |= raw=* @@ -9559,27 +9556,10 @@ ?~ bop ~ ?~ u.bop [~ ~] [~ ~ q.q.u.u.bop] -:: -++ slub !: - |= sul=slut - ^- sled - |= [fur=(unit (set monk)) ron=term bed=beam] - ^- (unit (unit cage)) - =+ ^= pax ^- path - :* ron - (scot %p p.bed) - q.bed - (scot r.bed) - (flop s.bed) - == - =+ bop=(sul pax) - ?~ bop ~ - ?~ u.bop [~ ~] - [~ ~ [%$ %noun u.u.bop]] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bE, Arvo core :: :: -++ vent !: :: vane core +++ vent :: vane core |= [lal=@tas vil=vile bud=vase ves=vase] |% ++ ruck :: update vase diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index c6a0246fa7..8be3386f4c 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -232,7 +232,7 @@ ~|(%test-fail-seal !!) msg :: -++ crub !: :: cryptosuite B (Ed) +++ crub :: cryptosuite B (Ed) ^- acru =| [puc=pass sed=ring] => |% @@ -987,7 +987,7 @@ %- flop myz:(dist:(zu ank) %c bus) :: -++ ze !: +++ ze |_ [lim=@da dome] ++ aeon :: aeon:ze |= lok=case :: act count through @@ -1528,7 +1528,7 @@ +>(ank ank:(durn:(zu ank) nyp)) -- :: -++ zu !: :: filesystem +++ zu :: filesystem |= ank=ankh :: filesystem state =| myz=(list tako) :: changes in reverse =| ram=path :: reverse path into @@ -2067,190 +2067,7 @@ |= lag=lang ^- (unit tape) ?+ lag ~ - %aa [~ "Afar"] - %ab [~ "Abkhazian"] - %ae [~ "Avestan"] - %af [~ "Afrikaans"] - %ak [~ "Akan"] - %am [~ "Amharic"] - %an [~ "Aragonese"] - %ar [~ "Arabic"] - %as [~ "Assamese"] - %av [~ "Avaric"] - %ay [~ "Aymara"] - %az [~ "Azerbaijani"] - %ba [~ "Bashkir"] - %be [~ "Belarusian"] - %bg [~ "Bulgarian"] - %bh [~ "Bihari"] - %bi [~ "Bislama"] - %bm [~ "Bambara"] - %bn [~ "Bengali"] - %bo [~ "Tibetan"] - %br [~ "Breton"] - %bs [~ "Bosnian"] - %ca [~ "Catalan"] - %ce [~ "Chechen"] - %ch [~ "Chamorro"] - %co [~ "Corsican"] - %cr [~ "Cree"] - %cs [~ "Czech"] - %cu [~ "Slavonic"] - %cv [~ "Chuvash"] - %cy [~ "Welsh"] - %da [~ "Danish"] - %de [~ "German"] - %dv [~ "Maldivian"] - %dz [~ "Dzongkha"] - %ee [~ "Ewe"] - %el [~ "Greek"] - %en [~ "English"] - %eo [~ "Esperanto"] - %es [~ "Spanish"] - %et [~ "Estonian"] - %eu [~ "Basque"] - %fa [~ "Persian"] - %ff [~ "Fulah"] - %fi [~ "Finnish"] - %fj [~ "Fijian"] - %fo [~ "Faroese"] - %fr [~ "French"] - %fy [~ "Frisian"] - %ga [~ "Irish Gaelic"] - %gd [~ "Scottish Gaelic"] - %gl [~ "Galician"] - %gn [~ "Guarani"] - %gu [~ "Gujarati"] - %gv [~ "Manx"] - %ha [~ "Hausa"] - %he [~ "Hebrew"] - %hi [~ "Hindi"] - %ho [~ "Hiri Motu"] - %hr [~ "Croatian"] - %ht [~ "Haitian Creole"] - %hu [~ "Hungarian"] - %hy [~ "Armenian"] - %hz [~ "Herero"] - %ia [~ "Interlingua"] - %id [~ "Indonesian"] - %ie [~ "Occidental"] - %ig [~ "Igbo"] - %ii [~ "Nuosu"] - %ik [~ "Inupiaq"] - %io [~ "Ido"] - %is [~ "Icelandic"] - %it [~ "Italian"] - %iu [~ "Inuktitut"] - %ja [~ "Japanese"] - %jv [~ "Javanese"] - %ka [~ "Georgian"] - %kg [~ "Kongo"] - %ki [~ "Kikuyu"] - %kj [~ "Kwanyama"] - %kk [~ "Kazakh"] - %kl [~ "Kalaallisut"] - %km [~ "Central Khmer"] - %kn [~ "Kannada"] - %ko [~ "Korean"] - %kr [~ "Kanuri"] - %ks [~ "Kashmiri"] - %ku [~ "Kurdish"] - %kv [~ "Komi"] - %kw [~ "Cornish"] - %ky [~ "Kyrgyz"] - %la [~ "Latin"] - %lb [~ "Luxembourgish"] - %lg [~ "Ganda"] - %li [~ "Limburgish"] - %ln [~ "Lingala"] - %lo [~ "Lao"] - %lt [~ "Lithuanian"] - %lu [~ "Luba-Katanga"] - %lv [~ "Latvian"] - %mg [~ "Malagasy"] - %mh [~ "Marshallese"] - %mi [~ "Maori"] - %mk [~ "Macedonian"] - %ml [~ "Malayalam"] - %mn [~ "Mongolian"] - %mr [~ "Marathi"] - %ms [~ "Malay"] - %mt [~ "Maltese"] - %my [~ "Burmese"] - %na [~ "Nauru"] - %nb [~ "Norwegian Bokmål"] - %nd [~ "North Ndebele"] - %ne [~ "Nepali"] - %ng [~ "Ndonga"] - %nl [~ "Dutch"] - %nn [~ "Norwegian Nynorsk"] - %no [~ "Norwegian"] - %nr [~ "South Ndebele"] - %nv [~ "Navajo"] - %ny [~ "Chichewa"] - %oc [~ "Occitan"] - %oj [~ "Ojibwa"] - %om [~ "Oromo"] - %or [~ "Oriya"] - %os [~ "Ossetian"] - %pa [~ "Punjabi"] - %pi [~ "Pali"] - %pl [~ "Polish"] - %ps [~ "Pashto"] - %pt [~ "Portuguese"] - %qu [~ "Quechua"] - %rm [~ "Romansh"] - %rn [~ "Rundi"] - %ro [~ "Romanian"] - %ru [~ "Russian"] - %rw [~ "Kinyarwanda"] - %sa [~ "Sanskrit"] - %sc [~ "Sardinian"] - %sd [~ "Sindhi"] - %se [~ "Northern Sami"] - %sg [~ "Sango"] - %si [~ "Sinhala"] - %sk [~ "Slovak"] - %sl [~ "Slovenian"] - %sm [~ "Samoan"] - %sn [~ "Shona"] - %so [~ "Somali"] - %sq [~ "Albanian"] - %sr [~ "Serbian"] - %ss [~ "Swati"] - %st [~ "Sotho"] - %su [~ "Sundanese"] - %sv [~ "Swedish"] - %sw [~ "Swahili"] - %ta [~ "Tamil"] - %te [~ "Telugu"] - %tg [~ "Tajik"] - %th [~ "Thai"] - %ti [~ "Tigrinya"] - %tk [~ "Turkmen"] - %tl [~ "Tagalog"] - %tn [~ "Tswana"] - %to [~ "Tonga"] - %tr [~ "Turkish"] - %ts [~ "Tsonga"] - %tt [~ "Tatar"] - %tw [~ "Twi"] - %ty [~ "Tahitian"] - %ug [~ "Uighur"] - %uk [~ "Ukrainian"] - %ur [~ "Urdu"] - %uz [~ "Uzbek"] - %ve [~ "Venda"] - %vi [~ "Vietnamese"] - %vo [~ "Volapük"] - %wa [~ "Walloon"] - %wo [~ "Wolof"] - %xh [~ "Xhosa"] - %yi [~ "Yiddish"] - %yo [~ "Yoruba"] - %za [~ "Zhuang"] - %zh [~ "Chinese"] - %zu [~ "Zulu"] + %en [~ "English"] :: deleted others, memory crunch! == :: ++ gnow From 33782452819f8d2f9052b33a7d39c1779fcca6d8 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 20 Jul 2014 20:15:02 -0700 Subject: [PATCH 3/4] Functional build skeleton. --- arvo/ames.hoon | 10 +- arvo/ford.hoon | 47 +- arvo/zuse.hoon | 1824 +++++++++++++++++++------------------- main/bin/solid.hoon | 2 +- main/doc/synth/down.hood | 36 + main/doc/synth/down.hook | 3 - main/doc/synth/down.hoon | 7 +- 7 files changed, 986 insertions(+), 943 deletions(-) create mode 100644 main/doc/synth/down.hood diff --git a/arvo/ames.hoon b/arvo/ames.hoon index 60b521ac42..7671300612 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -492,7 +492,7 @@ +>.$(hoc.saf (~(put by hoc.saf) her [[~31337.1.1 ~ wil] ~ *clot])) :: ++ lax :: lax:as:go - |_ [her=ship dur=door] :: per client + |_ [her=ship dur=dore] :: per client ++ cluy :: cluy:lax:as:go ^- [p=life q=gens r=acru] :: client crypto ?~ lew.wod.dur !! @@ -683,19 +683,19 @@ -- :: --zuul:lax:as:go -- :: --lax:as:go :: - ++ gur :: default door + ++ gur :: default dore |= her=ship - ^- door + ^- dore =+ def=?.((lth her 256) ~ [~ %if ~2000.1.1 0 (mix her .0.0.1.0)]) [[~2100.1.1 def ~] ~ *clot] :: - ++ myx :: door by ship + ++ myx :: dore by ship |= her=ship ^+ lax =+ fod=(~(get by hoc.saf) her) ~(. lax [her ?~(fod (gur her) u.fod)]) :: - ++ nux :: install door + ++ nux :: install dore |= new=_lax ^+ +> +>(hoc.saf (~(put by hoc.saf) her.new dur.new)) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index 1a8238b686..a1aa0d12c5 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -10,8 +10,14 @@ ++ gift :: out result <-$ $% [%made p=(each bead (list tank))] :: computed result == :: +++ heel path :: functional ending +++ hock :: standard label + $: [%c p=@ud] :: celsius version + [%k p=@ud] :: kelvin version + [%s p=@ud q=@ud r=@ud] :: semantic version + == :: ++ hood :: assembly plan - $: [how=beam rem=spur] :: beam and remainder + $: [how=beam rem=heel] :: beam and remainder zus=@ud :: zuse kelvin pro=(list hoof) :: protocols lib=(list hoof) :: libraries @@ -131,6 +137,7 @@ |* sem=* :: a typesystem hack |= cax=calx ?+ sem !! + %hood ?>(?=(%hood -.cax) r.cax) %twig ?>(?=(%twig -.cax) r.cax) %slap ?>(?=(%slap -.cax) r.cax) == @@ -371,8 +378,8 @@ |= gef=gift %_(+> mow :_(mow [hen %give gef])) :: - ++ fade :: compile %hoo - |= [cof=cafe bem=beam rem=spur] + ++ fade :: compile %hood + |= [cof=cafe bem=beam rem=heel] ^- (bolt hood) =+ rul=(fair bem rem) %+ (clef %hood) (make cof [%bake %hoon bem rem]) @@ -401,8 +408,8 @@ (fine cof p.u.q.vex) :: ++ fair :: hood parsing rule - |= [bem=beam rem=spur] - =+ vez=(vang | (tope bem)) + |= [bem=beam rem=heel] + =+ vez=(vang | (tope bem(s (weld rem s.bem)))) =< hood |% ++ case @@ -413,10 +420,14 @@ [~ u=(^case a)] :: ++ hood + %+ ifix [gay gay] %+ cook |=(a=^hood a) %+ stag [bem rem] ;~ plug - (ifix [;~(plug pat wut gap) gap] dem) + ;~ pose + (ifix [;~(plug pat wut gap) gap] dem) + (easy zuse) + == hoos hoos (star hoop) @@ -502,14 +513,14 @@ (fine cof p.cay vax) :: ++ krab :: load to vase - |= [cof=cafe for=logo how=logo bem=beam rem=spur] + |= [cof=cafe for=logo how=logo bem=beam rem=heel] ^- (bolt vase) %+ cope (fane cof %bake how bem rem) |= [cof=cafe gen=twig] (maim cof pit gen) :: ++ lace :: load and check - |= [cof=cafe for=logo bem=beam rem=spur] + |= [cof=cafe for=logo bem=beam rem=heel] ^- (bolt (unit vase)) =+ bek=`beak`[p.bem q.bem r.bem] %+ cope (lend cof bem) @@ -537,7 +548,7 @@ |= [for=logo bek=beak] |= [cof=cafe sam=vase] ^- (bolt (unit vase)) - ?: ?=(?(%gate %core %hoon %hook) for) + ?: ?=(?(%gate %core %hoon %hook %hood) for) (fine cof ~ sam) %+ cope (make cof %boil %gate [[p.bek %main r.bek] /ref/[for]/sys] ~) |= [cof=cafe cay=cage] @@ -600,7 +611,7 @@ (fine cof ?.(=(%hoon for) all [%hoot all])) :: ++ lima :: load at depth - |= [cof=cafe for=logo bem=beam rem=spur] + |= [cof=cafe for=logo bem=beam rem=heel] ^- (bolt (unit vase)) %+ cope (lend cof bem) |= [cof=cafe arc=arch] @@ -620,7 +631,7 @@ (fine cof ~ vax) :: ++ lime :: load beam - |= [cof=cafe for=logo bem=beam rem=spur] + |= [cof=cafe for=logo bem=beam rem=heel] =+ [mob=bem mer=(flop rem)] |- ^- (bolt vase) %+ cope (lima cof for mob (flop mer)) @@ -811,7 +822,7 @@ == :: ++ meow :: assemble - |= [how=beam rem=spur] + |= [how=beam rem=heel] =| $: rop=(map term (pair hoof twig)) :: protocols known bil=(map term (pair hoof twig)) :: libraries known lot=(list term) :: library stack @@ -864,7 +875,7 @@ ?. =(`hoof`i.bir `hoof`p.u.byf) (flaw cof [%leaf "protocol mismatch: {<~[cog p.u.byf i.bir]>}"]~) $(bir t.bir) - =+ bem=(hone %pro i.bir) + =+ bem=(hone %gate %pro i.bir) %+ cope (fade cof bem ~) |= [cof=cafe hyd=hood] %+ cope (apex(lot ~) cof hyd) @@ -881,12 +892,12 @@ ?-(-.huf %here p.huf, %this p.huf, %that p.huf) :: ++ hone :: plant hoof - |= [way=@tas huf=hoof] + |= [for=@tas way=@tas huf=hoof] ^- beam ?- -.huf - %here how(s ~[p.huf way]) - %this [[p.how %main q.huf] ~[p.huf way]] - %that [[r.huf %main q.huf] ~[p.huf way]] + %here how(s ~[for p.huf way]) + %this [[p.how %main q.huf] ~[for p.huf way]] + %that [[r.huf %main q.huf] ~[for p.huf way]] == :: ++ neck :: consume libraries @@ -902,7 +913,7 @@ ?. =(`hoof`i.bir `hoof`p.u.byf) (flaw cof [%leaf "library mismatch: {<~[cog p.u.byf i.bir]>}"]~) $(bir t.bir) - =+ bem=(hone %lib i.bir) + =+ bem=(hone %core %lib i.bir) %+ cope (fade cof bem ~) |= [cof=cafe hyd=hood] %+ cope (apex(zeg goz, boy ~) cof hyd) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 8be3386f4c..1baf946265 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -623,7 +623,7 @@ == == :: -++ jo !: :: json reparser +++ jo :: json reparser => |% ++ grub (unit ,*) ++ fist $+(json grub) -- @@ -789,981 +789,981 @@ |= [p=@t q=json] ^- json [%o [[p q] ~ ~]] -:: -++ jobe - |= a=(list ,[p=@t q=json]) + :: + ++ jobe +|= a=(list ,[p=@t q=json]) ^- json [%o (~(gas by *(map ,@t json)) a)] -:: -++ jape + :: + ++ jape |= a=tape ^- json [%s (crip a)] -:: -++ jone + :: + ++ jone |= a=@ ^- json :- %n ?: =(0 a) '0' (crip (flop |-(^-(tape ?:(=(0 a) ~ [(add '0' (mod a 10)) $(a (div a 10))]))))) -:: -++ jesc + :: + ++ jesc |= a=@ ^- tape ?.(=(10 a) [a ~] "\\n") -:: -++ taco :: atom to octstream + :: + ++ taco :: atom to octstream |= tam=@ ^- octs [(met 3 tam) tam] -:: -++ tact :: tape to octstream + :: + ++ tact :: tape to octstream |= tep=tape ^- octs - (taco (rap 3 tep)) -:: -++ tell :: wall to octstream +(taco (rap 3 tep)) + :: + ++ tell :: wall to octstream |= wol=wall ^- octs - =+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~]))))) +=+ buf=(rap 3 (turn wol |=(a=tape (crip (weld a `tape`[`@`10 ~]))))) [(met 3 buf) buf] -:: -++ txml :: string to xml + :: + ++ txml :: string to xml |= tep=tape ^- manx [[%$ [%$ tep] ~] ~] -:: -++ xmla :: attributes to tape + :: + ++ xmla :: attributes to tape |= [tat=mart rez=tape] ^- tape ?~ tat rez - =+ ryq=$(tat t.tat) +=+ ryq=$(tat t.tat) :(weld (xmln n.i.tat) "=\"" (xmle | v.i.tat '"' ?~(t.tat ryq [' ' ryq]))) -:: -++ xmle :: escape for xml + :: + ++ xmle :: escape for xml |= [unq=? tex=tape rez=tape] ?: unq - (weld tex rez) - =+ xet=`tape`(flop tex) + (weld tex rez) +=+ xet=`tape`(flop tex) |- ^- tape ?~ xet rez %= $ - xet t.xet - rez ?- i.xet - 34 ['&' 'q' 'u' 'o' 't' ';' rez] - 38 ['&' 'a' 'm' 'p' ';' rez] - 39 ['&' '#' '3' '9' ';' rez] - 60 ['&' 'l' 't' ';' rez] - 62 ['&' 'g' 't' ';' rez] - * [i.xet rez] - == + xet t.xet + rez ?- i.xet + 34 ['&' 'q' 'u' 'o' 't' ';' rez] + 38 ['&' 'a' 'm' 'p' ';' rez] + 39 ['&' '#' '3' '9' ';' rez] + 60 ['&' 'l' 't' ';' rez] + 62 ['&' 'g' 't' ';' rez] + * [i.xet rez] == -:: -++ xmln :: name to tape + == + :: + ++ xmln :: name to tape |= man=mane ^- tape - ?@ man (trip man) +?@ man (trip man) (weld (trip -.man) `tape`[':' (trip +.man)]) -:: -++ xmll :: nodelist to tape + :: + ++ xmll :: nodelist to tape |= [unq=? lix=(list manx) rez=tape] |- ^- tape ?~ lix rez - (xmlt unq i.lix $(lix t.lix)) -:: -++ xmlt :: node to tape +(xmlt unq i.lix $(lix t.lix)) + :: + ++ xmlt :: node to tape |= [unq=? mex=manx rez=tape] ^- tape ?: ?=([%$ [[%$ *] ~]] g.mex) - (xmle unq v.i.a.g.mex rez) +(xmle unq v.i.a.g.mex rez) =+ man=`mane`-.g.mex =. unq |(unq =(%script man) =(%style man)) - =+ tam=(xmln man) +=+ tam=(xmln man) =+ end=:(weld "" rez) =+ bod=['>' (xmll unq c.mex :(weld "" rez))] =+ att=`mart`a.g.mex :- '<' %+ weld tam `_tam`?~(att bod [' ' (xmla att bod)]) -:: -++ xmlp :: xml parser + :: + ++ xmlp :: xml parser |% ++ apex - =+ spa=;~(pose comt whit) - %+ knee *manx |. ~+ - %+ ifix [(star spa) (star spa)] - ;~ pose - %+ sear - |=([a=marx b=marl c=mane] ?.(=(c n.a) ~ (some [a b]))) - ;~(plug head (more (star comt) ;~(pose apex chrd)) tail) - empt - == + =+ spa=;~(pose comt whit) + %+ knee *manx |. ~+ + %+ ifix [(star spa) (star spa)] + ;~ pose + %+ sear +|=([a=marx b=marl c=mane] ?.(=(c n.a) ~ (some [a b]))) + ;~(plug head (more (star comt) ;~(pose apex chrd)) tail) + empt + == :: ++ attr :: attribute - %+ knee *mart |. ~+ - %- star - ;~ pfix (plus whit) - ;~ plug name - ;~ pfix tis - ;~ pose - (ifix [doq doq] (star ;~(less doq escp))) - (ifix [soq soq] (star ;~(less soq escp))) - == == - == == + %+ knee *mart |. ~+ + %- star + ;~ pfix (plus whit) + ;~ plug name + ;~ pfix tis + ;~ pose + (ifix [doq doq] (star ;~(less doq escp))) + (ifix [soq soq] (star ;~(less soq escp))) + == == + == == :: ++ chrd :: character data - %+ knee *manx |. ~+ - %+ cook |=(a=tape :/(a)) - (plus ;~(less soq doq ;~(pose (just `@`10) escp))) + %+ knee *manx |. ~+ +%+ cook |=(a=tape :/(a)) + (plus ;~(less soq doq ;~(pose (just `@`10) escp))) :: ++ comt %+ ifix [(jest '')] :: comments - (star ;~(less (jest '-->') ;~(pose whit prn))) + (star ;~(less (jest '-->') ;~(pose whit prn))) :: ++ escp - ;~ pose - ;~(less gal gar pam prn) - (cold '>' (jest '>')) - (cold '<' (jest '<')) - (cold '&' (jest '&')) - (cold '"' (jest '"')) - (cold '\'' (jest ''')) - == + ;~ pose + ;~(less gal gar pam prn) + (cold '>' (jest '>')) + (cold '<' (jest '<')) + (cold '&' (jest '&')) + (cold '"' (jest '"')) + (cold '\'' (jest ''')) + == ++ empt :: self-closing tag - (ifix [gal (jest '/>')] ;~(plug ;~(plug name attr) (cold ~ (star whit)))) + (ifix [gal (jest '/>')] ;~(plug ;~(plug name attr) (cold ~ (star whit)))) :: ++ head :: opening tag - %+ knee *marx |. ~+ - (ifix [gal gar] ;~(plug name attr)) + %+ knee *marx |. ~+ + (ifix [gal gar] ;~(plug name attr)) :: ++ name :: tag name - %+ knee *mane |. ~+ - =+ ^= chx - %+ cook crip - ;~ plug - ;~(pose cab alf) - (star ;~(pose cab dot alp)) - == - ;~(pose ;~(plug ;~(sfix chx col) chx) chx) + %+ knee *mane |. ~+ + =+ ^= chx + %+ cook crip + ;~ plug + ;~(pose cab alf) + (star ;~(pose cab dot alp)) + == + ;~(pose ;~(plug ;~(sfix chx col) chx) chx) :: ++ tail (ifix [(jest ' list yaki - |= yup=[p=path q=(list yaki)] - %+ turn q.yup :: map on miso -> tako - |= yak=yaki - [p.yup yak] + |= yop=(map path (list yaki)) :: construct, inverse alda + ^- (list tako) +=+ puy=(~(tap by yop) ~) + %- zing + %+ turn puy :: map on pair -> list yaki + |= yup=[p=path q=(list yaki)] + %+ turn q.yup :: map on miso -> tako + |= yak=yaki + [p.yup yak] :: ++ alto :: alto:ze - |= $: wek=waks - yop=(map path (list yaki)) :: yop before peq - peq=(map path (list yaki)) :: aka miso commute - nik=niku - == - ^+ [wek peq] - =+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~) - %+ roll puy - |= $: yup=[p=path q=(list yaki)] - $: kew=_wek - qep=_peq - == - == - =+ wof=(~(get by kew) p.yup) - =+ yoq=(~(get by yop) p.yup) - =+ peb=(~(get by qep) p.yup) - =+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb) nik) - :- ?~ -.lyr kew (~(put by kew) p.yup (lost u.-.lyr)) - (~(put by qep) p.yup +.lyr) + |= $: wek=waks + yop=(map path (list yaki)) :: yop before peq + peq=(map path (list yaki)) :: aka miso commute + nik=niku + == + ^+ [wek peq] +=+ puy=(~(tap by (~(gas by yop) (~(tap by peq) ~))) ~) + %+ roll puy + |= $: yup=[p=path q=(list yaki)] + $: kew=_wek + qep=_peq + == + == + =+ wof=(~(get by kew) p.yup) + =+ yoq=(~(get by yop) p.yup) + =+ peb=(~(get by qep) p.yup) + =+ lyr=(lyre wof ?~(yoq ~ u.yoq) ?~(peb ~ u.peb) nik) + :- ?~ -.lyr kew (~(put by kew) p.yup (lost u.-.lyr)) +(~(put by qep) p.yup +.lyr) :::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: ++ lisp :: transform urge - |* wig=(urge) - |= dog=woof - ^+ [p=dog q=wig] - ?@ dog - !! - =+ dog=+.dog - =- [[%chan (loss -.res)] +.res] - ^= res - |- ^+ [p=dog q=wig] - ::~& [%lisp dog (lith wig)] - ?~ wig :: no more urges - =+ woo=(wode dog) :: dimensions - ?> =(p.woo 0) :: line - [dog ~[[%& q.woo]]] :: extend - ?~ dog :: no more woofs - =+ woo=(lode wig) :: dimensions - ?> =(p.woo 0) :: line - [~[q.woo] wig] :: extend - ?@ i.dog :: dog skip - ?- -.i.wig :: dog skip, wig skip - & :: consume min(d,w) skip offset - ?: =(i.dog p.i.wig) :: consume both - =+ mol=$(dog t.dog, wig t.wig) - [[i.dog p.mol] [[%& i.dog] q.mol]] - ?: (lth i.dog p.i.wig) :: consume dog, part of wig - =+ mol=$(dog t.dog, p.i.wig (sub p.i.wig i.dog)) - [[i.dog p.mol] [[%& i.dog] q.mol]] - =+ mol=$(i.dog (sub i.dog p.i.wig), wig t.wig) :: consume wig, part of dog - [[p.i.wig p.mol] [[%& p.i.wig] q.mol]] - :: - | :: dog skip, wig chunk - =+ leg=(lent p.i.wig) - ?> (gte i.dog leg) :: assert no conflict - =+ mol=$(i.dog (sub i.dog leg), wig t.wig) :: consume wig, part of dog - [[(lent q.i.wig) p.mol] [i.wig q.mol]] - == :: wig skip, dog chunk - ?> ?=(& -.i.wig) :: assert no conflct (2x chunk) - ?: =(p.i.wig -.i.dog) :: consume both (chunk = skip) - =+ mol=$(dog t.dog, wig t.wig) - [[i.dog p.mol] [[%& +.i.dog] q.mol]] - ?: (gth p.i.wig -.i.dog) :: consume dog, part of wig - =+ mol=$(dog t.dog, p.i.wig (sub p.i.wig -.i.dog)) - [[i.dog p.mol] [[%& +.i.dog] q.mol]] - !! :: assert no conflict +|* wig=(urge) + |= dog=woof + ^+ [p=dog q=wig] + ?@ dog + !! + =+ dog=+.dog + =- [[%chan (loss -.res)] +.res] + ^= res + |- ^+ [p=dog q=wig] + ::~& [%lisp dog (lith wig)] + ?~ wig :: no more urges + =+ woo=(wode dog) :: dimensions + ?> =(p.woo 0) :: line + [dog ~[[%& q.woo]]] :: extend + ?~ dog :: no more woofs + =+ woo=(lode wig) :: dimensions + ?> =(p.woo 0) :: line + [~[q.woo] wig] :: extend + ?@ i.dog :: dog skip + ?- -.i.wig :: dog skip, wig skip + & :: consume min(d,w) skip offset + ?: =(i.dog p.i.wig) :: consume both +=+ mol=$(dog t.dog, wig t.wig) + [[i.dog p.mol] [[%& i.dog] q.mol]] + ?: (lth i.dog p.i.wig) :: consume dog, part of wig +=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig i.dog)) + [[i.dog p.mol] [[%& i.dog] q.mol]] + =+ mol=$(i.dog (sub i.dog p.i.wig), wig t.wig) :: consume wig, part of dog + [[p.i.wig p.mol] [[%& p.i.wig] q.mol]] + :: + | :: dog skip, wig chunk +=+ leg=(lent p.i.wig) + ?> (gte i.dog leg) :: assert no conflict + =+ mol=$(i.dog (sub i.dog leg), wig t.wig) :: consume wig, part of dog + [[(lent q.i.wig) p.mol] [i.wig q.mol]] + == :: wig skip, dog chunk + ?> ?=(& -.i.wig) :: assert no conflct (2x chunk) + ?: =(p.i.wig -.i.dog) :: consume both (chunk = skip) +=+ mol=$(dog t.dog, wig t.wig) + [[i.dog p.mol] [[%& +.i.dog] q.mol]] + ?: (gth p.i.wig -.i.dog) :: consume dog, part of wig +=+ mol=$(dog t.dog, p.i.wig (sub p.i.wig -.i.dog)) + [[i.dog p.mol] [[%& +.i.dog] q.mol]] + !! :: assert no conflict :: ++ lide :: merge dogs - |= [wig=woof dog=woof] - ^- woof - ?@ dog - ::%know - wig - ?@ wig - ::%know - dog - =+ dog=`(list $|(@ud [p=@ud q=@ud]))`(loss +.dog) - =+ wig=`(list $|(@ud [p=@ud q=@ud]))`(loss +.wig) - :- %chan %- loss - |- ^- (list $|(@ud [p=@ud q=@ud])) - ?~ dog wig - ?~ wig dog - ?^ i.dog - ?^ i.wig - :_ $(dog t.dog, wig t.wig) :: merge changes - ?: (lte -.i.dog +.i.wig) - [-.i.wig (add +.i.dog (sub +.i.wig -.i.dog))] - [(add -.i.wig (sub -.i.dog +.i.wig)) +.i.dog] - ?: (gte i.wig -.i.dog) - [i.dog $(dog t.dog, i.wig (sub i.wig -.i.dog))] - [[i.wig 0] $(wig t.wig, -.i.dog (sub -.i.dog i.wig))] - ?^ i.wig - ?: (gte i.dog +.i.wig) - [i.wig $(wig t.wig, i.dog (sub i.dog +.i.wig))] - [[-.i.wig (sub +.i.wig i.dog)] $(wig [[0 i.dog] t.wig], dog t.dog)] - ::[[i.dog 0] $(dog t.dog, -.i.wig (sub -.i.wig i.dog))] - ?: (gte i.wig i.dog) - [i.dog $(dog t.dog, i.wig (sub i.wig i.dog))] - [i.wig $(i.dog (sub i.dog i.wig), wig t.wig)] + |= [wig=woof dog=woof] + ^- woof + ?@ dog + ::%know + wig + ?@ wig + ::%know + dog + =+ dog=`(list $|(@ud [p=@ud q=@ud]))`(loss +.dog) +=+ wig=`(list $|(@ud [p=@ud q=@ud]))`(loss +.wig) + :- %chan %- loss +|- ^- (list $|(@ud [p=@ud q=@ud])) + ?~ dog wig + ?~ wig dog + ?^ i.dog + ?^ i.wig + :_ $(dog t.dog, wig t.wig) :: merge changes +?: (lte -.i.dog +.i.wig) + [-.i.wig (add +.i.dog (sub +.i.wig -.i.dog))] + [(add -.i.wig (sub -.i.dog +.i.wig)) +.i.dog] +?: (gte i.wig -.i.dog) + [i.dog $(dog t.dog, i.wig (sub i.wig -.i.dog))] + [[i.wig 0] $(wig t.wig, -.i.dog (sub -.i.dog i.wig))] + ?^ i.wig +?: (gte i.dog +.i.wig) + [i.wig $(wig t.wig, i.dog (sub i.dog +.i.wig))] + [[-.i.wig (sub +.i.wig i.dog)] $(wig [[0 i.dog] t.wig], dog t.dog)] + ::[[i.dog 0] $(dog t.dog, -.i.wig (sub -.i.wig i.dog))] +?: (gte i.wig i.dog) + [i.dog $(dog t.dog, i.wig (sub i.wig i.dog))] + [i.wig $(i.dog (sub i.dog i.wig), wig t.wig)] :: - ++ lize :: merge dogs (inverse) - |= [wig=woof dog=woof] - ^- woof - ?@ dog - ::%know - wig - ?@ wig - ::%know - dog - =+ dogg=dog - =+ dog=`(list $|(@ud [p=@ud q=@ud]))`(loss +.dog) - =+ wig=`(list $|(@ud [p=@ud q=@ud]))`(loss +.wig) - ~& [%lize wig dog] - :- %chan %- loss - |- ^- (list $|(@ud [p=@ud q=@ud])) - ~& [%lize-iter wig dog] - ?~ dog wig - ?~ wig dog - ?^ i.dog - ?^ i.wig - :_ ?: =(-.i.wig -.i.dog) - $(dog t.dog, wig t.wig) - :::_ $(dog t.dog, wig t.wig) - ?: (gth -.i.wig -.i.dog) - $(wig t.wig, dog [(sub -.i.wig -.i.dog) t.dog]) - $(wig [(sub -.i.dog -.i.wig) t.wig], dog t.dog) - [(sub -.i.wig +.i.dog) (sub +.i.wig -.i.dog)] :: conflict on sub overflow - ?: =(i.wig 0) - $(wig t.wig) - ?: (gte i.wig -.i.dog) - [i.dog $(dog t.dog, i.wig (sub i.wig -.i.dog))] - [[i.wig 0] $(wig t.wig, -.i.dog (sub -.i.dog i.wig))] - ?: =(i.dog 0) - $(dog t.dog) - ?^ i.wig - ?: (gte i.dog -.i.wig) - [i.wig $(wig t.wig, i.dog (sub i.dog -.i.wig))] - [[+.i.wig (sub -.i.wig i.dog)] $(wig [[i.dog 0] t.wig], dog t.dog)] - ::[[i.dog 0] $(dog t.dog, -.i.wig (sub -.i.wig i.dog))] - ?: (gte i.wig i.dog) - [i.dog $(dog t.dog, i.wig (sub i.wig i.dog))] - [i.wig $(i.dog (sub i.dog i.wig), wig t.wig)] +++ lize :: merge dogs (inverse) + |= [wig=woof dog=woof] + ^- woof + ?@ dog + ::%know + wig + ?@ wig + ::%know + dog + =+ dogg=dog + =+ dog=`(list $|(@ud [p=@ud q=@ud]))`(loss +.dog) +=+ wig=`(list $|(@ud [p=@ud q=@ud]))`(loss +.wig) + ~& [%lize wig dog] + :- %chan %- loss +|- ^- (list $|(@ud [p=@ud q=@ud])) + ~& [%lize-iter wig dog] + ?~ dog wig + ?~ wig dog + ?^ i.dog + ?^ i.wig + :_ ?: =(-.i.wig -.i.dog) + $(dog t.dog, wig t.wig) + :::_ $(dog t.dog, wig t.wig) + ?: (gth -.i.wig -.i.dog) + $(wig t.wig, dog [(sub -.i.wig -.i.dog) t.dog]) +$(wig [(sub -.i.dog -.i.wig) t.wig], dog t.dog) + [(sub -.i.wig +.i.dog) (sub +.i.wig -.i.dog)] :: conflict on sub overflow + ?: =(i.wig 0) + $(wig t.wig) +?: (gte i.wig -.i.dog) + [i.dog $(dog t.dog, i.wig (sub i.wig -.i.dog))] + [[i.wig 0] $(wig t.wig, -.i.dog (sub -.i.dog i.wig))] + ?: =(i.dog 0) +$(dog t.dog) + ?^ i.wig +?: (gte i.dog -.i.wig) + [i.wig $(wig t.wig, i.dog (sub i.dog -.i.wig))] + [[+.i.wig (sub -.i.wig i.dog)] $(wig [[i.dog 0] t.wig], dog t.dog)] + ::[[i.dog 0] $(dog t.dog, -.i.wig (sub -.i.wig i.dog))] +?: (gte i.wig i.dog) + [i.dog $(dog t.dog, i.wig (sub i.wig i.dog))] + [i.wig $(i.dog (sub i.dog i.wig), wig t.wig)] :: ++ loss :: simplify dog - |= dog=(list $|(@ud [p=@ud q=@ud])) - |- - ^+ dog - ?~ dog ~ - ?~ t.dog - ?@ i.dog - ?: =(i.dog 0) - ~ - dog - ?: &(=(p.i.dog 0) =(q.i.dog 0)) - ~ - dog - ?@ i.dog - ?@ i.t.dog - $(dog [(add i.dog i.t.dog) t.t.dog]) - ?: =(i.dog 0) - $(dog t.dog) - [i.dog $(dog t.dog)] - ?: &(=(p.i.dog 0) =(q.i.dog 0)) - $(dog t.dog) - [i.dog $(dog t.dog)] +|= dog=(list $|(@ud [p=@ud q=@ud])) + |- + ^+ dog + ?~ dog ~ + ?~ t.dog + ?@ i.dog +?: =(i.dog 0) + ~ + dog +?: &(=(p.i.dog 0) =(q.i.dog 0)) + ~ + dog + ?@ i.dog + ?@ i.t.dog + $(dog [(add i.dog i.t.dog) t.t.dog]) + ?: =(i.dog 0) +$(dog t.dog) + [i.dog $(dog t.dog)] + ?: &(=(p.i.dog 0) =(q.i.dog 0)) +$(dog t.dog) + [i.dog $(dog t.dog)] :: ++ lost - |= dog=woof - ^- woof - ?@ dog - dog - [%chan (loss +.dog)] + |= dog=woof + ^- woof + ?@ dog + dog + [%chan (loss +.dog)] :: ++ lode :: urge dimensions - |= wig=(urge) - ^- [p=@ q=@] - %+ reel wig - |= [wug=(unce) [p=@ q=@]] - ?- -.wug - & - :- (add p.wug p) - (add p.wug q) - | - :- (add (lent p.wug) p) - (add (lent q.wug) q) - == +|= wig=(urge) + ^- [p=@ q=@] + %+ reel wig + |= [wug=(unce) [p=@ q=@]] + ?- -.wug + & + :- (add p.wug p) +(add p.wug q) + | + :- (add (lent p.wug) p) +(add (lent q.wug) q) + == :: ++ wode :: woof dimensions - |= dog=(list $|(@ud [p=@ud q=@ud])) - ^- [p=@ q=@] - %+ reel dog - |= [dug=$|(@ud [p=@ud q=@ud]) [p=@ q=@]] - ?@ dug - [(add dug p) (add dug q)] - [(add p.dug p) (add q.dug q)] +|= dog=(list $|(@ud [p=@ud q=@ud])) + ^- [p=@ q=@] + %+ reel dog + |= [dug=$|(@ud [p=@ud q=@ud]) [p=@ q=@]] + ?@ dug + [(add dug p) (add dug q)] + [(add p.dug p) (add q.dug q)] :: ++ lith :: initial merge points - |= wig=(urge) - ^- woof - :- %chan - %+ turn wig - |= wug=(unce) - ?- -.wug - & p.wug - | [(lent p.wug) (lent q.wug)] - == +|= wig=(urge) + ^- woof + :- %chan + %+ turn wig +|= wug=(unce) + ?- -.wug + & p.wug + | [(lent p.wug) (lent q.wug)] + == :: ++ luth :: invert woof - |= dog=woof - ^- woof - ?@ dog - dog - :- %chan - %+ turn +.dog - |= a=$|(@ud [p=@ud q=@ud]) - ?@ a a - [q.a p.a] + |= dog=woof + ^- woof + ?@ dog + dog + :- %chan + %+ turn +.dog +|= a=$|(@ud [p=@ud q=@ud]) + ?@ a a + [q.a p.a] :: ++ alne :: is new - |= [yak=yaki nik=niku] :: if %.n, should invert - ?: &(=(p.q.p.nik p.p.yak) =(q.q.p.nik q.p.yak)) :: domstic, new - %.n - ?: &(=(p.q.q.nik p.p.yak) =(q.q.q.nik q.p.yak)) :: from other, new - %.y - =+ ank=(~(get by p.p.nik) [p.p.yak q.p.yak]) :: third party - ?~ ank %.y - (gth r.p.yak q.u.ank) + |= [yak=yaki nik=niku] :: if %.n, should invert + ?: &(=(p.q.p.nik p.p.yak) =(q.q.p.nik q.p.yak)) :: domstic, new + %.n + ?: &(=(p.q.q.nik p.p.yak) =(q.q.q.nik q.p.yak)) :: from other, new + %.y + =+ ank=(~(get by p.p.nik) [p.p.yak q.p.yak]) :: third party + ?~ ank %.y +(gth r.p.yak q.u.ank) :: ++ alho !: :: update woof, misos - |= [wof=woof mad=(list yaki) nik=niku] - ^- [woof (list yaki)] - ?~ mad [wof ~] - ~& [%foreign p.i.mad] - ?. (alne i.mad nik) - ?: &(?=(%mut -.q.i.mad) ?=(%c -.q.p.q.i.mad)) - ~& [%invert-old p.i.mad] - =+ wug=(lize wof (luth (lith p.q.p.q.i.mad))) :: invert! - $(mad t.mad, wof wug) - ?: ?=(%mut -.q.i.mad) - ~| "Cannot generate merge with non textfile changes" - !! - ~& [%skip-add-or-del p.i.mad] - $(mad t.mad) - ?: &(?=(%mut -.q.i.mad) ?=(%c -.q.p.q.i.mad)) - ~& [%apply-new [%origin p.i.mad] [%wof wof] %mut] - =+ wug=((lisp p.q.p.q.i.mad) wof) - =+ rec=$(mad t.mad, wof p.wug) - [-.rec [[p.i.mad %mut [p.p.q.i.mad [%c q.wug]]] +.rec]] - ?: ?=(%mut -.q.i.mad) - ~| "Cannot generate merge with non textfile changes" - !! - ?: ?=(%del -.q.i.mad) - =+ rec=$(wof %know, mad t.mad) - [-.rec [i.mad +.rec]] - =+ rec=$(wof %know, mad t.mad) - [-.rec [i.mad +.rec]] + |= [wof=woof mad=(list yaki) nik=niku] + ^- [woof (list yaki)] + ?~ mad [wof ~] + ~& [%foreign p.i.mad] + ?. (alne i.mad nik) +?: &(?=(%mut -.q.i.mad) ?=(%c -.q.p.q.i.mad)) + ~& [%invert-old p.i.mad] + =+ wug=(lize wof (luth (lith p.q.p.q.i.mad))) :: invert! + $(mad t.mad, wof wug) +?: ?=(%mut -.q.i.mad) + ~| "Cannot generate merge with non textfile changes" + !! + ~& [%skip-add-or-del p.i.mad] + $(mad t.mad) +?: &(?=(%mut -.q.i.mad) ?=(%c -.q.p.q.i.mad)) + ~& [%apply-new [%origin p.i.mad] [%wof wof] %mut] + =+ wug=((lisp p.q.p.q.i.mad) wof) +=+ rec=$(mad t.mad, wof p.wug) + [-.rec [[p.i.mad %mut [p.p.q.i.mad [%c q.wug]]] +.rec]] +?: ?=(%mut -.q.i.mad) + ~| "Cannot generate merge with non textfile changes" + !! + ?: ?=(%del -.q.i.mad) +=+ rec=$(wof %know, mad t.mad) + [-.rec [i.mad +.rec]] +=+ rec=$(wof %know, mad t.mad) + [-.rec [i.mad +.rec]] :: ++ lobo :: update woof, miso - |= [wof=woof don=miso] - ^- woof - ?: &(?=(%mut -.don) ?=(%c -.q.p.don)) - (lide wof (lith p.q.p.don)) - ?: ?=(%mut -.don) - ~| "Cannot generate merge with non textfile changes" - !! - %know + |= [wof=woof don=miso] + ^- woof + ?: &(?=(%mut -.don) ?=(%c -.q.p.don)) + (lide wof (lith p.q.p.don)) +?: ?=(%mut -.don) + ~| "Cannot generate merge with non textfile changes" + !! + %know :: ++ lyre :: put yeb before zeq - |= [wof=(unit woof) yeb=(list yaki) zeq=(list yaki) nik=niku] - ^- [(unit woof) (list yaki)] - %- |= fow=(unit woof) :: postprocess roll - ?~ fow [fow zeq] - =+ alh=(alho u.fow zeq nik) - :- (some -.alh) +.alh - %+ roll yeb - |= [mis=yaki waf=_wof] - ~& [%our [%origin p.mis]] - ?~ waf - ?: &(?=(%mut -.q.mis) ?=(%c -.q.p.q.mis)) - (some (lith p.q.p.q.mis)) - ?: ?=(%mut -.q.mis) - ~| "Cannot generate merge with non textfile changes" - !! - (some %know) - ~& [%our %waf-mut (lobo u.waf q.mis)] - (some (lobo u.waf q.mis)) + |= [wof=(unit woof) yeb=(list yaki) zeq=(list yaki) nik=niku] + ^- [(unit woof) (list yaki)] + %- |= fow=(unit woof) :: postprocess roll + ?~ fow [fow zeq] +=+ alh=(alho u.fow zeq nik) + :- (some -.alh) +.alh + %+ roll yeb + |= [mis=yaki waf=_wof] + ~& [%our [%origin p.mis]] + ?~ waf + ?: &(?=(%mut -.q.mis) ?=(%c -.q.p.q.mis)) + (some (lith p.q.p.q.mis)) +?: ?=(%mut -.q.mis) + ~| "Cannot generate merge with non textfile changes" + !! +(some %know) + ~& [%our %waf-mut (lobo u.waf q.mis)] +(some (lobo u.waf q.mis)) :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::: ++ amor :: amor:ze - |= ren=?(%v %x %y %z) :: endpoint query - ^- (unit ,*) - ?- ren - %v [~ `dome`+<+.amor] - %x ?~(q.ank ~ [~ q.u.q.ank]) - %y [~ ache] - %z [~ ank] - == + |= ren=?(%v %x %y %z) :: endpoint query +^- (unit ,*) + ?- ren + %v [~ `dome`+<+.amor] +%x ?~(q.ank ~ [~ q.u.q.ank]) + %y [~ ache] + %z [~ ank] + == :: ++ ante :: ante:ze - |= lem=nori :: rewind by change - ^+ +> - ?- -.lem - & (avon:(anti q.lem) (bind p.lem acai) q.q.lem) - | +>(lab (~(del by lab) p.lem)) - == + |= lem=nori :: rewind by change + ^+ +> + ?- -.lem + & (avon:(anti q.lem) (bind p.lem acai) q.q.lem) +| +>(lab (~(del by lab) p.lem)) + == :: ++ anti :: axon:ze - |= nyp=soba :: reverse axon - ^+ +> - +>(ank ank:(dusk:(zu ank) nyp)) + |= nyp=soba :: reverse axon + ^+ +> ++>(ank ank:(dusk:(zu ank) nyp)) :: ++ argo :: argo:ze - |= oan=@ud :: rewind to aeon - ^+ +> - ?: =(let oan) +> - =+ lem=?>(?=(^ hit) q.i.hit) - =: let (dec let) - hit ?>(?=(^ hit) t.hit) - == - $(+> (ante lem)) + |= oan=@ud :: rewind to aeon + ^+ +> + ?: =(let oan) +> + =+ lem=?>(?=(^ hit) q.i.hit) + =: let (dec let) +hit ?>(?=(^ hit) t.hit) + == +$(+> (ante lem)) :: ++ arum :: arum:ze - |= [wak=waks tak=(list tako) kat=(list tako) nik=niku] :: hard merge - ^- [waks (list tako)] - =+ alt=(alto wak (alda tak) (alda kat) nik) - [-.alt (alot +.alt)] + |= [wak=waks tak=(list tako) kat=(list tako) nik=niku] :: hard merge + ^- [waks (list tako)] +=+ alt=(alto wak (alda tak) (alda kat) nik) + [-.alt (alot +.alt)] :: ++ clen - |= [shp=ship des=desk] - |= a=nori - ^- ? - ?- -.a - | | - & - ?~ p.a | - &(=(p.u.p.a shp) =(q.u.p.a des)) - == + |= [shp=ship des=desk] + |= a=nori + ^- ? + ?- -.a + | | + & + ?~ p.a | +&(=(p.u.p.a shp) =(q.u.p.a des)) + == :: ++ auld :: auld:ze - |= [gem=germ who=ship des=desk sab=saba] :: construct merge - ^- (unit (unit nori)) :::::: - =+ nik=`niku`[[ang who des] [t.sab p.sab q.sab]] :: merge partners - =+ ^= viq ^- [p=@ud q=@ud r=waks] :: merge status - =+ viq=(~(get by ang) [p.sab q.sab]) :: - ?~(viq [0 0 ~] u.viq) :: - =. sab :: - ?: =(q.viq p.r.sab) sab :: perfect motion - ?> (gth q.viq p.r.sab) :: proper motion - %= sab :: - p.r q.viq :: - s (slag (sub q.viq p.r.sab) s.sab) :: remove excess - == :: - =+ stu=(skid s.sab (clen who des)) :: - ::=+ len=(lent -.stu) - ::=. sab sab(s +.stu) :: - ?~ s.sab [~ ~] :: up to date - =+ ^= mus ^- masu :: sync square - :* p.sab q.sab [p.viq +(let)] - [q.viq q.r.sab] r.viq - == - ~& [%merge-sync mus] - =+ kat=(alar s.sab) :: takos - =+ lem=[%& p=[~ u=mus] q=`soba`[_[@ @] kat]] :: nori - =+ ^= tak :: local changes - ::%+ slag len - %- alar %- flop :: chronological takos - %+ turn (scag (sub let p.viq) hit) :: remove excess - |=(a=frog q.a) - ?: &(?=(%fine gem) |(!=(tak ~) !=(r.viq ~))) - ~ - ?- gem - %fine - [~ ~ lem] - %mate - =+ tig=(mang [arum r.viq tak kat nik] |=(* *(unit))) :: moves - ?@ tig ~ - =+ res=((hard ,[waks (list tako)]) u.tig) - [~ ~ lem(q.q +.res, t.u.p -.res)] :: update takos, woof - %that - =+ tig=(mang [arum r.viq ~ kat nik] |=(* *(unit))) - ?~ tig !! - [~ ~ lem(q.q (weld (acid p.viq) q.q.lem))] - %this - =+ tig=(need (mang [arum r.viq tak ~ nik] |=(* *(unit)))) - =+ typ=((hard ,[waks (list tako)]) tig) - [~ ~ lem(q.q ~, t.u.p -.typ)] - %check - =+ tig=(mang [arum r.viq tak kat nik] |=(* *(unit))) :: moves - ?@ tig - ~& %check-bad - ~ - =+ typ=((hard ,[waks (list tako)]) u.tig) - ~& [%check-good -.typ] - [~ ~] - %conf - !! - == + |= [gem=germ who=ship des=desk sab=saba] :: construct merge + ^- (unit (unit nori)) :::::: + =+ nik=`niku`[[ang who des] [t.sab p.sab q.sab]] :: merge partners + =+ ^= viq ^- [p=@ud q=@ud r=waks] :: merge status + =+ viq=(~(get by ang) [p.sab q.sab]) :: + ?~(viq [0 0 ~] u.viq) :: + =. sab :: + ?: =(q.viq p.r.sab) sab :: perfect motion + ?> (gth q.viq p.r.sab) :: proper motion + %= sab :: + p.r q.viq :: + s (slag (sub q.viq p.r.sab) s.sab) :: remove excess + == :: + =+ stu=(skid s.sab (clen who des)) :: +::=+ len=(lent -.stu) + ::=. sab sab(s +.stu) :: + ?~ s.sab [~ ~] :: up to date + =+ ^= mus ^- masu :: sync square + :* p.sab q.sab [p.viq +(let)] + [q.viq q.r.sab] r.viq + == + ~& [%merge-sync mus] + =+ kat=(alar s.sab) :: takos + =+ lem=[%& p=[~ u=mus] q=`soba`[_[@ @] kat]] :: nori + =+ ^= tak :: local changes + ::%+ slag len + %- alar %- flop :: chronological takos + %+ turn (scag (sub let p.viq) hit) :: remove excess + |=(a=frog q.a) +?: &(?=(%fine gem) |(!=(tak ~) !=(r.viq ~))) + ~ + ?- gem + %fine + [~ ~ lem] + %mate + =+ tig=(mang [arum r.viq tak kat nik] |=(* *(unit))) :: moves + ?@ tig ~ +=+ res=((hard ,[waks (list tako)]) u.tig) + [~ ~ lem(q.q +.res, t.u.p -.res)] :: update takos, woof + %that +=+ tig=(mang [arum r.viq ~ kat nik] |=(* *(unit))) + ?~ tig !! + [~ ~ lem(q.q (weld (acid p.viq) q.q.lem))] + %this + =+ tig=(need (mang [arum r.viq tak ~ nik] |=(* *(unit)))) +=+ typ=((hard ,[waks (list tako)]) tig) + [~ ~ lem(q.q ~, t.u.p -.typ)] + %check + =+ tig=(mang [arum r.viq tak kat nik] |=(* *(unit))) :: moves + ?@ tig + ~& %check-bad + ~ +=+ typ=((hard ,[waks (list tako)]) u.tig) + ~& [%check-good -.typ] + [~ ~] + %conf + !! + == :: ++ auto :: auto:ze - |= mun=mood :: read at point - ^- (unit) - ?: ?=(%v p.mun) - [~ `dome`+<+.auto] - ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) - ?^(r.mun ~ [~ let]) - ?: ?=(%w p.mun) - ?> ?=(^ hit) ?^(r.mun ~ [~ i.hit]) - (amor(ank ank:(deny:(zu ank) r.mun)) p.mun) + |= mun=mood :: read at point + ^- (unit) +?: ?=(%v p.mun) + [~ `dome`+<+.auto] + ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) + ?^(r.mun ~ [~ let]) + ?: ?=(%w p.mun) + ?> ?=(^ hit) ?^(r.mun ~ [~ i.hit]) +(amor(ank ank:(deny:(zu ank) r.mun)) p.mun) :: ++ aver :: aver:ze - |= mun=mood :: direct read - ^- (unit (unit ,*)) - =+ nao=(aeon q.mun) - ?~(nao ~ [~ (avid u.nao mun)]) + |= mun=mood :: direct read + ^- (unit (unit ,*)) + =+ nao=(aeon q.mun) +?~(nao ~ [~ (avid u.nao mun)]) :: ++ avid :: avid:ze - |= [oan=@ud mun=mood] :: seek and read - ^- (unit) - ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) :: NB only for speed - ?^(r.mun ~ [~ oan]) - (auto:(argo oan) mun) + |= [oan=@ud mun=mood] :: seek and read +^- (unit) + ?: &(?=(%w p.mun) !?=(%ud -.q.mun)) :: NB only for speed + ?^(r.mun ~ [~ oan]) +(auto:(argo oan) mun) :: ++ aven :: aven:ze - |= tak=(list tako) - %+ roll tak - |= [tek=tako ung=_ang] - =+ exi=(~(get by ung) [p.p.q.tek q.p.q.tek]) - ?~ exi - %+ ~(put by (~(del by ung) [p.p.q.tek q.p.q.tek])) - [p.p.q.tek q.p.q.tek] - [1 r.p.q.tek _waks] - ?: (gth r.p.q.tek q.u.exi) - %+ ~(put by (~(del by ung) [p.p.q.tek q.p.q.tek])) - [p.p.q.tek q.p.q.tek] - [p.u.exi r.p.q.tek r.u.exi] - ung +|= tak=(list tako) + %+ roll tak + |= [tek=tako ung=_ang] +=+ exi=(~(get by ung) [p.p.q.tek q.p.q.tek]) + ?~ exi +%+ ~(put by (~(del by ung) [p.p.q.tek q.p.q.tek])) + [p.p.q.tek q.p.q.tek] + [1 r.p.q.tek _waks] + ?: (gth r.p.q.tek q.u.exi) +%+ ~(put by (~(del by ung) [p.p.q.tek q.p.q.tek])) + [p.p.q.tek q.p.q.tek] + [p.u.exi r.p.q.tek r.u.exi] + ung :: ++ avon :: avon:ze - |= [mys=(unit masu) tak=(list tako)] :: apply trout - ^+ +> - ?~ mys +> - =+ [yek=[p.u.mys q.u.mys] det=[q.r.u.mys q.s.u.mys t.u.mys]] - =+ guf=(~(get by ang) yek) - =+ ted=`[p=@ q=@ r=waks]`?~(guf [0 0 ~] u.guf) - ~& [%avon p.u.mys q.u.mys [%haz ted] [%too r.u.mys] [%fro s.u.mys] [%wak t.u.mys]] - =. ang (aven tak) - +>.$(ang ?:(=([0 0 ~] det) (~(del by ang) yek) (~(put by ang) yek det))) + |= [mys=(unit masu) tak=(list tako)] :: apply trout + ^+ +> + ?~ mys +> + =+ [yek=[p.u.mys q.u.mys] det=[q.r.u.mys q.s.u.mys t.u.mys]] + =+ guf=(~(get by ang) yek) +=+ ted=`[p=@ q=@ r=waks]`?~(guf [0 0 ~] u.guf) + ~& [%avon p.u.mys q.u.mys [%haz ted] [%too r.u.mys] [%fro s.u.mys] [%wak t.u.mys]] + =. ang (aven tak) ++>.$(ang ?:(=([0 0 ~] det) (~(del by ang) yek) (~(put by ang) yek det))) :: ++ axel :: axel:ze - |= [wen=@da lem=nori] :: edit - ^+ +> - =: let +(let) - hit :-([wen lem] hit) - == - ?- -.lem - & (avon:(axon q.lem) p.lem q.q.lem) - | +>(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let))) - == + |= [wen=@da lem=nori] :: edit + ^+ +> + =: let +(let) +hit :-([wen lem] hit) + == + ?- -.lem + & (avon:(axon q.lem) p.lem q.q.lem) +| +>(lab ?<((~(has by lab) p.lem) (~(put by lab) p.lem let))) + == :: ++ axon :: axon:ze - |= nyp=soba :: apply changes - ^+ +> - +>(ank ank:(durn:(zu ank) nyp)) + |= nyp=soba :: apply changes + ^+ +> ++>(ank ank:(durn:(zu ank) nyp)) -- -:: -++ zu :: filesystem + :: + ++ zu :: filesystem |= ank=ankh :: filesystem state =| myz=(list tako) :: changes in reverse =| ram=path :: reverse path into |% ++ dash :: local rehash - ^- 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)) - == + ^- 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)) + == :: ++ dosh %_(. p.ank dash) :: rehash and save ++ dose :: ascend - |= [lol=@ta kan=ankh] - ^+ +> - ?> &(?=(^ ram) =(lol i.ram)) - %= +> - ram t.ram - ank - ?: =([0 ~ ~] ank) - ?. (~(has by r.kan) lol) kan - kan(r (~(del by r.kan) lol)) - kan(r (~(put by r.kan) lol ank)) - == + |= [lol=@ta kan=ankh] + ^+ +> +?> &(?=(^ ram) =(lol i.ram)) + %= +> + ram t.ram + ank +?: =([0 ~ ~] ank) + ?. (~(has by r.kan) lol) kan + kan(r (~(del by r.kan) lol)) +kan(r (~(put by r.kan) lol ank)) + == :: ++ deaf :: add change - |= mis=miso - ^+ +> - +>(myz [[(flop ram) [*mizu mis]] myz]) + |= mis=miso + ^+ +> ++>(myz [[(flop ram) [*mizu mis]] myz]) :: ++ dent :: descend - |= lol=@ta - ^+ +> - =+ you=(~(get by r.ank) lol) - +>.$(ram [lol ram], ank ?~(you [*cash ~ ~] u.you)) + |= lol=@ta + ^+ +> + =+ you=(~(get by r.ank) lol) ++>.$(ram [lol ram], ank ?~(you [*cash ~ ~] u.you)) :: ++ deny :: descend recursively - |= way=path - ^+ +> - ?~(way +> $(way t.way, +> (dent i.way))) + |= way=path + ^+ +> +?~(way +> $(way t.way, +> (dent i.way))) :: ++ dest :: write over - |= [pum=umph val=(unit ,[p=cash q=*])] - ^+ +> - ?~ q.ank - ?~ val +> - (deaf %ins q.u.val) - ?~ val - (deaf %del q.u.q.ank) - ?: =(q.u.val q.u.q.ank) +> - (deaf %mut ((diff pum) q.u.q.ank q.u.val)) + |= [pum=umph val=(unit ,[p=cash q=*])] + ^+ +> + ?~ q.ank + ?~ val +> +(deaf %ins q.u.val) + ?~ val +(deaf %del q.u.q.ank) + ?: =(q.u.val q.u.q.ank) +> +(deaf %mut ((diff pum) q.u.q.ank q.u.val)) :: ++ dist :: modify tree - |= [pum=umph bus=ankh] - ^+ +> - =. +> (dest pum q.bus) - =+ [yeg=(~(tap by r.ank) ~) gey=(~(tap by r.bus) ~)] - =. +>.$ - |- ^+ +>.^$ - ?~ yeg +>.^$ - ?: (~(has by r.bus) p.i.yeg) $(yeg t.yeg) - $(yeg t.yeg, myz myz:dirk(ank q.i.yeg, ram [p.i.yeg ram])) - |- ^+ +>.^$ - ?~ gey +>.^$ - $(gey t.gey, myz myz:^$(bus q.i.gey, +> (dent p.i.gey))) + |= [pum=umph bus=ankh] + ^+ +> +=. +> (dest pum q.bus) + =+ [yeg=(~(tap by r.ank) ~) gey=(~(tap by r.bus) ~)] + =. +>.$ + |- ^+ +>.^$ + ?~ yeg +>.^$ + ?: (~(has by r.bus) p.i.yeg) $(yeg t.yeg) +$(yeg t.yeg, myz myz:dirk(ank q.i.yeg, ram [p.i.yeg ram])) + |- ^+ +>.^$ + ?~ gey +>.^$ +$(gey t.gey, myz myz:^$(bus q.i.gey, +> (dent p.i.gey))) :: ++ dirk :: rm -r - |- ^+ + - =. + ?~(q.ank + (deaf %del q.u.q.ank)) - =+ dyr=(~(tap by r.ank) ~) - |- ^+ +.^$ - ?~ dyr +.^$ - =. +.^$ dirk:(dent p.i.dyr) - $(dyr t.dyr) + |- ^+ + + =. + ?~(q.ank + (deaf %del q.u.q.ank)) +=+ dyr=(~(tap by r.ank) ~) + |- ^+ +.^$ + ?~ dyr +.^$ + =. +.^$ dirk:(dent p.i.dyr) +$(dyr t.dyr) :: ++ drum :: apply effect - |= [pax=path mis=miso] - ^+ +> - ?^ pax - dosh:(dose:$(pax t.pax, +> (dent 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]) - :: - %mut - ?> ?=(^ 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]) - == + |= [pax=path mis=miso] + ^+ +> + ?^ pax +dosh:(dose:$(pax t.pax, +> (dent 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]) + :: + %mut + ?> ?=(^ 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 - |- ^+ + - ?~ myz + - => .(+ (drum p.i.myz q.q.i.myz)) - $(myz ?>(?=(^ myz) t.myz)) + |- ^+ + + ?~ myz + + => .(+ (drum p.i.myz q.q.i.myz)) +$(myz ?>(?=(^ myz) t.myz)) :: ++ durn :: apply forward - |= nyp=soba - ^+ +> - ?: =([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] - . - +> + |= nyp=soba + ^+ +> + ?: =([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] + . + +> :: ++ dusk :: apply reverse - |= nyp=soba - (durn (curl nyp)) + |= nyp=soba +(durn (curl nyp)) -- -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: section 3bF, names etc :: -:: -++ clan :: ship to rank + :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + :: section 3bF, names etc :: + :: + ++ clan :: ship to rank |= who=ship ^- rank - =+ wid=(met 3 who) +=+ wid=(met 3 who) ?: (lte wid 1) %czar ?: =(2 wid) %king ?: (lte wid 4) %duke ?: (lte wid 8) %earl ?> (lte wid 16) %pawn -:: -++ deft :: import url path - |= rax=(list ,@t) + :: + ++ deft :: import url path +|= rax=(list ,@t) |- ^- pork ?~ rax - [~ ~] + [~ ~] ?~ t.rax - =+ den=(trip i.rax) - =+ ^= vex - %- %- full - ;~(plug sym ;~(pose (stag ~ ;~(pfix dot sym)) (easy ~))) - [[1 1] (trip i.rax)] - ?~ q.vex - [~ [i.rax ~]] - [+.p.u.q.vex [-.p.u.q.vex ~]] - =+ pok=$(rax t.rax) +=+ den=(trip i.rax) + =+ ^= vex + %- %- full + ;~(plug sym ;~(pose (stag ~ ;~(pfix dot sym)) (easy ~))) + [[1 1] (trip i.rax)] + ?~ q.vex + [~ [i.rax ~]] + [+.p.u.q.vex [-.p.u.q.vex ~]] +=+ pok=$(rax t.rax) :- p.pok [i.rax q.pok] -:: -++ fain :: path restructure + :: + ++ fain :: path restructure |= [hom=path raw=path] - =+ bem=(need (tome raw)) +=+ bem=(need (tome raw)) =+ [mer=(flop s.bem) moh=(flop hom)] - |- ^- (pair beam path) +|- ^- (pair beam path) ?~ moh - [bem(s hom) (flop mer)] + [bem(s hom) (flop mer)] ?> &(?=(^ mer) =(i.mer i.moh)) - $(mer t.mer, moh t.moh) -:: -++ fest :: web synthesizer +$(mer t.mer, moh t.moh) + :: + ++ fest :: web synthesizer |= [hom=path raw=path] |* yax=$+(epic *) - (yax (fuel (fain hom raw))) -:: -++ folk :: silk construction +(yax (fuel (fain hom raw))) + :: + ++ folk :: silk construction |= [hom=path raw=path] |* yox=$+((pair beam path) *) - (yox (fain hom raw)) -:: -++ fuel :: parse fcgi +(yox (fain hom raw)) + :: + ++ fuel !: :: parse fcgi |= [bem=beam but=path] ^- epic ?> ?=([%web @ *] but) =+ dyb=(slay i.t.but) ?> ?& ?=([~ %many *] dyb) - ?=([* * *] p.u.dyb) - :: ?=([%$ %tas *] i.p.u.dyb) - ?=([%many *] i.p.u.dyb) - ?=([%blob *] i.t.p.u.dyb) - == - =+ ced=((hard cred) p.i.t.p.u.dyb) + ?=([* * *] p.u.dyb) + :: ?=([%$ %tas *] i.p.u.dyb) + ?=([%many *] i.p.u.dyb) +?=([%blob *] i.t.p.u.dyb) + == +=+ ced=((hard cred) p.i.t.p.u.dyb) :: =+ nep=q.p.i.p.u.dyb =+ ^= nyp ^- path - %+ turn p.i.p.u.dyb - |= a=coin ^- @ta - ?> ?=([%$ %ta @] a) - ?>(((sane %ta) q.p.a) q.p.a) - =+ ^= gut ^- (list ,@t) - %+ turn t.t.p.u.dyb - |= a=coin ^- @t - ?> ?=([%$ %t @] a) - ?>(((sane %t) q.p.a) q.p.a) + %+ turn p.i.p.u.dyb + |= a=coin ^- @ta + ?> ?=([%$ %ta @] a) + ?>(((sane %ta) q.p.a) q.p.a) +=+ ^= gut ^- (list ,@t) + %+ turn t.t.p.u.dyb + |= a=coin ^- @t + ?> ?=([%$ %t @] a) +?>(((sane %t) q.p.a) q.p.a) =+ ^= quy - |- ^- (list ,[p=@t q=@t]) - ?~ gut ~ - ?> ?=(^ t.gut) - [[i.gut i.t.gut] $(gut t.t.gut)] - :* (~(gas by *(map cord cord)) quy) - ced - -.bem - t.t.but - nyp +|- ^- (list ,[p=@t q=@t]) + ?~ gut ~ +?> ?=(^ t.gut) + [[i.gut i.t.gut] $(gut t.t.gut)] +:* (~(gas by *(map cord cord)) quy) + ced + -.bem + t.t.but + nyp == -:: -++ gist :: convenient html + :: + ++ gist :: convenient html |= [hom=path raw=path] |= yax=$+(epic marl) - %- (fest hom raw) +%- (fest hom raw) |= piq=epic ^- manx =+ ^= sip :: skip blanks - |= mal=marl - ?~(mal ~ ?.(|(=(:/(~) i.mal) =(:/([10 ~]) i.mal)) mal $(mal t.mal))) + |= mal=marl + ?~(mal ~ ?.(|(=(:/(~) i.mal) =(:/([10 ~]) i.mal)) mal $(mal t.mal))) =+ zay=`marl`(yax piq) - =. zay (sip zay) +=. zay (sip zay) =+ ^= twa - |- ^- [p=marl q=marl] - ?~ zay [~ ~] - ?: ?=([[[%head *] *] *] zay) - [c.i.zay ?:(?=([[[%body *] *] ~] t.zay) c.i.t.zay t.zay)] - ?: ?=([[[%title *] *] *] zay) - [[i.zay ~] t.zay] - [~ zay] + |- ^- [p=marl q=marl] + ?~ zay [~ ~] +?: ?=([[[%head *] *] *] zay) + [c.i.zay ?:(?=([[[%body *] *] ~] t.zay) c.i.t.zay t.zay)] +?: ?=([[[%title *] *] *] zay) + [[i.zay ~] t.zay] + [~ zay] [/html [/head (sip p.twa)] [/body (sip q.twa)] ~] -:: -++ urle :: URL encode + :: + ++ urle :: URL encode |= tep=tape ^- tape %- zing @@ -1771,230 +1771,230 @@ |= tap=char =+ xen=|=(tig=@ ?:((gte tig 10) (add tig 55) (add tig '0'))) ?: ?| &((gte tap 'a') (lte tap 'z')) - &((gte tap 'A') (lte tap 'Z')) - &((gte tap '0') (lte tap '9')) - =('.' tap) - =('-' tap) - =('~' tap) - =('_' tap) - == - [tap ~] + &((gte tap 'A') (lte tap 'Z')) + &((gte tap '0') (lte tap '9')) + =('.' tap) + =('-' tap) + =('~' tap) + =('_' tap) + == + [tap ~] ['%' (xen (rsh 0 4 tap)) (xen (end 0 4 tap)) ~] -:: -++ urld :: URL decode + :: + ++ urld :: URL decode |= tep=tape - ^- (unit tape) +^- (unit tape) ?~ tep [~ ~] ?: =('%' i.tep) - ?. ?=([@ @ *] t.tep) ~ - =+ nag=(mix i.t.tep (lsh 3 1 i.t.t.tep)) - =+ val=(rush nag hex:ag) - ?~ val ~ - =+ nex=$(tep t.t.t.tep) - ?~(nex ~ [~ [`@`u.val u.nex]]) + ?. ?=([@ @ *] t.tep) ~ + =+ nag=(mix i.t.tep (lsh 3 1 i.t.t.tep)) +=+ val=(rush nag hex:ag) + ?~ val ~ + =+ nex=$(tep t.t.t.tep) + ?~(nex ~ [~ [`@`u.val u.nex]]) =+ nex=$(tep t.tep) - ?~(nex ~ [~ i.tep u.nex]) -++ sifo :: 64-bit encode +?~(nex ~ [~ i.tep u.nex]) + ++ sifo :: 64-bit encode |= tig=@ ^- tape =+ poc=(mod (sub 3 (mod (met 3 tig) 3)) 3) - =+ pad=(lsh 3 poc (swap 3 tig)) +=+ pad=(lsh 3 poc (swap 3 tig)) =+ ^= ska "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" =+ ^= sif - %- flop - |- ^- tape - ?~ pad - ~ - =+ d=(end 0 6 pad) - [(snag d ska) $(pad (rsh 0 6 pad))] + %- flop + |- ^- tape + ?~ pad + ~ +=+ d=(end 0 6 pad) + [(snag d ska) $(pad (rsh 0 6 pad))] (weld (scag (sub (lent sif) poc) sif) (trip (fil 3 poc '='))) -:: -++ earl :: local purl to tape + :: + ++ earl :: local purl to tape |= [who=@p pul=purl] ^- purl - pul(q.q [(rsh 3 1 (scot %p who)) q.q.pul]) -:: -++ earn :: purl to tape +pul(q.q [(rsh 3 1 (scot %p who)) q.q.pul]) + :: + ++ earn :: purl to tape |= pul=purl ^- tape =< apex |% ++ apex - ^- tape - :(weld head "/" body tail) + ^- tape + :(weld head "/" body tail) :: ++ body - |- ^- tape - ?~ q.q.pul - ?~(p.q.pul ~ ['.' (trip u.p.q.pul)]) - =+ seg=(trip i.q.q.pul) - ?:(=(~ t.q.q.pul) seg (weld seg `tape`['/' $(q.q.pul t.q.q.pul)])) + |- ^- tape + ?~ q.q.pul + ?~(p.q.pul ~ ['.' (trip u.p.q.pul)]) +=+ seg=(trip i.q.q.pul) + ?:(=(~ t.q.q.pul) seg (weld seg `tape`['/' $(q.q.pul t.q.q.pul)])) :: ++ head - ^- tape - ;: weld - ?:(&(p.p.pul !=([& /localhost] r.p.pul)) "https://" "http://") - :: - ?- -.r.p.pul - | (trip (rsh 3 1 (scot %if p.r.p.pul))) - & =+ rit=(flop p.r.p.pul) - |- ^- tape - ?~(rit ~ (weld (trip i.rit) ?~(t.rit "" `tape`['.' $(rit t.rit)]))) - == - :: - ?~(q.p.pul ~ `tape`[':' (trip (rsh 3 2 (scot %ui u.q.p.pul)))]) - == + ^- tape + ;: weld + ?:(&(p.p.pul !=([& /localhost] r.p.pul)) "https://" "http://") + :: + ?- -.r.p.pul + | (trip (rsh 3 1 (scot %if p.r.p.pul))) +& =+ rit=(flop p.r.p.pul) + |- ^- tape + ?~(rit ~ (weld (trip i.rit) ?~(t.rit "" `tape`['.' $(rit t.rit)]))) + == + :: + ?~(q.p.pul ~ `tape`[':' (trip (rsh 3 2 (scot %ui u.q.p.pul)))]) + == :: ++ tail - ^- tape - ?: =(~ r.pul) ~ - :- '?' - |- ^- tape - ?~ r.pul ~ - ;: weld - (trip p.i.r.pul) - "=" - (trip q.i.r.pul) - ?~(t.r.pul ~ `tape`['&' $(r.pul t.r.pul)]) - == + ^- tape + ?: =(~ r.pul) ~ + :- '?' + |- ^- tape + ?~ r.pul ~ + ;: weld +(trip p.i.r.pul) + "=" +(trip q.i.r.pul) + ?~(t.r.pul ~ `tape`['&' $(r.pul t.r.pul)]) + == -- -:: -++ epur :: url/header parser + :: + ++ epur :: url/header parser |% ++ apat :: 2396 abs_path - %+ cook deft - (ifix [fas ;~(pose fas (easy ~))] (more fas smeg)) + %+ cook deft + (ifix [fas ;~(pose fas (easy ~))] (more fas smeg)) ++ auri - %+ cook - |= a=purl - ?.(=([& /localhost] r.p.a) a a(p.p &)) - ;~ plug - ;~ plug - %+ sear - |= a=@t - ^- (unit ,?) - ?+(a ~ %http [~ %|], %https [~ %&]) - ;~(sfix scem ;~(plug col fas fas)) - thor - == - ;~(plug ;~(pose apat (easy *pork)) yque) - == + %+ cook + |= a=purl +?.(=([& /localhost] r.p.a) a a(p.p &)) + ;~ plug + ;~ plug + %+ sear + |= a=@t + ^- (unit ,?) +?+(a ~ %http [~ %|], %https [~ %&]) + ;~(sfix scem ;~(plug col fas fas)) + thor + == + ;~(plug ;~(pose apat (easy *pork)) yque) + == ++ cock :: cookie - (most ;~(plug sem ace) ;~(plug toke ;~(pfix tis tosk))) + (most ;~(plug sem ace) ;~(plug toke ;~(pfix tis tosk))) ++ dlab :: 2396 domainlabel - %+ sear - |= a=@ta - ?.(=('-' (rsh 3 a (dec (met 3 a)))) [~ u=a] ~) - %+ cook cass - ;~(plug aln (star alp)) + %+ sear + |= a=@ta + ?.(=('-' (rsh 3 a (dec (met 3 a)))) [~ u=a] ~) + %+ cook cass + ;~(plug aln (star alp)) :: ++ fque (cook crip (plus pquo)) :: normal query field ++ fquu (cook crip (star pquo)) :: optional field ++ pcar ;~(pose pure pesc psub col pat) :: 2396 path char ++ pcok ;~ pose :: cookie char - (just `@`0x21) - (shim 0x23 0x2b) - (shim 0x2d 0x3a) - (shim 0x3c 0x5b) - (shim 0x5d 0x7e) - == + (just `@`0x21) + (shim 0x23 0x2b) + (shim 0x2d 0x3a) + (shim 0x3c 0x5b) +(shim 0x5d 0x7e) + == ++ pesc ;~(pfix cen mes) :: 2396 escaped ++ pold (cold ' ' (just '+')) :: old space code ++ pque ;~(pose pcar fas wut) :: 3986 query char ++ pquo ;~(pose pure pesc pold) :: normal query char ++ pure ;~(pose aln hep dot cab sig) :: 2396 unreserved ++ psub ;~ pose :: 3986 sub-delims - zap buc pam soq pel per - tar lus com sem tis - == + zap buc pam soq pel per + tar lus com sem tis + == ++ ptok ;~ pose :: 2616 token - aln zap hax buc cen pam soq tar lus - hep dot ket cab tec bar sig - == + aln zap hax buc cen pam soq tar lus + hep dot ket cab tec bar sig + == ++ scem :: 2396 scheme - %+ cook cass - ;~(plug alf (star ;~(pose aln lus hep dot))) + %+ cook cass + ;~(plug alf (star ;~(pose aln lus hep dot))) :: ++ smeg (cook crip (plus pcar)) :: 2396 segment ++ tock (cook crip (plus pcok)) :: 6265 cookie-value ++ tosk ;~(pose tock (ifix [doq doq] tock)) :: 6265 cookie-value ++ toke (cook crip (plus ptok)) :: 2616 token ++ thor :: 2396 host/port - %+ cook |*(a=[* *] [+.a -.a]) - ;~ plug - thos - ;~(pose (stag ~ ;~(pfix col dim:ag)) (easy ~)) - == +%+ cook |*(a=[* *] [+.a -.a]) + ;~ plug + thos + ;~(pose (stag ~ ;~(pfix col dim:ag)) (easy ~)) + == ++ thos :: 2396 host, no local - ;~ plug - ;~ pose - %+ stag %& - %+ sear :: LL parser weak here - |= a=(list ,@t) - =+ b=(flop a) - ?> ?=(^ b) - =+ c=(end 3 1 i.b) - ?.(&((gte c 'a') (lte c 'z')) ~ [~ u=b]) - (most dot dlab) - :: - %+ stag %| - =+ tod=(ape:ag ted:ab) - %+ bass 256 - ;~(plug tod (stun [3 3] ;~(pfix dot tod))) - == - == + ;~ plug + ;~ pose + %+ stag %& + %+ sear :: LL parser weak here + |= a=(list ,@t) + =+ b=(flop a) + ?> ?=(^ b) +=+ c=(end 3 1 i.b) + ?.(&((gte c 'a') (lte c 'z')) ~ [~ u=b]) +(most dot dlab) + :: + %+ stag %| +=+ tod=(ape:ag ted:ab) + %+ bass 256 + ;~(plug tod (stun [3 3] ;~(pfix dot tod))) + == + == ++ yque :: query ending - ;~ pose - ;~(pfix wut yquy) - (easy ~) - == + ;~ pose + ;~(pfix wut yquy) +(easy ~) + == ++ yquy :: query - ;~ pose :: proper query - %+ more - ;~(pose pam sem) - ;~(plug fque ;~(pose ;~(pfix tis fquu) (easy ''))) - :: - %+ cook :: funky query - |=(a=tape [[%$ (crip a)] ~]) - (star pque) - == + ;~ pose :: proper query + %+ more + ;~(pose pam sem) + ;~(plug fque ;~(pose ;~(pfix tis fquu) (easy ''))) + :: + %+ cook :: funky query + |=(a=tape [[%$ (crip a)] ~]) +(star pque) + == ++ zest :: 2616 request-uri - ;~ pose - (stag %& (cook |=(a=purl a) auri)) - (stag %| ;~(plug apat yque)) - == + ;~ pose +(stag %& (cook |=(a=purl a) auri)) + (stag %| ;~(plug apat yque)) + == -- -:: -++ feel :: simple file write + :: + ++ feel :: simple file write |= [pax=path val=*] ^- miso - =+ dir=((hard arch) .^(%cy pax)) +=+ dir=((hard arch) .^(%cy pax)) ?~ q.dir [%ins val] :- %mut ^- udon [%a %a .^(%cx pax) val] -:: -++ file :: simple file load + :: + ++ file :: simple file load |= pax=path ^- (unit) =+ dir=((hard arch) .^(%cy pax)) - ?~(q.dir ~ [~ .^(%cx pax)]) -:: -++ foal :: high-level write +?~(q.dir ~ [~ .^(%cx pax)]) + :: + ++ foal :: high-level write |= [pax=path val=*] ^- toro - ?> ?=([* * * *] pax) +?> ?=([* * * *] pax) [i.t.pax [%& ~ [*cart [[t.t.t.pax *mizu (feel pax val)] ~]]]] -:: -++ fray :: high-level delete + :: + ++ fray :: high-level delete |= pax=path ^- toro - ?> ?=([* * * *] pax) +?> ?=([* * * *] pax) [i.t.pax [%& ~ [*cart [[t.t.t.pax *mizu [%del .^(%cx pax)]] ~]]]] -:: -++ furl :: unify changes - |= [one=toro two=toro] !: + :: + ++ furl :: unify changes + |= [one=toro two=toro] ^- toro ~| %furl ?> ?& =(p.one p.two) :: same path @@ -2327,7 +2327,7 @@ hit=(list frog) :: changes in reverse lab=(map ,@tas ,@ud) :: labels == :: -++ door :: foreign contact +++ dore :: foreign contact $: wod=road :: connection to wyl=will :: inferred mirror caq=clot :: symmetric key state @@ -2616,7 +2616,7 @@ val=wund :: private keys law=will :: server will seh=(map hand ,[p=ship q=@da]) :: key cache - hoc=(map ship door) :: neighborhood + hoc=(map ship dore) :: neighborhood == :: ++ salt ,@uv :: entropy ++ seal :: auth conversation diff --git a/main/bin/solid.hoon b/main/bin/solid.hoon index d6186d466f..3d482048f5 100644 --- a/main/bin/solid.hoon +++ b/main/bin/solid.hoon @@ -20,12 +20,12 @@ =+ all=.*(0 ken) =+ ^= vay ^- (list ,[p=@tas q=@tas]) :~ [%$ %zuse] + [%f %ford] [%a %ames] [%b %batz] [%c %clay] [%d %dill] [%e %eyre] - [%f %ford] [%g %gall] == |- ^+ all diff --git a/main/doc/synth/down.hood b/main/doc/synth/down.hood new file mode 100644 index 0000000000..067cc3e33e --- /dev/null +++ b/main/doc/synth/down.hood @@ -0,0 +1,36 @@ +/? 314 +!: +:::::: /hoon/down/synth/doc +:: + => +:::::: models +|% +++ down + $& [p=down q=down] + $% [%$ p=tape] + [%code p=tape] + [%inco p=tape] + [%head p=@ud q=down] + [%link p=tape q=tape r=(unit tape)] + [%lord p=(list down)] + [%lund p=(list down)] + [%parg p=down] + [%quot p=down] + [%rong p=down] + [%emph p=down] + [%hrul ~] + [%html p=tape] + == +-- +:::::: generator +:: +~& [%hood-at %] +%- (fest /synth/doc %) +|= pic=epic +=+ unt=|=(a=cord (biff (~(get by qix.pic) a) |=(b=cord (slaw %ud b)))) +=+ moo=(both (unt %foo) (unt %bar)) +?~ moo [%$ "Hoop, world: usage: url?foo=x&bar=y"] +:* [%$ "Hoop, "] + [%emph %$ "world"] + [%$ ": {<-.u.moo>} plus {<+.u.moo>} is {<(add u.moo)>}."] +== diff --git a/main/doc/synth/down.hook b/main/doc/synth/down.hook index 11db0b8244..5510f02ce7 100644 --- a/main/doc/synth/down.hook +++ b/main/doc/synth/down.hook @@ -1,10 +1,7 @@ !: :::::: /hook/down/synth/doc :: -~& [%down-hook %path %] %- (folk /down/synth/doc %) |= [bem=beam but=path] -~& [%down-hook-beam s.bem] -~& [%down-hook-butt but] :+ %ride [%reef ~] [%drag bem but] diff --git a/main/doc/synth/down.hoon b/main/doc/synth/down.hoon index aec3dba686..e57040979d 100644 --- a/main/doc/synth/down.hoon +++ b/main/doc/synth/down.hoon @@ -23,14 +23,13 @@ -- :::::: generator :: -~& [%down-hoon %path %] +~& [%choon-at %] %- (fest /synth/doc %) |= pic=epic -~& [%down-hook-butt but.pic] =+ unt=|=(a=cord (biff (~(get by qix.pic) a) |=(b=cord (slaw %ud b)))) =+ moo=(both (unt %foo) (unt %bar)) -?~ moo [%$ "Hello, world: usage: url?foo=x&bar=y"] -:* [%$ "Hello, "] +?~ moo [%$ "Hm, world: usage: url?foo=x&bar=y"] +:* [%$ "Hm, "] [%emph %$ "world"] [%$ ": {<-.u.moo>} plus {<+.u.moo>} is {<(add u.moo)>}."] == From 5152f230850657ceb652a92b1f98ad3bdec47837 Mon Sep 17 00:00:00 2001 From: John Dulin Date: Sun, 20 Jul 2014 23:18:56 -0700 Subject: [PATCH 4/4] Added asset [ship guid] logo to /main/sys for streams subscription messages --- main/sys/asset/ref/gate.hoon | 1 + main/sys/asset/tan/json/gate.hoon | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 main/sys/asset/ref/gate.hoon create mode 100644 main/sys/asset/tan/json/gate.hoon diff --git a/main/sys/asset/ref/gate.hoon b/main/sys/asset/ref/gate.hoon new file mode 100644 index 0000000000..04c4293560 --- /dev/null +++ b/main/sys/asset/ref/gate.hoon @@ -0,0 +1 @@ +,[p=ship q=guid] diff --git a/main/sys/asset/tan/json/gate.hoon b/main/sys/asset/tan/json/gate.hoon new file mode 100644 index 0000000000..2cd6116deb --- /dev/null +++ b/main/sys/asset/tan/json/gate.hoon @@ -0,0 +1,3 @@ +|= [p=ship q=@udK] +^- json +a/~[(jape

) (jape )]