2026/04/21

Newest at the top

2026-04-21 16:52:00 +0000tnt1(~Thunderbi@user/tnt1) tnt1
2026-04-21 16:49:45 +0000tromp(~textual@2001:1c00:340e:2700:463:2385:89e0:6cf) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-04-21 16:49:38 +0000Googulator(~Googulato@84-236-65-56.pool.digikabel.hu)
2026-04-21 16:49:05 +0000danz66376(~danza@user/danza) (Remote host closed the connection)
2026-04-21 16:48:35 +0000merijn(~merijn@77.242.116.146) (Ping timeout: 244 seconds)
2026-04-21 16:39:39 +0000CiaoSen(~Jura@p549cbfb1.dip0.t-ipconnect.de) CiaoSen
2026-04-21 16:39:08 +0000puke(~puke@user/puke) (Ping timeout: 250 seconds)
2026-04-21 16:38:06 +0000peterbecich(~Thunderbi@71.84.33.135) peterbecich
2026-04-21 16:33:57 +0000Googulator72(~Googulato@84-236-65-56.pool.digikabel.hu) (Ping timeout: 245 seconds)
2026-04-21 16:28:32 +0000Googulator(~Googulato@84-236-65-56.pool.digikabel.hu) (Ping timeout: 245 seconds)
2026-04-21 16:24:38 +0000Googulator72(~Googulato@84-236-65-56.pool.digikabel.hu)
2026-04-21 16:18:42 +0000gf31(~gf3@user/gf3) (Ping timeout: 256 seconds)
2026-04-21 16:01:42 +0000kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2026-04-21 16:01:02 +0000craunts795335385(~craunts@152.32.100.66) (Quit: The Lounge - https://thelounge.chat)
2026-04-21 15:48:04 +0000puke(~puke@user/puke) puke
2026-04-21 15:47:39 +0000puke(~puke@user/puke) (Remote host closed the connection)
2026-04-21 15:47:01 +0000karenw(~karenw@user/karenw) karenw
2026-04-21 15:45:36 +0000 <merijn> But that's just generalised First
2026-04-21 15:45:19 +0000 <merijn> There's Alt
2026-04-21 15:43:11 +0000 <dutchie> which is I suppose why First exists
2026-04-21 15:43:03 +0000 <dutchie> for some reason I thought there was some sort of Alternative a => Alternative (b -> a) instance but that doesn't even make sense
2026-04-21 15:41:46 +0000 <merijn> If you have like, 5+ methods it could be worth it
2026-04-21 15:41:32 +0000 <merijn> Yes, hence why I don't think it works for just two
2026-04-21 15:41:09 +0000 <dutchie> that is a lot noisier than the fromMaybe thing above, especially when you throw the last pure function in
2026-04-21 15:40:02 +0000 <dutchie> i don't much like repeating the x
2026-04-21 15:39:59 +0000 <merijn> getFirst $ mconcat [First . f, First . g] x
2026-04-21 15:39:22 +0000 <dutchie> I thought that I'd need that instance but couldn't work out how to invoke it
2026-04-21 15:39:20 +0000 <merijn> tbh, then I don't think the monoid solution will improve much over just the <|> alternative
2026-04-21 15:38:56 +0000 <dutchie> just two and then the "pure" one
2026-04-21 15:38:50 +0000 <merijn> dutchie: Yeah
2026-04-21 15:38:47 +0000 <merijn> Is it just two alternatives or more
2026-04-21 15:38:41 +0000 <dutchie> merijn: the Monoid a => Monoid (x -> a) one?
2026-04-21 15:38:19 +0000 <dutchie> `fromMaybe (h x) (f x <|> g x)` feels ugly
2026-04-21 15:38:05 +0000 <merijn> dutchie: You can always make use of our friend, the best monoid instance ever
2026-04-21 15:37:47 +0000jmcantrell_jmcantrell
2026-04-21 15:37:42 +0000jmcantrell_(~weechat@user/jmcantrell) jmcantrell
2026-04-21 15:37:37 +0000 <dutchie> yeah. i've also got an `h :: Foo -> Bar` that I want to run as a last resort too
2026-04-21 15:37:15 +0000 <merijn> Get the first "Just"?
2026-04-21 15:36:42 +0000 <merijn> What are you trying to do?
2026-04-21 15:36:07 +0000 <dutchie> or should I do some `asum . fmap ($ x)` thing
2026-04-21 15:34:41 +0000 <dutchie> hmm, is there no nice Alternative instance to let me do `f <|> g $ x` where `f, g :: Foo -> Maybe Bar`
2026-04-21 15:19:12 +0000danza(~danza@user/danza) (Ping timeout: 244 seconds)
2026-04-21 15:17:28 +0000danz66376(~danza@user/danza) danza
2026-04-21 15:16:20 +0000tromp(~textual@2001:1c00:340e:2700:463:2385:89e0:6cf)
2026-04-21 15:15:49 +0000havochunter(~havochunt@2a02-a467-ef2-0-f6c3-1c29-6870-3369.fixed6.kpn.net)
2026-04-21 15:09:37 +0000gentauro>>> head [] *** Exception: Prelude.head: empty list
2026-04-21 15:09:22 +0000gentauro-> https://hackage-content.haskell.org/package/base-4.22.0.0/docs/Prelude.html#v:head
2026-04-21 15:08:46 +0000 <gentauro> :(
2026-04-21 15:08:43 +0000 <yahb2> <interactive>:1:1: error: [GHC-76037] Not in scope: ‘List.head’
2026-04-21 15:08:42 +0000 <gentauro> % :i List.head