2025/11/29

Newest at the top

2025-11-29 21:16:47 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-11-29 21:16:27 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-29 21:15:43 +0100 <[exa]> anyway, thanks!
2025-11-29 21:15:39 +0100 <[exa]> I'm gonna send them a patch
2025-11-29 21:15:33 +0100 <[exa]> yeah
2025-11-29 21:13:50 +0100 <int-e> You can still open files beforehand and then use the awkwardly named https://hackage.haskell.org/package/streaming-0.2.4.0/docs/Streaming-Prelude.html#v:toHandle
2025-11-29 21:11:45 +0100 <[exa]> yeah they now have withFile there, and they'd need unliftIO to make the stuff work inside
2025-11-29 21:11:43 +0100 <int-e> Have fun finding the ticket or PR or other rationale for why they changed it. My guess is timely closing of files in the presence of exceptions.
2025-11-29 21:10:37 +0100 <int-e> Hmm. I think I'm wrong about the anchor point. Also, look at this older type: https://hackage.haskell.org/package/streaming-0.1.4.5/docs/Streaming-Prelude.html#v:writeFile
2025-11-29 21:07:24 +0100 <[exa]> yeah
2025-11-29 21:07:11 +0100 <int-e> But `liftIO` will just wrap the effect, right?
2025-11-29 21:06:31 +0100 <int-e> Anyway. IIUC it's up to the final consumers (like stdoutLn) to process steps and effects in a timely manner so that GC can kick in and keep memory usage low. Stream's MonadIO instance plays into this as well I guess.
2025-11-29 21:06:19 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-11-29 21:06:05 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-11-29 21:05:17 +0100 <[exa]> ok gooooooooooooood
2025-11-29 21:05:14 +0100 <[exa]> which is why it needs generic monad
2025-11-29 21:05:01 +0100 <[exa]> the stream is never really split, that S.stdoutLn in the middle literally just converts one half of it to side effects
2025-11-29 21:04:16 +0100 <[exa]> I think I understood it on the error here
2025-11-29 21:03:37 +0100 <int-e> That's not an issue for S.stdoutLn which just has to grab the global stdout.
2025-11-29 21:03:37 +0100[exa]produces a loud *click*
2025-11-29 21:03:23 +0100 <[exa]> wh
2025-11-29 21:03:19 +0100 <[exa]> you're right, ah you're right it actually needs MonadIO but it returns a different monad than IO
2025-11-29 21:02:41 +0100 <int-e> Inherently so because there's no anchor point for opening the file otherwise.
2025-11-29 21:01:59 +0100 <int-e> [exa]: The type of S.writeFile is too restricted.
2025-11-29 21:01:58 +0100 <[exa]> (a bit different but essentially the same thing)
2025-11-29 21:01:36 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-29 21:01:09 +0100 <[exa]> try full: S.stdoutLn . S.map ("even:"++) . S.show $ S.stdoutLn . S.show $ separate $ S.maps (S.distinguish even) $ S.each [1..10::Int]
2025-11-29 21:01:03 +0100 <[exa]> ah might got hitten by monomorphism
2025-11-29 21:01:01 +0100 <int-e> The non-writing parts do work, I guess.
2025-11-29 21:00:04 +0100 <int-e> [exa]: https://paste.tomsmeding.com/OFa4FdLZ
2025-11-29 20:59:34 +0100 <[exa]> also `import Streaming` with no qual
2025-11-29 20:59:28 +0100 <[exa]> yes
2025-11-29 20:58:02 +0100 <int-e> what is your S? mine is Streaming.Prelude from streaming-0.2.4.0
2025-11-29 20:56:26 +0100 <[exa]> (as in, my ghci is okay with it, my head doesn't typecheck tho)
2025-11-29 20:55:48 +0100 <[exa]> how come (it does for me)
2025-11-29 20:55:44 +0100bggd(~bgg@2a01:e0a:fd5:f510:7613:72d0:c05e:cd65) (Remote host closed the connection)
2025-11-29 20:55:29 +0100 <int-e> [exa]: The example doesn't type-check.
2025-11-29 20:52:56 +0100Sgeo(~Sgeo@user/sgeo) Sgeo
2025-11-29 20:51:53 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 250 seconds)
2025-11-29 20:51:49 +0100Yumemi(~Yumemi@chamoin.net) Yumemi
2025-11-29 20:51:03 +0100Yumemi(~Yumemi@chamoin.net) (Quit: .)
2025-11-29 20:50:51 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-11-29 20:49:34 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-11-29 20:49:20 +0100ljdarj1ljdarj
2025-11-29 20:49:19 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 240 seconds)
2025-11-29 20:47:14 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-11-29 20:46:33 +0100trickard_trickard
2025-11-29 20:46:13 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-11-29 20:44:34 +0100simplystuart(~simplystu@c-75-75-152-164.hsd1.pa.comcast.net)
2025-11-29 20:43:30 +0100 <[exa]> ok the `destroyExposed` is just foldr for streams, which is cool but helps neither