« first day (1502 days earlier)      last day (3324 days later) » 
00:00 - 22:0022:00 - 00:00

12:00 AM
Well, I don't really know what is causing it to slow down.
 
user55340
@abaldwin99 For over the phone communication, I would try to stick to base-36. Switching from upper case to lower case and punctuation (is that a dash or a slash) becomes awkward.
 
user55340
Aside from that, I would also look at the "how can I pack information in densely from the start. The most dense would be the time seconds (or minutes depending on resolution) since an epoch date.
 
user55340
The number of minutes since Jan 1, 2000 is about 8*10^6 which is a fairly dense value to pack in another format.
 
user55340
That 8*10^6 gives you 4RGU8 in base 36.
 
user55340
Thats three characters shorter than 2KKHQS58
 
12:13 AM
I agree in that seconds since a date will be as dense as you can get.
 
user55340
A quick look at 1000000(base 36) would be 60466176 minutes... and so you'll be good until December 19th, 2114
 
user55340
12:27 AM
Had the wrong number of digits there. 100000 (base36) = 60466176 (base 10)
 
12:56 AM
@MartinBüttner I'm definitely not posting, not sure about Fry
 
k, let's see
I'm wondering whether I should post my own reference implementation in CJam... it's shorter than any of the existing submissions :D
(not shorter than that Pyth though)
 
Shorter than Optimizer's?
 
yes
he refused to try the arrayless approach ^^
 
Oh?
 
yeah I think he said something like he didn't come up with it himself so he didn't want to use it
 
1:03 AM
Hmm k
I didn't actually try to figure out how other people were doing it, so I kinda assumed everyone did the same thing
 
I think everyone did, except Optimizer ^^
hm, I can't find my 30 byte solution right now, but I've got 31 now... still shorter
ah, found the trick that saved one byte
 
:P
 
whee 29
 
D: if you go lower my "A Python solution is good if it's within 2* CJam" rule will no longer hold D:
 
:D
I actually thought my last trick would be able to shorten yours as well but it's the same bytes
Basically, instead of i*(n/i%2*2-1), use (n%(2*i)*2-i)
this shortens my Mathematica answer by 4 bytes though
 
1:19 AM
:P nice
Operator precedence makes me wish there was a right-to-left % sometimes
 
one can also do (4*n)%(2*i)-i, but in Python that's even longer
@Sp3000 posted it... let's see if that provokes someone to beat it ;)
I'm still impressed that ><> is only beaten by the golfing and array-based languages
(oh, and TI-Basic...)
 
@Sp3000 are you talking about shotgun numbers?
 
@Sp3000 28...
 
instead of (n%i<1)*i*(n/i%2*2-1), you can do i*(n/i%2-~-n/i%2)
 
1:35 AM
wow, 4 bytes... how does that even work
 
n/i and (n-1)/i are equal unless n is a multiple of i
and so are equal modulo 2
taking their difference modulo 2 therefore gives +1 or -1 for multiples of i, and 0 otherwise
with the + or - alternating
 
that is really clever
 
And this is why I should just let xnor do all the Python golfs :P
 
hm, that trick gives the same bytes in CJam afaict
 
@Sp3000 you got the same number of bytes as I did
which inspired me to try extra hard to find this charsave
 
1:40 AM
The charsaves you come up with are always mighty impressive though
2
 
well I should sleep...
 
Also if ><> had a copy top 2 command it would have been a lot shorter :P
 
1:53 AM
@xnor Are you going to post that shotgun? I think it deserves an answer
 
2:09 AM
I'm always willing to post it for you. :)
 
2:55 AM
@TheBestOne I managed to cut some time off the program.
About 20%.
I really want to find a way to optimize all of the modular arithmetic.
I feel like that is probably one of the slowest things.
Since the core size is a multiple of 2, I could probably do some bit-level stuff.
Okay, I'm going to try x & (n - 1) instead of ((x % n) + n) % n
 
@Sp3000 no, you should just edit it in
 
3:15 AM
Okay, that one change cut 70% off of execution time.
 
Somehow that doesn't sit right with me :/ it's a whole 4 bytes by completely revamping the expression
 
 
7 hours later…
10:39 AM
@Sp3000 found another byte just when turned off my laptop last night ^^
so with xnor's improvement that's a factor of two again ;)
 
