Newest at the top
2024-10-18 18:20:59 +0200 | <c_wraith> | EvanR: is that not just... iterate? |
2024-10-18 18:20:30 +0200 | <c_wraith> | err, lens's |
2024-10-18 18:20:22 +0200 | <c_wraith> | I'd honestly just use lenses's filtered combinator unless it doesn't work for some reason |
2024-10-18 18:20:14 +0200 | ncf | is confused about the problem |
2024-10-18 18:19:44 +0200 | <ncf> | wait, so you need to put the filtered list back in? |
2024-10-18 18:19:02 +0200 | <EvanR> | is there a version of unfoldr which keeps unfolding forever and doesn't need to deal with Maybe |
2024-10-18 18:18:54 +0200 | <haskellbridge> | <maralorn> Lears: I like the traverseMaybe idea, thank you. |
2024-10-18 18:18:35 +0200 | EvanR | (~EvanR@user/evanr) EvanR |
2024-10-18 18:18:25 +0200 | <haskellbridge> | <maralorn> c_wraith: Yeah, I know. But in the large team we have I’d rather be careful with that. |
2024-10-18 18:17:23 +0200 | <c_wraith> | There's a reason filtered is not a Fold |
2024-10-18 18:16:45 +0200 | chele | (~chele@user/chele) (Remote host closed the connection) |
2024-10-18 18:16:33 +0200 | <c_wraith> | The still *work*, they just can't be blindly refactored. |
2024-10-18 18:16:14 +0200 | <c_wraith> | You won't get prosecuted for using unlawful optics |
2024-10-18 18:16:09 +0200 | LukeHoersten | (~LukeHoers@user/lukehoersten) LukeHoersten |
2024-10-18 18:15:09 +0200 | <Lears> | I don't know about lenses, but you can write a `traverseMaybe :: Applicative f => (X -> f (Maybe X)) -> Y -> f Y` to fuse these operations. |
2024-10-18 18:14:23 +0200 | LukeHoersten | (~LukeHoers@user/lukehoersten) (Client Quit) |
2024-10-18 18:13:36 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
2024-10-18 18:11:51 +0200 | Square | (~Square@user/square) Square |
2024-10-18 18:10:11 +0200 | <haskellbridge> | <maralorn> Well, the problem is that Y is a really big datatype and the Xs are everywhere and I don’t want to repeat locating them 3 times. |
2024-10-18 18:09:40 +0200 | LukeHoersten | (~LukeHoers@user/lukehoersten) LukeHoersten |
2024-10-18 18:07:59 +0200 | <ncf> | use an optic for step 1 and then regular haskell for steps 2 and 3? |
2024-10-18 18:06:07 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-18 18:05:36 +0200 | <haskellbridge> | <maralorn> Lens wizards, please help, I am confused. I have a multiple X in Y, and I want to do three things on all the X, 1. get, 2. map, 3. filter. I can’t write a lawful traversal because filtering reduces the number of Xs. But a Fold is not enough because it can’t be used for mutation. Is there a reasonable optic to do this? |
2024-10-18 18:04:44 +0200 | alexherbo2 | (~alexherbo@2a02-8440-3207-4943-39e2-af68-9f9c-c108.rev.sfr.net) alexherbo2 |
2024-10-18 18:03:27 +0200 | billchenchina- | (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) billchenchina |
2024-10-18 17:55:32 +0200 | <glguy> | dmj`: yes, it is practical |
2024-10-18 17:55:29 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
2024-10-18 17:55:20 +0200 | euphores | (~SASL_euph@user/euphores) euphores |
2024-10-18 17:53:25 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2024-10-18 17:50:45 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-18 17:48:46 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2024-10-18 17:46:45 +0200 | euphores | (~SASL_euph@user/euphores) (Quit: Leaving.) |
2024-10-18 17:45:58 +0200 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
2024-10-18 17:40:00 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-10-18 17:35:21 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-18 17:34:46 +0200 | rosco | (~rosco@175.136.23.238) (Quit: Lost terminal) |
2024-10-18 17:25:14 +0200 | alexherbo2 | (~alexherbo@2a02-8440-3207-4943-39e2-af68-9f9c-c108.rev.sfr.net) (Remote host closed the connection) |
2024-10-18 17:24:24 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2024-10-18 17:23:51 +0200 | mari-estel | (~mari-este@user/mari-estel) (Remote host closed the connection) |
2024-10-18 17:23:39 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 260 seconds) |
2024-10-18 17:23:05 +0200 | ubert | (~Thunderbi@178.165.179.94.wireless.dyn.drei.com) (Ping timeout: 255 seconds) |
2024-10-18 17:20:00 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-18 17:13:27 +0200 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) tzh |
2024-10-18 17:09:24 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
2024-10-18 17:04:36 +0200 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-10-18 16:58:52 +0200 | euleritian | (~euleritia@dynamic-176-000-151-221.176.0.pool.telefonica.de) |
2024-10-18 16:58:34 +0200 | glguy | (glguy@libera/staff/glguy) glguy |
2024-10-18 16:57:53 +0200 | euleritian | (~euleritia@ip92340bd4.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
2024-10-18 16:56:49 +0200 | tabemann | (~tabemann@2600:1700:7990:24e0:14d2:2457:bd7:5741) (Ping timeout: 260 seconds) |
2024-10-18 16:56:31 +0200 | weary-traveler | (~user@user/user363627) user363627 |