Fix hood to route errors properly through :talk.

This commit is contained in:
C. Guy Yarvin 2015-06-02 13:52:33 -07:00
parent 282a9ec75f
commit 52555291bc
7 changed files with 41 additions and 33 deletions

View File

@ -150,7 +150,7 @@
[%volt p=(set beam) q=(cask ,*)] :: unsafe add type [%volt p=(set beam) q=(cask ,*)] :: unsafe add type
== :: == ::
++ sign :: ++ sign ::
$% [%made p=@uvH q=gage] :: $% [%made p=@uvH q=gage] ::
[%unto p=cuft] :: [%unto p=cuft] ::
== :: == ::
-- :: -- ::
@ -663,7 +663,9 @@
++ he-unto :: result from behn ++ he-unto :: result from behn
|= cit=cuft |= cit=cuft
^+ +> ^+ +>
?> ?=(%coup -.cit) ?. ?=(%coup -.cit)
~& [%strange-unto cit]
+>
?~ p.cit ?~ p.cit
(he-diff %txt ">=") (he-diff %txt ">=")
(he-diff %tan u.p.cit) (he-diff %tan u.p.cit)

View File

@ -55,8 +55,8 @@
~? ?=(^ saw) [%kiln-spam-lame u.saw] ~? ?=(^ saw) [%kiln-spam-lame u.saw]
[~ +>] [~ +>]
:: ::
++ coup-drum (wrap take-coup):from-drum ++ coup-drum-phat (wrap take-coup-phat):from-drum
++ diff-sole-effect-drum (wrap diff-sole-effect):from-drum ++ diff-sole-effect-drum-phat (wrap diff-sole-effect-phat):from-drum
++ from-helm ++ from-helm
=- [wrap=- *helm-work] =- [wrap=- *helm-work]
|* fun=_=>(*helm-work |=(* abet)) |* fun=_=>(*helm-work |=(* abet))
@ -101,10 +101,10 @@
++ made-kiln (wrap take-made):from-kiln ++ made-kiln (wrap take-made):from-kiln
++ init-helm |=([way=wire *] [~ +>]) ++ init-helm |=([way=wire *] [~ +>])
++ note-helm (wrap take-note):from-helm ++ 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 ++ onto-drum (wrap take-onto):from-drum
++ peer-drum (wrap peer):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 ++ went-helm (wrap take-went):from-helm
++ writ-kiln-sync (wrap take-writ):from-kiln ++ writ-kiln-sync (wrap take-writ):from-kiln
-- --

View File

@ -1644,7 +1644,7 @@
(weld " " txt) (weld " " txt)
:: ::
%app %app
"[:{(trip p.sep)}]: {(trip q.sep)}" ":{(trip p.sep)}: {(trip q.sep)}"
== ==
-- --
:: ::

View File

@ -1072,7 +1072,7 @@
:: ::
%boil %boil
^- (bolt gage) ^- (bolt gage)
%+ cool |.(leaf/"ford: boil {<p.kas>} {<(tope q.kas)>} {<r.kas>}") :: %+ cool |.(leaf/"ford: boil {<p.kas>} {<(tope q.kas)>} {<r.kas>}")
%+ cope (lamp cof q.kas) %+ cope (lamp cof q.kas)
|= [cof=cafe bem=beam] |= [cof=cafe bem=beam]
%+ cope (lime cof p.kas bem r.kas) %+ cope (lime cof p.kas bem r.kas)

View File

@ -6,6 +6,6 @@
:::: ::::
!: !:
|= $: [now=@da eny=@uvI bec=beak] |= $: [now=@da eny=@uvI bec=beak]
[[syd=desk dap=term ~] ~] [[who=@p myl=@t ~] ~]
== ==
[%hood-invite syd dap] [%hood-invite who myl]

View File

