1:44 AM
wow, so many regex gurus here... codegolf.stackexchange.com/q/179747/17602 seems like it might be their next target

1 hour later…
Anonymous
2:51 AM
@Veskah I was trying to figure out how a shrug could be loud, and my shoulder popped. So I guess I know how.

heh

@Neil In a pure regex though, taking unary input, it'd have to return 0 for 0 and 1/n for everything else
perhaps no-match for 0 would be more appropriate

codegolf.stackexchange.com/a/180263/78849 Is a spicy interpretation of arbitrary bases

8 hours later…
11:25 AM
@Deadcode I was wondering whether it would be more efficient to divide by all primes of the form 4k+1 and then check whether the result is a square or twice a square

4 hours later…
3:44 PM
-1

HERE CHALLANGE FOR YOU ? IF YOU CAN SOLVE THIS COMMENT BELOW :) HAPPY CODING

4:13 PM
@Neil Great idea, thanks! Did it.

4:25 PM
I was wondering if were merging k sorted lists. Our best time would Onlogn using a heap. Which is the same as sorting (quick sort) . and that's because we have to look up values in our heap for every value we come across.
How about instead of using a heap to look up and insert, we use a binary tree to break down the list into intervals using right and left pointers. left = lo to mid and hi = mid+1 to hi. until our leaf is a single pointer on a single list. Then we just merge every subsequent list into the furthest left node as we traverse the tree. Would this be O(nk) or O(nlogk)

4:44 PM
I came across this paper which says it's nlogn but I don't know if it's right.

5:23 PM
@Deadcode checking for a square is still eye-watering if you don't have recursive backreferences though
@Deadcode since I got it so badly wrong last time, would you mind explaining why `|))\12(?!^)` can't be `))\12`?

1 hour later…
6:29 PM
I'm teaching my friend 05AB1E, any suggestions on explaining what a stack is?

Anonymous
Pancakes

Another good example is those plate stacks that you'll sometimes find at self-serve bars/restaurants/whatever where there's a spring at the bottom so when you put a plate on top, it pushes the stack lower, and when you take a plate off, the stack lifts up.

6:54 PM
0

This answer returns the reciprocal of the required output, rather than the required output itself. In a simpler challenge this might cut out a significant part of the work, but for this particular challenge the bulk of the work is still being done. However, this still gives the answerer an advan...

Super useful dice trick: instead of rolling 6d8, you can simply roll 4d4 + 2d6 + 1d10 + 1d12 - 2 and the results are almost indistinguishable.
@MilkyWay90 how much prior programming experience does this person have?

7:35 PM
@PhiNotPi Beginner in Javascript (forgot most things about Javascript)and experienced in python

2 hours later…
9:23 PM
@Neil Now that you mention it, it seems to work, but I didn't try it originally, because I thought it shouldn't work. If the perfect square test fails, it should backtrack the loop that divides by ≡1 mod 4 primes, and that should be able to make the perfect square test succeed when it shouldn't. So it seems I have to explain why it does work when it seemingly shouldn't...
Do you know why it works?
Oh, silly me. Yes, backtracking will never change a failure to a success. It'll only make the regex slower, but that's fine, this is golf.

9:43 PM
joys of the burden of proof... :P