Ad
  • Custom User Avatar

    Can someone explain how

    "11111" expects [0] = "Pinkie", [1] = "Ring", [2] = "Middle", [3] = "Index", [4] = "Thumb"

    but

    "11101" expects "Index" to be returned ??

    This is in C# random tests.

  • Custom User Avatar

    Same with all katas by g964, they are math puzzles. Not coding puzzles.

    Be nice if we could just block all katas by certain users.

  • Custom User Avatar

    If I'm understand the random test output correctly for golang, I'm seeing random tests like this:

    [[0 0 0 0 0]
     [0 0 0 0 x]
     [0 0 0 0 0]
     [0 0 0 0 ^]
     [0 0 0 0 0]]
    

    which expects the answer to be false.

    Similar:

    [[0 0 v]
     [0 0 0]
     [0 0 x]]
    

    Where 118 is v and 120 is x

    The test is expecting this as false...

    Random tests are even failing on some 3x3s, but I've added every combo of <>^v and x possible in a 3x3 grid, with correct expected results in a 3x3 grid to the sample tests and they all pass.

  • Custom User Avatar

    Yeah, I have not got a clue from the description what I've actually to do.

    It badly needs a decent worked example.

    I thought I understood it until this line:

    The transformed first chromosome must appear at the first position of the tuple. the second one at the second position. Therefore :

    Crossover([]int { 1 }, []int {1,2,3}, []int {10,11,12}) should be ([]int { 1,11,12 }, int[] { 10,2,3 })

    What is this saying ?

  • Custom User Avatar

    The Clojure version is almost certainly broken.

    I just can 't see how the expected output in the random tests make sense.

    Given inputs

    ("zPEJS" "BFPxI" "," "," "," "," "vFhKk" "," "," "," "," "," "RHFQh" ".")

    It expects the result to be:

    "zPEJS BFPxI, ,, , vFhKk, ,, ,, RHFQh."

    This section makes no sense
    BFPxI, ,, , vFhKk

    Another example:

    Input

    ("NkVcr" "," "," "DlWOv" "beeOm" "," "WYCCh" "," "," "kfaEC" "IeGwS" "xellI" "." ".")

    Expected:

    "NkVcr, , DlWOv beeOm, WYCCh, , kfaEC IeGwS xellI."

    Why the spaces between the commas?

    Another example:

    Input
    ("fdNXT" "," "iiUuU" "," "," "," "," "," "," "xDLAz" "," "," "eywFI" "." ".")

    Expects this bizarness:
    "fdNXT, iiUuU, ,, ,, , xDLAz, , eywFI."

    What is going there? A Space after the comma, then 2 commas without a space, then a space, then 2 more without a space, then a space?

    It looks like any number of commas, has to be broken up into blocks of 2, and be surrounded by spaces. This is wrong.

    This is clearly broken.

    If it wants every pair of commas to treat the 2nd comma like a word, this makes no sense. A comma isn't a word.

    But this one breaks the above:

    Here the input is:

    ("Gjnjv" "lXgCV" "," "," "," "," "," "," "," "RtzYV" "ewWZE" "." ".")

    ANd it expects:

    "Gjnjv lXgCV,, ,, ,, , RtzYV ewWZE."
                ^^ why no space here between the 2 commas?
    

    IT seems different to the example above. Is it something to do with odd / even combinations of commas?

  • Custom User Avatar

    I don't know if I love you or hate you.

  • Custom User Avatar

    You could use string.IsNullOrEmpty(name)

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    I tried to approve but it says "Failed to approve: cannot approve/reject own translation"

    Think you need the original kata creator, I only did translation for CLojure :(

  • Custom User Avatar

    Its an 8 KYU and the details doesnt say to return the name capitalized ?

    Maybe also change the description to say return name capitalized, but I'm not sure if that's too hard for an 8KYU.

  • Custom User Avatar

    change the ns to

    (ns rgb.core)

    Also missing defn in the rgb function definition.

  • Custom User Avatar

    Can someone explain why this:

    ["SWmBK" "," "," "," "," "aXeok" "," "EoULa" "," "," "dWnzl" "jckXr" "," "rTDdP"" yReZA" "." "." "."]

    Should result in

    "SWmBK, ,, , aXeok, EoULa, , dWnzl jckXr, rTDdP yReZA."

    Why the space afte rthe first comma, but no space between ,, but then a space after 3rd comma and then space after 4.

    This is in clojure

  • Custom User Avatar

    This doesn't handle case properly. It breaks on an uppercase character that doesn't appear as a lower case character.

    (encode-dups "ABCDE")
    => ")))))"
    

    I think this is why the shorter random tests are sometimes failing. If it generates a random test that has an uppercase character that doesn't also appear as a lower case character then it expects ")"

  • Loading more items...