Ad
  • Custom User Avatar

    So you are saying that the ranking system was drastically changed, and that this has not been documented. Where can I find more information about this?

  • Custom User Avatar

    The ranking guide suggests that "basic interpreters and compilers" are 2 kyu. I think you're mistaken.

  • Custom User Avatar
  • Custom User Avatar

    I can't agree. Knight path is 4 kyu. So is "Adding big numbers".

  • Custom User Avatar

    If I understand you correclty, that seems like a needlessly fine definition of the term "specified". I struggle to see how there is more than one sensible interpretation of the language used. I presume you have differing experience; please to relate it.

    I appreciate that you're taking any of your time to assist me in correcting this problem. I find it puzzling that you feel the need to speak roughly. I accept that you may be right in principle and I presume you have greater experience with these matters. I hope that we can have a polite, or even a friendly mode of conversation.

    It is the case that there are currently no random tests which test for the ability to define and redefine operators, only random tests that check whether numbers may not be redefined. It seems relevant to note that in order to generate random instructions of arbitrary complexity, it would be necessary to embed a full interpreter into the tests, in order to be able to check the validity of the output. If that's a common practice I'm sure I could implement it; generating such instructions sounds interesting. If there's a less-complex approach that you would find acceptable I'd be happy to hear it. Also, I'm not sure if it's relevant, but I don't believe that your solution currently passes the tests.

  • Custom User Avatar

    "bad" is not very useful or descriptive. It's more of an emotional pejorative. The tests are likely to continue to be "bad" without specific, actionable feedback.

    The type of the exception is not specified. You know about types in programming languages, I presume? Any exception type will pass the tests.

  • Custom User Avatar

    Removed division from random testing. Issue should be resolved.

  • Custom User Avatar

    Hmm, I had hoped I'd solved that. I suppose I can remove / from the potential choices.

  • Custom User Avatar

    By which I have to conclude that hitting "re-publish" isn't actually working.

  • Custom User Avatar

    Added.

  • Custom User Avatar

    I have updated the tests and description.

  • Custom User Avatar

    Codewars seems to have eaten it 😫 I'll redo the work later today.

  • Custom User Avatar

    Specification and test added, thanks.

  • Custom User Avatar

    Interesting point. I'll look into it, thanks.

  • Custom User Avatar

    True, but it's not hard to parse a function, replace all its mentions further in the string, and keep evaluating the string as if nothing happened. You can see this solution which does something similar.

    I'm not understanding this as an objection. If a postfix calculator allowed redefinition of symbols, it would be a Forth (and Turing-complete). The "Hint" at the end of the instructions explicitly suggests making a two-mode, one-pass interpreter rather than a single-mode two-pass interpreter: it's quite a bit simpler to do so.

    The examples were written as they are with the idea that this kata might eventually be translated into a format that did not support returning the stack as an array. I'm happy to change that, however.

  • Loading more items...