Newest at the top
2024-09-27 02:17:26 +0200 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2024-09-27 02:17:19 +0200 | <Inst> | although there's definitely cases where the scoping is what you want |
2024-09-27 02:17:05 +0200 | <Inst> | also int-e, your way is better because it always executes on the top-level, whereas let / where with bang patterns only executes in the particular branch of the function |
2024-09-27 02:15:23 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
2024-09-27 02:14:39 +0200 | polyphem | (~rod@p4fc2ccf6.dip0.t-ipconnect.de) polyphem |
2024-09-27 02:12:30 +0200 | polyphem | (~rod@p4fc2c857.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2024-09-27 02:12:13 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-09-27 02:11:51 +0200 | arahael | (~arahael@user/arahael) arahael |
2024-09-27 02:10:05 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-09-27 02:08:50 +0200 | raehik | (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 265 seconds) |
2024-09-27 02:06:58 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-09-27 02:04:08 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2024-09-27 02:04:07 +0200 | <geekosaur> | case guards |
2024-09-27 02:03:58 +0200 | <geekosaur> | oh, I thought you meant what int-e was talking about |
2024-09-27 02:03:34 +0200 | <lambdabot> | Alternative f => Bool -> f () |
2024-09-27 02:03:34 +0200 | <Inst> | it's in a do block over list with guard forcing termination |
2024-09-27 02:03:33 +0200 | <geekosaur> | :t guard |
2024-09-27 02:03:19 +0200 | <Inst> | am i misusing guard? |
2024-09-27 02:02:40 +0200 | geekosaur | wonders if you really want `guard` |
2024-09-27 02:00:49 +0200 | <Inst> | i was using !_ = assert (9 > length neighbors) () as the checkpoint |
2024-09-27 02:00:18 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds) |
2024-09-27 01:59:34 +0200 | <haskellbridge> | <sm> as usual I'll mention my Hledger.Utils.Debug for more trace helper ideas |
2024-09-27 01:59:27 +0200 | <Inst> | let !_ = traceShow ("label", val1, val2) () in |
2024-09-27 01:58:48 +0200 | <haskellbridge> | <sm> traceShowId is handy sometimes |
2024-09-27 01:57:53 +0200 | <int-e> | usually with the guard trick; I'll do | traceShow ("label", val1, val2) False = undefined |
2024-09-27 01:56:56 +0200 | <int-e> | but I can't say the same about `traceShowId` |
2024-09-27 01:56:36 +0200 | <int-e> | I like `traceShow`, it feels useful. |
2024-09-27 01:56:32 +0200 | geekosaur | is not so much with the "derogatory" |
2024-09-27 01:56:25 +0200 | <monochrom> | I.e., a name for "yes, it's just you, no one else wants that function". |
2024-09-27 01:56:03 +0200 | <monochrom> | We need a derogatory name for the opposite of the Fairbairn threshold. |
2024-09-27 01:56:03 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
2024-09-27 01:55:08 +0200 | <monochrom> | Also I would find things like "assert (n < length xs) (xs !! n)" the dominant use case, generally the condition is not simply a predicate over the answer. |
2024-09-27 01:55:03 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-09-27 01:55:03 +0200 | <geekosaur> | I just use `trace` |
2024-09-27 01:54:53 +0200 | <geekosaur> | I don't consider that one to meet Fairbairn either tbh |
2024-09-27 01:53:26 +0200 | <Inst> | yeah i guess, i ran it as a debug function since traceShowId was providing too much information |
2024-09-27 01:52:50 +0200 | todi | (~todi@p57803331.dip0.t-ipconnect.de) todi |
2024-09-27 01:52:28 +0200 | weary-traveler | (~user@user/user363627) user363627 |
2024-09-27 01:51:25 +0200 | <geekosaur> | easy enough to write yourself; doesn't meet the Fairbairn threshold IMO |
2024-09-27 01:51:10 +0200 | merijn | (~merijn@204-220-045-062.dynamic.caiway.nl) merijn |
2024-09-27 01:49:57 +0200 | <monochrom> | https://hackage.haskell.org/package/base-4.20.0.1/docs/Control-Exception.html#v:assert |
2024-09-27 01:49:01 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
2024-09-27 01:48:53 +0200 | todi | (~todi@p57803331.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
2024-09-27 01:47:40 +0200 | <Inst> | assert_ f a = assert (f a) a or (\a -> assert (_myFun a) a |
2024-09-27 01:45:24 +0200 | <Inst> | there's no assert_ :: (a -> Bool) -> a -> a? |
2024-09-27 01:45:14 +0200 | <Inst> | okay... |
2024-09-27 01:44:31 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
2024-09-27 01:35:22 +0200 | sourcetarius | (~sourcetar@user/sourcetarius) sourcetarius |
2024-09-27 01:34:58 +0200 | morb | (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
2024-09-27 01:30:26 +0200 | sm | has +1 chaos |