2020-01-21 23:34:50 +03:00
|
|
|
:: dbug: agent wrapper for generic debugging tools
|
|
|
|
::
|
|
|
|
:: usage: %-(agent:dbug your-agent)
|
|
|
|
::
|
|
|
|
|%
|
2020-03-12 18:40:35 +03:00
|
|
|
+$ poke
|
|
|
|
$% [%bowl ~]
|
|
|
|
[%state grab=cord]
|
|
|
|
[%incoming =about]
|
|
|
|
[%outgoing =about]
|
2020-01-21 23:34:50 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ about
|
2020-03-21 20:32:39 +03:00
|
|
|
$@ ~
|
2020-01-21 23:34:50 +03:00
|
|
|
$% [%ship =ship]
|
|
|
|
[%path =path]
|
|
|
|
[%wire =wire]
|
|
|
|
[%term =term]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ agent
|
|
|
|
|= =agent:gall
|
|
|
|
^- agent:gall
|
2020-03-28 15:26:56 +03:00
|
|
|
!.
|
2020-01-21 23:34:50 +03:00
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
ag ~(. agent bowl)
|
|
|
|
::
|
|
|
|
++ on-poke
|
|
|
|
|= [=mark =vase]
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
?. ?=(%dbug mark)
|
|
|
|
=^ cards agent (on-poke:ag mark vase)
|
|
|
|
[cards this]
|
|
|
|
=/ dbug
|
2020-03-12 18:40:35 +03:00
|
|
|
!<(poke vase)
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
=; =tang
|
2020-04-16 00:50:53 +03:00
|
|
|
((%*(. slog pri 1) tang) [~ this])
|
2020-03-12 18:40:35 +03:00
|
|
|
?- -.dbug
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
%bowl [(sell !>(bowl))]~
|
2020-03-12 18:40:35 +03:00
|
|
|
::
|
|
|
|
%state
|
|
|
|
=? grab.dbug =('' grab.dbug) '-'
|
2020-03-25 00:12:28 +03:00
|
|
|
=- [(sell -)]~
|
2020-03-12 18:40:35 +03:00
|
|
|
%+ slap
|
|
|
|
(slop on-save:ag !>([bowl=bowl ..zuse]))
|
|
|
|
(ream grab.dbug)
|
2020-01-21 23:34:50 +03:00
|
|
|
::
|
|
|
|
%incoming
|
2020-04-15 23:28:59 +03:00
|
|
|
=; =tang
|
|
|
|
?^ tang tang
|
|
|
|
[%leaf "no matching subscriptions"]~
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
%+ murn
|
|
|
|
%+ sort ~(tap by sup.bowl)
|
|
|
|
|= [[* a=[=ship =path]] [* b=[=ship =path]]]
|
|
|
|
(aor [path ship]:a [path ship]:b)
|
|
|
|
|= [=duct [=ship =path]]
|
|
|
|
^- (unit tank)
|
2020-01-21 23:34:50 +03:00
|
|
|
=; relevant=?
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
?. relevant ~
|
|
|
|
`>[path=path from=ship duct=duct]<
|
2020-03-21 20:32:39 +03:00
|
|
|
?: ?=(~ about.dbug) &
|
2020-01-21 23:34:50 +03:00
|
|
|
?- -.about.dbug
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
%ship =(ship ship.about.dbug)
|
|
|
|
%path ?=(^ (find path.about.dbug path))
|
|
|
|
%wire %+ lien duct
|
2020-01-21 23:34:50 +03:00
|
|
|
|=(=wire ?=(^ (find wire.about.dbug wire)))
|
|
|
|
%term !!
|
|
|
|
==
|
|
|
|
::
|
|
|
|
%outgoing
|
2020-04-15 23:28:59 +03:00
|
|
|
=; =tang
|
|
|
|
?^ tang tang
|
|
|
|
[%leaf "no matching subscriptions"]~
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
%+ murn
|
|
|
|
%+ sort ~(tap by wex.bowl)
|
|
|
|
|= [[[a=wire *] *] [[b=wire *] *]]
|
|
|
|
(aor a b)
|
|
|
|
|= [[=wire =ship =term] [acked=? =path]]
|
|
|
|
^- (unit tank)
|
2020-01-21 23:34:50 +03:00
|
|
|
=; relevant=?
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
?. relevant ~
|
|
|
|
`>[wire=wire agnt=[ship term] path=path ackd=acked]<
|
2020-03-21 20:32:39 +03:00
|
|
|
?: ?=(~ about.dbug) &
|
2020-01-21 23:34:50 +03:00
|
|
|
?- -.about.dbug
|
dbug: cleaner subscription printing
Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.
Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
2020-03-21 20:29:33 +03:00
|
|
|
%ship =(ship ship.about.dbug)
|
|
|
|
%path ?=(^ (find path.about.dbug path))
|
|
|
|
%wire ?=(^ (find wire.about.dbug wire))
|
|
|
|
%term =(term term.about.dbug)
|
2020-01-21 23:34:50 +03:00
|
|
|
==
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ on-init
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent on-init:ag
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-save on-save:ag
|
|
|
|
::
|
|
|
|
++ on-load
|
|
|
|
|= old-state=vase
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-load:ag old-state)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|= =path
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-watch:ag path)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-leave
|
|
|
|
|= =path
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-leave:ag path)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-peek on-peek:ag
|
|
|
|
::
|
|
|
|
++ on-agent
|
|
|
|
|= [=wire =sign:agent:gall]
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-agent:ag wire sign)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-arvo
|
|
|
|
|= [=wire =sign-arvo]
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-arvo:ag wire sign-arvo)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-fail
|
|
|
|
|= [=term =tang]
|
|
|
|
^- (quip card:agent:gall agent:gall)
|
|
|
|
=^ cards agent (on-fail:ag term tang)
|
|
|
|
[cards this]
|
|
|
|
--
|
|
|
|
--
|