2026/04/22

Newest at the top

2026-04-22 11:19:22 +0000xff0x(~xff0x@2405:6580:b080:900:a57a:c3e:71fc:8409)
2026-04-22 11:17:39 +0000craunts795335385(~craunts@152.32.100.66) (Quit: The Lounge - https://thelounge.chat)
2026-04-22 11:15:33 +0000tv(~tv@user/tv) tv
2026-04-22 11:04:21 +0000 <nmeum> yea, makes sense
2026-04-22 11:04:00 +0000 <merijn> nmeum: i.e. imagine `StateT s (EitherT e IO) a`, it ends up doing `runStateT` + `runEitherT` to turn it into `IO (Either e (s, a))` and then rewrapping that. But if the EitherT (or MaybeT) early aborts you don't get a state to return.
2026-04-22 11:02:14 +0000 <merijn> nmeum: The problem is that catch is effectively unwrapping/rewrapping the stack, and there's no general way to make e.g. `StateT` handler that
2026-04-22 11:00:03 +0000 <nmeum> hm, that would presuppose changing the entire internal state representation of my monad. I think I would rather throw a custom exception which also includes the state or something along those lines then
2026-04-22 10:58:24 +0000 <merijn> nmeum: Or rather, in that scenario you probably just want a Reader of an IORef/MVar to access the state
2026-04-22 10:58:10 +0000puke(~puke@user/puke) puke
2026-04-22 10:57:43 +0000 <merijn> nmeum: You do not
2026-04-22 10:50:32 +0000divlamir(~divlamir@user/divlamir) divlamir
2026-04-22 10:50:15 +0000divlamir(~divlamir@user/divlamir) (Read error: Connection reset by peer)
2026-04-22 10:48:50 +0000pfc(~pfc@user/pfc) (Ping timeout: 248 seconds)
2026-04-22 10:47:16 +0000tv(~tv@user/tv) (Read error: Connection reset by peer)
2026-04-22 10:43:11 +0000 <mauke> ski: and don't forget YAML
2026-04-22 10:24:50 +0000nmeum_nmeum
2026-04-22 10:24:47 +0000 <nmeum_> I have a question regarding Control.Monad.Catch: I do exception handling via `catch` in the context of a stateful monad `m`, in the exception handler `(e -> m a)` I want to access information about the state of my monad in which the exception occured. however, the exception handler action is executed in the state of the `catch` caller. how do access the error `m` state?
2026-04-22 10:22:25 +0000nmeum_(~nmeum@barium.8pit.net) nmeum
2026-04-22 10:21:45 +0000puke(~puke@user/puke) (Remote host closed the connection)
2026-04-22 10:12:27 +0000xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 255 seconds)
2026-04-22 10:02:51 +0000L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2026-04-22 09:53:34 +0000arandombit(~arandombi@user/arandombit) (Remote host closed the connection)
2026-04-22 09:53:30 +0000arandombit(~arandombi@user/arandombit) arandombit
2026-04-22 09:50:42 +0000acidjnk_new(~acidjnk@p200300d6e700e575659a3cc58dc6913c.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2026-04-22 09:49:04 +0000misterfish(~misterfis@84.53.85.146) (Ping timeout: 245 seconds)
2026-04-22 09:48:35 +0000tnt1(~Thunderbi@user/tnt1) tnt1
2026-04-22 09:47:30 +0000acidjnk_new3(~acidjnk@p200300d6e700e5836dc6d0caa2ab8c45.dip0.t-ipconnect.de) acidjnk
2026-04-22 09:43:33 +0000misterfish(~misterfis@84.53.85.146) misterfish
2026-04-22 09:31:13 +0000tnt1(~Thunderbi@user/tnt1) (Remote host closed the connection)
2026-04-22 09:29:42 +0000davl(~davl@207.154.228.18) (Ping timeout: 255 seconds)
2026-04-22 09:29:10 +0000davl_(~davl@207.154.228.18) davl
2026-04-22 09:26:50 +0000misterfish(~misterfis@046044172198.static.ipv4.heldenvannu.net) (Ping timeout: 252 seconds)
2026-04-22 09:26:18 +0000waltggVGc
2026-04-22 09:23:54 +0000terrorjack(~terrorjac@2a01:4f8:271:2d98::2) terrorjack
2026-04-22 09:23:53 +0000 <ski> (you said "ML", which is (nowadays) an umbrella term for all of SML,OCaml,F# (you could also mention Alice ML if you want, and MetaML,MetaOCaml, and the original Caml))
2026-04-22 09:22:57 +0000terrorjack(~terrorjac@2a01:4f8:271:2d98::2) (Quit: The Lounge - https://thelounge.chat)
2026-04-22 09:22:05 +0000 <ski> gentauro : mhm, i see. fwiw, `function _ -> ...' is also OCaml, but not SML (which uses `fn _ => ...')
2026-04-22 09:20:50 +0000CiaoSen(~Jura@p549cbfb1.dip0.t-ipconnect.de) CiaoSen
2026-04-22 09:18:27 +0000terrorjack(~terrorjac@2a01:4f8:271:2d98::2) terrorjack
2026-04-22 09:15:58 +0000acidjnk_new(~acidjnk@p200300d6e700e575659a3cc58dc6913c.dip0.t-ipconnect.de)
2026-04-22 09:10:24 +0000tristanC(~tristanC@user/tristanc) tristanC
2026-04-22 09:10:24 +0000tristanC(~tristanC@2602:61:712f:b700:a215:c067:33c4:f43e) (Changing host)
2026-04-22 09:10:24 +0000tristanC(~tristanC@2602:61:712f:b700:a215:c067:33c4:f43e)
2026-04-22 09:09:04 +0000tristanC(~tristanC@user/tristanc) (Ping timeout: 276 seconds)
2026-04-22 09:03:14 +0000CiaoSen(~Jura@p549cbfb1.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2026-04-22 08:55:51 +0000humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Quit: Leaving...)
2026-04-22 08:53:36 +0000 <gentauro> [exa]: funny enough, the .NET (with C#) don't anything at all :o: `Select(x => …);`
2026-04-22 08:53:15 +0000 <merijn> *and* a warning *and* a way to turn any you forgot into compile time errors :p
2026-04-22 08:51:39 +0000 <merijn> Liamzee: better use typed holes via "foo = _" then you not only get a crash, but also a line number AND a type
2026-04-22 08:45:02 +0000arandombit(~arandombi@user/arandombit) (Ping timeout: 252 seconds)