Skip to main content
15 events
when toggle format what by license comment
May 21, 2020 at 16:34 comment added pqnet I think the point is not abusing the fact that given limits of the language the set of inputs is finite, and the solution can be hardcoded. It is a particular case of the "do not hard-code" rule codegolf.meta.stackexchange.com/a/1063/25245
Feb 7, 2019 at 12:56 comment added Dennis Mod @qwr Are you talking about the algorithm or the implementation? I don't think a submission in a "32-bit language" should have to support 64-bit input, but I do think the underlying algorithm should.
Feb 7, 2019 at 9:20 comment added qwr For challenges that don't specify input ranges, this can go the other way: demanding a function works with 128 bits, 256 bits, etc. can be unreasonable for languages that only offer native support for 32 bit types. I think it's reasonable to accept 32 bit as a default sized input.
Nov 7, 2018 at 17:09 comment added Dennis Mod @RossPresser That's still hardcoding. The format doesn't matter.
Nov 7, 2018 at 17:07 comment added Ross Presser I know it's years since this was posted but I had a thought. "Hardcoding a list of the prime numbers below 128 is not allowed" -- what about including the single 128-bit value 0x800228A20208828828208A20A08A28AC or binary 10000000000000100010100010100010000000100000100010000010100010000010100000100000100010100010000010100000100010100010100010101100 which is a bitmap of the primes from zero to 127?
Mar 27, 2018 at 1:41 history edited ETHproductions CC BY-SA 3.0
I think that's what this means
Mar 26, 2018 at 8:22 history edited Weijun Zhou CC BY-SA 3.0
edited body
Apr 13, 2017 at 12:39 history edited CommunityBot
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Sep 12, 2016 at 20:03 comment added user56309 @Dennis I'd say, if the input doesn't match the challenge, it isn't an appropriate answer. It's arbitrary at this point that ints are 32 bit, doubles 64, floats 32, shorts 16, bools 1/8, and Strings are infinite.
Sep 12, 2016 at 19:56 comment added Dennis Mod @tuskiomi The first time it was used was clever, but this trick could be applied to pretty much all challenges that do not state in what range the submissions must work.
Sep 12, 2016 at 19:16 comment added user56309 I don't think this is a problem, but a solution. Good on those users for thinking outside the box.
Feb 11, 2016 at 5:07 comment added lirtosiast I'd say instead that the flaw is in the challenge, and the default should be that the algorithm should work for all ℕ when precision/range limits are disregarded.
Jan 31, 2016 at 2:06 history edited DennisMod CC BY-SA 3.0
added 124 characters in body
S Jan 31, 2016 at 1:44 history answered DennisMod CC BY-SA 3.0
S Jan 31, 2016 at 1:44 history made wiki Post Made Community Wiki by DennisMod