jeffreykegler / yahc

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

TISSIG status #24

Closed jeffreykegler closed 5 years ago

jeffreykegler commented 5 years ago

Here's lint output which will be the basis of my comments, to follow.

tissig.lint.txt

jeffreykegler commented 5 years ago

hoon.hoon has Tissig as a 1-running hoon (a hoon, then a running). In fact, it seems to be 0-running (a solo running), a class which is not yet implemented in hoonlint presumably because it did not exist in hoon.hoon. Perhaps hoon.hoon didn't want to create another parsing special-case and so shoe-horned Tissig into 1-running? I haven't tried to decipher the semantics.

@ohAitch -- any comments?

ohAitch commented 5 years ago

In the hoon.hoon type it's {$tssg p/(list hoon)}, but none of the 0-running typed hoons really make sense to write literally 0-children versions of, so the parser just treats them as a syntax error. One could imagine =~() / =~ == being equivalent to ., and :~() / :~ == compiling to ~, but it's far more likely the programmer has made a mistake – if we want to be principled about this, we could say "0-running is indented similarly to 1-running but all regular runes require at least one child", which I think is also how 0-joggings work.

And yeah I think =~ frequently has reverse indentation, e.g.

  =~
|%
++  stuff  ~
--
::
|%
++  more-stuff ~
--
  ==
jeffreykegler commented 5 years ago

OK. I will treat Tissig as 0-running. I'll probably implement the 0-running special case. For the hoon.hoon semantics it may work to "pun" the two, but the indentation is different.

I am marking this "ready to close"

jeffreykegler commented 5 years ago

Actually I forgot whether I ever did the re-implementation or not, so I am throwing this back to myself for a double-check.

jeffreykegler commented 5 years ago

It turned out that I had not done the re-implementation. Now I have, in commit df42092 as referenced above, and am marking this "Ready to be closed".

jeffreykegler commented 5 years ago

Closed as per the above.