2021/10/17

2021-10-17 00:00:35 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2021-10-17 00:01:43 +0200caef^(~caef@70.166.66.234) (Ping timeout: 252 seconds)
2021-10-17 00:02:04 +0200caef^(~caef@70.166.66.234)
2021-10-17 00:03:06 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection)
2021-10-17 00:04:05 +0200LiaoTao(~LiaoTao@gateway/tor-sasl/liaotao)
2021-10-17 00:06:07 +0200acidjnk(~acidjnk@p200300d0c703cb13982ae5e8635fcd4e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-10-17 00:07:42 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
2021-10-17 00:12:02 +0200Psybur(~Psybur@mobile-166-170-34-168.mycingular.net) (Remote host closed the connection)
2021-10-17 00:12:20 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-10-17 00:12:28 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
2021-10-17 00:14:12 +0200Player001(~Player001@user/player001)
2021-10-17 00:14:21 +0200wonko(~wjc@62.115.229.50) (Ping timeout: 268 seconds)
2021-10-17 00:14:47 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6)
2021-10-17 00:14:56 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 00:14:56 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 00:14:56 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 00:18:23 +0200acidjnk(~acidjnk@p200300d0c703cb13596ef3e4428d3d40.dip0.t-ipconnect.de)
2021-10-17 00:20:31 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2021-10-17 00:25:27 +0200hippoid(~idris@184.105.6.88) (Remote host closed the connection)
2021-10-17 00:30:56 +0200 <Inst> question
2021-10-17 00:31:01 +0200 <Inst> why is PYPL claiming that Haskell
2021-10-17 00:31:03 +0200 <Inst> jumped a cliff
2021-10-17 00:31:15 +0200 <monochrom> What is PYPL?
2021-10-17 00:31:44 +0200 <geekosaur> and why should we care about its? their? opinion?
2021-10-17 00:31:45 +0200 <mestre> people that use python
2021-10-17 00:31:51 +0200 <Inst> https://pypl.github.io/PYPL.html
2021-10-17 00:32:08 +0200 <Inst> Haskell dropped from 0.2% of new language learners to 0.0%
2021-10-17 00:32:09 +0200 <monochrom> And why should we know? Why not ask the author?
2021-10-17 00:32:34 +0200 <mestre> abap going storng
2021-10-17 00:33:04 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2021-10-17 00:33:13 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
2021-10-17 00:33:42 +0200 <geekosaur> also we seem to be getting the same number of new learners around here as usual, so I question 0.0%
2021-10-17 00:33:45 +0200 <monochrom> And to be clear, if someone writes "I have been productive in Haskell", we wouldn't know why either, only the author knows. No?
2021-10-17 00:34:13 +0200 <monochrom> I know why I am productive in Haskell, but I can't know about someone else.
2021-10-17 00:34:59 +0200 <hololeap> \(a, T m) -> let (b,m') = f (a,m) in (b, T m')
2021-10-17 00:35:08 +0200 <monochrom> Hell, I probably don't even quite know why I'm productive in Haskell.
2021-10-17 00:35:16 +0200martin02(~silas@141.84.69.76) (Ping timeout: 252 seconds)
2021-10-17 00:35:35 +0200 <hololeap> if I have a lens that unwraps T, how can I use it here?
2021-10-17 00:36:22 +0200russruss(~russruss@my.russellmcc.com)
2021-10-17 00:38:02 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-10-17 00:38:37 +0200 <c_wraith> hololeap: I think you want alongside
2021-10-17 00:39:40 +0200 <hololeap> oh, interesting
2021-10-17 00:40:03 +0200 <c_wraith> you can use id for the other component
2021-10-17 00:40:33 +0200 <Inst> eh, it's a search analytics methodology
2021-10-17 00:40:38 +0200 <hololeap> that's going to be very helpful, because I'm using optics (package) and I've been looking for more ways to combine optics, especially over tuples
2021-10-17 00:40:40 +0200 <Inst> do you know when Haskell 20 / Haskell 2.0 is coming out?
2021-10-17 00:40:55 +0200 <awpr> assuming it's an Iso, it seems like a relevant profunctor to use with that optic might be `newtype Second a b p c d = Second (p (a, c) (b, d))`
2021-10-17 00:41:01 +0200 <hpc> haskell 2.0 is looooooooong in the past
2021-10-17 00:41:23 +0200 <hpc> if it can really be called that
2021-10-17 00:41:24 +0200 <awpr> with the right wrapping and unwrapping, I think that would lift the Iso to work on the right element of a tuple
2021-10-17 00:41:40 +0200 <awpr> hpc: yeah we're at least 2008 versions past that
2021-10-17 00:41:56 +0200 <hpc> we still need to catch up with python 3000 though
2021-10-17 00:42:11 +0200 <awpr> only need 979 years
2021-10-17 00:42:24 +0200 <hpc> we'll be on firefox 3000 by then too
2021-10-17 00:42:30 +0200d34df00d(~d34df00d@2600:1700:8c60:3a10::48)
2021-10-17 00:42:37 +0200 <d34df00d> Hi folks!
2021-10-17 00:42:48 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 00:42:55 +0200 <Inst> I heard a rumor that a major new release of the Haskell Report was supposed to have been in the pipeline?
2021-10-17 00:43:06 +0200 <Inst> TBH, the irony is, I want to use Haskell for the same reason other people use Python; i.e, ease of use.
2021-10-17 00:43:21 +0200 <d34df00d> Did anybody use nvim-hs? I'm trying to display some debugging output from my plugin written in haskell, and I fail at that.
2021-10-17 00:43:41 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 00:43:45 +0200 <hpc> python's "ease of use" is the biggest secret success story of distro packaging ever
2021-10-17 00:44:09 +0200 <hpc> i once tried to get a different version of python on ubuntu and after many hours ended up with something that could run the repl but not pip install
2021-10-17 00:46:00 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-10-17 00:46:19 +0200 <arahael> hpc: i used to be a python fan but after working with it in the enterprise for a while... nup, its awful.
2021-10-17 00:46:33 +0200 <arahael> hpc: however, for your use case, look at pyenv.
2021-10-17 00:46:36 +0200 <hpc> pypi is also missing so much basic stuff
2021-10-17 00:46:44 +0200 <Inst> i mean python is for private use; i.e, it's not really designed for production environments
2021-10-17 00:46:45 +0200 <jacks2> > map (length &&& id &&& map toUpper) ["foo", "bar", "baz"]
2021-10-17 00:46:46 +0200 <lambdabot> [(3,("foo","FOO")),(3,("bar","BAR")),(3,("baz","BAZ"))]
2021-10-17 00:46:47 +0200 <hpc> i can go to hackage and see what things a package depends on, with version numbers
2021-10-17 00:46:51 +0200 <hpc> click a module to get documentation
2021-10-17 00:47:03 +0200 <jacks2> how can I get [(Int, String, String)] instead of [(Int, (String, String)]?
2021-10-17 00:47:04 +0200 <int-e> Python's Implementation of Pain
2021-10-17 00:47:05 +0200 <hpc> on pypi i have to download the whole damn package and read source code to figure out the same thing
2021-10-17 00:47:11 +0200 <hpc> and if you're lucky, the docs are googleable
2021-10-17 00:47:14 +0200 <int-e> (=pip)
2021-10-17 00:47:26 +0200 <arahael> hpc: nevermind pypi, pip is missing a lot, and with bonus exploitability by hackers.
2021-10-17 00:48:26 +0200 <Inst> when was the last time someone did a major production project with haskell, anyways?
2021-10-17 00:48:27 +0200 <arahael> jacks2: i'd probably keep it simple and just "map (\(a, (b, c)) -> (a, b, c)"
2021-10-17 00:49:46 +0200 <jacks2> well yeah, I can just do
2021-10-17 00:49:48 +0200 <ski> > map ((\(n,(s0,s1)) -> (n,s0,s1)) . (length &&& id &&& map toUpper)) ["foo","bar","baz"]
2021-10-17 00:49:50 +0200 <lambdabot> [(3,"foo","FOO"),(3,"bar","BAR"),(3,"baz","BAZ")]
2021-10-17 00:49:50 +0200 <jacks2> > map (\x -> (length x, x, map toUpper x)) ["foo", "bar", "baz"]
2021-10-17 00:49:52 +0200 <lambdabot> [(3,"foo","FOO"),(3,"bar","BAR"),(3,"baz","BAZ")]
2021-10-17 00:50:01 +0200 <jacks2> but I was hoping there's a nifty arrow operator that does this, like ***
2021-10-17 00:50:27 +0200 <arahael> jacks2: then i wouldnt understand your code!
2021-10-17 00:50:57 +0200 <hpc> Inst: https://simulavr.com/
2021-10-17 00:51:01 +0200 <ski> what're you doing with the triples ?
2021-10-17 00:52:22 +0200 <Inst> thanks
2021-10-17 00:52:23 +0200 <jacks2> making two way map out of it
2021-10-17 00:52:41 +0200 <jacks2> I'll just use lambda, no big deal
2021-10-17 00:52:49 +0200 <ski> `Map Int (Map String String)' ?
2021-10-17 00:53:20 +0200 <jacks2> no, types were made up for the question purpose
2021-10-17 00:53:34 +0200 <ski> what do you mean by "two way map" ?
2021-10-17 00:53:52 +0200 <jacks2> I'll try to make a short test case in a few minutes
2021-10-17 00:53:53 +0200 <hololeap> this is what I'm trying to do: http://sprunge.us/wqrAZF -- the constructors have lenses through OverloadedLabels and Optics.Label and I'm wondering how I can do this with optics combinators
2021-10-17 00:54:21 +0200 <jacks2> as far as my original question goes, I'm pretty sure I did this with arrows before though. or maybe I just did a pair?
2021-10-17 00:54:23 +0200 <jacks2> ie:
2021-10-17 00:54:27 +0200martin02(~silas@141.84.69.76)
2021-10-17 00:54:44 +0200 <jacks2> > map (length &&& id) ["fooo", "bar"]
2021-10-17 00:54:45 +0200 <lambdabot> [(4,"fooo"),(3,"bar")]
2021-10-17 00:56:16 +0200 <ski> i tend to call `(id &&&)', `graph' (and `(||| id)', `cograph')
2021-10-17 00:59:13 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-10-17 01:04:02 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 265 seconds)
2021-10-17 01:10:14 +0200danso(~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.2)
2021-10-17 01:14:28 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2021-10-17 01:17:03 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2021-10-17 01:18:48 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 01:23:47 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt) (Remote host closed the connection)
2021-10-17 01:24:24 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt)
2021-10-17 01:24:30 +0200rekahsoft(~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
2021-10-17 01:24:39 +0200acidjnk(~acidjnk@p200300d0c703cb13596ef3e4428d3d40.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2021-10-17 01:28:45 +0200 <ManofLetters[m]> arahael: hi! I tried to message you (from Matrix), but it says you are blocking the messages
2021-10-17 01:28:58 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt) (Ping timeout: 268 seconds)
2021-10-17 01:29:12 +0200 <ManofLetters[m]> was it you kindly interested in LambdaHack yesterday? I left some backlog, but not sure if it reached you
2021-10-17 01:29:44 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 01:29:45 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 01:29:45 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 01:32:33 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
2021-10-17 01:34:05 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 260 seconds)
2021-10-17 01:40:35 +0200martin02(~silas@141.84.69.76) (Ping timeout: 264 seconds)
2021-10-17 01:40:59 +0200hexfive(~eric@50.35.83.177)
2021-10-17 01:41:16 +0200 <jacks2> what should I use for fixed length list/array?
2021-10-17 01:41:46 +0200 <jacks2> I only have a few elements, so efficiency shouldn't matter, but I want compile-time guarantee that there are only n-elements
2021-10-17 01:42:19 +0200 <geekosaur> Array probably
2021-10-17 01:42:34 +0200 <jacks2> hmm, or maybe just (a, a, a, a) ?
2021-10-17 01:42:37 +0200 <arahael> ManofLetters[m]: thanks :) i do block dm's from unregistered users. i was curious but not hugely so, it might be more for sm?
2021-10-17 01:42:48 +0200 <arahael> ManofLetters[m]: as in, the user known as "sm" :)
2021-10-17 01:42:53 +0200 <jacks2> or data FourList = FourList a a a a
2021-10-17 01:43:16 +0200Inst(~Inst@2601:6c4:4080:3f80:24f8:b8f5:afa7:ac97) (Remote host closed the connection)
2021-10-17 01:43:23 +0200 <awpr> https://hackage.haskell.org/package/short-vec jacks2, if you're comfortable with there being DataKinds involved for the length
2021-10-17 01:43:34 +0200Inst(~Inst@2601:6c4:4080:3f80:357d:a798:4766:f7a0)
2021-10-17 01:43:47 +0200 <awpr> although if it's _always_ four and that's the only length you need, that `FourList` is good too
2021-10-17 01:43:58 +0200 <ManofLetters[m]> arahael: oh yes, we chat with sm a lot :)
2021-10-17 01:44:11 +0200 <ManofLetters[m]> arahael: could I ask you a favour?
2021-10-17 01:44:27 +0200 <arahael> ManofLetters[m]: i am just about to duck out... maybe later tonight?
2021-10-17 01:44:43 +0200 <ManofLetters[m]> sure, np, later
2021-10-17 01:44:45 +0200 <arahael> (10:45 am here)
2021-10-17 01:44:50 +0200 <arahael> laters!
2021-10-17 01:44:55 +0200 <ManofLetters[m]> 1:45am here :)
2021-10-17 01:45:01 +0200 <arahael> ha. sleep well!
2021-10-17 01:45:16 +0200 <ManofLetters[m]> have a good day!
2021-10-17 01:46:05 +0200 <ManofLetters[m]> BTW, does anybody know in what sense I'm unregistered? IRC-unregistered or Matrix-unregistered?
2021-10-17 01:46:27 +0200 <arahael> ManofLetters[m]: thanks. and fyi, it's irc-unregistered.
2021-10-17 01:46:28 +0200 <ManofLetters[m]> (this causes me to be unable to message some people)
2021-10-17 01:46:34 +0200 <ManofLetters[m]> oh, ok, fine
2021-10-17 01:46:44 +0200hexfive(~eric@50.35.83.177) (Quit: WeeChat 3.0.1)
2021-10-17 01:51:33 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b4b8:992:53b6:115b) (Remote host closed the connection)
2021-10-17 01:52:22 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-10-17 01:52:54 +0200 <arahael> ManofLetters[m]: also, i deliberately block unregistered users. due to spam.
2021-10-17 01:53:03 +0200arahaelis on his walk now! laters.
2021-10-17 01:54:01 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b4b8:992:53b6:115b)
2021-10-17 01:55:19 +0200hexfive(~eric@50.35.83.177)
2021-10-17 01:59:08 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-10-17 02:01:20 +0200mestre(~mestre@191.177.175.57) (Quit: leaving)
2021-10-17 02:07:06 +0200Midjak(~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep)
2021-10-17 02:07:21 +0200waleee(~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
2021-10-17 02:09:08 +0200waleee(~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
2021-10-17 02:09:52 +0200doyougnu(~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
2021-10-17 02:10:13 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b4b8:992:53b6:115b) (Remote host closed the connection)
2021-10-17 02:10:40 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Quit: Leaving)
2021-10-17 02:12:19 +0200hexfive(~eric@50.35.83.177) (Quit: WeeChat 3.0.1)
2021-10-17 02:13:09 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 265 seconds)
2021-10-17 02:14:55 +0200martin02(~silas@141.84.69.76)
2021-10-17 02:15:57 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
2021-10-17 02:19:27 +0200doyougnu(~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection)
2021-10-17 02:30:30 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2021-10-17 02:35:56 +0200hyiltiz(~quassel@31.220.5.250)
2021-10-17 02:36:24 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2021-10-17 02:39:25 +0200tomsmeding(~tomsmedin@tomsmeding.com) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-17 02:39:55 +0200tomsmeding(~tomsmedin@tomsmeding.com)
2021-10-17 02:41:30 +0200tcard_(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
2021-10-17 02:52:10 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
2021-10-17 02:52:39 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2021-10-17 02:52:39 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-10-17 02:52:42 +0200allbery_bgeekosaur
2021-10-17 03:01:32 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b4b8:992:53b6:115b)
2021-10-17 03:01:32 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 03:02:35 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 03:08:55 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-17 03:17:49 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2021-10-17 03:20:19 +0200jacks2(~bc8165b6@199.204.85.195) (Quit: CGI:IRC)
2021-10-17 03:20:42 +0200xsperry(~xs@user/xsperry) ()
2021-10-17 03:21:16 +0200skideliberately does not block any PMs ..
2021-10-17 03:21:50 +0200 <ski> (.. and deliberately have turned user mode `+i' off)
2021-10-17 03:22:56 +0200 <Inst> I'm curious
2021-10-17 03:23:01 +0200 <Inst> oh, maybe haskell-offtopic
2021-10-17 03:23:15 +0200 <Inst> (are there courses on Haskell that start with Monads then work into everything else?)
2021-10-17 03:23:35 +0200 <ski> doubtful
2021-10-17 03:25:15 +0200xiongxin(~quassel@113.116.224.79)
2021-10-17 03:28:59 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2021-10-17 03:29:18 +0200 <ski> you need to understand higher-order functions, and the basics of types, including polymorphism, and data types for non-trivial examples, to begin with. for `Monad' (the type class) you need to understand type classes & constrained polymorphism, and also higher-order quantification (being able to parameterize not only on concrete types like `Int',`Maybe Int',`Either String Int', but also on type functions
2021-10-17 03:29:24 +0200 <ski> ("incomplete types") like `Maybe',`Either String')
2021-10-17 03:31:56 +0200 <Inst> That looks like 2 chapters of a textbook, tbh
2021-10-17 03:33:02 +0200 <Inst> it'd be fun for Haskell popularization because monads are considered why Haskell is for geniuses, and it's just dumping the crown jewels on someone's head on entry.
2021-10-17 03:33:27 +0200 <geekosaur> monads are an excuse. they're also overrated
2021-10-17 03:36:37 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-10-17 03:36:51 +0200 <nitrix> And they taste really good.
2021-10-17 03:37:50 +0200 <Inst> I'm just scared because I'm getting old and don't have infinite time left, and while Haskell looks great, I'm worried the language will eventually die and it won't be worth my time to learn, and Haskell apparently has a substantial learning curve.
2021-10-17 03:38:41 +0200 <nitrix> Learning Haskell isn't particularly about learning "Haskell" per se.
2021-10-17 03:38:47 +0200xff0x(~xff0x@2001:1a81:5288:5c00:1568:382a:23d8:c3dd) (Ping timeout: 264 seconds)
2021-10-17 03:39:34 +0200xff0x(~xff0x@2001:1a81:5288:5c00:f859:f2f3:e491:70d)
2021-10-17 03:39:58 +0200 <Inst> it's more about a pure functional paradigm
2021-10-17 03:40:07 +0200 <Inst> but it sounds like great fun
2021-10-17 03:40:25 +0200 <Cajun> i dont think the functional paradigm is going anywhere any time soon. other languages are adopting more functional styles, and as it stands industry practices are to avoid mutable states where possible
2021-10-17 03:41:11 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi) (Ping timeout: 264 seconds)
2021-10-17 03:41:28 +0200 <nitrix> You pick up a new paradigm that lets you reason and solve problems from a different perspective (functional programming), with new tools like lazy evaluation and gain a deeper understanding of type theory and its benefits when it's executed well.
2021-10-17 03:41:58 +0200 <Inst> i just feel a bit sad, i have a lot of time on my hands, and i'm trying to do both C++ and Haskell as first languages
2021-10-17 03:42:25 +0200 <Inst> on the other hand, like, supposedly at various uni CS programs, they can teach 3 languages a semester
2021-10-17 03:42:28 +0200 <Inst> my progress is just too slow
2021-10-17 03:42:44 +0200 <nitrix> You could unlearn the "Haskell" part and still be left off with some pretty valuable things.
2021-10-17 03:43:10 +0200 <Inst> bleh, the only nice part is that Learn Me A Haskell goes down faster than Bjarne Stroustrup's C++ intro book
2021-10-17 03:43:39 +0200 <Cajun> personally i dont recommend haskell as a first language. its great as a second language or third, but you dont (or its just more difficult to) immediately see why the restrictions haskell places (the pure part) are any good
2021-10-17 03:44:09 +0200 <nitrix> I would say focus on the paradigms, the concepts, the semantics, the abstractions. You get great millage from generalizations; you can improvise the last mile when necessary.
2021-10-17 03:45:09 +0200 <Inst> https://www.snoyman.com/static/haskell-as-seen-by.png
2021-10-17 03:46:09 +0200 <Inst> so i guess even if Haskell ends up dying off or end sup becoming unusable, I can still switch to F# or run off to Rust
2021-10-17 03:46:27 +0200 <nitrix> Too much of C.S. is based on cargo culting. Haskell doesn't really care whether it's popular or successful.
2021-10-17 03:48:52 +0200 <nitrix> It hasn't died since it's creation, 30 years ago. Nothing indicates that it will in the next 30 years either.
2021-10-17 03:49:13 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 03:51:07 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2021-10-17 03:51:41 +0200 <sm> Inst: I understand your concern. I decided haskell or at least its principles and skills would be long-lived and that it was a better investment of time than C++
2021-10-17 03:52:24 +0200 <sm> that's a fun graphic
2021-10-17 03:53:00 +0200 <sm> hopefully will get an update eventually
2021-10-17 03:53:37 +0200 <Inst> nitrix: I mean, where the hell is Haskell 2020? ;_;
2021-10-17 03:54:13 +0200nunggu(q@gateway/vpn/protonvpn/nunggu) (Quit: WeeChat 3.3)
2021-10-17 03:55:00 +0200 <Cajun> dont we have the haskell2021 extension in 9.2?
2021-10-17 03:55:20 +0200 <yushyin> Cajun: GHC2021
2021-10-17 03:55:42 +0200 <Inst> but for your community
2021-10-17 03:55:47 +0200 <Inst> i'm sort of dumb, as in, really dumb
2021-10-17 03:55:57 +0200 <Inst> but i'm telling my smarter friends that they should, especially if they're mediocre coders, pick up haskell
2021-10-17 03:56:04 +0200 <Inst> as an idiot-proofing language
2021-10-17 03:56:12 +0200 <sm> I think mentoring and support is quite important for learning haskell fast. Doing lots of a small projects and discussing them in here (eg) is one way to do it
2021-10-17 03:56:41 +0200 <nitrix> Inst, Most of the practical issues with the language are solved by libraries in user-space. For the more hairy stuff, it happens at the compiler-level with extensions. Only when extensions have been used for a while, gathered feedback and proven themselves does it make its way back into the language.
2021-10-17 03:57:07 +0200 <Inst> the advertisement for haskell is that it's basically a great private language
2021-10-17 03:57:08 +0200 <nitrix> Inst, That's rather rare though. It's perfectly capable as it is.
2021-10-17 03:57:21 +0200 <Inst> if you're not planning to become a professional developer
2021-10-17 03:57:41 +0200 <Inst> i was about to pay someone 2k to implement a blackjack EV calculator in C++ or Java
2021-10-17 03:57:50 +0200 <Inst> customized to a specific game implementation
2021-10-17 03:57:56 +0200 <nitrix> Are you repeating what you heard or making a judgment call based on your inexperience with it?
2021-10-17 03:58:08 +0200 <Inst> just repeating what i've heard
2021-10-17 03:58:13 +0200xff0x(~xff0x@2001:1a81:5288:5c00:f859:f2f3:e491:70d) (Ping timeout: 252 seconds)
2021-10-17 03:58:14 +0200 <Inst> i'm not saying haskell is bad for professional development
2021-10-17 03:58:30 +0200 <nitrix> I see. That can be dangerous, lot of people are wrong.
2021-10-17 03:58:48 +0200 <Inst> i'm saying it seems like something that's "ivy-educated python"; harder to learn, but once you get it, it's hard to screw up in it
2021-10-17 03:59:28 +0200 <nitrix> I don't... I'm confused what your goal is. I don't think it needs a label. I don't know why you're trying to label/categorize it.
2021-10-17 03:59:44 +0200 <Cajun> "python" and "hard to screw up" seem like alien topics :P
2021-10-17 03:59:47 +0200xff0x(~xff0x@2001:1a81:52c3:e900:4911:9a42:1c49:6483)
2021-10-17 04:01:05 +0200 <nitrix> Just pick it up and try to do anything with it. You'll see what it's good for and what it's less good for.
2021-10-17 04:01:07 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2021-10-17 04:01:28 +0200akspecs__(~akspecs@user/akspecs) (Ping timeout: 252 seconds)
2021-10-17 04:01:57 +0200 <sm> that is true to an extent
2021-10-17 04:02:33 +0200 <nitrix> Ask questions if you run into something that's unfamiliar or that you don't understand. It'll let you assess what you know and what you don't know.
2021-10-17 04:03:01 +0200 <nitrix> Then maybe you'll see the value or maybe you wont.
2021-10-17 04:03:09 +0200[itchyjunk]Guest8004
2021-10-17 04:03:09 +0200Guest8004(~itchyjunk@user/itchyjunk/x-7353470) (Killed (cadmium.libera.chat (Nickname regained by services)))
2021-10-17 04:03:09 +0200[_][itchyjunk]
2021-10-17 04:03:36 +0200 <sm> but it's complicated. Still lots of ways to screw up (your time, if not the code) :)
2021-10-17 04:03:56 +0200 <nitrix> Decision paralysis hasn't gotten anyone anywhere.
2021-10-17 04:04:13 +0200 <nitrix> And we're not salesman.
2021-10-17 04:06:51 +0200 <ski> (sm : i thought <https://i.imgur.com/Xy0RoUg.jpg> was the update ?)
2021-10-17 04:08:21 +0200smtries to imagine haskell dying off or becoming unusable
2021-10-17 04:08:24 +0200 <sm> ooh, thanks
2021-10-17 04:09:36 +0200 <sm> lol
2021-10-17 04:11:02 +0200 <sm> compared to say lisp, haskell requires a lot of complex infrastructure for it to still be a productive working language, am I right ?
2021-10-17 04:11:31 +0200 <sm> hackage, stackage, continually updated libs & bounds..
2021-10-17 04:12:08 +0200akspecs__(~akspecs@136-24-181-20.cab.webpass.net)
2021-10-17 04:12:08 +0200akspecs__(~akspecs@136-24-181-20.cab.webpass.net) (Changing host)
2021-10-17 04:12:08 +0200akspecs__(~akspecs@user/akspecs)
2021-10-17 04:12:33 +0200 <sm> or if those things went offline, would we just keep running last installed ghc version and code everything we needed like a true programmer ?
2021-10-17 04:14:29 +0200DigitalKiwi(~kiwi@2604:a880:400:d0::12fc:5001) (Quit: quite.)
2021-10-17 04:14:37 +0200 <nitrix> You can vendor the compiler and libraries used. You can do that with any language.
2021-10-17 04:15:14 +0200DigitalKiwi(~kiwi@2604:a880:400:d0::12fc:5001)
2021-10-17 04:15:45 +0200peterhil(~peterhil@dsl-hkibng32-54fb52-57.dhcp.inet.fi)
2021-10-17 04:15:59 +0200 <Cajun> i have wondered how lisp macros (for the very very little i know about lisp macros) compare to TH. are there any similarities?
2021-10-17 04:16:05 +0200 <nitrix> Part of risk mitigation in any company is to run your own proxy/registry for your dependencies or commit them with your code.
2021-10-17 04:16:46 +0200akspecs__(~akspecs@user/akspecs) (Ping timeout: 245 seconds)
2021-10-17 04:18:17 +0200akspecs__(~akspecs@136-24-181-20.cab.webpass.net)
2021-10-17 04:18:17 +0200akspecs__(~akspecs@136-24-181-20.cab.webpass.net) (Changing host)
2021-10-17 04:18:17 +0200akspecs__(~akspecs@user/akspecs)
2021-10-17 04:18:20 +0200waleee(~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
2021-10-17 04:18:30 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection)
2021-10-17 04:20:15 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-10-17 04:23:39 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-10-17 04:26:36 +0200markusde(~makrus@2604:3d08:6f80:6b00::2ba7)
2021-10-17 04:27:09 +0200 <Inst> thanks for humoring me
2021-10-17 04:27:53 +0200nitrix(~nitrix@user/nitrix) (Quit: Genius is one percent inspiration and ninety-nine percent perspiration)
2021-10-17 04:27:56 +0200 <Inst> nitrix: I mean that Python's goal is to make relatively high-quality coding accessible to everyone, it spreads basic coding literacy and is highly suitable for non-professional developers
2021-10-17 04:28:19 +0200alzgh(~alzgh@user/alzgh) (Remote host closed the connection)
2021-10-17 04:29:08 +0200 <Inst> I see Haskell's goal as simply to be to make the most "correct" programming language, but I think a side effect is that it's creating a language that makes high-quality coding, as opposed to merely relatively high-quality, accessible to anyone willing to trudge through the concepts needed to understand haskell and make it work
2021-10-17 04:29:30 +0200 <Inst> I see the similarity to Python being that Haskell is highly suitable for non-professional or hobbyist developers
2021-10-17 04:29:34 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
2021-10-17 04:29:56 +0200APic(apic@apic.name) (Ping timeout: 265 seconds)
2021-10-17 04:31:07 +0200harovali(~haroldo@r167-62-172-139.dialup.adsl.anteldata.net.uy)
2021-10-17 04:31:34 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-10-17 04:32:21 +0200nitrix(~nitrix@user/nitrix)
2021-10-17 04:33:35 +0200 <Inst> <Inst> nitrix: I mean that Python's goal is to make relatively high-quality coding accessible to everyone, it spreads basic coding literacy and is highly suitable for non-professional developers
2021-10-17 04:33:35 +0200 <Inst> * alzgh has quit (Remote host closed the connection)
2021-10-17 04:33:35 +0200 <Inst> <Inst> I see Haskell's goal as simply to be to make the most "correct" programming language, but I think a side effect is that it's creating a language that makes high-quality coding, as opposed to merely relatively high-quality, accessible to anyone willing to trudge through the concepts needed to understand haskell and make it work
2021-10-17 04:33:35 +0200 <Inst> <Inst> I see the similarity to Python being that Haskell is highly suitable for non-professional or hobbyist developers
2021-10-17 04:33:42 +0200 <vaibhavsagar[m]> Python's purpose is to be a serviceable DSL for interacting with C libraries
2021-10-17 04:33:57 +0200 <harovali> hi there, any kind soul would help me to understand whats wrong trying to compile this code ? https://pastebin.com/cWSaa4vk
2021-10-17 04:34:17 +0200xiongxin(~quassel@113.116.224.79) (Ping timeout: 265 seconds)
2021-10-17 04:34:26 +0200xiongxin_(~quassel@113.116.32.200)
2021-10-17 04:34:33 +0200 <vaibhavsagar[m]> Haskell's purpose is to exist so that functional programming researches don't have to invent their own subtly different languages when they write papers
2021-10-17 04:35:06 +0200 <nitrix> harovali, The word deriving has to at the end of line 7 or indented on line 8.
2021-10-17 04:35:10 +0200 <vaibhavsagar[m]> harovali: you need to indent your `deriving` clause on line 8
2021-10-17 04:37:51 +0200 <markusde> Beginners conduit question here: My conduit has downstream type (), but it looks like runConduit wants the downstream type to be Void? is that right?
2021-10-17 04:38:32 +0200alx741(~alx741@186.178.108.200) (Quit: alx741)
2021-10-17 04:38:44 +0200 <markusde> I don't see any conduit primitives that have downstream type void, all look like ()
2021-10-17 04:39:32 +0200 <yates> is there a way to use pandoc to translate the language of a document (e.g., from Engish to Chinese) in addition to, or instead of, translating the document format?
2021-10-17 04:39:33 +0200 <harovali> nitrix: vaibhavsagar[m]: thanks !
2021-10-17 04:39:39 +0200 <harovali> now I get this https://pastebin.com/vYemsCrm
2021-10-17 04:39:53 +0200 <nitrix> harovali, Deriving has different flavors. You can use deriving standalone like `deriving instance Eq Foo`, and so, without the indentation in your snippet, it thinks it's that scenario which doesn't allow for parentheses and you get a parsing error.
2021-10-17 04:40:27 +0200xsperry(~xs@user/xsperry)
2021-10-17 04:40:33 +0200 <vaibhavsagar[m]> harovali: if you derive `Enum` automatically then you can't also provide your own manual definition
2021-10-17 04:40:38 +0200 <harovali> nitrix: I'll learn about that !
2021-10-17 04:40:51 +0200 <vaibhavsagar[m]> so you need to remove `Enum` from line 8
2021-10-17 04:40:53 +0200 <nitrix> harovali, Read the error message. You have two instance (two implementations) for the interface Enum.
2021-10-17 04:41:19 +0200 <nitrix> harovali, It gives you the two locations, line :8 and line :10.
2021-10-17 04:41:21 +0200 <harovali> vaibhavsagar[m]: I see that yes thanks dude
2021-10-17 04:41:33 +0200 <harovali> nitrix: yes true
2021-10-17 04:42:25 +0200APic(apic@apic.name)
2021-10-17 04:42:28 +0200 <nitrix> You're provided the filename, then the line number, then the column number, colon-separated.
2021-10-17 04:42:57 +0200 <yates> also, can someone point me to the definition of the AST in real Haskell code?
2021-10-17 04:43:38 +0200 <awpr> markusde: if you have universally quantified downstream type, it can be instantiated to Void when passed to that combinator. if it expects a Void downstream type, that means it expects a conduit that cannot ever yield
2021-10-17 04:44:14 +0200 <awpr> if the downstream type is (), then it does (or at least, could) yield () any number of times
2021-10-17 04:45:13 +0200 <harovali> nitrix: thanks yes. I've read them, but I was (badly) convinced that both definitions were necesary
2021-10-17 04:45:46 +0200hololeap(~hololeap@user/hololeap)
2021-10-17 04:46:14 +0200 <nitrix> harovali, `deriving` is asking for the compiler to implement the instance for you (as long as it's simple enough and based on other derivable things).
2021-10-17 04:46:39 +0200 <harovali> nitrix: thanks for that !
2021-10-17 04:47:32 +0200 <harovali> I wonder how I have to write a 'data' so that it is a pair of types derived from Enums
2021-10-17 04:48:09 +0200 <harovali> data T = (P , C) doesn't compile
2021-10-17 04:48:18 +0200 <markusde> awpr: hm- so if I have a ConduitT () () m r and I want the value m r, how might I get it?
2021-10-17 04:48:47 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 265 seconds)
2021-10-17 04:49:16 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds)
2021-10-17 04:50:19 +0200 <awpr> that seems like a somewhat weird type to have. it'd be like an incremental procedure for computing `r` that you potentially have to poke repeatedly by providing `()` to allow it to continue, and monitor progress by receiving `()`
2021-10-17 04:50:28 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2021-10-17 04:51:07 +0200 <nitrix> harovali, If you simplify the lookup lookup shenanigans you've got, you arrive at pattern matching: https://pastebin.com/FPbRr8qF
2021-10-17 04:52:19 +0200 <nitrix> harovali, And that's also what the derived instance looks like.
2021-10-17 04:52:49 +0200 <nitrix> harovali, You want a tuple that contains something of type P and C? Or members of your enum?
2021-10-17 04:53:21 +0200 <awpr> like either something called `yield ()`, or some type signature overconstrained the type where it didn't need to, or something. there's probably a way to connect it to something that will eat all the `()`s and become runnable, but I suspect it wasn't meant to yield in the first place
2021-10-17 04:53:47 +0200 <harovali> nitrix thanks
2021-10-17 04:53:50 +0200 <nitrix> harovali, data T = (MyDataType, MyDataType) would be a tuple whose elements have to be the members of your enumeration, so Foo, Bar or Baz.
2021-10-17 04:54:19 +0200 <harovali> nitrix, I'd like another type whichis a ordered pair of two previously defined Enums
2021-10-17 04:54:56 +0200 <harovali> nitrix: mmm thatś how I've been writing it but doesn compile, I'll show you the code
2021-10-17 04:55:00 +0200 <markusde> awpr: I mean I'm probably doing something wrong lol. I have a source of type ConduitT () a m () which I fuse eventually with a conduit of type ConduitT a () m r
2021-10-17 04:55:28 +0200 <nitrix> harovali, data T = (FirstType, SecondType). That creates a type T, which is a tuple where the two elements must have the type FirstType and SecondType.
2021-10-17 04:55:42 +0200 <harovali> nitrix: yes I see
2021-10-17 04:56:44 +0200 <nitrix> harovali, When you work with T, it'll need to be those two things inside, all the time. You can make it more generic, like data T a b = (a, b), but I don't think that's what you want at the moment.
2021-10-17 04:56:50 +0200 <harovali> nitrix: please see this https://pastebin.com/fuXDXPcP
2021-10-17 04:56:54 +0200 <awpr> the type of the downstream conduit implies it outputs a stream of `()`s. something like `connect` https://hackage.haskell.org/package/conduit-1.3.4.2/docs/Data-Conduit.html#v:connect expects a sink that cannot output anything downstream
2021-10-17 04:57:58 +0200 <nitrix> harovali, Great! So yeah, you're discovering that the syntax I used isn't legal Haskell ;)
2021-10-17 04:58:12 +0200 <harovali> nitrix: me too !!
2021-10-17 04:58:20 +0200 <harovali> nitrix: hehehehe
2021-10-17 04:58:27 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-10-17 04:58:30 +0200 <harovali> nitrix: how Shoud that be ?
2021-10-17 04:58:53 +0200 <markusde> awpr: Okay- I think I'm starting to see the issue now. So I just need to find a way to fold over my data until without outputting anything downstream
2021-10-17 04:59:10 +0200 <markusde> because my fold is the last conduit anyways
2021-10-17 04:59:40 +0200 <awpr> yeah, what's the sink / last conduit look like?
2021-10-17 05:00:00 +0200 <nitrix> harovali, The start with `data TypeName =` is fine, you have the keyword data followed by the name of the type and the assignment, then you have to list the inhabitants (the values that will have that type).
2021-10-17 05:00:59 +0200 <nitrix> harovali, A very simple example is `data Weekend = Saturday | Sunday`, they're separated by a | character. That's known as a sum type.
2021-10-17 05:01:23 +0200 <markusde> awpr: right now it's a foldlC. The stage before outputs animation frames, and I need to combine them together before running the animation
2021-10-17 05:02:09 +0200 <markusde> I want to continue accepting frames from the conduit until the audio file finishes being processed
2021-10-17 05:02:54 +0200 <harovali> nitrix: I believe that is for "choosing" a type, but what if I want to use an 'only' but consisting of two consecutive values like in (x,y) ?
2021-10-17 05:03:26 +0200 <nitrix> harovali, Those inhabitants can be more complex, they can be constructors that then relies on other types. For example, data Shape = Circle Float | Rectangle Int Int
2021-10-17 05:03:33 +0200 <awpr> foldlC is polymorphic in its output type, so the problem is probably just that you wrote `()` in the type signature, and it should be a free type variable instead
2021-10-17 05:04:44 +0200 <markusde> awpr: wow- dead on. Thank you so much!
2021-10-17 05:04:47 +0200 <nitrix> harovali, Here, `Shape` is the type, while `Circle` and `Rectangle` are data constructors. `Rectangle` wants two arguments of type `Int` to create a `Shape`, so in your code, that could be `Rectangle 10 10`.
2021-10-17 05:04:52 +0200 <harovali> nitrix: so , if I want a more complex value , a composed one, does it have to be a part of another type like Rectangle , but how is Rectangle defined ?
2021-10-17 05:05:16 +0200 <nitrix> harovali, Careful. Rectangle is not a type, it's a data constructor for the type Shape.
2021-10-17 05:05:17 +0200Nosrep(~archbox@user/nosrep)
2021-10-17 05:05:33 +0200 <harovali> nitrix: oh !! yes sure I see
2021-10-17 05:05:40 +0200 <harovali> I'll try
2021-10-17 05:06:06 +0200 <nitrix> harovali, With this, you have two ways of constructing a Shape, it can be a Circle or a Rectangle, and they both have a different number of arguments (and of different types too!).
2021-10-17 05:06:42 +0200 <harovali> nitrix: yes now I remember fromthe tut , that the name of the typeand the constructor may coincide but aren't the same thing , thanks you!!
2021-10-17 05:07:07 +0200 <nitrix> harovali, I'll let you let that sink in, but to answer your question, tuples in Haskell can play the role of types and also constructors. Unfortunately, they use the same syntax.
2021-10-17 05:07:39 +0200 <nitrix> harovali, So (Int, Float) is a proper type, while (42, 19.9) is using the data constructor (,)
2021-10-17 05:07:45 +0200markusde(~makrus@2604:3d08:6f80:6b00::2ba7) (Quit: Leaving)
2021-10-17 05:08:14 +0200 <nitrix> > (,) 10 10
2021-10-17 05:08:15 +0200 <lambdabot> (10,10)
2021-10-17 05:08:21 +0200 <nitrix> :t (10,10)
2021-10-17 05:08:23 +0200 <lambdabot> (Num a, Num b) => (a, b)
2021-10-17 05:08:54 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 05:09:13 +0200 <nitrix> Well, that'd be (Int, Int), but literals in Haskell are quite generic :P
2021-10-17 05:09:45 +0200 <harovali> nitrix: thanks for that snippet !!
2021-10-17 05:11:19 +0200 <nitrix> harovali, I think what's confusing the most here is that (,) is used infix (in between two things), while normally all the constructors are prefix (in front of things).
2021-10-17 05:13:16 +0200 <nitrix> harovali, data Trebejo = MkTrebejo Pieza Color
2021-10-17 05:13:31 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
2021-10-17 05:14:18 +0200 <nitrix> harovali, If you don't mind joining #haskell-beginners for a minute, I'll spam the bot a little to show you.
2021-10-17 05:14:28 +0200 <harovali> nitrix: I go there
2021-10-17 05:26:41 +0200 <hololeap> foldFixM :: (Monad m, Traversable t) => (t a -> m a) -> Fix t -> m a
2021-10-17 05:27:27 +0200 <hololeap> what monad stack can I use here to only go n layers deep into the recursive structure, returning whatever it has accumulated when it hits the limit?
2021-10-17 05:29:44 +0200 <ski> you'd want to have a result of type `m (Fix t)' ?
2021-10-17 05:30:10 +0200 <hololeap> no, return type of `m a`
2021-10-17 05:30:13 +0200 <ski> hm, or maybe `m (Either (Fix t) a)' ..
2021-10-17 05:30:21 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2021-10-17 05:30:35 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 05:30:35 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 05:30:35 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 05:31:08 +0200 <hololeap> mostly I'm wondering what the proper monad transformer for aborting with a value would be... ExceptT? or is there something more appropriate?
2021-10-17 05:32:13 +0200 <ski> if `t' is `Maybe', then if `n = 2' and you pass `(In . Just . In . Just . In . Just . In) Nothing', there can be no `a' to begin with, since you never reach the `Nothing'
2021-10-17 05:33:26 +0200 <ski> `Either' and `ExceptT' is commonly fine for aborting with some result, yea
2021-10-17 05:37:00 +0200 <ski> (fwiw, i'm not quite sure what you mean by "what monad stack can I use here to .." and "I'm wondering what the proper monad transformer for ..". monad stack or transformer, to be used *where* ? in the result type ? in the callback ?)
2021-10-17 05:37:13 +0200 <hololeap> the `m`
2021-10-17 05:37:34 +0200 <ski> `m' is a type variable
2021-10-17 05:38:47 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2021-10-17 05:38:57 +0200 <ski> so .. is having a return type of `ExceptT (Fix t) m a' ok ?
2021-10-17 05:39:26 +0200 <ski> (type of the callback probably also needs to be changed)
2021-10-17 05:39:48 +0200 <hololeap> @unmtl MaybeT (WriterT w (State s)) ()
2021-10-17 05:39:49 +0200 <lambdabot> s -> (Maybe (), w, s)
2021-10-17 05:40:31 +0200 <hololeap> % import Data.Fix
2021-10-17 05:40:32 +0200 <yahb> hololeap:
2021-10-17 05:46:07 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 05:46:07 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 05:46:07 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 05:47:07 +0200retroid_(~retro@2e41e9c8.skybroadband.com) (Ping timeout: 252 seconds)
2021-10-17 05:48:07 +0200 <hololeap> % :t \f limit -> foldFixM (\m -> do { n <- Control.Monad.State.Class.get ; if n > limit then empty else do { tell (f m) ; put (n+1) } })
2021-10-17 05:48:07 +0200 <yahb> hololeap: (Traversable t, MonadState s m, Ord s, Alternative m, MonadWriter w m, Num s) => (t () -> w) -> s -> Fix t -> m ()
2021-10-17 05:48:20 +0200 <hololeap> something like that, I guess
2021-10-17 05:50:18 +0200retroid_(~retro@2e41e9c8.skybroadband.com)
2021-10-17 05:52:40 +0200 <ski> hm, so failing when you hit the limit, and otherwise log the bottom-up callback results ?
2021-10-17 05:53:16 +0200 <ski> (with no interesting monadic result)
2021-10-17 05:54:36 +0200 <hololeap> % :t \f limit -> foldFixM (\m -> do { n <- Control.Monad.State.Class.get ; if n > limit then empty else do { let x = f m; tell x ; put (n+1); pure x } })
2021-10-17 05:54:37 +0200 <yahb> hololeap: ; <interactive>:1:125: error: parse error on input `;'
2021-10-17 05:55:48 +0200 <harovali> nitrix: https://pastebin.com/hUeKFb29
2021-10-17 05:57:12 +0200 <hololeap> % :t \f limit -> foldFixM (\m -> do { n <- Control.Monad.State.Class.get ; if n > limit then empty else let x = f m in do { tell x ; put (n+1); pure x } })
2021-10-17 05:57:12 +0200 <yahb> hololeap: (Traversable t, MonadState s m, Ord s, Alternative m, MonadWriter a m, Num s) => (t a -> a) -> s -> Fix t -> m a
2021-10-17 05:57:34 +0200Patternmaster(~georg@li1192-118.members.linode.com) (Remote host closed the connection)
2021-10-17 05:57:41 +0200 <hololeap> yeah, the monad here is only to a) log some kind of result b) count the number of iterations c) abort when it hits some kind of limit
2021-10-17 05:58:35 +0200xiongxin_(~quassel@113.116.32.200) (Ping timeout: 264 seconds)
2021-10-17 06:01:18 +0200 <hololeap> probably this: MaybeT (WriterT w (State Natural))
2021-10-17 06:02:15 +0200 <nitrix> harovali, Hehe, nice.
2021-10-17 06:03:29 +0200 <nitrix> harovali, You want either putStrLn $ show1 A Uno, or putStrLn (show1 A Uno), the ($) parenthesizes everything on its right so they're redundant.
2021-10-17 06:03:30 +0200 <hololeap> or this: MaybeT (AccumT (Sum Natural) (Writer w))
2021-10-17 06:04:36 +0200 <nitrix> harovali, May I suggest a new type? data Cell = Cell Columna Fila, then you can implement the instance Show Cell and use the show function normally.
2021-10-17 06:04:53 +0200zaquest(~notzaques@5.128.210.178) (Remote host closed the connection)
2021-10-17 06:05:15 +0200 <nitrix> harovali, The beauty in having abstractions is to be able to re-use them in generic code. If you create your own show1, it defeats the purpose a little.
2021-10-17 06:06:51 +0200zaquest(~notzaques@5.128.210.178)
2021-10-17 06:07:01 +0200 <nitrix> harovali, Yes it's a lot of types, but they give you an algebra to express your domain. (aka Algebraic Data Types, ADT).
2021-10-17 06:12:31 +0200 <ski> % :t \limit f ft -> (`fix` (0,ft)) \loop (n,ft@(Fix tft)) -> if n > limit then ExceptT (return (Left ft)) else do ta <- traverse (loop `curry` (n+1)) tft; ExceptT (liftM Right (f ta)) -- hm, not convinced this is actually sensible
2021-10-17 06:12:31 +0200 <yahb> ski: (Num a, Ord a, Monad m, Traversable t) => a -> (t b -> m b) -> Fix t -> ExceptT (Fix t) m b
2021-10-17 06:14:48 +0200 <ski> hololeap : what result do you actually want, when you hit the limit ?
2021-10-17 06:19:01 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-17 06:19:51 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 06:20:02 +0200xiongxin(~quassel@113.116.224.79)
2021-10-17 06:22:20 +0200Patternmaster(~georg@li1192-118.members.linode.com)
2021-10-17 06:25:52 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt)
2021-10-17 06:28:06 +0200nitrixnitrix-or-treat
2021-10-17 06:30:17 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt) (Ping timeout: 265 seconds)
2021-10-17 06:48:49 +0200 <hololeap> ski: this is it http://sprunge.us/448caB
2021-10-17 06:49:01 +0200rekahsoft(~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 268 seconds)
2021-10-17 06:54:13 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-10-17 06:57:21 +0200 <ski> hololeap : oh, that only checks the limit *after* already traversing to the leaves
2021-10-17 06:59:27 +0200 <vaibhavsagar[m]> yates: https://github.com/ghc/ghc/blob/c9922a8e4d598f1c6a048305ca58d0ecf34d6776/compiler/Language/Haskell…
2021-10-17 07:01:26 +0200 <hololeap> *that should have been: else x <$ tell x
2021-10-17 07:02:11 +0200 <hololeap> ski, hm I haven't tested it
2021-10-17 07:02:38 +0200 <ski> (hm, i guess your original code (which also used `foldFixM') also had that issue)
2021-10-17 07:03:28 +0200 <ski> (`foldFixM' does a *bottom-up* traversal. the callback is only given control, on the way back up)
2021-10-17 07:03:35 +0200 <hololeap> so this wouldn't be counting layers, but nodes in the traversal order for t
2021-10-17 07:04:04 +0200 <hololeap> or the reverse order? depth first search?
2021-10-17 07:06:51 +0200 <hololeap> yeah, that makes sense. maybe I should make a version of Fix that carries the number of layers as a typenat
2021-10-17 07:10:40 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 07:10:42 +0200 <hololeap> cata is analogous to foldr, so how do you make a left-fold version of cata?
2021-10-17 07:11:01 +0200 <ski> mu
2021-10-17 07:11:17 +0200 <hololeap> oh, I've seen that in the module
2021-10-17 07:11:35 +0200 <ski>
2021-10-17 07:11:39 +0200 <awpr> the other kind of mu, not the `Mu` type
2021-10-17 07:11:51 +0200xiongxin(~quassel@113.116.224.79) (Ping timeout: 265 seconds)
2021-10-17 07:11:58 +0200 <hololeap> what's "the other kind of mu"
2021-10-17 07:12:19 +0200 <awpr> https://www.awakin.org/read/view.php?tid=583
2021-10-17 07:12:29 +0200 <ski> "The term is often used or translated to mean that the question itself must be \"unasked\": no answer can exist in the terms provided."
2021-10-17 07:12:30 +0200lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-10-17 07:13:25 +0200 <awpr> foldl being a tail-recursive thing that "carries along" information downwards until it reaches the leaves, doesn't naturally make sense in contexts other than lists
2021-10-17 07:13:33 +0200 <hololeap> so the Mu in Data.Fix is just a coincidence??
2021-10-17 07:13:43 +0200 <ski> it's another thing, yea
2021-10-17 07:14:25 +0200 <awpr> like for a binary tree, you could imagine accumulating paths down to the leaves, but it can't just return the recursive call, since there are two of them
2021-10-17 07:15:19 +0200 <hololeap> a binary tree probably has a Foldable instance, so you could use foldl
2021-10-17 07:15:30 +0200 <awpr> there's exactly one root of a tree, so folding leaf-to-root makes sense, but folding root-to-leaf only makes sense when there's exactly one leaf
2021-10-17 07:15:32 +0200 <hololeap> oh, but that's not level-aware
2021-10-17 07:15:40 +0200 <awpr> right, that's a different axis of generalizing folds
2021-10-17 07:15:49 +0200 <awpr> foldr of that is not cata, for example
2021-10-17 07:16:05 +0200 <hololeap> gotcha
2021-10-17 07:16:41 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 265 seconds)
2021-10-17 07:17:13 +0200 <c_wraith> It's really foldl over an in-order traversal.
2021-10-17 07:17:20 +0200 <c_wraith> linearize it, then fold
2021-10-17 07:19:15 +0200 <c_wraith> by the way, https://hackage.haskell.org/package/tree-traversals is an interesting package for doing tree traversals in other orders
2021-10-17 07:23:12 +0200slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-10-17 07:27:33 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-17 07:27:42 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2021-10-17 07:30:22 +0200frosky(~froskyarr@59.41.162.152)
2021-10-17 07:38:58 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-10-17 07:39:59 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 264 seconds)
2021-10-17 07:40:22 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
2021-10-17 07:41:34 +0200bitmapper(~user@142.134.87.154)
2021-10-17 07:43:02 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 07:45:59 +0200bitmapper(~user@142.134.87.154) (Ping timeout: 264 seconds)
2021-10-17 07:47:36 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
2021-10-17 07:53:05 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-17 07:55:35 +0200 <hololeap> c_wraith: good find!
2021-10-17 08:01:23 +0200 <gentauro> I have added this on the top of my module file: `{-# OPTIONS_GHC -Wall -Werror -fpackage-trust #-}`. When I :load the file in GHCi, I get this error: «Prelude: Can't be safely imported! The package (base-4.14.1.0) the module resides in isn't trusted». Which is OK
2021-10-17 08:02:37 +0200 <gentauro> when I then add the `trust flag` like this: `{-# OPTIONS_GHC -Wall -Werror -fpackage-trust -trust=base #-}`, I get the following error: «unknown flag in {-# OPTIONS_GHC #-} pragma: -trust=base», which is not OK
2021-10-17 08:02:55 +0200 <gentauro> anybody know how to add the `-trust=[PKG_GO_HERE]`?
2021-10-17 08:08:28 +0200 <hololeap> gentauro: looks like it's `trust [PKG]` not `trust=[PKG]`, according to the man page for ghc
2021-10-17 08:08:41 +0200 <hololeap> -trust
2021-10-17 08:11:00 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Quit: leaving)
2021-10-17 08:11:11 +0200 <gentauro> hololeap: similar error: «unknown flag in {-# OPTIONS_GHC #-} pragma: -trust [base]» when I write: `{-# OPTIONS_GHC -Wall -Werror -fpackage-trust "-trust [base]" #-}`
2021-10-17 08:12:02 +0200 <gentauro> if I write without quotes, I get tihs: «unknown flag in {-# OPTIONS_GHC #-} pragma: -trust» and «unknown flag in {-# OPTIONS_GHC #-} pragma: [base]»
2021-10-17 08:12:03 +0200 <hololeap> probably get rid of the quotes
2021-10-17 08:12:11 +0200 <gentauro> it's like it doesn't recognize `-trust` …
2021-10-17 08:12:19 +0200 <gentauro> could it be dissallowed?
2021-10-17 08:13:39 +0200 <gentauro> I mean, this works perfectly when in my .cabal file:
2021-10-17 08:13:47 +0200 <gentauro> -fpackage-trust
2021-10-17 08:13:53 +0200 <gentauro> -trust=base
2021-10-17 08:14:02 +0200 <gentauro> ups
2021-10-17 08:14:03 +0200 <gentauro> ghc-options:
2021-10-17 08:14:06 +0200 <gentauro> -fpackage-trust
2021-10-17 08:14:10 +0200 <gentauro> -trust=base
2021-10-17 08:15:41 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 08:17:08 +0200 <hololeap> gentauro: what about this? `import safe Prelude`
2021-10-17 08:17:42 +0200 <hololeap> (in your imports, not the pragma)
2021-10-17 08:18:06 +0200benin(~benin@183.82.25.86)
2021-10-17 08:18:47 +0200 <gentauro> hololeap: I don't import anything from Prelude :)
2021-10-17 08:19:16 +0200 <gentauro> but seems "strange" that I would have to import all modules like that from `base`. That could take some time :)
2021-10-17 08:20:11 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-10-17 08:20:51 +0200 <hololeap> you _always_ import from prelude, unless you have {-# LANGUAGE ImplicitPrelude #-}
2021-10-17 08:23:07 +0200 <gentauro> hololeap: added `{-# LANGUAGE ImplicitPrelude #-}` and then `import safe Prelude`, but I still get: «Prelude: Can't be safely imported! The package (base-4.14.1.0) the module resides in isn't trusted.»
2021-10-17 08:23:57 +0200 <gentauro> it seems that perhaps somebody `disabled` (or forgot) to allow `-fpackage-trust -trust=base` in `{-# OPTIONS_GHC … #-}`
2021-10-17 08:24:56 +0200 <hololeap> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/rebindable_syntax.html#extensi…
2021-10-17 08:25:19 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2021-10-17 08:25:59 +0200 <hololeap> Prelude is imported by default
2021-10-17 08:26:02 +0200 <hololeap> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/safe_haskell.html#safe-imports
2021-10-17 08:26:28 +0200 <gentauro> hololeap: yes, I'm reading the docs https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#options-ghc-pragma
2021-10-17 08:26:47 +0200 <hololeap> you can import Prelude (explicitly) with the safe keyword: import safe Prelude
2021-10-17 08:27:07 +0200 <gentauro> hololeap: yes, I tried that and gives the same error (I just wrote it above)
2021-10-17 08:27:20 +0200 <hololeap> hm ok
2021-10-17 08:27:51 +0200 <gentauro> like I also said, perhaps somebody (disabled/forgot) to add support for `-fpackage-trust -trust=base` in `{-# OPTIONS_GHC … #-}`
2021-10-17 08:28:05 +0200 <gentauro> because it works perfectly in the `.cabal` files :)
2021-10-17 08:40:24 +0200nunggu(q@gateway/vpn/protonvpn/nunggu)
2021-10-17 08:42:00 +0200nunggu(q@gateway/vpn/protonvpn/nunggu) (Client Quit)
2021-10-17 08:50:32 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 08:53:16 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com)
2021-10-17 09:05:15 +0200takuan_dozo(~takuan@178-116-218-225.access.telenet.be)
2021-10-17 09:05:15 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
2021-10-17 09:13:11 +0200gehmehgeh(~user@user/gehmehgeh)
2021-10-17 09:13:37 +0200phma(~phma@host-67-44-208-96.hnremote.net) (Read error: Connection reset by peer)
2021-10-17 09:14:28 +0200phma(~phma@host-67-44-209-44.hnremote.net)
2021-10-17 09:16:17 +0200aegon(~mike@174.127.249.180) (Remote host closed the connection)
2021-10-17 09:18:44 +0200xiongxin(~quassel@113.116.224.79)
2021-10-17 09:24:59 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
2021-10-17 09:25:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-10-17 09:25:17 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b4b8:992:53b6:115b) (Remote host closed the connection)
2021-10-17 09:30:25 +0200ski(~ski@remote12.chalmers.se) (Ping timeout: 252 seconds)
2021-10-17 09:34:52 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Remote host closed the connection)
2021-10-17 09:35:04 +0200azeem(~azeem@2a00:801:238:7fcb:5228:4a72:5b90:f025) (Ping timeout: 265 seconds)
2021-10-17 09:35:06 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 09:35:40 +0200azeem(~azeem@m90-129-195-27.cust.tele2.se)
2021-10-17 09:38:20 +0200ski(~ski@remote12.chalmers.se)
2021-10-17 09:44:13 +0200wonko(~wjc@62.115.229.50)
2021-10-17 09:45:26 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 09:50:55 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
2021-10-17 09:52:07 +0200caef^(~caef@70.166.66.234) (Remote host closed the connection)
2021-10-17 09:55:55 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2021-10-17 09:56:08 +0200retro_(~retro@2e41e9c8.skybroadband.com)
2021-10-17 09:57:14 +0200forell(~forell@user/forell) (Quit: ZNC - https://znc.in)
2021-10-17 09:59:01 +0200retroid_(~retro@2e41e9c8.skybroadband.com) (Ping timeout: 252 seconds)
2021-10-17 09:59:32 +0200forell(~forell@user/forell)
2021-10-17 10:02:19 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Quit: Leaving)
2021-10-17 10:06:12 +0200hendursa1(~weechat@user/hendursaga)
2021-10-17 10:08:06 +0200_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-10-17 10:09:36 +0200hendursaga(~weechat@user/hendursaga) (Ping timeout: 276 seconds)
2021-10-17 10:12:30 +0200max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
2021-10-17 10:16:02 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-10-17 10:16:49 +0200fendor(~fendor@77.119.216.44.wireless.dyn.drei.com)
2021-10-17 10:17:48 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2021-10-17 10:17:48 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-10-17 10:17:51 +0200allbery_bgeekosaur
2021-10-17 10:17:55 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt)
2021-10-17 10:20:55 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-17 10:22:46 +0200o1lo01ol1o(~o1lo01ol1@bl19-157-209.dsl.telepac.pt) (Ping timeout: 265 seconds)
2021-10-17 10:23:49 +0200xiongxin(~quassel@113.116.224.79) (Read error: Connection reset by peer)
2021-10-17 10:24:22 +0200xiongxin(~quassel@113.116.224.79)
2021-10-17 10:25:43 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95)
2021-10-17 10:30:23 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95) (Ping timeout: 264 seconds)
2021-10-17 10:32:11 +0200acidjnk(~acidjnk@p200300d0c703cb97596ef3e4428d3d40.dip0.t-ipconnect.de)
2021-10-17 10:46:45 +0200Inst(~Inst@2601:6c4:4080:3f80:357d:a798:4766:f7a0) (Remote host closed the connection)
2021-10-17 10:47:02 +0200Inst(~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e)
2021-10-17 10:47:02 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-10-17 10:47:16 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2021-10-17 10:53:33 +0200 <hololeap> gentauro: When the -XSafe flag is used, the safe keyword is allowed but meaningless, as every import is treated as a safe import.
2021-10-17 10:53:37 +0200hololeapshrugs
2021-10-17 10:53:52 +0200 <hololeap> it might work
2021-10-17 10:55:39 +0200mc47(~mc47@xmonad/TheMC47)
2021-10-17 10:59:59 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-10-17 11:00:31 +0200IgnatInsarov[m](~kindaroma@2001:470:69fc:105::f5d9) (Quit: You have been kicked for being idle)
2021-10-17 11:02:10 +0200Inst(~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e) (Read error: Connection reset by peer)
2021-10-17 11:07:58 +0200 <gentauro> hololeap: tried that as well
2021-10-17 11:08:23 +0200 <gentauro> but the PRAGMA doesn't `parse` the `-trust=base` value …
2021-10-17 11:08:54 +0200 <gentauro> I'm giving an (online) talk (Spanish) at 19:00 CET so I will just write it's a BUG xD
2021-10-17 11:09:11 +0200gentaurocos it works in .cabal files, I would expect it should work for PRAGMAS as well right?
2021-10-17 11:16:02 +0200azeem(~azeem@m90-129-195-27.cust.tele2.se) (Read error: Connection reset by peer)
2021-10-17 11:17:15 +0200hendursa1(~weechat@user/hendursaga) (Remote host closed the connection)
2021-10-17 11:17:41 +0200hendursa1(~weechat@user/hendursaga)
2021-10-17 11:20:35 +0200 <jophish> boo, ghc 9 doesn't accept my code any more
2021-10-17 11:20:49 +0200 <jophish> `const () :: (forall a b. a -> b) -> ()`
2021-10-17 11:21:52 +0200 <Hecate> % :t const () :: (forall a b. a -> b) -> ()
2021-10-17 11:21:52 +0200 <yahb> Hecate: ; <interactive>:1:1: error:; * Couldn't match type `b0' with `forall a b. a -> b'; Expected: (forall a b. a -> b) -> (); Actual: b0 -> (); Cannot instantiate unification variable `b0'; with a type involving polytypes: forall a b. a -> b; * In the expression: const () :: (forall a b. a -> b) -> ()
2021-10-17 11:21:58 +0200 <Hecate> yummy
2021-10-17 11:22:28 +0200 <Hecate> jophish: Do you think it's intentional?
2021-10-17 11:23:10 +0200 <tomsmeding> :t (\x -> const () x) :: (forall a b. a -> b) -> ()
2021-10-17 11:23:11 +0200 <lambdabot> (forall a b. a -> b) -> ()
2021-10-17 11:23:12 +0200 <jophish> Yeah, I remember seeing some simplification of the type checker along these lines go past
2021-10-17 11:23:20 +0200 <tomsmeding> simplified subsumption is what causes this
2021-10-17 11:23:44 +0200 <tomsmeding> I believe the majority of cases where it makes a difference are fixed by eta expansion, if not all
2021-10-17 11:24:36 +0200 <jophish> 👍️ Thanks both!
2021-10-17 11:25:03 +0200 <tomsmeding> before this was released, there was literally someone that went through the n most popular hackage packages and manually converted them to work with this simplified subsumption
2021-10-17 11:25:30 +0200 <tomsmeding> I believe the only package that wasn't fixed by some form of eta expansion was some package that did wild type-level tricks and the person in question couldn't figure out what was going on :p
2021-10-17 11:26:11 +0200benin(~benin@183.82.25.86) (Ping timeout: 264 seconds)
2021-10-17 11:26:53 +0200 <jophish> hahah
2021-10-17 11:27:13 +0200 <jophish> Mine didn't compile trivially with 9.0 so I guess it missed that!
2021-10-17 11:28:09 +0200benin(~benin@183.82.25.86)
2021-10-17 11:28:55 +0200 <tomsmeding> there's only so many packages one person can manually convert before saying day's over :p
2021-10-17 11:28:59 +0200 <jophish> oh bother, one last thing. I test that I get a specific error message from ghc (should probably reconsider this anyway). but ghc 8 and 9 report different column numbers lol
2021-10-17 11:29:17 +0200 <tomsmeding> but yeah I may have misremembered and there may have been some other issues as well
2021-10-17 11:29:45 +0200 <tomsmeding> hehe I'm fairly sure that's not a "public api" in the sense that they try not to change that
2021-10-17 11:29:53 +0200 <jophish> https://github.com/expipiplus1/autoapply/blob/d72f2eee8c40be48cb4bdb5f3324d88a58cb9147/test/Types.… this becomes column 7 for ghc 9
2021-10-17 11:30:01 +0200 <jophish> yeah, can't really blame ghc here
2021-10-17 11:30:12 +0200hendursa1(~weechat@user/hendursaga) (Remote host closed the connection)
2021-10-17 11:30:23 +0200 <tomsmeding> in fact, there's now an effort underway to overhaul ghc's internal representation of diagnostic messages, so probably in the next release lots of tiny formatting details will change anyway
2021-10-17 11:30:38 +0200hendursa1(~weechat@user/hendursaga)
2021-10-17 11:31:09 +0200 <tomsmeding> jophish: comment already says "7"
2021-10-17 11:31:27 +0200 <jophish> oh, in that case it was 7 and is now 6
2021-10-17 11:31:47 +0200 <tomsmeding> ah
2021-10-17 11:32:42 +0200 <jophish> guess I can use `...` for doctest's arbitrary output
2021-10-17 11:34:10 +0200wz1000(~zubin@static.11.113.47.78.clients.your-server.de) (Ping timeout: 252 seconds)
2021-10-17 11:34:13 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-10-17 11:35:37 +0200 <gentauro> btw, there are no way to have several modules in the same file right? (submitting for a code kata?)
2021-10-17 11:36:07 +0200 <tomsmeding> fairly sure ghc doesn't support that, and the haskell report is ambiguous on whether it's even specified
2021-10-17 11:37:42 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2021-10-17 11:37:42 +0200jakalx(~jakalx@base.jakalx.net)
2021-10-17 11:39:06 +0200shriekingnoise(~shrieking@186.137.144.80) (Quit: Quit)
2021-10-17 11:41:35 +0200 <jophish> See https://github.com/ghc-proposals/ghc-proposals/pull/283 gentauro
2021-10-17 11:47:11 +0200hendursa1(~weechat@user/hendursaga) (Remote host closed the connection)
2021-10-17 11:47:18 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-17 11:47:35 +0200hendursa1(~weechat@user/hendursaga)
2021-10-17 11:49:29 +0200 <gentauro> jophish: thx
2021-10-17 11:50:03 +0200 <jophish> haha, probably won't help you for a looong time
2021-10-17 11:51:38 +0200img(~img@user/img)
2021-10-17 11:53:01 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-17 11:59:32 +0200 <hololeap> I figured out a way to tell ghc that the role of a type (constructor) is not nominal when doing coercions
2021-10-17 11:59:50 +0200 <hololeap> type CoerceF f = forall x y. Coercible x y => Coercible (f x) (f y) :: Constraint
2021-10-17 12:00:17 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: No route to host)
2021-10-17 12:03:44 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
2021-10-17 12:05:14 +0200xiongxin(~quassel@113.116.224.79) (Ping timeout: 265 seconds)
2021-10-17 12:07:43 +0200 <tomsmeding> wasn't there a blog post on haskell weekly recently about this trick?
2021-10-17 12:08:13 +0200hololeapshrugs
2021-10-17 12:08:35 +0200 <hololeap> I didn't read it, if there was
2021-10-17 12:09:11 +0200 <hololeap> % type CoerceF f = forall x y. Coercible x y => Coercible (f x) (f y) :: Constraint
2021-10-17 12:09:11 +0200 <yahb> hololeap:
2021-10-17 12:09:25 +0200 <hololeap> % thing :: CoerceF f => f (Sum Int) -> f Int ; thing = coerce
2021-10-17 12:09:25 +0200 <yahb> hololeap:
2021-10-17 12:09:38 +0200 <hololeap> thing [Sum 1, Sum 2, Sum 3]
2021-10-17 12:09:44 +0200 <hololeap> % thing [Sum 1, Sum 2, Sum 3]
2021-10-17 12:09:44 +0200 <yahb> hololeap: [1,2,3]
2021-10-17 12:10:36 +0200 <hololeap> % thing (Just (Sum 999))
2021-10-17 12:10:36 +0200 <yahb> hololeap: Just 999
2021-10-17 12:10:43 +0200 <tomsmeding> ah no it was here https://discourse.haskell.org/t/describing-type-roles-as-constraints/3410
2021-10-17 12:10:59 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-17 12:15:07 +0200zincy(~tom@2a00:23c8:970c:4801:d922:ea97:b63a:4161)
2021-10-17 12:15:16 +0200 <hololeap> tomsmeding: weird that they came up with that around the same exact time I did
2021-10-17 12:15:27 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 12:15:35 +0200 <hololeap> 100 monkeys or some ***
2021-10-17 12:16:37 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-17 12:16:42 +0200 <tomsmeding> nice how that works, isn't it
2021-10-17 12:17:07 +0200 <hololeap> I had just learned about QuantifiedConstraints
2021-10-17 12:17:32 +0200 <hololeap> it's such a useful extension
2021-10-17 12:17:47 +0200hendursa1(~weechat@user/hendursaga) (Remote host closed the connection)
2021-10-17 12:18:14 +0200hendursa1(~weechat@user/hendursaga)
2021-10-17 12:19:18 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: Connection reset by peer)
2021-10-17 12:20:19 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
2021-10-17 12:20:48 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2021-10-17 12:25:00 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
2021-10-17 12:25:07 +0200 <hololeap> % :set -XUndecidableInstances
2021-10-17 12:25:07 +0200 <yahb> hololeap:
2021-10-17 12:25:26 +0200 <hololeap> % deriving newtype instance (forall a. Semigroup a => Semigroup (f a)) => Semigroup (Fix f)
2021-10-17 12:25:26 +0200 <yahb> hololeap:
2021-10-17 12:25:42 +0200 <hololeap> % deriving newtype instance (forall a. Semigroup a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:25:42 +0200 <yahb> hololeap:
2021-10-17 12:27:03 +0200 <hololeap> what I don't understand is: what does that ^ work, but this \/ doesn't?
2021-10-17 12:27:06 +0200 <hololeap> % deriving newtype instance (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:27:06 +0200 <yahb> hololeap: ; <interactive>:155:1: error:; * Could not deduce (Monoid a) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:155:1-80; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * In
2021-10-17 12:27:45 +0200 <tomsmeding> % :i Fix
2021-10-17 12:27:45 +0200 <yahb> tomsmeding: type role Fix nominal; type Fix :: (* -> *) -> *; newtype Fix f = Fix {unFix :: f (Fix f)}; -- Defined in `Data.Fix'; instance [safe] (forall a. Semigroup a => Monoid (f a)) => Monoid (Fix f) -- Defined at <interactive>:153:1; instance [safe] (forall a. Semigroup a => Semigroup (f a)) => Semigroup (Fix f) -- Defined at <interactive>:152:1; instance Data.Functor.Classes.Eq1 f => Eq (Fix f) -- Defined
2021-10-17 12:29:46 +0200oxide(~lambda@user/oxide)
2021-10-17 12:31:32 +0200 <tomsmeding> the error is not even when writing the instance body, it's the instance _declaration_ that ghc doesn't like
2021-10-17 12:31:41 +0200 <tomsmeding> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f) where
2021-10-17 12:31:41 +0200 <yahb> tomsmeding: ; <interactive>:157:10: error:; * Could not deduce (Monoid a) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:157:10-63; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * I
2021-10-17 12:32:32 +0200 <hololeap> 👏
2021-10-17 12:33:05 +0200 <tomsmeding> and it's also not specific to Fix
2021-10-17 12:33:14 +0200 <tomsmeding> % newtype NonFix f = NonFix (f Int)
2021-10-17 12:33:15 +0200 <yahb> tomsmeding:
2021-10-17 12:33:21 +0200 <tomsmeding> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (NonFix f) where
2021-10-17 12:33:21 +0200 <yahb> tomsmeding: ; <interactive>:159:10: error:; * Could not deduce (Semigroup (NonFix f)) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:159:10-66; * In the instance declaration for `Monoid (NonFix f)'
2021-10-17 12:33:36 +0200 <tomsmeding> wait error is different
2021-10-17 12:33:37 +0200kaiwk(~kai@124.78.251.64)
2021-10-17 12:33:47 +0200 <tomsmeding> oh
2021-10-17 12:34:21 +0200 <hololeap> % instance (forall a. Semigroup a => Monoid (f a)) => Monoid (NonFix f) where
2021-10-17 12:34:22 +0200 <yahb> hololeap: ; <interactive>:160:10: error:; * Could not deduce (Semigroup (NonFix f)) arising from the superclasses of an instance declaration; from the context: forall a. Semigroup a => Monoid (f a) bound by the instance declaration at <interactive>:160:10-69; * In the instance declaration for `Monoid (NonFix f)'
2021-10-17 12:34:22 +0200 <tomsmeding> % instance (forall a. Semigroup a => Semigroup (f a)) => Semigroup (NonFix f) where
2021-10-17 12:34:22 +0200 <yahb> tomsmeding: ; <interactive>:161:10: warning: [-Wmissing-methods]; * No explicit implementation for; `<>'; * In the instance declaration for `Semigroup (NonFix f)'
2021-10-17 12:34:34 +0200 <tomsmeding> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (NonFix f) where
2021-10-17 12:34:34 +0200 <yahb> tomsmeding: ; <interactive>:162:10: error:; * Could not deduce (Monoid a) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:162:10-66; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * I
2021-10-17 12:34:36 +0200 <tomsmeding> there we go
2021-10-17 12:35:12 +0200 <hololeap> the probelm there is that Int isn't a semigroup
2021-10-17 12:35:25 +0200 <tomsmeding> who cares? ghc is complaining about the instance head
2021-10-17 12:36:01 +0200kaiwk(~kai@124.78.251.64) (Remote host closed the connection)
2021-10-17 12:36:11 +0200 <hololeap> % newtype NomFix f = NomFix (f (Sum Int))
2021-10-17 12:36:11 +0200 <yahb> hololeap:
2021-10-17 12:36:36 +0200 <tomsmeding> also, Const m Int is a semigroup if m is a semigroup ;)
2021-10-17 12:36:44 +0200 <tomsmeding> so no inherent contradiction in my NonFix
2021-10-17 12:36:56 +0200 <tomsmeding> nomnom
2021-10-17 12:37:33 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2021-10-17 12:37:34 +0200 <hololeap> % instance (forall a. Semigroup a => Semigroup (f a)) => Semigroup (NomFix f) where
2021-10-17 12:37:34 +0200 <yahb> hololeap: ; <interactive>:164:10: warning: [-Wmissing-methods]; * No explicit implementation for; `<>'; * In the instance declaration for `Semigroup (NomFix f)'
2021-10-17 12:37:51 +0200dsrt^(~dsrt@70.166.66.234)
2021-10-17 12:39:28 +0200 <hololeap> % instance (forall a. Monoid a => Monoid (f a)) => Semigroup (NomFix f) where
2021-10-17 12:39:28 +0200 <yahb> hololeap: ; <interactive>:165:10: warning: [-Wmissing-methods]; * No explicit implementation for; `<>'; * In the instance declaration for `Semigroup (NomFix f)'
2021-10-17 12:39:45 +0200 <hololeap> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (NomFix f) where
2021-10-17 12:39:45 +0200 <yahb> hololeap: ; <interactive>:166:10: warning: [-Wmissing-methods]; * No explicit implementation for; `mempty'; * In the instance declaration for `Monoid (NomFix f)'
2021-10-17 12:39:52 +0200 <tomsmeding> wat
2021-10-17 12:39:58 +0200 <hololeap> lol
2021-10-17 12:40:09 +0200 <hololeap> I have no idea
2021-10-17 12:40:28 +0200 <tomsmeding> like, how can that even make a difference
2021-10-17 12:40:48 +0200 <tomsmeding> % instance Semigroup Int where
2021-10-17 12:40:48 +0200 <yahb> tomsmeding: ; <interactive>:167:10: warning: [-Wmissing-methods]; * No explicit implementation for; `<>'; * In the instance declaration for `Semigroup Int'
2021-10-17 12:40:56 +0200 <tomsmeding> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (NonFix f) where
2021-10-17 12:40:56 +0200 <yahb> tomsmeding: ; <interactive>:168:10: error:; * Could not deduce (Monoid a) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:168:10-66; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * I
2021-10-17 12:41:01 +0200 <tomsmeding> ghc is drunk
2021-10-17 12:41:15 +0200 <hololeap> % instance (forall a. Monoid a => Monoid (f a)) => Monoid (NomFix f) where
2021-10-17 12:41:15 +0200 <yahb> hololeap: ; <interactive>:169:10: warning: [-Wmissing-methods]; * No explicit implementation for; `mempty'; * In the instance declaration for `Monoid (NomFix f)'
2021-10-17 12:41:22 +0200 <hololeap> you gotta use the nomnom
2021-10-17 12:41:33 +0200 <tomsmeding> apparently
2021-10-17 12:41:41 +0200 <tomsmeding> must have Nom in the name, otherwise no monoids for you
2021-10-17 12:42:34 +0200 <hololeap> nomoids
2021-10-17 12:43:09 +0200 <tomsmeding> ah no the difference is something else
2021-10-17 12:43:18 +0200 <tomsmeding> you gave a (Monoid =>Monoid) => Semigroup instance
2021-10-17 12:43:22 +0200 <tomsmeding> that is the crucial difference
2021-10-17 12:43:41 +0200 <tomsmeding> OH
2021-10-17 12:43:51 +0200 <hololeap> % deriving newtype instance (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:43:51 +0200 <yahb> hololeap: ; <interactive>:170:1: error:; * Could not deduce (Monoid a) arising from the superclasses of an instance declaration; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:170:1-80; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * In
2021-10-17 12:44:20 +0200 <tomsmeding> probably when you give an instance 'C => Monoid a', then because of 'class Semigroup a => Monoid a' ghc requires that 'C => Semigroup a'
2021-10-17 12:45:02 +0200 <tomsmeding> but you can't build a 'Semigroup a => Semigroup (f a)' from a 'Monoid a => Monoid (f a)', because what are you going to give to the second function when given just a Semigroup a
2021-10-17 12:45:23 +0200 <tomsmeding> % deriving newtype instance (forall a. Monoid a => Monoid (f a)) => Semigroup (Fix f)
2021-10-17 12:45:23 +0200 <yahb> tomsmeding: ; <interactive>:171:1: error:; * Could not deduce (Monoid a) arising from a use of `<>'; from the context: forall a. Monoid a => Monoid (f a) bound by the instance declaration at <interactive>:171:1-83; or from: Semigroup a bound by a quantified context at <interactive>:1:1; Possible fix: add (Monoid a) to the context of a quantified context; * In the third argument of `coerce'
2021-10-17 12:46:37 +0200 <tomsmeding> ah that's not going to work of course
2021-10-17 12:46:50 +0200 <tomsmeding> oooooh
2021-10-17 12:46:58 +0200 <tomsmeding> % deriving newtype instance (forall a. (Semigroup a, Monoid a) => Monoid (f a)) => Semigroup (Fix f) ; deriving newtype instance (forall a. (Semigroup a, Monoid a) => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:46:59 +0200 <yahb> tomsmeding:
2021-10-17 12:47:08 +0200 <tomsmeding> need to have both at the same time, and then both at the same time
2021-10-17 12:47:53 +0200 <hololeap> why the monoid constraint on (f a) for semigroup?
2021-10-17 12:48:09 +0200td_(~td@94.134.91.73)
2021-10-17 12:48:12 +0200 <tomsmeding> no reason other than to be able to write the Monoid instance for Fix
2021-10-17 12:48:33 +0200 <hololeap> hm, does that actually make sense, though?
2021-10-17 12:48:34 +0200 <tomsmeding> C => Monoid (Fix f) requires that C => Semigroup (Fix f), I think, due to the superclass constraint of Monoid
2021-10-17 12:49:29 +0200 <tomsmeding> so if you have (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f), and also (forall a. Semigroup a => Semigroup (f a)) => Semigroup (Fix f), then ghc needs to somehow make a Semigroup a => Semigroup (f a) from a Monoid a => Monoid (f a)
2021-10-17 12:49:41 +0200 <tomsmeding> and you can't do that in general
2021-10-17 12:49:44 +0200f-a(f2a@f2a.jujube.ircnow.org) ()
2021-10-17 12:50:03 +0200 <tomsmeding> because there's no 'Monoid a' to call that "function" with
2021-10-17 12:50:27 +0200 <tomsmeding> so you need (Semigroup a, Monoid a) on the Semigroup instance in order to write the Monoid instance
2021-10-17 12:50:44 +0200 <tomsmeding> ah and then 'Monoid a => Monoid f a' is sufficient on the monoid instance
2021-10-17 12:50:57 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl)
2021-10-17 12:51:36 +0200 <hololeap> % deriving newtype instance (forall a. (Semigroup a, Monoid a) => Monoid (f a)) => Semigroup (Fix f) ; deriving newtype instance (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:51:36 +0200 <yahb> hololeap:
2021-10-17 12:52:07 +0200 <hololeap> % deriving newtype instance (forall a. (Semigroup a, Monoid a) => Semigroup (f a)) => Semigroup (Fix f) ; deriving newtype instance (forall a. Monoid a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 12:52:07 +0200 <yahb> hololeap: ; <interactive>:174:1: error:; * Could not deduce (Monoid (f a)) arising from a use of `<>'; from the context: forall a. (Semigroup a, Monoid a) => Semigroup (f a) bound by the instance declaration at <interactive>:174:1-101; or from: Monoid a bound by a quantified context at <interactive>:1:1; * In the third argument of `coerce', namely `((<>) @(f (Fix f)))'; In the expression
2021-10-17 12:52:39 +0200 <tomsmeding> hm you ought to be able to make a Semigroup (f a) from a Monoid (f a)
2021-10-17 12:52:58 +0200 <tomsmeding> oh no that's not the instance head, that's defining <>
2021-10-17 12:53:01 +0200 <tomsmeding> this is because of Fix
2021-10-17 12:53:15 +0200 <tomsmeding> can't satisfy the 'Monoid a' constraint recursively if you only get Semigroup (f a)
2021-10-17 12:53:43 +0200 <hololeap> right the `a` will be replaced by `Fix f`
2021-10-17 12:53:49 +0200 <hololeap> oh, that makes sense
2021-10-17 12:54:12 +0200 <tomsmeding> ghc not drunk afterall
2021-10-17 12:54:27 +0200 <hololeap> generally not :)
2021-10-17 12:55:47 +0200 <Franciman> Glasgow Haskell Cointreau
2021-10-17 12:56:08 +0200 <tomsmeding> "the third argument of `coerce', namely `((<>) @(f (Fix f)))'"
2021-10-17 12:56:13 +0200 <tomsmeding> what even are the first and second arguments
2021-10-17 12:56:38 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 12:57:06 +0200DNH(~DNH@2a02:8108:1100:16d8:8896:1441:fbe3:768)
2021-10-17 12:57:32 +0200 <hololeap> maybe because coerce is so damn polymorphic and it's searching for some resolution
2021-10-17 13:00:04 +0200 <hololeap> % deriving newtype instance (forall a. Semigroup a => Semigroup (f a)) => Semigroup (Fix f) ; deriving newtype instance (forall a. Semigroup a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 13:00:04 +0200 <yahb> hololeap:
2021-10-17 13:00:13 +0200 <hololeap> there's also that solution
2021-10-17 13:00:26 +0200 <tomsmeding> right, which makes sense for some f
2021-10-17 13:00:39 +0200 <tomsmeding> kinda sad that you have to choose
2021-10-17 13:00:39 +0200 <hololeap> monoidal-containers
2021-10-17 13:00:53 +0200alx741(~alx741@186.178.108.200)
2021-10-17 13:01:44 +0200 <hololeap> (Eq k, Hashable k, Semigroup a) => Semigroup (MonoidalHashMap k a)
2021-10-17 13:01:54 +0200 <hololeap> (Eq k, Hashable k, Semigroup a) => Monoid (MonoidalHashMap k a)
2021-10-17 13:02:06 +0200 <tomsmeding> yeah also Maybe :p
2021-10-17 13:02:15 +0200 <hololeap> True
2021-10-17 13:02:25 +0200 <hololeap> interesting correlation
2021-10-17 13:02:31 +0200 <tomsmeding> actually lots of stuff
2021-10-17 13:03:04 +0200 <hololeap> although Maybe is isomorphic to HashMap ()
2021-10-17 13:06:26 +0200Guest33(~Guest33@175.101.107.131)
2021-10-17 13:08:25 +0200Guest33(~Guest33@175.101.107.131) (Client Quit)
2021-10-17 13:10:35 +0200xiongxin(~quassel@113.116.224.79)
2021-10-17 13:11:18 +0200rusua(uid124537@id-124537.uxbridge.irccloud.com)
2021-10-17 13:12:01 +0200AlexNoo_(~AlexNoo@94.233.240.148)
2021-10-17 13:14:16 +0200AlexZenon(~alzenon@178.34.163.33) (Ping timeout: 252 seconds)
2021-10-17 13:14:49 +0200Alex_test(~al_test@178.34.163.33) (Ping timeout: 252 seconds)
2021-10-17 13:15:52 +0200AlexNoo(~AlexNoo@178.34.163.33) (Ping timeout: 252 seconds)
2021-10-17 13:19:42 +0200AlexZenon(~alzenon@94.233.240.148)
2021-10-17 13:19:52 +0200Alex_test(~al_test@94.233.240.148)
2021-10-17 13:21:43 +0200tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2021-10-17 13:23:12 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2021-10-17 13:24:41 +0200AlexNoo_AlexNoo
2021-10-17 13:30:06 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-10-17 13:32:27 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it)
2021-10-17 13:35:20 +0200 <nsilv> hey guys random question, does anyone have an easily pullable ready to use nvim configuration for haskell with LSP included somewhere? I just need one for a coding interview task cause I'm running it on a new nixos instance and don't have the time to tinker with it yet haha
2021-10-17 13:35:38 +0200 <nsilv> (I would use vscode with the Haskell plugin but it really doesn't seem to like my nixos)
2021-10-17 13:37:17 +0200 <[exa]> nsilv: https://github.com/neovim/nvim-lspconfig ?
2021-10-17 13:37:48 +0200 <nsilv> [exa]: would that be enough just for a barely functional setup? I'll try it
2021-10-17 13:37:59 +0200 <[exa]> it should kinda work but it's not haskell-specific
2021-10-17 13:38:06 +0200 <[exa]> otoh the haskell specifics should be in the HLS
2021-10-17 13:38:23 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-10-17 13:38:49 +0200 <nsilv> I really wanted to use VSCode just for the time being even if I like nvim more but nixos gets a 404 when trying to pull the tarball T_T
2021-10-17 13:39:37 +0200 <[exa]> why not go without ide?
2021-10-17 13:40:12 +0200 <nsilv> exploring a codebase I don't know mostly. I guess I could just wing it with ghci and ghcid though
2021-10-17 13:40:43 +0200 <[exa]> I live with splitscreen vi/hackage/terminal, and sometimes a bit of grep
2021-10-17 13:40:50 +0200Guest|66(~Guest|66@212.193.94.28)
2021-10-17 13:40:56 +0200 <[exa]> ah yes that helps
2021-10-17 13:40:57 +0200Guest|66(~Guest|66@212.193.94.28) (Client Quit)
2021-10-17 13:41:37 +0200 <[exa]> unless the package has a generated haddock, which should be kinda a best way to start
2021-10-17 13:41:40 +0200 <[exa]> :]
2021-10-17 13:41:41 +0200 <nsilv> the problem is I don't know how to pull up ghcid in their nix setup and it's obviously sunday so I can't really ask and get a response
2021-10-17 13:43:10 +0200 <[exa]> imo, nvim is also a bit of a problematic buildingblock, vim fans stay with vim and many nvim users migrated to the emacsy editors
2021-10-17 13:43:52 +0200 <nsilv> idk I kinda like nvim but I might give emacs a try again, tbh I stopped using emacs cause of performance issues cause I used to run on windows with WSL2
2021-10-17 13:45:14 +0200 <[exa]> some people here were pretty happy with spacemacs and the doom-emacs thing
2021-10-17 13:45:33 +0200__monty__(~toonn@user/toonn)
2021-10-17 13:45:37 +0200 <nsilv> doom was decent for me but spacemacs was abysmally slow, I should probably get a bare emacs setup going
2021-10-17 13:46:11 +0200 <hololeap> nsilv: kate with lsp enabled is good too. nice graphical IDE, but still pretty minimal
2021-10-17 13:46:40 +0200 <nsilv> hololeap: never tried kate
2021-10-17 13:46:44 +0200 <bontaq> doom-emacs is my main editor and it's been pretty good to me
2021-10-17 13:47:22 +0200 <nsilv> I'll definitely try doom again but I usually go down rabbitholes with emacs that last multiple hours hahaha
2021-10-17 13:47:39 +0200 <nsilv> even just installing the nativecomp version scares me
2021-10-17 13:50:42 +0200 <bontaq> that's half the fun (or risk?)
2021-10-17 13:51:09 +0200 <nsilv> yeah but I have a coding task for a job I really want to get and I want to make a good impression and finish it on monday
2021-10-17 13:51:11 +0200 <nsilv> D:
2021-10-17 13:53:01 +0200Guest32(~Guest32@82.40.121.143)
2021-10-17 13:55:32 +0200max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 268 seconds)
2021-10-17 13:56:07 +0200 <hololeap> I still say try out kate. you can generate an lsp config with `haskell-language-server generate-default-config` and a hie.yaml with `gen-hie`. after that it's pretty intuitive
2021-10-17 13:58:07 +0200 <tomsmeding> nsilv: this is a (somewhat...) cleaned up version of my config https://paste.tomsmeding.com/kNVztlGt
2021-10-17 13:58:29 +0200 <tomsmeding> put 'source /home/nsilv/.vimrc' in your .config/nvim/init.vim
2021-10-17 13:58:43 +0200 <tomsmeding> (possibly it also works to put that whole thing in init.vim, not tested)
2021-10-17 13:59:18 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 265 seconds)
2021-10-17 13:59:36 +0200 <tomsmeding> do this https://github.com/junegunn/vim-plug#neovim then run :PlugUpdate in nvim, then restart nvim
2021-10-17 14:00:04 +0200 <Guest32> If I have some type-level naturals `N` defined, and a type family for type-level addition `Add :: N -> N -> N`, I sometimes need to use associativity of addition as a constraint `(Add (Add a b) c ~ Add a (Add b c)) => ...`. I know that this is always true, but is there any way to explain that to GHC?
2021-10-17 14:00:05 +0200 <tomsmeding> lots of non-essential stuff in that config though
2021-10-17 14:00:59 +0200ArctVaulMarsHMPJ(~pjetcetal@2.95.44.252) (Ping timeout: 264 seconds)
2021-10-17 14:01:57 +0200 <hololeap> % :i (+)
2021-10-17 14:01:57 +0200 <yahb> hololeap: type Num :: * -> Constraint; class Num a where; (+) :: a -> a -> a; ...; -- Defined in `GHC.Num'; infixl 6 +
2021-10-17 14:02:18 +0200 <hololeap> % import GHC.TypeNats
2021-10-17 14:02:18 +0200 <yahb> hololeap:
2021-10-17 14:02:21 +0200 <hololeap> % :i (+)
2021-10-17 14:02:21 +0200 <yahb> hololeap: type Num :: * -> Constraint; class Num a where; (+) :: a -> a -> a; ...; -- Defined in `GHC.Num'; infixl 6 +; type (+) :: Nat -> Nat -> Nat; type family (+) a b; -- Defined in `GHC.TypeNats'; infixl 6 +
2021-10-17 14:02:39 +0200mestre(~mestre@191.177.175.57)
2021-10-17 14:03:02 +0200 <hololeap> % undefined :: Proxy (5 + 4)
2021-10-17 14:03:02 +0200 <yahb> hololeap: Proxy
2021-10-17 14:03:11 +0200 <hololeap> % :t undefined :: Proxy (5 + 4)
2021-10-17 14:03:11 +0200 <yahb> hololeap: Proxy 9
2021-10-17 14:03:35 +0200 <tomsmeding> I believe that ghc's type level nats will have the exact same problem, except that there's a ghc plugin, ghc-typelits-natnormalise, that resolves things
2021-10-17 14:04:38 +0200 <hololeap> % :t undefined :: Proxy (5 + 4 + 3)
2021-10-17 14:04:38 +0200 <yahb> hololeap: Proxy 12
2021-10-17 14:04:47 +0200 <hololeap> % :t undefined :: Proxy (5 + (4 + 3))
2021-10-17 14:04:47 +0200 <yahb> hololeap: Proxy 12
2021-10-17 14:04:55 +0200 <hololeap> % :t undefined :: Proxy ((5 + 4) + 3)
2021-10-17 14:04:55 +0200 <yahb> hololeap: Proxy 12
2021-10-17 14:08:13 +0200 <tomsmeding> :set -XScopedTypeVariables -XTypeApplications -XDataKinds -XTypeOperators -XKindSignatures
2021-10-17 14:08:16 +0200 <tomsmeding> % :set -XScopedTypeVariables -XTypeApplications -XDataKinds -XTypeOperators -XKindSignatures
2021-10-17 14:08:16 +0200 <yahb> tomsmeding:
2021-10-17 14:08:27 +0200 <tomsmeding> % f :: Proxy a -> Proxy b -> Proxy c -> Proxy (a + (b + c)) -> () ; f _ _ _ _ = ()
2021-10-17 14:08:27 +0200 <yahb> tomsmeding:
2021-10-17 14:08:35 +0200 <tomsmeding> % g :: forall (a :: Nat) (b :: Nat) (c :: Nat). Proxy a -> Proxy b -> Proxy c -> () ; g pa pb pc = f pa pb pc (Proxy @((a + b) + c))
2021-10-17 14:08:35 +0200 <yahb> tomsmeding: ; <interactive>:186:110: error:; * Couldn't match type: (a + b) + c; with: a + (b + c); Expected: Proxy (a + (b + c)); Actual: Proxy ((a + b) + c); NB: `+' is a non-injective type family; * In the fourth argument of `f', namely `(Proxy @((a + b) + c))'; In the expression: f pa pb pc (Proxy @((a + b) + c)); In an equation for `g': g pa pb pc = f p
2021-10-17 14:08:42 +0200 <tomsmeding> hololeap: ghc doesn't do it
2021-10-17 14:09:13 +0200 <tomsmeding> that's what you need the ghc-typelits-natnormalise plugin for
2021-10-17 14:09:39 +0200 <tomsmeding> Guest32: can't do it without work,
2021-10-17 14:09:52 +0200ArctVaulMarsHMPJ(~pjetcetal@2.95.44.252)
2021-10-17 14:10:40 +0200 <tomsmeding> like, you can write 'proof :: Add a (Add b c) :~: Add (Add a b) c ; proof = unsafeCoerce Refl' and then in your function do `case proof @a @b @c of Refl -> ...`
2021-10-17 14:10:51 +0200 <tomsmeding> for the right values of a,b,c of course
2021-10-17 14:10:59 +0200 <tomsmeding> but not sure if you can get any better
2021-10-17 14:12:26 +0200 <tomsmeding> (the case can be made a bit less intrusive using a pattern guard, '| Refl <- proof @a @b @c =')
2021-10-17 14:16:52 +0200 <Guest32> I'll have a look at that approach, and see how it works. Thanks!
2021-10-17 14:17:28 +0200 <tomsmeding> (note that the usage of unsafeCoerce means that you're literally saying to ghc "trust me this is true, and let the world burn if it isn't")
2021-10-17 14:18:13 +0200 <tomsmeding> not that ghc has the ability to do anything so destructive, hopefully
2021-10-17 14:20:15 +0200 <Guest32> That's fine; I'm willing to accept the consequences if it turns out that addition is non-associative :)
2021-10-17 14:25:59 +0200machinedgod(~machinedg@24.105.81.50)
2021-10-17 14:28:30 +0200stengah(~stengah@user/stengah)
2021-10-17 14:34:21 +0200wz1000(~zubin@static.11.113.47.78.clients.your-server.de)
2021-10-17 14:35:28 +0200ubert(~Thunderbi@77.119.216.214.wireless.dyn.drei.com)
2021-10-17 14:45:25 +0200jespada(~jespada@2803:9800:9842:7a62:a1db:843b:ed19:cad6)
2021-10-17 14:56:11 +0200stengah(~stengah@user/stengah) (Ping timeout: 268 seconds)
2021-10-17 15:09:27 +0200acidjnk_new(~acidjnk@p200300d0c703cb9754638f8907b54fd0.dip0.t-ipconnect.de)
2021-10-17 15:13:24 +0200acidjnk(~acidjnk@p200300d0c703cb97596ef3e4428d3d40.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2021-10-17 15:17:46 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-10-17 15:17:54 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2021-10-17 15:20:11 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 15:21:05 +0200max22-(~maxime@2a01cb0883359800f686a1c3d46594f3.ipv6.abo.wanadoo.fr)
2021-10-17 15:21:19 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 15:21:29 +0200acidjnk_new3(~acidjnk@pd9e0b933.dip0.t-ipconnect.de)
2021-10-17 15:24:57 +0200acidjnk_new(~acidjnk@p200300d0c703cb9754638f8907b54fd0.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2021-10-17 15:26:34 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 15:30:00 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95)
2021-10-17 15:34:35 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95) (Ping timeout: 264 seconds)
2021-10-17 15:47:30 +0200max22-(~maxime@2a01cb0883359800f686a1c3d46594f3.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2021-10-17 15:49:41 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2021-10-17 15:53:42 +0200sedeki(~textual@user/sedeki)
2021-10-17 15:54:50 +0200Guest32(~Guest32@82.40.121.143) (Quit: Client closed)
2021-10-17 15:56:54 +0200stengah(~stengah@user/stengah)
2021-10-17 15:56:58 +0200harovali(~haroldo@r167-62-172-139.dialup.adsl.anteldata.net.uy) (Remote host closed the connection)
2021-10-17 16:00:51 +0200rusua(uid124537@id-124537.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2021-10-17 16:00:59 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-10-17 16:02:56 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2021-10-17 16:04:39 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2021-10-17 16:05:39 +0200max22-(~maxime@2a01cb08833598007c60123fcfb40865.ipv6.abo.wanadoo.fr)
2021-10-17 16:07:31 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 252 seconds)
2021-10-17 16:14:25 +0200DNH(~DNH@2a02:8108:1100:16d8:8896:1441:fbe3:768) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-17 16:14:55 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2021-10-17 16:16:06 +0200sedeki(~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com)
2021-10-17 16:24:13 +0200douglascorrea_io(~douglasco@200.146.85.128.static.gvt.net.br)
2021-10-17 16:33:00 +0200acidjnk_new3(~acidjnk@pd9e0b933.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2021-10-17 16:38:24 +0200gaff(~gaff@49.207.206.71)
2021-10-17 16:38:43 +0200zebrag(~chris@user/zebrag)
2021-10-17 16:40:28 +0200stengah(~stengah@user/stengah) (Ping timeout: 252 seconds)
2021-10-17 16:47:37 +0200douglascorrea_io(~douglasco@200.146.85.128.static.gvt.net.br) (Read error: Connection reset by peer)
2021-10-17 16:49:35 +0200slowButPresent(~slowButPr@user/slowbutpresent)
2021-10-17 16:50:56 +0200gaff(~gaff@49.207.206.71) (Quit: Bye ...)
2021-10-17 16:56:29 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 16:57:45 +0200son0p(~ff@181.136.122.143) (Remote host closed the connection)
2021-10-17 16:59:28 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-10-17 17:01:10 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-10-17 17:02:13 +0200burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 17:02:13 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-17 17:07:35 +0200xff0x(~xff0x@2001:1a81:52c3:e900:4911:9a42:1c49:6483) (Ping timeout: 264 seconds)
2021-10-17 17:07:59 +0200xff0x(~xff0x@2001:1a81:52c3:e900:560c:37be:4840:fb36)
2021-10-17 17:09:17 +0200notzmv(~zmv@user/notzmv)
2021-10-17 17:15:16 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 17:16:00 +0200xiongxin(~quassel@113.116.224.79) (Read error: Connection reset by peer)
2021-10-17 17:17:15 +0200xiongxin(~quassel@113.116.32.200)
2021-10-17 17:20:16 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
2021-10-17 17:24:08 +0200benin5(~benin@183.82.25.86)
2021-10-17 17:27:30 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2021-10-17 17:27:41 +0200benin(~benin@183.82.25.86) (Ping timeout: 264 seconds)
2021-10-17 17:27:41 +0200benin5benin
2021-10-17 17:27:52 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2021-10-17 17:31:43 +0200 <kuribas> (Add (Add a b) c) and (Add a (Add b c)) aren't judgementally equal, no?
2021-10-17 17:32:24 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com)
2021-10-17 17:32:56 +0200 <geekosaur> haskell knows nothing about associativity, so no
2021-10-17 17:35:49 +0200DNH(~DNH@2a02:8108:1100:16d8:8896:1441:fbe3:768)
2021-10-17 17:36:23 +0200 <hpc> they're entirely unequal
2021-10-17 17:36:35 +0200 <hpc> the only thing suggesting equivalence in any form is the data constructor is named "Add"
2021-10-17 17:39:07 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2021-10-17 17:39:12 +0200 <kuribas> yeah, it isn't even possible to prove their equality.
2021-10-17 17:39:24 +0200 <kuribas> which you could do with peano representation.
2021-10-17 17:40:35 +0200DNH(~DNH@2a02:8108:1100:16d8:8896:1441:fbe3:768) (Ping timeout: 264 seconds)
2021-10-17 17:41:50 +0200zer0bitz(~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-10-17 17:43:51 +0200xiongxin(~quassel@113.116.32.200) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-10-17 17:43:58 +0200 <tomsmeding> Add in this case was a type family
2021-10-17 17:45:09 +0200 <kuribas> tomsmeding: how is that defined?
2021-10-17 17:48:11 +0200retroid_(~retro@2e41e9c8.skybroadband.com)
2021-10-17 17:48:37 +0200Psybur(~Psybur@mobile-166-170-34-168.mycingular.net)
2021-10-17 17:50:55 +0200retro_(~retro@2e41e9c8.skybroadband.com) (Ping timeout: 252 seconds)
2021-10-17 17:53:39 +0200 <kuribas> tomsmeding: "If I have some type-level naturals `N` defined" maybe he defined his own type-level nat?
2021-10-17 17:55:42 +0200 <Hecate> kuribas: loved your comment on reddit on the post that was asking for Haskell consultancies
2021-10-17 17:56:00 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-10-17 17:57:09 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 17:57:36 +0200 <kuribas> Hecate: thanks :)
2021-10-17 17:58:02 +0200 <kuribas> Not sure I was going to be downvoted or upvoted :)
2021-10-17 18:00:17 +0200 <kuribas> Hecate: it bothers me many people think haskell is the cryptocurrency language. It isn't even particularly suited for that usecase.
2021-10-17 18:04:18 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 18:04:18 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 18:04:18 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 18:04:26 +0200 <c_wraith> it's better than solidity! (nearly everything is better than solidity)
2021-10-17 18:04:30 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-10-17 18:09:28 +0200 <monochrom> Probably a side effect of the fame of IOHK.
2021-10-17 18:11:45 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds)
2021-10-17 18:13:45 +0200 <monochrom> What surprises me is why Python didn't take that place, given that historically Python has always taken the places of "the <current fad> language", for example machine learning.
2021-10-17 18:14:04 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2021-10-17 18:18:23 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 18:20:04 +0200 <maerwald> kuribas: why?
2021-10-17 18:22:53 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 18:25:50 +0200Psybur(~Psybur@mobile-166-170-34-168.mycingular.net) (Remote host closed the connection)
2021-10-17 18:26:54 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in)
2021-10-17 18:27:03 +0200Kaiepi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-17 18:27:26 +0200Kaiepi(~Kaiepi@156.34.44.192)
2021-10-17 18:28:19 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
2021-10-17 18:30:59 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-10-17 18:31:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-10-17 18:32:05 +0200alzgh(~alzgh@user/alzgh)
2021-10-17 18:40:02 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 268 seconds)
2021-10-17 18:40:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95)
2021-10-17 18:45:49 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net)
2021-10-17 18:52:34 +0200ub(~Thunderbi@77.119.216.214.wireless.dyn.drei.com)
2021-10-17 18:56:58 +0200 <kuribas> maerwald: why what?
2021-10-17 18:57:05 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
2021-10-17 18:57:10 +0200 <maerwald> why is Haskell not suited for cryptocurrency?
2021-10-17 18:57:27 +0200 <kuribas> monochrom: because haskell is seemingly "more robust".
2021-10-17 18:57:31 +0200 <kuribas> monochrom: ?
2021-10-17 18:57:48 +0200 <kuribas> maerwald: I didn't say it's not suited.
2021-10-17 18:58:01 +0200 <maerwald> then I don't understand your remark at all
2021-10-17 18:58:02 +0200 <kuribas> maerwald: it's just not *more* suited than other languages.
2021-10-17 18:58:19 +0200 <maerwald> I don't know of any language that's particularly suited for it then
2021-10-17 18:58:20 +0200 <kuribas> for example, if you need performance, rust should be better.
2021-10-17 18:58:29 +0200fef(~thedawn@user/thedawn)
2021-10-17 18:58:38 +0200 <kuribas> if you need correctness then idris or something dependently typed.
2021-10-17 18:58:43 +0200 <maerwald> kuribas: you're aware that IOHK built a rust and a haskell based node?
2021-10-17 18:58:58 +0200 <maerwald> and the rust one wasn't picked
2021-10-17 18:59:05 +0200 <monochrom> Almost every fad so far, except web 2.0, has needed performance, too.
2021-10-17 18:59:12 +0200 <kuribas> maerwald: I am not.
2021-10-17 18:59:29 +0200 <maerwald> https://github.com/input-output-hk/jormungandr
2021-10-17 18:59:58 +0200 <kuribas> maerwald: I am not interested enough to spend time into blockchain stuff.
2021-10-17 19:00:10 +0200euandreh(~euandreh@2804:14c:33:9fe5:8d5f:78c6:cd1:4a9b) (Quit: WeeChat 3.2)
2021-10-17 19:00:16 +0200 <maerwald> kuribas: well, then I find your remark not very enlightening
2021-10-17 19:02:06 +0200 <maerwald> I'd argue it's hard for a language to particularly be suited for "usecase X", unless it was designed for it
2021-10-17 19:03:00 +0200 <monochrom> I think we all agree on that.
2021-10-17 19:03:37 +0200 <kuribas> maerwald: I don't want to be enlightening. I just want people to not take haskell is good for crypto stuff for granted.
2021-10-17 19:03:54 +0200 <kuribas> maerwald: just because someone uses it is not proof that it is good.
2021-10-17 19:04:17 +0200 <maerwald> well, what would be a proof then?
2021-10-17 19:04:29 +0200 <geekosaur> do we care?
2021-10-17 19:04:30 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-17 19:04:33 +0200 <monochrom> My http://www.vex.net/~trebla/humour/tautologies.html is not enlightening at all. Just tautologies. Well, I don't know, turns out stupid humans find them enlightening.
2021-10-17 19:04:40 +0200euandreh(~euandreh@2804:14c:33:9fe5:ed38:680c:308b:2321)
2021-10-17 19:04:55 +0200euandreh(~euandreh@2804:14c:33:9fe5:ed38:680c:308b:2321) (Client Quit)
2021-10-17 19:05:19 +0200euandreh(~euandreh@2804:14c:33:9fe5:ed38:680c:308b:2321)
2021-10-17 19:05:35 +0200 <kuribas> maerwald: I don't know... a convincing paper clearly outlining the benefits?
2021-10-17 19:05:41 +0200 <maerwald> a paper? :D
2021-10-17 19:05:45 +0200maerwaldchuckles
2021-10-17 19:06:08 +0200 <maerwald> I've seen papers about "language X is better" and they're usually a joke
2021-10-17 19:06:41 +0200 <geekosaur> I do agree that stuffing a language into a niche is probably bad
2021-10-17 19:07:11 +0200 <geekosaur> especially if people take it in both directions "well, then it's only good for cryptocurrencies"
2021-10-17 19:07:19 +0200 <geekosaur> which people do because they're dumb
2021-10-17 19:07:29 +0200 <maerwald> Well, the thing is: IOHK has enough engineering power to build a blockchain in POSIX shell with awk.
2021-10-17 19:07:48 +0200 <maerwald> But that goes for Google, Facebook etc as well
2021-10-17 19:08:05 +0200 <monochrom> Humans want stereotyping. It gives them simpler mental models and self-confidence. They can then say "I know" rather than "I don't know, it depends".
2021-10-17 19:08:51 +0200 <maerwald> I'm not even sure what a language would look like that was specifically designed for blockchain
2021-10-17 19:08:59 +0200 <maerwald> Blockchain is so complicated, no one understands it
2021-10-17 19:09:12 +0200 <geekosaur> doesn't blockchain kinda specify one?
2021-10-17 19:09:34 +0200 <geekosaur> with haskell here being used as the implemnentation language for it?
2021-10-17 19:09:49 +0200 <kuribas> maerwald: "I'd argue it's hard for a language to particularly be suited for "usecase X", unless it was designed for it" <= disagree.
2021-10-17 19:10:07 +0200 <kuribas> maerwald: haskell is quite nice for backends, but I don't think it was design with that purpose.
2021-10-17 19:10:32 +0200onionzzz
2021-10-17 19:10:35 +0200 <maerwald> kuribas: what type of backends
2021-10-17 19:10:47 +0200 <maerwald> I know it's really bad at event sourced backends
2021-10-17 19:10:48 +0200 <monochrom> This is where "it's hard" comes in. It does not mean "never".
2021-10-17 19:11:14 +0200 <monochrom> Then again I would phrase it as "less chance".
2021-10-17 19:11:16 +0200 <kuribas> well, it could have been nice for UIs, if there was good UI support.
2021-10-17 19:11:41 +0200 <zzz> what are discussing here?
2021-10-17 19:11:47 +0200 <zzz> *we
2021-10-17 19:11:50 +0200 <maerwald> we're just talking strangely
2021-10-17 19:12:17 +0200 <monochrom> Is "language X is for Y" a thing?
2021-10-17 19:12:19 +0200 <APic> *nod*
2021-10-17 19:13:26 +0200 <monochrom> But did anyone notice the pun in my "Probably a side effect of the fame of IOHK"? :)
2021-10-17 19:13:56 +0200 <kuribas> monochrom: well done :)
2021-10-17 19:15:06 +0200Pickchea(~private@user/pickchea)
2021-10-17 19:18:47 +0200 <zzz> is french good for commercials? is swahili good for poems? is latin good for public announcements?
2021-10-17 19:19:21 +0200 <monochrom> I have a better idea.
2021-10-17 19:20:05 +0200 <zzz> i write my shopping list in mandarin. i find it is the best language for that
2021-10-17 19:20:16 +0200Inst(~Inst@2601:6c4:4080:3f80:f9d5:5879:9db5:ac95)
2021-10-17 19:20:34 +0200 <zzz> enlgish is the best language for irc
2021-10-17 19:20:41 +0200 <zzz> english even
2021-10-17 19:20:51 +0200 <monochrom> One day, someone made a very good horror movie, and it's in French. Then, everyone went crazy and whenever they made more horror movies they stuck to French.
2021-10-17 19:21:59 +0200 <maerwald> zzz: shopping list in Klingon
2021-10-17 19:22:17 +0200 <maerwald> horror movies in korean
2021-10-17 19:22:31 +0200 <monochrom> Clearly, Chopin Liszt is best in music notation.
2021-10-17 19:23:17 +0200 <zzz> a 12yo girl showed me an episode of squid game this weekend. i asked her if that was supposed to be horror or comedy
2021-10-17 19:23:37 +0200 <monochrom> Oh, about that.
2021-10-17 19:24:20 +0200 <hpc> zzz: actually fun fact, english is not the language of irc - []` are substitutes for finnish characters (iirc)
2021-10-17 19:24:21 +0200 <zzz> Chopin Liszt *clap*
2021-10-17 19:24:32 +0200 <hpc> and {}~ are the upper-case variants
2021-10-17 19:24:33 +0200 <monochrom> I went to watch The Neon Demon. The theatre had just me and two girls. The girls were giggling at every horror scene.
2021-10-17 19:24:57 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 19:24:57 +0200 <maerwald> japanese is best for giggling I think
2021-10-17 19:24:59 +0200 <monochrom> That was enlightening. I realized there is no line between horror and comedy.
2021-10-17 19:25:04 +0200Kaiepi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 19:25:40 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net) (Ping timeout: 268 seconds)
2021-10-17 19:25:50 +0200 <monochrom> Oh BTW after the movie I did contemplate "should I have meat ball pasta for dinner" if you have also watched the movie >:)
2021-10-17 19:25:56 +0200mortemeur(~mortemeur@pool-173-76-107-201.bstnma.fios.verizon.net)
2021-10-17 19:26:43 +0200 <zzz> hpc: that went over my head
2021-10-17 19:27:08 +0200 <geekosaur> it's why you can use those characters in nicks
2021-10-17 19:27:24 +0200 <geekosaur> as far as rfc1459 is concerned they're letters, not symbols
2021-10-17 19:27:47 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85)
2021-10-17 19:28:00 +0200 <zzz> that's interesting
2021-10-17 19:28:00 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 260 seconds)
2021-10-17 19:28:03 +0200 <geekosaur> from the scandinavian iso8859 variant, I forget what its number is
2021-10-17 19:28:08 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 19:28:26 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 19:28:40 +0200 <geekosaur> like one of those characters maps to ø
2021-10-17 19:28:54 +0200 <hpc> if you try changing your nick to zzz` and then try joining in another client as ZZZ~, you'll find you can't
2021-10-17 19:28:59 +0200 <hpc> because nicks are case-insensitive
2021-10-17 19:29:35 +0200 <zzz> isn't ~ a reserved symbol?
2021-10-17 19:29:41 +0200 <geekosaur> not in irc
2021-10-17 19:30:03 +0200 <geekosaur> hm, actualy ~ is not in the list
2021-10-17 19:30:10 +0200 <geekosaur> I just got an error for using it
2021-10-17 19:30:23 +0200 <zzz> ~ is for the admin i think
2021-10-17 19:30:25 +0200^|{`-}_{(trebla@shell.vex.net)
2021-10-17 19:30:33 +0200 <^|{`-}_{> Hi, you're talking about me? :)
2021-10-17 19:30:49 +0200^|{`-}_{(trebla@shell.vex.net) (Client Quit)
2021-10-17 19:30:50 +0200 <hpc> oh, it's \ and |
2021-10-17 19:31:01 +0200 <monochrom> That was me :)
2021-10-17 19:31:11 +0200 <geekosaur> yes, saw that from the host :þ
2021-10-17 19:31:14 +0200 <hpc> | is lowercase \
2021-10-17 19:31:25 +0200 <zzz> that makes more sense
2021-10-17 19:31:36 +0200 <hpc> as much as any of it makes sense :D
2021-10-17 19:31:51 +0200 <geekosaur> does any of the internet make sense?
2021-10-17 19:32:02 +0200 <hpc> occasionally arxiv makes sense
2021-10-17 19:32:07 +0200 <monochrom> do humans make sense? >:)
2021-10-17 19:34:35 +0200 <zzz> i love the "i use base 10" joke
2021-10-17 19:37:39 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2021-10-17 19:37:51 +0200Pickchea(~private@user/pickchea)
2021-10-17 19:56:03 +0200douglascorrea_io(~douglasco@200.146.85.128.static.gvt.net.br)
2021-10-17 19:56:35 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 260 seconds)
2021-10-17 19:58:05 +0200segfaultfizzbuzz(~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 265 seconds)
2021-10-17 20:03:31 +0200nsilv(~NSilv@host-87-15-180-17.retail.telecomitalia.it) (Quit: WeeChat 2.7.1)
2021-10-17 20:04:23 +0200 <awpr> hololeap: that CoerceF trick is also in https://hackage.haskell.org/package/attenuation, and I doubt I was the first to use it either
2021-10-17 20:06:07 +0200max22-(~maxime@2a01cb08833598007c60123fcfb40865.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2021-10-17 20:07:47 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-17 20:09:02 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85)
2021-10-17 20:09:51 +0200 <Hecate> < zzz> ~ is for the admin i think // It's a sigil like @ and +, but it's prepended to the nickname by the IRC server, not part of the nickname in itself
2021-10-17 20:10:18 +0200sedeki(~textual@user/sedeki)
2021-10-17 20:11:51 +0200 <zzz> Hecate: yes, that's what i remember from when i used to run a network
2021-10-17 20:12:09 +0200wroathe(~wroathe@50-205-197-50-static.hfc.comcastbusiness.net)
2021-10-17 20:12:09 +0200wroathe(~wroathe@50-205-197-50-static.hfc.comcastbusiness.net) (Changing host)
2021-10-17 20:12:09 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 20:12:41 +0200jgeerds(~jgeerds@55d4da80.access.ecotel.net)
2021-10-17 20:13:33 +0200betelgeuse(~betelgeus@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat)
2021-10-17 20:13:44 +0200brainfreeze(~brainfree@2a03:1b20:4:f011::20d)
2021-10-17 20:15:33 +0200 <kuribas> zzz: well, I'd say french is a more poetic language than german. French: Je t'aime. German: Verdammt ich lieb dich.
2021-10-17 20:16:14 +0200 <sedeki> liebe?
2021-10-17 20:16:41 +0200sedekidoesn't know German
2021-10-17 20:17:17 +0200 <gehmehgeh> kuribas: no "verdammt" in that sentence in
2021-10-17 20:17:38 +0200 <APic> Mu-ha-ha.
2021-10-17 20:17:43 +0200 <APic> ♥♥♥ 😸
2021-10-17 20:18:28 +0200 <kuribas> https://www.youtube.com/watch?v=Bk5Qm_0_0HM
2021-10-17 20:18:31 +0200max22-(~maxime@2a01cb0883359800952563b5640f70e9.ipv6.abo.wanadoo.fr)
2021-10-17 20:18:49 +0200 <kuribas> https://www.youtube.com/watch?v=x6q0ciiqyG0
2021-10-17 20:19:02 +0200 <[exa]> I sorted the languages once by the amount of shades between [ə:] and [ü:] that you need to recognize to understand anything at all, and French didn't score well
2021-10-17 20:20:27 +0200 <monochrom> Oh nice, audio hamming distance :)
2021-10-17 20:25:22 +0200 <awpr> hololeap, tomsmeding: as for the Fix issue, I think GHC gets while trying to solve the `Semigroup (Fix f)` superclass, because it selects the Semigroup instance and tries to solve its quantified context `forall a. Semigroup a => Semigroup (f a)`, then chooses to solve that via the given quantified context `forall a. Monoid a => Monoid (f a)` plus the superclass relationship, leaving it with a `Monoid a` constraint it can't solve
2021-10-17 20:25:27 +0200 <awpr> gets confused*
2021-10-17 20:26:18 +0200 <awpr> i.e. it could solve `forall a. Monoid a => Semigroup (f a)`, but not the more demanding `forall a. Semigroup a => Semigroup (f a)` that the `Semigroup` instance wants
2021-10-17 20:26:53 +0200 <awpr> % deriving instance (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)) => Monoid (Fix f)
2021-10-17 20:26:53 +0200 <yahb> awpr: ; <interactive>:187:19: error:; * Could not deduce (Semigroup (f a)); from the context: (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)); bound by a stand-alone deriving instance declaration:; forall (f :: * -> *). (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)) => Monoid (Fix f); at <interactive>:1
2021-10-17 20:27:21 +0200 <kuribas> https://www.youtube.com/watch?v=tSaJOu7kO1g
2021-10-17 20:27:44 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 20:27:44 +0200 <kuribas> sorry, getting too offtopic.
2021-10-17 20:28:11 +0200coot(~coot@37.30.48.91.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-10-17 20:28:21 +0200 <awpr> huh. works on repl.it with 8.6.5 https://replit.com/@AndrewPritchard/AwfulLuckyIdentifier#main.hs
2021-10-17 20:28:34 +0200kuribas(~user@ptr-25vy0ial9ts1i2t1r9b.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2021-10-17 20:33:10 +0200benin(~benin@183.82.25.86) (Ping timeout: 252 seconds)
2021-10-17 20:33:13 +0200Alleria(~textual@user/alleria)
2021-10-17 20:37:39 +0200shriekingnoise(~shrieking@186.137.144.80)
2021-10-17 20:40:43 +0200burnside_(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-17 20:40:50 +0200 <tomsmeding> awpr: that conclusion is kind of what I also said, isn't it?
2021-10-17 20:40:52 +0200vjoki(~vjoki@2a00:d880:3:1::fea1:9ae) (Ping timeout: 252 seconds)
2021-10-17 20:42:21 +0200 <tomsmeding> % deriving instance (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)) => Monoid (Fix f); deriving instance (forall a. Semigroup a => Semigroup (f a)) => Semigroup (Fix f)
2021-10-17 20:42:22 +0200 <yahb> tomsmeding: ; <interactive>:188:19: error:; * Could not deduce (Semigroup (f a)); from the context: (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)); bound by a stand-alone deriving instance declaration:; forall (f :: * -> *). (forall a. Semigroup a => Semigroup (f a), forall a. Monoid a => Monoid (f a)) => Monoid (Fix f); at <interactive>:1
2021-10-17 20:42:24 +0200 <tomsmeding> oh
2021-10-17 20:42:29 +0200 <tomsmeding> oh well
2021-10-17 20:42:36 +0200 <tomsmeding> kuribas '"If I have some type-level naturals `N` defined" maybe he defined his own type-level nat?' -> presumably, yes :p
2021-10-17 20:42:47 +0200 <awpr> oh yeah, didn't see that part. pretty similar
2021-10-17 20:43:06 +0200machinedgod(~machinedg@24.105.81.50)
2021-10-17 20:44:47 +0200econo(uid147250@user/econo)
2021-10-17 20:47:08 +0200 <albet70> newtype CoroutineT r m a = CoroutineT {runCoroutineT' :: ContT r (StateT [CoroutineT r m ()] m) a} is this an infinite type?
2021-10-17 20:47:11 +0200mniip(mniip@libera/staff/mniip) (Ping timeout: 624 seconds)
2021-10-17 20:47:13 +0200vjoki(~vjoki@2a00:d880:3:1::fea1:9ae)
2021-10-17 20:48:05 +0200 <ski> it's a recursively defined type
2021-10-17 20:48:25 +0200 <albet70> does it have a bottom type?
2021-10-17 20:48:46 +0200 <ski> bottom type ?
2021-10-17 20:49:10 +0200 <ski> (no idea what you mean by that)
2021-10-17 20:49:14 +0200Sgeo(~Sgeo@user/sgeo)
2021-10-17 20:49:54 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-10-17 20:50:36 +0200 <albet70> like Leaf a in data Tree a = Leaf a | Node (Tree a) (Tree a)
2021-10-17 20:51:10 +0200 <albet70> so there always a value can have that type
2021-10-17 20:51:20 +0200 <c_wraith> ContT is a function
2021-10-17 20:51:40 +0200 <xsperry> Leaf a is a value of type Tree, not a "bottom type". there's bottom value, there's no bottom type AFAIK
2021-10-17 20:51:55 +0200ski. o O ( "A Poor Man's Concurrency Monad" (Functional Pearl) by Koen Claessen in 1999 at <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.8039> )
2021-10-17 20:51:58 +0200 <albet70> but CoroutineT inside StateT is not clear
2021-10-17 20:51:59 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-10-17 20:52:35 +0200vjoki(~vjoki@2a00:d880:3:1::fea1:9ae) (Ping timeout: 260 seconds)
2021-10-17 20:52:49 +0200 <ski> what is not clear about it ?
2021-10-17 20:53:10 +0200xff0x(~xff0x@2001:1a81:52c3:e900:560c:37be:4840:fb36) (Ping timeout: 260 seconds)
2021-10-17 20:53:54 +0200xff0x(~xff0x@2001:1a81:52c3:e900:6f99:de0e:9a06:26db)
2021-10-17 20:55:08 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 20:55:26 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 20:55:37 +0200 <albet70> newtype C r m a = C ContT r (C r m a) a
2021-10-17 20:55:51 +0200python476(~user@88.160.31.174)
2021-10-17 20:56:23 +0200 <ski> @kind ContT
2021-10-17 20:56:23 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 20:56:24 +0200 <lambdabot> k -> (k -> *) -> * -> *
2021-10-17 20:56:51 +0200 <ski> `C r m a' has kind `*' (not `k -> *')
2021-10-17 20:56:53 +0200 <albet70> there's no such thing like Leaf a in Tree a for C r m a
2021-10-17 20:56:56 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 20:56:57 +0200vjoki(~vjoki@2a00:d880:3:1::fea1:9ae)
2021-10-17 20:57:06 +0200 <ski> so ?
2021-10-17 20:57:34 +0200zzz(~z@user/zero) ()
2021-10-17 20:57:43 +0200 <ski> `return x' has type `ContT r m a', for every `x' of type `a'
2021-10-17 20:57:49 +0200 <albet70> so not recursive, what the value looks like?
2021-10-17 20:58:01 +0200mniip(mniip@libera/staff/mniip)
2021-10-17 20:58:05 +0200 <ski> that can act as a base case, if that's what you're worrying/wondering about
2021-10-17 20:58:09 +0200 <albet70> Nothing has Maybe a
2021-10-17 20:58:17 +0200 <albet70> Leaf a has Tree a
2021-10-17 20:58:31 +0200 <ski> (`return x', in this case, is actually `ContT (\k -> k x)')
2021-10-17 20:58:32 +0200 <awpr> the latest posted definition of the Monoid instance of Fix stopped working with GHC 9.0. still poking around to determine why.
2021-10-17 20:58:32 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85)
2021-10-17 21:00:50 +0200 <albet70> use return x create value to recursive type is ok?
2021-10-17 21:01:14 +0200 <geekosaur> we do it all the time in the list monad
2021-10-17 21:01:24 +0200 <ski> or `ContT (\k -> k x)' directly, if you must
2021-10-17 21:01:26 +0200 <geekosaur> lists being a very sinmple recursive type
2021-10-17 21:01:37 +0200 <geekosaur> as with any recursion, you just make sure there's a base case
2021-10-17 21:02:16 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-10-17 21:02:21 +0200 <ski> "so not recursive, what the value looks like?" -- the type is recursively defined. values of that type may or may not be recursively defined
2021-10-17 21:03:09 +0200Skyfire(~pyon@user/pyon) (Quit: WeeChat 3.3)
2021-10-17 21:04:09 +0200fef(~thedawn@user/thedawn) (Ping timeout: 276 seconds)
2021-10-17 21:04:20 +0200 <ski> albet70 : perhaps another example, like `newtype Foo a = MkFoo (Maybe (a,Foo a))' might help a little ?
2021-10-17 21:04:23 +0200zzz(~z@user/zero)
2021-10-17 21:04:54 +0200zzz(~z@user/zero) ()
2021-10-17 21:04:55 +0200 <ski> (note that this `Foo a' also has no base case (/ "non-recursive") data constructor)
2021-10-17 21:04:58 +0200zzz(~z@user/zero)
2021-10-17 21:05:44 +0200 <albet70> why would people create this hard-to-understand type? recursive and there are three monad transformers inside
2021-10-17 21:06:05 +0200 <ski> to implement a kind of cooperative concurrency ?
2021-10-17 21:06:21 +0200 <albet70> MkFoo Nothing has Foo a
2021-10-17 21:06:27 +0200 <ski> yes
2021-10-17 21:06:57 +0200 <ski> so the base case doesn't have to be a data constructor of the recursively defined type in question
2021-10-17 21:07:56 +0200 <albet70> without 'return x', how you use a value to express that type?
2021-10-17 21:08:35 +0200 <ski> how about `CoroutineT (ContT (\k -> k 42))' ?
2021-10-17 21:10:28 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-17 21:10:28 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 21:11:13 +0200 <albet70> yes, it can, and it's still recursive
2021-10-17 21:11:26 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2021-10-17 21:11:55 +0200 <ski> what is still recursive ?
2021-10-17 21:12:29 +0200 <albet70> k :: a -> (StateT ...) r -> (StateT ...) r
2021-10-17 21:13:10 +0200 <albet70> that CoroutineT inside StateT
2021-10-17 21:13:32 +0200 <ski> `CoroutineT' is recursively defined, sure
2021-10-17 21:13:48 +0200 <ski> but `CoroutineT (ContT (\k -> k 42))' is not a recursively constructed value
2021-10-17 21:14:11 +0200 <albet70> you're right, 42
2021-10-17 21:15:21 +0200 <albet70> k could short circuit, so 42 could be the value?
2021-10-17 21:15:53 +0200sedeki(~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com)
2021-10-17 21:16:41 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 21:17:16 +0200fef(~thedawn@user/thedawn)
2021-10-17 21:17:37 +0200 <ski> i'm not following your question
2021-10-17 21:17:55 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 21:18:00 +0200 <albet70> my misunderstanding
2021-10-17 21:18:18 +0200 <ski> if `k' doesn't care about its input, then (this) argument (`42') passed to it will be ignored
2021-10-17 21:18:26 +0200 <hololeap> @unmtl ContT r (StateT [C r m ()] m) a
2021-10-17 21:18:26 +0200 <lambdabot> (a -> [C r m ()] -> m (r, [C r m ()])) -> [C r m ()] -> m (r, [C r m ()])
2021-10-17 21:18:34 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 21:18:38 +0200Merfont(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-17 21:18:38 +0200 <ski> lovely type
2021-10-17 21:18:40 +0200 <hololeap> ah, my brain
2021-10-17 21:19:15 +0200 <monochrom> In general, reductionism doesn't always improve understanding :)
2021-10-17 21:19:42 +0200 <zzz> in general... doesn't always
2021-10-17 21:20:02 +0200 <zzz> not wrong, though
2021-10-17 21:20:15 +0200 <monochrom> Isn't English fun!
2021-10-17 21:20:22 +0200 <albet70> how the people get this type out? how crazy!
2021-10-17 21:21:18 +0200 <albet70> k's type still has CoroutineT inside, so it is still recursive
2021-10-17 21:21:30 +0200 <monochrom> What's wrong with that?
2021-10-17 21:21:31 +0200 <ski> "it" being ?
2021-10-17 21:21:33 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
2021-10-17 21:22:00 +0200 <monochrom> But since it's in a list, you can always provide [] for a base case.
2021-10-17 21:22:31 +0200 <albet70> CoroutineT (ContT (\k -> k 42))
2021-10-17 21:22:35 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 264 seconds)
2021-10-17 21:22:52 +0200 <monochrom> Then again, why need base cases? "data X = X Int X; f = X 5 f" is pretty simple.
2021-10-17 21:23:06 +0200 <hololeap> @unmtl Cont r m a
2021-10-17 21:23:06 +0200 <lambdabot> err: `(m -> r) -> r' is not a type function.
2021-10-17 21:23:12 +0200 <hololeap> @unmtl ContT r m a
2021-10-17 21:23:12 +0200 <lambdabot> (a -> m r) -> m r
2021-10-17 21:23:21 +0200 <albet70> yes, [] as base case
2021-10-17 21:23:26 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 245 seconds)
2021-10-17 21:24:05 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 21:24:16 +0200 <hololeap> @type ContT
2021-10-17 21:24:17 +0200 <lambdabot> forall k a (m :: k -> *) (r :: k). ((a -> m r) -> m r) -> ContT r m a
2021-10-17 21:24:28 +0200 <albet70> yes, CoroutineT (ContT (\k -> k 42)) is a value
2021-10-17 21:24:39 +0200oxide(~lambda@user/oxide) (Quit: oxide)
2021-10-17 21:24:52 +0200 <monochrom> which is aka Coroutine (return 42)
2021-10-17 21:25:11 +0200 <monochrom> which is aka return 42
2021-10-17 21:25:18 +0200 <hololeap> ContT is probably the one monad transformer I've never touched
2021-10-17 21:25:23 +0200ub(~Thunderbi@77.119.216.214.wireless.dyn.drei.com) (Quit: ub)
2021-10-17 21:25:42 +0200 <ski> > let base = CoroutineT (ContT (\k -> k 42)) in (runIdentity . (`evalStateT` []) . (`runContT` \_ -> StateT (\cs -> return (17,cs))) . runCoroutineT') base
2021-10-17 21:25:44 +0200 <lambdabot> 17
2021-10-17 21:26:27 +0200 <awpr> okay, I think the Monoid (Fix f) instance stopped working in 9.0 because of the new ambiguity check added as part of simplified subsumption. but, this style of instance is fine: `deriving newtype instance (Monoid (f (Fix f))) => Monoid (Fix f)`
2021-10-17 21:27:15 +0200falafel(~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com)
2021-10-17 21:27:18 +0200 <awpr> (when combined with the same style of Semigroup instance)
2021-10-17 21:29:23 +0200 <hololeap> what version of GHC is yahb on?
2021-10-17 21:29:29 +0200nitrix-or-treatnitrix
2021-10-17 21:30:01 +0200 <awpr> % System.Info.compilerVersion
2021-10-17 21:30:01 +0200 <yahb> awpr: Version {versionBranch = [9,0], versionTags = []}
2021-10-17 21:30:05 +0200 <awpr> neat
2021-10-17 21:30:18 +0200 <hololeap> nice
2021-10-17 21:30:38 +0200 <ski> % :!ghci --version
2021-10-17 21:30:38 +0200 <yahb> ski: The Glorious Glasgow Haskell Compilation System, version 9.0.1
2021-10-17 21:30:41 +0200 <yates> thank you, vaibhavsagar[m]
2021-10-17 21:34:06 +0200 <tomsmeding> % :!ls
2021-10-17 21:34:07 +0200 <yahb> tomsmeding: Example; Example.hi; Example.hs; Example.o; a.out; file; file.sh; file.txt; hello; test; test.txt; tmp
2021-10-17 21:35:15 +0200 <awpr> wait is this the same one as on the FP discord?
2021-10-17 21:35:20 +0200 <awpr> % :!cat file.sh
2021-10-17 21:35:21 +0200 <yahb> awpr: :(){ :|:& };:; while true do sleep 1 done; while true do done
2021-10-17 21:35:33 +0200 <awpr> yeah, looks like it is
2021-10-17 21:35:45 +0200Guest38(~Guest38@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-10-17 21:35:47 +0200 <hololeap> % :!sh file.sh
2021-10-17 21:35:47 +0200 <yahb> hololeap: file.sh: 1: file.sh: Syntax error: Bad function name
2021-10-17 21:35:57 +0200 <hololeap> % :!./Example
2021-10-17 21:36:03 +0200 <yahb> hololeap: [Timed out]
2021-10-17 21:37:11 +0200 <hololeap> % :!rm -rf /*
2021-10-17 21:37:18 +0200 <hololeap> ;)
2021-10-17 21:37:51 +0200notzmv(~zmv@user/notzmv)
2021-10-17 21:38:35 +0200Guest38(~Guest38@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Client Quit)
2021-10-17 21:38:43 +0200 <monochrom> % 1+1
2021-10-17 21:38:43 +0200hendursa1(~weechat@user/hendursaga) (Quit: hendursa1)
2021-10-17 21:38:44 +0200 <yahb> monochrom: 2
2021-10-17 21:38:49 +0200 <monochrom> OK good
2021-10-17 21:39:05 +0200 <awpr> tbh rejecting the Monoid (Fix f) instance feels like a compiler bug. it's trying to solve `forall a. Semigroup a => Semigroup (f a)` for the underlying `mempty`, and it says it can't deduce `Semigroup (f a)` from the context `forall a. Semigroup a => Semigroup (f a)` or from `Semigroup a`
2021-10-17 21:39:27 +0200hendursaga(~weechat@user/hendursaga)
2021-10-17 21:39:54 +0200 <awpr> unless it's refusing to select that instance because there's also a `Monoid (f a)` in context that would also provide a `Semigroup (f a)` via superclass
2021-10-17 21:40:10 +0200 <albet70> how to print a in ContT r [] a's do notation?
2021-10-17 21:40:23 +0200 <albet70> or could?
2021-10-17 21:42:16 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-17 21:42:40 +0200Kaipi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-17 21:44:28 +0200frosky(~froskyarr@59.41.162.152) (Read error: Connection reset by peer)
2021-10-17 21:45:13 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds)
2021-10-17 21:46:08 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Remote host closed the connection)
2021-10-17 21:46:17 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-10-17 21:47:57 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 21:48:11 +0200Merfont(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 21:50:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95) (Remote host closed the connection)
2021-10-17 21:52:26 +0200ubert(~Thunderbi@77.119.216.214.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
2021-10-17 21:55:35 +0200Alleria(~textual@user/alleria) (Ping timeout: 264 seconds)
2021-10-17 21:56:47 +0200falafel(~falafel@2603-8000-d800-688c-c469-52c4-b20d-779e.res6.spectrum.com) (Ping timeout: 264 seconds)
2021-10-17 21:59:22 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-10-17 21:59:55 +0200 <ski> albet70 : print ?
2021-10-17 22:02:31 +0200 <albet70> yes, print
2021-10-17 22:03:57 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 276 seconds)
2021-10-17 22:04:07 +0200mortemeur(~mortemeur@pool-173-76-107-201.bstnma.fios.verizon.net) (Quit: Leaving)
2021-10-17 22:05:32 +0200juhp(~juhp@128.106.188.220) (Ping timeout: 265 seconds)
2021-10-17 22:06:56 +0200 <ski> print, in which sense ?
2021-10-17 22:07:07 +0200 <ski> so I/O ?
2021-10-17 22:07:11 +0200 <ski> s/so/do/
2021-10-17 22:07:41 +0200juhp(~juhp@128.106.188.220)
2021-10-17 22:10:51 +0200alx741(~alx741@186.178.108.200) (Ping timeout: 265 seconds)
2021-10-17 22:13:40 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com)
2021-10-17 22:14:42 +0200 <unit73e> Here's a new example for keyboard input: https://gitlab.com/unit73e/sdl2-examples
2021-10-17 22:14:58 +0200 <unit73e> it's sort of like those gamepad input tests but for keyboard
2021-10-17 22:15:15 +0200 <unit73e> the way lazyfoo handled keyboard wasn't great imo
2021-10-17 22:15:54 +0200 <unit73e> the example uses keyboard state instead of events because it's easier to test if a key is being pressed, instead of has been pressed/released
2021-10-17 22:16:01 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95)
2021-10-17 22:16:06 +0200 <unit73e> I'll add keyboard events later
2021-10-17 22:16:37 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2021-10-17 22:16:40 +0200 <unit73e> I don't know why events are getting only the last event either. why not process all?
2021-10-17 22:16:51 +0200 <albet70> could IO a inside ContT r [] a
2021-10-17 22:16:57 +0200 <unit73e> what if I press two keys simultaneously? why does only the last key count?
2021-10-17 22:18:12 +0200 <c_wraith> albet70: a much simpler question that would resolve the real question more easily would be "Does Coroutine have a MonadIO instance?". That one is neatly answered by looking at the docs.
2021-10-17 22:18:36 +0200_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-10-17 22:18:37 +0200 <ski> albet70 : you could have `m' be `IO', if you wanted to
2021-10-17 22:19:14 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-10-17 22:19:40 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 22:20:01 +0200 <albet70> in other languages, we can print variable inside most function and won't affect the result type
2021-10-17 22:20:15 +0200 <c_wraith> yes, that's a deficiency of most languages
2021-10-17 22:20:20 +0200 <ski> perhaps you're looking for `trace' ?
2021-10-17 22:20:32 +0200 <ski> @type Debug.Trace.trace
2021-10-17 22:20:34 +0200 <lambdabot> String -> a -> a
2021-10-17 22:21:16 +0200 <unit73e> albet70, that's done on purpose in haskell so that you can distinguish between side-effects or no side-effects, so you don't have unexpected results
2021-10-17 22:21:34 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-17 22:21:56 +0200 <ski> "so you can reason about and refactor code more effectively"
2021-10-17 22:22:09 +0200 <albet70> I know ContT r IO a can print a, but what if I want the [] effect too?
2021-10-17 22:22:29 +0200 <ski> use some `ListT' thing, maybe ?
2021-10-17 22:23:47 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c12e:d762:e1c6:5c95) (Ping timeout: 264 seconds)
2021-10-17 22:23:49 +0200alx741(~alx741@186.178.108.68)
2021-10-17 22:24:16 +0200 <albet70> for example?
2021-10-17 22:24:23 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 265 seconds)
2021-10-17 22:25:06 +0200Kaipi(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-17 22:25:12 +0200 <unit73e> I think you're just looking for `trace` do to debugging
2021-10-17 22:25:19 +0200 <unit73e> so this: https://wiki.haskell.org/Debugging
2021-10-17 22:25:26 +0200Kaipi(~Kaiepi@156.34.44.192)
2021-10-17 22:25:29 +0200hendursaga(~weechat@user/hendursaga) (Remote host closed the connection)
2021-10-17 22:25:53 +0200hendursaga(~weechat@user/hendursaga)
2021-10-17 22:26:05 +0200 <unit73e> just my guess
2021-10-17 22:27:28 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-17 22:27:28 +0200Kaipi(~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-10-17 22:29:05 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-10-17 22:29:05 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-10-17 22:29:05 +0200wroathe(~wroathe@user/wroathe)
2021-10-17 22:32:06 +0200lavaman(~lavaman@98.38.249.169)
2021-10-17 22:32:48 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255) (Remote host closed the connection)
2021-10-17 22:33:51 +0200fef(~thedawn@user/thedawn) (Ping timeout: 276 seconds)
2021-10-17 22:39:55 +0200wonko(~wjc@62.115.229.50) (Ping timeout: 268 seconds)
2021-10-17 22:40:14 +0200acidjnk_new3(~acidjnk@p200300d0c703cb9754638f8907b54fd0.dip0.t-ipconnect.de)
2021-10-17 22:40:35 +0200Alleria(~textual@user/alleria)
2021-10-17 22:42:36 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:39a4:166a:24e9:f255)
2021-10-17 22:45:23 +0200Inst(~Inst@2601:6c4:4080:3f80:f9d5:5879:9db5:ac95) (Ping timeout: 264 seconds)
2021-10-17 22:49:47 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 268 seconds)
2021-10-17 22:51:06 +0200o1lo01ol1o(~o1lo01ol1@2001:8a0:6d7a:df01:5579:ced2:5960:f2d4)
2021-10-17 22:52:53 +0200 <xerox> what could be causing this? https://pastebin.com/raw/wUui9AGU
2021-10-17 22:54:59 +0200python476(~user@88.160.31.174) (Ping timeout: 264 seconds)
2021-10-17 22:55:37 +0200o1lo01ol1o(~o1lo01ol1@2001:8a0:6d7a:df01:5579:ced2:5960:f2d4) (Ping timeout: 252 seconds)
2021-10-17 22:57:17 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-10-17 22:58:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-10-17 22:59:56 +0200takuan_dozo(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-10-17 23:02:10 +0200alx741(~alx741@186.178.108.68) (Ping timeout: 252 seconds)
2021-10-17 23:02:47 +0200burnsidesLlama(~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 264 seconds)
2021-10-17 23:06:42 +0200boxscape_(~boxscape_@p54a3581e.dip0.t-ipconnect.de)
2021-10-17 23:07:36 +0200tektik(~said@68.33.69.0)
2021-10-17 23:09:09 +0200hololeap_(~hololeap@user/hololeap)
2021-10-17 23:09:36 +0200hololeap(~hololeap@user/hololeap) (Ping timeout: 276 seconds)
2021-10-17 23:13:20 +0200neurocyte0132889(~neurocyte@212.232.92.249)
2021-10-17 23:13:20 +0200neurocyte0132889(~neurocyte@212.232.92.249) (Changing host)
2021-10-17 23:13:20 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-17 23:13:24 +0200hololeap_hololeap
2021-10-17 23:18:26 +0200DNH(~DNH@2a02:8108:1100:16d8:5049:49be:4147:7a85) (Ping timeout: 245 seconds)
2021-10-17 23:19:06 +0200Merfont(~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-10-17 23:19:25 +0200Merfont(~Kaiepi@156.34.44.192)
2021-10-17 23:19:37 +0200aegon(~mike@174.127.249.180)
2021-10-17 23:22:48 +0200zebrag(~chris@user/zebrag) (Remote host closed the connection)
2021-10-17 23:24:24 +0200thelounge90407(5973b1ff@67.205.143.82)
2021-10-17 23:24:53 +0200thelounge90407(5973b1ff@67.205.143.82) (Client Quit)
2021-10-17 23:25:29 +0200 <geekosaur> LD_LIBRARY_PATH set? (it is *not* the same as on Linux!)
2021-10-17 23:26:49 +0200zebrag(~chris@user/zebrag)
2021-10-17 23:27:54 +0200hololeap(~hololeap@user/hololeap) (Read error: Connection reset by peer)
2021-10-17 23:28:25 +0200fendor(~fendor@77.119.216.44.wireless.dyn.drei.com) (Remote host closed the connection)
2021-10-17 23:28:53 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2021-10-17 23:30:07 +0200pavonia(~user@user/siracusa)
2021-10-17 23:32:06 +0200tabemann(~tabemann@2600:1700:7990:24e0:5901:20e0:5666:a3ee) (Remote host closed the connection)
2021-10-17 23:32:44 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-10-17 23:33:31 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
2021-10-17 23:37:07 +0200hololeap_(~hololeap@user/hololeap)
2021-10-17 23:38:26 +0200tabemann(~tabemann@2600:1700:7990:24e0:ab53:1c93:684e:f2ba)
2021-10-17 23:39:08 +0200neurocyte0132889(~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
2021-10-17 23:39:46 +0200neurocyte0132889(~neurocyte@212.232.92.249)
2021-10-17 23:39:46 +0200neurocyte0132889(~neurocyte@212.232.92.249) (Changing host)
2021-10-17 23:39:46 +0200neurocyte0132889(~neurocyte@user/neurocyte)
2021-10-17 23:39:52 +0200betelgeuse(~betelgeus@94-225-47-8.access.telenet.be)
2021-10-17 23:42:50 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2021-10-17 23:42:51 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 23:42:58 +0200 <d34df00d> Is there any extension that'd allow me to have a field with the same label but different types in different constructors of a type?
2021-10-17 23:43:14 +0200 <d34df00d> Like data Foo = F1 { a :: String } | F2 { a :: Int }
2021-10-17 23:43:25 +0200cjb(~cjb@user/cjb)
2021-10-17 23:43:30 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 23:45:03 +0200alx741(~alx741@186.178.108.68)
2021-10-17 23:45:03 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-10-17 23:45:10 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-10-17 23:45:30 +0200 <zzz> OverloadedRecordFields
2021-10-17 23:46:40 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-10-17 23:47:02 +0200Skyfire(~pyon@user/pyon)
2021-10-17 23:47:06 +0200max22-(~maxime@2a01cb0883359800952563b5640f70e9.ipv6.abo.wanadoo.fr) (Quit: Leaving)
2021-10-17 23:47:29 +0200 <boxscape_> isn't it DuplicateRecordFields
2021-10-17 23:47:54 +0200 <d34df00d> zzz: can't find that in the docs for 9.0.1, is it a newer one?
2021-10-17 23:48:13 +0200 <d34df00d> boxscape_: doesn't help, ghc still complains about different types of a field in different constructors.
2021-10-17 23:48:31 +0200acidjnk_new(~acidjnk@p200300d0c703cb97b093ae7a86818c94.dip0.t-ipconnect.de)
2021-10-17 23:49:29 +0200 <boxscape_> d34df00d hmm that seems strange because the docs specifically have that as an example https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/duplicate_record_fields.html?h…
2021-10-17 23:49:50 +0200 <d34df00d> boxscape_: that's different constructors of different types.
2021-10-17 23:49:59 +0200 <d34df00d> While in my case I have different constructors of the same type.
2021-10-17 23:50:02 +0200 <boxscape_> ohh
2021-10-17 23:50:03 +0200 <boxscape_> sorry
2021-10-17 23:50:24 +0200 <awpr> since there's no way to make a field selector function for that "field", maybe -XNoFieldSelectors?
2021-10-17 23:51:06 +0200 <boxscape_> I think NoFieldSelectors is only in 9.2
2021-10-17 23:51:28 +0200 <d34df00d> Oh yeah.
2021-10-17 23:51:29 +0200 <d34df00d> OverloadedRecordFields
2021-10-17 23:51:36 +0200 <d34df00d> Dang, wrong paste.
2021-10-17 23:51:38 +0200 <d34df00d> Unsupported extension: NoFieldSelectors
2021-10-17 23:51:47 +0200 <boxscape_> but NoFieldSelectors also doesn't help, just tested it
2021-10-17 23:51:57 +0200 <dsal> arm nix on m1 is almost useful… Stuff almost builds.
2021-10-17 23:52:16 +0200acidjnk_new3(~acidjnk@p200300d0c703cb9754638f8907b54fd0.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-10-17 23:52:50 +0200 <zzz> sorry about that. i don't know if there is one
2021-10-17 23:52:56 +0200 <awpr> hmm, the only reason I know of for that restriction is to make it possible to assign types to field selectors. maybe it's just vestigial in the presence of NoFieldSelectors?
2021-10-17 23:52:57 +0200fernand(~fernand@179.156.35.4)
2021-10-17 23:53:09 +0200 <boxscape_> that's quite plausible
2021-10-17 23:53:33 +0200 <boxscape_> to be fair I'm using a ghc version from July, for all I know it might be different now
2021-10-17 23:54:12 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
2021-10-17 23:55:18 +0200 <awpr> it might also cause problems for overloaded record fields, too, though, since the HasField instance(s) for that field(s) would want two different types, in violation of the fundeps
2021-10-17 23:56:01 +0200 <boxscape_> right
2021-10-17 23:56:40 +0200 <awpr> in fact, is there _anything_ you can do with that field name at all?
2021-10-17 23:56:56 +0200 <awpr> maybe RecordWildCards it into existence with a particular constructor
2021-10-17 23:56:56 +0200 <boxscape_> use it as documentation
2021-10-17 23:57:33 +0200 <awpr> yeah, good point. although if it's just documentation, there's hopefully not much harm in renaming one of them
2021-10-17 23:57:40 +0200 <boxscape_> yeah