Newest at the top
2025-03-12 16:47:50 +0100 | notdabs | (~Owner@2600:1700:69cf:9000:91e8:307c:455b:5f65) |
2025-03-12 16:46:46 +0100 | <Inst> | thanks |
2025-03-12 16:46:29 +0100 | <c_wraith> | that's going to be highly workload-dependent. There's no generally correct answer. |
2025-03-12 16:43:46 +0100 | <Inst> | \a cont -> par cont a `pseq` ...; is it more correct to have par a cont or par cont a? |
2025-03-12 16:42:46 +0100 | <Inst> | a foldr |
2025-03-12 16:42:31 +0100 | <Inst> | when you're parallelizing a fold |
2025-03-12 16:42:01 +0100 | Guest99 | (~Guest47@2600:387:f:7e18::6) (Quit: Client closed) |
2025-03-12 16:40:04 +0100 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2025-03-12 16:37:39 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-03-12 16:37:24 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 246 seconds) |
2025-03-12 16:37:04 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 244 seconds) |
2025-03-12 16:33:35 +0100 | T0NN | (~T0NN@193.42.62.209) (Quit: Client closed) |
2025-03-12 16:33:05 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 16:32:06 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-03-12 16:24:41 +0100 | Guest99 | (~Guest47@2600:387:f:7e18::6) |
2025-03-12 16:22:47 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2025-03-12 16:14:08 +0100 | infinity0 | (~infinity0@pwned.gg) (Ping timeout: 245 seconds) |
2025-03-12 16:07:05 +0100 | infinity0 | (~infinity0@pwned.gg) infinity0 |
2025-03-12 16:00:39 +0100 | <[exa]> | tomsmeding: iiiiiiiinteresting thanks! |
2025-03-12 15:54:03 +0100 | T0NN | (~T0NN@193.42.62.209) |
2025-03-12 15:50:33 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-03-12 15:47:40 +0100 | lottaquestions | (~nick@2607:fa49:5040:b100:5b52:ac7b:b1b7:f59f) lottaquestions |
2025-03-12 15:45:39 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 15:34:53 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) TheCoffeMaker |
2025-03-12 15:31:11 +0100 | <carbolymer> | but in my quick test `sortBy (\_ _ -> GT)` results in just reversed list |
2025-03-12 15:30:39 +0100 | <carbolymer> | I guess it's not true for all comparison functions in sortBy |
2025-03-12 15:30:39 +0100 | <carbolymer> | >otherwise, e. g., for _ _ -> GT, the ordered list simply does not exist |
2025-03-12 15:29:21 +0100 | <tomsmeding> | it would be nice if this was also mentioned in 'sortBy', but I think we can extrapolate |
2025-03-12 15:28:59 +0100 | <tomsmeding> | carbolymer: from the haddocks of 'sort': The sort function implements a stable sorting algorithm. |
2025-03-12 15:28:57 +0100 | <carbolymer> | that was my intuition, thanks tomsmeding for confirming ;] |
2025-03-12 15:28:10 +0100 | T0NN | (~T0NN@104.28.196.52) (Client Quit) |
2025-03-12 15:27:39 +0100 | <tomsmeding> | for longer lists, it splits the list into runs of alternatingly ascending/descending elements; in your case there's just one run, so the algorithm terminates there |
2025-03-12 15:27:14 +0100 | <tomsmeding> | looking at the implementation, for lists of length <=4 it has a manually written decision tree that, if I am to believe the comments, should only reorder if a preceding element is strictly greater than a following element |
2025-03-12 15:26:51 +0100 | T0NN | (~T0NN@104.28.196.52) |
2025-03-12 15:26:35 +0100 | T0NN | (~T0NN@104.28.196.52) (Client Quit) |
2025-03-12 15:26:14 +0100 | <tomsmeding> | I'm fairly sure yes |
2025-03-12 15:25:55 +0100 | <carbolymer> | even simpler: `sortBy (\_ _ -> LT)` |
2025-03-12 15:25:23 +0100 | <carbolymer> | `sortBy compare` I mean |
2025-03-12 15:25:15 +0100 | T0NN | (~T0NN@104.28.196.52) |
2025-03-12 15:24:54 +0100 | <carbolymer> | is Data.List.sortBy guaranteed to be stable over `[Foo]` if I have a trivial `instance Ord Foo where compare _ _ = LT` ? In other words, I expect it to not change the order of elements. |
2025-03-12 15:24:48 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 252 seconds) |
2025-03-12 15:23:35 +0100 | T0NN | (~T0NN@104.28.196.52) (Client Quit) |
2025-03-12 15:23:18 +0100 | son0p | (~ff@2800:e6:4000:d723:c181:4205:f2b1:437a) son0p |
2025-03-12 15:22:55 +0100 | T0NN | (~T0NN@104.28.196.52) |
2025-03-12 15:19:23 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3504-140e-55c2-d7c2-899b-0789.rev.sfr.net) alexherbo2 |
2025-03-12 15:07:17 +0100 | acidjnk_new | (~acidjnk@p200300d6e7283f52210926b325fe4262.dip0.t-ipconnect.de) |
2025-03-12 15:03:59 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 260 seconds) |
2025-03-12 15:03:11 +0100 | son0p | (~ff@2800:e6:4000:d723:c181:4205:f2b1:437a) (Read error: Connection reset by peer) |
2025-03-12 14:59:14 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 14:59:00 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:7180::ac59) (Ping timeout: 265 seconds) |