Newest at the top
2024-11-17 17:06:56 +0100 | shapr | (~user@2600:4040:5c49:5600:cd62:8744:52b3:406b) shapr |
2024-11-17 17:05:08 +0100 | gorignak | (~gorignak@user/gorignak) gorignak |
2024-11-17 17:04:38 +0100 | gorignak | (~gorignak@user/gorignak) (Quit: quit) |
2024-11-17 17:04:05 +0100 | euleritian | (~euleritia@77.22.252.159) |
2024-11-17 17:03:33 +0100 | euleritian | (~euleritia@dynamic-176-004-178-042.176.4.pool.telefonica.de) (Ping timeout: 248 seconds) |
2024-11-17 16:59:29 +0100 | gentauro | (~gentauro@user/gentauro) gentauro |
2024-11-17 16:54:57 +0100 | gorignak | (~gorignak@user/gorignak) gorignak |
2024-11-17 16:54:26 +0100 | gorignak | (~gorignak@user/gorignak) (Quit: quit) |
2024-11-17 16:53:41 +0100 | gentauro | (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
2024-11-17 16:52:42 +0100 | euleritian | (~euleritia@dynamic-176-004-178-042.176.4.pool.telefonica.de) |
2024-11-17 16:52:40 +0100 | sawilagar | (~sawilagar@user/sawilagar) sawilagar |
2024-11-17 16:52:01 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2024-11-17 16:51:34 +0100 | euleritian | (~euleritia@77.22.252.159) (Ping timeout: 260 seconds) |
2024-11-17 16:48:43 +0100 | emfrom | (~emfrom@37.168.23.134) (Ping timeout: 245 seconds) |
2024-11-17 16:48:08 +0100 | rekahsoft | (~rekahsoft@bras-base-orllon1103w-grc-06-76-69-85-220.dsl.bell.ca) rekahsoft |
2024-11-17 16:44:49 +0100 | euleritian | (~euleritia@77.22.252.159) |
2024-11-17 16:44:46 +0100 | gorignak | (~gorignak@user/gorignak) gorignak |
2024-11-17 16:44:16 +0100 | gorignak | (~gorignak@user/gorignak) (Quit: quit) |
2024-11-17 16:39:12 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
2024-11-17 16:37:17 +0100 | jinsun | (~jinsun@user/jinsun) jinsun |
2024-11-17 16:29:04 +0100 | emfrom | (~emfrom@37.168.23.134) |
2024-11-17 16:27:44 +0100 | <Hecate> | ah indeed you are right |
2024-11-17 16:27:12 +0100 | gorignak | (~gorignak@user/gorignak) gorignak |
2024-11-17 16:26:59 +0100 | gorignak | (~gorignak@user/gorignak) (Read error: Connection reset by peer) |
2024-11-17 16:23:40 +0100 | <geekosaur> | `__builtin_` usually indicates a compiler intrinsic |
2024-11-17 16:22:40 +0100 | <Hecate> | it's more the glibc here |
2024-11-17 16:19:04 +0100 | EvanR | (~EvanR@user/evanr) (Ping timeout: 260 seconds) |
2024-11-17 16:07:21 +0100 | <geekosaur> | oh, if gcc already does the heavy lifting, sure |
2024-11-17 16:06:57 +0100 | <hellwolf> | Thanks Hecate! |
2024-11-17 16:06:09 +0100 | <Hecate> | hellwolf: we don't have checked arithmetic in development mode yet, but you can write bindings like I did https://github.com/Kleidukos/checked-arithmetic/blob/main/src/Checked.hs |
2024-11-17 16:05:58 +0100 | <geekosaur> | and as mauke hinted, it's a major bear if either input is negative |
2024-11-17 16:03:55 +0100 | <hellwolf> | I guess I will just handwrite it then. |
2024-11-17 16:01:36 +0100 | <briandaed> | thanks geekosaur, must look into the report (again) |
2024-11-17 16:01:35 +0100 | <geekosaur> | there is `witch` but I think it's only for conversions |
2024-11-17 16:01:18 +0100 | <geekosaur> | so you can't even use the sign bit flipping as an overunderflow indicator |
2024-11-17 16:01:13 +0100 | <briandaed> | and thereis https://hackage.haskell.org/package/safeint although it's for Int and not actively developed |
2024-11-17 16:00:54 +0100 | <geekosaur> | `(+)` is harder especially since ghc internally works with machine words, not bytes |
2024-11-17 16:00:30 +0100 | euleritian | (~euleritia@dynamic-176-003-035-049.176.3.pool.telefonica.de) (Ping timeout: 252 seconds) |
2024-11-17 16:00:18 +0100 | <geekosaur> | the Report requires it for `succ` and `pred` |
2024-11-17 15:58:28 +0100 | <briandaed> | Interesting https://hackage.haskell.org/package/base-4.3.1.0/docs/src/GHC-Int.html#Int8 throws overflowError for succ / pred but not for (+) |
2024-11-17 15:56:14 +0100 | euleritian | (~euleritia@dynamic-176-003-035-049.176.3.pool.telefonica.de) |
2024-11-17 15:53:59 +0100 | euleritian | (~euleritia@dynamic-176-006-131-010.176.6.pool.telefonica.de) (Ping timeout: 260 seconds) |
2024-11-17 15:50:43 +0100 | <mauke> | assuming non-negative inputs, if maxBound - a < b then overflow |
2024-11-17 15:49:25 +0100 | <mauke> | I'm not aware of any convenient way |
2024-11-17 15:46:44 +0100 | <hellwolf> | If I had to use types such as Int8, what's the most idiomatic and convenient way of detecting overflowing before (+) etc.? |
2024-11-17 15:37:41 +0100 | euleritian | (~euleritia@dynamic-176-006-131-010.176.6.pool.telefonica.de) |
2024-11-17 15:37:24 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds) |
2024-11-17 15:02:30 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f99d1f5c7a18a74e073.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2024-11-17 14:57:21 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
2024-11-17 14:57:09 +0100 | euleritian | (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |