Hot answers tagged

21 votes

Can Halting be considered output?

Please no All languages should follow the same rules, and being incapable of doing something isn't reason for special treatment. And this would be a big rules change for decision problems in every ...
user avatar
  • 137k
18 votes
Accepted

Policy on Outputting Irrationals as Fractions

I'd say sure After all, a float is just a fraction with some extra rules on top. If you can output a fraction that's approximately as accurate as a typical floating point number, I see no reason it ...
user avatar
17 votes

Which number formats are acceptable in output?

Solution ≠ outputting an expression I'll phrase this, this way: imagine there is a hypothetical question: Given n output the sum of all numbers from ...
user avatar
  • 28.4k
13 votes

Is a regex answer valid if it gives the reciprocal of the required output?

Ask the OP There are many ways to take input and return output. We've made some standardized ways so that challenges don't have to redefine them every time. However, for stuff like printing the ...
user avatar
13 votes

Output in reversible languages

As I see it, the difficulty here is that we need to define a standard output format which is both reversible and unique. A standard output format cannot be allowed to vary with the whims of the ...
user avatar
  • 41.3k
12 votes

Is (consistently) swapping truthy / falsy values allowed in decision-problems?

Defaults apply by default (duh), but they do not override the challenge specification. In contrast, the challenge specification can override our defaults in any way it deems fit. Thus, all answers ...
user avatar
  • 206k
9 votes

Which number formats are acceptable in output?

Generally speaking, any readable number format should be valid. This might include: leading 0s (00045.2) trailing 0s after decimal point (45.200000) floating point quirks (0.1+0.2=0.300000000000001 ...
user avatar
7 votes
Accepted

Are we allowed to copy the output of the code to the clipboard?

In general I've proposed Programs may write output to the clipboard yesterday and it has received a mixed response (+2/-4) so far. At this point, writing to the clipboard is not a valid form of ...
user avatar
  • 206k
5 votes

Should the output to STDERR count as output length?

Leave it to the writer of the challenge. For some challenges, it may be acceptable, for some it may not be. We don't need an official meta consensus on this. Note: this was first written as a ...
user avatar
  • 9,336
4 votes

Can Halting be considered output?

Only if it's halting-ness is proven in the post It is impossible to prove whether any arbitrary program will halt. That doesn't mean that every program can't be proven. However, the burden of the ...
user avatar
2 votes

Which number formats are acceptable in output?

The current consensus on Should Booleans be allowed where a number is required? appears to be that true and false values (not ...
user avatar
  • 5,988
2 votes

Can we expect out arguments to be allocated?

You can at least assume the output buffer is enough Anyway even GCC doesn't(or can't) check it when doing memcpy
user avatar
  • 12.8k
2 votes

Can I use CBMC (a static verification tool for C) for code-golf?

Because I had a few spare hours on my hands, I wrote a simple parser / compiler / whatevs that will effectively solve all the problems of this post: The new language will take input as line-by-line ...
user avatar
  • 3,253
2 votes

Where timing between outputs matters, does the solution need to account for buffering?

It's ok iff the solution works in some configuration For example you can specify "<language> (output to terminal)" in the header. In my experience, even though languages have buffering by default ...
user avatar
  • 16.9k
2 votes

Is (consistently) swapping truthy / falsy values allowed in decision-problems?

You should ask the OP Consensus exists to help us deem what we think is appropriate for all challenges, not to override what challengers say. The challengers are probably much better equipped to ...
user avatar
  • 87.5k
1 vote
Accepted

Is returning a longer array allowed?

No Data structure view Vector is a fundamental data structure for a growable, indexable array. It is commonly known that, when the allocated buffer space needs to grow, it is reallocated with twice ...
user avatar
  • 62.6k
1 vote

Is a regex answer valid if it gives the reciprocal of the required output?

Outcome for the specific challenge mentioned I have reconsidered the output requirement following a comment from Neil on the answer in question: @trichoplax Could you consider the answer as being ...
user avatar
  • 10.7k
1 vote

Is a regex answer valid if it gives the reciprocal of the required output?

Call the input a natural number \$n\$. I don't see a qualitative difference between: Returning one number, in a challenge where it so happens that the reciprocal of the correct output is always ...
user avatar
  • 6,479
1 vote

Does output count if part of it scrolls off the screen?

It depends It depends on what you defines to be the "output" -- it's up to you. In particular: If you let the output be "the content on the screen when the program terminates", it doesn't count. If ...
user avatar
  • 16.9k
1 vote

Is (consistently) swapping truthy / falsy values allowed in decision-problems?

Allow swapping them by default Having to negate the truthiness of a certain value sometimes only adds unnecessary bytes to a submission. Unless explicitly overridden in the challenge body, swapping ...
user avatar
  • 41.4k
1 vote

Should the output to STDERR count as output length?

Yes Outputting to STDERR is currently permitted under our standard I/O methods. Note, though, that this may be overridden on a per-challenge basis by the challenge author.
user avatar
  • 35.5k

Only top scored, non community-wiki answers of a minimum length are eligible