Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-11 23:43:02 elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-11 23:44:07 redmp_ joins (~redmp@172.58.19.17)
2021-03-11 23:44:49 inkbottle is now known as zebrag
2021-03-11 23:45:49 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-03-11 23:46:13 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-03-11 23:46:18 × stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds)
2021-03-11 23:47:12 × redmp quits (~redmp@172.58.22.241) (Ping timeout: 256 seconds)
2021-03-11 23:48:03 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 246 seconds)
2021-03-11 23:48:27 quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
2021-03-11 23:48:46 × zebrag quits (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-11 23:49:06 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
2021-03-11 23:49:07 zebrag joins (~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-11 23:52:31 × heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection)
2021-03-11 23:53:55 Shinji_Ikari joins (~Shinji_Ik@2600:380:a140:2413:f957:6aa:223e:a20f)
2021-03-11 23:57:30 × ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 246 seconds)
2021-03-11 23:58:36 × Shinji_Ikari quits (~Shinji_Ik@2600:380:a140:2413:f957:6aa:223e:a20f) (Quit: Quit)
2021-03-11 23:59:01 stree joins (~stree@68.36.8.116)
2021-03-11 23:59:09 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-03-11 23:59:25 jpds joins (~jpds@gateway/tor-sasl/jpds)
2021-03-12 00:00:17 × acidjnk_new quits (~acidjnk@p200300d0c72b95695d3c722039acad7c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 00:01:17 heatsink joins (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a)
2021-03-12 00:01:33 × smol quits (b0259152@host-176-37-145-82.b025.la.net.ua) (Quit: Connection closed)
2021-03-12 00:02:26 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 00:02:26 ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 00:03:11 × ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Remote host closed the connection)
2021-03-12 00:04:25 × Alex4 quits (~Alex@185.204.1.185) (Remote host closed the connection)
2021-03-12 00:05:37 mirrorbird joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-12 00:05:53 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 245 seconds)
2021-03-12 00:07:19 Tario joins (~Tario@201.192.165.173)
2021-03-12 00:07:50 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 00:10:33 × usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-12 00:10:35 CoconutCrab joins (~Cua@unaffiliated/coconutcrab)
2021-03-12 00:10:45 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-03-12 00:11:34 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 00:11:49 acidjnk_new joins (~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de)
2021-03-12 00:13:35 acidjnk_new2 joins (~acidjnk@p200300d0c72b9569d92adbcad5e9416b.dip0.t-ipconnect.de)
2021-03-12 00:15:57 × Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 00:16:24 Kaiepi joins (~Kaiepi@47.54.252.148)
2021-03-12 00:17:47 × acidjnk_new quits (~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 00:17:54 × rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 00:20:19 blackjid joins (~blackjid@178.239.168.171)
2021-03-12 00:21:35 rj joins (~x@gateway/tor-sasl/rj)
2021-03-12 00:22:57 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-12 00:26:27 bennofs__ joins (~quassel@dslb-188-106-247-127.188.106.pools.vodafone-ip.de)
2021-03-12 00:30:33 × bennofs_ quits (~quassel@dslb-094-222-060-049.094.222.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
2021-03-12 00:32:52 swarmcollective joins (~joseph@cpe-24-208-140-96.insight.res.rr.com)
2021-03-12 00:34:13 conal joins (~conal@66.115.157.67)
2021-03-12 00:38:07 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
2021-03-12 00:39:07 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 276 seconds)
2021-03-12 00:40:04 bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 00:40:09 × mrchampion_ quits (~mrchampio@38.18.109.23) (Ping timeout: 264 seconds)
2021-03-12 00:43:55 mrchampion joins (~mrchampio@38.18.109.23)
2021-03-12 00:45:13 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 00:45:39 × rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 00:46:43 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 00:47:55 bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 00:54:58 xsperry joins (~as@unaffiliated/xsperry)
2021-03-12 00:57:44 × finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection)
2021-03-12 00:58:38 <sm[m]> hey all. Today I came across Alt for the first time. https://hackage.haskell.org/package/base-4.14.1.0/docs/Data-Monoid.html#g:5 . Why does it exist ?
2021-03-12 00:58:51 nbloomf joins (~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41)
2021-03-12 01:00:00 curiousgay joins (~gay@178.217.208.8)
2021-03-12 01:01:50 finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-03-12 01:03:01 <monochrom> Let F be an Alternative instance, X be a type. Then F X is conceptually a Monoid instance in an obvious way: foo <> bar = foo <|> bar, mempty = empty.
2021-03-12 01:04:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 01:04:16 <monochrom> But writing "instance Alternative f => Monoid (f a)" is problematic in many ways. Since "f a" contains no type constructor at all, this is going to be a hell of an overlapping instance.
2021-03-12 01:04:26 <monochrom> So, need a newtype wrapper again.
2021-03-12 01:08:33 × bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 01:08:53 <sm[m]> thanks monochrom . That takes some work for a learner to unpack. Out of interest, do you think this can be explained in a single beginner friendly sentence ?
2021-03-12 01:10:04 <sm[m]> "A wrapper that makes it easier to combine arbitrary types monoidally" ?
2021-03-12 01:10:53 rajivr joins (uid269651@gateway/web/irccloud.com/x-xljhenfdjyrbvgti)
2021-03-12 01:11:03 <monochrom> A beginner would not know Alternative in the first place, and by extension would not worry about Alt.
2021-03-12 01:11:43 × nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 01:11:46 <monochrom> But the illegality of "instance ... => Monoid (f a)" can be chalked up to just Haskell 2010 rules.
2021-03-12 01:12:03 <sm[m]> I'm trying to envision that happy future world where the haddock is more explanatory
2021-03-12 01:12:16 <sm[m]> all the haddocks
2021-03-12 01:12:19 <monochrom> The rationale for the draconian rules would be a long story though.
2021-03-12 01:13:39 nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 01:15:11 <monochrom> I don't envision that everything in every doc makes sense to every beginner.
2021-03-12 01:15:36 <monochrom> I only envision that everything in every doc makes sense to those who have the necessary prerequisite.
2021-03-12 01:16:03 <sm[m]> we're envisioning different kinds of doc I think
2021-03-12 01:16:36 <sayola> is there a lib that has a ready debug type with Num/Fractional instance for logging ops?
2021-03-12 01:16:55 <monochrom> The sentence I would write for Alt is "Monoid operations of Alt f a are Alternative operations of f.". which is just an explicit version of the current "Monoid under <|>.". Enuf said.
2021-03-12 01:17:24 × robotmay quits (~beepboop@2001:8b0:7af0:2580:2c2a:5a7f:e21d:de48) (Quit: Be excellent to each other)
2021-03-12 01:18:16 <monochrom> There is no one single sentence that teaches Monoid and Alternative. Not even two sentences.
2021-03-12 01:18:21 × nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 01:18:33 <monochrom> And if the job of the doc of Alt is to teach both, that's just absurd.
2021-03-12 01:20:56 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-03-12 01:21:05 <slack1256> I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P .
2021-03-12 01:21:19 <sm[m]> somebody wants to change:
2021-03-12 01:21:19 <sm[m]> finds :: (Foldable t) => (a -> Maybe b) -> t a -> Maybe b
2021-03-12 01:21:19 <sm[m]> finds f = asum . map f . toList
2021-03-12 01:21:21 <sm[m]> to:
2021-03-12 01:21:21 <sm[m]> finds f = getAlt . foldMap (Alt . f)
2021-03-12 01:21:33 <sm[m]> is it clearer ? if you already know what it means, sure
2021-03-12 01:21:43 robotmay joins (~beepboop@80.172.187.81.in-addr.arpa)
2021-03-12 01:21:50 <sm[m]> like most haskell docs, I guess
2021-03-12 01:22:06 <sm[m]> s/docs/haddocks/
2021-03-12 01:22:40 <monochrom> Where is this "finds"?
2021-03-12 01:22:51 <monochrom> Not in base, at least.
2021-03-12 01:23:11 <sm[m]> no, it's some random helper in hledger-lib

All times are in UTC.