Ad
  • Custom User Avatar

    I'm having the same problem for the Ruby version. Cannot get any helpful info from the error messages and there are not Sample Tests either.

    Edit: managed to solve it in the end.

    The problem was that all error messages are supressed or whatever, so even though my code had errors unrelated to the output, they were not displayed properly.

    Instead I got messages of the type Expected: "binary string", instead got: "Not a integer" even though the error could be something completely different, such as an undeclared variable.

    This made the debugging very difficult so it took me a while to even understand that the fitness method returns a rational...

  • Custom User Avatar

    WTF? How does that even work?

    Gz on the clean solution, btw

  • Default User Avatar
  • Custom User Avatar

    So it is an inline conditional... here is an article explaining it better than I could.. :)

    https://www.natashatherobot.com/ruby-shorthands-if-then-else/

  • Default User Avatar

    I'm a total noob at this. Would someone please tell me how this works? I've tried googling colon and questionmark, but I haven't found a satisfactory explanation.

  • Custom User Avatar
  • Custom User Avatar

    hi, plz, see the issue at the top (maybe the python version will need an update too) with:

    puts differentiate( "x-66", 1)

    returns 0 instead of 1

  • Custom User Avatar

    confirmed (note: ruby)

  • Custom User Avatar

    I think there is a bug in the ruby implementation as when the random test I get the following error:

    expected '0' got '1'... when I looked into this the error was caused by the equation "x-66" with a point value of "0"

    Unless I am very much mistaken the differential of x is 1 not 0. Please update as required.

  • Custom User Avatar

    I'm having the same problem. I feel like this kata isn't very specific in many ways, and it's driving me nuts.
    Did you ever get a solution? Even when I edit my run functions return with to_i (for ruby), it still gives me
    exactly the same thing. It's really frustrating since I'm not sure what the attempt test is even doing.

  • Custom User Avatar

    I am getting a very annoying and totally unexpected error:

    Expected: "1110001000001110010010000100100000", instead got: "Not a integer"
    

    I have no idea why I am getting this or what is causing it. I feel like I have followed the instructions, any help would be appriciated.

    Also, I why does the ruby imnplementation need to use an integer representation, but the test output want a string..

  • Custom User Avatar

    If you want to visit the towns...

  • Default User Avatar

    I agree, the lack of this test compromises the usefulness of the kata. Although I guess with over 1k completions you can't modify the tests anymore!

  • Custom User Avatar

    The "expected" is what you must get. In all languages the last test gives the same result and many guys passed it without problem.

  • Custom User Avatar

    The following test could be added for completeness:

    Test.expect(![1, [1, 1]].sameStructureAs([[1], [1, 1]])
    

    As currently code can that passes all your tests can fail this one. :P

  • Loading more items...