11:02 AM
@MartinBüttner although it is technically "Lesser of" function :) jsoftware.com/help/dictionary/d011.htm
 
I think that's the definition of "min" ;)
 
Ahaha nice :P
btw annoyingly I'm having trouble finding good resources for implementing your own regexes (with groups)
I guess it's not something people do every day
 
there is a really good series of articles from the RE2 engine (google's regex engine), but I think that mostly focuses on the actual regular features
 
(hacked the min function anyway codegolf.stackexchange.com/questions/42079/…)
 
Hmm I read the first one, but didn't take a look at the others
Will take a look
 
11:15 AM
otherwise, I guess just reading regular-expressions.info should help
it quite often explains how the backtracking works
 
Not so much the actual implementation though :P
 
if you want (and can read CoffeeScript) you can read my code here: github.com/mbuettner/regex-vizard ... I guess /tests and /engine would be interesting for you. I never completed this engine, but the features that are there do work, including capturing groups (no backreferences yet, though, but they should be simple).
this is intended to implement the ECMAScript flavour to spec
 
Ahaha thanks :)
 
in particular, when a group is repeated, itself and all the contained groups are reset to empty on each repetition. I think this is different in some other flavours.
so the \2 in (\2|(a))+ will always be empty or fail I think
 
Hmm interesting, you've got an Indeterminate state in here
 
11:22 AM
do I? :D
it's been a while
 
the vision for this tool was amazing... I think it would blow all of the existing free regex debuggers out of the water... but like so many projects, I never finished it... :D
 
Heh. Always.
 
ah right... Indeterminate is if the pattern currently fails but there are more options to backtrack through
 
Hm...
 
11:25 AM
like (a|b|c) against b. then a would be Indeterminate, b would be Sucess and after c it's Failure
I guess you could also look at the sources of Java and .NET (github.com/Microsoft/referencesource/tree/master/System/regex/…)
 
12:01 PM
Yay, thanks to the built-in restriction I found a solution (without sort function) with the same score as algorithmshark. codegolf.stackexchange.com/a/47629/7311
 
My latest Core War run had 15 pair-ups in slightly less than 10 minutes.
...which is rather remarkable. My first run had 6 pair-ups in 30 minutes.
 
@PhiNotPi how can you beat a bot in Core War if it just copies DAT to 'random' positions?
(random could be achieved with a big increment relative prime to the core-size)
 
12:18 PM
@PhiNotPi I'm rather surprised by how well Evolved is doing.
 
Did you see my comment on your answer?
 
Yes I did.
 
It seems like most of Evolved's code can be cut out to produce an even more efficient bot.
 
probably
 
12:33 PM
@randomra Submit a bot and find out!
I think the exact increment size could make a big difference in performance.
 
Don't want to post bots that don't work. And I'm too lazy to test it for myself. :)
I hope to find out the answer from others bots eventually.
 
for all you Python lovers:
 
Eww. It's like python and java had a baby, and it was hated by both.
2
 
difficult to have a non-hated java-baby
 
@Geobits exactly
@randomra groovy
 
12:54 PM
0
A: Sandbox for Proposed Challenges

user23013Add and simplify surreal numbers and combinatorial games A game can be defined recursively as {l1,l2,...|r1,r2,...} where lk and rk are games. In this challenge, you can assume there are finite number of l's and r's in each game. The simplest game is where the sets l and r are both empty: {|}...

 
1:51 PM
0
A: Sandbox for Proposed Challenges

feersumWhich Children Don't Play Well Together? [code-golf] You are a kindergarten teacher who is having problems with fights breaking out among the students. You have noticed that altercations happen only when certain groups of children are together. A group of children who can't play well together, b...

 
^ Java and Python's children
2
 
"My dad is faster than your dad!"..."Oh yea? Your dad is fat and ugly!"
 
Java + Python = from __future__ import braces
 
I believe this guy as much as I believe that Doorknob is 15.
@Doorknob Are you private schooled or home schooled?
Just wondering, because you are awfully active for someone who would normally be in public school between 8 AM and 4 PM, and you live in my time zone.
 
I almost said something about that paper, but then I realized it sounded like a broken record high school kid who thinks he is too smart to be in Math class.
I used to hate it when kids in my class would raise their hand and interrupt the entire class with "Miss Teacher, how does this apply to the real world?"
I'm sure it has a purpose, or will have a purpose, and I am just too short sighted right now to be able to see it
 
