Merge pull request #2587 from urbit/m/dbug-cleaner-subs

dbug: subscription searching & printing improvements
This commit is contained in:
Fang 2020-03-24 10:40:45 +01:00 committed by GitHub
commit a155da6dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
==
::
+$ about
$@ ~
$% [%ship =ship]
[%path =path]
[%wire =wire]
@ -32,44 +33,53 @@
[cards this]
=/ dbug
!<(poke vase)
=; out=^vase
((slog (sell out) ~) [~ this])
=; =tang
((slog tang) [~ this])
?- -.dbug
%bowl !>(bowl)
%bowl [(sell !>(bowl))]~
::
%state
=? grab.dbug =('' grab.dbug) '-'
=- [(sell !>(-))]~
%+ slap
(slop on-save:ag !>([bowl=bowl ..zuse]))
(ream grab.dbug)
::
%incoming
!>
%+ murn ~(tap by sup.bowl)
|= sub=[=duct [=ship =path]]
^- (unit _sub)
%+ murn
%+ sort ~(tap by sup.bowl)
|= [[* a=[=ship =path]] [* b=[=ship =path]]]
(aor [path ship]:a [path ship]:b)
|= [=duct [=ship =path]]
^- (unit tank)
=; relevant=?
?:(relevant `sub ~)
?. relevant ~
`>[path=path from=ship duct=duct]<
?: ?=(~ about.dbug) &
?- -.about.dbug
%ship =(ship.sub ship.about.dbug)
%path ?=(^ (find path.about.dbug path.sub))
%wire %+ lien duct.sub
%ship =(ship ship.about.dbug)
%path ?=(^ (find path.about.dbug path))
%wire %+ lien duct
|=(=wire ?=(^ (find wire.about.dbug wire)))
%term !!
==
::
%outgoing
!>
%+ murn ~(tap by wex.bowl)
|= sub=[[=wire =ship =term] [acked=? =path]]
^- (unit _sub)
%+ murn
%+ sort ~(tap by wex.bowl)
|= [[[a=wire *] *] [[b=wire *] *]]
(aor a b)
|= [[=wire =ship =term] [acked=? =path]]
^- (unit tank)
=; relevant=?
?:(relevant `sub ~)
?. relevant ~
`>[wire=wire agnt=[ship term] path=path ackd=acked]<
?: ?=(~ about.dbug) &
?- -.about.dbug
%ship =(ship.sub ship.about.dbug)
%path ?=(^ (find path.about.dbug path.sub))
%wire ?=(^ (find wire.about.dbug wire.sub))
%term =(term.sub term.about.dbug)
%ship =(ship ship.about.dbug)
%path ?=(^ (find path.about.dbug path))
%wire ?=(^ (find wire.about.dbug wire))
%term =(term term.about.dbug)
==
==
::