Ad
  • Default User Avatar

    thx a lot for your reply, the current impl via passing a string only because that ruby cannot denote identical syntax as perl6 does, but your suggestion is very reasonable, i will modify the kata to make it more pragmatic when i'm free.

  • Default User Avatar

    Thank you for your feedback. In fact, there are similar test cases, but it looks a bit complex, I replaced with what you mentioned.

  • Default User Avatar

    Thank you for your feedback. I understand that the current design might not meet your expectations. The intention of this kata is to explore the concept of emulating Perl 6's whatever expression in Ruby, rather than focusing on parsing syntax extensively, so I made some simplications.

    I also wanted to use Ruby's internal DSL to design this kata, but doing so would deviate from the syntax of Perl 6.
    But your design based on varargs & block is the most concise one undoubtedly. What do you think is the most suitable difficulty for this kata?

  • Default User Avatar

    Hi, thanks for your reminder, a cloned argument is passed in after making modification!

  • Default User Avatar

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

  • Default User Avatar

    The precondition of enjoying fairness is that owning corresponding rights. In the case of weight equals 0, minimum condition is not satisfied, it looks like no sense but indeed logical. The target of the algorithm is to minimize the variance of the shares meanwhile tending to distbute the bigger cake to those less profitable people. The strategy for distbuting does not aim to the absolute but overall & reasonable fairness.^‿^

  • Default User Avatar

    I added a example & explanation in description, and hope that you can understand what i wanna express.^_^

  • Default User Avatar

    Thank you for reminding me, i have removed it from description.

  • Default User Avatar

    Thanks for your advise, and it have been removed.

  • Default User Avatar

    Approved!

  • Default User Avatar

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

  • Default User Avatar

    Ruby translation kumited please approved!

  • Default User Avatar

    You should add more tests with (very){100} large numbers!!!

  • Default User Avatar

    After submitted I got such error message:

    dog's instance variable @barks isn't what it was set to in the hash - Expected: "obnoxiously", instead got: nil
    

    But I have tried to test all the tests in my local machine, I got the expected results instead of nil.

  • Default User Avatar

    You should return a string instead of printing it to the console ^_^.

  • Loading more items...