« first day (1533 days earlier)      last day (1560 days later) » 

6:10 PM
@Lembik 2, 12, 12076, 1446672
 
just finished my program for C
 
@Lembik 2, 12, 230, 12076, 1446672
 
I actually figured out that the best optimization is simply to put a max on the number of repeats (12)
@MartinBüttner
 
sorry was missing a term :)
 
@NathanMerrill that was my mistake
because if X is actually 13, say, then you have no guarantee that the 13th repetition gives unity
I set the max to 12 + (x%4) which worked for the small input
 
6:22 PM
I could put a max of 20
 
Hey, how do you know if you passed the qualification?
 
you need 20 points
 
no, the problem is a fixed maximum
 
20 repeats?
 
6:23 PM
actually, 20 is too big
14 is correct
 
@NathanMerrill Thanks
 
er, 15
no 20
ok, here's why
4*any sequence is a unity
 
@orlp nice!
 
@NathanMerrill exactly
 
@orlp I look forward to your answer!
 
6:25 PM
hence, since we need the pattern "uiujuku"
 
so if you can split 20 repeats into ijk, but X is actually 21, then that one additional repeat isn't necessarily unity
 
so it'll mess up your k
 
the maximum is 4*7
what is X
 
@Lembik I'm a bit annoyed, I'm almost certain there exists a fast way of what I'm trying to do
 
6:25 PM
@NathanMerrill the input number of repetitions
 
@Lembik which is finding the number of unique outputs given the set of formulas
 
@MartinBüttner I already failed attempt 0 for C
 
@orlp maybe someone here might have an idea?
 
because I had put print statements in my code that froze my computer
 
12 + (x%4) works, because then you're actually omitting unities
 
6:27 PM
@orlp or you could always ask on *.se :) ?
 
what is X?
 
"the input number of repetitions"
 
@Lembik I could be real sneaky
I could take this problem, and post it on PPCG
then steal that answer and use it to answer your question :D
 
also, did you get "NO" for the first 20 except 9,12,13,17, and 19?
@MartinBüttner
 
:)
 
6:29 PM
I believe that my algorithm is correct, but it took too long
 
@orlp enjoy yourself :) or you could be really collaborative :)
 
Actually, I think question 2 is quite easy
Let me think it through, but I believe it might be
 
@rcrmn problem B ?
 
yes
 
@NathanMerrill doesn't everyone get a different small set?
 
6:30 PM
I don't think so
 
well I got a different one on my second attempt
and on my first attempt I got YES for 7 9 11 13 15 18 ...
 
hmmm
ours are different enough that I think we do have different submissions
also, I didn't think about it, but their input string contains a lot of repeats
is there an efficient way to reduce them?
 
isn't that what we're doing by capping the number of repetitions?
 
no, I'm referring to repetitions in the original string
 
oh okay
well yeah, you can always move the repetitions into X
but it's not really necessary
I solved the large test set in one or two seconds
@rcrmn so how did that work out for you?
 
6:39 PM
I'm thinking on it
for small cases I thought I had something
but now I've found what happens when someone has 7 pancakes and it's broken my idea
I believe there might be some simple formula to compute the number... but I have to find it first for one number, then apply it to everyone else
 
@rcrmn consider the case of 15 and 10
 
what do you mean?
 
the ideal way to deal with two plates (one 15, the other 10), is to split the 15 into 3 and 10 into 2
and then let them eat for 5 turns
 
@NathanMerrill have you submitted your B?
 
No
I keep on thinking I have a solution
 
