Ad
  • Custom User Avatar

    CoffeeScript random tests sometimes include two or three zero arguments. That's not a valid triangle, and according to the description shouldn't be tested.

    One of the arguments equals zero.
    You will not be expected to handle any erronous data in your solution.

  • Custom User Avatar

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

  • Custom User Avatar

    Yeah, it does, thanks! I knew that my zipWith is garbage, but I thought I would fix the problems in order of their appearance - I have no idea right now how to interweave them folds anyway. The test timing out at sortBy together with the "single fold" hint threw me off the track. It would be nicer if the tests would only test the performance of what function they are about (or the ones that have already been tested up the list), but I don't know how complicated it would be to change them. A note in the "Performance" part would suffice too. Or even this discussion probably )

    As an offtopic - have you written a whole new compiler just to make more katas here?

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Well, it can be converted and stored in advance... But who cares?

  • Custom User Avatar

    I don't thing proxy should be restricted. Generally it is just a shorthand for creation of a custom getter and setter in proxy for each property in original. Still you have to check if value is a function, which properties should be proxies, think how to cache result for arguments. So it does not simplify main idea. I think it would be even better if warriors could learn about Proxy from their research or other solutions.

  • Custom User Avatar

    OK, I got it. In my solution I used Proxy, so each property/method has to have setter and getter function, and a separate object to store "cached" values and wrapper functions. So there was no need to read values, more than that initial reading added some overhead to initialization. Same could be achieved with normal getters/setters also. But maybe to read all props/methods and choose a correct way to proxy them in advance instead of each access time should work faster since methods access won't cause type and "cachedness" checks.

  • Custom User Avatar

    First I have to say, I really enjoy your katas. They still make me learn some overlooked OOP feature once in a while. It's a shame that so many of them are still in beta.

    About this one, I do not understand the first test. Is it really necessary to read all properties during proxy creation? I think the purpose of such proxy it to keep original object and proxied access points in sync having as few accesses to original as possible, so why not check calls count by <=? For creation purposes it should be enough to get only keys and postpone getting values until they are actually needed first time.

  • Custom User Avatar

    It seems to have no description of method .destroy. It can be deduced from maxPoolSize and new, but still...
    Also description of from and to parameters is slightly confusing, at least if you read the description from top to bottom. It says that they should be used to calculate rest of properties, but at this point no properties were mentioned yet. Just saying these are initial values for .from and .to should make it easier to understand.

  • Custom User Avatar

    I don't understand the last statement from this part of test cases:

    sim.set_speed(3);
    Test.assertEquals(sim.get(), 12); // unchanged
    sim.update(15);
    Test.assertEquals(sim.get(), 21);
    sim.update(17);
    sim.get() === 21;
    

    Description says:

    From now on simulated time should reflect this new speed.

    In between third and fifth line 2 real time units have passed and speed was 3. From what I understand, sim time should be 21 + 2 * 3 === 27. What does last sim.get() === 21 mean then?

    Also there is a typo:

    Creates a new SimTimeinstance.

  • Custom User Avatar
    1. There are tests checking how PA accepts arguments, but I couldn't find anything about it in description. It would be nice at least to mention this behaviour in description.
    2. There should be couple of test checking assignment of falsy values. In my solution I assign array[key] = value || array[key], which won't assign 0 or null, but solution still passes.
  • Loading more items...