« first day (1359 days earlier)      last day (419 days later) » 

9:21 AM
@JoKing - trying to understand your golf to @Razetime's 5-repetitions answer. What's going-on with d and negative numbers? Why does this happen? The Wiki doesn't seem to suggest anything...
 
9:38 AM
yeah that's why a is used
for absolute value
d behaves oddly with negative numbers since it's not made for that
also I'm not familiar with how it's implemented
and as of now I don't have the mental fortitude to understand haskell code
 
9:57 AM
codegolf.stackexchange.com/questions/126201/… I'm wondering how to solve this
 
10:14 AM
@Razetime - yes, I was trying to understand why d is behaving oddly. I don't see why it shouldn't be "made for" negative numbers, since these obviously have digits, too!
@Zgarb - do you know what's going on (re: d & negative numbers). I would have expected d to return [-1,-2,-3] for -123, not [-2,7,7]...
 
10:33 AM
check what mod does with it
and maybe something will make sense
or divmod
@DominicvanEssen See this Try it online!
 
-123 = -100 + -20 + -3 (giving its digits after integer division by powers of 10). But -123 also = -200 + 70 + 7 (which is arithmetically correct, but doesn't give its digits after division by powers of 10).
 
11:39 AM
I think that it primarily boils down to Husk's divmod always using the sign of the divisor.
 
 
2 hours later…
1:28 PM
Try it online! Anyone get whats going wrong here?
 
1:58 PM
@Razetime You seem to be treating σ as a [[TChar]] -> [[TChar]] -> [TChar] -> [TChar], which it isn't. You'd need to do some kind of fold over the substitutions.
Also, R1 is just ;.
 
2:14 PM
@LegionMammal978 when something doesnt work i tend to ungolf things lol
 
Doesn't that make it more complex, replacing a function with a partially applied function?
 
doesn't for me
as long as it works
then I convert it back later little by little
 
idk, I try and look for the simplest expressions while debugging so as not to confuse the inference
r is a pretty bad offender, though
 

« first day (1359 days earlier)      last day (419 days later) »