« first day (1441 days earlier)      last day (3454 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
German uses Alt Gr a lot (for some fairly obscure stuff, too), but there's nothing at all on Shift+Alt Gr
(that being said, the German layout doesn't have ¢ at all)
Sigh. Some people just can't be convinced that clarity is a good thing.
@PeterTaylor wow, that's rude
contemplating a flag...
The comment is definitely out of line, but what interests me is that the format of questions 3 years ago is so different...
Nowadays I think that question would be closed as unclear
@Sp3000 well PPCG was just established back then... the early phases of a public beta... plus it was one of the first betas, I think... and it's a rather unusual SE... so I think it took some time to establish certain standards
@Sp3000 we did close it a couple of weeks ago
hence the recent comments
Oh, and it reopened?
12:16 AM
yeah, I also voted to reopen. I didn't think it was a particularly good question, but it had a winning criterion and seemed sufficiently clear.
@Sp3000 say, did you bother to read through the Kingdom Builder proposal?
I was about to sleep when you posted it, so not yet
I'll take a look now
Seems to me like some scoring options will never get picked
And that most likely people will stick to roughly the same few scoring methods
yeah, I think so too.
12:31 AM
I mean, a few of them look like BFS/DFS/flood fill to me, which is considerably harder than, say, 1
I feel like most people will pick next to water, next to mountain, next to town/castle
Since they're all related anyway, yeah
alternatively, it's gonna be the two horizontal row ones, plus one of the quadrant ones
well yeah, that's why I wouldn't mind dropping two of them
Since you have 10 here's two suggestions: Group them into pairs and make people pick two pairs of optionals, or drop one of them, group into threes and make them pick a set of three
Then it's a matter of whether you can balance them
@Sp3000 in that case, I'd probably rather group them into three and make them pick one from each set
12:33 AM
Even better :P
okay, if I drop one, it's clearly going to be 3.
how do I distribute 1,2,4? if I put them in the same group, everyone will just flip a coin between 1 and 2 and ignore 4. if I put them into different groups, everyone will still pick 1,2,4
maybe I should drop both 3 and 4. then the scorings would naturally come in pairs. which makes picking 3 (out of 8) more interesting. because you have to implement at least two genuinely different ones.
That's another idea :P
1/2 and 5 would probably be the pick though
Maybe 6
But either way ones like 7/8 wouldn't get much love
hm yeah. you're right
how about this
3 groups:
@PeterTaylor Eugh, contemplating whether to nuke the whole comment chain or not. I'll leave it for now, since there's lots of useful feedback.
5,6 - 1,2,9,10 - 7,8
pick one from each
the 1/2 choice is still completely arbitrary though... can't do anything about that
12:41 AM
1,2,9,10? Wow
That's a big gap between 1,2 and 9,10 you have there :P
yeah. it's 7 wide
You don't get two minutes in TFS. Or a delete button.
(I meant difficulty-wise)
12:43 AM
I know ;)
(that means he doesn't know)
are we talking about the same thing? do you also think 9,10 are easier than 1,2?
Harder, I think
why? for 1,2 you need adjacency information. for 9,10 you can treat the grid as a 2d grid
Oh point, hex grid
12:45 AM
yeah, so I think 1,2 are harder. but. you also need adjacency information for the third group, so it might be easier to reuse that.
Well the thing is if the core is mandatory, then you'd have to do something similar to 1,2 anyway
oh. and that.
although the core counts by castles, 1,2 count by settlements
but yeah. another reason why you might want to choose the harder 1,2
Ah right
for maximum confusion (for you) I've reordered the scores
Ahaha k
1:06 AM
@Sp3000 updated the test cases
with only 16 possible choices, I was able to include all of them this time
I'm working out a problem...curious on an efficient way to solve it
:P nice
@Sp3000 what do you think in general?
basically I have a number X, and list of numbers that I can use to add up to X
too much to be a fun golf?
1:07 AM
20 and [2,3,9]
I can use unlimited instances to add up to the number
so I could use 2 10 times
IntegerPartitions[n,n,summands] (in Mathematica)
integer partition
suggestions for simple programs we could use for the Prelude to Befunge translation challenge?
we've got "print n-1 to 0", fibonacci, signum, square of a non-negative integer.
I'll take a look at the Prelude thing later, been busy
As for kingdom, it looks okay in general but I'd have to try the flood filling before I can say how fun it is ;D
@Sp3000 well I'll be going to bed soon... I'll what I can come up with
1:33 AM
Anybody want to try to unscramble this?
I don't Java.
@Geobits @PeterTaylor ^ ?
5 hours later…
6:30 AM
I proudly present PPCG's second number tag badge :D
3 hours later…
9:29 AM
@TheBestOne Not really. It's so far off competitive that there's no incentive. I had a go at one or two Java entries with on the order of 75 bytes, but one which is twice as long has far more possibilities, and then it's presumably tagged Java 8 because it's using features I've never heard of.
9:51 AM
A: Sandbox for Proposed Challenges

ManuGame of Towns king-of-the-hill Introduction The game takes place in a small world with different towns. The rulers of the towns hate each other and would like to rule the world. The people are divided into two groups, warriors and lowborns. However, lowborns can raise to warriors. You are the r...

10:43 AM
Why don't we have a silver and gold tag badge for PC ?
or anything other than CG
10:59 AM
@Optimizer because people haven't written enough answers for other tags yet
for PC silver - they have
no one has 80 answer on that
I've got the necessary core for gold, but only 24 answers
most answers I can see is doorknob with 56
if anyone has more than that, their score is below 364
so whenever someone is close to getting 1, they will be auto created ?
well not if someone is close to getting one... when someone gets it.
(as long as tag badges for that tag are unlocked in general)
btw, nice job on number to get exactly 100/20 :D
11:03 AM
A: Sandbox for Proposed Challenges

squeamish ossifrageCount the pips in a pair of dice Here are four photographs of a pair of randomly thrown dice (N.B.: click thumbnails for full-size images). From left to right, the numbers of pips shown by the two dice are 3, 9, 9 and 5. Can you program your computer to count the pips automatically? The ch...

isn't ^ this similar to counting Calvin's rice ?
by similar, I mean, take an image input and detect the number of this thing represented by almost white color
I think it's quite a lot harder
rice also had a factor of hardness that rice can overlap
so while the actual code and logic to solve the question is completely different, my point was more based on the same point you made for drawing flag/hat some time back
@Optimizer that makes it a completely different problem though. there you had to figure out where one rice ends and another begins. here, the pips are all clearly separated, but there are some you shouldn't count.
11:16 AM
yeah, I agree, read my next line.
@Optimizer I would think flag and hat are closer in spirit than these two. but not too similar either. but in vector-graphics image generation there's only so much variation you can have, I think. so the trick for coming up with interesting new challenges there is just to find graphics which have interesting sorts of regularities to be exploited.
11:35 AM
(it's even on the landing page of my profile, yeah :D)
Rough cops and robbers idea (needs some work though): "I bet you won't beat me!" We compile a list of all reasonably common languages used for golfing on PPCG and sort them by how well suited they are to golfing (either depending on how often they win, or what place they usually get).

cops can write a fixed-output program in any of the languages except the top language. then they choose one language that's *better* on that list and dare the robbers to write a shorter program in that language.
the main problem I see is compiling the list and that one would have to whitelist admissible languages
but it would basically be a CnR version of this challenge codegolf.stackexchange.com/q/18761/8478
alternatively one could allow robbers to choose any language higher on the board
hm no, I still don't really like it... for languages towards the top of the board, robbers would have fewer choices, which gives those language an advantage again.
soliloquy over
@MartinBüttner That was a crap challenge in its initial instantiation. I don't think it can be fixed.
yeah I just came to that conclusion :D
@PeterTaylor just read your meta post. that's quite a broad definition. that would also capture all branches of the code which cannot be executed, like an if(0){...}
or like actually pushing a useful string with some garbage and slicing off half of it
@Optimizer btw, can't you shorten your morse thing, if you use that huge number in the middle only once, and have one program reverse it before using it?
11:50 AM
Q: "No comments" restrictions and stack-based languages / unused strings

Peter TaylorSome classes of question are made more interesting by banning comments. For example: Polyglots: example Some source layout questions: example 1, example 2 Others, such as this code-bowling question have special treatment of comments. Many languages define delimiters for comments, but not all...

@PeterTaylor congrats on your silver btw ;)
holy crap, did anyone see how many Yearling badge were given out in the last week? that's probably all due to the 2014 challenge.
@MartinBüttner yeah I can. But there is no competition yet .. .
that's a lame excuse ;)
12:26 PM
@PeterTaylor regarding your comment. my point is that I think your wording does cover that. "the essential quality is that it's a range of characters which doesn't affect execution"
@MartinBüttner The question was really motivated by one specific case, but I tried to generalise it slightly. The answer is only really intended to reply to the question, not to all possible generalisations of the question (of which there are many).
@PeterTaylor If it's just one specific case, it might have been better as simply an answer to the loophole post, along the lines of "Using strings a stand-in for (disallowed) comments"
12:49 PM
@MartinBüttner That did occur to me, but I was hoping that Optimizer would make a case against in a separate answer.
1:09 PM
@Manu cleaned up my comments in the sandbox
@PeterTaylor I think if you really want to ban the spirit of the loophole, targeting a particular answer is not the right way.
@Manu btw, while I like starting with 3 towns, I don't think it'll help much in the way of mitigating bias from player order. I think you still should run multiple rounds.
@PeterTaylor as said, even if you ban "string";, there are at least 5 other ways of doing something similar
1:22 PM
in c++, how would I declare the templates for a C collection of type T?
so my function call looks like void func(C<T> collection)
@NathanMerrill I haven't used C++ templates in a while, but are you sure that works? don't you need to template func in T as well?
well, yeah
I need a template for both C and T
but if I simply attempt to use T later on in the function, it can't deduct what T should be
template <typename C, typename T>
double mean(C collection){
    double sum = 0;
    std::for_each(collection.begin(), collection.end(), [&](T item){sum += item;});
    return sum/collection.size();
that doesn't work ^
declaring item to be of auto type doesn't work either
oh I see
A: What are some uses of template template parameters in C++?

Evan TeranI think you need to use template template syntax to pass a param whose type is a template dependant on another template like this: template<template<class> class H, class S> void f(const H<S> &value) { } Here, H is a type which is templated, but I wanted this function to deal with all speciali...

hmm...I'll look at that thanks
@MartinBüttner Having 3 towns since the beginning makes the game more interesting and leaves room for special strategies. Of course I will run several games and take the average :)
1:31 PM
@Manu great!
1:45 PM
stroupstrup is up for 3 gold stars in a week's time.
Bah, that template template stuff isn't working
thanks anyways
2:15 PM
@githubphagocyte I implemented the lookup tables for component frequencies in my plane ai
It would seem that I'm not doing better than I was before
Python2 golf question: I have a 2d list (ie list of lists) called b. Values are always 0, 1 or 2. I want b to contain a 2d list that is the same except every 2 is replaced with -1. Is there a better way than b=eval(`b`.replace('2','-1'))? This isn't for a challenge on this site I'm just curious
I ran a simulation with 20000 Fights
I performed worse during the last 1000 fights than i did during the first 1000
Though the difference is within expected fluctuations
@undergroundmonorail you could apply (x+1)%3-1 to each element
@MartinBüttner i figured there was a math solution but i can't do better than b=[[(x+1)%3-1 for x in r]for r in b]
oh and the inner lists don't actually have to be lists they just have to work in sum()
well, if they were numpy arrays, you could just do (b+1)%3-1 ;)
2:20 PM
Maybe you could do some bitwise magic?
Is Python good at that?
as far as i'm aware, not particularly
i don't think the issue is the actual conversion so much as trying to do something to every element of a 2d array
codegolf.stackexchange.com/q/44407/8478 looks suspiciously like some contest to me... does anyone know if there's an important one happening right?
asking for Case #i: is a google code jam thing, i think
i'm sure it's not just them but i haven't seen it anywhere else
thanks @Nathan
2:31 PM
its still going on
you guys should participate
I passed the first two, but my code wasn't efficient enough for the third
you do have the rep to close vote though, no? ;)
I do
I'm deciding on the reason
because, its technically a good question for our site
as a code-challenge
eh, I'll follow the crowd
well it's not. currently there's no winning criterion.
hackercup sounds fun though. I might give it a go.
we don't allow programming puzzles where the first one to answer wins?
i don't think it's technically against any rues but it's kind of lame
2:37 PM
I think we do, it's just not a particularly good idea
I agree
it's always nice when you're trying to figure out which of two equivalent expressions to use and the end up having the same byte count. you get to choose the one you like :3
wait i just came up with a shorter thing nevermind
2:47 PM
You're given a number. You need to maximize that number, and then later minimize that number
yeah... I overlooked the part about the minimum, so I thought the first column in the output was just the input
I actually ran into that same problem...I was trying to minimize from the maximized number :P
python strings make number manipulation so nice
anyways, I was reading this post: meta.codegolf.stackexchange.com/questions/2527/…
I don't think your answer is sufficient
it's a bit lame though that the test cases don't cover interesting edge cases
They try to trick you
@MartinBüttner that's common at programming competitions. they don't even tell you what the edge cases are. that's your job
2:51 PM
the last problem got me...their sample mazes were maximum 5 by 5, but their test problems are huge
fair enough
@NathanMerrill what would you add?
We don't have a good close vote
assuming the problem is well written
@undergroundmonorail Definitely true of ICPC
We had a challenge where we were to accept a number and print it to the screen. So easy right?
@NathanMerrill you can use a custom off-topic reason
Test cases were 1, 14, 25, etc. Then they pass us 0001.
2:53 PM
Does that meta post make it against the rules?
@Rainbolt oh geez
@Rainbolt that's not missing test cases. that's lack of specification.
"Create a function called isSolved() that takes a 3*3 list of 0s, 1s or 2s representing a tic-tac-toe board. 0 == empty, 1 == X, 2 == O. Return 1 if X wins, 2 if O wins, 0 if it's draw or -1 if the game isn't over yet."
@NathanMerrill it's a copyright violation at least
def isSolved(b):b=eval(`b`.replace('2','-1'));b=map(sum,b+zip(*b)+[[b[i][i*x-y]for i in 0,1,2]for x,y in(1,0),(-1,1)]);return 2if-3in b else 1if 3in b else-(0in b)
not too happy with how i got the diagonals but the site it's on isn't even about code golf so w/e
2:56 PM
@MartinBüttner Quite a few people complained about that. In my mind, 0001 is a number, and 1 is a different number. I mean, if your bike lock combination was 0001, you couldn't just enter 1.
@Rainbolt I'd say a bike lock combination is a 4-tuple, not a number ;)
but okay
but I wonder, why did you even convert the string to an integer in the first place? or did you have to check that it's a valid number?
that's actually fun to say four-tup-le
@MartinBüttner Something in the challenge required conversion. I can't remember what exactly
oh shit it's my birthday
i forgot
3:00 PM
well happy birthday then! :D
thank you! happy birthday to you too
you're a bit too early ;)
well sure, but you'll have a birthday eventually
i hope it's a happy one
@Rainbolt @Geobits btw, the new weekly challenge round will start at some point today, and (provided someone else doesn't have a better idea), it might become a KotH. I thought you might be interested (and/or willing to help out with a controller).
@undergroundmonorail wait i can save a heckload of bytes hang on
3:02 PM
theres another problem to close
Q: Looping Program Prompt

ErinThis is the prompt Poor ol' Freddie the Wonderdog is lost in a tunnel at NODE 0 (see diagram). He can move one node at a time in either direction, right or left, with equal probability. When Freddie hits node L2, however, a force of nature propels him instantaneously to node L4. He escapes the t...

@MartinBüttner Yes and yes.
I'll let you know when the chatroom is up
(i.e. when feersum has posted this week's challenge)
Also, found the dang problem, and looking back at it, it does look like leading zeros could be simple dropped. It is underspecified. acm2012.cct.lsu.edu/localdoc/problems-practice/prb.php?prob=1
@Martin Thoughts on taking the Wolf board to two other challenges? Capture the flag and King of the Hill? Would they be too similar for you?
@Rainbolt i think with "These numbers are never used for math!" they were trying to imply "don't make it a number type" because it's common wisdom to keep numbers you won't do math with (phone numbers, etc) in strings to avoid trouble. that is bullshit
3:05 PM
I don't want to beat it to death, but both games seem like something I personally would be interested in writing a bot for. But that's because I like Java and Java is a good tool for the job.
@Rainbolt possibly. at least you'd have to wait between the two of them as long as you waited since wolf now. but even so, I think it wouldn't hurt to modify it a bit more than changing the objective.
i wish i knew enough programming languages to know which ones are good for what purposes. i go into literally any program thinking "python can do that!"
because its true
well yeah i mean
python is turing complete
but it's not always the best tool for the job
Python is great for "I will give you this, and you will give me back this in a non timely manner."
3:08 PM
Java is good because of the massive amount of libraries it has
Python is fast to write code in
C++ is for speed
PHP is for web coding
isn't C faster ?
LOL php is for web coding
depends on what you are doing
what is it ? 2010 ?
what is ruby good for? i tried to get into it a while ago but for some reason it felt like python to me. and the places where it didn't feel like python were worse imo
Someone in our front office uses PHP and he came to The Pit to ask for help and found 17 developers all scratching their heads.
3:09 PM
what is a front office ?
@Optimizer read the first post here: isocpp.org/blog/2014/12/myths-3
@Optimizer that's where they work on the UI. rainbolt works in app logic so he's in a different office
nono i was joking
don't believe me D:
now, that's not to say that you could write your own super-fast sort() in C, but I wouldn't want to (nor could I, probably)
3:10 PM
@Optimizer depends on whether you want to have OOP or not
@NathanMerrill didn't this site just finish making fun of the person who wrote that for not knowing what they were talking about
yes :P
@undergroundmonorail web applications. and also it's a good stand-in for python if you just wanna script something quickly (if it doesn't have to be fast). it feels a bit less cumbersome than Python to me
and it's more fun to golf imo :D
3:12 PM
@MartinBüttner fair. i forgot rails was a thing, and cumberosity is totally subjective
there are a lot of options for web apps now
rails, grails, .net has a lot of MVC too , and many more
@undergroundmonorail I find not having a ternary operator, not having symbols for logic operators, and being forced to indent more cumbersome than the opposite ;)
my main reason for not liking python is the indentation only.
@MartinBüttner this is just conjecture, but i think most people are going to like golfing in the language thats their favourite normally. i know for me that golfing in python is such a joy. all its subtle quirks are second nature to me. i'm comfortable. it's almost... intimate? wow this got weird i'm stopping here
my main reason for liking python is the indentation only.
3:14 PM
I want to be able to make my own decision of using 3, 2, 1 space hierarchy for indentation
You can...
@undergroundmonorail I learned Ruby only for golfing something. and I haven't really used it for anything but golfing.
oh, you can do that Optimizer
I actually use Python more for real code than Ruby
3:15 PM
@Optimizer you don't need that link to do what you said, but in general you might be interested
(but I think your conjecture is the reason why I love golfing in Mathematica :D)
@undergroundmonorail but then its not python pyhton, right? ;)
@Optimizer sure, i'm not saying "this exists so your point is invalid". just that "if you would like to use python but can't get over the indentation, here's something that might interst you"
@MartinBüttner b if a else c is pretty much a ? b : c. your points are solid though, they don't bother me but i can see where you're coming from
ok. But personally, I will always choose groovy over python.
@Optimizer after almost 10 seconds of research i have this to say: groovy looks neat
3:19 PM
@overactor It might need some tweaking to get the best out of it, but it's always going to be only an estimate...
@undergroundmonorail that was thorough
@githubphagocyte Absolutely
i forget what it was but i posted a userscript somewhere and in the description i said "after literally seconds of testing, i bring you:"
so yeah, i'm a thorough guy
I set a default and use those values at the beginning instead of assuming every move is equally likely
That did provide a measurable improvement
I guess teh defaults are too good ...
3:21 PM
270 to 10K
@MartinBüttner My teacher offered our class an instant A if we get into round 2 :P
haha, nice
round 2 of ?
@overactor Does performance improve from the default? If not, just use the default :)
facebook's hackercup
3:23 PM
oh, who all here are participating ?
I just did that cooking the books problem
@overactor Does the table persist between games to allow further improvement or does the bot start from scratch each time?
did it just start ?
4 minutes back ?
@NathanMerrill you said you failed on Q3? did you do a BFS cycling through 4 maps?
@Optimizer no it started last night
it says 56 minutes remaining for me
3:25 PM
so did I enter in the last hour of the competition ?
56 hours
yes Martin, with some optimizations to avoid lasers
@githubphagocyte Starts from scratch, since I can't treat all opponents the same
3:27 PM
Ah of course - it's learning just that one opponent
I just noticed that my planes shoot eachother sometimes
@NathanMerrill huh, I'm surprised that doesn't handle 100x100 quickly enough
In that case maybe it's not the approach that is the problem - maybe you have a bug somewhere...
It's coincidence though
well, I'll do the other problems tomorrow and sunday. procrastinated enough with this for now.
3:29 PM
They just get in eachother's way
@MartinBüttner I love the fact that you schedule your procrastination...
actually, I just realized that I was doing a DPS search
it makes sense now
so I can use CJam for the problems ?
and I wasn't using A* either
3:36 PM
@overactor Maybe they could do with a few heuristics to avoid common pitfalls and then use the tables to choose from what's left
I modify my previous statement. C++ isn't the language for speed. ASM is
@githubphagocyte What I'm doing now is assigning a subscore to how well my planes seem to be positioned against each possible opponent and then multiply that subscore by the likelihood of the opponent making that move
ASM if you're doing a rushed job, otherwise FPGA
@overactor Could the subscore take into account friendly plane position too?
@githubphagocyte It should be, but I think there was a small bug
@overactor The small ones are the worst...
3:42 PM
Since by characters, they likely take up 80% of all of my bugs which makes about 79% of all of my code.
out of curiosity, is the "perfect program" purely functional?
or would it build off of oo designs?
@NathanMerrill perfect for what?
I'm looking for opinions
If you're talking an omnipotent benevolent AI then it's probably neither
3:48 PM
If it's just a program for a specific task I guess it would depend on the task...
I think I just got in a huge amount of trouble.
If it's completely perfect it probably doesn't matter how it's written, but if it's anything less than perfect it will need to be human readable for updates
@Rainbolt Unless we can help, should you be out there mitigating it...?
Or is it too late?
Can we help?
The chat has gone completely silent. Are you in trouble for shutting down the internet?
who shut down the internet??
3:54 PM
Oh - it's back up!
my internet completely died last night at 9, and wasn't predicted to go back up until 2am
I went to bed ;)
Do you mean you got a good night's sleep thanks to no internet? Or did you just sleep until 2am and then continue...?
I actually woke up at 4:30 naturally
but then I continued :P
3:56 PM
@Rainbolt You OK?
@Optimizer feature request for CJam 2.0: make the bottom of the stack an infinite number of 0s
y ?
00:00 - 16:0016:00 - 00:00

« first day (1441 days earlier)      last day (3454 days later) »