Ad
  • Custom User Avatar
  • Default User Avatar

    Updated, thanks!

    It appears that os.clock() doesn't account for time spent in sleep on Linux, but it does on Windows (Tested on both Ubuntu and Windows with Lua 5.3, 5.4 and LuaJIT). I've implemented a workaround timing function that reads /proc/uptime, which is more accurate than using os.time().

  • Default User Avatar

    approved

  • Custom User Avatar

    Looks nice!

  • Custom User Avatar

    There's so much in Python you'd have to disable to make this minimally difficult...

  • Custom User Avatar
  • Custom User Avatar

    Approved. Thanks!

  • Custom User Avatar

    If you fix the typo in the funtcion name in the description example, I'm happy with it.

    Testing frameworks generally do not foresee this usage. I think some other languages have to use bare asserts with custom messages. You managed nicely with what you had. :]

  • Custom User Avatar

    Approved.

    The comments in the random tests are really not necessary. The code is self-documenting; the comments just distract there.

    Please suppress the urge to code golf your test suite. join`` is just less readable than join("") - don't do it, write for readability and maintainability, CW can spare those couple of characters.

    I would have commented this directly on the translation, but CW would not let me. It also shows two comments it isn;t actually showing. Something's very wrong there.

  • Custom User Avatar

    I'm not worried about the encoding of "impossible"; -1 is as good as None, Nothing, null or whatever.

    I am worried about the failure messages of the random tests. There is ( still :[ ) enough confusion with the current failure messages; could

    For least_larger({2, -5, 7, -3, 8, -7, 2, 3, 7, -2, -4, -8, -9, 8, -8, -7, -6, -8, -4}, 2), the list of actual possible correct answers does not contain your answer:
    Expected: contains -1
    Actual: [ 4, 13 ]
    

    present -1 and [4,13] more clearly as actual and possible answers respectively? Using "Expected" and "Actual" with different meanings than in all other kata on CW seems like a bad idea. Yes, you may have to write custom assertions with custom messages. I would really appreciate if you stayed as close as possible to existing languages here; this point has been belaboured extensively here.

  • Custom User Avatar

    merged

  • Custom User Avatar

    Fork approved. ( You may want to ask Hobs for the mender role. )

  • Custom User Avatar

    Approved.

  • Custom User Avatar

    Approved. Please keep an eye on discourse in case of any discrepancies.

  • Custom User Avatar

    Approved

  • Loading more items...