2025/05/04

Newest at the top

2025-05-04 18:25:23 +0200 <int-e> Pozyomka: there's no zipper
2025-05-04 18:20:50 +0200j1n37(~j1n37@user/j1n37) j1n37
2025-05-04 18:19:23 +0200 <Pozyomka> int-e: “pretty heavy machinery” -- Are zippers heavy machinery now?
2025-05-04 18:18:42 +0200CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 276 seconds)
2025-05-04 18:16:34 +0200j1n37(~j1n37@user/j1n37) (Ping timeout: 244 seconds)
2025-05-04 18:11:08 +0200 <Pozyomka> The lengths through which Haskell programmers go to avoid defining types to represent intermediate steps of the lookup process... “I'd rather write a higher-order function with a Functor constraint than define a zipper type!”
2025-05-04 18:05:36 +0200alecs(~alecs@61.pool85-58-154.dynamic.orange.es) alecs
2025-05-04 17:58:50 +0200 <int-e> (Even for Data.Map, I believe the main thing it saves is repeated key comparisons. Which of course may be expensive, depending on the key type.)
2025-05-04 17:56:32 +0200 <lambdabot> (Functor f, Ord k) => (Maybe a -> f (Maybe a)) -> k -> M.Map k a -> f (M.Map k a)
2025-05-04 17:56:31 +0200 <int-e> :t Data.Map.alterF
2025-05-04 17:56:09 +0200 <lambdabot> Perhaps you meant one of these:
2025-05-04 17:56:09 +0200 <lambdabot> Not in scope: ‘Data.Map.adjustF’
2025-05-04 17:56:08 +0200 <lambdabot> error:
2025-05-04 17:56:07 +0200 <int-e> :t Data.Map.adjustF
2025-05-04 17:55:15 +0200 <int-e> The Data.Map version of this introduces some pretty heavy machinery to both find the altered element and remember the path to the corresponding leaf, and then reuses that path to speed up the update process. For Data.Sequence.Seq I think the potential savings over the obvious lookup and then fmap adjust aren't nearly as impressive.
2025-05-04 17:50:53 +0200JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-05-04 17:45:40 +0200sajenim(~sajenim@user/sajenim) (Ping timeout: 252 seconds)
2025-05-04 17:44:37 +0200lxsameer(~lxsameer@Serene/lxsameer) lxsameer
2025-05-04 17:44:23 +0200j1n37(~j1n37@user/j1n37) j1n37
2025-05-04 17:44:03 +0200 <[exa]> ok well probably not the case, the internal "single-lookup adjust" in the package doesn't seem to support passing the functors through
2025-05-04 17:43:50 +0200j1n37(~j1n37@user/j1n37) (Ping timeout: 252 seconds)
2025-05-04 17:39:08 +0200hiecaq(~hiecaq@user/hiecaq) (Quit: ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.0.92))
2025-05-04 17:30:01 +0200 <[exa]> Pozyomka: not really but maybe it would be redundant with other functions there?
2025-05-04 17:28:00 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2025-05-04 17:16:27 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) m1dnight
2025-05-04 17:12:42 +0200CiaoSen(~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen
2025-05-04 17:11:34 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) (Ping timeout: 252 seconds)
2025-05-04 17:08:52 +0200Typedfern(~Typedfern@213.red-83-37-26.dynamicip.rima-tde.net)
2025-05-04 17:06:30 +0200Typedfern(~Typedfern@213.red-83-37-26.dynamicip.rima-tde.net) (Ping timeout: 268 seconds)
2025-05-04 17:04:54 +0200 <Pozyomka> Is there any good reason why Data.Sequence doesn't export a function “adjustF :: Functor f => (a -> f a) -> Int -> Seq a -> f (Seq a)”?
2025-05-04 17:04:44 +0200yushyin(zv27G51Tbg@mail.karif.server-speed.net) yushyin
2025-05-04 17:04:44 +0200s4msung(K4xiEoBBTh@user/s4msung) s4msung
2025-05-04 17:04:40 +0200noctuks(d32f0pjuYL@user/noctux) noctux
2025-05-04 17:04:24 +0200tromp(~textual@2001:1c00:3487:1b00:25b8:e34c:8097:c1c7)
2025-05-04 17:04:04 +0200s4msung(HpS7xJgsJj@user/s4msung) (Quit: s4msung)
2025-05-04 17:04:04 +0200yushyin(qjh7DQNxXf@mail.karif.server-speed.net) (Quit: WeeChat 4.5.1)
2025-05-04 17:04:03 +0200noctuks(MR7CNKXm0J@user/noctux) (Quit: WeeChat 4.5.1)
2025-05-04 16:56:56 +0200Typedfern(~Typedfern@213.red-83-37-26.dynamicip.rima-tde.net) typedfern
2025-05-04 16:56:42 +0200Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) Unicorn_Princess
2025-05-04 16:56:17 +0200typedfern_(~Typedfern@213.red-83-37-26.dynamicip.rima-tde.net) (Ping timeout: 248 seconds)
2025-05-04 16:54:06 +0200euleritian(~euleritia@dynamic-176-006-131-173.176.6.pool.telefonica.de)
2025-05-04 16:53:05 +0200euleritian(~euleritia@ip4d17f82f.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds)
2025-05-04 16:52:27 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) m1dnight
2025-05-04 16:50:18 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) (Ping timeout: 252 seconds)
2025-05-04 16:38:56 +0200tromp(~textual@2001:1c00:3487:1b00:25b8:e34c:8097:c1c7) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-05-04 16:32:21 +0200euphores(~SASL_euph@user/euphores) euphores
2025-05-04 16:25:22 +0200euphores(~SASL_euph@user/euphores) (Ping timeout: 252 seconds)
2025-05-04 16:25:09 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) m1dnight
2025-05-04 16:23:10 +0200m1dnight(~m1dnight@d8D861908.access.telenet.be) (Ping timeout: 252 seconds)
2025-05-04 16:23:04 +0200target_i(~target_i@user/target-i/x-6023099) target_i