Logs: liberachat/#haskell
| 2026-02-24 16:12:07 | califax_ | is now known as califax |
| 2026-02-24 16:13:14 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 2026-02-24 16:16:56 | × | paddymahoney quits (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds) |
| 2026-02-24 16:19:16 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 265 seconds) |
| 2026-02-24 16:22:18 | → | _d0t joins (~{-d0t-}@user/-d0t-/x-7915216) |
| 2026-02-24 16:34:16 | × | petrichor quits (~jez@user/petrichor) (Quit: ZNC 1.10.1 - https://znc.in) |
| 2026-02-24 16:37:54 | → | philopsos1 joins (~caecilius@user/philopsos) |
| 2026-02-24 16:40:48 | × | jtnuttall quits (~jeremy@user/jeremyn) (Ping timeout: 255 seconds) |
| 2026-02-24 16:42:57 | → | jmcantrell_ joins (~weechat@user/jmcantrell) |
| 2026-02-24 16:45:06 | jmcantrell_ | is now known as jmcantrell |
| 2026-02-24 16:48:19 | × | Googulator quits (~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu) (Quit: Client closed) |
| 2026-02-24 16:48:33 | → | Googulator joins (~Googulato@2a01-036d-0106-499d-1c5a-0e4b-5795-d7e3.pool6.digikabel.hu) |
| 2026-02-24 16:52:59 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 2026-02-24 16:54:20 | → | tromp joins (~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) |
| 2026-02-24 17:00:55 | → | Milan_Vanca joins (~milan@user/Milan-Vanca:32634) |
| 2026-02-24 17:00:59 | × | lbseale quits (~quassel@user/ep1ctetus) (Quit: No Ping reply in 180 seconds.) |
| 2026-02-24 17:02:14 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 2026-02-24 17:04:12 | <Milan_Vanca> | Hello guyz.. Stupid quesiton incoming! We can nicely nest "case of" fn a b c = case a of.. case b of... Lovely but sadly I can't pattern match and need guards. Which I don't know how to nest. I don't want to duplicate e1 && e2 && e3 when only e4 changes. |
| 2026-02-24 17:05:29 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 2026-02-24 17:09:39 | <ncf> | guards don't do anything that let and case can't |
| 2026-02-24 17:10:10 | <ncf> | if you really want a RHS equivalent of guards there is MultiWayIf https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/multiway_if.html |
| 2026-02-24 17:18:56 | <Milan_Vanca> | So is there other way how to rewrite this more nicely? https://paste.tomsmeding.com/NokCDmVI |
| 2026-02-24 17:20:48 | <Milan_Vanca> | Imagine I want to have another otherwise with under counter path. |
| 2026-02-24 17:20:50 | → | petrichor joins (~jez@user/petrichor) |
| 2026-02-24 17:21:07 | <Milan_Vanca> | I probably need whole new function for it |
| 2026-02-24 17:23:45 | × | bggd_ quits (~bgg@2a01:e0a:fd5:f510:ad7c:fa54:e40d:9544) (Remote host closed the connection) |
| 2026-02-24 17:24:54 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 255 seconds) |
| 2026-02-24 17:25:36 | → | euphores joins (~SASL_euph@user/euphores) |
| 2026-02-24 17:26:42 | → | cipherrot joins (~jez@user/petrichor) |
| 2026-02-24 17:27:24 | × | petrichor quits (~jez@user/petrichor) (Ping timeout: 245 seconds) |
| 2026-02-24 17:32:27 | <Milan_Vanca> | I think I can do this https://paste.tomsmeding.com/FfemQcpX but this case of is ugly? |
| 2026-02-24 17:32:45 | × | Pozyomka quits (~pyon@user/pyon) (Quit: brb) |
| 2026-02-24 17:33:10 | → | Pozyomka joins (~pyon@user/pyon) |
| 2026-02-24 17:34:55 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 2026-02-24 17:35:44 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds) |
| 2026-02-24 17:36:14 | <ncf> | i don't see a reason not to use an if statement there |
| 2026-02-24 17:36:23 | <ncf> | well, an if expression |
| 2026-02-24 17:37:29 | <Milan_Vanca> | What about now? https://paste.tomsmeding.com/ptnApMeq |
| 2026-02-24 17:38:28 | <Milan_Vanca> | Like I can do it with if but it does not look like nicer solution. |
| 2026-02-24 17:39:13 | <Milan_Vanca> | If I had only 2 then I would use an if expression which is perfect solution for that case |
| 2026-02-24 17:40:27 | <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 17:42:16 | <Milan_Vanca> | Hmm map with lookup sounds interesting too. |
| 2026-02-24 17:45:34 | → | wickedjargon joins (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) |
| 2026-02-24 17:48:57 | → | wickedja` joins (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) |
| 2026-02-24 17:51:47 | × | wickedjargon quits (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) (Remote host closed the connection) |
| 2026-02-24 17:51:54 | × | wickedja` quits (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) (Remote host closed the connection) |
| 2026-02-24 17:52:37 | → | wickedjargon joins (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) |
| 2026-02-24 17:52:51 | × | tromp quits (~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-02-24 17:56:01 | → | tromp joins (~textual@2001:1c00:3487:1b00:7955:9591:6018:7ef9) |
| 2026-02-24 17:56:45 | × | cipherrot quits (~jez@user/petrichor) (Quit: ZNC 1.10.1 - https://znc.in) |
| 2026-02-24 17:58:21 | → | petrichor joins (~jez@user/petrichor) |
| 2026-02-24 18:04:02 | × | philopsos1 quits (~caecilius@user/philopsos) (Ping timeout: 256 seconds) |
| 2026-02-24 18:05:29 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 2026-02-24 18:08:45 | <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 18:11:34 | × | glguy quits (glguy@libera/staff/glguy) (*.net *.split) |
| 2026-02-24 18:11:39 | → | glguy joins (glguy@libera/staff/glguy) |
| 2026-02-24 18:13:03 | → | traxex joins (traxex@user/traxex) |
| 2026-02-24 18:15:19 | × | rainbyte quits (~rainbyte@186.22.19.214) (Remote host closed the connection) |
| 2026-02-24 18:15:23 | <Milan_Vanca> | loonycyborg: Do you mean something like (v1, (Just v2), _) ? |
| 2026-02-24 18:15:28 | → | rainbyte_ joins (~rainbyte@186.22.19.214) |
| 2026-02-24 18:15:45 | <haskellbridge> | <loonycyborg> yep |
| 2026-02-24 18:18:04 | <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 18:18:41 | <EvanR> | that is one way |
| 2026-02-24 18:20:46 | <EvanR> | you can also write an update function f g (v1, Just x, v3) = (v1, Just (g x), v3) |
| 2026-02-24 18:21:39 | <Milan_Vanca> | Little more verbose but one does not need another lib. |
| 2026-02-24 18:21:40 | <EvanR> | for a one off case, this takes a lot less support |
| 2026-02-24 18:26:32 | × | GdeVolpiano quits (~GdeVolpia@user/GdeVolpiano) (Quit: WeeChat 4.7.2) |
| 2026-02-24 18:26:52 | → | GdeVolpiano joins (~GdeVolpia@user/GdeVolpiano) |
| 2026-02-24 18:32:35 | → | tremon joins (~tremon@83.80.159.219) |
| 2026-02-24 18:32:59 | × | T_S_____ quits (sid501726@id-501726.uxbridge.irccloud.com) (Server closed connection) |
| 2026-02-24 18:33:08 | → | T_S_____ joins (sid501726@id-501726.uxbridge.irccloud.com) |
| 2026-02-24 18:39:09 | → | paddymahoney joins (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) |
| 2026-02-24 18:41:50 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2026-02-24 18:46:15 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2026-02-24 18:48:09 | × | paddymahoney quits (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) (Ping timeout: 248 seconds) |
| 2026-02-24 18:48:45 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-24 18:50:42 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 2026-02-24 18:52:12 | → | morj_away joins (~morj@user/morj) |
| 2026-02-24 18:52:59 | × | exarkun quits (~exarkun@user/exarkun) (Server closed connection) |
| 2026-02-24 18:53:24 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 2026-02-24 18:54:20 | → | exarkun joins (~exarkun@user/exarkun) |
| 2026-02-24 18:55:48 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 255 seconds) |
| 2026-02-24 18:58:03 | × | target_i quits (~target_i@user/target-i/x-6023099) (Ping timeout: 255 seconds) |
| 2026-02-24 18:58:44 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 2026-02-24 19:02:45 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2026-02-24 19:03:45 | → | paddymahoney joins (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) |
| 2026-02-24 19:04:44 | → | euphores joins (~SASL_euph@user/euphores) |
| 2026-02-24 19:06:48 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-24 19:08:14 | × | wickedjargon quits (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) (Ping timeout: 245 seconds) |
| 2026-02-24 19:11:44 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
| 2026-02-24 19:15:39 | × | aristid quits (sid1599@id-1599.uxbridge.irccloud.com) (Server closed connection) |
| 2026-02-24 19:15:47 | → | aristid joins (sid1599@id-1599.uxbridge.irccloud.com) |
| 2026-02-24 19:17:24 | × | paddymahoney quits (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) (Ping timeout: 255 seconds) |
| 2026-02-24 19:18:59 | × | disconnect3d quits (~disconnec@user/disconnect3d) (Server closed connection) |
| 2026-02-24 19:21:55 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-24 19:25:49 | → | arandombit joins (~arandombi@2a02:2455:8656:7100:eca0:756e:c98c:4e3f) |
| 2026-02-24 19:25:49 | × | arandombit quits (~arandombi@2a02:2455:8656:7100:eca0:756e:c98c:4e3f) (Changing host) |
| 2026-02-24 19:25:49 | → | arandombit joins (~arandombi@user/arandombit) |
| 2026-02-24 19:25:56 | → | wickedjargon joins (~user@2605:8d80:5431:6cb2:b646:a30f:510c:87ce) |
| 2026-02-24 19:26:48 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
All times are in UTC.