2025/02/28

Newest at the top

2025-02-28 09:11:36 +0100CryptLab(~NSA@171.33.191.92) (Read error: Connection reset by peer)
2025-02-28 09:11:24 +0100CryptLab(~NSA@171.33.191.92) CommanderBond007
2025-02-28 09:09:30 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 09:09:30 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-02-28 09:08:06 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 09:07:19 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 09:06:09 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 09:05:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-28 09:04:39 +0100pointlessslippe1(~pointless@62.106.85.17) pointlessslippe1
2025-02-28 09:03:10 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 09:03:10 +0100Googulator78(~Googulato@2a01-036d-0106-0c81-ad7c-ac56-196b-c9a2.pool6.digikabel.hu) (Ping timeout: 240 seconds)
2025-02-28 09:02:19 +0100chele(~chele@user/chele) chele
2025-02-28 09:02:09 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 09:01:14 +0100pointlessslippe1(~pointless@62.106.85.17) (Read error: Connection reset by peer)
2025-02-28 09:01:09 +0100caconym(~caconym@user/caconym) caconym
2025-02-28 09:01:08 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2025-02-28 09:00:00 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-28 08:57:32 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-28 08:56:24 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 08:54:46 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 08:53:39 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-28 08:52:09 +0100pointlessslippe1(~pointless@62.106.85.17) pointlessslippe1
2025-02-28 08:49:59 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 08:49:20 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 08:46:59 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-28 08:46:52 +0100pointlessslippe1(~pointless@62.106.85.17) (Read error: Connection reset by peer)
2025-02-28 08:45:42 +0100j1n37(~j1n37@user/j1n37) (Read error: Connection reset by peer)
2025-02-28 08:45:30 +0100CiaoSen(~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) CiaoSen
2025-02-28 08:43:18 +0100agumonke`(~user@tri69-h04-89-85-120-232.dsl.sta.abo.bbox.fr)
2025-02-28 08:41:55 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-28 08:40:47 +0100 <kqr> I guess what I'm after is some sort of Alternative f => f a -> f b -> f () which is what Leary suggested first.
2025-02-28 08:40:14 +0100 <yahb2> \cases{ Nothing Nothing Nothing -> False; _ _ _ -> True } ; :: Maybe a1 -> Maybe a2 -> Maybe a3 -> Bool
2025-02-28 08:40:14 +0100 <Leary> % :t \cases{ Nothing Nothing Nothing -> False; _ _ _ -> True }
2025-02-28 08:38:34 +0100 <kqr> Ah what the heck, I'll just pop `isJust` in front of each element of the list. It is perfectly readable still.
2025-02-28 08:38:17 +0100 <[exa]> :(
2025-02-28 08:38:16 +0100 <kqr> Yeah, I just realised
2025-02-28 08:38:15 +0100j1n37(~j1n37@user/j1n37) j1n37
2025-02-28 08:38:12 +0100 <[exa]> ah wait no not really because the types again
2025-02-28 08:38:12 +0100 <lambdabot> Alternative f => f a -> f a -> f a
2025-02-28 08:38:10 +0100 <kqr> :t (<|>)
2025-02-28 08:38:08 +0100 <kqr> The <|> is not good because
2025-02-28 08:37:53 +0100Square2(~Square4@user/square) (Ping timeout: 252 seconds)
2025-02-28 08:37:41 +0100 <[exa]> the <|> is probably good there, it's going to give you the first "valid" choice if you're after it
2025-02-28 08:37:28 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-28 08:37:22 +0100 <kqr> Well actually the original code had only the first two terms, and when I added the third it became more difficult to read
2025-02-28 08:36:57 +0100 <kqr> I'm just aiming for conciseness and readability here. The original code said isJust a || isJust b || isJust c but the expressions a, b, and c are in reality longer and made the logic of the whole line difficult to overview
2025-02-28 08:36:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds)
2025-02-28 08:35:49 +0100 <[exa]> On the very other side of the problem, you could do existential-style polymorphic lists to contain all possible justs in there. But don't if you don't have to.
2025-02-28 08:35:04 +0100 <[exa]> yes.
2025-02-28 08:34:59 +0100 <[exa]> for "or" you want to di as Keart says, with something like the <