« first day (1406 days earlier)      last day (3453 days later) » 
00:00 - 18:0018:00 - 00:00

12:49 AM
0
A: Sandbox for Proposed Challenges

xnorDraw a bowling formation code-golf ascii-art Your goal is to draw ASCII art of a formation in ten-pin bowling where only a subset of the pins remain. The formation of all the pins looks like this: O O O O O O O O O O Pins are labelled from 1 to 10 like this: 7 8 9 10 4 5 6 ...

 
1:45 AM
@xnor @Sp3000 it is done
 
What's done?
 
that's a link
 
@xnor Bonus follow-up bowling question: Is this configuration a split?
 
how is a split defined?
 
Ahaha right, just woke and my eyes are blurry
 
1:56 AM
@Sp3000 that's probably too simple a lookup table
 
There's a lot though... but yeah definition would take working out
 
@xnor 7+6 or 7+10 but no 4,5,8,9
(or the mirror image)
 
Hmmm on the one hand the extraction method in the last step is nice, but on the other hand the puzzle could have been nicer :/
Makes sense though
 
I did clear a 6-7-10 once ^^... and that in the most ridiculous way... the ball hit the 6, but missed the 10... the pin flew over to the left to knock over the 7, and bounced back to knock over the 10 ^^
 
Ahaha nice
Oh polyominoes is out, and a votes came fast
 
2:00 AM
yeah, I'm quite surprised
if it also got answers now, it might make HNQ :D
 
... maybe I should post my ultra slow code
:D
 
@Sp3000 it would be a starting point ^^
 
(you saw nothing!)
 
btw, I'll probably write up another spec draft tomorrow: generate paint by numbers ... paintings... given an image, a maximum palette size, and maximum number of cells, return a paint-by-numbers template fitting those parameters, along with the coloured in version (I might cut the actual template, because it adds another potentially boring component of having to position the numbers in the cells)
 
btw did you want to use the anticlockwise = inside explanation somewhere?
 
2:09 AM
I figured with the pictures and the colours it's clear enough, no?
 
Is this paint by numbers as in picture with numbers in each gap and each number corresponds to a colour?
Or nonograms?
 
the former
 
Ah k, checking cos the latter's been done
 
yeah I know
 
(I don't like how they call it that :/)
 
2:11 AM
which one?
 
Nonograms being called paint by numbers
 
ah okay
I didn't know they were
well, I should sleep
feel free to post your Python solution if you get it to meet the input spec (I promise to download PyPy to benchmark it ;))
 
Ahaha thanks, I'll see what I can do to make it better first (might be hard seeing I didn't exactly write it with the intention of being fast :P)
 
I mean you can always stop searching when you can't reach N(A) - N(C) = 4 any more, or when the sum of the remaining rods is less than the manhattan distance to the origin
should probably not be a massive speedup for the large test cases, but maybe not bad for the smaller ones
 
Hmm will see, I'll start by making everything start with "R" first :P
 
2:17 AM
heh
alright
well good luck... talk later...
 
k :) night
@MartinBüttner Er... you said comma separated, by the actual tests are space separated?
(also Manhattan is a very quick and easy speedup, thanks)
 
 
6 hours later…
8:15 AM
@FryAmTheEggman online ?
 
 
2 hours later…
10:06 AM
hi all
 
10:46 AM
@isaacg Hi
@isaacg Any idea why s_m@_JxJdT won't work in that code, instead I had to use jk_m@_JxJdT
When I use s it gives index out of bounds exception.
 
@Sp3000 fixed
@Sp3000 I suppose that works even better if you follow Sparr's suggestion by shifting the centre of mass to the left as far as possible
 
11:02 AM
Hmm btw what was the reason behind #As - #Cs = 4 again? Is it possible to have more or less? (Haven't really thought about it)
 
@Sp3000 no, you need to turn left 4 times to make an anticlockwise traversal around the polyomino... and every time you turn right, you cancel one left turn
also I think the paragraph about rotational equality could use a phrase that you're checking all cyclic permutations
 
Hmm k
Centre of mass eh...
Oh oops left that out... I'll put that in later tonight (on my phone)
 
@Sp3000 it's only a linear-time operation, so...
btw, looks more like N=15 on my machine... took 3:38:247
 
