« first day (403 days earlier)
← previous day
next day →
last day (875 days later) »
user
01:32
The second
I’m thinking one could represent them as converging series perhaps, but finding the right series might be hard
lyxal
@user that's good for symbolic math though
Like actual algebra and stuff
And that's what we need
user
But how do you make a quickly converging series for pi divided by sqrt2 or sth?
lyxal
You don't need to
user
man i wish sympy had Scala api
@lyxal wait why bot
lyxal
@user just
pi / sqrt(2)
It'll store that as an exact expression
user
01:41
Wait I’m dumb
lyxal
And you just get the approximation at printing time
user
I thought you replied to a different message
That makes more sense
Ye
lyxal
That's how you best implement irrationals
By storing the exact expression and only approximating when necessary
Kinda like a lazily evaluated literal
user
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
lyxal
@user yes, but with a few conditions
10 hours later…
user
12:24
Damn, Apache is a viral one, righ?
Nvm
7 hours later…
DLosc
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…
user
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)
← previous day
next day →
last day (875 days later) »
all rooms
Transcript for
Nov
22
Nov '21
23
Nov
24
Scala
Sharing code golf in Scala:
scala-lang.org
functional-programming
scala
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2025 Stack Exchange Inc;
legal
mobile