@Rainbolt Doorknob is 14
 
Exactly. I don't believe he is 15.
 
2:31 PM
I don't believe you
 
I don't believe you don't believe he doesn't believe it.
 
I don't believe that either
 
Java = 4 chars. Python = 6 chars. 6 / (6 - 4) = 3. Half-Life 3 confirmed?
 
@Geobits and I think you missed a lot of "that"
@PhiNotPi What the... I don't even
 
@Optimizer That doesn't need that. That originally had two that's that were not that necessary that I edited out of that.
 
2:35 PM
 
@PhiNotPi ceil(<sup>floor(π)</sup>φ) = 3
Wow... I thought <sup> worked in here.
 
2:53 PM
3 = 3. Half-Life 3 confirmed?
 
3:05 PM
@Rainbolt Ahem, 14. And 13 until a few months ago. :)
@Rainbolt No, I go to a pubic school.
I might go to a private high school though. If I get accepted.
 
What's pubic school like?
5
 
@Doorknob How do you have time to be here all day?
 
Didn't you know? Kids don't pay attention in school now. Not like when I was a kid, of course :P
 
My partner and roommate is a high school teacher. On the one day that I surprise delivered him lunch at work, half of his class was standing up, backs to the powerpoint presentation, phones in hand, and talking to each other while he was lecturing. It made me angry that he would even allow that to happen.
 
Public school seems fine to me.
 
3:24 PM
They certainly seem to churn out a higher percentage of average kids than private or home schools.
 
@Rainbolt I don't know what the situation is in your district, but in many places teachers have basically no recourse. If the (very) limited methods available to them don't have an impact, it's hard to fault the teachers for that.
 
I suggested that he call parents every single day until the kid gets it right. Every day that the kid can't be quiet, call the parent. The parent will eventually get tired of the phone calls.
Of course, if they ask him not to call back, honor that
But what kind of parent would actually say "Stop calling me about my kid"
I even offered to help him make all of the calls
This would really frontload his semester and then the rest of the semester would supposedly be smooth sailing
 
If it was just a call like that, every day? I'd tell him to stop. Call me for updates or something out of the usual, by all means. If I'm aware of the situation, constantly badgering me about it will only server to shift my view of the teacher, not the kid.
 
Ok, but he needs to ask for help.
He can't force kids to pay attention
 
After one or two calls, the parent is aware of it and trying to work on the issue, or aware of it and doesn't care. Repeated calls at that point serve no purpose but harassment.
I agree he can't force it, but neither can parents.
 
3:29 PM
Parents have far more leverage
I'm open to better ideas obviously, but I can't stand the "There's no recourse" attitude
 
Parents definitely have more options available, but you can only force your kid so much. People in general are stubborn, and it's worse at that age.
I don't like it much either, but in my opinion it's ultimately parents (over a generation or so) that have tied teachers' hands.
 
I've also pushed him to stop changing kids grades just so that they will pass, and instead give them opportunities to raise them (that they have to work for). Seems like extra credit is better than free credit
 
confiscate phones, stare the children in the eyes, make them come up to the front to write on the board, mock them in front of their friends, don't face away from them, randomly raise your voice, we had a great teacher who would literally stand and shout at a random child for no reason at all for a minute, and then pace around the room, and repeat
 
He can't confiscate phones.
 
what?!
that's... madness!
 
3:33 PM
@Visual Like I said, parents have tied their hands. Kids complain to their parents, parents complain to the board, putting rules in place to neuter their authority.
 
But he can fail students who use their phones during a test. I pushed him to do that too, and he told me it worked
A student challenged him on it, and the board sided with him
 
Sure, that would definitely fall under most anti-cheating rules.
 
Err... maybe not the board. I think it was just the principal
 
@Geobits I'd have to agree, having heard my mother's comments (she was a teacher in the past, and is a teacher now again, now that her children can look after themselves)
 
@Rainbolt Yea, the board, principal, superintendent... whatever level they have to take it to to make sure their special snowflake doesn't get his feelings hurt any more :P
 
3:35 PM
I'm also aware of at least one teacher at my school who all the students liked (and was a good teacher), but he effectively had to step down from his position because of parents
 
Everybody's favorite at my high school, was the most ruthless, serious, no bullshit teacher in the entire school. His was the only class I ever made a C in.
 
