Ad
  • Custom User Avatar

    The random also generates whitespace-only inputs sometimes.

    So e.g. I'm getting:

    ' ' should equal ''
    

    The inputs '␣', '␣␣', '␣␣␣'... clearly violate the task description:

    Input text will be the empty string or a string consisting of one or more words separated by single spaces

    The input foo␣␣bar is also not allowed by the spec. Yet still is occasionally given in the random test suite.

    And of course, the test is being nay darn strict about the (unspecified) rules of whitespace processing. Couldn't it assert actual.strip() == expected.strip() at least?

    ... So nah thanks, I'll just skip this kata.

  • Custom User Avatar

    A suggestion: would love to see an Isomorphism-style kata where you'd have to write a Category instance for ISO or something else -- and thanks to that, leverage some wicked cool machinery to achieve something useful.

    What has really kicked me in this kata: the realization that I could code every ISO by hand, as explicit (ltr, rtl) pairs with convoluted messy definitions of ltr, rtl -- but I didn't have to, because Haskell could build those functions automatically, just by following my high-level proofs. Isn't this amazing!

    So, perhaps this insight could be reached from another angle: by offering the choice to hand-code a huge monster term VS to derive that same term by type magic.

  • Custom User Avatar

    Nice kata, I got new insights while completing it, enjoyed so much. In particular, ponder this (non-spoiler) question:

    Why some ISOs can be coded either via trans proof-like derivations, or via explicit (goright, goleft) witnesses,
    while a few seemingly arbitrary ISOs you have to construct as a pair, and can't write as a proof?

    Also enjoyed: rewriting some of lolisa's definitions to choose a slightly simpler axiom system.