@Optimizer In that case, you're attempting to sum an empty list, if string you're mapping over is empty. s doesn't know whether you want an empty string back, or 0, or what.
 
(I should really rewrite that function anyway, atm it's quadratic)
 
11:07 AM
Ah, yeah, many of the strings will be empty..
 
oh wait, I was already testing N=16
 
N=15? Well I guess different machines/environments :P
Ahaha k
 
@MartinBüttner you were planning on code-golf version of that question too, right ?
 
@Optimizer I decided not to do that
 
@Optimizer seeing that question, I'm adding a translate function to Pyth.
I've even got a variable name open for it
 
11:09 AM
@isaacg e ?
@MartinBüttner <sigh>
 
No, W. Needs to be a 3 input function.
 
@isaacg sad that I won't be able to use it in that question though.
would've saved 3 bytes
 
@Optimizer Don't worry, I'm planning for more bioinformatics :) (if I can come up with anything)
 
@Sp3000 not all of them would require translations
like the previous one did not
 
11:19 AM
hi
oh god, someone's gonna star that
 
Ahaha true :P bioinfo's a wide area I guess
 
How does Peter come up with all non-obvious algorithms.
 
I have a dozen longer ways of producing the list of substrings
It took a long time to beat the first approach I tried, which was a double fold: {}{(;}/{{}{);}/~}%
 
how much long is that in the code u posted ?
 
That's been replaced by .]),{{..(;\);}%}*
 
11:25 AM
oh, that is still longer than CJam q:Q,,_m*{~Q<>}%
 
Ah, but it's also doing the sort
 
length based sort
?
 
BTW you can save a char in CJam by moving the sort, sorting in the other order, and using #
 
sorting in which other order ?
 
Instead of {,}$ use {,~}$
Then # will find the longest rather than the shortest
 
11:29 AM
Are you sure ? # operates on 2 operands
 
# is the equivalent of GS's ?, I think. So
q:Q,,_m*{~Q<>}%{,~}${_"ACGT"_W%erW%=}#
 
# is indexOf
oh that hash
 
Oh. It's called find in the CJam docs
 
We have to use = not #
 
@Optimizer = takes a block? o.O
 
11:40 AM
0
A: Sandbox for Proposed Challenges

Martin BüttnerPaint by Numbers popularity-contestgraphical-outputimage-processing Your task is to generate a paint-by-numbers version of a given true colour image (that is, not a template for paint by numbers, but what the image would look like if it was already coloured in). Along with the image, you're giv...

 
@MartinBüttner takes a block what ?
 
"=" takes a block?
 
{}= get the first array element which matches the criteria
like {}# gets the index of that first array element that matches the creteria
 
yes, that makes sense, but I didn't know that was possible
 
what's the use of knowing if I didn't use it :/
@isaacg is there a find-by , like order-by ?
(as compared to x and S)
 
11:52 AM
No, there isn't. What would it do?
 
find-by implicit lambda returning true on the first array element
equivalent to hf
 
Usually, I don't include things that only save one character.
Except when used very often
 
yeah, now that I see that hf does that.. I also think the same
 
That's why there's no min and max, for instance.
 
12:11 PM
How do you do min in less than $0=? Or is the point that it would be an mX operator for some X?
 
min of array is that only
@PeterTaylor Pretty sure that CJam translation of that is going to be longer than GS
you can't do bitwise operations on characters directly
 
min could also be :e<, if the infix operators weren't so buggy :/
 
12:29 PM
Its exactly the same size and suppper slow
 
it should in principle be faster for large arrays... fold is a linear operation, sorting is n log n. practically I can imagine that the overhead of the fold outweighs that significantly for reasonably sized arrays
 
he said his first approach was fold
this one is just super exponential
 
I'm just talking about :e< vs $0=
 
oh, I was talking about the translation of GS to CJam
 
ah okay
 
1:16 PM
okay, I think the paint by numbers spec is ready for review
 
