last day (15 days later) » 

5:02 PM
0
Q: Flip a coin for me!

SIGSEGV Note: There was not a vanilla challenge to actually flip a coin, even though there were mentions about flipping coins a lot of places. Even though there is a challenge to generate a random number from 1 to N, I suspect this is not a dupe. These questions ask for random numbers from 1 to N, whi...

 
So basically output a truthy/falsy value with equal chance, right? Or does the challenge need to be taken literally and my code must actually flip a coin? :P
 
@ETHproductions correct.
@ETHproductions Yes, I'll also edit my question to clarify.
 
@SIGSEGV You should indicate that the coin is unbiased, that is, each outcome should be equally likely
 
If it is not truly random is it not biased?
 
@fəˈnɛtɪk We assume any random source is not biased.
 
5:02 PM
So you're worried about your coin being biased... but not our entries? ("It does not have to be uniform" basically means "It can be biased")
 
@ETHproductions Yes, I am relying too much on this community that I don't worry what I have to on here
 
This is not a duplicate of the linked challenge. The linked challenge has the rule: "Any arguments when calling a built in or library random function must be constant. That is they must be completely independent of the input value." This one has not.
 
Anonymous
@KarlKastor Removing restrictions doesn't make it any less of a duplicate. Per our policy on duplicates, if a trivial change allows answers from the other challenge to be competitive, it's a dupe. Fixing N = 1 as input in the other challenge is a trivial change that would make those answers be competitive. Ergo, it's a dupe.
 
@Mego: An answer to one challenge isn't competitive with an answer to the other. The other challenge requires allowing a variable n but hardcoding the range of the RNG; that adds extra complexity which means that a good answer to that challenge would be suboptimal here. Going the other way, a good answer to this challenge wouldn't meet the spec of the other challenge.
 
Anonymous
@ais523 We aren't concerned with optimality - just competitiveness. If answers to the other challenge could be trivially modified to be serious contenders, then the challenge in question is a duplicate.
 
5:02 PM
@Mego: Look at, e.g., the shortest answer from the other question. If it were submitted here, I'd be downvoting/deleting it on the basis that it contains obviously unused code (the factorial commands). In other words, I wouldn't call it a serious contender to this challenge. Similar arguments apply to most of the other entries.
 
Anonymous
@ETHproductions You didn't read it correctly. within its set of choices for language(s), algorithm(s), and/or other relevant categories for the challenge.
 
Anonymous
@ais523 Consider this answer. No change would be necessary to the code - it would just assume that 1 is stored in eax.
 
@Mego: Using the same algorithm as the answer I linked, I can solve this challenge in 4 bytes: 2X%2. Writing ⁴!! is a clear waste of bytes when solving this challenge (although necessary in the other challenge). As such: it isn't a serious contender to this challenge.
@Mego: That answer also isn't competitive in this challenge: it is also obviously golfable, because the loop is unnecessary to solving this challenge. Anyway, that's beside the point: by your reasoning, most challenges on PPCG are duplicates of this one, because you can take a solution to that challenge, give it a hardcoded input, and get a solution to most other challenges. Sure, there are probably better algorithms, but you're implying that that's unimportant.
 
@Mego You are correct; I apologize for not being careful to read the full post. However, I respectfully disagree somewhat with your reasoning, for reasons ais523 has pointed out.
 
Now instead of being a duplicate of what I had originally pointed out it is now a duplicate of this question
 
5:02 PM
"It does not have to be uniform" and "Chances for heads/tails must be equal" seem contradictory to me.
 
@fəˈnɛtɪk: I actually agree with that, I checked several answers to that question and they seem to be equivalent to the corresponding answers to this question but with a hardcoded 2. I'll go place a dupe vote.
 
For the record, I also don't consider this a duplicate of Lembik's challenge. This is exactly the situation that I meant to prevent with requiring answers to be "competitive" in my cited meta post. Also I think there will be a much stronger overlap in answers with this challenge, but that ones even looser, so again I wouldn't consider them duplicates.
 
Possible duplicate of 1/N probability
 
@ais523 I am actually unsure if that is the case.
 
5:28 PM
I don't see how this is a duplicate of the 1/N challenge. By this logic, the vanilla Hello, world challenge should also be closed as a duplicate of the more complex hello world challenges that came before it.
 
