2025/02/12

Newest at the top

2025-02-12 21:00:04 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-12 20:57:01 +0100alp_(~alp@5.226.4.112) (Remote host closed the connection)
2025-02-12 20:56:59 +0100alp_(~alp@5.226.4.112)
2025-02-12 20:50:40 +0100Googulator97(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu) (Ping timeout: 240 seconds)
2025-02-12 20:49:18 +0100user363627(~user@user/user363627) (Remote host closed the connection)
2025-02-12 20:46:56 +0100Googulator44(~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu)
2025-02-12 20:45:07 +0100 <hololeap> I guess now I need to learn how to use SelectT
2025-02-12 20:41:58 +0100 <hololeap> both of those transformers were annoying to work with without mtl support
2025-02-12 20:41:36 +0100 <hololeap> that and Control.Monad.Accum are excellent additions
2025-02-12 20:40:00 +0100 <tomsmeding> huh
2025-02-12 20:39:58 +0100 <tomsmeding> it's not
2025-02-12 20:39:46 +0100 <hololeap> Control.Monad.Writer.CPS Since: mtl-2.3, transformers-0.5.6
2025-02-12 20:39:46 +0100 <tomsmeding> 2019 for transformers and 2022 for mtl? That feels wrong
2025-02-12 20:39:32 +0100 <tomsmeding> oh it hasn't?
2025-02-12 20:39:15 +0100 <tomsmeding> that has been there for ages :)
2025-02-12 20:38:46 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-12 20:37:57 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-12 20:37:30 +0100 <hololeap> glad to see mtl-2.3 has CPS writer support
2025-02-12 20:35:56 +0100lxsameer(lxsameer@Serene/lxsameer) (Ping timeout: 268 seconds)
2025-02-12 20:35:46 +0100 <hololeap> ok
2025-02-12 20:34:57 +0100 <c_wraith> you could get the "previous" w, but you wouldn't see any changes made in the action at the scope you're catching
2025-02-12 20:33:37 +0100 <hololeap> fwiw I was using the CPS WriterT, but I assume it would also lose w
2025-02-12 20:31:14 +0100 <c_wraith> the non-CPS WriterT is terrible and probably never should be used.
2025-02-12 20:30:40 +0100 <c_wraith> but w isn't going to be around
2025-02-12 20:30:17 +0100 <c_wraith> You can catch in that type
2025-02-12 20:30:09 +0100 <lambdabot> IO (a, w)
2025-02-12 20:30:09 +0100 <c_wraith> @unmtl WriterT w IO a
2025-02-12 20:28:49 +0100 <hololeap> (I'll probably end up using Reader+IORef, but I'm curious if this is possible)
2025-02-12 20:28:07 +0100 <hololeap> it's in a loop using `execWriterT $ forM_ ...`
2025-02-12 20:27:22 +0100 <hololeap> with `WriterT w IO`, is it possible to catch ctrl+c and dump the `w` stdout before aborting, or do I require `ReaderT (IORef w) IO`
2025-02-12 20:24:48 +0100zungi(~tory@user/andrewchawk) andrewchawk
2025-02-12 20:24:27 +0100zungi(~tory@user/andrewchawk) (Remote host closed the connection)
2025-02-12 20:24:04 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-02-12 20:24:00 +0100ft(~ft@p4fc2a610.dip0.t-ipconnect.de) ft
2025-02-12 20:19:23 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-12 20:15:58 +0100jespada(~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) jespada
2025-02-12 20:13:55 +0100 <monochrom> :)
2025-02-12 20:13:26 +0100 <mauke> I figured there would be some kind of diagonalization involved
2025-02-12 20:10:10 +0100 <monochrom> But I have proved that the infinite stream monad is unique (and its <*> does zipping). join xss = [xss !! n !! n | n <- [0..]]
2025-02-12 20:08:27 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en)
2025-02-12 20:06:07 +0100 <monochrom> Yes, moreover you have to ban all finite lists.
2025-02-12 20:05:57 +0100 <lambdabot> ZipList {getZipList = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42...
2025-02-12 20:05:56 +0100 <mauke> > pure 42 :: ZipList Int
2025-02-12 20:05:48 +0100 <geekosaur> iirc ZipList would require `return` to produce an infinite list?
2025-02-12 20:05:41 +0100 <monochrom> But I came close to seeing why ZipList cannot be a monad.
2025-02-12 20:03:51 +0100 <monochrom> I don't actually know of one. I made a bet. :)
2025-02-12 20:01:55 +0100 <mauke> is there a simple proof that Monad [] is unique?
2025-02-12 20:00:48 +0100 <lambdabot> ZipList {getZipList = [10,21]}
2025-02-12 20:00:47 +0100 <monochrom> > pure (+) <*> ZipList [0,1] <*> ZipList [10,20]
2025-02-12 20:00:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)