Newest at the top
| 2026-02-05 11:00:08 +0100 | mjrosenb | (~mjrosenb@pool-71-190-143-170.nycmny.fios.verizon.net) (Remote host closed the connection) |
| 2026-02-05 10:56:06 +0100 | <tomsmeding> | I imagined yes |
| 2026-02-05 10:55:58 +0100 | <int-e> | tomsmeding: In that context I wouldn't care about abs and signum so I'd use abs = id and signum 0 = 0, signum _ = 1 |
| 2026-02-05 10:55:43 +0100 | <tomsmeding> | fromInteger also |
| 2026-02-05 10:55:22 +0100 | <tomsmeding> | yes, yet another reason for Num to be nonsense |
| 2026-02-05 10:55:11 +0100 | <int-e> | (if anybody ever makes a new Haskell derivative, `abs` and `signum` should be in their own class) |
| 2026-02-05 10:55:03 +0100 | tomsmeding | was wondering why Complex doesn't have that instance, but it's magnitude computation in abs and signum |
| 2026-02-05 10:53:41 +0100 | <tomsmeding> | I think there's a good argument to be made for _not_ having that instance. I know floats are a mess anyway, but at least it's considered basic programming knowledge that ordering on floats is a mess |
| 2026-02-05 10:53:39 +0100 | <int-e> | Eh half of the time I feel like using it I end up copying Complex anyway, so I can have instance Num a => Num (Complex a) |
| 2026-02-05 10:53:11 +0100 | trickard_ | (~trickard@cpe-61-98-47-163.wireline.com.au) |
| 2026-02-05 10:52:17 +0100 | <Leary> | Yes, that's what would be derived, and what we should have. |
| 2026-02-05 10:51:36 +0100 | <probie> | Personally, I suggest `instance (Ord a) => Ord (Complex a) where compare (a :+ b) (c :+ d) = compare (a,b) (c,d)` |
| 2026-02-05 10:50:16 +0100 | <Leary> | Yeah, `Ord` is (or has become) a class for types that support /some/ decidable total order, however arbitrary. `Complex` poses no issue whatsoever, but e.g `IORef` might---it supports equality testing but not ordering. |
| 2026-02-05 10:47:41 +0100 | <lambdabot> | (fromList [(NaN,3),(NaN,4)],False) |
| 2026-02-05 10:47:40 +0100 | <probie> | > let { nan = 0/(0 :: Double); m = M.fromList [(nan, 3), (nan, 4)] } in (m, nan `M.member` m) |
| 2026-02-05 10:45:27 +0100 | <probie> | We're already going to hell for misusing `Ord` |
| 2026-02-05 10:45:15 +0100 | tremon | (~tremon@83.80.159.219) tremon |
| 2026-02-05 10:45:06 +0100 | <probie> | Just pick an ordering on complex numbers and call it a day |
| 2026-02-05 10:44:07 +0100 | trickard_ | (~trickard@cpe-61-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-05 10:43:03 +0100 | <tomsmeding> | gentauro: you probably already know this, but for completeness, /= is ≠ |
| 2026-02-05 10:42:50 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
| 2026-02-05 10:42:23 +0100 | trickard_ | (~trickard@cpe-61-98-47-163.wireline.com.au) |
| 2026-02-05 10:42:10 +0100 | trickard | (~trickard@cpe-61-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-02-05 10:40:32 +0100 | xff0x_ | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Quit: xff0x_) |
| 2026-02-05 10:34:45 +0100 | <gentauro> | I might be wrong |
| 2026-02-05 10:34:42 +0100 | <gentauro> | Googulator: I don't think we have complex numbers in SML (or derivates) |
| 2026-02-05 10:29:32 +0100 | <Googulator> | Makes sense... if you're only thinking of real number and other intuitively sortable types. "Less than or greater than" is a downright lie e.g. for complex numbers. |
| 2026-02-05 10:26:43 +0100 | gentauro | which somehow makes sense. In HaskeLLM `/=` (division equals) is not that intuitive. That said, it took me like "ages" to realize `<>` xD |
| 2026-02-05 10:25:18 +0100 | gentauro | Hmmm, I just realized that in SML (and derivates such as OCaml, …) the "not equal operator" (a <> b) states that `a > b` or `a < b`: https://smlhelp.github.io/book/docs/start/syntax/#boolean-operation |
| 2026-02-05 10:19:49 +0100 | chele | (~chele@user/chele) chele |
| 2026-02-05 10:13:38 +0100 | trickard_ | trickard |
| 2026-02-05 10:12:02 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) sord937 |
| 2026-02-05 10:07:47 +0100 | merijn | (~merijn@77.242.116.146) merijn |
| 2026-02-05 10:00:18 +0100 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 2026-02-05 09:43:09 +0100 | ouilemur | (~jgmerritt@user/ouilemur) ouilemur |
| 2026-02-05 09:42:29 +0100 | emmanuelux | (~em@user/emmanuelux) (Quit: bye) |
| 2026-02-05 09:41:25 +0100 | ouilemur | (~jgmerritt@user/ouilemur) (Ping timeout: 250 seconds) |
| 2026-02-05 09:30:19 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-05 09:27:07 +0100 | emmanuelux | (~em@user/emmanuelux) emmanuelux |
| 2026-02-05 09:25:21 +0100 | lbseale | (~quassel@user/ep1ctetus) (Ping timeout: 252 seconds) |
| 2026-02-05 09:25:20 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-05 09:23:41 +0100 | emmanuelux | (~em@user/emmanuelux) (Quit: bye) |
| 2026-02-05 09:13:49 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2026-02-05 09:12:34 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) ChaiTRex |
| 2026-02-05 09:12:24 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 2026-02-05 09:07:18 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-05 08:56:49 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2026-02-05 08:51:52 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-05 08:51:19 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2026-02-05 08:50:37 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |