2021/10/18

2021-10-18 00:06:28 +0200hololeap_hololeap
2021-10-18 00:08:10 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
2021-10-18 00:13:23 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 00:18:23 +0200 <zzz> /quit
2021-10-18 00:18:45 +0200 <geekosaur> nope
2021-10-18 00:19:55 +0200 <hpc> [sudo] Password for zzz:
2021-10-18 00:20:08 +0200 <zzz> Hunter2
2021-10-18 00:20:17 +0200 <hpc> :D
2021-10-18 00:21:59 +0200 <int-e> those are some nice stars
2021-10-18 00:24:04 +0200boxscape_(~boxscape_@p54a3581e.dip0.t-ipconnect.de) (Quit: Connection closed)
2021-10-18 00:24:10 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2021-10-18 00:24:35 +0200dme2_(~dme2@67.205.140.199) (Ping timeout: 250 seconds)
2021-10-18 00:27:24 +0200Guest3676(~Guest36@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-10-18 00:28:13 +0200 <Guest3676> why is `maybe [] fromJust :: Maybe (Maybe [a]) -> [a]` instead of `Maybe [a] -> [a]` ?
2021-10-18 00:28:38 +0200 <Rembane> :t fromJust
2021-10-18 00:28:39 +0200 <lambdabot> Maybe a -> a
2021-10-18 00:28:40 +0200 <Rembane> :t maybe
2021-10-18 00:28:41 +0200 <lambdabot> b -> (a -> b) -> Maybe a -> b
2021-10-18 00:29:40 +0200 <Guest3676> oh I see now you already get a before you apply the function *facepalm*
2021-10-18 00:29:47 +0200 <Rembane> :)
2021-10-18 00:31:46 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
2021-10-18 00:32:00 +0200 <d34df00d> awpr: in my particular case I was playing around with Generic-based derivation of json serialization (yep, aeson does that too, but my use case wasn't covered by it).
2021-10-18 00:32:40 +0200 <d34df00d> So I needed that field purely as a tag, like msgType :: Literal "successMessage" in one ctor and msgType :: Literal "failure" in another.
2021-10-18 00:32:57 +0200 <zzz> :t maybe [] id
2021-10-18 00:32:58 +0200 <lambdabot> Maybe [a] -> [a]
2021-10-18 00:33:03 +0200 <d34df00d> It has a single dataless constructor (that only carries around a KnownSymbol constraint for the literal), so ti's almost isomorphic to ()
2021-10-18 00:33:04 +0200 <awpr> oh, right, things based on Generic would care about the field name
2021-10-18 00:33:30 +0200 <geekosaur> :t fromMaybe []
2021-10-18 00:33:32 +0200 <lambdabot> Maybe [a] -> [a]
2021-10-18 00:33:42 +0200 <awpr> I suppose you could bake some naming convention into the set of instances and strip off parts of the name
2021-10-18 00:34:13 +0200 <d34df00d> Yea, I already started thinking about suffixing the field name with the ctor name after a tick and dropping everything after a tick when (de)serializing.
2021-10-18 00:34:20 +0200 <d34df00d> But that looks ugly.
2021-10-18 00:34:25 +0200 <zzz> geekosaur: i always hated fromMaybe (and even more so fromJust)
2021-10-18 00:34:26 +0200 <d34df00d> Hence my original question :)
2021-10-18 00:34:42 +0200 <geekosaur> fromMaybe is fine. fromJust not so much
2021-10-18 00:34:56 +0200 <zzz> geekosaur: it seems so unnecessary
2021-10-18 00:35:17 +0200 <zzz> also
2021-10-18 00:35:25 +0200 <awpr> sounds like a plausible feature request for multi-typed fields to be allowed with NoFieldSelectors and no OverloadedRecordFields
2021-10-18 00:35:50 +0200 <zzz> > (length "fromMaybe", length "maybe id")
2021-10-18 00:35:52 +0200 <lambdabot> (9,8)
2021-10-18 00:36:04 +0200 <Rembane> fromJust has its uses and places, but I only use it when I want things to crash.
2021-10-18 00:37:17 +0200 <geekosaur> I care less about length than clarity. fromMaybe makes it clear I only want to provide a default. maybe sugests I want to alter the Just case as well, then all I supply for that is id?
2021-10-18 00:37:33 +0200 <zzz> yes
2021-10-18 00:37:51 +0200 <zzz> but that's me
2021-10-18 00:37:58 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection)
2021-10-18 00:38:18 +0200 <zzz> i have used folds for maps
2021-10-18 00:38:27 +0200corne(~corne@80.71.142.65.ipv4.parknet.dk)
2021-10-18 00:38:33 +0200 <zzz> and for that i got no good excuse
2021-10-18 00:38:35 +0200 <d34df00d> That's fine until you start using maps for folds.
2021-10-18 00:40:55 +0200 <corne> anyone else unable to download GHC on windows? https://downloads.haskell.org/~ghc/8.10.7/ghc-8.10.7-x86_64-unknown-mingw32.tar.xz just fails for me after a while (curl exits with status 56)
2021-10-18 00:40:57 +0200 <monochrom> I like clarity, but I also ask "how many functions do I want to remember?"
2021-10-18 00:41:34 +0200 <Rembane> Three! S, K and I!
2021-10-18 00:41:35 +0200Rembaneducks
2021-10-18 00:42:57 +0200 <corne> it might just be my firewall, just got a new router. don't know why i'd block GHC downloads though
2021-10-18 00:42:59 +0200 <monochrom> Unpopular opinion: fromJust (m <|> pure a)
2021-10-18 00:43:25 +0200 <geekosaur> Rembane: only two of which are required :þ
2021-10-18 00:43:33 +0200mestre(~mestre@191.177.175.57) (Quit: Lost terminal)
2021-10-18 00:44:22 +0200 <Rembane> geekosaur: Yeah, the third one I use because I like luxury! :)
2021-10-18 00:45:30 +0200 <geekosaur> corne, there's a migration going on at the moment, don't know if it affects those downloads
2021-10-18 00:46:14 +0200 <geekosaur> you could ask in #haskell-infrastructure
2021-10-18 00:46:19 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 00:46:33 +0200 <corne> thanks, i'll try
2021-10-18 00:46:49 +0200 <monochrom> I have finished downloading it successfully.
2021-10-18 00:49:00 +0200 <zzz> Rembane: and you don't really need I
2021-10-18 00:49:42 +0200 <zzz> oh sorry
2021-10-18 00:49:44 +0200 <Rembane> zzz: :D
2021-10-18 00:49:52 +0200 <zzz> too late
2021-10-18 00:50:09 +0200 <Rembane> zzz: I thought for a while there that you had found a way to only use one combinator of the three. :)
2021-10-18 00:50:39 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds)
2021-10-18 00:50:40 +0200mestre(~mestre@191.177.175.57)
2021-10-18 00:51:40 +0200corne_(~corne@87-49-44-159-mobile.dk.customer.tdc.net)
2021-10-18 00:52:18 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-10-18 00:55:35 +0200corne(~corne@80.71.142.65.ipv4.parknet.dk) (Ping timeout: 264 seconds)
2021-10-18 00:59:23 +0200corne__(~corne@80.71.142.65.ipv4.parknet.dk)
2021-10-18 00:59:53 +0200 <corne__> wow i think it was my firewall. tried on another network and it worked. thanks for the help :)
2021-10-18 00:59:54 +0200Merfont(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 01:00:08 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-18 01:01:35 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-18 01:02:32 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-18 01:03:13 +0200corne_(~corne@87-49-44-159-mobile.dk.customer.tdc.net) (Ping timeout: 252 seconds)
2021-10-18 01:03:28 +0200fluffyballoon(~user@131.93.208.196)
2021-10-18 01:05:27 +0200mestre(~mestre@191.177.175.57) (Quit: Lost terminal)
2021-10-18 01:11:04 +0200corne__(~corne@80.71.142.65.ipv4.parknet.dk) (Quit: Leaving)
2021-10-18 01:21:03 +0200poljar(~poljar@93-139-113-226.adsl.net.t-com.hr) (Remote host closed the connection)
2021-10-18 01:21:05 +0200poljar1(~poljar@93-139-113-226.adsl.net.t-com.hr)
2021-10-18 01:21:57 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 01:22:08 +0200Nosrep(~archbox@user/nosrep) (Quit: WeeChat 3.3)
2021-10-18 01:22:27 +0200Merfont(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 01:28:55 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 01:31:25 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 260 seconds)
2021-10-18 01:35:26 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 01:36:17 +0200alx741(~alx741@186.178.108.68) (Ping timeout: 268 seconds)
2021-10-18 01:38:34 +0200machinedgod(~machinedg@24.105.81.50)
2021-10-18 01:38:36 +0200alx741(~alx741@186.178.108.68)
2021-10-18 01:44:18 +0200acidjnk_new(~acidjnk@p200300d0c703cb97b093ae7a86818c94.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2021-10-18 01:49:32 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-18 01:49:55 +0200poljar(~poljar@93-139-113-226.adsl.net.t-com.hr)
2021-10-18 01:50:10 +0200Kaipi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 01:52:40 +0200fluffyballoon(~user@131.93.208.196) (Ping timeout: 252 seconds)
2021-10-18 01:52:42 +0200poljar1(~poljar@93-139-113-226.adsl.net.t-com.hr) (Ping timeout: 265 seconds)
2021-10-18 01:55:26 +0200dsrt^(~dsrt@70.166.66.234) (Remote host closed the connection)
2021-10-18 01:58:14 +0200Merfont(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 01:59:33 +0200son0p(~ff@181.136.122.143)
2021-10-18 02:02:11 +0200alx741(~alx741@186.178.108.68) (Ping timeout: 264 seconds)
2021-10-18 02:03:40 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-10-18 02:08:31 +0200zebrag(~chris@user/zebrag) (Remote host closed the connection)
2021-10-18 02:08:48 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 02:10:39 +0200Kaiepi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 02:10:56 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 02:11:53 +0200zebrag(~chris@user/zebrag)
2021-10-18 02:16:09 +0200alx741(~alx741@186.178.108.68)
2021-10-18 02:16:25 +0200fluffyballoon(~user@131.93.208.196)
2021-10-18 02:17:06 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 02:17:26 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 02:20:04 +0200fernand(~fernand@179.156.35.4) (Ping timeout: 268 seconds)
2021-10-18 02:20:06 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 245 seconds)
2021-10-18 02:20:52 +0200Skyfire(~pyon@user/pyon) (Quit: WeeChat 3.3)
2021-10-18 02:26:06 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 02:26:27 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 02:27:47 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 02:27:48 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 02:27:48 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 02:31:00 +0200 <tcard> juhp: FYI: I am getting an nginx 504 Gateway Time-out when visiting www.stackage.org
2021-10-18 02:34:06 +0200 <Guest3676> how can I print Scientific as 1.2E+10 instead of 1.2e10 ? can pretty printing libraries handle things like this?
2021-10-18 02:34:20 +0200 <Axman6> does formatting support that?
2021-10-18 02:34:40 +0200 <Axman6> if not, I'm sure you could convince wrunt to add it...
2021-10-18 02:34:53 +0200hiruji`(~hiruji@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 264 seconds)
2021-10-18 02:35:20 +0200 <Guest3676> well I skimmed https://hackage.haskell.org/package/scientific-0.3.7.0/docs/Data-Scientific.html#g:8
2021-10-18 02:35:35 +0200 <Guest3676> and no it's not very extensive
2021-10-18 02:35:41 +0200 <Guest3676> wrunt ? :o
2021-10-18 02:36:53 +0200 <geekosaur> sounds like you could build it with toDecimalDigits
2021-10-18 02:38:26 +0200hiruji(~hiruji@user/hiruji)
2021-10-18 02:39:43 +0200 <Guest3676> Axman6: no wait there is https://hackage.haskell.org/package/formatting-7.1.1/docs/Formatting-Formatters.html#v:sci
2021-10-18 02:40:01 +0200 <Axman6> not sur eI can see it in https://hackage.haskell.org/package/formatting-7.1.3/docs/Formatting-Formatters.html#g:2 but it definitely sounds like something that would fit into that library
2021-10-18 02:43:10 +0200renzhi(~xp@2607:fa49:6500:b100::5845) (Ping timeout: 260 seconds)
2021-10-18 02:44:14 +0200caef^(~caef@70.166.66.234)
2021-10-18 02:44:41 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 02:44:45 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 02:47:58 +0200Kaipi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 02:48:07 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 02:55:53 +0200renzhi(~xp@2607:fa49:6500:b100::6e7f)
2021-10-18 02:58:05 +0200tektik(~said@68.33.69.0) (Leaving)
2021-10-18 03:01:29 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 03:01:30 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-18 03:03:26 +0200Skyfire(~pyon@user/pyon)
2021-10-18 03:08:06 +0200jacks2(~bc8165b6@217.29.117.252)
2021-10-18 03:08:11 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds)
2021-10-18 03:08:15 +0200Merfont(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 03:08:18 +0200 <jacks2> hi. is there already a function like this?
2021-10-18 03:08:24 +0200 <jacks2> > foldr (<|>) Nothing [Nothing, Just 10, Just 20]
2021-10-18 03:08:26 +0200 <lambdabot> Just 10
2021-10-18 03:08:28 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-18 03:09:26 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2021-10-18 03:09:47 +0200 <davean> msum
2021-10-18 03:09:56 +0200Guest3676(~Guest36@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
2021-10-18 03:09:57 +0200 <jacks2> > msum Nothing [Nothing, Just 10, Just 20]
2021-10-18 03:09:59 +0200 <lambdabot> error:
2021-10-18 03:09:59 +0200 <lambdabot> • No instance for (MonadPlus ((->) [Maybe Integer]))
2021-10-18 03:09:59 +0200 <lambdabot> arising from a use of ‘msum’
2021-10-18 03:10:02 +0200 <jacks2> > msum [Nothing, Just 10, Just 20]
2021-10-18 03:10:04 +0200 <lambdabot> Just 10
2021-10-18 03:10:06 +0200 <jacks2> nice
2021-10-18 03:10:15 +0200 <davean> asum is more general
2021-10-18 03:10:20 +0200 <jacks2> :t asum
2021-10-18 03:10:22 +0200 <lambdabot> (Foldable t, Alternative f) => t (f a) -> f a
2021-10-18 03:10:38 +0200 <davean> For some reson I was thinking monadic there
2021-10-18 03:10:39 +0200 <jacks2> :t msum
2021-10-18 03:10:40 +0200 <lambdabot> (Foldable t, MonadPlus m) => t (m a) -> m a
2021-10-18 03:10:41 +0200 <davean> and its just asum
2021-10-18 03:10:50 +0200 <jacks2> which one is more general?
2021-10-18 03:11:00 +0200 <davean> asum
2021-10-18 03:11:08 +0200 <jacks2> okay
2021-10-18 03:11:20 +0200 <davean> They're the same code, just different constraints
2021-10-18 03:11:34 +0200 <davean> MonadPlus implies Alternative
2021-10-18 03:11:42 +0200zaquest(~notzaques@5.128.210.178) (Remote host closed the connection)
2021-10-18 03:11:42 +0200 <jacks2> yes I understand. a bit like liftA2 vs liftM?
2021-10-18 03:11:43 +0200 <davean> so theres no reason to have a Monad constraint
2021-10-18 03:11:48 +0200 <davean> yes
2021-10-18 03:12:45 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2021-10-18 03:13:01 +0200zaquest(~notzaques@5.128.210.178)
2021-10-18 03:13:51 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2021-10-18 03:13:52 +0200 <jacks2> unfortunately asum isn't in prelude, and msum is
2021-10-18 03:14:04 +0200gentauro(~gentauro@user/gentauro) (Ping timeout: 252 seconds)
2021-10-18 03:14:22 +0200 <jacks2> or maybe I imported msum somewhere
2021-10-18 03:14:29 +0200 <davean> Data.Foldable
2021-10-18 03:14:49 +0200 <jacks2> I know, but if msum is in prelude it is more convenient to use it than asum
2021-10-18 03:15:16 +0200 <jacks2> oh my mistake, msum isn't in prelude either
2021-10-18 03:15:22 +0200 <davean> You do you. Thats never how I'd pick functions but its not my code
2021-10-18 03:22:58 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
2021-10-18 03:25:50 +0200gentauro(~gentauro@user/gentauro)
2021-10-18 03:28:10 +0200Axman6agrees with davean
2021-10-18 03:28:24 +0200abarbu(~user@c-66-31-23-28.hsd1.ma.comcast.net)
2021-10-18 03:28:54 +0200 <Axman6> jacks2: asum is exactly the function you werre asking for, msum happens to also do the same thing for Maybe, but in general MonadPlus and Alternative are not the same thing
2021-10-18 03:29:50 +0200 <dsal> I use asum for exception handling when I feel like a cowboy.
2021-10-18 03:29:50 +0200 <jacks2> Axman6, davean, you'd import additional header just to call asum, even though you get the same result, and even if the type difference didn't show up in your function signature?
2021-10-18 03:30:23 +0200xff0x(~xff0x@2001:1a81:52c3:e900:6f99:de0e:9a06:26db) (Ping timeout: 264 seconds)
2021-10-18 03:30:26 +0200 <dsal> jacks2: I import `fold` when `concat` would work because I don't like `concat`
2021-10-18 03:31:12 +0200xff0x(~xff0x@2001:1a81:52c3:e900:c99c:9c9c:56dc:ad93)
2021-10-18 03:31:14 +0200 <dsal> Yeah, I'm using asum in a bunch of projects, but not msum.
2021-10-18 03:31:30 +0200 <jacks2> what's the advantage? there's disadvantage, additional import, and cryptic error message if you get something wrong
2021-10-18 03:32:20 +0200 <dsal> I carry fewer abstractions in my head and apply them to more things.
2021-10-18 03:32:38 +0200 <davean> jacks2: absolutely I'd import it
2021-10-18 03:33:16 +0200 <abarbu> In nix, how do I provide additional build inputs to haskell-nix.stackProject? It errors our if I provide buildInputs = [..]
2021-10-18 03:33:55 +0200 <dsal> abarbu: In stack.yaml, it's just : `nix: packages: [zlib]` (since I can't write any code that doesn't use zlib)
2021-10-18 03:34:28 +0200fluffyballoon(~user@131.93.208.196) (Remote host closed the connection)
2021-10-18 03:35:41 +0200 <abarbu> dsal: That would be awesome! Except that you can't specify packages if you specify a custom shell.nix :(
2021-10-18 03:42:18 +0200Merfont(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 03:43:03 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 03:43:09 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 03:47:42 +0200fryguybob(~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Remote host closed the connection)
2021-10-18 03:48:15 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 268 seconds)
2021-10-18 03:50:47 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-18 03:51:39 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6)
2021-10-18 03:57:34 +0200xff0x(~xff0x@2001:1a81:52c3:e900:c99c:9c9c:56dc:ad93) (Ping timeout: 252 seconds)
2021-10-18 03:57:59 +0200emf(~emf@2620:10d:c090:400::5:35f6) (Ping timeout: 264 seconds)
2021-10-18 03:59:06 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 03:59:22 +0200xff0x(~xff0x@2001:1a81:52fe:af00:73f9:c60:e593:d5a0)
2021-10-18 03:59:26 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 03:59:42 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 04:00:13 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection)
2021-10-18 04:00:25 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 04:00:36 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2021-10-18 04:01:02 +0200alx741(~alx741@186.178.108.68) (Quit: alx741)
2021-10-18 04:02:48 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2021-10-18 04:04:42 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-18 04:05:11 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds)
2021-10-18 04:05:43 +0200 <dsal> abarbu: Oh, I've got some with a custom shell.nix as well, but I don't do that as often.
2021-10-18 04:10:01 +0200 <dsal> I don't know nix that well, though, so I'm not entirely sure we're speaking the same language. I've got a project with `pkgs.haskell.lib.buildStackProject` which has a `buildInputs` section that look pretty normal.
2021-10-18 04:10:40 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2021-10-18 04:11:30 +0200 <abarbu> dsal: Ah, that uses the nixpkgs infrastructure. I'm using haskell.nix the other setup. There you do nixpkgs.haskell-nix.stackProject instead
2021-10-18 04:12:06 +0200 <dsal> Ah. I use haskell.nix in most of mine, but not via nix shell. So many options.
2021-10-18 04:12:14 +0200 <abarbu> Too many!
2021-10-18 04:13:34 +0200 <dsal> I'm on an M1 mac, so I also have two different processors. lts-18.13 has a slightly older version of `network` which doesn't build natively on my machine. stack seems to use its own architecture to determine what architecture to build for (which kind of makes sense).
2021-10-18 04:13:35 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 264 seconds)
2021-10-18 04:15:23 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-18 04:15:51 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2021-10-18 04:17:13 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2021-10-18 04:24:02 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 04:24:02 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 04:24:02 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 04:27:24 +0200brainfreeze(~brainfree@2a03:1b20:4:f011::20d) (Quit: Leaving)
2021-10-18 04:32:28 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 04:33:10 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-10-18 04:33:42 +0200Kaiepi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 04:33:50 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 04:36:48 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 04:36:55 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 260 seconds)
2021-10-18 04:37:06 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 04:39:26 +0200 <Axman6> jacks2: yes, I would. Control.Applicative is in base so it's always available - Prelude is just one, slightly special module in base
2021-10-18 04:41:26 +0200 <Axman6> jacks2: I don't understand your comment about "cryptic error messages", why would they be any different to the ones you get when importing msum and using?
2021-10-18 04:42:27 +0200 <Axman6> limiting yourself to what's available in relude is going to lead to very painful and/or boring programs. Wait until you hear about libraries :\
2021-10-18 04:45:23 +0200td_(~td@94.134.91.73) (Ping timeout: 264 seconds)
2021-10-18 04:45:59 +0200cheater(~Username@user/cheater) (Ping timeout: 264 seconds)
2021-10-18 04:45:59 +0200cheater1__(~Username@user/cheater)
2021-10-18 04:46:03 +0200cheater1__cheater
2021-10-18 04:46:59 +0200td_(~td@muedsl-82-207-238-233.citykom.de)
2021-10-18 04:48:10 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
2021-10-18 04:49:07 +0200xlei(akans@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 265 seconds)
2021-10-18 04:49:15 +0200jax2(~user@47.149.122.76)
2021-10-18 04:49:28 +0200jax2(~user@47.149.122.76) (ERC (IRC client for Emacs 27.1))
2021-10-18 04:49:53 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2021-10-18 04:50:47 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-10-18 04:52:14 +0200 <jacks2> Axman6 I was talking about concat vs fold
2021-10-18 04:53:09 +0200 <jacks2> no need to patronize me. I know about libraries. I just don't see the point in importing a module just to use a more generic library, when I don't need it
2021-10-18 04:55:40 +0200 <davean> jacks2: its that its the right one.
2021-10-18 04:55:59 +0200 <davean> You realize soon that theres probably not a reason for that function to be Maybe and its actually a hinderance that it is, etc
2021-10-18 04:56:26 +0200 <davean> use the right function - it makes the rest of your life better
2021-10-18 04:56:44 +0200 <davean> its not about how generic it is, its about how correct it is
2021-10-18 04:57:16 +0200 <jacks2> > fold [[1,2,3],[4,5,6]]
2021-10-18 04:57:18 +0200 <lambdabot> [1,2,3,4,5,6]
2021-10-18 04:57:20 +0200 <jacks2> > concat [[1,2,3],[4,5,6]]
2021-10-18 04:57:21 +0200 <lambdabot> [1,2,3,4,5,6]
2021-10-18 04:57:27 +0200 <jacks2> which one is more correct?
2021-10-18 04:59:57 +0200 <jacks2> even ignoring the additional line of using import.. say map vs fmap. no reason to use fmap when dealing with lists. additional overhead on the person reading and modifying the code
2021-10-18 05:00:31 +0200 <jacks2> or using >>= instead of concatMap, as I've seen some people do
2021-10-18 05:04:27 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net)
2021-10-18 05:04:40 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 252 seconds)
2021-10-18 05:05:12 +0200stengah(~stengah@user/stengah)
2021-10-18 05:05:36 +0200 <xsperry> fold can do things concat can't. say:
2021-10-18 05:05:37 +0200xlei(znc@pool-68-129-84-118.nycmny.fios.verizon.net)
2021-10-18 05:05:40 +0200 <xsperry> > fold [Just "foo", Just "bar"]
2021-10-18 05:05:41 +0200 <lambdabot> Just "foobar"
2021-10-18 05:07:14 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 05:08:26 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds)
2021-10-18 05:09:27 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 05:09:27 +0200Kaiepi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-18 05:12:23 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds)
2021-10-18 05:16:06 +0200Kaipi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 05:18:23 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 264 seconds)
2021-10-18 05:26:51 +0200 <dsal> jacks2: I've heard the argument before about using the least generic thing possible in all cases. You might get a better error message sometimes when refactoring or you might avoid the need to change anything at all when refactoring.
2021-10-18 05:28:11 +0200 <dsal> concatMap is another thing I've used in the past, but wouldn't use again. It's just easier for me to think about monoids in general and then realize that list is one rather than to try to think of all the special things I can do with lists.
2021-10-18 05:28:49 +0200ikex(~ash@user/ikex) (Ping timeout: 252 seconds)
2021-10-18 05:29:00 +0200ikex1(~ash@user/ikex)
2021-10-18 05:29:39 +0200ikex1ikex
2021-10-18 05:31:05 +0200[_](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2021-10-18 05:31:18 +0200 <dsal> I work with someone who's kind of my opposite in that regard. I used `fold` in a function and he pointed out it's just `concat` because I'm currently using a list and just doing a [[a]] -> [a] sort of thing, so I shouldn't use `fold`. He's got some fear that some refactoring will make future code type check, but do the wrong thing and it'll introduce a bug.
2021-10-18 05:31:37 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2021-10-18 05:31:46 +0200stengah(~stengah@user/stengah) (Ping timeout: 245 seconds)
2021-10-18 05:32:03 +0200caef^(~caef@70.166.66.234) (Remote host closed the connection)
2021-10-18 05:32:54 +0200 <dsal> e.g., xsperry's case... kind of. Except that wouldn't typecheck. I have a difficult time sympathizing with that sentiment. Too many things to know.
2021-10-18 05:34:46 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 05:34:46 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 05:34:46 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 05:35:53 +0200 <awpr> I kind of like using monomorphic functions when the context is monomorphic. seeing e.g. `IM.map` immediately tells the reader the thing is an `IntMap`, which otherwise might only be determined some lines away because something used `IM.lookup` on it
2021-10-18 05:37:43 +0200 <awpr> but that only applies where the context is already monomorphic; if the entire surrounding thing can be meaningfully generalized, I say generalize it
2021-10-18 05:39:41 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2021-10-18 05:40:28 +0200 <awpr> this also doesn't apply to "more restrictive" or "less restrictive" typeclass constraints like in asum vs. msum: neither of those is more informative to the type checker, they just ask the context for different constraints. in that case, I'd just always use `asum
2021-10-18 05:41:41 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 05:41:41 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 05:41:41 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 05:43:45 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 05:48:40 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 252 seconds)
2021-10-18 05:54:16 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2021-10-18 05:59:54 +0200kronicmage(user3131@neotame.csclub.uwaterloo.ca)
2021-10-18 06:00:06 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2021-10-18 06:03:23 +0200xlei(znc@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 264 seconds)
2021-10-18 06:05:11 +0200xlei(znc@pool-68-129-84-118.nycmny.fios.verizon.net)
2021-10-18 06:07:51 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 06:07:51 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 06:07:51 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 06:12:59 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2021-10-18 06:13:26 +0200_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-10-18 06:14:46 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 06:17:23 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 06:18:14 +0200 <dsal> It's interesting seeing arguments the other way around. There are some folks here who feel strongly that you should use `map` and `return` and stuff.
2021-10-18 06:18:15 +0200 <abarbu> Is there any way to use haskell.nix with stack nightlies without having to rebuild GHC and everything else from scratch?
2021-10-18 06:18:44 +0200 <dsal> cachix. :/
2021-10-18 06:19:47 +0200 <abarbu> I think I have cachix set up correctly because it works for lts releases. But it doesn't seem to find anything for nightlies?
2021-10-18 06:19:48 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 06:20:11 +0200 <dsal> Well, *someone* has to do that build.
2021-10-18 06:21:14 +0200 <abarbu> Sure, but when I use stack I don't need to rebuild GHC from scratch every time. There's no way around that?
2021-10-18 06:21:22 +0200lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-10-18 06:21:36 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 06:21:44 +0200lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-10-18 06:22:34 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 06:24:42 +0200zebrag(~chris@user/zebrag) (Remote host closed the connection)
2021-10-18 06:24:59 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Ping timeout: 264 seconds)
2021-10-18 06:25:31 +0200 <dsal> Not really. Nix hashes are kind of easy to invalidate. I gave up on nightlies a while back anyway. They just started giving me things to worry about.
2021-10-18 06:27:54 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
2021-10-18 06:28:43 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 06:28:44 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 06:28:44 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 06:29:29 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
2021-10-18 06:30:07 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 06:30:37 +0200lieven(~mal@ns2.wyrd.be) (*.net *.split)
2021-10-18 06:30:37 +0200mcglk(~mcglk@131.191.49.120) (*.net *.split)
2021-10-18 06:30:37 +0200noctux(~noctux@user/noctux) (*.net *.split)
2021-10-18 06:30:37 +0200tput(~tim@S0106a84e3fe54613.ed.shawcable.net) (*.net *.split)
2021-10-18 06:30:37 +0200riatre_(~quassel@2001:310:6000:f::5198:1) (*.net *.split)
2021-10-18 06:30:37 +0200cawfee(~root@2406:3003:2077:2758::babe) (*.net *.split)
2021-10-18 06:30:37 +0200ent-(entgod@kapsi.fi) (*.net *.split)
2021-10-18 06:30:37 +0200meejah(~meejah@rutas.meejah.ca) (*.net *.split)
2021-10-18 06:30:37 +0200andjjj23(~irc@107.170.228.47) (*.net *.split)
2021-10-18 06:30:37 +0200achapman(~ajc@vmx14030.hosting24.com.au) (*.net *.split)
2021-10-18 06:30:37 +0200tlax_(tlax@kapsi.fi) (*.net *.split)
2021-10-18 06:30:37 +0200koz(~koz@2404:4408:430f:a900:ca69:658c:ba89:aa9f) (*.net *.split)
2021-10-18 06:30:37 +0200thaumavorio_(~thaumavor@thaumavor.io) (*.net *.split)
2021-10-18 06:30:37 +0200aweinstock(~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) (*.net *.split)
2021-10-18 06:30:37 +0200sweater(~sweater@206.81.18.26) (*.net *.split)
2021-10-18 06:30:37 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (*.net *.split)
2021-10-18 06:30:37 +0200c_wraith(~c_wraith@adjoint.us) (*.net *.split)
2021-10-18 06:30:37 +0200eco(~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com) (*.net *.split)
2021-10-18 06:30:37 +0200LambdaDuck(~anka@ksit.fixme.fi) (*.net *.split)
2021-10-18 06:30:37 +0200Sqaure(~a@178.62.91.8) (*.net *.split)
2021-10-18 06:30:37 +0200dminuoso(~dminuoso@user/dminuoso) (*.net *.split)
2021-10-18 06:30:37 +0200tolt(~weechat-h@li219-154.members.linode.com) (*.net *.split)
2021-10-18 06:30:37 +0200a1paca(~a1paca@user/a1paca) (*.net *.split)
2021-10-18 06:30:37 +0200jamestmartin(james@jtmar.me) (*.net *.split)
2021-10-18 06:30:45 +0200riatre(~quassel@2001:310:6000:f::5198:1)
2021-10-18 06:30:45 +0200LambdaDuck(~anka@ksit.fixme.fi)
2021-10-18 06:30:45 +0200ent(entgod@kapsi.fi)
2021-10-18 06:30:47 +0200jamestmartin(james@jtmar.me)
2021-10-18 06:30:48 +0200noctux(~noctux@user/noctux)
2021-10-18 06:30:48 +0200meejah(~meejah@rutas.meejah.ca)
2021-10-18 06:30:50 +0200aweinstock(~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com)
2021-10-18 06:30:50 +0200eL_Bart0(eL_Bart0@dietunichtguten.org)
2021-10-18 06:30:51 +0200c_wraith(~c_wraith@adjoint.us)
2021-10-18 06:30:52 +0200tlax(tlax@kapsi.fi)
2021-10-18 06:30:54 +0200cawfee(~root@2406:3003:2077:2758::babe)
2021-10-18 06:30:55 +0200eco(~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com)
2021-10-18 06:30:56 +0200koz(~koz@2404:4408:430f:a900:ca69:658c:ba89:aa9f)
2021-10-18 06:31:00 +0200achapman(~ajc@vmx14030.hosting24.com.au)
2021-10-18 06:31:01 +0200tput(~tim@S0106a84e3fe54613.ed.shawcable.net)
2021-10-18 06:31:09 +0200lieven(~mal@ns2.wyrd.be)
2021-10-18 06:31:34 +0200andjjj23(~irc@107.170.228.47)
2021-10-18 06:31:37 +0200thaumavorio(~thaumavor@thaumavor.io)
2021-10-18 06:31:39 +0200sweater(~sweater@206.81.18.26)
2021-10-18 06:31:54 +0200dminuoso(~dminuoso@user/dminuoso)
2021-10-18 06:31:54 +0200mcglk(~mcglk@131.191.49.120)
2021-10-18 06:32:20 +0200tolt(~weechat-h@li219-154.members.linode.com)
2021-10-18 06:32:29 +0200a1paca(~a1paca@user/a1paca)
2021-10-18 06:32:59 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
2021-10-18 06:33:23 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
2021-10-18 06:33:31 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2021-10-18 06:35:04 +0200aegon(~mike@174.127.249.180) (Remote host closed the connection)
2021-10-18 06:35:59 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds)
2021-10-18 06:40:06 +0200_xor(~xor@72.49.199.147) (Read error: Connection reset by peer)
2021-10-18 06:40:34 +0200_xor(~xor@72.49.199.147)
2021-10-18 06:42:05 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
2021-10-18 06:48:36 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 06:52:15 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 06:52:39 +0200cjb(~cjb@user/cjb) ()
2021-10-18 06:56:21 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
2021-10-18 07:04:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-10-18 07:08:00 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-10-18 07:12:27 +0200notzmv(~zmv@user/notzmv) (Remote host closed the connection)
2021-10-18 07:13:25 +0200 <juhp> TIL I learnt one can write say: id id 1
2021-10-18 07:14:00 +0200notzmv(~zmv@user/notzmv)
2021-10-18 07:15:42 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
2021-10-18 07:15:51 +0200 <juhp> I assume this is well-known presumably, but under what condition can one just write f g x ?
2021-10-18 07:17:14 +0200nehsou^(~nehsou@70.166.66.234)
2021-10-18 07:18:04 +0200 <juhp> f g x = (f g) x, I think?
2021-10-18 07:20:19 +0200 <c_wraith> That's just how haskell works.
2021-10-18 07:20:19 +0200 <juhp> I suppose that probably answers my question...
2021-10-18 07:20:43 +0200 <c_wraith> as long as none of the symbols are infix operators, that's how function application associates
2021-10-18 07:20:54 +0200 <c_wraith> or rather, how function application groups
2021-10-18 07:21:21 +0200zmt00(~zmt00@user/zmt00) (Ping timeout: 245 seconds)
2021-10-18 07:21:22 +0200notzmv(~zmv@user/notzmv) (Read error: Connection reset by peer)
2021-10-18 07:22:01 +0200 <juhp> Ya, thanks - I understood what hlint suggested now (actually for a lambda onto a function), but didn't seem very obvious to me
2021-10-18 07:22:30 +0200 <awpr> it's the same situation as `div 5 2`, just that the "first argument" happens to be a function, too
2021-10-18 07:23:19 +0200 <awpr> with `id` it just gets a bit more opaque because its type doesn't immediately look like it should be a function (but it can be, when applied to a function)
2021-10-18 07:23:37 +0200 <juhp> Right
2021-10-18 07:24:17 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 07:24:28 +0200notzmv(~zmv@user/notzmv)
2021-10-18 07:25:04 +0200 <juhp> I don't see f g x that often, but maybe I haven't read enough code
2021-10-18 07:26:02 +0200 <awpr> `map g [0..10]` is an instance of that, `g <$> anything` is the same but with `f` as an infix operator
2021-10-18 07:26:13 +0200 <awpr> s/the same/also/
2021-10-18 07:26:18 +0200 <juhp> juhp: Well that's probably not true, but hope you know what i mean
2021-10-18 07:26:30 +0200 <juhp> Indeed
2021-10-18 07:27:10 +0200 <juhp> Maybe I meant with f being a lambda expression, anyway thank you!
2021-10-18 07:27:33 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 07:28:52 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 258 seconds)
2021-10-18 07:31:56 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2021-10-18 07:33:56 +0200 <kronicmage> re: id being a function, you can parse `id id 1` by remembering that `($)` is just a specialized `id`. so `id id 1` is equivalent to `id $ 1`
2021-10-18 07:41:49 +0200 <Axman6> :t maybe (pure Nothing)
2021-10-18 07:41:50 +0200 <lambdabot> Applicative f => (a1 -> f (Maybe a2)) -> Maybe a1 -> f (Maybe a2)
2021-10-18 07:44:05 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
2021-10-18 07:46:37 +0200 <juhp> kronicmage: cool
2021-10-18 07:46:40 +0200stengah(~stengah@user/stengah)
2021-10-18 07:49:16 +0200slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-10-18 07:51:56 +0200 <juhp> the actual code was this btw: (\ (P p)-> p) parseContents cs
2021-10-18 07:52:27 +0200 <c_wraith> I'd probably write an accessor for that
2021-10-18 07:52:50 +0200 <juhp> Nod, it is not my original code :)
2021-10-18 07:54:55 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-18 07:55:55 +0200DNH(~DNH@2a02:8108:1100:16d8:10fc:32:f4d5:679f)
2021-10-18 07:58:58 +0200 <juhp> Okay I see P is from polyparse...
2021-10-18 08:00:18 +0200DNH(~DNH@2a02:8108:1100:16d8:10fc:32:f4d5:679f) (Ping timeout: 258 seconds)
2021-10-18 08:03:55 +0200xlei(znc@pool-68-129-84-118.nycmny.fios.verizon.net) (Ping timeout: 265 seconds)
2021-10-18 08:04:52 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-18 08:05:26 +0200MQ-17J(~MQ-17J@8.6.144.138)
2021-10-18 08:06:50 +0200fendor(~fendor@91.141.32.95.wireless.dyn.drei.com)
2021-10-18 08:08:53 +0200bhrgunatha(~bhrgunath@2001-b011-8011-07bb-75d1-4d38-03de-4a6b.dynamic-ip6.hinet.net)
2021-10-18 08:10:31 +0200bhrgunatha(~bhrgunath@2001-b011-8011-07bb-75d1-4d38-03de-4a6b.dynamic-ip6.hinet.net) (Client Quit)
2021-10-18 08:18:02 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
2021-10-18 08:19:43 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com)
2021-10-18 08:24:35 +0200falafel(~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com)
2021-10-18 08:25:55 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a0c2:d1aa:a892:e67)
2021-10-18 08:30:11 +0200michalz(~michalz@185.246.204.87)
2021-10-18 08:34:14 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 08:38:17 +0200mc47(~mc47@xmonad/TheMC47)
2021-10-18 08:44:11 +0200_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-10-18 08:48:15 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 08:48:50 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 260 seconds)
2021-10-18 08:55:41 +0200Square(~a@178.62.91.8)
2021-10-18 08:57:57 +0200ubert(~Thunderbi@77.119.216.214.wireless.dyn.drei.com)
2021-10-18 08:58:35 +0200stengah(~stengah@user/stengah) (Ping timeout: 264 seconds)
2021-10-18 09:00:16 +0200stengah(~stengah@user/stengah)
2021-10-18 09:00:31 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-10-18 09:01:11 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 09:05:30 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-10-18 09:07:06 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 09:07:26 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-18 09:07:26 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 09:12:54 +0200jakalx(~jakalx@base.jakalx.net) ()
2021-10-18 09:13:26 +0200falafel(~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com) (Ping timeout: 245 seconds)
2021-10-18 09:18:59 +0200jakalx(~jakalx@base.jakalx.net)
2021-10-18 09:19:05 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2021-10-18 09:19:45 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net)
2021-10-18 09:24:59 +0200stengah(~stengah@user/stengah) (Ping timeout: 264 seconds)
2021-10-18 09:31:57 +0200kosmikus_kosmikus
2021-10-18 09:32:55 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it)
2021-10-18 09:34:22 +0200kosmikus[m](~andresloe@2001:470:69fc:105::95d)
2021-10-18 09:35:31 +0200gehmehgeh(~user@user/gehmehgeh)
2021-10-18 09:36:29 +0200jumper149(~jumper149@80.240.31.34)
2021-10-18 09:40:44 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2021-10-18 09:44:16 +0200chele(~chele@user/chele)
2021-10-18 09:52:08 +0200Pickchea(~private@user/pickchea)
2021-10-18 09:53:20 +0200Inst(~delicacie@2601:6c4:4080:3f80:f94e:aef:95ac:8647)
2021-10-18 09:56:20 +0200max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
2021-10-18 10:00:39 +0200jacks2(~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
2021-10-18 10:01:57 +0200aplainze1akind(~johndoe@captainludd.powered.by.lunarbnc.net)
2021-10-18 10:02:12 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 10:03:03 +0200darkstarx(~darkstard@2601:1c2:300:c8a0::6c32)
2021-10-18 10:03:18 +0200darkstardevx(~darkstard@2601:1c2:300:c8a0::6c32) (Remote host closed the connection)
2021-10-18 10:03:26 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200sclv(sid39734@haskell/developer/sclv) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200FragByte(~christian@user/fragbyte) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200grfn(sid449115@helmsley.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200edmundnoble(sid229620@helmsley.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200tritlo(sid58727@user/tritlo) (Ping timeout: 245 seconds)
2021-10-18 10:03:26 +0200astra`(sid289983@user/amish) (Ping timeout: 245 seconds)
2021-10-18 10:03:39 +0200edmundnoble(sid229620@id-229620.helmsley.irccloud.com)
2021-10-18 10:03:41 +0200sclv(sid39734@haskell/developer/sclv)
2021-10-18 10:03:51 +0200dmj`(sid72307@hampstead.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200SanchayanMaity(sid478177@hampstead.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200Boarders(sid425905@lymington.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200elvishjerricco(sid237756@helmsley.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200ehamberg(sid18208@hampstead.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200etrepum(sid763@uxbridge.irccloud.com) (Ping timeout: 245 seconds)
2021-10-18 10:03:51 +0200tritlo(sid58727@user/tritlo)
2021-10-18 10:03:51 +0200astra`(sid289983@user/amish)
2021-10-18 10:03:53 +0200grfn(sid449115@id-449115.helmsley.irccloud.com)
2021-10-18 10:04:10 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 260 seconds)
2021-10-18 10:04:12 +0200etrepum(sid763@id-763.uxbridge.irccloud.com)
2021-10-18 10:04:15 +0200SanchayanMaity(sid478177@id-478177.hampstead.irccloud.com)
2021-10-18 10:04:15 +0200ehamberg(sid18208@id-18208.hampstead.irccloud.com)
2021-10-18 10:04:16 +0200elvishjerricco(sid237756@id-237756.helmsley.irccloud.com)
2021-10-18 10:04:17 +0200Boarders(sid425905@id-425905.lymington.irccloud.com)
2021-10-18 10:04:17 +0200FragByte(~christian@user/fragbyte)
2021-10-18 10:04:20 +0200dmj`(sid72307@id-72307.hampstead.irccloud.com)
2021-10-18 10:04:41 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds)
2021-10-18 10:05:31 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Ping timeout: 245 seconds)
2021-10-18 10:05:50 +0200hendursa1(~weechat@user/hendursaga)
2021-10-18 10:06:08 +0200notzmv(~zmv@user/notzmv)
2021-10-18 10:09:21 +0200hendursaga(~weechat@user/hendursaga) (Ping timeout: 276 seconds)
2021-10-18 10:14:32 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2021-10-18 10:15:15 +0200acidjnk_new(~acidjnk@p200300d0c703cb80b093ae7a86818c94.dip0.t-ipconnect.de)
2021-10-18 10:17:24 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-10-18 10:17:46 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-18 10:18:36 +0200ubert1(~Thunderbi@178.115.62.230.wireless.dyn.drei.com)
2021-10-18 10:20:11 +0200ubert(~Thunderbi@77.119.216.214.wireless.dyn.drei.com) (Ping timeout: 264 seconds)
2021-10-18 10:27:11 +0200cfricke(~cfricke@user/cfricke)
2021-10-18 10:28:39 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-10-18 10:31:23 +0200cfricke(~cfricke@user/cfricke) (Client Quit)
2021-10-18 10:31:32 +0200cfricke(~cfricke@user/cfricke)
2021-10-18 10:31:59 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 10:35:09 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Quit: #nix)
2021-10-18 10:35:27 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it)
2021-10-18 10:36:18 +0200shriekingnoise(~shrieking@186.137.144.80) (Quit: Quit)
2021-10-18 10:36:47 +0200 <carbolymer> how can I enable colours in stack through ghcid? `ghcid --color=always` does not seem to make any difference
2021-10-18 10:37:13 +0200werneta_(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-10-18 10:37:18 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
2021-10-18 10:37:48 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Read error: Connection reset by peer)
2021-10-18 10:42:00 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2021-10-18 10:47:27 +0200CiaoSen(~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2021-10-18 10:51:18 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9)
2021-10-18 10:51:19 +0200o1lo01ol1o(~o1lo01ol1@2001:8a0:6d7a:df01:dde2:6c49:6076:e5ad)
2021-10-18 10:52:32 +0200 <unit73e> carbolymer, you mean, terminal color output?
2021-10-18 10:53:23 +0200 <unit73e> https://docs.haskellstack.org/en/stable/yaml_configuration/#color
2021-10-18 10:53:47 +0200Pickchea(~private@user/pickchea) (Ping timeout: 264 seconds)
2021-10-18 10:56:03 +0200 <unit73e> you can have that in your global config btw: $HOME/.stack/config
2021-10-18 10:56:10 +0200 <unit73e> I've been using cabal more lately though
2021-10-18 10:58:30 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 11:00:58 +0200kmein_kmein
2021-10-18 11:02:42 +0200 <carbolymer> unit73e: thanks, although stack shows colour output without any problems for me
2021-10-18 11:03:09 +0200 <carbolymer> I've added:
2021-10-18 11:03:09 +0200 <carbolymer> :set -fwarn-unused-binds -fwarn-unused-imports -ferror-spans -fdiagnostics-color=always
2021-10-18 11:03:09 +0200 <carbolymer> to ~/.ghci , and it works
2021-10-18 11:03:26 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-10-18 11:03:28 +0200 <unit73e> I see. you wanted ghci
2021-10-18 11:03:44 +0200 <unit73e> well glad you figured it out
2021-10-18 11:03:48 +0200 <carbolymer> well... it's ghc from stack from ghcid ;]
2021-10-18 11:03:52 +0200 <carbolymer> ghci*
2021-10-18 11:05:49 +0200kuribas(~user@188.188.202.68)
2021-10-18 11:21:11 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 11:21:15 +0200__monty__(~toonn@user/toonn)
2021-10-18 11:26:11 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-10-18 11:28:46 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-10-18 11:30:18 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 11:32:49 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 11:35:33 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 11:38:54 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 11:38:54 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 11:38:54 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 11:45:26 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.3)
2021-10-18 11:53:00 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-18 11:53:10 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-18 11:57:09 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2021-10-18 11:57:54 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 11:57:54 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 11:57:54 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 11:59:38 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-10-18 11:59:43 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit)
2021-10-18 12:00:51 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 12:01:02 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Ping timeout: 258 seconds)
2021-10-18 12:01:25 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-10-18 12:04:52 +0200Kaipi(~Kaiepi@156.34.44.192) (Ping timeout: 258 seconds)
2021-10-18 12:06:41 +0200kuribas(~user@188.188.202.68) (Remote host closed the connection)
2021-10-18 12:07:10 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-10-18 12:07:19 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 12:07:56 +0200CiaoSen(~Jura@p200300c95730dd002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2021-10-18 12:08:56 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-18 12:10:44 +0200timCF(~timCF@200-149-20-81.sta.estpak.ee)
2021-10-18 12:12:40 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2021-10-18 12:13:39 +0200 <timCF> Hello! I have a question about `Async` library. Let's say I do have a parent thread, which uses combination of `async` and `link` to spawn and link a number of child threads. Link gives parent thread ability to fail in case of any children fail with exception. I wonder how to do the other way around - to give child threads ability to automatically fail in case parent thread throws an exception OR just
2021-10-18 12:13:45 +0200 <timCF> terminates normally.
2021-10-18 12:14:45 +0200 <[exa]> usually I share some kind of killswitch that can be easily read by the threads
2021-10-18 12:14:55 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2021-10-18 12:15:09 +0200 <timCF> For the first case I can use `linkOnly` from the child thread called against parent Async. But I'm not sure how to automatically cancel all child threads in case parent terminates normally
2021-10-18 12:15:17 +0200 <[exa]> ofc someone needs to trigger the killswitch but you've got bracket for that :]
2021-10-18 12:15:43 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 12:15:43 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 12:15:43 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 12:16:22 +0200 <timCF> [exa]: so you propagate some sort of MVar/TChan for the purposes of monitoring parent thread wellness from the child threads?
2021-10-18 12:17:10 +0200 <[exa]> yeah, as long as threads can check this repeatedly it's okay
2021-10-18 12:17:12 +0200 <typetetris> Hi there! Hasn't there been recent developments in GHC to easier get stack traces in Haskell? Please give me a pointer, where I could read, how to use this!
2021-10-18 12:17:27 +0200 <[exa]> typetetris: check out the typeclass HasStacktrace
2021-10-18 12:17:39 +0200 <[exa]> (not sure how recent that is though)
2021-10-18 12:18:29 +0200 <[exa]> (uh I messed up the name obviously)
2021-10-18 12:20:01 +0200 <[exa]> (it's HasCallStack :] )
2021-10-18 12:20:54 +0200 <timCF> [exa]: I see, it's definitely possible, but not very ergonomic. I wish Async have utility function for this. I think high level `withAsync` is kinda giving desired behaviour, but it's not ergonomic in cases where number of threads is dynamic and defained in runtime only and can change during runtime
2021-10-18 12:21:35 +0200 <[exa]> timCF: well you can either manually kill all threads or just exit() the process, but you see that's not very clean either
2021-10-18 12:21:44 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Ping timeout: 258 seconds)
2021-10-18 12:23:05 +0200 <timCF> [exa]: Cleanup operation which is killing all child processes could do the job (unless it interrupted)
2021-10-18 12:23:26 +0200 <timCF> [exa]: Some sort of bracket construct in main parent thread
2021-10-18 12:23:34 +0200 <[exa]> yeah well, how do you find all child threads (not processes)?
2021-10-18 12:24:04 +0200 <[exa]> unless you really want to kill all threads that belong to the RTS, which may not compose well with other stuff running
2021-10-18 12:24:08 +0200 <timCF> [exa]: keep a Map/Set inside main process state, threre is no other way I guess
2021-10-18 12:24:12 +0200mbuf(~Shakthi@223.178.116.173)
2021-10-18 12:24:45 +0200 <timCF> [exa]: State monad probably is the way to go, or something similar
2021-10-18 12:25:25 +0200 <typetetris> Trying to use https://hackage.haskell.org/package/haskell-stack-trace-plugin I get `Overloaded signature conflicts with monomorphism restriction` for some of my functions (0 arity ones, which are just fancy new names for certain values)? What does it mean, how could I fix that?
2021-10-18 12:25:56 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 12:25:56 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 12:25:56 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 12:26:22 +0200 <timCF> typetetris: try `-Wno-monomorphism-restriction`
2021-10-18 12:26:37 +0200 <[exa]> timCF: yeah well, I was trying something like that, eventually ended up just with the broadcast killswitch
2021-10-18 12:26:52 +0200stengah(~stengah@user/stengah)
2021-10-18 12:26:58 +0200 <timCF> typetetris: this restriction is not very useful anyway, and creates a lot of noise from nowhere
2021-10-18 12:28:25 +0200 <typetetris> I tried to add `{-# OPTIONS_GHC -Wno-monomorphism-restriction #-}` to the file, but it doesn't seem to help. Do I have to do that globally?
2021-10-18 12:32:16 +0200 <merijn> timCF: Hard disagree
2021-10-18 12:32:34 +0200 <[exa]> +1 ^
2021-10-18 12:32:35 +0200 <merijn> no-MMR is a great way to turn trivial errors that easy to fix into unpredictable resource leaks!
2021-10-18 12:32:40 +0200 <typetetris> I see there is toplevel stuff like: `(Right something) = semver "whatever"` in the file, it didn't like that.
2021-10-18 12:33:18 +0200 <[exa]> typetetris: you tried the code from the example right?
2021-10-18 12:33:35 +0200 <[exa]> which ones is it pointing to?
2021-10-18 12:33:58 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 12:34:12 +0200 <timCF> merijn: interesting.. I always turn it off to not write type signatures in some local bindings which should be polymorphic. Could you share more info why this warning is useful?
2021-10-18 12:34:47 +0200 <[exa]> NMR should have no effect on local bindings right?
2021-10-18 12:35:06 +0200 <timCF> [exa]: I'll give you example, sec
2021-10-18 12:35:09 +0200 <merijn> timCF: Ok, some context first: MMR *only* applies to things that don't have left side arguments, i.e. does not apply to "foo x = ..." but does to "foo = \x -> ..."
2021-10-18 12:35:17 +0200 <[exa]> ah you meant module-local?
2021-10-18 12:35:25 +0200 <typetetris> [exa]: I did not try the code from the example. But turning the `(Right bla) = blub` top-level stuff into `bla = either (error . show) id blub` made the error message about the monomorphism stuff go away, no my code base compiles with that stack trace plugin. Just wanted to let you know.
2021-10-18 12:35:42 +0200 <merijn> timCF: So, suppose we have "foo :: Num a => [a]; foo = veryExpensiveComputation" (except, without the signature)
2021-10-18 12:36:01 +0200 <merijn> timCF: "foo" *looks* like a value, and you'd expect your very expensive computation to only run *once*
2021-10-18 12:36:19 +0200 <merijn> timCF: Except, it's typeclass polymorphic, which means it can be instantiated an unbounded number of times
2021-10-18 12:36:40 +0200 <[exa]> unbounded memory!
2021-10-18 12:37:11 +0200 <merijn> timCF: You have two options: 1) keep all evaluated instantiations around indefinitely (probably a bad ideaa for obvious reasons) or 2) re-evaluate it every time it's used (computational overhead you might not expect, since it looks like a static value)
2021-10-18 12:37:45 +0200xlei(znc@pool-68-129-84-118.nycmny.fios.verizon.net)
2021-10-18 12:37:45 +0200 <merijn> timCF: The Haskell report opts for a third option: Typeclass polymorphic things that look like values are monomorphised (i.e. specialised to one specific type and then only computed once)
2021-10-18 12:38:12 +0200 <merijn> timCF: Which means "things that look like values behave like values", the problem is that *actual* polymorphic usage now doesn't work (the MMR error you get)
2021-10-18 12:38:26 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
2021-10-18 12:38:28 +0200 <timCF> [exa]: Here. Local binding in this function will require type signature in case NMR is off https://github.com/21it/witch/blob/efe4cdca31f90067edf7a09d0770a649d17a1c0b/src/lib/Witch/Instance…
2021-10-18 12:38:46 +0200 <merijn> timCF: Forcing you to add a type signature to "opt in" to solution 2) (re-evaluate at every instantiation)
2021-10-18 12:39:24 +0200 <merijn> timCF: Accidental dramatic slowdown by re-evaluation at every use is incredibly hard to spot/detect and thus a resource leak nightmare
2021-10-18 12:39:37 +0200 <merijn> timCF: on the other hand, MMR conflict is a trivial compile time error
2021-10-18 12:39:50 +0200 <merijn> I dunno which you prefer dealing with, but I'll take the compile time error any day :p
2021-10-18 12:40:19 +0200 <merijn> especially since the fix for the compile issue is as easy as "add an explicit signature to the offending binding"
2021-10-18 12:42:07 +0200 <merijn> timCF: tbh, personally I'm increasingly adding type signatures on *every* binding, including the where block. And with my phd project having lots of "don't touch code for 1.5 year, then come back to it" really has me convinced it's "The 1 True Way (TM)"
2021-10-18 12:42:28 +0200 <timCF> merijn: if it affects runtime, I definitely want to be faster in runtime and spend 10 sec to write type signature for this local binding :)
2021-10-18 12:42:36 +0200 <[exa]> timCF: wow there it's interesting, you sure it's ne NMR that triggers it?
2021-10-18 12:42:56 +0200 <merijn> timCF: For example, looking at the lines you linked...I have *no* clue what tryFrom is remotely doing
2021-10-18 12:43:08 +0200 <[exa]> anyway instance-ish stuff might have extra rules because you don't know half of the types there
2021-10-18 12:43:21 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection)
2021-10-18 12:43:25 +0200 <merijn> timCF: If it had a signature I could be messing with this code in 10s...now I need to reverse engineer all the types, etc.
2021-10-18 12:44:06 +0200 <[exa]> oh yeah
2021-10-18 12:44:20 +0200 <[exa]> e.g. we would now precisely know why the NMR gets triggered. :D
2021-10-18 12:44:59 +0200 <merijn> I don't do it everywhere yet, atm, but I really should
2021-10-18 12:45:11 +0200 <merijn> I was looking up some example code and am now annoyed with missing cases
2021-10-18 12:45:20 +0200 <merijn> See: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Core.hs#L237-L281
2021-10-18 12:45:37 +0200 <merijn> None of those where bindings need a signature, but it's so much more scannable with them
2021-10-18 12:46:11 +0200 <merijn> tbh, quite annoyed with the one on line 273, it's fairly easy to spot what type it should be, but no real point why it shouldn't just have a signature
2021-10-18 12:47:15 +0200 <timCF> merijn: but what do you mean by "leak"? It means resources are acquired, but not liberated properly?
2021-10-18 12:48:20 +0200 <timCF> merijn: or computation is performed without nesessity?
2021-10-18 12:48:24 +0200 <merijn> timCF: Well, the leak would be if you evaluated polymorphic only once per instantiation and kept them around. But since that leaks, GHC doesn't. So in this case it's less leak and more "makes it easy to unintentionally re-evaluate the same expression repeatedly"
2021-10-18 12:49:56 +0200 <timCF> merijn: I see, thanks! So if this affects runtime, I'll probably will turn restriction back
2021-10-18 12:52:19 +0200rond_(~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438)
2021-10-18 12:53:12 +0200 <timCF> [exa]: yeah, I'm sure this restriction forces type signature on local binding, tried it now and got "The Monomorphism Restriction applies to the binding `tryFrom'`
2021-10-18 12:55:24 +0200nckx(~nckx@tobias.gr) (Quit: ♪ It's the most wonderful time of the year 🎃)
2021-10-18 12:56:12 +0200 <timCF> Initially when I was starting with Haskell, I've got a basic list of GHC settings from this post, and then modified it for my needs (added StrictData and couple others). Seems like Haskell IRC is better source of information than medium blog posts) https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3
2021-10-18 12:56:27 +0200gaff(~gaff@49.207.209.245)
2021-10-18 13:00:53 +0200alx741(~alx741@186.178.108.68)
2021-10-18 13:03:29 +0200gaff(~gaff@49.207.209.245) (Quit: Bye ...)
2021-10-18 13:06:17 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-18 13:07:20 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9)
2021-10-18 13:07:57 +0200Pickchea(~private@user/pickchea)
2021-10-18 13:08:29 +0200 <arahael> Medium is a trap.
2021-10-18 13:08:32 +0200 <arahael> A curse on the web.
2021-10-18 13:10:34 +0200nckx(~nckx@tobias.gr)
2021-10-18 13:11:46 +0200 <timCF> arahael: And stack overflow as well)
2021-10-18 13:16:36 +0200 <arahael> timCF: Eh, well, stackoverflow started well.
2021-10-18 13:18:23 +0200stengah(~stengah@user/stengah) (Ping timeout: 264 seconds)
2021-10-18 13:20:10 +0200 <Franciman> same as haskell
2021-10-18 13:20:16 +0200 <Franciman> started well
2021-10-18 13:20:18 +0200 <Franciman> got better
2021-10-18 13:21:10 +0200acidjnk(~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de)
2021-10-18 13:23:50 +0200acidjnk_new(~acidjnk@p200300d0c703cb80b093ae7a86818c94.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2021-10-18 13:24:02 +0200 <merijn> Haskell SO is pretty good
2021-10-18 13:24:21 +0200 <merijn> Haskell questions have a non-zero chance of some OG answerers :p
2021-10-18 13:24:47 +0200 <merijn> All these people asking beginner questions and getting info dumped by pigworker and Lennart xD
2021-10-18 13:25:00 +0200 <Franciman> then what about OCaml?
2021-10-18 13:25:32 +0200acidjnk_new(~acidjnk@pd9e0b933.dip0.t-ipconnect.de)
2021-10-18 13:26:27 +0200ArctVaulMarsHMPJ(~pjetcetal@2.95.44.252) (Read error: Connection reset by peer)
2021-10-18 13:26:47 +0200 <merijn> I dunno, I've never read any ocaml questions
2021-10-18 13:26:52 +0200 <Franciman> no i asked
2021-10-18 13:26:55 +0200 <Franciman> what do you think about ocaml
2021-10-18 13:27:21 +0200 <merijn> ocaml is...ok
2021-10-18 13:27:38 +0200 <merijn> Like, if you're not allowed to use Haskell it's decent
2021-10-18 13:27:58 +0200 <merijn> But, like, if they won't let you use Haskell you might be better off with F# or Rust
2021-10-18 13:28:09 +0200 <Franciman> cringe
2021-10-18 13:28:19 +0200 <Franciman> why do they not allow to use haskell?
2021-10-18 13:28:49 +0200acidjnk(~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2021-10-18 13:28:51 +0200 <Franciman> codata as data is something I cringe at in haskell
2021-10-18 13:29:11 +0200 <Franciman> I wish there was a language with explicit codata
2021-10-18 13:29:21 +0200 <Franciman> to see if we can still obtain the modulatiry of full lazy haskell
2021-10-18 13:30:14 +0200 <Franciman> in fact I am not sure about a thing, it looks like in "big projects" laziness is to be constrained using streaming libraries
2021-10-18 13:30:24 +0200 <Franciman> but you wouldn't need such a strange beast if you had codata
2021-10-18 13:31:30 +0200 <Franciman> as usual you can get away with monadic, which be careful were not invented in haskell, code and have codata=data again
2021-10-18 13:31:45 +0200ArctVaulMarsHMPJ(~pjetcetal@2.95.44.252)
2021-10-18 13:32:05 +0200 <Franciman> embedding things in boxes is a favourite topic
2021-10-18 13:32:12 +0200 <Franciman> the XXI century version of indirection
2021-10-18 13:32:37 +0200 <Franciman> or I should say embedding things in diamonds
2021-10-18 13:33:52 +0200 <Cajun> codata? thats not a term ive run into before
2021-10-18 13:37:55 +0200Guest|55(~Guest|55@147.188.245.199)
2021-10-18 13:38:32 +0200Guest|55(~Guest|55@147.188.245.199) (Client Quit)
2021-10-18 13:40:30 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-18 13:41:45 +0200 <merijn> Cajun: Well, you're about to fall down a freaking rabbit hole, then :p
2021-10-18 13:42:26 +0200 <Franciman> haskell hides them in a way
2021-10-18 13:42:33 +0200 <Franciman> through laziness
2021-10-18 13:43:06 +0200 <merijn> Cajun: In total languages "data" refers *only* to finite recursive data, so something like infinite lists
2021-10-18 13:43:22 +0200 <merijn> Cajun: codata are recursive data structure that are unbounded
2021-10-18 13:43:45 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 13:43:54 +0200 <Franciman> where you don't specify the constructors
2021-10-18 13:43:57 +0200 <Franciman> but the destructors
2021-10-18 13:44:05 +0200 <Franciman> that's how you attain the reversal of the order of evaluation
2021-10-18 13:44:09 +0200 <Franciman> that is typical of laziness
2021-10-18 13:44:11 +0200 <Franciman> from strictness
2021-10-18 13:45:08 +0200 <Franciman> that's why they are called codata, because speaking the pale imitation of structuralism, i.e. category theory
2021-10-18 13:45:14 +0200 <Franciman> they are the dual of data
2021-10-18 13:45:17 +0200 <Franciman> but this is not important
2021-10-18 13:45:44 +0200 <Franciman> https://www.microsoft.com/en-us/research/uploads/prod/2020/01/CoDataInAction.pdf this paper shows some examples of explicit codata
2021-10-18 13:45:57 +0200 <Franciman> it also argues that OOP is basically codata
2021-10-18 13:47:34 +0200 <Cajun> ooh ill have to give that a read, seems very interesting
2021-10-18 13:48:01 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds)
2021-10-18 13:48:48 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2021-10-18 14:02:59 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-10-18 14:05:20 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 14:10:05 +0200stengah(~stengah@user/stengah)
2021-10-18 14:12:27 +0200hendursa1(~weechat@user/hendursaga) (Ping timeout: 276 seconds)
2021-10-18 14:12:56 +0200hendursa1(~weechat@user/hendursaga)
2021-10-18 14:18:35 +0200 <Hecate> fuck
2021-10-18 14:18:38 +0200 <Hecate> 2012 was 9 years ago
2021-10-18 14:18:41 +0200 <Hecate> ouch
2021-10-18 14:18:43 +0200 <Hecate> OUCH
2021-10-18 14:19:02 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2021-10-18 14:19:15 +0200peterhil(~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi)
2021-10-18 14:21:19 +0200 <yushyin> time flies
2021-10-18 14:22:22 +0200 <APic> Indeed
2021-10-18 14:22:38 +0200 <merijn> Hecate: It's too early in the day for existential crisises...
2021-10-18 14:22:50 +0200 <merijn> Please refrain from inducing them >.>
2021-10-18 14:22:56 +0200maerwaldpours a strong whisky
2021-10-18 14:23:16 +0200 <merijn> Like there's any other kind >.>
2021-10-18 14:23:28 +0200 <Hecate> indeed
2021-10-18 14:23:44 +0200 <merijn> There' just "whisky" and "cask strength" :p
2021-10-18 14:23:59 +0200 <merijn> Can't legally call it whisky below 40% ABV anyway :p
2021-10-18 14:24:25 +0200 <Hecate> Btw, is there anyone here interested in dedicating some time in an organised structure to improve the state of compilers techniques and pedagogy in Haskell?
2021-10-18 14:24:39 +0200 <maerwald> pedawhat?
2021-10-18 14:24:48 +0200 <Hecate> uuh, teaching?
2021-10-18 14:24:57 +0200 <merijn> Interested in the abstract sense or the "actually investing personal time in it" sense? :p
2021-10-18 14:25:11 +0200 <maerwald> I'm strongly opposed to teaching
2021-10-18 14:25:31 +0200 <Hecate> merijn: investing personal time in it but also in a structure that guarantees that you're doing just casting rocks in the water
2021-10-18 14:25:36 +0200 <Hecate> maerwald: yes I figured :p
2021-10-18 14:26:34 +0200 <timCF> Does anybody know advantages of `TMVar` vs `MVar`? I guess it has similar interface, but different internal implementation which is more performant in some cases?
2021-10-18 14:27:13 +0200 <merijn> timCF: Depending on your usecase TMVar might actually be a lot *less* performant
2021-10-18 14:27:41 +0200 <timCF> merijn: So the main advantage is smooth STM compatibility?
2021-10-18 14:27:58 +0200 <merijn> timCF: Well, they are faster for *some* usecases
2021-10-18 14:28:20 +0200 <merijn> Classic case of "well, you gotta understand the implementation and pros&cons of both"
2021-10-18 14:28:39 +0200slowButPresent(~slowButPr@user/slowbutpresent)
2021-10-18 14:29:13 +0200 <timCF> merijn: Well, I hoped for the simple answer X is just better than Y. But like everything in Haskell it's not that simple huh
2021-10-18 14:29:31 +0200 <merijn> timCF: This is more "things are never simple when it comes to concurrency" :p
2021-10-18 14:29:43 +0200 <merijn> timCF: Specifically, MVar guarantees single wakeup
2021-10-18 14:29:43 +0200 <xerox> anybody on macos on m1? does ctrl+arrow left/right work for you in the ghci prompt? i.e. moving by words back and forth (or also ctrl+a to get to the beginning of the line) if so, what version of ghc?
2021-10-18 14:30:00 +0200 <merijn> timCF: Which means if you have 1k threads blocked on an MVar and it gets a write only 1 thread will wakeup an run
2021-10-18 14:30:20 +0200 <merijn> timCF: TMVar will wake up all 1k threads and race to see which one wins (see "thundering herd" problems)
2021-10-18 14:30:44 +0200 <merijn> MVar is also fair (it guarantees every blocked thread will see a write, before any thread sees it's 2nd write)
2021-10-18 14:30:48 +0200 <merijn> TMVar are not
2021-10-18 14:31:24 +0200 <merijn> timCF: The static overhead of MVar is slightly bigger, but that can easily be drowned out be thundering herd issues
2021-10-18 14:32:06 +0200 <timCF> merijn: hmm, it's the opposite to what I want.. I actually want a simple kill-switch to kill *every* child Async process in case parent dies or just terminates normally
2021-10-18 14:32:15 +0200fryguybob(~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
2021-10-18 14:32:33 +0200 <timCF> so I do need some sort cross-thread signaling/broadcast
2021-10-18 14:33:05 +0200 <timCF> similar to what `withAsync` function is using internally
2021-10-18 14:33:35 +0200 <timCF> but not N child processes, not just one
2021-10-18 14:34:09 +0200 <timCF> * I mean for N child processes where N is dynamic runtime value
2021-10-18 14:35:16 +0200nschoe(~quassel@178.251.84.79)
2021-10-18 14:38:35 +0200ubert1(~Thunderbi@178.115.62.230.wireless.dyn.drei.com) (Ping timeout: 258 seconds)
2021-10-18 14:38:50 +0200Pickchea(~private@user/pickchea) (Ping timeout: 260 seconds)
2021-10-18 14:39:14 +0200 <timCF> Async library itself using STM-style TMVar for some reason to propagate termination of the parent thread, I do wonder why https://hackage.haskell.org/package/async-2.2.4/docs/src/Control.Concurrent.Async.html#withAsyncUs…
2021-10-18 14:39:40 +0200 <tomjaguarpaw> Suppose I write f = \(# #) -> e . Is there any overhead to evaluating f (# #) compared to just evaluating e ?
2021-10-18 14:40:01 +0200ubert(~Thunderbi@178.115.62.230.wireless.dyn.drei.com)
2021-10-18 14:40:20 +0200 <Franciman> Hecate: can you please expand a bit on what you mean?
2021-10-18 14:40:24 +0200 <Franciman> I didn't understand ^^'
2021-10-18 14:41:59 +0200 <Franciman> what do you mean by "compiler techniques and pedagogy in Haskell" ?
2021-10-18 14:42:02 +0200 <Franciman> are they tw oseparate things?
2021-10-18 14:43:58 +0200 <tomsmeding> tomjaguarpaw: one is calling a function and the other isn't, I suppose?
2021-10-18 14:44:10 +0200 <tomsmeding> but inlining of course
2021-10-18 14:49:59 +0200xiongxin(~quassel@113.116.35.81)
2021-10-18 14:52:53 +0200 <Hecate> Franciman: it's a whole. It's about having both excellent tooling for writing compilers, from frontend to backend, and having excellent pedagogical material to make Haskell shine on this
2021-10-18 14:54:42 +0200 <Franciman> thanks, Hecate. Very nice idea
2021-10-18 14:55:22 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 14:56:37 +0200 <Hecate> hohai coot :)
2021-10-18 14:56:40 +0200 <Hecate> Franciman: 👍
2021-10-18 14:58:32 +0200 <Franciman> yes?
2021-10-18 14:58:40 +0200machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca)
2021-10-18 15:02:19 +0200 <kritzefitz> "(>>=)" is right-associative, which means that "a >>= b >>= c" is equivalent to "(a >>= b) >>= c" or did I get the directions mixed up?
2021-10-18 15:03:48 +0200kritzefitz_(~kritzefit@picard.host.weltraumschlangen.de)
2021-10-18 15:03:49 +0200 <ski> you did
2021-10-18 15:03:52 +0200 <Franciman> kritzefitz: right associative means the parens are to the right
2021-10-18 15:03:55 +0200 <quantum> kritzefitz: Citing Wikipedia: An operator `*` is right-associative if `a * b * c` is interpreted as `a * (b * c)`
2021-10-18 15:04:01 +0200 <ski> (and it's left-associative)
2021-10-18 15:04:01 +0200 <Franciman> o the rightmost >>= takes precedence
2021-10-18 15:04:17 +0200 <Franciman> :info (>>=)
2021-10-18 15:04:20 +0200 <Franciman> sad
2021-10-18 15:04:24 +0200 <ski> % :i >>=
2021-10-18 15:04:25 +0200 <yahb> ski: type Monad :: (* -> *) -> Constraint; class Applicative m => Monad m where; (>>=) :: m a -> (a -> m b) -> m b; ...; -- Defined in `GHC.Base'; infixl 1 >>=
2021-10-18 15:04:35 +0200 <Franciman> left associative :O
2021-10-18 15:04:40 +0200 <kritzefitz> Sorry, I meant "(>>=)" is left-associative. So it's still "(a >>= b) >>= c" right?
2021-10-18 15:04:44 +0200 <ski> yes
2021-10-18 15:04:47 +0200 <quantum> yep
2021-10-18 15:05:22 +0200 <tomjaguarpaw> My benchmarks show that (# #) -> T is substially slower that T
2021-10-18 15:05:25 +0200 <tomjaguarpaw> Hmm
2021-10-18 15:05:53 +0200 <ski> but if you type `... >>= \x -> ... >>= \y -> ...', that's `... >>= (\x -> ... >>= (\y -> ...))'
2021-10-18 15:06:18 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 15:07:44 +0200 <kritzefitz> Huh, interesting.
2021-10-18 15:08:18 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6)
2021-10-18 15:08:21 +0200 <kritzefitz> So is "(Nothing >>= a) >>= b" slightly less efficient than `Nothing >>= (a >=> b)?
2021-10-18 15:09:03 +0200 <ski> yes
2021-10-18 15:09:12 +0200 <ski> (barring a SSC)
2021-10-18 15:10:31 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds)
2021-10-18 15:11:57 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2021-10-18 15:12:27 +0200 <kritzefitz> Does this similarly behave for "Writer [o]"? I image left associative list writers to be a lot less efficient than right associative, because the former will always prepend the long existing output to the short new output.
2021-10-18 15:12:38 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2021-10-18 15:13:34 +0200 <ski> @src Writer (>>=)
2021-10-18 15:13:34 +0200 <lambdabot> m >>= k = Writer $
2021-10-18 15:13:34 +0200 <lambdabot> let (a, w) = runWriter m
2021-10-18 15:13:35 +0200 <lambdabot> (b, w') = runWriter (k a)
2021-10-18 15:13:35 +0200 <lambdabot> in (b, w <> w')
2021-10-18 15:14:00 +0200 <ski> i think so
2021-10-18 15:14:30 +0200 <ski> you could use difference lists, instead
2021-10-18 15:15:06 +0200 <ski> (or use `ContT' or `Codensity')
2021-10-18 15:19:05 +0200lbseale(~lbseale@user/ep1ctetus)
2021-10-18 15:19:10 +0200 <tomjaguarpaw> Where substantially is about 1%, so not actually that substantial
2021-10-18 15:19:30 +0200 <tomjaguarpaw> OTOH () -> T is about 20% slower that T
2021-10-18 15:20:14 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 15:22:23 +0200boxscape_(~boxscape_@p54a3581e.dip0.t-ipconnect.de)
2021-10-18 15:23:00 +0200 <kritzefitz> Huh, does it really make such a little difference? I would have imagined that repeatedly prepending a very long list has a stronger impact. But most monadic code probably ends up right-associative (because of lambdas and do notation), so maybe I'm over-estimating the effect.
2021-10-18 15:24:28 +0200 <boxscape_> Is there a way to get GHC to always default type class constraints in type inference to concrete types? MonomorphismRestriction + ExtendedDefaultRules is not enough... (I'm going to give an introductory talk about Haskell at my company and am trying to stay away from type classes)
2021-10-18 15:25:22 +0200 <boxscape_> e.g. the type of `g a b = a + b` is still inferred to be `Num a => a -> a -> a`
2021-10-18 15:28:40 +0200 <geekosaur> afaik there is no way to get ghc to always monomorphize; it's always going to go for the most general signature. and I suspect a lot of stuff would break if it didn't
2021-10-18 15:29:17 +0200 <geekosaur> that's the sort of thingt that is very likely to have unforeseen consequences
2021-10-18 15:30:16 +0200 <boxscape_> ok, thanks
2021-10-18 15:30:53 +0200 <boxscape_> I suppose I can just define my own (+) that's monomorphic and such
2021-10-18 15:38:27 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2021-10-18 15:41:14 +0200 <boxscape_> (On the other hand, I also don't really want to give the impression that (+) can only be used for integers - not sure what I'll do yet)
2021-10-18 15:42:34 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2021-10-18 15:45:04 +0200slack1256(~slack1256@45.4.2.52)
2021-10-18 15:46:35 +0200acidjnk_new(~acidjnk@pd9e0b933.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2021-10-18 15:47:23 +0200xiongxin(~quassel@113.116.35.81) (Quit: No Ping reply in 180 seconds.)
2021-10-18 15:47:35 +0200stengah(~stengah@user/stengah) (Ping timeout: 258 seconds)
2021-10-18 15:48:39 +0200xiongxin(~quassel@113.116.34.92)
2021-10-18 15:53:12 +0200ian`(~user@ool-45779fe5.dyn.optonline.net)
2021-10-18 15:53:30 +0200ian`bontaq
2021-10-18 15:55:02 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2021-10-18 15:55:41 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 15:55:41 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 15:55:41 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 15:56:38 +0200Sgeo(~Sgeo@user/sgeo)
2021-10-18 15:56:52 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2021-10-18 15:57:24 +0200neurocyte0132889(~neurocyte@46.243.83.114)
2021-10-18 15:57:24 +0200neurocyte0132889(~neurocyte@46.243.83.114) (Changing host)
2021-10-18 15:57:24 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-18 15:58:49 +0200Pickchea(~private@user/pickchea)
2021-10-18 15:59:29 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a0c2:d1aa:a892:e67) (Quit: WeeChat 2.8)
2021-10-18 16:01:44 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 16:01:44 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 16:01:44 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 16:04:24 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-18 16:04:48 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao)
2021-10-18 16:05:32 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-18 16:05:59 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 16:06:11 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-10-18 16:06:59 +0200mc47(~mc47@xmonad/TheMC47)
2021-10-18 16:07:08 +0200ec(~ec@gateway/tor-sasl/ec)
2021-10-18 16:07:39 +0200timCF(~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving)
2021-10-18 16:08:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 16:09:21 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 16:11:53 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 16:11:53 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 16:11:53 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 16:12:36 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 245 seconds)
2021-10-18 16:14:26 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2021-10-18 16:18:34 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2021-10-18 16:18:54 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2021-10-18 16:20:03 +0200stengah(~stengah@user/stengah)
2021-10-18 16:22:13 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection)
2021-10-18 16:22:32 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao)
2021-10-18 16:23:53 +0200 <coot> Hecate: hi, I think you want to ask about the MR with colour support. That one is ready for review.
2021-10-18 16:25:00 +0200zebrag(~chris@user/zebrag)
2021-10-18 16:25:00 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Remote host closed the connection)
2021-10-18 16:25:01 +0200 <geekosaur> channel?
2021-10-18 16:25:33 +0200 <coot> Hecate: I have another question, what's the process for updating which commit of `hackage` the `ghc` repo is using. I would like both `ghc-9.0` and `ghc-9.2` branches of `ghc` repo to use a more recent commit from `ghc-9.0` and `ghc-9.2` branches of `hackage` (respectively).
2021-10-18 16:26:33 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com)
2021-10-18 16:27:58 +0200Cale(~cale@2607:fea8:995f:d3e0:a7e3:45a3:f953:e812)
2021-10-18 16:28:42 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-10-18 16:29:35 +0200jlamothe(~jlamothe@198.251.61.229) (Quit: leaving)
2021-10-18 16:30:17 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2021-10-18 16:32:50 +0200thaumavorio(~thaumavor@thaumavor.io) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-18 16:34:45 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it)
2021-10-18 16:35:38 +0200thaumavorio(~thaumavor@thaumavor.io)
2021-10-18 16:35:41 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 16:38:21 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Client Quit)
2021-10-18 16:40:35 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-10-18 16:41:04 +0200shriekingnoise(~shrieking@186.137.144.80)
2021-10-18 16:43:42 +0200ArtVandelayer(~ArtVandel@ip174-68-147-20.lv.lv.cox.net)
2021-10-18 16:48:33 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 16:49:26 +0200jlamothe(~jlamothe@198.251.61.229)
2021-10-18 16:49:59 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 16:54:43 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 252 seconds)
2021-10-18 16:58:52 +0200xiongxin(~quassel@113.116.34.92) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-10-18 17:00:34 +0200lbseale_(~lbseale@user/ep1ctetus)
2021-10-18 17:02:58 +0200 <Hecate> coot: updating the submodule? I don't remember at the moment :|
2021-10-18 17:03:58 +0200lbseale(~lbseale@user/ep1ctetus) (Ping timeout: 260 seconds)
2021-10-18 17:04:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-10-18 17:06:18 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2021-10-18 17:06:57 +0200hiruji(~hiruji@user/hiruji) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-18 17:07:15 +0200hiruji(~hiruji@user/hiruji)
2021-10-18 17:07:16 +0200hiruji(~hiruji@user/hiruji) (Remote host closed the connection)
2021-10-18 17:07:35 +0200hiruji(~hiruji@user/hiruji)
2021-10-18 17:12:04 +0200tinhatcat(~manjaro-g@2620:103:a000:2201:8e4c:af6a:e11c:11a1)
2021-10-18 17:12:23 +0200MQ-17J(~MQ-17J@8.6.144.138) (Ping timeout: 264 seconds)
2021-10-18 17:15:39 +0200jtomas(~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
2021-10-18 17:19:28 +0200zincy(~tom@2a00:23c8:970c:4801:d922:ea97:b63a:4161) (Ping timeout: 252 seconds)
2021-10-18 17:20:06 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds)
2021-10-18 17:21:09 +0200 <ph88> what's the best way to parse line by line ?
2021-10-18 17:22:08 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-10-18 17:22:15 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2021-10-18 17:23:04 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 17:23:05 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-18 17:24:52 +0200sprout(~quassel@2a02:a467:ccd6:1:110c:9227:cd24:5132)
2021-10-18 17:25:31 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 17:25:32 +0200Morrow(~Morrow@147.161.13.214)
2021-10-18 17:25:45 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net)
2021-10-18 17:26:57 +0200zmt00(~zmt00@user/zmt00)
2021-10-18 17:27:45 +0200 <ph88> i have this now but i feel my code is a bit ugly and not really split out well https://bpa.st/46NQ
2021-10-18 17:27:59 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2021-10-18 17:28:55 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-18 17:30:37 +0200 <boxscape_> ph88 have you considered just using `lines` to split the input into a list of lines before parsing it?
2021-10-18 17:31:22 +0200 <xerox> is there a specific channel to haskeline?
2021-10-18 17:31:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 17:31:53 +0200 <geekosaur> nope; ask here
2021-10-18 17:32:49 +0200 <xerox> geekosaur: hehe you already tried to help me with this, the ghci line editing problems, I made up the tiniest possible haskeline program and it also shows those problems
2021-10-18 17:33:04 +0200 <c_wraith> ph88: that probably feels so awkward because you're trying to use a parser combinator library like an imperative parsing library
2021-10-18 17:33:07 +0200 <geekosaur> hm
2021-10-18 17:33:09 +0200 <xerox> I thought maybe if I find someone knowledgeable on haskeline itself they can help me figure out where it's going wrong
2021-10-18 17:33:28 +0200 <c_wraith> ph88: If you used it more declaratively, it would work a lot more naturally
2021-10-18 17:33:39 +0200 <ph88> boxscape_, i considered it yes. I just ran my current implementation on an actual input file of 300 MB and the process gets killed, likely by some overflow/memory thing
2021-10-18 17:34:01 +0200 <ph88> c_wraith, i don't know how to do that
2021-10-18 17:34:34 +0200 <geekosaur> xeros, you could take your question to its bug tracker with your minimal reproducing example https://github.com/judah/haskeline/issues
2021-10-18 17:34:57 +0200 <c_wraith> ph88: write parsers for subsets of your grammar that stand alone, and then combine them with standard combinators. Using manual recursion should almost never be necessary.
2021-10-18 17:35:18 +0200 <ph88> c_wraith, i couldn't find a good combinator to do this recursion for me
2021-10-18 17:35:31 +0200 <xerox> geekosaur: I have one half written, working on making some screencaps to show the problems, but in the meanwhile I wanted to see if I could find some gentle soul that could help me debug it
2021-10-18 17:35:32 +0200 <c_wraith> you're making a list. some/many will do
2021-10-18 17:35:44 +0200 <xerox> I have a feeling it's my system, but I don't know what to try
2021-10-18 17:36:14 +0200 <c_wraith> or maybe sepBy if you don't want the newline to be part of the sub-parsers
2021-10-18 17:36:20 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 17:36:23 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 264 seconds)
2021-10-18 17:37:05 +0200 <ph88> c_wraith, sepBy newline ?
2021-10-18 17:38:19 +0200 <c_wraith> well, the subparser would go in between those
2021-10-18 17:38:40 +0200 <c_wraith> The whole point of parser combinators is to be compositional
2021-10-18 17:38:51 +0200 <c_wraith> Start with a parser for a single line
2021-10-18 17:39:12 +0200 <c_wraith> Then use sepBy to combine that parser with the line separator to parse multiple lines
2021-10-18 17:40:02 +0200 <ph88> c_wraith, here full program, single line parser on 74 to 86 https://bpa.st/W6ZA but the input first contains a bunch of lines i need to skip over
2021-10-18 17:40:05 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com)
2021-10-18 17:40:36 +0200 <ph88> the skipping over lines that do not match is not going well
2021-10-18 17:41:03 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-10-18 17:41:08 +0200 <c_wraith> did you know that you can import multiple modules with the same qualified name?
2021-10-18 17:41:40 +0200 <ph88> ye
2021-10-18 17:43:27 +0200 <ph88> when i call my line parser then it expect the return type Line .. but when there is a line to be skipped i have the choice of not calling the Line parser (i would perfer) or build type Maybe Line and then filter out again
2021-10-18 17:43:58 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-18 17:45:37 +0200 <ph88> i would like to say: either a line or nothing something like this get = (get <|> try (manyTill anyChar (try newline))) `sepBy` newline but the types are not good in this case, because left side of <|> is Line, and right side of <|> is String (which i don't care about even)
2021-10-18 17:45:37 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-18 17:46:16 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-18 17:47:22 +0200 <monochrom> Consider "optional".
2021-10-18 17:47:34 +0200 <c_wraith> Ok, so.. the problem is that this actually *isn't* line-based. There are lines you care about and lines you don't, and that's not a decision made by looking at individual lines. You care about whether you're in the prefix or the data.
2021-10-18 17:48:03 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9)
2021-10-18 17:49:12 +0200 <ph88> prefix ?
2021-10-18 17:49:37 +0200 <c_wraith> "the input first contains a bunch of lines i need to skip over" - a prefix of the data
2021-10-18 17:50:48 +0200 <ph88> i was considering skipping over those lines by detecting whether they do NOT match a data line
2021-10-18 17:51:33 +0200 <c_wraith> that's fine as a local technique, but I'm saying to look at the picture from the top down
2021-10-18 17:51:50 +0200 <c_wraith> You have a document. It has a prefix which you don't care about, and then data you do
2021-10-18 17:51:50 +0200 <ph88> ok
2021-10-18 17:51:54 +0200 <ph88> yes
2021-10-18 17:52:06 +0200 <c_wraith> Write a parser for the prefix. Write a separate parser for the data.
2021-10-18 17:52:22 +0200 <c_wraith> Combine them to make a document parser
2021-10-18 17:52:50 +0200 <c_wraith> Don't try to write a single parser that handles both types of lines
2021-10-18 17:53:23 +0200 <ph88> monochrom, i considered optional, just that i'm not sure whether it will consume the input until the end of the line for lines that i am not interested in. I just tested it a little bit and my best guess it it only parses the first non interesting line and then stops because of this
2021-10-18 17:53:26 +0200stengah(~stengah@user/stengah) (Ping timeout: 245 seconds)
2021-10-18 17:53:56 +0200 <monochrom> That depends on how good is what you give to optional.
2021-10-18 17:53:57 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 17:54:41 +0200 <ph88> c_wraith, so like (data_line <|> prefix_line) `sepBy` newline ? for the document parser ?
2021-10-18 17:55:13 +0200 <c_wraith> no. more like prefix *> data
2021-10-18 17:55:20 +0200 <ph88> ok
2021-10-18 17:55:29 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2021-10-18 17:55:31 +0200DNH(~DNH@2a02:8108:1100:16d8:4434:a728:da46:b4e9) (Ping timeout: 245 seconds)
2021-10-18 17:55:51 +0200 <monochrom> sepBy? sepEndBy? EndBy?
2021-10-18 17:56:17 +0200 <monochrom> Or perhaps even blank lines are legal so none of the above?
2021-10-18 17:59:47 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk) (Ping timeout: 264 seconds)
2021-10-18 17:59:48 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-18 18:04:03 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 258 seconds)
2021-10-18 18:04:47 +0200MQ-17J(~MQ-17J@8.6.144.138)
2021-10-18 18:11:31 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2021-10-18 18:13:00 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2021-10-18 18:13:53 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
2021-10-18 18:14:12 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-10-18 18:14:20 +0200Lord_of_Life_Lord_of_Life
2021-10-18 18:15:59 +0200ncopa(~ncopa@alpine/developer/ncopa)
2021-10-18 18:16:30 +0200emf(~emf@2620:10d:c090:400::5:75e7)
2021-10-18 18:21:16 +0200 <ncopa> hi, seems like https://gitlab.haskell.org/ is down?
2021-10-18 18:21:30 +0200 <geekosaur> yes
2021-10-18 18:21:42 +0200 <boxscape_> I can access it
2021-10-18 18:21:43 +0200 <ncopa> seems like it just came back
2021-10-18 18:21:46 +0200 <boxscape_> ah
2021-10-18 18:21:59 +0200 <geekosaur> it's being migrated to a new machine and is out of space on the old one, and will be fairly unreliable during the move
2021-10-18 18:22:06 +0200ikex1(~ash@user/ikex)
2021-10-18 18:22:35 +0200ikex(~ash@user/ikex) (Ping timeout: 264 seconds)
2021-10-18 18:22:43 +0200ikex1ikex
2021-10-18 18:23:05 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 18:26:07 +0200 <geekosaur> https://mail.haskell.org/pipermail/ghc-devs/2021-October/020290.html is the official notice
2021-10-18 18:32:02 +0200 <zzz> is (a -> a) an "endofunction"?
2021-10-18 18:33:12 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 18:34:40 +0200 <zzz> or "how do you call a function that returns the same type as its argument?"
2021-10-18 18:40:25 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 18:40:25 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 18:40:25 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 18:41:14 +0200 <Morrow[m]> Endomorphism https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Monoid.html#t:Endo
2021-10-18 18:44:48 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3))
2021-10-18 18:45:27 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 18:48:47 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 18:48:47 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 18:48:47 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 18:49:42 +0200 <boxscape_> similarly to how a x a -> a is a closed (or internal) binary operation on a, it seems like that terminology should be adaptable to unary functions as well, but I'm not familiar with anyone doing it
2021-10-18 18:52:35 +0200nschoe(~quassel@178.251.84.79) (Ping timeout: 264 seconds)
2021-10-18 19:03:23 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 19:03:46 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Quit: Leaving)
2021-10-18 19:06:32 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-10-18 19:07:38 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2021-10-18 19:09:16 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 19:09:25 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-10-18 19:10:01 +0200 <ph88> c_wraith, parser seems to be working well now. thanks for help
2021-10-18 19:10:10 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
2021-10-18 19:10:26 +0200chele(~chele@user/chele) (Remote host closed the connection)
2021-10-18 19:10:31 +0200 <c_wraith> nice
2021-10-18 19:10:56 +0200hololeap(~hololeap@user/hololeap)
2021-10-18 19:14:43 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-18 19:22:04 +0200motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 252 seconds)
2021-10-18 19:23:35 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-10-18 19:23:46 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection)
2021-10-18 19:24:56 +0200hololeap(~hololeap@user/hololeap)
2021-10-18 19:27:41 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 19:33:19 +0200 <zzz> Morrow[m]: that's it, thanks
2021-10-18 19:33:24 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 19:34:23 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-18 19:34:41 +0200rekahsoft(~rekahsoft@52.129.35.150)
2021-10-18 19:36:12 +0200motherfsck(~motherfsc@user/motherfsck)
2021-10-18 19:38:17 +0200aegon(~mike@174.127.249.180)
2021-10-18 19:43:12 +0200mbuf(~Shakthi@223.178.116.173) (Quit: Leaving)
2021-10-18 19:49:08 +0200econo(uid147250@user/econo)
2021-10-18 19:51:09 +0200 <abarbu> With haskell.nix and shellFor when I add a tool like haskell-language-server, how can I change the flags it builds with? I tried updating modules with 'packages.haskell-language-server.flags.floskell = false;' but it doesn't work.
2021-10-18 19:52:46 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-10-18 19:56:51 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 19:56:51 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 19:56:51 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 19:57:03 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 20:03:16 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 20:04:48 +0200max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 258 seconds)
2021-10-18 20:08:16 +0200 <alzgh> I'm very new to Haskell, sorry if this question is not good. I'm a little confused why we say a function is lifted when we apply fmap to it? I mean I don't understand why this terminology is used. When we apply a function with fmap to a structure, we go one level down into the structure and apply the function to the individual members of the structure while preserving the structure. So, it goes down not up is how I'm visualizing it.
2021-10-18 20:08:33 +0200 <zzz> is there anyway we can overload record accessors with normal functions?
2021-10-18 20:08:33 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-18 20:08:37 +0200 <zzz> i mean
2021-10-18 20:09:23 +0200 <monochrom> I don't say "lifted" either.
2021-10-18 20:09:47 +0200 <zzz> forget it :(
2021-10-18 20:10:38 +0200 <monochrom> But it converts an X->Y function to a [X]->[Y} function.
2021-10-18 20:11:40 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 20:11:40 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 20:11:40 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 20:11:50 +0200 <boxscape_> alzgh I suppose the idea is that on the ground level, you have function types like `a -> b`, and then the type `f a -> f b` is built on top of that, so you're lifting the function from living in `a -> b` to living in `f a -> f b`
2021-10-18 20:12:07 +0200 <alzgh> does the `[]` in your notation stand for the (general) structure containing X monochrom?
2021-10-18 20:12:26 +0200 <monochrom> No, I'm just using the list example.
2021-10-18 20:12:58 +0200 <alzgh> ahh, OK
2021-10-18 20:13:25 +0200 <monochrom> BTW I don't say "structure" either.
2021-10-18 20:14:33 +0200 <monochrom> Well, not until the audience knows what it's supposed to mean.
2021-10-18 20:14:51 +0200zincy(~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44)
2021-10-18 20:15:32 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 268 seconds)
2021-10-18 20:15:37 +0200 <monochrom> But you'll be surprised at how many people in the audience don't actually know what it's supposed to mean, but too afraid to ask, so everyone pretends to play along.
2021-10-18 20:16:38 +0200 <monochrom> The emperor's new cloth, lifting, structure, and isomorphism.
2021-10-18 20:17:33 +0200 <alzgh> boxscape_: OK, so while the function applies to the individual members of the structure, it must be lifted to the level of the structure to be able work on the individual members and that's what fmap does. That's what I understood from your statement. BTW, what I'm writing here is most likely not formally correct. I'm just trying to visualize it and make it sensible in simple terms first.
2021-10-18 20:18:33 +0200 <boxscape_> yeah
2021-10-18 20:20:36 +0200jumper149(~jumper149@80.240.31.34) (Quit: WeeChat 3.2)
2021-10-18 20:22:18 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2021-10-18 20:22:34 +0200 <c_wraith> boxscape_: oh, remember the thing we talked about a bit with putting type arguments in patterns a while back? You were having trouble with it in a build of GHC from master, it wanted a kind parameter as well as the type parameter.. I did some checking, and the 9.2 release candidate doesn't have that problem, which is a good sign.
2021-10-18 20:22:57 +0200 <boxscape_> c_wraith yep, I reported it as a bug and it got fixed right away :)
2021-10-18 20:23:06 +0200 <c_wraith> On the other hand, 9.2 has been stuck at rc1 for months now. What's the deal with that? :(
2021-10-18 20:24:06 +0200 <boxscape_> alzgh here's an image that perhaps also helps with the intuition of how fmap "lifts" a function f https://i.imgur.com/EMpxByV.png
2021-10-18 20:24:23 +0200 <boxscape_> excuse the crude mouse pad drawing
2021-10-18 20:24:31 +0200 <boxscape_> touch pad, rather
2021-10-18 20:24:52 +0200 <c_wraith> I was going to say this might be a case where category theory's diagrams actually are useful for someone who doesn't know category theory. That's basically what that is.
2021-10-18 20:25:32 +0200 <boxscape_> yeah
2021-10-18 20:25:37 +0200 <yushyin> boxscape_: what a work of art! ;)
2021-10-18 20:25:44 +0200 <boxscape_> :) thanks
2021-10-18 20:25:45 +0200 <c_wraith> Except category theory seems to have the arrows going down instead of up by convention. Not sure what's up with that.
2021-10-18 20:25:51 +0200 <boxscape_> hmm
2021-10-18 20:26:22 +0200 <janus> c_wraith: i heard that RecordDotSyntax has a few bugs in its GHC proposal that will need sorting out
2021-10-18 20:26:36 +0200 <monochrom> That's just like computer graphics having the Y axis pointing down.
2021-10-18 20:26:49 +0200 <boxscape_> and trees having their roots at the top
2021-10-18 20:27:03 +0200 <c_wraith> no one can agree on anything, ever!
2021-10-18 20:27:04 +0200 <alzgh> this makes a lot of sense boxscape_ thanks. The drawing is perfect for the purpose. I'm just wondering why tagged the arrows from `a` to `[a]` with `pure`?
2021-10-18 20:27:05 +0200 <janus> c_wraith: so i was thinking maybe they implement it first and then write the new spec, instead ? dunno but it does hint at why more time could be needed
2021-10-18 20:27:31 +0200 <boxscape_> alzgh there's a function `pure :: a -> f a`, which e.g. for list converts an element into a singleton list with that element
2021-10-18 20:27:36 +0200 <boxscape_> > pure 4 :: [Int]
2021-10-18 20:27:38 +0200 <lambdabot> [4]
2021-10-18 20:28:09 +0200 <boxscape_> > pure 4 :: Maybe Int
2021-10-18 20:28:11 +0200 <c_wraith> janus: I was under the impression they cut out a bunch for the 9.2 target, and were going to put the stuff that got cut in a later release
2021-10-18 20:28:11 +0200 <lambdabot> Just 4
2021-10-18 20:28:17 +0200 <boxscape_> (afk)
2021-10-18 20:28:19 +0200hyiltiz(~quassel@31.220.5.250)
2021-10-18 20:28:20 +0200 <c_wraith> janus: maybe I misinterpreted that, though
2021-10-18 20:29:48 +0200CiaoSen(~Jura@p5dcc1a24.dip0.t-ipconnect.de)
2021-10-18 20:30:29 +0200wonko(~wjc@62.115.229.50)
2021-10-18 20:32:14 +0200 <alzgh> Ohh, thanks boxscape_ this looks very much related to Functors which I'm learning right now. I'm going to get to them in a few days, I guess :-)
2021-10-18 20:33:52 +0200 <alzgh> haha monochrom, I think I have a basic understanding of structure, but most likely not the formal rigorous definition. As far as I know, the only example that not clearly fits with my informal definition of structure is `f = fmap (+1) negate` I have learned that `fmap` for functions is defined as `.` so we can say that `fmap (+1) negate` is equal to `(+1) . negate`. But don't mind asking what structure really means, and would love to learn from you :D
2021-10-18 20:34:18 +0200 <koz> If I had a function that used to work on a concrete type, and then change it to be polymorphic, is that a major or minor bump in version according to the PVP?
2021-10-18 20:36:19 +0200 <janus> c_wraith: do let me know if you find a credible source, i don't remember anymore where i read what i told you. it's all gossip! o_O
2021-10-18 20:37:05 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 20:37:31 +0200 <c_wraith> koz: it won't break existing code unless it makes inference fail. Could be either, depending on how likely you believe such an inference failure to be
2021-10-18 20:37:53 +0200azeem(~azeem@2a00:801:237:7bcf:1c96:8993:d67f:c459)
2021-10-18 20:38:03 +0200 <c_wraith> koz: on the other hand, adding a new function can introduce name collisions also, and that's only a minor change. Seems like a minor change to me.
2021-10-18 20:38:05 +0200 <[exa]> alzgh: (jumping into the discussion but hopefully helpful-- ) you may view Functors (over some type) as something that's got the semantics of that type hidden somewhere inside, e.g. it contains the type or may produce results of that type. In this context, it is useful to view functions as boxes that contain their results (of the type), but you need to supply the parameter to get the result out of the box.
2021-10-18 20:38:07 +0200 <koz> It's for a DataKinds 'tag'.
2021-10-18 20:38:11 +0200 <[exa]> Then the `fmap` behaves the same as for lists - just transforms the (yet nonexisting) result inside the container.
2021-10-18 20:38:29 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 20:38:29 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 20:38:29 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 20:38:32 +0200 <koz> So I have a data type so 'tagged', and the function currently expects a specific tag, and I wanna change it to allow _any_ tag.
2021-10-18 20:38:42 +0200 <koz> I _feel_ that's minor.
2021-10-18 20:38:47 +0200 <koz> But I'm not exactly sure.
2021-10-18 20:39:51 +0200 <c_wraith> You're also allowed to bump the major version whenever you want, if you so desire. the only restrictions are on the things you can do without bumping the major version
2021-10-18 20:40:33 +0200 <[exa]> (go browsers, bump major!)
2021-10-18 20:41:02 +0200 <monochrom> bowser is a major bump, I heard
2021-10-18 20:41:46 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
2021-10-18 20:42:20 +0200myShoggoth(~myShoggot@97-120-70-214.ptld.qwest.net)
2021-10-18 20:42:34 +0200 <myShoggoth> Haskell Foundation: Into the Future! https://haskell-foundation.medium.com/into-the-future-8f8968094d91
2021-10-18 20:43:04 +0200P1RATEZ(piratez@user/p1ratez)
2021-10-18 20:43:05 +0200 <shapr> yay
2021-10-18 20:43:18 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2021-10-18 20:43:31 +0200 <Morrow[m]> <koz> "If I had a function that used to..." <- Don't forget that the MonomorphismRestriction is a thing, so if you make the function take something polymorphic GHC may begin to fail to monomorphize it when it needs to.
2021-10-18 20:44:21 +0200 <maerwald> "An IDE that simulates the runtime and shows developers how their code translates into a running system not only helps programmers be more productive, it helps them learn the language better and faster."
2021-10-18 20:44:26 +0200 <maerwald> that sounds pretty ambitious
2021-10-18 20:44:28 +0200max22-(~maxime@2a01cb088335980099ed81e6a8bd9a3f.ipv6.abo.wanadoo.fr)
2021-10-18 20:44:48 +0200 <monochrom> It is. We know.
2021-10-18 20:45:20 +0200 <monochrom> But I like how it agrees with my stance of "I'm above debuggers".
2021-10-18 20:45:21 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-18 20:45:41 +0200 <shapr> could hook in somethin like https://github.com/quchen/stgi
2021-10-18 20:47:48 +0200 <maerwald> I think haskell is simply not as well suited for operational reasoning like other languages.
2021-10-18 20:47:51 +0200 <monochrom> The parallel between "other languages are stuck with imperative programming, we go above that" and "other languages are stuck with debuggers, we go above that".
2021-10-18 20:48:29 +0200 <maerwald> so even if we make this easier, it'll still be harder than in other languages
2021-10-18 20:48:37 +0200 <maerwald> (I don't mind, but others might)
2021-10-18 20:49:00 +0200 <shapr> I like that graphical reduction thing Cale was using for awhile
2021-10-18 20:49:02 +0200 <monochrom> I don't mind how others do. They can always go back to python.
2021-10-18 20:49:04 +0200 <c_wraith> eh? GHC-haskell is pretty easy to reason about operationally. A totally different skill set, but not hard to learn.
2021-10-18 20:49:22 +0200 <monochrom> (Eh? python is not exactly great with operational reasoning either!)
2021-10-18 20:49:24 +0200 <maerwald> c_wraith: my experience is the opposite
2021-10-18 20:50:12 +0200 <maerwald> after seeing expensive haskell consultants fail at the problem :p
2021-10-18 20:50:50 +0200 <c_wraith> Well, it's often hard to retrofit sanity into a large codebase built without it.
2021-10-18 20:51:01 +0200 <monochrom> One of my angles is: so what if other languages are easier to operational-reason with?
2021-10-18 20:51:01 +0200 <c_wraith> But that's true in every language
2021-10-18 20:51:18 +0200 <maerwald> c_wraith: the problem wasn't that there's too much complicated code
2021-10-18 20:51:27 +0200 <monochrom> Does it mean easier to make programs correct?
2021-10-18 20:51:37 +0200 <maerwald> it's that reasoning about laziness is very tricky, even if you force values
2021-10-18 20:51:55 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 268 seconds)
2021-10-18 20:51:55 +0200 <Morrow[m]> koz: https://paste.tomsmeding.com/MIhvwIgV
2021-10-18 20:52:22 +0200 <c_wraith> Not maintaining space invariants is bad, yes
2021-10-18 20:52:31 +0200 <c_wraith> not knowing how to even think about them is even worse
2021-10-18 20:52:39 +0200 <maerwald> in the end... forcing the value at the call-site wasn't enough
2021-10-18 20:53:18 +0200 <c_wraith> yes, this is why StrictData is a bad idea.
2021-10-18 20:53:22 +0200 <maerwald> becuase intermediate thunks built up in a hot loop that were immediately evaluated afterwards, causing excessive allocations
2021-10-18 20:53:26 +0200 <maerwald> c_
2021-10-18 20:53:29 +0200 <maerwald> lol
2021-10-18 20:53:31 +0200 <maerwald> StrictData fixed it
2021-10-18 20:53:37 +0200 <c_wraith> People think it will solve their problems, but it doesn't
2021-10-18 20:53:42 +0200 <maerwald> xD
2021-10-18 20:53:47 +0200 <c_wraith> It just hides the lack of understanding
2021-10-18 20:53:48 +0200 <monochrom> Usually it is Strict that is problematic.
2021-10-18 20:53:53 +0200 <maerwald> it actually did fix it xD
2021-10-18 20:54:03 +0200 <c_wraith> It didn't fix the problem, it made the code work
2021-10-18 20:54:06 +0200 <c_wraith> those are different
2021-10-18 20:54:17 +0200 <maerwald> c_wraith: I don't think you've seen the code :p
2021-10-18 20:54:55 +0200 <monochrom> Yeah, StrictData is a solution because of the way some people define data types.
2021-10-18 20:55:05 +0200 <maerwald> but it took 2 years for someone to figure out these things (among many others)
2021-10-18 20:55:30 +0200 <monochrom> If they presume strict data when they design their types and algorithms, then StrictData is exactly what they need.
2021-10-18 20:55:31 +0200 <maerwald> and those are then people familiar with GHC internals
2021-10-18 20:55:40 +0200 <maerwald> so not your regular Haskeller
2021-10-18 20:56:38 +0200 <maerwald> so... how can you make this knowledge available to everyone? I think you can't, because GHC is a moving target
2021-10-18 20:56:50 +0200 <maerwald> it'll be restricted to a subset of Haskellers
2021-10-18 20:56:53 +0200 <c_wraith> I mean, if StrictData actually solved the problem, you wouldn't have proposals for unlifted data types advertised with "actually fixes the problem"
2021-10-18 20:57:14 +0200 <monochrom> If they are like "data X = X Int Double" and that's what all their types are like, and they're doing foldl' over those types and nothing more interesting than that, then StrictData is for them. They were not using Haskell's laziness in the first place.
2021-10-18 20:57:38 +0200 <alzgh> [exa]: this makes a lot of sense. So function are basically also structures that need an input to produce an output and fmapping some func1 over a func2 applies func1 to the data inside func2 which happens to be its output provided an input. The only dissimilarity with other types of Functors is that the result doesn't preserve the structure and only outputs the value inside it.
2021-10-18 20:57:57 +0200 <monochrom> It is when you have a recursive data type that you begin to question the value of StrictData. (Pun intended!)
2021-10-18 20:58:05 +0200MQ-17J(~MQ-17J@8.6.144.138) (Ping timeout: 258 seconds)
2021-10-18 20:58:10 +0200 <maerwald> if your library depends on inlining behavior of GHC, you will have to study GHC... like, intensely
2021-10-18 20:58:24 +0200 <maerwald> because the next GHC version can break your library
2021-10-18 20:59:27 +0200 <maerwald> If you think I'm making this up, see https://github.com/composewell/streamly/issues/1061
2021-10-18 20:59:37 +0200 <monochrom> FWIW, C compilers are not standing targets either.
2021-10-18 20:59:52 +0200 <monochrom> Cache systems are not standing targets either.
2021-10-18 21:00:21 +0200 <maerwald> monochrom: sure, but not comparable to GHC. There are some pretty mechanical tactics you can teach junior C devs.
2021-10-18 21:00:31 +0200 <monochrom> Every 5 years the two memes "array of structs" and "struct of arrays" swap places.
2021-10-18 21:01:14 +0200 <maerwald> hell, optimizing C code was fun back in uni... because you could figure out what's going on with a little debugging (and without reading compiler code)
2021-10-18 21:01:21 +0200 <[exa]> alzgh: it preserves the structure, it's still a box with something (transformed by the fmapped function) in it
2021-10-18 21:02:10 +0200 <[exa]> alzgh: observe: fmap show [3] ==> ["3"] (the inside got converted to string)
2021-10-18 21:02:35 +0200 <[exa]> alzgh: same with: fmap show (Just 3) ==> (Just "3") again the inside got stringed
2021-10-18 21:02:38 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 21:03:03 +0200 <monochrom> See, this is the problem with saying "structure" and going on to "preserve" it.
2021-10-18 21:03:27 +0200 <[exa]> alzgh: now, for example: fmap show Nothgin ==> Nothing -- looks like nothing happened, but the first Nothing is of type "Maybe Int" (so you know you're missing an Int), and te second is Maybe String (so you know there'd be a String if something arrived)
2021-10-18 21:04:21 +0200 <alzgh> [exa]: this wouldn't hold if the Functor is a function though, would it?
2021-10-18 21:04:31 +0200 <[exa]> alzgh: and the functions are: fmap show (GivenSomeParameterIGiveYou 3) ==> (GivenSomeParameterIGiveYou "3")
2021-10-18 21:04:36 +0200 <monochrom> A formula is worth a thousand pictures (so a million words). The formula "fmap f xs = \a -> f (xs a)" is extremely clear.
2021-10-18 21:05:14 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 260 seconds)
2021-10-18 21:05:41 +0200 <monochrom> Or even to eta-expand one small part: fmap f (\a -> xs a) = (\a -> f (xs a))
2021-10-18 21:06:37 +0200 <[exa]> alzgh: in short, just as a list with something [ _ ] is a kinda-container and (Just _) is a kinda-container, (\param -> _) is a kinda-container too
2021-10-18 21:06:38 +0200 <monochrom> See the highly elegant and symmetric "moving f inside/outside" that rivals any commuting diagram.
2021-10-18 21:07:18 +0200 <monochrom> (So nevermind any word mincing.)
2021-10-18 21:07:31 +0200 <[exa]> alzgh: and fmapping `show` does the same in all three cases, respectively producing: [show _], (Just (show _)), (\param -> show _)
2021-10-18 21:07:50 +0200 <[exa]> end of function-are-boxes allegory :]
2021-10-18 21:07:59 +0200hyiltiz(~quassel@31.220.5.250)
2021-10-18 21:10:54 +0200|57(~|@2601:184:4700:2340:b998:1e2e:a37b:879c)
2021-10-18 21:12:18 +0200rond_(~rond_@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Quit: Client closed)
2021-10-18 21:16:18 +0200hendursa1(~weechat@user/hendursaga) (Quit: hendursa1)
2021-10-18 21:16:46 +0200rekahsoft(~rekahsoft@52.129.35.150) (Remote host closed the connection)
2021-10-18 21:16:50 +0200hendursaga(~weechat@user/hendursaga)
2021-10-18 21:17:32 +0200rekahsoft(~rekahsoft@52.129.35.150)
2021-10-18 21:19:42 +0200danso(~danso@23-233-111-52.cpe.pppoe.ca)
2021-10-18 21:23:21 +0200 <|57> "Parametric polymorphism is to naturality as multiplicity polymorphism is to ________" What, if anything, goes in the blank?
2021-10-18 21:25:45 +0200myShoggoth(~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds)
2021-10-18 21:28:11 +0200glassy(~glassy@user/glassy)
2021-10-18 21:29:10 +0200 <adamCS> Is there any way to use a value of a type in a "top-level-splice" in the same module where that type is defined? I don't know much TH and each time I try to do this I am needing to use Lift (or liftData, which requires Data) and then GHC complains about the stage restriction. But since what I'm doing is deriving instances, if I don't do this in the same module I'll have orphan instances.
2021-10-18 21:30:14 +0200 <adamCS> My TH needs a value because I am deriving an instance for Unbox for a Maybe-like type. So I need to have some value to package up in the "Nothing" case.
2021-10-18 21:30:20 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-18 21:31:16 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Remote host closed the connection)
2021-10-18 21:32:19 +0200fendor(~fendor@91.141.32.95.wireless.dyn.drei.com) (Remote host closed the connection)
2021-10-18 21:33:05 +0200Midjak(~Midjak@82-65-111-221.subs.proxad.net)
2021-10-18 21:33:54 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 21:33:54 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 21:33:54 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 21:34:55 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-10-18 21:36:46 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-10-18 21:37:35 +0200Sgeo(~Sgeo@user/sgeo)
2021-10-18 21:38:23 +0200zincy(~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44) (Read error: Connection reset by peer)
2021-10-18 21:38:40 +0200zincy(~tom@2a00:23c8:970c:4801:8009:c2de:a6e:7c44)
2021-10-18 21:40:18 +0200hgolden(~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Remote host closed the connection)
2021-10-18 21:40:22 +0200 <glassy> hi! how do I write the kind HasOrd where any type a of kind HasOrd has an Ord instance?
2021-10-18 21:40:50 +0200 <glassy> I'd like to write dataType Tree (a :: HasOrd) = E | T Tree a Tree for a binary search tree.
2021-10-18 21:41:43 +0200 <geekosaur> I don't think you do, because kinds other than Type do not have inhabited types afaik?
2021-10-18 21:41:58 +0200 <geekosaur> this may be where QuantifiedConstraints comes in though
2021-10-18 21:43:07 +0200 <geekosaur> you really want a constraint on a, not a kind. and you should not put it on the type definition because it's pretty much useless there
2021-10-18 21:43:24 +0200 <geekosaur> you in particular cannot do that to get away from writing the constraint on functions that use it
2021-10-18 21:44:04 +0200 <geekosaur> kinds will not help you here. constraints will not help you here.
2021-10-18 21:44:52 +0200 <boxscape_> yeah the canonical way to do this is just to supply the Ord constraint to any function that accepts a tree, similar to how Set in the standard library does it
2021-10-18 21:45:45 +0200 <boxscape_> ("supplying a constraint" sounds strange, I think the instances as records abstraction is leaking in my brain)
2021-10-18 21:46:18 +0200 <glassy> hmm
2021-10-18 21:46:37 +0200 <glassy> my issue is that if I liked I could make a Tree a where a does not satisfy Ord a
2021-10-18 21:47:00 +0200 <glassy> the usual solution is to not export constructors and have it as a library so you can't poke around the internals i guess
2021-10-18 21:47:42 +0200 <boxscape_> alas datatype contexts were not implemented correctly when they were added to Haskell ~30 years ago, so `data Ord a => Tree a = ...` does not do what you want, although there has recently-ish been some work to change that
2021-10-18 21:47:45 +0200 <geekosaur> yes, via smart constructors
2021-10-18 21:47:46 +0200 <boxscape_> that doesn't help you now, though
2021-10-18 21:49:11 +0200myShoggoth(~myShoggot@97-120-70-214.ptld.qwest.net)
2021-10-18 21:50:10 +0200 <glassy> yeah DatatypeContexts extension doesn't work at all
2021-10-18 21:50:16 +0200 <glassy> i tried it
2021-10-18 21:50:47 +0200 <kronicmage> iirc you could do it with gadts?
2021-10-18 21:53:21 +0200 <boxscape_> yeah you could also put a constraint on the node constructor like `data Tree a where E :: Tree a; T :: Ord a => Tree a -> a -> Tree a -> Tree a`; that *would* ensure that you can't construct a tree for an a without Ord, though to me it seems a bit weird to pass in an Ord constraint at every Node when really you want the same Ord instance for the
2021-10-18 21:53:21 +0200 <boxscape_> whole tree
2021-10-18 21:53:42 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-18 21:57:07 +0200 <glassy> huh
2021-10-18 21:57:10 +0200 <glassy> it seems to work
2021-10-18 21:57:21 +0200 <glassy> E :: Tree (Int -> Int) doesn't work as it shouldn't
2021-10-18 21:57:42 +0200 <boxscape_> FWIW this is the recent-ish work on datatype contexts I was talking about https://youtu.be/rqmCwpRXT_E?t=64
2021-10-18 21:58:32 +0200 <glassy> oh thank you
2021-10-18 21:58:32 +0200 <monochrom> Ugh how dare they steal a Wadler paper title :)
2021-10-18 21:58:39 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 21:58:39 +0200 <glassy> i really like Richard Eisenberg's stuff
2021-10-18 21:58:47 +0200 <glassy> i watch all the Tweag youtube videos, they are fun
2021-10-18 21:58:53 +0200 <boxscape_> yeah
2021-10-18 21:59:52 +0200 <Franciman> Philip Wadler is a true hero
2021-10-18 22:00:22 +0200 <jackhill> Is there an easy way to tell ghc at build-time where to find gcc & company? I'm brainstorming solutions for https://issues.guix.gnu.org/51213
2021-10-18 22:00:42 +0200 <Franciman> jackhill: I love your work!
2021-10-18 22:00:51 +0200 <Franciman> keep up the great work at guix
2021-10-18 22:02:00 +0200 <jackhill> Franciman: awesome, thanks! We love it too :D
2021-10-18 22:03:23 +0200CiaoSen(~Jura@p5dcc1a24.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2021-10-18 22:04:47 +0200 <geekosaur> jackhill, afaik you can pass CC=... at configure time, but it'll be overridden at install time
2021-10-18 22:04:55 +0200juhp(~juhp@128.106.188.220) (Ping timeout: 252 seconds)
2021-10-18 22:05:03 +0200 <geekosaur> maybe the best you can do is edit the settings file of the installed ghc
2021-10-18 22:05:16 +0200 <Franciman> jackhill: pgmc
2021-10-18 22:05:32 +0200 <Franciman> -pgmc can be used to pass an executable as c compiler
2021-10-18 22:05:44 +0200 <geekosaur> I think pgmc is what they're trying to avoid (that is, not to have to specify it on every use)
2021-10-18 22:05:52 +0200 <Franciman> section 5.11
2021-10-18 22:06:10 +0200 <geekosaur> which is why I'm suggesting the settings file
2021-10-18 22:06:36 +0200 <Franciman> dumb idea, make a wrapper script
2021-10-18 22:06:42 +0200 <geekosaur> alternately installation also uses a configure script and CC=... can be passed there as well; it'll be tested and used to construct the settings file
2021-10-18 22:07:34 +0200juhp(~juhp@128.106.188.220)
2021-10-18 22:07:40 +0200 <geekosaur> which makes it safer than just editing the settings file, especially as it'll also be used to fix any other settings that depend on it
2021-10-18 22:08:17 +0200 <Franciman> is it guaranteed to work?
2021-10-18 22:08:27 +0200 <Franciman> or does it rely on some tacit assumption?
2021-10-18 22:08:54 +0200 <geekosaur> there is an assumption that the compile time and install time compilers are broadly compatible
2021-10-18 22:09:08 +0200 <geekosaur> but in general the install-time configure tries to deal with that
2021-10-18 22:09:29 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-18 22:09:34 +0200 <geekosaur> which is why it's a configure script and not just sed-ing a configure script based on assumptions
2021-10-18 22:11:09 +0200emf_(~emf@2620:10d:c090:400::5:a662)
2021-10-18 22:11:17 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (Quit: Restarting)
2021-10-18 22:11:23 +0200abarbu(~user@c-66-31-23-28.hsd1.ma.comcast.net) (Read error: No route to host)
2021-10-18 22:11:50 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 22:11:50 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 22:11:50 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 22:12:09 +0200myShoggoth(~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 265 seconds)
2021-10-18 22:12:28 +0200eL_Bart0(eL_Bart0@dietunichtguten.org)
2021-10-18 22:13:16 +0200 <geekosaur> er, sed-ing a settings file
2021-10-18 22:13:20 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 260 seconds)
2021-10-18 22:14:11 +0200emf(~emf@2620:10d:c090:400::5:75e7) (Ping timeout: 264 seconds)
2021-10-18 22:15:09 +0200mikoto-chan(~mikoto-ch@185.237.102.123)
2021-10-18 22:15:33 +0200 <Franciman> I am not familiar with guix environment anymore
2021-10-18 22:15:49 +0200 <Franciman> so
2021-10-18 22:16:10 +0200glassy(~glassy@user/glassy) (Quit: Connection closed)
2021-10-18 22:17:06 +0200lavaman(~lavaman@98.38.249.169)
2021-10-18 22:17:13 +0200 <Franciman> not quote me on that
2021-10-18 22:17:29 +0200 <Franciman> but doesn't guix allow defining commands also specifying options?
2021-10-18 22:18:40 +0200 <Franciman> which can be overridden at later stages
2021-10-18 22:19:23 +0200glassy(~glassy@92.40.175.103.threembb.co.uk)
2021-10-18 22:19:52 +0200 <geekosaur> also it seems to me like this is a guix issue, wherein it should make the ghc environment dependent on a C compiler toolchain rather than requiring you to do it yourself
2021-10-18 22:20:58 +0200 <geekosaur> (meaning also it should generate an appropriate settings file based on the C compiler; it may in particular need some settings tweaks for a clang toolchain)
2021-10-18 22:21:25 +0200 <geekosaur> I mean, isn't that part of the point of guix that it deals with those kinds of dependencies for you?
2021-10-18 22:24:33 +0200acidjnk_new(~acidjnk@p200300d0c703cb806ce024b26c2d7c09.dip0.t-ipconnect.de)
2021-10-18 22:26:08 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-10-18 22:26:44 +0200 <Franciman> i agree
2021-10-18 22:26:54 +0200wonko(~wjc@62.115.229.50) (Ping timeout: 260 seconds)
2021-10-18 22:26:57 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2021-10-18 22:26:58 +0200 <Franciman> i suppose they wanted to know how to tell ghc about things
2021-10-18 22:27:06 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 22:27:08 +0200 <Franciman> you gave a nice answer
2021-10-18 22:29:03 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2021-10-18 22:30:02 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2021-10-18 22:30:33 +0200ubert(~Thunderbi@178.115.62.230.wireless.dyn.drei.com) (Remote host closed the connection)
2021-10-18 22:31:11 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2021-10-18 22:31:34 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
2021-10-18 22:31:56 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 22:32:30 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds)
2021-10-18 22:35:04 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-10-18 22:36:36 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-10-18 22:36:36 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 22:36:58 +0200mmhat(~mmh@55d44f19.access.ecotel.net)
2021-10-18 22:37:09 +0200mmhat(~mmh@55d44f19.access.ecotel.net) (Client Quit)
2021-10-18 22:37:35 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-18 22:37:55 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection)
2021-10-18 22:38:13 +0200 <zzz> what are the reasons to avoid rank N types?
2021-10-18 22:38:34 +0200 <awpr> for what value of N?
2021-10-18 22:38:52 +0200 <awpr> 0 => no reason. 1000 => utterly incomprehensible to humans
2021-10-18 22:39:40 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-18 22:39:40 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-18 22:39:40 +0200wroathe(~wroathe@user/wroathe)
2021-10-18 22:41:14 +0200meer(~delicacie@2601:6c4:4080:3f80:cc37:7f71:51d3:b41c)
2021-10-18 22:42:23 +0200jtomas(~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 264 seconds)
2021-10-18 22:42:33 +0200 <dsal> RankNTypes is another one of those "probably should be on by default" extensions as ~2 emerges pretty naturally.
2021-10-18 22:42:44 +0200yates(~user@fv-nc-f7af8b91e1-234237-1.tingfiber.com) (Remote host closed the connection)
2021-10-18 22:43:01 +0200Inst(~delicacie@2601:6c4:4080:3f80:f94e:aef:95ac:8647) (Ping timeout: 245 seconds)
2021-10-18 22:43:02 +0200 <dsal> There's also Rank2Types. Maybe that should be on by default. Or maybe we should make a Rank3Types and definitely stop there.
2021-10-18 22:43:19 +0200 <geekosaur> Rank2Types is just an alias for RankNTypes
2021-10-18 22:43:23 +0200jtomas(~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
2021-10-18 22:43:32 +0200kritzefitz_(~kritzefit@picard.host.weltraumschlangen.de) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
2021-10-18 22:43:38 +0200 <dsal> Lame. I need hard limits.
2021-10-18 22:43:43 +0200 <awpr> I remember having an actual use for a type with a surprisingly large rank recently. 3 or 4
2021-10-18 22:43:50 +0200 <awpr> I'll see if I can find it
2021-10-18 22:43:51 +0200 <geekosaur> dating from back when rank-2 was the best ghc could manage
2021-10-18 22:44:35 +0200 <boxscape_> Also there's an algorithm to infer types for rank-2 that doesn't work for rank-n, but it's not implemented in ghc
2021-10-18 22:45:16 +0200 <awpr> okay it was only rank-3
2021-10-18 22:46:21 +0200cigsender(~cigsender@74.124.58.162) (Quit: leaving)
2021-10-18 22:46:26 +0200 <boxscape_> makes me wonder if there's a reasonable interpretation of negative ranks
2021-10-18 22:46:31 +0200 <int-e> . o O ( continuations are an easy way to increase the rank )
2021-10-18 22:47:43 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 258 seconds)
2021-10-18 22:48:42 +0200 <dsal> All my types are rank.
2021-10-18 22:49:45 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-10-18 22:52:06 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-10-18 22:54:34 +0200brainfreeze(~brainfree@2a03:1b20:4:f011::20d)
2021-10-18 22:58:12 +0200 <monochrom> I like rank-3. callCC :: ((forall b. a -> Cont r b) -> Cont r a) -> Cont r a) is rank-3. 3 is a good limit.
2021-10-18 22:58:36 +0200 <monochrom> And now, not serious: rank-3.141592653... is better :)
2021-10-18 22:59:29 +0200 <monochrom> And now, serious again: With quicklook impredicativity, perhaps unlimited rank-n is pretty OK.
2021-10-18 22:59:31 +0200geekosaurwonders if fractional rank is like fractional dimension
2021-10-18 22:59:47 +0200 <zzz> ok thank you for the answers
2021-10-18 22:59:49 +0200 <zzz> you can stop now
2021-10-18 23:02:22 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
2021-10-18 23:02:57 +0200 <Cajun> wait does GHC have a limit on the N in RankNTypes like it has a limit for tuples?
2021-10-18 23:03:04 +0200 <monochrom> No.
2021-10-18 23:03:04 +0200myShoggoth(~myShoggot@97-120-70-214.ptld.qwest.net)
2021-10-18 23:03:21 +0200 <monochrom> Except computing resource, I suppose.
2021-10-18 23:03:36 +0200 <zzz> i feel someone is going to test that right now
2021-10-18 23:03:45 +0200 <geekosaur> and maybe how big a bunch oif (((((((((((( get
2021-10-18 23:04:20 +0200 <monochrom> Yeah you will have n ->'s and n ('s, perhaps that already kills you.
2021-10-18 23:05:43 +0200 <Cajun> well you can simulate parenthesis on the term level with `($)` , would that be possible on the type level?
2021-10-18 23:08:19 +0200 <geekosaur> no, and suspect it wouldn't be useful anyway
2021-10-18 23:08:59 +0200 <zzz> can we infixr data constructors?
2021-10-18 23:09:02 +0200 <geekosaur> I think that would require a generalized type level lambda, not just type families?
2021-10-18 23:09:15 +0200AWizzArd(~code@gehrels.uberspace.de) (Changing host)
2021-10-18 23:09:15 +0200AWizzArd(~code@user/awizzard)
2021-10-18 23:09:23 +0200 <geekosaur> % :info (:)
2021-10-18 23:09:23 +0200 <yahb> geekosaur: type [] :: * -> *; data [] a = ... | a : [a]; -- Defined in `GHC.Types'; infixr 5 :
2021-10-18 23:09:40 +0200 <awpr> yes, constructors can have fixity, even alphanumeric-named ones
2021-10-18 23:09:53 +0200 <awpr> controls what they do when used in backquotes
2021-10-18 23:11:01 +0200 <boxscape_> hm can you make a type family `Rank :: Nat -> Type` that returns some type of rank n if given n as argument
2021-10-18 23:11:05 +0200 <zzz> nice. didn't know that
2021-10-18 23:11:58 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-18 23:13:01 +0200 <boxscape_> oh right you can't have `forall` on the rhs of a type family definition, hm
2021-10-18 23:14:03 +0200nvmd(~nvmd@user/nvmd) (Quit: Later, nerds.)
2021-10-18 23:14:46 +0200 <boxscape_> % :kind! Rank (S (S (S Z))) (forall a . a)
2021-10-18 23:14:47 +0200 <yahb> boxscape_: *; = (((forall a. a) -> Int) -> Int) -> Int
2021-10-18 23:14:57 +0200 <ph88> Can i use this function to go from a list to a tree ? https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Tree.html#v:unfoldTree if i put a list as b :: [Item] what does it mean to return [b] :: [[Item]] in this case ?
2021-10-18 23:15:12 +0200 <boxscape_> (type family is `type family Rank (n :: Nat) (t :: Type) :: Type where Rank Z t = t; Rank (S n) t = (Rank n t) -> Int`)
2021-10-18 23:17:02 +0200 <boxscape_> % :kind! Rank (ToNat 100) (forall a . a -> a)
2021-10-18 23:17:03 +0200 <yahb> boxscape_: *; = ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((forall a. a -> a) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int
2021-10-18 23:17:06 +0200 <boxscape_> is that a rank 100 type?
2021-10-18 23:17:32 +0200|57(~|@2601:184:4700:2340:b998:1e2e:a37b:879c) (Quit: Client closed)
2021-10-18 23:18:00 +0200 <Cajun> that thing is a monster
2021-10-18 23:18:03 +0200 <awpr> not sure if the Wiki's definition considers that more than rank-1: "where N is the number of foralls which are nested and cannot be merged with a previous one"
2021-10-18 23:18:13 +0200 <boxscape_> hm I see
2021-10-18 23:18:59 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-10-18 23:19:15 +0200 <awpr> maybe the RHS can be `(forall a. t) -> Int`?
2021-10-18 23:19:20 +0200 <hpc> would it work with Rank2Types pre-N-merge?
2021-10-18 23:19:23 +0200mmhat(~mmh@55d44f19.access.ecotel.net)
2021-10-18 23:19:41 +0200 <hpc> if it's rank "1"
2021-10-18 23:20:08 +0200 <awpr> if it's actually 1, maybe it should even work without Rank2Types
2021-10-18 23:20:16 +0200SrPx_(sid108780@uxbridge.irccloud.com) ()
2021-10-18 23:20:44 +0200SrPx(sid108780@id-108780.uxbridge.irccloud.com)
2021-10-18 23:21:07 +0200 <boxscape_> % undefined :: Rank (ToNat 10) (forall a . a -> a)
2021-10-18 23:21:07 +0200 <yahb> boxscape_: ; <interactive>:24:1: error:; * Illegal polymorphic type: forall a. a -> a; Perhaps you intended to use RankNTypes; * When checking the inferred type; it :: ((((((((((forall a. a -> a) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int) -> Int
2021-10-18 23:21:24 +0200 <boxscape_> nope
2021-10-18 23:22:26 +0200 <hpc> what do you know, it does work
2021-10-18 23:22:36 +0200 <hpc> with just ExplicitForAll in my ghci
2021-10-18 23:23:00 +0200 <boxscape_> hm
2021-10-18 23:23:05 +0200 <boxscape_> which version?
2021-10-18 23:23:10 +0200 <awpr> doesn't work on replit.com 8.6.5. have a .ghci with extensions enabled?
2021-10-18 23:23:22 +0200 <boxscape_> % :!ghci --verison
2021-10-18 23:23:22 +0200 <yahb> boxscape_: GHCi, version 9.0.1: https://www.haskell.org/ghc/ :? for help; ghc: unrecognised flag: --verison; Usage: For basic information, try the `--help' option.
2021-10-18 23:23:31 +0200 <boxscape_> --verison works? huh
2021-10-18 23:23:49 +0200 <boxscape_> oh wait
2021-10-18 23:23:56 +0200 <boxscape_> it doesn't, lol
2021-10-18 23:24:04 +0200 <boxscape_> it just happens to display the version in the error message
2021-10-18 23:25:23 +0200 <Cajun> % :!ghc -V
2021-10-18 23:25:23 +0200 <yahb> Cajun: The Glorious Glasgow Haskell Compilation System, version 9.0.1
2021-10-18 23:26:03 +0200 <hpc> The Glorious Glasgow Haskell Compilation System, version 8.8.4
2021-10-18 23:26:16 +0200burnsidesLlama(~burnsides@dhcp168-043.wadham.ox.ac.uk)
2021-10-18 23:26:38 +0200jtomas(~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2021-10-18 23:27:04 +0200 <boxscape_> did you run `:set -XNoRankNTypes` first?
2021-10-18 23:27:16 +0200 <hpc> that's on by default now?
2021-10-18 23:27:21 +0200 <boxscape_> probably not
2021-10-18 23:27:24 +0200 <boxscape_> just want to make sure
2021-10-18 23:27:30 +0200 <hpc> ah
2021-10-18 23:27:34 +0200 <hpc> yeah, still works
2021-10-18 23:27:38 +0200 <boxscape_> hm, interesting
2021-10-18 23:27:58 +0200 <geekosaur> affected by quicklook maybe?
2021-10-18 23:28:08 +0200 <geekosaur> it did change some related behaviors
2021-10-18 23:28:12 +0200 <boxscape_> could be
2021-10-18 23:28:16 +0200 <hpc> quicklook?
2021-10-18 23:28:26 +0200 <geekosaur> the new impredicativity stuff
2021-10-18 23:28:41 +0200Trattue-(~Trattue@152.70.182.158) (Quit: bye)
2021-10-18 23:28:43 +0200 <boxscape_> new implementation of -XImpredicativeTypes
2021-10-18 23:30:34 +0200Trattue(~Trattue@152.70.182.158)
2021-10-18 23:31:47 +0200 <zzz> what have i done
2021-10-18 23:32:44 +0200pavonia(~user@user/siracusa)
2021-10-18 23:38:19 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 23:40:32 +0200guydb89(~guy@98.40.140.117)
2021-10-18 23:41:02 +0200cjb(~cjb@user/cjb)
2021-10-18 23:42:59 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Ping timeout: 264 seconds)
2021-10-18 23:43:08 +0200P1RATEZ(piratez@user/p1ratez) (Quit: https://miguelmigs.com/sensations-remixes-part-1/)
2021-10-18 23:43:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-10-18 23:43:45 +0200Midjak(~Midjak@82-65-111-221.subs.proxad.net) (Quit: Leaving)
2021-10-18 23:45:14 +0200Midjak(~Midjak@82-65-111-221.subs.proxad.net)
2021-10-18 23:45:16 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-10-18 23:46:06 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-18 23:49:26 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 258 seconds)
2021-10-18 23:58:54 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)