2021/03/12

2021-03-12 00:00:02 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Ping timeout: 264 seconds)
2021-03-12 00:00:17 +0100jamm_(~jamm@unaffiliated/jamm)
2021-03-12 00:01:57 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41)
2021-03-12 00:01:57 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2021-03-12 00:02:23 +0100ezrakilty(~ezrakilty@97-113-55-149.tukw.qwest.net)
2021-03-12 00:03:07 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 00:03:15 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2021-03-12 00:03:34 +0100knupfer(~Thunderbi@i59F7FF85.versanet.de) (Ping timeout: 256 seconds)
2021-03-12 00:04:05 +0100Maxdamantus(~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 272 seconds)
2021-03-12 00:04:52 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
2021-03-12 00:05:10 +0100Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-12 00:05:21 +0100Maxdamantus(~Maxdamant@unaffiliated/maxdamantus)
2021-03-12 00:06:02 +0100nrdmn98(~nrdmn@95.129.53.118) (Remote host closed the connection)
2021-03-12 00:06:21 +0100nrdmn98(~nrdmn@95.129.53.118)
2021-03-12 00:06:22 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 00:06:54 +0100noctux(~noctux@unaffiliated/noctux) (Ping timeout: 260 seconds)
2021-03-12 00:07:12 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 260 seconds)
2021-03-12 00:08:40 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 00:09:14 +0100noctux(~noctux@unaffiliated/noctux)
2021-03-12 00:09:24 +0100fendor_(~fendor@77.119.131.133.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2021-03-12 00:10:06 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 00:10:58 +0100dh(dh@bsd.ee) (Disconnected by services)
2021-03-12 00:11:04 +0100dh_(dh@bsd.ee)
2021-03-12 00:12:19 +0100ces(~ces@fsf/member/ces) (Quit: WeeChat 3.0)
2021-03-12 00:13:51 +0100dh_(dh@bsd.ee) (Client Quit)
2021-03-12 00:14:05 +0100dh(dh@bsd.ee)
2021-03-12 00:17:14 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-12 00:17:21 +0100s00pcan(~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 264 seconds)
2021-03-12 00:17:38 +0100Gurkenglas_(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
2021-03-12 00:18:50 +0100s00pcan(~chris@107.181.165.217)
2021-03-12 00:23:45 +0100raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-03-12 00:27:42 +0100xsperry(~as@unaffiliated/xsperry) (Remote host closed the connection)
2021-03-12 00:27:45 +0100s00pcan(~chris@107.181.165.217) (Ping timeout: 246 seconds)
2021-03-12 00:29:05 +0100s00pcan(~chris@075-133-056-178.res.spectrum.com)
2021-03-12 00:35:21 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 00:35:23 +0100idhugo_(~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Remote host closed the connection)
2021-03-12 00:35:49 +0100idhugo_(~idhugo@80-62-117-241-mobile.dk.customer.tdc.net)
2021-03-12 00:37:15 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a)
2021-03-12 00:37:37 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 00:38:26 +0100APugNamedPugsley(~13052@2601:58a:8300:f6a0:70c9:fc3c:b74d:902d) (Ping timeout: 264 seconds)
2021-03-12 00:41:19 +0100quinn(~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in)
2021-03-12 00:41:55 +0100dfeuer(~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net)
2021-03-12 00:43:02 +0100elliott_(~elliott_@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 00:44:07 +0100redmp_(~redmp@172.58.19.17)
2021-03-12 00:44:49 +0100inkbottlezebrag
2021-03-12 00:45:49 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-03-12 00:46:13 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-03-12 00:46:18 +0100stree(~stree@68.36.8.116) (Ping timeout: 260 seconds)
2021-03-12 00:47:12 +0100redmp(~redmp@172.58.22.241) (Ping timeout: 256 seconds)
2021-03-12 00:48:03 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 246 seconds)
2021-03-12 00:48:27 +0100quinn(~quinn@c-73-223-224-163.hsd1.ca.comcast.net)
2021-03-12 00:48:46 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 00:49:06 +0100raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
2021-03-12 00:49:07 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 00:52:31 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection)
2021-03-12 00:53:55 +0100Shinji_Ikari(~Shinji_Ik@2600:380:a140:2413:f957:6aa:223e:a20f)
2021-03-12 00:57:30 +0100ezrakilty(~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 246 seconds)
2021-03-12 00:58:36 +0100Shinji_Ikari(~Shinji_Ik@2600:380:a140:2413:f957:6aa:223e:a20f) (Quit: Quit)
2021-03-12 00:59:01 +0100stree(~stree@68.36.8.116)
2021-03-12 00:59:09 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-03-12 00:59:25 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-03-12 01:00:17 +0100acidjnk_new(~acidjnk@p200300d0c72b95695d3c722039acad7c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 01:01:17 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a)
2021-03-12 01:01:33 +0100smol(b0259152@host-176-37-145-82.b025.la.net.ua) (Quit: Connection closed)
2021-03-12 01:02:26 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 01:02:26 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 01:03:11 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Remote host closed the connection)
2021-03-12 01:04:25 +0100Alex4(~Alex@185.204.1.185) (Remote host closed the connection)
2021-03-12 01:05:37 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-12 01:05:53 +0100Tario(~Tario@201.192.165.173) (Ping timeout: 245 seconds)
2021-03-12 01:07:19 +0100Tario(~Tario@201.192.165.173)
2021-03-12 01:07:50 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 01:10:33 +0100usr25(~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-12 01:10:35 +0100CoconutCrab(~Cua@unaffiliated/coconutcrab)
2021-03-12 01:10:45 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-03-12 01:11:34 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 01:11:49 +0100acidjnk_new(~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de)
2021-03-12 01:13:35 +0100acidjnk_new2(~acidjnk@p200300d0c72b9569d92adbcad5e9416b.dip0.t-ipconnect.de)
2021-03-12 01:15:57 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 01:16:24 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 01:17:47 +0100acidjnk_new(~acidjnk@p200300d0c72b956934e83b974e1e2a7d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 01:17:54 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 01:20:19 +0100blackjid(~blackjid@178.239.168.171)
2021-03-12 01:21:35 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 01:22:57 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-12 01:26:27 +0100bennofs__(~quassel@dslb-188-106-247-127.188.106.pools.vodafone-ip.de)
2021-03-12 01:30:33 +0100bennofs_(~quassel@dslb-094-222-060-049.094.222.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
2021-03-12 01:32:52 +0100swarmcollective(~joseph@cpe-24-208-140-96.insight.res.rr.com)
2021-03-12 01:34:13 +0100conal(~conal@66.115.157.67)
2021-03-12 01:38:07 +0100Deide(~Deide@217.155.19.23) (Quit: Seeee yaaaa)
2021-03-12 01:39:07 +0100Neuromancer(~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 276 seconds)
2021-03-12 01:40:04 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 01:40:09 +0100mrchampion_(~mrchampio@38.18.109.23) (Ping timeout: 264 seconds)
2021-03-12 01:43:55 +0100mrchampion(~mrchampio@38.18.109.23)
2021-03-12 01:45:13 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 01:45:39 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 01:46:43 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 01:47:55 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 01:54:58 +0100xsperry(~as@unaffiliated/xsperry)
2021-03-12 01:57:44 +0100finn_elija(~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection)
2021-03-12 01:58:38 +0100 <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 01:58:51 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41)
2021-03-12 02:00:00 +0100curiousgay(~gay@178.217.208.8)
2021-03-12 02:01:50 +0100finn_elija(~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-03-12 02:03:01 +0100 <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 02:04:00 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 02:04:16 +0100 <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 02:04:26 +0100 <monochrom> So, need a newtype wrapper again.
2021-03-12 02:08:33 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 02:08:53 +0100 <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 02:10:04 +0100 <sm[m]> "A wrapper that makes it easier to combine arbitrary types monoidally" ?
2021-03-12 02:10:53 +0100rajivr(uid269651@gateway/web/irccloud.com/x-xljhenfdjyrbvgti)
2021-03-12 02:11:03 +0100 <monochrom> A beginner would not know Alternative in the first place, and by extension would not worry about Alt.
2021-03-12 02:11:43 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 02:11:46 +0100 <monochrom> But the illegality of "instance ... => Monoid (f a)" can be chalked up to just Haskell 2010 rules.
2021-03-12 02:12:03 +0100 <sm[m]> I'm trying to envision that happy future world where the haddock is more explanatory
2021-03-12 02:12:16 +0100 <sm[m]> all the haddocks
2021-03-12 02:12:19 +0100 <monochrom> The rationale for the draconian rules would be a long story though.
2021-03-12 02:13:39 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 02:15:11 +0100 <monochrom> I don't envision that everything in every doc makes sense to every beginner.
2021-03-12 02:15:36 +0100 <monochrom> I only envision that everything in every doc makes sense to those who have the necessary prerequisite.
2021-03-12 02:16:03 +0100 <sm[m]> we're envisioning different kinds of doc I think
2021-03-12 02:16:36 +0100 <sayola> is there a lib that has a ready debug type with Num/Fractional instance for logging ops?
2021-03-12 02:16:55 +0100 <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 02:17:24 +0100robotmay(~beepboop@2001:8b0:7af0:2580:2c2a:5a7f:e21d:de48) (Quit: Be excellent to each other)
2021-03-12 02:18:16 +0100 <monochrom> There is no one single sentence that teaches Monoid and Alternative. Not even two sentences.
2021-03-12 02:18:21 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 02:18:33 +0100 <monochrom> And if the job of the doc of Alt is to teach both, that's just absurd.
2021-03-12 02:20:56 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-03-12 02:21:05 +0100 <slack1256> I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P .
2021-03-12 02:21:19 +0100 <sm[m]> somebody wants to change:
2021-03-12 02:21:19 +0100 <sm[m]> finds :: (Foldable t) => (a -> Maybe b) -> t a -> Maybe b
2021-03-12 02:21:19 +0100 <sm[m]> finds f = asum . map f . toList
2021-03-12 02:21:21 +0100 <sm[m]> to:
2021-03-12 02:21:21 +0100 <sm[m]> finds f = getAlt . foldMap (Alt . f)
2021-03-12 02:21:33 +0100 <sm[m]> is it clearer ? if you already know what it means, sure
2021-03-12 02:21:43 +0100robotmay(~beepboop@80.172.187.81.in-addr.arpa)
2021-03-12 02:21:50 +0100 <sm[m]> like most haskell docs, I guess
2021-03-12 02:22:06 +0100 <sm[m]> s/docs/haddocks/
2021-03-12 02:22:40 +0100 <monochrom> Where is this "finds"?
2021-03-12 02:22:51 +0100 <monochrom> Not in base, at least.
2021-03-12 02:23:11 +0100 <sm[m]> no, it's some random helper in hledger-lib
2021-03-12 02:23:33 +0100 <monochrom> Well then take it up to the authors of hledger-lib?
2021-03-12 02:23:48 +0100idhugo(~idhugo@80-62-117-241-mobile.dk.customer.tdc.net)
2021-03-12 02:24:11 +0100 <sm[m]> well that's me. Somebody wants to change it and I must Decide
2021-03-12 02:24:18 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 260 seconds)
2021-03-12 02:24:28 +0100 <monochrom> Then it's your call.
2021-03-12 02:24:38 +0100 <sm[m]> yup
2021-03-12 02:24:58 +0100 <dolio> It seems like the point would be to avoid allocating an intermediate data structure, not make it clearer to people learning Haskell.
2021-03-12 02:25:23 +0100 <sm[m]> dolio: that sounds good, I was wondering
2021-03-12 02:25:26 +0100 <monochrom> Much more people understand "asum . map f . toList" readily, yes.
2021-03-12 02:25:58 +0100idhugo_(~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds)
2021-03-12 02:27:08 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 245 seconds)
2021-03-12 02:27:32 +0100 <sm[m]> this is going to be dealing with a list of items countable with your fingers, I'm pretty sure
2021-03-12 02:27:51 +0100 <sm[m]> but just out of interest, is the second one indeed more efficient ?
2021-03-12 02:27:55 +0100 <monochrom> @type asum
2021-03-12 02:27:56 +0100 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
2021-03-12 02:28:04 +0100idhugo(~idhugo@80-62-117-241-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds)
2021-03-12 02:29:46 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 256 seconds)
2021-03-12 02:30:29 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 02:30:48 +0100 <monochrom> I think yes.
2021-03-12 02:30:58 +0100 <monochrom> The getAlt costs nothing, to begin with.
2021-03-12 02:31:48 +0100 <monochrom> foldMap (Alt . f) should also be just like foldMap f but it knows to use <|> instead of <>
2021-03-12 02:32:25 +0100jdt(~jdt@38.77.195.50) (Ping timeout: 276 seconds)
2021-03-12 02:33:12 +0100conal(~conal@66.115.157.67) (Quit: Computer has gone to sleep.)
2021-03-12 02:33:31 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 265 seconds)
2021-03-12 02:34:53 +0100erisco(~erisco@d24-57-249-233.home.cgocable.net)
2021-03-12 02:34:54 +0100 <monochrom> Eh, is there any problem with foldMap f ?
2021-03-12 02:35:18 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 260 seconds)
2021-03-12 02:35:21 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 02:35:28 +0100 <monochrom> % data MonoType = X | Y deriving (Eq, Show)
2021-03-12 02:35:28 +0100 <yahb> monochrom:
2021-03-12 02:35:46 +0100 <monochrom> % Maybe Y <> Maybe X
2021-03-12 02:35:47 +0100 <yahb> monochrom: ; <interactive>:214:1: error:; * Data constructor not in scope: Maybe :: MonoType -> a; * Perhaps you meant one of these: `MaybeT' (imported from Control.Monad.Trans.Maybe), variable `maybe' (imported from Data.Maybe); <interactive>:214:12: error:; * Data constructor not in scope: Maybe :: MonoType -> a; * Perhaps you meant one of these: `MaybeT' (imported from Control.Monad.Trans.Maybe
2021-03-12 02:36:18 +0100 <monochrom> Oh haha
2021-03-12 02:36:26 +0100 <monochrom> % Just Y <> Just X
2021-03-12 02:36:26 +0100 <yahb> monochrom: ; <interactive>:215:8: error:; * No instance for (Semigroup MonoType) arising from a use of `<>'; * In the expression: Just Y <> Just X; In an equation for `it': it = Just Y <> Just X
2021-03-12 02:36:38 +0100 <monochrom> % Just Y <|> Just X
2021-03-12 02:36:38 +0100 <yahb> monochrom: Just Y
2021-03-12 02:37:11 +0100jdt(~jdt@38.77.195.50)
2021-03-12 02:37:33 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 02:37:37 +0100 <monochrom> I wonder if I can talk you into s/Maybe/First/ :)
2021-03-12 02:37:58 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-12 02:38:47 +0100APugNamedPugsley(~13052@2601:58a:8300:f6a0:b0f3:7fc2:6f5f:380c)
2021-03-12 02:39:27 +0100gabiruh_(~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
2021-03-12 02:40:32 +0100 <monochrom> @free phi :: a
2021-03-12 02:40:32 +0100 <lambdabot> f phi = phi
2021-03-12 02:40:49 +0100 <monochrom> I have been meditating on the profoundness of that. :)
2021-03-12 02:42:33 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 02:45:27 +0100gabiruh(~gabiruh@vps19177.publiccloud.com.br)
2021-03-12 02:46:36 +0100kupi(uid212005@gateway/web/irccloud.com/x-opxyvcrmwhvgrwjf) (Quit: Connection closed for inactivity)
2021-03-12 02:47:24 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds)
2021-03-12 02:48:51 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 02:51:43 +0100panda_mankoala_man
2021-03-12 02:51:45 +0100koala_man(~vidar@157.146.251.23.bc.googleusercontent.com) (Changing host)
2021-03-12 02:51:45 +0100koala_man(~vidar@unaffiliated/koala-man/x-2491903)
2021-03-12 02:52:10 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving)
2021-03-12 02:52:43 +0100 <minoru_shiraeesh> slack1256: "I love Alt. It with STM helped me implement a `epoll` like interface for threads :-P ."
2021-03-12 02:53:19 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection)
2021-03-12 02:53:30 +0100 <minoru_shiraeesh> can you give a link to it?
2021-03-12 02:53:55 +0100 <minoru_shiraeesh> I mean, a link to the code
2021-03-12 02:54:14 +0100 <slack1256> Let me search it.
2021-03-12 02:58:31 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 03:01:52 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 03:03:23 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds)
2021-03-12 03:03:50 +0100conal(~conal@192.145.118.143)
2021-03-12 03:06:36 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds)
2021-03-12 03:07:21 +0100stree(~stree@68.36.8.116) (Ping timeout: 265 seconds)
2021-03-12 03:08:08 +0100 <minoru_shiraeesh> reading about epoll
2021-03-12 03:08:26 +0100 <minoru_shiraeesh> so that's how servers actually work, right?
2021-03-12 03:08:51 +0100 <minoru_shiraeesh> they register themselves as listeners using epoll
2021-03-12 03:10:35 +0100Narinas(~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
2021-03-12 03:11:32 +0100 <minoru_shiraeesh> the vm could add a level of indirection, but eventually it will call epoll
2021-03-12 03:11:36 +0100Narinas(~Narinas@187-178-93-112.dynamic.axtel.net)
2021-03-12 03:11:47 +0100 <minoru_shiraeesh> if I understood it correctly
2021-03-12 03:11:49 +0100 <Axman6> I'm not sure servers have anything to do with it
2021-03-12 03:12:14 +0100 <Axman6> like, it's a lot level function for awaiting events on file descriptors, it's applicable to most applications that do any sort of IO
2021-03-12 03:12:20 +0100 <Axman6> low*
2021-03-12 03:13:51 +0100 <slack1256> minoru_shiraeesh: The code has changed sighly and now uses `asum` directly over STM. Check line 83 on https://github.com/glguy/irc-core/blob/v2/src/Client/EventLoop.hs .
2021-03-12 03:14:39 +0100 <Axman6> the app says to the OS "hey, I am interested if anything happens to these files descriptors, let me know when that happens" and then OS does that - those descriptios could be sockets so you can wait for network traffic, or files so you can respond to changes/when data becomes available to read. using those facts, you can of course implement servers which respond to multiple sockets' events
2021-03-12 03:15:24 +0100 <minoru_shiraeesh> slack1256: thanks! gonna take a look
2021-03-12 03:15:56 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 03:16:22 +0100 <Axman6> slack1256: fyi, you can link directly to a particular line on github by clicking its line number and then copying the url for the page from the browser: https://github.com/glguy/irc-core/blob/v2/src/Client/EventLoop.hs#L83
2021-03-12 03:16:51 +0100 <slack1256> Woah, nice.
2021-03-12 03:17:01 +0100Tario(~Tario@201.192.165.173) (Ping timeout: 265 seconds)
2021-03-12 03:17:18 +0100Axman6wonders if his glirc client understands that we're talking about its implementation, using itself
2021-03-12 03:17:27 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a)
2021-03-12 03:17:58 +0100m0rphism(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds)
2021-03-12 03:18:01 +0100 <liyang> Have you implemented the self-conscious trait?
2021-03-12 03:18:20 +0100 <slack1256> yeah, look out for the `fix` calls.
2021-03-12 03:18:28 +0100 <Axman6> No, I'd need rust to do that :(
2021-03-12 03:18:41 +0100 <minoru_shiraeesh> Axman6, there are other system calls that we could use instead of epoll to implement a server?
2021-03-12 03:19:01 +0100slack1256something somethin io-uring
2021-03-12 03:19:04 +0100 <Axman6> minoru_shiraeesh: yes, select and poll IIRC
2021-03-12 03:19:44 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 03:20:00 +0100kiweun(~kiweun@2607:fea8:2a62:9600:dc3f:d8f8:3e53:f67a) (Remote host closed the connection)
2021-03-12 03:20:08 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 03:20:08 +0100stree(~stree@68.36.8.116)
2021-03-12 03:21:28 +0100conal(~conal@192.145.118.143) (Ping timeout: 260 seconds)
2021-03-12 03:22:33 +0100kiweun(~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2)
2021-03-12 03:23:33 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 03:24:44 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 03:25:00 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 03:25:10 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-12 03:25:18 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 03:25:22 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-03-12 03:26:54 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 03:27:21 +0100conal(~conal@64.71.133.70)
2021-03-12 03:29:45 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 03:33:38 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 03:34:17 +0100 <curiousgay> Axman6: minoru_shiraeesh: select and poll are slower than linux's epoll and bsd's kqueue, also depending on use case you might want to use libevent https://libevent.org/ to abstract useage of these platform-specific interfaces
2021-03-12 03:37:33 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 03:37:45 +0100cheater(~user@unaffiliated/cheater) (Ping timeout: 264 seconds)
2021-03-12 03:37:46 +0100drbean(~drbean@TC210-63-209-174.static.apol.com.tw)
2021-03-12 03:38:19 +0100cheater(~user@unaffiliated/cheater)
2021-03-12 03:38:30 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds)
2021-03-12 03:39:16 +0100tomku(~tomku@unaffiliated/tomku) (Quit: Lost terminal)
2021-03-12 03:41:07 +0100zangi(~azure@103.154.230.250) (Ping timeout: 256 seconds)
2021-03-12 03:42:07 +0100Tario(~Tario@201.192.165.173)
2021-03-12 03:42:48 +0100 <infinisil> Alternative instances are awesome
2021-03-12 03:43:01 +0100zangi(~azure@103.154.230.242)
2021-03-12 03:43:16 +0100 <infinisil> Recently was able to use Concurrently's Alternative instance to run threads in parallel
2021-03-12 03:43:17 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 03:43:54 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 03:44:00 +0100 <infinisil> And via slack1256 I learned about STM's Alternative instance, which is just empty = retry and <|> = orElse
2021-03-12 03:44:05 +0100 <infinisil> Which is pretty cool
2021-03-12 03:44:21 +0100 <slack1256> Yep, makes eventloop real neat.
2021-03-12 03:44:48 +0100redmp_(~redmp@172.58.19.17) (Ping timeout: 260 seconds)
2021-03-12 03:45:45 +0100 <infinisil> Though looking at Alternative, I have no idea what `some` and `many` do
2021-03-12 03:46:12 +0100 <infinisil> The docs just say "One or more." and "Zero or more.", which is as vague as can be
2021-03-12 03:46:14 +0100 <monochrom> They make most sense for parsers.
2021-03-12 03:46:16 +0100 <slack1256> In terms of regexes, some is * and many is +.
2021-03-12 03:46:34 +0100Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2021-03-12 03:47:18 +0100 <infinisil> > some (Just 1)
2021-03-12 03:47:20 +0100 <lambdabot> *Exception: <<loop>>
2021-03-12 03:47:33 +0100xff0x_(~xff0x@2001:1a81:53d2:5300:7d58:fd61:d678:3ab7) (Ping timeout: 272 seconds)
2021-03-12 03:47:35 +0100 <infinisil> > some [1]
2021-03-12 03:47:38 +0100 <lambdabot> *Exception: <<loop>>
2021-03-12 03:47:44 +0100 <monochrom> But you can also have an STM action that if you run repeatedly, it succeeds for the first few times, and fails once. Then many and some stops there and returns the list of the answers you got from the successes.
2021-03-12 03:47:57 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 03:48:12 +0100tomku(~tomku@unaffiliated/tomku)
2021-03-12 03:48:23 +0100Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 245 seconds)
2021-03-12 03:48:23 +0100Lord_of_Life_Lord_of_Life
2021-03-12 03:48:29 +0100redmp(~redmp@172.58.30.171)
2021-03-12 03:48:30 +0100 <monochrom> It makes no sense for Maybe. Or generally actions that always succeeds or always fails.
2021-03-12 03:48:45 +0100 <monochrom> Well, many is OK with always fails. But that's all.
2021-03-12 03:48:49 +0100 <infinisil> Hmm..
2021-03-12 03:48:54 +0100 <monochrom> > many Nothing
2021-03-12 03:48:55 +0100 <lambdabot> Just []
2021-03-12 03:49:02 +0100xff0x_(~xff0x@2001:1a81:520c:1100:8f7b:fec1:f600:70b)
2021-03-12 03:49:14 +0100 <infinisil> Whaaa
2021-03-12 03:50:08 +0100 <monochrom> Generally, with "many foo" or "some foo", you expect to run foo several times, it succeeds the first few times, then fails.
2021-03-12 03:50:08 +0100 <infinisil> Oh, so it relies on the Applicative instance
2021-03-12 03:50:24 +0100zangi(~azure@103.154.230.242) (Ping timeout: 246 seconds)
2021-03-12 03:50:25 +0100 <infinisil> I kind of see
2021-03-12 03:50:56 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41)
2021-03-12 03:52:10 +0100 <infinisil> So `some` repeatedly runs the `f a` until it's `empty`?
2021-03-12 03:52:17 +0100 <monochrom> The whole of Alternative was inspired by parsing. The notation shows.
2021-03-12 03:52:24 +0100zangi(~azure@103.154.230.250)
2021-03-12 03:52:32 +0100 <infinisil> Or what does "failure" mean?
2021-03-12 03:52:42 +0100 <monochrom> some wants at least one success, and repeats until empty.
2021-03-12 03:52:58 +0100 <monochrom> many is OK with 0 successes, empty right away.
2021-03-12 03:53:06 +0100 <monochrom> failure = empty
2021-03-12 03:53:59 +0100 <monochrom> Both want to hit empty after a finite number of times, so they can stop and return a finite list of answers.
2021-03-12 03:54:37 +0100 <infinisil> I see, and from the implementation I can see that it uses `<|>` to decide whether the result is empty or not
2021-03-12 03:54:47 +0100 <monochrom> If always successful, they become unproductive infinite loops hoping for an empty that will never come.
2021-03-12 03:54:57 +0100 <monochrom> Yeah.
2021-03-12 03:55:03 +0100 <infinisil> Though laziness
2021-03-12 03:55:17 +0100 <infinisil> > take 10 $ some (Just 1)
2021-03-12 03:55:19 +0100 <lambdabot> error:
2021-03-12 03:55:19 +0100 <lambdabot> • Couldn't match type ‘Maybe’ with ‘[]’
2021-03-12 03:55:19 +0100 <lambdabot> Expected type: [[a]]
2021-03-12 03:55:22 +0100 <infinisil> > take 10 <$> some (Just 1)
2021-03-12 03:55:25 +0100 <lambdabot> *Exception: <<loop>>
2021-03-12 03:55:27 +0100azure1(~azure@103.154.230.242)
2021-03-12 03:55:30 +0100 <infinisil> Oor not
2021-03-12 03:55:36 +0100 <monochrom> Naw, you're betting on <*> being lazy then. But <*> is not lazy for most instances.
2021-03-12 03:56:21 +0100 <monochrom> "liftA2 (:) foo bar" will very much want to resolve foo at the very least, and most often bar too.
2021-03-12 03:57:36 +0100 <infinisil> Hmm
2021-03-12 03:58:06 +0100zangi(~azure@103.154.230.250) (Ping timeout: 265 seconds)
2021-03-12 03:58:22 +0100 <infinisil> > seq (some (Just 1)) 0
2021-03-12 03:58:25 +0100 <lambdabot> *Exception: <<loop>>
2021-03-12 03:58:51 +0100 <infinisil> So `some (Just 1)` is `Just [1..]`, except that not even the `Just` can be evaluated?
2021-03-12 03:59:23 +0100 <monochrom> I'm afraid you don't even get to see the Just.
2021-03-12 04:00:03 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 04:00:49 +0100 <infinisil> Ah looking at Maybe's Applicative I see
2021-03-12 04:00:51 +0100 <infinisil> liftA2 f (Just x) (Just y) = Just (f x y)
2021-03-12 04:00:56 +0100 <infinisil> liftA2 _ _ _ = Nothing
2021-03-12 04:01:04 +0100 <monochrom> Roughly: some (Just 1) = liftA2 (:) (Just 1) (some (Just 1)) = liftA2 (:) (Just 1) (liftA2 (:) (Just 1) (some (Just 1))) = ...
2021-03-12 04:01:39 +0100 <infinisil> I see
2021-03-12 04:02:27 +0100redmp(~redmp@172.58.30.171) (Ping timeout: 265 seconds)
2021-03-12 04:02:40 +0100 <infinisil> Is there a separate type class hidden in there? Something between Applicative and Alternative that doesn't have some/many because you can't ever evaluate them?
2021-03-12 04:04:03 +0100 <monochrom> some and many are codable by Applicative and <|> and empty and recursion. If Alternative didn't have them, you can still always have them outside and the constraint is merely "Alternative f =>".
2021-03-12 04:04:45 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 04:04:54 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 260 seconds)
2021-03-12 04:05:05 +0100 <infinisil> Ah makes sense
2021-03-12 04:05:06 +0100 <monochrom> Oh but they're bottom for many instances? Well that's just too bad.
2021-03-12 04:05:27 +0100CrazyPyt_(~crazypyth@98.122.164.118) (Ping timeout: 246 seconds)
2021-03-12 04:05:33 +0100 <infinisil> I guess they're part of Alternative in case you can provide a more efficient version?
2021-03-12 04:06:00 +0100 <monochrom> But if you admit them into Alternative, then you save a mental vocab burden, and you enable hand-optimizations for those instances that could use the help.
2021-03-12 04:06:07 +0100 <monochrom> yeah.
2021-03-12 04:06:37 +0100 <monochrom> But I think reducing vocab burden is more valuable.
2021-03-12 04:06:51 +0100 <monochrom> People already do too many bikesheds.
2021-03-12 04:07:34 +0100 <infinisil> Checking the instances in base at least, none of them have a custom many/some implementation
2021-03-12 04:07:58 +0100 <monochrom> You will have to look into parser libraries.
2021-03-12 04:08:50 +0100 <infinisil> megaparsec nope
2021-03-12 04:09:05 +0100 <monochrom> I think I heard that in parsers, "manyTill" has an efficient algorithm and is more fundamental, and then "many" is better off expressed as a use of manyTill.
2021-03-12 04:09:24 +0100FinnElija(~finn_elij@gateway/tor-sasl/finnelija/x-67402716)
2021-03-12 04:09:24 +0100finn_elijaGuest45740
2021-03-12 04:09:24 +0100FinnElijafinn_elija
2021-03-12 04:10:24 +0100 <infinisil> I see, though nope for parsec and aeson
2021-03-12 04:10:44 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
2021-03-12 04:11:15 +0100 <infinisil> Would be cool if hoogle/hackage could show all instances of Alternative of all libraries
2021-03-12 04:13:39 +0100Guest45740(~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds)
2021-03-12 04:16:19 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 04:19:40 +0100urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2021-03-12 04:21:12 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 04:25:03 +0100jespada(~jespada@90.254.243.187) (Ping timeout: 245 seconds)
2021-03-12 04:29:21 +0100jespada(~jespada@90.254.243.187)
2021-03-12 04:29:39 +0100forgottenone(~forgotten@176.42.24.172)
2021-03-12 04:30:49 +0100Tario(~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-03-12 04:34:38 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 04:35:46 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 04:35:57 +0100theDon(~td@94.134.91.64) (Ping timeout: 264 seconds)
2021-03-12 04:36:17 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds)
2021-03-12 04:37:36 +0100theDon(~td@muedsl-82-207-238-185.citykom.de)
2021-03-12 04:38:07 +0100barnowl_(~barnowl@gateway/tor-sasl/barnowl) (Remote host closed the connection)
2021-03-12 04:38:23 +0100slack1256(~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection)
2021-03-12 04:38:33 +0100barnowl_(~barnowl@gateway/tor-sasl/barnowl)
2021-03-12 04:40:45 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 04:41:11 +0100Wuzzy(~Wuzzy@p5b0df7c2.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-03-12 04:41:53 +0100alx741(~alx741@186.178.108.206) (Quit: alx741)
2021-03-12 04:41:59 +0100dansho(~dansho@ec2-52-194-244-43.ap-northeast-1.compute.amazonaws.com)
2021-03-12 04:47:06 +0100JokerAscensionEx(~egp_@2.95.74.168) (Remote host closed the connection)
2021-03-12 04:49:06 +0100erisco(~erisco@d24-57-249-233.home.cgocable.net) (Quit: Leaving)
2021-03-12 04:52:07 +0100Tario(~Tario@201.192.165.173)
2021-03-12 04:58:52 +0100acidjnk_new2(~acidjnk@p200300d0c72b9569d92adbcad5e9416b.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 05:00:53 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-12 05:01:04 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
2021-03-12 05:02:37 +0100denisse(~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
2021-03-12 05:02:57 +0100denisse(~spaceCat@gateway/tor-sasl/alephzer0)
2021-03-12 05:03:27 +0100conal(~conal@64.71.133.70)
2021-03-12 05:03:33 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 05:08:27 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 05:08:48 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-12 05:09:53 +0100 <edwardk> infinisil: hackage itself doesn't actually know anything about what is in the libraries you give it. it gets a rough index of modules it uses to spew out the front page and maybe some user generated haddocks
2021-03-12 05:11:51 +0100 <edwardk> infinisil: not just more efficient versions , but for some cps'd overly-strict alternatives using some/many from the class can make the difference between termination and not.
2021-03-12 05:12:01 +0100 <edwardk> (re some/many)
2021-03-12 05:12:31 +0100 <infinisil> Ah neat
2021-03-12 05:12:43 +0100 <infinisil> I do like things that terminate!
2021-03-12 05:12:57 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net)
2021-03-12 05:13:16 +0100 <fresheyeball> I think there is a way to take a quasi quote in ghci
2021-03-12 05:13:22 +0100 <fresheyeball> and get the Exp for it
2021-03-12 05:13:23 +0100minoru_shiraeesh(~shiraeesh@46.34.206.154) (Ping timeout: 245 seconds)
2021-03-12 05:13:27 +0100 <fresheyeball> but I don't remember how
2021-03-12 05:13:39 +0100 <fresheyeball> anyone know this trick?
2021-03-12 05:14:50 +0100 <edwardk> infinisil: re base nothing in base looks like a parser except ReadP, and ReadP is sufficiently lazy the defaults for some/many work.
2021-03-12 05:16:08 +0100 <fresheyeball> I tried [e|x=3|] in ghci, bit to throws a parse error instead of showing the Exp
2021-03-12 05:16:11 +0100 <edwardk> some/many became important as members when parsec moved to a cps'd encoding iirc. at that point they stop working off of separate definitions
2021-03-12 05:16:21 +0100 <edwardk> x=3 isn't an expression
2021-03-12 05:16:27 +0100 <edwardk> that sounds like a statement
2021-03-12 05:16:31 +0100 <edwardk> x==3
2021-03-12 05:16:33 +0100 <glguy> it's a quasiquoter
2021-03-12 05:16:35 +0100 <glguy> oh
2021-03-12 05:16:36 +0100 <glguy> no
2021-03-12 05:16:36 +0100 <edwardk> that looks like an expression
2021-03-12 05:16:39 +0100 <fresheyeball> I mean it as a top level declaration
2021-03-12 05:16:41 +0100 <glguy> [e| is not, it's an actual expression quote
2021-03-12 05:16:47 +0100JokerAscensionEx(~egp_@2.95.74.168)
2021-03-12 05:16:54 +0100 <edwardk> [e| quotes expressions, not statements
2021-03-12 05:16:58 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 05:17:05 +0100 <glguy> Anyway, that's beside the point
2021-03-12 05:17:15 +0100 <glguy> the question is just how to look at the Exp if you did have good syntax
2021-03-12 05:17:28 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2021-03-12 05:17:37 +0100 <fresheyeball> what I am trying to build is a top level value
2021-03-12 05:17:42 +0100 <glguy> Prelude Language.Haskell.TH> $(stringE . show =<< [e| '1' |])
2021-03-12 05:17:42 +0100 <glguy> "LitE (CharL '1')"
2021-03-12 05:17:47 +0100 <fresheyeball> so if Exp is the wrong thing, then I am wrong
2021-03-12 05:17:57 +0100 <glguy> you can do that, but I remember there being a cuter way to look at the expr
2021-03-12 05:18:04 +0100 <glguy> For a top-level declaration you use a [d|
2021-03-12 05:18:57 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2021-03-12 05:19:05 +0100 <edwardk> ghci> $(stringE . show =<< [d| x = '1' |])
2021-03-12 05:19:05 +0100 <edwardk> "[ValD (VarP x_6989586621679035191) (NormalB (LitE (CharL '1'))) []]"
2021-03-12 05:19:19 +0100 <edwardk> mind you it defined with a fresh 'x'
2021-03-12 05:19:35 +0100 <glguy> I don't think there's such a thing as a fresh, top-level x
2021-03-12 05:19:39 +0100 <fresheyeball> there we go
2021-03-12 05:19:42 +0100 <fresheyeball> this will work for me
2021-03-12 05:20:06 +0100 <glguy> Prelude Language.Haskell.TH Language.Haskell.TH.Syntax> [d| x = 1 |] ;
2021-03-12 05:20:06 +0100 <glguy> Prelude Language.Haskell.TH Language.Haskell.TH.Syntax> x
2021-03-12 05:20:10 +0100 <fresheyeball> oh interesting
2021-03-12 05:20:22 +0100 <fresheyeball> the generated Name funkadelic
2021-03-12 05:21:12 +0100 <edwardk> glguy: was it happy with your x?
2021-03-12 05:21:18 +0100 <glguy> yeah
2021-03-12 05:21:18 +0100ixlun`(~user@213.205.241.136) (Read error: Connection reset by peer)
2021-03-12 05:21:26 +0100 <glguy> I meant to paste the resulting 1
2021-03-12 05:21:28 +0100 <edwardk> $(let x = varP (mkName "x") in stringE . show =<< [d| $(x) = '1' |])
2021-03-12 05:21:28 +0100 <edwardk> "[ValD (VarP x) (NormalB (LitE (CharL '1'))) []]"
2021-03-12 05:21:31 +0100 <edwardk> k
2021-03-12 05:21:43 +0100 <edwardk> ^- that will let you generate the name from a string if you must
2021-03-12 05:22:31 +0100 <edwardk> without the funkadelic x in the splice =)
2021-03-12 05:22:49 +0100 <glguy> [d| $(varP (mkName "x")) = 2 |] ;
2021-03-12 05:22:52 +0100 <glguy> if you don't want the let binding
2021-03-12 05:23:21 +0100 <glguy> if you want to do a function with a dynamic name you end up with: [d| $(varP (mkName "x")) = \x y z -> 2 |] ;
2021-03-12 05:23:42 +0100 <edwardk> mkName or newName?
2021-03-12 05:23:54 +0100 <glguy> For a top-level thing I don't think you can tell the difference
2021-03-12 05:23:56 +0100 <edwardk> oh, not _that_ dynamic =)
2021-03-12 05:24:03 +0100 <fresheyeball> I see
2021-03-12 05:24:35 +0100 <glguy> right, not dynamic binding, just a name that isn't quoted syntax
2021-03-12 05:25:06 +0100ddellaco_(ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-03-12 05:25:57 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 05:27:09 +0100 <glguy> like > (do x1 <- newName "x"; x2 <- newName "x"; [d| $(varP x1) = 1; $(varP x2) = 2 |]);
2021-03-12 05:27:11 +0100 <glguy> <interactive>:20:1: error: Multiple declarations of ‘x’
2021-03-12 05:27:58 +0100stree(~stree@68.36.8.116) (Ping timeout: 245 seconds)
2021-03-12 05:28:14 +0100 <glguy> to my point about newName not doing anything for top-level decls
2021-03-12 05:28:32 +0100plutoniix(~q@184.82.214.51)
2021-03-12 05:28:34 +0100 <edwardk> ah yes, that was a fix at one point, wasn't it
2021-03-12 05:28:51 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 05:28:54 +0100ddellacosta(ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
2021-03-12 05:28:54 +0100 <glguy> I don't know, but I wish we had them
2021-03-12 05:29:06 +0100 <glguy> I don't remember if we used to have them
2021-03-12 05:29:10 +0100 <edwardk> i've definitely exported horribleness by using newname in the distant past
2021-03-12 05:29:27 +0100 <glguy> You used to be able to name things reserved keywords, with spaces, etc
2021-03-12 05:29:31 +0100 <edwardk> yeah
2021-03-12 05:29:35 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
2021-03-12 05:29:36 +0100 <glguy> then definitely "fixed" that
2021-03-12 05:29:38 +0100Axman6looks at singletons
2021-03-12 05:29:38 +0100 <edwardk> that was around the same time
2021-03-12 05:29:53 +0100 <edwardk> i'm sad about losing keywords
2021-03-12 05:29:56 +0100 <edwardk> those were useful
2021-03-12 05:30:10 +0100 <edwardk> Foo.type was nice =)
2021-03-12 05:30:28 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 05:33:33 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-03-12 05:33:48 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 05:34:28 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 05:37:05 +0100kiweun(~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) (Remote host closed the connection)
2021-03-12 05:37:26 +0100kiweun(~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2)
2021-03-12 05:37:30 +0100MVQq(~anja@198.254.199.42) (Quit: q)
2021-03-12 05:38:02 +0100toorevitimirp(~tooreviti@117.182.180.50)
2021-03-12 05:38:04 +0100MarcelineVQ(~anja@198.254.199.42)
2021-03-12 05:38:23 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 05:38:51 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 05:39:15 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds)
2021-03-12 05:40:46 +0100stree(~stree@68.36.8.116)
2021-03-12 05:41:41 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-12 05:43:05 +0100okeuday_bak(~okeuday@24-113-18-65.wavecable.com)
2021-03-12 05:43:14 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: Lost terminal)
2021-03-12 05:43:45 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 05:43:46 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 05:43:50 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 260 seconds)
2021-03-12 05:45:15 +0100 <okeuday_bak> Hi, I was wondering why https://hackage.haskell.org/package/cabal-install-3.4.0.0/cabal-install-3.4.0.0.tar.gz doesn't have ./bootstrap.sh as the README.md file describes. How should cabal-install be built otherwise?
2021-03-12 05:49:42 +0100 <glguy> okeuday_bak, generally you don't build cabal-install, you install it via ghcup as a binary
2021-03-12 05:51:45 +0100 <okeuday_bak> glguy: I would prefer to compile it, to ensure I have the source code that created it.
2021-03-12 05:52:07 +0100 <glguy> the bootstrap.sh is in the git repository
2021-03-12 05:52:36 +0100 <glguy> you can download a normal binary and then recompile your own using it; that'd be the simplest
2021-03-12 05:52:43 +0100 <glguy> you'll be using a GHC you didn't compile along the way
2021-03-12 05:53:10 +0100plutoniix(~q@184.82.214.51) (Ping timeout: 260 seconds)
2021-03-12 05:53:56 +0100 <okeuday_bak> glguy: I already have different GHC versions I have compiled, I have normally compiled cabal-install in the past, though I know one release had version problems in the bootstrap.sh file
2021-03-12 05:54:42 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 05:55:55 +0100 <okeuday_bak> glguy: it looks like bootstrap.sh needs to be generated based on https://github.com/haskell/cabal/tree/master/bootstrap , right?
2021-03-12 05:58:36 +0100 <okeuday_bak> glguy: will the next cabal-install package have a way to build it?
2021-03-12 05:59:11 +0100redmp(~redmp@172.58.30.171)
2021-03-12 05:59:26 +0100polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 264 seconds)
2021-03-12 06:00:00 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds)
2021-03-12 06:01:50 +0100jespada(~jespada@90.254.243.187) (Ping timeout: 265 seconds)
2021-03-12 06:02:16 +0100dfeuer(~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 06:04:22 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 06:05:21 +0100jespada(~jespada@90.254.243.187)
2021-03-12 06:13:23 +0100 <okeuday_bak> yeah, it is weird because https://github.com/haskell/cabal/ branch 3.4 has ./travis-bootstrap.sh break because ./bootstrap.sh is missing there too
2021-03-12 06:15:59 +0100 <okeuday_bak> specifically, I was attempting to get cabal-install 3.4 working with ghc 9.0.1
2021-03-12 06:16:26 +0100Tario(~Tario@201.192.165.173) (Ping timeout: 256 seconds)
2021-03-12 06:21:45 +0100kiweun(~kiweun@2607:fea8:2a62:9600:8580:920a:628b:ceb2) (Remote host closed the connection)
2021-03-12 06:22:46 +0100drbean(~drbean@TC210-63-209-174.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
2021-03-12 06:24:53 +0100 <sclv> okeuday_bak: they swapped release managers and didn’t do everything right
2021-03-12 06:24:57 +0100kiweun(~kiweun@2607:fea8:2a62:9600:697d:9bfb:3507:4a9d)
2021-03-12 06:25:03 +0100 <sclv> its a process
2021-03-12 06:25:54 +0100 <okeuday_bak> sclv: I tried the bootstrap/bootstrap.py (3.4 branch) with 8.10.1 since that config file was there and that didn't work, I can always wait for the next cabal-install release, that seems best
2021-03-12 06:27:23 +0100 <okeuday_bak> (thought it might generate with 8.10.1, to possibly be used with 9.0.1, but that was wishful thinking)
2021-03-12 06:30:02 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 06:30:07 +0100 <okeuday_bak> anyway, thanks for the info, will try the next release
2021-03-12 06:30:27 +0100okeuday_bak(~okeuday@24-113-18-65.wavecable.com) ()
2021-03-12 06:31:02 +0100plutoniix(~q@184.82.214.51)
2021-03-12 06:34:14 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
2021-03-12 06:34:33 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net)
2021-03-12 06:35:19 +0100 <fresheyeball> how does overloaded strings and TH interact
2021-03-12 06:35:21 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 06:35:21 +0100Axman6was about to recommend okeuday_bak look into participating in BDSM, it sounds less painful
2021-03-12 06:35:47 +0100 <fresheyeball> I thought I could use LitE . StringL to make Text if overloaded strings is on
2021-03-12 06:35:50 +0100 <fresheyeball> but ghci says no
2021-03-12 06:37:21 +0100kiweun(~kiweun@2607:fea8:2a62:9600:697d:9bfb:3507:4a9d) (Remote host closed the connection)
2021-03-12 06:39:08 +0100 <Axman6> can you make an expression for fromString applied to the string literal?
2021-03-12 06:39:20 +0100 <fresheyeball> yes
2021-03-12 06:39:20 +0100 <Axman6> (preferably fromStringN)
2021-03-12 06:39:28 +0100 <fresheyeball> what is fromStringN?
2021-03-12 06:40:34 +0100 <Axman6> oh, I thought there was an equivalent of IsList's fromListN :: Int -> [Item l] -> l
2021-03-12 06:41:01 +0100 <Axman6> useful for more efficient instances of Vector etc.
2021-03-12 06:43:21 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se)
2021-03-12 06:43:31 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2021-03-12 06:44:28 +0100JokerAscensionEx(~egp_@2.95.74.168) (Quit: EXIT)
2021-03-12 06:47:23 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Remote host closed the connection)
2021-03-12 06:55:46 +0100shellin(bab726a6@186.183.38.166)
2021-03-12 06:56:43 +0100 <fresheyeball> Axman6:++
2021-03-12 07:02:20 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 256 seconds)
2021-03-12 07:05:11 +0100Varis(~Tadas@unaffiliated/varis)
2021-03-12 07:05:16 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 07:05:26 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 07:06:07 +0100plutoniix(~q@184.82.214.51) (Ping timeout: 265 seconds)
2021-03-12 07:09:00 +0100shellin(bab726a6@186.183.38.166) ()
2021-03-12 07:10:03 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 07:12:24 +0100aqd(~aqd@84.20.147.33)
2021-03-12 07:13:28 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-03-12 07:17:52 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 07:18:17 +0100xff0x_(~xff0x@2001:1a81:520c:1100:8f7b:fec1:f600:70b) (Ping timeout: 260 seconds)
2021-03-12 07:19:14 +0100xff0x_(~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a)
2021-03-12 07:20:10 +0100carlomagno(~cararell@148.87.23.9) (Quit: Leaving.)
2021-03-12 07:22:40 +0100 <nshepperd2> huh, apparently Data.Map.keysSet is not productive
2021-03-12 07:22:48 +0100plutoniix(~q@184.82.214.51)
2021-03-12 07:23:14 +0100 <nshepperd2> i had just sort of assumed that it was, but of course it can't be because the definition of Data.Set.Set is fully strict
2021-03-12 07:24:26 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 07:24:51 +0100 <nshepperd2> so something like Set.lookupLT x (Map.keysSet mymap) is actually O(n)
2021-03-12 07:27:28 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 07:27:51 +0100Jd007(~Jd007@162.156.11.151) (Quit: Jd007)
2021-03-12 07:30:03 +0100stree(~stree@68.36.8.116) (Quit: Caught exception)
2021-03-12 07:30:12 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com) (Ping timeout: 246 seconds)
2021-03-12 07:30:29 +0100stree(~stree@68.36.8.116)
2021-03-12 07:31:36 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 246 seconds)
2021-03-12 07:31:45 +0100skdjnsdfknkjn(4962725d@c-73-98-114-93.hsd1.nm.comcast.net)
2021-03-12 07:32:04 +0100sord937(~sord937@gateway/tor-sasl/sord937)
2021-03-12 07:32:42 +0100 <curiousgay> monochrom: I didn't expect that learning Haskell will help me better understand object-oriented programming o_O
2021-03-12 07:33:09 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
2021-03-12 07:33:23 +0100 <siraben> curiousgay: in what regard?
2021-03-12 07:35:26 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 07:35:32 +0100fresheyeball(~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
2021-03-12 07:35:44 +0100 <curiousgay> siraben: it's just Haskell has polymorphism and inheritance, I thought inheritance is specific to OO and thought it's a harmful feature, but now I realize Haskell has the same kind of inheritance as Go - interface inheritance, the existence of which I didn't realize until now
2021-03-12 07:36:12 +0100 <siraben> multiple inheritance would be the harmful feature, right?
2021-03-12 07:36:26 +0100 <curiousgay> no
2021-03-12 07:36:40 +0100 <siraben> What's interface inheritance
2021-03-12 07:36:52 +0100 <siraben> oh it's like subtype polymorphism
2021-03-12 07:37:18 +0100 <curiousgay> both Go and Haskell support multiple inheritance, but in terms of interfaces
2021-03-12 07:37:46 +0100 <curiousgay> I guess you'll understand better if I say type classes in Haskell are interfaces
2021-03-12 07:38:09 +0100 <siraben> Right.
2021-03-12 07:38:35 +0100_Alleria(~AllahuAkb@2603-7000-3040-0000-84d6-f6e9-5a5d-a878.res6.spectrum.com) (Ping timeout: 240 seconds)
2021-03-12 07:38:58 +0100 <nshepperd2> interface inheritance as opposed to datatype inheritance
2021-03-12 07:39:17 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 07:39:30 +0100 <curiousgay> well yeah, I still consider datatype inheritance being harmful, instead I prefer composition
2021-03-12 07:39:44 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 07:39:49 +0100 <siraben> Hm I'm not familiar with OOP terms, what's datatype inheritance?
2021-03-12 07:40:21 +0100 <nshepperd2> the OOP term would be 'class' inheritance
2021-03-12 07:40:28 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2021-03-12 07:40:30 +0100 <siraben> Oh ok.
2021-03-12 07:40:46 +0100 <nshepperd2> making a new class my smooshing together all fields and methods from an old class with new stuff
2021-03-12 07:41:05 +0100 <siraben> Does newtype solve the problem of having overlapping instances (e.g. additive or multiplicative monoid on Int)
2021-03-12 07:41:49 +0100 <c_wraith> > mappend 3 4 :: Sum Int
2021-03-12 07:41:52 +0100 <lambdabot> Sum {getSum = 7}
2021-03-12 07:41:52 +0100Alleria_(~AllahuAkb@2603-7000-3040-0000-ac9e-148c-2486-fb78.res6.spectrum.com)
2021-03-12 07:41:55 +0100 <c_wraith> > mappend 3 4 :: Product Int
2021-03-12 07:41:57 +0100 <lambdabot> Product {getProduct = 12}
2021-03-12 07:42:15 +0100 <siraben> Right, yes. Just wondering about what the specific problem is called in OOP
2021-03-12 07:42:18 +0100 <curiousgay> nshepperd2: I've seen terms implementation/code inheritance https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
2021-03-12 07:43:03 +0100 <curiousgay> siraben: well, when there are multiple terms used to mean the same thing, it becomes confusing to explain
2021-03-12 07:43:07 +0100arrowsvc_(~arr@2.93.163.35)
2021-03-12 07:43:23 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 07:43:28 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com)
2021-03-12 07:43:48 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 07:44:13 +0100 <siraben> confusingly I've seen "covariant" in an OO context o.O
2021-03-12 07:44:37 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:ac7b:d5c9:2180:6a41) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 07:45:21 +0100 <nshepperd2> the type of inheritance that haskell typeclasses have makes sense, because it has a rational interpretation as logical implication
2021-03-12 07:46:24 +0100 <nshepperd2> ie. considered as logical propositions, 'class Foo a => Bar a' just means that Bar a implies Foo a
2021-03-12 07:48:06 +0100 <nshepperd2> which in turn makes sense because there can only ever be one instance for a given type (there's never any question about 'which' Foo a is implied)
2021-03-12 07:48:08 +0100jneira(5127adbf@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.191) (Quit: Connection closed)
2021-03-12 07:48:09 +0100 <curiousgay> but now I'm confused what is object-oriented programming if Haskell is not one
2021-03-12 07:48:42 +0100 <curiousgay> to my brain Haskell feels like functional and object-oriented at the same time
2021-03-12 07:48:48 +0100 <siraben> nshepperd2: yeah
2021-03-12 07:49:07 +0100 <nshepperd2> whereas implementation/datatype/class inheritance is bad because it doesn't mean anything, it's just mashing things together to make new things
2021-03-12 07:51:23 +0100dyeplexer(~lol@unaffiliated/terpin)
2021-03-12 07:51:27 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2021-03-12 07:52:04 +0100 <siraben> class inheritance isn't the same as subtyping?
2021-03-12 07:52:07 +0100waleee-cl(uid373333@gateway/web/irccloud.com/x-jncmlyhymogdqmtq) (Quit: Connection closed for inactivity)
2021-03-12 07:52:10 +0100cfricke(~cfricke@unaffiliated/cfricke)
2021-03-12 07:54:32 +0100 <nshepperd2> well, subtyping is a rather general term
2021-03-12 07:54:54 +0100 <nshepperd2> you might say that class inheritance is a subtype of subtyping
2021-03-12 07:55:50 +0100 <nshepperd2> something like "class Foo : public Bar { ... }" in C++ means that Foo is a subtype of Bar, but that doesn't necessarily tell you anything useful
2021-03-12 07:56:15 +0100[exa](exa@unaffiliated/exa/x-5381537)
2021-03-12 07:56:28 +0100redmp(~redmp@172.58.30.171) (Quit: leaving)
2021-03-12 07:56:51 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 07:57:04 +0100johannes(~johannes@i577BCD21.versanet.de)
2021-03-12 07:57:09 +0100 <sshine_> siraben, subtyping is a more general concept, as far as I understand.
2021-03-12 07:57:19 +0100johanneskenran
2021-03-12 07:57:48 +0100 <siraben> I see. I guess I should read the object calculus in TAPL or something, OOP is just so weird sometimes :P
2021-03-12 07:57:49 +0100kenran(~johannes@i577BCD21.versanet.de) (Remote host closed the connection)
2021-03-12 07:58:13 +0100 <sshine_> siraben, yeah, it seems like the OO concepts weren't made for formal rigor, so those who attempt it are in for a treat.
2021-03-12 07:58:13 +0100johannes(~johannes@i577BCD21.versanet.de)
2021-03-12 07:58:35 +0100 <siraben> sshine_: yeah it's just like a compatibility relation ≤ on the set of types, I forget what kind of algebraic structure it induces
2021-03-12 07:59:03 +0100 <siraben> Ah, a lattice
2021-03-12 07:59:29 +0100Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-12 08:01:29 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-03-12 08:01:38 +0100 <sshine_> what are you up to lately, siraben?
2021-03-12 08:01:43 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 08:01:44 +0100zymurgy1(~zymurgy@li607-220.members.linode.com) (Quit: WeeChat 1.4)
2021-03-12 08:01:59 +0100zymurgy(~zymurgy@li607-220.members.linode.com)
2021-03-12 08:02:23 +0100 <siraben> sshine_: might be better to go to #haskell-offtopic
2021-03-12 08:02:44 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 08:04:40 +0100jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2021-03-12 08:10:20 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds)
2021-03-12 08:11:21 +0100Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 264 seconds)
2021-03-12 08:13:11 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 08:13:33 +0100_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-03-12 08:14:39 +0100knupfer(~Thunderbi@200116b82c66870084b49eef325535f8.dip.versatel-1u1.de)
2021-03-12 08:16:17 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
2021-03-12 08:17:58 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 08:18:55 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 08:19:37 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-03-12 08:23:23 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 245 seconds)
2021-03-12 08:24:30 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com) (Ping timeout: 256 seconds)
2021-03-12 08:27:51 +0100investingcreamking
2021-03-12 08:31:06 +0100johannes(~johannes@i577BCD21.versanet.de) (Ping timeout: 246 seconds)
2021-03-12 08:31:41 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 08:31:56 +0100skdjnsdfknkjn(4962725d@c-73-98-114-93.hsd1.nm.comcast.net) (Quit: Connection closed)
2021-03-12 08:33:38 +0100creamkingcream
2021-03-12 08:36:57 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com)
2021-03-12 08:37:09 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 08:39:37 +0100tfl^(tfl@ip98-184-89-2.mc.at.cox.net) ()
2021-03-12 08:40:45 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2021-03-12 08:43:14 +0100CodeAlways(uid272474@gateway/web/irccloud.com/x-joqrqepywiyvdqbk)
2021-03-12 08:45:29 +0100dansho(~dansho@ec2-52-194-244-43.ap-northeast-1.compute.amazonaws.com) (Quit: Leaving)
2021-03-12 08:45:34 +0100michalz(~user@185.246.204.112)
2021-03-12 08:46:12 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-03-12 08:47:13 +0100frozenErebus(~frozenEre@94.128.82.20)
2021-03-12 08:48:34 +0100PragCypher_(~cypher@li1507-98.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in)
2021-03-12 08:48:49 +0100PragCypher(~cypher@li1507-98.members.linode.com)
2021-03-12 08:51:48 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 08:56:53 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2021-03-12 08:57:46 +0100haritz(~hrtz@unaffiliated/haritz) (Ping timeout: 265 seconds)
2021-03-12 08:58:14 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 264 seconds)
2021-03-12 08:59:33 +0100haritz(~hrtz@62.3.70.206)
2021-03-12 08:59:34 +0100haritz(~hrtz@62.3.70.206) (Changing host)
2021-03-12 08:59:34 +0100haritz(~hrtz@unaffiliated/haritz)
2021-03-12 09:00:09 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 09:00:23 +0100hiroaki(~hiroaki@2a02:8108:8c40:2bb8:7bb5:9401:98a2:564d) (Ping timeout: 265 seconds)
2021-03-12 09:00:27 +0100Yumasi(~guillaume@2a01cb0506313c00e14be01ac4a050f7.ipv6.abo.wanadoo.fr)
2021-03-12 09:04:03 +0100perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2021-03-12 09:10:10 +0100howdoi(uid224@gateway/web/irccloud.com/x-sqjdgtmozwssawhg) (Quit: Connection closed for inactivity)
2021-03-12 09:12:22 +0100hiroaki(~hiroaki@2a02:8108:8c40:2bb8:ca74:2b42:54ac:7ebf)
2021-03-12 09:13:17 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 09:22:13 +0100kuribas(~user@ptr-25vy0iacnrjbfn1sihk.18120a2.ip6.access.telenet.be)
2021-03-12 09:24:17 +0100knupfer(~Thunderbi@200116b82c66870084b49eef325535f8.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2021-03-12 09:26:48 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 09:29:02 +0100timCF(~i.tkachuk@m91-129-99-43.cust.tele2.ee)
2021-03-12 09:29:55 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Read error: Connection reset by peer)
2021-03-12 09:30:31 +0100 <ukari> @lortabac thanks, finally I got to know what is the ConstraintKinds way https://gist.github.com/ukari/527531c4e23de7ad5d6d94613bbed9d2#file-constraintkinds-hs
2021-03-12 09:30:31 +0100 <lambdabot> Unknown command, try @list
2021-03-12 09:31:45 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 264 seconds)
2021-03-12 09:31:45 +0100fendor(~fendor@77.119.131.133.wireless.dyn.drei.com)
2021-03-12 09:32:30 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds)
2021-03-12 09:32:49 +0100 <timCF> Hello! Let's say I have a type `data Foo = Foo (Maybe A) (Maybe B) (Maybe C)`. Is there any way to express on type level that at least one field should be `Just`? Of cource, I can declare big sum type like `data Foo = Foo0 A (Maybe B) (Maybe C) | Foo1 A B (Maybe C) | ...` but it does not look pretty or convenient to use
2021-03-12 09:34:17 +0100gitgood(~gitgood@82-132-217-25.dab.02.net)
2021-03-12 09:34:52 +0100 <tomsmeding> timCF: currently those three fields are values; whether they are Just or not is not reflected at all on the type level, so you can't force anything via types: Haskell isn't (yet?) a dependently-typed language
2021-03-12 09:35:19 +0100 <tomsmeding> so to get what you want, you'd have to reflect Just-ness on the type level; at that point you can do filtering
2021-03-12 09:36:18 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 09:36:26 +0100blackjid(~blackjid@178.239.168.171) (Remote host closed the connection)
2021-03-12 09:36:35 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 09:36:38 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 09:37:38 +0100 <timCF> tomsmeding: thanks!
2021-03-12 09:38:57 +0100stree(~stree@68.36.8.116) (Ping timeout: 264 seconds)
2021-03-12 09:40:07 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 09:40:19 +0100 <tomsmeding> timCF: for example like this: https://paste.tomsmeding.com/OxhKFSTl
2021-03-12 09:40:26 +0100makergrl(~ident@29.201.4.46.bc.googleusercontent.com) (Ping timeout: 260 seconds)
2021-03-12 09:40:39 +0100 <tomsmeding> but whether that's what you want is a different question :p
2021-03-12 09:40:45 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 09:41:08 +0100Varis(~Tadas@unaffiliated/varis)
2021-03-12 09:41:21 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2021-03-12 09:41:34 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 09:41:46 +0100 <tomsmeding> to prevent even being able to construct a Foo with three Nothings, you'll have to use a type with three constructors I'm afraid
2021-03-12 09:42:04 +0100 <tomsmeding> as in data Foo = Foo1 A (Maybe B) (Maybe C) | Foo2 (Maybe A) B (Maybe C) | Foo3 (Maybe A) (Maybe B) C
2021-03-12 09:42:16 +0100 <tomsmeding> or put it in a module and export only smart constructors?
2021-03-12 09:42:43 +0100kritzefitz(~kritzefit@fw-front.credativ.com)
2021-03-12 09:43:47 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 09:44:29 +0100 <timCF> tomsmeding: smart constructor seems the easiest solution. I don't understand type families (yet) :)
2021-03-12 09:44:45 +0100 <tomsmeding> then please don't use them! It was also a nice exercise for me :p
2021-03-12 09:44:50 +0100heatsink(~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Remote host closed the connection)
2021-03-12 09:45:19 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 09:46:40 +0100poscat(~poscat@123.116.89.28) (Ping timeout: 256 seconds)
2021-03-12 09:46:41 +0100Sigyn(sigyn@freenode/utility-bot/sigyn) (*.net *.split)
2021-03-12 09:46:42 +0100poscat1(~poscat@123.116.89.28)
2021-03-12 09:47:38 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Read error: Connection reset by peer)
2021-03-12 09:47:48 +0100timCF(~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Quit: leaving)
2021-03-12 09:48:38 +0100secdragon(~secdragon@185.204.1.185)
2021-03-12 09:48:51 +0100 <lortabac> ukari: if you only define a synonym for the context you can reuse it and compose it with other constraints
2021-03-12 09:48:56 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 256 seconds)
2021-03-12 09:49:42 +0100 <lortabac> whereas 'type Signal a = forall t m . ...' can only be used for that exact type signature
2021-03-12 09:49:46 +0100mouseghost(~draco@87-206-9-185.dynamic.chello.pl)
2021-03-12 09:49:46 +0100mouseghost(~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
2021-03-12 09:49:46 +0100mouseghost(~draco@wikipedia/desperek)
2021-03-12 09:49:47 +0100APugNamedPugsley(~13052@2601:58a:8300:f6a0:b0f3:7fc2:6f5f:380c) (Read error: Connection reset by peer)
2021-03-12 09:51:09 +0100chele(~chele@ip5b40237d.dynamic.kabel-deutschland.de)
2021-03-12 09:51:44 +0100stree(~stree@68.36.8.116)
2021-03-12 09:52:37 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 09:53:33 +0100dsrt^(dsrt@ip98-184-89-2.mc.at.cox.net)
2021-03-12 09:53:43 +0100zaquest(~notzaques@5.128.210.178) (Quit: Leaving)
2021-03-12 09:54:20 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:ccd0:d305:d616:ff16)
2021-03-12 09:54:36 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds)
2021-03-12 09:55:00 +0100Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
2021-03-12 09:55:19 +0100aggin(~ecm@103.88.87.123)
2021-03-12 09:55:46 +0100Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2021-03-12 09:57:40 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 09:58:43 +0100zaquest(~notzaques@5.128.210.178)
2021-03-12 09:59:25 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f)
2021-03-12 10:00:06 +0100the_1_[m](the1matrix@gateway/shell/matrix.org/x-fxqrujvorjgfkzsc) (Quit: Idle for 30+ days)
2021-03-12 10:01:21 +0100evanjs(~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer)
2021-03-12 10:03:10 +0100evanjs(~evanjs@075-129-098-007.res.spectrum.com)
2021-03-12 10:03:23 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2021-03-12 10:03:27 +0100usr25(~usr25@unaffiliated/usr25)
2021-03-12 10:03:58 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-03-12 10:05:04 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 10:05:26 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 10:08:09 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2021-03-12 10:10:01 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 10:12:41 +0100 <bahamas> anyone know if there is a library that will generate types from an openapi schems definition?
2021-03-12 10:12:44 +0100gitgood(~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer)
2021-03-12 10:12:47 +0100aggin(~ecm@103.88.87.123) (Quit: WeeChat 3.0.1)
2021-03-12 10:12:48 +0100gitgoood(~gitgood@82-132-217-25.dab.02.net)
2021-03-12 10:13:16 +0100 <bahamas> I don't care about the whole http client. I just care about the types, and the JSON serialization
2021-03-12 10:16:06 +0100Gurkenglas_(~Gurkengla@unaffiliated/gurkenglas)
2021-03-12 10:17:06 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 10:17:55 +0100 <bahamas> this seems to give me what I want https://hackage.haskell.org/package/openapi3-code-generator-0.1.0.6/docs/OpenAPI-Generate-Model.html
2021-03-12 10:20:05 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 10:20:28 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 10:20:43 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 10:21:11 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 10:22:22 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 10:25:50 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:d07:73d7:6ea:cc71) (Ping timeout: 264 seconds)
2021-03-12 10:29:54 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 10:30:03 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds)
2021-03-12 10:34:24 +0100dunj3(~dunj3@p200300f61714a62572ae6a6bffb9249a.dip0.t-ipconnect.de)
2021-03-12 10:34:50 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 256 seconds)
2021-03-12 10:37:41 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 10:38:42 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection)
2021-03-12 10:41:53 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93)
2021-03-12 10:43:19 +0100DavidEichmann(~david@234.109.45.217.dyn.plus.net)
2021-03-12 10:44:28 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 276 seconds)
2021-03-12 10:45:48 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 10:45:50 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 10:46:28 +0100gitgooodgitgood
2021-03-12 10:49:32 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
2021-03-12 10:49:34 +0100LKoen(~LKoen@185.61.176.203)
2021-03-12 10:49:49 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 10:50:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 10:51:55 +0100vicfred(~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2021-03-12 10:52:16 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 10:52:26 +0100xff0x_(~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) (Quit: xff0x_)
2021-03-12 10:52:35 +0100xff0x(~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a)
2021-03-12 10:52:49 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
2021-03-12 10:53:07 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 10:55:28 +0100m0rphism(~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
2021-03-12 10:57:28 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 10:59:43 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
2021-03-12 11:00:04 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 11:00:31 +0100gitgood(~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer)
2021-03-12 11:00:52 +0100ubert(~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de)
2021-03-12 11:04:52 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
2021-03-12 11:05:10 +0100ubert(~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-03-12 11:05:55 +0100thc202(~thc202@unaffiliated/thc202)
2021-03-12 11:08:07 +0100frozenErebus(~frozenEre@94.128.82.20)
2021-03-12 11:11:52 +0100Rudd0(~Rudd0@185.189.115.108)
2021-03-12 11:14:20 +0100nf(~n@monade.li) (Quit: Fairfarren.)
2021-03-12 11:16:58 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 276 seconds)
2021-03-12 11:16:58 +0100gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-03-12 11:17:18 +0100Zialus(~RMF@2001:818:de63:c300:211:32ff:fe8d:ad29)
2021-03-12 11:17:42 +0100Zialus_PT(~RMF@199.125.37.188.rev.vodafone.pt) (Ping timeout: 246 seconds)
2021-03-12 11:18:39 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 11:19:22 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2021-03-12 11:19:38 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 245 seconds)
2021-03-12 11:22:18 +0100acidjnk_new2(~acidjnk@p200300d0c72b95698494132ffc54748c.dip0.t-ipconnect.de)
2021-03-12 11:24:18 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 11:24:50 +0100gitgood(~gitgood@82-132-217-25.dab.02.net)
2021-03-12 11:29:16 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 11:31:24 +0100SIben(~siben@ns3106586.ip-5-135-191.eu)
2021-03-12 11:33:40 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 11:34:00 +0100nf(~n@monade.li)
2021-03-12 11:34:18 +0100nf(~n@monade.li) (Client Quit)
2021-03-12 11:34:31 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 11:36:36 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds)
2021-03-12 11:37:15 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 11:37:26 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 11:38:14 +0100nf(~n@monade.li)
2021-03-12 11:38:57 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 264 seconds)
2021-03-12 11:41:26 +0100nf(~n@monade.li) (Client Quit)
2021-03-12 11:41:26 +0100frozenErebus(~frozenEre@94.128.82.20)
2021-03-12 11:41:40 +0100Sigyn(sigyn@freenode/utility-bot/sigyn)
2021-03-12 11:41:40 +0100ChanServ+o Sigyn
2021-03-12 11:41:59 +0100ubert1(~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de)
2021-03-12 11:42:02 +0100st8less(~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9)
2021-03-12 11:42:08 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds)
2021-03-12 11:42:58 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 276 seconds)
2021-03-12 11:43:03 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-12 11:43:44 +0100ixlun`(~user@213.205.241.136)
2021-03-12 11:43:50 +0100son0p(~son0p@181.58.39.182)
2021-03-12 11:44:05 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 11:44:26 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 11:44:35 +0100lambda(~xiretza@mail.xiretza.xyz) (Ping timeout: 240 seconds)
2021-03-12 11:45:08 +0100nf(~n@monade.li)
2021-03-12 11:46:12 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it)
2021-03-12 11:46:46 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 11:47:00 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 11:47:37 +0100petersen(~petersen@redhat/juhp) (Quit: petersen)
2021-03-12 11:48:35 +0100petersen(~petersen@redhat/juhp)
2021-03-12 11:49:56 +0100ixlun``(~user@109.249.184.132)
2021-03-12 11:51:38 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 11:52:09 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 11:52:33 +0100ixlun`(~user@213.205.241.136) (Ping timeout: 245 seconds)
2021-03-12 11:54:44 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer)
2021-03-12 11:56:51 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2021-03-12 11:57:28 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 11:57:28 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 11:58:08 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-12 11:59:07 +0100LKoen(~LKoen@185.61.176.203) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
2021-03-12 11:59:50 +0100stree(~stree@68.36.8.116) (Ping timeout: 256 seconds)
2021-03-12 12:00:23 +0100lambda(~xiretza@mail.xiretza.xyz)
2021-03-12 12:02:28 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 276 seconds)
2021-03-12 12:03:04 +0100glguy(x@freenode/staff/haskell.developer.glguy) (Read error: Connection reset by peer)
2021-03-12 12:03:33 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 12:04:30 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 12:04:54 +0100glguy(x@freenode/staff/haskell.developer.glguy)
2021-03-12 12:06:26 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 12:06:54 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 12:07:14 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 12:07:53 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 12:08:03 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 12:08:11 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 12:08:28 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 12:10:25 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 12:11:06 +0100usr25(~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-12 12:12:23 +0100stree(~stree@68.36.8.116)
2021-03-12 12:12:58 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds)
2021-03-12 12:13:07 +0100ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-03-12 12:13:48 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 12:14:00 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds)
2021-03-12 12:14:04 +0100ukari(~ukari@unaffiliated/ukari)
2021-03-12 12:14:38 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 245 seconds)
2021-03-12 12:14:57 +0100kritzefitz(~kritzefit@fw-front.credativ.com) (Ping timeout: 264 seconds)
2021-03-12 12:15:07 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 12:16:49 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 12:17:08 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 12:17:10 +0100 <Gurkenglas_> What the heck is this :D https://easyupload.io/x1ye0b reproducible in powershell
2021-03-12 12:18:36 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 12:19:31 +0100 <Gurkenglas_> requires no lub. Reproduction: 1. open cmd.exe 2. stack ghci 3. let x = x in x 4. Ctrl-C 5. stack ghci 6. 2+2
2021-03-12 12:20:42 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-03-12 12:21:43 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds)
2021-03-12 12:21:58 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 12:23:31 +0100subttle(~anonymous@unaffiliated/subttle) (Quit: leaving)
2021-03-12 12:26:01 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 12:26:07 +0100 <tomsmeding> Gurkenglas_: please fix powershell :p
2021-03-12 12:26:17 +0100 <Gurkenglas_> tomsmeding, reproducible in cmd.exe
2021-03-12 12:26:43 +0100 <tomsmeding> that "parse error on input '+'" is _very_ suspicious
2021-03-12 12:27:03 +0100 <tomsmeding> and makes me think the terminal state is broken somehow
2021-03-12 12:27:18 +0100kritzefitz(~kritzefit@212.86.56.80)
2021-03-12 12:27:36 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 12:27:46 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 12:28:05 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 12:28:09 +0100 <tomsmeding> does not reproduce on linux :p
2021-03-12 12:28:27 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 12:28:35 +0100 <Gurkenglas_> more generally:
2021-03-12 12:28:57 +0100 <Gurkenglas_> 1. stack ghci 2. Ctrl-C 3. uh oh im in the shell but also in ghci
2021-03-12 12:29:20 +0100 <Gurkenglas_> aka, i expect it's because ghci uses Ctrl-C to abort the current calculation and stack ghci uses it to send you back to the shell
2021-03-12 12:29:26 +0100 <tomsmeding> that makes me shudder and be happy I'm not on windows
2021-03-12 12:29:43 +0100 <tomsmeding> is there still a ghc process running after that Ctrl-C?
2021-03-12 12:29:49 +0100 <tomsmeding> what if you kill that process
2021-03-12 12:29:57 +0100 <tomsmeding> (not the one run by your language client if any)
2021-03-12 12:30:13 +0100 <Gurkenglas_> uhh how do i order processes by time of creation
2021-03-12 12:30:32 +0100 <tomsmeding> can you show the command line of processes on windows?
2021-03-12 12:30:37 +0100 <tomsmeding> or a process tree
2021-03-12 12:30:53 +0100 <tomsmeding> you can also just kill all ghc processes, the language server will recover :p
2021-03-12 12:31:05 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
2021-03-12 12:31:15 +0100son0p(~son0p@181.58.39.182) (Quit: Lost terminal)
2021-03-12 12:31:20 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 12:31:25 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 12:32:56 +0100knupfer(~Thunderbi@i59F7FFFF.versanet.de)
2021-03-12 12:34:15 +0100rdd(~user@c-2983e555.012-81-73746f39.cust.ownit.se)
2021-03-12 12:35:26 +0100 <Gurkenglas_> Ah, process monitor can enable a start time column, then sort by that. Indeed, there remains a ghc process newer than the powershell
2021-03-12 12:35:40 +0100 <tomsmeding> Gurkenglas_: what if you kill that one after the Ctrl-C?
2021-03-12 12:35:56 +0100augustine(~irfan@59.88.26.41)
2021-03-12 12:36:33 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds)
2021-03-12 12:36:33 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 12:37:10 +0100 <Gurkenglas_> that works sanely. every stack ghci invocation without killing em spawns another ghc
2021-03-12 12:37:37 +0100 <Gurkenglas_> closing the powershell kills the ghc too.
2021-03-12 12:37:49 +0100 <tomsmeding> Gurkenglas_: so if you kill the spawned ghc process all is fine, but if you don't do that explicitly it lingers and you get madness?
2021-03-12 12:37:58 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 245 seconds)
2021-03-12 12:38:13 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds)
2021-03-12 12:38:17 +0100 <tomsmeding> is there a proper terminal for windows in which things do work?
2021-03-12 12:38:55 +0100 <Gurkenglas_> ah https://github.com/commercialhaskell/stack/issues/4737 knows of this
2021-03-12 12:39:22 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 12:40:14 +0100tomsmedingis scared
2021-03-12 12:40:21 +0100 <Gurkenglas_> at least both cmd and powershell capture keyboard input to themselves rather than passing them on to ghc - the only effect outside the shell i see so far is Prelude > getting printed after PS C:\Users\Gurkenglas>
2021-03-12 12:40:49 +0100 <Gurkenglas_> you get something closer to madness only after launching stack ghci again
2021-03-12 12:42:03 +0100 <Gurkenglas_> the first time this popped up i remember characters changing above the prompt line so i killed that terminal before the corruption starts spreading across vscode :D
2021-03-12 12:42:12 +0100 <tomsmeding> :D
2021-03-12 12:43:07 +0100 <Gurkenglas_> fortunately there are a number of fourth walls between chaos and meatspace, for now.
2021-03-12 12:44:48 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 12:47:21 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 12:47:42 +0100augustine(~irfan@59.88.26.41) ()
2021-03-12 12:47:43 +0100plutoniix(~q@184.82.214.51) (Read error: Connection reset by peer)
2021-03-12 12:48:56 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 12:49:13 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds)
2021-03-12 12:49:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 12:50:09 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection)
2021-03-12 12:51:49 +0100lemmih(~lemmih@2406:3003:2072:44:5504:1a40:9c9:89a5) (Remote host closed the connection)
2021-03-12 12:52:10 +0100lemmih(~lemmih@2406:3003:2072:44:5ef0:b049:fd85:f050)
2021-03-12 12:53:48 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 12:53:49 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 276 seconds)
2021-03-12 12:54:13 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds)
2021-03-12 12:54:52 +0100alx741(~alx741@186.178.108.206)
2021-03-12 12:57:29 +0100hexfive(~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
2021-03-12 12:57:44 +0100marinelli(~marinelli@gateway/tor-sasl/marinelli)
2021-03-12 13:00:54 +0100Gurkenglas_(~Gurkengla@unaffiliated/gurkenglas) (Remote host closed the connection)
2021-03-12 13:03:41 +0100ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-03-12 13:04:13 +0100 <mniip> huuh
2021-03-12 13:04:13 +0100Gurkenglas_(~Gurkengla@unaffiliated/gurkenglas)
2021-03-12 13:04:23 +0100 <mniip> if I have an associated data family
2021-03-12 13:04:39 +0100 <mniip> then suddenly declaring an instance and deriving Eq for it
2021-03-12 13:04:41 +0100ukari(~ukari@unaffiliated/ukari)
2021-03-12 13:04:44 +0100 <mniip> is an orphan instance?
2021-03-12 13:07:08 +0100gitgoood(~gitgood@82-132-216-167.dab.02.net)
2021-03-12 13:08:16 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 13:08:18 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds)
2021-03-12 13:08:33 +0100sm2n_(~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca) (Quit: Leaving)
2021-03-12 13:08:37 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 13:08:41 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 13:09:00 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 13:09:46 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 13:09:50 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 13:09:54 +0100gitgood(~gitgood@82-132-217-25.dab.02.net) (Read error: Connection reset by peer)
2021-03-12 13:10:09 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 13:12:29 +0100pavonia(~user@unaffiliated/siracusa) (Quit: Bye!)
2021-03-12 13:12:37 +0100dhouthoo(~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
2021-03-12 13:13:23 +0100kritzefitz(~kritzefit@212.86.56.80) (Ping timeout: 245 seconds)
2021-03-12 13:13:42 +0100kritzefitz(~kritzefit@fw-front.credativ.com)
2021-03-12 13:14:10 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 13:14:38 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds)
2021-03-12 13:15:55 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 276 seconds)
2021-03-12 13:17:23 +0100gitgoood(~gitgood@82-132-216-167.dab.02.net) (Read error: Connection reset by peer)
2021-03-12 13:19:10 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds)
2021-03-12 13:19:54 +0100ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-03-12 13:21:05 +0100ukari(~ukari@unaffiliated/ukari)
2021-03-12 13:30:11 +0100drbean(~drbean@TC210-63-209-63.static.apol.com.tw)
2021-03-12 13:30:15 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-12 13:30:43 +0100jamm_(~jamm@unaffiliated/jamm)
2021-03-12 13:32:18 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 13:32:43 +0100denisse(~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
2021-03-12 13:33:04 +0100denisse(~spaceCat@gateway/tor-sasl/alephzer0)
2021-03-12 13:33:45 +0100jpds_(~jpds@gateway/tor-sasl/jpds)
2021-03-12 13:34:18 +0100fryguybo1(~fryguybob@cpe-74-65-31-113.rochester.res.rr.com) (Remote host closed the connection)
2021-03-12 13:34:21 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
2021-03-12 13:34:39 +0100jpds_jpds
2021-03-12 13:35:00 +0100raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-03-12 13:35:27 +0100sm2n(~sm2n@bras-base-hmtnon143hw-grc-15-70-54-78-219.dsl.bell.ca)
2021-03-12 13:35:35 +0100 <nshepperd> i don't see why the Eq instance would be an orphan, if it's defined together with the data family instance it is for
2021-03-12 13:36:54 +0100 <nshepperd> the data instance itself could be an orphan though, couldn't it?
2021-03-12 13:37:56 +0100fryguybob(~fryguybob@cpe-74-65-31-113.rochester.res.rr.com)
2021-03-12 13:37:58 +0100ixlun``(~user@109.249.184.132) (Remote host closed the connection)
2021-03-12 13:38:03 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 13:38:08 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 13:38:25 +0100ixlun(~user@109.249.184.132)
2021-03-12 13:38:45 +0100ixlun(~user@109.249.184.132) (Remote host closed the connection)
2021-03-12 13:39:00 +0100ixlun(~user@109.249.184.132)
2021-03-12 13:39:51 +0100machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-03-12 13:42:24 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving)
2021-03-12 13:42:58 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 13:43:45 +0100dfeuer(~dfeuer@pool-173-79-253-62.washdc.fios.verizon.net)
2021-03-12 13:44:22 +0100minoru_shiraeesh(~shiraeesh@46.34.206.154)
2021-03-12 13:46:26 +0100tinhatcat(~tsranso@108-91-101-161.lightspeed.gnvlsc.sbcglobal.net)
2021-03-12 13:48:09 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 13:48:56 +0100maxxe-testing(~maxxe@unaffiliated/maxxe)
2021-03-12 13:50:36 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 13:50:38 +0100tinhatcat(~tsranso@108-91-101-161.lightspeed.gnvlsc.sbcglobal.net) (Client Quit)
2021-03-12 13:52:50 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 13:53:54 +0100Boomerang(~Boomerang@2a05:f6c7:2179:0:ccd0:d305:d616:ff16) (Quit: Leaving)
2021-03-12 13:54:36 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 13:55:28 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 13:59:42 +0100Kaiepi(~Kaiepi@47.54.252.148) (Read error: No route to host)
2021-03-12 14:00:02 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 14:00:45 +0100urodna(~urodna@unaffiliated/urodna)
2021-03-12 14:01:48 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 14:02:05 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 14:02:26 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 14:04:18 +0100knupfer(~Thunderbi@i59F7FFFF.versanet.de) (Quit: knupfer)
2021-03-12 14:04:50 +0100knupfer(~Thunderbi@200116b82c668700c9527be50386a639.dip.versatel-1u1.de)
2021-03-12 14:06:16 +0100Tario(~Tario@201.192.165.173)
2021-03-12 14:09:47 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 14:14:54 +0100gxt(~gxt@gateway/tor-sasl/gxt) (Ping timeout: 268 seconds)
2021-03-12 14:16:25 +0100geowiesnot_bis(~user@87-89-181-157.abo.bbox.fr)
2021-03-12 14:16:29 +0100geekosaur(82650c7a@130.101.12.122)
2021-03-12 14:20:28 +0100stree(~stree@68.36.8.116) (Ping timeout: 245 seconds)
2021-03-12 14:20:30 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 14:21:04 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 14:21:07 +0100Pickchea(~private@unaffiliated/pickchea)
2021-03-12 14:23:41 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 14:24:01 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 14:24:04 +0100Lycurgus(~niemand@98.4.114.199)
2021-03-12 14:24:24 +0100Athas(athas@2a01:7c8:aaac:1cf:f7dd:80de:d3d3:680b) (Quit: ZNC - http://znc.sourceforge.net)
2021-03-12 14:25:39 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 14:25:45 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2021-03-12 14:27:19 +0100Athas(~athas@2a01:7c8:aaac:1cf:b3d0:9cdc:5978:262a)
2021-03-12 14:27:50 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-12 14:28:06 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-03-12 14:28:31 +0100sh9(~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
2021-03-12 14:28:45 +0100geowiesnot_bis(~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 264 seconds)
2021-03-12 14:30:52 +0100CrazyPython(~crazypyth@98.122.164.118)
2021-03-12 14:30:58 +0100joseph(~joseph@cpe-24-208-140-96.insight.res.rr.com)
2021-03-12 14:31:08 +0100cream(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Ping timeout: 256 seconds)
2021-03-12 14:31:22 +0100josephGuest76930
2021-03-12 14:31:45 +0100epicte7us(~epictetus@152.89.204.159)
2021-03-12 14:32:30 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 14:32:59 +0100stree(~stree@68.36.8.116)
2021-03-12 14:33:56 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 14:34:09 +0100swarmcollective(~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 14:34:23 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 14:35:52 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 276 seconds)
2021-03-12 14:37:52 +0100tv-(~tv@unaffiliated/tv-)
2021-03-12 14:38:45 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Client Quit)
2021-03-12 14:38:56 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 14:39:15 +0100Sheilong(uid293653@gateway/web/irccloud.com/x-lslonovgjxgqvcfu)
2021-03-12 14:39:16 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 14:39:45 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 14:41:20 +0100Pickchea(~private@unaffiliated/pickchea) (Ping timeout: 256 seconds)
2021-03-12 14:41:42 +0100investing69(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 14:42:00 +0100investing69(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Max SendQ exceeded)
2021-03-12 14:42:15 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Client Quit)
2021-03-12 14:42:34 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237)
2021-03-12 14:42:34 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer)
2021-03-12 14:42:43 +0100Lycurgus(~niemand@98.4.114.199) (Quit: Exeunt)
2021-03-12 14:43:13 +0100investing(676ee4ed@gateway/web/cgi-irc/kiwiirc.com/ip.103.110.228.237) (Max SendQ exceeded)
2021-03-12 14:44:15 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 14:44:21 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
2021-03-12 14:47:05 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 14:47:22 +0100carlomagno(~cararell@148.87.23.12)
2021-03-12 14:47:27 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 14:48:02 +0100aarvar(~foewfoiew@2601:602:a080:fa0:f5c0:50eb:5dcd:a8d4) (Ping timeout: 264 seconds)
2021-03-12 14:48:19 +0100ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-03-12 14:48:33 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-12 14:48:57 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 14:49:00 +0100drbean(~drbean@TC210-63-209-63.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
2021-03-12 14:49:05 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-12 14:49:05 +0100ixlun(~user@109.249.184.132) (Read error: Connection reset by peer)
2021-03-12 14:49:37 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 14:49:56 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 14:50:16 +0100ixlun(~user@109.249.184.132)
2021-03-12 14:50:24 +0100ADG1089__(~aditya@223.226.229.230)
2021-03-12 14:51:33 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds)
2021-03-12 14:53:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 14:54:13 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds)
2021-03-12 14:54:21 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 246 seconds)
2021-03-12 14:54:21 +0100maxxe-testing(~maxxe@unaffiliated/maxxe) (Ping timeout: 246 seconds)
2021-03-12 14:58:42 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection)
2021-03-12 15:01:34 +0100pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…)
2021-03-12 15:03:02 +0100xff0x(~xff0x@2001:1a81:520c:1100:ac8b:f992:eea7:f98a) (Ping timeout: 264 seconds)
2021-03-12 15:03:54 +0100xff0x(~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb)
2021-03-12 15:05:38 +0100thecoffemaker_(~thecoffem@125-121-245-190.fibertel.com.ar) (Quit: So long and thanks for all the fish!)
2021-03-12 15:05:39 +0100Guest_88(4bba29ee@cpe-75-186-41-238.cinci.res.rr.com)
2021-03-12 15:06:07 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:06:24 +0100 <Guest_88> Hi everyone, how is Haskell on apple silicon?
2021-03-12 15:06:28 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:06:43 +0100 <maerwald> Guest_88: you need to run in arch -x86_64 compat mode via rosetta
2021-03-12 15:07:08 +0100 <maerwald> a native release is planned https://www.haskell.org/ghc/blog/20210309-apple-m1-story.html
2021-03-12 15:08:31 +0100 <Guest_88> Thank you for the blog post! That is great
2021-03-12 15:08:34 +0100 <Guest_88> I can't wait
2021-03-12 15:12:07 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:12:28 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:12:52 +0100thecoffemaker(~thecoffem@unaffiliated/thecoffemaker)
2021-03-12 15:13:06 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:13:29 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:14:46 +0100Guest_88(4bba29ee@cpe-75-186-41-238.cinci.res.rr.com) (Quit: Connection closed)
2021-03-12 15:15:07 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:15:10 +0100aqd(~aqd@84.20.147.33) (Quit: Textual IRC Client: www.textualapp.com)
2021-03-12 15:15:31 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:16:06 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:16:17 +0100Athas(~athas@2a01:7c8:aaac:1cf:b3d0:9cdc:5978:262a) (Quit: ZNC - http://znc.sourceforge.net)
2021-03-12 15:16:28 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:17:48 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 15:18:06 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:18:31 +0100gzj(~gzj@unaffiliated/gzj)
2021-03-12 15:18:34 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 15:18:53 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 15:19:07 +0100gzj(~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-12 15:19:42 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 15:19:54 +0100ADG1089__(~aditya@223.226.229.230) (Remote host closed the connection)
2021-03-12 15:20:01 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 15:21:33 +0100azure1(~azure@103.154.230.242) (Ping timeout: 264 seconds)
2021-03-12 15:22:24 +0100azure1(~azure@103.154.230.130)
2021-03-12 15:22:43 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 15:23:17 +0100thecoffemaker(~thecoffem@unaffiliated/thecoffemaker) (Remote host closed the connection)
2021-03-12 15:23:57 +0100 <Gurkenglas_> Can I dump all current thunks when https://github.com/haskell/haskell-language-server/blob/master/ghcide/session-loader/Development/I… is (first?) called, or maybe when the call is forced?
2021-03-12 15:24:52 +0100thecoffemaker(~thecoffem@unaffiliated/thecoffemaker)
2021-03-12 15:25:29 +0100hiroaki(~hiroaki@2a02:8108:8c40:2bb8:ca74:2b42:54ac:7ebf) (Ping timeout: 272 seconds)
2021-03-12 15:26:46 +0100 <geekosaur> I don't think the notion of "all current thunks" exists
2021-03-12 15:27:08 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds)
2021-03-12 15:27:42 +0100acidjnk_new2(~acidjnk@p200300d0c72b95698494132ffc54748c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 15:27:50 +0100 <geekosaur> unless you mean "the current pattern stack" or something like that
2021-03-12 15:27:52 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 15:29:02 +0100 <Gurkenglas_> geekosaur, doesn't the RAM of any Haskell-compiled executable look like a big list of thunks? If not, what does it look like?
2021-03-12 15:29:20 +0100 <geekosaur> it mostly does, but you assume there's a list of them somewhere
2021-03-12 15:29:46 +0100 <geekosaur> note "mostly"
2021-03-12 15:30:15 +0100 <Gurkenglas_> the nonthunk parts are the same in all haskell-compiled executables, right?
2021-03-12 15:30:18 +0100Kaiepi(~Kaiepi@47.54.252.148) (Read error: Connection reset by peer)
2021-03-12 15:30:20 +0100 <geekosaur> nope
2021-03-12 15:30:30 +0100 <Gurkenglas_> what is an example of such an exotic nonthunk part?
2021-03-12 15:30:34 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 15:30:40 +0100 <geekosaur> the nonthunk parts are actual values, pinned arrays, etc.
2021-03-12 15:30:45 +0100 <geekosaur> not so exotic
2021-03-12 15:30:58 +0100 <geekosaur> (pinned arrays are most commonly bytestrings)
2021-03-12 15:31:43 +0100 <Gurkenglas_> what makes dumping the thunks technically hard?
2021-03-12 15:31:59 +0100ADG1089__(~aditya@223.226.229.230)
2021-03-12 15:32:25 +0100joseph(~joseph@cpe-24-208-140-96.insight.res.rr.com)
2021-03-12 15:32:27 +0100 <Gurkenglas_> couldnt one "just" pause the process, look over its ram, and dump every thunks?
2021-03-12 15:32:38 +0100 <geekosaur> I doubt it
2021-03-12 15:32:50 +0100josephGuest61892
2021-03-12 15:33:14 +0100 <Gurkenglas_> (so i can figure out the path by which that linked string gets onto my screen)
2021-03-12 15:33:25 +0100 <geekosaur> you still have this assumption that you can reliably identify a thunk just by looking at it
2021-03-12 15:33:32 +0100Guest61892swarmcollective
2021-03-12 15:33:47 +0100 <Gurkenglas_> hmm. can i compile everything such that the thunks stay recognizable?
2021-03-12 15:33:51 +0100 <geekosaur> sorry, just by looking at a random memory address, whether it's a thunk or not
2021-03-12 15:35:18 +0100Guest76930(~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 246 seconds)
2021-03-12 15:35:39 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 246 seconds)
2021-03-12 15:35:53 +0100 <geekosaur> do remember that the "shape" of a value is not described anywhere but in code related to that value, so you can't "just" scan through memory and take the things that "look like" thunks — they may well be values
2021-03-12 15:36:32 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 15:36:47 +0100Natch(~natch@c-b471e255.014-297-73746f25.bbcust.telenor.se) (Remote host closed the connection)
2021-03-12 15:37:09 +0100 <Gurkenglas_> what thunk might be not part of the "current pattern stack"?
2021-03-12 15:37:20 +0100hiroaki(~hiroaki@2a02:8108:8c40:2bb8:4b06:962b:f728:a206)
2021-03-12 15:37:27 +0100 <geekosaur> any thunk not currently being evaluated
2021-03-12 15:38:43 +0100 <geekosaur> or for that matter any evaluated value not currently in use somewhere
2021-03-12 15:40:11 +0100 <geekosaur> when your program starts, the pattern stack has "main" on it. if you want to trace through evaluation of thunks, there might be some way to instrument STG but I'd expect it to be fairly slow.
2021-03-12 15:40:30 +0100 <geekosaur> but that won't let you scan, it'd just track evaluation of thunks
2021-03-12 15:40:40 +0100 <Gurkenglas_> in "let x = [id] in fix (x !! 1)", x would leave the pattern stack before long, yes?
2021-03-12 15:41:40 +0100 <Gurkenglas_> but any function that will ever be called again can be found somewhere in the pattern stack, right?
2021-03-12 15:41:51 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 15:42:07 +0100Natch(~Natch@c-b471e255.014-297-73746f25.bbcust.telenor.se)
2021-03-12 15:42:41 +0100Pickchea(~private@unaffiliated/pickchea)
2021-03-12 15:42:43 +0100 <geekosaur> no? the stack gets stuff pushed onto it as needed. that may cause some previously evaluated value to come back into the stack
2021-03-12 15:43:01 +0100sh9(~sh9@softbank060116136158.bbtec.net)
2021-03-12 15:43:15 +0100 <geekosaur> you seem to want the stack to be a tree instead of a stack?
2021-03-12 15:43:43 +0100Athas(athas@sigkill.dk)
2021-03-12 15:44:14 +0100berberman(~berberman@unaffiliated/berberman)
2021-03-12 15:44:26 +0100geekosaur(82650c7a@130.101.12.122) (Quit: Connection closed)
2021-03-12 15:45:12 +0100berberman_(~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
2021-03-12 15:45:15 +0100 <Gurkenglas_> ah so there's an implicit pattern tree and the stack is a path through that tree
2021-03-12 15:45:48 +0100jamm_(~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-03-12 15:46:23 +0100 <Gurkenglas_> and all thunks in ram are somewhere on that tree
2021-03-12 15:46:28 +0100 <merijn> Gurkenglas_: Haskell expressions are graphs
2021-03-12 15:46:51 +0100 <Gurkenglas_> sure, replace tree with graph
2021-03-12 15:47:42 +0100 <merijn> Gurkenglas_: The stack isn't really "a path through the graph". Evaluation causes (parts of) the graph to simplified/reduced
2021-03-12 15:48:11 +0100Jd007(~Jd007@162.156.11.151)
2021-03-12 15:48:12 +0100 <merijn> The stack is to keep track of "how to continue when the current evaluation finishes"
2021-03-12 15:48:18 +0100Jd007(~Jd007@162.156.11.151) (Client Quit)
2021-03-12 15:49:04 +0100ixlun(~user@109.249.184.132) (Read error: Connection reset by peer)
2021-03-12 15:49:19 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 276 seconds)
2021-03-12 15:49:40 +0100 <Gurkenglas_> and when that stack actually loops, that prints <loop>, but stacks depicting recursion are more of a spiral on that graph that would only become a loop if each node were projected onto the identifier that was unpacked to spawn that node
2021-03-12 15:49:58 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 276 seconds)
2021-03-12 15:50:08 +0100ixlun(~user@109.249.184.132)
2021-03-12 15:50:48 +0100 <Gurkenglas_> (or rather it returns a bottom that shows as "<loop>")
2021-03-12 15:51:51 +0100mouseghost(~draco@wikipedia/desperek) (Quit: mew wew)
2021-03-12 15:52:20 +0100 <epicte7us> guys guys, I just wrote my first Haskell program that uses the STM TChan, it's SO COOL. I've never done any multi-threaded progrmaming before -- SO COOL
2021-03-12 15:52:28 +0100secdragon(~secdragon@185.204.1.185) (Remote host closed the connection)
2021-03-12 15:53:55 +0100 <merijn> \o/
2021-03-12 15:53:59 +0100xff0x(~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) (Ping timeout: 272 seconds)
2021-03-12 15:54:49 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 15:55:15 +0100xff0x(xff0x@gateway/vpn/mullvad/xff0x)
2021-03-12 15:57:00 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 15:57:25 +0100 <Gurkenglas_> alright so what i asked for is the spine of the Spineless Tagless G-machine. Would a spineful, tagful variant be more than a constant factor more expensive?
2021-03-12 15:57:34 +0100bergey`(~user@107.181.19.30)
2021-03-12 15:57:36 +0100Psybur(~user@unaffiliated/psybur)
2021-03-12 15:57:56 +0100 <Psybur> How would I get stack to tell ghc to use --no-pie instead of -no-pie during linking?
2021-03-12 15:59:02 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 15:59:08 +0100 <Psybur> Running into weird stuff on archlinux. I had to manually specify the linker path with -pgml just to get this far. Something doesnt seem right heh
2021-03-12 15:59:32 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds)
2021-03-12 16:00:09 +0100bergey(~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 246 seconds)
2021-03-12 16:00:22 +0100xff0x(xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 276 seconds)
2021-03-12 16:01:28 +0100xff0x(~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb)
2021-03-12 16:01:59 +0100 <Gurkenglas_> I've found lub to not fall to the counterexample I constructed yesterday. Just undefined `lub` fix (fmap (const 2)) actually comes out to Just hangs, not Just 2.
2021-03-12 16:06:16 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-03-12 16:07:17 +0100 <nshepperd> what's this lub
2021-03-12 16:07:18 +0100marinelli(~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli)
2021-03-12 16:07:48 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759)
2021-03-12 16:08:13 +0100ketas1(~ketas@37.120.211.188)
2021-03-12 16:08:16 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 16:09:04 +0100 <siraben> nshepperd: least upper bound, probably.
2021-03-12 16:09:18 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 16:10:24 +0100 <merijn> Psybur: You are using the arch packages?
2021-03-12 16:10:34 +0100 <Psybur> yes
2021-03-12 16:11:16 +0100Sgeo(~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-03-12 16:11:28 +0100 <Gurkenglas_> the least defined value that's more defined than both - lub ((),undefined) (undefined,()) = ((),()). I think the api deliberately doesnt say what it does on lub 1 2
2021-03-12 16:11:29 +0100 <merijn> Psybur: Yeah...those are entirely broken
2021-03-12 16:11:58 +0100 <merijn> Psybur: Arch maintainers insist on installing a GHC that's broken when used "normally"
2021-03-12 16:12:28 +0100 <Psybur> Strange. So I should uninstall stack and ghc and manually install stack?
2021-03-12 16:12:46 +0100 <merijn> Psybur: The recommended solution is "don't use GHC installed by Arch" ;)
2021-03-12 16:12:56 +0100 <merijn> Psybur: Stack *should* probably work
2021-03-12 16:12:58 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 16:13:19 +0100 <Psybur> Ok thanks
2021-03-12 16:13:41 +0100 <merijn> Psybur: Because stack fetches and installs its own copy/copies of GHC
2021-03-12 16:14:03 +0100 <merijn> Psybur: There's a section on the Arch wiki on Haskell
2021-03-12 16:14:16 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds)
2021-03-12 16:14:59 +0100 <merijn> Psybur: Which should have more info. But the short summary is: GHC's default linking mode is static. Arch maintainers only install dynamic libraries for ideological reasons. So default invocations of GHC fail due to static libs not being installed/available.
2021-03-12 16:15:31 +0100 <nshepperd> oh so lub is like race but recursively
2021-03-12 16:16:32 +0100justsomeguy(~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 256 seconds)
2021-03-12 16:18:10 +0100 <nshepperd> lub seems like a dubious name given that there technically isn't always an upper bound
2021-03-12 16:19:19 +0100xff0x(~xff0x@2001:1a81:520c:1100:aa08:8f09:5c11:60cb) (Ping timeout: 272 seconds)
2021-03-12 16:19:40 +0100xff0x(~xff0x@2001:1a81:520c:1100:5e31:893b:56c2:ee10)
2021-03-12 16:20:21 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 264 seconds)
2021-03-12 16:23:13 +0100graf_blutwurst(~user@2001:171b:226e:adc0:51ba:fe70:8240:4759) (Remote host closed the connection)
2021-03-12 16:23:18 +0100frozenErebus(~frozenEre@94.128.82.20)
2021-03-12 16:24:50 +0100 <Psybur> Right so the only ghc lib that Arch has installed is local/ghc-libs 8.10.4-1 - The Glasgow Haskell Compiler - Dynamic Libraries
2021-03-12 16:24:55 +0100 <Psybur> ghc itself isnt installed
2021-03-12 16:25:01 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 16:25:18 +0100 <Psybur> So do I just remove this library and let stack figure it out?
2021-03-12 16:25:51 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 16:25:54 +0100 <Psybur> Ill read the arch wiki in the meantime ;p
2021-03-12 16:26:11 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 16:26:24 +0100Gurkenglas_Gurkenglas
2021-03-12 16:27:22 +0100 <Psybur> The wiki is answering my questions. Thanks
2021-03-12 16:27:51 +0100Jd007(~Jd007@162.156.11.151)
2021-03-12 16:28:24 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 16:30:05 +0100Yumasi(~guillaume@2a01cb0506313c00e14be01ac4a050f7.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds)
2021-03-12 16:30:49 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 16:31:08 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 16:31:22 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
2021-03-12 16:34:02 +0100nhs(~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-12 16:38:04 +0100minoru_shiraeesh(~shiraeesh@46.34.206.154) (Ping timeout: 276 seconds)
2021-03-12 16:40:02 +0100chisui(58829866@88.130.152.102)
2021-03-12 16:40:09 +0100dima__(~dima@178-167-125-110.dynvpn.flex.ru)
2021-03-12 16:40:15 +0100hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2021-03-12 16:40:28 +0100 <Psybur> Got it working using stack-static/ghc-static etc thanks
2021-03-12 16:40:52 +0100 <chisui> Hey, what was this FP introduction course that is posted here all the time again?
2021-03-12 16:40:54 +0100stree(~stree@68.36.8.116) (Ping timeout: 256 seconds)
2021-03-12 16:41:05 +0100 <dima__> fg
2021-03-12 16:41:18 +0100kiweun(~kiweun@2607:fea8:2a62:9600:1df8:1a68:20b5:2763)
2021-03-12 16:41:19 +0100dima__(~dima@178-167-125-110.dynvpn.flex.ru) (Client Quit)
2021-03-12 16:41:51 +0100 <merijn> CIS194 ?
2021-03-12 16:41:54 +0100 <merijn> chisui: ^^
2021-03-12 16:42:36 +0100 <chisui> merijn that's the one. Wasn't there even a bot that posts a link?
2021-03-12 16:42:36 +0100elliott__(~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-03-12 16:42:39 +0100 <chisui> !CIS194
2021-03-12 16:42:44 +0100 <chisui> @CIS194
2021-03-12 16:42:44 +0100 <lambdabot> Unknown command, try @list
2021-03-12 16:42:46 +0100 <merijn> @where CIS194
2021-03-12 16:42:46 +0100 <lambdabot> https://www.seas.upenn.edu/~cis194/spring13/lectures.html
2021-03-12 16:42:50 +0100 <chisui> ahhh
2021-03-12 16:46:30 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:948b:9d7e:1b3d:4c5c)
2021-03-12 16:49:48 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net)
2021-03-12 16:50:13 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 16:50:25 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 16:50:25 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe)
2021-03-12 16:51:05 +0100chisui(58829866@88.130.152.102) (Quit: Connection closed)
2021-03-12 16:52:01 +0100MidAutumnHotaru(~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾)
2021-03-12 16:52:41 +0100MidAutumnHotaru(~MidAutumn@unaffiliated/midautumnhotaru)
2021-03-12 16:53:19 +0100notzmv(~zmv@unaffiliated/zmv) (Ping timeout: 256 seconds)
2021-03-12 16:53:37 +0100stree(~stree@68.36.8.116)
2021-03-12 16:55:14 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 16:55:29 +0100kiweun(~kiweun@2607:fea8:2a62:9600:1df8:1a68:20b5:2763) (Remote host closed the connection)
2021-03-12 16:55:45 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds)
2021-03-12 16:57:45 +0100kayvan(~user@52-119-115-185.PUBLIC.monkeybrains.net)
2021-03-12 16:58:29 +0100kritzefitz(~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2021-03-12 16:58:49 +0100swarmcollective(~joseph@cpe-24-208-140-96.insight.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 17:00:06 +0100polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2021-03-12 17:02:07 +0100swarmcollective(~joseph@cpe-24-208-140-96.insight.res.rr.com)
2021-03-12 17:02:20 +0100olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
2021-03-12 17:03:09 +0100CoconutCrab(~Cua@unaffiliated/coconutcrab) (Ping timeout: 246 seconds)
2021-03-12 17:03:09 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 17:04:42 +0100Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 256 seconds)
2021-03-12 17:07:00 +0100Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2021-03-12 17:07:32 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds)
2021-03-12 17:08:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 17:08:47 +0100usr25(~usr25@unaffiliated/usr25)
2021-03-12 17:08:51 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 17:09:08 +0100Guest34870(~textual@mskresolve-a.mskcc.org) (Remote host closed the connection)
2021-03-12 17:09:27 +0100nf(~n@monade.li) (Quit: Fairfarren.)
2021-03-12 17:10:02 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 17:10:43 +0100Tops2(~Tobias@dyndsl-095-033-024-175.ewe-ip-backbone.de)
2021-03-12 17:11:26 +0100xff0x(~xff0x@2001:1a81:520c:1100:5e31:893b:56c2:ee10) (Ping timeout: 264 seconds)
2021-03-12 17:11:53 +0100xff0x(~xff0x@2001:1a81:520c:1100:b717:e343:40b1:857a)
2021-03-12 17:12:08 +0100idhugo(~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 245 seconds)
2021-03-12 17:12:15 +0100ADG1089__(~aditya@223.226.229.230) (Remote host closed the connection)
2021-03-12 17:12:43 +0100Stanley00(~stanley00@unaffiliated/stanley00)
2021-03-12 17:13:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-03-12 17:15:07 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 17:15:38 +0100nf(~n@monade.li)
2021-03-12 17:15:44 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck)
2021-03-12 17:17:08 +0100Stanley00(~stanley00@unaffiliated/stanley00) (Ping timeout: 245 seconds)
2021-03-12 17:17:14 +0100kritzefitz(~kritzefit@212.86.56.80)
2021-03-12 17:17:14 +0100FortuneZero(3223b878@50.35.184.120)
2021-03-12 17:17:17 +0100Alleria(~textual@zrcout.mskcc.org)
2021-03-12 17:17:40 +0100AlleriaGuest64155
2021-03-12 17:20:26 +0100Alleria_(~AllahuAkb@2603-7000-3040-0000-ac9e-148c-2486-fb78.res6.spectrum.com) (Ping timeout: 264 seconds)
2021-03-12 17:21:16 +0100vicfred(vicfred@gateway/vpn/mullvad/vicfred)
2021-03-12 17:22:58 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 245 seconds)
2021-03-12 17:23:40 +0100Alleria_(~AllahuAkb@2603-7000-3040-0000-49c8-a343-3d41-8b5a.res6.spectrum.com)
2021-03-12 17:23:55 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 272 seconds)
2021-03-12 17:25:56 +0100notzmv(~zmv@unaffiliated/zmv)
2021-03-12 17:26:31 +0100nf(~n@monade.li) (Quit: Fairfarren.)
2021-03-12 17:27:21 +0100nf(~n@monade.li)
2021-03-12 17:27:38 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93) (Ping timeout: 264 seconds)
2021-03-12 17:27:58 +0100michalz(~user@185.246.204.112) (Remote host closed the connection)
2021-03-12 17:29:47 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 17:31:08 +0100 <tomjagua1paw> Can I put a type signature of a let-bound thing in pattern guards?
2021-03-12 17:31:19 +0100conal(~conal@64.71.133.70)
2021-03-12 17:31:40 +0100tomjagua1pawtomjaguarpaw
2021-03-12 17:32:24 +0100ddellaco_(ddellacost@gateway/vpn/mullvad/ddellacosta) (Remote host closed the connection)
2021-03-12 17:32:29 +0100cr3(~cr3@192-222-143-195.qc.cable.ebox.net)
2021-03-12 17:32:55 +0100 <lyxia> > let f | let b :: Bool ; b = True , b = 0 in f
2021-03-12 17:32:56 +0100 <lambdabot> 0
2021-03-12 17:35:52 +0100 <tomjaguarpaw> Interesting, thanks! One day I may understand Haskell's syntax
2021-03-12 17:37:34 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 17:38:42 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 256 seconds)
2021-03-12 17:39:54 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 246 seconds)
2021-03-12 17:39:58 +0100ukari(~ukari@unaffiliated/ukari)
2021-03-12 17:40:32 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe)
2021-03-12 17:40:41 +0100shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:84fd:19e6:b34a:aa93)
2021-03-12 17:40:56 +0100vchlup_(~vchlup@nat.brnet.cz) (Read error: Connection reset by peer)
2021-03-12 17:41:23 +0100vchlup_(~vchlup@nat.brnet.cz)
2021-03-12 17:45:35 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 17:45:40 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 276 seconds)
2021-03-12 17:47:42 +0100crobbins(~crobbins@2601:2c1:200:ec50:e447:130a:d760:fb15)
2021-03-12 17:49:04 +0100ixlun(~user@109.249.184.132) (Read error: Connection reset by peer)
2021-03-12 17:50:36 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds)
2021-03-12 17:50:53 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 17:51:41 +0100ep1ctetus_(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-03-12 17:51:44 +0100ixlun(~user@109.249.184.132)
2021-03-12 17:51:50 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 17:52:10 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 17:52:30 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 17:52:42 +0100kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2021-03-12 17:53:04 +0100geekosaur(82650c7a@130.101.12.122)
2021-03-12 17:54:26 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 17:54:35 +0100kritzefitz(~kritzefit@212.86.56.80)
2021-03-12 17:55:45 +0100epicte7us(~epictetus@152.89.204.159) (Ping timeout: 264 seconds)
2021-03-12 17:55:53 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 18:01:44 +0100toorevitimirp(~tooreviti@117.182.180.50) (Remote host closed the connection)
2021-03-12 18:02:29 +0100nyaomin(~naomi@cpe-74-75-6-125.maine.res.rr.com) (Ping timeout: 265 seconds)
2021-03-12 18:03:27 +0100ph88_(~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds)
2021-03-12 18:04:13 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f)
2021-03-12 18:05:42 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 18:06:12 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection)
2021-03-12 18:06:29 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 18:07:36 +0100hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds)
2021-03-12 18:10:41 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 18:11:00 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-03-12 18:11:24 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 18:11:43 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 18:12:13 +0100mrus(~mrus@128.199.8.231) (Ping timeout: 260 seconds)
2021-03-12 18:12:28 +0100sparsity(5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251)
2021-03-12 18:12:30 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 18:12:34 +0100 <sparsity> hi
2021-03-12 18:12:49 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 18:14:41 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-03-12 18:15:33 +0100jakalx(~jakalx@base.jakalx.net) ("Error from remote client")
2021-03-12 18:18:06 +0100chele(~chele@ip5b40237d.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2021-03-12 18:25:34 +0100conal(~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
2021-03-12 18:26:09 +0100conal(~conal@64.71.133.70)
2021-03-12 18:26:39 +0100michaelh(~user@ip-109-42-114-163.web.vodafone.de)
2021-03-12 18:28:56 +0100thc202(~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-03-12 18:29:08 +0100notzmv(~zmv@unaffiliated/zmv) (Ping timeout: 256 seconds)
2021-03-12 18:29:27 +0100stree(~stree@68.36.8.116) (Quit: Caught exception)
2021-03-12 18:29:37 +0100conal_(~conal@64.71.133.70)
2021-03-12 18:29:53 +0100thc202(~thc202@unaffiliated/thc202)
2021-03-12 18:29:53 +0100stree(~stree@68.36.8.116)
2021-03-12 18:30:18 +0100conal(~conal@64.71.133.70) (Ping timeout: 246 seconds)
2021-03-12 18:31:36 +0100cfricke(~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0.1)
2021-03-12 18:33:18 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2021-03-12 18:35:17 +0100 <michaelh> Hi, Haskell beginner here. A state monad question, which I am just learning about. We'll see if I can explain it properly... So I have something like `do xs <- (takeWhile (> 0)) <$> mapM f [1..]`, where f has type `Int -> State (Map Int Int) Int`. Its a function which memoizes the calculations it does into a Map. This works as far as only the values are concerned, I get the list of Ints. But when I want to retrieve the state with `s <-
2021-03-12 18:35:17 +0100 <michaelh> get`, it hangs. I suppose that's because the `mapM` operation works on an infinite list, and I'll never get the finished state.
2021-03-12 18:35:32 +0100rajivr(uid269651@gateway/web/irccloud.com/x-xljhenfdjyrbvgti) (Quit: Connection closed for inactivity)
2021-03-12 18:36:01 +0100 <michaelh> My question is: Is there a simple way to obtain the last state? That is the state after the caluclation of the last value of my finite list.
2021-03-12 18:36:59 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 18:37:13 +0100bahamas(~lucian@188.27.48.99)
2021-03-12 18:37:13 +0100bahamas(~lucian@188.27.48.99) (Changing host)
2021-03-12 18:37:13 +0100bahamas(~lucian@unaffiliated/bahamas)
2021-03-12 18:37:15 +0100f-a(~f-a@151.36.221.225)
2021-03-12 18:39:19 +0100 <sm[m]> michaelh: you say finite list, but your example shows an infinite one ?
2021-03-12 18:40:56 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe)
2021-03-12 18:41:00 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1)
2021-03-12 18:41:26 +0100 <koz_> michaelh: If you're dealing with infinite lists + monads, you have to be _very_ careful.
2021-03-12 18:41:32 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 18:41:46 +0100 <michaelh> sm[m]: The (takeWhile (> 0)) will give me a finite list, no?
2021-03-12 18:41:50 +0100 <koz_> michaelh: No.
2021-03-12 18:41:56 +0100 <michaelh> Oh
2021-03-12 18:42:00 +0100 <koz_> The mapM has to drag its way through the _entire_ list first.
2021-03-12 18:42:09 +0100 <sm[m]> as you suspected, the mapM tries to process the whole list
2021-03-12 18:42:10 +0100 <koz_> Once you're in a monad, lists no longer stream.
2021-03-12 18:42:25 +0100 <koz_> There was a question on this like, a few days ago.
2021-03-12 18:42:34 +0100 <sm[m]> sequentiality is enforced, by this monad at least
2021-03-12 18:42:42 +0100 <koz_> If you need this kind of behaviour (aka, streaming in a monad), you want something like pipes.
2021-03-12 18:43:23 +0100 <koz_> sm[m]: This has nothing to do with sequentiality and everything to do with monads forcing full evaluation of said list.
2021-03-12 18:43:23 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 18:43:31 +0100 <koz_> Because bind is a real pain.
2021-03-12 18:43:37 +0100 <koz_> (or rather, a necessary evil)
2021-03-12 18:43:47 +0100 <fendor> does haskell have a state of the art mutation testing framework?
2021-03-12 18:43:56 +0100 <koz_> fendor: What's 'mutation testing'?
2021-03-12 18:44:40 +0100 <fendor> koz_, you introduce small changes in your source-code programmatically, and run your test-suite against your changed code-base
2021-03-12 18:44:42 +0100vavagee(~vavagee@122.172.247.204)
2021-03-12 18:44:53 +0100f-a(~f-a@151.36.221.225) ()
2021-03-12 18:45:00 +0100 <michaelh> Hehe okay. Well, then this was a lot harder than I thought. Still have some difficulty wrapping my head around just the state monad, so this obviously was a too hard a problem I chose for myself.
2021-03-12 18:45:04 +0100 <fendor> if one of your test-case fails, the "mutation" has been killed, thus judging a bit your tests quality/coverage
2021-03-12 18:45:06 +0100 <michaelh> Thanks sm[m] and koz_
2021-03-12 18:45:25 +0100 <koz_> michaelh: I would say this much - this is a problem with monads more generally. It's not specific to State.
2021-03-12 18:45:32 +0100 <koz_> Finitize the list and it should go away.
2021-03-12 18:45:50 +0100 <koz_> Basically, for now, keep in your head that 'once lists touch a monad, they no longer stream'.
2021-03-12 18:46:00 +0100 <koz_> Once you're more comfortable, read the pipes tutorial.
2021-03-12 18:46:03 +0100 <fendor> if your test-suite succeeded, than there is a semi-random change your test-suite would not protext you against
2021-03-12 18:46:09 +0100sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2021-03-12 18:46:13 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 18:46:17 +0100 <michaelh> koz_: Cool, got it
2021-03-12 18:46:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 18:46:46 +0100 <koz_> fendor: Are you talking about property testing?
2021-03-12 18:46:55 +0100 <koz_> Because that's the closest analogy I can think of to what you're describing.
2021-03-12 18:47:54 +0100 <sm[m]> I guess "forces full evaluation (before the next step in the do block)" is what I meant by sequentiality
2021-03-12 18:48:07 +0100 <sparsity> the basic problem with monadic streaming (the lack of commutativity between the monad and the applicative during traversal) can be avoided by using a "scanner" which does the mapAccumL part of traverse, ie, the State monad part, but without trying to commute this Applicative with the list monad
2021-03-12 18:48:19 +0100 <koz_> sm[m]: Yeah, in _that_ case, sure.
2021-03-12 18:48:33 +0100 <koz_> sparsity: Or you can just use pipes and never have to think about this ever again.
2021-03-12 18:48:38 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 264 seconds)
2021-03-12 18:48:39 +0100 <sparsity> ie scanners, by restricting the applicative during traversal to State, can manage to do the streaming that is impossible in monadic lists using traverse
2021-03-12 18:48:43 +0100 <koz_> (like, you're not wrong, but why make your own life harder)
2021-03-12 18:49:01 +0100 <sparsity> i would argue a scanner is orders of magnitude more somple than conduit
2021-03-12 18:49:04 +0100vavagee(~vavagee@122.172.247.204) ()
2021-03-12 18:49:04 +0100ixlun(~user@109.249.184.132) (Read error: Connection reset by peer)
2021-03-12 18:49:22 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds)
2021-03-12 18:49:42 +0100 <koz_> sparsity: Can you kindly read what I wrote? I didn't mention conduit anywhere.
2021-03-12 18:49:43 +0100 <sparsity> it also follows the cannonical formalism of the classes of the Haskell Prelude
2021-03-12 18:49:53 +0100 <koz_> sparsity: YMMV.
2021-03-12 18:49:54 +0100 <sparsity> sorry, i confuse pipes and conduit
2021-03-12 18:50:04 +0100ixlun(~user@109.249.184.132)
2021-03-12 18:50:05 +0100carlomagno(~cararell@148.87.23.12) (Remote host closed the connection)
2021-03-12 18:50:11 +0100 <koz_> I don't think I agree, and arguments from canonicity don't persuade me.
2021-03-12 18:50:17 +0100 <fendor> koz_, no, property testing does not modify the initial source-coude
2021-03-12 18:50:18 +0100 <koz_> The Prelude is not so brilliant that we should constantly ape it.
2021-03-12 18:50:20 +0100 <fendor> *code
2021-03-12 18:50:25 +0100 <koz_> fendor: Then I dunno.
2021-03-12 18:50:47 +0100 <koz_> And having to detect the condition you describe _manually_ is annoying and manual labour of exactly the kind I never want to engage in.
2021-03-12 18:50:48 +0100 <sparsity> koz_: the fundamental classes of the haskell prelude are very solid foundations
2021-03-12 18:50:57 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-03-12 18:51:00 +0100 <koz_> sparsity: You mean like Alternative, whose laws are _still_ under debate?
2021-03-12 18:51:02 +0100 <sparsity> the fact they dont extend to the monadic setting is what your discussing
2021-03-12 18:51:04 +0100 <fendor> A library I found was https://hackage.haskell.org/package/MuCheck which is old and it seems not really easy to use
2021-03-12 18:51:14 +0100 <koz_> Or MonadPlus, which only exists because of hysterical raisins now?
2021-03-12 18:51:14 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 18:51:21 +0100 <koz_> Or MonadZip which is pointlessly over-constrained?
2021-03-12 18:51:26 +0100 <sparsity> just Traverse
2021-03-12 18:51:33 +0100 <koz_> You mean Traversable?
2021-03-12 18:51:39 +0100 <sparsity> yes
2021-03-12 18:51:50 +0100 <sparsity> thats where the Applicative and the Monad which dont commute in monadic streaming occur
2021-03-12 18:52:05 +0100 <koz_> Yes, Traversable is good. No, I don't think this is a suitable solution, or any simpler.
2021-03-12 18:52:08 +0100 <koz_> YMMV.
2021-03-12 18:52:19 +0100carlomagno(~cararell@148.87.23.12)
2021-03-12 18:52:22 +0100 <koz_> You're literally asking for people to think this through _every time thye encounter it_ with no compiler assistance.
2021-03-12 18:52:29 +0100 <koz_> As opposed to 'use a library and never think about this again'.
2021-03-12 18:52:35 +0100 <sparsity> which is what is solved using a scanner, which just does the State applicative traversal for implementing MapAccumL which bares resemblance to scan, hence "scanner"
2021-03-12 18:52:38 +0100 <koz_> I find this creates pointless effort, and is needlessly a trap.
2021-03-12 18:52:47 +0100 <koz_> Again though, YMMV.
2021-03-12 18:52:56 +0100 <koz_> If you wanna create work for yourself, you do that.
2021-03-12 18:53:01 +0100 <koz_> I won't, nor will I recommend it to anyone.
2021-03-12 18:53:39 +0100vavagee_(~vavagee@122.172.247.204)
2021-03-12 18:54:07 +0100jakalx(~jakalx@base.jakalx.net)
2021-03-12 18:54:24 +0100 <sparsity> the idea is that the classes of the Haskell Prelude are *not* written for monads, eg FunctorM which has an instance for monadic lists. so you never encounter this lack of commutativity between the applicative and the monad, in the non-monadic setting
2021-03-12 18:54:38 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f)
2021-03-12 18:54:48 +0100 <sparsity> as soon as you try to traverse the monadic list, you run into the problem, and scanners become motivated
2021-03-12 18:54:57 +0100 <sparsity> its quite natural
2021-03-12 18:55:09 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 264 seconds)
2021-03-12 18:55:44 +0100 <sparsity> the only reason Scanner isnt already part of the Prelude, is beacuse it lacks these monadic variants
2021-03-12 18:55:55 +0100usr25(~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-12 18:55:56 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 18:56:12 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds)
2021-03-12 18:56:19 +0100 <sparsity> when you go to the monadic setting, Scanner appears between Functor and Traversable
2021-03-12 18:57:08 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 18:57:28 +0100 <sparsity> really, traversable is totally hampered in the monadic setting by the lack of commutativity of the applicative used in traversal, and the monad in the monadic list-like thing being traversed
2021-03-12 18:58:00 +0100 <sparsity> so that in the monadic setting scanning, or only using the State monad for Traverse, becomes a reasonable alternative
2021-03-12 18:58:22 +0100 <sparsity> the user can implement this, while they would not be able to implement TraversableM
2021-03-12 18:58:34 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 18:58:45 +0100alx741(~alx741@186.178.108.206) (Ping timeout: 264 seconds)
2021-03-12 18:58:55 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 18:59:01 +0100Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2021-03-12 18:59:09 +0100zgrep(~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) (Quit: It's a quitter's world.)
2021-03-12 18:59:18 +0100 <sparsity> scannerM :: Monad m => (s -> a -> m (b,s)) -> s -> t m a -> m (t m b,s)
2021-03-12 19:00:05 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-03-12 19:00:19 +0100 <sparsity> implementing (and understanding) one class seems much easier than contending with the whole of the Pipes or Conduit source code
2021-03-12 19:00:37 +0100zgrep(~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep)
2021-03-12 19:01:11 +0100 <sparsity> though i think obviously its more limmeted in utility, i struggle to understand how, I think perhaps it is due to branching combinators
2021-03-12 19:02:24 +0100vavagee_(~vavagee@122.172.247.204) ()
2021-03-12 19:02:38 +0100psygate(~psygate@unaffiliated/psygate)
2021-03-12 19:05:15 +0100dyeplexer(~lol@unaffiliated/terpin) (Remote host closed the connection)
2021-03-12 19:06:57 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 19:07:01 +0100 <koz_> I have foo :: [Int] and gap :: Int. Furthermore, foo is non-empty, positive and increasing. I wanna do something like this: grab first element of foo (let's call it x), then drop all subsequent elements that are smaller than (x + gap), then 'send out' x, grab the next element, and keep doing that for the whole list.
2021-03-12 19:07:17 +0100 <koz_> What's an idiomatic way of writing this without resorting to manual recursion?
2021-03-12 19:08:50 +0100 <sparsity> seems almost like a builder... folding with reconstructions functions, but including the possibility to discard values
2021-03-12 19:10:11 +0100 <sparsity> you cant use anything over Foldable for your idomaticness, since traversable is shape preserving i think
2021-03-12 19:11:03 +0100alx741(~alx741@186.178.108.206)
2021-03-12 19:11:04 +0100gentauro(~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer)
2021-03-12 19:11:56 +0100gentauro(~gentauro@unaffiliated/gentauro)
2021-03-12 19:12:02 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 19:12:11 +0100 <sparsity> i guess you could traverse using Maybe and then do catMaybes after and hope for fusion
2021-03-12 19:14:16 +0100 <sparsity> which is nice idiomatically as it allows for the use of a "carry" from traverse using State (mapAccum)
2021-03-12 19:14:26 +0100xelxebar_(~xelxebar@gateway/tor-sasl/xelxebar)
2021-03-12 19:15:41 +0100kaletaa_kaletaa
2021-03-12 19:15:50 +0100xelxebar(~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds)
2021-03-12 19:17:16 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 19:17:17 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 272 seconds)
2021-03-12 19:19:32 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 19:21:14 +0100 <monochrom> The sequence is increasing, so dropWhile is as good as filter.
2021-03-12 19:21:23 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 19:22:24 +0100 <monochrom> I think if you write the manual recursion, it is recognizable as a foldr.
2021-03-12 19:23:03 +0100 <monochrom> Err oops no.
2021-03-12 19:23:13 +0100crobbins(~crobbins@2601:2c1:200:ec50:e447:130a:d760:fb15) (Remote host closed the connection)
2021-03-12 19:23:13 +0100 <kuribas> how do you force a trace inside a monad?
2021-03-12 19:23:38 +0100hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2021-03-12 19:23:50 +0100 <monochrom> go (x:xs) = x : go (dropWhile (\y -> y < x+gap))
2021-03-12 19:23:58 +0100crobbins(~crobbins@c-73-76-34-113.hsd1.tx.comcast.net)
2021-03-12 19:24:10 +0100 <monochrom> err, go (x:xs) = x : go (dropWhile (\y -> y < x+gap) xs)
2021-03-12 19:24:24 +0100 <int-e> kuribas: do you want something like `trace "foo" (return ())`?
2021-03-12 19:24:28 +0100 <kuribas> yeah
2021-03-12 19:24:42 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-03-12 19:24:47 +0100 <monochrom> traceM
2021-03-12 19:25:11 +0100 <int-e> Oh, that exists... didn't know. In any case, monads tend to be strict in the monad operations, and then this works.
2021-03-12 19:25:20 +0100 <kuribas> ah nice
2021-03-12 19:25:25 +0100 <monochrom> traceIO, traceM, traceShowM
2021-03-12 19:25:36 +0100 <int-e> I knew about traceIO
2021-03-12 19:26:07 +0100 <monochrom> "traceM string = trace string $ pure ()" you are not missing anything except more names :)
2021-03-12 19:26:56 +0100Pickchea(~private@unaffiliated/pickchea) (Ping timeout: 256 seconds)
2021-03-12 19:26:58 +0100 <int-e> traceM is new-ish, only 7 years old
2021-03-12 19:27:57 +0100hololeap(~hololeap@unaffiliated/hololeap)
2021-03-12 19:28:41 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-03-12 19:29:01 +0100crobbins(~crobbins@c-73-76-34-113.hsd1.tx.comcast.net) (Ping timeout: 276 seconds)
2021-03-12 19:30:15 +0100gitgood(~gitgood@82-132-216-167.dab.02.net)
2021-03-12 19:30:18 +0100frozenErebus(~frozenEre@94.128.82.20)
2021-03-12 19:30:20 +0100 <int-e> traceM string = trace string $ pure () -- at least it does exactly what I proposed :)... modulo the obvious AMP change.
2021-03-12 19:31:13 +0100 <monochrom> koz_: I think manual recursion is the easiest to follow. I know how to get foldr involved for example, but it is obfuscating.
2021-03-12 19:31:30 +0100 <koz_> monochrom: OK, that makes sense. I was just wondering if I was missing something.
2021-03-12 19:31:32 +0100ADG1089__(~aditya@223.226.229.230)
2021-03-12 19:31:59 +0100 <monochrom> But dropWhile is going to simplify it a lot.
2021-03-12 19:32:07 +0100waleee-cl(uid373333@gateway/web/irccloud.com/x-ztluuxltoyaaemrx)
2021-03-12 19:32:12 +0100 <koz_> Agreed - that's a really good suggestion, thanks!
2021-03-12 19:32:29 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-03-12 19:32:48 +0100 <monochrom> "go (x:xs) = x : go (dropWhile (\y -> y < x+gap) xs)" is basically a direct transcription of your English description.
2021-03-12 19:34:07 +0100geekosaur(82650c7a@130.101.12.122)
2021-03-12 19:34:46 +0100FortuneZero(3223b878@50.35.184.120) (Quit: Connection closed)
2021-03-12 19:35:08 +0100 <kuribas> traceM "foo" is still only executed once
2021-03-12 19:37:13 +0100gitgoood(~gitgood@82-132-218-210.dab.02.net)
2021-03-12 19:38:52 +0100crobbins(~crobbins@2600:1700:48eb:8490:64e8:fb97:6b55:2a25)
2021-03-12 19:39:42 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 19:39:56 +0100gitgood(~gitgood@82-132-216-167.dab.02.net) (Read error: Connection reset by peer)
2021-03-12 19:40:03 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 19:40:10 +0100DTZUZU(~DTZUZO@205.ip-149-56-132.net) (Quit: WeeChat 3.1)
2021-03-12 19:41:14 +0100 <hyiltiz> Anyone else enjoyed playing https://wwwf.imperial.ac.uk/~buzzard/xena/natural_number_game?
2021-03-12 19:42:30 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 19:44:57 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
2021-03-12 19:44:58 +0100psygate(~psygate@unaffiliated/psygate) (Read error: Connection reset by peer)
2021-03-12 19:46:16 +0100mirrorbird(dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Quit: Leaving)
2021-03-12 19:46:36 +0100jamm_(~jamm@unaffiliated/jamm)
2021-03-12 19:47:40 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Read error: Connection reset by peer)
2021-03-12 19:48:59 +0100DTZUZU(~DTZUZO@205.ip-149-56-132.net)
2021-03-12 19:50:21 +0100elfets(~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
2021-03-12 19:51:02 +0100jamm_(~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
2021-03-12 19:51:20 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-03-12 19:51:39 +0100kuribas(~user@ptr-25vy0iacnrjbfn1sihk.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2021-03-12 19:53:27 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 19:54:43 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 19:54:43 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f)
2021-03-12 19:55:02 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 19:55:55 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 19:56:15 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 20:00:19 +0100dunj4(~dunj3@p200300f61714a678d85584dd45edd0a4.dip0.t-ipconnect.de)
2021-03-12 20:00:35 +0100dunj4(~dunj3@p200300f61714a678d85584dd45edd0a4.dip0.t-ipconnect.de) (Client Quit)
2021-03-12 20:01:50 +0100nbloomf(~nbloomf@2600:1700:ad14:3020:948b:9d7e:1b3d:4c5c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 20:02:07 +0100pavonia(~user@unaffiliated/siracusa)
2021-03-12 20:03:02 +0100dunj3(~dunj3@p200300f61714a62572ae6a6bffb9249a.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 20:03:29 +0100berberman_(~berberman@unaffiliated/berberman)
2021-03-12 20:03:38 +0100berberman(~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds)
2021-03-12 20:04:50 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com) (Read error: Connection reset by peer)
2021-03-12 20:05:10 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 20:05:53 +0100Solid(~blyat@unaffiliated/solid-)
2021-03-12 20:06:02 +0100Kaiepi(~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds)
2021-03-12 20:07:34 +0100nbloomf(~nbloomf@76.217.43.73)
2021-03-12 20:07:42 +0100Kaiepi(~Kaiepi@47.54.252.148)
2021-03-12 20:08:21 +0100 <Solid> so I entered `1 = 2` in ghci and pressed enter and ghci was like "okay sure"
2021-03-12 20:08:38 +0100 <Solid> afaik functions can't start with a number, so what's happening here?
2021-03-12 20:08:54 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 20:09:21 +0100nyaomi(~naomi@2603-7080-c43e-59ad-c878-29ff-fedf-ce89.res6.spectrum.com)
2021-03-12 20:09:37 +0100 <monochrom> You're looking at the more general: <pattern> = <expr>
2021-03-12 20:10:04 +0100 <monochrom> For example "(x,y) = (3,'x')" is OK.
2021-03-12 20:10:15 +0100 <monochrom> For example "Just x = Just 3" is OK.
2021-03-12 20:10:41 +0100 <Solid> a single number can be part of a pattern? :o
2021-03-12 20:10:53 +0100 <Solid> s/part of//
2021-03-12 20:10:59 +0100 <geekosaur> but something like 1 = 2 is never tested, since it has no bindings
2021-03-12 20:11:11 +0100 <monochrom> Now add laziness. "<pattern> = <expr>" doesn't do the necessary pattern matching right away. So "Nothing = Just 3" and "Just x = Nothing" are also OK.
2021-03-12 20:11:45 +0100 <monochrom> And lastly, number literals and string literals are also patterns.
2021-03-12 20:11:56 +0100 <Solid> oooooh that makes sense
2021-03-12 20:11:58 +0100 <Solid> thanks :)
2021-03-12 20:12:05 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-03-12 20:12:19 +0100 <Solid> indeed, let !1 = 2 in 1 makes it blow up
2021-03-12 20:12:27 +0100 <monochrom> :)
2021-03-12 20:12:36 +0100average(uid473595@gateway/web/irccloud.com/x-ccphdwzehpjwbayw) (Quit: Connection closed for inactivity)
2021-03-12 20:13:13 +0100 <hololeap> what is the point of WrappedMonad. is that from before Applicative was a superclass of Monad?
2021-03-12 20:14:55 +0100 <monochrom> Looks like so.
2021-03-12 20:15:10 +0100 <monochrom> And carrying MonadPlus to Alternative
2021-03-12 20:15:17 +0100nyaomi(~naomi@2603-7080-c43e-59ad-c878-29ff-fedf-ce89.res6.spectrum.com) (Ping timeout: 260 seconds)
2021-03-12 20:15:24 +0100 <hololeap> i'm trying to find some kind of wrapper that gives a Monad a Bind instance, but i'm not seeing one here
2021-03-12 20:15:26 +0100 <hololeap> https://hackage.haskell.org/package/semigroupoids-5.1/docs/Data-Functor-Bind.html
2021-03-12 20:16:43 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-03-12 20:19:39 +0100 <hololeap> oh, nvm, it's literally using the thing i just asked about, Control.Applicative.WrappedMonad :p
2021-03-12 20:19:59 +0100 <hololeap> funky business
2021-03-12 20:22:06 +0100Khisanth(~Khisanth@24.sub-174-244-147.myvzw.com)
2021-03-12 20:22:48 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
2021-03-12 20:25:30 +0100jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Quit: WeeChat 3.0.1)
2021-03-12 20:26:31 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds)
2021-03-12 20:26:39 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection)
2021-03-12 20:27:43 +0100notzmv(~zmv@unaffiliated/zmv)
2021-03-12 20:28:07 +0100knupfer(~Thunderbi@200116b82c668700c9527be50386a639.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2021-03-12 20:29:29 +0100tromp(~tromp@dhcp-077-249-230-040.chello.nl)
2021-03-12 20:31:24 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 20:31:44 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 20:33:42 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-03-12 20:33:45 +0100Solid(~blyat@unaffiliated/solid-) ("WeeChat 3.1")
2021-03-12 20:33:48 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 245 seconds)
2021-03-12 20:34:37 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 20:35:28 +0100coot(~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl)
2021-03-12 20:36:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds)
2021-03-12 20:36:38 +0100Tops2(~Tobias@dyndsl-095-033-024-175.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2021-03-12 20:37:58 +0100stree(~stree@68.36.8.116) (Ping timeout: 245 seconds)
2021-03-12 20:44:46 +0100 <hololeap> which is considered the best style? `(\f -> bar . f) . foo` or `(bar .) . foo` or `fmap bar . foo`
2021-03-12 20:46:44 +0100 <hololeap> it's kind of funny because they go in order from most visual overhead to least, but also in order from least mental overhead to most
2021-03-12 20:48:05 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 20:48:57 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 20:49:06 +0100ixlun(~user@109.249.184.132) (Read error: Connection reset by peer)
2021-03-12 20:50:01 +0100ixlun(~user@109.249.184.132)
2021-03-12 20:50:19 +0100 <monochrom> Depends on the audience? Someone who's crazy about homset functors will love "fmap bar . foo", but how many people are like that?
2021-03-12 20:50:19 +0100crobbins(~crobbins@2600:1700:48eb:8490:64e8:fb97:6b55:2a25) (Remote host closed the connection)
2021-03-12 20:50:23 +0100stree(~stree@68.36.8.116)
2021-03-12 20:51:34 +0100 <ephemient> isn't this the same as \x -> bar . foo x? that expression makes more sense to me than any of the previous 3
2021-03-12 20:51:51 +0100 <monochrom> Yeah.
2021-03-12 20:52:03 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 20:52:07 +0100kayvan(~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection)
2021-03-12 20:52:19 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 20:52:52 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds)
2021-03-12 20:53:44 +0100 <hololeap> ok, well my example should have been `(\f -> bar . f) . foo . baz`
2021-03-12 20:54:39 +0100 <hololeap> IRL: runFilters = (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold
2021-03-12 20:55:09 +0100Guest64155(~textual@zrcout.mskcc.org) (Ping timeout: 264 seconds)
2021-03-12 20:56:07 +0100knupfer(~Thunderbi@200116b82c66870055c2ea10e2e0e610.dip.versatel-1u1.de)
2021-03-12 20:56:15 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2021-03-12 20:56:15 +0100 <hololeap> runKleisli is the only thing that takes an argument (Kleisli m a) and returns a function
2021-03-12 20:56:28 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
2021-03-12 20:57:58 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 245 seconds)
2021-03-12 20:58:04 +0100 <hololeap> i'll just go with the first option for least mental overhead
2021-03-12 20:58:59 +0100 <monochrom> How bad is \x y -> runMT (runK (getE (fold x))) y ?
2021-03-12 20:59:03 +0100Kaiepi(~Kaiepi@47.54.252.148) (Remote host closed the connection)
2021-03-12 20:59:14 +0100geekosaur(82650c7a@130.101.12.122)
2021-03-12 20:59:32 +0100 <monochrom> or \x y -> runMT ((runK . getE . fold) x) y
2021-03-12 21:00:07 +0100crobbins(~crobbins@2601:2c1:200:ec50:2da1:91bc:2113:a3e2)
2021-03-12 21:00:09 +0100average(uid473595@gateway/web/irccloud.com/x-syihsbtugiothwsv)
2021-03-12 21:00:47 +0100 <monochrom> See this is why people don't understand me when I say "I don't use (.) for pointfree, I use it for pipeline structure, and pointfree is so much more than (.) anyway"
2021-03-12 21:01:20 +0100 <monochrom> So they set up a strawman attack "so you write like \x -> (f . g) x?" to ridicule me.
2021-03-12 21:01:59 +0100 <monochrom> No, but I may write like \x y -> runMT ((runK . getE . fold) x) y or (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold
2021-03-12 21:02:17 +0100 <monochrom> I am not your strawman.
2021-03-12 21:02:21 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 21:02:35 +0100 <hololeap> i hope that's not directed at me
2021-03-12 21:02:54 +0100 <monochrom> Not you. Their nickname starts with "c".
2021-03-12 21:03:03 +0100 <hololeap> haha alright.
2021-03-12 21:04:36 +0100 <hololeap> monochrom: but you're right that it could also be written that way
2021-03-12 21:04:47 +0100 <sparsity> https://pastebin.com/raw/RmF5RnYq
2021-03-12 21:05:02 +0100ep1ctetus_(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer)
2021-03-12 21:05:03 +0100petersen(~petersen@redhat/juhp) (Ping timeout: 245 seconds)
2021-03-12 21:05:44 +0100gitgooodgitgood
2021-03-12 21:05:45 +0100 <hololeap> if i had started out with the type signature i probably would have written it that way
2021-03-12 21:05:58 +0100 <monochrom> :)
2021-03-12 21:06:08 +0100 <monochrom> I think your version shows interesting piping too.
2021-03-12 21:06:24 +0100 <monochrom> It's up to you. Both are explaining something.
2021-03-12 21:06:45 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net)
2021-03-12 21:07:15 +0100petersen(~petersen@redhat/juhp)
2021-03-12 21:07:56 +0100 <sparsity> im trying to convert the above code to a monadic streaming version, with ((Int,Int),) as the monad... not sure if it will work
2021-03-12 21:08:22 +0100frozenErebus(~frozenEre@94.128.82.20) (Ping timeout: 256 seconds)
2021-03-12 21:08:47 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 21:08:57 +0100 <sparsity> appearing at; instance Nonempty f => Shaped (Int,Int) (Zipper (Tree f)) where
2021-03-12 21:13:26 +0100 <hololeap> sparsity: which monad for ((Int,Int),) ?
2021-03-12 21:13:28 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
2021-03-12 21:13:52 +0100 <hololeap> @unmtl Writer (Int,Int) a
2021-03-12 21:13:52 +0100 <lambdabot> (a, Int, Int)
2021-03-12 21:14:03 +0100 <hololeap> but Writer needs a Monoid
2021-03-12 21:15:42 +0100 <sparsity> I just mean that instead of obtaining eg. (IO a,ListM IO a) on doing monadic uncons on an IO List, which is monadic (IO), here geti returns (((Int,Int),a),Tree f a), so instead of `IO a' its ((Int,Int),a)
2021-03-12 21:16:56 +0100Deide(~Deide@217.155.19.23)
2021-03-12 21:17:31 +0100 <sparsity> ie. capturing "shaped" traversals within monadic traversals
2021-03-12 21:18:01 +0100 <sparsity> not sure if ListT actually needs its parameter to be Monadic...
2021-03-12 21:19:33 +0100 <hololeap> not gonna lie, i find the code you pasted very confusing. but you might be looking for LogicT instead of ListT ... ?
2021-03-12 21:20:12 +0100 <sparsity> the ListT i mean is defined here; https://github.com/fog-hs/clock-scanner/blob/master/ListT.hs
2021-03-12 21:20:46 +0100 <sparsity> it isnt used in the paste above
2021-03-12 21:21:13 +0100 <sparsity> that just uses ((Int,Int),) directly via the Shaped class instance for Tree
2021-03-12 21:21:49 +0100ep1ctetus(~epictetus@ip72-194-215-136.sb.sd.cox.net) (Quit: Leaving)
2021-03-12 21:22:06 +0100 <sparsity> but I wonder if i can capture that in the LinearM framework of implemented by ListT above
2021-03-12 21:22:46 +0100 <sparsity> so that just as I can have streaming in IO, i could instead have the shape index as the context
2021-03-12 21:23:31 +0100Alleria(~textual@2603-7000-3040-0000-b05d-e0a9-84ee-9eef.res6.spectrum.com)
2021-03-12 21:23:47 +0100 <sparsity> so that streaming over the tree is possible, where the "shape" is stored in this wrapper to the `a' retrived at the head (which is `m a' when using ListT m)
2021-03-12 21:23:54 +0100AlleriaGuest48052
2021-03-12 21:25:05 +0100 <sparsity> getM :: Monad m => StateM m (f m a) a
2021-03-12 21:25:44 +0100 <sparsity> type StateM m s a = s -> m (Maybe (a, s))
2021-03-12 21:26:21 +0100 <sparsity> comparing with the type of geti gives m~(,) i
2021-03-12 21:27:24 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 21:29:27 +0100pera(~pera@unaffiliated/pera)
2021-03-12 21:30:35 +0100 <sparsity> seems almost like setting m as a State monad, with the shape index `i' as the state
2021-03-12 21:31:42 +0100 <sparsity> the resulting carry during traversal is provided with these indexes, eg so that a carried copy can be updated and used to replace the values to give the comonad
2021-03-12 21:32:07 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 21:32:17 +0100 <sparsity> (since State during traverse gives mapAccum which has the carry)
2021-03-12 21:32:21 +0100arrowsvc_(~arr@2.93.163.35) (Ping timeout: 264 seconds)
2021-03-12 21:32:26 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Ping timeout: 264 seconds)
2021-03-12 21:33:40 +0100 <hololeap> sparsity: many people need to nail things down to a concrete example (like, why would i ever use this) before they can get a mental model of the problem
2021-03-12 21:33:42 +0100geekosaur(82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-03-12 21:34:19 +0100 <sparsity> the idea is that the comonad for a pointer should be immidiate from an implementation of Shaped, ie writing geti and seti
2021-03-12 21:34:27 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
2021-03-12 21:34:36 +0100 <hololeap> but why would i ever use this?
2021-03-12 21:34:39 +0100 <sparsity> it extends over get and set, as generics for pattern matching cons
2021-03-12 21:34:57 +0100 <sparsity> oh, you need the comonad for doing convolutions among other things
2021-03-12 21:35:46 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 21:36:01 +0100 <sparsity> the pointer is set up as a zipper on a tree, the nested thing from the comonad is the pointer where each value in the container is a copy of the whole container with pointer to that value
2021-03-12 21:36:12 +0100 <hololeap> why are you going to use it? is it purely theoretical or are you trying to create something will actually be used?
2021-03-12 21:36:28 +0100 <sparsity> convolutions are ubiquitous in scientific computing
2021-03-12 21:36:49 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck)
2021-03-12 21:36:51 +0100 <sparsity> eg for covnets or finite difference schemes for fluid solvers
2021-03-12 21:37:09 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it)
2021-03-12 21:37:23 +0100 <sparsity> i want convolutions on graphs for implementing message passing algorithms
2021-03-12 21:37:54 +0100 <sparsity> but have trouble syntactically explicating cyclic references
2021-03-12 21:38:08 +0100 <hololeap> ok, that's still way over my head, but thanks for pinning it down. i'm sure that will help others help you
2021-03-12 21:38:18 +0100 <sparsity> cheers
2021-03-12 21:38:51 +0100 <dmj`> Had a haskell interview today, only question I asked was, "what's wrong with this code: avg xs = sum xs / length xs"
2021-03-12 21:39:20 +0100 <koz_> dmj`: That it traverses the list twice or something?
2021-03-12 21:39:33 +0100 <Uniaika> dmj`: it's not a weighted sum
2021-03-12 21:39:34 +0100 <Uniaika> :P
2021-03-12 21:39:40 +0100 <dmj`> koz_: that's one of a few things yes, can you spot more problems?
2021-03-12 21:39:50 +0100 <koz_> dmj`: Yeah, it's monomorphic to Int.
2021-03-12 21:39:56 +0100 <Uniaika> maybe the now-former laziness of sum?
2021-03-12 21:39:58 +0100 <koz_> (which means it will probably not give the answer you think)
2021-03-12 21:40:10 +0100 <dmj`> koz_: yes, needs a fromIntegral in there on the call to length
2021-03-12 21:40:17 +0100 <dmj`> nice
2021-03-12 21:40:25 +0100 <koz_> Even with that, it's _still_ not really poly enough.
2021-03-12 21:40:39 +0100 <dmj`> koz_: just assume it's [Double] -> Double
2021-03-12 21:40:42 +0100geekosaur(82650c7a@130.101.12.122)
2021-03-12 21:40:43 +0100 <koz_> Since now you're fixed to (Integral a) => a which is probably _still_ not gonna give you the answer you think.
2021-03-12 21:41:02 +0100 <koz_> If it's [Double] -> Double, you're fuxxored by IEEE754.
2021-03-12 21:41:06 +0100 <dmj`> koz_: (/) ensures its not Integral
2021-03-12 21:41:09 +0100 <koz_> Because floats are special.
2021-03-12 21:41:28 +0100 <dmj`> koz_: ok tell me what the heap looks like
2021-03-12 21:41:38 +0100ubert1(~Thunderbi@p200300ecdf25d9cae6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2021-03-12 21:41:39 +0100 <koz_> dmj`: That's outside of my realm of knowledge.
2021-03-12 21:41:40 +0100 <Uniaika> yeah I think it should have been 'sum' xs `div` length xs' ?
2021-03-12 21:41:50 +0100 <koz_> Haskell perf is something I don't know enough about.
2021-03-12 21:41:57 +0100 <koz_> Uniaika: That's wrong answer territory.
2021-03-12 21:42:22 +0100 <Uniaika> dangit
2021-03-12 21:42:23 +0100 <dmj`> koz_: that's very common I'd say
2021-03-12 21:42:36 +0100 <dmj`> koz_: this code, believe it or not, causes heap exhaustion for sufficiently large xs
2021-03-12 21:42:37 +0100 <koz_> dmj`: Yeah, fair enough, it's not straightforward.
2021-03-12 21:42:46 +0100 <koz_> dmj`: Is it due to laziness of sum?
2021-03-12 21:42:48 +0100 <dmj`> koz_: well it shows me a deeper understanding
2021-03-12 21:43:09 +0100 <dmj`> koz_: no, not entirely, you were right about the double pass over xs, but what does that mean from the heap's perspective?
2021-03-12 21:43:21 +0100 <koz_> dmj`: Yeah, that's absolutely fair. I'm just being honest about waht I do or don't know.
2021-03-12 21:43:25 +0100 <koz_> And in this case, I don't know.
2021-03-12 21:43:31 +0100Uniaikais pretty relieved they didn't interview with dmj`
2021-03-12 21:43:34 +0100 <koz_> I would avoid it just for the double-pass reasons if nothing else.
2021-03-12 21:43:52 +0100 <hololeap> dmj`: it holds the entire list in memory because it is going to pass over it twice?
2021-03-12 21:43:54 +0100 <geekosaur> xs is kept live through the whole computation instead of being consumed as it goes along
2021-03-12 21:43:58 +0100 <dmj`> koz_: the call to length forces the entire spine of the list in memory
2021-03-12 21:44:01 +0100 <dmj`> hololeap: now we're talking
2021-03-12 21:44:07 +0100 <koz_> Ah, I see.
2021-03-12 21:44:09 +0100 <dmj`> geekosaur: bingo
2021-03-12 21:44:11 +0100 <koz_> TIL.
2021-03-12 21:44:34 +0100 <dmj`> koz_: there is one final problem with the code, along with lack of `fromIntegral`, lack of a type signature, heap exhaustion
2021-03-12 21:44:50 +0100 <dmj`> koz_: can you spot it
2021-03-12 21:44:51 +0100 <koz_> dmj`: OK, what's that?
2021-03-12 21:44:53 +0100 <koz_> No.
2021-03-12 21:45:04 +0100 <dmj`> koz_: what is length [] ?
2021-03-12 21:45:12 +0100 <koz_> Ah, lol.
2021-03-12 21:45:15 +0100 <dmj`> division by zero
2021-03-12 21:45:17 +0100 <koz_> Nice one, should have spotted that.
2021-03-12 21:45:33 +0100 <dmj`> Uniaika: just because someone doesn't spot all of it doesn't mean they're disqualified
2021-03-12 21:46:04 +0100 <hololeap> dmj`: good job. that's pretty clever.
2021-03-12 21:46:11 +0100 <dmj`> But it shows that you've some familiarity with Haskell's convoluted Numerical hierarchy, you have some knowledge of laziness, the heap and call by need. You have a keen eye for exceptions.
2021-03-12 21:46:24 +0100 <dmj`> hololeap: thanks :)
2021-03-12 21:46:42 +0100 <hololeap> it deceives with its apparent simplicity
2021-03-12 21:46:44 +0100 <Uniaika> dmj`: I don't know man, I'm just a junior web developer :P
2021-03-12 21:46:45 +0100 <dmj`> Also, I didn't make this up ! It's the final chapter of Real World Haskell :P that apparently nobody read :)
2021-03-12 21:46:55 +0100Uniaikagoes back to making this goddamn webapp
2021-03-12 21:47:11 +0100 <dmj`> hololeap: yes ! 99% of the time Haskell people resort to a strict eval way of thinking, but this is one of those 1%'ers of the time you can't do that, and you get punished.
2021-03-12 21:47:48 +0100 <Gurkenglas> Aha! The counterexample to the lub library I wanted to construct yesterday relied on an imagined rewrite rule "fix f `lub` fix g ~> fix (f `lub` g)", which rewrite rule would increase definedness. Just undefined `lub` fix (fmap (const ())) is Just hangs, but fix (const (Just undefined) `lub` fmap (const ())) is Just ().
2021-03-12 21:47:52 +0100 <dmj`> hololeap: avg xs = uncurry (/) $ foldl (\(sum',len') n -> (sum' + n, len' + 1)) (0,0) xs
2021-03-12 21:48:02 +0100 <dmj`> it's the difference between 98% time spent in GC and 0% in GC
2021-03-12 21:48:37 +0100knupfer(~Thunderbi@200116b82c66870055c2ea10e2e0e610.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2021-03-12 21:48:51 +0100 <hololeap> wouldn't foldl' be better there?
2021-03-12 21:49:17 +0100 <Uniaika> on arbitrary Foldables, no, but on lists yes
2021-03-12 21:49:38 +0100 <dmj`> hololeap: you'd need more becuase foldl' will force the tuple to WHNF and won't stop thunk build up within the accumulators
2021-03-12 21:50:06 +0100 <dmj`> hololeap: I did +RTS -s -RTS on both, and GHC is able to optimize it away somehow such that you only need foldl and no bang patterns (when compiling with -O2)
2021-03-12 21:50:15 +0100 <hololeap> hm ok makes sense
2021-03-12 21:50:21 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 264 seconds)
2021-03-12 21:50:44 +0100 <dmj`> hololeap: that's another classic space leak, storing a boxed tuple in an IORef, modifying it strictly but still allowing for thunk build up
2021-03-12 21:50:54 +0100 <dmj`> of the values inside the tuple
2021-03-12 21:51:10 +0100 <dmj`> That's why a strict data type is better data StrictTuple a b = StrictTuple !a !b
2021-03-12 21:51:12 +0100jess(jess@freenode/staff/jess) (Remote host closed the connection)
2021-03-12 21:51:19 +0100 <dmj`> then you don't have to worry about bangs
2021-03-12 21:51:40 +0100j(jess@freenode/staff/jess)
2021-03-12 21:52:16 +0100 <dmj`> During the naive avg there ends up being nothing to GC but the rapid allocations force the GC to run anyways. The GC threshold is hit, it goes back to allocating, more GC w/o collecting, until heap exhaustion
2021-03-12 21:52:34 +0100crobbins(~crobbins@2601:2c1:200:ec50:2da1:91bc:2113:a3e2) (Remote host closed the connection)
2021-03-12 21:53:13 +0100crobbins(~crobbins@2601:2c1:200:ec50:c8cd:d394:be82:ebad)
2021-03-12 21:54:59 +0100danvet(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
2021-03-12 21:55:16 +0100j(jess@freenode/staff/jess) (Quit: K-Lined)
2021-03-12 21:55:36 +0100Lycurgus(~niemand@98.4.114.199)
2021-03-12 21:57:15 +0100aarvar(~foewfoiew@2601:602:a080:fa0:6cfb:c91f:3c9a:a8cb)
2021-03-12 21:57:51 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 21:58:00 +0100Alleria_(~AllahuAkb@2603-7000-3040-0000-49c8-a343-3d41-8b5a.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com)
2021-03-12 21:58:34 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 21:58:45 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 264 seconds)
2021-03-12 21:58:55 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 21:59:49 +0100Mrbuck(~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1)
2021-03-12 22:00:44 +0100 <dmj`> whatever happened to the haskellers of yore
2021-03-12 22:01:05 +0100 <geekosaur> hired, mostly :)
2021-03-12 22:01:10 +0100Pickchea(~private@unaffiliated/pickchea)
2021-03-12 22:01:52 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 22:02:10 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:03:12 +0100_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-03-12 22:03:33 +0100michaelh(~user@ip-109-42-114-163.web.vodafone.de) (Ping timeout: 264 seconds)
2021-03-12 22:03:57 +0100Alleria_(~AllahuAkb@2603-7000-3040-0000-258c-2a70-8204-6956.res6.spectrum.com)
2021-03-12 22:04:13 +0100tomku(~tomku@unaffiliated/tomku) (Quit: Lost terminal)
2021-03-12 22:04:19 +0100jonathanx(~jonathan@h-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2021-03-12 22:04:57 +0100borne(~fritjof@2a06:8782:ffbb:1337:e811:68d9:a46:a27f) (Ping timeout: 260 seconds)
2021-03-12 22:06:19 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 276 seconds)
2021-03-12 22:06:54 +0100borne(~fritjof@200116b86456970065fd8eaafdc5f06e.dip.versatel-1u1.de)
2021-03-12 22:07:32 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 22:07:52 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:08:23 +0100fendor_(~fendor@178.115.131.242.wireless.dyn.drei.com)
2021-03-12 22:10:48 +0100fendor(~fendor@77.119.131.133.wireless.dyn.drei.com) (Ping timeout: 246 seconds)
2021-03-12 22:10:57 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 22:11:55 +0100Lycurgus(~niemand@98.4.114.199) (Quit: Exeunt)
2021-03-12 22:13:07 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-12 22:14:26 +0100atktak
2021-03-12 22:14:31 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 22:14:50 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:15:17 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 22:15:26 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe)
2021-03-12 22:15:29 +0100 <dmj`> geekosaur: that or rust ;)
2021-03-12 22:15:48 +0100 <dmj`> or professional JIRA ticket managers
2021-03-12 22:15:48 +0100ixlun(~user@109.249.184.132) (Ping timeout: 256 seconds)
2021-03-12 22:15:49 +0100Nahra(~Nahra@unaffiliated/nahra)
2021-03-12 22:16:48 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 22:18:50 +0100redmp(~redmp@172.58.35.49)
2021-03-12 22:18:57 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 22:19:05 +0100tomku(~tomku@unaffiliated/tomku)
2021-03-12 22:19:16 +0100ixlun(~user@109.249.184.132)
2021-03-12 22:19:29 +0100geekosaur(82650c7a@130.101.12.122) (Quit: Connection closed)
2021-03-12 22:19:43 +0100__minoru__shirae(~shiraeesh@109.166.56.60)
2021-03-12 22:21:14 +0100howdoi(uid224@gateway/web/irccloud.com/x-fbxhtxpvbmlflnip)
2021-03-12 22:21:39 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
2021-03-12 22:22:14 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection)
2021-03-12 22:23:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 22:23:37 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:24:13 +0100ixlun(~user@109.249.184.132) (Ping timeout: 245 seconds)
2021-03-12 22:25:45 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe) (Ping timeout: 264 seconds)
2021-03-12 22:26:26 +0100xff0x(~xff0x@2001:1a81:520c:1100:b717:e343:40b1:857a) (Ping timeout: 264 seconds)
2021-03-12 22:27:15 +0100xff0x(~xff0x@2001:1a81:520c:1100:e227:e5f8:bb4c:3b9b)
2021-03-12 22:28:16 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
2021-03-12 22:28:21 +0100ixlun(~user@109.249.184.132)
2021-03-12 22:31:03 +0100rj(~x@gateway/tor-sasl/rj) (Remote host closed the connection)
2021-03-12 22:31:13 +0100ADG1089__(~aditya@223.226.229.230) (Remote host closed the connection)
2021-03-12 22:31:25 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 22:32:56 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947)
2021-03-12 22:33:37 +0100ixlun(~user@109.249.184.132) (Ping timeout: 276 seconds)
2021-03-12 22:35:17 +0100kam1(~kam1@83.123.154.198)
2021-03-12 22:35:52 +0100kam1(~kam1@83.123.154.198) (Read error: Connection reset by peer)
2021-03-12 22:36:23 +0100dsrt^(dsrt@ip98-184-89-2.mc.at.cox.net) ()
2021-03-12 22:37:26 +0100ixlun(~user@109.249.184.132)
2021-03-12 22:38:02 +0100joebobjoe(~joebobjoe@unaffiliated/joebobjoe)
2021-03-12 22:38:11 +0100 <sparsity> I was wanting to discuss Sum Trees
2021-03-12 22:38:42 +0100Nahra(~Nahra@unaffiliated/nahra) (Quit: leaving)
2021-03-12 22:38:43 +0100 <sparsity> these can be introduced as indexes over Trees
2021-03-12 22:39:37 +0100 <wz1000> dmj`: wouldn't your solution involving foldl also leak? even though the function is strict, its result is never forced. You have to use foldl' still
2021-03-12 22:39:47 +0100kiweun(~kiweun@2607:fea8:2a62:9600:b401:41f7:a4d0:94d7)
2021-03-12 22:41:10 +0100 <wz1000> oh, you are relying on the magic of the demand analyser
2021-03-12 22:41:10 +0100xff0x(~xff0x@2001:1a81:520c:1100:e227:e5f8:bb4c:3b9b) (Remote host closed the connection)
2021-03-12 22:41:17 +0100 <sparsity> and extending Trees to higher dimensional Trees of Hinz, by having n dimensional trees as branches to n+1 dimensional trees, again their Sum versions can be used as indexes
2021-03-12 22:41:20 +0100 <wz1000> but you can trip it up often though
2021-03-12 22:41:28 +0100xff0x(~xff0x@2001:1a81:520c:1100:a1d8:2af1:7428:6b99)
2021-03-12 22:41:43 +0100 <wz1000> using a simple condition so the result of the foldl isn't always guaranteed to be evaluated
2021-03-12 22:41:49 +0100redmp_(~redmp@172.58.30.247)
2021-03-12 22:43:11 +0100 <sparsity> eg Int as an index over list is a choice between *lists* of () of different lengths, equivalent to the Sum choice of one of the values
2021-03-12 22:43:18 +0100 <dmj`> wz1000: It should yea, but when compiling with -O2 it doesn't seem to be a problem for some reason. But I'd tend to agree.
2021-03-12 22:43:36 +0100heatsink(~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection)
2021-03-12 22:44:14 +0100 <dmj`> @def avg = \xs -> uncurry (/) $ foldl' (\(!x,!y) n -> (x + n, y + 1)) (0,0) xs
2021-03-12 22:44:16 +0100 <lambdabot> Defined.
2021-03-12 22:44:24 +0100 <dmj`> > avg [0..1e6]
2021-03-12 22:44:27 +0100 <lambdabot> 500000.0
2021-03-12 22:44:45 +0100redmp(~redmp@172.58.35.49) (Ping timeout: 246 seconds)
2021-03-12 22:45:16 +0100bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds)
2021-03-12 22:45:18 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:45:27 +0100Franciman(~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving)
2021-03-12 22:45:57 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 22:46:17 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:46:29 +0100blueonyx(b9d4ab4b@unaffiliated/blueonyx)
2021-03-12 22:46:43 +0100 <dmj`> wz1000: going to try foldl w/o optimizations
2021-03-12 22:46:50 +0100 <dmj`> see if I can oom
2021-03-12 22:47:21 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-03-12 22:47:55 +0100ixlun(~user@109.249.184.132) (Ping timeout: 276 seconds)
2021-03-12 22:47:56 +0100 <wz1000> dmj`: if you replace `uncurry (/)` with a function that doesn't always strictly eval the tuple, no level of optimisation will get ghc to fix it
2021-03-12 22:48:55 +0100 <wz1000> I'm pretty sure even with `uncurry (/)` it won't work if the function isn't monomorphic and GHC doesn't/can't specialise
2021-03-12 22:49:43 +0100 <wz1000> So try defining a polymorphic version in module A with {-# NOINLINE #-} and then using it in module B, and it will OOM
2021-03-12 22:50:08 +0100 <wz1000> In my haskell interview I was asked what the problem with this bit of code was: `f (xs :: [Int]) = sum . filter (==1) <$> traverse (\x -> if cond then Just x else Nothing) xs`
2021-03-12 22:52:08 +0100alx741(~alx741@186.178.108.206) (Ping timeout: 245 seconds)
2021-03-12 22:52:52 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
2021-03-12 22:53:44 +0100 <blueonyx> hi, i'm learning lenses to use with aeson. so i was wondering if there is a more consise/pointfree version for f in https://friendpaste.com/1JmADDcGOj7hEn7CtCwbXl?
2021-03-12 22:53:46 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-12 22:54:00 +0100 <sm[m]> wz1000: dang, that's work for computers
2021-03-12 22:54:05 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:55:07 +0100 <dmj`> wz1000: ah yea, because GHC only optimizes on a per module basis
2021-03-12 22:55:11 +0100 <wz1000> sm[m]: how so? It compiles, and it seems to work
2021-03-12 22:55:16 +0100 <dmj`> wz1000: that's cool, will try
2021-03-12 22:55:33 +0100 <wz1000> sm[m]: I can't think of a computer smart enough to solve it
2021-03-12 22:55:49 +0100 <sm[m]> wz1000: really, then I'll have to study it more
2021-03-12 22:56:24 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Max SendQ exceeded)
2021-03-12 22:56:43 +0100royal_screwup21(52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-12 22:57:08 +0100monadmatt(~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 245 seconds)
2021-03-12 22:58:06 +0100 <wz1000> sm[m]: the intent of the code was to check if every element in a list satisfies a condition, and if so return a Just <number of 1s in the list>, else return Nothing
2021-03-12 22:58:23 +0100 <wz1000> the problem was to figure out why this is not optimal
2021-03-12 22:58:34 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 22:58:37 +0100usr25(~usr25@unaffiliated/usr25)
2021-03-12 22:58:56 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 22:58:58 +0100stree(~stree@68.36.8.116) (Ping timeout: 276 seconds)
2021-03-12 23:00:24 +0100 <Gurkenglas> > (let f ~(Just x) = Just () in fix f, let g (Just x) = Just () in fix g) -- neat
2021-03-12 23:00:27 +0100 <lambdabot> (Just (),*Exception: <<loop>>
2021-03-12 23:00:48 +0100 <infinisil> Is there something like `class RecLimitShow a where recLimitShow :: Int -> a -> String` with a default for `Generic a`, which works like `show`, but it only recurses into the structure as deep as the given Int?
2021-03-12 23:01:24 +0100 <dolio> f = const (Just ())
2021-03-12 23:01:28 +0100Varis(~Tadas@unaffiliated/varis) (Remote host closed the connection)
2021-03-12 23:01:32 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 23:01:39 +0100 <infinisil> This could e.g. then print an infinite list to a limited depth
2021-03-12 23:01:52 +0100 <Gurkenglas> hmm youre right maybe ill come up with a better example
2021-03-12 23:02:29 +0100 <sparsity> infinisil: Foldable?
2021-03-12 23:03:04 +0100 <sparsity> recLimitShow :: Foldable f => Int -> f a -> String
2021-03-12 23:03:06 +0100 <infinisil> This should also work for e.g. records and sum types
2021-03-12 23:03:17 +0100 <sparsity> erg
2021-03-12 23:03:49 +0100 <sparsity> well, i would just define your "generic" structure as basically a tree, and then deconstruct those
2021-03-12 23:04:40 +0100 <infinisil> That's basically what Generics allow you to do, and I think I could implement this
2021-03-12 23:04:45 +0100 <sparsity> https://gist.github.com/fog-hs/19abbf2ee8cf1f9f0c39abf0772da34e
2021-03-12 23:04:48 +0100 <infinisil> But I don't want to implement it if it already exists :)
2021-03-12 23:04:51 +0100 <sparsity> thats an implementation of it
2021-03-12 23:05:03 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 23:05:21 +0100 <sparsity> it doesnt have the Traversable that your after though. yet, i suppose...
2021-03-12 23:05:36 +0100 <Gurkenglas> > both . _Just %~ take 3 $ (let f ~(Just x) = Just $ ():x in fix f, let g (Just x) = Just (():x) in fix g)
2021-03-12 23:05:38 +0100 <lambdabot> (Just [(),(),()],*Exception: <<loop>>
2021-03-12 23:05:47 +0100 <infinisil> sparsity: That doesn't really look like what I'm after at all?
2021-03-12 23:06:00 +0100 <infinisil> Maybe I just don't get it
2021-03-12 23:06:06 +0100 <sparsity> well its an implementation of Datatype using Lists and Sums...
2021-03-12 23:06:23 +0100 <sparsity> so you should be able to traverse over it like you want
2021-03-12 23:06:32 +0100 <sparsity> i just havent written that
2021-03-12 23:06:33 +0100alx741(~alx741@181.196.69.27)
2021-03-12 23:07:06 +0100 <sparsity> not sure about translating to it from Generics either...
2021-03-12 23:07:39 +0100 <sparsity> its nice that its extensible though
2021-03-12 23:08:09 +0100 <infinisil> Well, I'm looking for something that works with Generics, and that has the recursive thing implemented
2021-03-12 23:08:18 +0100 <Gurkenglas> or "f ~(Just x) = Just x", thats less baggage around the neat thing, though it would have ended the print early
2021-03-12 23:08:19 +0100 <infinisil> So I guess that's not really it :P
2021-03-12 23:08:42 +0100 <infinisil> sparsity: Going through a different Tree type also seems like an unnecessary indirection
2021-03-12 23:09:00 +0100 <sparsity> i think there is probably a complete implementation of it in the Vinyl package
2021-03-12 23:09:20 +0100 <sparsity> sum of products done right...
2021-03-12 23:09:38 +0100CrazyPython(~crazypyth@98.122.164.118) (Remote host closed the connection)
2021-03-12 23:09:38 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 245 seconds)
2021-03-12 23:09:39 +0100nbloomf(~nbloomf@76.217.43.73) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-12 23:10:00 +0100 <sparsity> oh, the tree thing is totally fundamental to its traversability to some depth - everything is isomorphic to these Sum Product trees
2021-03-12 23:10:18 +0100CrazyPython(~crazypyth@98.122.164.118)
2021-03-12 23:10:20 +0100 <sparsity> thats the whole point of generics
2021-03-12 23:10:57 +0100 <sparsity> but you can write it as an actual datatype as above, instead of using generics you just use that instead of datatypes
2021-03-12 23:11:36 +0100stree(~stree@68.36.8.116)
2021-03-12 23:11:36 +0100 <infinisil> That sounds way more complicated than I think it has to be..
2021-03-12 23:11:43 +0100 <monochrom> dmj`: I'm late to the party. I think that "sum xs / length xs" has a type error, probably two type errors actually. Then again after fixing the type errors, everything you and other said is true too.
2021-03-12 23:12:15 +0100 <infinisil> sparsity: I have like 100 data types from third-party libraries I want to use with this, I can't just switch them all to extensible records just to make this work
2021-03-12 23:12:20 +0100 <sparsity> well its not really, you would have to basically use generics to translate it into that kind of structure for traversing over anyway
2021-03-12 23:12:37 +0100 <sparsity> infinisil: ah, ok
2021-03-12 23:12:50 +0100 <monochrom> I do use this to explain to my students fromIntegral and realToFrac.
2021-03-12 23:13:14 +0100 <infinisil> sparsity: I don't think so, I think a Generic implementation of this could just recurse with a function call to show the subfields
2021-03-12 23:13:51 +0100 <infinisil> Essentially deriving Show, but with an integer that gets passed down and decreased at every level, resulting it "..." if it's 0 without further recursion
2021-03-12 23:14:08 +0100Techcable(~Techcable@168.235.93.147) (Quit: ZNC - https://znc.in)
2021-03-12 23:14:44 +0100CrazyPython(~crazypyth@98.122.164.118) (Ping timeout: 256 seconds)
2021-03-12 23:15:02 +0100ericsagnes(~ericsagne@2405:6580:0:5100:ff67:b2c7:65c7:54f0) (Ping timeout: 264 seconds)
2021-03-12 23:15:22 +0100 <sparsity> all of these nestings are isomorphic to trees, its just a big datatype'esque tree thing, and thats what the code above does, the only problem is translating to it and using it, i think if you just want a library you can use, it might be worth looking at Vinyl
2021-03-12 23:15:59 +0100 <infinisil> Yeah no I don't think that's what I want
2021-03-12 23:16:10 +0100 <dmj`> monochrom: yes, the (/) :: Fractional a => a -> a -> a doesn't mix well with the `Int` returned by `sum`, necessitating `fromIntegral`. I'd view the lack of a type signature altogether as another problem to be pointed out.
2021-03-12 23:16:23 +0100 <sparsity> surely lenses must have generic traversals
2021-03-12 23:16:31 +0100conal_(~conal@64.71.133.70) (Ping timeout: 276 seconds)
2021-03-12 23:16:31 +0100 <dmj`> monochrom: it's a good juicy question, seemingly innocuous code heap exhausts
2021-03-12 23:17:01 +0100Techcable(~Techcable@168.235.93.147)
2021-03-12 23:17:08 +0100cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2021-03-12 23:17:09 +0100justan0theruserjustanotheruser
2021-03-12 23:17:51 +0100 <sparsity> im not sure you can do it *without* translating to an extensible datatype.... unless Generics gives this traversable directly, which im not sure it does
2021-03-12 23:17:53 +0100ericsagnes(~ericsagne@2405:6580:0:5100:1715:de72:a1c7:dcd1)
2021-03-12 23:18:59 +0100 <sparsity> vinyl should probably have a way to spin something up from a derived Generic
2021-03-12 23:19:14 +0100spoonm(~spoonm@tokyo.spoonm.org) (Ping timeout: 246 seconds)
2021-03-12 23:19:19 +0100 <sparsity> and then you should be able to traverse over it
2021-03-12 23:19:55 +0100 <monochrom> infinisil: I think you have to roll your own. But you can copy someone else's code and modify it. http://hackage.haskell.org/package/generic-deriving has code using Generics to reinvent Show. You can steal that code and add your depth parameter.
2021-03-12 23:20:06 +0100hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 246 seconds)
2021-03-12 23:20:09 +0100conal(~conal@184.170.243.131)
2021-03-12 23:20:59 +0100 <infinisil> Ah that sounds promising
2021-03-12 23:23:27 +0100Pickchea(~private@unaffiliated/pickchea) (Quit: Leaving)
2021-03-12 23:23:27 +0100CrazyPython(~crazypyth@98.122.164.118)
2021-03-12 23:26:37 +0100sparsity(5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) (Quit: Connection closed)
2021-03-12 23:27:49 +0100Narinas(~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
2021-03-12 23:27:49 +0100 <dmj`> monochrom: interesting to note too, I don't believe the entire list is actually forced onto the heap during the call to (/), just the spine from length. Each cons cell progressively gets forced to a Double (when pattern-matched in sum), added, and then GC'd after the next recursive call. So if someone said, "The entire list is present on the heap" I'd say that might not be entirely accurate.
2021-03-12 23:28:08 +0100Narinas(~Narinas@187-178-93-112.dynamic.axtel.net)
2021-03-12 23:28:47 +0100 <monochrom> Right.
2021-03-12 23:29:22 +0100CrazyPython(~crazypyth@98.122.164.118) (Remote host closed the connection)
2021-03-12 23:29:34 +0100ericsagn1(~ericsagne@2405:6580:0:5100:985d:1221:bd5b:d5dd)
2021-03-12 23:29:57 +0100 <Gurkenglas> Can I make an irrefutable pattern match with a custom error?
2021-03-12 23:30:37 +0100ericsagnes(~ericsagne@2405:6580:0:5100:1715:de72:a1c7:dcd1) (Ping timeout: 272 seconds)
2021-03-12 23:32:49 +0100 <wz1000> dmj`: I was finally able to defeat the demand analyser using `f = foldl (\ (!x,!y) n -> (x + n, y + 1)) (0,0); avg = uncurry (/) . f`
2021-03-12 23:33:00 +0100 <wz1000> no amount of optimisation could fix that
2021-03-12 23:33:29 +0100 <wz1000> inlining the f doesn't sort of arcane magic I haven't been able to figure out
2021-03-12 23:33:34 +0100 <wz1000> *does
2021-03-12 23:33:40 +0100 <dmj`> wz1000: this ooms?
2021-03-12 23:33:43 +0100 <wz1000> yes
2021-03-12 23:33:56 +0100cfvnhtsp^(cfvnhtsp@ip98-184-89-2.mc.at.cox.net)
2021-03-12 23:34:21 +0100 <monochrom> That's very strange.
2021-03-12 23:35:10 +0100 <Gurkenglas> mwahaha when your line starts with "let ~(Left l)=x; ~(Right r)=x;"
2021-03-12 23:35:15 +0100 <dmj`> wz1000: are you positive, can you check your code and ensure it's ooming w/ the bangs present
2021-03-12 23:35:22 +0100 <wz1000> dmj`: yes
2021-03-12 23:36:13 +0100 <wz1000> dmj`: only if you call avg from another module though
2021-03-12 23:36:37 +0100 <monochrom> Is this []'s foldl?
2021-03-12 23:36:44 +0100 <wz1000> Or you can use {-# NOINLINE avg #-}
2021-03-12 23:36:46 +0100 <wz1000> yes
2021-03-12 23:36:46 +0100 <dmj`> wz1000: ah, okay. Can you confirm that foldl' still OOMs it?
2021-03-12 23:37:21 +0100 <wz1000> dmj`: no OOM with foldl'
2021-03-12 23:37:51 +0100spoonm(~spoonm@tokyo.spoonm.org)
2021-03-12 23:38:05 +0100redmp_(~redmp@172.58.30.247) (Quit: leaving)
2021-03-12 23:38:21 +0100 <dmj`> That doesn't really make too much sense to me tbh then. The foldl vs. foldl' shouldn't really matter as long as you're strictly pattern matching on the tuple and forcing the Double inside. The foldl' is just going to force the tuple to WHNF and that's not where the thunk accumulation is happening anyways (rather its inside the tuple).
2021-03-12 23:38:26 +0100 <monochrom> Oh nevermind, s/foldl/foldl'/ is O(1) space, foldl is meant to be linear space.
2021-03-12 23:38:26 +0100 <monochrom> foldl op z (x:xs) = foldl (op z x) xs see how it doesn't even care how strict op is.
2021-03-12 23:38:51 +0100 <wz1000> yeah
2021-03-12 23:39:12 +0100 <wz1000> but the demand analyser is able to figure it out and rewrite it to foldl' if you inline f
2021-03-12 23:39:13 +0100 <monochrom> But if you can get f to inline, probably some rewrite rule changes foldl to something else entirely.
2021-03-12 23:39:38 +0100 <Gurkenglas> Aww only one @ per pattern?
2021-03-12 23:39:58 +0100 <dmj`> wz1000: how do you explain the oom if you're banging the Doubles, what's not getting forced?
2021-03-12 23:40:06 +0100 <Gurkenglas> I wanted to write x@~(Left l)@~(Right r) but it only works without the x@
2021-03-12 23:40:22 +0100 <wz1000> dmj`: the result of the lambda is not getting forced
2021-03-12 23:40:53 +0100myShoggoth(~myShoggot@75.164.81.55) (Ping timeout: 245 seconds)
2021-03-12 23:40:56 +0100 <dmj`> wz1000: ah, I see. That makes sense. Sweet.
2021-03-12 23:41:00 +0100Psybur(~user@unaffiliated/psybur) (Remote host closed the connection)
2021-03-12 23:41:04 +0100 <monochrom> :)
2021-03-12 23:41:16 +0100 <wz1000> dmj`: this is also why foldl (+) leaks
2021-03-12 23:41:25 +0100 <wz1000> since (+) is also strict
2021-03-12 23:41:31 +0100 <wz1000> like your lambda
2021-03-12 23:41:47 +0100myShoggoth(~myShoggot@75.164.81.55)
2021-03-12 23:41:48 +0100 <wz1000> so the strictness of the function doesn't matter
2021-03-12 23:43:56 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com)
2021-03-12 23:44:00 +0100 <shapr> Hm, looks like debian/buster has libffi7 but not libffi6, so ghcup doesn't install ghc for me
2021-03-12 23:44:12 +0100 <dmj`> so the foldl' is ensuring in this case the result of the lambda is being forced during the fold's recursion, otherwise the expression just builds up. The tuple has to be forced.
2021-03-12 23:44:42 +0100rj(~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds)
2021-03-12 23:45:24 +0100 <wz1000> monochrom: I'm pretty sure its not a rewrite rule, -ddump-rule-rewrites shows nothing interesting: http://78.47.113.11/rules
2021-03-12 23:45:32 +0100 <wz1000> it is the demand analyser
2021-03-12 23:45:45 +0100 <wz1000> since uncurry is strict in its second argument
2021-03-12 23:45:48 +0100 <wz1000> I think
2021-03-12 23:46:15 +0100 <dmj`> @src uncurry
2021-03-12 23:46:15 +0100 <lambdabot> uncurry f p = f (fst p) (snd p)
2021-03-12 23:46:21 +0100 <wz1000> oh, its not
2021-03-12 23:47:01 +0100 <wz1000> some other magic going on
2021-03-12 23:47:06 +0100 <wz1000> I still don't understand this
2021-03-12 23:47:08 +0100jespada(~jespada@90.254.243.187) (Ping timeout: 245 seconds)
2021-03-12 23:47:33 +0100 <wz1000> yes, `uncurry' f ~(a,b) = f a b` still doesn't oom if f is inlined
2021-03-12 23:48:22 +0100rj(~x@gateway/tor-sasl/rj)
2021-03-12 23:49:09 +0100dbmikus(~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 264 seconds)
2021-03-12 23:50:03 +0100 <Gurkenglas> Has anyone proven that for x less defined than y, every finest-grained sequence of steps to make x as defined as y has the same length?
2021-03-12 23:50:43 +0100CrazyPython(~crazypyth@98.122.164.118)
2021-03-12 23:50:53 +0100jespada(~jespada@90.254.243.187)
2021-03-12 23:51:01 +0100 <wz1000> as usual, GHC is simulataneously smarter and dumber than I expect
2021-03-12 23:52:19 +0100 <monochrom> Can x be made as defined as y at all?
2021-03-12 23:52:34 +0100 <wz1000> maybe this would be easier to understand if I learned how to read the demand signatures
2021-03-12 23:52:51 +0100 <monochrom> More meta-ly I'm afraid the question mixes up denotational semantics and operational semantics.
2021-03-12 23:52:59 +0100 <Gurkenglas> monochrom, what i mean is that every finest-grained chain of values, each of which is more defined than the last, with the same start and end has the same length
2021-03-12 23:54:00 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net)
2021-03-12 23:54:06 +0100wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-03-12 23:54:10 +0100 <monochrom> "() : bottom" can be refined to "() : []" but also to "() : () : () : []". They have different heights.
2021-03-12 23:54:29 +0100 <Gurkenglas> yea but ():[] is not the same as ():():():[]
2021-03-12 23:54:49 +0100 <Gurkenglas> (bottom,bottom) can be made into ((),()) in two ways, both of length 2
2021-03-12 23:55:14 +0100 <monochrom> If you know ():bottom is detined to be only () : () : () : [], then there is only one chain.
2021-03-12 23:55:23 +0100 <monochrom> Oh, that.
2021-03-12 23:56:12 +0100 <Gurkenglas> no, there's one through ():bottom:():[] and one through ():():bottom:[]
2021-03-12 23:56:49 +0100 <monochrom> Yeah sorry.
2021-03-12 23:57:00 +0100fendor_(~fendor@178.115.131.242.wireless.dyn.drei.com) (Remote host closed the connection)
2021-03-12 23:58:25 +0100j(jess@freenode/staff/jess)
2021-03-12 23:58:34 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
2021-03-12 23:58:46 +0100ezrakilty(~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds)
2021-03-12 23:58:56 +0100zebrag(~inkbottle@aaubervilliers-654-1-101-29.w86-212.abo.wanadoo.fr)
2021-03-12 23:58:57 +0100 <monochrom> ooooo interesting, I'm sure it's true, but I have no idea how to prove it