mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +03:00
gen: rewrite +vats and add optional list of desks
This commit is contained in:
parent
6a0f66b836
commit
f2880ecc91
@ -1,20 +1,21 @@
|
|||||||
|
:: Print diagnostic information about desks.
|
||||||
|
::
|
||||||
|
:: Accepts an optional argument of a list of one or more desks, returns info
|
||||||
|
:: on all desks if no desks are specified.
|
||||||
|
::
|
||||||
|
:: Keyword arguments include =filt and =verb. =filt takes one of %running,
|
||||||
|
:: %suspended, %exists, %exists-not, or %blocking; =verb takes either & or |
|
||||||
|
::
|
||||||
|
:: If both a list of desks and a filter are provided, the output will include
|
||||||
|
:: the desks from the list that match the filter, with the exception of the
|
||||||
|
:: %blocking filter which always returns all desks that match.
|
||||||
|
::
|
||||||
/- *hood
|
/- *hood
|
||||||
:- %say
|
:- %say
|
||||||
|= $: [now=@da eny=@uvJ bec=beak]
|
|= [[now=@da * bec=beak] deks=$@(~ (list desk)) filt=@tas verb=_|]
|
||||||
$@(~ [?(%suspended %running %blocking %nonexistent) ~])
|
?: &(=(~ deks) =(%$ filt))
|
||||||
$: verb=?
|
:- %tang
|
||||||
show-suspended=?
|
%+ turn
|
||||||
show-running=?
|
~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now)))
|
||||||
show-blocking=?
|
|=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb))
|
||||||
show-nonexistent=?
|
[%tang (report-vats p.bec now deks filt verb)]
|
||||||
==
|
|
||||||
==
|
|
||||||
=+ :- verb
|
|
||||||
?~ +<+< +<+>+
|
|
||||||
?- -.+<+<
|
|
||||||
%suspended [& | | |]
|
|
||||||
%running [| & | |]
|
|
||||||
%blocking [| | & |]
|
|
||||||
%nonexistent [| | | &]
|
|
||||||
==
|
|
||||||
tang+((report-vats p.bec now) -)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user