« first day (1450 days earlier)      last day (3387 days later) » 

12:16 AM
Woo fanatic
@grc @xnor @Jakube and anyone else: Got any itertools tips for Python? I'm trying to compile a list
 
12:38 AM
@sp3000 honestly, my tip is: don't use itertools unless your code is really long
every single time i thought i could save chars with combinations or product or anything, i found it shorter to do directly than importing and calling it
but then i tend not to go for problems that have really long golfs
 
12:56 AM
@sp3000 @jakube in the sum power to n problem, have you tried recursively doing the sum of products checking?
(passing in a list of already used numbers to be excluded)
 
:P yeah, but just in case you actually needed it for something
I didn't try recursively this time because I needed permutations of subsets, which I think is too long to do by hand?
 
do you actually need them?
my thought is to just say, a number is the sum of k power terms if you can get it as something of for a^b + [sum of k-1 power terms], adding a and b to the respective excluded lists
so, rather than explicitly generating the permutations, having it be part of the recursion
 
Hmm I wonder...
 
i'm gonna try it
i don't actually know if this works, but the itertools import makes me suspicious
 
Well the rule of thumb "You probably don't actually need itertools" is usually accurate... (Except maybe groupby?)
 
 
1 hour later…
2:29 AM
Oh 124, nice
 
124 on what?
 
 
5 hours later…
7:32 AM
@PeterTaylor Congrats on getting 20k!
3
 
 
1 hour later…
8:49 AM
@ProgramFOX Thank you
 
9:36 AM
is SE (apart from chat) down?
 
@MartinBüttner yep
in Tavern on the Meta on Meta Stack Exchange Chat, 21 mins ago, by balpha
Yes, all of our new york datacenter is unaccessible
in Tavern on the Meta on Meta Stack Exchange Chat, 21 mins ago, by balpha
Chat runs in oregon, thus still works
 
9:54 AM
hypothetical Java question: if you created an instance method in an enum class with zero elements, would it be a valid function answer?
 
10:33 AM
@feersum honestly, I'd probably accept a Java function without being wrapped in any class or function at all.
 
@MartinBüttner It's hypothetical for a reason :P
 
11:20 AM
yay, Dominion just arrived... too bad no one's here to play :/
 
 
3 hours later…
2:30 PM
@MartinBüttner I'd be up for a game :D
 
:P
speaking of which...
 
Seriously though, the online version's an option any time :)
 
what's your progress on BBT?
 
I got up to the puzzle blocks (stage 3) and haven't progressed much since
Been playing Valkyria Chronicles instead
 
@Sp3000 I might take you up on it some time, but I'm currently working on the Ruby controller for the lab rat race :D
 
2:33 PM
Ahaha k :)
 
@Sp3000 ah, that's a shame
 
In python, can I take multiple slices in one go ?
s[2:6, 10:] to create s[2:6]+s[10:]
 
no
 
too bad.
 
Speaking of that I wish x[:,0], which I just learnt about the other day, was valid for Python lists and not just numpy lists
Would be a nice way to take the first elements of a list of lists
 
2:39 PM
you could zip(*x)[0] (I think)
 
Oh, yeah that works nicely. Few bytes longer though :P
@MartinBüttner Think it'd be useful to have a Stack Snippet meta topic? We have a few floating around (e.g. Lev dist, leaderboard) but one I'd like to also see is an input converter between space-sep, comma-sep, CJam list, Python list
And if I end up writing it I'd have nowhere to post it
 
@Sp3000 I suggested this at some point, but Rainbolt made a good point that it will probably be more useful if we just have one meta post per purpose, along the lines of "Do we have an existing stack snippet to generate code golf leaderboards?"
 
would navigating to some page and finding a snippet for that really be more convenient than regexing in your text editor?
 
alternatively, we could post separate questions like this, StackApps style... the question contains the snippet and answers will contain a changelog and feature requests
 
Well one way it could work is by allowing the OP to enter the input into the snippet, and you select which one. Regex wouldn't be much harder though, true
Oh... hm that's interesting...
That might be an interesting way it could work, and I guess rather than a single post linking to all the snippets we could just tag the question accordingly
 
2:47 PM
you know what... I'll just make a meta post...
 
3:07 PM
done
20 minutes... I really need to increase my meta-post-writing-efficiency
 
I like the StackApps idea
Hmm, shame Kingdom Builder's not getting much attention
 
yeah
the post is just too damn long
 
It's not that long, and I'm lazy... D:
 
0
Q: Do we want to share our Stack Snippets on meta? If so, using which format?

Martin BüttnerWe've had Stack Snippets for a few months now, and a few nice snippets have been written, which will probably come in handy time and time again. It's been brought up a few times in chat, that it might be nice to collect these on meta, so we don't have to reinvent the wheel for each new challenge....

 
3:50 PM
@Sp3000 That sounds to me like something which belongs on github.io rather than anywhere in the SE network.
 
@PeterTaylor done
@PeterTaylor it would be nice if you could actually copy out the test cases straight from challenge without having to go through some other converter
and it's not like it takes up any space on the challenge
 
4:06 PM
Ah, I read too much into the context and thought it was about porting code between languages.
 
4:32 PM
@Peter thanks for the answer... I kinda like that idea, although I still think a single question with all snippets could turn in to a massive clusterf*ck.
 
4:54 PM
It might - but then whatever we choose might need rethinking when we get to say 25 snippets.
 
yeah, true
 
 
2 hours later…
6:45 PM
Perhaps an idea for a math challenge: en.wikipedia.org/wiki/Split-complex_number
 
interesting
while you're here, can I ask you again to close the Unscrambling challenge? :) ... I'm convinced that most of the answer that go safe now, do so because no one is checking any more.
in particular, the current winner, probably wouldn't have won with that if he had posted it while the challenge was active.
 
7:34 PM
@MartinBüttner How would I close it?
 
Done
 
awesome, thanks
 
I haven't really been around here for a while.
Also, what exactly is the weekly challenge thing going on right now?
 
@PhiNotPi basically what I suggested here
 
7:47 PM
How many weekly challenges have already happened?
 
we're currently working on the third
we're keeping track of them here
 
 
2 hours later…
9:24 PM
@Doorknob thoughts on fortnightly challenges?
 

« first day (1450 days earlier)      last day (3387 days later) »