2025/11/07

Newest at the top

2025-11-07 11:52:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-07 11:49:57 +0100Zemy_(~Zemy@2600:100c:b0a1:9f27:38d4:16ff:fedd:d703) (Ping timeout: 260 seconds)
2025-11-07 11:46:12 +0100Zemy(~Zemy@72.178.108.235)
2025-11-07 11:45:40 +0100Zemy(~Zemy@72.178.108.235) (Read error: Connection reset by peer)
2025-11-07 11:45:40 +0100Zemy_(~Zemy@2600:100c:b0a1:9f27:38d4:16ff:fedd:d703)
2025-11-07 11:41:43 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-07 11:36:14 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-07 11:30:28 +0100itaipu(~itaipu@168.121.97.28) (Ping timeout: 260 seconds)
2025-11-07 11:25:20 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-07 11:20:27 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-07 11:16:41 +0100trickard_trickard
2025-11-07 11:15:25 +0100 <__monty__> And none of the alternatives is actually shorter than `\f -> asum . map f`.
2025-11-07 11:13:26 +0100Frostillicus(~Frostilli@pool-71-174-119-69.bstnma.fios.verizon.net) (Ping timeout: 244 seconds)
2025-11-07 11:12:54 +0100 <__monty__> Relude has `asumMap`.
2025-11-07 11:11:05 +0100fp(~Thunderbi@130.233.70.136) fp
2025-11-07 11:10:41 +0100chexum(~quassel@gateway/tor-sasl/chexum) chexum
2025-11-07 11:10:19 +0100 <lambdabot> (Foldable t, Alternative f) => (a1 -> f a2) -> t a1 -> f a2
2025-11-07 11:10:18 +0100 <__monty__> :t \f -> foldr ((<|>) . f) empty -- Technically shorter, I suppose.
2025-11-07 11:09:30 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2025-11-07 11:05:43 +0100 <kuribas> THe biggest advantage IMO is ADTs, pattern matching, and purity...
2025-11-07 11:05:37 +0100Zemy_(~Zemy@2600:100c:b0a1:9f27:6026:a3ff:fe87:99d9) (Ping timeout: 260 seconds)
2025-11-07 11:04:41 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-07 11:04:29 +0100 <lortabac> maybe 90% fun and 10% effectiveness?
2025-11-07 11:04:06 +0100 <kuribas> It's mostly fun.
2025-11-07 11:04:02 +0100 <kuribas> Sometimes I wonder if all these abstractions really make programs easier and more robust.
2025-11-07 11:03:34 +0100 <lortabac> I have the impression that I spend most of my life opting out of things. I wished stupid warnings wasn't part of that
2025-11-07 11:02:50 +0100 <lambdabot> forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Alt f a1)) => (a2 -> f a1) -> t a2 -> f a1
2025-11-07 11:02:48 +0100 <Leary> :t \f -> getAlt . foldMap (Alt . f)
2025-11-07 11:02:40 +0100Zemy(~Zemy@72.178.108.235)
2025-11-07 11:02:37 +0100chele(~chele@user/chele) chele
2025-11-07 11:01:22 +0100 <lambdabot> Foldable t => (a1 -> Maybe a2) -> t a1 -> Maybe a2
2025-11-07 11:01:21 +0100 <Leary> :t \f -> getFirst . foldMap (First . f)
2025-11-07 11:01:17 +0100Zemy(~Zemy@72.178.108.235) (Read error: Connection reset by peer)
2025-11-07 11:01:17 +0100Zemy_(~Zemy@2600:100c:b0a1:9f27:6026:a3ff:fe87:99d9)
2025-11-07 10:58:17 +0100 <lortabac> not shorter but a little less exotic than 'asum'
2025-11-07 10:57:58 +0100CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen
2025-11-07 10:57:54 +0100 <lortabac> kuribas: listToMaybe (mapMaybe (\x -> ...) elems)
2025-11-07 10:57:49 +0100 <kuribas> Leary: but I'll still need to map.
2025-11-07 10:57:16 +0100 <kuribas> Leary: find isJust ?
2025-11-07 10:57:02 +0100 <__monty__> It's slightly annoying when you have to litter the codebase with comments to disable lints.
2025-11-07 10:56:51 +0100 <lambdabot> Foldable t => (a -> Bool) -> t a -> Maybe a
2025-11-07 10:56:50 +0100 <kuribas> :t find
2025-11-07 10:55:29 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 260 seconds)
2025-11-07 10:55:15 +0100 <Leary> Also, linter defaults are just defaults. You're supposed to configure away the hints you don't care for.
2025-11-07 10:54:20 +0100 <__monty__> Maybe it's a matter of reducing your use of the linting tool rather?
2025-11-07 10:53:32 +0100 <Leary> kuribas: `find`
2025-11-07 10:53:19 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-11-07 10:52:29 +0100 <kuribas> __monty__: yes, lazyness.
2025-11-07 10:52:17 +0100 <kuribas> lortabac: right, that one
2025-11-07 10:52:00 +0100 <__monty__> It's an optimization, I don't think single-constructor data has any advantages over newtype?