Newest at the top
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? |
2025-04-28 23:00:01 +0200 | <haskellbridge> | <Liamzee> 7 is just a weird number, I just don't see it come up very often |
2025-04-28 23:00:00 +0200 | <EvanR> | store their credits in cyclotomic |
2025-04-28 22:59:45 +0200 | <darkling> | I think at some point, someone wanted to use a fraction that didn't work in the 1/1000th units, but would have worked in 1/840ths... |
2025-04-28 22:58:34 +0200 | <c_wraith> | the babylonians made a lot more sense with their base-60 system |
2025-04-28 22:58:18 +0200 | <c_wraith> | decimal kind of sucks. |
2025-04-28 22:58:09 +0200 | <c_wraith> | yes. small factors! |
2025-04-28 22:57:48 +0200 | <darkling> | $former_work set up a "credits" system for customers. We stored the values in units of 1/1000 credit. I argues for 1/840 of a credit (2^3*3*5*7), but I got overruled. :( |