Logs: liberachat/#haskell
| 2026-02-14 14:26:41 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 2026-02-14 14:27:16 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 2026-02-14 14:27:36 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 2026-02-14 14:29:05 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-02-14 14:31:31 | → | Enrico63 joins (~Enrico63@host-82-63-21-32.business.telecomitalia.it) |
| 2026-02-14 14:36:22 | → | ames joins (~amelia@offtopia/offtopian/amelia) |
| 2026-02-14 14:41:05 | → | caubert joins (~caubert@user/caubert) |
| 2026-02-14 14:41:17 | × | polykernel quits (~polykerne@user/polykernel) (Remote host closed the connection) |
| 2026-02-14 14:41:36 | → | polykernel joins (~polykerne@user/polykernel) |
| 2026-02-14 14:47:01 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 2026-02-14 14:48:19 | → | Milan joins (~Milan@88.212.61.169) |
| 2026-02-14 14:48:31 | × | Milan quits (~Milan@88.212.61.169) (Remote host closed the connection) |
| 2026-02-14 14:50:18 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 14:53:14 | → | karenw_ joins (~karenw@user/karenw) |
| 2026-02-14 14:54:54 | → | weary-traveler joins (~user@user/user363627) |
| 2026-02-14 14:55:23 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 14:56:39 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2026-02-14 14:57:58 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 2026-02-14 14:58:23 | → | jle` joins (~jle`@2603:8001:3b00:11:6d67:a516:e093:4066) |
| 2026-02-14 15:07:49 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 15:13:04 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2026-02-14 15:25:18 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 15:25:38 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 252 seconds) |
| 2026-02-14 15:27:32 | → | ystael joins (~ystael@user/ystael) |
| 2026-02-14 15:30:19 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-14 15:34:54 | × | tromp quits (~textual@2001:1c00:3487:1b00:701a:bd9c:28fd:d022) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-02-14 15:41:37 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 15:45:26 | × | caubert quits (~caubert@user/caubert) (Ping timeout: 252 seconds) |
| 2026-02-14 15:48:11 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 15:55:41 | → | tromp joins (~textual@2001:1c00:3487:1b00:701a:bd9c:28fd:d022) |
| 2026-02-14 15:57:45 | → | caubert joins (~caubert@user/caubert) |
| 2026-02-14 15:58:59 | → | jmcantrell_ joins (~weechat@user/jmcantrell) |
| 2026-02-14 16:00:19 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 16:01:23 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
| 2026-02-14 16:02:25 | × | caubert quits (~caubert@user/caubert) (Ping timeout: 264 seconds) |
| 2026-02-14 16:05:14 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 16:05:42 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2026-02-14 16:06:09 | × | cipherrot quits (~jez@user/petrichor) (Ping timeout: 245 seconds) |
| 2026-02-14 16:14:55 | jmcantrell_ | is now known as jmcantrell |
| 2026-02-14 16:15:25 | → | petrichor joins (~jez@user/petrichor) |
| 2026-02-14 16:17:25 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 16:18:10 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 2026-02-14 16:22:24 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-02-14 16:25:58 | → | caubert joins (~caubert@user/caubert) |
| 2026-02-14 16:30:19 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 16:32:46 | × | karenw_ quits (~karenw@user/karenw) (Quit: Deep into that darkness peering...) |
| 2026-02-14 16:32:59 | → | karenw_ joins (~karenw@user/karenw) |
| 2026-02-14 16:36:28 | × | caubert quits (~caubert@user/caubert) (Ping timeout: 260 seconds) |
| 2026-02-14 16:38:28 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2026-02-14 16:46:27 | × | mulk quits (~mulk@p5b1128da.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 2026-02-14 16:48:06 | → | mulk joins (~mulk@pd95140e6.dip0.t-ipconnect.de) |
| 2026-02-14 16:48:40 | → | caubert joins (~caubert@user/caubert) |
| 2026-02-14 16:49:37 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 2026-02-14 16:51:31 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 16:51:34 | → | larsivi joins (~larsivi@user/larsivi) |
| 2026-02-14 16:53:39 | × | caubert quits (~caubert@user/caubert) (Ping timeout: 245 seconds) |
| 2026-02-14 16:54:15 | <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 16:55:00 | <haskellbridge> | <alexfmpe> What do you expect the type and value of, say, 3/2 to be? |
| 2026-02-14 16:55:17 | <haskellbridge> | <alexfmpe> If you want integer division, use `div` instead of / |
| 2026-02-14 16:55:58 | <haskellbridge> | <alexfmpe> If you want 1.5, convert the arguments to Float or Double or Rational or Scientific or so |
| 2026-02-14 16:56:21 | <mauke> | > let { ceilDiv x y = (x + y - 1) `div` y } in 3 `ceilDiv` 2 |
| 2026-02-14 16:56:23 | <lambdabot> | 2 |
| 2026-02-14 16:56:49 | <haskellbridge> | <alexfmpe> Or keep thjngs polymorphic with Integral/RealFrac and make use sites decide the type |
| 2026-02-14 16:57:01 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-14 16:57:11 | <haskellbridge> | <alexfmpe> What do you expect the semantics and type of, say, 3/2 to be? |
| 2026-02-14 16:58:36 | <larsivi> | I want 1.5 - compiler tells me the result is Fractional |
| 2026-02-14 16:58:55 | <mauke> | that's not a ceiling |
| 2026-02-14 16:58:56 | <larsivi> | Of course, mauke's solution will also work for me |
| 2026-02-14 16:59:22 | → | smiesner joins (b0cf5acf8c@user/smiesner) |
| 2026-02-14 17:00:07 | <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:00:28 | <mauke> | > realToFrac 2 |
| 2026-02-14 17:00:29 | <lambdabot> | 2.0 |
| 2026-02-14 17:01:11 | × | samhh quits (7569f027cf@2a03:6000:1812:100::e4) (Ping timeout: 250 seconds) |
| 2026-02-14 17:01:11 | samhh_ | is now known as samhh |
| 2026-02-14 17:01:40 | → | samhh_ joins (7569f027cf@2a03:6000:1812:100::e4) |
| 2026-02-14 17:01:40 | <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 17:01:58 | <tomsmeding> | Haskell does not automatically coerce numeric types like Javascript :) |
| 2026-02-14 17:03:58 | × | karenw_ quits (~karenw@user/karenw) (Quit: Deep into that darkness peering...) |
| 2026-02-14 17:04:05 | <larsivi> | I get that tomsmeding :) |
| 2026-02-14 17:04:35 | <tomsmeding> | well, this answers why 'ceiling (x / y)' does not work out-of-the-box :) |
| 2026-02-14 17:04:57 | → | prdak joins (~Thunderbi@user/prdak) |
| 2026-02-14 17:05:05 | × | chr55 quits (57a0c161b0@user/chr55) (Ping timeout: 250 seconds) |
| 2026-02-14 17:07:41 | → | chr55 joins (57a0c161b0@user/chr55) |
| 2026-02-14 17:08:35 | → | caubert joins (~caubert@user/caubert) |
| 2026-02-14 17:08:59 | × | eso quits (a0662dfd5e@2a03:6000:1812:100::1266) (Ping timeout: 250 seconds) |
| 2026-02-14 17:09:16 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-14 17:09:35 | × | prdak quits (~Thunderbi@user/prdak) (Ping timeout: 252 seconds) |
| 2026-02-14 17:09:48 | <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 17:10:39 | → | eso joins (a0662dfd5e@2a03:6000:1812:100::1266) |
| 2026-02-14 17:11:35 | × | sweater quits (~sweater@206.81.18.26) (Ping timeout: 250 seconds) |
| 2026-02-14 17:11:35 | × | s4msung quits (TgRRXvmJBT@user/s4msung) (Ping timeout: 250 seconds) |
| 2026-02-14 17:11:54 | → | s4msung joins (koCZlVvn6A@user/s4msung) |
| 2026-02-14 17:12:05 | → | sweater joins (~sweater@206.81.18.26) |
| 2026-02-14 17:12:11 | <tomsmeding> | ah :) |
| 2026-02-14 17:13:59 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-14 17:16:32 | → | emaczen joins (~user@user/emaczen) |
| 2026-02-14 17:21:53 | × | Enrico63 quits (~Enrico63@host-82-63-21-32.business.telecomitalia.it) (Ping timeout: 272 seconds) |
| 2026-02-14 17:22:27 | × | sa quits (sid1055@id-1055.tinside.irccloud.com) (Ping timeout: 250 seconds) |
| 2026-02-14 17:22:41 | → | __monty__ joins (~toonn@user/toonn) |
| 2026-02-14 17:24:46 | → | sa joins (sid1055@id-1055.tinside.irccloud.com) |
All times are in UTC.