why graphical output :(
CJam can participate
you hater...
 
lol
I'm sorry that CJam is the only language you know :P
 
only golfing
 
it's not a code golf though...
also, if I was doing a graphical output code golf, it would be flexible enough to let CJam participate
 
(time to fix my stupid cyclic permutation code... I forgot about the B in A+A thing)
 
1:21 PM
@Sp3000 hm?
 
A,B are cyclic permutations if B is a substring of A+A
 
yes
but wasn't that what you were doing anyway?
 
Nope :/
(Silly me)
I think this might manage N=17
But will see with 16 first
 
I'll go grab some food and rerun the tests later
 
1:44 PM
Ahaha k, might take a while before I post though
 
1:55 PM
k updated
N=16 just saved 2 minutes, N=17 still takes too long unfortunately (6 and a bit minutes)
 
time for micro optimizations
 
:P I think the next thing for me to do is to make my self-intersection-checking not stupid
 
2:10 PM
not stupid is always better than stupid
 
Not if you need cheap unskilled labor :P
 
lol
what do you guys think about a graphical "inverse kolmogorov" challenge? given a favicon of an SE site return the name. it's probably trivial for the graduated ones: I'm sure there is a pixel that has a different colour for each of them. but the beta sites should make it interesting.
 
Yes, interesting idea.
 
Nice idea. Speaking of beta favicons, why in the world does Aviation get an airplane symbol in theirs?
 
1:21! Woo it's like I'm reliving my Mario Kart time trial days
2
 
2:18 PM
If you'll actually post the challenge, don't forget to mention this: meta.stackexchange.com/q/230842/229438
Those beta sites have the same favicon.
 
Hey @Sp3000
 
@ProgramFOX oh nice... I probably wouldn't have caught that, thanks
 
How is the input supposed to be to your polyomion program
 
stdin
 
like comma-separated, space,separated, bracketed list...
none of those would work
 
2:19 PM
@feersum the entire file
 
Space separated, as per Martin's tests
 
@FryAmTheEggman the code is giving som eong exceptions on the online editor ...
 
And yeah entire file, including the number of tests as the first line
 
@Geobits poker has a clubs symbol...
 
I still can't get it
 
2:21 PM
I didn't even know there was a poker.se. Chess has a rook, though, now that I look closer.
 
Like if i go 1 1 1 1 1 as the input
doesn't work
 
Wonder if we could get a golf club or something ;)
 
If you want to test one case, you'll need
1
1 1 1 1 1
 
more importantly, why is this red?
 
