2026/02/24

Newest at the top

2026-02-24 19:33:08 +0100T_S_____(sid501726@id-501726.uxbridge.irccloud.com)
2026-02-24 19:32:59 +0100T_S_____(sid501726@id-501726.uxbridge.irccloud.com) (Server closed connection)
2026-02-24 19:32:35 +0100tremon(~tremon@83.80.159.219) tremon
2026-02-24 19:26:52 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) GdeVolpiano
2026-02-24 19:26:32 +0100GdeVolpiano(~GdeVolpia@user/GdeVolpiano) (Quit: WeeChat 4.7.2)
2026-02-24 19:21:40 +0100 <EvanR> for a one off case, this takes a lot less support
2026-02-24 19:21:39 +0100 <Milan_Vanca> Little more verbose but one does not need another lib.
2026-02-24 19:20:46 +0100 <EvanR> you can also write an update function f g (v1, Just x, v3) = (v1, Just (g x), v3)
2026-02-24 19:18:41 +0100 <EvanR> that is one way
2026-02-24 19:18:04 +0100 <Milan_Vanca> Yeah :) This is nice.. and If I wanted to modify v2 I could use lenses for that. Is that correct?
2026-02-24 19:15:45 +0100 <haskellbridge> <loonycyborg> yep
2026-02-24 19:15:28 +0100rainbyte_(~rainbyte@186.22.19.214) rainbyte
2026-02-24 19:15:23 +0100 <Milan_Vanca> loonycyborg: Do you mean something like (v1, (Just v2), _) ?
2026-02-24 19:15:19 +0100rainbyte(~rainbyte@186.22.19.214) (Remote host closed the connection)
2026-02-24 19:13:03 +0100traxex(traxex@user/traxex) traxex
2026-02-24 19:11:39 +0100glguy(glguy@libera/staff/glguy) glguy
2026-02-24 19:11:34 +0100glguy(glguy@libera/staff/glguy) (*.net *.split)
2026-02-24 19:08:45 +0100 <haskellbridge> <loonycyborg> Milan_Vanca: not sure if it applies to your situation but you can do deep nesting in the pattern too, so if you just want to look deeper in a nested structure you can fold nested "case" into a single case.
2026-02-24 19:05:29 +0100lisbeths(uid135845@id-135845.lymington.irccloud.com) lisbeths
2026-02-24 19:04:02 +0100philopsos1(~caecilius@user/philopsos) (Ping timeout: 256 seconds)
2026-02-24 18:58:21 +0100petrichor(~jez@user/petrichor) petrichor
2026-02-24 18:56:45 +0100cipherrot(~jez@user/petrichor) (Quit: ZNC 1.10.1 - https://znc.in)
2026-02-24 18:56:01 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9)
2026-02-24 18:52:51 +0100tromp(~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-24 18:52:37 +0100wickedjargon(~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) wickedjargon
2026-02-24 18:51:54 +0100wickedja`(~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) (Remote host closed the connection)
2026-02-24 18:51:47 +0100wickedjargon(~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) (Remote host closed the connection)
2026-02-24 18:48:57 +0100wickedja`(~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce)
2026-02-24 18:45:34 +0100wickedjargon(~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) wickedjargon
2026-02-24 18:42:16 +0100 <Milan_Vanca> Hmm map with lookup sounds interesting too.
2026-02-24 18:40:27 +0100 <ncf> i mean that's fine, if you have a lot of those you might want to define a list or a map like [(methodGet, counterGet), (methodPut, counterPut), ...] and then do a lookup into that
2026-02-24 18:39:13 +0100 <Milan_Vanca> If I had only 2 then I would use an if expression which is perfect solution for that case
2026-02-24 18:38:28 +0100 <Milan_Vanca> Like I can do it with if but it does not look like nicer solution.
2026-02-24 18:37:29 +0100 <Milan_Vanca> What about now? https://paste.tomsmeding.com/ptnApMeq
2026-02-24 18:36:23 +0100 <ncf> well, an if expression
2026-02-24 18:36:14 +0100 <ncf> i don't see a reason not to use an if statement there
2026-02-24 18:35:44 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds)
2026-02-24 18:34:55 +0100weary-traveler(~user@user/user363627) (Remote host closed the connection)
2026-02-24 18:33:10 +0100Pozyomka(~pyon@user/pyon) pyon
2026-02-24 18:32:45 +0100Pozyomka(~pyon@user/pyon) (Quit: brb)
2026-02-24 18:32:27 +0100 <Milan_Vanca> I think I can do this https://paste.tomsmeding.com/FfemQcpX but this case of is ugly?
2026-02-24 18:27:24 +0100petrichor(~jez@user/petrichor) (Ping timeout: 245 seconds)
2026-02-24 18:26:42 +0100cipherrot(~jez@user/petrichor) petrichor
2026-02-24 18:25:36 +0100euphores(~SASL_euph@user/euphores) euphores
2026-02-24 18:24:54 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 255 seconds)
2026-02-24 18:23:45 +0100bggd_(~bgg@2a01:e0a:fd5:f510:ad7c:fa54:e40d:9544) (Remote host closed the connection)
2026-02-24 18:21:07 +0100 <Milan_Vanca> I probably need whole new function for it
2026-02-24 18:20:50 +0100petrichor(~jez@user/petrichor) petrichor
2026-02-24 18:20:48 +0100 <Milan_Vanca> Imagine I want to have another otherwise with under counter path.
2026-02-24 18:18:56 +0100 <Milan_Vanca> So is there other way how to rewrite this more nicely? https://paste.tomsmeding.com/NokCDmVI