@Rainbolt I know many teachers don't have control of much of the curriculum or grade system, but can he weight lecture participation in the overall grade? If failing is the motivator that works...
 
He threw a chair at the wall when one of the cheerleaders wouldn't shut up
He also had tenure and taught college, so that probably helped
But he commanded respect because he was able to fail you, and because of that I feel like fudging grades is the number 1 cause of losing all respect
 
the aforementioned teacher routinely referred to one student as a "sewer rat"
he was always the example of incompetence/lazyness when an analogy was drawn
 
I agree that fudging grades is a really bad idea. Of course, failing half your class is a good way to get fired nowadays, too, which doesn't help.
 
3:39 PM
I think I've described my school a little bit in the past. It follows the "expeditionary learning" model (more freedom and responsibility on the part of the student.)
 
So give the kids something to do to make it up. Call the parents and say "Your kid is failing, but I gave him this difficult extra credit opportunity to make it up. If you want your kid to pass my class, he absolutely needs to complete this extra credit and get it right."
That way you don't need to fudge grades
And when the principal asks, "Why is your class failing?" you have something concrete to point to.
 
sidebar tells you what pubic school's like
 
my mother often complains of the inflated grades of students she receives from other schools
 
I agree with that, except for the "concrete to point to" part. Yes, it's concrete, but it might not matter. Anywhere that funding is based (at least partly) on grades/scores is going to have this problem.
You have to be totally willing to risk losing your job to go that route. Some people don't have that, especially since for teachers, that ultimately means moving to another district to find work.
 
I guess you could play the game for 15 years and then pick up your philosophies when you have tenure.
 
3:44 PM
For sure! My favorite teachers were all the old ones that didn't give a crap about rules any more :D
 
I hadn't really thought about that before. I guess you really don't know better than everyone else as a new teacher even if you think you do.
I'm just worried that after 15 years he will think that fudging grades is normal and the right thing to do
 
@PhiNotPi If an indirect address refers to an immediate address or another indirect address, which address is used?
 
@Rainbolt It's definitely a shitty thing to contemplate. Many things in this world suck.
 
4:07 PM
@PhiNotPi I added an explanation for evolved.
 
4:26 PM
one of the coolest 404 I've seen codepen.io/imathis/pen/ZYMmLx
 
@Peter thanks for not letting me down on the shotgun question ;) ... very nice answer. too bad, it's still beaten by Pyth :/
 
You know, it never occured to me that with (-1)** you don't need the %2 :/
 
lol yeah
 
4:46 PM
@MichaelT Cool that's what we more or less decided on. Some others here had a good point on readability... i.e. 'B' vs '8' or 'O' vs '0'. So will likely do base-32/33/34 after doing some test print to see how certain characters look.
 
user55340
All caps, no confusion between glyphs (don't allow either 0 or O)
 
I was thinking of putting a note on the inputbox that said zero's and O's are interchangeable. Then doing a replacing those characters from the input string before it's passed off to my base-33 function
 
if you use all smalls, then there is no confusion at all
you can use all a-z0-9 and many more common easily spoken symbols
+-=!@#$%&?:;,.
that gives you around base 50
 
yea i'm thinking of throwing in the hyphen/period/slash. Other ones are easily spoken but I don't trust the user to see the difference between ! and l
 
yeah
you can fine tune that
 
4:54 PM
yup yup will do so. Thanks again.
 
hi
I have a puzzle type question ... imagine you are give two binary arrays, say A=1001 and B = 1010
 
@Lembik there's an imposter ^
@felix (kidding, go ahead :))
 
@TheBestOne When an indirect address refers to another address (the intermediate one), only the number matters, not the addressing mode.
 
we are interested in the or of ands .. so we are interested in (1 and 1) or (0 and 0) or (0 and 1) or (1 and 0) which equals 1
@MartinBüttner that was a confusing joke :)
 
Lembik is the one around here who is obsessed with binary string based challenges ;)
 
5:00 PM
@MartinBüttner ah :) I claim binary is owned by everyone
 
no
hi
 
@felix so... is that the challenge, or is there more coming? :)
 
so... I want to map the alphabet of B to something that includes single character wild cards (? symbols) so that an exact match with wild cards will give me the same answer
I can do that if I am allowed to both A and B I think
by the following method... map 0 to ? and 1 to 0. Now if there is no match then the logical answer is 1
does this make sense?
@Optimizer hi
 
