« first day (403 days earlier)      last day (875 days later) » 

01:32
The second
I’m thinking one could represent them as converging series perhaps, but finding the right series might be hard
@user that's good for symbolic math though
Like actual algebra and stuff
And that's what we need
But how do you make a quickly converging series for pi divided by sqrt2 or sth?
You don't need to
man i wish sympy had Scala api
@lyxal wait why bot
@user just pi / sqrt(2)
It'll store that as an exact expression
01:41
Wait I’m dumb
And you just get the approximation at printing time
I thought you replied to a different message
That makes more sense
Ye
That's how you best implement irrationals
By storing the exact expression and only approximating when necessary
Kinda like a lazily evaluated literal
Yeah
I should dig around in galileos and sympys internals and see how they work so we could maybe adapt it
Wonder if the licenses allow code inspired by their code tho
@user yes, but with a few conditions
 
10 hours later…
12:24
Damn, Apache is a viral one, righ?
Nvm
 
7 hours later…
19:30
@user Does this approach (returning a value of type Int | Unit) make any sense, or is that just horrible coding style?
 
2 hours later…
21:54
I don’t think I’ve ever seen that, honestly
I wouldn’t call it horrible, but an Option would probably be preferred
(tbh the main reasons I’ve never seen that are a) union types are new and b) I’m not even a Scala programmer)

« first day (403 days earlier)      last day (875 days later) »