Logs: liberachat/#haskell
| 2025-12-20 18:04:51 | <haskellbridge> | <Morj> For the purpose of this excercise I rule it out. But in general I don't think it's unacceptable |
| 2025-12-20 18:05:40 | <haskellbridge> | <Morj> Another think typeclasses allow you vs modules is delaying a choice between runtime or compile time polymorphism. Like in haskell you can specialize-pragma or you can use dynamically |
| 2025-12-20 18:06:59 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 18:07:43 | × | chromoblob quits (~chromoblo@user/chromob1ot1c) (Ping timeout: 240 seconds) |
| 2025-12-20 18:08:26 | → | Jackneill joins (~Jackneill@178-164-234-79.pool.digikabel.hu) |
| 2025-12-20 18:11:43 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-12-20 18:18:22 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 18:18:31 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 240 seconds) |
| 2025-12-20 18:22:51 | → | peterbecich joins (~Thunderbi@71.84.33.135) |
| 2025-12-20 18:23:19 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2025-12-20 18:25:02 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org )) |
| 2025-12-20 18:25:53 | → | Googulator53 joins (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) |
| 2025-12-20 18:26:22 | × | Googulator28 quits (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-20 18:28:08 | → | lambda_gibbon joins (~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd) |
| 2025-12-20 18:30:36 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2025-12-20 18:32:34 | × | lambda_gibbon quits (~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd) (Ping timeout: 260 seconds) |
| 2025-12-20 18:34:09 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 18:35:34 | × | jonnie quits (~jonnie@user/jonnie) (Remote host closed the connection) |
| 2025-12-20 18:36:50 | → | chromoblob joins (~chromoblo@user/chromob1ot1c) |
| 2025-12-20 18:38:29 | → | Pozyomka joins (~pyon@user/pyon) |
| 2025-12-20 18:38:42 | → | jonnie joins (~jonnie@user/jonnie) |
| 2025-12-20 18:39:04 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-12-20 18:42:43 | × | jackneill__ quits (~Jackneill@178-164-234-79.pool.digikabel.hu) (Quit: Leaving) |
| 2025-12-20 18:42:45 | × | Jackneill quits (~Jackneill@178-164-234-79.pool.digikabel.hu) (Quit: Leaving) |
| 2025-12-20 18:42:57 | → | Jackneill joins (~Jackneill@178-164-234-79.pool.digikabel.hu) |
| 2025-12-20 18:45:12 | × | shaeto quits (~Shaeto@94.25.234.244) (Quit: WeeChat 4.1.1) |
| 2025-12-20 18:46:51 | → | milan2 joins (~milan@88.212.61.169) |
| 2025-12-20 18:48:06 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2025-12-20 18:48:59 | × | karenw quits (~karenw@user/karenw) (Ping timeout: 244 seconds) |
| 2025-12-20 18:49:55 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 18:54:22 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds) |
| 2025-12-20 19:01:13 | × | peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 264 seconds) |
| 2025-12-20 19:02:30 | <haskellbridge> | <loonycyborg> I used to think that newtype wrappers were dumb idea but it was because of me coming from C++ where doing something like that would require you to do a lot of boilerplate. |
| 2025-12-20 19:03:40 | <haskellbridge> | <loonycyborg> In haskell it has less typing overhead because you can use deriving. |
| 2025-12-20 19:03:40 | <haskellbridge> | <loonycyborg> And they're essential if you want to use same typeclass instance on same object with different semanics. |
| 2025-12-20 19:04:47 | <haskellbridge> | <loonycyborg> like plain [] vs ZipList |
| 2025-12-20 19:05:22 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 19:06:38 | × | trickard quits (~trickard@cpe-81-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-12-20 19:06:53 | → | trickard_ joins (~trickard@cpe-81-98-47-163.wireline.com.au) |
| 2025-12-20 19:10:20 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-12-20 19:12:36 | → | fp joins (~Thunderbi@2001-14ba-6e24-3000--198.rev.dnainternet.fi) |
| 2025-12-20 19:16:26 | → | Square2 joins (~Square@user/square) |
| 2025-12-20 19:16:35 | × | itaipu quits (~itaipu@168.121.97.28) (Ping timeout: 240 seconds) |
| 2025-12-20 19:17:38 | → | itaipu joins (~itaipu@168.121.97.28) |
| 2025-12-20 19:19:22 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 19:23:05 | × | fp quits (~Thunderbi@2001-14ba-6e24-3000--198.rev.dnainternet.fi) (Read error: Connection reset by peer) |
| 2025-12-20 19:23:55 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-12-20 19:28:50 | <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 |
| 2025-12-20 19:29:17 | <hololeap> | (Ord k, Semigroup a) => Semigroup (Map k a) |
| 2025-12-20 19:29:26 | <hololeap> | is better in this situation |
| 2025-12-20 19:30:05 | <hololeap> | and so newtypes are the only hope here |
| 2025-12-20 19:30:37 | <hololeap> | (and I know about the monoidal-containers package) |
| 2025-12-20 19:30:53 | <hololeap> | in this case, I also needed the map to be a non-empty variant |
| 2025-12-20 19:33:49 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 2025-12-20 19:34:55 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 19:37:19 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 2025-12-20 19:37:32 | <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 19:40:14 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2025-12-20 19:41:29 | <hololeap> | more like Ap Maybe a |
| 2025-12-20 19:41:57 | <hololeap> | since it's relying on 'a' to be a semigroup |
| 2025-12-20 19:42:13 | <ncf> | nope, Ap Maybe a gives you Nothing when combining Just and Nothing |
| 2025-12-20 19:42:34 | <ncf> | you have Semigroup a => Monoid (Maybe a) and Monoid (Alt Maybe a) |
| 2025-12-20 19:42:51 | <ncf> | the monoidal-containers and containers instances for Map are just lifting those to functions, respectively |
| 2025-12-20 19:44:21 | <ncf> | ("functions" meaning functions with finite support implemented as balanced trees, of course) |
| 2025-12-20 19:45:23 | <hololeap> | you're right that 'Ap Maybe a' isn't correct |
| 2025-12-20 19:45:31 | <hololeap> | % Alt (Just (All True)) <> Alt (Just (All False)) |
| 2025-12-20 19:45:31 | <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 19:45:32 | → | Cyclic30 joins (~Cyclic@c-73-202-24-148.hsd1.ca.comcast.net) |
| 2025-12-20 19:45:38 | × | DragonMaus quits (~dragonmau@user/dragonmaus) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2025-12-20 19:45:40 | <hololeap> | Alt {getAlt = Just (All {getAll = True})} |
| 2025-12-20 19:46:00 | <hololeap> | it didn't try to combine the inner All values |
| 2025-12-20 19:46:44 | <ncf> | correct |
| 2025-12-20 19:47:49 | <hololeap> | see, I want (singleton 5 (All True) <> singleton 5 (All False)) === singleton 5 (All False) |
| 2025-12-20 19:48:12 | <ncf> | yes, that's what the other instance does |
| 2025-12-20 19:50:39 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 19:55:03 | <ncf> | i guess it is unintuitive that the default instance for Map does not agree with the default instance for Maybe |
| 2025-12-20 19:55:15 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-12-20 20:06:28 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 20:06:46 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 2025-12-20 20:08:27 | → | DragonMaus joins (~DragonMau@user/dragonmaus) |
| 2025-12-20 20:09:17 | → | pavonia joins (~user@user/siracusa) |
| 2025-12-20 20:11:08 | × | target_i quits (~target_i@user/target-i/x-6023099) (Ping timeout: 260 seconds) |
| 2025-12-20 20:12:07 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 2025-12-20 20:13:12 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-12-20 20:15:31 | × | Googulator53 quits (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-20 20:15:39 | → | Googulator53 joins (~Googulato@2a01-036d-0106-48e4-3c18-a4bd-1bda-7c8b.pool6.digikabel.hu) |
| 2025-12-20 20:20:23 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 20:25:44 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
| 2025-12-20 20:30:15 | → | jmcantrell_ joins (~weechat@user/jmcantrell) |
| 2025-12-20 20:32:01 | × | Pozyomka quits (~pyon@user/pyon) (Ping timeout: 255 seconds) |
| 2025-12-20 20:36:11 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2025-12-20 20:40:55 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-12-20 20:41:27 | → | lambda_gibbon joins (~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd) |
| 2025-12-20 20:45:46 | × | lambda_gibbon quits (~lambda_gi@2603:7080:ee00:37d8:dcc4:d31b:c3d9:56cd) (Ping timeout: 246 seconds) |
| 2025-12-20 20:48:41 | → | FloorCalc joins (~user@user/FloorCalc) |
| 2025-12-20 20:51:48 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: jckj) |
| 2025-12-20 20:53:15 | × | annamalai quits (~annamalai@157.32.143.203) (Ping timeout: 240 seconds) |
| 2025-12-20 20:53:26 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2025-12-20 20:54:28 | × | jonnie quits (~jonnie@user/jonnie) (Remote host closed the connection) |
| 2025-12-20 20:54:55 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
All times are in UTC.