• Default User Avatar

    Don't mind this message, I think it's okay now.

    I'm sorry, I'm new to this and I'm not sure how to do it. Should I delete all descriptions except the Python one ? Or should I do sth else ?

  • Custom User Avatar


  • Default User Avatar

    Should be good, thank you!

  • Default User Avatar

    Should be fixed. Thanks!

  • Custom User Avatar

    I've fixed the Rust version

    For future reference: mod preloaded belongs in the tests section, not the user solution. Static and constant values should be UPPERCASE (also in Python, but I'm not dealing with that). Non-const values (such as HashMaps, which require allocation) need wrapping in a lazy_static. It's a bit tedious.

    Note that when I solved this in Python, I didn't even see the mention of the preloaded map, and created my own. Wasn't that much of a hassle, and I preferred a different layout anyway.

  • Default User Avatar

    OMG. it seems I'm too stupid to merge your improvements to the kata. I approved your Java fork, but it simply doesn't show up in the kata. I still struggle with some aspects of codewars. I'd copypaste your improvements, but fear that acknowledgement of your colaboration would vanish then?

    Thank you for your help!

  • Default User Avatar

    that's true, and I don't consider it an issue.

    I simply wasn't able to add it, so that it'd work in those languages. Feel free to do it yourself

  • Custom User Avatar

    Fixed for JS and Python.

  • Custom User Avatar

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

  • Custom User Avatar


    Thx ;)

    more aligned with the JavaScript version

    When I said this, I was talking specifically about using callbacks for having and alike. This clearly defines what happens on subsequent chaining operations:

    # original:
                                                           # ^ Starting from here, python users had to (fucking) guess to what part the next statements were refering too
    # new version: no ambiguity
    jane.has(2).eyes.each(lambda thing:
    # allowing clear specs, like working back on the "source" elements:
    jane.has(2).eyes.each(...).having(1)    # note: I actually don't remember at the moment how I specified this part, so it's probably not a good example

    And since the other parts of the JS design were also utterly wrong, yes, I also made everything use an explicit context, to avoid any kind of globals.

    If we apply this fork to Python, should we also ideally update the JavaScript version as well to make it more idiomatic and less hacky ?

    I'm not actually sure it's needed. JS definitely isn't a good design, right now, but I went through the python update because after the 3.11 update, the users had to digs through internals and rely on crazy hacks/inspection things to update jane's name or so (I explained it in my message in the discourse, iirc).
    Now, yes, it could be done for JS too. But if so, I won't be the one doing it (already too much other things to do these days)...

    (about ruby: everything is simpler there)

  • Custom User Avatar
  • Custom User Avatar


  • Custom User Avatar
  • Custom User Avatar

    Resolved by your fork

  • Custom User Avatar


  • Loading more items...