From 977a7fc702ce3da35e32278e47d627e280e9f34d Mon Sep 17 00:00:00 2001 From: Steve Dee Date: Mon, 7 Apr 2014 10:16:57 -0700 Subject: [PATCH 1/3] Trailing whitespace You guys. The default git precommit hook checks for this. You can enable it by copying and pasting this command into a shell in your Urbit checkout: cp .git/hooks/precommit{.sample,} --- arvo/eyre.hoon | 60 +++++++++---------- arvo/hoon.hoon | 134 +++++++++++++++++++++---------------------- arvo/zuse.hoon | 10 ++-- try/tan/md/html.hoon | 8 +-- 4 files changed, 106 insertions(+), 106 deletions(-) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 55e078873..6bb8989b7 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -26,7 +26,7 @@ ++ loco ,[p=? q=(unit ,@tas) r=path] :: logical construct ++ pest :: request in progress $| $? %new :: virgin - == :: + == :: $% [%err p=@ud q=(list tank)] :: error report [%fin p=love] :: ready to send [%raw p=hiss] :: wild url @@ -59,7 +59,7 @@ ^- (unit hole) =+ ^= cok ^- (list ,@t) =+ cok=(~(get by mah) 'cookie') - ?~(cok ~ u.cok) + ?~(cok ~ u.cok) |- ^- (unit hole) ?~ cok ~ =+ mar=`(unit (list ,[p=@t q=@t]))`(rush i.cok cock:epur) @@ -84,19 +84,19 @@ %mid [200 ~[content-type/(moon p.luv)] [~ q.luv]] %ham [200 ~[content-type/'text/html'] [~ (tact (xmlt | p.luv ~))]] %raw p.luv - %wan !! - %zap :+ p.luv + %wan !! + %zap :+ p.luv ~[content-type/'text/plain'] :- ~ %- tell - |- ^- wall - ?~ q.luv ~ + |- ^- wall + ?~ q.luv ~ (weld (~(win re i.q.luv) 0 120) $(q.luv t.q.luv)) == -- |% :: functions ++ ye :: per event - =| $: $: $: wru=(unit writ) :: event authority + =| $: $: $: wru=(unit writ) :: event authority tea=wire :: event place hen=duct :: event floor fav=card :: event data @@ -104,7 +104,7 @@ $: now=@da :: event date eny=@ :: unique entropy sky=$+(* (unit)) :: system namespace - == :: + == :: mow=(list move) :: pending actions == :: bolo :: all vane state @@ -190,7 +190,7 @@ ~& [%strange-wart p.fav q.fav] +.$ :: - %pr + %pr (hare r.fav p.fav s.fav) == :: @@ -285,7 +285,7 @@ [%want him [%q %pr %e %hork mun ~] hyx] :: fon - %+ ~(put by fon) him + %+ ~(put by fon) him %_ rot cnt +(cnt.rot) p.rem +(p.rem.rot) @@ -307,7 +307,7 @@ ^- httr [200 ~[content-type/'text/plain'] [~ (taco rob)]] (fail 400 "urbit: url {} does not match a vessel") - :* + :* ^= rob %- role :~ 'User-agent: *' @@ -444,7 +444,7 @@ |- ^- (list coin) ?~ quy ~ [[%$ %t p.i.quy] [%$ %t q.i.quy] $(quy t.quy)] - == + == :: ++ funk :: functional request |= [nep=@tas fur=(unit term) paw=(list ,@t) quy=quay] @@ -458,15 +458,15 @@ =+ zac=(slay i.paw) ?. ?=([~ %$ ?(%ud %da %tas) *] zac) ~ [~ i.paw t.paw] - ?: ?| ?=(~ zac) - ?=(~ q.u.zac) + ?: ?| ?=(~ zac) + ?=(~ q.u.zac) !(levy t.q.u.zac (sane %ta)) == ~ :+ ~ ?~(fur %html u.fur) ^- tube - :* (scot %p our) - i.q.u.zac - p.u.zac + :* (scot %p our) + i.q.u.zac + p.u.zac t.q.u.zac == |= [for=logo toe=tube] @@ -529,11 +529,11 @@ =+ ank=((hard ankh) u.ans) ?~ q.ank [~ +>.$] =+ huc=(~(get by cah.sef) p.u.q.ank) - ?^ huc + ?^ huc [[~ %& u.huc] +>.$] =+ mud=(much pax q.u.q.ank) :- [~ mud] - ?: ?=(| -.mud) +>.$ + ?: ?=(| -.mud) +>.$ +>.$(cah.sef (~(put by cah.sef) p.u.q.ank p.mud)) :: ++ lend :: load directory node @@ -633,7 +633,7 @@ :_ +>.$ ?: ?=(| -.mud) mud [%& %mid (mite -.q.p.mud) (octs +.q.p.mud)] - :: + :: ++ loch :: validate vase |= [for=@tas pre=path vax=vase] ^- [gank _+>] @@ -701,7 +701,7 @@ ++ loud :: synthesis search |= [syn=? for=logo pre=path mid=path] ^- (list ,[p=path q=path r=loco]) - =| suf=path + =| suf=path |- ^- (list ,[p=path q=path r=loco]) =+ pax=(weld pre (flop mid)) =+ lot=(loot pax ?:(syn ~ [~ for])) @@ -738,11 +738,11 @@ ?~ luc [~ ~ ~ ~] =+ mor=$(luc t.luc) ?- -.r.i.luc - & ?~ q.r.i.luc + & ?~ q.r.i.luc [[[p.i.luc q.i.luc r.r.i.luc] p.mor] q.mor r.mor s.mor] - :+ p.mor q.mor + :+ p.mor q.mor [[[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] r.mor] s.mor] - | ?~ q.r.i.luc + | ?~ q.r.i.luc [p.mor [[p.i.luc q.i.luc r.r.i.luc] q.mor] r.mor s.mor] :+ p.mor q.mor [r.mor [[p.i.luc q.i.luc u.q.r.i.luc r.r.i.luc] s.mor]] @@ -787,7 +787,7 @@ |- ^- [(list ,[p=@ud q=pimp]) _+.^$] ?~ yub [~ +.^$] =^ sin +.^$ $(yub l.yub) - =^ dex +.^$ $(yub r.yub) + =^ dex +.^$ $(yub r.yub) =^ top +.^$ (wink q.n.yub) =+ pot=`(list ,[p=@ud q=pimp])`?~(top ~ [[p.n.yub u.top] ~]) [:(weld pot dex sin) +.^$] @@ -801,7 +801,7 @@ ?- -.som.pip %fun =^ syt +>.$ (lude p.som.pip q.som.pip) - :_ +>.$ + :_ +>.$ :- ~ %= pip pez @@ -840,7 +840,7 @@ $(+ sez) :: ++ into - |= [pul=purl moh=moth] + |= [pul=purl moh=moth] ^+ +> =+ num=p.rey %= +>.$ @@ -870,7 +870,7 @@ [[[wru [/d hen] %flog fav] ~] ..^$] ^- [p=(list move) q=vane] =. gub ?.(=(0 gub) gub (cat 3 (rsh 3 1 (scot %p (end 6 1 eny))) '-')) - =^ mos bol + =^ mos bol abet:apex:~(adit ye [[wru tea hen fav] [now eny sky] ~] bol) [mos ..^$] :: @@ -887,7 +887,7 @@ ++ load |= new=vase ^- vane - ?. (~(nest ut -:!>(`bolo`+>-.^$)) | p.new) + ?. (~(nest ut -:!>(`bolo`+>-.^$)) | p.new) ~& %eyre-reset ..^$ ..^$(+>- (bolo q.new)) @@ -901,7 +901,7 @@ ^- (unit) ~ :: -++ stay +++ stay `vase`!>((colt `bolo`+>-.$)) ++ vern [164 0] -- diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 8d574b1f5..f91d7905b 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -87,9 +87,9 @@ ?@ +.b ~ :: :- ~ :: u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]] :: -++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) :: +++ limb $|(term $%([%& p=axis] [%| p=@ud q=term])) :: ++ line ,[p=[%leaf p=odor q=@] q=tile] :: %kelp case -++ list |* a=_,* :: null-term list +++ list |* a=_,* :: null-term list $|(~ [i=a t=(list a)]) :: ++ mane $|(@tas [@tas @tas]) :: XML name/space ++ mano ,[g=marx c=marl] :: normalized manx @@ -106,9 +106,9 @@ $|(~ [n=a l=(tree a) r=(tree a)]) :: ++ nail ,[p=hair q=tape] :: parsing input ++ numb ,@ :: just a number -++ pass ,@ :: public key +++ pass ,@ :: public key ++ path (list span) :: filesys location -++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range +++ pint ,[p=[p=@ q=@] q=[p=@ q=@]] :: line/column range ++ port $: p=axis :: $= q :: $% [%& p=type] :: @@ -135,7 +135,7 @@ [%spot p=spot] :: == :: ++ span ,@ta :: text-atom (ASCII) -++ spot ,[p=path q=pint] :: range in file +++ spot ,[p=path q=pint] :: range in file ++ tank $% [%leaf p=tape] :: printing formats [%palm p=[p=tape q=tape r=tape s=tape] q=(list tank)] [%rose p=[p=tape q=tape r=tape] q=(list tank)] @@ -202,14 +202,14 @@ [%clsg p=tusk] :: [p ~] [%cltr p=tusk] :: p as a tuple [%clzz p=tusk] :: macro - :: :::::: invocations + :: :::::: invocations [%cncb p=wing q=tram] :: %=, then cast to p [%cncl p=twig q=twig] :: pull $.p w/ sample q [%cndt p=twig q=twig] :: %-(q p) [%cnhp p=twig q=tusk] :: slam p w/ sample q - [%cntr p=wing q=twig r=tram] :: + [%cntr p=wing q=twig r=tram] :: [%cnkt p=twig q=twig r=twig s=twig] :: slam p w/ %*(q r s) - [%cnls p=twig q=twig r=twig] :: slam p w/ %*(q r) + [%cnls p=twig q=twig r=twig] :: slam p w/ %*(q r) [%cnsg p=wing q=twig r=twig] :: pull p from q with r [%cnts p=wing q=tram] :: eval. p w/ q changes [%cnzy p=term] :: pulls limb p @@ -249,7 +249,7 @@ [%sgzp p=twig q=twig] :: type in stacktrace :: :::::: miscellaneous [%smcl p=twig q=tusk] :: binary to n-ary - [%smdt p=twig q=tusk] :: + [%smdt p=twig q=tusk] :: [%smdq p=(list beer)] :: assemble string [%smsg p=twig q=tusk] :: gonads [%smsm p=twig q=twig] :: make sure q is a p @@ -331,11 +331,11 @@ [%2 p=(list ,[@ta *])] :: == :: ++ twin ,[p=term q=wing r=axis s=type] :: -++ type $| ?(%noun %void) :: set all or set none +++ type $| ?(%noun %void) :: set all or set none $% [%atom p=term] :: number and format [%bull p=twin q=type] :: wing synonym [%cell p=type q=type] :: ordered pair - [%core p=type q=coil] :: + [%core p=type q=coil] :: [%cube p=* q=type] :: constant [%face p=term q=type] :: name [%fork p=type q=type] :: union/branch @@ -378,7 +378,7 @@ ++ vise ,[p=typo q=*] :: old vase ++ wall (list tape) :: text lines (no \n) ++ wain (list cord) :: text lines (no \n) -++ wing (list limb) :: +++ wing (list limb) :: ++ wine $| ?(%noun %path %tank %void %wall %wool %yarn) $% [%atom p=term] :: [%core p=(list ,@ta) q=wine] :: @@ -1286,7 +1286,7 @@ |= yer=@ud ^- ? &(=(0 (mod yer 4)) |(!=(0 (mod yer 100)) =(0 (mod yer 400)))) :: -++ yo :: time constants +++ yo :: time constants |% ++ cet 36.524 :: (add 24 (mul 100 365)) ++ day 86.400 :: (mul 24 hor) ++ era 146.097 :: (add 1 (mul 4 cet)) @@ -1881,9 +1881,9 @@ :: ++ stet |* leh=(list ,[?(@ [@ @]) _rule]) - |- - ?~ leh - ~ + |- + ?~ leh + ~ [i=[p=-.i.leh q=+.i.leh] t=$(leh t.leh)] :: ++ stew @@ -2408,7 +2408,7 @@ =('-' c) == [c d] - ?+ c + ?+ c :- '~' =+ e=(met 2 c) |- ^- tape @@ -2568,10 +2568,10 @@ ++ til (boss 256 (stun [3 3] low)) ++ urs %+ cook |=(a=tape (rap 3 ^-((list ,@) a))) - (star ;~(pose nud low hep dot sig cab)) + (star ;~(pose nud low hep dot sig cab)) ++ urt %+ cook |=(a=tape (rap 3 ^-((list ,@) a))) - (star ;~(pose nud low hep dot sig)) + (star ;~(pose nud low hep dot sig)) ++ voy ;~(pfix bas ;~(pose bas soq bix)) ++ vym (bass 256 ;~(plug low (star ;~(pose low nud)))) ++ vyn (bass 256 ;~(plug hep vym (easy ~))) @@ -2879,7 +2879,7 @@ == ++ nuck %+ knee *coin |. ~+ - %- stew + %- stew ^. stet ^. limo :~ :- ['a' 'z'] (cook |=(a=@ta [~ %tas a]) sym) :- ['0' '9'] (stag ~ bisk) @@ -4241,7 +4241,7 @@ ++ ah |_ tig=tiki ++ blue - |= gen=twig + |= gen=twig ^- twig ?. &(?=(| -.tig) ?=(~ p.tig)) gen [%tsgr [~ 3] gen] @@ -4539,13 +4539,13 @@ :: [%ktdt *] [%ktls [%cnhp p.gen q.gen ~] q.gen] [%kthp *] [%ktls ~(bunt al p.gen) q.gen] - [%sgbr *] + [%sgbr *] :+ %sggr :- %mean =+ fek=~(feck ap p.gen) ?^ fek [%dtzz %tas u.fek] [%brdt [%cnhp [%cnzy %cain] [%zpgr p.gen] ~]] - q.gen + q.gen :: [%sgcb *] [%sggr [%mean [%brdt p.gen]] q.gen] [%sgcn *] @@ -4724,7 +4724,7 @@ [%wtsg *] [%wtcl [%wtts [%axil %null] p.gen] q.gen r.gen] [%wtzp *] [%wtcl p.gen [%dtzz %f 1] [%dtzz %f 0]] :: - [%wthz *] + [%wthz *] =+ vaw=~(. ah p.gen) %- gray:vaw [%wthp puce:vaw (turn q.gen |=([a=tile b=twig] [a (blue:vaw b)]))] @@ -4733,7 +4733,7 @@ =+ vaw=~(. ah p.gen) %- gray:vaw ^- twig - :+ %wtls puce:vaw + :+ %wtls puce:vaw [(blue:vaw q.gen) (turn r.gen |=([a=tile b=twig] [a (blue:vaw b)]))] :: [%wtsz *] @@ -4752,14 +4752,14 @@ [%wtpt puce:vaw (blue:vaw q.gen) (blue:vaw r.gen)] :: [%zpcb *] q.gen - [%zpgr *] + [%zpgr *] [%cnhp [%cnzy %onan] [%zpsm [%bctr [%herb [%cnzy %abel]]] p.gen] ~] :: [%zpwt *] ?: ?: ?=(@ p.gen) (lte stub p.gen) &((lte stub p.p.gen) (gte stub q.p.gen)) - q.gen + q.gen ~|([%stub-fail stub p.gen] !!) :: * gen @@ -4863,7 +4863,7 @@ 1 [%face p.got $(got q.got)] 2 ?> |(!vet (nest(sut [%cell %noun %noun]) & sut)) :+ %cell - $(got p.got, sut (peek %both 2)) + $(got p.got, sut (peek %both 2)) $(got q.got, sut (peek %both 3)) == :: @@ -4959,8 +4959,8 @@ | (face q.i.peh ^$(peh t.peh, sut p.q.poz)) == 1 ^$(peh t.peh) - 2 %+ bull - [p.p.q.poz q.p.q.poz r.p.q.poz ^$(peh t.peh, sut s.p.q.poz)] + 2 %+ bull + [p.p.q.poz q.p.q.poz r.p.q.poz ^$(peh t.peh, sut s.p.q.poz)] q.q.poz == =+ [now=(cap p.poz) lat=(mas p.poz)] @@ -5108,8 +5108,8 @@ ?. ?=(@ lum) ~ :+ ~ - %leaf - ?: =(%$ p.q.ham) ~(rend co [~ %ud lum]) + %leaf + ?: =(%$ p.q.ham) ~(rend co [~ %ud lum]) ?: =(%t p.q.ham) ['\'' (weld (rip 3 lum) `tape`['\'' ~])] ?: =(%tas p.q.ham) ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])] ~(rend co [~ p.q.ham lum]) @@ -5437,7 +5437,7 @@ [~ p.u.q.hax %0 (fork p.q.u.q.hax p.q.u.q.yor)] 1 ?> &(?=(1 -.q.u.q.yor) =(p.q.u.q.yor p.q.u.q.hax)) [~ p.u.q.hax %1 p.q.u.q.hax (weld q.q.u.q.hax q.q.u.q.yor)] - 2 ?> ?& ?=(2 -.q.u.q.yor) + 2 ?> ?& ?=(2 -.q.u.q.yor) =(p.p.q.u.q.hax p.p.q.u.q.yor) =(q.p.q.u.q.hax q.p.q.u.q.yor) =(r.p.q.u.q.hax r.p.q.u.q.yor) @@ -5445,9 +5445,9 @@ :* ~ p.u.q.hax %2 - :* p.p.q.u.q.hax - q.p.q.u.q.hax - r.p.q.u.q.hax + :* p.p.q.u.q.hax + q.p.q.u.q.hax + r.p.q.u.q.hax (fork s.p.q.u.q.hax s.p.q.u.q.yor) == (fork q.q.u.q.hax q.q.u.q.yor) @@ -5806,7 +5806,7 @@ :: [%wtts *] :- (nice bean) - %- fish(sut (play ~(bunt al p.gen))) + %- fish(sut (play ~(bunt al p.gen))) (cove q:$(gen [%cnzz q.gen], gol %noun)) :: [%zpcb *] @@ -6157,8 +6157,8 @@ =(p.sut p.ref) sint :: - [%bull *] - ?& dext(sut q.sut) + [%bull *] + ?& dext(sut q.sut) dext(sut s.p.sut, ref (peek(sut ref) %free r.p.sut)) == [%face *] dext(sut q.sut) @@ -6682,7 +6682,7 @@ ++ fry :: mane as twig %+ cook |= [a=@tas b=(unit ,@tas)] - ?~ b + ?~ b [%dtzz %tas a] [[%dtzz %tas a] [%dtzz %tas u.b]] ;~(plug sym ;~(pose (stag ~ ;~(pfix cab sym)) (easy ~))) @@ -6779,7 +6779,7 @@ :: ++ scat %+ knee *twig |. ~+ - %- stew + %- stew ^. stet ^. limo :~ :- '!' @@ -6960,7 +6960,7 @@ ++ noil |= tol=? =< ;~ pfix buc - %- stew + %- stew ^. stet ^. limo :~ ['|' (rung bar %reed exqb)] @@ -6988,7 +6988,7 @@ (toad exqc) == :- ':' - ;~ pfix col + ;~ pfix col %+ cook |=(a=(list tile) ?~(a !! ?~(t.a i.a [i.a $(a t.a)]))) (toad exqc) @@ -7022,7 +7022,7 @@ ^. stet ^. limo :~ :- '|' ;~ pfix bar - %- stew + %- stew ^. stet ^. limo :~ ['_' (rune cab %brcb expu)] ['%' (rune cen %brcn expe)] @@ -7038,7 +7038,7 @@ == :- '%' ;~ pfix cen - %- stew + %- stew ^. stet ^. limo :~ ['_' (rune cab %cncb exph)] [':' (rune col %cncl expb)] @@ -7059,7 +7059,7 @@ == :- ':' ;~ pfix col - %- stew + %- stew ^. stet ^. limo :~ ['_' (rune cab %clcb expb)] :: ['~' (rune cen %clcn exps)] @@ -7073,7 +7073,7 @@ == :- '.' ;~ pfix dot - %- stew + %- stew ^. stet ^. limo :~ ['+' (rune lus %dtls expa)] ['*' (rune tar %dttr expb)] @@ -7084,7 +7084,7 @@ == :- '^' ;~ pfix ket - %- stew + %- stew ^. stet ^. limo :~ ['|' (rune bar %ktbr expa)] ['.' (rune dot %ktdt expb)] @@ -7098,7 +7098,7 @@ == :- '~' ;~ pfix sig - %- stew + %- stew ^. stet ^. limo :~ ['|' (rune bar %sgbr expb)] ['$' (rune buc %sgbc expg)] @@ -7116,7 +7116,7 @@ == :- ';' ;~ pfix sem - %- stew + %- stew ^. stet ^. limo :~ [':' (rune col %smcl expi)] ['.' (rune dot %smdt expi)] @@ -7126,7 +7126,7 @@ == :- '=' ;~ pfix tis - %- stew + %- stew ^. stet ^. limo :~ ['|' (rune bar %tsbr expo)] ['.' (rune dot %tsdt expq)] @@ -7142,7 +7142,7 @@ == :- '?' ;~ pfix wut - %- stew + %- stew ^. stet ^. limo :~ ['|' (rune bar %wtbr exps)] [':' (rune col %wtcl expc)] @@ -7161,7 +7161,7 @@ == :- '!' ;~ pfix zap - %- stew + %- stew ^. stet ^. limo :~ [':' ;~(pfix col (toad expz))] [',' (rune com %zpcm expb)] @@ -7234,9 +7234,9 @@ ^- tiki ?-(-.b %& [%& [~ a] p.b], %| [%| [~ a] p.b]) =+ ^= wyp - ;~ pose + ;~ pose %+ cook gub - ;~ plug + ;~ plug sym ;~(pfix tis ;~(pose (stag %& rope) (stag %| wide))) == @@ -7251,7 +7251,7 @@ ;~ pfix ;~(plug ket tis gap) %+ cook gub - ;~ plug + ;~ plug sym ;~(pfix gap ;~(pose (stag %& rope) (stag %| tall))) == @@ -7312,15 +7312,15 @@ == == ++ hinh |. - ;~ gunk - ;~ pose - dem + ;~ gunk + ;~ pose + dem (ifix [sel ser] ;~(plug dem ;~(pfix ace dem))) == loaf == - ++ bont ;~ (bend) - ;~(pfix cen sym) + ++ bont ;~ (bend) + ;~(pfix cen sym) ;~(pfix dot ;~(pose wide ;~(pfix muck loaf))) == ++ bony (cook |=(a=(list) (lent a)) (plus tis)) @@ -7409,7 +7409,7 @@ ++ howl (knee *tile |.(~+(;~(pose (noil &) toil)))) ++ toil %+ knee *tile |. ~+ - %- stew + %- stew ^. stet ^. limo :~ :- '%' @@ -7450,14 +7450,14 @@ == :- '(' (stag %herb wide) - :- '.' + :- '.' (stag %herb (stag %cnzz rope)) :- '[' %+ ifix [sel ser] %+ cook |= a=(list tile) ?~(a !! ?~(t.a i.a [i.a $(a t.a)])) - (most ace toil) + (most ace toil) :- '_' (stag %weed ;~(pfix cab wide)) :- ['0' '9'] @@ -7476,7 +7476,7 @@ (stag %leaf (stag %f (cold | bar))) :- '~' (stag %leaf (stag %n (cold ~ sig))) - == + == ++ wart |* zor=_rule %+ here @@ -7755,7 +7755,7 @@ =+ vil=(vial p.bud) :: =| eny=@ :: entropy =| fan=(list ,[p=@tas q=vase]) :: -=| hom=path :: source path +=| hom=path :: source path =| haz=@uw :: hash =< |% ++ come |= [@ (list ovum) pone] :: 11 @@ -7830,7 +7830,7 @@ ~& [%vega-start hap] =+ src=((hard ,@t) (need (peek now cx/pax))) =+ saz=(shax src) - =+ gen=(rain hap src) + =+ gen=(rain hap src) ~& %vega-parsed =+ ken=.*(0 q:(~(mint ut %noun) %noun gen)) =+ ^= nex diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 994df7a07..ca04bdadf 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1078,7 +1078,7 @@ ?: =(2 wid) %king ?: (lte wid 4) %duke ?: (lte wid 8) %earl - ?> (lte wid 16) %pawn + ?> (lte wid 16) %pawn :: ++ deft :: import url path |= rax=(list ,@t) @@ -1115,7 +1115,7 @@ |= a=coin ^- @t ?> ?=([%$ %t @] a) ?>(((sane %t) q.p.a) q.p.a) - =+ ^= quy + =+ ^= quy |- ^- (list ,[p=@t q=@t]) ?~ gut ~ ?> ?=(^ t.gut) @@ -1123,10 +1123,10 @@ ?> ?=([@ @ @ ~] pre) %- yax :* quy - (need (slaw %p i.pre)) + (need (slaw %p i.pre)) ced pre - suf + suf t.but for nep @@ -1175,7 +1175,7 @@ tar lus com sem tis == ++ ptok ;~ pose :: 2616 token - aln zap hax buc cen pam soq tar lus + aln zap hax buc cen pam soq tar lus hep dot ket cab tec bar sig == ++ scem :: 2396 scheme diff --git a/try/tan/md/html.hoon b/try/tan/md/html.hoon index ecbbb2cf6..39ec46af0 100644 --- a/try/tan/md/html.hoon +++ b/try/tan/md/html.hoon @@ -27,7 +27,7 @@ 6 -- |% - ++ cott + ++ cott ;~ pose (shim 0 8) (shim 11 37) @@ -88,7 +88,7 @@ == inlt == - ;~ mcat + ;~ mcat (wcat ;~(plug ;~(plug pam hax ;~(sfix (plus nud) sem)) (easy ";"))) inlt == @@ -241,7 +241,7 @@ |= [a=@ b=@] %+ knee *down |. ~+ ;~ pose - inli + inli hrul ;~(pfix (just `@`10) (lmel a b)) == @@ -266,7 +266,7 @@ |= [a=@ b=@] %+ knee *down |. ~+ (colk a b ;~(pfix dim:ag dot (plus whit) (lelm a +(b)))) - ++ bark + ++ bark |= a=@ %+ knee *down |. ~+ ;~ pose From 57954fc639710cb46c06db21a3171436a6a03b66 Mon Sep 17 00:00:00 2001 From: Steve Dee Date: Mon, 7 Apr 2014 10:19:16 -0700 Subject: [PATCH 2/3] Formatting --- try/tan/md/html.hoon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/try/tan/md/html.hoon b/try/tan/md/html.hoon index 39ec46af0..1a634e56e 100644 --- a/try/tan/md/html.hoon +++ b/try/tan/md/html.hoon @@ -132,7 +132,8 @@ ++ htmb %+ knee *tape |. ~+ %+ cook |=(a=(list tape) (reel a |=([p=tape q=tape] (weld p q)))) - (plus (cook |=(a=tape (weld a "\0a")) ;~(sfix (plus htmc) (just '\0a')))) + %- plus + (cook |=(a=tape (weld a "\0a")) ;~(sfix (plus htmc) (just '\0a'))) ++ blok %+ knee *tape |. ~+ %+ cook |=(a=[tape tape] (weld a)) From b54dea7533d152e83181fe7fb7e070166c86299b Mon Sep 17 00:00:00 2001 From: Steve Dee Date: Mon, 7 Apr 2014 19:31:37 -0700 Subject: [PATCH 3/3] New cryptosuite interface `seal`/`tear` now imply `sign`/`sure` and take the public key of the other party. As this muddies the `pu`/`se` distinction, we lump all asym ops under `as`. --- arvo/zuse.hoon | 197 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 195 insertions(+), 2 deletions(-) diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index ca04bdadf..ec9a30aa3 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -372,6 +372,159 @@ ?~(cow ~ [~ p.pig u.cow]) -- -- +++ crua :: new-style crya + :: ^- acru :: XX user must cast + =| [mos=@ pon=(unit ,[p=@ q=@ r=[p=@ q=@] s=_*fu])] + => |% + ++ mx (dec (met 0 mos)) :: bit length + ++ dap :: OEAP decode + |= [wid=@ xar=@ dog=@] ^- [p=@ q=@] + =+ pav=(sub wid xar) + =+ qoy=(cut 0 [xar pav] dog) + =+ dez=(mix (end 0 xar dog) (shaw %pad-b xar qoy)) + [dez (mix qoy (shaw %pad-a pav dez))] + :: + ++ pad :: OEAP encode + |= [wid=@ rax=[p=@ q=@] meg=@] ^- @ + =+ pav=(sub wid p.rax) + ?> (gte pav (met 0 meg)) + ^- @ + =+ qoy=(mix meg (shaw %pad-a pav q.rax)) + =+ dez=(mix q.rax (shaw %pad-b p.rax qoy)) + (can 0 [p.rax dez] [pav qoy] ~) + :: + ++ pull |=(a=@ (~(exp fo mos) 3 a)) + ++ push |=(a=@ (~(exp fo mos) 5 a)) + ++ pump + |= a=@ ^- @ + ?~ pon !! + (out.s.u.pon (exp.s.u.pon p.r.u.pon (sit.s.u.pon a))) + :: + ++ punt + |= a=@ ^- @ + ?~ pon !! + (out.s.u.pon (exp.s.u.pon q.r.u.pon (sit.s.u.pon a))) + -- + |% + ++ as + => |% + ++ haul + |= a=pass + =+ [mag=(end 3 1 a) bod=(rsh 3 1 a)] + ?> =('a' mag) + ..as(mos bod, pon ~) + -- + ^? + |% ++ seal + |= [a=pass b=@ c=@] + ^- @ + =+ her=(haul a) + =+ det=(lte (add 256 (met 0 c)) mx.her) + =+ lip=?:(det c 0) + =- (sign *code (add ?:(p.mav 0 1) (lsh 0 1 q.mav))) + ^= mav ^- [p=? q=@] + :- det + =+ dog=(pad mx.her [256 b] lip) + =+ hog=(push.her dog) + =+ ben=(en b c) + ?:(det hog (jam hog ben)) + ++ sign + |= [a=@ b=@] ^- @ + =- (add ?:(p.mav 0 1) (lsh 0 1 q.mav)) + ^= mav ^- [p=? q=@] + =+ det=(lte (add 128 (met 0 b)) mx) + :- det + =+ hec=(shaf (mix %agis a) b) + =+ dog=(pad mx [128 hec] ?:(det b 0)) + =+ hog=(pump dog) + ?:(det hog (jam hog b)) + ++ sure + |= [a=@ b=@] + ^- (unit ,@) + =+ [det==(0 (end 0 1 b)) bod=(rsh 0 1 b)] + =+ gox=?:(det [p=bod q=0] ((hard ,[p=@ q=@]) (cue bod))) + =+ dog=(pull p.gox) + =+ pig=(dap mx 128 dog) + =+ log=?:(det q.pig q.gox) + ?.(=(p.pig (shaf (mix %agis a) log)) ~ [~ log]) + ++ tear + |= [a=pass b=@] + ^- (unit ,[p=@ q=@]) + =+ her=(haul a) + =+ rus=(sure:as.her *code b) + ?~ rus ~ + =+ ros=u.rus + =+ [det==(0 (end 0 1 ros)) bod=(rsh 0 1 ros)] + =+ gox=?:(det [p=bod q=0] ((hard ,[p=@ q=@]) (cue bod))) + =+ dog=(punt p.gox) + =+ pig=(dap mx 256 dog) + ?: det + [~ p.pig q.pig] + =+ cow=(de p.pig q.gox) + ?~(cow ~ [~ p.pig u.cow]) + -- + :: + ++ de + |+ [key=@ cep=@] ^- (unit ,@) + =+ toh=(met 8 cep) + ?: (lth toh 2) + ~ + =+ adj=(dec toh) + =+ [hax=(end 8 1 cep) bod=(rsh 8 1 cep)] + =+ msg=(mix (~(raw og (mix hax key)) (mul 256 adj)) bod) + ?. =(hax (shax (mix key (shax (mix adj msg))))) + ~ + [~ msg] + :: + ++ dy |+([a=@ b=@] (need (de a b))) + ++ en + |+ [key=@ msg=@] ^- @ux + =+ len=(met 8 msg) + =+ adj=?:(=(0 len) 1 len) + =+ hax=(shax (mix key (shax (mix adj msg)))) + (rap 8 hax (mix msg (~(raw og (mix hax key)) (mul 256 adj))) ~) + :: + ++ ex ^? + |% ++ fig ^- @uvH (shaf %afig mos) + ++ pac ^- @uvG (end 6 1 (shaf %acod sec)) + ++ pub ^- pass (cat 3 'a' mos) + ++ sec ^- ring ?~(pon !! (cat 3 'A' (jam p.u.pon q.u.pon))) + -- + :: + ++ nu + => |% + ++ elcm + |= [a=@ b=@] + (div (mul a b) d:(egcd a b)) + :: + ++ eldm + |= [a=@ b=@ c=@] + (~(inv fo (elcm (dec b) (dec c))) a) + :: + ++ ersa + |= [a=@ b=@] + [a b [(eldm 3 a b) (eldm 5 a b)] (fu a b)] + -- + ^? + |% ++ com + |= a=@ + ^+ ^?(..nu) + ..nu(mos a, pon ~) + :: + ++ pit + |= [a=@ b=@] + =+ c=(rsh 0 1 a) + =+ [d=(ramp c [3 5 ~] b) e=(ramp c [3 5 ~] +(b))] + ^+ ^?(..nu) + ..nu(mos (mul d e), pon [~ (ersa d e)]) + :: + ++ nol + |= a=@ + ^+ ^?(..nu) + =+ b=((hard ,[p=@ q=@]) (cue a)) + ..nu(mos (mul p.b q.b), pon [~ (ersa p.b q.b)]) + -- + -- ++ brew :: create keypair |= [a=@ b=@] :: width seed ^- acro @@ -405,6 +558,22 @@ ?. &(?=(^ lov) =(msg u.lov)) ~|(%test-fail-sign !!) msg +:: +++ trua + |= msg=@tas + ^- @ + =+ ali=(pit:nu:crua 1.024 (shax 'ali')) + =+ bob=(pit:nu:crua 1.024 (shax 'bob')) + =+ tef=(sign:as.ali [0 msg]) + =+ lov=(sure:as.ali [0 tef]) + ?. &(?=(^ lov) =(msg u.lov)) + ~|(%test-fail-sign !!) + =+ key=(shax (shax (shax msg))) + =+ sax=(seal:as.ali pub:ex.bob key msg) + =+ tin=(tear:as.bob pub:ex.ali sax) + ?. &(?=(^ tin) =(key p.u.tin) =(msg q.u.tin)) + ~|(%test-fail-seal !!) + msg :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bC, JSON and XML :: :: @@ -1654,7 +1823,7 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 3bF, Arvo models :: :: -++ acro :: asym cryptosuite +++ acro :: old asym cryptosuite $_ ^? |% :: opaque object ++ de |+([a=@ b=@] *(unit ,@)) :: symmetric de, soft ++ dy |+([a=@ b=@] _@) :: symmetric de, hard @@ -1680,7 +1849,31 @@ |% ++ sign |=([a=@ b=@] _@) :: certify ++ tear |=(a=@ *(unit ,[p=@ q=@])) :: accept -- :: - -- :: + -- +++ acru :: asym cryptosuite + $_ ^? |% :: opaque object + ++ as ^? :: asym ops + |% ++ seal |=([a=pass b=@ c=@] _@) :: encrypt to a + ++ sign |=([a=@ b=@] _@) :: certify as us + ++ sure |=([a=@ b=@] *(unit ,@)) :: authenticate from us + ++ tear |=([a=pass b=@] *(unit ,[p=@ q=@])) :: accept from a + -- + ++ de |+([a=@ b=@] *(unit ,@)) :: symmetric de, soft + ++ dy |+([a=@ b=@] _@) :: symmetric de, hard + ++ en |+([a=@ b=@] _@) :: symmetric en + ++ ex ^? :: export + |% ++ fig _@uvH :: fingerprint + ++ pac _@uvG :: default passcode + ++ pub *pass :: public key + ++ sec *ring :: private key + -- + ++ ha |+(a=pass _@) :: shared secret + ++ nu ^? :: reconstructors + |% ++ pit |=([a=@ b=@] ^?(..nu)) :: from [width seed] + ++ nol |=(a=@ ^?(..nu)) :: from naked ring + ++ com |=(a=@ ^?(..nu)) :: from naked pass + -- + -- ++ agon (map ,[p=ship q=disc] ,[p=@ud q=@ud]) :: mergepts our/their ++ ankh :: fs node (new) $: p=cash :: recursive hash