6:54 PM
(sorry for the second ping, but I couldn't live with that typo)
 
its fine
lol
 
@NathanMerrill Lol you are right... my solution was so very wrong...
Or NOT! maybe I still can, I'll let you know
 
7:10 PM
0
Q: Number of unique outputs by substituting variables

orlpGiven a set of formulas like this: bacb bcab cbba abbc Give an algorithm that finds the number of unique results you can get when each variable is substituted for either "0" or "1" in every formula. There can be $n$ formulas, each with $k$ terms and $l$ variables. Express your asymptotics in ...

@Lembik ^
 
@orlp "There can be n formulas, each with k terms and l variables. Express your asymptotics in these terms. Fastest algorithm wins." In regard to which variable? Is it fastest as in O()?
 
Hey @MartinBüttner I got my second attempt wrong as well
 
@randomra An example runtime would be O(k*n*2^l)
 
@orlp which wins O(n^2*k*l) vs O(n*k^2*l)
 
@NathanMerrill those runtimes are impossible
I think
 
7:18 PM
@orlp regardless, you need to define a priority
 
@NathanMerrill the way I generated the testcases follows a pattern, I'll edit the question for this pattern to remove the need of a priority
 
@NathanMerrill Okay, no, I don't have it...
 
@NathanMerrill what did you try for the repetitions?
 
ugh I just realized that it's not always optimal to split stacks exactly in half. This basically nullifies all of my other work on B -_-
 
Yep, just had that problem, I can't think of anything that is not bruteforce right now
 
7:34 PM
@orlp why don't we just express the asymptotics in n, seeing that k is bounded by n?
also a tie-breaker would probably be useful
 
@MartinBüttner k is much, much, much smaller than n as n gets bigger
I don't know how to encode it into the question
 
Excuse me, is Question D as easy as it seems, or does it have anything hidden?
 
It's definitely super easy for X ≥ 7.
 
@MartinBüttner actually, n == (k!)^2
 
I have a feeling they threw in a twist for the large dataset, considering how many points it is.
 
7:38 PM
oh okay, just found it's not that easy
 
@orlp ! I thought you were going to ask on math.se :)
 
@Doorknob it's more like you can brute force the small one but need something efficient for the large one I think
 
Well, I'l do the small data set and I'll have the points to qualify
 
me too
 
and I think it's specifically the N > 6 thing, which isn't tested with the small set
 
7:42 PM
The problem is that when you have X big enough, you can create partitions of the grid with one of the sides being of area smaller than X, so that you can't fill it up
 
@orlp in fact do you think math.se might be a better place for that question?
 
If N > 6 isn't it trivial? Just choose a n-omino with a hole in it
 
I do wonder though if my solution is really correct... I just hardcoded a few special cases for N < 7
@Doorknob yes
 
Oh
 
So why would that make the large set any more difficult?
 
7:43 PM
that's true
 
I suppose you couldn't do that if the width or height are less than 3, but those should be easily bruteforce-able
Actually, if the width or height are <3 you could just choose a C-shaped thing
 
if width and height are less than X/2 you can choose an L-shape with sides X/2, and the other can not fit it in
 
@Lembik don't think it's math though
there's no analysis or closed form for this
 
@orlp Well you want a fast algorithm for a combinatorial problem. This is part of math
@orlp combinatorics is a subset of math
@orlp it's is also suitable for cs.se of course but you don't get such good answers there :)
 
I think the main problem is for X=5,6, maybe
 
actually, for X=6
X__
XX_
_XX
__X
 
That won't work if R/C are bigger
right?
 
I'm not sure
maybe not
 
I'm not either. I'm just going to stick with the small dataset for now
 
but it might be the only case in which that can be done
I don't know if this can be done with X=5
 
8:04 PM
@Doorknob not more difficult, but it's an insight that is not necessary to solve the small test set
the small test set can probably be brute forced
@rcrmn there are only a handful of these cases I think
@orlp I still don't understand how you can order complexities in two different variables
 
@MartinBüttner see edited question
 
oh right
any tie breaker? first submission?
 
Woohoo! I added J-style *currying* to inca3. ` d«÷&2
36 #
unprintable
d10
#
5.000000
d12
#
6.000000
d1
#
0.500000
`
 
@MartinBüttner updated question, it's runtime > memory > first poster
 
8:21 PM
Now I've got the pieces in place to implement the rank operator and fill-out the remaining details of frame/cell handling. Having the rank operator should make it easier to test the cell behavior.
 
@Calvin'sHobbies: I thought about making you a stack snippet leaderboard for the language showcase challenge just to be nice, but then I realized that I don't know how to make one. It's the thought that counts...? :/
 