@ -115,7 +115,7 @@
:: ::
++ drum-path :: encode path ++ drum-path :: encode path
|= gyl=gill |= gyl=gill
[%drum (scot %p p.gyl) q.gyl ~] [%drum %phat (scot %p p.gyl) q.gyl ~]
:: ::
++ drum-phat :: decode path ++ drum-phat :: decode path
|= way=wire ^- gill |= way=wire ^- gill
@ -127,6 +127,7 @@
=> |% :: arvo structures => |% :: arvo structures
++ pear :: request ++ pear :: request
$% [%sole-action p=sole-action] :: $% [%sole-action p=sole-action] ::
[%talk-command command:talk] ::
== :: == ::
++ lime :: update ++ lime :: update
$% [%dill-blit dill-blit] :: $% [%dill-blit dill-blit] ::
@ -175,7 +176,7 @@
-- --
-- --
|_ [moz=(list move) biz=(list dill-blit)] |_ [moz=(list move) biz=(list dill-blit)]
++ diff-sole-effect :: ++ diff-sole-effect-phat ::
|= [way=wire fec=sole-effect] |= [way=wire fec=sole-effect]
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(drum-phat way) =+ gyl=(drum-phat way)
@ -199,6 +200,7 @@
:: ::
++ poke-start :: ++ poke-start ::
|= wel=well |= wel=well
~& [%poke-well wel]
=< se-abet =< se-view =< se-abet =< se-view
(se-born wel) (se-born wel)
:: ::
@ -207,15 +209,16 @@
=< se-abet =< se-view =< se-abet =< se-view
(se-link gyl) (se-link gyl)
:: ::
++ reap :: ++ reap-phat ::
|= [way=wire saw=(unit tang)] |= [way=wire saw=(unit tang)]
~& [%reap-phat way saw]
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(drum-phat way) =+ gyl=(drum-phat way)
?~ saw ?~ saw
(se-join gyl) (se-join gyl)
(se-dump:(se-drop & gyl) u.saw) (se-dump:(se-drop & gyl) u.saw)
:: ::
++ take-coup :: ++ take-coup-phat ::
|= [way=wire saw=(unit tang)] |= [way=wire saw=(unit tang)]
=< se-abet =< se-view =< se-abet =< se-view
?~ saw +> ?~ saw +>
@ -237,7 +240,7 @@
+>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw])) +>.$(fur (~(put by fur) q.wel `[p.wel %da r.p.saw]))
== ==
:: ::
++ quit ++ quit-phat ::
|= way=wire |= way=wire
=< se-abet =< se-view =< se-abet =< se-view
=+ gyl=(drum-phat way) =+ gyl=(drum-phat way)
@ -248,6 +251,9 @@
:: :: :: :: :: ::
++ se-abet :: resolve ++ se-abet :: resolve
^- (quip move *drum-part) ^- (quip move *drum-part)
?. se-ably
=. . se-adit
[(flop moz) +>+>+<+]
=. . se-adze:se-adit =. . se-adze:se-adit
:_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<)) :_ %_(+>+>+<+ bin (~(put by bin) ost `source`+>+<))
^- (list move) ^- (list move)
@ -256,6 +262,7 @@
?~ biz ~ ?~ biz ~
[ost %diff %dill-blit ?~(t.biz i.biz [%mor (flop 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 ++ se-adit :: update servers
=+ yar=(~(tap by ray)) =+ yar=(~(tap by ray))
|- ^+ +> |- ^+ +>
@ -343,14 +350,6 @@
(se-text "[already running {<p.wel>}/{<q.wel>}]") (se-text "[already running {<p.wel>}/{<q.wel>}]")
+>(ray (~(put in ray) wel), eel (~(put in eel) [our q.wel])) +>(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 ++ se-drop :: disconnect
|= [pej=? gyl=gill] |= [pej=? gyl=gill]
^+ +> ^+ +>
@ -364,6 +363,15 @@
=. +>.$ (se-text "[detached from {<gyl>}]") =. +>.$ (se-text "[detached from {<gyl>}]")
se-prom(liv.maz ?~(fug & liv.maz)) 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 ++ se-joke :: prepare connection
|= gyl=gill |= gyl=gill
^+ +> ^+ +>
@ -472,8 +480,15 @@
|= mov=move |= mov=move
%_(+> moz [mov moz]) %_(+> 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 ++ se-text :: return text
|= txt=tape |= txt=tape
^+ +>
?. se-ably (se-talk [%leaf txt]~)
(se-blit %out (tuba txt)) (se-blit %out (tuba txt))
:: ::
++ se-poke :: send a poke ++ se-poke :: send a poke

View File

@ -27,10 +27,6 @@
++ hood-init :: report init ++ hood-init :: report init
$: him=ship :: $: him=ship ::
== :: == ::
++ hood-start :: start (local) server
$: syd=desk :: desk
dap=term :: program
== ::
++ hood-reset :: reset command ++ hood-reset :: reset command
,~ :: ,~ ::
++ helm-verb :: reset command ++ helm-verb :: reset command
@ -85,10 +81,6 @@
|= ~ =< abet |= ~ =< abet
(emit %flog /heft %crud %hax-heft ~) (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 |=(all=(list term) (poke-reload-desk %home all))
++ poke-reload-desk :: reload vanes ++ poke-reload-desk :: reload vanes
|= [syd=desk all=(list term)] =< abet |= [syd=desk all=(list term)] =< abet
@ -117,7 +109,7 @@
|= [who=@p myl=@t] =< abet |= [who=@p myl=@t] =< abet
%^ emit %poke /helm/invite %^ emit %poke /helm/invite
:- [our %talk] :- [our %talk]
(said our %helm now eny [%leaf "sent invite: {<who>} at {(trip myl)}"]~) (said our %helm now eny [%leaf "invited: {<who>} at {(trip myl)}"]~)
:: ::
++ poke-reset :: reset system ++ poke-reset :: reset system
|= hood-reset =< abet |= hood-reset =< abet
@ -157,7 +149,6 @@
:: ::
++ take-onto :: result of %conf ++ take-onto :: result of %conf
|= saw=(each suss tang) =< abet |= saw=(each suss tang) =< abet
~& [%take-onto saw]
%- emit %- emit
?- -.saw ?- -.saw
%| [%flog ~ %crud %onto `tang`p.saw] %| [%flog ~ %crud %onto `tang`p.saw]