From 05a7c755c69800400f95434e4c65391ba3c6fa6b Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 28 Apr 2023 15:19:01 -0400 Subject: [PATCH 1/5] base: pin the %kelvin mark in sur/hood for +vats --- pkg/base-dev/sur/hood.hoon | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index 2cfd73e64f..28883c8a67 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -1,3 +1,4 @@ +/% kelvin %kelvin =, clay =* dude dude:gall |% From d732e5a91ad822810b77e830e29a0e8d3311320e Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 28 Apr 2023 16:47:51 -0400 Subject: [PATCH 2/5] vats: hack to always render multi-line tanks --- pkg/arvo/gen/vats.hoon | 1 + pkg/base-dev/sur/hood.hoon | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/pkg/arvo/gen/vats.hoon b/pkg/arvo/gen/vats.hoon index 5fdfaec745..061df9516b 100644 --- a/pkg/arvo/gen/vats.hoon +++ b/pkg/arvo/gen/vats.hoon @@ -15,6 +15,7 @@ |= [[now=@da * bec=beak] deks=$@(~ (list desk)) filt=@tas verb=_|] ?: &(=(~ deks) =(%$ filt)) :- %tang + %- zing %+ turn %+ sort ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index 28883c8a67..bbe55e4e1a 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -40,10 +40,12 @@ :: ++ report-vats |= [our=@p now=@da desks=(list desk) filt=@tas verb=?] + ^- tang =/ ego (scot %p our) =/ wen (scot %da now) =/ prep (report-prep our now) ?~ filt + %- zing %+ turn (flop desks) |=(syd=@tas (report-vat prep our now syd verb)) =/ deks @@ -66,8 +68,11 @@ |=([syd=desk *] syd) ?~ blockers ~[leaf+"No desks blocking upgrade, run |bump to apply"] :- [%rose [" %" "To unblock upgrade run |suspend %" ""] blockers] + %- zing %+ turn (flop blockers) |=(syd=desk (report-vat prep our now syd verb)) + :: + %- zing %+ turn ?+ filt !! :: @@ -100,6 +105,15 @@ == our=ship now=@da syd=desk verb=? == + ^- tang + =- :: hack to force wrapped rendering + :: + :: edg=6 empirically prevents dedent + :: + %+ roll + (~(win re -) [0 6]) + |=([a=tape b=(list @t)] [(crip a) b]) + :: ^- tank =/ ego (scot %p our) =/ wen (scot %da now) From 92a1f50a499d254ee75e9b27d2d2cfa095824221 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Sat, 29 Apr 2023 10:05:56 -0400 Subject: [PATCH 3/5] vats: refactor generator --- pkg/arvo/gen/vats.hoon | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/gen/vats.hoon b/pkg/arvo/gen/vats.hoon index 061df9516b..e8d20b0e3a 100644 --- a/pkg/arvo/gen/vats.hoon +++ b/pkg/arvo/gen/vats.hoon @@ -12,13 +12,16 @@ :: /- *hood :- %say -|= [[now=@da * bec=beak] deks=$@(~ (list desk)) filt=@tas verb=_|] -?: &(=(~ deks) =(%$ filt)) - :- %tang - %- zing - %+ turn - %+ sort - ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) - |=([a=desk b=desk] ?|(=(a %kids) =(b %base))) - |=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb)) -[%tang (report-vats p.bec now deks filt verb)] +|= $: [now=@da * bec=beak] + deks=(list desk) + [filt=@tas verb=_|] + == +:- %tang ^- tang +?. &(=(~ deks) =(%$ filt)) + (report-vats p.bec now deks filt verb) +%- zing +%+ turn + %+ sort + ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) + |=([a=desk b=desk] ?|(=(a %kids) =(b %base))) +|=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb)) From b7bf1e68caab856f45db9eaec20b46e98b2b80ec Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Sat, 29 Apr 2023 10:13:50 -0400 Subject: [PATCH 4/5] vats: sort alphabetically within constraints (%base first, %kids last) --- pkg/arvo/gen/vats.hoon | 3 ++- pkg/base-dev/sur/hood.hoon | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/gen/vats.hoon b/pkg/arvo/gen/vats.hoon index e8d20b0e3a..51e0059065 100644 --- a/pkg/arvo/gen/vats.hoon +++ b/pkg/arvo/gen/vats.hoon @@ -22,6 +22,7 @@ %- zing %+ turn %+ sort - ~(tap in .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now))) + =/ sed .^((set desk) %cd /(scot %p p.bec)/base/(scot %da now)) + (sort ~(tap in sed) |=([a=@ b=@] !(aor a b))) |=([a=desk b=desk] ?|(=(a %kids) =(b %base))) |=(syd=desk (report-vat (report-prep p.bec now) p.bec now syd verb)) diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index bbe55e4e1a..9c7e065813 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -50,8 +50,9 @@ |=(syd=@tas (report-vat prep our now syd verb)) =/ deks ?~ desks - %+ sort ~(tap in -.prep) - |=([[a=desk *] [b=desk *]] ?|(=(a %kids) =(b %base))) + %+ sort + (sort ~(tap in -.prep) |=([[a=@ *] b=@ *] !(aor a b))) + |=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base))) %+ skip ~(tap in -.prep) |=([syd=@tas *] =(~ (find ~[syd] desks))) ?: =(filt %blocking) From 444242b5fc4c374eb7193a023b40f7eb723702cf Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Sat, 29 Apr 2023 10:25:27 -0400 Subject: [PATCH 5/5] vats: sort force on/off lists --- pkg/base-dev/sur/hood.hoon | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/base-dev/sur/hood.hoon b/pkg/base-dev/sur/hood.hoon index 9c7e065813..3c53210056 100644 --- a/pkg/base-dev/sur/hood.hoon +++ b/pkg/base-dev/sur/hood.hoon @@ -142,9 +142,6 @@ ?~ sink [hash]~ (mergebase-hashes our syd now her.u.sink sud.u.sink) =/ dek (~(got by tyr) syd) - =/ =dome (~(got by cone) our syd) - =/ [on=(list [@tas ?]) of=(list [@tas ?])] - (skid ~(tap by ren.dome) |=([* ?] +<+)) =/ sat ?- zest.dek %live "running" @@ -174,13 +171,17 @@ leaf/"app status: {sat}" leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}" == + :: + =/ [on=(list [@tas ?]) of=(list [@tas ?])] + =/ =dome (~(got by cone) our syd) + (skid ~(tap by ren.dome) |=([* ?] +<+)) :~ leaf/"/sys/kelvin: {kul}" leaf/"base hash: {?.(=(1 (lent meb)) <(head meb)>)}" leaf/"%cz hash: {}" :: leaf/"app status: {sat}" - leaf/"force on: {?:(=(~ on) "~" )}" - leaf/"force off: {?:(=(~ of) "~" )}" + leaf/"force on: {<(sort (turn on head) aor)>}" + leaf/"force off: {<(sort (turn of head) aor)>}" :: leaf/"publishing ship: {?~(sink <~> <(get-publisher our syd now)>)}" leaf/"updates: {?~(sink "local" "remote")}"