@MartinBüttner Assignments aren't permitted inside expressions and none of the expressions in f are stateful. It doesn't matter what order the arguments to the ternary operator are evaluated.
I've fixed the mod function and shift function names. Good catches.
I'd originally wanted to make the challenge language-specific, but PPCG seems to come down on language-specific challenges like honey badgers on a rock python. There seems to be an unwritten consensus that language-specific challenges are tolerable only when absolutely necessary.
I suppose it wouldn't be too hard to come up with my own C-like language for the challenge with a code snippet as an interpreter. Is that what you're suggesting?
@MartinBüttner Regarding using bounded datatypes: You're correct that it's impossible to return proper results using bounded datatypes. I allude to this in the "Variables and Data Types" section. As I'd envisioned it, bounded types would be allowed subject to the restriction that if they were replaced with unbounded types, they would return the correct outputs for any finite outputs.
Basically, I wanted people to be able to use simple expressions like A*B + 3, etc., which are impossible to implement as big integers in most languages. I suppose if I implement my own programming language for the challenge, I can just make all integers unbounded and avoid the complicated disclaimers.
i think people are in part hard on language-specific challenges because some people golf in it and others don't, but making your own specified mini-language avoids that
@COTO You're basically doing atomic code golf, in which case I feel that not limiting it to a single (made up or existing) language is more harmful than being language-specific. So I wouldn't say "tolerable only when absolutely necessary", but "tolerably only when there's a good reason for it". And the strictness of your rules is a pretty good reason to me.
@BetaDecay That's been a thing for at least as long as I've been an active member (i.e. this year).
@overactor ah yes, that would be neat, too
I've added a few issues to the GitHub with feature requests for the spec
I'd also like [[ to print a marble without consuming it.
@Optimizer I agree that xnor's answer is the most creative (which is why he gets the bounty). But I do think that the newer median-of-3 submissions (with reduce or without) are also quite clever. And I'd rather see the checkmark go to Peter's original solution than Timtech's port of xnor's solution.
@MartinBüttner TBH, pairwise minmod already existed there. xnor's first answer was a reduced pairwise monmod only, even my CJam answer is that now. Just that sorting was not allowed, so there were other ways adopted to perform the same task.
@MartinBüttner off-topic, do you know what flawr's first answer was ? in revesion, it only shows from the second revision
CJam, (58 x 2) * 52% = 60.32
{`"_~"+"Ks_W%erS-N/~EE)+S*_"{
}`S-,3-!\"@]Y/{0(%}%N*"+*~}_~
which prints
{`"_~"+"Ks_W%erS-N/~EE)+S*_"{
}`S-,3-!\"@]Y/{2(%}%N*"+*~}_~
The non-space...
@Rainbolt Ah. I've never seen one of those diagrams. And I'm glad you explained the issue with your product owner since I'd otherwise have been scratching my head wondering what I was misunderstanding about the graph.
@Optimizer I've accepted some rather long Java answers when the problem was so difficult that it was the only answer I got. You can't really delete the guy who is winning.
Was the answer you linked to supposed to be an example of a funny answer that got upvotes because it was so bad? Because the one you linked to has zero...
If we have something on meta that says "delete noncompetitive answers", it needs to be updated to say "but don't worry about answers that fall into a grey area, because maybe the author is just bad at golfing."
If there is something like that, I can't really find it. Even the code-golf tag wiki has been changed. It used to say something like "...at a minimum, this includes removing whitespace...", where now it just has a list of standard methods.
CJam has a really annoying bug where backslashes in the string representation of a string get doubled even if they don't need to be escaped... it makes quining a lot harder...
@MartinBüttner #Quinning is a Twitter hashtag used to highlight photographs and stories in which various problems have been resolved through one’s sheer physical strength. The slang term is named after the U.S. Olympic bobsledder Johnny Quinn who became internet famous for busting through a door to free himself after getting locked in a bathroom at the Sochi Olympic Village in February 2014.
I've got a 38x2 byte version of my second quine submission now, but it only works in one direction... and whatever I try to add support for the other direction, it blows up massively
{`"_~"+"N/{19/W%}"{
}`'+#)!\"%N*"+*~}_~
instead of removing all spaces and then adding spaces based on 0 or 2 in the code, I tried to simply split the lines in two, and reverse the halves, which doesn't require any other change in the code
Partial Ordering of Regex Patterns
code-golf regex
For the purpose of this challenge, we say that a regex pattern matches a string if the entire string is matched by the pattern, not just a substring.
Given two regex patterns A and B, we say that A is more specialized than B if every string t...
It would make sense if they were talking about the hymn, too, since it's often referred to as "The Gloria", even in English. I... didn't get that from the context, though ;)
I'd just like to know what other people see when something is flying at their face. I mean, if I have no depth perception and I can still figure it out, it must be downright scary for others. Plus, 3D movies and stereograms work just fine for me.
Personally, I thought the test was a bit odd. It was basically a stereogram in a hooded scope. You were supposed to say which of the circles were raised above the others.
the density of taste buds doesn't follow a normal distribution, but apparently humans are clustered in 3 regions... about 50% have a "medium" density, and 25% each have a significantly larger or smaller density (those numbers are completely made up right now).
which really makes me wonder which of those groups I'm in...
I'm pretty sure I read that taste buds vary wildly based on eating habits and loads of other environmental factors over the course of your life. But you could surely test density at any given point in time.
> It is also possible to make a reasonably accurate self-diagnosis at home by careful examination of the tongue and looking for the number of fungiform papillae.[18] Blue food dye can make this easier.
I'm pretty sure I'm not a supertaster. I like every single item on their list of foods that they tend to avoid. But that makes me happy, since those things are delicious.
Except maybe grapefruit juice. It's okay, but there are much better juices out there.
@Timtech yes, but I actually meant xnor's answer, because yours was posted after the rule change ;) (and honestly, he does deserve credit for the idea)
true, but I don't really feel like spending 100 of my rep to reward you for beating xnor by taking his idea and golfing it down further in a tokenised language ;) ... I hope you can understand that
"Tom: I speak English. Therefore, I am English. Bill: Americans and Canadians, among others, speak English too. You are incorrect. Therefore, you are not English."
but yeah, what I like about confirmation bias is that it requires the victim to actually think in the first place - I may or may not be facing money problems soon because of confirmation bias, obviously it will only have been a problem is the outcome isn't good in the end
"Many people think that, since they're going to be doctors or something, they're never going to need to know about relativity. Well what if one of your patients starts running away from you at the speed of light? Then you really need to know this." ~ Dr. Shankar
Do you guys know Existential Comics? It was never as good as the very first instalment (which is pretty amazing), but it did have a few funny ones... including... FALLACY MAN ... existentialcomics.com/comic/9 and existentialcomics.com/comic/21
"Lois Lane believes that Superman can fly. Lois Lane does not believe that Clark Kent can fly. Therefore Superman and Clark Kent are not the same person." So that's why it's so hard for her to figure out.
@Doorknob I think you need to clarify step 2 a bit
do I do one swap for each pixel? or do I swap each pixel only once?
that is, does for (x in width) for (y in height) { otherpos = randomchoice(nearpixels(x,y)); swap([x,y],otherpos); } satisfy the spec or not (because it will swap most pixels more than once)
@MartinBüttner Sorry, I've been trying to make sense of this Mathematica documentation but I can't understand it. :P It doesn't directly apply a blur, so it should be fine.
@MartinBüttner Locations outside the image boundaries aren't pixels, so ignore them. The question only says "average R, G, and B values of all pixels within a Manhattan distance of n pixels"
@PeterTaylor Don't you already know I don't believe in the sandbox? (Also, the comment system seems to have worked just fine; no need for an entire sandbox post.)