Logs: liberachat/#haskell
| 2026-03-09 06:18:33 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
| 2026-03-09 06:19:27 | → | takuan joins (~takuan@d8D86B9E9.access.telenet.be) |
| 2026-03-09 06:20:48 | → | terrorjack joins (~terrorjac@2a01:4f8:271:2d98::2) |
| 2026-03-09 06:22:48 | → | tzh_ joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2026-03-09 06:24:44 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 06:25:00 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Ping timeout: 264 seconds) |
| 2026-03-09 06:29:18 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
| 2026-03-09 06:40:07 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 06:45:20 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
| 2026-03-09 06:49:12 | → | michalz joins (~michalz@185.246.207.200) |
| 2026-03-09 06:49:16 | → | oskarw joins (~user@user/oskarw) |
| 2026-03-09 06:50:29 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 2026-03-09 06:55:54 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 06:56:35 | → | califax_ joins (~califax@user/califx) |
| 2026-03-09 06:57:41 | × | califax quits (~califax@user/califx) (Ping timeout: 258 seconds) |
| 2026-03-09 06:57:54 | califax_ | is now known as califax |
| 2026-03-09 07:01:00 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-03-09 07:10:11 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2026-03-09 07:11:45 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 07:12:44 | → | arandombit joins (~arandombi@user/arandombit) |
| 2026-03-09 07:12:53 | × | czan quits (~czan@user/mange) (Quit: Dinner time!) |
| 2026-03-09 07:16:34 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-03-09 07:17:00 | × | arandombit quits (~arandombi@user/arandombit) (Ping timeout: 246 seconds) |
| 2026-03-09 07:25:44 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 07:29:51 | → | arandombit joins (~arandombi@2a02:2455:8656:7100:49f2:4a42:13a7:5052) |
| 2026-03-09 07:29:51 | × | arandombit quits (~arandombi@2a02:2455:8656:7100:49f2:4a42:13a7:5052) (Changing host) |
| 2026-03-09 07:29:51 | → | arandombit joins (~arandombi@user/arandombit) |
| 2026-03-09 07:30:19 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-03-09 07:41:08 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-03-09 07:42:52 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection) |
| 2026-03-09 07:47:40 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-03-09 07:53:33 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2026-03-09 08:00:56 | × | jmcantrell_ quits (~weechat@user/jmcantrell) (Ping timeout: 256 seconds) |
| 2026-03-09 08:02:00 | × | tzh_ quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 2026-03-09 08:18:44 | × | ft quits (~ft@p4fc2a98c.dip0.t-ipconnect.de) (Quit: leaving) |
| 2026-03-09 08:20:18 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 268 seconds) |
| 2026-03-09 08:22:31 | → | prdak joins (~Thunderbi@user/prdak) |
| 2026-03-09 08:25:08 | × | prdak quits (~Thunderbi@user/prdak) (Remote host closed the connection) |
| 2026-03-09 08:25:38 | → | prdak joins (~Thunderbi@user/prdak) |
| 2026-03-09 08:29:53 | → | merijn joins (~merijn@77.242.116.146) |
| 2026-03-09 08:31:59 | × | arthurvl quits (~arthurvl@2a02-a469-f5e2-1-83d2-ca43-57a2-dc81.fixed6.kpn.net) (Ping timeout: 245 seconds) |
| 2026-03-09 08:37:15 | × | arandombit quits (~arandombi@user/arandombit) (Ping timeout: 272 seconds) |
| 2026-03-09 08:38:09 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
| 2026-03-09 08:38:26 | × | vgtw quits (~vgtw@user/vgtw) (Ping timeout: 252 seconds) |
| 2026-03-09 08:41:49 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 2026-03-09 08:42:00 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2026-03-09 08:45:45 | → | akegalj joins (~akegalj@246-221.dsl.iskon.hr) |
| 2026-03-09 08:46:23 | × | emmanuelux quits (~em@user/emmanuelux) (Quit: bye) |
| 2026-03-09 08:49:48 | → | chele joins (~chele@user/chele) |
| 2026-03-09 08:52:18 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 2026-03-09 08:52:21 | → | arandombit joins (~arandombi@2a02:2455:8656:7100:49f2:4a42:13a7:5052) |
| 2026-03-09 08:52:21 | × | arandombit quits (~arandombi@2a02:2455:8656:7100:49f2:4a42:13a7:5052) (Changing host) |
| 2026-03-09 08:52:21 | → | arandombit joins (~arandombi@user/arandombit) |
| 2026-03-09 08:52:40 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 2026-03-09 08:55:40 | → | castan joins (~castan@2a02:2f0f:8210:d800:1625:20a6:66c:b041) |
| 2026-03-09 08:57:31 | → | __monty__ joins (~toonn@user/toonn) |
| 2026-03-09 09:01:50 | <castan> | Hi. Can someone help me understand what sorcery makes `mappend mempty Sum 3` get parsed as `mappend mempty (Sum 3)` |
| 2026-03-09 09:02:24 | → | czan joins (~czan@user/mange) |
| 2026-03-09 09:03:08 | × | loungerry_ quits (~loungerry@150.241.86.78) (Remote host closed the connection) |
| 2026-03-09 09:04:35 | <probie> | None |
| 2026-03-09 09:04:42 | <Leary> | castan: It doesn't get /parsed/ as that; that's what it equals. `mappend mempty x = x` ==> `mappend mempty Sum = Sum` ==> `mappend mempty Sum 3 = Sum 3`. |
| 2026-03-09 09:05:04 | <Leary> | One key detail here being `Monoid b => Monoid (a -> b)`. |
| 2026-03-09 09:05:21 | <probie> | :t mappend mempty Sum |
| 2026-03-09 09:05:22 | <lambdabot> | Num a => a -> Sum a |
| 2026-03-09 09:05:38 | <probie> | :t (mappend mempty) |
| 2026-03-09 09:05:39 | <lambdabot> | Monoid a => a -> a |
| 2026-03-09 09:05:42 | <castan> | Oh hahahha |
| 2026-03-09 09:06:35 | <castan> | I see now, thank you |
| 2026-03-09 09:07:58 | <mesaoptimizer> | :t mappend |
| 2026-03-09 09:07:59 | <lambdabot> | Monoid a => a -> a -> a |
| 2026-03-09 09:08:06 | <mesaoptimizer> | :t mappend mempty |
| 2026-03-09 09:08:07 | <lambdabot> | Monoid a => a -> a |
| 2026-03-09 09:08:14 | <mesaoptimizer> | :t mappend mempty Sum |
| 2026-03-09 09:08:15 | <lambdabot> | Num a => a -> Sum a |
| 2026-03-09 09:08:21 | <mesaoptimizer> | :t mappend mempty Sum 3 |
| 2026-03-09 09:08:22 | <lambdabot> | Num t => Sum t |
| 2026-03-09 09:10:19 | <__monty__> | Were you expecting a different result? Because `mappend mempty (Sum 3) = Sum 3` too. |
| 2026-03-09 09:10:20 | <merijn> | best monoit instance ever |
| 2026-03-09 09:10:40 | <merijn> | __monty__: No, his question is why is it correct at all :p |
| 2026-03-09 09:10:58 | <merijn> | __monty__: Which, if you don't realise the monoid on functions is confusing |
| 2026-03-09 09:12:02 | <merijn> | castan: And absolutely brilliant use for this monoid is the fact that Ordering is a monoid, so you can use it to combine comparison functions to do multi way ordering |
| 2026-03-09 09:13:07 | <merijn> | :t comparing |
| 2026-03-09 09:13:08 | <lambdabot> | Ord a => (b -> a) -> b -> b -> Ordering |
| 2026-03-09 09:13:13 | <merijn> | :t sortBy |
| 2026-03-09 09:13:14 | <lambdabot> | (a -> a -> Ordering) -> [a] -> [a] |
| 2026-03-09 09:14:00 | <merijn> | > sortBy (comparing snd <> comparing fst) [(3,9), (2,9), (1, 9), (3, 1), (2, 1), (1,1)] |
| 2026-03-09 09:14:02 | <lambdabot> | [(1,1),(2,1),(3,1),(1,9),(2,9),(3,9)] |
| 2026-03-09 09:14:12 | <merijn> | Magic |
| 2026-03-09 09:15:17 | <probie> | > sortBy (comparing snd <> comparing (flip mod 2 . fst) <> comparing fst) [(3,9), (2,9), (1, 9), (3, 1), (2, 1), (1,1)] |
| 2026-03-09 09:15:18 | <lambdabot> | [(2,1),(1,1),(3,1),(2,9),(1,9),(3,9)] |
| 2026-03-09 09:15:55 | <castan> | that's wild, I need to play with it for a bit to understand how |
| 2026-03-09 09:16:46 | <merijn> | Holy moly is Hackage being DOSed or something? |
| 2026-03-09 09:16:49 | <merijn> | It's slow as sin |
| 2026-03-09 09:17:17 | <merijn> | > sortBy (comparing snd <> comparing (Down . fst)) [(3,9), (2,9), (1, 9), (3, 1), (2, 1), (1,1)] |
| 2026-03-09 09:17:19 | <lambdabot> | [(3,1),(2,1),(1,1),(3,9),(2,9),(1,9)] |
| 2026-03-09 09:17:24 | <merijn> | Even funkier with newtypes like Down :p |
| 2026-03-09 09:17:37 | → | fp joins (~Thunderbi@staff235.kora-dyn.aalto.fi) |
| 2026-03-09 09:18:04 | × | fp quits (~Thunderbi@staff235.kora-dyn.aalto.fi) (Client Quit) |
| 2026-03-09 09:18:08 | <merijn> | castan: Basically the monoid on functions is "if the final result is a monoid, then simply pass each argument to both functions and mappend the result" |
| 2026-03-09 09:18:25 | → | fp joins (~Thunderbi@2001:708:20:1406::1370) |
All times are in UTC.