Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Question to both authors: how do we know the performance requirements are consistent between versions? What are the intended performance requirements of the original?

    My feeling is that a correct, efficient implementation should have no performance issues at all. An inefficient one ( hey, I wrote one initially! they're definitely possible ) will have insurmountable problems with even a limited amount of tests.

  • Custom User Avatar

    If you have any unapproved translations, please make sure they're in GHC 8.8. This one should have been as well.

    There were two kata left in 8.2 but not 8.8, and I am working on those two. Now there are three. :[

    If you can't enable 8.8 without changes, you probably have a Monoid definition which is missing a Semigroup definition. ( I haven't yet solved this one, so I can't see the testing, and I can't see if you have any pending translations. )

  • Custom User Avatar
  • Default User Avatar

    I think it can be solved by making non-terminating coroutines polymorphic in their return type, similar to how forever itself is defined:

    filterC :: (v -> Bool) -> Coroutine r v v void
    duplicate :: Coroutine r v v void
    add :: Coroutine r Int Int void
    

    In that case, the functions could be used with consume by substituting void ~ (); and at the same time, the fact that they never return is both signalled (by similarity with functions like forever and throwIO) and enforced by the type system (as GHC won't allow to stick any non-bottom value into a now rigid type variable void).
    At least, that's what I did with my solution, and it seems to have worked.

  • Custom User Avatar

    Python globals are not shared between modules, though if you need totally global name you can use builtins

  • Custom User Avatar

    please give link - at the end

  • Default User Avatar

    Nope, they are fine

  • Custom User Avatar

    Depends on the language, the instructions say false/False already.

  • Custom User Avatar

    You MUST map it to the left, since (Eiter x Void) is just x!
    Think hilbert hotel.

  • Default User Avatar

    not really, you would only be hurting yourself, having no challenge, nor learning anythin soooo.... just dont exploit it

  • Custom User Avatar

    I don't think you can get more honor by solving katas twice.

    And their first submission is still shown in the head-to-head compare page anyway, so there is proof that they submitted something else before the top solution.

  • Custom User Avatar

    And what about users copy/pasting top upvoted solutions after solving katas in order to get more honor?

    You don't get extra honor from doing that. Only the original (first) author gets honor from upvotes.

  • Default User Avatar

    It is mainly out of sheer curiosity!

    And what about users copy/pasting top upvoted solutions after solving katas in order to get more honor? I believe such abuse should also be punished, or at least prevented.

  • Loading more items...