Ad
  • Custom 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.

  • Custom 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.

  • Custom 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?

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom 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.^‿^

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for your advise, and it have been removed.

  • Custom User Avatar

    Approved!

  • Custom User Avatar

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

  • Custom User Avatar

    Ruby translation kumited please approved!

  • Custom User Avatar

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

  • Custom 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.

  • Custom User Avatar

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

  • Loading more items...