Hm, I don't really understand... if you map 1 to 0 in B, don't you lose the one AND operation that you know is true?
 
@felix Don't encourage him
 
5:04 PM
@MartinBüttner I might have got this wrong.. let me check
A-> 1??1 and B-> 0?0? . This doesn't match so the answer should be 1
let's try again with another example, A = 0001 and B = 1010. Now A ->???1 and B->0?0? . This does match so the logical answer is 0
 
I don't understand how this not matching implies 1
 
@MartinBüttner ok so the logical answer is 1 if there is at least one pair of 1s that align. This is the same as saying not(there are no pairs of 1s that align)
we are testing "there are no pairs of 1s that align" using the exact matching with wild cards and negating it
at least that is the idea
but my method may not be right
 
so how does the mapping work? you map 0 -> ? in both A and B, but 1 -> 0 only in B?
 
@MartinBüttner in B you map 0->? and 1 -> 0 . In A you map 0->? and leave 1 alone
 
yeah, that's what I meant
and what is "an exact matching with wild cards"? only ? <-> ? or ? <-> 1 as well? or even ? <-> 0?
 
5:10 PM
? matches 1,0 and ?
all three of them
 
any better methods are gratefully received :)
it would be nice to do it without the negation
which I feel should be possible...
and even better of the wild cards were only in one of A or B and not both
@MartinBüttner do you believe my solution? I think it's ok
 
sorry, but I think I still don't quite follow the reasoning. since you're only looking for matches now, how can you distinguish 0 <-> 0 from 1 <-> 1?
(regardless of the choice of alphabet)
(also, what is the purpose of this ^^)
 
@MartinBüttner you don't need to. "we are interested in the or of ands .. so we are interested in (1 and 1) or (0 and 0) or (0 and 1) or (1 and 0) which equals 1" We are only looking to see if at least one pair of 1s is aligned.
oh hang on.. I misread your question
@MartinBüttner let's just look at A = 1 and B = 1 first. We map B ->0 and we have a mismatch, Now let's look at A = 0 and B = 0. We map A -> ? and B-> ? . Now we have a match. So we get a different answer
did that answer your question?
what's it for? Just silly puzzles I like :)
you can do exact matching with wild cards in large documents quickly using FFTs
so it seems almost useful :)
 
My coworker just gave me a funny look when he found a GOTO in my T-SQL query. Before a word came out of his mouth I said "I made it 50% faster." and he just didn't say anything after that.
 
5:19 PM
okay, let me get this straight. if all pairs match after your mapping, you deduce 0. if at least one of them is a mismatch, you deduce 1, right?
 
Also made it 50% less readable... but who is counting that?
 
@MartinBüttner yes
@Rainbolt does it need to be faster?
@Rainbolt feel free to reply "Everything needs to be faster!" :)
 
and you want a single mapping that preserves the result for arbitrary inputs?
 
@MartinBüttner yes.. well my mapping works. But I would like a different one that either only has wild cards in either A or B or at least gets rid of the negation
 
@felix Yes. The query needed to run in under 30 seconds, and it was running in 50.
 
5:21 PM
@Rainbolt bingo! :)
 
If he would allow me to remove the indexes he worked so hard to create, it would run instantly.
 
@MartinBüttner the inputs are always two binary strings of the same length
@Rainbolt ah...
 
But he's a superstitious guy, and proving to him that his indexes are actually hurting performance would take too much of my time
 
understood
 
Superstitious or just proud. Not sure which is the better word there...
 
5:22 PM
annoying? :)
 
@felix Can you give some concrete examples of your desired input/output? I'm having a hard time following this chat thread.
 
@Geobits yes... A = 0001 and B = 1010 should output No. A=1001 and B = 1010 should output yes
@Geobits but the only thing you are allowed to do is map the alphabets of A and B to a finite set of symbols and the wild card ? and then do exact matching with wild cards
 
how about mapping 1 to 2 in A and B and 0 to 1 in B.
would that then work without negation?
 
This seems like a very arbitrary way of solving a simple problem :P
 
@Geobits Well apparently doing exact matching is faster than checking only for 1=1, but not 0=0.
 
5:30 PM
Sure, but a simple loop over the elements is the simple way to do it in most languages. O(n) with only two operations on single bits per iteration.
result |= a[i] & b[i]
 
5:45 PM
@Geobits Uhh, what do you mean?
@Rainbolt The magic of The Internet™
 
