From 52555291bc11b48fb7bab125e43459e09c3fa309 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Tue, 2 Jun 2015 13:52:33 -0700 Subject: [PATCH] Fix hood to route errors properly through :talk. --- base/ape/dojo/core.hook | 6 +++-- base/ape/hood/core.hook | 8 +++---- base/ape/talk/core.hook | 2 +- base/arvo/ford.hoon | 2 +- base/cat/hood/invite/gate.hook | 4 ++-- base/lib/drum/core.hook | 41 +++++++++++++++++++++++----------- base/lib/helm/core.hook | 11 +-------- 7 files changed, 41 insertions(+), 33 deletions(-) diff --git a/base/ape/dojo/core.hook b/base/ape/dojo/core.hook index 38adbc32a..db55f57fc 100644 --- a/base/ape/dojo/core.hook +++ b/base/ape/dojo/core.hook @@ -150,7 +150,7 @@ [%volt p=(set beam) q=(cask ,*)] :: unsafe add type == :: ++ sign :: - $% [%made p=@uvH q=gage] :: + $% [%made p=@uvH q=gage] :: [%unto p=cuft] :: == :: -- :: @@ -663,7 +663,9 @@ ++ he-unto :: result from behn |= cit=cuft ^+ +> - ?> ?=(%coup -.cit) + ?. ?=(%coup -.cit) + ~& [%strange-unto cit] + +> ?~ p.cit (he-diff %txt ">=") (he-diff %tan u.p.cit) diff --git a/base/ape/hood/core.hook b/base/ape/hood/core.hook index bfc3fd588..5594e134b 100644 --- a/base/ape/hood/core.hook +++ b/base/ape/hood/core.hook @@ -55,8 +55,8 @@ ~? ?=(^ saw) [%kiln-spam-lame u.saw] [~ +>] :: -++ coup-drum (wrap take-coup):from-drum -++ diff-sole-effect-drum (wrap diff-sole-effect):from-drum +++ coup-drum-phat (wrap take-coup-phat):from-drum +++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum ++ from-helm =- [wrap=- *helm-work] |* fun=_=>(*helm-work |=(* abet)) @@ -101,10 +101,10 @@ ++ made-kiln (wrap take-made):from-kiln ++ init-helm |=([way=wire *] [~ +>]) ++ note-helm (wrap take-note):from-helm -++ reap-drum (wrap reap):from-drum +++ reap-drum-phat (wrap reap-phat):from-drum ++ onto-drum (wrap take-onto):from-drum ++ peer-drum (wrap peer):from-drum -++ quit-drum (wrap quit):from-drum +++ quit-drum-phat (wrap quit-phat):from-drum ++ went-helm (wrap take-went):from-helm ++ writ-kiln-sync (wrap take-writ):from-kiln -- diff --git a/base/ape/talk/core.hook b/base/ape/talk/core.hook index 4fc7e5452..0484af430 100644 --- a/base/ape/talk/core.hook +++ b/base/ape/talk/core.hook @@ -1644,7 +1644,7 @@ (weld " " txt) :: %app - "[:{(trip p.sep)}]: {(trip q.sep)}" + ":{(trip p.sep)}: {(trip q.sep)}" == -- :: diff --git a/base/arvo/ford.hoon b/base/arvo/ford.hoon index 5fcb412cf..a33017256 100644 --- a/base/arvo/ford.hoon +++ b/base/arvo/ford.hoon @@ -1072,7 +1072,7 @@ :: %boil ^- (bolt gage) - %+ cool |.(leaf/"ford: boil {} {<(tope q.kas)>} {}") + :: %+ cool |.(leaf/"ford: boil {} {<(tope q.kas)>} {}") %+ cope (lamp cof q.kas) |= [cof=cafe bem=beam] %+ cope (lime cof p.kas bem r.kas) diff --git a/base/cat/hood/invite/gate.hook b/base/cat/hood/invite/gate.hook index 732266db2..90acf1e39 100644 --- a/base/cat/hood/invite/gate.hook +++ b/base/cat/hood/invite/gate.hook @@ -6,6 +6,6 @@ :::: !: |= $: [now=@da eny=@uvI bec=beak] - [[syd=desk dap=term ~] ~] + [[who=@p myl=@t ~] ~] == -[%hood-invite syd dap] +[%hood-invite who myl] diff --git a/base/lib/drum/core.hook b/base/lib/drum/core.hook index 7162dcab5..b9de2d1e4 100644 --- a/base/lib/drum/core.hook +++ b/base/lib/drum/core.hook @@ -115,7 +115,7 @@ :: ++ drum-path :: encode path |= gyl=gill - [%drum (scot %p p.gyl) q.gyl ~] + [%drum %phat (scot %p p.gyl) q.gyl ~] :: ++ drum-phat :: decode path |= way=wire ^- gill @@ -127,6 +127,7 @@ => |% :: arvo structures ++ pear :: request $% [%sole-action p=sole-action] :: + [%talk-command command:talk] :: == :: ++ lime :: update $% [%dill-blit dill-blit] :: @@ -175,7 +176,7 @@ -- -- |_ [moz=(list move) biz=(list dill-blit)] - ++ diff-sole-effect :: + ++ diff-sole-effect-phat :: |= [way=wire fec=sole-effect] =< se-abet =< se-view =+ gyl=(drum-phat way) @@ -199,6 +200,7 @@ :: ++ poke-start :: |= wel=well + ~& [%poke-well wel] =< se-abet =< se-view (se-born wel) :: @@ -207,15 +209,16 @@ =< se-abet =< se-view (se-link gyl) :: - ++ reap :: + ++ reap-phat :: |= [way=wire saw=(unit tang)] + ~& [%reap-phat way saw] =< se-abet =< se-view =+ gyl=(drum-phat way) ?~ saw (se-join gyl) (se-dump:(se-drop & gyl) u.saw) :: - ++ take-coup :: + ++ take-coup-phat :: |= [way=wire saw=(unit tang)] =< se-abet =< se-view ?~ saw +> @@ -237,7 +240,7 @@ +>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw])) == :: - ++ quit + ++ quit-phat :: |= way=wire =< se-abet =< se-view =+ gyl=(drum-phat way) @@ -248,6 +251,9 @@ :: :: :: ++ se-abet :: resolve ^- (quip move *drum-part) + ?. se-ably + =. . se-adit + [(flop moz) +>+>+<+] =. . se-adze:se-adit :_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<)) ^- (list move) @@ -256,6 +262,7 @@ ?~ biz ~ [ost %diff %dill-blit ?~(t.biz i.biz [%mor (flop biz)])]~ :: + ++ se-ably (~(has by sup) ost) :: caused by console ++ se-adit :: update servers =+ yar=(~(tap by ray)) |- ^+ +> @@ -343,14 +350,6 @@ (se-text "[already running {}/{}]") +>(ray (~(put in ray) wel), eel (~(put in eel) [our q.wel])) :: - ++ se-dump :: print tanks - |= tac=(list tank) - ^+ +> - =+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg])))) - |- ^+ +>.^$ - ?~ wol +>.^$ - $(wol t.wol, +>.^$ (se-blit %out (tuba i.wol))) - :: ++ se-drop :: disconnect |= [pej=? gyl=gill] ^+ +> @@ -364,6 +363,15 @@ =. +>.$ (se-text "[detached from {}]") se-prom(liv.maz ?~(fug & liv.maz)) :: + ++ se-dump :: print tanks + |= tac=(list tank) + ^+ +> + ?. se-ably (se-talk tac) + =+ wol=`wall`(zing (turn tac |=(a=tank (~(win re a) [0 edg])))) + |- ^+ +>.^$ + ?~ wol +>.^$ + $(wol t.wol, +>.^$ (se-blit %out (tuba i.wol))) + :: ++ se-joke :: prepare connection |= gyl=gill ^+ +> @@ -472,8 +480,15 @@ |= mov=move %_(+> moz [mov moz]) :: + ++ se-talk + |= tac=(list tank) + ^+ +> + (se-emit 0 %poke /drum/talk [our %talk] (said our %drum now eny tac)) + :: ++ se-text :: return text |= txt=tape + ^+ +> + ?. se-ably (se-talk [%leaf txt]~) (se-blit %out (tuba txt)) :: ++ se-poke :: send a poke diff --git a/base/lib/helm/core.hook b/base/lib/helm/core.hook index 3dfe15588..4aa32c7d9 100644 --- a/base/lib/helm/core.hook +++ b/base/lib/helm/core.hook @@ -27,10 +27,6 @@ ++ hood-init :: report init $: him=ship :: == :: -++ hood-start :: start (local) server - $: syd=desk :: desk - dap=term :: program - == :: ++ hood-reset :: reset command ,~ :: ++ helm-verb :: reset command @@ -85,10 +81,6 @@ |= ~ =< abet (emit %flog /heft %crud %hax-heft ~) :: - ++ poke-start :: start a server - |= hood-start =< abet - (emit %conf /helm [our dap] %load our syd) - :: ++ poke-reload |=(all=(list term) (poke-reload-desk %home all)) ++ poke-reload-desk :: reload vanes |= [syd=desk all=(list term)] =< abet @@ -117,7 +109,7 @@ |= [who=@p myl=@t] =< abet %^ emit %poke /helm/invite :- [our %talk] - (said our %helm now eny [%leaf "sent invite: {} at {(trip myl)}"]~) + (said our %helm now eny [%leaf "invited: {} at {(trip myl)}"]~) :: ++ poke-reset :: reset system |= hood-reset =< abet @@ -157,7 +149,6 @@ :: ++ take-onto :: result of %conf |= saw=(each suss tang) =< abet - ~& [%take-onto saw] %- emit ?- -.saw %| [%flog ~ %crud %onto `tang`p.saw]