2026/02/14

Newest at the top

2026-02-14 18:33:41 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2026-02-14 18:31:42 +0100emmanuelux(~em@user/emmanuelux) emmanuelux
2026-02-14 18:28:09 +0100tabaqui(~tabaqui@167.71.80.236) tabaqui
2026-02-14 18:27:37 +0100tabaqui(~tabaqui@167.71.80.236) (Ping timeout: 250 seconds)
2026-02-14 18:27:11 +0100Fijxu(~Fijxu@user/fijxu) (Ping timeout: 250 seconds)
2026-02-14 18:26:58 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-14 18:25:16 +0100Fijxu_(~Fijxu@user/fijxu) fijxu
2026-02-14 18:24:46 +0100sa(sid1055@id-1055.tinside.irccloud.com) sa
2026-02-14 18:22:41 +0100__monty__(~toonn@user/toonn) toonn
2026-02-14 18:22:27 +0100sa(sid1055@id-1055.tinside.irccloud.com) (Ping timeout: 250 seconds)
2026-02-14 18:21:53 +0100Enrico63(~Enrico63@host-82-63-21-32.business.telecomitalia.it) (Ping timeout: 272 seconds)
2026-02-14 18:16:32 +0100emaczen(~user@user/emaczen) emaczen
2026-02-14 18:13:59 +0100merijn(~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 +0100sweater(~sweater@206.81.18.26) sweater
2026-02-14 18:11:54 +0100s4msung(koCZlVvn6A@user/s4msung) s4msung
2026-02-14 18:11:35 +0100s4msung(TgRRXvmJBT@user/s4msung) (Ping timeout: 250 seconds)
2026-02-14 18:11:35 +0100sweater(~sweater@206.81.18.26) (Ping timeout: 250 seconds)
2026-02-14 18:10:39 +0100eso(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 +0100prdak(~Thunderbi@user/prdak) (Ping timeout: 252 seconds)
2026-02-14 18:09:16 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-14 18:08:59 +0100eso(a0662dfd5e@2a03:6000:1812:100::1266) (Ping timeout: 250 seconds)
2026-02-14 18:08:35 +0100caubert(~caubert@user/caubert) caubert
2026-02-14 18:07:41 +0100chr55(57a0c161b0@user/chr55) chr55
2026-02-14 18:05:05 +0100chr55(57a0c161b0@user/chr55) (Ping timeout: 250 seconds)
2026-02-14 18:04:57 +0100prdak(~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 +0100karenw_(~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 +0100samhh_(7569f027cf@2a03:6000:1812:100::e4) samhh
2026-02-14 18:01:11 +0100samhh_samhh
2026-02-14 18:01:11 +0100samhh(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 +0100smiesner(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 +0100merijn(~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?