2026/06/09

Newest at the top

2026-06-09 21:28:36 +0000 <lambdabot> [("a",5),("b",7),("c",8)]
2026-06-09 21:28:35 +0000 <tomsmeding> > map head . groupBy ((==) `on` fst) . sort $ [("a", 6), ("b", 7), ("a", 5), ("c", 8)]
2026-06-09 21:28:28 +0000merijn(~merijn@62.45.136.136) (Ping timeout: 276 seconds)
2026-06-09 21:28:21 +0000 <int-e> compare https://hackage-content.haskell.org/package/containers-0.8/docs/Data-Map-Lazy.html#v:fromListWith
2026-06-09 21:28:09 +0000 <lambdabot> (Ord k, Ord a) => [(k, a)] -> [(k, a)]
2026-06-09 21:28:08 +0000 <int-e> :t M.toList . M.fromListWith min
2026-06-09 21:27:50 +0000 <Rinus`> No, not important.
2026-06-09 21:27:22 +0000 <int-e> Is the order of the list item important?
2026-06-09 21:27:14 +0000 <Rinus`> They could be anywhere in the list
2026-06-09 21:27:11 +0000 <mauke> is it only "a" that keeps the smallest value? what about the other keys?
2026-06-09 21:26:39 +0000 <tomsmeding> Rinus`: will the equal fst values always come in one run, or might they be spread throughout the list?
2026-06-09 21:25:31 +0000 <Rinus`> So, I want to keep the ("a", 5)to be in the list.
2026-06-09 21:25:30 +0000 <lambdabot> (a -> a -> Bool) -> [a] -> [a]
2026-06-09 21:25:29 +0000 <mauke> :t nubBy
2026-06-09 21:25:01 +0000 <Rinus`> In case of the "a" I would want to keep the item with the smallest number as snd.
2026-06-09 21:24:07 +0000 <Rinus`> But
2026-06-09 21:24:05 +0000 <Rinus`> I want to end up with a list where the fst values of the list are unique. So in this case the "a", "b", and "c".
2026-06-09 21:22:31 +0000 <Rinus`> Ok, so I have a list of tuples, lets say [("a",5), ("a", 6), ("b", 7), ("c, 8)]
2026-06-09 21:21:15 +0000merijn(~merijn@62.45.136.136) merijn
2026-06-09 21:20:06 +0000 <mauke> sure
2026-06-09 21:19:58 +0000 <Rinus`> It's my first time here. Can I ask a question straight away?
2026-06-09 21:19:21 +0000 <mauke> o/
2026-06-09 21:19:13 +0000 <Rinus`> Greetings from a Haskell-beginner, full of questions!
2026-06-09 21:18:31 +0000target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2026-06-09 21:17:23 +0000Rinus`(~user@2001:1c00:a16:9d00:246:e3b:d72c:b985)
2026-06-09 21:11:31 +0000Axma81797(~Axman6@user/axman6) (Ping timeout: 259 seconds)
2026-06-09 21:10:48 +0000Rinus`(~user@2001:1c00:a16:9d00:246:e3b:d72c:b985) (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.2))
2026-06-09 21:10:15 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 241 seconds)
2026-06-09 21:09:29 +0000Axman6(~Axman6@user/axman6) Axman6
2026-06-09 21:08:50 +0000Square2(~Square4@user/square) Square
2026-06-09 21:06:52 +0000x9(~x9@91-152-187-79.elisa-laajakaista.fi) (Ping timeout: 245 seconds)
2026-06-09 21:06:01 +0000Rinus`(~user@2001:1c00:a16:9d00:246:e3b:d72c:b985)
2026-06-09 21:05:23 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-06-09 21:00:40 +0000vms14(~vms@user/vms14) (Quit: WeeChat 4.6.3)
2026-06-09 20:59:20 +0000Square3(~Square@user/square) (Remote host closed the connection)
2026-06-09 20:57:24 +0000user363627(~user@user/user363627) (Remote host closed the connection)
2026-06-09 20:54:42 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-06-09 20:49:46 +0000takuan(~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 256 seconds)
2026-06-09 20:49:37 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-06-09 20:48:29 +0000petrichor(~jez@user/petrichor) petrichor
2026-06-09 20:37:49 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-06-09 20:37:10 +0000morj(~morj@user/morj) (Quit: Konversation terminated!)
2026-06-09 20:30:14 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-06-09 20:25:45 +0000L29Ah(~L29Ah@wikipedia/L29Ah) ()
2026-06-09 20:17:45 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-06-09 20:16:26 +0000L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2026-06-09 20:11:52 +0000merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-06-09 20:11:31 +0000user363627(~user@user/user363627) user363627
2026-06-09 20:09:55 +0000Inline(~noOne@ipservice-092-208-182-236.092.208.pools.vodafone-ip.de) (Quit: KVIrc 5.2.8 Quasar http://www.kvirc.net/)
2026-06-09 20:07:10 +0000petrichor(~jez@user/petrichor) (Ping timeout: 252 seconds)