Logs: liberachat/#haskell
| 2021-06-23 09:56:38 | → | xkuru joins (~xkuru@user/xkuru) |
| 2021-06-23 09:57:24 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:e846:fcb5:a54b:afb8) |
| 2021-06-23 09:58:28 | × | azeem quits (~azeem@176.201.6.138) (Ping timeout: 268 seconds) |
| 2021-06-23 09:58:36 | × | BosonCollider quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (Read error: Connection reset by peer) |
| 2021-06-23 09:58:53 | → | BosonCollider joins (~olofs@90-227-86-119-no542.tbcn.telia.com) |
| 2021-06-23 09:59:14 | → | azeem joins (~azeem@176.201.6.138) |
| 2021-06-23 10:00:38 | <dminuoso> | outoftime: A bunch of small typical mistakes |
| 2021-06-23 10:00:46 | <dminuoso> | `[x] ++ ...` is better written as `x : ...` |
| 2021-06-23 10:00:56 | <dminuoso> | `putStrLn . show` is better written as `print` |
| 2021-06-23 10:01:12 | <dminuoso> | You seem to be overly using ($), consider using composition or parens perhaps |
| 2021-06-23 10:01:55 | <merijn> | Looks mostly fine |
| 2021-06-23 10:02:03 | <merijn> | some style differences from how I'd write it |
| 2021-06-23 10:02:23 | <dminuoso> | Things like mapM_ or liftM2 are a bit odd, Id just use the applicative versions instead out of habit |
| 2021-06-23 10:02:34 | <dminuoso> | (the monadic ones should be thrown out IMO) |
| 2021-06-23 10:02:44 | <merijn> | last is probably a bad one too use |
| 2021-06-23 10:02:47 | → | dhil joins (~dhil@195.213.192.47) |
| 2021-06-23 10:03:08 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:e846:fcb5:a54b:afb8) (Ping timeout: 252 seconds) |
| 2021-06-23 10:03:27 | × | xkuru quits (~xkuru@user/xkuru) (Quit: Unvirtualizing) |
| 2021-06-23 10:03:30 | <merijn> | partial and inefficient, but whether it can be easily replaced depends on the algorithm and I'm too lazy to understand that :p |
| 2021-06-23 10:03:53 | → | xkuru joins (~xkuru@user/xkuru) |
| 2021-06-23 10:04:08 | <merijn> | I feel 'f' can be rewritten into a helper + iterate too |
| 2021-06-23 10:04:15 | <boxscape> | you can replace (head . group) by the versions from Data.List.NonEmpty if you want to avoid using head (which many people do since it's partial) |
| 2021-06-23 10:04:20 | <merijn> | :t iterate |
| 2021-06-23 10:04:21 | <lambdabot> | (a -> a) -> a -> [a] |
| 2021-06-23 10:04:22 | <dminuoso> | The amount of group/sort suggests you might perhaps want to use a map instead. |
| 2021-06-23 10:04:28 | → | qbt joins (~edun@user/edun) |
| 2021-06-23 10:04:34 | <dminuoso> | From containers |
| 2021-06-23 10:04:39 | <merijn> | boxscape: it's not partial there, since group never returns empty lists |
| 2021-06-23 10:04:48 | <merijn> | > iterate (+1) 0 |
| 2021-06-23 10:04:50 | <lambdabot> | [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,2... |
| 2021-06-23 10:05:16 | <boxscape> | merijn: sure, but a mistake down the line could transform it into a partial use. Not sure how likely that is, I just like not having head in my code at all. |
| 2021-06-23 10:05:35 | <boxscape> | (er, also I meant (map head . group)) |
| 2021-06-23 10:06:53 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:70b4:9739:defc:32cb) (Quit: Leaving) |
| 2021-06-23 10:07:02 | <boxscape> | personally I'd probably write `pair@(z, c)` instead of pattern matching on pair in the where block |
| 2021-06-23 10:07:08 | → | Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:70b4:9739:defc:32cb) |
| 2021-06-23 10:08:16 | × | talismanick quits (~user@2601:644:8502:d700::94c9) (Ping timeout: 244 seconds) |
| 2021-06-23 10:10:01 | → | fendor joins (~fendor@178.115.129.107.wireless.dyn.drei.com) |
| 2021-06-23 10:10:49 | <Ariakenom> | this head is cute |
| 2021-06-23 10:10:49 | <Ariakenom> | allSame xs = all (head xs ==) xs |
| 2021-06-23 10:10:55 | howdy`` | is now known as howdy |
| 2021-06-23 10:11:08 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 2021-06-23 10:11:44 | → | brandonh joins (~brandonh@151.34.105.205) |
| 2021-06-23 10:11:57 | × | brandonh quits (~brandonh@151.34.105.205) (Client Quit) |
| 2021-06-23 10:15:00 | <boxscape> | allSame = and . (zipWith (==) <*> tail) -- I might do this to avoid head but yeah yours reads nicer |
| 2021-06-23 10:15:06 | <boxscape> | wait |
| 2021-06-23 10:15:08 | <boxscape> | % tail [] |
| 2021-06-23 10:15:08 | <yahb> | boxscape: *** Exception: Prelude.tail: empty list |
| 2021-06-23 10:15:12 | <boxscape> | whoops |
| 2021-06-23 10:15:30 | × | raoul quits (~raoul@nomnomnomnom.co.uk) (Remote host closed the connection) |
| 2021-06-23 10:15:30 | → | f0c1s joins (~f0c1s@136.185.130.32) |
| 2021-06-23 10:15:55 | <__monty__> | Tail is no better than head? |
| 2021-06-23 10:16:06 | <boxscape> | yeah that's what I just realized |
| 2021-06-23 10:16:08 | <boxscape> | I guess I would use drop 1 |
| 2021-06-23 10:16:09 | <__monty__> | You seem kinda obsessed with head for no reason. |
| 2021-06-23 10:16:13 | <boxscape> | wait that doesn't help |
| 2021-06-23 10:16:18 | <boxscape> | oh no it does |
| 2021-06-23 10:16:29 | <__monty__> | > drop 1 [] |
| 2021-06-23 10:16:29 | <boxscape> | __monty__: I just like to not have any partial functions, period |
| 2021-06-23 10:16:31 | <lambdabot> | [] |
| 2021-06-23 10:16:43 | <__monty__> | It does not help. |
| 2021-06-23 10:16:48 | <boxscape> | why not? |
| 2021-06-23 10:16:51 | <__monty__> | tail [] |
| 2021-06-23 10:16:56 | <__monty__> | > tail [] |
| 2021-06-23 10:16:57 | <lambdabot> | *Exception: Prelude.tail: empty list |
| 2021-06-23 10:17:13 | <__monty__> | Oh, nvm, I'm wrong this time. |
| 2021-06-23 10:20:12 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 2021-06-23 10:21:00 | → | f0c1s_ joins (~f0c1s@106.197.230.212) |
| 2021-06-23 10:22:44 | → | Morrow joins (~MorrowM_@147.161.13.60) |
| 2021-06-23 10:23:35 | × | f0c1s quits (~f0c1s@136.185.130.32) (Ping timeout: 265 seconds) |
| 2021-06-23 10:24:33 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 265 seconds) |
| 2021-06-23 10:24:52 | → | DNH joins (~textual@8.44.0.30) |
| 2021-06-23 10:27:42 | → | dunkeln joins (~dunkeln@188.71.193.140) |
| 2021-06-23 10:28:41 | × | dunkeln quits (~dunkeln@188.71.193.140) (Client Quit) |
| 2021-06-23 10:28:57 | → | dunkeln joins (~dunkeln@188.71.193.140) |
| 2021-06-23 10:29:52 | × | qbt quits (~edun@user/edun) (Ping timeout: 265 seconds) |
| 2021-06-23 10:35:47 | × | azeem quits (~azeem@176.201.6.138) (Ping timeout: 258 seconds) |
| 2021-06-23 10:36:26 | → | azeem joins (~azeem@176.201.6.138) |
| 2021-06-23 10:37:19 | × | dunkeln quits (~dunkeln@188.71.193.140) (Ping timeout: 258 seconds) |
| 2021-06-23 10:37:47 | pie__bnc | is now known as pie_ |
| 2021-06-23 10:38:04 | pie_ | is now known as __ |
| 2021-06-23 10:38:06 | __ | is now known as pie_ |
| 2021-06-23 10:38:22 | pie_ | is now known as pie__ |
| 2021-06-23 10:38:23 | pie__ | is now known as pie_ |
| 2021-06-23 10:38:32 | → | MorrowM joins (~MorrowM_@147.161.9.12) |
| 2021-06-23 10:39:02 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-06-23 10:39:09 | pie_ | is now known as the |
| 2021-06-23 10:39:12 | the | is now known as pie_ |
| 2021-06-23 10:41:38 | × | Morrow quits (~MorrowM_@147.161.13.60) (Ping timeout: 268 seconds) |
| 2021-06-23 10:42:06 | → | mpt joins (~tom@2a02:908:1862:49e0::3) |
| 2021-06-23 10:42:16 | → | dunkeln joins (~dunkeln@188.71.193.140) |
| 2021-06-23 10:45:20 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 2021-06-23 10:46:35 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-23 10:47:41 | → | chisui joins (~chisui@200116b866efc300342cdc4d594c896c.dip.versatel-1u1.de) |
| 2021-06-23 10:49:02 | × | DNH quits (~textual@8.44.0.30) (Ping timeout: 268 seconds) |
| 2021-06-23 10:50:07 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 2021-06-23 10:50:42 | → | kuribas joins (~user@ptr-25vy0ia3kl0vdl4qmg0.18120a2.ip6.access.telenet.be) |
| 2021-06-23 10:51:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-06-23 10:52:01 | × | GIANTWORLDKEEPER quits (~pjetcetal@2.95.227.207) (Remote host closed the connection) |
| 2021-06-23 10:52:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-23 10:56:14 | → | DNH joins (~DNH@8.43.122.6) |
All times are in UTC.