Logs: liberachat/#haskell
| 2025-11-29 19:30:41 | <int-e> | Also, -Wall would've pointed me at the issue. |
| 2025-11-29 19:30:45 | <monochrom> | That would have the opposite meaning in a C channel. :) |
| 2025-11-29 19:30:50 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 19:33:31 | → | gmg joins (~user@user/gehmehgeh) |
| 2025-11-29 19:34:11 | <int-e> | FWIW: (note the first line) https://paste.tomsmeding.com/I8vQzBzx |
| 2025-11-29 19:35:15 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-29 19:37:06 | <[exa]> | aaaanyway, is there someone good with Streaming package here? I'm trying to get some rule of thumb on how to understand how stuff like this https://hackage.haskell.org/package/streaming-0.2.4.0/docs/Streaming-Prelude.html#v:separate can stream properly. |
| 2025-11-29 19:38:33 | <[exa]> | (In short the example there writes into the 2 files concurrently (the IO actions interleaved) and I'm trying to find the piece of code that makes it happen) |
| 2025-11-29 19:39:55 | <[exa]> | internally the code leads to https://hackage.haskell.org/package/streaming-0.2.4.0/docs/Streaming-Internal.html#v:destroyExposed and there I'm lost. |
| 2025-11-29 19:43:30 | <[exa]> | ok the `destroyExposed` is just foldr for streams, which is cool but helps neither |
| 2025-11-29 19:44:34 | → | simplystuart joins (~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) |
| 2025-11-29 19:46:13 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 19:46:33 | trickard_ | is now known as trickard |
| 2025-11-29 19:47:14 | → | ljdarj1 joins (~Thunderbi@user/ljdarj) |
| 2025-11-29 19:49:19 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 240 seconds) |
| 2025-11-29 19:49:20 | ljdarj1 | is now known as ljdarj |
| 2025-11-29 19:49:34 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 2025-11-29 19:50:51 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-29 19:51:03 | × | Yumemi quits (~Yumemi@chamoin.net) (Quit: .) |
| 2025-11-29 19:51:49 | → | Yumemi joins (~Yumemi@chamoin.net) |
| 2025-11-29 19:51:53 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 250 seconds) |
| 2025-11-29 19:52:56 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2025-11-29 19:55:29 | <int-e> | [exa]: The example doesn't type-check. |
| 2025-11-29 19:55:44 | × | bggd quits (~bgg@2a01:e0a:fd5:f510:7613:72d0:c05e:cd65) (Remote host closed the connection) |
| 2025-11-29 19:55:48 | <[exa]> | how come (it does for me) |
| 2025-11-29 19:56:26 | <[exa]> | (as in, my ghci is okay with it, my head doesn't typecheck tho) |
| 2025-11-29 19:58:02 | <int-e> | what is your S? mine is Streaming.Prelude from streaming-0.2.4.0 |
| 2025-11-29 19:59:28 | <[exa]> | yes |
| 2025-11-29 19:59:34 | <[exa]> | also `import Streaming` with no qual |
| 2025-11-29 20:00:04 | <int-e> | [exa]: https://paste.tomsmeding.com/OFa4FdLZ |
| 2025-11-29 20:01:01 | <int-e> | The non-writing parts do work, I guess. |
| 2025-11-29 20:01:03 | <[exa]> | ah might got hitten by monomorphism |
| 2025-11-29 20:01:09 | <[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 20:01:36 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 20:01:58 | <[exa]> | (a bit different but essentially the same thing) |
| 2025-11-29 20:01:59 | <int-e> | [exa]: The type of S.writeFile is too restricted. |
| 2025-11-29 20:02:41 | <int-e> | Inherently so because there's no anchor point for opening the file otherwise. |
| 2025-11-29 20:03:19 | <[exa]> | you're right, ah you're right it actually needs MonadIO but it returns a different monad than IO |
| 2025-11-29 20:03:23 | <[exa]> | wh |
| 2025-11-29 20:03:37 | [exa] | produces a loud *click* |
| 2025-11-29 20:03:37 | <int-e> | That's not an issue for S.stdoutLn which just has to grab the global stdout. |
| 2025-11-29 20:04:16 | <[exa]> | I think I understood it on the error here |
| 2025-11-29 20:05:01 | <[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 20:05:14 | <[exa]> | which is why it needs generic monad |
| 2025-11-29 20:05:17 | <[exa]> | ok gooooooooooooood |
| 2025-11-29 20:06:05 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 2025-11-29 20:06:19 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2025-11-29 20:06:31 | <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 20:07:11 | <int-e> | But `liftIO` will just wrap the effect, right? |
| 2025-11-29 20:07:24 | <[exa]> | yeah |
| 2025-11-29 20:10:37 | <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 20:11:43 | <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 20:11:45 | <[exa]> | yeah they now have withFile there, and they'd need unliftIO to make the stuff work inside |
| 2025-11-29 20:13:50 | <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 20:15:33 | <[exa]> | yeah |
| 2025-11-29 20:15:39 | <[exa]> | I'm gonna send them a patch |
| 2025-11-29 20:15:43 | <[exa]> | anyway, thanks! |
| 2025-11-29 20:16:27 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 20:16:47 | → | ljdarj1 joins (~Thunderbi@user/ljdarj) |
| 2025-11-29 20:18:42 | → | pavonia joins (~user@user/siracusa) |
| 2025-11-29 20:19:43 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 240 seconds) |
| 2025-11-29 20:20:09 | <int-e> | (And toHandle does the obvious thing: use `hPutStrLn` for each piece received, and execute other effects as they arrive) |
| 2025-11-29 20:20:52 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-11-29 20:21:15 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2025-11-29 20:23:05 | <[exa]> | here we go https://github.com/haskell-streaming/streaming/pull/130 |
| 2025-11-29 20:23:27 | × | ljdarj1 quits (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds) |
| 2025-11-29 20:23:50 | <[exa]> | nvm, time to sleep :D |
| 2025-11-29 20:23:52 | <[exa]> | o/ |
| 2025-11-29 20:28:18 | <Clint> | __monty__: it indexes them |
| 2025-11-29 20:31:51 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 20:33:16 | × | trickard quits (~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-11-29 20:36:04 | → | trickard_ joins (~trickard@cpe-85-98-47-163.wireline.com.au) |
| 2025-11-29 20:36:07 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2025-11-29 20:40:42 | → | Googulator92 joins (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |
| 2025-11-29 20:40:47 | × | Googulator1 quits (~Googulato@84-236-53-137.pool.digikabel.hu) (Quit: Client closed) |
| 2025-11-29 20:45:35 | × | simplystuart quits (~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) (Ping timeout: 240 seconds) |
| 2025-11-29 20:47:13 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 20:49:18 | → | simplystuart joins (~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) |
| 2025-11-29 20:51:54 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-11-29 21:02:45 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 21:04:30 | → | humasect_ joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2025-11-29 21:05:29 | Googulator92 | is now known as Googulator |
| 2025-11-29 21:05:43 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 246 seconds) |
| 2025-11-29 21:07:07 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2025-11-29 21:14:46 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 21:18:15 | × | machinedgod quits (~machinedg@d75-159-126-101.abhsia.telus.net) (Ping timeout: 240 seconds) |
| 2025-11-29 21:18:31 | → | machinedgod joins (~machinedg@d75-159-126-101.abhsia.telus.net) |
| 2025-11-29 21:21:50 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2025-11-29 21:24:55 | × | tromp quits (~textual@2001:1c00:3487:1b00:5005:5ee4:6658:fef3) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-11-29 21:27:39 | → | tromp joins (~textual@2001:1c00:3487:1b00:5005:5ee4:6658:fef3) |
| 2025-11-29 21:30:37 | → | Guest56 joins (~Guest56@38.49.92.193) |
| 2025-11-29 21:32:19 | → | euphores joins (~SASL_euph@user/euphores) |
| 2025-11-29 21:32:37 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-11-29 21:37:23 | <Guest56> | I need help with some haskell syntax. I have a really long type signature and I need a quick way of making sure that the parts of it which are equal are represented in the signature itself. (Explanation follows:) |
| 2025-11-29 21:37:23 | <Guest56> | Signature: |
| 2025-11-29 21:37:24 | <Guest56> | type var1 = String |
| 2025-11-29 21:37:24 | <Guest56> | type var2 = String |
| 2025-11-29 21:37:25 | <Guest56> | … some code … |
| 2025-11-29 21:37:25 | <Guest56> | let ta = typeDeconstruct …. (This function returns a Maybe type) |
| 2025-11-29 21:37:26 | <Guest56> | … some more code |
All times are in UTC.