2025/12/20

Newest at the top

2025-12-20 21:53:15 +0100annamalai(~annamalai@157.32.143.203) (Ping timeout: 240 seconds)
2025-12-20 21:51:48 +0100tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: jckj)
2025-12-20 21:48:41 +0100FloorCalc(~user@user/FloorCalc) FloorCalc
2025-12-20 21:45:46 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd) (Ping timeout: 246 seconds)
2025-12-20 21:41:27 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd)
2025-12-20 21:40:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-20 21:36:11 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-20 21:32:01 +0100Pozyomka(~pyon@user/pyon) (Ping timeout: 255 seconds)
2025-12-20 21:30:15 +0100jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2025-12-20 21:25:44 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2025-12-20 21:20:23 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-20 21:15:39 +0100Googulator53(~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu)
2025-12-20 21:15:31 +0100Googulator53(~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed)
2025-12-20 21:13:12 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-12-20 21:12:07 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2025-12-20 21:11:08 +0100target_i(~target_i@user/target-i/x-6023099) (Ping timeout: 260 seconds)
2025-12-20 21:09:17 +0100pavonia(~user@user/siracusa) siracusa
2025-12-20 21:08:27 +0100DragonMaus(~DragonMau@user/dragonmaus) DragonMaus
2025-12-20 21:06:46 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2025-12-20 21:06:28 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-20 20:55:15 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-20 20:55:03 +0100 <ncf> i guess it is unintuitive that the default instance for Map does not agree with the default instance for Maybe
2025-12-20 20:50:39 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-20 20:48:12 +0100 <ncf> yes, that's what the other instance does
2025-12-20 20:47:49 +0100 <hololeap> see, I want (singleton 5 (All True) <> singleton 5 (All False)) === singleton 5 (All False)
2025-12-20 20:46:44 +0100 <ncf> correct
2025-12-20 20:46:00 +0100 <hololeap> it didn't try to combine the inner All values
2025-12-20 20:45:40 +0100 <hololeap> Alt {getAlt = Just (All {getAll = True})}
2025-12-20 20:45:38 +0100DragonMaus(~dragonmau@user/dragonmaus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2025-12-20 20:45:32 +0100Cyclic30(~Cyclic@c-73-202-24-148.hsd1.ca.comcast.net)
2025-12-20 20:45:31 +0100 <yahb2> <interactive>:45:1: error: [GHC-88464] ; Data constructor not in scope: Alt :: Maybe a1 -> a ; ; <interactive>:45:12: error: [GHC-88464] ; Data constructor not in scope: All :: Bool -> a1 ...
2025-12-20 20:45:31 +0100 <hololeap> % Alt (Just (All True)) <> Alt (Just (All False))
2025-12-20 20:45:23 +0100 <hololeap> you're right that 'Ap Maybe a' isn't correct
2025-12-20 20:44:21 +0100 <ncf> ("functions" meaning functions with finite support implemented as balanced trees, of course)
2025-12-20 20:42:51 +0100 <ncf> the monoidal-containers and containers instances for Map are just lifting those to functions, respectively
2025-12-20 20:42:34 +0100 <ncf> you have Semigroup a => Monoid (Maybe a) and Monoid (Alt Maybe a)
2025-12-20 20:42:13 +0100 <ncf> nope, Ap Maybe a gives you Nothing when combining Just and Nothing
2025-12-20 20:41:57 +0100 <hololeap> since it's relying on 'a' to be a semigroup
2025-12-20 20:41:29 +0100 <hololeap> more like Ap Maybe a
2025-12-20 20:40:14 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-12-20 20:37:32 +0100 <ncf> the difference is basically whether to think of Map k a as k → Maybe a or as k → Alt Maybe a
2025-12-20 20:37:19 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-12-20 20:34:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-20 20:33:49 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2025-12-20 20:30:53 +0100 <hololeap> in this case, I also needed the map to be a non-empty variant
2025-12-20 20:30:37 +0100 <hololeap> (and I know about the monoidal-containers package)
2025-12-20 20:30:05 +0100 <hololeap> and so newtypes are the only hope here
2025-12-20 20:29:26 +0100 <hololeap> is better in this situation
2025-12-20 20:29:17 +0100 <hololeap> (Ord k, Semigroup a) => Semigroup (Map k a)
2025-12-20 20:28:50 +0100 <hololeap> yeah, personally I think the default semigroup instance for maps is unintuitive, especially when you have a bunch of maps nested to form a tree