From 94ba9441887c8f57cc927cef89077a91d277ca11 Mon Sep 17 00:00:00 2001 From: Jonathan Paprocki Date: Tue, 25 Apr 2023 14:59:15 -0400 Subject: [PATCH 1/7] hoon: add doc parsing flag to +vang +vang is for setting +vast params, but was missing the parameter for doc. this adds it and changes the callsites to vang around %base to reflect this --- pkg/arvo/app/dojo.hoon | 8 ++++---- pkg/arvo/sys/hoon.hoon | 11 ++++++++--- pkg/arvo/sys/vane/clay.hoon | 2 +- pkg/base-dev/lib/language-server/parser.hoon | 2 +- pkg/landscape/app/chat-cli.hoon | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index e9c6904aaf..49b2b7eab1 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -118,7 +118,7 @@ |= [our=ship dir=beam] |% ++ default-app %hood - ++ hoon-parser (vang | (en-beam dir)) + ++ hoon-parser (vang | (en-beam dir) &) ++ our p.dir :: ++ parse-command-line ;~(sfix parse-command (star ace) (just '\0a')) @@ -309,7 +309,7 @@ ++ parse-rood :: XX should this use +hoon-parser instead to normalize the case? :: - => (vang | (en-beam dir)) + => (vang | (en-beam dir) &) ;~ pose rood :: @@ -1225,7 +1225,7 @@ :+ %clhp [%rock %tas %cx] %+ rash pax.source.com - rood:(vang | /(scot %p our.hid)/base/(scot %da now.hid)) + rood:(vang | /(scot %p our.hid)/base/(scot %da now.hid) &) :: %url [%ur (crip (en-purl:html url.source.com))] %api !! @@ -1256,7 +1256,7 @@ %hoon :* %do %+ rash code.source.com - tall:(vang | /(scot %p our.hid)/base/(scot %da now.hid)) + tall:(vang | /(scot %p our.hid)/base/(scot %da now.hid) &) $(num +(num), source.com next.source.com) == :: diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 34e90bced7..ab272c0917 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -11422,9 +11422,14 @@ :: 5d: parser +| %parser :: -++ vang :: set ++vast params - |= [bug=? wer=path] :: bug: debug mode - %*(. vast bug bug, wer wer) :: wer: where we are +:: +vang: set +vast params +:: +:: bug: debug mode +:: wer: where we are +:: doc: doccord parsing +++ vang + |= [bug=? wer=path doc=?] + %*(. vast bug bug, wer wer, doc doc) :: ++ vast :: main parsing core =+ [bug=`?`| wer=*path doc=`?`&] diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index b443b59038..9b93a9073f 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -969,7 +969,7 @@ == :: %+ stag %tssg - (most gap tall:(vang & pax)) + (most gap tall:(vang & pax &)) == :: ++ pant diff --git a/pkg/base-dev/lib/language-server/parser.hoon b/pkg/base-dev/lib/language-server/parser.hoon index cf57790926..fc5d6b9e77 100644 --- a/pkg/base-dev/lib/language-server/parser.hoon +++ b/pkg/base-dev/lib/language-server/parser.hoon @@ -44,7 +44,7 @@ == :: %+ stag %tssg - (most gap tall:(vang & pax)) + (most gap tall:(vang & pax &)) == :: ++ pant diff --git a/pkg/landscape/app/chat-cli.hoon b/pkg/landscape/app/chat-cli.hoon index a5aa5dee2c..18ff4f146d 100644 --- a/pkg/landscape/app/chat-cli.hoon +++ b/pkg/landscape/app/chat-cli.hoon @@ -683,7 +683,7 @@ |= tub=nail %. tub %+ stag (crip q.tub) - wide:(vang & [&1:% &2:% (scot %da now.bowl) |3:%]) + wide:(vang & [&1:% &2:% (scot %da now.bowl) |3:%] &) -- :: +tab-list: command descriptions :: From 971db7effed8f264e236a9a4c044a1fa7816557a Mon Sep 17 00:00:00 2001 From: Jonathan Paprocki Date: Tue, 25 Apr 2023 15:07:54 -0400 Subject: [PATCH 2/7] doccords: parsing off for =*, +* see #6307 this turns doccord parsing off for =* and +*, which was not intended to be allowed for the first release, but it ended up not compiling if postfix doccords were put on either of these. the right way to fix this is to actually implement doccord parsing for =* and +*, but at least turning them off seems to fix the compile error here. --- pkg/arvo/sys/hoon.hoon | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index ab272c0917..10717d2a87 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -13340,7 +13340,7 @@ ;~ pose %+ ifix [;~(plug lus tar muck) muck] - (most muck ;~(gunk sym loaf)) + (most muck ;~(gunk sym loll)) :: (easy ~) == @@ -13417,7 +13417,13 @@ ++ hunk (most mush loan) :: gapped specs ++ jump ;~(pose leap:docs gap) :: gap before docs ++ loaf ?:(tol tall wide) :: hoon + ++ loll ?: tol :: hoon without docs + tall:(vang bug wer |) + wide:(vang bug wer |) ++ loan ?:(tol till wyde) :: spec + ++ lien ?: tol :: spec without docs + till:(vang bug wer |) + wyde:(vang bug wer |) ++ lore (sear |=(=hoon ~(flay ap hoon)) loaf) :: skin ++ lomp ;~(plug sym (punt ;~(pfix tis wyde))) :: typeable name ++ mash ?:(tol gap ;~(plug com ace)) :: list separator @@ -13466,7 +13472,7 @@ ++ expd |.(;~(goop loaf loaf loaf loaf)) :: four hoons ++ expe |.(wisp) :: core tail ++ expf |.(;~(goop ;~(pfix cen sym) loaf)) :: %term and hoon - ++ expg |.(;~(goop lomp loaf loaf)) :: term/spec, two hoons + ++ expg |.(;~(gunk lomp loll loll)) :: term/spec, two hoons ++ exph |.((butt ;~(gunk rope rick))) :: wing, [wing hoon]s ++ expi |.((butt ;~(goop loaf hank))) :: one or more hoons ++ expj |.(;~(goop lore loaf)) :: skin and hoon From f6c780a7e76668e126ce680df779dbd86d9e7143 Mon Sep 17 00:00:00 2001 From: Jonathan Paprocki Date: Wed, 26 Apr 2023 01:13:24 -0400 Subject: [PATCH 3/7] hoon: second hoon for =* has docs the issue with compiling not working is with doccords on the deferred expression, not everything that follows (which would turn off doccords for anything past =*) --- pkg/arvo/sys/hoon.hoon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 10717d2a87..42391f723d 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -13472,7 +13472,7 @@ ++ expd |.(;~(goop loaf loaf loaf loaf)) :: four hoons ++ expe |.(wisp) :: core tail ++ expf |.(;~(goop ;~(pfix cen sym) loaf)) :: %term and hoon - ++ expg |.(;~(gunk lomp loll loll)) :: term/spec, two hoons + ++ expg |.(;~(gunk lomp loll loaf)) :: term/spec, two hoons ++ exph |.((butt ;~(gunk rope rick))) :: wing, [wing hoon]s ++ expi |.((butt ;~(goop loaf hank))) :: one or more hoons ++ expj |.(;~(goop lore loaf)) :: skin and hoon From 45431dbc89e4e008be883a8db1f5acd403a4b5d2 Mon Sep 17 00:00:00 2001 From: Jonathan Paprocki Date: Wed, 26 Apr 2023 22:03:04 -0400 Subject: [PATCH 4/7] hoon: remove +lien its not actually being used anywhere, i just wrote it to balance out having a "hoon without docs" arm. but i guess this just adds needless bloat --- pkg/arvo/sys/hoon.hoon | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 42391f723d..b72c29b2b5 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -13421,9 +13421,6 @@ tall:(vang bug wer |) wide:(vang bug wer |) ++ loan ?:(tol till wyde) :: spec - ++ lien ?: tol :: spec without docs - till:(vang bug wer |) - wyde:(vang bug wer |) ++ lore (sear |=(=hoon ~(flay ap hoon)) loaf) :: skin ++ lomp ;~(plug sym (punt ;~(pfix tis wyde))) :: typeable name ++ mash ?:(tol gap ;~(plug com ace)) :: list separator From e7184231353f6a43ebd39853eb1977289a1d4bde Mon Sep 17 00:00:00 2001 From: Jonathan Paprocki Date: Mon, 1 May 2023 11:37:27 -0400 Subject: [PATCH 5/7] hoon: remove swap +vang for (doc |) in +loll --- pkg/arvo/sys/hoon.hoon | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index b72c29b2b5..550959886e 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -13417,9 +13417,7 @@ ++ hunk (most mush loan) :: gapped specs ++ jump ;~(pose leap:docs gap) :: gap before docs ++ loaf ?:(tol tall wide) :: hoon - ++ loll ?: tol :: hoon without docs - tall:(vang bug wer |) - wide:(vang bug wer |) + ++ loll ?:(tol tall(doc |) wide(doc |)) :: hoon without docs ++ loan ?:(tol till wyde) :: spec ++ lore (sear |=(=hoon ~(flay ap hoon)) loaf) :: skin ++ lomp ;~(plug sym (punt ;~(pfix tis wyde))) :: typeable name From 4a92c7d7d423d0b5f54d0f3fb19153ccea566157 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 2 May 2023 10:31:42 -0400 Subject: [PATCH 6/7] Revert "hoon: add doc parsing flag to +vang" This reverts commit 94ba9441887c8f57cc927cef89077a91d277ca11. --- pkg/arvo/app/dojo.hoon | 8 ++++---- pkg/arvo/sys/hoon.hoon | 11 +++-------- pkg/arvo/sys/vane/clay.hoon | 2 +- pkg/base-dev/lib/language-server/parser.hoon | 2 +- pkg/landscape/app/chat-cli.hoon | 2 +- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/pkg/arvo/app/dojo.hoon b/pkg/arvo/app/dojo.hoon index 49b2b7eab1..e9c6904aaf 100644 --- a/pkg/arvo/app/dojo.hoon +++ b/pkg/arvo/app/dojo.hoon @@ -118,7 +118,7 @@ |= [our=ship dir=beam] |% ++ default-app %hood - ++ hoon-parser (vang | (en-beam dir) &) + ++ hoon-parser (vang | (en-beam dir)) ++ our p.dir :: ++ parse-command-line ;~(sfix parse-command (star ace) (just '\0a')) @@ -309,7 +309,7 @@ ++ parse-rood :: XX should this use +hoon-parser instead to normalize the case? :: - => (vang | (en-beam dir) &) + => (vang | (en-beam dir)) ;~ pose rood :: @@ -1225,7 +1225,7 @@ :+ %clhp [%rock %tas %cx] %+ rash pax.source.com - rood:(vang | /(scot %p our.hid)/base/(scot %da now.hid) &) + rood:(vang | /(scot %p our.hid)/base/(scot %da now.hid)) :: %url [%ur (crip (en-purl:html url.source.com))] %api !! @@ -1256,7 +1256,7 @@ %hoon :* %do %+ rash code.source.com - tall:(vang | /(scot %p our.hid)/base/(scot %da now.hid) &) + tall:(vang | /(scot %p our.hid)/base/(scot %da now.hid)) $(num +(num), source.com next.source.com) == :: diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index 550959886e..a4afa0bba4 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -11422,14 +11422,9 @@ :: 5d: parser +| %parser :: -:: +vang: set +vast params -:: -:: bug: debug mode -:: wer: where we are -:: doc: doccord parsing -++ vang - |= [bug=? wer=path doc=?] - %*(. vast bug bug, wer wer, doc doc) +++ vang :: set ++vast params + |= [bug=? wer=path] :: bug: debug mode + %*(. vast bug bug, wer wer) :: wer: where we are :: ++ vast :: main parsing core =+ [bug=`?`| wer=*path doc=`?`&] diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 9b93a9073f..b443b59038 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -969,7 +969,7 @@ == :: %+ stag %tssg - (most gap tall:(vang & pax &)) + (most gap tall:(vang & pax)) == :: ++ pant diff --git a/pkg/base-dev/lib/language-server/parser.hoon b/pkg/base-dev/lib/language-server/parser.hoon index fc5d6b9e77..cf57790926 100644 --- a/pkg/base-dev/lib/language-server/parser.hoon +++ b/pkg/base-dev/lib/language-server/parser.hoon @@ -44,7 +44,7 @@ == :: %+ stag %tssg - (most gap tall:(vang & pax &)) + (most gap tall:(vang & pax)) == :: ++ pant diff --git a/pkg/landscape/app/chat-cli.hoon b/pkg/landscape/app/chat-cli.hoon index 18ff4f146d..a5aa5dee2c 100644 --- a/pkg/landscape/app/chat-cli.hoon +++ b/pkg/landscape/app/chat-cli.hoon @@ -683,7 +683,7 @@ |= tub=nail %. tub %+ stag (crip q.tub) - wide:(vang & [&1:% &2:% (scot %da now.bowl) |3:%] &) + wide:(vang & [&1:% &2:% (scot %da now.bowl) |3:%]) -- :: +tab-list: command descriptions :: From 1c26d431f562edff7b36f5b479110da17d930d1d Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 2 May 2023 10:31:49 -0400 Subject: [PATCH 7/7] hoon: threads doccords flags through +vang, compatibly --- pkg/arvo/sys/hoon.hoon | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/sys/hoon.hoon b/pkg/arvo/sys/hoon.hoon index a4afa0bba4..6e5df34bd3 100644 --- a/pkg/arvo/sys/hoon.hoon +++ b/pkg/arvo/sys/hoon.hoon @@ -11422,9 +11422,15 @@ :: 5d: parser +| %parser :: -++ vang :: set ++vast params - |= [bug=? wer=path] :: bug: debug mode - %*(. vast bug bug, wer wer) :: wer: where we are +:: +vang: set +vast params +:: +:: bug: debug mode +:: doc: doccord parsing +:: wer: where we are +:: +++ vang + |= [f=$@(? [bug=? doc=?]) wer=path] + %*(. vast bug ?@(f f bug.f), doc ?@(f & doc.f), wer wer) :: ++ vast :: main parsing core =+ [bug=`?`| wer=*path doc=`?`&]