@MikeBufardeci pick one
many of them are closed
and your argument is weak without pointing one out specifically
also i think most of the discussion here has moved to TNB
 
 
1 hour later…
7:03 PM
@Poke I think you missed my point. Why isn't the vanilla one closed since it is the analog to the current "flip a coin" challenge. It's a stripped-back version of those other challenges and the answers for those other challenges work in the vanilla challenge.
 
7:24 PM
I think it would be clearer what you're trying to say with a concrete example
 
I could come up with a "concrete example" but it would be the same for all of them. Find a challenge tagged that predates this challenge. Take the arguments people are making for closing the coin-flipping challenge and apply them to the challenge I linked to.
 
So for the sake of discussion let's take this one: codegolf.stackexchange.com/questions/15417/hello-world-window
You're saying that a vanilla hello world is a duplicate of that
 
I'm saying that the arguments for closing the coin flip challenge as a duplicate of any "generate a random number" challenge also apply to the vanilla hello world challenge and the other hello world challenges
 
I think this ties into what I said to ais earlier
let me find the message
> @ais523 So are we closing questions based on how the answers might be golfed or based on what the challenge is asking a user to do? If it's based on potential answers then what you're saying makes sense. If it's based on the question alone, that's a dupe.
I believe PPCG's rule is centered around answers
as of now, anyway
for the particular example i linked the interesting part of the challenge is printing text to a window
 
Right, and since answers to older hello world challenges would work in the vanilla one, it should be closed as a dupe by that argument
 
7:33 PM
which just based on the question itself is a trivial change from just printing text
so in that sense i agree
i think what makes it distinct "enough" is that a "print this text" challenge is going to be to stdout 90% of the time
so forcing someone to print text in a window is going to have significantly different kinds of answers
in some cases i feel like it ends up being the will of the person who close votes it
since there isn't a set of criteria we can point to so as to say one question is a duplicate of another
 
Okay, so how about any other hello world challenge where the output is a string. Those can all be used in the vanilla challenge, and that challenge was not removed as a duplicate. In fact, it has 267 upvotes and 80 stars. But it's the same as this coin flipping challenge
 
codegolf.stackexchange.com/questions/307/obfuscated-hello-world this one is restricted source which adds different winning criteria. The answers would still work in a vanilla challenge but they would not be optimal in terms of golfing
small tweak on the original
but not "trivial"
 
So it's exactly the same as this coin flipping challenge and the one it was closed as a duplicate as. The answers for the older challenge would not be optimal in the coin flip challenge but they would be valid.
 
many of them are trivial changes
consider a simple java example
String printLine(String lineToPrint) {
  System.out.println(lineToPrint);
}
in this example we take a parameter and print it
 
It doesn't matter, as those older answers are not competitive in the new challenge, just like with that hello world challenge
 
7:42 PM
String printLine() {
  String lineToPrint="abc";
  System.out.println(lineToPrint);
}
in this one the string is hardcoded
 
So it's okay to close this challenge because the changes would be trivial, but not the hello world challenge? I really don't follow your logic here.
 
i by no means have the authoritative answer on this one
just trying to piece together what other people are saying
it may also be that "Hello World" is an exception as a special case program
 
I know what other people are saying and I'm disagreeing with them.
Honestly I think it's because the Hello World challenge was posted by a mod and the coin flip challenge was posted by a newer member of the community, I don't think it's because hello world is a special case. There shouldn't be special cases.
 
well that's what i've got for you... it's a fine line between trivial modification and duplicate. it's generally up to whomever is handing out the close votes
 
At least, it seems like there aren't special cases on this site at all, I don't know why there would be a change now
It's frustrating that your five reopen votes can get overturned by one close vote and zero discussion.
 
7:46 PM
i'll agree with that
 
And then you can't re-reopen it
 
If that happened to me, I'd take it to chat
since people are always in there
 
I figured that's what this room was for. People in the other chat seem to have moved off it a while ago and I can't find the relevant messages there.
 
it was
not sure why everyone left
if you @tag someone they will get a notification in here, though
so if you had a specific question for someone, that'll do the job
 
I don't want to call out all the people that voted to close, that seems... hostile
Just like I think voting to close the hello world challenge is hostile even though it should be closed now that this challenge is closed.
 

last day (15 days later) »