@MartinBüttner: I... I don't... O.O
Where's that mind blown gif when you need it
Oh there it is
@MartinBüttner: I didn't even realize that was a link until just now. u_u
 
8:37 PM
:D
 
I thought you were just using the English language to screw with my fragile brain
 
I wouldn't dare ;)
this is actually really annoying btw... a lot of my humour in German relies on deliberate misuse of the language, weird over- and understatements and making up words... I can't really use any of that in English, because even if my grasp on the language is sufficient to know what I'm doing, people generally tend to assume that I ... well... just made a mistake...
 
I do that all the time in English.
 
@MartinBüttner example ?
 
@AlexA. well yeah, because it's your first language :P
 
8:41 PM
That's true.
 
So I'm an idiot. I got problem D wrong once because I used an || instead of && (facepalm), and then I got it wrong again because I forgot to recompile after fixing the code. -_-
 
@Optimizer ummm... it's hard to think of something off the top of my head that also translates to English
 
I still seem to have somehow earned the full 8 points
 
@Doorknob: The system gave you the benefit of the doubt.
 
German has a lot of constructive prefixes for verbs (like en- or be- in English) and many of the prefix/verb combinations don't exist, but if you use them, they will still suggest a certain meaning which can sometimes be very funny
constructive? is that the term? generative? I think there's a word for it...
 
8:43 PM
I don't know enough linguistics terms to know the right word for it, but I know what you mean
 
I really enjoy the word "Hankelable." — Alex A. 21 mins ago
oh hey, I did make that one up ^ :D
 
Nice work! :D
I do thoroughly enjoy that word.
Well, "word"
 
@AlexA. wait I think I know a question on EL&U that mentioned it
 
Hankelable?
As an aside, there should be a code golf to generate a scalable ASCII representation of the signature Martin Büttner winky face.™
 
no "constructive" or "generative"... but the two questions that could have been it, don't have any term like that
@AlexA. I didn't know that was a thing. :D
 
8:47 PM
Apparently. I know that Rainbolt was taken aback by ASCIIThenANSI's use of it, calling him a Martin imposter.
So apparently it is the Martin signature winky face™
As an aside, I recently learned that by holding Option and pressing various keys, I can produce all sorts of crap on my Mac, e.g. ™ and £
 
hm "productive prefix" maybe? I won't be able to sleep tonight...
 
Linguistics will haunt your dreams.
 
@AlexA. lol yeah, I love if you discover new features of your OS after years of use
 
I'm always learning new things about Mac OS. The handiest thing is probably holding a letter key and being able to select an option for an accent, e.g. hold u, press 2 = ü
 
It's much better with Compose.
 
8:55 PM
Sigh.
 
ex. Compose + u + " = ü
 
@Doorknob: It was actually our conversation about that that made me realize that holding Option and pressing various keys yields an extended range of characters.
Shift + Option gives even more.
But there's no real rhyme or reason to it, unlike Compose.
For example, Option + Shift + k = , the Mac logo. Wtf?
 
mak :P
 
I just use Command + Control + Space, and search for characters.
 
@ChrisJester-Young: WHOA HOLY CRAP
 
8:58 PM
Oh yeah I can just do Alt+P charmap too.
Compose is much handier though
 
@Doorknob Also, please read the other chat room and let me know what you think. :-)
 
@MartinBüttner Don't be afraid to use and abuse the English language for the sake of \bhumou?r\b.
@ChrisJester-Young: ℥ This Cmd+Ctrl+Space is the coolest.
 
@ChrisJester-Young You may have just changed my life with this shortcut...
 
@BrainSteel :-D
 
9:04 PM
♨︎ <-- Is that like "push button, receive bacon"?
 
I found a mathematical formula for Problem B that outputs 100% correct answers for small input and is yet horrifically wrong for large input. This is very odd.
 
@MartinBüttner The word "esses" in the wild. Huh.
 
9:06 PM
@BrainSteel: I only ever see that in crosswords
 
Right?!
 
I honestly thought it was a made up word.
 
