Newest at the top
2025-04-28 23:23:40 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-28 23:23:21 +0200 | <monochrom> | (I don't mean the law were written in the 17th century. But the law just codifies a long tradition that began back then.) |
2025-04-28 23:22:08 +0200 | <monochrom> | s/written is/written into/ |
2025-04-28 23:21:53 +0200 | <monochrom> | The financial sector uses base 10 for fractions, and it is written is the law and too late to change. (You need to go back to say the 17th century to change it.) However, for all other purposes, Knuth proved that rounding errors are less bad iff the base is smaller, therefore base 2 is the least bad. |
2025-04-28 23:20:24 +0200 | <haskellbridge> | <Liamzee> https://hackage-content.haskell.org/package/inline-python-0.1.1.1 |
2025-04-28 23:18:48 +0200 | <EvanR> | inline python it is |
2025-04-28 23:17:28 +0200 | <c_wraith> | good. that's the best lesson here. :) |
2025-04-28 23:16:45 +0200 | <Square2> | c_wraith, EvanR thanks. You convinced me I should just try avoid this situation =D |
2025-04-28 23:15:13 +0200 | tolgo | (~Thunderbi@199.115.144.130) (Ping timeout: 276 seconds) |
2025-04-28 23:15:10 +0200 | ljdarj1 | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-04-28 23:14:06 +0200 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-04-28 23:13:44 +0200 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds) |
2025-04-28 23:12:58 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-04-28 23:10:38 +0200 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2025-04-28 23:08:53 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds) |
2025-04-28 23:08:28 +0200 | shapr | (~user@2600:4040:5c49:5600:dfc0:98d5:78c7:1853) shapr |
2025-04-28 23:08:08 +0200 | m5zs7k | (aquares@web10.mydevil.net) m5zs7k |
2025-04-28 23:08:01 +0200 | tolgo | (~Thunderbi@199.115.144.130) |
2025-04-28 23:07:53 +0200 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-04-28 23:07:33 +0200 | <c_wraith> | But yeah, the whole thing is... Really hoping there's a better way. |
2025-04-28 23:06:51 +0200 | <c_wraith> | In generaly, you'd probably want (:~:) so you could actually write code that knows the types are the same by matching on Refl |
2025-04-28 23:06:16 +0200 | <EvanR> | gross |
2025-04-28 23:06:02 +0200 | <lambdabot> | (Typeable a1, Typeable a2) => a1 -> a2 -> Bool |
2025-04-28 23:06:01 +0200 | <c_wraith> | :t \x y -> typeOf x == typeOf y -- this just isn't the same thing as a MPTC |
2025-04-28 23:05:49 +0200 | <EvanR> | there's that type equality test class |
2025-04-28 23:05:38 +0200 | m5zs7k | (aquares@web10.mydevil.net) (Ping timeout: 252 seconds) |
2025-04-28 23:05:24 +0200 | <c_wraith> | But it isn't quite the same thing as giving you a *value* |
2025-04-28 23:05:12 +0200 | <EvanR> | there you go |
2025-04-28 23:05:06 +0200 | <c_wraith> | EvanR: That class already exists and is named (~) |
2025-04-28 23:04:43 +0200 | <EvanR> | but a multiparameter type class |
2025-04-28 23:04:42 +0200 | <c_wraith> | Yeah, in general seeing Typeable should make you go "is there a better way?" |
2025-04-28 23:04:24 +0200 | <EvanR> | if you aren't comparing the values then it doesn't need to be a function |
2025-04-28 23:04:10 +0200 | dhil | (~dhil@5.151.29.138) (Ping timeout: 252 seconds) |
2025-04-28 23:03:42 +0200 | <EvanR> | er |
2025-04-28 23:03:42 +0200 | <Square2> | ah ok. I feel I'm out in the hack suburb, may need to rethink stuff. |
2025-04-28 23:03:31 +0200 | j1n37 | (~j1n37@user/j1n37) j1n37 |
2025-04-28 23:03:25 +0200 | <haskellbridge> | <Liamzee> you don't actually need an Eq instance if they're... oh wait, that's manual implementation of Eq |
2025-04-28 23:03:19 +0200 | j1n37- | (~j1n37@user/j1n37) (Ping timeout: 260 seconds) |
2025-04-28 23:03:17 +0200 | <c_wraith> | EvanR: I read the question as being about "if the types are the same", not "if the values are the same" |
2025-04-28 23:02:43 +0200 | <EvanR> | that has an Eq instance |
2025-04-28 23:02:39 +0200 | <EvanR> | or if they were coercible to a common type |
2025-04-28 23:02:26 +0200 | <Square2> | Oh yeah. That could possibly work |
2025-04-28 23:01:57 +0200 | <c_wraith> | Square2: like, you could do it if you add (Typeable a, Typeable b) |
2025-04-28 23:01:52 +0200 | <Square2> | gotcha. That won't work |
2025-04-28 23:01:50 +0200 | <haskellbridge> | <sm> Decimal lib is what hledger users, it's great (up to 255 decimal places) |
2025-04-28 23:01:48 +0200 | <EvanR> | needs more type signature |
2025-04-28 23:01:36 +0200 | <c_wraith> | Square2: not without adding some constraints to that type |
2025-04-28 23:01:16 +0200 | <Square2> | I doubt what I'm trying to do is doable, but I'll ask anyway. Say I have 'f :: a -> b -> Bool'. Is there a way to implement that so it return true if a == b? |
2025-04-28 23:01:02 +0200 | <EvanR> | when your HP in FF7 became 7777 you'd get 7777 fever and do tons of attacks or something |
2025-04-28 23:00:18 +0200 | <EvanR> | don't hang out in the casino much? |