Newest at the top
| 2026-02-14 18:05:05 +0100 | chr55 | (57a0c161b0@user/chr55) (Ping timeout: 250 seconds) |
| 2026-02-14 18:04:57 +0100 | prdak | (~Thunderbi@user/prdak) prdak |
| 2026-02-14 18:04:35 +0100 | <tomsmeding> | well, this answers why 'ceiling (x / y)' does not work out-of-the-box :) |
| 2026-02-14 18:04:05 +0100 | <larsivi> | I get that tomsmeding :) |
| 2026-02-14 18:03:58 +0100 | karenw_ | (~karenw@user/karenw) (Quit: Deep into that darkness peering...) |
| 2026-02-14 18:01:58 +0100 | <tomsmeding> | Haskell does not automatically coerce numeric types like Javascript :) |
| 2026-02-14 18:01:40 +0100 | <tomsmeding> | larsivi: if you want to go via a floating point number, you'll have to explicitly convert first (using realToFrac as mauke just posted) |
| 2026-02-14 18:01:40 +0100 | samhh_ | (7569f027cf@2a03:6000:1812:100::e4) samhh |
| 2026-02-14 18:01:11 +0100 | samhh_ | samhh |
| 2026-02-14 18:01:11 +0100 | samhh | (7569f027cf@2a03:6000:1812:100::e4) (Ping timeout: 250 seconds) |
| 2026-02-14 18:00:29 +0100 | <lambdabot> | 2.0 |
| 2026-02-14 18:00:28 +0100 | <mauke> | > realToFrac 2 |
| 2026-02-14 18:00:07 +0100 | <larsivi> | for 3/2 I want 2 to be the answer, 1.5 was a reply to the alex question above |
| 2026-02-14 17:59:22 +0100 | smiesner | (b0cf5acf8c@user/smiesner) smiesner |
| 2026-02-14 17:58:56 +0100 | <larsivi> | Of course, mauke's solution will also work for me |
| 2026-02-14 17:58:55 +0100 | <mauke> | that's not a ceiling |
| 2026-02-14 17:58:36 +0100 | <larsivi> | I want 1.5 - compiler tells me the result is Fractional |
| 2026-02-14 17:57:11 +0100 | <haskellbridge> | <alexfmpe> What do you expect the semantics and type of, say, 3/2 to be? |
| 2026-02-14 17:57:01 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-14 17:56:49 +0100 | <haskellbridge> | <alexfmpe> Or keep thjngs polymorphic with Integral/RealFrac and make use sites decide the type |
| 2026-02-14 17:56:23 +0100 | <lambdabot> | 2 |
| 2026-02-14 17:56:21 +0100 | <mauke> | > let { ceilDiv x y = (x + y - 1) `div` y } in 3 `ceilDiv` 2 |
| 2026-02-14 17:55:58 +0100 | <haskellbridge> | <alexfmpe> If you want 1.5, convert the arguments to Float or Double or Rational or Scientific or so |
| 2026-02-14 17:55:17 +0100 | <haskellbridge> | <alexfmpe> If you want integer division, use `div` instead of / |
| 2026-02-14 17:55:00 +0100 | <haskellbridge> | <alexfmpe> What do you expect the type and value of, say, 3/2 to be? |
| 2026-02-14 17:54:15 +0100 | <larsivi> | Good afternoon! Newbie here trying to do something like ceiling(x / y), where x and y are Integers or so. This gives me RealFrac woes. Why doesn't this work out-of-the-box? |
| 2026-02-14 17:53:39 +0100 | caubert | (~caubert@user/caubert) (Ping timeout: 245 seconds) |
| 2026-02-14 17:51:34 +0100 | larsivi | (~larsivi@user/larsivi) larsivi |
| 2026-02-14 17:51:31 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-14 17:49:37 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
| 2026-02-14 17:48:40 +0100 | caubert | (~caubert@user/caubert) caubert |
| 2026-02-14 17:48:06 +0100 | mulk | (~mulk@pd95140e6.dip0.t-ipconnect.de) mulk |
| 2026-02-14 17:46:27 +0100 | mulk | (~mulk@p5b1128da.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 2026-02-14 17:38:28 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2026-02-14 17:36:28 +0100 | caubert | (~caubert@user/caubert) (Ping timeout: 260 seconds) |
| 2026-02-14 17:32:59 +0100 | karenw_ | (~karenw@user/karenw) karenw |
| 2026-02-14 17:32:46 +0100 | karenw_ | (~karenw@user/karenw) (Quit: Deep into that darkness peering...) |
| 2026-02-14 17:30:19 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-14 17:25:58 +0100 | caubert | (~caubert@user/caubert) caubert |
| 2026-02-14 17:22:24 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-02-14 17:18:10 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) wootehfoot |
| 2026-02-14 17:17:25 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-14 17:15:25 +0100 | petrichor | (~jez@user/petrichor) petrichor |
| 2026-02-14 17:14:55 +0100 | jmcantrell_ | jmcantrell |
| 2026-02-14 17:06:09 +0100 | cipherrot | (~jez@user/petrichor) (Ping timeout: 245 seconds) |
| 2026-02-14 17:05:42 +0100 | Sgeo | (~Sgeo@user/sgeo) Sgeo |
| 2026-02-14 17:05:14 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 17:02:25 +0100 | caubert | (~caubert@user/caubert) (Ping timeout: 264 seconds) |
| 2026-02-14 17:01:23 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
| 2026-02-14 17:00:19 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |