Ad
  • Custom User Avatar

    You can use a simpler form to pattern match multiple elements from the beginning: [a, b | tail]

  • Custom User Avatar

    I corrected the Example Test Case for Elixir.

  • Custom User Avatar

    Cool. Thanks... I was wondering how cold this be done in a nicer way.

  • Default User Avatar

    |> (&(&1 -- ids)).()

    can be replaced as

    |> Kernel.--(ids)

    Looks better this way :)

  • Default User Avatar

    If CW comes back to the older version (OTP 18?), the changes will have to be made again... in the other way. I suppose that the "random/rand replace" comes from the change OTP 18 --> OTP 19.

  • Custom User Avatar

    I know. I think that the report has nothing to do with random/rand replace. I think is due to the changes they made. Wohever, in order to submit a solution, the changes has to be made for all the katas.

    Again... thanks for the update.

  • Default User Avatar

    There were Elixir or OTP changes at CW. Everything was fine when I publish this kata.
    I have just replaced randomby rand but now I get

    =INFO REPORT==== ....
    application: logger
    exited: {{shutdown,{failed_to_start_child,'Elixir.GenEvent',undef}},
    {'Elixir.Logger.App',start,[normal,[]]}}
    type: temporary
    

    but that doesn't harm the tests so you could give it a new try. I have reported the INFO REPORT as a "bug" on github;
    https://github.com/Codewars/codewars.com/issues/428.

  • Custom User Avatar

    Colud you update the tests for Elixir, please?

    fixture:53: warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
    fixture:61: warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
    fixture:69: warning: random:seed/1: the 'random' module is deprecated; use the 'rand' module instead
    
  • Custom User Avatar

    I can submit now. Thanks.

  • Custom User Avatar

    This is how the test appeared when I started the kata.

    The issue from the hidden tests is a general one, I see it on other katas as well. I think they changed versions of elixir/OTP. So the tests need to be updated so people can submit their solutions.

  • Custom User Avatar

    I fixed the 'random' error.

    If you have another issue, please make it in a separate comment/thread.

  • Custom User Avatar

    Looking at the code I see no issue, but I don't actually know Elixir.

    It clearly says assert make_negative(42) == -42 in the test case.
    Where are you seeing this?

    The error I don't know anything about.

  • Custom User Avatar

    For Elixir the tests needs to be updated

    assert make_negative(-42) == 42, is not according to the description, expected result should be -42.

    And in the hidden tests:

    fixture:20: warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
    fixture:27: warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
    
  • Custom User Avatar

    I see. Thanks for the fix, I can submit now.

  • Default User Avatar

    They are not broken... See the bug report I have done: https://github.com/Codewars/codewars.com/issues/428. I will try to make things fixed, at least temporarily.
    Maybe you could see something like that:

    =INFO REPORT==== .... ===
    application: logger
    exited: {{shutdown,{failed_to_start_child,'Elixir.GenEvent',undef}},
    {'Elixir.Logger.App',start,[normal,[]]}}
    type: temporary
    

    but that don't break the tests .. if your code is correct:-)

  • Loading more items...