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

@ -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)

View File

@ -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
--

View File

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

View File

@ -1072,7 +1072,7 @@
::
%boil
^- (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)
|= [cof=cafe bem=beam]
%+ cope (lime cof p.kas bem r.kas)

View File

@ -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]

View File

@ -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 {<p.wel>}/{<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
|= [pej=? gyl=gill]
^+ +>
@ -364,6 +363,15 @@
=. +>.$ (se-text "[detached from {<gyl>}]")
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

View File

@ -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: {<who>} at {(trip myl)}"]~)
(said our %helm now eny [%leaf "invited: {<who>} 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]