Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 22 23 24 25 26 27 28 29 30 31 32 .. 5022
502,152 events total
2020-09-17 14:54:51 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-09-17 14:54:56 <z0> ok i get it. thanks
2020-09-17 14:55:18 <merijn> I think adding a pattern synonym for Infinity would be good, tbh
2020-09-17 14:55:31 × ph88_ quits (~ph88@2a02:8109:9e40:2704:85f2:8dce:6e30:a554) (Ping timeout: 272 seconds)
2020-09-17 14:55:40 <z0> but I also get how it can be a bad idea
2020-09-17 14:56:09 <dmwit> Perhaps it is not made a pattern synonym because its type is too hard.
2020-09-17 14:56:24 <dmwit> (Should we add a new class that just has Double and Float as instances just for this?)
2020-09-17 14:56:29 <merijn> dmwit: Just define it as Double
2020-09-17 14:56:37 <merijn> let's face it, no one gives a crap about Float
2020-09-17 14:56:53 <merijn> Boom!
2020-09-17 14:56:59 <dmwit> Mmm. Machine learning folks default to Float pretty consistently.
2020-09-17 14:57:00 <merijn> Problem solved with the power of pragmatism!
2020-09-17 14:57:22 <merijn> dmwit: They do silly stuff like use half-floats to, so that won't work anyway
2020-09-17 14:57:37 <merijn> dmwit: Also pretty sure machine learning people don't generally care about writing Infinity in their code :p
2020-09-17 14:58:04 <z0> ...yet
2020-09-17 14:58:41 <dmwit> Nobody cares about writing Infinity in their code. Boom! Problem solved without even doing any work through pragmatism.
2020-09-17 14:58:44 <merijn> z0: Anyway, I recommend enabling -Wall and avoiding defaulting :p
2020-09-17 14:58:47 <merijn> dmwit: I do, though!
2020-09-17 14:58:53 <ski> % 9 / Infinity
2020-09-17 14:58:53 <yahb> ski: 0.0
2020-09-17 14:59:02 <dolio> Well, you can propose it, and then someone else can run off an invent some kind of IEEE class that must be made to ensure maximal generality.
2020-09-17 14:59:33 <merijn> dolio: uh-huh, that's why we have the perfect generalised numeric typeclass hierarchy, now, right? ;)
2020-09-17 14:59:37 <dmwit> Pfft, you do silly stuff like serialization and deserialization, so that won't work anyway
2020-09-17 15:00:01 × MaddinSM quits (~MaddinSM@185.204.1.185) ()
2020-09-17 15:00:15 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2020-09-17 15:00:19 cosimone_ joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-09-17 15:00:19 <hyperisco> I'll be impressed once we stop treating floats like reals
2020-09-17 15:00:32 <merijn> hyperisco: Smart people never started :p
2020-09-17 15:00:40 <dolio> merijn: Just hope that the requirement for the class to be perfect doesn't block your Infinity pattern getting added. :)
2020-09-17 15:00:45 <merijn> The reals are shit numbers anyway :p
2020-09-17 15:01:22 <merijn> Like a proper computer scientist I only care about whole numbers...and maybe rationals
2020-09-17 15:01:31 gestone joins (~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-17 15:01:41 <hyperisco> whole numbers and pairs of whole numbers
2020-09-17 15:01:51 <maerwald> rationals escalate quickly
2020-09-17 15:02:15 <hyperisco> π is 22/7 and that's the end of it
2020-09-17 15:02:34 <merijn> Pi is basically 3
2020-09-17 15:02:58 <dolio> Floating point is just bad rationals, though.
2020-09-17 15:03:16 <dminuoso> Also, why dont we have support for transcedental numbers? :<
2020-09-17 15:03:34 <ski> how about algebraic numbers, to start with ?
2020-09-17 15:03:35 <merijn> dmwit: We barely know any of the numbers anyway
2020-09-17 15:03:43 <merijn> s/dmwit/dminuoso
2020-09-17 15:04:01 <hyperisco> I just want the imprecision of floats acknowledged by some static analysis
2020-09-17 15:04:18 <merijn> hyperisco: There's already a whole bunch of that
2020-09-17 15:04:27 <hyperisco> I don't want floats put into a type class with laws they don't hold
2020-09-17 15:04:34 <merijn> like http://herbie.uwplse.org/
2020-09-17 15:04:38 <dmwit> dminuoso: You might like the cyclotomic package.
2020-09-17 15:04:47 × cp- quits (~cp-@b157153.ppp.asahi-net.or.jp) (Ping timeout: 240 seconds)
2020-09-17 15:04:49 <merijn> hyperisco: Which typeclass's laws do they violate?
2020-09-17 15:05:00 <dmwit> It supports most of the transcendentals that come up in calculations, and doesn't have the observation problems that CReal does.
2020-09-17 15:05:10 <merijn> I guess Eq, but that's solved once Carter finishes the crusade to abolish value NaN :p
2020-09-17 15:05:20 <dmwit> ski: You, too. The cyclotomics are a superset of the algebraic numbers.
2020-09-17 15:05:47 × gestone quits (~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 240 seconds)
2020-09-17 15:06:18 <hyperisco> merijn, associativity for one
2020-09-17 15:06:38 <merijn> hyperisco: Of what?
2020-09-17 15:06:53 Saukk joins (~Saukk@2001:998:dc:4a67:1c59:9bb5:b94c:4)
2020-09-17 15:06:56 <dolio> Additions and multiplication.
2020-09-17 15:06:56 <hyperisco> addition, multiplication, but the report has no laws for Num anyways
2020-09-17 15:07:17 da39a3ee5e6b4b0d joins (~textual@2403:6200:8876:37d7:b93e:60af:b75b:c0ef)
2020-09-17 15:08:09 <hyperisco> if we were honest up front it might not be *that bad* in the end
2020-09-17 15:09:12 cp- joins (~cp-@b157153.ppp.asahi-net.or.jp)
2020-09-17 15:09:35 × cosimone_ quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.)
2020-09-17 15:09:59 × machinedgod quits (~machinedg@d67-193-126-196.home3.cgocable.net) (Ping timeout: 246 seconds)
2020-09-17 15:11:12 __Joker_ joins (~Joker@180.151.105.86)
2020-09-17 15:11:26 <dolio> I don't know. Doesn't that mostly matter when people use other faulty operations, like equality?
2020-09-17 15:12:21 <merijn> dolio: Equality is fine, value NaN is bogus >.>
2020-09-17 15:12:30 <dolio> No, it's not fine.
2020-09-17 15:12:44 × raehik quits (~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
2020-09-17 15:12:47 <dolio> You shouldn't be testing floats for equality, you should be testing that they're "close enough" usually.
2020-09-17 15:12:49 <merijn> Name one thing faulty about it excluding value NaN
2020-09-17 15:13:00 <merijn> dolio: I call bullshit
2020-09-17 15:13:12 <merijn> I frequently need exact equality for floats
2020-09-17 15:13:30 <merijn> Like "when checking that deterministic computations are in fact deterministic and remain identical"
2020-09-17 15:14:04 <merijn> equality on floats is a perfectly well-defined and reasonable operation in the absense of value NaN
2020-09-17 15:14:22 <hyperisco> dolio, equality for floats is much weaker than usual, yes… I think the error bars need to be accounted for
2020-09-17 15:14:38 × __Joker quits (~Joker@180.151.106.108) (Ping timeout: 272 seconds)
2020-09-17 15:14:42 <dolio> merijn: You're missing the point.
2020-09-17 15:14:48 unlink__ joins (~unlink2@p200300ebcf25bd0068eb9d9c94da2a17.dip0.t-ipconnect.de)
2020-09-17 15:14:58 <hyperisco> because if you only retain the error-free equalities then you can hardly say enough about floats
2020-09-17 15:15:07 × mud quits (~mud@unaffiliated/kadoban) (Quit: bye)
2020-09-17 15:15:15 <merijn> dolio: Which is?
2020-09-17 15:15:18 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer)
2020-09-17 15:15:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-17 15:15:37 <ski> (it would be nice to have `forall x y. x == y == True => x = y' and `forall x y. x == y = False => x =/= y')
2020-09-17 15:15:51 <ski> (s/== True/= True/)
2020-09-17 15:16:01 <merijn> ski:Right, which is the case once you elimiante value NaN
2020-09-17 15:16:22 <hyperisco> so I think probably instead you have to talk about intervals of reals, and then instead of equality you have interval relations
2020-09-17 15:16:30 <merijn> value NaN is what torpedoes reflexivity
2020-09-17 15:16:37 <hyperisco> (where actual equality becomes the relation of equality on intervals)
2020-09-17 15:17:33 <hyperisco> so you can say a < b if the interval of a precedes the interval of b
2020-09-17 15:17:42 <dolio> Which is that expected algebraic rules hold up to 'approximate equality', so you don't just tell people "addition isn't associative," because it's not the whole story. Part of the story is that exact equality is only reliable for exact sequences of operations, and shouldn't be treated as reliable in general.
2020-09-17 15:17:50 <hyperisco> precedes or meets
2020-09-17 15:17:59 × zaquest quits (~notzaques@5.128.210.178) (Read error: Connection reset by peer)
2020-09-17 15:18:01 cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-09-17 15:18:12 zaquest joins (~notzaques@5.128.210.178)
2020-09-17 15:18:25 fendor__ joins (~fendor@e237-037.eduroam.tuwien.ac.at)
2020-09-17 15:18:38 <hyperisco> a float calculation is exact if the interval is expressible as [x,x] for some x, etc
2020-09-17 15:18:39 <ski> dolio : that's separate from the `NaN' point, though
2020-09-17 15:18:46 <hyperisco> at least this is the line I would try to go down
2020-09-17 15:18:46 <dolio> I didn't even bring up NaN.
2020-09-17 15:18:55 <carter> merijn: did you see the final version of clamp that got merged in last week? It handles NaN in a pretty ncie way
←Prev  Next→
Page 1 .. 22 23 24 25 26 27 28 29 30 31 32 .. 5022

All times are in UTC.