Linked Questions

5 votes
3 answers
248 views

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

This answer gives the reciprocal of the required output, rather than the required output itself. In a simpler challenge this might cut out a significant part of the work, but for this particular ...
trichoplax is on Codidact now's user avatar
6 votes
2 answers
505 views

Is outputting a Maybe acceptable in Haskell? [duplicate]

The vote on this output option has moved here. Haskell has a very strong type system, so there is a type called Maybe to work around some restrictions. The ...
totallyhuman's user avatar
  • 16.3k
3 votes
2 answers
326 views

What input methods should we allow for Code Golfs? [duplicate]

Should we define rules on how input can be fed into programs? This question on SO allowed for any input method, which resulted in answers which ripped off the question by doing the computation in ...
moinudin's user avatar
  • 12.5k
5 votes
2 answers
398 views

For Code Golf, how do you deal with languages without a traditional print/echo statements? [duplicate]

JavaScript comes to mind as a language without a traditional outputting mechanism. In this instance, document.write() is suggested, but its specific to the browser,...
Yahel's user avatar
  • 150
10 votes
1 answer
277 views

Returning a function, which returns the result? [duplicate]

Submission formats are always flexible here on PPCG. Named functions, anonymous functions or even full programs that perform IO, are all fine. Even currying is acceptable, for example, taking ...
FlipTack's user avatar
  • 14.6k
4 votes
1 answer
126 views

JS Promises in code-golf? [duplicate]

Should code-golf submissions written in JS that return a promise be allowed? For example: Promise.resolve("hi") Doesn't output ...
user avatar
-1 votes
2 answers
158 views

Should the output to STDERR count as output length? [duplicate]

A few challenges that requires the program to output something at a specified length, and a bunch of answers well... uses built-in error messages that's generated by the interpreter rather than the ...
iBug's user avatar
  • 2,683
6 votes
1 answer
190 views

Is Ans considered a valid form of input for TI-BASIC? [duplicate]

We haven't reached a complete consensus on whether or not Ans is permitted as a valid input format for TI-BASIC. We have this answer on "Default for Code Golf: ...
No Name's user avatar
  • 101
10 votes
1 answer
215 views

What counts as "output" in SQL? [duplicate]

Some of the site's questions rule that something must (or must not) be printed to the output. My question is, in the case of SQL, what really is the output? The ...
George Menoutis's user avatar
1 vote
1 answer
185 views

Hard coding input [duplicate]

I've seen some answers that hard code the input or rely on the existence of a user-defined variable, see for example this question. The OP asked for a "function or equivalent subprogram". I don't ...
alexia's user avatar
  • 1,796
7 votes
0 answers
201 views

Why can't we take input from a variable? [duplicate]

On the default allowed I/O methods, we have come to a consensus that programs may not take input from a predefined variable. However, we have decided that anonymous functions are allowed. In the ...
Esolanging Fruit's user avatar
2 votes
1 answer
94 views

When accepting input from STDIN, can it be assumed to terminate with a newline [duplicate]

...or I guess more specifically, can I require that input from STDIN (or closest alternative, e.g. TIO) be newline terminated? Utilising apps like TIO this isn't added, but if using a terminal with <...
Dom Hastings's user avatar
  • 22.9k
3 votes
0 answers
80 views

What's a number? [duplicate]

Similar to What's a string? If a challenge says that the input will be “a number”, what data types are acceptable? Obviously, types like int and ...
dan04's user avatar
  • 6,581
0 votes
1 answer
59 views

Do programs need to take input, if it is in the spec? [duplicate]

Recently, there have been some challenges involving the OEIS. Specifically, when given an index as input, the challenge spec involves output the item in the OEIS at that index. However, for constant ...
Stephen's user avatar
  • 13.8k
0 votes
0 answers
58 views

Is it acceptable to take input in two different formats? [duplicate]

This isn't an issue yet, but I could see it become one sometime soon. Can I take input in two, or even more, separate formats, provided they're both reasonable formats? For example, let's say one ...
DJMcMayhem's user avatar
  • 58.9k

15 30 50 per page
1
2 3 4 5
7