2025/02/05

Newest at the top

2025-02-05 09:34:59 +0100ByronJohnson(~bairyn@MAIL.DIGITALKINGDOM.ORG) ByronJohnson
2025-02-05 09:30:54 +0100acidjnk_new3(~acidjnk@p200300d6e7283f01d9acb33bf68493bd.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2025-02-05 09:28:09 +0100Cylian(~Cylian@user/Cylian) Cylian
2025-02-05 09:28:09 +0100Cylian(~Cylian@42.105.142.200) (Changing host)
2025-02-05 09:28:00 +0100otto_s(~user@p4ff27d71.dip0.t-ipconnect.de) (Ping timeout: 276 seconds)
2025-02-05 09:27:42 +0100ByronJohnson(~bairyn@MAIL.DIGITALKINGDOM.ORG) (Ping timeout: 244 seconds)
2025-02-05 09:20:57 +0100Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) Raito_Bezarius
2025-02-05 09:20:40 +0100AkechiShiro(~licht@user/akechishiro) AkechiShiro
2025-02-05 09:20:23 +0100Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 245 seconds)
2025-02-05 09:20:07 +0100AkechiShiro(~licht@user/akechishiro) (Ping timeout: 265 seconds)
2025-02-05 09:19:33 +0100sord937(~sord937@gateway/tor-sasl/sord937) sord937
2025-02-05 09:17:31 +0100 <monochrom> PM nickserv. You can get starters by PM'ing it "help"
2025-02-05 09:16:52 +0100 <Cylian> How can register my nickname?
2025-02-05 09:16:40 +0100chiselfuse(~chiselfus@user/chiselfuse) chiselfuse
2025-02-05 09:15:44 +0100 <[exa]> :(
2025-02-05 09:15:40 +0100 <lambdabot> • Perhaps you meant one of these:
2025-02-05 09:15:40 +0100 <lambdabot> • Variable not in scope: takeWhileM
2025-02-05 09:15:40 +0100 <lambdabot> error:
2025-02-05 09:15:40 +0100 <[exa]> :t takeWhileM
2025-02-05 09:15:12 +0100chiselfuse(~chiselfus@user/chiselfuse) (Ping timeout: 264 seconds)
2025-02-05 09:15:08 +0100 <monochrom> Then you pose the real question.
2025-02-05 09:15:04 +0100 <albet70> how you takeWhile on IO a
2025-02-05 09:14:53 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-02-05 09:14:44 +0100 <albet70> what if that traverse f , and that f is IO stuff
2025-02-05 09:14:23 +0100Cylian(~Cylian@42.105.142.200)
2025-02-05 09:14:22 +0100cyphase(~cyphase@user/cyphase) cyphase
2025-02-05 09:13:42 +0100 <int-e> That doesn't work.
2025-02-05 09:13:34 +0100 <int-e> It makes no sense, you're only producing overcomplicated code.
2025-02-05 09:13:15 +0100 <int-e> You have laziness, why are you so obsessed with early returns?
2025-02-05 09:12:51 +0100 <monochrom> takeWhile
2025-02-05 09:12:44 +0100 <albet70> then how you do early return
2025-02-05 09:12:40 +0100 <lambdabot> [Maybe a] -> [a]
2025-02-05 09:12:39 +0100 <int-e> :t catMaybes . takeWhile isJust
2025-02-05 09:12:24 +0100 <monochrom> What Nothing? Just don't use Nothing.
2025-02-05 09:12:11 +0100 <albet70> what if that lambda inside traverse is passing by outside somewhere, you don't know 0 will produce Nothing
2025-02-05 09:12:06 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-05 09:11:28 +0100 <albet70> what if you don't know what value will produce Nothing, then how you takeWhile?
2025-02-05 09:10:45 +0100 <monochrom> I would go for takeWhile too, then a vanilla map will nicely finish the rest.
2025-02-05 09:09:54 +0100 <lambdabot> [1.0,0.5,0.3333333333333333]
2025-02-05 09:09:53 +0100 <int-e> > map recip . takeWhile (/= 0) $ [1,2,3,0,4]
2025-02-05 09:09:51 +0100 <monochrom> Clearly, traverse+Nothing is the wrong tool then.
2025-02-05 09:09:43 +0100xff0x(~xff0x@2405:6580:b080:900:9dbe:9a4e:842b:9b5e)
2025-02-05 09:08:52 +0100 <albet70> the question is simple, how to do early return with the previous computed result, like I want "traverse (\x -> if x ==0 then Nothing else Just (1/x)) [1,2,3,0,4]" return [0,0.5,0.333] not Nothing
2025-02-05 09:07:47 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-05 09:04:39 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-05 09:03:42 +0100 <int-e> But I did understand the question (though some pieces come from the subsequent discussion) :P
2025-02-05 09:01:19 +0100caconym(~caconym@user/caconym) caconym
2025-02-05 09:00:02 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-05 09:00:00 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-05 08:59:46 +0100 <monochrom> Hell, I don't even understand the question. One may say "I am not going to write code for a question I don't understand" :)