@Sp3000 @rcrmn I'm curious how you guys are solving D Are you simply testing for a bunch of different cases, or are you iterating through the different pieces?
@Sp3000 Exactly this: I check for the area to be multiple of x and then check that r and c meet the constraints, mainly that they are greater than some number
If I find a part of a solution to a challenge (not a full program or implemented code, just an idea for what could be possible), is it OK to post that in the comments of the challenge?
@ChrisJester-Young If I find what seems like a good solution (or part of one) for a challenge, but not any actual code, can I post it in the challenge's comments?
@ASCIIThenANSI I'd say giving suggestions for how to complete a challenge is fine in comments, especially if the challenge is particularly hard or does not have many answers. If you want to post an entire block of code then you should probably link it, e.g. "Here's a pastebin of my attempt.", or even discuss it in chat instead.
@Doorknob I think of Flatland when I think of mods. Normal users see the site exist only in 1 or 2 "dimensions". Mods see 3. Devs must see 4...
@Doorknob I reassociated so that I'd stop getting these strange questions, but unfortunately, the system now treats it as an OP accept (since that's what it is) and so it's no longer floated to the top. D'oh.
Identify an "Identity" BrainF*** Program
Your goal is to write a program or function that takes a string representing a BrainF*** program, and prints or returns a boolean value (or your language's equivalent), identifying whether the input program was equivalent to an identity operation or a NOP...
@Doorknob Yeah, the comment can't be reassociated, sadly.
I should nuke the comment to avoid confusion, since Martin can indeed upvote it now.
@Doorknob Curious, when you look at the post history, does it show all my crazy shenanigans? I know it shows it for dev and doesn't show it when I view it in an incognito window.
and I'm sure as hell not going to downgrade my account just to test it out. ;-)
Somehow, I'm the only one who can tell how awful I am. :)
I bought the thing a month ago, not having playing one in 10 years. So, I'm riding on talent rather than skill, per se.
Apropos of nothing. That's what's going on with me.
More programmatically, I taught inca3 to do currying like J does.
` (2&+)⍳9 9 # 2 3 4 5 6 7 8 9 10 `
So, I'm pretty thrilled about that. Nowhere near being a complete language, yet. But I'm very pleased with the code that's written. 1400 lines of dense C.
It's probably closer to 10,000 if written in a normal C style. But it's easier to navigate a small file.
@ChrisJester-Young I actually found D easier than B and C... but looking at the results, apparently loads of people failed the large set.
@NathanMerrill @rcrmn @Sp3000 if you're interested, I also just hardcoded all special cases for D:
n, w, h = line.split.map &:to_i
min, max = [w, h].minmax
winner = 'GABRIEL'
if (w*h) % n != 0 ||
(n+1)/2 > min ||
n > max ||
n > 6 ||
n == 6 && min == 3 ||
n == 5 && min == 3 && max == 5 ||
n == 4 && min == 2
winner = 'RICHARD'
end
the first one is simply if the grid can be partitioned into N-ominoes. the second is if Richard can fold the shape into an L that is too wide on either side to fit along the shorter dimension. the third is if an straight polyomino can fit along longer dimension. the fourth is if Richard can choose a polyomino with a hole. the other three are special cases, in which Richard can choose a polyomino which separates the grid into two regions which are not multiples of N.
@MartinBüttner btw B was actually really easy once you thought about it the right way
Rather than trying to split stacks all the time by introducing more plates, it's easier to think of it as adding an extra diner to help finish the same plate
I did C small by constructing the string and traversing in one passing, checking whether at some point I get i, at a later point I get k (= ij) and at the end I get -1 (= ijk)
I was too lazy to think about how to handle the repetition :P
I first tried 12, but that failed. basically, 4 repetitions always give unity. so if i took more than 4 repetitions you could also find an i by removing four repetitions. same for j and k. so that gives you 12 as an upper bound.
however, when you omit repetitions, you also need to make sure that those are unity, otherwise they'll mess up your k
Connecting letters
code-golfascii-artconnected-figure(weird tag but exists)
You should write a program r function which receives a block of chars represented as a string and outputs or returns a similar block as a string in which the letters adjacent in the alphabet are connected.
A visual exa...
@orlp "Exceptions are the possessives of ancient proper names in -es and -is, the possessive Jesus', and such forms as for conscience' sake, for righteousness' sake. But such forms as Achilles' heel, Moses' laws, Isis' temple are commonly replaced by "the heel of Achilles", "the laws of Moses", "the temple of Isis""
There are situations where use of the Oxford comma will make or break a sentence.
Choose a style and be consistent. When you run into a situation in which your choice suggests a misinterpretation of the sentence, rewrite it in another manner to avoid the confusion.
Consider these two pairs whe...
@ChrisJester-Young Yes, I'm aware of that example. That's why I meant, I don't think the Oxford comma is a bad idea, I just don't like it because of habit. ;)
Finnish was first written using the typography and spelling rules of Swedish, German, Latin and who knows what else. At some point it was decided that creating consistent spelling rules from scratch would be a better idea.
Back in the Windows 3.0 (or perhaps even earlier days), the upper-left corner brings up the "system" menu. A shortcut was to close the window by double-clicking it, because it predated the Windows 95 convention of the top-right close button.
I occasionally find that important tags are missing tag wikis or have only very rudimentary information in them. At the same time, I often find it hard to write good tag wikis.
The challenge-type tag wikis don't seem to have that problem - I think they are all fairly decent:
code-golfcode-chall...
@JoeZ. yes, I've created a new rational numbers tag. yes, you have quite a few questions this tag is applicable, too. no, you don't need to retag all of them now. ;) (I've got a list of all applicable questions I could find, and will go through them myself slowly.)