@Doorknob Just curious. I went to a public school. And typos suck.
 
Oh, heh, didn't even notice the typo
 
@MartinBüttner that shouldn't work
 
@Geobits I guess it's also a question of whether your data is more likely to produce a 1 or a 0, so which one you want to fail early
but I guess you can do the negation without the need to remap the alphabet and introduce wildcards
 
Yea, I just can't see how doing the mapping and then matching with wildcards would ever be faster. I'm not against arbitrary restrictions every now and then, but this just seems weird ;)
 
6:00 PM
@Geobits So what do you mean by "what is it like?"
 
I've just never been to a pubic school before, that's all. I imagine it being either very fun or very terrible.
You may be 14, but I'm 12 at heart :D
2
 
> I went to a public school.
 
> @Rainbolt No, I go to a pubic school.
The entire thing is a bad joke over a typo. Nothing to be taken seriously.
 
Oh, hahaha, I missed the typo again
That's what I get for trying to chat and eat lunch simultaneously
 
Yea, you're supposed to be chatting during class. Shame on you for wasting your precious lunch time.
 
6:07 PM
@MartinBüttner 1 to 2 in A and B and 0 to 1 in B. Let try A = 0001 and B = 1010 . We get A= 0002 and B = 2121 . This doesn't really get us anywhere does it?
 
sure, it doesn't contain any matches, so it gives 0
but if the original had included a 1 <-> 1 pair that would yield 2 <-> 2
I meant this would be a mapping that works without negation
 
A=1001 and B = 1010. 2002 and 2121. This gives the same result where it shouldn't
 
okay I think there was a misunderstanding
if you still want to check for everything matches then I don't think it's possible without negation
(I thought without negation you were looking for a single match but didn't want to distinguish between a 0 = 0 match and a 1 = 1 match)
 
Given that @felix talks about the ors of the ands, I think that what he wants to test is (A & B) != 0. That's about all I understood, though.
 
6:23 PM
@MartinBüttner you might be right you can't do it without negation. Can you do it with wild cards in only one of A or B?
@PeterTaylor yes thank you
 
@felix let's stop using numbers for the target alphabet. in A, map 1 to a and 0 to b. In B, map 1 to b and 0 to ?.
 
@MartinBüttner ok
 
I think that should work
 
@Geobits How did you do that?
Oh, nevermind. That's a quote from Doorknob. It looks like a quote from me, but it's addressed to me
 
> Quotes are malleable anyway. ~ Isaac Hayes
 
6:31 PM
@MartinBüttner thanks very much! I started with that but persuaded myself it wouldn't work. But in fact it does
 
@Geobits The favorites bar shows how you made the quote :D
 
I thought it just meant that star is greater than my quote.
 
@felix lol, I'm glad we finally figured out what the other one is talking about :P
 
I went to lunch with Geobits trying to figure out what Felix is talking about
I come back and Martin is trying to figure it out
I'm glad to see that the dynamic "I don't understand you" duo is not understanding someone other than me.
 
What's that? Confusion makes you glad? This is what I suspected all along ;)
 
6:45 PM
:)
 
I finally got around to finishing up the polygon area proposal
could someone give it one last read before I post it?
6
A: Sandbox for Proposed Challenges

Martin BüttnerArea of a Self-Intersecting Polygon code-golfgeometry Consider a potentially self-intersecting polygon, defined by a list of n ≥ 3 points in 2D space. E.g. {{0, 0}, {5, 0}, {5, 4}, {1, 4}, {1, 2}, {3, 2}, {3, 3}, {2, 3}, {2, 1}, {4, 1}, {4, 5}, {0, 5}} There are several ways to define the ar...

