Newest at the top
| 2026-02-14 18:21:53 +0100 | Enrico63 | (~Enrico63@host-82-63-21-32.business.telecomitalia.it) (Ping timeout: 272 seconds) |
| 2026-02-14 18:16:32 +0100 | emaczen | (~user@user/emaczen) emaczen |
| 2026-02-14 18:13:59 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 18:12:11 +0100 | <tomsmeding> | ah :) |
| 2026-02-14 18:12:05 +0100 | sweater | (~sweater@206.81.18.26) sweater |
| 2026-02-14 18:11:54 +0100 | s4msung | (koCZlVvn6A@user/s4msung) s4msung |
| 2026-02-14 18:11:35 +0100 | s4msung | (TgRRXvmJBT@user/s4msung) (Ping timeout: 250 seconds) |
| 2026-02-14 18:11:35 +0100 | sweater | (~sweater@206.81.18.26) (Ping timeout: 250 seconds) |
| 2026-02-14 18:10:39 +0100 | eso | (a0662dfd5e@2a03:6000:1812:100::1266) jeso |
| 2026-02-14 18:09:48 +0100 | <larsivi> | Indeed :) I did also misunderstand the compiler error - I thought it was the result of the division that didn't typecheck, but it was the division itself. Thanks all! |
| 2026-02-14 18:09:35 +0100 | prdak | (~Thunderbi@user/prdak) (Ping timeout: 252 seconds) |
| 2026-02-14 18:09:16 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-02-14 18:08:59 +0100 | eso | (a0662dfd5e@2a03:6000:1812:100::1266) (Ping timeout: 250 seconds) |
| 2026-02-14 18:08:35 +0100 | caubert | (~caubert@user/caubert) caubert |
| 2026-02-14 18:07:41 +0100 | chr55 | (57a0c161b0@user/chr55) chr55 |
| 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) |