2025/12/02

Newest at the top

2025-12-02 14:11:40 +0100 <[exa]> okay so if I read the code right, you're taking all the numbers one by one, cut them in half and compare the halves, right?
2025-12-02 14:11:06 +0100 <lucabtz> no the hint, the list walk i understand
2025-12-02 14:10:53 +0100 <[exa]> lucabtz: with the 1 list walk, or with the above hint?
2025-12-02 14:10:41 +0100 <lucabtz> [exa] im not sure exactly what you mean
2025-12-02 14:10:14 +0100 <[exa]> yeah it saves 1 list walk
2025-12-02 14:09:55 +0100 <lucabtz> i suppose it can do two operations at once right
2025-12-02 14:09:35 +0100trickard_trickard
2025-12-02 14:09:24 +0100 <Rembane> lucabtz: Yeah, and it should be faster, but I haven't measured.
2025-12-02 14:09:01 +0100 <lucabtz> Rembane thanks, i replace takeWhile and dropWhile with break which seemed more appropriate
2025-12-02 14:08:07 +0100X-Scale(~ARM@6.67.114.89.rev.vodafone.pt) X-Scale
2025-12-02 14:08:03 +0100Enrico63(~Enrico63@host-212-171-79-170.pool212171.interbusiness.it) Enrico63
2025-12-02 14:07:23 +0100 <[exa]> man, streamly is huge
2025-12-02 14:04:37 +0100 <kuribas> ListT seems simpler, while Streamly is focussed on performance.
2025-12-02 14:04:36 +0100 <[exa]> kuribas: https://paste.tomsmeding.com/L7EFsnUc
2025-12-02 14:04:27 +0100 <kuribas> Streaming, ListT and Streamly all look similar.
2025-12-02 14:03:47 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-02 14:03:45 +0100 <[exa]> kuribas: sec, I'll show a piece of code that does something similar with streaming
2025-12-02 14:03:34 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-02 14:03:29 +0100 <[exa]> kuribas: probably
2025-12-02 14:03:19 +0100 <kuribas> [exa]: would bracket help?
2025-12-02 14:03:13 +0100 <[exa]> lucabtz: in which case you should be able to avoid scanning through the whole range
2025-12-02 14:02:48 +0100 <Rembane> lucabtz: I meant the split! :)
2025-12-02 14:02:43 +0100 <[exa]> lucabtz: not sure how much I'd spoil here if I give hints... but have you considered pre-splitting the numbers on input and looking at them like at pairs of intervals?
2025-12-02 14:02:40 +0100 <lucabtz> wait or you mean the split i posted earlier
2025-12-02 14:02:19 +0100 <lucabtz> part 2 is a bit slow
2025-12-02 14:02:14 +0100 <lucabtz> Rembane thanks
2025-12-02 14:01:40 +0100 <Rembane> lucabtz: I like that one! Nice!
2025-12-02 14:00:37 +0100 <[exa]> yeah partially exceptions and partially having to watch who's doing what with the global ioref
2025-12-02 13:59:58 +0100 <kuribas> [exa]: you mean exceptions?
2025-12-02 13:58:52 +0100 <[exa]> anyway I did this recently with streaming (few days back in scrollback), it's essentially this idea, except without the unnecessary ioref
2025-12-02 13:57:54 +0100 <[exa]> yeah, if you don't mind losing the safety net of the streaming library around it it's IMO quite the way to go
2025-12-02 13:57:11 +0100 <kuribas> Now that I think of it (ListT IO) or (ListT (ST s)), stored in a IORef or STRef makes for an excelent coroutine.
2025-12-02 13:56:10 +0100 <kuribas> [exa]: arbitrary number or types of streams.
2025-12-02 13:55:42 +0100Anarchos(~Anarchos@91-161-254-16.subs.proxad.net) Anarchos
2025-12-02 13:54:20 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-02 13:51:37 +0100AlexNoo(~AlexNoo@85.174.183.216) (Quit: Leaving)
2025-12-02 13:50:15 +0100AlexZenon(~alzenon@85.174.183.216) (Quit: ;-)
2025-12-02 13:48:07 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-12-02 13:48:00 +0100 <lucabtz> (spoiler advent of code) someone wants to comment my solution so i can improve https://paste.tomsmeding.com/0wThIO6g
2025-12-02 13:39:29 +0100merijn(~merijn@77.242.116.146) merijn
2025-12-02 13:38:06 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-02 13:37:40 +0100Inline(~inlinE@2001-4dd3-7fc8-0-c092-91dd-c569-3f74.ipv6dyn.netcologne.de) (Ping timeout: 265 seconds)
2025-12-02 13:36:12 +0100 <[exa]> with Streaming this is pretty simple (you can unpack multiple sources yourself) but streaming is much less coroutine-ish
2025-12-02 13:35:27 +0100 <[exa]> seems like conduit really can't, there's no space for that in the data structure... https://hackage-content.haskell.org/package/conduit-1.3.6.1/docs/src/Data.Conduit.Internal.Pipe.ht…
2025-12-02 13:34:49 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-02 13:32:38 +0100 <[exa]> ah like, choose what routine to wait for at a given point
2025-12-02 13:29:56 +0100 <[exa]> kuribas: what do you mean with arbitrary
2025-12-02 13:29:55 +0100comerijn(~merijn@77.242.116.146) (Ping timeout: 245 seconds)
2025-12-02 13:27:28 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-02 13:27:25 +0100tromp(~textual@2001:1c00:3487:1b00:4073:6a24:b181:8b56) (Quit: My iMac has gone to sleep. ZZZzzz…)