(@Peter, I'd value your opinion since it's one of the trickier problems, and you're the kind of person to spot some dodgy edge cases I might be overlooking ;))
@Rainbolt Did you understand it right away? :P
 
@Martin It says no probabilistic methods, but what about flood fill and count? If you use a large enough scale it should be pretty accurate.
 
ah yeah, that's what I was actually trying to avoid
so I guess I'll have to go with a time limit after all
@Geobits is this better?
 
Seems fine
 
7:05 PM
@MartinBüttner Of course. I understand all problems right away. Communicating my understanding is the hard part.
 
That explains a lot...
 
1
Q: What counts as a proper quine?

AJMansfieldThe basic definition of a quine is a program that, when run, produces its own source code as output. There are a number of techniques and a number of way to implement those techniques across a number of different languages. However, not all quine programs are equal. Clearly, any quine in HQ9+ or...

 
@MartinBüttner It doesn't really make sense to talk about 6d.p. accuracy any more given that you're now restricting the input to integer lattice points.
Hang on. How do you have outputs like 2788.39?
 
why wouldn't you? the intersections can occur at rational coordinates, right?
 
7:21 PM
Ah, I see. So my assumption that you could triangulate to half-integer areas is wrong. Ok.
 
I was actually wondering about the same earlier.
 
@MartinBüttner You might want to make a picture where the lines are not all horizontal or vertical.
 
I presume the test cases cover all the disagreements with other definitions of area (in terms of winding order etc.) ?
 
Oh, wait, there's a fine print.
 
@PeterTaylor they are randomly generated... I might add one with the opposite vertex order, just ensure winding order.
done
 
7:34 PM
I found the deviantart profile of the guy who posted that absolutely massive rambling wall of text answer on Board and Card Games. rathenmedus.deviantart.com
 
@PeterTaylor anything else that looks questionable?
 
7:48 PM
@MartinBüttner, I think that CJam quine "cheats"
 
how about:
"_p"
_p
 
there isn't really any code that explicitly prints the block part
 
okay, then how about {`"_~"+o}_~
@Runer112 I don't actually see that as a problem though
 
that seems not to "cheat"
a quine like {} or 0 seems on a similar level of cheating as {"_~"}_~
 
hm, I find those quite different
but for definiteness, I wouldn't mind disallowing autoprinting
I think I'll go ahead and post the polygon challenge because everyone this side of the pond switches off their PCs for the night...
here you go:
1
Q: Area of a Self-Intersecting Polygon

Martin BüttnerConsider a potentially self-intersecting polygon, defined by a list of vertices in 2D space. E.g. {{0, 0}, {5, 0}, {5, 4}, {1, 4}, {1, 2}, {3, 2}, {3, 3}, {2, 3}, {2, 1}, {4, 1}, {4, 5}, {0, 5}} There are several ways to define the area of such a polygon, but the most interesting one is the ev...

 
7:59 PM
Stack Overflow actually has a question that asks for the algorithm to solve your problem.
 
I think I found that but it didn't seem to have a satisfactory answer
yeah the answer only mentions Bentley-Ottmann, which only gives you the intersections
 
8:57 PM
have you guys seen Ell's answer to the polygon challenge? that is absolutely amazing (along with a really nice explanation).
3
A: Area of a Self-Intersecting Polygon

EllPython 2, 323 bytes exec u"def I(s,a,b=1j):c,d=s;d-=c;c-=a;e=(d*bX;x=(d*cX;return e*(0<=(b*cX*e<=e*e)and[a+x*b/e]or[]\nE=lambda p:zip(p,p[1:]+p);S=sorted;P=E(input());print sum((t-b)*(r-l)/2Fl,r@E(S(i.realFa,b@PFe@PFi@I(e,a,b-a)))[:-1]Fb,t@E(S(((i+j)XFe@PFi@I(e,l)Fj@I(e,r)))[::2])".translate({70...

 
I upvoted it before you did :)
 
9:24 PM
let me edit my comment dammit
I guess there's a time window on this or something?
am I going to have to scum it up and just delete it and re-post my edited comment
 
5 minutes
 
that's dumb
 
kinda makes sense... no one gets notifications for edited comments, and no one checks them to see if they were edited.
 
9:39 PM
@PhiNotPi mbomb's dwarf doesn't work at all
 
9:52 PM
At all?
It is a controller problem, or a dwarf problem?
@TheBestOne ^
 
dwarf
All the other bots look like they work as designed.
 
I may decide to add Graph View to the "official" interpreter.
 
I just changed it 5 minutes ago.
 
Totally unrelated, but March Madness is going to be a thing in not too long. It's been a long time since I've made a bracket for it, and I want to try it the "right" way (i.e. programmatically).
 
According to Wikipedia, March Madness is the main part of the breeding season of the European hare.
 
9:59 PM
@TheBestOne I think you edited the wrong part of your answer. There are now two copies of Graph View and not a modified Game.
 
00:00 - 22:0022:00 - 00:00

« first day (1502 days earlier)      last day (3324 days later) »