mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 21:12:56 +03:00
hood: respect ordering of agents in bill
This commit is contained in:
parent
7b9b0c62b7
commit
ce8f9d00fb
@ -143,6 +143,20 @@
|
|||||||
:: +is-fish: should dill link .dude?
|
:: +is-fish: should dill link .dude?
|
||||||
::
|
::
|
||||||
++ is-fish |=([=dude =bill] .?((find ~[dude] (read-fish bill))))
|
++ is-fish |=([=dude =bill] .?((find ~[dude] (read-fish bill))))
|
||||||
|
:: +tap-in-bill: +tap:in, respecting the order of agents in the bill
|
||||||
|
::
|
||||||
|
++ tap-in-bill
|
||||||
|
|= [=bill dudes=(set dude)]
|
||||||
|
=/ apes (read-apes bill)
|
||||||
|
|^
|
||||||
|
%+ sort ~(tap in dudes)
|
||||||
|
|= [a=dude b=dude]
|
||||||
|
(lte (idx a) (idx b))
|
||||||
|
::
|
||||||
|
++ idx
|
||||||
|
|= =dude
|
||||||
|
(fall (bind (find ~[dude] apes) succ) 0)
|
||||||
|
--
|
||||||
:: +get-apps-diff: which agents should be started and stopped
|
:: +get-apps-diff: which agents should be started and stopped
|
||||||
::
|
::
|
||||||
++ get-apps-diff
|
++ get-apps-diff
|
||||||
@ -151,8 +165,8 @@
|
|||||||
=/ =bill (read-bill our desk now)
|
=/ =bill (read-bill our desk now)
|
||||||
=/ wan (sy (get-apps-want bill rein))
|
=/ wan (sy (get-apps-want bill rein))
|
||||||
=/ hav (sy (get-apps-live our desk now))
|
=/ hav (sy (get-apps-live our desk now))
|
||||||
=/ liv ~(tap in (~(dif in wan) hav))
|
=/ liv (tap-in-bill bill (~(dif in wan) hav))
|
||||||
=/ ded ~(tap in (~(dif in hav) wan))
|
=/ ded (flop (tap-in-bill bill (~(dif in hav) wan)))
|
||||||
[liv ded]
|
[liv ded]
|
||||||
::
|
::
|
||||||
++ get-apps-live
|
++ get-apps-live
|
||||||
|
Loading…
Reference in New Issue
Block a user