Ad
  • Default User Avatar

    I just added a lead-in sentence "Your objective with this kata is to implement an interpreter for the Whitespace language using the following description as a guide." Does this help?

  • Default User Avatar

    Practice and also being able to review and understand other people's solutions. The less compact solutions aren't necessarily better or worse--they provide more detail into the underlying logical structure of the solution, whereas the more compact solutions take advantage of abstractions of the underlying logical structure of the solution--which may or may not perform better.

  • Default User Avatar

    It's there because I find that it's reflective of real-world scope considerations where shortcuts that don't follow the original definition are liable to fail, particularly when working with Unicode. Would you be able to provide feedback on the definition specifically?

    Edit to add, I think that working with date/time formats is the best example of what you're describing--while Unicode encoding variants are pretty much across the board, you-need-to-assume a Unicode encoding instead of say ASCII, Latin-1, or what-have-you these days.

  • Default User Avatar

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

  • Default User Avatar

    Thanks! Never knew about that. I'm probably a repeat offender.

  • Default User Avatar

    Wait, you can read solution comments without access to the solutions?

  • Default User Avatar

    One of the original purposes of this kata was to provide light exposure to prototypal inheritance in Javascript.

  • Default User Avatar

    The JS bootcamps likely stopped teaching this after ES6 came out, so I guess this is now a looking things up for yourself instead of being told exercise. TO NOTE: contexts of keywords and "prototype".

    @darymc, just sleep on it. You're not missing the part of it I'm talking about, but the people you're responding to have.

  • Default User Avatar

    I actually suggested that to the author to be consistent with the input/output capabilities of the original implementation. Makes me wonder whether there could be more done on the more modern Node.JS implementations.

  • Default User Avatar

    You've misread the spec for stn.

  • Default User Avatar

    Katakana uses multi-byte characters in UTF-8.

  • Default User Avatar

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

  • Default User Avatar

    What solution are you referring to? Remember to mark as spolier.

  • Default User Avatar

    The former is any character. The latter is any character that isn't EOL.

  • Default User Avatar

    When you get into time and space complexity in your studies you'll realize your solution makes more sense at a very large scale once you get rid of the usage of multiple for loops. When it comes to text processing at a smaller scale, this solution saves a bunch of time. In the real world the scale of different problems are different, and you'll frequently come across problems where this is just as good as your existing solution and easier to implement, provided the prerequisite knowledge. Any Theory of Computation or Building Compilers course worth anything is going to cover Regular Expressions, albeit in a more abstract form than PCRE-like regular expressions, starting with DFAs and NFAs.

    Edit: if you misuse regular expressions in a situation where it's called for it's because you're not qualified for your damn job.

  • Loading more items...