From 012396a4b15ebca87297031b9c344273626a9ff4 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Fri, 14 Feb 2014 11:29:03 -0800 Subject: [PATCH] Various fixes and improvements. --- arvo/hoon.hoon | 7 ++++++- arvo/zuse.hoon | 4 ++-- main/bin/ram.hoon | 2 ++ main/lib/pony.hoon | 1 + try/bin/goodbye.hoon | 5 ++--- try/bin/write.hoon | 43 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 try/bin/write.hoon diff --git a/arvo/hoon.hoon b/arvo/hoon.hoon index 6f0c4bd46..3f3536517 100644 --- a/arvo/hoon.hoon +++ b/arvo/hoon.hoon @@ -165,6 +165,7 @@ [%brkt p=twig q=(map term foot)] :: [%brhp p=twig] :: [%brls p=tile q=twig] :: + [%brpt p=tile q=tile r=twig] :: [%brtr p=tile q=twig] :: [%brts p=tile q=twig] :: [%brwt p=twig] :: @@ -232,13 +233,17 @@ :: :: [%tsbr p=tile q=twig] :: [%tscl p=tram q=twig] :: + [%tscn p=twig q=twig] :: [%tsdt p=wing q=twig r=twig] :: + [%tsfs p=twig q=twig] :: [%tsgl p=twig q=twig] :: + [%tshp p=twig q=twig] :: [%tsgr p=twig q=twig] :: [%tskt p=twig q=twig r=twig s=twig] :: [%tsls p=twig q=twig] :: + [%tspm p=tile q=twig] :: + [%tspt p=tile q=twig] :: [%tstr p=term q=wing r=twig] :: - [%tshp p=twig q=twig] :: [%tssg p=tusk] :: :: :: [%wtbr p=tusk] :: diff --git a/arvo/zuse.hoon b/arvo/zuse.hoon index be62704c0..e994b6767 100644 --- a/arvo/zuse.hoon +++ b/arvo/zuse.hoon @@ -1053,7 +1053,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) @@ -1755,7 +1755,7 @@ ++ deed ,[p=@ q=step] :: signature, stage ++ dome :: project state $: ang=agon :: pedigree - ank=ankh :: new state + ank=ankh :: state let=@ :: (lent hit) hit=(list frog) :: changes in reverse lab=(map ,@tas ,@ud) :: labels diff --git a/main/bin/ram.hoon b/main/bin/ram.hoon index 5923b4fbd..429fe7923 100644 --- a/main/bin/ram.hoon +++ b/main/bin/ram.hoon @@ -33,6 +33,8 @@ :_ ~ :- t.t.t.pax ^- miso + =+ lon=((hard arch) .^(%cy pax)) + ?~ q.lon =+ fil=(file pax) ?~ fil [%ins i.q.u.p.nut] diff --git a/main/lib/pony.hoon b/main/lib/pony.hoon index 7e6eadd93..7c240b1ce 100644 --- a/main/lib/pony.hoon +++ b/main/lib/pony.hoon @@ -33,6 +33,7 @@ [[[[%polo ~] [%up pim pro def]] ~] ..$] (woo now u.rey) :: +++ pome |=([git=(list gift) bol=bowl] [(weld git p.bol) q.bol]) ++ pomo |=([gud=gift bol=bowl] [[gud p.bol] q.bol]) ++ pomp |=([tix=tape bol=bowl] (pomo la/leaf/tix bol)) ++ pond :: text block diff --git a/try/bin/goodbye.hoon b/try/bin/goodbye.hoon index 4e8ba2a45..7419e0b6d 100644 --- a/try/bin/goodbye.hoon +++ b/try/bin/goodbye.hoon @@ -1,5 +1,4 @@ |= * |= [planet=tape ~] -^- bowl -:_ ~ :_ ~ -[%$ !>("hasta la vista, {planet}.")] +^- bowl :_ ~ :_ ~ :- %$ !> +"hasta la vista, {planet}." diff --git a/try/bin/write.hoon b/try/bin/write.hoon new file mode 100644 index 000000000..e82fd5176 --- /dev/null +++ b/try/bin/write.hoon @@ -0,0 +1,43 @@ +!: :: /=try=/bin/env/hoon +!? 164 +:::: +=> .(- `[who=@p how=path]`-) +=> .(- [woh=(scot %p who) -]) +=> .(+ =>(+ ^/=main=/lib/pony)) +:::: +|= [est=time eny=@] +|= [loc=[mih=span dez=span caz=span sup=path] ~] +:::: +?. =(woh mih.loc) + ~|("you are not {(trip mih.loc)}!" !!) +=+ yaz=(zu ((hard ankh) .^(%cz mih.loc dez.loc caz.loc ~))) +%+ pomp "appending to {(dart:ut loc)}..." +=< work +|% +++ pend + |= den=@t + ^- [(list gift) _+>] + =+ nyp=`soba`[*cart (turn (plan den) |=(p=miso [sup.loc p]))] + :- [[%ok dez.loc `nori`[%& ~ nyp]] ~] + =. yaz (durn:yaz nyp) + +>.$ +:: +++ plan + |= den=@t + ^- (list miso) + =+ cur=q:ank:(deny:yaz sup.loc) + ?~ cur + [[%ins den] ~] + ?^ q.u.cur + [[%del q.u.cur] [%ins den] ~] + [[%mut ((diff %c) q.u.cur (cat 3 q.u.cur den))] ~] +:: +++ work + |- ^- bowl + %+ (polo %text "> " ~ ~) + (plus alp) + |= [now=@da txt=tape] + ^- bowl + =^ giv +.^$ (pend (rap 3 (weld txt `tape`[`@`10 ~]))) + (pome giv ^$) +--