I almost always read over either spelling without noticing the difference, unless I'm editing someone else's post then I make a conscious effort to match the local spelling
@NathanMerrill "You want your submission to be a polyglot that performs the task in 3 different languages" I assume this was inspired by the recent polyglot that sparked a similar discussion, but just to be clear that one actually performed different tasks in the other languages.
The author includes arbitrary input validation because they think that it makes the answer more complete but this restriction doesn't make the answers more interesting at all (which is why we don't do input validation in the first place).
Which is why I think that the polyglot is a different discussion. ;) Yes, that one is interesting but it's so far removed from the actual challenge that if we allow it we basically have to allow arbitrary click-baity answers.
I mean, they still need to complete the original task, but yeah. I think that "click-baity" really doesn't apply here, as the the actual content is interesting, not just the headline
Stuff like that gets upvotes though (primarily from HNQ). Which isn't fair to answers that actually put effort into the golfing and explaining rather than into running their source through an ASCII art formatter.
I assume. Even if not, it's a trivial undertaking in most languages without significant whitespace. It doesn't belong in the answer, because it doesn't actually add any useful or interesting content to it, but someone who hasn't seen it before will likely thing it's a huge achievement and upvote it.
ok, so lets say there was a question that got on the HNQ, and somebody posted a generated ascii-art version of their code. Tons of people new-comers upvote it. That said, while many regulars would say "I hate this answer, its so boring", there's still clearly people who think that its interesting and indicated that this is stuff they want to see
I wonder if the tendency to vote on the answer content rather than its relevance to the challenge is amplified by the ability to send a link to a specific answer, encouraging the recipients to read the answer without seeing the challenge first
Downvotes do a good job of controlling interesting questions. We've had several times where users have posted uninteresting questions that were totally on topic, and got downvoted heavily
but the fact that they aren't frequent on the site shows that the voting works, at least to some extent
Ok then I'm not totally disrupting the flow here. Based on the upvotes Dennis' answer is getting, I think the community is confusing "serious contender" with "good golfer". You can be serious and bad at the same time. I think creating a list of conditions that posts have to meet in order to avoid deletion (and that's what will happen if Dennis' post remains highly upvoted) is a terrible idea, because it alienates newbies who were serious but are bad at golfing.
I think there are two separate questions here: Can serious contenders include extra things (in the code) that detract from the winning criterion? Can serious contenders include extra things (in the post) that aren't relevant?
@trichoplax we've had a couple of cases where a challenge was downvoted heavily by the regulars, but was so simple it got on the HNQ, and got lots of upvotes. While this isn't what we want to happen, its an exceptional occurrence IMO
Make a fake loader just like this :
Parameters :
Display loading (space) one of these cyclically-\|/ (space) (percentage counter from 0-100) then a %.
The percentage counter is supposed to increment by 1 every time the display changes.
The time taken by counter to jump to next iteration ...
@Rainbolt Dennis has a footnote for that, although I wonder if the rest of the post could be worded to avoid that confusion earlier. This is more about people setting themselves additional challenges not required by the spec - there's no problem with just being bad at golfing provided they clearly tried.
Case in point: on my first ever golf post, someone commented with "Ah, true! I also just realized you can also omit the ' ' from the split, bringing it down to 96 and beating the other python2 solutions." Does that make me a non-serious contender, subject to deletion? Of course not, and that's a ridiculous idea. That's best left as a comment suggestion, not a deletion criteria.
I can't actually prove this - you have to take my word that I was trying to be a serious golfer and win in the Python category
@trichoplax The question was about that, but the answer is definitely more than that. The question "Can serious competitors do extra stuff?" was met with "Here is a list of things serious competitors cannot do.", which really goes outside of the bounds of the question.
@Rainbolt I meant that the answer may appear to have the opposite meaning to intended, until the footnote is seen:
> or removed is directed at answers that fail this criterion deliberately or completely. We all miss a golfing opportunity every now and then, and a new user will naturally miss more golfing opportunities than an experienced one. In this case, the proper course of action is guidance, not threatening deletion.
@trichoplax "Can serious contenders include extra things (in the post) that aren't relevant?" I didn't realize this was an issue. What post is this referring to?
@Rainbolt No problem - it's why I think changing the wording would be better than relying on a footnote. I have a habit of reading footnotes at the point they are referred to, because I have a tendency to overlook them otherwise
@Dennis I find that much easier to read now. If the quote block is the proposed wording, how would you feel about including the clarification paragraph in the proposed wording too? I'm guessing out of the context of this meta discussion it will be even more relevant
Thank you for playing Making Fun's version of Dominion. Our license expires on December 31, 2016, after which our version of Dominion will cease to operate (see: Terms of Services).
A new version of Dominion is slated to launch on January 1, 2017.
This might seem random, but I'm adding a command to V that will add a space to the begging of the line and remove the first character after the first non-whitespace character. What's a good mnemonic for that?
3-way Polyglot Prime Checker code-golf
Make a program that checks if a number is prime in three distinct languages.
Two versions of the same language aren't considered distinct languages.
Standard loopholes apply
@Dennis I'm not sure I'm understanding your post, given your most recent comment. Are you allowing me posting a quick sort submission when a brute force would be allowed (and shorter)?
@Dennis I find it easier to read now, but I agree with xnor's comment that this seems contradictory to the definitions presented in the question. It feels like there's something missing. Maybe need to make more prominent that you're talking about strictly removing code, and not about swapping a loop with an eval?
Reading it again, the answer pretty clearly says what it means. I think the issue is just one of context where I expected a more expansive answer that addresses more cases.
Meanwhile, on the relevant answer on main I've gone with an absurd analogy which hopefully sums up my view:
I would not criticise a tennis player for not anticipating the opponent using a trebuchet, because a trebuchet is not permitted by the rules of the game. Similarly, a golf answer is not required to anticipate inputs that are not permitted by the rules of the challenge. — trichoplax4 mins ago
@xnor Perhaps that's where my confusion stems, too. Then, if that's the case, I wouldn't want this answer to become site policy because of its narrowness.
@NathanMerrill I'm ambivalent about that. If they clearly tried to golf initially, but don't want to make further improvements, I'd be inclined to call that a serious contender at the point in time it was posted. I don't want to commit everyone to responding to every comment on years old posts
I mean it depends, if thy are actively trying to not golf their code but if its like somethibg "I dont understand your further golfed code", thatd be OK
Hopefully people who add in extra code deliberately can be dealt with separately from people who don't want to update their answer every time someone comes up with an improvement
> I don't mean a few unnecessary bytes here and there. We all miss a golfing opportunity every now and then, and a new user will naturally miss more golfing opportunities than an experienced one.
@NathanMerrill Frequently I get tips and would rather not add then because I feel like it wouldn't be my own submission any more. Sometimes I'd rather be out golfed when someone else was more clever than me
I will never forget "change the 'spec's they are wrong"
Change the 'spec's they are wrong... I not change for me it is ok... All answer not code something on error case is inferior of just above code — RosLuPyesterday
@Dennis i think the bigger confusion is that people start off reading the question expecting a complete criterion, and you do clarify that, but readers are already confused by that point
@NathanMerrill For me, I have no problem if it happens to work in more languages. I only have a problem if making it work in an extra language makes it a non-serious contender in the first language
actually, about the last example, "Answers may choose not to take advantage of some "ugly hacks", such as terminating the program by crashing the interpreter," I could see someone saying that's morally like not taking advantage a "cheap" allowed input format, which is morally like validating inputs
If you're writing a polyglot for a challenge that doesn't ask for a polyglot your code needs fit the acceptance criteria in each language and should be scored/listed as the list of all languages used. (my opinion)
@NathanMerrill Python 2 and 3 can be pretty different or pretty alike, depending on the situation. If a solution happens to work in both versions, great; that's oftentimes the case for lambdas. But in all other cases, I see no benefit in having the shortest Python 2 solution, the shortest Python 3 solution, and the shortest Python 2 & 3 solution in three separate answers. If cross-version portability can be added by a trivial modification, just include a remark in your answer.
@trichoplax yes, there do seem to be a lot of edge cases, and situations where the judgment is obvious but it's hard to find a wording that leads to the right conclusion
@Dennis what would you say to a python program that uses a while condition to terminate cleanly without error, whereas it could be while 1 to terminate with error?
(because the writer thinks terminating with error is "cheap")
@Poke The main reason I think it would be better as a separate question is that the other examples can be met with "if the surplus tasks add bytes, it's not a serious contender", whereas a polyglot has other subtle questions like "which language does it need to be serious in, and how many?"
@NathanMerrill Yes, exactly. Code golf is about finding the shortest code in each language, not the shortest code in X different languages. We have polyglot challenges for that.
@Poke I wondered about this. I would think that would require writing an interpreter than gives an error if the code would give an error in any of the languages, which would then make the conglomeration of languages a language by our definition. I still don't want to see such answers, but it seems like a dedicated question would allow discussion of these extra possibilities that don't seem relevant to the current discussion
Just added an example to my Sandbox post is pretty massive. 1234/789 goes to a very large fraction because 1/789 has a very large periodic part. See it here meta.codegolf.stackexchange.com/a/10842/47581
@NathanMerrill That happens with Bash answers all the time. It's not uncommon to see a "pure" Bash answer and a Bash + coreutils answer to the same challenge, and there's nothing wrong with that.
@Geobits What are you talking about? My language has always had this one-byte command to do (exactly what the challenge is asking) -- it's just never come up until now.
I had thought about that in the past. You could create an interpreter that only accepts encrypted code, and not release the key. Nobody but you would be able to write code in it.
I'm gonna write an esolang that has exactly one function, c, that takes a single parameter - the ID number of a ppcg challenge -- and always outputs the correct answer. that is the spec of the language.
I'm having trouble writing to a database from php in html. I'm a new user so my syntax is probably off. [Be nice - if you can't, or don't want to answer my post please move on. If the most help you can provide is to tell me to RTFM then please find a better use of your time. Nasty posts will be f...
You're given a non-empty list of positive integers, e.g.
[6 2 9 7 2 6 5 3 3 4]
You should rank these numbers by their value, but as is usual in leaderboards, if there is a tie then all the tied numbers get the same rank, and an appropriate number of ranks is skipped. The expected output for th...
I was just thinking about making a language where it takes the code and evaluates it in both python 2 and python 3, and outputs something iff they both match
but then I thought of expanding that into "take two language names and code, pass them to TIO's server, and return a value if both of the outputs match"
then you'd have an effective make-any-challenge-into-a-polyglot language
@NathanMerrill that's a matter of debate; if it gives enough room to let you write an interpreter for a Turing-complete language, some people count it, some people don't
I hate to bring up work but I'm pretty stuck: I keep getting random "connection reset" errors on a website I'm serving locally.
have any of you run into this?
its on totally different requests, and started happening only recently. (also, when it happens, all requests that I've made to that site are reset at the same time)
"but he was talking about 10 dimensions. how do you imagine things in 10 dimensions?" "easy, let n = 3, and imagine things in n dimensions. then, let n go to 10."
An engineer, a mathematician, and a computer programmer are driving down the road when the car they are in gets a flat tire. The engineer says that they should buy a new car. The mathematician says they should sell the old tire and buy a new one. The computer programmer says they should drive the car around the block and see if the tire fixes itself.
@noɥʇʎPʎzɐɹC not sure what you mean? But for starters, if one of your homeworks fails to compile, you get a 0 for that homework, which instantly knocks 6 points off your maximum achievable score in the class.
A doctor, a lawyer and a mathematician were discussing the relative merits of having a wife or a mistress. The lawyer says: "For sure a mistress is better. If you have a wife and want a divorce, it causes all sorts of legal problems. The doctor says: "It's better to have a wife because the sense of security lowers your stress and is good for your health. The mathematician says: " You're both wrong. It's best to have both so that when the wife thinks you're with the mistress and the mistress thinks you're with your wife --- you can do some mathematics.
This is a 200-level class, although the professor does complain that this class shouldn't really be the weed-out class that it is (as a third semester class).
@TuxCopter It's not going to end any time soon. Many cultural icons were part of the 40s-50s baby boom and are getting up there in age. I'm guessing the next decade or so will be similar.
PowerShell v2+, 86 bytes, takes input as a string that looks like a PowerShell array -- param($n)$a=$n-split'[^\d]'-ne''|sort{random};-join($n-split'\d+'-ne''|%{$_+$a[$i++]})