2024/11/07

Newest at the top

2024-11-07 06:30:42 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-11-07 06:29:45 +0100 <EvanR> floats... so alluring... so deadly
2024-11-07 06:29:02 +0100 <EvanR> there is a // operator for integer division but it is doing the equivalent of `quot` instead of div
2024-11-07 06:28:29 +0100 <EvanR> was just musing with this bog standard python code for 36028797018963968 `div` 5... which is apparently int(36028797018963968 / 5), which round trips through float and gets the wrong answer xD
2024-11-07 06:26:08 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 06:25:55 +0100 <probie> Why are you roundtripping via `Float`? Surely `isInt` could be more easily defined as `isInt x = denominator x == 1`. With that (and removing `fromRational`) I get correct answers with your code
2024-11-07 06:19:23 +0100 <famubu> should've been [2,15,825,725,1925,2275,425,390,
2024-11-07 06:19:09 +0100 <famubu> It's giving [2,15,825,725,1925,2275,425,25
2024-11-07 06:18:51 +0100 <famubu> Result is still incorrect though..
2024-11-07 06:18:41 +0100 <famubu> Made a version using Integer instead of Int: https://bpa.st/WT4TU
2024-11-07 06:15:00 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-11-07 06:14:26 +0100 <Leary> Axman6: (refresh to see improvements, if you already opened that link)
2024-11-07 06:14:05 +0100 <famubu> Doing Int instead of Integer made it necessary to convert between Int and Integer too.
2024-11-07 06:13:15 +0100 <famubu> I was doing it under the assumption that it won't go beyond Int. Maybe I should change it?
2024-11-07 06:11:51 +0100 <monochrom> Is it actually safe to use Int and Ratio Int for this? Will you get integers too big for Int?
2024-11-07 06:11:37 +0100 <famubu> Could be the `isInt` function?
2024-11-07 06:10:47 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 06:10:08 +0100 <famubu> This is my first time using Data.Ratio
2024-11-07 06:09:57 +0100 <famubu> Any idea how to fix it?
2024-11-07 06:09:51 +0100 <famubu> It gets the first few numbers right, but then goes wrong.
2024-11-07 06:09:36 +0100 <famubu> This is what I did: https://bpa.st/2FVCW
2024-11-07 06:09:26 +0100 <famubu> Hi. I was trying to do the example shown in the FRACTRAN wikipedia article: https://en.wikipedia.org/wiki/FRACTRAN
2024-11-07 06:07:57 +0100famubu(~famubu@user/famubu) famubu
2024-11-07 06:00:24 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
2024-11-07 05:58:31 +0100 <Leary> Axman6: https://gist.github.com/LSLeary/4484fb6bc4d96e59092d48592c162b9f
2024-11-07 05:55:46 +0100Square(~Square4@user/square) (Ping timeout: 252 seconds)
2024-11-07 05:50:02 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 05:46:34 +0100aforemny(~aforemny@i577B13E8.versanet.de) (Ping timeout: 260 seconds)
2024-11-07 05:45:38 +0100aforemny_(~aforemny@i59F4C67C.versanet.de) aforemny
2024-11-07 05:42:19 +0100 <jackdk> Does anyone have a favourite rank2classes-style library that provides a class for HKD representables? I'm specifically looking for a class to associate a record with a GADT namings its fields (like a total DMap) and a FRepresentable sounds like it would fit the bill. I don't need a rank-2 tabulate, if that makes the search easier. The FIndexable in Ed's distributive library looks right but never made it from GitHub to Hackage.
2024-11-07 05:38:43 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds)
2024-11-07 05:38:00 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2024-11-07 05:37:49 +0100Inst_(~Inst@user/Inst) (Ping timeout: 260 seconds)
2024-11-07 05:31:59 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 05:21:06 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds)
2024-11-07 05:17:46 +0100 <Axman6> Not sure I follow how that works, I thik I'd need to see the instances
2024-11-07 05:16:36 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 05:12:16 +0100 <Leary> Axman6: The Atkey parameterised monad isn't ideal for this; you want a graded(?) monad: `class Graded (m :: k -> Type -> Type) where { type E m :: k; type Ap m (g1 :: k) (g2 :: k) :: k; pure :: a -> m (E m) a; (>>=) :: m g1 a -> (a -> m g2 b) -> m (Ap m g1 g2) b }`, with the obvious monoidal properties at both levels.
2024-11-07 05:11:24 +0100longlongdouble(~longlongd@2405:201:5c16:135:1989:242:cab1:419a)
2024-11-07 05:05:52 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
2024-11-07 05:01:13 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-11-07 04:54:23 +0100gmg(~user@user/gehmehgeh) gehmehgeh
2024-11-07 04:53:21 +0100Inst(~Inst@user/Inst) (Ping timeout: 248 seconds)
2024-11-07 04:52:23 +0100td_(~td@i5387092D.versanet.de)
2024-11-07 04:51:19 +0100ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2024-11-07 04:51:02 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2024-11-07 04:50:51 +0100td_(~td@i53870906.versanet.de) (Ping timeout: 276 seconds)
2024-11-07 04:50:50 +0100Inst_(~Inst@user/Inst) Inst
2024-11-07 04:50:15 +0100TimWolla(~timwolla@2a01:4f8:150:6153:beef::6667) TimWolla
2024-11-07 04:47:39 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)