Questions tagged [policy]
This tag indicates that your question is about site policies. Usually, new proposals for policies or questions about existing ones will have this tag
238
questions
16
votes
1
answer
796
views
What are our rules about additional code accompanying function submissions?
This is an extension of this meta question.
I've always assumed that function submissions were allowed under the premise that the code would be evaluated once and would in the process either:
Define ...
2
votes
1
answer
187
views
When do I have to include things like Java's public static void main
Can someone tell me why sometimes people are including class C{public static void main(String[]a){...}} and sometimes that seems to be not necessary?(https://...
8
votes
4
answers
667
views
Minecraft I/O Methods
Seeing as how we've discussed a size measurement for Minecraft redstone creations, I thought I'd follow that up with establishing standard output and input methods.
Minecraft, obviously, does not ...
13
votes
2
answers
434
views
How to count programs in Folders?
Folders is an esoteric programming language without any files at all. Instead, the program is represented by the directory structure instead, so our normal rules for counting the file size of the ...
6
votes
1
answer
467
views
Machine code Input/Output defaults
We already have a question about default I/O for general code-golf submissions. However, entries in machine code have different built-in I/O capabilities from entries in high-level languages. Should ...
11
votes
2
answers
470
views
How do we treat default output formats such as "ans = ...." etc.?
In MATLAB and Octave, the default output looks like this (I guess this is relevant for other languages as well):
...
2
votes
5
answers
331
views
Programming languages that do not match our default posting criteria
In the What are programming languages? meta post we seem to have come to the consensus put forth by Peter Taylor that:
A purported programming language should be accepted as such if and
only if ...
25
votes
3
answers
1k
views
On scoring builtin functions
Suppose there's a challenge which can be solved completely by a builtin function, and functions are allowed. Note that as of writing the standard loophole for builtins is heavily disputed, but let's ...
22
votes
2
answers
2k
views
What does "taking no input" mean for a program?
Fixed output challenges usually state that the program "must take no input". I usually interpret this as "The standard input is empty", but after thinking about this, there are actually several valid ...
18
votes
1
answer
397
views
"Way too long" - Allowed or Disallowed?
During my time at PPCG I've seen many answers which don't post the byte count, but instead put "way too long". For example, Thomas Kwa's answer here. I have also seen this on a plethora of Java ...
15
votes
3
answers
287
views
Temporary files and code golf
In shell scripts, one can oftentimes save a few bytes by creating temporary files instead of storing information in variables. Given that the lion share of the work is usually done by invoking ...
18
votes
2
answers
635
views
Ethics of posting if you're a bad programmer
I'm not a great (or, really, that good of a) programmer, but I enjoy reading other people's challenges, and thought I'd try my hand at submitting a few challenges myself. However, I don't see myself ...
22
votes
4
answers
852
views
Can I ask a question seeking feature requests for a golfing language?
I noticed an old question, An improved version of GolfScript, which asked, as a tips question, for people to suggest ways to improve GolfScript. This was a well-received question, but times may have ...
23
votes
3
answers
3k
views
What character encodings may a submission use?
In code-golf questions, we typically score submissions by their byte count. However, whenever a submission uses a character outside of the ASCII range, the question of which encoding the code uses ...
7
votes
1
answer
241
views
Golfing Inform 7
Inform 7 is a language for creating interactive fiction whose syntax approximates natural language. It is so verbose that it will almost never be a good choice for golfing, but its verbosity is its ...
2
votes
1
answer
78
views
Adding a "Too Narrow" close option
For multiple recent questions, people have wanted to close a question because the question was too narrow - not enough variety of potential answers to make it interesting.
Those questions were: Sign ...
6
votes
1
answer
164
views
Questions based on a puzzle book
(A few related meta questions)
I know of a couple logic puzzles that I think would make good questions for this site. However, they are not original to me. I got them from this puzzle book. With ...
12
votes
1
answer
831
views
Can Coderbyte challenges be posted here?
Recently the challenge Word with greatest repeat of letters was posted. The OP said that it was inspired by a question on Stack Overflow, in which the user sought assistance with a solution to a ...
20
votes
5
answers
746
views
Are pure programming puzzles on topic?
The tag wiki for programming puzzle says:
A programming puzzle includes a goal, a partially completed program,
and rules outlining how the program can be modified. The program is
specifically ...
20
votes
1
answer
412
views
Is an answer allowed to use undefined, but consistent behaviour?
A lot of languages have behaviour that is not defined in the official spec, or might lack a spec in the first place. If the behaviour is consistent and even well known, can such behaviour be used ...
22
votes
1
answer
1k
views
Are languages like sed exempt from "no input" rules?
Some types of challenges require submission that produce constant output and, as such, forbid the solutions from taking input of any kind.
That presents a problem for languages like sed, which ...
15
votes
2
answers
347
views
Defaults for reading several pieces of input
When reading several pieces of input as command-line arguments, it is common practice to read each piece as a different argument. The command-line arguments now provide an array of the input pieces.
...
33
votes
6
answers
3k
views
Can numeric input/output be in unary?
Some string-based languages (including but not limited to sed, Retina, ///) can't really handle integer arithmetic in decimal (or other normal bases). Therefore, these almost always have to start by ...
14
votes
1
answer
257
views
Should [tips] also be tagged with the challenge type?
We've got 93 tips questions. 61 of those also have the code-golf tag. I suspect that actually all 93 of them (or at least 90) are actually tips for code golfing. So this seems like fairly inconsistent ...
9
votes
1
answer
198
views
What should the policy be on partial answers? [duplicate]
What should our rules be regarding partial answers? For example,
answers to code-golf questions that are not yet golfed
answers that almost work, but not quite (answers that require a simple bugfix)
...
20
votes
4
answers
663
views
Are control characters and ANSI escape codes allowed in output?
Recently, I had people go crazy with escape codes on one of my ASCII art challenges.
This x86 machine code answer was able to save some bytes by throwing a few colour codes at the console. At some ...
10
votes
2
answers
281
views
Should there be defaults for tiebreakers in tag wikis?
In the code-golf tag wiki, there are defaults for scoring if not specified (in bytes). Recently I have seen some questions what to do in case of a tie. My proposal is to make this a default in the tag ...
9
votes
1
answer
208
views
The StackEgg tag
As many of you know by now, Stack Exchange added a minigame that looks like an advertisement at first glance to the right hand panel of all Stack Exchange sites. The game is called StackEgg and it's ...
28
votes
3
answers
2k
views
Do function submissions have to be reusable?
Simple question: if I answer a code golf with a function (for a task which is supposed to terminate), does the function actually have to be reusable? Or could it, say, modify some globals which break ...
14
votes
3
answers
1k
views
Counting bytes for multi-file programs
So far, submissions consisting of multiple files have simply been counted by summing up the scores of the individual files. Also file names aren't counted as long as they are arbitrary. (We do count ...
2
votes
6
answers
290
views
Should tags be plural or singular?
As part of The Great Tagging Survey, I've noticed that the pluralisation of our tags is a bit inconsistent. The following lists all tags that refer to some kind of object that is dealt with in the ...
14
votes
2
answers
264
views
Tagging: are we doing it wrong?
I wanted to post this for a while...
First off, I think that we're not tagging enough. Currently, we have an average of 2.1 tags per question. I've checked some (thematically) comparable sites, and ...
19
votes
3
answers
2k
views
Do programs have to terminate?
This is related to Sp3000's question earlier, but probably a separate issue:
Are programs required to terminate, provided they print the desired output before entering an endless loop and can be ...
24
votes
3
answers
3k
views
Should submissions be allowed to exit with an error?
Suppose we have the following Python code:
f=lambda x:x*2
X
The first line defines a function which doubles a number. Then the second line is reached, is found ...
4
votes
1
answer
365
views
How do we count compiler/interpreter flags? [duplicate]
It's accepted practice to include non-standard compiler or interpreter flags in a program's byte count (most often used with Perl and Ruby, to run the program in an implicit I/O loop - but there are ...
17
votes
2
answers
1k
views
Can numeric input/output be in the form of byte values?
This answer just prompted a question, which I've wondered about a few times when answering challenges in esoteric languages:
For some esoteric languages, the only means of input/output is reading and ...
18
votes
4
answers
523
views
Do all challenges have to be answered with code?
We have a tag fastest-algorithm and we've had it for a while now. Submissions are scored based on the time complexity of the algorithm. This means that the actual implementation has no effect on the ...
17
votes
3
answers
1k
views
Should answers to fixed-output challenges be written in a programming language?
We have a definition of what we consider a valid programming language for answers on PPCG. (If you disagree with this definition, please do so on that other post, and not here.)
The one type of ...
8
votes
1
answer
242
views
What are string literals?
Some questions like Significant Whitespace disallowed string literals. But what are string literals exactly? If I interpret this literally, almost everything in Bash or Tcl are string literals. For ...
127
votes
116
answers
38k
views
Default for Code Golf: Input/Output methods
It looks like we have a consensus that we want certain defaults for the format which answers are expected in for code-golf. On that poll, the question arose twice, which input/output formats should be ...
50
votes
6
answers
8k
views
Default for Code Golf: Program, Function or Snippet?
One of the things many (new?) users forget to specify in code-golf challenges is whether the answers should provide a full program or a function (or even just a snippet). For most such things, we have ...
11
votes
5
answers
473
views
How to count languages?
A common problem for rosetta-stone and polyglot challenges (and some code-challenges) is to decide when two different languages/dialects are different enough to be counted separately. Common ...
18
votes
1
answer
589
views
Where should we put robbers?
Just in case you didn't know already, we have a fairly new type of challenge: cops-and-robbers
I enjoy these challenges very much, but I don't know if the current format (cops post answers, robbers ...
6
votes
1
answer
256
views
On byte count and language preprocessing [duplicate]
Related: Fair size comparison across languages with different source alphabets
Scoring non-ASCII languages in code-golf has been long-debated. Since I primarily uses APL for code golf, I have seen ...
76
votes
9
answers
17k
views
Interpretation of Truthy/Falsey
Quite a few code-golf questions require output to be "truthy or falsey". This is possibly confusing as these terms can possibly mean different things to different people, and especially in different ...
3
votes
3
answers
134
views
Should we split per-language tips for different versions?
The recently added list for golfing tips in ECMAScript 6 sparked a bit of a discussion in the comments (and the close/reopen votes) whether tips for different versions of one language should go in the ...
10
votes
1
answer
210
views
How do we post solutions from external sources?
Sometimes a problem is already solved elsewhere on the internet in an impressive fashion. Quite often people post these answers as well (with attribution to the original author). Of course, there is ...
14
votes
1
answer
392
views
Can we make use of abandoned sandbox posts?
Over the years a lot of challenges have accumulated in the sandbox(es) which never made it to being posted on main. Some of these were probably abandoned because they were duplicates or had unfixable ...
60
votes
6
answers
17k
views
What are programming languages? [duplicate]
Often, answers to questions asking for "programs" or talking about "programming languages" utilize things like sed, awk, … in ...
7
votes
2
answers
300
views
Is a popularity contest a duplicate of a code golf (and vice versa)?
I've noticed this happening a few times: A challenge that is very similar to an existing code golf challenge is posted as a popularity contest, or the other way around. There seems to be very little ...