I saw 'Aitch' for 'H' in a crossword once, too. Just confusing.
 
@BrainSteel Welsh people would have failed solving that one.
 
@MartinBüttner: Why, too many vowels? :P
 
9:09 PM
"Haitch"
 
@MartinBüttner Can't hardly blame them. I think I was in 3rd grade when I saw it. Wanted to call it 'Ayche'
 
Bwlchgwyn
Ysbyty Ystwyth
Wales sounds like a magical place
 
All of Europe sounds pretty magical... I need to get out more.
 
Haha
@BrainSteel: US?
 
@AlexA. Smack dab in the middle of the continental US, in fact :P
 
9:12 PM
Like Topeka, Kansas?
I think that's the centermost major US city
 
Not that close to the middle. I'm an hour or so south of Topeka :)
 
Are there any hills near you?
 
no
 
No, not at all.
 
Announcement: MathJax will be (temporarily) disabled, only on the main site (not meta), some time in the near future. Please do not convert any other posts to MathJax.
6
 
9:15 PM
After all, Kansas is literally flatter than a pancake.
You know, depending on who you ask.
 
@Doorknob: Should we begin reverting posts?
 
What... what is THAT?
 
Hills n shit
 
People would live near something like that?!
 
The foreground is actually Tacoma, which is a couple hours southwest of me
@BrainSteel: Why not?
It's not like it's an active volcano. Oh wait...
 
9:17 PM
@AlexA. Sure, that might be a good idea.
 
@AlexA. Okay, as a one off thing, we'll be reverting all the posts we can find today (to flood the front page only once). But just as a reminder to everyone, for mass editing, normally, please limit yourselves to three questions at a time.
 
It's SO BIG. Things of that scale give me heebie jeebies.
 
@BrainSteel: Also near me: en.wikipedia.org/wiki/Mount_St._Helens
Also an active volcano
And I'm in earthquake territory.
 
You've just got stuff blowing up all over the place...
 
@Lembik you there? this sequence looks very interesting
in particular, "460, 12076" is part of the sequence
which seems suspiciously close to 230, 12076
 
9:32 PM
Folks may want to edit their answers to codegolf.stackexchange.com/questions/48589/… if MathJax is being disabled.
 
RIP MATHJAX 2015
 
@Calvin'sHobbies I really don't like that they disable it
 
@orlp There's really no better solution
 
@Doorknob shouldn't this be a pretty simple fix from the SE team?
only replacing $stuff$ in <p>s
 
@amon I looked into it, turned out to be a deep rabbit hole requiring at major refactoring of MarkdownSharp (we'd need to make the pipeline extensible, so we could inject stuff before DoCodeBlocks in RunBlockGamut - currently all the processing happens before we ever hit MarkdownSharp, but we'd need to leverage it's block processing) — m0sa ♦ Mar 16 at 11:49
 
9:37 PM
@orlp thanks to your accepting my answer my badge overview just got a digit wider ;)
 
And Code Golf is really the only site where arbitrary stuff in code blocks (that would cause conflicts with MathJax) is a common sight. So trying to do that amount of work for one site is just... (I'm speaking my own personal opinion only, BTW; that's not our team opinion or anything).
 
@ChrisJester-Young who cares if it's a common sight?
@ChrisJester-Young a bug is a bug, and it affects all mathjax sites
 
@orlp If it doesn't actually cause practical issues for most MathJax-enabled sites, fixing it isn't going to be a top priority. It's not like it causes XSS problems or anything of that nature.
 
@ChrisJester-Young this is exactly why I voted to keep mathjax
so it becomes a top priority
mathjax for ppcg is very important in my opinion
 
My next question: detect which parts of markdown are code and which are MathJax. It doesn't seem that hard. (Yes, yes, I'm sure it's harder in reality.)
 
9:41 PM
@orlp I'll bring it up at next week's core dev team meeting, but I can't promise anything more than that. If the team decides not to tackle it at this stage, I'll let you know.
 
@Calvin'sHobbies From what I understand it's not that hard... it's just that the code is set up to do the processing in the wrong order.
 
