2025/11/14

Newest at the top

2025-11-14 17:31:40 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-11-14 17:31:11 +0100 <dolio> I mean, that is how you get well performing exceptions in GHC, but what if you could have catchable exceptions that performed that well, but were sound to use outside of IO?
2025-11-14 17:30:52 +0100DetourNetworkUK(DetourNetw@user/DetourNetworkUK) (Read error: Connection reset by peer)
2025-11-14 17:30:49 +0100 <kuribas> Still much better than a mess of global state in other languages.
2025-11-14 17:30:46 +0100Inline(~inlinE@2001-4dd7-ae97-0-4674-ae6d-2607-c022.ipv6dyn.netcologne.de) Inline
2025-11-14 17:30:41 +0100Googulator44(~Googulato@team.broadbit.hu)
2025-11-14 17:30:31 +0100 <kuribas> RIO is just fine for most of my applications.
2025-11-14 17:30:23 +0100lucabtz(~lucabtz@user/lucabtz) (Remote host closed the connection)
2025-11-14 17:29:50 +0100 <dolio> 'Just dump everything in IO' doesn't sound like a better answer.
2025-11-14 17:29:22 +0100Lord_of_Life_Lord_of_Life
2025-11-14 17:29:19 +0100 <comerijn> I'd rather have checked IO exceptions, though
2025-11-14 17:29:08 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2025-11-14 17:28:51 +0100 <kuribas> For exceptional things. Either for expected things (parser error, etc...).
2025-11-14 17:28:36 +0100 <kuribas> I just use IO exceptions
2025-11-14 17:28:02 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-11-14 17:27:22 +0100DetourNe-DetourNetworkUK
2025-11-14 17:26:43 +0100 <dolio> What if they could be designed the other way to begin with?
2025-11-14 17:26:23 +0100 <dolio> And then having that baked in can influence the large scale design of things. You can do something better than Either in Haskell, but how many things are you going to have to wrap from returning Either?
2025-11-14 17:25:49 +0100spew(~spew@user/spew) (Quit: WeeChat 4.6.3)
2025-11-14 17:25:06 +0100DetourNe-(DetourNetw@user/DetourNetworkUK) DetourNetworkUK
2025-11-14 17:24:49 +0100DetourNetworkUK(~DetourNet@user/DetourNetworkUK) (Read error: Connection reset by peer)
2025-11-14 17:20:48 +0100 <dolio> Like, Either is a bad way to implement exceptions, and assuming you use continuations to support your algebraic effects, the corresponding algebraic effect is automatically better, I think.
2025-11-14 17:19:06 +0100 <dolio> I think it's more like there are many small 'points.'
2025-11-14 17:18:18 +0100Googulator(~Googulato@team.broadbit.hu)
2025-11-14 17:18:01 +0100Googulator(~Googulato@team.broadbit.hu) (Quit: Client closed)
2025-11-14 17:13:30 +0100 <lucabtz> [exa] i dont know a lot about algebraic effects but i dont see the point like kuribas
2025-11-14 17:09:41 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-11-14 17:07:08 +0100 <kuribas> Because pure functions become IO due to logging.
2025-11-14 17:06:49 +0100 <kuribas> The only part where it sucks is in logging.
2025-11-14 17:04:42 +0100 <kuribas> comerijn: sure, maybe I haven't gotten a usecase where I would need it.
2025-11-14 17:04:20 +0100 <comerijn> kuribas: I mean, that's nice and may work for you, but that doesn't mean it works for everything
2025-11-14 17:04:06 +0100 <comerijn> Because the alternative is worse
2025-11-14 17:04:02 +0100 <kuribas> I'd try to better separate pure from effectul code.
2025-11-14 17:03:59 +0100 <comerijn> Sometimes you gotta deal with things you don't want :p
2025-11-14 17:03:37 +0100 <kuribas> [exa]: I don't even see why I would want that...
2025-11-14 17:02:39 +0100 <[exa]> kuribas: imagine you have so much effect kinds that you think that an algebra over them would help you.
2025-11-14 17:01:59 +0100 <geekosaur> mtl is very careful to forbid combinations of effects that aren't safe
2025-11-14 17:01:14 +0100 <comerijn> What geekosaur said :p
2025-11-14 17:01:01 +0100 <geekosaur> I see the point (better composition of effects ability to e.g. have two state effects and select by type) but I still am concerned that some effects aren't algebraic and pretending they are will just caause possibly subtle or corner-case breakage
2025-11-14 17:01:00 +0100 <kuribas> if possible just "myFunction :: UTCTime -> ... -> Result"
2025-11-14 17:00:18 +0100 <kuribas> I could do "myFunction :: Monad m => (m UTCTime) -> ... -> m Result", I am now abstracted over currentTime.
2025-11-14 16:58:54 +0100 <kuribas> I still don't see the point of algebraic effects.
2025-11-14 16:58:20 +0100 <dolio> mtl is like algebraic effects.
2025-11-14 16:58:09 +0100 <[exa]> lucabtz: you might like heftia
2025-11-14 16:57:54 +0100 <[exa]> the only thing more vast than the number of effect libraries in hackage is their accumulated time since last upload
2025-11-14 16:57:15 +0100 <kuribas> lol
2025-11-14 16:54:29 +0100 <lucabtz> cool
2025-11-14 16:54:23 +0100 <comerijn> lucabtz: Only about a gazillion libraries
2025-11-14 16:53:45 +0100 <lucabtz> is there a way to have something similar to algebraic effects in haskell?
2025-11-14 16:53:31 +0100 <dolio> However, I think the vast majority of the time, people actually do define the 'deep' handler which does correspond to shift/reset.