Ad
  • Custom User Avatar

    Python new test frameworks are required.

  • Custom User Avatar

    Missing mutable test cases for takeWhile.

    var list = ArrayComprehension({
      generator: "1..",
      mutable: true
    });
    
    Test.assertSimilar(list.takeWhile(n => n < 5).value(), [1,2,3,4]);
    Test.assertSimilar(list.takeWhile(n => n > 4).take(4).value(), [5,6,7,8]);
    
  • Custom User Avatar

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

  • Custom User Avatar

    The kata's description is horrendously lazy. And it leaves a lot of specs out of the table, even in the context of the linked Wikipedia article:

    • Which version of the LZW do we need to implement? There are two versions listed in the linked Wikipedia article (fixed 8-bit to 12-bit, or the variable width version), but the kata does not mention which version it desires.
    • What unit are we compressing? Characters, or bytes? Note that most LZW implementations process bytes and not characters. Meanwhile, there are no restrictions on the input string, so it can contain non-(extended) ASCII characters, which cannot be expressed in 1 byte, and has to be explicitly encoded; depending on the encoding they give different bytes. The tests doesn't contain anything other than [A-Z# ], but this is really because the tests are too lazy.
    • Speaking of which, the return result should really be an array of integers, not a joined string. This prevents the kata from being translated to other languages.
  • Custom User Avatar

    There are no tests that validate stop is handled correctly. Every test can be passed by processing every character except the last (and ignoring stop altogether).

  • Custom User Avatar

    Nice kata! There is a typo in the sample tests, at the group by section: query().select().from(persons).groupBy(profession, name).execute() [i.e., SELECT * FROM persons WHERE profession = "teacher" GROUPBY profession, name]. There should be no 'WHERE' I asume.

  • Custom User Avatar

    Python translation

    Implemented random tests to match o2001's implementation as much as possible.

  • Custom User Avatar

    These edge cases should also be tested since they are present in example tests:

    • [1..9,12..15] -- invalid since one single range is allowed

    • [1,2..20,25] -- invalid since a range has to be the final item

    • [1,2,3..20] -- invalid since at most one inidivual element can be provided before a range

  • Custom User Avatar

    These edge cases should also be tested since they are present in example tests:

    • [1..9,12..15] -- invalid since one single range is allowed

    • [1,2..20,25] -- invalid since a range has to be the final item

    • [1,2,3..20] -- invalid since at most one inidivual element can be provided before a range

  • Custom User Avatar

    It seems a bit odd to me that vowelSet.includes(A) is required to throw an error when such problems are decidable (determining if a finite set is a subset of any other set). Should it really be required that the implementation fails when it doesn't have to?

  • Custom User Avatar

    I'm failing exclusively on four "anti cheating memoization test"s (without cheating or using memoization), so either that test is misconfigured, or my solution is bad and some other "normal" tests (not related to cheating) are missing.

  • Custom User Avatar

    First off, thanks for putting this together, it's been a fun challenge. However, I seem to be running into an issue with my attempt. The first attempt, I passed all tests but the performance test. My second attempt, after some minor code cleanup, is now failing all of the "anti cheating" "edge case" tests, but I haven't functionally changed anything.

    Any idea what the issue could be? I put a good amount of effort into my solution, so it's a bit frustrating to fail in a way that I cannot identify.

  • Default User Avatar

    The JavaScript in the description and initial code is quite ancient. Decorator should be a class, and spread parameters should be used instead of using Function.prototype.call() on the arguments object.

  • Custom User Avatar

    The if outer observable never completes, then concatMap either and if inner observable never completes, then concatMap either tests are completely undecipherable.

    Please actually explain what are the expected behaviours of the 3 operators required to be implemented.

  • Custom User Avatar

    Starting from this part the kata stops resembling any kind of observable pattern. Observable pattern is push-based, not pull-based: downstream do not, and cannot control whether upstream starts pushing values; similarly, upstream do not have the concept of "knowing whether downstream want a values". That'd be a pull-based design like Promise.

    of and interval does not make any sense in a push-based system. It would be acceptable if the tests are using it responsibly, but then there are increasingly more gratuitous misuse of this in later parts (#4, then #5) which requires pull-based behaviour in a supposedly push-based system, requiring completely insane programming.

  • Loading more items...