Ad
  • Custom User Avatar

    I've never learned assemly in school so even though the kata is easy in its nature, but I learned a lot. Thanks OP.

  • Custom User Avatar

    For those who are actually willing to understand the task, you have a table numbers with one column n.

    You have to output a table with two columns, the first being the index (1_based)

  • Custom User Avatar

    Duplicate is retired in the meantime.

  • Custom User Avatar

    Thanks for the translation. However, there was little information about inputs provided with this setup, so I published a new fork that improves it.

  • Custom User Avatar
  • Custom User Avatar

    In case you're still interested in this, I found out during some testing that rule on insert requires all values to be provided during insert to function correctly (at least in this particular case). This is not true here though, since the test code doesn't explicitly insert id's, relying on that column's autoincrement capability instead.

    I've added a note hinting towards this fact instead of modifying the tests because the original idea behind this kata was to use "t", and I'd like it to remain that way (plus, it's more realistic, since normally people don't provide values for autoincrementing primary key columns, making rule a not 100% correct choice).

  • Custom User Avatar

    Duplicate numbers aren't tested.

  • Custom User Avatar

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

  • Custom User Avatar

    The connection just times out on me when I try and run my solution for this kata—do you have any idea what is going on?

    Nice to see another kata for Prolog, by the way!

  • Default User Avatar

    In the description, it´s unclear from where to retrive data (table schema - numbers), and also the output schema (in the graphic seems that column should be integer and it is n).

  • Custom User Avatar
  • Custom User Avatar
    • added C++ example to description
    • added sample tests
    • added missing includes
    • changed params to const ref
    • removed polluting using namespace std
    • moved ref solution to local scope
    • fixed overflow in random tests
    • used simpler syntax in some places
  • Default User Avatar

    I created a NASM translation with the updated description.

  • Custom User Avatar

    Damn by approving this fork I reverted a change in the description :/ Fortunately, it was just a minor change.

    We need to be careful when publishing fork of a fork, because the child fork does not seem to get the descritpion form its parent or from the current state of the kata, but from the root fork.

    Or something like that.

  • Default User Avatar

    Improved generation of random strings:

    char num_str[2001];
    num_str[len] = 0;
    

    instead of

    char num_str[2001] = "";
    
  • Loading more items...