Ad
  • Default User Avatar

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

  • Custom User Avatar

    On further experimentation, there are definitely JS test cases which expect the output to be -0 when both the multipland and multiplier are positive numbers.

    In one random test case, for example, n (the multiplicand) is 291 and the first integer in the array (the multiplier) is 0. The test is failing because it says that the result of that first multiplication is expected to be -0.

    If we could expect all such cases (where the multiplicand and multiplier are both positive) to result in a negative zero for some reason, then fine: we could work around it sensibly. But not all the test cases expect negative zero in this "positive times positive" scenario.

    Right now, this kata as described seems unsolvable in JavaScript. Perhaps the description needs updated if there is some implicit requirement for returning negative zero in certain conventionally-unexpected cases. But more likely, there is a bug in the test solution.

  • Custom User Avatar

    Why are we still getting -0 in the "expected" results in this kata, particularly in JavaScript?

    It's not even conventionally possible to check for -0 in JavaScript using operators, Math.sign(), or the rest of the Math library, as far as I can tell. You can't even use right-shift to find that.

    (I can find two ways to do it, but they are both highly obscure and one of them appears to be undocumented. I will mention them in a comment below with a spoiler tag for those interested.)

  • Default User Avatar

    Deprecation warning in Rust (tests use an outdated function):

    warning: use of deprecated associated function `chrono::NaiveDate::from_ymd`: use `from_ymd_opt()` instead
      --> src/lib.rs:54:36
       |
    54 |         let mut first = NaiveDate::from_ymd(year, 1, 1);
    
  • Default User Avatar
  • Default User Avatar

    [Java] At least in the java fixed test the case where the pattern array is empty is not contemplated. So when you attempt the random tests you may pass the kata without checking that condition.

  • Custom User Avatar

    Just realize i misunderstand the phrase the first in order of appearance

    Example case: BAABB

    If you think B is first in order of appearance, it's wrong.

    A is correct answer. It can paraphrase 'the first in order of appearance which have highest length`

  • Default User Avatar

    Expected
    <kata.Result>: {C: 0, L: 0}
    to equal
    <kata.Result>: {C: 98, L: 1}
    what about this corner case ?)
    in my tests it works ok when im trying to put only 1 character

  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar

    Rust: no random tests

  • Default User Avatar

    Python new test framework should be used

  • Default User Avatar

    JS: Should use Node v12 and the approriate assertion tools (mocha + chai).

  • Custom User Avatar

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

  • Default User Avatar

    Python new test framework should be used and 3.8 enabled

  • Loading more items...