jeffreykegler / yahc

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

WUTHEP kingside anomalies #3

Closed jeffreykegler closed 5 years ago

jeffreykegler commented 5 years ago

@ohAitch These are kingside WUTHEPs, with whose jogging is aligned queenside. All but one of these has queenside jogs. As before, if these are simply mistakes, I want to add them to the suppressions and close the issue. If these fit a pattern, or are grey-area, let me know. C.kwuthep.txt

ohAitch commented 5 years ago

Hm, by "kingside"/"queenside" are you referring here to the indentation of the first element? These (and #2) all look like mistakes on the line with the >

If this is the common type of error, I think I would like to define the detection for "kingside" as "most clauses are indented by 1", and "queenside/mixed queenside" as "most clauses are indented by 2". The corrective action required by "proper kingside" is then "all clauses are indented by 1, first-child is indented by 2, clause bodies are indented past clause heads"; correspondingly "proper queenside/mixside" is "all clauses indented by 2, first-child indented by 3, clause bodies either backdented to 1 or indented beyond 3(usually, after two spaces on the same line as their corresponding head)"

I think YAHC accounts for this, but note that same-line kingside(whether or not it's surrounded by queenside) breaks "an indent is usually an even number of spaces" where the clause-head(e.g. %atom) itself has an odd length.

On Sunday, 27 January 2019, Jeffrey Kegler notifications@github.com wrote:

@ohAitch https://github.com/ohAitch These are kingside WUTHEPs, with whose jogging is aligned queenside. All but one of these has queenside jogs. As before, if these are simply mistakes, I want to add them to the suppressions and close the issue. If these fit a pattern, or are grey-area, let me know. C.kwuthep.txt https://github.com/jeffreykegler/yahc/files/2800516/C.kwuthep.txt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreykegler/yahc/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxXhspek2yrIP-njI5jDmCA-pEwamlfks5vHhJhgaJpZM4aU7wQ .

jeffreykegler commented 5 years ago

The "chesssidedness" in both these tickets is mixed, and I rather arbitrarily divided them into king/queen based on the indentedness of the 1st child.

I deal with the potential "oddness" of "same-line kingside", but allowing any indentedness -- I do not currently check for alignment between jogs. So I am safe from "false alarms" on odd indents, but currently that's at the expense of ignoring other problems.

ohAitch commented 5 years ago

I don't think I would describe e.g. "hoons/arvo/lib/hood/helm.hoon 231:3" as mixed? That one clearly just has an overindented -.saw, some of the longer ones don't have full context obvs.

I would define individual item sidedness as "is the head less indented than the body, or more"("equally" is an error that I don't think appears); the items as a whole / 1st child flow from that. Specifically,

On Sunday, 27 January 2019, Jeffrey Kegler notifications@github.com wrote:

The "chesssidedness" in both these tickets is mixed, and I rather arbitrarily divided them into king/queen based on the indentedness of the 1st child.

I deal with the potential "oddness" of "same-line kingside", but allowing any indentedness -- I do not currently check for alignment between jogs. So I am safe from "false alarms" on odd indents, but currently that's at the expense of ignoring other problems.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreykegler/yahc/issues/3#issuecomment-457956260, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxXhgT28egBL3mJQvaxmSL67YrwxFt5ks5vHhr-gaJpZM4aU7wQ .

jeffreykegler commented 5 years ago

I'll go back and produce more perspicuous error messages based on the above, and probably take care of checking for one-line kingside job alignment at the same time. Once done, I'll deal with these two issues, perhaps by closing them in favor of one or more new issues.

jeffreykegler commented 5 years ago

Replaced by issue #4