(i.e. the first 1 indicates there's one case to be tested)
 
2:22 PM
Red with a weird font at that.
 
@Geobits arduino has ∞
 
@Sp3000 I tried that before, still doesn't work
Oh it's probably python 3
 
@feersum if you download the file from the gist, and just do cat N10.txt | pypy Sp3000.py (or pypy Sp3000.py < N10.txt` it should just work.
yes it is
 
Yeah it's Py 3
 
okay, so I just need to scrape all the favicons :D
 
2:23 PM
I always have a lot of trouble because I don't know how to read
sorry
 
Apparently they felt it was best to cram 3 letters (PCG) into an icon meant for 2 letters for a site with a 4-letter acronym (PPCG).
3
 
@Geobits it took them until M&TV to realise how you can fit 4 characters in there
 
That one looks weird, though :P
 
KILL WITH FIRE
0
A: Survival Game - Create Your Wolf

user33192Ok thanks rgwergwergergergewgrewggggger gwerg

 
@FryAmTheEggman do you have the command line compiler ? because online one fails for large inputs, like the last 4 test cases
 
2:26 PM
@Rainbolt yay, free helpful flags :)
 
You are welcome.
Has -7 and still isn't deleted?
 
I used Python 3 and still can't run @Sp3000's code :(
 
Flagging and voting to delete, are we? (not that I can do the latter :P)
 
@Optimizer Yeah subsets chews up memory, I'll try the big ones in a bit
 
Make sure you flag as spam. Don't be creative.
 
2:26 PM
so far my delete vote is the only one
 
@feersum Eh, getting any errors?
 
Oh you need to flag it as spam. Community will see that it reached a threshold snd auto delete it without moderator intervention.
 
NameError: name 'convert' is not defined
 
Unless your delete vote counts as a spam flag also
 
@Rainbolt Not spam. It's no advertisement. Flag as not an answer.
 
2:28 PM
@ProgramFOX I think in those cases I'll allow both answers... gives some more flexibility in compressing the output strings
 
@ProgramFOX Spam != advertisement
 
@feersum Did you copy the whole thing? convert is the first function
 
@Rainbolt Yes, it is. At least, in SE terms.
 
So it shouldn't give a NameError...
 
@ProgramFOX Oh yes. You're right
 
2:29 PM
right....
is there really no way to select all in a code box?
 
Why couldn't they just name the flag "Advertising" instead of "Spam"? It's a misnomer.
 
@Rainbolt I'm not sure though whether it can be flagged as 'offensive/abusive'. But NAA is certainly correct here.
 
Oh I believe you now. It just took me a second to realize why you were saying that spam is not spam.
 
I thought it was a fine answer. I just voted to delete so it wouldn't beat my LazyWolf.
4
 
@MartinBüttner For ease of use, should the correctness tests be another file on the github? Just so people don't need to get rid of the right answers column
 
2:31 PM
@Geobits Here's an idea. Write a spec and an answer that caters to it. If someone beats you, rewrite the spec and tweak your answer so that you are always winning.
 
@Sp3000 I already have it as a file... will upload
 
@Rainbolt That sounds like a pretty good recipe for downvotes :D
 
k :)
 
@Geobits Pretend that downvotes are like vegetables. You eat them like a man.
 
Haven't you heard? Men only eat meat. Rare meat.
 
2:35 PM
All of the men I know order their steaks medium. When I watch them slice into it with their fork and knife and no juice comes running out, it makes me sad.
My dad owns a ranch so I guess I could be considered a little more "cultured" when it comes to steak.
 
I like mine well done. Of course this means I have to be very careful ordering steak, because most places just burn the crap out of it if you order it that way. Why is it that I can cook a juicy well-done steak but people whose entire job it is to cook steak can't?
At least medium-well, anyway. Pink is fine, no red/blood.
 
@Geobits maybe because they're insulted by your order? ^^
 
Could be, but they should only be insulted if they lack the skill to cook it right.
 
which they apparently are --> vicious circle
 
2:40 PM
Yea see charts like that are ridiculous. Brown!=dry if you cook it right.
Unless I'm doing something wrong by cooking it deliciously ;)
 
Here's my dad talking to a Texas Ranger. He's explaining how his ranch hand has been cattle rustling him for years.
This ranch hand was an illegal immigrant with a family, and literally built them a house on the ranch where they lived for like two decades before he started rustling.
Two other local townsfolk were in on it too, which was exactly enough people to convict him of organized crime.
 
(it's not Rick Astley)
sounds like a synonym of
 
It also came out during the investigation that the ranch hand had been sleeping with an underage girl from his church.
 
I have the rep, but not enough tag score unfortunately.
 
2:44 PM
So we got a new guy named Mike and our calf turnover went from 75% to 101% (one of the cows had twins).
 
this is annoying...i made a program that works for every test case except the one that has over 700 outputs, where it is off by 1
how do you debug that?
 
add/subtract one to a hardcoded test case >_>
 
It could be my one that's wrong :/ can't check tonight though, gotta sleep now
 
brilliant!
the testcases are all outputs of your program?
 
I think so? Unless Martin also wrote an implementation
 
2:50 PM
guess i'll just post it thetn
 
@Rainbolt is the code challenge to tell how cooked your steak is?
 
Would be easier to tell which one's wrong when we can compare :P
 
or tell whether they cooked it right and send it back if not
 
@feersum yes they are
@feersum I'm pretty sure it's the one touching at a corner
 
@user2179021 I was thinking the challenge would be to generate a round up pen that cattle can efficiently navigate. You see, they panic and can't really tell where to go when they are getting shots, getting yelled at and barked at, and are separated from their calves.
 
2:51 PM
(the one I mentioned in a comment)
(and this is why I included this particular test case)
 
even 1 1 1 1 1 1 1 1 can do that
 
only inside
 
so i don't see how a program bugged on that could get so far
 
not outside
[1]*16 is the first that can have a contiguous area and touch at a corner
 
XX
X X
XXX
 
2:54 PM
my program only records the lattice points the lines are on anyway so it has to be something else
 
what do you get for 1 1 1 1 1 2 3 3 2 1?
 
24
 
interesting
that one can form the same polyomino
 
By "off by 1" do you get 1 more or 1 less?
 
759
 
2:57 PM
So 1 more... hmmm
 
@feersum if you could output a string with one of RLDU for each rod, I could generate some plots and have a look through them
 
ok
 
so the output for [1]*8 should be something like
RRRULLLD
RRUULLDD
RRUULDLD
 
I can do something like R2U2L2D2
with multiple rods combined
but not one for each rod
if there are 2 in a row parallel
 
well, it's just a matter of running run-length decoding over it, right?
because the test case in question only has rods of length 1
 
3:04 PM
oh ok, could do that then
L3 = LLL
 
yes
would anyone with some python fu be willing to write a little validator for Paint by Numbers similar to this one? basically, you'd just have to count distinct colours, and determine the number of contiguous areas by repeated flood-fill.
I can do it in Mathematica, but no one has that...
 
People would have to download PIL in addition to Python, but I guess if they're interested in the question they wouldn't mind
I can't do it now though, sorry. Maybe tomorrow if no-one's done it by then
 
yeah, I don't think it's strictly necessary, but it would be nice to have
in Mathematica it's basically a one-liner, so if I suspect any submission to produce invalid results I can always check myself
 
Going to head off to sleep now - @feersum if you can't figure out what's wrong, then maybe post and we can try to find the difference between our codes tomorrow? (Mine could be wrong for all I know)
 
yeah, i'll post it if we don't figure it out soon
 
3:21 PM
Comparing's going to be interesting now :P
 
hehe sleeping is impossible when there's a code golf to be doen!
 
@feersum I can't see anything that's obviously wrong
but of course I can't find duplicates just by inspection
 
RURURULULDLDLDRD
What's that?
 
Hmmm
That's weird
 
3:29 PM
are you missing that?
I thought that was the last one yours printed
 
('RURURULULDLDLDRD', 'ACACAACAACACAACA')
('RURULULULDLDRDRD', 'ACAACACAACAACACA')
I think feersum might have the same one twice
 
ah yes
those are identical
 
nice find
guess i need to add another tiebreaker to the rotational symmetry check
 
Okay, now I think I can head off :) have fun
 
good night!
 
3:37 PM
Oh one thing before I go - should we have a section somewhere for edge cases? Just to make it easier for people to check their programs
e.g. moving 81 from the comment into the actual post
 
hm, yeah, might be a good idea... although I can't think of many other relevant edge cases that haven't been mentioned yet
 
Maybe if we find more :P I dunno
It's an interesting problem, so I'd be interested in weirder polyominoes :D
Anyhow, have fun with rods/paint by numbers/whatnot :)
 
 
1 hour later…
4:42 PM
Do we want a "output 2015 without using ... " question this time?
 
@MartinBüttner still no entries other than the reference?!?
 
@Sparr nope :(
although feersum has something almost ready I think
@Optimizer lol, I was thinking about that just today
 
@MartinBüttner dude, we already ninja'd so many times yesterday
@Sparr I was thinking of a formula approach to that problem, but gave up after half an hour
 
what's a formula approach?
you mean a closed-form solution?
I really doubt that exists
 
I was thinking in terms of degrees of freedom of 1 length tiles
and that other length tiles are simply restraining some degree of freedoms
and if that gives out a general formula, get a way to remove edge cases like holes, cyclic configurations etc
 
4:48 PM
Has anyone considered a normal polyomino generation approach, that tests for matching the edge lengths along the way?
 
@Sparr I don't know what feersum is doing
 
I've just been thinking of a naive iterative approach to the 3^n search space
 
remember that time is the score here
along with a memory limit
 
@Sparr I think one can reduce the search space to 2^n, but at the same time, I feel like it's easier to truncate the 3^n search space more easily
 
what noobs--they didn't use unsigned!
 
@feersum lol, that was my first thought, too... but it wouldn't have helped for long anyway
how is your polyomino finder coming along? ;)
 
i finally got something for rotation detection together a minute ago
i decided to just divide by 4...
 
5:42 PM
I just tried to type "The footer bar" and instead I typed "Someone footer bar". Usually I can reconcile my mistakes (closeness of keys, or another sentence that I had in my head while I was typing) but I can't figure this one out.
Maybe I had it open and was typing in the wrong window, and then I also forgot to type the word "The"
But that seems unlikely
 
@Rainbolt not as bad as yingluck
 
But I bet Doorknob can figure out why he typed yingluck
 
Yes I know that.
You were totally waiting for two minutes so you could ask who Doorknow is.
 
everyone know Doorknow
 
00:00 - 18:0018:00 - 00:00

« first day (1406 days earlier)      last day (3453 days later) »