Ad
  • Custom User Avatar

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

  • Custom User Avatar
    • "AC AC 3H 4D 5S" is better than "AC AC 2H 4D 5S" (at least when I tested it)
    • Description says: "From above definition it is clear that Hand can contain any number of cards", so random testing works correctly
  • Custom User Avatar

    Sorry, forgot to mention that if two hands are equal, first hand should be returned

  • Custom User Avatar

    You are right, thank you. But validation can run tests, if there are example tests, i.e. example test field is not empty

    Such behavior would prevent some errors in example tests

  • Custom User Avatar

    Thank you for suggestions

  • Custom User Avatar

    Well, in this kata you don't need to use maps or sets of hands. I used Ord instance to emphasize that one need to compare hands

    However, I changed kata so now it doesn't requires writing an Ord Hand

  • Custom User Avatar

    Read and Show instances were not included in initial solution, they was in preloaded module, but there are issues with preloading it in "Run tests" (see bug reports forum)

    I placed this code in initial code as workaround, I will change it as soon as problem with preloaded code will be fixed.

    Thank you for pointing on cheating possibility with counter, I'll include several random tests

  • Custom User Avatar

    It seems that "Preloaded" module isn't loaded when user presses "Run tests" (at least, for Haskell). But it is loaded when user submits solution.

    So I cannot, for example, define data types or some instances in this module

    Also this problem isn't detected in kata validation process

    I think that correct behavior is to load it in both cases. Please explain me design goals if I'm wrong. Also validation should run tests (the same way as when user presses "Run tests") with complete solution.

  • Custom User Avatar

    Is there any way to preload data types in test cases?

    It seems that "Preloaded" module is not loaded when user presses "Run tests" button, it only loads when solution is submitted

    Also this problem is not detected when one validates new kata

  • Custom User Avatar

    I get:

    /tmp/haskell1141015-7-8nf0jc/TreeByLevels.hs:3:8:
    Could not find module `TreeByLevels.TreeNode'
    Use -v to see a list of the files searched for.

    Also this issue is reported by @g964

  • Custom User Avatar

    I get "Unknown error" after approximately 4 sec, but my solution is correct and effective. In test environment I calculate fib 2000000 and fib -2000000 with all other tests in 2.5 sec

    However, I tried once more and it succeeded

    Maybe this information will help in catching this bug