12:04 AM
@Ginger how unexpected of you to pick up on that
And by unexpected, I mean COMPLETELY EXPECTED!
wait what
that was a random guess! you're that Doofenshmirtz?
Didn't I show you my tragic backstory using my tell-backstory-over-chat-inator?
do you have the slightest idea how little that narrows it down
There was a flashback and everything. Anyhow, time to reveal my scheme to take over the tri-SE-network area. Behold, ginger the catapus, the doofenshmirtz-reference-inator! With one push of a button everyone in chat rooms on pldi, code golf and code review will have no choice but to join in with making doofenshmirtz references
you're truly despicable
but why those three sites
ohhhhh, location

1 hour later…
1:17 AM
i always forget pokemon go still exists
this was recommended uni reading btw

2 hours later…
3:27 AM
@Ginger @RydwolfPrograms YouTube just put this in my recommendations and I thought of you
pfft
glad to know that's my legacy here
@DLosc YES
4:25 AM
Is it good to write `(a) .add (b)` to simulate infix operation?
good idk, but certainly not bad, even without spaces `(a).add(b)`
isn't it just a method call
Rust has tens of such methods on primitive number types, and also on other types like `set1.intersection(set2)` where Python would say `set1 & set2`
5:26 AM
0

Given an input string, first convert each character to its ASCII value. Generate a reversed Fibonacci sequence of the same length as the input string. Encode each character by adding its ASCII value to the corresponding number in the reversed Fibonacci sequence. Convert the resulting values back...

@l4m2 I think in general it obfuscates what's actually going on, so I don't especially like it. (E.g. unlike with a typical infix operator, you can remove one pair of parentheses but not the other.)

1 hour later…
6:39 AM
CMC Is it a recursive palindrome? A recursive palindrome is a palindrome and each half, either including or excluding the middle character, is also a recursive palindrome
So `ababa` and `abacaba` are both recursive palindromes, as well as `ababacababa`

1 hour later…
7:50 AM
With shortcircuit(not in code) is this O(n) or O(nlogn)?
Good question, I theory it's 2^log(n) = n I guess but I'm not sure if it's possible to contrust a test case that actually requires recursing that far
I think it's log(N) because it's impossible for both x and x[:-1] to both be a palindrome unless it's just a single letter repeating, and if it's a single letter repeating both branches will return true thus the second branch will never be entered
If only branch when length is odd then it's O(n)
If also branch when even then `abbaabbaabbaabba` is 2x `abbaabba` is 4x `abba` is 8x `ab`

1 hour later…
9:12 AM
@l4m2 surely you don't have to test both halves?
@l4m2 If you assume comparing strings is O(1) then I think it's log n
@Neil One half includes and one excludes the middle letter
@Neil Both half is shorter
ah, sneaky
9:24 AM
@mousetail string comparison in python is O(min(len(s1), len(s2))) if the strings are of equal length (which i think is guaranteed here)
That's true, but it makes the question a bit boring since you obviously need to check every character via the equals. Assuming it's O(1) would make the question more interesting. In practice the string comparision is going to be done in C which is a lot faster than python so it might be a decent enough approximation even if it's incorrect
fair enough
isn't there also x86 asm instructions specifically for string comparison?
i guess that would fall under "it's made in C and GCC will optimize it"
9:39 AM
It technicaly has to still be O(n) but could be fast enough for that not to matter
9:51 AM
i jsut checked to be pedantic and it is in fact O(N) but you're right that when we're talking CPU cycles it simply does no matter in python
i guess it could be O(1) with a dedicated circuit
10:03 AM
i have the stupid, obviously not since the strings can be of arbitrary length

3 hours later…
12:53 PM
@Themoonisacheese there are but on modern CPUs they're not worth the while of optimising for them

1 hour later…
2:15 PM
@DLosc and there's no precedence--`(a) .add (b)` may behave like `a + b`, but `(a) .add (b) .mul (c)` most certainly does not behave like `a + b * c`

4 hours later…
6:38 PM
The mifepristone ruling seems a little too convenient
I'm guessing there was a deal and we're gonna get a nightmarish ruling soon
@mousetail I can't decide if `ababacababa` is more fun to pronounce with the 'a' sound from "cat" or "father"
I'm leaning toward the latter
7:23 PM
ababacababa is you
6

1 hour later…
8:26 PM
@emanresuA what makes you think it’s not good if it doesn’t get on HNQ?
Maybe this is normal on CGCC, but the expectations seem to be set a bit high.
9:07 PM
doesn't mean it's a bad challenge just means it won't get as much attention/people trying it
when will we have Hot Network Answers