Newest at the top
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) |
2024-11-17 14:53:11 +0100 | spenat | (~spenat@c-92-35-37-17.bbcust.telenor.se) |
2024-11-17 14:40:15 +0100 | billchenchina | (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) billchenchina |
2024-11-17 14:29:59 +0100 | duckworld | (~duckworld@user/duckworld) duckworld |
2024-11-17 14:21:31 +0100 | Digit | (~user@user/digit) Digit |
2024-11-17 14:06:30 +0100 | sprotte24 | (~sprotte24@p200300d16f2c3600a1fb2e60ac56d901.dip0.t-ipconnect.de) |
2024-11-17 14:02:29 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-11-17 13:59:50 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2024-11-17 13:55:38 +0100 | tremon | (~tremon@83.80.159.219) tremon |
2024-11-17 13:45:52 +0100 | jinsun | (~jinsun@user/jinsun) (Read error: Connection reset by peer) |
2024-11-17 13:29:32 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2024-11-17 13:18:37 +0100 | mrmr155334346318 | (~mrmr@user/mrmr) mrmr |
2024-11-17 13:15:46 +0100 | divya | (~user@139.5.11.76) divya |
2024-11-17 13:13:57 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2024-11-17 13:04:50 +0100 | oxide | (~lambda@user/oxide) oxide |
2024-11-17 13:04:30 +0100 | pavonia | (~user@user/siracusa) siracusa |
2024-11-17 13:01:35 +0100 | mrmr155334346318 | (~mrmr@user/mrmr) (Quit: Bye, See ya later!) |
2024-11-17 13:01:29 +0100 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2024-11-17 12:58:35 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 244 seconds) |
2024-11-17 12:57:26 +0100 | vanishing | (~vanishing@user/vanishingideal) vanishingideal |
2024-11-17 12:50:57 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |