jeffreykegler / yahc

Yet Another Hoon Compiler
MIT License
0 stars 1 forks source link

2-Jogging Hoons #11

Closed jeffreykegler closed 5 years ago

jeffreykegler commented 5 years ago

As a reminder, what I am calling the 2-jogging hoons are CENTAR and WUTLUS, which have a jogging preceded by a head and a subhead. In all cases in arvo/, the head and the rune are on the same line. In 145 of the 165 cases, the head and subhead are on the same line -- I call the hoon "head-joined". I did a census of the head-joined 2-jogging hoons. Here are the results:

head-joined.txt

My analysis will follow in another comment.

jeffreykegler commented 5 years ago

I am leaving the "head-split" (head and sub-head on different lines) hoons aside for now. For "head-joined" hoons, I propose the following treatment:

1.) All 2-jogging hoons have a chess-sidedness. Their jogging should share the jogging hoon's chess-sidedness.

2.) The head of a kingside head-joined 2-jogging hoon is one stop (2 spaces) after the rune.

3.) The head of a queenside head-joined 2-jogging hoon is two stops (4 spaces) after the rune.

4.) The subhead of a head-joined 2-jogging hoon should be one stop after the head.

5.) The jogging (and therefore the jog head of the first jog) of a kingside head-joined 2-jogging hoon should be indented 1 stop.

6.) The jogging (and therefore the jog head of the first jog) of a queenside head-joined 2-jogging hoon should be indented 2 stops.

@ohAitch If you approve, I'll code this up and add it to the document describing jogging indentation.

Wrt to the head-split 2-jogging hoons (20 of the 165), I want to take a closer look. I will follow up on those.

ohAitch commented 5 years ago

Sounds right, I think for head-joined 2-jogging this is just "identical to 1-jogging, except add a subhead one stop after the head"? (Head split are probably going to be "replace head with a backdented

  head
subhead

" but I'll await your analysis)

Though if that's right, I think the way to unify those is "the heads of a jogging hoon are indented one stop past the king/queenside jog heads. If they're all on one line(e.g. there's only one head) indent that line; if they're split indent the last head line, and then further indent preceding head lines, in standard backstep fashion"

jeffreykegler commented 5 years ago

@ohAitch -- you've already come up with most of the terminology we'll need for this, so I hope this will be easy. In addition to "backdented heads", there are what I will call "pseudo-jog heads". Pseudo-jog heads make the head and subhead look like a queenside jog (confusing IMHO), but conserve indentation.

Here is an example of kingside backdented heads:

[ ../hoons/arvo/sys/hoon.hoon 10111:7 indent tallWutlus kingside head-split head-gap=4 subhead-indent=4-indented jogging-indent=2-indented ]
10111!       ?+    (rash p.q.ham ;~(sfix (cook crip (star low)) (star hig)))
10112>           ~(rend co [%$ p.q.ham lum])
10113          $$    ~(rend co [%$ %ud lum])
10114          $t    (dash (rip 3 lum) '\'' ~)
10115          $tas  ['%' ?.(=(0 lum) (rip 3 lum) ['$' ~])]
10116        ==

and here is an example of pseudo-jog:

[ ../hoons/arvo/sys/hoon.hoon 4083:3 indent tallWutlus kingside head-split head-gap=2 subhead-indent=2-indented jogging-indent=2-indented ]
 4083!   ?+  c
 4084>     :-  '~'
 4085      =+  e=(met 2 c)
 4086      |-  ^-  tape
 4087      ?:  =(0 e)
 4088        ['.' d]

and here is kingside census:

      3 tallWutlus kingside head-split head-gap=2 subhead-indent=2-indented jogging-indent=2-indented ]
      1 tallWutlus kingside head-split head-gap=2 subhead-indent=9-indented jogging-indent=2-indented ]
      3 tallWutlus kingside head-split head-gap=4 subhead-indent=4-indented jogging-indent=2-indented ]

It is 3 vs. 3 with one anomaly.

I'll do the queenside next. I suggest reserve judgement until then, because their story seems relevant.

jeffreykegler commented 5 years ago

For queenside, here's a stretch of code with 2 examples of pseudo-jog heads:

=== ../hoons/arvo/app/hall.hoon ===
 729      :>  for %circle, apply the story diff normally.
 730      ::
 731      |=  {wir/wire rum/rumor}
 732      ^+  +>
[ ../hoons/arvo/app/hall.hoon 733:5 indent tallWutlus queenside head-split head-gap=2 subhead-indent=2-indented jogging-indent=4-indented ]
 733!     ?+  -.rum
 734>       ~&([%ignoring-rumor -.rum] +>)
 735      ::
 736          $burden
[ ../hoons/arvo/app/hall.hoon 737:7 indent tallWutlus queenside head-split head-gap=2 subhead-indent=2-indented jogging-indent=4-indented ]
 737!       ?+  -.rum.rum
 738>         %-  (ta-know nom.rum)  |=  sor/_so  =<  so-done
 739          (so-hear:sor & [our.bol nom.rum] rum.rum)
 740        ::
 741            $new
 742          =?  +>  !(~(has by stories) nom.rum)
------

I'd show an example of backdented heads for queenside, but there aren't any. Apparently it requires indenting the head so far the writers shrank from it. There are plenty of deviations from pseudo-jog style however:


      7 tallWutlus queenside head-split head-gap=2 subhead-indent=2-indented jogging-indent=4-indented ]
      1 tallWutlus queenside head-split head-gap=2 subhead-indent=4-indented jogging-indent=4-indented ]
      1 tallWutlus queenside head-split head-gap=4 subhead-indent=10-indented jogging-indent=4-indented ]
      2 tallWutlus queenside head-split head-gap=4 subhead-indent=2-indented jogging-indent=4-indented ]
      2 tallWutlus queenside head-split head-gap=4 subhead-indent=4-indented jogging-indent=4-indented ]

Summarizing the above census there are 7 pseudo-jog heads, and 6 "others".

If the contest is between pseudo-jog and backdented heads, it seems that backdented follows the standard logic more closely, but it's a minority of the kingside examples and totally absent from the queenside examples. Pseudo-jog is better represented in the corpus.

ohAitch: I can do additional censuses with the details and contexts if you like. Let me know.

ohAitch commented 5 years ago

oof, that's an interesting pattern yeah. I definitely like the term pseudo-jog: it's putting the head-head(?) on one of the jog head columns, which is appropriate because e.g. a ?+ subhead means "case: whatever else might be in -.rum". Probably just lint the backdented style as anomalies, I think I was just wrong that it was common ^-^

(The most common subhead style is inline presumably)

jeffreykegler commented 5 years ago

Replaced by issue #16 .