Ad
  • Default User Avatar

    I don't have much time but I think you have a problem when allocating a new pair.

  • Default User Avatar

    Ook, thanks for the reply.
    Could you can give me some hints on how is implemented the array2String function to understand what's wrong. I tried to implement one on my own and it worked.
    If it's possible. thank you .

  • Default User Avatar

    Not an issue but a question. Something has to be wrong in your code since 93 guys passed the C kata. I tried a few solutions and all worked fine.

  • Default User Avatar

    Hi, I have I problem testing my code in C.
    Maybe I did something wrong but the function array2String function gets an INVALID MEMORY ACCESS while testing. The weird thing is that if I comment out the call to array2String and print the array... it works without problem. Could you please help me?

  • Default User Avatar

    I have made an adjustment to the test cases. See if you get more helpful messages.

  • Custom User Avatar

    Passes everything except some of your random tests. My console.log() shows the expected answer, but it fails the test.
    Having the same issue in your Scramble kata. One or two random tests failing, despite my log there also showing the correct answer.

  • Default User Avatar

    Does your solution pass the example javascript test cases?

    Test.assertEquals(longest(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'k'],1),'a');

    Test.assertEquals(longest(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'k','l'],1),'a');

  • Default User Avatar

    I understand your point but wasn'it useful to tell in the description that the Haskell return isn't a string? Well, can be seen in the setup solution.

    It seems that one cannot use "Text.Regex.Posix" in Codewars Haskell, do you know something about that?

  • Custom User Avatar

    But why don't you keep the string result?

    Because I don't really like stringly typed results. If a language enables you to use something (e.g. nil, null, Nothing, None) and a computation might not have a valid result, why not use the power of the language? If a language has something sequence like (arrays, lists, sequences, ...), why not use it?

  • Custom User Avatar

    Yes, has been some time. I thought you were on holidays!

    Nah, I've lost interest in Codewars for some time.

    Have you published your guide to Haskell tests?

    I completely forgot about that one. I guess I start a repository later, that's a little bit more convenient than another wiki entry. create a GitHub repository.

  • Default User Avatar

    Yes, has been some time. I thought you were on holidays!

    As often as I can I now include random tests but it's not that so easy with strings.
    Have you published your guide to Haskell tests? When I can I include in Haskell tests "Quickcheck tests" but I only know to imitate yours with "property (Positive something)... I don't know how to do with arrays or strings...

    It seems that one cannot use "Text.Regex.Posix" in Codewars Haskell, do you know something about that?
    See you later.

  • Default User Avatar

    You are right, I now precise in the description that the first character has position 0 as it can be seen from the example. So I consider the issue as resolved:-)

    By the way I was just about to edit my Haskell translation of "Hidden 'Cubic' numbers" when I saw yours which, of course, is better than mine! But why don't you keep the string result? Maybe you should have modified the description to tell that in Haskell the result is not a string but something else. Besides that I wonder why this "Hidden 'Cubic' numbers" kata is so badly managed by people (96 / 1445 succeeded).

  • Custom User Avatar

    The kata doesn't state whether the first character has position 1 (aka natural numbering) or 0 (aka C-style string numbering).

  • Custom User Avatar

    Include random test cases. Well, what kind of suggestion did you expect from me? Has been some time.

  • Default User Avatar

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

  • Loading more items...