Am I allowed to edit the post to clarify what I think the OP meant (make it more clear what to do, make it code golf, etc.), or should I leave a comment/hope the OP returns to fix it?
I know we're against editing answers, but I can't remember coming across this for a question
if you think you can improve it, do so, and leave a nice comment, saying that you tried to adjust it to our standards, and that the OP should roll back/edit if he doesn't agree with the new version
I think I like the idea of putting the actual ideas/questions up on meta for people to see, but discussing in a chatroom (where we normally leave comments for the sandbox)
The response to the weekly challenge question has been a resounding "yes," so the next step is to decide how we'll manage the schedule. There'll be two simple parts to this, each taking one week:
Collect ideas for a theme or concept to base the challenge on, and choose the highest voted after a...
Yeah me too - there's about 960-something polyominoes and you might think (960 choose 9) is huge, but then again Sudoku's NP-complete too and the only reason that's tractable is because the problem size isn't very big
@MartinBüttner well, I haven't had this discussion, and I want to say that I feel like the game-theory aspects in challenges i've seen generally take away from it being a programming competition
Well as Lembik suggested yesterday, it could be something to do with the space needed by the structure. Or maybe it could be fastest-code on certain operations.
@xnor well... kinda... except a theme could be more general... I'd probably rather call it a vague idea (and I think I used the term "idea" in my meta post)
I don't know about zlib specifically, but there are certainly cases in LZ compression where ties must be broken, and there are zip tools which run themselves lots of times picking random choices to try to find the best ones.
I just tried to make a program that finds the shortest string literal to express a string in Python and now I'm totally confused
this would make a tough codegolf
there are 8 kinds of strings (single quote, double quote) X (single, triple delimiters) X (not raw, raw) plus the possibility of putting multiple string literals after one another
Python, 54 + 56 = 110 bytes
Counter:
m=lambda x:sum(y.isspace()for y in x)
+1
0<9or x.split()
Splitter:
m=lambda x:sum(y.isspace()for y in x)+10<9or x.split()
For the counter, we use the fact that Python is okay with having just an expression on a line. It's necessary to split up +1 and 0<...
Even if REPL was allowed (which I don't think it is, but you might want to ask Martin about that), I think your splitter would output the len and -1 wouldn't it?
But you still haven't answered my question about how the counter counts whitespace...
@TheDoctor I thought the definition was pretty clear. "whitespace" refers to individual characters. so unless stated otherwise, 3 consecutive spaces should be counted as three. I can use the second example for both parts though.
what's with the recent problem of people not understanding the whitespace spec... the first 11 answers were all correct and none of the last four were.
"Say you're in an elevator. I could do two things to you and you wouldn't know the difference. I could pull the elevator up with a rope and you'd begin to feel heavy. Or, I could replace the planet beneath you with a bigger planet and you'd feel heavy. Now most likely I'll do the first one. But you can't tell the difference!" ~ Dr. Ramamurti Shankar
That one was listed as a joke. I don't think it is very funny, but I do think it is interesting.
Ugh. There is a guy at my workplace whom I can't seem to communicate with. If I think the job needs to be done in SQL, he wants to do it in C#. If I think the job is suited to C#, he wants to do it in SQL. I can spend all day explaining, and he just responds with a series of illegible grumbles.
Wow. SuperUser has ads on every question. Why are they special?
I wonder when it will be time to refresh our community promotion ads. It looks like they always do that in December.
C, 56
main(){while(time(0)%43200);printf("\xF0\x9F\x95\x9B");}
Algorithm
Wait for the clock to strike twelve.
Print the UTF-8 bytes of CLOCK FACE TWELVE OCLOCK.
this answer works around the "print the current time" requirement by simply delaying until the current time is the only time it can print a correct answer for.
should this be disqualified somewhere as a [new?] standard loophole?