2022/06/07

2022-06-07 00:00:22 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-07 00:01:10 +0200toluene(~toluene@user/toulene) (Ping timeout: 272 seconds)
2022-06-07 00:01:56 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-06-07 00:04:20 +0200wonko(~wjc@user/wonko) (Ping timeout: 250 seconds)
2022-06-07 00:05:00 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 00:09:25 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 246 seconds)
2022-06-07 00:09:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 00:22:12 +0200slack1256(~slack1256@191.125.227.95) (Read error: Connection reset by peer)
2022-06-07 00:22:17 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-06-07 00:23:21 +0200toluene(~toluene@user/toulene)
2022-06-07 00:23:57 +0200 <Bulby[m]> is there a way to just update my cabal file from package.yaml instead of running stack build
2022-06-07 00:24:35 +0200 <geekosaur> that part of what stack does is actually done by hpack
2022-06-07 00:24:48 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806)
2022-06-07 00:24:53 +0200 <Bulby[m]> i'm aware. how can I use hpack
2022-06-07 00:25:12 +0200 <Bulby[m]> does stack install it on my path?
2022-06-07 00:25:54 +0200 <sclv> no stack uses it as a lib, you need to install the executable yourself
2022-06-07 00:30:59 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net)
2022-06-07 00:37:47 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
2022-06-07 00:37:57 +0200nate3(~nate@98.45.169.16)
2022-06-07 00:38:31 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2022-06-07 00:41:58 +0200winny(~weechat@user/winny) (Remote host closed the connection)
2022-06-07 00:42:47 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-07 00:42:50 +0200winny(~weechat@user/winny)
2022-06-07 00:46:08 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 272 seconds)
2022-06-07 00:53:03 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-07 00:53:49 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 00:57:05 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-07 01:05:47 +0200Ranhir(~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
2022-06-07 01:05:58 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 01:10:23 +0200AlexNoo_(~AlexNoo@178.34.150.134)
2022-06-07 01:11:24 +0200Alex_test(~al_test@94.233.240.1) (Ping timeout: 244 seconds)
2022-06-07 01:11:55 +0200AlexZenon(~alzenon@94.233.240.1) (Ping timeout: 244 seconds)
2022-06-07 01:12:25 +0200AlexNoo(~AlexNoo@94.233.240.1) (Ping timeout: 246 seconds)
2022-06-07 01:13:50 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net) (Ping timeout: 255 seconds)
2022-06-07 01:15:13 +0200Alleria_(~AllahuAkb@68.65.161.35)
2022-06-07 01:15:32 +0200Alex_test(~al_test@178.34.150.134)
2022-06-07 01:16:11 +0200pavonia(~user@user/siracusa)
2022-06-07 01:16:48 +0200AlexZenon(~alzenon@178.34.150.134)
2022-06-07 01:18:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 01:19:30 +0200Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-06-07 01:20:58 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 272 seconds)
2022-06-07 01:21:03 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 01:25:36 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2022-06-07 01:29:29 +0200 <Bulby[m]> how do field selectors work in sum types?
2022-06-07 01:30:36 +0200 <EvanR> not great. If you access the wrong sum alternative, it crashes
2022-06-07 01:30:47 +0200 <Bulby[m]> that's what I figured
2022-06-07 01:30:57 +0200 <EvanR> a Prism is better here
2022-06-07 01:31:12 +0200 <Bulby[m]> adding lens to polysemy
2022-06-07 01:31:26 +0200 <EvanR> they seem mainly orthogonal?
2022-06-07 01:31:51 +0200 <Bulby[m]> orthogonal means unrelated right
2022-06-07 01:33:05 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net)
2022-06-07 01:34:17 +0200 <EvanR> sorry I went down a rabbit hole trying to actually explain linear algebra
2022-06-07 01:34:58 +0200 <EvanR> I mean it seems like they do different things so can be used together without colliding
2022-06-07 01:36:16 +0200 <Bulby[m]> i know how lines work 😄
2022-06-07 01:36:50 +0200 <Bulby[m]> i think so at least
2022-06-07 01:39:30 +0200 <Bulby[m]> why do libs like lens come batteries included?
2022-06-07 01:43:02 +0200 <EvanR> there's another lib like lens? xD
2022-06-07 01:43:15 +0200 <EvanR> k there's optics, but it seems more manageable
2022-06-07 01:43:28 +0200 <Bulby[m]> for utility libs i mean
2022-06-07 01:43:33 +0200 <jackdk> lens only seems to provide stuff for things that are GHC boot libs?
2022-06-07 01:43:51 +0200 <Bulby[m]> mtl is a GHC boot lib?
2022-06-07 01:44:14 +0200 <dsal> microlens is a smaller lens
2022-06-07 01:44:43 +0200 <jackdk> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history apparently so
2022-06-07 01:45:43 +0200 <Bulby[m]> what does it mean to be a boot lib
2022-06-07 01:46:03 +0200 <DigitalKiwi> why is batteries included a bad thing
2022-06-07 01:46:20 +0200 <Bulby[m]> idk, I back down from my point
2022-06-07 01:46:45 +0200 <EvanR> in this case, if mtl is a battery, and you're sleep breathing polysemy, then it's the wrong batteries
2022-06-07 01:46:58 +0200 <DigitalKiwi> the thing about "without batteries" is that it doesn't work without batteries lol
2022-06-07 01:47:03 +0200 <Bulby[m]> yeah
2022-06-07 01:47:27 +0200 <Bulby[m]> i think that's what I mean - but polysemy zoo has a "constraint absorber" for monadstate and friends
2022-06-07 01:47:34 +0200 <jackdk> microlens is "lens, but only depends on types from `base`" IIRC. However, to write `Fold`s, you need contravariant functors, and to write `Iso`s you need `Profunctor`, and to write `Prism`, you need `Choice` (also from `profunctors`)
2022-06-07 01:47:44 +0200 <jackdk> so that's the tradeoff
2022-06-07 01:47:52 +0200 <DigitalKiwi> getting everyone knew toys for christmas no batteries included ;p
2022-06-07 01:47:58 +0200 <Bulby[m]> ... too bad polysemy-zoo isn't on stack
2022-06-07 01:49:06 +0200 <jackdk> DigitalKiwi: is that even a thing any more? I remember scavenging C and D cells from various toys back in the day, but wouldn't everything charge via USB these days?
2022-06-07 01:49:26 +0200 <jackdk> Bulby[m]: I hate to say it, but I don't think I've seen a happy stack user in a long time.
2022-06-07 01:49:45 +0200 <Bulby[m]> hahaahah
2022-06-07 01:50:22 +0200 <DigitalKiwi> have you heard of nix
2022-06-07 01:50:40 +0200 <DigitalKiwi> vaibhavsagar[m]: :D
2022-06-07 01:50:46 +0200 <Bulby[m]> nixos? i heard that'
2022-06-07 01:50:54 +0200 <Bulby[m]> that's even worse
2022-06-07 01:51:08 +0200srk-(~sorki@user/srk)
2022-06-07 01:51:18 +0200 <DigitalKiwi> you've been listening to maerwald too much lol
2022-06-07 01:52:05 +0200srk(~sorki@user/srk) (Ping timeout: 255 seconds)
2022-06-07 01:53:31 +0200 <hpc> nix is the greatest argument for static typing i have ever seen
2022-06-07 01:53:45 +0200 <hpc> everything it does is so cool, and so hard to follow :D
2022-06-07 01:53:55 +0200srk-srk
2022-06-07 01:56:27 +0200 <jackdk> My friends had a mug printed which reads "use nix for literally everything". It's a fantastic idea with s l o w l y improving UX. When it works? Fantastic! But I have also had to develop a sixth sense for debugging "Infinite recursion encountered, at undefined position". But it's getting better - I saw Nix 2.9 got a debugger added to its repl
2022-06-07 01:56:30 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net) (Ping timeout: 246 seconds)
2022-06-07 01:58:55 +0200Ranhir(~Ranhir@157.97.53.139)
2022-06-07 02:00:30 +0200 <EvanR> that sounds like what happens at warp 10
2022-06-07 02:02:20 +0200 <dsal> DigitalKiwi: I live on a small island, so getting batteries shipped to me complicates things quite a bit.
2022-06-07 02:02:49 +0200 <dsal> Some of my projects battery kit is "hackage" though
2022-06-07 02:05:04 +0200 <dsal> jackdk: I'm a stack user and am relatively happy. I don't interact with stack too much, though.
2022-06-07 02:06:00 +0200 <jackdk> dsal: thanks for the data point
2022-06-07 02:06:26 +0200 <DigitalKiwi> the less i use stack the happier i am too
2022-06-07 02:06:28 +0200 <dsal> Work is nix and make and ghcid. It is… OK.
2022-06-07 02:07:11 +0200Alleria_(~AllahuAkb@68.65.161.35) (Quit: Textual IRC Client: www.textualapp.com)
2022-06-07 02:07:39 +0200 <jackdk> make!? Now I'm intrigued.
2022-06-07 02:10:17 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!)
2022-06-07 02:12:53 +0200 <dsal> *huge* makefile. Just a convenient place to leave everyone's entry points.
2022-06-07 02:13:22 +0200 <dsal> i.e., make as a script, not make as a dependency tracker thing.
2022-06-07 02:13:40 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2022-06-07 02:15:27 +0200 <Bulby[m]> I thought it was bad because it breaks when something small changes
2022-06-07 02:15:33 +0200 <Bulby[m]> or maybe those are just lies
2022-06-07 02:15:42 +0200 <dsal> What breaks/
2022-06-07 02:15:51 +0200 <Bulby[m]> nix
2022-06-07 02:16:26 +0200 <dsal> I use nixos on all my linux machines (at least the ones that will run it). It's super nice.
2022-06-07 02:16:42 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-07 02:16:43 +0200 <dsal> For devs, we all have all the dependencies we need with minimal coordination.
2022-06-07 02:16:55 +0200 <Bulby[m]> does it have to be nixos to use nix
2022-06-07 02:17:05 +0200 <dsal> Nope, I'm developing on an M1 mac.
2022-06-07 02:17:26 +0200 <dsal> (because I don't have my nixos box handy)
2022-06-07 02:17:28 +0200 <Bulby[m]> interesting
2022-06-07 02:18:06 +0200 <dsal> How to get all of the necessary dependencies installed and all the right stuff in your shell in order to build and run all of our code on whatever platform you're on: `nix-shell`
2022-06-07 02:18:14 +0200 <monochrom> Haha so nix and haskell are competing on "who's getting a debugger later" >:)
2022-06-07 02:18:21 +0200 <yushyin> :D
2022-06-07 02:18:48 +0200 <dsal> I have a debugger for nix. It's just a department I interface with via slack.
2022-06-07 02:19:52 +0200 <monochrom> I had a few friends with whom I unilaterally imagined "will I finish my PhD later than them?" so I know the feelling perfectly. (I finished last haha.)
2022-06-07 02:21:36 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-07 02:22:55 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-07 02:24:18 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net) (Ping timeout: 250 seconds)
2022-06-07 02:24:56 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds)
2022-06-07 02:25:23 +0200bilegeek(~bilegeek@2600:1008:b02b:743:567:fb63:d9c2:484b)
2022-06-07 02:27:04 +0200 <yushyin> i tried to read up on nix flakes this weekend to use it for my server orchestration. i had no previous experience with nix and i have to say, it's quite a rabbit hole.
2022-06-07 02:30:53 +0200DNH(~DNH@2a02:8108:1100:16d8:bcb2:718:99f3:56c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-07 02:32:32 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 272 seconds)
2022-06-07 02:42:25 +0200Tuplanolla(~Tuplanoll@91-159-69-1.elisa-laajakaista.fi) (Quit: Leaving.)
2022-06-07 02:42:25 +0200 <Bulby[m]> the stack/heap approach for the interp looks really fun for the garbage collector to not do anything about
2022-06-07 02:45:51 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 246 seconds)
2022-06-07 02:47:37 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2022-06-07 02:47:52 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-06-07 02:48:43 +0200stackdroid18(14094@user/stackdroid) (Quit: hasta la vista... tchau!)
2022-06-07 02:48:50 +0200 <EvanR> a garbage collector for your heap seems straightforward
2022-06-07 02:56:49 +0200nate3(~nate@98.45.169.16)
2022-06-07 03:01:45 +0200nate3(~nate@98.45.169.16) (Ping timeout: 256 seconds)
2022-06-07 03:03:13 +0200finsternis(~X@23.226.237.192)
2022-06-07 03:05:53 +0200alp(~alp@user/alp) (Ping timeout: 255 seconds)
2022-06-07 03:10:22 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-07 03:16:30 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-07 03:26:04 +0200 <EvanR> oof unless cyclic references
2022-06-07 03:26:26 +0200Topsi(~Topsi@dyndsl-095-033-092-041.ewe-ip-backbone.de)
2022-06-07 03:29:07 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds)
2022-06-07 03:33:29 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-07 03:34:16 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp)
2022-06-07 03:36:20 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-07 03:37:06 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-07 03:39:16 +0200notzmv(~zmv@user/notzmv)
2022-06-07 03:39:30 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2022-06-07 03:48:31 +0200andrey__(~andrey@p200300dbcf15530023ad2f8f21d0715c.dip0.t-ipconnect.de)
2022-06-07 03:49:23 +0200slack1256(~slack1256@186.11.82.227)
2022-06-07 03:51:03 +0200andrey_(~andrey@p200300dbcf0906009ea91513703af53a.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-06-07 03:53:13 +0200 <Benzi-Junior> http://ix.io/3ZAB
2022-06-07 03:58:59 +0200 <Benzi-Junior> I'm trying to figure out how to build the interpretations of the operations "delay", "broadcast", and "receive" as specified by runIO
2022-06-07 03:59:42 +0200 <Benzi-Junior> because I'm fairly sure I'm not supposed to go back to dealing with the constructors
2022-06-07 04:02:56 +0200 <Bulby[m]> for that heap, if you find it on the stack is it guarenteed to be on the heap?
2022-06-07 04:04:23 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 255 seconds)
2022-06-07 04:04:54 +0200 <jackdk> Benzi-Junior: looks like some good progress there. You will need to match on the constructors, but only to consume the `Agent msg ()` structure. Can you write a function that can run a single agent?
2022-06-07 04:11:36 +0200 <Benzi-Junior> jackdk, huh surprised to hear that, I don't see myself having any issues writing a processing function that matches on constructors
2022-06-07 04:11:57 +0200 <Benzi-Junior> just thought that was the wrong way to do it
2022-06-07 04:12:51 +0200 <Axman6> ok, morality question time: if I have a function foo :: a -> b, whhich might occasionally call error, is it morally ok to do something like foo' :: a -> Either SomeException b; foo' a = unsafePerformIO (try (evaluate (foo b)))
2022-06-07 04:13:37 +0200 <Benzi-Junior> well I need to figure out what the right way to write the Agent msg a -> STM a part
2022-06-07 04:13:48 +0200 <Benzi-Junior> but the logic I feel should be simple
2022-06-07 04:14:45 +0200yosef`(~user@user/yosef/x-2947716)
2022-06-07 04:16:12 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 276 seconds)
2022-06-07 04:16:59 +0200 <Bulby[m]> oh i'm getting some of the picture now - recursion ftw !
2022-06-07 04:17:53 +0200df(~ben@justworks.xyz) (Remote host closed the connection)
2022-06-07 04:18:43 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-06-07 04:20:45 +0200td_(~td@muedsl-82-207-238-164.citykom.de) (Ping timeout: 276 seconds)
2022-06-07 04:22:06 +0200td_(~td@muedsl-82-207-238-064.citykom.de)
2022-06-07 04:29:57 +0200k8yun(~k8yun@user/k8yun)
2022-06-07 04:33:15 +0200 <jackdk> Axman6: I assume there's a reason not to rewrite it directly to `a -> Either String b`?
2022-06-07 04:34:50 +0200MsGaGaGa(~MsGaGaGa@S01069050ca4e3573.cg.shawcable.net)
2022-06-07 04:37:12 +0200 <Axman6> it's from a library
2022-06-07 04:37:21 +0200 <jackdk> Axman6: fork it
2022-06-07 04:37:28 +0200 <Axman6> but it turns out I actually want to steal its whole implementation
2022-06-07 04:38:01 +0200 <jackdk> Also I think you could catch `ErrorCall` and not `SomeException`
2022-06-07 04:38:59 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-06-07 04:44:33 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-06-07 04:44:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-07 04:56:32 +0200_xor(~xor@72.49.198.103) (Quit: brb)
2022-06-07 05:01:57 +0200MsGaGaGa(~MsGaGaGa@S01069050ca4e3573.cg.shawcable.net) (Quit: Client closed)
2022-06-07 05:03:00 +0200andrey_(~andrey@p200300dbcf1b4800d6d421d0e0348cd5.dip0.t-ipconnect.de)
2022-06-07 05:05:27 +0200andrey__(~andrey@p200300dbcf15530023ad2f8f21d0715c.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-06-07 05:05:42 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-07 05:15:18 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 272 seconds)
2022-06-07 05:19:25 +0200 <Bulby[m]> i have to have a counter in my megaparsec parser.... obviously the solution is to write a megaparsec polysemy effect
2022-06-07 05:21:53 +0200 <dsal> I use StateT for that sort of thing.
2022-06-07 05:24:05 +0200 <Bulby[m]> i have one better: unsafe perform io
2022-06-07 05:24:39 +0200 <Cale> Bulby[m]: Isn't megaparsec itself a transformer?
2022-06-07 05:24:48 +0200 <Cale> Or am I confusing it with the original parsec?
2022-06-07 05:24:59 +0200 <Bulby[m]> yes LOL
2022-06-07 05:25:14 +0200 <Cale> data ParsecT e s m a
2022-06-07 05:25:16 +0200 <Bulby[m]> megaparsec is a transformer
2022-06-07 05:25:27 +0200 <Cale> yeah, that's the reason it's a transformer, so you can transform IO
2022-06-07 05:25:45 +0200 <Cale> (or anything else)
2022-06-07 05:26:09 +0200 <Cale> But also, it's possible to do a counter without transforming
2022-06-07 05:26:17 +0200 <Bulby[m]> how so
2022-06-07 05:26:21 +0200 <Cale> Just have a parser that is defined as a function of the count
2022-06-07 05:26:26 +0200 <Cale> and make it recursive
2022-06-07 05:26:58 +0200 <Cale> (or several parsers, if needs be)
2022-06-07 05:32:00 +0200 <Bulby[m]> that sounds like I should just use ParsecT
2022-06-07 05:32:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 05:33:03 +0200 <dsal> Are you not?
2022-06-07 05:33:15 +0200 <Cale> Yeah, possibly. Depends on how long you need to use the counter for, how many things would need an extra parameter
2022-06-07 05:33:20 +0200 <Bulby[m]> i was using Parsec, not ParsecT
2022-06-07 05:33:58 +0200 <dsal> type Parsec s u = ParsecT s u Identity
2022-06-07 05:35:16 +0200zebrag(~chris@user/zebrag)
2022-06-07 05:36:53 +0200 <Bulby[m]> argh I hate that I can't just registerParseFailure in makeExprParser operators
2022-06-07 05:39:20 +0200zebrag(~chris@user/zebrag) (Client Quit)
2022-06-07 05:39:21 +0200gio123(~gio123@146.255.226.194)
2022-06-07 05:39:47 +0200 <dsal> I'm not sure what that means.
2022-06-07 05:48:29 +0200 <Bulby[m]> https://paste.tomsmeding.com/FYNShH5z now this is programming
2022-06-07 05:49:20 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 05:51:53 +0200calleum_(~calleum@user/calleum)
2022-06-07 05:55:00 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 05:57:28 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 06:00:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Ping timeout: 255 seconds)
2022-06-07 06:02:38 +0200Topsi1(~Topsi@dyndsl-095-033-027-152.ewe-ip-backbone.de)
2022-06-07 06:02:49 +0200gio123(~gio123@146.255.226.194) (Quit: Client closed)
2022-06-07 06:03:14 +0200gio123(~gio123@146.255.226.194)
2022-06-07 06:04:19 +0200Topsi(~Topsi@dyndsl-095-033-092-041.ewe-ip-backbone.de) (Ping timeout: 246 seconds)
2022-06-07 06:09:57 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 276 seconds)
2022-06-07 06:12:05 +0200sebastiandb_(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-07 06:12:43 +0200madnight(~madnight@static.59.103.201.195.clients.your-server.de) (Ping timeout: 246 seconds)
2022-06-07 06:12:43 +0200fiddlerwoaroof_(~fiddlerwo@user/fiddlerwoaroof) (Ping timeout: 246 seconds)
2022-06-07 06:12:43 +0200nerdypepper(~nerdypepp@user/nerdypepper) (Ping timeout: 246 seconds)
2022-06-07 06:13:04 +0200tafa(~tafa@user/tafa) (Ping timeout: 246 seconds)
2022-06-07 06:13:13 +0200nerdypepper(~nerdypepp@user/nerdypepper)
2022-06-07 06:13:25 +0200shailangsa(~shailangs@host86-186-136-116.range86-186.btcentralplus.com) (Ping timeout: 246 seconds)
2022-06-07 06:13:30 +0200monochrm(~trebla@216.138.220.146)
2022-06-07 06:13:37 +0200madnight(~madnight@static.59.103.201.195.clients.your-server.de)
2022-06-07 06:13:41 +0200tafa(~tafa@user/tafa)
2022-06-07 06:13:46 +0200gnyeki(~gnyeki@user/gnyeki) (Ping timeout: 246 seconds)
2022-06-07 06:13:52 +0200CodeKiwi(~kiwi@2604:a880:400:d0::1ca0:e001)
2022-06-07 06:13:55 +0200Philonous_(~Philonous@user/philonous)
2022-06-07 06:14:07 +0200mzan(~quassel@mail.asterisell.com) (Ping timeout: 246 seconds)
2022-06-07 06:14:07 +0200icebreaker(~icebreake@user/icebreaker) (Ping timeout: 246 seconds)
2022-06-07 06:14:28 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2022-06-07 06:14:28 +0200monochrom(trebla@216.138.220.146) (Ping timeout: 246 seconds)
2022-06-07 06:14:28 +0200DigitalKiwi(~kiwi@137.184.156.191) (Ping timeout: 246 seconds)
2022-06-07 06:14:28 +0200Philonous(~Philonous@user/philonous) (Ping timeout: 246 seconds)
2022-06-07 06:14:28 +0200monochrmmonochrom
2022-06-07 06:14:33 +0200fiddlerwoaroof(~fiddlerwo@user/fiddlerwoaroof)
2022-06-07 06:14:49 +0200Typedfern(~Typedfern@202.red-83-37-35.dynamicip.rima-tde.net) (Ping timeout: 246 seconds)
2022-06-07 06:14:49 +0200kjak(~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
2022-06-07 06:14:55 +0200mzan(~quassel@mail.asterisell.com)
2022-06-07 06:15:45 +0200gnyeki(~gnyeki@li578-216.members.linode.com)
2022-06-07 06:15:45 +0200gnyeki(~gnyeki@li578-216.members.linode.com) (Changing host)
2022-06-07 06:15:45 +0200gnyeki(~gnyeki@user/gnyeki)
2022-06-07 06:15:59 +0200icebreaker(~icebreake@user/icebreaker)
2022-06-07 06:16:34 +0200califax(~califax@user/califx) (Ping timeout: 240 seconds)
2022-06-07 06:16:34 +0200noteness(~noteness@user/noteness) (Ping timeout: 240 seconds)
2022-06-07 06:16:38 +0200kjak(~kjak@pool-108-45-56-21.washdc.fios.verizon.net)
2022-06-07 06:17:04 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 240 seconds)
2022-06-07 06:17:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 06:18:48 +0200noteness(~noteness@user/noteness)
2022-06-07 06:19:08 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-06-07 06:19:43 +0200califax(~califax@user/califx)
2022-06-07 06:21:31 +0200mbuf(~Shakthi@223.190.216.42)
2022-06-07 06:23:40 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-07 06:23:49 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi)
2022-06-07 06:25:33 +0200nate3(~nate@98.45.169.16)
2022-06-07 06:28:18 +0200Typedfern(~Typedfern@202.red-83-37-35.dynamicip.rima-tde.net)
2022-06-07 06:30:11 +0200andrey__(~andrey@p508d49e0.dip0.t-ipconnect.de)
2022-06-07 06:30:45 +0200nate3(~nate@98.45.169.16) (Ping timeout: 276 seconds)
2022-06-07 06:30:50 +0200rekahsoft(~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 240 seconds)
2022-06-07 06:31:59 +0200 <dsal> Bulby[m]: Why do that when you have several ways to do it right?
2022-06-07 06:32:27 +0200andrey_(~andrey@p200300dbcf1b4800d6d421d0e0348cd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-06-07 06:33:51 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 06:50:30 +0200Topsi1(~Topsi@dyndsl-095-033-027-152.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-06-07 06:51:50 +0200calleum_(~calleum@user/calleum) (Ping timeout: 240 seconds)
2022-06-07 06:54:01 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net)
2022-06-07 06:54:34 +0200 <slack1256> @let sumGuarded xs = scarl' (+) 0 xs
2022-06-07 06:54:36 +0200 <lambdabot> /sandbox/tmp/.L.hs:160:17: error:
2022-06-07 06:54:36 +0200 <lambdabot> • Variable not in scope:
2022-06-07 06:54:36 +0200 <lambdabot> scarl' :: (a0 -> a0 -> a0) -> t0 -> t -> t1
2022-06-07 06:54:43 +0200shailangsa_(~shailangs@host86-186-136-116.range86-186.btcentralplus.com)
2022-06-07 06:54:44 +0200 <slack1256> @let sumGuarded xs = scanl' (+) 0 xs
2022-06-07 06:54:46 +0200 <lambdabot> Defined.
2022-06-07 06:54:58 +0200 <slack1256> > sumGuarded [10,9..1]
2022-06-07 06:55:00 +0200 <lambdabot> [0,10,19,27,34,40,45,49,52,54,55]
2022-06-07 06:55:49 +0200gio123(~gio123@146.255.226.194) (Quit: Client closed)
2022-06-07 06:56:24 +0200 <slack1256> I argue that we should deprecate `sum` as for infinite data type (such as list) it will return bottom. I think it is better to map to the infinite stream in case the argument is one.
2022-06-07 06:56:44 +0200 <slack1256> Agree or disagree ?
2022-06-07 06:59:31 +0200 <EvanR> people use non-negative Int too
2022-06-07 06:59:56 +0200 <EvanR> as well as finite lists, in unchecked ways
2022-06-07 07:00:31 +0200 <EvanR> also, sum is not list-specific
2022-06-07 07:00:54 +0200k8yun(~k8yun@user/k8yun) (Read error: Connection reset by peer)
2022-06-07 07:01:50 +0200 <EvanR> a sequence of partials sums is an entirely different animal so doesn't function as a drop in replacement
2022-06-07 07:02:09 +0200 <slack1256> Also, if you guys have time, check http://www2.tcs.ifi.lmu.de/~abel/popl13.pdf about copatterns for codata. That example in section 2.2 sold me the idea.
2022-06-07 07:02:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 07:08:57 +0200motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-06-07 07:09:00 +0200 <lyxia> I'll agree if you give me a type of lazy finite lists as a replacement.
2022-06-07 07:09:15 +0200k8yun(~k8yun@user/k8yun)
2022-06-07 07:12:01 +0200 <EvanR> a Vec indexed by an existential Nat? xD
2022-06-07 07:12:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 07:13:34 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds)
2022-06-07 07:14:54 +0200 <slack1256> Better yet, how can we pass a proof along that a list is finite?
2022-06-07 07:15:15 +0200 <slack1256> I can only think on a Ghost of Departed Proof kind of setup.
2022-06-07 07:16:52 +0200 <EvanR> a Vec indexed by an existential Nat
2022-06-07 07:17:04 +0200 <dolio> Existentials make things strict.
2022-06-07 07:18:11 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-07 07:19:19 +0200yosef``(~user@223.73.197.95)
2022-06-07 07:19:32 +0200 <dolio> At least if you build them up in pieces.
2022-06-07 07:19:58 +0200yosef`(~user@user/yosef/x-2947716) (Read error: Connection reset by peer)
2022-06-07 07:20:12 +0200 <EvanR> well someone wants to build it lazily, then someone else wants to consume it without knowing how it was built
2022-06-07 07:20:40 +0200 <EvanR> first person might need to use a known Nat
2022-06-07 07:22:07 +0200 <EvanR> lazy fuel
2022-06-07 07:23:21 +0200Polo(~Gambino@user/polo)
2022-06-07 07:24:07 +0200sebastiandb_(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net) (Ping timeout: 258 seconds)
2022-06-07 07:32:12 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-06-07 07:34:03 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 07:35:26 +0200Polo(~Gambino@user/polo) (Quit: Polo)
2022-06-07 07:41:26 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:c2b2:8e31:c818:61b1)
2022-06-07 07:42:54 +0200slack1256(~slack1256@186.11.82.227) (Ping timeout: 276 seconds)
2022-06-07 07:46:33 +0200andrey_(~andrey@p508d48e4.dip0.t-ipconnect.de)
2022-06-07 07:49:03 +0200andrey__(~andrey@p508d49e0.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2022-06-07 07:49:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 07:51:08 +0200motherfsck(~motherfsc@user/motherfsck)
2022-06-07 07:52:32 +0200money(~Gambino@user/polo)
2022-06-07 07:59:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds)
2022-06-07 08:00:16 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-06-07 08:00:19 +0200bilegeek(~bilegeek@2600:1008:b02b:743:567:fb63:d9c2:484b) (Quit: Leaving)
2022-06-07 08:02:57 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-07 08:04:02 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net) (Ping timeout: 260 seconds)
2022-06-07 08:06:13 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 08:08:45 +0200acidjnk_new(~acidjnk@p200300d0c7068b707c47e4f6eb00087c.dip0.t-ipconnect.de)
2022-06-07 08:10:43 +0200 <gnyeki> is my impression correct that efforts to bring CUDA to Haskell have mostly stopped around 6 to 8 years ago? if yes, why might this be?
2022-06-07 08:11:49 +0200 <Athas> gnyeki: I don't think that is true. The 'cuda' library is maintained to some extent. Last update was in 2021.
2022-06-07 08:12:06 +0200 <Athas> It's a low level library, so it probably does not require much maintenance. I expect it still works.
2022-06-07 08:12:11 +0200k8yun(~k8yun@user/k8yun) (Quit: Leaving)
2022-06-07 08:17:37 +0200money(~Gambino@user/polo) (Quit: money)
2022-06-07 08:21:56 +0200vglfr(~vglfr@46.96.142.51)
2022-06-07 08:23:53 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 08:24:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 08:25:21 +0200remedan(~remedan@octo.cafe)
2022-06-07 08:25:25 +0200 <sloorush> Hello, I was not able to build a project and then I found that some packages are broken this is what I have
2022-06-07 08:25:26 +0200 <sloorush> ```
2022-06-07 08:25:26 +0200 <sloorush> ❯ ghc-pkg check --simple-output
2022-06-07 08:25:27 +0200 <sloorush> ghcid-0.8.7
2022-06-07 08:25:27 +0200 <sloorush> ```
2022-06-07 08:25:28 +0200 <sloorush> I have tried using this to fix it but no luck https://stackoverflow.com/a/7963056/13308517
2022-06-07 08:25:28 +0200 <sloorush> I tried reinstalling ghcid, but it failed, here is the log:
2022-06-07 08:25:29 +0200 <sloorush> https://pastebin.com/rNivhW3A
2022-06-07 08:26:32 +0200andrey__(~andrey@p200300dbcf1e5100509bf59e4ea7342a.dip0.t-ipconnect.de)
2022-06-07 08:26:55 +0200cfricke(~cfricke@user/cfricke)
2022-06-07 08:29:10 +0200andrey_(~andrey@p508d48e4.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2022-06-07 08:33:38 +0200coot(~coot@213.134.190.95)
2022-06-07 08:35:03 +0200 <gnyeki> Athas: hmm you're right, 'accelerate' has been getting commits too. i will look at it. the github page doesn't list papers published after 2017 though which makes me wonder why
2022-06-07 08:35:49 +0200 <Athas> gnyeki: I know several people are still actively working on it. I don't know why they don't have any more recent papers listed.
2022-06-07 08:36:47 +0200shriekingnoise(~shrieking@201.231.16.156) (Quit: Quit)
2022-06-07 08:45:00 +0200odnes(~odnes@5-203-158-63.pat.nym.cosmote.net)
2022-06-07 08:46:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 08:47:59 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 08:52:56 +0200 <[exa]> sloorush: that looks like a slightly broken install
2022-06-07 08:53:32 +0200 <[exa]> (obviously it says that the consistency of your `base` package is broken, which is probably going to prevent reasonable installation of almost anything)
2022-06-07 08:53:43 +0200 <[exa]> how did you get to this state btw?
2022-06-07 08:54:25 +0200 <[exa]> also, just removing ~/.cabal and perhaps ~/.ghc and starting anew may at least get you working builds
2022-06-07 08:55:22 +0200vglfr(~vglfr@46.96.142.51) (Ping timeout: 244 seconds)
2022-06-07 08:58:25 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-06-07 09:04:27 +0200mattil(~mattil@helsinki.portalify.com)
2022-06-07 09:08:30 +0200lottaquestions_(~nick@104.221.94.126)
2022-06-07 09:10:26 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:7f61:118e:9d6b:1e04)
2022-06-07 09:10:46 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-06-07 09:10:50 +0200lottaquestions(~nick@2607:fa49:5041:a200:a394:e3c:d4d7:cf13) (Ping timeout: 255 seconds)
2022-06-07 09:11:23 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-06-07 09:13:15 +0200kitty1(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 276 seconds)
2022-06-07 09:13:53 +0200lottaquestions_(~nick@104.221.94.126) (Quit: Konversation terminated!)
2022-06-07 09:14:12 +0200lottaquestions_(~nick@2607:fa49:5041:a200:decd:e377:11b7:e80e)
2022-06-07 09:14:21 +0200 <sloorush> [exa] This did not work, i got some help from the discord server, reinstalled everything using ghcup instead of pacman, and it works now, Thank you!
2022-06-07 09:16:18 +0200 <maerwald[m]> sloorush: arch has broken GHC
2022-06-07 09:16:45 +0200p_____(~dyeplexer@user/dyeplexer)
2022-06-07 09:17:38 +0200 <maerwald[m]> The amount of pain arch devs have caused to their haskell users is enough that haskell.ort now actively discourages installing ghc from arch repos: https://www.haskell.org/downloads/
2022-06-07 09:17:48 +0200 <tomsmeding> gnyeki: Athas:there's https://dblp.uni-trier.de/rec/conf/europar/HaakMKW20.html which AFAIK isn't merged into accelerate proper, and https://arxiv.org/abs/2108.13114 (which _is_ available in accelerate-1.3) which should still be published at a conference at some point
2022-06-07 09:18:08 +0200 <tomsmeding> maerwald[m]: haskell.place? :p
2022-06-07 09:18:16 +0200 <maerwald[m]> No other distro has managed to get discouraged that way. So gj archlinux. Please tell your distro maintainers.
2022-06-07 09:19:17 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds)
2022-06-07 09:20:16 +0200 <tomsmeding> gnyeki: current work on accelerate is mostly reworking the entire backend, which takes a while :p
2022-06-07 09:20:28 +0200 <maerwald[m]> tomsmeding: what?
2022-06-07 09:20:53 +0200 <tomsmeding> maerwald[m]: haskell.ort
2022-06-07 09:21:20 +0200 <[exa]> sloorush: ah okay, arch :] good that it's solved
2022-06-07 09:21:26 +0200 <maerwald[m]> You want a cookie for finding spelling mistake? 😄
2022-06-07 09:21:34 +0200motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2022-06-07 09:22:08 +0200p_____(~dyeplexer@user/dyeplexer) (Quit: Leaving)
2022-06-07 09:22:27 +0200p_____(~dyeplexer@user/dyeplexer)
2022-06-07 09:23:52 +0200 <maerwald[m]> https://data.iana.org/TLD/tlds-alpha-by-domain.txt
2022-06-07 09:23:58 +0200 <maerwald[m]> Seems there's no .ort
2022-06-07 09:24:01 +0200 <maerwald[m]> Too bad
2022-06-07 09:25:09 +0200money(~Gambino@user/polo)
2022-06-07 09:25:23 +0200calleum_(~calleum@user/calleum)
2022-06-07 09:25:54 +0200p_____dyeplexer
2022-06-07 09:26:17 +0200 <tomsmeding> sad
2022-06-07 09:26:33 +0200 <maerwald[m]> Yeah, but .space exists
2022-06-07 09:27:19 +0200 <maerwald[m]> And .sucks
2022-06-07 09:27:34 +0200 <maerwald[m]> That's nice. I'll create archlinux.sucks
2022-06-07 09:27:37 +0200 <tomsmeding> lol
2022-06-07 09:27:49 +0200 <darkling> Not sure something meaning "midden" is a particularly saleable TLD. :)
2022-06-07 09:28:29 +0200 <tomsmeding> maerwald[m]: arch is nice, you should just ignore the haskell packages
2022-06-07 09:30:13 +0200 <maerwald[m]> tomsmeding: i've used arch for 2.5 years and also contributed to AUR. Never again
2022-06-07 09:30:45 +0200 <tomsmeding> I've used arch for more than that and still going strong, now on two machines
2022-06-07 09:30:56 +0200 <tomsmeding> though I've never contributed to AUR yet, maybe that's an important difference
2022-06-07 09:30:58 +0200 <maerwald[m]> Their package definitions have low quality and they lack sensible policies
2022-06-07 09:30:59 +0200 <jackdk> Arch's packaging model scared me; I felt the AUR was a bit too "wild west". Moved back to Gentoo, and years later, to NixOS
2022-06-07 09:31:36 +0200 <maerwald[m]> Gentoo is one of the few distros that has strong policies and relatively good QA, but god is the PM awful
2022-06-07 09:32:29 +0200 <maerwald[m]> NixOS is the other way around: smart PM, awful packages and ecosystem. You can never win
2022-06-07 09:33:05 +0200 <tomsmeding> fedora is supposed to have somewhat more of a QA process
2022-06-07 09:33:12 +0200 <tomsmeding> but their PM is very slow, being written in python :D
2022-06-07 09:33:32 +0200 <maerwald[m]> tomsmeding: i'm using fedora right now and the amount of updates that broke stuff are a LOT
2022-06-07 09:33:50 +0200 <tomsmeding> ah
2022-06-07 09:33:56 +0200 <maerwald[m]> E.g. there's zero testing of new kernel or nvidia driver versions
2022-06-07 09:34:06 +0200 <maerwald[m]> They just bump. The user is the tester
2022-06-07 09:34:35 +0200 <maerwald[m]> Once ie the middle of a coding session an upgrade broke the xserver and crashed everything
2022-06-07 09:36:02 +0200 <tomsmeding> why do you upgrade in the middle of a coding session
2022-06-07 09:36:15 +0200 <maerwald[m]> But it's somewhat ok if you only update occasionally or exclude certain packages
2022-06-07 09:36:38 +0200 <tomsmeding> but that's worse than I've had on arch :p
2022-06-07 09:36:43 +0200 <maerwald[m]> tomsmeding: prolly when the Firefox bug or whatever hit us
2022-06-07 09:36:46 +0200 <tomsmeding> worst I had was non-booting because broken nvidia
2022-06-07 09:36:58 +0200 <tomsmeding> ah
2022-06-07 09:37:58 +0200 <maerwald[m]> Yeah on fedora a packager split the nvidia package into two, breaking suspend to ram, because the split off utility package wasn't automatically pulled in. That's both a maintainer, a policy and potentially a package manager messup
2022-06-07 09:38:36 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806)
2022-06-07 09:38:47 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 240 seconds)
2022-06-07 09:45:11 +0200lottaquestions(~nick@104.221.94.126)
2022-06-07 09:45:47 +0200kitty1(~kitty@096-039-147-043.res.spectrum.com)
2022-06-07 09:46:10 +0200yosef``(~user@223.73.197.95) (Remote host closed the connection)
2022-06-07 09:46:44 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-07 09:46:50 +0200 <Athas> Does anyone here have any experiences with decomposing Haskell programs into multiple internal libraries, rather than a single large library?
2022-06-07 09:47:04 +0200yosef```(~user@2409:8a55:e215:42f0:58b9:4cff:fea0:d9) (Quit: ERC (IRC client for Emacs 26.1))
2022-06-07 09:47:16 +0200lottaquestions_(~nick@2607:fa49:5041:a200:decd:e377:11b7:e80e) (Ping timeout: 248 seconds)
2022-06-07 09:47:46 +0200 <Athas> My motivation would be twofold: 0) stricter enforcement of internal abstraction boundaries. 2) cabal seems a lot better at concurrent compilation of packages than concurrent compilation of modules.
2022-06-07 09:47:52 +0200 <tomsmeding> what kind of experience are you looking for? I've used cabal's internal libraries some
2022-06-07 09:48:06 +0200 <tomsmeding> though not published to hackage
2022-06-07 09:48:13 +0200 <maerwald[m]> tomsmeding: wow .sucks domains are insanely expensive
2022-06-07 09:48:22 +0200yosef``(~user@user/yosef/x-3154124)
2022-06-07 09:48:23 +0200 <tomsmeding> maerwald[m]: all the vanity TLDs are like that
2022-06-07 09:48:55 +0200 <tdammers> Athas: you make it sound like a big deal, but there's not an awful lot to it, or am I missing something here?
2022-06-07 09:49:13 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-07 09:49:46 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-06-07 09:50:05 +0200 <Athas> tdammers: I'm just looking for experiences with doing it that way. Whether it just provides busywork with no real advantage.
2022-06-07 09:51:58 +0200 <sm> i did it. it has to be worth the extra noise and ongoing maintenance effort
2022-06-07 09:52:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 09:52:38 +0200 <Athas> Why did you do it?
2022-06-07 09:52:40 +0200yosef``(~user@user/yosef/x-3154124) (Client Quit)
2022-06-07 09:53:46 +0200 <sm> the main reason actually was to reduce dependencies/build effort for optional functionality that not everybody needed or could build on certain platforms
2022-06-07 09:54:01 +0200Pickchea(~private@user/pickchea)
2022-06-07 09:54:26 +0200dos__^^(~user@user/dos/x-1723657)
2022-06-07 09:54:27 +0200 <Athas> Because cabal flags are easier to apply at the component level than at the module level?
2022-06-07 09:54:41 +0200 <sm> also to compartmentalise and reduce cognitive load / allow independent releases, etc
2022-06-07 09:54:51 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 276 seconds)
2022-06-07 09:54:54 +0200hsw_hsw
2022-06-07 09:55:04 +0200 <sm> no, cabal flags are to be avoided
2022-06-07 09:58:19 +0200titibandit(~titibandi@2a00:8a60:c000:1:8a13:bf74:b2:8d47)
2022-06-07 09:59:29 +0200calleum_(~calleum@user/calleum) (Ping timeout: 252 seconds)
2022-06-07 10:00:04 +0200 <sm> I'll be concrete: hledger-ui doesn't build on windows. hledger-web requires a more complex set of deps that used to be hard to build reliably. I split them off to allow easier/incremental installation of hledger's UIs. All of hledger (cli) isn't needed for scripts, so I split off hledger-lib. All of these have to be maintained separately on hackage, stackage etc., and understood by end users, so more would be counterproductive
2022-06-07 10:01:17 +0200yosef`(~user@user/yosef/x-2947716)
2022-06-07 10:04:16 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 10:04:26 +0200alp(~alp@user/alp)
2022-06-07 10:04:30 +0200smremembers that things have improved a lot with haskell package installability
2022-06-07 10:08:14 +0200 <tomsmeding> sm: I think Athas was talking about cabal's feature of having multiple 'library' blocks in a single .cabal file, one of which is public, the others of which are internal
2022-06-07 10:08:27 +0200jinsun(~jinsun@user/jinsun)
2022-06-07 10:09:33 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 10:10:02 +0200jinsun__(~jinsun@user/jinsun) (Ping timeout: 260 seconds)
2022-06-07 10:11:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 10:11:53 +0200 <sm> thanks, probably the same applies there if to a lesser extent ? plus some compatibility issues (stack)
2022-06-07 10:12:39 +0200 <tomsmeding> well you can't publish those internal libraries separately
2022-06-07 10:12:51 +0200 <tomsmeding> so the "allow independent releases" advantage disappears
2022-06-07 10:14:18 +0200vglfr(~vglfr@coupling.penchant.volia.net)
2022-06-07 10:15:21 +0200 <tomsmeding> end-users notice less of it too, but what they do notice is stack incompatibility
2022-06-07 10:16:25 +0200zincy(~zincy@2a01:4c8:1421:61c1:6126:25bb:32f2:d1cd)
2022-06-07 10:17:53 +0200 <maerwald[m]> Ah, so it's a great way to break stack
2022-06-07 10:19:09 +0200LaoJI(~LaoJI@103.98.19.56)
2022-06-07 10:19:34 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-06-07 10:19:54 +0200 <maerwald[m]> https://github.com/commercialhaskell/stack/issues/5318
2022-06-07 10:20:12 +0200 <tomsmeding> ah, so if they are internal it's fine?
2022-06-07 10:22:02 +0200LaoJI(~LaoJI@103.98.19.56) (Quit: Client closed)
2022-06-07 10:23:42 +0200 <xdej_> sm: thank you a lot for your work on hledger-web !
2022-06-07 10:24:47 +0200urdh(~urdh@user/urdh) (Ping timeout: 240 seconds)
2022-06-07 10:25:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 10:25:37 +0200urdh(~urdh@user/urdh)
2022-06-07 10:27:05 +0200nate3(~nate@98.45.169.16)
2022-06-07 10:27:32 +0200tessier(~treed@98.171.210.130) (Ping timeout: 272 seconds)
2022-06-07 10:27:45 +0200_xor(~xor@72.49.198.103)
2022-06-07 10:28:27 +0200tessier(~treed@98.171.210.130)
2022-06-07 10:30:45 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 10:31:47 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 10:32:12 +0200nate3(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-06-07 10:33:22 +0200tessier(~treed@98.171.210.130) (Ping timeout: 260 seconds)
2022-06-07 10:35:27 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 240 seconds)
2022-06-07 10:36:54 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 10:38:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 10:38:20 +0200gehmehgeh(~user@user/gehmehgeh)
2022-06-07 10:38:33 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Remote host closed the connection)
2022-06-07 10:38:55 +0200tessier(~treed@98.171.210.130)
2022-06-07 10:42:02 +0200xdej_xdej
2022-06-07 10:48:01 +0200__monty__(~toonn@user/toonn)
2022-06-07 10:49:47 +0200Techcable(~Techcable@user/Techcable) (Remote host closed the connection)
2022-06-07 10:50:12 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 248 seconds)
2022-06-07 10:51:13 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 10:51:59 +0200Techcable(~Techcable@user/Techcable)
2022-06-07 10:55:51 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-07 10:57:33 +0200zincy(~zincy@2a01:4c8:1421:61c1:6126:25bb:32f2:d1cd) (Remote host closed the connection)
2022-06-07 10:58:14 +0200 <dragestil> Is there a cabal new-build command that builds all components in the package, including tests?
2022-06-07 11:00:10 +0200dyniec[m](~dyniecmat@2001:470:69fc:105::2:a85) (Quit: You have been kicked for being idle)
2022-06-07 11:00:19 +0200 <tomsmeding> dragestil: isn't that 'cabal build all'
2022-06-07 11:00:36 +0200dyniec[m](~dyniecmat@2001:470:69fc:105::2:a85)
2022-06-07 11:01:16 +0200 <dragestil> tomsmeding: hmm ok, I tried it but it did not build the test. perhaps this is a difference between build and new-build?
2022-06-07 11:01:24 +0200dyniec[m](~dyniecmat@2001:470:69fc:105::2:a85) ()
2022-06-07 11:02:07 +0200 <tomsmeding> dragestil: I'm talking about new-build here, because I'm on cabal >v3 :p
2022-06-07 11:02:23 +0200 <tomsmeding> but I think you're righgt
2022-06-07 11:03:22 +0200dragestilwishes the cabal user guide actually documents all commands
2022-06-07 11:03:30 +0200Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-06-07 11:05:01 +0200Pickchea(~private@user/pickchea)
2022-06-07 11:05:36 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 11:06:14 +0200 <dragestil> iirc the user guide only talks about v1 and v2 but does not say whether new- is an alias, and if so to which v
2022-06-07 11:06:27 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 240 seconds)
2022-06-07 11:07:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 11:11:24 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer)
2022-06-07 11:11:49 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 258 seconds)
2022-06-07 11:12:42 +0200Ranhir(~Ranhir@157.97.53.139) (Remote host closed the connection)
2022-06-07 11:13:20 +0200 <tomsmeding> new- is an alias to v2-, and since cabal 3.0 the v2 commands are the default (i.e. alias of the no-prefix commands)
2022-06-07 11:13:25 +0200dcoutts(~duncan@host86-144-78-203.range86-144.btcentralplus.com)
2022-06-07 11:14:50 +0200 <dragestil> ok
2022-06-07 11:15:11 +0200zincy(~zincy@2a01:4c8:1421:61c1:bc95:a71d:f43b:c153)
2022-06-07 11:17:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 11:24:10 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 240 seconds)
2022-06-07 11:25:00 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-06-07 11:25:30 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-06-07 11:26:11 +0200CodeKiwiDigitalKiwi
2022-06-07 11:26:35 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-07 11:28:22 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 11:28:54 +0200Me-me(~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host)
2022-06-07 11:28:54 +0200Me-me(~me-me@user/me-me)
2022-06-07 11:29:16 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 11:31:21 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 11:32:59 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-06-07 11:35:44 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Ping timeout: 255 seconds)
2022-06-07 11:37:38 +0200 <Las[m]> Does anyone know whether something like singletons-generic exists? Don't want to duplicate work as I'm currently working on something like that.
2022-06-07 11:38:02 +0200Ranhir(~Ranhir@157.97.53.139)
2022-06-07 11:45:12 +0200zincy(~zincy@2a01:4c8:1421:61c1:bc95:a71d:f43b:c153) (Remote host closed the connection)
2022-06-07 11:47:37 +0200DNH(~DNH@2a02:8108:1100:16d8:e92a:ff3d:d8c7:63da)
2022-06-07 11:49:54 +0200notzmv(~zmv@user/notzmv)
2022-06-07 11:52:56 +0200money(~Gambino@user/polo) (Quit: money)
2022-06-07 11:55:14 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2022-06-07 11:56:18 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de)
2022-06-07 11:57:04 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection)
2022-06-07 11:57:57 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato)
2022-06-07 11:59:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 12:00:05 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection)
2022-06-07 12:00:10 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 12:00:30 +0200HotblackDesiato(~HotblackD@gateway/tor-sasl/hotblackdesiato)
2022-06-07 12:02:12 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-06-07 12:02:48 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Ping timeout: 258 seconds)
2022-06-07 12:05:11 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 256 seconds)
2022-06-07 12:07:07 +0200 <sloorush> Can "Do not use the Haskell development tools provided by Arch, they are broken." as mentioned on https://www.haskell.org/downloads/ also be mentioned on the arch wiki(https://wiki.archlinux.org/title/haskell). It'll save a lot of trouble.
2022-06-07 12:08:03 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it)
2022-06-07 12:10:09 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer)
2022-06-07 12:10:14 +0200 <maerwald[m]> sloorush: feel free to edit the wiki
2022-06-07 12:11:02 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 12:13:50 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 12:15:50 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp) (Ping timeout: 258 seconds)
2022-06-07 12:17:14 +0200coot(~coot@213.134.190.95)
2022-06-07 12:18:45 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-06-07 12:18:52 +0200 <sloorush> maerwald[m]: Edited! Damn I didn't know wiki pages were so easily editable (:
2022-06-07 12:23:18 +0200 <Athas> That is the one thing that makes it a wiki!
2022-06-07 12:23:52 +0200money(~Gambino@user/polo)
2022-06-07 12:24:52 +0200frost(~frost@user/frost)
2022-06-07 12:26:58 +0200 <yushyin> sloorush: something similar is already mentioned in the wiki: 'For these reasons, static linking is often the preferred option for local development outside of the package system. If you prefer static linking, see #Static linking or #Alternate installations for details.' but of course not as prominent as your added note
2022-06-07 12:28:48 +0200 <sloorush> yushyin: Oh okay! but I'm not sure if this catches the eye of a first-timer. Mentioning it as a note will keep it prominent
2022-06-07 12:34:55 +0200BusConscious(~martin@ip5f5acfd5.dynamic.kabel-deutschland.de)
2022-06-07 12:42:56 +0200 <BusConscious> hello everyone, so I am trying to write a shell interpreter in Haskell, that is as POSIX conform as I can get it to be (very early in the process currently I only have the lexer up and running).
2022-06-07 12:43:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 12:45:00 +0200 <BusConscious> Next (even before the parser proper) I am trying to tackle word expansion: https://pubs.opengroup.org/onlinepubs/009604499/utilities/xcu_chap02.html#tag_02_06
2022-06-07 12:45:38 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 12:45:48 +0200 <BusConscious> The last step is to remove all unquoted " ' and \ that appear in the *original* unexpanded word
2022-06-07 12:47:46 +0200 <BusConscious> I don't want to use a whole data structure to store which " ' \ appear in the original word. Instead what I am going to do after field expansion is to escape every " ' \ resulting from a parameter expansion, command substitution or artihmetic expansion using a character, that can never appear in there otherwise
2022-06-07 12:49:10 +0200 <BusConscious> (I can't escape using \ because I need to filter out exactly these escape identifiers I have added after step step 2 during pathname expansion in step 3)
2022-06-07 12:50:46 +0200 <BusConscious> then in step 4 I will join all of these fields with another character y that can never appear in normal input remove all unquoted \ " ' and the escape character mentinaed up and split up into different fields using y again
2022-06-07 12:51:10 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-07 12:51:16 +0200 <BusConscious> Anyways the problem I have is simply this: What characters can I use for that purpose
2022-06-07 12:51:51 +0200 <BusConscious> In good ole C I would use 0xFE and 0xFF bytes, which have no meaning in unicode
2022-06-07 12:52:53 +0200 <BusConscious> Issue here is, that I can not represent these in Haskell's char type according to doc
2022-06-07 12:53:06 +0200 <BusConscious> Are there any other "reserved" unicodes?
2022-06-07 12:54:04 +0200 <__monty__> I think I'd split the string into bits that need quote removal and bits that don't through the process. Then in the end compose the list (of lists, potentially) back into a string.
2022-06-07 12:54:30 +0200 <jackdk> This is C-programmer thinking, shoe-horning additional information into a data type. I would define a new data type that can be either a character or a literal quote, and if you're worried about performance, look at unpack pragmas, unboxing, whatever else.
2022-06-07 12:55:12 +0200 <__monty__> Also, should you even be using a String to represent these? Paths can contain every byte except for NUL so that's already not valid Unicode, no?
2022-06-07 13:01:52 +0200 <maerwald> yes
2022-06-07 13:03:05 +0200 <BusConscious> __monty__ this would get really ugly because I already have a list of Fields (type synonym of String). Say I do something like this var='" "'; echo hi$var . The word hi$var splits with unset IFS into Fields hi" and " . Then I would have to save for each field what indices were part of the original word and what indices were not.
2022-06-07 13:03:10 +0200 <BusConscious> which is just nasty
2022-06-07 13:03:22 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:7f61:118e:9d6b:1e04) (Ping timeout: 244 seconds)
2022-06-07 13:03:28 +0200 <maerwald> String is wrong for filepaths
2022-06-07 13:03:29 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 255 seconds)
2022-06-07 13:03:35 +0200 <BusConscious> so much easier with these special escape sequences
2022-06-07 13:04:13 +0200 <BusConscious> remember I'm removing these quotes using Parsec
2022-06-07 13:04:34 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:77b3:5a9d:c274:ac8)
2022-06-07 13:06:04 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp)
2022-06-07 13:06:38 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 13:08:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 13:08:42 +0200 <BusConscious> So the solution is to have Field be a Data.ByteString synonym?
2022-06-07 13:10:02 +0200 <BusConscious> but then I would have to expect, that there are files with 0xFE and 0xFF bytes in them aah
2022-06-07 13:10:11 +0200 <BusConscious> this is making things even worse
2022-06-07 13:10:34 +0200 <sm> xdej_: 👍🏻
2022-06-07 13:10:50 +0200frost(~frost@user/frost) (Quit: Client closed)
2022-06-07 13:10:53 +0200 <BusConscious> maybe I could use double NUL to join the fields into one string and single NUL to escape characters
2022-06-07 13:11:54 +0200 <__monty__> At this point I think a rethinking of your datastructure is in order.
2022-06-07 13:12:18 +0200 <__monty__> Probably already worth treating as an AST at this point.
2022-06-07 13:14:29 +0200 <BusConscious> thank you for your advice, but I'm sorry to tell you, that I will not adhere to any of it :P
2022-06-07 13:15:19 +0200ente(~daemon@inferno.barfooze.de)
2022-06-07 13:16:37 +0200 <__monty__> That's ok. At some points in life the path of suffering is the right choice.
2022-06-07 13:17:55 +0200 <BusConscious> saving which " ' / were originally part of the word and which ones weren't would just blow up my code in size, decrease maintability and also slow it down(though this is of least concern)
2022-06-07 13:18:44 +0200 <BusConscious> this is also kind of different to an AST in that all of these word expansions happen at runtime
2022-06-07 13:19:18 +0200 <__monty__> AST and run-time are orthogonal concepts.
2022-06-07 13:19:21 +0200sympt3(~sympt@user/sympt)
2022-06-07 13:19:40 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 13:19:50 +0200lyle(~lyle@104.246.145.85)
2022-06-07 13:20:09 +0200 <BusConscious> Finally while a pathname can contain any bytes, I will assume that it does not contain NUL bytes and is in unicode.
2022-06-07 13:20:21 +0200 <__monty__> And I don't see how a complex system of escapes on top of escapes is more maintainable than a more suitable data structure. But you are free to do as you wish.
2022-06-07 13:20:24 +0200 <BusConscious> Or else I'm going crazy
2022-06-07 13:20:40 +0200 <__monty__> Paths can't contain NUL bytes. But that's the only byte that's not allowed.
2022-06-07 13:20:47 +0200sympt(~sympt@user/sympt) (Ping timeout: 260 seconds)
2022-06-07 13:20:47 +0200sympt3sympt
2022-06-07 13:21:22 +0200 <__monty__> And I seem to recall on Windows they're WTF-16, which isn't quite a Unicode encoding.
2022-06-07 13:24:40 +0200 <maerwald> __monty__: UCS-2
2022-06-07 13:25:25 +0200 <maerwald> but you can reasonably assume UTF-16 on windows
2022-06-07 13:25:38 +0200 <BusConscious> I want to reuse some of the code for my lexer and that is written as Parsec.Char, because the input of the shell is unicode for sure. So I will just use String for now and not some ByteString
2022-06-07 13:25:56 +0200 <maerwald> that's not really posix compatible
2022-06-07 13:26:10 +0200 <maerwald> posix very clearly says that filepaths are not unicode
2022-06-07 13:26:26 +0200 <maerwald> *not necessarily
2022-06-07 13:27:05 +0200 <maerwald> there's a recommendation to use the portable file character set, but that's just... a recommendation
2022-06-07 13:29:14 +0200 <BusConscious> I mean I could always change my code later, so that Field is a Data.ByteString synonym
2022-06-07 13:29:33 +0200 <BusConscious> But the first version of my shell is not going to be POSIX compatible no matter what
2022-06-07 13:29:56 +0200 <BusConscious> I think I will not even implement pathname expansion in the near future
2022-06-07 13:30:03 +0200 <BusConscious> so why add this complexity?
2022-06-07 13:31:53 +0200 <__monty__> There's a difference between necessary and unnecessary complexity.
2022-06-07 13:32:00 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-06-07 13:32:30 +0200 <BusConscious> you have to pick your fights and make reasonable compromises. Can't go from 0 to POSIX compatible in one go
2022-06-07 13:32:52 +0200 <BusConscious> A15:26 < maerwald> posix very clearly says that filepaths are not unicode
2022-06-07 13:32:58 +0200 <BusConscious> oops
2022-06-07 13:33:13 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 13:33:38 +0200 <__monty__> Ok, consider this, why are you so reluctant to make the changes now, rather than later?
2022-06-07 13:33:59 +0200frost(~frost@user/frost)
2022-06-07 13:34:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 13:34:30 +0200 <maerwald> BusConscious: you can use PosixFilePath from this release candidate: https://hackage.haskell.org/package/filepath-2.0.0.0/candidate/docs/System-AbstractFilePath-Posix.…
2022-06-07 13:37:27 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Ping timeout: 240 seconds)
2022-06-07 13:38:31 +0200 <BusConscious> Also re suitable data structure. I really only have to mark certain characters so they don't get removed when removing all quotation marks, that appeared in the original word. I'm open to suggestions but escape sequences are very easy to handle when parsing. Complex data structures describing the string to parse are not so nice to handle.
2022-06-07 13:38:59 +0200 <BusConscious> I will absolutely do that with double NUL and NUL escapes
2022-06-07 13:39:42 +0200 <BusConscious> Re the Field type I will maybe switch to something like ByteString later and make a TODO remark
2022-06-07 13:40:07 +0200 <BusConscious> maerwald: A field does not have to necessarily contain a FilePath
2022-06-07 13:40:49 +0200 <maerwald> BusConscious: PosixFilePath is just a type synonym to PosixString
2022-06-07 13:44:19 +0200money(~Gambino@user/polo) (Read error: Connection reset by peer)
2022-06-07 13:45:04 +0200money(~Gambino@user/polo)
2022-06-07 13:45:50 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 13:47:07 +0200alp(~alp@user/alp) (Ping timeout: 240 seconds)
2022-06-07 13:47:58 +0200money(~Gambino@user/polo) (Client Quit)
2022-06-07 13:48:12 +0200calleum_(~calleum@user/calleum)
2022-06-07 13:58:25 +0200alp(~alp@user/alp)
2022-06-07 13:58:35 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-06-07 14:04:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 14:05:08 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 255 seconds)
2022-06-07 14:06:30 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 14:06:39 +0200calleum_(~calleum@user/calleum) (Ping timeout: 240 seconds)
2022-06-07 14:10:16 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 14:15:54 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
2022-06-07 14:18:45 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds)
2022-06-07 14:21:35 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Remote host closed the connection)
2022-06-07 14:22:06 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com)
2022-06-07 14:26:42 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-06-07 14:28:35 +0200nate3(~nate@98.45.169.16)
2022-06-07 14:32:06 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-07 14:33:42 +0200nate3(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-06-07 14:35:24 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-07 14:43:10 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.5)
2022-06-07 14:43:43 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-07 14:43:55 +0200money(~Gambino@user/polo)
2022-06-07 14:44:04 +0200noteness(~noteness@user/noteness) (Ping timeout: 240 seconds)
2022-06-07 14:44:10 +0200money(~Gambino@user/polo) (Read error: Connection reset by peer)
2022-06-07 14:44:42 +0200money(~Gambino@user/polo)
2022-06-07 14:46:05 +0200money(~Gambino@user/polo) (Client Quit)
2022-06-07 14:47:49 +0200jonathanx(~jonathan@94.234.52.133)
2022-06-07 14:49:40 +0200acidjnk_new(~acidjnk@p200300d0c7068b707c47e4f6eb00087c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-06-07 14:51:58 +0200acidjnk_new(~acidjnk@p200300d0c7068b7031de7ac5fad117ed.dip0.t-ipconnect.de)
2022-06-07 14:54:55 +0200AlexNoo_AlexNoo
2022-06-07 14:58:36 +0200dzdcnfzd(~dzdcnfzd@pool-108-54-250-165.nycmny.fios.verizon.net)
2022-06-07 14:59:19 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-07 15:00:22 +0200 <dzdcnfzd> I'm trying to migrate a project I've written with Stack to Nix. The reason I'm migrating is that I was advised that doing so would make compiling with GHCJS easier. I have no experience with either GHCJS or Nix, and now I'm trying to figure out what the best way is to conduct the migration
2022-06-07 15:00:39 +0200 <maerwald> xD
2022-06-07 15:00:49 +0200jinsun__(~jinsun@user/jinsun)
2022-06-07 15:00:51 +0200mattil(~mattil@helsinki.portalify.com) (Remote host closed the connection)
2022-06-07 15:00:59 +0200 <dzdcnfzd> It seems like there are a lot of different techniques for doing Haskell package management on Nix. Is anyone the clear modern leading candidate?
2022-06-07 15:01:24 +0200mestre(~mestre@191.177.181.194)
2022-06-07 15:02:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 15:02:44 +0200jonathanx(~jonathan@94.234.52.133) (Ping timeout: 255 seconds)
2022-06-07 15:02:57 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 276 seconds)
2022-06-07 15:03:35 +0200 <dzdcnfzd> I'm particularly interested in how I can turn an existing cabal file into a nix setup, including solving the library version inequalities.
2022-06-07 15:03:56 +0200coot(~coot@213.134.190.95)
2022-06-07 15:06:31 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-06-07 15:07:09 +0200jinsun(~jinsun@user/jinsun)
2022-06-07 15:08:47 +0200jinsun__(~jinsun@user/jinsun) (Ping timeout: 256 seconds)
2022-06-07 15:10:09 +0200 <aforemny> dzdcnfzd: there is cabal2nix which can turn a .cabal file into a nix expression that you can import into a development environment
2022-06-07 15:10:26 +0200 <aforemny> dzdcnfzd: https://haskell4nix.readthedocs.io/nixpkgs-users-guide.html#how-to-build-a-stand-alone-project
2022-06-07 15:11:21 +0200 <dzdcnfzd> aforemny: will that handle resolving deps and getting matching package versions?
2022-06-07 15:11:26 +0200 <aforemny> dzdcnfzd: there are helpers that do that automatically (ie. skip the cabal2nix step), but as that is not documented on the official documentation above and you are just starting out, I would just call cabal2nix for now
2022-06-07 15:11:27 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 240 seconds)
2022-06-07 15:11:40 +0200 <tdammers> IME, the most viable way of using Nix is to bug someone who knows Nix to do it for you
2022-06-07 15:11:52 +0200 <geekosaur> :)
2022-06-07 15:12:25 +0200 <dzdcnfzd> tdammers: What's weird is that all the nix doc I've read seems relatively straightforward, but everyone recommends a totally different solution
2022-06-07 15:12:42 +0200 <aforemny> dzdcnfzd: cabal dependency resolution in Nixpkgs is quite limited: everything is resolved against the current curated package set and you get a warning if that resolution does not match the one cabal specifies
2022-06-07 15:12:49 +0200noteness(~noteness@user/noteness)
2022-06-07 15:13:21 +0200 <dzdcnfzd> aforemny: Wait, meaning nixpkgs only contains one version per library?
2022-06-07 15:13:33 +0200 <tdammers> dzdcnfzd: my experience with nix docs is that they tend to leave me more confused than before, and the moment I think I understand something and try to come up with a solution myself, things go pear-shaped
2022-06-07 15:13:36 +0200 <aforemny> dzdcnfzd: that curated package set specifies multiple versions for some libraries which you might be able to explicitly use if your project requires that
2022-06-07 15:14:17 +0200 <aforemny> dzdcnfzd: basically yes, per supported ghc version there is only one library version. there are exceptions: the more popular a library is, the greater the chance there are multiple versions because other packages depend on that
2022-06-07 15:15:13 +0200 <aforemny> dzdcnfzd: before you invest a lot of time into porting your project to Nix in order to get set up with GHCJS i personally would verify the claim that Nix gets you a GHCJS easily
2022-06-07 15:15:52 +0200 <dzdcnfzd> I think I'm confused at a basic level: my .cabal file has package version inequalities specified. Up until now, I've been using stack to solve those inequalities, find a matching set of package versions, download those versions, and then build. I think stack might use cabal to do the version inequality solving under the hood, but I'm not sure.
2022-06-07 15:15:57 +0200shriekingnoise(~shrieking@201.231.16.156)
2022-06-07 15:16:01 +0200 <dzdcnfzd> With Nix, what's the equivalent?
2022-06-07 15:16:13 +0200 <tdammers> I think the main problem with GHCJS isn't so much getting a working compiler (I believe you can just download binaries), but doing package management without going crazy
2022-06-07 15:17:03 +0200 <aforemny> with Nix you either want to keep your project up to date in terms of libraries, that cabal is OK resolving dependencies against the current curated set of libraries offered by Nixpkgs. there is no dependency resolution in the sense that cabal does
2022-06-07 15:17:08 +0200jinsun__(~jinsun@user/jinsun)
2022-06-07 15:17:23 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer)
2022-06-07 15:17:24 +0200 <geekosaur> dzdcnfzd, stack uses the Cabal library but not cabal-install the program
2022-06-07 15:17:25 +0200 <aforemny> or, you want to overlay the specific library versions into the curated package set yourself so that they match what cabal expects
2022-06-07 15:17:30 +0200 <aforemny> in reality, it is usually a mix of both
2022-06-07 15:18:11 +0200 <aforemny> maybe you are looking for the alternative Nix haskell infrastructure haskell.nix which does what you expect it to do (ie. resolve the specific dependencies for your project)
2022-06-07 15:18:17 +0200jinsun__(~jinsun@user/jinsun) (Client Quit)
2022-06-07 15:18:45 +0200jinsun__(~jinsun@user/jinsun)
2022-06-07 15:19:08 +0200 <aforemny> i don't know how well supported GHCJS is in either infrastructures (standalone Nixpkgs, or Nixpkgs + haskell.nix)
2022-06-07 15:19:19 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-07 15:19:58 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-07 15:21:09 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 276 seconds)
2022-06-07 15:21:20 +0200 <dzdcnfzd> Okay, so just to be sure I understand, my options are: 1. I use the latest version of every library packaged in some curated nix package (which I think comes bundled with a ghc version?), 2. I do 1, but I overlay specific haskell packages into the bundled GHC, or 3. I use something called haskell.nix, which solves my version inequalities, gets a
2022-06-07 15:21:21 +0200 <dzdcnfzd> ghc (that I specify?) and builds an env on that basis
2022-06-07 15:21:37 +0200 <dzdcnfzd> Is that right?
2022-06-07 15:22:34 +0200noteness(~noteness@user/noteness)
2022-06-07 15:22:54 +0200 <aforemny> yes
2022-06-07 15:23:24 +0200 <dzdcnfzd> Which one of these solutions does cabal2nix fit into?
2022-06-07 15:24:14 +0200 <aforemny> cabal2nix is for solutions 1 + 2, to overlay the curated package set with either a library in a version unavailable, or your own cabal project (which likely is not available in the curated package set in any version)
2022-06-07 15:24:54 +0200 <aforemny> it just turns a .cabal file into a .nix file. it drops version ranges of dependencies in the process
2022-06-07 15:25:27 +0200 <dzdcnfzd> If it drops version ranges how does it get unavailable versions?
2022-06-07 15:25:56 +0200 <dzdcnfzd> Or, by "drops version ranges" do you mean that it replaces ranges with specific versions
2022-06-07 15:26:56 +0200 <aforemny> dzdcnfzd: right! although it really drops the version range by only referring to the dependency by name, and then that name resolves against a version of the library wrt. the curated package set offered by Nixpkgs
2022-06-07 15:27:49 +0200 <aforemny> you have at some point the option to tell Nix that library A uses library B in version X instead of the default version. but that is a manual thing
2022-06-07 15:27:49 +0200 <dzdcnfzd> "the curated package set offered by Nixpkgs" WITH my overlays on top, right?
2022-06-07 15:27:59 +0200 <aforemny> yes, right
2022-06-07 15:28:04 +0200 <dzdcnfzd> Okay
2022-06-07 15:28:19 +0200 <dzdcnfzd> This is great, thanks so much
2022-06-07 15:28:29 +0200 <dzdcnfzd> I've been super confused about all this
2022-06-07 15:28:35 +0200 <dzdcnfzd> One more question (inshallah)
2022-06-07 15:29:44 +0200 <dzdcnfzd> Does cabal2nix do the solving of package version inequalities automatically, or do I have to do the solving manually and then pass in the versions I need?
2022-06-07 15:30:14 +0200jinsun__(~jinsun@user/jinsun) ()
2022-06-07 15:30:28 +0200 <dzdcnfzd> And also, I guess, do I have to download these versions myself, or am I looking for them in Nixpkgs?
2022-06-07 15:30:47 +0200 <aforemny> you have to do it manually, cabal2nix literally drops version information and assumes you refer to the default/ most recent version of that library in Nixpkgs
2022-06-07 15:30:49 +0200jinsun(~jinsun@user/jinsun)
2022-06-07 15:31:53 +0200 <dzdcnfzd> Okay. Super useful.
2022-06-07 15:32:10 +0200Pickchea(~private@user/pickchea) (Ping timeout: 244 seconds)
2022-06-07 15:32:29 +0200 <aforemny> i don't understand your second question: for the versions of libraries not available in Nixpkgs you will have to provide a Nix recipe for them via cabal2nix
2022-06-07 15:32:40 +0200 <aforemny> but with that recipe, Nix will handling downloading the source and building the library for you
2022-06-07 15:32:46 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-06-07 15:33:11 +0200 <dzdcnfzd> Okay. I'll try to work it out and I might have smarter questions once I've done that
2022-06-07 15:34:12 +0200 <aforemny> dzdcnfzd: https://haskell4nix.readthedocs.io/nixpkgs-users-guide.html#how-to-create-nix-builds-for-your-own-… this should be exactly what you want to read right now, i guess
2022-06-07 15:34:34 +0200 <dzdcnfzd> kk. Thanks for all the info!
2022-06-07 15:34:36 +0200 <aforemny> i do think you can skip the previous sections, but i am not 100% sure
2022-06-07 15:35:00 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 15:35:28 +0200liz_(~liz@host86-159-158-175.range86-159.btcentralplus.com)
2022-06-07 15:35:51 +0200 <aforemny> dzdcnfzd: and once you are comfortable with what's described there, i would look into abstracting the manual cabal2nix step as described here https://bytes.zone/posts/callcabal2nix/
2022-06-07 15:36:29 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net)
2022-06-07 15:39:38 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Ping timeout: 255 seconds)
2022-06-07 15:44:12 +0200myme(~myme@2a01:799:d5a:cd00:a688:b867:c411:edfd) (Ping timeout: 272 seconds)
2022-06-07 15:44:47 +0200myme(~myme@2a01:799:d5a:cd00:dd4e:6782:5084:ddd1)
2022-06-07 15:48:39 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-06-07 15:49:01 +0200odnes(~odnes@5-203-158-63.pat.nym.cosmote.net) (Remote host closed the connection)
2022-06-07 15:49:08 +0200odnes_(~odnes@5-203-158-63.pat.nym.cosmote.net)
2022-06-07 15:50:00 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-07 15:53:15 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 260 seconds)
2022-06-07 15:56:02 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-06-07 16:00:39 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 16:05:14 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-06-07 16:06:11 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net) (Ping timeout: 255 seconds)
2022-06-07 16:07:10 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-06-07 16:07:18 +0200Ram-Z(Ram-Z@2a01:7e01::f03c:91ff:fe57:d2df) (Ping timeout: 244 seconds)
2022-06-07 16:08:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-07 16:09:46 +0200ell(~ellie@user/ellie) (Quit: Ping timeout (120 seconds))
2022-06-07 16:10:05 +0200ell(~ellie@user/ellie)
2022-06-07 16:12:16 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net)
2022-06-07 16:13:27 +0200ptrcmd(~ptrcmd@user/ptrcmd) (Ping timeout: 240 seconds)
2022-06-07 16:14:32 +0200motherfsck(~motherfsc@user/motherfsck)
2022-06-07 16:14:38 +0200ptrcmd(~ptrcmd@user/ptrcmd)
2022-06-07 16:14:50 +0200mrd(~mrd@user/mrd) (Ping timeout: 260 seconds)
2022-06-07 16:26:48 +0200dsrt^(~dsrt@c-24-131-46-83.hsd1.ga.comcast.net) (Remote host closed the connection)
2022-06-07 16:42:57 +0200_73(~user@pool-173-76-102-248.bstnma.fios.verizon.net) (Remote host closed the connection)
2022-06-07 16:43:41 +0200whatsupdoc_(uid509081@id-509081.hampstead.irccloud.com)
2022-06-07 16:44:10 +0200Pickchea(~private@user/pickchea)
2022-06-07 16:47:28 +0200Sgeo(~Sgeo@user/sgeo)
2022-06-07 17:01:25 +0200slack1256(~slack1256@191.126.99.72)
2022-06-07 17:02:52 +0200yosef``(~user@2409:8955:61c:4510:bc38:4f13:2f21:ed8c)
2022-06-07 17:03:52 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 17:04:30 +0200yosef`(~user@user/yosef/x-2947716) (Ping timeout: 276 seconds)
2022-06-07 17:05:09 +0200dzdcnfzd(~dzdcnfzd@pool-108-54-250-165.nycmny.fios.verizon.net) (Quit: Client closed)
2022-06-07 17:09:17 +0200Ram-Z(~Ram-Z@li1814-254.members.linode.com)
2022-06-07 17:11:04 +0200CiaoSen(~Jura@p5dcc0172.dip0.t-ipconnect.de)
2022-06-07 17:15:59 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 258 seconds)
2022-06-07 17:16:51 +0200CiaoSen(~Jura@p5dcc0172.dip0.t-ipconnect.de) (Ping timeout: 276 seconds)
2022-06-07 17:18:18 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-07 17:20:41 +0200noteness(~noteness@user/noteness)
2022-06-07 17:23:35 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:77b3:5a9d:c274:ac8) (Quit: WeeChat 2.8)
2022-06-07 17:27:16 +0200_73(~user@pool-173-76-102-248.bstnma.fios.verizon.net)
2022-06-07 17:28:41 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 17:31:12 +0200sebastiandb_(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-07 17:34:40 +0200 <yrlnry> Is there a standard jargon term for a variable that holds a value, as opposed to a type variable? People don't say "value variable", do they?
2022-06-07 17:35:40 +0200 <geekosaur> generally it's just "variable"
2022-06-07 17:35:45 +0200 <c_wraith> not that I can recall hearing. I think it's just the assumption if you say "variable" without providing further context to suggest you mean a type variable.
2022-06-07 17:35:50 +0200 <geekosaur> sometimes "value-level variable"
2022-06-07 17:36:26 +0200 <yrlnry> Thanks. I recently had to say to someone "It's a little unfortunate that your example uses s1 as the name of a value variable when my question used it as the name of a type variable." Is there a more elegant way to express this?
2022-06-07 17:37:14 +0200 <maerwald> kind-level variable
2022-06-07 17:37:29 +0200 <kuribas> I say "value level variable".
2022-06-07 17:37:31 +0200 <c_wraith> in that context, it sounds perfectly fine
2022-06-07 17:37:34 +0200 <maerwald> wasn't there something after kinds?
2022-06-07 17:37:40 +0200 <c_wraith> sorts
2022-06-07 17:37:42 +0200 <maerwald> right
2022-06-07 17:37:45 +0200 <c_wraith> but it all got collapsed
2022-06-07 17:38:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds)
2022-06-07 17:38:27 +0200raym(~raym@user/raym) (Quit: rebooting... nvidia driver update!)
2022-06-07 17:38:29 +0200 <yrlnry> I used to hang out here a lot, but it has been many years. I would like to avoid faux pas. Is there something I should read? I found https://wiki.haskell.org/IRC_channel .
2022-06-07 17:38:46 +0200 <geekosaur> I don't think there's anything more recent than that
2022-06-07 17:39:33 +0200 <yrlnry> It just says to be nice, which is what I remember from last time. I can do that!
2022-06-07 17:39:35 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-07 17:40:42 +0200raym(~raym@user/raym)
2022-06-07 17:41:47 +0200 <geekosaur> someone will remind you nicely, anyway. we're moderators, not imperators
2022-06-07 17:42:23 +0200 <yrlnry> The Report calls them "tyvar" and "varid", which does not seem perspicuous.
2022-06-07 17:43:21 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-06-07 17:43:59 +0200 <yrlnry> I mean, it's fine in the context of the Report, but wouldn't have worked well in my context."
2022-06-07 17:46:44 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-06-07 17:51:19 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-07 17:51:24 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-07 17:52:02 +0200odnes_(~odnes@5-203-158-63.pat.nym.cosmote.net) (Ping timeout: 260 seconds)
2022-06-07 17:54:44 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
2022-06-07 17:55:03 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection)
2022-06-07 17:56:11 +0200odnes(~odnes@5-203-158-63.pat.nym.cosmote.net)
2022-06-07 17:58:39 +0200Pickchea(~private@user/pickchea) (Ping timeout: 240 seconds)
2022-06-07 18:06:44 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-07 18:06:58 +0200 <tomsmeding> tyvar I could see used as an abbreviation in other contexts, but varid is super specific to the report
2022-06-07 18:07:04 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net)
2022-06-07 18:07:07 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-06-07 18:07:09 +0200[_][itchyjunk]
2022-06-07 18:07:35 +0200 <tomsmeding> also the word "identifier" in "VARiable IDentifier" is really compiler jargon; a programmer thinks in terms of variables, not identifiers
2022-06-07 18:07:41 +0200 <geekosaur> varid is to distinguish from conid; neither is real useful without context
2022-06-07 18:08:19 +0200 <geekosaur> (CONstructor IDentifier)
2022-06-07 18:09:30 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Remote host closed the connection)
2022-06-07 18:09:37 +0200 <tomsmeding> also it's a lexical term, whereas "variable" is a semantic thing
2022-06-07 18:09:47 +0200titibandit(~titibandi@2a00:8a60:c000:1:8a13:bf74:b2:8d47) (Quit: Leaving.)
2022-06-07 18:09:52 +0200 <tomsmeding> I would bet there is also tyvarid
2022-06-07 18:10:19 +0200 <tomsmeding> ah no
2022-06-07 18:10:27 +0200 <tomsmeding> oh but 'tyvar -> varid' lol
2022-06-07 18:10:36 +0200 <tomsmeding> so varid is actually the wrong term here
2022-06-07 18:11:20 +0200 <geekosaur> yeh, I don't think the Report distinguishes beyond that because in Report Haskell tyvars and regular vars live in distinct worlds
2022-06-07 18:11:45 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 18:13:14 +0200wonko(~wjc@2a0e:1c80:2::130)
2022-06-07 18:15:37 +0200slack1256(~slack1256@191.126.99.72) (Remote host closed the connection)
2022-06-07 18:23:50 +0200Midjak(~Midjak@82.66.147.146)
2022-06-07 18:30:05 +0200nate3(~nate@98.45.169.16)
2022-06-07 18:30:23 +0200Pickchea(~private@user/pickchea)
2022-06-07 18:32:29 +0200whatsupdoc_whatsupdoc
2022-06-07 18:33:47 +0200acidjnk_new(~acidjnk@p200300d0c7068b7031de7ac5fad117ed.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-06-07 18:34:47 +0200nate3(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-06-07 18:36:05 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 18:45:04 +0200 <raehik> I'm playing around with barbies (the lib) a bit. There's functionality to essentially go from Identity a -> a for every field in a type. In general, does that sort of function "get deleted"/have zero cost at runtime?
2022-06-07 18:45:57 +0200 <raehik> maybe clearer, does stripping off or putting on a newtype wrapper ever cost anything?
2022-06-07 18:46:30 +0200 <geekosaur> there's a corner case where it does, but you can use Data.Coerce.coerce to get around it
2022-06-07 18:46:40 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.5)
2022-06-07 18:46:52 +0200 <geekosaur> but that said, isn't that kind of stripping normlaly done with a type family such that the wrapper disappears completely?
2022-06-07 18:47:45 +0200 <raehik> that's right, barbies does that. I have some similar work that uses type families to avoid ever even using a wrapper, and thinking about how to reconcile it with barbies
2022-06-07 18:49:09 +0200 <raehik> I think I'll have 2 "identity" functors which can have their wrappers stripped, so there would be a lot of `map getX` going around -- wanted assurance that I wouldn't be smashing my performance xd
2022-06-07 18:49:15 +0200 <geekosaur> (the corner case I mentioned is that ghc isn't smart enough to recognize that something like mapM on a list/Foldable that removes such wrapper does nothing, and iterates doing id)
2022-06-07 18:49:57 +0200 <raehik> ahhh interesting thank you. will that happen for regular map? don't think monadic map will be so common
2022-06-07 18:50:21 +0200 <geekosaur> still happens for regular map, yes
2022-06-07 18:50:45 +0200 <geekosaur> or fold, etc. but in those cases it's more likely to actually be doing something useful instead of id
2022-06-07 18:50:53 +0200 <raehik> thanks, I'll keep that in mind
2022-06-07 18:51:17 +0200 <raehik> oh and coerce is type safe isn't it
2022-06-07 18:51:22 +0200 <geekosaur> yes
2022-06-07 18:51:27 +0200 <geekosaur> enforced by the typechecker
2022-06-07 18:51:37 +0200 <raehik> course, that might help. thanks
2022-06-07 18:51:45 +0200wonko(~wjc@2a0e:1c80:2::130) (Ping timeout: 260 seconds)
2022-06-07 18:53:44 +0200 <yrlnry> Suppose I have a function fn that does something with an `f a`, where `f` is a functor and `a` is an Ord. I want to make a version of fn that "does the same but in reverse".
2022-06-07 18:54:10 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-06-07 18:54:18 +0200 <yrlnry> Hold that thought.
2022-06-07 18:56:17 +0200 <yrlnry> Right, so I thought maybe I could write `backwards = getDown . fn . fmap Down`. The idea is that `fmap Down` will produce an `f b` where `b` is still an Ord, so `fn` ought to work on it.
2022-06-07 18:58:14 +0200 <geekosaur> I think that'll work, yes
2022-06-07 18:58:15 +0200 <yrlnry> But GHC says that `fn` must have the type `(f0 (Down a) -> Down c) -> (f0 a -> c)`
2022-06-07 18:58:48 +0200 <geekosaur> mm, right
2022-06-07 18:58:50 +0200 <yrlnry> Oh, that's okay though, I can still pass a function with a more general type `(f0 a -> c)`.
2022-06-07 19:00:24 +0200 <geekosaur> mrrr. should still be a Functor
2022-06-07 19:00:54 +0200 <yrlnry> Something still not quite right though. GHC will compile it if I declare the type of `backwards` as `(f b -> f b) -> (f a -> f a)` but not if I declare it as `(f a -> f a) -> (f a -> f a)`
2022-06-07 19:00:55 +0200 <brettgilio> https://joy.swlkr.com/
2022-06-07 19:01:26 +0200 <yrlnry> But there's some sort of constraint in the types that isn't reflected in that declaration, which is that `rev fn` actually has the same type as `fn` did.
2022-06-07 19:01:34 +0200 <brettgilio> woops
2022-06-07 19:01:35 +0200 <brettgilio> wrong channel
2022-06-07 19:02:21 +0200 <geekosaur> yrlnry, that smells like an extra Functor constraint
2022-06-07 19:03:31 +0200 <yrlnry> I was wrong about the `(f b -> f b) -> (f a -> f a)` working; I had rthe declaration commented out when I ran the compiler :(
2022-06-07 19:04:02 +0200 <geekosaur> ok, so much for that
2022-06-07 19:04:15 +0200wonko(~wjc@2a0e:1c80:11::50)
2022-06-07 19:04:43 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-07 19:06:42 +0200 <telser_> Does anyone know where stack puts the source when it clones an extra dep specified via git
2022-06-07 19:07:51 +0200 <[Leary]> @let backwards f = fmap getDown . f . fmap Down
2022-06-07 19:07:52 +0200 <lambdabot> /sandbox/tmp/.L.hs:160:1: error: [-Woverlapping-patterns, -Werror=overlappin...
2022-06-07 19:07:53 +0200 <lambdabot> Pattern match is redundant
2022-06-07 19:07:53 +0200 <lambdabot> In an equation for ‘backwards’: backwards f = ...
2022-06-07 19:08:00 +0200 <[Leary]> err
2022-06-07 19:08:04 +0200 <[Leary]> @undef
2022-06-07 19:08:04 +0200 <lambdabot> Undefined.
2022-06-07 19:08:07 +0200 <[Leary]> @let backwards f = fmap getDown . f . fmap Down
2022-06-07 19:08:08 +0200 <lambdabot> Defined.
2022-06-07 19:08:16 +0200 <[Leary]> > sort `L.backwards` [1..10]
2022-06-07 19:08:18 +0200 <lambdabot> [10,9,8,7,6,5,4,3,2,1]
2022-06-07 19:08:40 +0200 <yrlnry> Oh, geez. Thanks!
2022-06-07 19:08:43 +0200 <[Leary]> yrlnry: You just missed the fmap on getDown.
2022-06-07 19:08:48 +0200 <yrlnry> Yep.
2022-06-07 19:10:55 +0200 <yrlnry> Can you get lambdabot to tell me the type it inferred for `backwards`?
2022-06-07 19:11:25 +0200 <[Leary]> :t L.backwards
2022-06-07 19:11:26 +0200 <lambdabot> (Functor f1, Functor f2) => (f2 (Down a) -> f1 (Down b)) -> f2 a -> f1 b
2022-06-07 19:12:26 +0200 <yrlnry> :t backwards
2022-06-07 19:12:27 +0200 <lambdabot> error:
2022-06-07 19:12:27 +0200 <lambdabot> Ambiguous occurrence ‘backwards’
2022-06-07 19:12:28 +0200 <lambdabot> It could refer to
2022-06-07 19:12:34 +0200 <yrlnry> :t L.backwards
2022-06-07 19:12:35 +0200 <lambdabot> (Functor f1, Functor f2) => (f2 (Down a) -> f1 (Down b)) -> f2 a -> f1 b
2022-06-07 19:13:06 +0200 <yrlnry> :t sort
2022-06-07 19:13:08 +0200 <lambdabot> Ord a => [a] -> [a]
2022-06-07 19:14:09 +0200 <geekosaur> fwiw I got a more general one locally once I got it to work
2022-06-07 19:14:14 +0200 <geekosaur> backwards :: (Functor f, Ord a) => (forall g b. (Functor g, Ord b) => g b -> g b) -> f a -> f a
2022-06-07 19:14:29 +0200 <yrlnry> I think that's what I was groping for,
2022-06-07 19:14:40 +0200 <geekosaur> requires RankNTypes
2022-06-07 19:15:19 +0200 <yrlnry> It seemed funny to me that the type should have `Down` in it, but I couldn't think of how to say why.
2022-06-07 19:15:38 +0200 <geekosaur> hm, no, doesn't match
2022-06-07 19:15:59 +0200 <geekosaur> so I'm still doing it wrong
2022-06-07 19:17:51 +0200 <geekosaur> right, problem is the forall means `bqackwards` specifies the type, except it doesn't
2022-06-07 19:18:04 +0200 <[Leary]> Maybe you want this one? (Functor f, Ord a) => (forall b. Ord b => f b -> f b) -> f a -> f a
2022-06-07 19:18:14 +0200 <geekosaur> maybe
2022-06-07 19:18:20 +0200 <[Leary]> backwards does specify it as Down a.
2022-06-07 19:18:26 +0200 <geekosaur> I was having a problem that turned out to be a missing fmap
2022-06-07 19:19:02 +0200 <yrlnry> Where does `sort` come from? I tried importing `Data.Sort` but GHC says can not find,.
2022-06-07 19:19:11 +0200econo(uid147250@user/econo)
2022-06-07 19:19:23 +0200 <geekosaur> Data.List
2022-06-07 19:19:26 +0200 <geekosaur> or:
2022-06-07 19:19:29 +0200 <geekosaur> @index sort
2022-06-07 19:19:29 +0200 <lambdabot> GHC.OldList, Data.List, Data.ByteString, Data.ByteString.Char8, Data.Sequence
2022-06-07 19:19:39 +0200 <yrlnry> geekosaur++
2022-06-07 19:20:05 +0200 <geekosaur> (you can also ask hoogle.haskell.org)
2022-06-07 19:21:01 +0200 <yrlnry> I think backwards :: (Functor f, Ord a) => (forall b. (Ord b) => f b -> f b) -> f a -> f a is it.
2022-06-07 19:21:14 +0200 <darkling> The last few times I've tried asking Hoogle, it gave me no results, for any search.
2022-06-07 19:21:34 +0200 <geekosaur> that's the one I ended up with, yes
2022-06-07 19:21:54 +0200 <yrlnry> Thanks all, you've been very helpful.
2022-06-07 19:22:20 +0200 <geekosaur> https://paste.tomsmeding.com/peRvoRLu
2022-06-07 19:22:37 +0200 <geekosaur> with some extraneous imports as I hunted for Down, whoops :)
2022-06-07 19:22:49 +0200 <geekosaur> sadly ghci doesn't have @index
2022-06-07 19:25:04 +0200 <telser_> That would be a super useful feature though
2022-06-07 19:25:40 +0200yosef``(~user@2409:8955:61c:4510:bc38:4f13:2f21:ed8c) (Ping timeout: 250 seconds)
2022-06-07 19:27:05 +0200telser_telser
2022-06-07 19:30:00 +0200 <geekosaur[m]> Back in the day there was a way to hook lambdabot into ghcup. It's sadly bitrotted
2022-06-07 19:30:38 +0200 <maerwald> what?
2022-06-07 19:32:01 +0200 <geekosaur[m]> @hackage goa
2022-06-07 19:32:02 +0200 <lambdabot> https://hackage.haskell.org/package/goa
2022-06-07 19:35:04 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Remote host closed the connection)
2022-06-07 19:36:39 +0200 <geekosaur> oops I meant ghci. phone's learning autocompletion wrong :/
2022-06-07 19:37:42 +0200 <geekosaur> (yes, I've said "ghcup" enough that it's now offered as an autocompletion)
2022-06-07 19:39:45 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-06-07 19:39:51 +0200zebrag(~chris@user/zebrag)
2022-06-07 19:39:55 +0200 <monochrom> That speaks to the success of ghcup. :)
2022-06-07 19:44:54 +0200slack1256(~slack1256@191.125.99.72)
2022-06-07 19:47:33 +0200nate3(~nate@98.45.169.16)
2022-06-07 19:50:27 +0200 <slack1256> I have been reading about copatterns for codata, mind bending stuff. I do wonder, if we had access on a functional language to co-data declarations, would composition of co-data and data (either in data structures or pipelines) work out OK? I ask here because lazy evaluation gives us "guarded recursion", so it can be seen as a way to treat co-recursively some data structures without having separated syntax and types for data and co-data. But I wonder i
2022-06-07 19:50:28 +0200 <slack1256> f apart from ergonomics, there is a semantic challenge combining the two polarities of data on a single programming language that promotes composition.
2022-06-07 19:50:31 +0200remedan(~remedan@octo.cafe) (Quit: Bye!)
2022-06-07 19:50:56 +0200 <slack1256> It came out sightly longer than expected, but I think I had to give context to my question. Sorry about that.
2022-06-07 19:51:45 +0200 <dolio> data and codata cannot really be distinguished in languages with general recursion.
2022-06-07 19:52:25 +0200alp(~alp@user/alp) (Ping timeout: 260 seconds)
2022-06-07 19:53:42 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-07 19:54:02 +0200 <lyxia> I don't think "lazy evaluation gives us guarded recursion"
2022-06-07 19:54:04 +0200zincy(~zincy@2a01:cb18:82de:bf00:545d:42c6:141c:ed13)
2022-06-07 19:54:29 +0200 <lyxia> guarded recursion is a mechanism to ensure that functions are total
2022-06-07 19:54:36 +0200 <dolio> Even in a total language, the distinction between those two things is somewhat unrelated to syntactic ways of presenting functions.
2022-06-07 19:55:06 +0200 <lyxia> and lazy evaluation doesn't care whether your language is total or partial
2022-06-07 19:55:38 +0200 <dolio> Agda has (still) a system for codata that looks like data, and you can use copattern matching on records that aren't coinductive.
2022-06-07 19:56:50 +0200 <lyxia> copatterns is a nice syntax for defining records, it wouldn't be too hard to have it in Haskell too.
2022-06-07 19:58:27 +0200 <dolio> Or, for instance, there is a nice way of presenting size-indexed lists via copattern matching, where `head` and `tail` need only be defined for lists of size greater than 0.
2022-06-07 19:59:09 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-07 19:59:18 +0200 <dolio> You could force people to make such lists 'coinductive' to do that, but every value is actually finite.
2022-06-07 19:59:25 +0200remedan(~remedan@octo.cafe)
2022-06-07 20:01:05 +0200mbuf(~Shakthi@223.190.216.42) (Quit: Leaving)
2022-06-07 20:06:12 +0200 <__monty__> darkling: Maybe you were looking for things that aren't in Stackage? Hoogle's index is based on that, IIRC. (With Nix it's easy to get a local Hoogle instance with an index for all your local dependencies.)
2022-06-07 20:07:34 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-06-07 20:10:46 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-07 20:10:46 +0200alp(~alp@user/alp)
2022-06-07 20:12:40 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-07 20:12:42 +0200 <slack1256> lyxia: I don't think guarded recursion is related to the notion that functions can be total. I think you mean 'structural recursion' which guarrantees that functions are total.
2022-06-07 20:13:12 +0200 <slack1256> guarded recursion can be seen as one of the ingredients that you can use to prove that function on co-data are 'productive'.
2022-06-07 20:14:48 +0200califax(~califax@user/califx)
2022-06-07 20:15:14 +0200tomsmedingprefers to think in Haskell, where the question is moot because we have general recursive types :p
2022-06-07 20:15:19 +0200 <slack1256> dolio: Can you expand on the statement that "data and codata cannot be distinguished on languages with general recursion"?
2022-06-07 20:17:07 +0200 <dolio> It means that such systems have "limit-colimit coincidence." Initial F-algebras are the same as final F-coalgebras.
2022-06-07 20:17:23 +0200 <tomsmeding> I think Haskell is a reference example of how to combine data and codata -- haskell's data types generalise both
2022-06-07 20:18:02 +0200 <tomsmeding> due to laziness
2022-06-07 20:18:06 +0200 <dolio> The least fixed point of F is the greatest fixed point, and vice versa. It's now up to F whether that looks like the total-data on the analogue of F, or total-codata.
2022-06-07 20:18:36 +0200 <dolio> And which way it ends up is intertwined with the evaluation order.
2022-06-07 20:20:36 +0200 <dolio> So, in Haskell, there is: `data ENat = Zero | Suc ENat` which seems similar to the total, coinductive extended naturals, and `data Nat = Zero | Suc !Nat` which looks like the total, inductive naturals.
2022-06-07 20:21:06 +0200 <slack1256> I have not read much about F-(co)algebras yet. I know their definition (endofunctor with a carrier etc), but I have not related them to common data definitions on haskell, specially the co-algebras. A link or reference with the full treatment would be appreciated.
2022-06-07 20:21:48 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-07 20:21:56 +0200 <dolio> The 'shape' of the first is `data EN x = Zero | Suc x` and the second is `data N x = Zero | Suc !x`, and those are different functors in Haskell.
2022-06-07 20:22:38 +0200 <dolio> And the data declarations are both the inductive and coinductive fixed-points of their respective, distinct functors.
2022-06-07 20:24:04 +0200 <dolio> The same is true for, say, ML, but the notation is different. N looks like EN there, and EN needs to be written by delaying with `() -> x`.
2022-06-07 20:26:47 +0200 <tomsmeding> maybe the `() -> x` version is equivalent in some semantic fashion, but I'd consider the more appropriate version with `Lazy x` or whatever the notation was
2022-06-07 20:26:59 +0200 <tomsmeding> (i.e. call-by-need laziness instead of call-by-name)
2022-06-07 20:28:19 +0200 <dolio> Well, yeah, this is only about the denotational semantics.
2022-06-07 20:30:36 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2)
2022-06-07 20:32:57 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
2022-06-07 20:35:17 +0200 <Guest27> How do I splice a name into a foreign import in TH?
2022-06-07 20:35:18 +0200 <Guest27> '''
2022-06-07 20:35:18 +0200 <Guest27> [d| foreign import capi "myheader.h MYCONST" myCConst :: Int |]
2022-06-07 20:35:19 +0200 <Guest27> '''
2022-06-07 20:35:19 +0200 <Guest27> If I try to replace myCConst with $something or $(something...) I get a parse error on the $.
2022-06-07 20:35:20 +0200 <Guest27> I'd like to substitute in a Name created with mkName so I can automatically generate imports for a list of #define'd constants and not end up with myCConst_23 or whatnot
2022-06-07 20:35:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 20:37:23 +0200 <tomsmeding> Guest27: perhaps you can create your own ForeignD?
2022-06-07 20:38:04 +0200 <tomsmeding> a trick if you want to know what a quote returns: $(LitE . StringL . show <$> [d| foreign import capi "myheader.h MYCONST" myCConst :: Int |])
2022-06-07 20:38:06 +0200 <Guest27> tomsmeding That's going to be my last resort. Curious if there's a cleaner/less error-prone way
2022-06-07 20:39:04 +0200 <tomsmeding> if you get a parse error in that position I'm afraid the GHC parser just wasn't written to expect a slice there, and you're going to have no alternative than writing your own ForeignD :p
2022-06-07 20:39:33 +0200 <Guest27> Ah man! Well thanks for the help
2022-06-07 20:39:47 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Ping timeout: 255 seconds)
2022-06-07 20:39:52 +0200 <tomsmeding> Guest27: please do look at that LitE.StringL.show thing I posted, because the "myheader.h MYCONST" string seems to get changed in the process
2022-06-07 20:40:17 +0200 <Guest27> @tomsmen
2022-06-07 20:40:17 +0200 <lambdabot> Unknown command, try @list
2022-06-07 20:40:23 +0200 <tomsmeding> (I don't know anything about the FFI so no idea if that change is semantically relevant or not)
2022-06-07 20:40:30 +0200 <Guest27> Woops. Anyways I'll be sure to
2022-06-07 20:40:54 +0200 <tomsmeding> (most irc clients allow tab-completion if you start with a nick at the beginning of a message)
2022-06-07 20:41:37 +0200 <Guest27> My enter finger happened to beat my tab finger at the race that time :P
2022-06-07 20:41:41 +0200 <tomsmeding> :D
2022-06-07 20:41:47 +0200shapr(~user@pool-173-73-44-186.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
2022-06-07 20:42:41 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr)
2022-06-07 20:45:51 +0200jmct_(sid160793@id-160793.tinside.irccloud.com)
2022-06-07 20:45:53 +0200mcfilib_(sid302703@user/mcfilib)
2022-06-07 20:45:53 +0200teehemkay__(sid14792@id-14792.lymington.irccloud.com)
2022-06-07 20:45:53 +0200sa1_(sid7690@id-7690.ilkley.irccloud.com)
2022-06-07 20:46:17 +0200iphy_(sid67735@id-67735.lymington.irccloud.com)
2022-06-07 20:46:22 +0200p3n(~p3n@217.198.124.246)
2022-06-07 20:46:26 +0200jackdk_(sid373013@cssa/jackdk)
2022-06-07 20:46:30 +0200defanor_(~defanor@tart.uberspace.net)
2022-06-07 20:46:32 +0200kevinsjoberg_(sid499516@id-499516.lymington.irccloud.com)
2022-06-07 20:46:32 +0200dsal_(sid13060@id-13060.lymington.irccloud.com)
2022-06-07 20:46:39 +0200maerwald_(~maerwald@mail.hasufell.de)
2022-06-07 20:46:40 +0200elvishjerricco_(sid237756@id-237756.helmsley.irccloud.com)
2022-06-07 20:46:47 +0200dunj3_(~dunj3@kingdread.de)
2022-06-07 20:46:49 +0200idnar_(sid12240@debian/mithrandi)
2022-06-07 20:46:50 +0200pepeiborra_(sid443799@id-443799.ilkley.irccloud.com)
2022-06-07 20:46:55 +0200nrr____(sid20938@id-20938.lymington.irccloud.com)
2022-06-07 20:46:56 +0200caubert_(~caubert@136.244.111.235)
2022-06-07 20:46:56 +0200lexi-lambda_(sid92601@id-92601.hampstead.irccloud.com)
2022-06-07 20:46:57 +0200SrPx_(sid108780@id-108780.uxbridge.irccloud.com)
2022-06-07 20:47:01 +0200PotatoGim_(sid99505@id-99505.lymington.irccloud.com)
2022-06-07 20:47:11 +0200jonrh_(sid5185@id-5185.ilkley.irccloud.com)
2022-06-07 20:47:24 +0200NiKaN_(sid385034@id-385034.helmsley.irccloud.com)
2022-06-07 20:47:28 +0200anderson_(~ande@user/anderson)
2022-06-07 20:48:08 +0200Arsen_(arsen@managarm/dev/Arsen)
2022-06-07 20:48:23 +0200energizer_(~energizer@user/energizer)
2022-06-07 20:49:28 +0200w1gz_(~weechat@2a03:b0c0:1:d0::1123:1)
2022-06-07 20:49:28 +0200nate3(~nate@98.45.169.16) (Ping timeout: 272 seconds)
2022-06-07 20:50:33 +0200systemfault_(sid267009@id-267009.uxbridge.irccloud.com)
2022-06-07 20:50:43 +0200mcfilib(sid302703@user/mcfilib) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200sa1(sid7690@id-7690.ilkley.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200jmct(sid160793@id-160793.tinside.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200flupe(~baboum@radon.sbi.re) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200dsal(sid13060@id-13060.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200teehemkay(sid14792@id-14792.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200PotatoGim(sid99505@id-99505.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200jackdk(sid373013@cssa/jackdk) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200defanor(~defanor@tart.uberspace.net) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200p3n_(~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200kevinsjoberg(sid499516@id-499516.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200systemfault(sid267009@id-267009.uxbridge.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:43 +0200elvishjerricco(sid237756@id-237756.helmsley.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200marinelli[m](~marinelli@2001:470:69fc:105::2d8) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200Ash[m](~signal-wa@2001:470:69fc:105::1:2318) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200w1gz(~weechat@2a03:b0c0:1:d0::1123:1) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200SrPx(sid108780@id-108780.uxbridge.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200iphy(sid67735@id-67735.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200nrr___(sid20938@id-20938.lymington.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200Putonlalla(~sapekiis@it-cyan.it.jyu.fi) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200zwro[m](~zwromatri@2001:470:69fc:105::1d4) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200romes[m](~romesmatr@2001:470:69fc:105::2:1660) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200Zach[m](~zoglesby@user/zoglesby) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200anderson(~ande@user/anderson) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200NiKaN(sid385034@id-385034.helmsley.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200dunj3(~dunj3@kingdread.de) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200pepeiborra(sid443799@id-443799.ilkley.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200idnar(sid12240@debian/mithrandi) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200jmct_jmct
2022-06-07 20:50:44 +0200sa1_sa1
2022-06-07 20:50:44 +0200maerwald(~maerwald@user/maerwald) (Ping timeout: 248 seconds)
2022-06-07 20:50:44 +0200energizer(~energizer@user/energizer) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200caubert(~caubert@136.244.111.235) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200mrkajetanp(~mrkajetan@2a01:4b00:ea36:6c00:7994:941c:3f5d:2b88) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200Arsen(arsen@managarm/dev/Arsen) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200lexi-lambda(sid92601@id-92601.hampstead.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200jonrh(sid5185@id-5185.ilkley.irccloud.com) (Ping timeout: 248 seconds)
2022-06-07 20:50:45 +0200dsal_dsal
2022-06-07 20:50:45 +0200teehemkay__teehemkay
2022-06-07 20:50:45 +0200jackdk_jackdk
2022-06-07 20:50:45 +0200anderson_anderson
2022-06-07 20:50:45 +0200lexi-lambda_lexi-lambda
2022-06-07 20:50:45 +0200kevinsjoberg_kevinsjoberg
2022-06-07 20:50:45 +0200jonrh_jonrh
2022-06-07 20:50:45 +0200elvishjerricco_elvishjerricco
2022-06-07 20:50:45 +0200mcfilib_mcfilib
2022-06-07 20:50:45 +0200systemfault_systemfault
2022-06-07 20:50:45 +0200iphy_iphy
2022-06-07 20:50:45 +0200PotatoGim_PotatoGim
2022-06-07 20:50:45 +0200pepeiborra_pepeiborra
2022-06-07 20:50:45 +0200idnar_idnar
2022-06-07 20:50:49 +0200NiKaN_NiKaN
2022-06-07 20:50:51 +0200Tuplanolla(~Tuplanoll@91-159-69-1.elisa-laajakaista.fi)
2022-06-07 20:50:55 +0200mrkajetanp_(~mrkajetan@88.98.245.28)
2022-06-07 20:51:20 +0200Arsen_(arsen@managarm/dev/Arsen) (Client Quit)
2022-06-07 20:51:23 +0200flupe(~baboum@radon.sbi.re)
2022-06-07 20:51:23 +0200zwro[m](~zwromatri@2001:470:69fc:105::1d4)
2022-06-07 20:51:24 +0200pavonia(~user@user/siracusa)
2022-06-07 20:51:35 +0200romes[m](~romesmatr@2001:470:69fc:105::2:1660)
2022-06-07 20:51:54 +0200maerwald_maerwald
2022-06-07 20:51:58 +0200Arsen(arsen@managarm/dev/Arsen)
2022-06-07 20:52:06 +0200maerwald(~maerwald@mail.hasufell.de) (Changing host)
2022-06-07 20:52:06 +0200maerwald(~maerwald@user/maerwald)
2022-06-07 20:52:07 +0200dunj3_dunj3
2022-06-07 20:52:50 +0200qwedfg(~qwedfg@user/qwedfg) (Ping timeout: 240 seconds)
2022-06-07 20:52:53 +0200Ash[m](~signal-wa@2001:470:69fc:105::1:2318)
2022-06-07 20:52:54 +0200Zach[m](~zoglesby@user/zoglesby)
2022-06-07 20:54:18 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection)
2022-06-07 20:54:31 +0200qwedfg(~qwedfg@user/qwedfg)
2022-06-07 20:54:50 +0200inversed(~inversed@176.248.27.211) (Ping timeout: 260 seconds)
2022-06-07 20:54:55 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 20:56:05 +0200jonathanx(~jonathan@94.234.52.133)
2022-06-07 20:57:11 +0200jonathanx(~jonathan@94.234.52.133) (Read error: Connection reset by peer)
2022-06-07 20:57:58 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 250 seconds)
2022-06-07 20:58:05 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-06-07 20:59:02 +0200inversed(~inversed@176.248.27.211)
2022-06-07 20:59:10 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 240 seconds)
2022-06-07 21:00:39 +0200Putonlalla(~sapekiis@it-cyan.it.jyu.fi)
2022-06-07 21:02:35 +0200marinelli[m](~marinelli@2001:470:69fc:105::2d8)
2022-06-07 21:03:26 +0200pie__(~pie_bnc@user/pie/x-2818909) ()
2022-06-07 21:04:04 +0200pie_(~pie_bnc@user/pie/x-2818909)
2022-06-07 21:09:23 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 21:10:12 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 276 seconds)
2022-06-07 21:10:35 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 258 seconds)
2022-06-07 21:13:42 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-07 21:14:29 +0200AlexNoo(~AlexNoo@178.34.150.134) (Read error: Connection reset by peer)
2022-06-07 21:14:39 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving)
2022-06-07 21:15:33 +0200AlexNoo(~AlexNoo@178.34.150.134)
2022-06-07 21:18:37 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 21:19:50 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 255 seconds)
2022-06-07 21:20:11 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e)
2022-06-07 21:25:56 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a48b:5f36:2f4:7e9e) (Remote host closed the connection)
2022-06-07 21:28:24 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection)
2022-06-07 21:28:43 +0200acidjnk_new(~acidjnk@p200300d0c7068b7038b60eba3c0a34f2.dip0.t-ipconnect.de)
2022-06-07 21:29:46 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-07 21:37:54 +0200P1RATEZ(piratez@user/p1ratez)
2022-06-07 21:41:39 +0200shapr(~user@pool-173-73-44-186.washdc.fios.verizon.net)
2022-06-07 21:45:57 +0200 <Guest27> tomsmeding It turns out combining `capi "myheader.h value MYCONST"` with TH results in a ghc panic on 8.6.5 :P
2022-06-07 21:45:58 +0200 <Guest27> By this point I could've copy+pasted the C constants into Haskell and run a text editor macro over them 100 times XD
2022-06-07 21:46:10 +0200 <tomsmeding> ._.
2022-06-07 21:46:26 +0200 <tomsmeding> 8.6.5 only?
2022-06-07 21:46:45 +0200 <Guest27> Currently installing ghcup to test that lol
2022-06-07 21:46:57 +0200 <tomsmeding> yay
2022-06-07 21:48:12 +0200 <tomsmeding> question: is there a library on hackage that implements HTTP basic authentication from the server side? (i.e. the WWW-Authenticate and Authorization headers)
2022-06-07 21:48:37 +0200 <tomsmeding> I'm using snap but I can't find anything in the snap libraries that handles this...
2022-06-07 21:48:53 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Remote host closed the connection)
2022-06-07 21:48:57 +0200 <ManofLetters[m]> I'm having CRLF issues when cloning ghc: "The file will have its original line endings in your working directory" and I can't checkout branches; I think `.gitattributes` forces some conversion; I'm on LInux and my git is rather old (2.7.4), but it's way newer than what GHC docs require (1.7.8) --- did anybody have this problem? help?
2022-06-07 21:49:31 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 21:50:38 +0200 <tomsmeding> ManofLetters[m]: what exactly is the error that you get? this sounds super weird, and also something that may be fixed by a newer git version
2022-06-07 21:51:13 +0200 <tomsmeding> I would not be surprised if the "minimum git version" is not something that is meticulously kept up-to-date :p
2022-06-07 21:51:59 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded)
2022-06-07 21:53:00 +0200 <ManofLetters[m]> ~/r/ghc$ git checkout ghc-9.2
2022-06-07 21:53:00 +0200 <ManofLetters[m]> error: Your local changes to the following files would be overwritten by checkout:
2022-06-07 21:53:00 +0200 <ManofLetters[m]> testsuite/tests/indexed-types/should_compile/T14164.hs
2022-06-07 21:53:17 +0200 <ManofLetters[m]> and I can't get rid of the local changes --- they seem to be somehow autogenerated
2022-06-07 21:53:17 +0200 <tomsmeding> but `git status` gives no changes?
2022-06-07 21:53:40 +0200 <ManofLetters[m]> git gives changes and lots of warnings about line endings
2022-06-07 21:53:47 +0200 <ManofLetters[m]> *git status
2022-06-07 21:53:58 +0200 <ManofLetters[m]> `git stash` nor `git checkout --` get rid of the changes
2022-06-07 21:54:28 +0200 <ManofLetters[m]> I think you may be right a newer git is required
2022-06-07 21:54:38 +0200 <tomsmeding> ManofLetters[m]: no idea if this is going to work, but as a workaround you can perhaps try `git checkout -b newbranch; git reset --soft ghc-9.2; git checkout -- .`
2022-06-07 21:54:59 +0200 <tomsmeding> also, those autogenerated changes, what are they?
2022-06-07 21:56:43 +0200 <ManofLetters[m]> they are void, so I think they are indeed line endings
2022-06-07 21:56:46 +0200 <ManofLetters[m]> hah, it worked
2022-06-07 21:56:52 +0200 <ManofLetters[m]> the trick you gave
2022-06-07 21:57:19 +0200 <ManofLetters[m]> still lots of changes, but now I'm at the correct branch
2022-06-07 21:57:33 +0200 <tomsmeding> no guarantee that ghc tests successfully with the line ending changes though
2022-06-07 21:57:50 +0200 <tomsmeding> don't know if the golden tests stuff that they use can handle inconsistent line endings
2022-06-07 21:57:54 +0200 <tomsmeding> but you can try :)
2022-06-07 21:58:24 +0200 <EvanR> hmm programming language where line endings are significant and there are multiple kinds to choose from
2022-06-07 21:58:25 +0200 <ManofLetters[m]> I will only be running my perf regressions, after I manage to merge in a MR
2022-06-07 21:58:27 +0200 <ManofLetters[m]> so I should be fine
2022-06-07 21:58:29 +0200 <ManofLetters[m]> thanks you again
2022-06-07 21:58:40 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-06-07 21:58:40 +0200 <tomsmeding> ManofLetters[m]: my trick is a huge hack, if you know what that means it's fine, if you have no idea what it means then please say so, I can explain what state your repo is now in :p
2022-06-07 21:58:48 +0200 <EvanR> I think whitespace doesn't exploit this?
2022-06-07 21:59:04 +0200 <tomsmeding> EvanR: no whitespace is just space/tab/newline
2022-06-07 21:59:31 +0200 <EvanR> \r\n vs \n vs something else, would be hellish
2022-06-07 21:59:42 +0200 <geekosaur> macs used to use \r
2022-06-07 21:59:49 +0200 <tomsmeding> makes me think of https://esolangs.org/wiki/Folders for some reason
2022-06-07 21:59:51 +0200 <geekosaur> telnet used to use \r\r\n
2022-06-07 22:00:54 +0200 <ManofLetters[m]> tomsmeding: please tell me, in what horrible state is my repo now?
2022-06-07 22:00:58 +0200 <mrianbloom> Can you use a type family as if it's a functor, as in if there is a function of type x -> f x can f be a type family?
2022-06-07 22:02:30 +0200 <tomsmeding> ManofLetters[m]: :p it's not that bad. You're currently on a new, local-only branch that happens to point to the same commit as the ghc-9.2 branch. So if you pull now, git will think that you want to pull 'newbranch', which isn't going to do anything. You'll need to `git fetch --all`, and do the `reset` and `checkout` shuffle again
2022-06-07 22:02:51 +0200 <tomsmeding> mrianbloom: unfortunately no
2022-06-07 22:03:13 +0200 <ManofLetters[m]> tomsmeding: phew, thanks, I can work with that :)
2022-06-07 22:03:16 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 22:03:17 +0200 <tomsmeding> if you mean unifying the type of `foo :: a -> f a` with `a -> F a` where F is a type family
2022-06-07 22:03:33 +0200 <mrianbloom> What would be the alternative design to make something like this toy compile: https://replit.com/@IanBloom/TestTypeFamilyGADT?v=1
2022-06-07 22:03:48 +0200 <EvanR> or was the question, can you have a function a -> F a where F is a type family
2022-06-07 22:04:16 +0200 <EvanR> (but what does that have to do with functors)
2022-06-07 22:04:25 +0200 <mrianbloom> EvanR, yes but I'd like to define a function where F is polymorphic.
2022-06-07 22:04:37 +0200 <EvanR> "any type family" ?
2022-06-07 22:04:38 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
2022-06-07 22:04:46 +0200 <mrianbloom> Yes.
2022-06-07 22:05:38 +0200 <mrianbloom> The background is I'm trying to define some higher order functions that map over different knds of GADT expressions.
2022-06-07 22:06:01 +0200 <EvanR> you could use polykinds to speak of any * -> *
2022-06-07 22:06:24 +0200 <tomsmeding> EvanR: that doesn't allow you to put a type family there
2022-06-07 22:06:28 +0200 <EvanR> I figured
2022-06-07 22:06:36 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!)
2022-06-07 22:06:43 +0200 <EvanR> (so what's the kind of a corresponding type family F)
2022-06-07 22:07:05 +0200 <tomsmeding> a type family is not a type, and hence does not have a kind
2022-06-07 22:07:07 +0200 <EvanR> or is it purely syntactic
2022-06-07 22:07:13 +0200 <mrianbloom> I think it's just Type -> Type
2022-06-07 22:07:18 +0200 <EvanR> nah
2022-06-07 22:07:20 +0200 <tomsmeding> a type family applied to all its arguments has a kind
2022-06-07 22:08:14 +0200 <EvanR> no partially applied type families or type synonyms
2022-06-07 22:08:19 +0200 <mrianbloom> If you take a look at the Replit, baasically I used headF in place of say mapExpression. https://replit.com/@IanBloom/TestTypeFamilyGADT?v=1
2022-06-07 22:08:36 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 22:10:10 +0200 <Guest27> Even GHC 9.2.3 panics due to "values not supported yet" (╯°□°)╯︵ ┻━┻
2022-06-07 22:10:33 +0200 <tomsmeding> rip
2022-06-07 22:10:43 +0200zincy(~zincy@2a01:cb18:82de:bf00:545d:42c6:141c:ed13) (Remote host closed the connection)
2022-06-07 22:10:56 +0200 <dsal> no values
2022-06-07 22:11:02 +0200 <tomsmeding> types only
2022-06-07 22:11:13 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded)
2022-06-07 22:11:18 +0200 <Guest27> Hand over the values SPJ
2022-06-07 22:11:33 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:b5bc:25b:5256:1595)
2022-06-07 22:12:01 +0200 <tomsmeding> mrianbloom: I'm not quite clear on the higher goal that you're trying to accomplish, so not sure what to recommend. Abstracting over type families like you tried is not going to work, in any case (though it would be useful if that was possible)
2022-06-07 22:12:15 +0200 <dsal> None of these people in their ivory towers have any values that mean something to us commoners.
2022-06-07 22:12:44 +0200 <tomsmeding> they're solitary types
2022-06-07 22:12:47 +0200 <Guest27> They dare disrespect my blue-collar `#define`s?
2022-06-07 22:15:14 +0200 <mrianbloom> tomsmeding: So I built a much more complicated Expression type where the different operations are specific GADTs, I'm hoping to write polymorphic mapping functions that might only change one node in the expression.
2022-06-07 22:15:56 +0200 <mrianbloom> I boiled this down to just a list of GADTs for the purpose of trying to understand the problem.
2022-06-07 22:17:03 +0200 <mrianbloom> In reality headF would be a function like, map over an expression and visit every binary operation.
2022-06-07 22:17:45 +0200Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 256 seconds)
2022-06-07 22:19:29 +0200Maxdamantus(~Maxdamant@user/maxdamantus)
2022-06-07 22:19:46 +0200 <tomsmeding> mrianbloom: and where do the type families come in?
2022-06-07 22:20:02 +0200 <tomsmeding> oh the mapping functions have dependent types, right
2022-06-07 22:20:10 +0200 <tomsmeding> or, like, that isn't the right term
2022-06-07 22:23:33 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection)
2022-06-07 22:23:40 +0200 <mrianbloom> Well if I try to map from one type of expression to it's descendent type I've rapped it in a type Family that lets me specify the new structure. For example the old expression might include Ints and Strings but the descendent only has Strings.
2022-06-07 22:23:52 +0200 <tomsmeding> yeah I see
2022-06-07 22:24:20 +0200abiss27(~abiss27@user/abiss)
2022-06-07 22:26:59 +0200 <tomsmeding> mrianbloom: even if you could instantiate `f` to a type family in `headF`, it still wouldn't work because you require `forall x . x -> f x`, but `fooChar :: Bar t -> Foo (Bar t)`
2022-06-07 22:27:16 +0200lyle(~lyle@104.246.145.85) (Quit: WeeChat 3.5)
2022-06-07 22:27:32 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-06-07 22:27:45 +0200 <tomsmeding> I maybe perhaps have a workaround using a type class with an associated type family, but I run into this :p
2022-06-07 22:28:42 +0200 <mrianbloom> Right, so the assumption is that f handles every case of a GADT, hence the forall x.
2022-06-07 22:28:58 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-07 22:30:44 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 22:31:24 +0200stackdroid18(14094@user/stackdroid)
2022-06-07 22:33:01 +0200 <tomsmeding> > main \n 34 \n fff3456
2022-06-07 22:33:24 +0200 <tomsmeding> mrianbloom: warning hacks https://play-haskell.tomsmeding.com/play/paste/eaPHW0eI/1
2022-06-07 22:33:28 +0200 <tomsmeding> note I changed Foo
2022-06-07 22:33:46 +0200 <tomsmeding> `f` is the GADT
2022-06-07 22:34:21 +0200 <tomsmeding> the `Mapper` dictionary is kind of the way in which I pass _both_ the function _and_ the associated type family into headF
2022-06-07 22:34:48 +0200 <mrianbloom> Is see, the it's functioning like a wrapper type.
2022-06-07 22:36:43 +0200 <mrianbloom> I need to study the proxy library.
2022-06-07 22:36:51 +0200 <tomsmeding> Data.Proxy?
2022-06-07 22:36:59 +0200 <tomsmeding> there is nothing to study there
2022-06-07 22:37:06 +0200 <tomsmeding> `data Proxy a = Proxy`
2022-06-07 22:37:20 +0200 <tomsmeding> you can achieve the same thing using TypeApplications
2022-06-07 22:37:26 +0200 <mrianbloom> I see.
2022-06-07 22:37:43 +0200 <tomsmeding> using a Proxy is just a way to not have to use AllowAmbiguousTypes
2022-06-07 22:38:31 +0200 <tomsmeding> the only funny extra thing with Proxy is that it's kind-polymorphic, i.e. it's really `data Proxy (a :: k) = Proxy`
2022-06-07 22:38:54 +0200 <tdammers> You can literally define Proxy in your own module if you want, there really isn't more to it than that one line. The main reason we have it in a library is so that we have a "canonical" Proxy type that everyone should be using, so that we don't have to generalize proxy code over an arbitrary proxy type (which is also possible, but can obfuscate type errors quite a bit)
2022-06-07 22:38:54 +0200 <mrianbloom> I see. AmbiguousTypes is the bane of my existence. I always know that when I add it to the top of a file, I'm opening up the gates of hell.
2022-06-07 22:38:56 +0200 <tomsmeding> (though that's not really all that special, you can get the same with your own types just by enabling PolyKinds)
2022-06-07 22:39:42 +0200 <tomsmeding> mrianbloom: I concur lol. Well, not necessarily gates of hell, it's just liable to get much more finicky to get all the types right
2022-06-07 22:40:07 +0200 <tomsmeding> without AllowAmbiguousTypes, at least you know that if the types of all the arguments to a function as well as the type of its result are known, then the function is fully determined
2022-06-07 22:40:39 +0200 <tomsmeding> this is very useful if you're already in the weeds with getting the type checker to do what you want :p
2022-06-07 22:40:40 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 258 seconds)
2022-06-07 22:41:27 +0200 <tomsmeding> tdammers: actually there are a bunch of functions (in Data.Proxy, even) that generalise over a `proxy` type :p
2022-06-07 22:42:41 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-07 22:43:11 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer)
2022-06-07 22:44:11 +0200 <tdammers> tomsmeding: haha, yeah, I know. but experience tells me that's not always a great idea
2022-06-07 22:44:41 +0200 <tomsmeding> had to look twice at those types the first time I saw them
2022-06-07 22:44:58 +0200 <tomsmeding> "how can `f a` be a type that successfully unifies with anything -- oh wait"
2022-06-07 22:45:15 +0200 <mrianbloom> I'm experimenting with an injective type family as well: type family ETy (r :: * -> *) (t :: *) = (x :: *) | x -> r t
2022-06-07 22:47:00 +0200zebrag(~chris@user/zebrag)
2022-06-07 22:47:24 +0200 <Bulby[m]> \o/ thank you tom for that breakthrough of stack and heap
2022-06-07 22:48:03 +0200 <Bulby[m]> stack and heap perfectly represents static scope without running a resolver
2022-06-07 22:49:00 +0200 <Bulby[m]> I need to learn how to experiement in haskell and find solutions
2022-06-07 22:49:45 +0200coot(~coot@213.134.190.95)
2022-06-07 22:50:42 +0200 <tomsmeding> Bulby[m]: yay :)
2022-06-07 22:51:13 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 22:51:28 +0200 <Bulby[m]> and the REPL works by making the interpreter return its stack, and storing the stack in a State effect
2022-06-07 22:51:29 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-07 22:54:40 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Max SendQ exceeded)
2022-06-07 22:59:33 +0200slack1256(~slack1256@191.125.99.72) (Read error: Connection reset by peer)
2022-06-07 22:59:39 +0200slac74904(~slack1256@186.11.84.227)
2022-06-07 23:00:00 +0200Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2022-06-07 23:00:33 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-07 23:04:06 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-07 23:04:28 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-07 23:04:34 +0200Guest27(~Guest27@2601:281:d47f:1590::59a2) (Quit: Client closed)
2022-06-07 23:12:12 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Remote host closed the connection)
2022-06-07 23:12:49 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net)
2022-06-07 23:13:08 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 252 seconds)
2022-06-07 23:14:04 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-07 23:15:28 +0200 <tomsmeding> Bulby[m]: which is similar to how a block of statements is executed, except we need to ask the user for the next statement each time
2022-06-07 23:16:28 +0200 <Bulby[m]> recursion is magic
2022-06-07 23:16:53 +0200 <tomsmeding> turtles all the way down
2022-06-07 23:17:40 +0200yrlnry(~yrlnry@pool-108-2-150-109.phlapa.fios.verizon.net) (Ping timeout: 272 seconds)
2022-06-07 23:17:51 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: Connection reset by peer)
2022-06-07 23:19:35 +0200 <tomsmeding> mrianbloom: I just realised, my thing doesn't need a type class at all, an open type family can achieve the same thing. The essential thing is the tag type that essentially allows you to put lots of type families into one
2022-06-07 23:20:28 +0200 <tomsmeding> you don't really get something like normal polymorphism this way, but you get something that's flexible enough I think
2022-06-07 23:22:12 +0200abiss27(~abiss27@user/abiss) (Quit: hasta la vista... tchau!)
2022-06-07 23:27:57 +0200odnes(~odnes@5-203-158-63.pat.nym.cosmote.net) (Quit: Leaving)
2022-06-07 23:28:19 +0200 <mrianbloom> tomsmeding: I think that's the direction I'm going. trying to use an open type family and different tag types to marshall the selection of type equations.
2022-06-07 23:28:20 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-06-07 23:34:36 +0200 <Bulby[m]> how does one do multiple local calls for different locals
2022-06-07 23:34:41 +0200 <Bulby[m]> different readers*
2022-06-07 23:35:55 +0200 <geekosaur> If you were using mtl you would use lift to reach others than the first
2022-06-07 23:36:31 +0200 <Bulby[m]> polysemy is magic in that local can refer to any reader in the effect stack
2022-06-07 23:36:49 +0200 <Bulby[m]> so I can use type annotations to specify
2022-06-07 23:38:58 +0200 <Bulby[m]> oh, like `local f (local f sem)`
2022-06-07 23:41:14 +0200 <Bulby[m]> hmm, should fun closures be stored like the stack or the heap...
2022-06-07 23:41:23 +0200 <Bulby[m]> I think heap because it's tied to the value
2022-06-07 23:45:48 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-07 23:57:38 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-06-07 23:59:17 +0200__monty__(~toonn@user/toonn) (Quit: leaving)