This is kind of a special favour I'm doing because I used to be a moderator on Code Golf, and I still care deeply about this community, because otherwise, for all intents and purposes, the devs have already spoken (as quoted in Doorknob's last message).
 
@ChrisJester-Young can't you just enable mathjax only for p, h1 (hn) elements?
 
@orlp Doing any kind of tag parsing is going to require code changes, which is effort. So again, I'd have to ask the team to decide what kind of effort is warranted.
 
@ChrisJester-Young parsing?
@ChrisJester-Young doesn't mathjax just support this outright?
 
9:46 PM
Well, I don't know MathJax from a bar of soap, so if you think it can be done without any parsing on our end, send me more info.
 
0
A: Sandbox for Proposed Challenges

flawrMinimal convex partition (code-golf) The goal of this challenge is dividing up the 'white' shape of a given 'black and white' pixel image into smaller pieces, which together form the original image (let's call this a partition). The restriction is that those pieces have to be convex, in our case...

 
@ChrisJester-Young just grab all <p> elements and co from the DOM, and only call mathjax's api to style only those elements
 
@ChrisJester-Young: Do you wash yourself with MathJax in the shower?
 
@AlexA. Lol.
@orlp <p> elements? This is Markdown we're talking about.
 
@ChrisJester-Young MathJax is a javascript library, and styles client-side, not at the Markdown-processing side
 
9:48 PM
@orlp I see. If I have time this weekend (which I don't, but I'll try), I'll see how our MathJax integration works and see if it's easy to handle that.
 
@orlp: Is that why it looks different in Chrome and Safari?
 
@AlexA. yes
ctrl+f "elements"
there is an option to style only certain elements
 
Thanks for that information! I'll have a look at that if I do get around to working on it tonight.
But for now, I must actually do Google Code Jam. :-P
 
@ChrisJester-Young Working on a weekend? Gasp
 
@AlexA. I normally don't, but, I was out for a fair chunk of time yesterday.
 
9:51 PM
Ah okay
 
@ChrisJester-Young Either way, the option I've given you might not exactly solve the problem, this is a frontend issue.
 
Just the fact that the devs are putting so much time and effort into even considering this whole situation just to make our little community happy is very encouraging.
 
so a javascript dev should very easily be able to fix this
@AlexA. it's a network-wide bug though
it's just that the symptoms were very easily noticeable here
 
@AlexA. You mean one dev who used to be a moderator at Code Golf, and thus still has some attachments here? :-P
 
hey ho
 
9:54 PM
@MartinBüttner Hence reality :P Though I am surprised something that seems this fundamental is not worried about more by the devs :/
 
here I am again
 
@xnor do you want to revert your LaTeX yourself? (I see at least the two answers to the N -> ZxZ challenge)
 
@AlexA. Or are you talking about previous devs who replied in the past too? :-P
 
Coming to you with a new challenge! codegolf.stackexchange.com/q/48753/134
 
@ChrisJester-Young: I'm talking about all the devs at SE. You're all awesome.
 
9:55 PM
:-D
 
@FUZxxl while you're here, would you mind removing the bits of LaTeX from that answer? (see the pinned message)
 
also this ^
 
dat font rendering
 
Haha wtf
 
9:56 PM
@MartinBüttner ok.
@orlp Here is a nickel, get yourself some proper fonts.
 
@orlp there is also a bit of LaTeX in your challenge.
 
@MartinBüttner :( it's going to be so ugly without
 
it's not like you wouldn't have asked the question if we hadn't had MathJax :P
 
TeX has been removed.
 
9:58 PM
Javascript, oh how I hate you. I just spent six hours hunting mystery bug. I used .len instead of .length to get the length of an array.
 
@Sieg We have all been to that place before.
 
@Sieg You need better JS debugging tools.
 
I don't have no tools.
 
@Sieg There's your problem right there. ;-)
 
I'm so used to errors.
 
9:59 PM
@Sieg Do you write your code in Microsoft Word? :P
 

« first day (1533 days earlier)      last day (1560 days later) »