Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
yeah sorry about that, you reminded me about this kata and I started revamping a lot of awkward stuff I wrote years ago, and I tried to unify the description instead of relying on per-language blocks. you will have to fork the current translation, it is the only way to resolve a merge conflict; thanks for choosing the enum too
It won't be too unidiomatic, I think, as many projects also use table-emulated enums in Lua.
Also, since the original description has changed, I copied the new description and made a change to it. But the diff of the descriptions are a mess now, and I don't know how to resolve it.
approved
the other languages use an
enum
(except JavaScript where I tried to emulate one with an unmodifiable object whose keys are equal to their values). I tried to cobble together something equivalent for Lua, which does not have native enumerated types:Preloaded:
user solution:
tests:
What do you think ? is it too awkward / unidiomatic ?
i thought that scientific notation is easier to understand and more informative for beginners (for example it gives a better idea of how small subnormal numbers are), and I for one cannot easily read the hexadecimal notation. but if you think it's better it's not that big of a deal
I just think it's better to use hexadecimal notation here. Do you want me to switch to decimal scientific notation?
thanks for making the changes, is there a particular reason why you use the hexadecimal notation for the floating point literals ?
Lua translation!
Lua translation
I love how lua is like "oh you can't do that" and then has a random ass function that does it instead of making you manually convert stuff
Hello, I've updated the translation. Please review.
Hello, thanks for the translation. I am not experienced in Lua and have a few remarks:
why do you need to compute
nan
in preloaded ? can't you do have it in the tests, like?
I feel like the wording is ambiguous and can mislead beginners. How about something like "until Lua 5.3, all
number
s were IEEE 754 DP. Since 5.3,number
s variables can also hold 2s complement integers". What do you think ?Lua translation
Lua translation!
Good!
Loading more items...