Questions tagged [answers]

For questions regarding answers posted to challenges. This tag is not for questions about a specific answer, but for answers in general

Filter by
Sorted by
Tagged with
1 vote
1 answer
114 views

What counts towards the byte count in a code golf answer?

I use Racket as my primary programming language and have been having fun the past week solving challenges using it. I came across a few answers from other programming languages that use TIO's header ...
Ed The ''Pro'''s user avatar
3 votes
1 answer
63 views

Find answers in given language

Sorry for a stupid question, but I read How do I search? and didn’t understand: How to find answers in a given (programming) language?
lesobrod's user avatar
  • 3,239
11 votes
4 answers
387 views

How do we handle answers that have later become invalid due to external circumstances?

From time to time, answers can be posted to the site which, at the time are valid but later become invalid without any fault of the original answerer. For example, a number of answers to this ...
caird coinheringaahin g's user avatar
5 votes
2 answers
210 views

What is our consensus on languages which do not halt by design?

Current consensus seems to be that programs must terminate by default. This makes sense in general. However, does this bar use of languages which are not designed with a halt state (other than ...
thejonymyster's user avatar
3 votes
2 answers
107 views

For lambdas that is, how should we input them into tio.run?

following this meta codegolf stackexchange post, I've stopped using declarations for lambda functions, but one problem this creates is that since you're only inputting the lambda body and not its ...
random person's user avatar
18 votes
0 answers
168 views

Correct flag usage on invalid submissions

Recently, a couple of invalid answers have been flagged as NAA. This is somewhat of a duplicate of this answer on our policy, but I want to mention this because it's important that everyone is using ...
hyper-neutrino's user avatar
  • 41.3k
10 votes
1 answer
224 views

Handling old, popular, creative, but non-competitive answers

Take a look at this answer: Produce the number 2014 without any numbers in your source code. This is the most upvoted answer on our site right now. However, as many have pointed out, by modern ...
hyper-neutrino's user avatar
  • 41.3k
8 votes
1 answer
169 views

Can Whispers programs ignore a final output line?

This was first asked by Leo in the Whispers chat room: But I have a general question about Whispers submissions: couldn't we avoid counting the final Output line most of the time? We can consider the ...
caird coinheringaahin g's user avatar
1 vote
1 answer
131 views

What to count in assembly?

Yes, I've checked this post (How are bytes counted in assembly), but I'm asking a different question. I'm asking, if I have an .asm file, an ...
atzlt's user avatar
  • 487
7 votes
1 answer
130 views

What's our policy on "reposting" older answers with newer versions?

On occasion, especially with a couple of specific, inactive users, I'll craft a Jelly answer identical to an existing answer, except for a few byte-saving substitutions that have been added to the ...
caird coinheringaahin g's user avatar
2 votes
0 answers
71 views

Are compile-time solutions valid?

I have a couple answers here that work at compile-time and just posted another, and I was wondering if such solutions are allowed. I'm not talking about just proper functions that can run at compile-...
user's user avatar
  • 287
8 votes
2 answers
205 views

Should I upvote an answer based on how much it was improved?

Should I hold how much an answer's score increased/decreased (depending on the winning criterion) as an indicator of how good it is and whether or not I should upvote it? I used to see answers golfed ...
user's user avatar
  • 287
11 votes
5 answers
435 views

Why are some users so quick to jump on a bandwagon?

I've been lurking on this site long before I made my account, and I've seen many cases where people are downvoted simply because they post an answer in the same language as someone else and it happens ...
AdamS's user avatar
  • 325
5 votes
0 answers
139 views

For fastest-code questions are new compiler optimisations as non-competing allowed?

I looked around and it seems that the language is defined by the compiler not operational semantics. In normal code golf new languages are banned because of the loophole of implementing the answer as ...
just_floating's user avatar
12 votes
2 answers
253 views

Acceptable answer for a code golf

The Code Golf stackexchange tour gives a detailed explanation on, how to ask a Code Golf question. But what about how to answer? I have multiple questions about: How to give an answer?. Neither the ...
Hamza Ince's user avatar
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
2 votes
2 answers
78 views

Can I change the version of the language in my answer (Python 3 to 2), or do I post a new answer?

I wrote a Python 3 answer. I called it Python 3 in the title; however, it works equally well in Python 2. I discovered that I am able to remove several bytes from the answer, but only if I use Python ...
mprogrammer's user avatar
9 votes
1 answer
180 views

Adding a link to Try It Online to existing answers

If I find an old answer whose code I verified works using, say, Try It Online, can I edit that answer and add the link?
Lucas's user avatar
  • 109
6 votes
1 answer
218 views

what did I do wrong and how can I improve

why did they put this challenge on hold? How could I have made it clearer? Benjamin has N boxes in his garden with dimension xiyizi each. Because he does not want to let them out and get wet, he ...
Michalis Christofi's user avatar
4 votes
0 answers
191 views

Scratch 2.0 is no longer considered a "free" language. Does this retroactively make cops-and-robbers cop answers in Scratch 2.0 non-competitive?

As per this question's answers, Scratch 2.0 is no longer considered a "free" language. As per this question's accepted answer, non-free languages are allowed if marked as non-competing. Scratch 2.0 ...
Silas Reel's user avatar
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
5 votes
1 answer
184 views

Existence of known score but unknown exact code

Consider the following the challenge: Write a program that accomplishes X task while maximizing the number of distinct characters in your source code. Removing any set of characters from the ...
l4m2's user avatar
  • 20.6k
4 votes
1 answer
258 views

Does linter golf require a specific interpreter to be a valid answer for golf?

If someone answers a code-golf challenge in, for example, JavaScript, and as an additional challenge restricts to only code that is approved by http://www.jslint.com/ that answer is valid if an ...
trichoplax is on Codidact now's user avatar
7 votes
1 answer
130 views

Sorting answers

Some popular challenges have many many answers and often a language is used more than once, so : Is there a way to sort answers so that they appear in the order according to the name of a language OR ...
david's user avatar
  • 499
9 votes
3 answers
371 views

What should we do when a language cannot answer a given challenge?

Many challenges, mainly restricted-source, are impossible in some languages. Find an Illegal String is a good example—many languages without syntax errors, such as brainfuck (deleted answer), ...
ETHproductions's user avatar
25 votes
2 answers
688 views

Is it permitted for a submission to terminate merely with probability 1?

The question is in the title. I'm interested in submissions that terminate with probability 1 but have unbounded worst case running times. This is related to the question Do programs have to ...
ngm's user avatar
  • 4,304
10 votes
1 answer
215 views

Post other people's code?

Some people are very good code golfers but for their own reasons do not want to join PPCG. Is it acceptable to post their solutions as answers to challenges? If at all acceptable, I would personally ...
Adám's user avatar
  • 29.9k
4 votes
1 answer
137 views

What's the complexity of my answer?

I've never studied any computer science. So I've always passed over restricted-complexity questions, since I had no way of knowing the complexity of my code. Today, I decided to try and see whether I ...
msh210's user avatar
  • 3,423
6 votes
1 answer
186 views

Invalid answers in the review queue, but OP hasn't had time to fix it

It happens quite frequently that short answers (Title + Code) appear in the Low Quality review queue, due to the automatic flagging mechanisms. In most cases, the answer "Looks OK". However, there ...
Stewie Griffin's user avatar
-2 votes
1 answer
142 views

User disobeying rules?

So last question that I posted. i.e : this, I wanted to ask because a specific new user whom I have warned almost on all answer he has posted (5-6) was not following, yet he keeps answering with ...
Muhammad Salman's user avatar
5 votes
4 answers
107 views

Pointing out bugs without comment privilege

I found a bug in a code golf submission but do not yet have commenting privilege. Is there a polite way for me to let the user know about this bug? The site offers me to "suggest an edit" but I'm not ...
bubens's user avatar
  • 31
14 votes
3 answers
388 views

What to do when almost all answers are wrong?

In a recent challenge, almost all answers use an algorithm that yields the wrong results due to floating point errors. The challenge is/was not unclear, but there was no test case that led to the ...
Stewie Griffin's user avatar
9 votes
3 answers
250 views

Is it legal to submit a function that must exist as a method on an object?

For a challenge, I recently submitted the JavaScript solution [].push To be clear, this isn't x=>[].push. The entry itself ...
apsillers's user avatar
  • 3,702
27 votes
4 answers
638 views

Is a proof of impossibility allowed as an answer?

I was thinking of a proof of impossibility for a long-running unanswered question on this site. By a proof of impossibility, what I mean is a proof that no possible answer can solve the challenge. ...
Nissa's user avatar
  • 3,616
1 vote
0 answers
55 views

Is boiler-plate code required for challenges? [duplicate]

When solving a puzzle with an appropriate solution, does the programming language standard boiler-plate source code need to be included: For example, should I include all of this: ...
Aalawlx's user avatar
  • 191
17 votes
1 answer
446 views

What are the standard requirements for answering a [random] challenge?

There are lots of of challenges involving randomness. However, not all languages have a built-in method for randomness. Some languages, like python or most golfing languages make it really easy. You ...
DJMcMayhem's user avatar
  • 58.9k
13 votes
5 answers
523 views

Getting Started

I've been lurking for quite a while and have realized (after a technical interview) that I'm really out of practice solving problems like what is here. Is there a language that you recommend I start ...
Allen Fisher's user avatar
23 votes
11 answers
678 views

Are baseline submissions serious contenders?

One of PPCG's oldest rules, mentioned in What topics can I ask about here?, is that all answers to challenge questions must: Be a serious contender for the winning criteria in use. For example, an ...
Dennis's user avatar
  • 210k
12 votes
1 answer
342 views

Multiple answers in a single post

Is is acceptable to bunch together multiple answers in a CW post just because the challenge is trivial? See e.g. https://codegolf.stackexchange.com/a/151280/43319.
Adám's user avatar
  • 29.9k
3 votes
1 answer
97 views

Requiring non-builtin answers [duplicate]

Ever since PPCG was created, answers using builtins have been an issue for challenge writers. Sometimes, an interesting challenge can be posted, only for some languages (not necessarily golfing ...
caird coinheringaahin g's user avatar
8 votes
1 answer
196 views

What should be done about pre-posted Community Wiki answers that serve as a place for combining trivial answers?

Recently there was a challenge and the OP immediately posted a community wiki answer which would serve the purpose of combining trivial answers. Citing the answer: This community answer is for ...
Mr. Xcoder's user avatar
  • 42.3k
20 votes
2 answers
4k views

Command-line flags on front ends

Our standard policy regarding command-line flags states that one should count the space before the dash (-) too, when there aren't any "free" options, since it ...
Erik the Outgolfer's user avatar
11 votes
1 answer
361 views

Is a transliteration tool enough to grant count as SBCS?

Prompted by this. I'll speak about Dyalog APL here, but this could really apply to any language. Background Dyalog APL has its own SBCS called ⎕AV. For backwards ...
Adám's user avatar
  • 29.9k
9 votes
5 answers
490 views

Can interpreter flags causing major language differences be considered different versions of the language?

I recently (this morning) extended Cubically to have an internal cube of variable size. The cube size is passed via a third interpreter flag (3 for a 3x3x3, ...
MD XF's user avatar
  • 13.8k
16 votes
3 answers
1k views

Is a quine that reads a function's source a cheating quine?

So, in the last couple months, I have seen several (especially JavaScript) quines told that they are cheating because they stringify a function. Accordingly, I thought that was the standard - it's ...
Stephen's user avatar
  • 13.8k
0 votes
0 answers
28 views

Are modifications to existing languages allowed as submissions? [duplicate]

Say I have a language I'd love to use (like JavaScript for example), but there are tons of little pieces of functionality I'd love to modify built-ins with, like ...
Patrick Roberts's user avatar
27 votes
1 answer
362 views

Stop converting duplicate answers to comments

In case you didn't know, whenever you post the exact same answer as was already posted, it gets converted to a comment. I had no idea before I posted a crack on a cops-and-robbers post that someone ...
user avatar
38 votes
2 answers
884 views

Non-Trivial Answers get too few upvotes

It was recently brought up in chat that people are rewarded for trivial answers sometimes, which makes sense because this site is all about short code, but in other aspects, is bad because some ...
hyper-neutrino's user avatar
  • 41.3k
-1 votes
1 answer
201 views

What to do about BBC micro:bit?

BBC micro:bit is a piece of hardware wich allows to to run code, such as Python or Javascript, that is custom made for the micro:bit chip. However, it in itself is not a programming language. Instead,...
caird coinheringaahin g's user avatar
96 votes
5 answers
3k views

Let's allow newer languages/versions for older challenges

I've been thinking for a long time that our non-competing policy for newer languages (or language versions) is harmful. Just for context, we currently require all answers which require implementations ...
Martin Ender's user avatar