From ed13febe1b4149c0b0d47d667533cff40cc21767 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Mon, 20 Oct 2014 15:18:01 -0700 Subject: [PATCH 1/2] Comments --- arvo/hoon.hoon | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index d6fa98bdc..b7681a4bc 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -2779,8 +2779,8 @@ :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: section 2eG, parsing (whitespace) :: :: -++ dog ;~(plug dot gay) :: -++ doh ;~(plug ;~(plug hep hep) gay) :: +++ dog ;~(plug dot gay) :: . number separator +++ doh ;~(plug ;~(plug hep hep) gay) :: -- phon separator ++ dun (cold ~ ;~(plug hep hep)) :: -- (phep) to ~ ++ duz (cold ~ ;~(plug tis tis)) :: == (stet) to ~ ++ gah (mask [`@`10 ' ' ~]) :: newline or ace @@ -2845,13 +2845,13 @@ (boss 256 (star qat)) == :: -++ soqs ;~(plug soq soq soq) -++ sym +++ soqs ;~(plug soq soq soq) :: delimiting ''' +++ sym :: symbol %+ cook |=(a=tape (rap 3 ^-((list ,@) a))) ;~(plug low (star ;~(pose nud low hep))) :: -++ ven ;~ (comp |=([a=@ b=@] (peg a b))) +++ ven ;~ (comp |=([a=@ b=@] (peg a b))) :: +>- axis syntax bet =+ hom=`?`| |= tub=nail From e7ea40dd790930e9c029b62875bf86a7731eb63f Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 21 Oct 2014 19:04:27 -0700 Subject: [PATCH 2/2] h/h refactoring --- arvo/eyre.hoon | 2 +- arvo/hoon.hoon | 37 +++++++------------------------------ arvo/zuse.hoon | 6 +++--- main/app/shell/core.hook | 2 +- main/bin/haus.hoon | 2 +- 5 files changed, 13 insertions(+), 36 deletions(-) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 79be81a1a..72582f9e9 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -794,7 +794,7 @@ ~ :* ^= rob - %- roly + %- role :~ 'User-agent: *' 'Disallow: /' == diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index b7681a4bc..903648b61 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -74,7 +74,6 @@ == :: ++ gate $+(* *) :: general gate ++ hair ,[p=@ud q=@ud] :: parsing trace -++ hapt (list ,@ta) :: XX not used ++ like |* a=_,* :: generic edge |= b=_`*`[(hair) ~] :: :- p=(hair -.b) :: @@ -327,10 +326,6 @@ ++ tyre (list ,[p=term q=twig]) :: ++ tyke (list (unit twig)) :: ++ tram (list ,[p=wing q=twig]) :: -++ tone $% [%0 p=*] :: - [%1 p=(list)] :: - [%2 p=(list ,[@ta *])] :: - == :: :: :::::: virtual nock ++ nock $& [p=nock q=nock] :: autocons $% [%0 p=@] :: axis select @@ -346,6 +341,10 @@ [%10 p=?(@ [p=@ q=nock]) q=nock] :: hint [%11 p=nock] :: grab data from sky == :: +++ tone $% [%0 p=*] :: + [%1 p=(list)] :: + [%2 p=(list ,[@ta *])] :: + == :: ++ toon $% [%0 p=*] :: [%1 p=(list)] :: [%2 p=(list tank)] :: @@ -1875,22 +1874,6 @@ $(a l.a) $(a r.a) :: - +- mer :: puts b in a, sorted - ~/ %mer - |* b=_a - |- ^+ a - ?~ b - a - ?~ a - b - ?. (vor n.a n.b) - $(a b, b a) - ?: =(n.b n.a) - [n.a $(a l.a, b l.b) $(a r.a, b r.b)] - ?: (hor n.b n.a) - $(a [n.a $(a l.a, b [n.b l.b ~]) r.a], b r.b) - $(a [n.a l.a $(a r.a, b [n.b ~ r.b])], b l.b) - :: +- int :: intersection ~/ %int |* b=_a @@ -2173,12 +2156,6 @@ b $(a r.a, b [n.a $(a l.a)]) :: - +- tur :: turn - |* b=$+([* *] *) - |- - ?~ a ~ - [n=[p=p.n.a q=(b p.n.a q.n.a)] l=$(a l.a) r=$(a r.a)] - :: +- uni :: union, merge ~/ %uni |* b=_a @@ -4565,7 +4542,7 @@ !! $(lub res, tez [(end 3 meg lub) tez]) :: -++ roly :: line list to atom +++ role :: line list to atom |= tez=(list ,@t) (rap 3 (turn tez |=(a=@t (cat 3 a 10)))) :: @@ -4582,7 +4559,7 @@ :: %c =+ dst=(lore ((hard ,@) src)) - %- roly + %- role ?+ -.q.don ~|(%unsupported !!) %a ((hard (list ,@t)) q.q.don) %c (lurk dst p.q.don) @@ -4620,7 +4597,7 @@ ?+ pum ~|(%unsupported !!) %a dst %b (jam dst) - %c (roly ((hard (list ,@)) dst)) + %c (role ((hard (list ,@)) dst)) == :: ++ lurk :: apply list patch diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index 1670c24f7..33adf24c2 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1595,7 +1595,7 @@ ?. con !! %- some :- %ins - %- roly + %- role %- annotate :- us :- th @@ -1696,7 +1696,7 @@ =. lat lut =+ ^= far ^- (map path lobe) - %- ~(tur by (forge par for s t)) + %- ~(urn by (forge par for s t)) |= [k=path v=blob] (blob-to-lobe v) =+ u=(make-yaki [r.par r.for ~] far `@da`0) :: fake yaki :- u @@ -1704,7 +1704,7 @@ =< - %- update-lat :_ ~ - %- ~(tur by q.u) + %- ~(urn by q.u) |= [path k=lobe] (lobe-to-blob k) :: diff --git a/main/app/shell/core.hook b/main/app/shell/core.hook index 3c57153fc..e3f2b3287 100644 --- a/main/app/shell/core.hook +++ b/main/app/shell/core.hook @@ -90,10 +90,10 @@ ;~ pose (stag %run ;~(plug (star ;~(sfix (task(tol %0) bar) ace)) (task col))) (stag %end ;~(pfix sem ;~(pose (stag %& dem) (stag %| sym)))) - (stag %path (full ;~(sfix loca(pax paf) (star ace)))) (stag %del ;~(pfix hep ace loca)) (stag %mut ;~(pfix col ace ;~(plug loca expg))) (stag %ins ;~(pfix lus ace ;~(plug loca (opts expg)))) + (stag %path (full ;~(sfix loca(pax paf) (star ace)))) (stag %var ;~(plug ;~(pfix tis sym) expg)) (stag %rvar ;~(pfix ;~(plug tis tis) sym)) (stag %hoon expr) diff --git a/main/bin/haus.hoon b/main/bin/haus.hoon index ce755e879..1feca4f29 100644 --- a/main/bin/haus.hoon +++ b/main/bin/haus.hoon @@ -51,7 +51,7 @@ ^- _. %= . elf.ful - %- ~(tur by elf.ful) + %- ~(urn by elf.ful) |= [r=room [d=@da n=@ud]] =+ lov=(fall (~(get by lov.par) r) *loft) [d num.lov]