Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-05-11 17:34:07 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-05-11 17:34:40 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-05-11 17:36:51 gawen_ joins (~gawen@movzbl.root.sx)
2021-05-11 17:38:06 aft is now known as AIM-9-SIDEWINDER
2021-05-11 17:38:13 × gawen quits (~gawen@movzbl.root.sx) (Ping timeout: 260 seconds)
2021-05-11 17:40:13 × _bin quits (~bin@75-54-107-59.lightspeed.hstntx.sbcglobal.net) (Ping timeout: 252 seconds)
2021-05-11 17:40:46 LKoen joins (~LKoen@156.168.9.109.rev.sfr.net)
2021-05-11 17:41:28 _bin joins (~bin@2600:1700:10a1:38d0:8cd7:7637:fad:1f0b)
2021-05-11 17:42:00 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
2021-05-11 17:43:17 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
2021-05-11 17:44:02 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 252 seconds)
2021-05-11 17:44:12 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 240 seconds)
2021-05-11 17:44:43 × justan0theruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2021-05-11 17:46:37 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-05-11 17:47:33 × mikoto-chan quits (~mikoto-ch@gateway/tor-sasl/mikoto-chan) (Ping timeout: 240 seconds)
2021-05-11 17:47:40 ukari joins (~ukari@unaffiliated/ukari)
2021-05-11 17:47:47 nineonin_ joins (~nineonine@50.216.62.2)
2021-05-11 17:48:42 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2021-05-11 17:49:44 mikoto-chan joins (~mikoto-ch@gateway/tor-sasl/mikoto-chan)
2021-05-11 17:50:38 aramend joins (~aramend@5.186.113.246.cgn.fibianet.dk)
2021-05-11 17:51:31 × nineonine quits (~nineonine@2604:3d08:777e:900:e4fe:87c8:c43b:fc90) (Ping timeout: 250 seconds)
2021-05-11 17:51:33 × chris__ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-05-11 17:52:37 hypercube joins (~hypercube@137.112.239.172)
2021-05-11 17:52:40 chris__ joins (~chris@81.96.113.213)
2021-05-11 17:52:45 × geekosaur quits (930099da@rrcs-147-0-153-218.central.biz.rr.com) (Quit: Connection closed)
2021-05-11 17:53:16 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-05-11 17:53:39 Pickchea joins (~private@unaffiliated/pickchea)
2021-05-11 17:54:46 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 240 seconds)
2021-05-11 17:57:41 Guest87676 joins (~laudiacay@67.176.215.84)
2021-05-11 17:58:09 AIM-9-SIDEWINDER is now known as mhz
2021-05-11 18:00:34 × kiltzman quits (~k1ltzman@195.189.99.96) (Ping timeout: 252 seconds)
2021-05-11 18:01:10 × geekosaur quits (930099da@rrcs-147-0-153-218.central.biz.rr.com) (Quit: Connection closed)
2021-05-11 18:01:28 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-05-11 18:01:50 kritzefitz joins (~kritzefit@212.86.56.80)
2021-05-11 18:05:17 × Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-05-11 18:05:26 × heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-05-11 18:05:44 Kaiepi joins (~Kaiepi@47.54.252.148)
2021-05-11 18:05:48 kiltzman joins (~k1ltzman@195.189.99.96)
2021-05-11 18:08:56 nolrai joins (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net)
2021-05-11 18:13:13 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds)
2021-05-11 18:14:11 × Khisanth quits (~Khisanth@255.sub-174-197-131.myvzw.com) (Ping timeout: 240 seconds)
2021-05-11 18:14:25 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-05-11 18:14:27 hiroaki joins (~hiroaki@2a02:8108:8c40:2bb8:7fc3:e4ce:2a81:16be)
2021-05-11 18:14:54 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2021-05-11 18:15:18 <aramend> I'm trying to build a cabal project that uses gloss in build depends. To manage dependencies I'm doing all of this inside a flake.nix that calls cabal2nix. I'd like to add a flag for building the gloss dependency, +glfw, since I'm unable to build using the default glut choice. I can't find a way effect this at all, never mind inside my project setup. Any suggestions?
2021-05-11 18:19:57 CuPenguin joins (~CuPenguin@207.38.239.235)
2021-05-11 18:20:15 CuPenguin parts (~CuPenguin@207.38.239.235) ("WeeChat 3.1")
2021-05-11 18:20:29 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2021-05-11 18:24:13 kupi joins (uid212005@gateway/web/irccloud.com/x-faqhkbxusvkvdgls)
2021-05-11 18:25:41 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
2021-05-11 18:26:11 <xe4> how to use sortWith?
2021-05-11 18:26:23 <Rembane> :t sortWith
2021-05-11 18:26:25 <lambdabot> error:
2021-05-11 18:26:25 <lambdabot> • Variable not in scope: sortWith
2021-05-11 18:26:25 <lambdabot> • Perhaps you meant ‘NE.sortWith’ (imported from Data.List.NonEmpty)
2021-05-11 18:26:42 <nolrai> Odd.
2021-05-11 18:26:44 notzmv joins (~zmv@unaffiliated/zmv)
2021-05-11 18:26:51 <nolrai> :t NE.sortWith
2021-05-11 18:26:52 <lambdabot> Ord o => (a -> o) -> NonEmpty a -> NonEmpty a
2021-05-11 18:27:43 Khisanth joins (~Khisanth@255.sub-174-197-131.myvzw.com)
2021-05-11 18:28:33 <Rembane> xe4: Are you thinking about the NonEmpty sortWith?
2021-05-11 18:28:39 <xe4> yes
2021-05-11 18:30:27 <nolrai> > NE.sortWith (reverse . snd) [(1,"bob"), (2,"alice"), (3, "aardvark"), (4, "za"), (5, "az")]
2021-05-11 18:30:29 <lambdabot> error:
2021-05-11 18:30:29 <lambdabot> • Couldn't match expected type ‘NonEmpty (a, [a1])’
2021-05-11 18:30:29 <lambdabot> with actual type ‘[(a0, [Char])]’
2021-05-11 18:31:02 × kuribas quits (~user@ptr-25vy0i9ywxfym2so1gs.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2021-05-11 18:31:11 <xe4> biggest = head ((sortWith (compare `on` fst)))
2021-05-11 18:31:25 <Rembane> NE.sortWith id $ NE.fromList [4,3,2,1]
2021-05-11 18:31:27 <Rembane> > NE.sortWith id $ NE.fromList [4,3,2,1]
2021-05-11 18:31:29 <lambdabot> 1 :| [2,3,4]
2021-05-11 18:32:30 <monochrom> sortWith's type suggests it doesn't want a comparator, it wants to map your element type to an orderable type.
2021-05-11 18:32:39 <nolrai> NE.sortWith doesn't use compare, it already is applying "compare `on`" internally.
2021-05-11 18:32:45 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
2021-05-11 18:33:07 <monochrom> The simplest case is "sortWith id" when my elements are already the orderable type I want.
2021-05-11 18:34:22 <nolrai> > NE.sortWith (reverse . snd) ((1,"bob") :| [(2,"alice"), (3, "aardvark"), (4, "za"), (5, "az")])
2021-05-11 18:34:24 <lambdabot> (4,"za") :| [(1,"bob"),(2,"alice"),(3,"aardvark"),(5,"az")]
2021-05-11 18:35:02 <nolrai> Err.. I shouldn't have used bob alice aardvark. >.<
2021-05-11 18:36:36 CuPenguin joins (~CuPenguin@207.38.239.235)
2021-05-11 18:36:44 <nolrai> > NE.sortWith (reverse . snd) ((1,"aaa") :| [(2,"ba"), (3, "bz"), (4, "za"), (5, "az")])
2021-05-11 18:36:46 <lambdabot> (1,"aaa") :| [(2,"ba"),(4,"za"),(5,"az"),(3,"bz")]
2021-05-11 18:37:43 × rajivr quits (uid269651@gateway/web/irccloud.com/x-hrgaorfqejcowubk) (Quit: Connection closed for inactivity)
2021-05-11 18:41:21 × rond_ quits (531aedb3@asz179.neoplus.adsl.tpnet.pl) (Quit: Connection closed)
2021-05-11 18:41:47 <tomsmeding> :t sortOn
2021-05-11 18:41:48 <lambdabot> Ord b => (a -> b) -> [a] -> [a]
2021-05-11 18:41:56 <tomsmeding> analogous function on normal lists
2021-05-11 18:42:32 bitmagie joins (~Thunderbi@200116b806b92e00b8b7218edf9a11f7.dip.versatel-1u1.de)
2021-05-11 18:42:37 <nolrai> Should probably be changed to be consistent, but it would be a breaking change.
2021-05-11 18:42:49 <tomsmeding> though sortOn has a slight runtime performance difference: it computes the projected 'b' values _once_, remembers them, and then sorts using that cache
2021-05-11 18:43:10 <tomsmeding> whereas sortWith, and Data.List.sortBy, recompute the mapping/comparison function for each comparison to be made
2021-05-11 18:43:36 <nolrai> Hmm. That could make a big difference in some cases.
2021-05-11 18:44:01 <tomsmeding> if your projection function is cheap, 'sortBy (comparing f)' may be significantly better than 'sortOn f' :)
2021-05-11 18:44:22 × nolrai quits (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net) (Quit: Connection closed)
2021-05-11 18:44:35 × nf quits (~n@monade.li) (Quit: Fairfarren.)
2021-05-11 18:44:56 <tomsmeding> I was really happy when I first discovered sortOn, then slightly confused and subsequently a bit disappointed upon learning this implementation difference :p
2021-05-11 18:45:01 × notzmv quits (~zmv@unaffiliated/zmv) (Ping timeout: 260 seconds)
2021-05-11 18:45:13 <tomsmeding> I seldomly sort with an expensive projection function, but maybe that's me
2021-05-11 18:45:34 nf joins (~n@monade.li)
2021-05-11 18:45:39 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-05-11 18:45:44 × minoru_shiraeesh quits (~shiraeesh@109.166.58.80) (Remote host closed the connection)

All times are in UTC.