2022/06/06

2022-06-06 00:00:45 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-06-06 00:06:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 00:06:41 +0200 <Bulby[m]> printing, I realize that the internal function isn't initialized until ran
2022-06-06 00:08:05 +0200acidjnk_new(~acidjnk@p200300d0c7068b76557c5ebe21773c19.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2022-06-06 00:08:43 +0200 <Bulby[m]> 😱
2022-06-06 00:08:50 +0200 <Bulby[m]> the issue was enviroments and scopes weren't lining up
2022-06-06 00:09:25 +0200 <Bulby[m]> there was no `enterBlock` or `exitBlock` around the function, which confused it
2022-06-06 00:11:03 +0200 <Bulby[m]> so now it runs
2022-06-06 00:11:08 +0200_73(~user@pool-173-76-102-248.bstnma.fios.verizon.net) (Remote host closed the connection)
2022-06-06 00:11:09 +0200 <Bulby[m]> next task - convert the java test suite to haskell 😄
2022-06-06 00:17:58 +0200zebrag(~chris@user/zebrag)
2022-06-06 00:18:40 +0200nate3(~nate@98.45.169.16)
2022-06-06 00:19:23 +0200machinedgod(~machinedg@209.171.85.74)
2022-06-06 00:21:08 +0200matijja(~matijja@193.77.181.201) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-06 00:22:10 +0200matijja(~matijja@193.77.181.201)
2022-06-06 00:22:33 +0200calleum_(~calleum@user/calleum)
2022-06-06 00:23:04 +0200calleum_(~calleum@user/calleum) (Max SendQ exceeded)
2022-06-06 00:23:34 +0200calleum_(~calleum@user/calleum)
2022-06-06 00:23:55 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:cd32:9943:3e3c:c96c) (Remote host closed the connection)
2022-06-06 00:24:37 +0200quintasan(~quassel@quintasan.pl) (Quit: No Ping reply in 180 seconds.)
2022-06-06 00:25:56 +0200quintasan(~quassel@quintasan.pl)
2022-06-06 00:28:49 +0200titibandit(~thibaut@xdsl-87-78-253-243.nc.de) (Remote host closed the connection)
2022-06-06 00:31:01 +0200 <EvanR> another "wall of incomplete dysfunctional imperative programming" in #haskell xD
2022-06-06 00:31:07 +0200dcleonarski(~user@2804:d51:4704:e400:680:84d0:9355:7c5b) (Ping timeout: 260 seconds)
2022-06-06 00:31:14 +0200 <Bulby[m]> sorry
2022-06-06 00:31:32 +0200DNH(~DNH@2a02:8108:1100:16d8:4803:3ca5:63c4:4e9f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 00:32:57 +0200alp(~alp@user/alp)
2022-06-06 00:33:27 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 00:35:45 +0200nate3(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-06 00:35:58 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 00:37:02 +0200wayfaster(~wayfaster@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 252 seconds)
2022-06-06 00:38:47 +0200dextaa(~DV@user/dextaa)
2022-06-06 00:39:15 +0200nate3(~nate@98.45.169.16)
2022-06-06 00:42:44 +0200causal(~user@50.35.83.177)
2022-06-06 00:53:35 +0200hueso(~root@user/hueso) (Ping timeout: 255 seconds)
2022-06-06 00:54:14 +0200hueso(~root@user/hueso)
2022-06-06 00:56:44 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-06 00:58:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 00:58:38 +0200 <Bulby[m]> hm, I don't know how to edit the closure, as I don't know where to define
2022-06-06 00:59:50 +0200machinedgod(~machinedg@209.171.85.74) (Ping timeout: 240 seconds)
2022-06-06 01:00:20 +0200trisolaran(~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 255 seconds)
2022-06-06 01:01:08 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 01:02:10 +0200moonsheep(~user@user/moonsheep)
2022-06-06 01:02:32 +0200moonsheep(~user@user/moonsheep) ()
2022-06-06 01:10:18 +0200moonsheep(~user@user/moonsheep)
2022-06-06 01:10:25 +0200moonsheep(~user@user/moonsheep) (ERC 5.4 (IRC client for GNU Emacs 28.1))
2022-06-06 01:20:11 +0200king_gs(~Thunderbi@2806:103e:29:ce73:832b:2b9c:b188:29da)
2022-06-06 01:20:12 +0200king_gs(~Thunderbi@2806:103e:29:ce73:832b:2b9c:b188:29da) (Client Quit)
2022-06-06 01:24:16 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 01:28:52 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Ping timeout: 250 seconds)
2022-06-06 01:31:38 +0200 <Bulby[m]> nvm, with some wizardry it is possible
2022-06-06 01:36:18 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Ping timeout: 246 seconds)
2022-06-06 01:41:11 +0200 <Bulby[m]> oh, the repl also seems to be incapable of carrying over vars
2022-06-06 01:41:54 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-06-06 01:43:12 +0200 <geekosaur> repls are complicated
2022-06-06 01:44:13 +0200 <Bulby[m]> it's weird, if it's all on one line it works fine, otherwise it gives up
2022-06-06 01:44:44 +0200nate3(~nate@98.45.169.16)
2022-06-06 01:44:49 +0200 <geekosaur> ghci behaves like that under some circumstances
2022-06-06 01:45:14 +0200 <geekosaur> scoping is also more complicated in a repl than in a program, usually
2022-06-06 01:45:29 +0200 <Bulby[m]> yeah, which is why it's having issues
2022-06-06 01:45:39 +0200 <hpc> use :{ and :} for multi-line inputs
2022-06-06 01:45:41 +0200 <hpc> or a file
2022-06-06 01:45:47 +0200 <geekosaur> this is a Lox repl
2022-06-06 01:45:52 +0200 <hpc> ah
2022-06-06 01:46:00 +0200 <geekosaur> I was just using ghci as a comparison of the issues that come up in a repl
2022-06-06 01:46:13 +0200 <Bulby[m]> and yes, `:{` and `:}` are multiline commands
2022-06-06 01:47:00 +0200 <Bulby[m]> it's probably even more problematic than ghci because at least haskell is functional
2022-06-06 01:47:12 +0200dkeohane3(~dkeohane@ec2-18-189-29-140.us-east-2.compute.amazonaws.com) (Quit: WeeChat 2.3)
2022-06-06 01:47:55 +0200 <geekosaur> another issue that will come up is if the user redefines something (in particular, a variable)
2022-06-06 01:48:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 01:48:05 +0200 <geekosaur> because you may have functions that close over the old definition
2022-06-06 01:48:16 +0200 <Bulby[m]> WAIT
2022-06-06 01:48:21 +0200 <geekosaur> do you discard them? do you let them keep it alive but inaccessible?
2022-06-06 01:48:24 +0200 <Bulby[m]> OH
2022-06-06 01:49:01 +0200 <Bulby[m]> that's going to be a headache
2022-06-06 01:49:08 +0200 <geekosaur> yep
2022-06-06 01:49:30 +0200 <Bulby[m]> >>> fun foo() { var i = 0; fun bar() { print i = i + 1; } return bar; } var baz = foo(); baz(); baz();
2022-06-06 01:49:32 +0200 <Bulby[m]> 1.0
2022-06-06 01:49:34 +0200 <Bulby[m]> 1.0
2022-06-06 01:49:37 +0200 <geekosaur> ghci lets such functions keep the old definition alive
2022-06-06 01:49:38 +0200 <Bulby[m]> oops
2022-06-06 01:49:41 +0200nate3(~nate@98.45.169.16) (Ping timeout: 244 seconds)
2022-06-06 01:49:42 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 01:49:43 +0200 <Bulby[m]> i made multiple oopsies
2022-06-06 01:49:54 +0200 <Bulby[m]> fun foo() { var i = 0; fun bar() { print i = i + 1; } return bar; } var baz = foo(); baz(); baz();
2022-06-06 01:49:56 +0200 <Bulby[m]> 1.0
2022-06-06 01:49:58 +0200 <Bulby[m]> 2.0
2022-06-06 01:50:00 +0200 <Bulby[m]> that works
2022-06-06 01:50:02 +0200 <Bulby[m]> but then
2022-06-06 01:51:04 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-06-06 01:51:04 +0200 <Bulby[m]> "it works, why"
2022-06-06 01:51:10 +0200 <Bulby[m]> it wasn't working earlier
2022-06-06 01:51:14 +0200 <Bulby[m]> I give up
2022-06-06 01:51:48 +0200 <Bulby[m]> i fail to understand why it works now
2022-06-06 01:53:01 +0200 <Bulby[m]> also, that is an interesting way to write a counter
2022-06-06 01:53:09 +0200 <Bulby[m]> I wonder if that works in other imperative langs
2022-06-06 01:54:39 +0200 <geekosaur> enough that it's a known way to keep a counter that can't be interfered with from outside
2022-06-06 01:55:06 +0200 <Bulby[m]> really? that's cool! I can't believe I didn't know that
2022-06-06 01:55:53 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 244 seconds)
2022-06-06 01:58:46 +0200Topsi(~Topsi@dyndsl-095-033-023-170.ewe-ip-backbone.de) (Ping timeout: 250 seconds)
2022-06-06 01:59:26 +0200 <Bulby[m]> my solution for closures probably won't work if it can't deduce an identifier
2022-06-06 02:00:01 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-06 02:00:27 +0200 <Bulby[m]> as when calling I look for an identifier, and it recurses until it finds one or it doesn't
2022-06-06 02:04:50 +0200 <Bulby[m]> well, you can't really reuse a function without assigning it a name
2022-06-06 02:05:29 +0200Hash(~Hash@tunnel686959-pt.tunnel.tserv15.lax1.ipv6.he.net) (Quit: ZNC - https://znc.in)
2022-06-06 02:06:01 +0200 <geekosaur[m]> Have you seen `fix` yet?
2022-06-06 02:06:03 +0200 <EvanR> ^
2022-06-06 02:06:13 +0200 <Bulby[m]> yes, but uh lox will not get fix
2022-06-06 02:06:26 +0200 <EvanR> in other word, speak for yourself xD
2022-06-06 02:07:06 +0200 <EvanR> if your language has a certain level of features, you can't stop someone from writing a fixed point combinator
2022-06-06 02:07:17 +0200 <Bulby[m]> no 😭
2022-06-06 02:07:26 +0200 <EvanR> (in haskell fix is just a normal function)
2022-06-06 02:07:29 +0200 <Bulby[m]> then how do I change the closure if it's immutable
2022-06-06 02:07:54 +0200 <geekosaur[m]> I was thinking it looked like you might already have enough
2022-06-06 02:08:04 +0200 <Bulby[m]> NO
2022-06-06 02:08:08 +0200 <Bulby[m]> 😭
2022-06-06 02:08:17 +0200 <Bulby[m]> how so
2022-06-06 02:09:06 +0200 <EvanR> usually when you decide such features won't be allowed, you try to exploit the fact and guarantee other stuff that would otherwise be impossible when recursion is allowed
2022-06-06 02:09:51 +0200 <geekosaur[m]> You have functions you can pass and return, which means you're maybe one step from lambdas
2022-06-06 02:10:18 +0200 <Bulby[m]> one of the challenges is to make anoynomous functions
2022-06-06 02:10:18 +0200Hash(~Hash@tunnel686959-pt.tunnel.tserv15.lax1.ipv6.he.net)
2022-06-06 02:10:27 +0200 <geekosaur[m]> And maybe not even that
2022-06-06 02:11:19 +0200 <EvanR> if you have partial application then that's automatic anonymous functions
2022-06-06 02:11:32 +0200 <EvanR> or if you can fake it
2022-06-06 02:11:58 +0200 <Bulby[m]> no partial application
2022-06-06 02:12:15 +0200 <Bulby[m]> altho it would be cool to add a `bind` function like haxe
2022-06-06 02:12:27 +0200 <EvanR> javascript doesn't have it but you can enclose and defer a call while holding some of the arguments
2022-06-06 02:12:47 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds)
2022-06-06 02:13:10 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com)
2022-06-06 02:13:45 +0200 <EvanR> in your next language, if functions are all anonymous, then it would be trivial to support nonymous functions
2022-06-06 02:14:07 +0200amesgen[m](~amesgenm]@2001:470:69fc:105::82b)
2022-06-06 02:17:31 +0200 <Bulby[m]> the main issue about anonymous functions right now is that closures are immutable and stored in the function datatype
2022-06-06 02:17:58 +0200 <Bulby[m]> right now I update closures by redefining the function
2022-06-06 02:18:03 +0200 <Bulby[m]> but that requires knowing the name
2022-06-06 02:18:43 +0200 <EvanR> what are you updating the closure itself
2022-06-06 02:18:52 +0200 <EvanR> why*
2022-06-06 02:19:10 +0200 <Bulby[m]> fun foo() { var i = 0; fun bar() { print i = i + 1; } return bar; } var baz = foo(); baz(); baz(); for stuff like this
2022-06-06 02:20:29 +0200 <geekosaur> I would say that's not updating the closure itself but a mutable variable held within it
2022-06-06 02:20:41 +0200 <geekosaur> but I suppose that's a Haskelly view of it
2022-06-06 02:21:18 +0200 <EvanR> i = i + 1, therefore 0 = 1, so not a problem
2022-06-06 02:22:02 +0200 <Bulby[m]> you know that's not what that means
2022-06-06 02:22:07 +0200 <EvanR> lol
2022-06-06 02:22:49 +0200alp(~alp@user/alp) (Remote host closed the connection)
2022-06-06 02:23:05 +0200 <Bulby[m]> https://github.com/TheDrawingCoder-Gamer/lox-hs/blob/master/src/Lox/Evaluate.hs#L191-L193 i redefine the closure with the new closure
2022-06-06 02:23:07 +0200 <EvanR> honestly if there were operational semantics to explain what it means, it could maybe indicate an implenetation
2022-06-06 02:23:08 +0200alp(~alp@user/alp)
2022-06-06 02:23:21 +0200 <EvanR> implementation
2022-06-06 02:23:29 +0200 <Bulby[m]> operational sematics?
2022-06-06 02:24:27 +0200 <EvanR> for example, when i is mentioned, it means retrieve the current value from the mutable variable referenced by i
2022-06-06 02:25:09 +0200 <Bulby[m]> i just had a horrible realization
2022-06-06 02:25:14 +0200 <EvanR> not the only way to define it though
2022-06-06 02:25:23 +0200 <Bulby[m]> the fundecl is recusive
2022-06-06 02:25:26 +0200 <Bulby[m]> closure*
2022-06-06 02:25:33 +0200 <Bulby[m]> but I only replace the top level
2022-06-06 02:25:38 +0200 <Bulby[m]> any recursion would break
2022-06-06 02:25:44 +0200 <EvanR> :facepalm:
2022-06-06 02:25:57 +0200 <geekosaur> you might think about redoing it the way I described
2022-06-06 02:26:26 +0200 <geekosaur> with immutable pointers to mutable memory so you aren't constantly replacing the whole closure to change one variable held within it
2022-06-06 02:26:26 +0200nate3(~nate@98.45.169.16)
2022-06-06 02:26:53 +0200 <geekosaur> and thereby not potentially breaking any other references to the closure
2022-06-06 02:26:57 +0200machinedgod(~machinedg@209.171.85.53)
2022-06-06 02:33:42 +0200nate3(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-06 02:34:23 +0200alp(~alp@user/alp) (Ping timeout: 255 seconds)
2022-06-06 02:35:44 +0200 <Bulby[m]> but what would I use? IORef would be horrible choice
2022-06-06 02:35:59 +0200 <Axman6> what's wrong with IORefs?
2022-06-06 02:36:50 +0200 <Bulby[m]> because I'm using polysemy, it would cause a lot of Jank
2022-06-06 02:37:27 +0200 <geekosaur> don't you have to be in IO anyway?
2022-06-06 02:37:51 +0200 <Bulby[m]> yes...
2022-06-06 02:37:52 +0200 <geekosaur> seems like an IORef wouldn't cause any problems you wouldn't already have
2022-06-06 02:38:02 +0200son0p(~ff@181.136.122.143)
2022-06-06 02:39:23 +0200 <Bulby[m]> looking at another haskell impl, yep, a ton of IORefs
2022-06-06 02:39:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 02:39:36 +0200mvk(~mvk@2607:fea8:5ce3:8500::ba9a)
2022-06-06 02:40:02 +0200 <geekosaur> if polysemy would really cause that many problems, I'd be tempted to suggest you're seeing why polysemy isn't that widely used :)
2022-06-06 02:40:53 +0200 <Bulby[m]> well I don't think polysemy specifically causes issues, I would just really prefer polysemy stuff
2022-06-06 02:40:54 +0200 <Bulby[m]> instead of IORef
2022-06-06 02:41:21 +0200 <geekosaur> polysemy's State uses IORef behind the scenes (so it's actual state, unlike mtl's)
2022-06-06 02:41:41 +0200 <geekosaur> so maybe you just make every variable a State
2022-06-06 02:41:54 +0200 <Bulby[m]> hm..
2022-06-06 02:42:00 +0200 <Bulby[m]> sounds horrible
2022-06-06 02:46:05 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 255 seconds)
2022-06-06 02:47:17 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-06-06 02:47:43 +0200 <Bulby[m]> I hate rewriting my codebase 2x a day
2022-06-06 02:47:53 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2022-06-06 02:48:09 +0200 <geekosaur> eventually you'll learn to design first :)
2022-06-06 02:48:34 +0200Lord_of_Life_Lord_of_Life
2022-06-06 02:51:16 +0200 <geekosaur> well, that was a little unfair, you're learning a lot from this exercise and one of the downsides is you have to incorporate what you've learned
2022-06-06 02:51:28 +0200 <EvanR> at the very least, spider sense tingling when you've written significant amount of code and don't know what's going on xD
2022-06-06 02:51:32 +0200 <Bulby[m]> i'm tired
2022-06-06 02:52:58 +0200 <EvanR> walking on a steel beam at the 90th floor, vs having walked off the beam wil-e-coyote style
2022-06-06 03:05:36 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 276 seconds)
2022-06-06 03:10:01 +0200 <Bulby[m]> idk this is just painful at this point
2022-06-06 03:10:20 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-06 03:12:42 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2022-06-06 03:16:27 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-06 03:16:31 +0200 <exarkun> pain is just weakness leaving your body right
2022-06-06 03:16:50 +0200 <Bulby[m]> ☹️
2022-06-06 03:21:51 +0200nate3(~nate@98.45.169.16)
2022-06-06 03:24:10 +0200 <jackdk> I was talking with a friend just this morning about how hard it is to build new mental models out of known concepts that don't quite fit together how you expect. It will pass, but it does suck. I remember my "but how the hell do I actually _do_ ANYTHING!?" phase
2022-06-06 03:27:03 +0200nate3(~nate@98.45.169.16) (Ping timeout: 276 seconds)
2022-06-06 03:27:26 +0200P1RATEZ(piratez@user/p1ratez)
2022-06-06 03:29:08 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 03:29:27 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp)
2022-06-06 03:29:27 +0200gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2022-06-06 03:29:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 03:35:31 +0200gentauro(~gentauro@user/gentauro)
2022-06-06 03:50:00 +0200andrey_(~andrey@p200300dbcf0906009ea91513703af53a.dip0.t-ipconnect.de)
2022-06-06 03:50:32 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Quit: Leaving)
2022-06-06 03:51:42 +0200 <monochrom> This is why I don't shoehorn new information into known concepts. Straight from definition of "new".
2022-06-06 03:52:27 +0200andrey__(~andrey@p508d5b66.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2022-06-06 03:53:10 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Ping timeout: 240 seconds)
2022-06-06 04:03:59 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-06 04:05:24 +0200machinedgod(~machinedg@209.171.85.53) (Ping timeout: 246 seconds)
2022-06-06 04:17:38 +0200P1RATEZ(piratez@user/p1ratez) (Remote host closed the connection)
2022-06-06 04:17:44 +0200tomgus1(~tomgus1@90.218.25.145) (Quit: ZNC 1.8.2+deb2 - https://znc.in)
2022-06-06 04:17:59 +0200tomgus1(~tomgus1@2a02:c7e:4229:d900:dea6:32ff:fe3d:d1a3)
2022-06-06 04:18:07 +0200ente(~daemon@inferno.barfooze.de)
2022-06-06 04:20:13 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2022-06-06 04:21:28 +0200td_(~td@muedsl-82-207-238-061.citykom.de) (Ping timeout: 258 seconds)
2022-06-06 04:23:21 +0200td_(~td@muedsl-82-207-238-164.citykom.de)
2022-06-06 04:27:33 +0200nate3(~nate@98.45.169.16)
2022-06-06 04:28:12 +0200fr-isotope(uid556229@id-556229.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-06 04:30:32 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com)
2022-06-06 04:30:43 +0200 <vaibhavsagar[m]> I'm having this weird issue with a test suite: it passes under Nix (+ Cabal) but fails with Stack?
2022-06-06 04:31:08 +0200 <vaibhavsagar[m]> very strange: https://github.com/IHaskell/IHaskell/pull/1351
2022-06-06 04:32:10 +0200nate3(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-06-06 04:37:26 +0200 <Bulby[m]> how would I represent this type `pTerm :: MonadPlus m => (a -> m a) -> m a -> (a -> m a) -> m a`
2022-06-06 04:37:30 +0200 <Bulby[m]> in this fashion:
2022-06-06 04:37:38 +0200 <Bulby[m]> https://hackage.haskell.org/package/parser-combinators-1.3.0/docs/src/Control.Monad.Combinators.Ex…
2022-06-06 04:37:54 +0200Kaiepi(~Kaiepi@156.34.47.253) (Ping timeout: 276 seconds)
2022-06-06 04:39:19 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
2022-06-06 04:39:37 +0200 <Bulby[m]> I have no idea how to handle the prefix case, as I don't know the expr yet
2022-06-06 04:49:45 +0200Kevin578(~Kevin578@pool-173-76-179-30.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
2022-06-06 04:50:10 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-06-06 04:51:02 +0200Kevin578(~Kevin578@pool-173-76-179-30.bstnma.fios.verizon.net)
2022-06-06 04:51:03 +0200mcglk(~mcglk@131.191.49.120) (Quit: (seeya))
2022-06-06 04:55:21 +0200Kevin578(~Kevin578@pool-173-76-179-30.bstnma.fios.verizon.net) (Remote host closed the connection)
2022-06-06 04:56:24 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 04:58:12 +0200mcglk(~mcglk@131.191.49.120)
2022-06-06 05:00:30 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Ping timeout: 240 seconds)
2022-06-06 05:13:00 +0200m1dnight(~christoph@78-22-9-5.access.telenet.be) (Ping timeout: 276 seconds)
2022-06-06 05:14:40 +0200m1dnight(~christoph@78-22-9-5.access.telenet.be)
2022-06-06 05:17:55 +0200 <EvanR> Bulby[m], if a = your expression type, then the (a -> a) would know what it is
2022-06-06 05:18:12 +0200 <Bulby[m]> right, my bad
2022-06-06 05:18:15 +0200 <Bulby[m]> I fixed it
2022-06-06 05:23:31 +0200infinity0(~infinity0@185.112.146.113) (Ping timeout: 256 seconds)
2022-06-06 05:25:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 05:25:25 +0200infinity0(~infinity0@185.112.146.113)
2022-06-06 05:28:04 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 05:34:02 +0200mcglk(~mcglk@131.191.49.120) (Quit: (seeya))
2022-06-06 05:36:10 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 05:38:39 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 05:39:14 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-06 05:41:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 05:47:03 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 05:47:15 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 05:47:57 +0200calleum_(~calleum@user/calleum) (Ping timeout: 246 seconds)
2022-06-06 05:54:15 +0200 <Benzi-Junior> hey, I'm working on a programming challenge and have been asked to implement an "Apgent" as a free monad, with three operations, send, recieve, and wait. now these agenst are supposed to be run concurrently and communicate via a STM channel,
2022-06-06 05:56:57 +0200mcglk(~mcglk@131.191.49.120)
2022-06-06 05:57:13 +0200 <Benzi-Junior> the way it is set up the STM channel appears to not be involved in the Agent at all but rather in the "RunAgents" function, so I'm not quite seeing how I get the Agents (or their operations) to manipulate the STM channel without it being built into their implementation
2022-06-06 05:57:26 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-06 05:57:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 05:59:47 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds)
2022-06-06 06:00:01 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-06 06:03:04 +0200 <jackdk> That set up sounds right to me: the whole point of the "free monad" idiom is to decouple the "what to run" from the "how to do it". The classic example is a "Teletype" effect where you have "readLine" and "writeLine" operations, and then later you decide whether you want to run them with "real I/O" or by passing/returning lists of strings.
2022-06-06 06:03:44 +0200dostoevsky(~d8fa613e@user/dostoevsky)
2022-06-06 06:04:34 +0200 <Benzi-Junior> I feel like the issue is might be my theoretical understanding of the term "free"
2022-06-06 06:04:42 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 06:05:06 +0200 <jackdk> Possibly? What does a "free structure" mean to you?
2022-06-06 06:07:35 +0200dostoevsky(~d8fa613e@user/dostoevsky) (Quit: Client closed)
2022-06-06 06:09:29 +0200 <Benzi-Junior> I have a hard time formulating that in a context free way, but in essence it is "what you get from applying an adjoint to a forgetful functor"
2022-06-06 06:11:35 +0200 <jackdk> Sounds plausible - I'm not fluent with adjunctions. I only know free monads operationally
2022-06-06 06:12:31 +0200 <jackdk> `data Free f a = Pure a | Free (f (Free f a)); instance Functor f => Monad (Free f) where` - writing out those instances may help your understanding
2022-06-06 06:14:37 +0200 <Benzi-Junior> oh god, I tried that and that just seemed like the wrong rabbit hole to go down
2022-06-06 06:20:26 +0200nate3(~nate@98.45.169.16)
2022-06-06 06:20:34 +0200 <Benzi-Junior> http://ix.io/3Zvr
2022-06-06 06:23:51 +0200 <Benzi-Junior> ^ is my code as it currently stands, I'm pretty sure i need to go back to the drawing board
2022-06-06 06:25:14 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-06 06:29:55 +0200mbuf(~Shakthi@122.174.63.255)
2022-06-06 06:35:56 +0200 <jackdk> I think you need to reconsider what the type of Agent should be. Your course appears to smoosh the stuff provided by the type I called `Free` in with the actual operation handling
2022-06-06 06:36:31 +0200 <jackdk> Which is fine but I'd probably go back to course notes or something and make sure you get how their presentation of this stuff works
2022-06-06 06:38:47 +0200 <EvanR> the idea of free monad is good, the necessary algebraic shenanigans is unfortunate xD
2022-06-06 06:40:43 +0200 <Benzi-Junior> what do you mean by the "type of Agent" ?, you mean how I set up the constructors
2022-06-06 06:42:39 +0200 <EvanR> the definition of the Agent type
2022-06-06 06:46:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 06:50:07 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 06:50:42 +0200 <Benzi-Junior> I'm afraid I don't follow,
2022-06-06 06:50:50 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 06:52:23 +0200 <Benzi-Junior> to me the definition of Agent in this case is "data Agent msg a = Smith a | Bond (STM msg) a"
2022-06-06 06:52:40 +0200 <Benzi-Junior> althoug as soon as I looked at it I realized what you where talking about
2022-06-06 06:53:36 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 06:53:46 +0200 <Benzi-Junior> I shouldn't have "STM msg" for the "Bond" constructor
2022-06-06 06:53:50 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
2022-06-06 06:54:55 +0200 <Benzi-Junior> this has been wracking my brain for a while now (most of this year on and off TBH)
2022-06-06 06:56:37 +0200 <Benzi-Junior> and I think I added that as a "throw everything at the wall and see what sticks" attempt a while back
2022-06-06 06:56:59 +0200 <Benzi-Junior> thought I had got rid of every oddjob thing I tried from then
2022-06-06 06:58:23 +0200 <Benzi-Junior> but do my Functor/Applicative/Monad instances make sense ?
2022-06-06 07:05:22 +0200kitty1(~kitty@096-039-147-043.res.spectrum.com) (Ping timeout: 244 seconds)
2022-06-06 07:09:04 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds)
2022-06-06 07:10:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 07:10:21 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-06-06 07:18:42 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 07:25:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 07:28:46 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 07:31:17 +0200chomwitt(~chomwitt@2a02:587:dc0e:3e00:52f0:411e:7355:f3d2)
2022-06-06 07:35:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 07:39:46 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 07:41:27 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net)
2022-06-06 07:48:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 07:48:57 +0200monochrom(trebla@216.138.220.146) (Quit: NO CARRIER)
2022-06-06 07:50:58 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 07:56:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 07:58:04 +0200monochrom(trebla@216.138.220.146)
2022-06-06 08:06:18 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 08:12:34 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-06-06 08:15:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 08:22:02 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de)
2022-06-06 08:23:46 +0200 <Benzi-Junior> ok, is there any literature on how to implement a free monad that doesn't use a "Free" wrapper type or the "Control.Free" library
2022-06-06 08:25:03 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-06-06 08:26:21 +0200 <jackdk> Consider: `data FooBar = Foo Int | Bar Char` and the type `Either Int Char`. They are isomorphic, but you can think about `FooBar` as like `Either Int Char`with the `Either` inlined into the data type
2022-06-06 08:29:58 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 08:30:25 +0200 <Benzi-Junior> Umm, yees
2022-06-06 08:30:38 +0200 <Benzi-Junior> how is that applicable to what I'm doing ?
2022-06-06 08:32:02 +0200 <jackdk> Define the functor that represents the operations you want to abstract over, and then consider what `Free YourOperationFunctor a` would look like if you inlined the `Free`
2022-06-06 08:36:07 +0200Benzi-Juniorgets out his sketchbook
2022-06-06 08:36:11 +0200mixfix41(~sdenynine@user/mixfix41) (Ping timeout: 255 seconds)
2022-06-06 08:36:35 +0200coot(~coot@213.134.190.95)
2022-06-06 08:37:07 +0200nate3(~nate@98.45.169.16)
2022-06-06 08:40:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 08:41:54 +0200nate3(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-06 08:44:18 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Quit: Leaving)
2022-06-06 08:56:39 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 09:00:49 +0200 <Benzi-Junior> http://ix.io/3ZvP
2022-06-06 09:01:15 +0200 <Benzi-Junior> so I should be doing something like the bottom of this document ?
2022-06-06 09:03:25 +0200 <jackdk> I don't have the full context of whatever course you're on, but I think it's starting to point in the right direction. I think your final answer has some additional type variables which it shouldn't - look carefully at how the ...Op functor gets passed back into itself via Free
2022-06-06 09:04:11 +0200 <jackdk> I think also some of your operations should have continuation functions. In the classic teletype example, the operation type is `data Teletype r = GetLine (String -> r) | PutLine String r deriving Functor`
2022-06-06 09:08:22 +0200 <Benzi-Junior> ok, lets address the first, what additional type variables ? I thought I trimmed everything that was possible
2022-06-06 09:09:34 +0200 <jackdk> Two parts: the `Pure b` - where does this `b` come from?
2022-06-06 09:09:37 +0200 <Benzi-Junior> except that the "Pure b" might be able to be turned into a "Pure a"
2022-06-06 09:09:42 +0200 <jackdk> Yep, that's one
2022-06-06 09:10:21 +0200 <Benzi-Junior> anything else ?
2022-06-06 09:10:37 +0200 <jackdk> The other is the the way you're expanding the alternatives in the Free (AgentOp...) stuff (I assume `AgentOp m = ` should be `AgentOp msg`...?)
2022-06-06 09:12:16 +0200 <Benzi-Junior> oh right, but at the bottom I compress that bracket because it should just be "Agent"
2022-06-06 09:13:00 +0200 <jackdk> Yeah but the stuff at the bottom is ill-kinded
2022-06-06 09:13:36 +0200 <jackdk> `Agent` alone is not a type that can be inhabited; it needs two type parameters applied to it
2022-06-06 09:15:09 +0200 <Benzi-Junior> oh right "Agent m a"
2022-06-06 09:15:16 +0200 <Benzi-Junior> the point is that it carries over
2022-06-06 09:16:59 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806)
2022-06-06 09:22:54 +0200Pickchea(~private@user/pickchea)
2022-06-06 09:23:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 09:23:35 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-06 09:29:42 +0200nate3(~nate@98.45.169.16)
2022-06-06 09:30:02 +0200gehmehgeh(~user@user/gehmehgeh)
2022-06-06 09:30:33 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net) (Ping timeout: 246 seconds)
2022-06-06 09:31:21 +0200 <jackdk> yes, but all your constructors also have an extra `a` kicking around
2022-06-06 09:31:39 +0200 <jackdk> anyway, I gotta go. Good luck.
2022-06-06 09:34:07 +0200nate3(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-06-06 09:34:33 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 09:35:18 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-06-06 09:35:23 +0200 <Benzi-Junior> cheers
2022-06-06 09:36:36 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net)
2022-06-06 09:37:50 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com)
2022-06-06 09:40:56 +0200yosef`(~user@user/yosef/x-2947716)
2022-06-06 09:42:32 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-06 09:42:58 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2022-06-06 09:43:24 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-06 09:47:38 +0200kitty1(~kitty@096-039-147-043.res.spectrum.com)
2022-06-06 09:51:16 +0200dzdcnfzd(~dzdcnfzd@93-63-223-61.ip29.fastwebnet.it)
2022-06-06 09:55:57 +0200 <dzdcnfzd> Is anyone using GHCJS? Any opinions?
2022-06-06 09:56:25 +0200 <dzdcnfzd> Use case is that I have a CLI app whose core functionality I want to make available via a simple webapp
2022-06-06 09:57:07 +0200 <dzdcnfzd> I have a lot of experience with Angular, so my plan was to use GHCJS to create a handful of hooks that I'll call from an angular app
2022-06-06 09:57:52 +0200 <dzdcnfzd> I've just started trying to install GHCJS and it seems like it might be less popular than it used to be but still in use?
2022-06-06 09:58:07 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net) (Ping timeout: 240 seconds)
2022-06-06 09:58:08 +0200 <dzdcnfzd> There are a bunch of other web frameworks that seem to do much more than I need
2022-06-06 09:58:24 +0200 <dzdcnfzd> Wondering if anyone has any experience installing / using it or other frameworks for a similar purpose
2022-06-06 10:00:20 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Ping timeout: 255 seconds)
2022-06-06 10:03:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 10:04:13 +0200 <vaibhavsagar[m]> why do you need GHCJS for this?
2022-06-06 10:04:53 +0200 <vaibhavsagar[m]> what if you made your simple webapp using scotty/spock/servant/yesod and then used Angular for your frontend
2022-06-06 10:05:08 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 10:05:15 +0200 <vaibhavsagar[m]> GHCJS is still in use, and in the process of being upstreamed into GHC proper
2022-06-06 10:05:35 +0200 <vaibhavsagar[m]> but it is currently (IMO) difficult to set up and use
2022-06-06 10:05:57 +0200 <dzdcnfzd> I don't want to pay for a backend
2022-06-06 10:06:05 +0200 <dzdcnfzd> There's no reason I need one
2022-06-06 10:06:20 +0200 <dzdcnfzd> It can be a static site
2022-06-06 10:06:28 +0200 <vaibhavsagar[m]> where is your CLI running?
2022-06-06 10:06:44 +0200DNH(~DNH@2a02:8108:1100:16d8:bcb2:718:99f3:56c4)
2022-06-06 10:06:45 +0200 <dzdcnfzd> On my users' computers:)
2022-06-06 10:07:01 +0200 <vaibhavsagar[m]> oh, you mean you have a library-ish thing that your CLI is using
2022-06-06 10:07:21 +0200 <vaibhavsagar[m]> I see, in that case GHCJS makes a little more sense
2022-06-06 10:07:21 +0200 <dzdcnfzd> Yes, exactly
2022-06-06 10:07:43 +0200 <vaibhavsagar[m]> Gabriella Gonzalez made this demo recently, might be useful: https://github.com/Gabriella439/ghcjs-demo
2022-06-06 10:07:50 +0200 <dzdcnfzd> Okay, thanks!
2022-06-06 10:08:13 +0200 <vaibhavsagar[m]> I also have an hlint-web thing: https://github.com/vaibhavsagar/hlint-live
2022-06-06 10:08:22 +0200 <dzdcnfzd> How much will nix help me, and how difficult is it to learn to the point where I can use it for this?
2022-06-06 10:08:31 +0200 <vaibhavsagar[m]> IMO it's not really feasible to use GHCJS without also using Nix
2022-06-06 10:08:38 +0200 <dzdcnfzd> Okay
2022-06-06 10:08:45 +0200 <dzdcnfzd> Does nix interop with stack or no?
2022-06-06 10:08:54 +0200 <dzdcnfzd> I have never really looked into it
2022-06-06 10:08:58 +0200 <vaibhavsagar[m]> not really
2022-06-06 10:09:02 +0200 <dzdcnfzd> Okay
2022-06-06 10:09:13 +0200 <vaibhavsagar[m]> stack also explicitly does not support GHCJS
2022-06-06 10:09:24 +0200 <dzdcnfzd> Haha yeah I found that out the hard way
2022-06-06 10:09:29 +0200 <vaibhavsagar[m]> so you won't be able to use Stack for this
2022-06-06 10:10:05 +0200 <dzdcnfzd> Does nix do everything stack does in terms of building and dependency management?
2022-06-06 10:10:15 +0200 <vaibhavsagar[m]> it does more
2022-06-06 10:10:17 +0200 <dzdcnfzd> Should I just switch my whole project over?
2022-06-06 10:10:27 +0200 <vaibhavsagar[m]> IMO yes
2022-06-06 10:10:34 +0200 <dzdcnfzd> Kk. Oy.
2022-06-06 10:10:40 +0200 <vaibhavsagar[m]> (unless you need first-class windows support)
2022-06-06 10:12:02 +0200 <dzdcnfzd> I spit on windows support
2022-06-06 10:12:42 +0200 <dzdcnfzd> There's no way for you to answer this question, but how many days would you budget to get GHCJS up and running with nix for someone who knows no nix
2022-06-06 10:12:49 +0200 <dzdcnfzd> but who has experience with build systems
2022-06-06 10:13:53 +0200 <dzdcnfzd> Is this, like, a couple hours, or a week of tinkering
2022-06-06 10:14:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 10:14:48 +0200 <vaibhavsagar[m]> I'd budget a week at least
2022-06-06 10:14:56 +0200 <dzdcnfzd> Okay
2022-06-06 10:15:03 +0200 <dzdcnfzd> Thanks!
2022-06-06 10:15:10 +0200 <vaibhavsagar[m]> sure thing
2022-06-06 10:16:07 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-06 10:16:52 +0200dzdcnfzd(~dzdcnfzd@93-63-223-61.ip29.fastwebnet.it) (Quit: Client closed)
2022-06-06 10:17:30 +0200 <maerwald[m]> vaibhavsagar: did you just suggest to someone with no nix experience to switch to it from stack?
2022-06-06 10:17:57 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 10:18:27 +0200alp(~alp@user/alp)
2022-06-06 10:23:15 +0200shriekingnoise(~shrieking@201.231.16.156) (Quit: Quit)
2022-06-06 10:27:21 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-06 10:28:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 10:29:47 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 240 seconds)
2022-06-06 10:30:05 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 10:31:57 +0200joo-_(~joo-_@fsf/member/joo--) (Quit: leaving)
2022-06-06 10:35:48 +0200Neuromancer(~Neuromanc@user/neuromancer) (Read error: Connection reset by peer)
2022-06-06 10:40:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 10:43:36 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 10:46:57 +0200coot(~coot@213.134.190.95)
2022-06-06 10:48:16 +0200trisolaran(~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2022-06-06 10:48:21 +0200trisolaran(~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection)
2022-06-06 10:50:25 +0200wayfaster(~wayfaster@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2022-06-06 10:52:13 +0200__monty__(~toonn@user/toonn)
2022-06-06 10:52:28 +0200jest3r(~jest3r@93-55-130-78.ip263.fastwebnet.it)
2022-06-06 10:52:53 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-06-06 10:54:00 +0200zaquest(~notzaques@5.130.79.72)
2022-06-06 10:57:32 +0200notzmv(~zmv@user/notzmv)
2022-06-06 11:02:25 +0200 <vaibhavsagar[m]> maerwald: they want to use GHCJS
2022-06-06 11:04:23 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-06-06 11:05:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 11:07:27 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-06 11:09:51 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 11:10:09 +0200Kaiepi(~Kaiepi@156.34.47.253)
2022-06-06 11:10:11 +0200mattil(~mattil@helsinki.portalify.com)
2022-06-06 11:10:32 +0200toluene(~toluene@user/toulene) (Ping timeout: 255 seconds)
2022-06-06 11:12:30 +0200toluene(~toluene@user/toulene)
2022-06-06 11:26:01 +0200 <arahael> maerwald[m]: I gave up on nix once I submitted a fix for an obscure issue with nix and nobody seemed to understand why it was the case. :(
2022-06-06 11:27:11 +0200joo-_(~joo-_@172-105-65-159.ip.linodeusercontent.com)
2022-06-06 11:27:11 +0200joo-_(~joo-_@172-105-65-159.ip.linodeusercontent.com) (Changing host)
2022-06-06 11:27:11 +0200joo-_(~joo-_@fsf/member/joo--)
2022-06-06 11:27:40 +0200sagax(~sagax_nb@user/sagax) (Read error: Connection reset by peer)
2022-06-06 11:27:48 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-06 11:33:50 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2022-06-06 11:35:10 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 11:41:27 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-06 11:42:10 +0200arahael(~arahael@121-44-30-20.tpgi.com.au) (Ping timeout: 240 seconds)
2022-06-06 11:43:20 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-06-06 11:46:43 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net)
2022-06-06 11:47:40 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 250 seconds)
2022-06-06 11:55:38 +0200arahael(~arahael@124-171-129-71.tpgi.com.au)
2022-06-06 11:56:40 +0200odnes(~odnes@5-203-180-76.pat.nym.cosmote.net) (Quit: Leaving)
2022-06-06 11:57:59 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 12:01:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 12:09:10 +0200cheater(~Username@user/cheater) (Ping timeout: 244 seconds)
2022-06-06 12:12:58 +0200cheater(~Username@user/cheater)
2022-06-06 12:13:14 +0200foul_owl(~kerry@71.212.150.111) (Ping timeout: 250 seconds)
2022-06-06 12:17:34 +0200 <tdammers> switching away from stack: probably a good idea. switching to nix: brace yourself.
2022-06-06 12:17:51 +0200nate3(~nate@98.45.169.16)
2022-06-06 12:22:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 12:22:56 +0200nate3(~nate@98.45.169.16) (Ping timeout: 258 seconds)
2022-06-06 12:23:38 +0200Pickchea(~private@user/pickchea) (Ping timeout: 250 seconds)
2022-06-06 12:24:18 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-06 12:28:18 +0200foul_owl(~kerry@23.82.194.92)
2022-06-06 12:30:09 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 12:33:37 +0200xff0x(~xff0x@s5.HtokyoFL1.vectant.ne.jp) (Ping timeout: 246 seconds)
2022-06-06 12:33:58 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
2022-06-06 12:35:33 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 12:37:08 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-06-06 12:38:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 12:39:58 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-06-06 12:40:20 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Ping timeout: 272 seconds)
2022-06-06 12:44:26 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-06 12:49:08 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-06 12:49:58 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 12:51:22 +0200nate3(~nate@98.45.169.16)
2022-06-06 12:54:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 12:55:06 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 12:56:17 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-06 12:58:07 +0200fr-isotope(uid556229@id-556229.ilkley.irccloud.com)
2022-06-06 13:02:38 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com)
2022-06-06 13:04:31 +0200Pickchea(~private@user/pickchea)
2022-06-06 13:10:07 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
2022-06-06 13:10:32 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 13:15:18 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-06 13:16:08 +0200noteness(~noteness@user/noteness)
2022-06-06 13:17:23 +0200xff0x(~xff0x@2405:6580:b080:900:ee80:883a:30aa:6d2d)
2022-06-06 13:21:12 +0200adium(adium@user/adium) (Ping timeout: 246 seconds)
2022-06-06 13:22:26 +0200wayfaster(~wayfaster@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
2022-06-06 13:25:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 13:25:42 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Ping timeout: 276 seconds)
2022-06-06 13:31:04 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-06-06 13:32:43 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 13:38:32 +0200sagax(~sagax_nb@user/sagax)
2022-06-06 13:39:54 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 13:43:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 13:45:26 +0200lyle(~lyle@104.246.145.85)
2022-06-06 13:50:18 +0200Pickchea(~private@user/pickchea) (Ping timeout: 250 seconds)
2022-06-06 13:56:34 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 13:57:53 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-06-06 13:58:51 +0200gurkenglas(~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de)
2022-06-06 14:03:09 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 14:05:55 +0200AlexNoo_(~AlexNoo@94.233.240.1)
2022-06-06 14:08:06 +0200AlexZenon(~alzenon@178.34.151.152) (Ping timeout: 246 seconds)
2022-06-06 14:09:21 +0200odnes(~odnes@2a02:587:e901:3110::605)
2022-06-06 14:09:30 +0200Alex_test(~al_test@178.34.151.152) (Ping timeout: 240 seconds)
2022-06-06 14:09:54 +0200AlexNoo(~AlexNoo@178.34.151.152) (Ping timeout: 276 seconds)
2022-06-06 14:12:11 +0200AlexZenon(~alzenon@94.233.240.1)
2022-06-06 14:13:57 +0200Alex_test(~al_test@94.233.240.1)
2022-06-06 14:18:19 +0200alp(~alp@user/alp) (Ping timeout: 258 seconds)
2022-06-06 14:34:34 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com)
2022-06-06 14:37:29 +0200dcoutts(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 258 seconds)
2022-06-06 14:37:48 +0200AlexNoo_AlexNoo
2022-06-06 14:39:49 +0200shriekingnoise(~shrieking@201.231.16.156)
2022-06-06 14:40:58 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de)
2022-06-06 14:44:40 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com)
2022-06-06 14:46:38 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-06 14:51:42 +0200alp(~alp@user/alp)
2022-06-06 15:00:15 +0200mattil(~mattil@helsinki.portalify.com) (Remote host closed the connection)
2022-06-06 15:02:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 15:04:07 +0200raym(~raym@user/raym) (Ping timeout: 240 seconds)
2022-06-06 15:05:16 +0200raym(~raym@user/raym)
2022-06-06 15:15:41 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com)
2022-06-06 15:17:14 +0200CoolerX(~user@user/coolerx)
2022-06-06 15:17:15 +0200 <CoolerX> Hi
2022-06-06 15:17:24 +0200 <CoolerX> Can someone explain how this works? https://github.com/jjhenkel/binnacle-icse2020/blob/master/datasets/2-phase-2-dockerfile-asts/gener…
2022-06-06 15:17:30 +0200 <CoolerX> ghc /build/app.hs
2022-06-06 15:17:58 +0200 <CoolerX> how is ghc able to find the shellcheck package that was just built using cabal https://github.com/jjhenkel/binnacle-icse2020/blob/master/datasets/2-phase-2-dockerfile-asts/gener…
2022-06-06 15:18:30 +0200 <CoolerX> when I try the same commands locally ghc fails to build giving errors saying it can't find some packages like Data.Aeson
2022-06-06 15:18:44 +0200shapr(~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection)
2022-06-06 15:20:04 +0200 <geekosaur> I presume it's using the older version of cabal that oes along with debian's 8.0.2 setup
2022-06-06 15:20:28 +0200 <geekosaur> whereas you're probably using a newer cabal that defaults to the v2 commands, which don't install packages globally any more
2022-06-06 15:20:35 +0200 <geekosaur> *goes
2022-06-06 15:21:37 +0200 <CoolerX> geekosaur: yes I have cabal from ghcup
2022-06-06 15:21:37 +0200 <geekosaur> "cabal ghc /build/app.hs" might work better, or replacing "cabal install" with "cabal install --lib"
2022-06-06 15:21:47 +0200 <CoolerX> $ which cabal
2022-06-06 15:21:47 +0200 <CoolerX> /Users/user/.ghcup/bin/cabal
2022-06-06 15:21:56 +0200 <CoolerX> $ cabal --version
2022-06-06 15:21:57 +0200 <CoolerX> cabal-install version 3.6.2.0
2022-06-06 15:21:57 +0200 <CoolerX> compiled using version 3.6.2.0 of the Cabal library
2022-06-06 15:22:06 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.5)
2022-06-06 15:22:38 +0200 <geekosaur> alternately when running it locally use v1-build and v1-install instead of build and install, but that's strongly deprecated these days
2022-06-06 15:22:46 +0200adium(adium@user/adium)
2022-06-06 15:28:43 +0200CoolerX(~user@user/coolerx) (Ping timeout: 256 seconds)
2022-06-06 15:29:02 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-06 15:29:17 +0200CoolerX(~user@user/coolerx)
2022-06-06 15:29:57 +0200 <CoolerX> geekosaur:
2022-06-06 15:30:12 +0200 <CoolerX> cabal ghc bash.hs gives an error
2022-06-06 15:30:22 +0200 <CoolerX> cabal: unrecognised command: ghc (try --help)
2022-06-06 15:30:22 +0200 <CoolerX> Maybe you meant `get`?
2022-06-06 15:31:18 +0200 <geekosaur[m]> Oh right it doesn't have that shorthand, it's "cabal exec ghc"
2022-06-06 15:31:20 +0200 <CoolerX> geekosaur: well ghc is complaining about not finding Data.Aeson
2022-06-06 15:31:36 +0200 <CoolerX> do I need to make a package.cabal file?
2022-06-06 15:31:47 +0200 <CoolerX> put build-depends: text-aeson or something?
2022-06-06 15:32:19 +0200 <geekosaur[m]> You probably need to use v1-install
2022-06-06 15:32:49 +0200 <geekosaur[m]> And yes, to do it properly you would need a cabal file
2022-06-06 15:33:01 +0200 <CoolerX> $ ghc --version
2022-06-06 15:33:02 +0200 <CoolerX> The Glorious Glasgow Haskell Compilation System, version 8.10.7
2022-06-06 15:33:08 +0200fr-isotope(uid556229@id-556229.ilkley.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-06 15:33:13 +0200 <CoolerX> and the Dockerfile is using The Glorious Glasgow Haskell Compilation System, version 8.0.2
2022-06-06 15:33:20 +0200 <CoolerX> so that's not too far off
2022-06-06 15:33:33 +0200 <CoolerX> both ghcs should be using the same package resolution algorithm
2022-06-06 15:33:54 +0200 <CoolerX> if it can find Data.Aeson while building the Dockerfile then why can't it find it when I run locally?
2022-06-06 15:34:02 +0200 <geekosaur[m]> ghc is closeish but cabal isn't
2022-06-06 15:34:17 +0200 <CoolerX> well they are not using cabal to build
2022-06-06 15:34:26 +0200 <CoolerX> https://github.com/jjhenkel/binnacle-icse2020/blob/master/datasets/2-phase-2-dockerfile-asts/gener…
2022-06-06 15:34:36 +0200 <CoolerX> there's just a single .hs file that they give directly to ghc
2022-06-06 15:35:11 +0200 <CoolerX> there's no .cabal file
2022-06-06 15:35:26 +0200 <geekosaur[m]> They're installing something using cabal, and a cabal that old will use global installation
2022-06-06 15:35:28 +0200 <CoolerX> or package.yaml
2022-06-06 15:35:51 +0200 <CoolerX> geekosaur: the error message isn't about shellcheck
2022-06-06 15:35:59 +0200 <geekosaur[m]> Cabal v3 does automatic sandboxing like stack does
2022-06-06 15:36:03 +0200 <CoolerX> bash.hs:5:1: error: Could not load module ‘Data.Aeson’
2022-06-06 15:36:22 +0200 <CoolerX> it's complaining about not finding Aeson not ShellCheck
2022-06-06 15:36:43 +0200 <geekosaur[m]> Right because that installed to a cabal sandbox instead of globally
2022-06-06 15:36:56 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 255 seconds)
2022-06-06 15:42:50 +0200CoolerX(~user@user/coolerx) (Ping timeout: 240 seconds)
2022-06-06 15:43:33 +0200CoolerX(~user@user/coolerx)
2022-06-06 15:43:34 +0200 <CoolerX> hmm
2022-06-06 15:44:02 +0200 <CoolerX> geekosaur: cabal installed shellcheck into a sandbox instead of globally?
2022-06-06 15:45:49 +0200 <geekosaur> cabal installed *aeson* into a sandboxinstead of globally. Probably along with a bunch of other dependencies
2022-06-06 15:46:14 +0200 <CoolerX> so let me get this straight, the Dockerfile is able to build properly because the older version of cabal cabal-install version 1.24.0.2 installs everything shellcheck, aeson, etc. globally?
2022-06-06 15:46:24 +0200 <CoolerX> and ghc can find the global install
2022-06-06 15:46:32 +0200 <geekosaur> so you either need a cabal file declaring dependencies on those sandboxed libraries so cabal will expose them, or use v1-install so cabal installs globally instead of sandboxed
2022-06-06 15:46:53 +0200 <geekosaur> yes, essenmtially
2022-06-06 15:46:54 +0200 <CoolerX> geekosaur: ok so I can fix this by building my bash.hs in the same sandbox right?
2022-06-06 15:47:03 +0200 <geekosaur> 1.24.0.2 only knows how to install globally
2022-06-06 15:47:21 +0200 <CoolerX> ok
2022-06-06 15:47:23 +0200 <geekosaur> cabal 3.x defaults to sandboxed but you can still use v1-install to install globally
2022-06-06 15:47:42 +0200 <CoolerX> yes I have cabal 3.x $ cabal --version
2022-06-06 15:47:42 +0200 <CoolerX> cabal-install version 3.6.2.0
2022-06-06 15:47:52 +0200 <CoolerX> geekosaur: I don't want global install
2022-06-06 15:48:00 +0200 <CoolerX> "so you either need a cabal file declaring dependencies on those sandboxed libraries so cabal will expose them"
2022-06-06 15:48:24 +0200 <CoolerX> can I tell cabal to activate the sandbox? similar to python venv
2022-06-06 15:48:55 +0200 <geekosaur> not exaactly. each package gets its own sandbox and cabal exposes them on demand via cabal files
2022-06-06 15:48:58 +0200 <CoolerX> or I guess I need to create a package.cabal file with the name of the sandbox I want to usE?
2022-06-06 15:49:07 +0200 <CoolerX> hmm
2022-06-06 15:49:12 +0200 <geekosaur> it's more flexible than venv but requires a little more work
2022-06-06 15:49:30 +0200 <CoolerX> so how do I share a sandbox between shellcheck and my code?
2022-06-06 15:49:46 +0200 <geekosaur> but this allows multiple versions of libraries to be installed simultaneously, while different local packages can depend on their own versions without causing conflicts
2022-06-06 15:50:10 +0200 <geekosaur> create a cabal file which lists the dependencies
2022-06-06 15:50:45 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-06 15:52:01 +0200 <CoolerX> geekosaur: but I need it to use the same versions as shellcheck
2022-06-06 15:52:11 +0200 <geekosaur> specifically you need something like https://paste.tomsmeding.com/jdQRWRwN
2022-06-06 15:52:48 +0200 <geekosaur> that's not a full cabal file; use "cabal init" to create a cabal file and then add dependencies as needed to "build-depends"
2022-06-06 15:53:02 +0200 <geekosaur> cabal may even detect some of those dependencies for you
2022-06-06 15:53:31 +0200 <geekosaur> but do make sure you specify an aeson version below 2.0 because it changed significantly in 2.x
2022-06-06 15:54:11 +0200 <geekosaur> if you know the versions of things it installed then specify those in the build-depends line
2022-06-06 15:54:41 +0200 <CoolerX> can I just use this? https://github.com/koalaman/shellcheck/blob/37e78141bd57f56b2a8d7ec0c91e76edec6a9dc5/ShellCheck.ca…
2022-06-06 15:54:43 +0200 <geekosaur> (you can use multiple lines, just indent them)
2022-06-06 15:55:43 +0200 <geekosaur> I'd change the aeson line to aeson < 2.0, as I just said
2022-06-06 15:55:50 +0200 <geekosaur> otherwise it might work
2022-06-06 15:56:51 +0200vicfred(~vicfred@user/vicfred)
2022-06-06 15:57:43 +0200 <CoolerX> ok
2022-06-06 15:57:57 +0200 <CoolerX> and I can remove the Extra-Source-Files:
2022-06-06 15:58:15 +0200 <CoolerX> source-repository head
2022-06-06 15:58:24 +0200 <CoolerX> change the Name, etc.
2022-06-06 15:58:38 +0200 <CoolerX> remove test-suite test-shellcheck
2022-06-06 15:59:38 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-06 15:59:51 +0200 <geekosaur> actually, aside from the aeson change I'd just append 'executable Main' with a build-depends on ShellCheck
2022-06-06 15:59:57 +0200 <geekosaur> and let cabal sort out the rest
2022-06-06 16:01:05 +0200 <CoolerX> I think I can remove the library
2022-06-06 16:01:07 +0200 <CoolerX> block
2022-06-06 16:01:08 +0200 <geekosaur> also because I assume the directpry already has a ShellCheck.cabal
2022-06-06 16:01:23 +0200 <geekosaur> and you can't have two cabal files in the same directory yet
2022-06-06 16:02:42 +0200chomwitt(~chomwitt@2a02:587:dc0e:3e00:52f0:411e:7355:f3d2) (Ping timeout: 260 seconds)
2022-06-06 16:02:51 +0200 <CoolerX> geekosaur: https://bpa.st/ST7Q
2022-06-06 16:03:12 +0200 <CoolerX> that's bash.cabal
2022-06-06 16:03:30 +0200 <geekosaur> that looks reasonable, yes
2022-06-06 16:04:05 +0200 <CoolerX> - ShellCheck-0.8.0 (lib) (requires download & build)
2022-06-06 16:04:13 +0200 <CoolerX> hmm no that's pulling the remote package
2022-06-06 16:04:37 +0200 <geekosaur> that was what I feared and why I suggested adding it to the ShellCheck cabal file insteaqd
2022-06-06 16:04:42 +0200 <geekosaur> *instead
2022-06-06 16:04:45 +0200 <CoolerX> I guess I could just change the version to 0.7.0 and that would be good enough
2022-06-06 16:05:00 +0200 <CoolerX> in the .cabal file
2022-06-06 16:05:33 +0200 <CoolerX> ShellCheck = 0.7
2022-06-06 16:05:41 +0200 <geekosaur> the other way is to go full-on cabal 3.x and move the ShellCheck checkout to its own directory, then use a cabal.project to point to that as a vendored dependency
2022-06-06 16:06:28 +0200 <CoolerX> ShellCheck >= 0.7.0 && < 0.7.1
2022-06-06 16:06:50 +0200 <CoolerX> geekosaur: cabal has a concept of projects?
2022-06-06 16:06:52 +0200 <geekosaur> might work as long as it's not dependent on that exact git checkout
2022-06-06 16:07:03 +0200 <CoolerX> I thought only stack had projects
2022-06-06 16:07:04 +0200 <geekosaur> in 3.x, yes
2022-06-06 16:07:35 +0200 <CoolerX> hmm https://bpa.st/CDHA
2022-06-06 16:07:39 +0200 <geekosaur> stack's barely maintained and falling behind, cabal is still evolving (3.8.0.1 is in release candidate)
2022-06-06 16:08:24 +0200 <geekosaur> hm, I don't understand that one
2022-06-06 16:08:26 +0200 <CoolerX> this is my cabal file https://bpa.st/U6IQ
2022-06-06 16:08:30 +0200_73(~user@pool-173-76-102-248.bstnma.fios.verizon.net)
2022-06-06 16:08:53 +0200 <CoolerX> all I did was cabal install
2022-06-06 16:09:03 +0200 <geekosaur> sclv, around?
2022-06-06 16:11:25 +0200 <CoolerX> https://hackage.haskell.org/package/ShellCheck-0.7.0
2022-06-06 16:11:30 +0200 <CoolerX> it's definitely available
2022-06-06 16:11:53 +0200Pickchea(~private@user/pickchea)
2022-06-06 16:11:56 +0200 <geekosaur> right. I don't understand that `:setup.Cabal` part though
2022-06-06 16:13:11 +0200 <geekosaur> which makes me think it's internal and we need a Cabal internals expert, which is why I pinged sclv
2022-06-06 16:13:40 +0200 <CoolerX> ok
2022-06-06 16:15:24 +0200 <dcoutts_> geekosaur: what's the problem?
2022-06-06 16:15:46 +0200 <geekosaur> https://bpa.st/CDHA
2022-06-06 16:16:03 +0200 <geekosaur> I don't understand the `:setup.Cabal` part of what it's failing on
2022-06-06 16:16:13 +0200chomwitt(~chomwitt@athe730-c-multi-501.home.otenet.gr)
2022-06-06 16:16:53 +0200 <dcoutts_> So that's referring to the custom setup that ShellCheck uses, and the .Cabal bit is the Cabal dependency that it wants. Note that ShellCheck's setup wants Cabal < 2.5.
2022-06-06 16:17:09 +0200 <geekosaur> ah
2022-06-06 16:17:39 +0200 <CoolerX> geekosaur: this is the full error log https://bpa.st/262A
2022-06-06 16:17:44 +0200 <dcoutts_> "ShellCheck:setup.Cabal" is a sort-of-path in the dep tree: package : setup-script . dep-package
2022-06-06 16:17:49 +0200 <geekosaur> yeh, this whole thing is from https://github.com/jjhenkel/binnacle-icse2020/blob/master/datasets/2-phase-2-dockerfile-asts/gener…
2022-06-06 16:18:15 +0200 <geekosaur> so it's pretty ancient debianish, using ghc 8.0.2 and stuff associated with that
2022-06-06 16:18:32 +0200 <CoolerX> so do I need to use v2-install ?
2022-06-06 16:18:44 +0200 <CoolerX> cabal v2-install
2022-06-06 16:18:46 +0200 <geekosaur> I'm assuming upgrading it all to something modern is going to break quickly
2022-06-06 16:19:11 +0200 <CoolerX> I am just trying to build it locally
2022-06-06 16:19:15 +0200 <CoolerX> not upgrade stuff
2022-06-06 16:19:43 +0200 <CoolerX> the executable binary in the container is for linux and I need to compile for MacOS
2022-06-06 16:19:59 +0200 <CoolerX> otherwise I would have just copied the binary out and called it a day
2022-06-06 16:21:06 +0200 <geekosaur> tbh I'd be tempted to just install debian in vbox and call it a day :)
2022-06-06 16:21:29 +0200 <geekosaur> despite what it looks like, ghc 8.0.2 is something like a decade old at this point
2022-06-06 16:21:52 +0200 <geekosaur> everything in there is quite ancient and I'm not surprised stuff is breaking
2022-06-06 16:23:58 +0200 <CoolerX> geekosaur: that won't help
2022-06-06 16:24:09 +0200 <geekosaur> I wonder if it'd be easier to dig out a cabal 1.24 for MacOS (suppose that loses on an M1 though)
2022-06-06 16:24:10 +0200 <CoolerX> "install debian in vbox" I need to compile for MacOs
2022-06-06 16:24:14 +0200 <CoolerX> "install debian in vbox" I need to compile for MacOS
2022-06-06 16:24:49 +0200 <CoolerX> geekosaur: no it's Intel not M1
2022-06-06 16:25:06 +0200dsrt^(~dsrt@128-092-183-014.biz.spectrum.com) (Remote host closed the connection)
2022-06-06 16:25:50 +0200razetime(~quassel@49.207.193.240)
2022-06-06 16:26:35 +0200 <geekosaur> https://downloads.haskell.org/~cabal/cabal-install-1.24.0.2/cabal-install-1.24.0.2-x86_64-apple-da… https://downloads.haskell.org/~cabal/Cabal-1.24.2.0/Cabal-1.24.2.0.tar.gz the latter is source only but includes a bootstrap script iirc to build it
2022-06-06 16:27:38 +0200 <CoolerX> I am on Monterey 12.2.1
2022-06-06 16:27:38 +0200Sgeo(~Sgeo@user/sgeo)
2022-06-06 16:28:02 +0200 <CoolerX> isn't there something like v2-install ?
2022-06-06 16:28:06 +0200 <geekosaur> right, but there won't be a Monterey build of an ancient cabal-install
2022-06-06 16:28:31 +0200 <CoolerX> wow that gives the exact same https://bpa.st/5TZA
2022-06-06 16:28:36 +0200 <geekosaur> "cabal install" with the cabal you have is v2-install
2022-06-06 16:28:51 +0200 <CoolerX> ?
2022-06-06 16:28:56 +0200 <CoolerX> I have cabal 3
2022-06-06 16:29:08 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-06 16:29:54 +0200 <geekosaur> yes,, it'll break because your installed Cabal library is 3.6.1.2 which is too new for the declared dependency
2022-06-06 16:30:18 +0200 <geekosaur> which is why I also pointed at an older Cabal library which you would need to install for this to work
2022-06-06 16:30:27 +0200 <CoolerX> "< geekosaur> "cabal install" with the cabal you have is v2-install" how is it v2 install >
2022-06-06 16:30:30 +0200 <CoolerX> ?
2022-06-06 16:30:40 +0200jinsun__(~jinsun@user/jinsun)
2022-06-06 16:31:10 +0200 <geekosaur> there's a difference between the Cabal library version, the cabal-install version, and the cabal instruction set version
2022-06-06 16:31:42 +0200 <CoolerX> ok so I need to do v1-install ?
2022-06-06 16:31:48 +0200 <geekosaur> cabal v1 only supported v1 commands. cabal v2 supported both v1 and v2 commands but defaulted to v1. cabal v3 supports both v1 and v2 but defaults to v2
2022-06-06 16:31:59 +0200 <geekosaur> this is rather confusing, sorry
2022-06-06 16:32:21 +0200 <CoolerX> Nope, that fails with an even larger error https://bpa.st/AXOA
2022-06-06 16:32:37 +0200 <geekosaur> v1-install won't help nmuch here, the key problem at this point is you can't build ShellCheck with the Cabal library you have installed. you must install the older one
2022-06-06 16:32:50 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 240 seconds)
2022-06-06 16:32:55 +0200 <geekosaur> older Cabal library https://downloads.haskell.org/~cabal/Cabal-1.24.2.0/Cabal-1.24.2.0.tar.gz
2022-06-06 16:33:07 +0200 <CoolerX> geekosaur: what if I clone and change the ShellCheck.cabal file?
2022-06-06 16:33:12 +0200 <CoolerX> but that
2022-06-06 16:33:20 +0200 <CoolerX> built it
2022-06-06 16:33:30 +0200 <geekosaur> unlikely to work,m it has an upper limit on the Cabal version for a reason
2022-06-06 16:33:31 +0200 <CoolerX> build it and use it to build my code
2022-06-06 16:33:39 +0200 <CoolerX> oh ok
2022-06-06 16:33:54 +0200 <CoolerX> so I have to build that older cabal library?
2022-06-06 16:34:01 +0200 <CoolerX> https://downloads.haskell.org/~cabal/Cabal-1.24.2.0/Cabal-1.24.2.0.tar.gz
2022-06-06 16:34:24 +0200 <geekosaur> I mean, you could try "--allow-newer cabal" but I would expect to produce weird errors
2022-06-06 16:34:37 +0200 <geekosaur> or whatever the syntax is for that option
2022-06-06 16:35:06 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi)
2022-06-06 16:35:10 +0200slack1256(~slack1256@191.126.227.71)
2022-06-06 16:36:20 +0200 <geekosaur> --allow-newer=ShellCheck:Cabal
2022-06-06 16:36:27 +0200 <geekosaur> still think it would error oyt
2022-06-06 16:36:29 +0200 <geekosaur> *out
2022-06-06 16:36:52 +0200 <CoolerX> geekosaur: hmm https://bpa.st/F5OA
2022-06-06 16:37:10 +0200 <CoolerX> that ignores my 0.7.0 constraint
2022-06-06 16:37:18 +0200 <CoolerX> $ cabal install --allow-newer
2022-06-06 16:37:48 +0200 <CoolerX> also tried this https://bpa.st/PCIQ
2022-06-06 16:37:51 +0200 <geekosaur> right, that's why I used the full version, so it would restrict "newer" to only Cabal
2022-06-06 16:38:14 +0200 <geekosaur> package names are cadse dependent
2022-06-06 16:38:16 +0200 <geekosaur> *case
2022-06-06 16:38:33 +0200 <geekosaur> that weird error is a cute hack to point out that "cabal" is not a package but Cabal is
2022-06-06 16:38:46 +0200 <CoolerX> https://bpa.st/PSJA
2022-06-06 16:39:16 +0200 <geekosaur> yes, you need the equal signn or it'll be taken as a target
2022-06-06 16:39:22 +0200 <geekosaur> --allow-newer=ShellCheck:Cabal
2022-06-06 16:39:57 +0200 <geekosaur> which says that ShellCheck's dependency on Cabal should ignore the version and use your 3.6.2.0 instead of the one it wants to that iirc is <2.6
2022-06-06 16:40:07 +0200 <CoolerX> oh that works
2022-06-06 16:40:50 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-06 16:41:40 +0200 <CoolerX> geekosaur: it's building, if it fails then I guess I have to build that older cabal library? https://downloads.haskell.org/~cabal/Cabal-1.24.2.0/Cabal-1.24.2.0.tar.gz
2022-06-06 16:41:51 +0200 <CoolerX> I downloaded it just in case
2022-06-06 16:42:08 +0200 <CoolerX> do I just cabal install && cabal build ?
2022-06-06 16:42:41 +0200 <geekosaur> hopefully yes
2022-06-06 16:43:08 +0200 <CoolerX> oh it failed
2022-06-06 16:43:10 +0200 <CoolerX> :(
2022-06-06 16:43:11 +0200 <CoolerX> https://bpa.st/H7UA
2022-06-06 16:43:32 +0200`2jt(~jtomas@182.red-88-17-61.dynamicip.rima-tde.net)
2022-06-06 16:43:32 +0200 <Benzi-Junior> humm, ok I'm working on a functor instance for a type I made, and I need some sanity checking "fmap g (D c) = g <$> (D c)" is this a cyclical definition ? since "<$>" is an infix variant of fmap
2022-06-06 16:45:16 +0200 <geekosaur> CoolerX, that'll most likely be why it depends on an older Cabal (which uses the Distribution.* hierarchy)
2022-06-06 16:45:26 +0200 <geekosaur> so you'll have to build that after all
2022-06-06 16:45:52 +0200 <geekosaur> Benzi-Junior, yes that's cyclical
2022-06-06 16:46:01 +0200slack1256(~slack1256@191.126.227.71) (Remote host closed the connection)
2022-06-06 16:46:39 +0200 <CoolerX> geekosaur: what's that? (which uses the Distribution.* hierarchy)
2022-06-06 16:46:45 +0200 <geekosaur> the definition of `<$>` is `(<$>) = fmap`
2022-06-06 16:47:08 +0200 <geekosaur> CoolerX, anything form a module starting with `Distribution.` comes from the Cabal library
2022-06-06 16:47:09 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2022-06-06 16:47:18 +0200 <CoolerX> Benzi-Junior: usually you define the operator using the more verbose prefix form
2022-06-06 16:47:23 +0200 <CoolerX> not the other way around
2022-06-06 16:47:26 +0200 <geekosaur> so that error is showing why there's a version cutoff on Cabal
2022-06-06 16:48:04 +0200 <CoolerX> geekosaur: ok but what does it use Distribution. for ?
2022-06-06 16:48:11 +0200 <CoolerX> this is a bash language parser
2022-06-06 16:48:13 +0200 <[exa]> Benzi-Junior: usually the pattern for implementing functors is "unwrap by pattern match -> wrap the applied function", likely something as `fmap g (D c) = D (g c)
2022-06-06 16:48:29 +0200 <CoolerX> I don't see why it needs such Cabal specific features
2022-06-06 16:48:52 +0200 <CoolerX> actually shell language parser (not limited to bash)
2022-06-06 16:49:36 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-06 16:50:34 +0200 <geekosaur[m]> I don't know either
2022-06-06 16:51:00 +0200 <[exa]> CoolerX: what version of shellcheck is that?
2022-06-06 16:51:00 +0200 <CoolerX> ok so I am building the old one then
2022-06-06 16:51:30 +0200 <CoolerX> [exa]: I need 0.7.0
2022-06-06 16:52:01 +0200odnes(~odnes@2a02:587:e901:3110::605) (Quit: Leaving)
2022-06-06 16:52:07 +0200 <Benzi-Junior> The type I'm writing is essentially a "Desugared free monad" in the sense that I'm not writing a "Free" type on top of an existing data type and I can't quite figure out how to write the instances
2022-06-06 16:52:15 +0200 <CoolerX> omg https://bpa.st/GHGQ
2022-06-06 16:52:22 +0200 <CoolerX> can't build the old Cabal either
2022-06-06 16:52:28 +0200 <CoolerX> actually it refuses to even install
2022-06-06 16:52:33 +0200 <CoolerX> actually it refuses to even install the dependencies
2022-06-06 16:52:52 +0200nate3(~nate@98.45.169.16)
2022-06-06 16:53:04 +0200 <Benzi-Junior> [exa], based on what you said does "fmap g (D c) = D (fmap g c)" make sense for a contiation
2022-06-06 16:55:06 +0200 <[exa]> Benzi-Junior: yeah if your functor contains another functor then that is literally the way
2022-06-06 16:55:14 +0200 <[exa]> "reduce to a smaller case of fmap"
2022-06-06 16:55:41 +0200 <geekosaur[m]> Gah, it needs an older base and that library is hardwired into the compiler
2022-06-06 16:55:50 +0200 <Benzi-Junior> [exa], ok then I'm getting it
2022-06-06 16:56:04 +0200 <geekosaur[m]> You need to downgrade your ghc
2022-06-06 16:56:04 +0200 <CoolerX> geekosaur: so I need an older ghc?
2022-06-06 16:56:47 +0200 <[exa]> CoolerX: why 0.7 tho?
2022-06-06 16:56:47 +0200 <geekosaur[m]> You can get an 8.0 from ghcup but it's hidden by default because it's so old
2022-06-06 16:56:57 +0200 <CoolerX> [exa]: because that's what the Dockerfile uses
2022-06-06 16:57:05 +0200 <CoolerX> https://github.com/jjhenkel/binnacle-icse2020/blob/master/datasets/2-phase-2-dockerfile-asts/gener…
2022-06-06 16:57:16 +0200dcoutts__(~duncan@host86-144-78-203.range86-144.btcentralplus.com)
2022-06-06 16:57:38 +0200 <[exa]> uh yes that's the software engineering paper again.. :D
2022-06-06 16:57:56 +0200nate3(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-06 16:58:09 +0200 <[exa]> the haskell:8.0.2 docker isn't available anymore?
2022-06-06 16:58:21 +0200 <CoolerX> [exa]: I want the executable for MacOS
2022-06-06 16:58:32 +0200 <CoolerX> well I could just buy a new laptop
2022-06-06 16:58:37 +0200 <CoolerX> probably easier at this point
2022-06-06 16:58:54 +0200 <CoolerX> but that still won't help other people on my team use it cause they are all on Mac
2022-06-06 16:59:27 +0200 <[exa]> CoolerX: docker doesn't work on macs?
2022-06-06 16:59:39 +0200 <CoolerX> I need to run outside docker
2022-06-06 16:59:42 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 258 seconds)
2022-06-06 16:59:44 +0200 <CoolerX> locally
2022-06-06 17:00:21 +0200 <CoolerX> ok you know what? maybe we will stick to running inside Docker for now
2022-06-06 17:00:27 +0200 <CoolerX> we can fix this later
2022-06-06 17:00:38 +0200 <CoolerX> spent waay too much time on this already
2022-06-06 17:00:42 +0200 <CoolerX> Thanks for the help
2022-06-06 17:00:47 +0200CoolerX(~user@user/coolerx) (Quit: leaving)
2022-06-06 17:00:54 +0200 <[exa]> CoolerX: like, I don't want to discourage you from doing it the proper way but you might be hitting a really hard wall here
2022-06-06 17:01:29 +0200 <[exa]> anyway it's a conference paper from like 2 years ago, did you consider mailing the authors if they don't have a version that works with current shellcheck?
2022-06-06 17:01:41 +0200 <[exa]> ^ usually the easiest way by far
2022-06-06 17:02:06 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2022-06-06 17:02:14 +0200 <[exa]> oh noes they quit
2022-06-06 17:02:40 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com)
2022-06-06 17:03:04 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:05:21 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:05:39 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:06:02 +0200 <Benzi-Junior> just to check, for my applicative instance "(D c) <*> f = D (c <*> f)" makes sense?, it just carries the f through and at the bottom I have "Pure f <*> x = fmap f x"
2022-06-06 17:06:12 +0200motherfsck(~motherfsc@user/motherfsck)
2022-06-06 17:07:46 +0200 <geekosaur> have to admit the first thing I'd've done was start with ghc 8.0.x instead of 8.10.7, which would have solved a bunch of deps issues immediately
2022-06-06 17:07:47 +0200 <[exa]> Benzi-Junior: not sure (I don't know what the types look like). I'd expect that the applicative instance would unwrap both sides though
2022-06-06 17:07:51 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:07:59 +0200Alleria_(~AllahuAkb@68.65.161.35) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 17:09:01 +0200 <[exa]> geekosaur: people underestimate the value of a working prototype before breaking it with yolo versions :D
2022-06-06 17:09:13 +0200 <geekosaur> yep
2022-06-06 17:09:58 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:10:22 +0200 <geekosaur> also somewhere up in the backscroll they said they assumed 8.10.7 wasn't too different from 8.0.2… um, wrong?
2022-06-06 17:10:25 +0200biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2022-06-06 17:10:46 +0200biberu(~biberu@user/biberu)
2022-06-06 17:11:10 +0200 <geekosaur> but they need to be told things a few times before it sticks
2022-06-06 17:11:25 +0200 <geekosaur> (I did say it was close to a decade old)
2022-06-06 17:11:31 +0200 <[exa]> people think this is versioned like chrome or so
2022-06-06 17:11:42 +0200 <[exa]> v60 vs v140 I don't know a difference
2022-06-06 17:12:13 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:13:03 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:14:03 +0200 <[exa]> Benzi-Junior: that said, feel free to paste code :]
2022-06-06 17:15:18 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:15:19 +0200Vajb(~Vajb@n5ar9yynwxqg80e32-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-06-06 17:15:21 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-06 17:16:02 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-06 17:16:08 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:17:31 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-06 17:17:36 +0200 <_73> I know that Nix is popular for Haskell development. What about Guix? Is there Haskell tooling for Nix has and Guix lacks?
2022-06-06 17:18:26 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:18:46 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:19:08 +0200 <geekosaur> Nix's Haskell ecosystem seems pretty complete. I've always had the impression Guix lags behind Nix in a bunch of things
2022-06-06 17:19:29 +0200 <geekosaur> and doesn't have a dedicated cadre of Haskell users making things work
2022-06-06 17:19:52 +0200 <_73> That makes sense
2022-06-06 17:20:47 +0200 <_73> Hopefully Guix can catch up because I like Haskell and Lisp.
2022-06-06 17:21:02 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:21:06 +0200 <geekosaur> (which is somewhat unfortunate, as I also feel like Guix has a bit more thought put into how the ecosystem fits together; sometimes fitting Nix packages together feels like solving a jigsaw puzzle)
2022-06-06 17:21:10 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-06-06 17:21:29 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-06 17:23:25 +0200dextaa(~DV@user/dextaa)
2022-06-06 17:27:03 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu)
2022-06-06 17:29:51 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-06-06 17:30:57 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-06 17:36:57 +0200 <maerwald> s/sometimes//
2022-06-06 17:38:20 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 17:38:53 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 255 seconds)
2022-06-06 17:39:21 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu)
2022-06-06 17:39:59 +0200chomwitt(~chomwitt@athe730-c-multi-501.home.otenet.gr) (Quit: Leaving)
2022-06-06 17:40:28 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:f6a9:3725:b3e3:513d)
2022-06-06 17:41:48 +0200Pickchea(~private@user/pickchea) (Ping timeout: 276 seconds)
2022-06-06 17:44:22 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 17:47:37 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 17:48:24 +0200arjun(~arjun@user/arjun)
2022-06-06 17:49:46 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-06 17:49:50 +0200yosef`(~user@user/yosef/x-2947716) (Quit: ERC (IRC client for Emacs 28.0.50))
2022-06-06 17:50:48 +0200Alleria_(~AllahuAkb@DN2lk431i.stanford.edu)
2022-06-06 17:53:04 +0200odnes(~odnes@2a02:587:e901:3110::605)
2022-06-06 17:57:26 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-06-06 17:57:27 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds)
2022-06-06 18:00:13 +0200pareto-optimal-d(~pareto-op@2001:470:69fc:105::1:b61f) (Quit: You have been kicked for being idle)
2022-06-06 18:00:46 +0200mbuf(~Shakthi@122.174.63.255) (Quit: Leaving)
2022-06-06 18:01:36 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 18:07:41 +0200odnes(~odnes@2a02:587:e901:3110::605) (Quit: Leaving)
2022-06-06 18:10:16 +0200arjun(~arjun@user/arjun) (Quit: Leaving)
2022-06-06 18:19:34 +0200 <Bulby[m]> oh, is the matrix bridge being different the reason I can see message history unlike a normal irc user
2022-06-06 18:19:54 +0200 <_73> I am going to make a personal website in haskell to run on my home FreeBSD server. The site is just going to hold static files like my resume and maybe blog posts in the future. I want the site to be extensible though because my plans for it could easily change. I have used yesod successfully in the past but I don't like how complicated it is (some of the types are just insane), and I started to feel like I was kind of programming in
2022-06-06 18:19:54 +0200 <_73> yesod instead of haskell. Is there a different web framework you would recommend?
2022-06-06 18:20:35 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 18:21:18 +0200 <geekosaur> Bulby[m], yes, Matrix keeps backscroll for you
2022-06-06 18:21:43 +0200 <Bulby[m]> ... did the bridge die because I see no message history
2022-06-06 18:22:43 +0200 <geekosaur> loooks like it neither died nor kicked you for inactivity
2022-06-06 18:22:59 +0200Guest39(~Guest39@tmo-086-160.customers.d1-online.com)
2022-06-06 18:23:00 +0200 <geekosaur> I have message history on my phone where I run Element
2022-06-06 18:23:28 +0200 <geekosaur> (but I also have history on my laptop because I stay logged in as continuously as I can)
2022-06-06 18:24:49 +0200Guest39(~Guest39@tmo-086-160.customers.d1-online.com) (Client Quit)
2022-06-06 18:24:50 +0200 <geekosaur> I'm not sure how continuously it keeps history for IRC; it's more consistent for Matrix rooms
2022-06-06 18:25:25 +0200 <Bulby[m]> nheko just shows the loading thing, which means it can't fetch msg history
2022-06-06 18:26:11 +0200 <[exa]> _73: yesod is more like for dynamic sites
2022-06-06 18:26:45 +0200 <_73> [exa]: I want my site to have dynamic capability even if I don't use it.
2022-06-06 18:27:13 +0200 <[exa]> ah okay
2022-06-06 18:27:54 +0200 <[exa]> anyway, I'd go with scotty for anything. The extensibility is pretty good for any reasonable use I can see
2022-06-06 18:28:28 +0200 <geekosaur> yeh, servant or scotty would be my suggestion
2022-06-06 18:28:47 +0200 <_73> Ill look into scotty and servant
2022-06-06 18:29:15 +0200 <[exa]> rendering markdowns to htmls can be done reasonably fast afaik, and you can pre-cache rendered content quite easily
2022-06-06 18:30:26 +0200 <[exa]> also, servant is quite biased towards making type-driven REST APIs, which might work but I'd say you'd need an extra js app to show your contents
2022-06-06 18:31:18 +0200 <geekosaur> that'd be true of yesod as well except it's a little more likely that someone's already written the appropriate plugin
2022-06-06 18:31:39 +0200 <geekosaur> servant is like yesod with more sensible types
2022-06-06 18:31:45 +0200jest3r(~jest3r@93-55-130-78.ip263.fastwebnet.it) (Remote host closed the connection)
2022-06-06 18:31:57 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 18:32:55 +0200 <_73> Ill try scotty then cause I want to experience something unlike yesod if only for educational purposes.
2022-06-06 18:33:11 +0200 <[exa]> like, scotty + Blaze/Lucid + say Text.Markdown should give reasonably fast path to the prototype
2022-06-06 18:42:20 +0200vglfr(~vglfr@coupling.penchant.volia.net) (Ping timeout: 255 seconds)
2022-06-06 18:44:03 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-06 18:44:46 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-06-06 18:45:19 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-06-06 18:48:42 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 18:51:41 +0200 <cdsmith> I have a type family `type family GetFoo bar :: '(X, Y)`, and a type class `class HasFoo bar where { type A bar :: X; type B bar :: Y }`, and I want to do something like `instance GetFoo bar ~ '(a, b) => HasFoo bar where { type A bar = a; type B bar = b }`. On the instance, I'm getting the error `The RHS of an associated type declaration mentions out-of-scope variable ‘a’`. Ideas?
2022-06-06 18:52:39 +0200razetime(~quassel@49.207.193.240) (Ping timeout: 276 seconds)
2022-06-06 18:53:03 +0200[_][itchyjunk]
2022-06-06 18:59:18 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net) (Ping timeout: 258 seconds)
2022-06-06 18:59:57 +0200 <[exa]> cdsmith: why not MPTCs? `HasFoo bar '(a, b)`
2022-06-06 19:04:04 +0200zeenk(~zeenk@2a02:2f04:a013:9000:e45d:7fb3:ec71:e806) (Quit: Konversation terminated!)
2022-06-06 19:05:00 +0200 <cdsmith> I could do that. It's just that the associated types approach seemed cleaner than MPTC + fundeps. I'll switch over and see if it works that way.
2022-06-06 19:05:19 +0200shapr(~user@pool-173-73-44-186.washdc.fios.verizon.net)
2022-06-06 19:05:38 +0200 <Benzi-Junior> ok, I ran into a problem, I think I know how to fix it but wanted a sanity check,
2022-06-06 19:05:42 +0200 <Benzi-Junior> http://ix.io/3Zyv
2022-06-06 19:06:30 +0200 <Benzi-Junior> ^ my code, the issue I ran into is that of how to implement receive
2022-06-06 19:06:58 +0200 <shapr> What monad instance is this?
2022-06-06 19:07:01 +0200 <shapr> > join (*) 4
2022-06-06 19:07:03 +0200 <lambdabot> 16
2022-06-06 19:07:14 +0200 <shapr> je suis confuse
2022-06-06 19:07:32 +0200 <tomsmeding> :t join
2022-06-06 19:07:33 +0200 <lambdabot> Monad m => m (m a) -> m a
2022-06-06 19:07:36 +0200 <geekosaur> ((->) e)
2022-06-06 19:07:39 +0200 <shapr> oh!
2022-06-06 19:07:59 +0200 <tomsmeding> (*) :: Num a => (a ->) ((a ->) a)
2022-06-06 19:08:03 +0200 <geekosaur> and yes, it's mind-warping
2022-06-06 19:08:15 +0200 <tomsmeding> join duplicates the argument :p
2022-06-06 19:08:15 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-06 19:08:23 +0200 <shapr> my mind is still warped
2022-06-06 19:08:28 +0200 <shapr> I gotta sit down and expand it out
2022-06-06 19:09:04 +0200 <tomsmeding> If ((->) e) hasn’t profoundly shocked you, you haven’t understood it yet
2022-06-06 19:09:19 +0200 <shapr> Is there an eli5 description?
2022-06-06 19:09:20 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 255 seconds)
2022-06-06 19:09:26 +0200 <tomsmeding> shapr: Reader
2022-06-06 19:09:30 +0200 <tomsmeding> it's literally the reader monad
2022-06-06 19:09:40 +0200 <geekosaur> e is an environment. here the environment is 4
2022-06-06 19:09:44 +0200 <shapr> oh
2022-06-06 19:09:45 +0200 <Cale> "Profoundly shocked" seems maybe a little strong...
2022-06-06 19:09:49 +0200 <tomsmeding> :p
2022-06-06 19:09:49 +0200 <Benzi-Junior> I believe that the solution should be changing the constructor "Receive msg (Agent m a)" to "Receive (msg -> a) (Agent m a)" and carrying it through
2022-06-06 19:09:55 +0200 <geekosaur> and yes, Reader is ((->) e) with a protective wrapper
2022-06-06 19:09:55 +0200 <Benzi-Junior> am I on the right track
2022-06-06 19:09:59 +0200 <tomsmeding> Cale: I was echoing the quantum mechanics quote
2022-06-06 19:10:11 +0200 <Cale> > (do x <- id; y <- reverse; z <- map toUpper; return (x,y,z)) "hello"
2022-06-06 19:10:13 +0200 <lambdabot> ("hello","olleh","HELLO")
2022-06-06 19:10:22 +0200 <Cale> tomsmeding: ahh, haha
2022-06-06 19:10:56 +0200Alleria_(~AllahuAkb@DN2lk431i.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 19:11:29 +0200 <Benzi-Junior> oh and sorry the snippet I sent includes the change to the constructor but not the neccessary changes to the instances
2022-06-06 19:12:20 +0200 <tomsmeding> Benzi-Junior: (please say if these terms make no sense to you) This looks like a free state monad plus a no-op Delay constructor, right?
2022-06-06 19:12:51 +0200 <tomsmeding> right, now I read your haddocks :p
2022-06-06 19:12:59 +0200 <tomsmeding> yeah (msg -> a) sounds very good
2022-06-06 19:13:05 +0200 <tomsmeding> actually, no
2022-06-06 19:13:16 +0200 <tomsmeding> Benzi-Junior: try `Receive (msg -> Agent msg a)`
2022-06-06 19:13:34 +0200Alleria_(~AllahuAkb@DN2lk431i.stanford.edu)
2022-06-06 19:13:47 +0200 <tomsmeding> which makes sense: given the received message, we can continue the computation -- and crucially, the computation to continue with can _depend_ on the received message
2022-06-06 19:13:50 +0200remedan(~remedan@octo.cafe) (Remote host closed the connection)
2022-06-06 19:14:03 +0200 <tomsmeding> ignore my "free state monad" comment
2022-06-06 19:14:07 +0200 <Benzi-Junior> tomsmeding, um, yes it is a free monad but the Delay constructor is just to handle the delay operation
2022-06-06 19:14:13 +0200 <tomsmeding> :p
2022-06-06 19:14:21 +0200econo(uid147250@user/econo)
2022-06-06 19:14:32 +0200 <raehik> cdsmith: could you resolve that with some extra Fst, Snd type families for projecting each type in the tuple?
2022-06-06 19:15:33 +0200 <raehik> ah, but now GetFoo isn't used
2022-06-06 19:16:10 +0200 <cdsmith> raehik: Maybe? I hadn't thought about it, honestly. The MPTC + fundep approach seems to build, but I'll try writing projections, too. I would like keep my names instead of having MPTCs with 6 or 7 params
2022-06-06 19:16:23 +0200 <cdsmith> Thanks
2022-06-06 19:18:08 +0200 <Benzi-Junior> tomsmeding, so my code looks like I'm on the right track in making a free monad as described ?
2022-06-06 19:18:42 +0200 <cdsmith> Another wart in my actual code, though, is that GetFoo actually returns `SearchResult a` instead of `a`, where `SearchResult` is isomorphic to `Maybe` but with a kind-polymorphic argument. So I have to not just project, but also pattern match... I think I can still have the equality constraint do that, though, and just leave the projection undefined in that case?
2022-06-06 19:19:11 +0200 <tomsmeding> Benzi-Junior: I think so, though I would write `delay = Delay (Pure ())` -- your (<$>) is fmap on the function monad, i.e. fmap = (.)
2022-06-06 19:20:08 +0200jonathanx(~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) (Remote host closed the connection)
2022-06-06 19:20:15 +0200 <tomsmeding> Benzi-Junior: yeah, and with my fixed Receive you'll be able to implement `receive` too
2022-06-06 19:20:39 +0200 <tomsmeding> (it'll be nice and simple :) )
2022-06-06 19:21:42 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-06-06 19:21:42 +0200jonathanx(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Client Quit)
2022-06-06 19:21:48 +0200alp(~alp@user/alp) (Ping timeout: 250 seconds)
2022-06-06 19:22:28 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-06 19:24:52 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2022-06-06 19:25:02 +0200 <cdsmith> [exa]: Sadly, MPTCs don't work after all, because I need type families to compute the value of one of the associated types, and you can't apply a type family in an instance head.
2022-06-06 19:25:09 +0200alp(~alp@user/alp)
2022-06-06 19:26:32 +0200 <[exa]> cdsmith: you can "apply" it prolog-style, before the =>
2022-06-06 19:27:01 +0200 <cdsmith> [exa]: Ah, okay.
2022-06-06 19:27:15 +0200 <[exa]> also you may need fundeps
2022-06-06 19:27:52 +0200 <[exa]> class HasFoo a b | a -> b where ...
2022-06-06 19:28:05 +0200 <cdsmith> [exa]: Yeah, I've got the fundeps already, and this builds. Thanks!
2022-06-06 19:28:20 +0200 <[exa]> instance (HasFoo something foo, ...) => MyThing foo where ...
2022-06-06 19:28:21 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-06 19:28:22 +0200 <[exa]> ah okay great :]
2022-06-06 19:28:32 +0200 <cdsmith> I'll try raehik's suggestion, too, and see if I can get both working
2022-06-06 19:29:30 +0200 <[exa]> anyway, to the original problem -- the tyfam way SHOULD work, but I'm not sure how much of ScopedTypeVars you'd need
2022-06-06 19:30:34 +0200 <cdsmith> Scoped type variables and explicit foralls don't help at all. Already tried that one!
2022-06-06 19:31:00 +0200 <cdsmith> But adding a new type family for the projection should work maybe? Trying that now
2022-06-06 19:32:58 +0200 <[exa]> yeah I guess `type A bar = Fst (GetFoo bar)` avoids the scoping trouble
2022-06-06 19:33:52 +0200vglfr(~vglfr@46.96.142.51)
2022-06-06 19:34:36 +0200 <Las[m]> `some` exists, but is there anything similar for universal quantification?
2022-06-06 19:35:49 +0200 <tomsmeding> Las[m]: something like `data Forall f = Forall (forall a. f a)`?
2022-06-06 19:35:59 +0200 <tomsmeding> with a better name maybe
2022-06-06 19:36:14 +0200 <Las[m]> tomsmeding: yep
2022-06-06 19:42:00 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection)
2022-06-06 19:43:46 +0200 <cdsmith> [exa]: raehik Thanks. I got both versions building now, but it's kind of ugly... https://github.com/cdsmith/edgy/blob/main/app/Schema.hs vs https://github.com/cdsmith/edgy/blob/main/app/Schema2.hs
2022-06-06 19:45:02 +0200 <Benzi-Junior> tomsmeding, are you sure the Receive constructor should only have the function ?
2022-06-06 19:45:12 +0200 <tomsmeding> Benzi-Junior: I think so, is that not working?
2022-06-06 19:45:24 +0200 <tomsmeding> msg -> Agent msg a
2022-06-06 19:45:46 +0200 <Benzi-Junior> I'm struggling to see how I make fmap
2022-06-06 19:46:22 +0200 <tomsmeding> fmap f g = fmap f . g
2022-06-06 19:46:34 +0200 <tomsmeding> well, fmap f (Receive g) = Receive (fmap f . g)
2022-06-06 19:46:50 +0200 <tomsmeding> first pass the received message to g, then fmap on the result
2022-06-06 19:46:55 +0200 <[exa]> cdsmith: ok that's a lot of types. :D
2022-06-06 19:47:00 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset)
2022-06-06 19:47:36 +0200Alleria_(~AllahuAkb@DN2lk431i.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 19:47:40 +0200 <[exa]> shapr: on a related note, I just got this from a friend: (pure>>=traverse) [1,2,3]
2022-06-06 19:47:59 +0200 <tomsmeding> Benzi-Junior: would you be able to figure out how to write fmap if you had e.g. `data Agent msg a = ... | Something (Bool, Agent msg a)`?
2022-06-06 19:48:02 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Remote host closed the connection)
2022-06-06 19:48:13 +0200shapris trepidatious
2022-06-06 19:48:15 +0200 <tomsmeding> (msg -> _) is like (Bool, _) in this respect
2022-06-06 19:48:26 +0200 <shapr> > (pure>>=traverse) [1,2,3]
2022-06-06 19:48:28 +0200 <lambdabot> [[1,1,1],[1,1,2],[1,1,3],[1,2,1],[1,2,2],[1,2,3],[1,3,1],[1,3,2],[1,3,3],[2,...
2022-06-06 19:48:37 +0200 <shapr> with good reason, it seems
2022-06-06 19:48:57 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-06-06 19:49:59 +0200 <shapr> oh, I saw one a few weeks ago: maxProfit = maximum . (zipWith (-) <*> scanl1 min)
2022-06-06 19:50:06 +0200 <Benzi-Junior> tomsmeding, that was my idea as well
2022-06-06 19:50:38 +0200 <shapr> That's a solution for the leetcode problem "best time to buy and sell stock"
2022-06-06 19:50:39 +0200 <Benzi-Junior> sunnuva!$*&#, I mixed up the order of f and g
2022-06-06 19:50:48 +0200 <tomsmeding> Benzi-Junior: xD
2022-06-06 19:52:34 +0200 <[exa]> shapr: O_o
2022-06-06 19:52:47 +0200 <shapr> it's for https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
2022-06-06 19:52:59 +0200 <shapr> also took me half an hour to figure out what it was doing
2022-06-06 19:53:03 +0200 <[exa]> ok nevermind let's close this box before Num (p->) appears... :D
2022-06-06 19:53:21 +0200 <tomsmeding> shapr: (>>=) :: m a -> (a -> m b) -> m b, and (pure>>=traverse) :: [Int] -> [[Int]], so the monad here is ([Int] ->), so (pure>>=traverse) = \x -> traverse (const x) x
2022-06-06 19:53:36 +0200 <shapr> ohhh
2022-06-06 19:54:25 +0200 <shapr> it's really fun to detangle code golf'd haskell
2022-06-06 19:54:38 +0200 <shapr> except when I only get frustration instead of understanding
2022-06-06 19:55:09 +0200 <shapr> Maybe I should run another IOHCC
2022-06-06 19:55:21 +0200 <tomsmeding> shapr: blegh took me too long to remember that (<*>) = S
2022-06-06 19:57:51 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458)
2022-06-06 20:02:27 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458) (Ping timeout: 260 seconds)
2022-06-06 20:03:24 +0200califax(~califax@user/califx)
2022-06-06 20:04:33 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu)
2022-06-06 20:06:54 +0200sebastiandb(~sebastian@pool-108-18-101-17.washdc.fios.verizon.net)
2022-06-06 20:07:11 +0200Midjak(~Midjak@82.66.147.146)
2022-06-06 20:09:33 +0200 <Benzi-Junior> for the applicative instance, "(Receive f) <*> x" I want to start by receiving the message and then apply x to the result as I pass it on right ?
2022-06-06 20:10:13 +0200 <tomsmeding> Benzi-Junior: that's the most reasonable choice I guess
2022-06-06 20:10:55 +0200 <tomsmeding> hm, perhaps it's even the only lawful choice
2022-06-06 20:11:20 +0200Pickchea(~private@user/pickchea)
2022-06-06 20:11:46 +0200 <tomsmeding> hm no there's no law that states that the left argument's effects need to be evaluated before the right argument's effects
2022-06-06 20:11:58 +0200 <tomsmeding> i.e. you could choose to recurse over the second argument to (<*>) as well :p
2022-06-06 20:12:03 +0200 <tomsmeding> but that's highly unusual
2022-06-06 20:12:07 +0200 <geekosaur> that's the big differentiator between Applicative and Monad
2022-06-06 20:12:19 +0200 <tomsmeding> oh
2022-06-06 20:12:25 +0200tomsmedingfacepalm
2022-06-06 20:12:26 +0200 <tomsmeding> yes
2022-06-06 20:12:41 +0200 <tomsmeding> that's like _the_ thing of applicative
2022-06-06 20:12:51 +0200ncfsomeone_else
2022-06-06 20:13:10 +0200 <tomsmeding> though in this case the type also has a Monad instance, so the freedom of choice in the Applicative instance gets kind of muddled
2022-06-06 20:13:27 +0200someone_elsencf
2022-06-06 20:15:47 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-06 20:15:51 +0200 <Benzi-Junior> why is "Receive (f <*> x)" wrong then ?
2022-06-06 20:16:09 +0200 <tomsmeding> does that typecheck?
2022-06-06 20:16:31 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-06 20:16:57 +0200 <Benzi-Junior> tomsmeding, nope
2022-06-06 20:17:06 +0200 <tomsmeding> then it's wrong :p
2022-06-06 20:17:09 +0200 <tomsmeding> :t (<*>)
2022-06-06 20:17:10 +0200 <lambdabot> Applicative f => f (a -> b) -> f a -> f b
2022-06-06 20:17:24 +0200 <tomsmeding> <*> takes two arguments in the same functor
2022-06-06 20:18:28 +0200wonko(~wjc@user/wonko)
2022-06-06 20:18:28 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-06 20:18:28 +0200 <tomsmeding> if you write `Receive f <*> x = Receive (f <*> x)`, then you have `f :: msg -> Agent msg a` and `x :: Agent msg a`, so from the usage of <*> on the right-hand side we get the constraint that (msg ->) ~ Agent msg
2022-06-06 20:18:31 +0200 <tomsmeding> which is nonsense :)
2022-06-06 20:22:10 +0200vglfr(~vglfr@46.96.142.51) (Ping timeout: 240 seconds)
2022-06-06 20:23:55 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com)
2022-06-06 20:24:04 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-06-06 20:24:35 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving)
2022-06-06 20:24:58 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 20:25:08 +0200 <Benzi-Junior> but what if I really want it to work, and just squint my eyes before compiling
2022-06-06 20:25:45 +0200 <geekosaur> sounds like js to me :)
2022-06-06 20:26:05 +0200 <tomsmeding> Benzi-Junior: you can only apply <*> again if you have an Agent on both sides
2022-06-06 20:26:22 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-06 20:26:38 +0200 <tomsmeding> on the left side you have `msg -> Agent msg (a -> b)`; what you need to produce as argument to Receive here is a `msg -> Agent msg b`
2022-06-06 20:26:52 +0200 <tomsmeding> so you need to "fmap into the function", sortof
2022-06-06 20:26:56 +0200 <tomsmeding> i.e. write a lambda :D
2022-06-06 20:28:37 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 258 seconds)
2022-06-06 20:28:53 +0200 <tomsmeding> (you can't reasonably do this with another 'fmap', please write an actual lambda)
2022-06-06 20:29:08 +0200Luj(~Luj@2a01:e0a:5f9:9681:e607:a487:883f:3843)
2022-06-06 20:29:40 +0200 <Benzi-Junior> tomsmeding, oh, thanks, one of my first attempts at this was to use a fmap
2022-06-06 20:30:04 +0200 <Benzi-Junior> but tried this after that failed
2022-06-06 20:30:08 +0200gio123(~gio123@146.255.226.194)
2022-06-06 20:30:13 +0200 <gio123> hi all
2022-06-06 20:30:27 +0200 <tomsmeding> Benzi-Junior: it's actually not hard to see what to do if you collect all the types. Given `f :: msg -> Agent msg (a -> b)` and `x :: Agent msg a`, produce a `msg -> Agent msg b`
2022-06-06 20:30:49 +0200Luj(~Luj@2a01:e0a:5f9:9681:e607:a487:883f:3843) (Client Quit)
2022-06-06 20:30:52 +0200 <geekosaur> hi gio123
2022-06-06 20:31:07 +0200 <gio123> is there any Chanel about Ocaml?
2022-06-06 20:32:18 +0200 <geekosaur> there's an #ocaml with 167 users, yes
2022-06-06 20:33:20 +0200PCH(~PCH@75.243-134-109.adsl-dyn.isp.belgacom.be)
2022-06-06 20:33:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 20:33:43 +0200 <Bulby[m]> an objective haskell would be um forbidden, but what would it look like?
2022-06-06 20:33:50 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 20:34:02 +0200 <geekosaur> wouldn't really be forbidden, in fact there used to be one
2022-06-06 20:34:11 +0200 <Bulby[m]> ?!?
2022-06-06 20:34:36 +0200 <geekosaur> https://github.com/nkaretnikov/OOHaskell
2022-06-06 20:34:48 +0200 <geekosaur> pretty out of date at this point and I suspect it no longer works
2022-06-06 20:35:45 +0200 <Bulby[m]> is it implemented in haskell? what is it?
2022-06-06 20:35:47 +0200 <geekosaur> back in the ghc 6.4/6.6 days, iirc 6.8 broke it
2022-06-06 20:36:29 +0200 <geekosaur> it's in haskell, yes
2022-06-06 20:36:52 +0200 <geekosaur> if you look at the repo there are a number of examples provided, including some comparisons with other OO languages
2022-06-06 20:37:46 +0200 <PCH> Hi All im new to Haskell and I could not found out what is wrong :
2022-06-06 20:37:47 +0200 <PCH> on this simple code :
2022-06-06 20:37:47 +0200 <PCH> import Network.MQTT.Arbitrary
2022-06-06 20:37:48 +0200 <PCH> import Network.MQTT.Client ( connectURI, mqttConfig, publish )
2022-06-06 20:37:48 +0200 <PCH> main :: IO ()
2022-06-06 20:37:49 +0200 <PCH> main = do
2022-06-06 20:37:49 +0200 <PCH>   let (Just uri) = parseURI "mqtt://ios:test@slave07"
2022-06-06 20:37:50 +0200 <geekosaur> https://arxiv.org/abs/cs/0509027 is the related paper
2022-06-06 20:37:50 +0200 <PCH>   mc <- connectURI mqttConfig {} uri
2022-06-06 20:37:50 +0200 <PCH>   publish mc "tmp/topic" "hello!" False
2022-06-06 20:37:51 +0200 <PCH>  I got and Error "EMPTY RECORD UPDATE"
2022-06-06 20:37:51 +0200 <PCH>     Empty record update
2022-06-06 20:37:52 +0200 <PCH>   |
2022-06-06 20:37:52 +0200 <PCH> 7 | mc <- connectURI mqttConfig {} uri
2022-06-06 20:37:53 +0200 <PCH>   | ^^^^^^^^^^^^^
2022-06-06 20:37:53 +0200 <PCH> Can someone could give me some help ??
2022-06-06 20:38:03 +0200 <Bulby[m]> wait
2022-06-06 20:38:06 +0200 <Bulby[m]> use the paste
2022-06-06 20:38:39 +0200 <geekosaur> PCH, what were you expecting the {} to do?
2022-06-06 20:39:11 +0200 <PCH> I ve no idea im new
2022-06-06 20:39:33 +0200 <PCH> the code is taken from https://github.com/dustin/mqtt-hs
2022-06-06 20:40:05 +0200 <PCH> this library but googling does not give me any examples
2022-06-06 20:40:42 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-06 20:40:48 +0200 <cdsmith> PCH: My guess is you can just leave out the braces. Not sure why they are there.
2022-06-06 20:41:22 +0200 <PCH> I tried and then I get errors il all the rest of program
2022-06-06 20:41:23 +0200 <geekosaur> yeh
2022-06-06 20:41:42 +0200 <geekosaur> I think the example is out of date, you used to be able to do that even though it's meaningless but you can't any more
2022-06-06 20:41:44 +0200 <monochrom> Unpopular opinion: If you're new to Haskell, you should start with basic learning, not "dive-in projects" like this.
2022-06-06 20:41:51 +0200 <geekosaur> ^
2022-06-06 20:41:51 +0200 <darkling> There's also a space in your code after `mqttConfig`, and not in the example. I don't know if that's significant, but it might be worth fiddling with. (I'm also new).
2022-06-06 20:41:58 +0200 <geekosaur> it's not
2022-06-06 20:42:03 +0200 <darkling> OK.
2022-06-06 20:42:04 +0200 <Bulby[m]> LOL
2022-06-06 20:42:06 +0200 <dsal> Putting code in README is dumb.
2022-06-06 20:42:27 +0200 <Bulby[m]> that's probably true
2022-06-06 20:42:27 +0200 <Bulby[m]> but not my style
2022-06-06 20:42:50 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458)
2022-06-06 20:42:52 +0200 <dsal> PCH: Do you have a more complete example? I've used that library extensively (having written it), so I might be helpful.
2022-06-06 20:43:09 +0200 <geekosaur> that's the example from the README
2022-06-06 20:43:23 +0200 <geekosaur> https://github.com/dustin/mqtt-hs#readme
2022-06-06 20:43:52 +0200 <dsal> Weird. That *used* to work. I'll make sure there are tests for that.
2022-06-06 20:43:54 +0200 <PCH> yes it what im trying to get compiled
2022-06-06 20:44:25 +0200 <cdsmith> PCH: Once you fix that, you said you got more errors. What are they?
2022-06-06 20:44:30 +0200 <PCH> Variable not in scope: parseURI :: [Char] -> Maybe a
2022-06-06 20:44:31 +0200 <PCH>   |
2022-06-06 20:44:31 +0200 <PCH> 6 | let (Just uri) = parseURI "mqtt://ios:test@slave07"
2022-06-06 20:44:32 +0200 <PCH>   | ^^^^^^^^
2022-06-06 20:44:34 +0200 <geekosaur> yes, I think empty record updates are rejected these days
2022-06-06 20:44:50 +0200 <cdsmith> Ah, you are missing imports that aren't in the README example.
2022-06-06 20:45:25 +0200 <dsal> Oh, the README doesn't include imports.
2022-06-06 20:45:47 +0200 <dsal> import Network.URI (parseURI)
2022-06-06 20:46:11 +0200 <dsal> I don't have a compiler set up for this project, so it'll be a moment.
2022-06-06 20:46:47 +0200 <PCH> I've the imports:
2022-06-06 20:46:47 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
2022-06-06 20:46:47 +0200 <PCH> mport Network.MQTT.Arbitrary
2022-06-06 20:46:48 +0200 <PCH> import Network.MQTT.Client (connectURI, mqttConfig, publish)
2022-06-06 20:46:48 +0200 <PCH> import Network.MQTT.Topic
2022-06-06 20:46:49 +0200 <PCH> import Network.MQTT.Types
2022-06-06 20:46:49 +0200 <PCH> import Control.Concurrent (threadDelay)
2022-06-06 20:46:50 +0200 <PCH> import Control.Concurrent.Async (async, cancel, link)
2022-06-06 20:46:50 +0200 <PCH> import Control.Monad (forever)
2022-06-06 20:46:51 +0200 <PCH> import Network.URI (parseURI)
2022-06-06 20:47:05 +0200 <PCH> I've imported everything I could find ...lol
2022-06-06 20:47:15 +0200 <dsal> You don't need all these imports, but also, please don't pate them here. Put your file somewhere.
2022-06-06 20:47:25 +0200 <monochrom> Here:
2022-06-06 20:47:28 +0200 <monochrom> @where paste
2022-06-06 20:47:28 +0200 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-06-06 20:47:47 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458) (Ping timeout: 240 seconds)
2022-06-06 20:48:49 +0200 <dsal> As soon as compilers catch up, I'm going to make self-contained examples in the test dir that at least give a starting point for something that compiles other than the commandline tool.
2022-06-06 20:49:10 +0200 <dsal> Actually, there *is* this example, PCH: https://github.com/dustin/mqtt-hs/blob/master/app/example/Main.hs
2022-06-06 20:49:17 +0200 <dsal> That one compiles in CI
2022-06-06 20:50:06 +0200Luj(~Luj@2a01:e0a:5f9:9681:1f07:bb0d:ed9e:6a6f)
2022-06-06 20:50:13 +0200 <dsal> Or, the more complete program I actually use a lot: https://github.com/dustin/mqtt-hs/blob/master/app/mqtt-watch/Main.hs
2022-06-06 20:50:40 +0200 <PCH> https://paste.tomsmeding.com/Z6wrktsJ
2022-06-06 20:53:07 +0200 <dsal> Oh, also doing that in GHCI adds a new dimension of difficulty.
2022-06-06 20:53:32 +0200 <dsal> But it sounds like you can't do an empty update. I'm not 100% sure why I put that there. It's a little confusing at least.
2022-06-06 20:53:44 +0200 <dsal> (I think it had a few things in it and I kept removing them)
2022-06-06 20:54:20 +0200alp(~alp@user/alp) (Ping timeout: 272 seconds)
2022-06-06 20:54:21 +0200nate3(~nate@98.45.169.16)
2022-06-06 20:55:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 20:58:07 +0200 <PCH> do you thing that I should open a bug in the library ?
2022-06-06 20:58:18 +0200 <PCH> or is my ENV ?
2022-06-06 20:59:05 +0200nate3(~nate@98.45.169.16) (Ping timeout: 256 seconds)
2022-06-06 21:00:02 +0200 <dsal> Well the example is wrong. Once I can compile I'll try to make that clearer. But the existing examples *do* compile in CI, so they should compile for you. Can you build one of the above?
2022-06-06 21:00:16 +0200 <Bulby[m]> god, maybe dealing with state in haskell isn't a good decision
2022-06-06 21:00:40 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 21:01:03 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458)
2022-06-06 21:01:04 +0200 <Bulby[m]> or I should just throw out my current code
2022-06-06 21:01:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 21:03:11 +0200Pickchea(~private@user/pickchea) (Ping timeout: 255 seconds)
2022-06-06 21:03:20 +0200 <PCH> @dsal : the suggestion to use main at least comple I will remove statement by statement to find out what was wrong at least I've a track to follow
2022-06-06 21:03:21 +0200 <lambdabot> Maybe you meant: keal eval
2022-06-06 21:03:44 +0200 <Bulby[m]> @keal
2022-06-06 21:03:44 +0200 <lambdabot> i suggest you tear apart a 20q and plug it with the alg
2022-06-06 21:03:54 +0200 <Bulby[m]> what
2022-06-06 21:04:06 +0200 <geekosaur> don't ask
2022-06-06 21:04:11 +0200 <geekosaur> keal was a nutcase
2022-06-06 21:04:54 +0200 <dolio> @protontorpedo
2022-06-06 21:04:54 +0200 <lambdabot> wil I make mroe $$ than learning java or APL or smalltalk or plt scheme or ruby or perl or clisp?
2022-06-06 21:05:15 +0200 <Bulby[m]> @help
2022-06-06 21:05:15 +0200 <lambdabot> help <command>. Ask for help for <command>. Try 'list' for all commands
2022-06-06 21:05:23 +0200 <Bulby[m]> @list
2022-06-06 21:05:23 +0200 <lambdabot> What module? Try @listmodules for some ideas.
2022-06-06 21:05:27 +0200zincy(~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458) (Ping timeout: 260 seconds)
2022-06-06 21:05:34 +0200 <Bulby[m]> @listmodules
2022-06-06 21:05:34 +0200 <lambdabot> activity base bf check compose dice dict djinn dummy elite eval filter free fresh haddock help hoogle instances irc karma localtime metar more oeis offlineRC pl pointful poll pretty quote search
2022-06-06 21:05:34 +0200 <lambdabot> seen slap source spell system tell ticker todo topic type undo unlambda unmtl version where
2022-06-06 21:05:37 +0200 <dolio> You should private chat this.
2022-06-06 21:05:47 +0200 <Bulby[m]> i can private chat the bot?
2022-06-06 21:05:51 +0200 <dolio> Yes.
2022-06-06 21:06:27 +0200 <Bulby[m]> does it have to be on irc
2022-06-06 21:06:40 +0200 <dolio> I don't know. I've never used irc over matrix.
2022-06-06 21:06:56 +0200 <geekosaur> matrix pms work fine
2022-06-06 21:07:12 +0200 <Bulby[m]> really? why doesn't lambdabot respond then
2022-06-06 21:07:23 +0200 <Bulby[m]> because it hadn't joined yet 😅
2022-06-06 21:08:00 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 21:08:54 +0200 <Bulby[m]> @ghc
2022-06-06 21:08:54 +0200 <lambdabot> You need -fglasgow-exts to derive an instance for this class
2022-06-06 21:09:02 +0200 <Bulby[m]> haha
2022-06-06 21:10:16 +0200 <Bulby[m]> so the quote module is shitpost module
2022-06-06 21:10:52 +0200 <geekosaur> I'm using the android app, just tried @ping to @lambdabot:libera.chat and got a pong back
2022-06-06 21:11:08 +0200 <gio123> does someone knows here ocaml?
2022-06-06 21:11:23 +0200 <monochrom> No.
2022-06-06 21:11:29 +0200 <geekosaur> gio123, did you see my earlier response about #ocaml?
2022-06-06 21:11:40 +0200 <gio123> i saw but....
2022-06-06 21:11:46 +0200 <gio123> died chanell :)
2022-06-06 21:12:02 +0200 <monochrom> Doesn't mean you're entitled to bring it here.
2022-06-06 21:12:24 +0200 <monochrom> Anyone who want to talk about ocaml would have joined #ocaml.
2022-06-06 21:12:39 +0200 <_73> It is also definitely not a dead channel
2022-06-06 21:12:48 +0200 <gio123> is there big differenes between ocaml and haskell
2022-06-06 21:12:48 +0200 <monochrom> Anyone who haven't joined means they don't want to talk about it.
2022-06-06 21:12:54 +0200 <gio123> since both are fp?
2022-06-06 21:13:04 +0200 <EvanR> big difference yeah
2022-06-06 21:13:33 +0200 <EvanR> purity and laziness for example
2022-06-06 21:13:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 21:13:43 +0200 <gio123> ocaml is eager
2022-06-06 21:14:13 +0200 <gio123> I had question concerning concurency ...
2022-06-06 21:14:18 +0200 <gio123> in ocaml
2022-06-06 21:14:22 +0200 <[exa]> gio123: why not learn haskell tho?
2022-06-06 21:14:40 +0200 <EvanR> concurrency/parallelism in haskell is pretty interesting
2022-06-06 21:14:43 +0200 <[exa]> anyway ocaml users seem to concentrate on the discourse, I'd try that
2022-06-06 21:15:28 +0200 <gio123> I do not know haskell
2022-06-06 21:15:58 +0200 <EvanR> yet
2022-06-06 21:15:59 +0200 <dsal> PCH: This compiles just fine for me with stackage 19.20 (GHC 9.0.2): https://www.irccloud.com/pastebin/kqAEyfow/Example.hs
2022-06-06 21:16:54 +0200 <unit73e> afaik ocaml doesn't even have threads but that's just me saying here
2022-06-06 21:17:10 +0200alp(~alp@user/alp)
2022-06-06 21:17:28 +0200 <unit73e> I'd just learn haskell
2022-06-06 21:17:32 +0200 <geekosaur> https://ocaml.org/api/Thread.html
2022-06-06 21:17:55 +0200 <geekosaur> that said, we have
2022-06-06 21:17:59 +0200 <geekosaur> @where parconc
2022-06-06 21:17:59 +0200 <lambdabot> https://www.safaribooksonline.com/library/view/parallel-and-concurrent/9781449335939/
2022-06-06 21:18:08 +0200 <unit73e> good. pretty sure it didn't at the time I used ocaml but that was a long time ago
2022-06-06 21:18:12 +0200 <geekosaur> and the async library to go along with it
2022-06-06 21:18:14 +0200 <Bulby[m]> haxe is written in ocaml. don't try to comprehend it
2022-06-06 21:18:38 +0200 <PCH> @dsal yes you are right now I ve  working version l
2022-06-06 21:18:38 +0200 <lambdabot> Maybe you meant: keal eval
2022-06-06 21:19:08 +0200 <Bulby[m]> irc pings don't work like that
2022-06-06 21:19:11 +0200 <PCH> but I don't get I why the version from readme does not work
2022-06-06 21:19:17 +0200 <Bulby[m]> you can just say the name
2022-06-06 21:19:35 +0200 <geekosaur> and @ triggers the channel bot
2022-06-06 21:20:00 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 21:20:11 +0200 <dsal> PCH: It used to work, but `{}` isn't necessary, so I removed it. I also added the same examples such that they complied via CI to avoid confusion.
2022-06-06 21:21:01 +0200 <sm> int-e: could lambdabot be adjusted to ignore @ ?
2022-06-06 21:21:18 +0200 <Bulby[m]> why? can it know other things?
2022-06-06 21:21:19 +0200remedan(~remedan@octo.cafe)
2022-06-06 21:21:31 +0200 <Bulby[m]> :keal
2022-06-06 21:21:59 +0200 <[exa]> Bulby[m]: you can actually PM it (use /query lambdabot) and try `help` etc
2022-06-06 21:22:08 +0200 <int-e> sm: it can but it would have to be global, there's no support for per channel settings
2022-06-06 21:22:20 +0200 <geekosaur> ?keal
2022-06-06 21:22:20 +0200 <lambdabot> where can i find opensource schematics of Linus Torvalds' x86 clone?
2022-06-06 21:22:27 +0200 <sm> that sounds good to me ?
2022-06-06 21:22:35 +0200 <Bulby[m]> oh
2022-06-06 21:22:51 +0200 <geekosaur> it already understands alternate command characters. but a bunch of us will be pretty lost if it doesn't respond to @, which it has used since at least 2006
2022-06-06 21:22:58 +0200 <int-e> it's been using @ forever though... it's in my muscle memory and I don't think I'm alone in that
2022-06-06 21:23:20 +0200 <Bulby[m]> ^
2022-06-06 21:23:26 +0200 <unit73e> that said, about paralelism concurrency, not much changed over the years. the latest cool trick is STM, and haskell does that better than popular languages
2022-06-06 21:23:31 +0200 <geekosaur> I think dmwit's the only one I've ever seen using ? as the command character
2022-06-06 21:23:44 +0200 <sm> my rationale: @ is now and always will be associated with @username, and most people use > for lambdabot
2022-06-06 21:24:08 +0200 <unit73e> I did STM in Java and it was ugly
2022-06-06 21:24:21 +0200stackdroid18(14094@user/stackdroid)
2022-06-06 21:25:04 +0200 <unit73e> the idea was that you could improve ORM with STM. the plan failed lol
2022-06-06 21:25:04 +0200 <int-e> @where lambdabot
2022-06-06 21:25:04 +0200 <lambdabot> http://haskell.org/haskellwiki/Lambdabot
2022-06-06 21:25:16 +0200 <unit73e> in college
2022-06-06 21:25:23 +0200 <sm> >where doesn't work ?
2022-06-06 21:25:30 +0200 <sm> or is that another bot ?
2022-06-06 21:25:44 +0200 <int-e> The '> ' prefix is an alias for '@run '.
2022-06-06 21:25:57 +0200 <int-e> @run 1+1
2022-06-06 21:25:59 +0200 <lambdabot> 2
2022-06-06 21:26:01 +0200 <sm> ok. Personally I'd change it to ! to avoid explaining this for the rest of time
2022-06-06 21:26:08 +0200 <int-e> @eval 1+1 --confusingly, not this.
2022-06-06 21:26:29 +0200 <int-e> ?where lambdabot
2022-06-06 21:26:29 +0200 <lambdabot> http://haskell.org/haskellwiki/Lambdabot
2022-06-06 21:26:53 +0200 <int-e> (I don't see many people use the ? alternative)
2022-06-06 21:27:04 +0200machinedgod(~machinedg@209.171.88.234)
2022-06-06 21:27:49 +0200 <Bulby[m]> STM?
2022-06-06 21:28:02 +0200 <geekosaur> software transactional memory
2022-06-06 21:28:02 +0200smdidn't know about ?, and feels ! is better known
2022-06-06 21:28:03 +0200 <Bulby[m]> wait
2022-06-06 21:28:04 +0200 <Bulby[m]> oh
2022-06-06 21:28:19 +0200 <Bulby[m]> I Have an actual question now; how does IORef?
2022-06-06 21:28:19 +0200 <Bulby[m]> IORef work?
2022-06-06 21:28:39 +0200 <Bulby[m]> is that what ST is
2022-06-06 21:28:42 +0200 <geekosaur> underneath the veneer, it's a MutVar#
2022-06-06 21:28:46 +0200 <int-e> I suspect that ! was avoided because it clashes with too many other bots.
2022-06-06 21:29:07 +0200 <Bulby[m]> 😱
2022-06-06 21:29:17 +0200 <Bulby[m]> what about STRef
2022-06-06 21:29:21 +0200 <geekosaur> IORef is ST with a RealWorld# pseudo-state. ST uses an existential instead
2022-06-06 21:29:28 +0200 <Bulby[m]> NO THE SAME 😱
2022-06-06 21:29:28 +0200 <geekosaur> *normal ST
2022-06-06 21:29:51 +0200 <geekosaur> so every ST is its own little world, but IO lives in a quasi-public world
2022-06-06 21:29:58 +0200 <sm> I expect you're right, I can't think of any channels with lambdabot and another ! bot though
2022-06-06 21:30:03 +0200 <int-e> Anyway, I'll record one vote for disabling the @ prefix, maybe in favor of !, maybe just keeping ?. I'll not change it based on that.
2022-06-06 21:30:15 +0200 <sm> also, well behaved bots should ignore !unhandledcommand
2022-06-06 21:30:17 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com)
2022-06-06 21:30:21 +0200 <geekosaur> underneath that, each one is an unboxed tuple of a state token and a value
2022-06-06 21:30:23 +0200 <Bulby[m]> ^
2022-06-06 21:30:31 +0200 <sm> thanks!
2022-06-06 21:30:32 +0200 <geekosaur> (# token,val #)
2022-06-06 21:30:51 +0200 <Bulby[m]> I was wondering because I wanted to know if it would be viable to write a `StateRef`
2022-06-06 21:30:55 +0200 <geekosaur> I'm in a channel where I think 3 different bots handle different ! commands
2022-06-06 21:31:06 +0200 <geekosaur> plus one that uses @
2022-06-06 21:31:20 +0200 <geekosaur> (##soccer)
2022-06-06 21:31:50 +0200 <int-e> I could get behind silencing lambdabot for unknown commands (including typos; the typo correction is more of a show-off than a useful feature)
2022-06-06 21:32:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 21:32:07 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-06-06 21:32:18 +0200smwould also vote to stop responding to >, since that is widely used to as markup for quoting
2022-06-06 21:32:23 +0200 <PCH> FOUND !!
2022-06-06 21:32:25 +0200 <Bulby[m]> probably a better solution
2022-06-06 21:32:33 +0200 <geekosaur> int-e, perhaps what really should be disabled is edit correction. how often is it actually used, as opposed to being an @ref or a typo of something else (commonly @info -> @undo)?
2022-06-06 21:32:44 +0200 <PCH> can someone could explain me what this line means ?
2022-06-06 21:32:45 +0200 <PCH> {-# LANGUAGE OverloadedStrings #-}
2022-06-06 21:32:53 +0200 <geekosaur> it's a pragma
2022-06-06 21:33:02 +0200Alleria_(~AllahuAkb@DN2lk432a.stanford.edu)
2022-06-06 21:33:02 +0200 <int-e> geekosaur: didn't I just say that? I guess that's a vote in favor though
2022-06-06 21:33:13 +0200 <int-e> @unknown
2022-06-06 21:33:13 +0200 <lambdabot> Unknown command, try @list
2022-06-06 21:33:20 +0200 <geekosaur> I was still typing and didn't see yours until after I sent
2022-06-06 21:33:29 +0200geekosauris a 4-finger typist
2022-06-06 21:33:45 +0200 <Bulby[m]> hm
2022-06-06 21:33:47 +0200 <int-e> geekosaur: Ah. I can relate, didn't correlate typing and length of the message.
2022-06-06 21:33:56 +0200 <int-e> err timing
2022-06-06 21:34:01 +0200 <int-e> and length of message
2022-06-06 21:34:19 +0200 <Bulby[m]> I would like to represent a mutable var under polysemy's State but would prefer to not use IORef or STRef
2022-06-06 21:34:20 +0200 <geekosaur> PCH, without that pragma a literal string is of type String. with it, a literal string can be any type that has an IsString instance
2022-06-06 21:34:50 +0200 <PCH> ahh got it (more or less)
2022-06-06 21:34:54 +0200 <geekosaur> this is commonly used with the Text type
2022-06-06 21:34:56 +0200 <PCH> many thanks to all !!!
2022-06-06 21:36:01 +0200 <geekosaur> Bulby[m], didn't we determine that State already uses an IORef for the state?
2022-06-06 21:36:31 +0200 <Bulby[m]> it doesn't do that if you `runState` which I do
2022-06-06 21:36:39 +0200 <Bulby[m]> I don't think I ever interpret state to IO
2022-06-06 21:37:31 +0200 <geekosaur> anyway if you want a mutable var, your options are IORef, STRef, or work with MutVar# directly which is just reinventing IORef but more error-prone
2022-06-06 21:37:59 +0200 <Bulby[m]> why so few options
2022-06-06 21:38:07 +0200 <geekosaur> because this is Haskell
2022-06-06 21:38:27 +0200 <geekosaur> well, MutVar# is also used to implement MVar butyou almost certainly don't want that
2022-06-06 21:38:30 +0200machinedgod(~machinedg@209.171.88.234) (Ping timeout: 240 seconds)
2022-06-06 21:39:03 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 276 seconds)
2022-06-06 21:39:32 +0200 <tomsmeding> > sm: works for me (tm)
2022-06-06 21:41:06 +0200 <Bulby[m]> and emulating it is off the table because that means I would have to runState all the time
2022-06-06 21:42:27 +0200 <tomsmeding> Bulby[m]: forgive me for not knowing much about polysemy, but "represent a mutable var under polysemy's State" sounds a lot like "using polysemy's State" to me
2022-06-06 21:42:45 +0200 <tomsmeding> after all, isn't the point of using mutable state to provide, well, mutable state?
2022-06-06 21:42:47 +0200 <geekosaur> that was more or less what I said earlier. apparently that's not true with runState
2022-06-06 21:43:23 +0200 <tomsmeding> what I'm trying to say is, why is polysemy's standard State not sufficient
2022-06-06 21:43:36 +0200 <geekosaur> but I think the conmtext you're missing is Bulby[m] has State representing a closure which includes mutable variables
2022-06-06 21:43:38 +0200 <Bulby[m]> https://github.com/ccntrq/loxomotive/blob/master/src/Loxomotive/Environment.hs
2022-06-06 21:43:45 +0200 <Bulby[m]> this interpreter (which uses StateT) uses IORef
2022-06-06 21:43:49 +0200 <geekosaur> *context
2022-06-06 21:44:08 +0200 <tomsmeding> why would one put mutable variables in state?
2022-06-06 21:44:29 +0200 <Bulby[m]> i don't know 😭
2022-06-06 21:44:32 +0200 <geekosaur> because originally they were rewriting the entire context on a variable update
2022-06-06 21:44:42 +0200 <Bulby[m]> for closures and mutable vars
2022-06-06 21:44:49 +0200 <tomsmeding> I would _expect_ that you rewrite the entire context every time
2022-06-06 21:44:58 +0200 <tomsmeding> except you don't actually change the parts that don't change
2022-06-06 21:45:09 +0200 <tomsmeding> like, standard State monad stuff? :p
2022-06-06 21:45:13 +0200 <geekosaur> ideally the context should now be read-only (i.e. Reader) and th contained variables be constant refs to mutable memory (i.e. IORef)
2022-06-06 21:46:03 +0200 <Bulby[m]> but then what if I don't know where the closure is?
2022-06-06 21:46:11 +0200 <tomsmeding> oh, the idea is to conjure up a polysemy effect that provides mutable variables?
2022-06-06 21:46:14 +0200 <Bulby[m]> to redefine the context I need to know where the closure is
2022-06-06 21:46:34 +0200 <geekosaur> so you use a Reader effect for that instead of a State effect
2022-06-06 21:46:52 +0200 <geekosaur> only difference is Reader is read-only
2022-06-06 21:47:11 +0200 <tomsmeding> this src/Loxomotive/Environment.hs, is that the original, not-nice code, or is that the intended code?
2022-06-06 21:47:13 +0200 <geekosaur> that said, if you need to define variables instde the context you may need it to remain a State
2022-06-06 21:47:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 21:47:45 +0200 <Bulby[m]> that is someone elses code
2022-06-06 21:47:50 +0200agumonkey(~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 244 seconds)
2022-06-06 21:48:07 +0200 <tomsmeding> if I'm talking into the blue and should shut up please say so, but I don't see why this can't be a vanilla State effect
2022-06-06 21:48:26 +0200 <tomsmeding> if you want to have two mutable variables in your state, then make the state a pair of those two
2022-06-06 21:48:49 +0200 <Bulby[m]> closures also hold mutable maps
2022-06-06 21:48:51 +0200 <tomsmeding> setFirstVar x = do { (_, y) <- get ; put (x, y) }
2022-06-06 21:49:08 +0200 <tomsmeding> Map.insert :: k -> v -> Map k v -> Map k v
2022-06-06 21:49:20 +0200 <tomsmeding> modify :: (s -> s) -> State s ()
2022-06-06 21:49:35 +0200 <tomsmeding> \k v -> modify (Map.insert k v) :: k -> v -> State (Map k v) ()
2022-06-06 21:49:56 +0200 <tomsmeding> classical haskell98
2022-06-06 21:50:10 +0200 <tomsmeding> no need for mutable variables
2022-06-06 21:50:50 +0200 <tomsmeding> and yes, modifying a key in an immutable map involves allocating log(n) new tree nodes, where n is the current size of the map
2022-06-06 21:51:05 +0200 <tomsmeding> if you didn't want that you should have been programming Rust
2022-06-06 21:51:20 +0200 <Bulby[m]> loxomotive seems to handle closures differently as well
2022-06-06 21:52:22 +0200 <tomsmeding> from the readme of loxomotive it sounds like this code was modelled closely after a Java implementation
2022-06-06 21:52:29 +0200 <tomsmeding> I feel that _that_ is where the IORef's come from
2022-06-06 21:52:42 +0200 <Bulby[m]> ah
2022-06-06 21:52:47 +0200 <Bulby[m]> i am reading the book, and trying to interpret it to haskell
2022-06-06 21:52:51 +0200 <tomsmeding> not necessarily because the author thought that this was the nicest way to write it in haskell
2022-06-06 21:53:21 +0200 <Bulby[m]> it looks like it holds closures in a map
2022-06-06 21:53:21 +0200 <tomsmeding> that Crafting Interpreters book is very imperative-minded iirc (never read it myself though)
2022-06-06 21:53:31 +0200 <tomsmeding> that's no issue
2022-06-06 21:53:34 +0200 <Bulby[m]> it is 😄
2022-06-06 21:53:44 +0200 <geekosaur> I figured the most straightforward way to model a mutable variable in an interpreter was a mutable variable
2022-06-06 21:53:54 +0200 <Bulby[m]> holding closures in a map is way smarter than holding it on the function object
2022-06-06 21:53:56 +0200 <tomsmeding> Map.adjust :: (a -> a) -> k -> Map k a -> Map k a
2022-06-06 21:54:38 +0200 <tomsmeding> geekosaur: in Java it is, and in Haskell it _might_ be, depending on how pure you want your code to be, and how efficient
2022-06-06 21:55:30 +0200 <Bulby[m]> before I started rewriting I represented environments as a list instead of objects with references
2022-06-06 21:55:42 +0200 <tomsmeding> Bulby[m]: would you be able to write this function? 'interpret :: AST -> Map VariableName Object -> (Object, Map VariableName Object)
2022-06-06 21:55:44 +0200 <tomsmeding> '
2022-06-06 21:56:12 +0200 <tomsmeding> where the output Map is the environment after any changes made by the program to interpret
2022-06-06 21:56:16 +0200 <Bulby[m]> i think so?
2022-06-06 21:56:24 +0200 <tomsmeding> that's just 'interpret :: AST -> State (Map VariableName Object) Object'
2022-06-06 21:56:30 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 240 seconds)
2022-06-06 21:56:36 +0200 <tomsmeding> newtype State s a = State (s -> (a, s))
2022-06-06 21:56:48 +0200 <tomsmeding> (this is not polysemy, but normal monads)
2022-06-06 21:57:04 +0200 <tomsmeding> presumably polysemy's State effect works kind of similarly :p
2022-06-06 21:57:31 +0200 <EvanR> the objects are mutable... the environment is mutable... are the classes mutable? Is this going to be basically ruby?
2022-06-06 21:57:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 21:57:46 +0200 <Bulby[m]> it's OOP
2022-06-06 21:57:48 +0200 <Bulby[m]> what do you expect
2022-06-06 21:57:54 +0200 <tomsmeding> EvanR: the Lox language that that book lets you write an interpreter for is very imperative, yes
2022-06-06 21:58:17 +0200 <EvanR> in another universe, you can speak of OOP without everything being mutable
2022-06-06 21:58:26 +0200 <tomsmeding> which makes sense, because that's what people are familiar with, generally, and it's intended to be an _approachable_ book first and foremost
2022-06-06 21:58:36 +0200 <tomsmeding> not an _idealistically nice_ book
2022-06-06 21:58:45 +0200 <EvanR> this book has nothing to do with haskell right
2022-06-06 21:58:47 +0200 <EvanR> just checking
2022-06-06 21:58:48 +0200 <tomsmeding> no
2022-06-06 21:58:51 +0200 <Bulby[m]> don't worry I'll make LoxML next 🙂
2022-06-06 21:58:54 +0200 <tomsmeding> the reference impl is in Java :p
2022-06-06 21:59:29 +0200 <Bulby[m]> it's a miracle I got this far just by reading the book and getting help here
2022-06-06 21:59:38 +0200 <tomsmeding> a book like that in Haskell would be 1. 30% shorter, and 2. about a functional language, not an imperative one
2022-06-06 21:59:42 +0200 <EvanR> yeah it is
2022-06-06 22:00:16 +0200 <EvanR> ok at least your project is nominally in haskell (polysemy)
2022-06-06 22:00:36 +0200 <Bulby[m]> nominally?
2022-06-06 22:00:40 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de)
2022-06-06 22:00:57 +0200 <EvanR> even then hopefully after the dust settles we learned a better way to implement java
2022-06-06 22:01:22 +0200 <EvanR> from a theoretical standpoint
2022-06-06 22:01:48 +0200zebrag(~chris@user/zebrag)
2022-06-06 22:04:47 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-06 22:06:05 +0200califax(~califax@user/califx)
2022-06-06 22:06:58 +0200 <Bulby[m]> hm, loxomotive doesn't implement native functions
2022-06-06 22:07:32 +0200 <EvanR> do you mean foreign function interface
2022-06-06 22:07:57 +0200 <EvanR> you could just use haskell's
2022-06-06 22:08:06 +0200 <Bulby[m]> no, I mean like the `clock` function
2022-06-06 22:08:23 +0200 <EvanR> right
2022-06-06 22:08:24 +0200 <Bulby[m]> native functions as in functions implemented in haskell accessed from lox
2022-06-06 22:08:39 +0200 <EvanR> even more appropriately named foreign then
2022-06-06 22:08:39 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-06-06 22:09:07 +0200 <EvanR> and probably easier
2022-06-06 22:09:29 +0200rekahsoft(~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca)
2022-06-06 22:09:54 +0200 <EvanR> but if it's a working clock, it might not be literally a function
2022-06-06 22:10:20 +0200 <Bulby[m]> an IO action
2022-06-06 22:10:30 +0200ente(~daemon@inferno.barfooze.de)
2022-06-06 22:11:41 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 22:13:02 +0200 <Bulby[m]> I could probably write a helper to convert nativefun to lox fun
2022-06-06 22:13:42 +0200winny(~weechat@user/winny)
2022-06-06 22:14:08 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d) (Remote host closed the connection)
2022-06-06 22:15:13 +0200ente(~daemon@inferno.barfooze.de) (Ping timeout: 244 seconds)
2022-06-06 22:16:38 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2022-06-06 22:17:15 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 22:17:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 22:17:48 +0200Pickchea(~private@user/pickchea)
2022-06-06 22:17:57 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
2022-06-06 22:18:24 +0200zincy(~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Remote host closed the connection)
2022-06-06 22:19:21 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-06 22:21:11 +0200PCH(~PCH@75.243-134-109.adsl-dyn.isp.belgacom.be) (Quit: Client closed)
2022-06-06 22:28:04 +0200littlebo1eep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 22:29:19 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com)
2022-06-06 22:29:25 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 22:29:47 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-06 22:32:17 +0200 <tomsmeding> Bulby[m]: sorry, I spoke too soon when I said that this could just be plain State. I just tried implementing an interpreter for a tiny super-mutable imperative language, and indeed the combination of mutable variables and closures is tricky.
2022-06-06 22:32:49 +0200 <tomsmeding> But actually, there is a very nice solution, and that solution (hooray) teaches us something about the semantics of such a language!
2022-06-06 22:33:27 +0200xff0x(~xff0x@2405:6580:b080:900:ee80:883a:30aa:6d2d) (Ping timeout: 240 seconds)
2022-06-06 22:33:34 +0200kuribas(~user@ptr-17d51en0oz3ua6p75jh.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2022-06-06 22:33:35 +0200 <tomsmeding> the thing is that Haskell forces us to be very explicit in where we want what kind of mutability. Here, what we want is a _stack_ containing variables, and a _heap_ containing the values
2022-06-06 22:33:44 +0200slack1256(~slack1256@191.125.227.95)
2022-06-06 22:34:00 +0200 <tomsmeding> the stack is a mapping from variable name to heap address, and the heap is a mapping from heap address to value
2022-06-06 22:34:16 +0200 <tomsmeding> the stack is stored in the closure, but the heap is passed through as state in the interpreter
2022-06-06 22:35:01 +0200 <EvanR> "the stack" is just the variable environment? (not necessarily a stack) ?
2022-06-06 22:35:08 +0200 <tomsmeding> this creates precisely the separation that you want: we have _lexical_ scoping (i.e. the heap cell that a variable points to does not change -- the 'stack' map is immutable), but we have _mutable_ variables
2022-06-06 22:35:12 +0200 <tomsmeding> EvanR: yes
2022-06-06 22:35:23 +0200 <tomsmeding> stack :: Map VariableName Int; heap :: Map Int Value
2022-06-06 22:35:40 +0200xff0x(~xff0x@b133147.ppp.asahi-net.or.jp)
2022-06-06 22:35:55 +0200 <tomsmeding> in fact this tells you precisely what you want if you want _dynamic_ scoping, like emacs lisp: just put everything in the 'heap' map
2022-06-06 22:36:05 +0200 <tomsmeding> see: it taught us something about the semantics
2022-06-06 22:36:07 +0200 <tomsmeding> hooray FP
2022-06-06 22:36:41 +0200 <geekosaur> this is not so different from what we went through yesterday
2022-06-06 22:36:47 +0200 <geekosaur> just not called out as such
2022-06-06 22:36:52 +0200 <tomsmeding> using IORefs will probably be somewhat more performant, but this two-map approach is _much_ nicer IMO
2022-06-06 22:37:53 +0200 <EvanR> now you really need a type system xD
2022-06-06 22:38:09 +0200 <tomsmeding> EvanR: what does a type system have to do with this?
2022-06-06 22:38:12 +0200 <geekosaur> lox is the wrong place to look for that, I think
2022-06-06 22:38:19 +0200 <tomsmeding> (I mean, I want a type system, sure :p)
2022-06-06 22:38:33 +0200 <Bulby[m]> i'm confused
2022-06-06 22:38:53 +0200 <EvanR> all Values are the same type at the moment, it's fine.. i guess
2022-06-06 22:39:05 +0200 <tomsmeding> EvanR: that's just what it is for an untyped language
2022-06-06 22:39:15 +0200 <tomsmeding> untyped languages exist and are very popular, so it's worth studying them
2022-06-06 22:39:35 +0200 <Bulby[m]> and untyped languages are easier to write interpreters for 😅
2022-06-06 22:39:41 +0200 <tomsmeding> x doubt
2022-06-06 22:39:50 +0200 <Bulby[m]> ?
2022-06-06 22:39:56 +0200 <tomsmeding> well, okay maybe I'm biased
2022-06-06 22:39:59 +0200 <EvanR> a type system on top of this thing tomsmeding described would be the same interpreter
2022-06-06 22:40:12 +0200 <EvanR> but yeah
2022-06-06 22:40:19 +0200 <Bulby[m]> I can see how that stack and heap would work
2022-06-06 22:40:25 +0200 <tomsmeding> but if your AST is a GADT with the type of the term in the type parameter, then the interpreter becomes tagless and a breeze to write
2022-06-06 22:40:40 +0200 <tomsmeding> you do have to deal with variables, and that's where the trickiness comes in, but it's very localised
2022-06-06 22:40:48 +0200 <Bulby[m]> GADT can't derive generic which makes me unhappy
2022-06-06 22:40:52 +0200 <EvanR> that's another level, making the interpreter itself well typed xD
2022-06-06 22:40:57 +0200 <tomsmeding> yeah lol
2022-06-06 22:41:12 +0200 <tomsmeding> I've been writing lots of well-typed interpreters recently, hence my bias
2022-06-06 22:42:05 +0200 <Bulby[m]> cool \o/ I love learning
2022-06-06 22:42:16 +0200 <EvanR> not having to do case analysis everywhere to cause the required crashing when the coder screwed up is nice
2022-06-06 22:43:10 +0200emad(~emad@156.214.23.85)
2022-06-06 22:43:19 +0200emad(~emad@156.214.23.85) (Remote host closed the connection)
2022-06-06 22:43:39 +0200 <Bulby[m]> what about scopes tho? would my environment be a stack and heap, then my `State` effect would be parametered with a list of environments?
2022-06-06 22:43:51 +0200`2jt(~jtomas@182.red-88-17-61.dynamicip.rima-tde.net) (Remote host closed the connection)
2022-06-06 22:43:56 +0200 <tomsmeding> Bulby[m]: not a list of environments
2022-06-06 22:44:19 +0200 <tomsmeding> a closure remembers its stack, but takes the current heap as input
2022-06-06 22:44:30 +0200 <tomsmeding> your interpreter just threads through both together
2022-06-06 22:44:54 +0200 <Bulby[m]> so do scopes even matter? that's confusing
2022-06-06 22:45:09 +0200 <tomsmeding> Bulby[m]: the point of scopes is that there you split the stack and the heap
2022-06-06 22:45:16 +0200 <tomsmeding> or well
2022-06-06 22:45:25 +0200 <tomsmeding> I'm thinking of lambda functions, i.e. actual closures
2022-06-06 22:45:31 +0200 <Bulby[m]> i mean lexical scope - like ` { }`
2022-06-06 22:45:39 +0200 <tomsmeding> if you just enter a block, you'd save the stack, but keep the heap
2022-06-06 22:45:41 +0200 <tomsmeding> right
2022-06-06 22:46:13 +0200 <tomsmeding> evalBlock stk heap stmts = let (stk', heap') = evalStmts stk heap stmts in (stk, heap')
2022-06-06 22:46:14 +0200 <Bulby[m]> ah, so a list of stacks and a heap
2022-06-06 22:46:17 +0200 <tomsmeding> pseudo-haskell
2022-06-06 22:46:25 +0200 <tomsmeding> no list here
2022-06-06 22:46:25 +0200 <EvanR> any given statement has 1 environment (stack)
2022-06-06 22:46:45 +0200 <tomsmeding> there is a list here sneakily hidden: the recursion stack of my interpreter
2022-06-06 22:46:47 +0200 <EvanR> (not to be confused with an actual stack)
2022-06-06 22:46:50 +0200remedan(~remedan@octo.cafe) (Remote host closed the connection)
2022-06-06 22:47:00 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-06-06 22:47:20 +0200 <EvanR> a table from variables to heap objects
2022-06-06 22:47:35 +0200 <Bulby[m]> the polysemy effects would be `State [Stack], State Heap`
2022-06-06 22:48:11 +0200 <EvanR> is the stack really stateful or more like a Reader
2022-06-06 22:48:13 +0200 <tomsmeding> Bulby[m]: that's what I would expect if your program looks like [Statement, StartBlock, Statement, Statement, EndBlock, Statement]
2022-06-06 22:48:28 +0200nate3(~nate@98.45.169.16)
2022-06-06 22:48:30 +0200 <tomsmeding> what I would rather represent the program as is [Statement, Block [Statement, Statement], Statement]
2022-06-06 22:48:34 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 22:48:47 +0200 <tomsmeding> then the interpreter becomes recursive, and the effect would become (Reader Stack, State Heap)
2022-06-06 22:49:18 +0200 <tomsmeding> where you use the 'local' function from Reader whenever you declare a new variable
2022-06-06 22:50:26 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 22:52:07 +0200 <Bulby[m]> what is local btw - polysemy doesn't give descriptions
2022-06-06 22:52:24 +0200 <tomsmeding> run a subcomputation with a different context
2022-06-06 22:52:39 +0200 <EvanR> this interpreter makes way too much sense now, needs more malbolge
2022-06-06 22:52:46 +0200 <tomsmeding> https://hackage.haskell.org/package/transformers-0.6.0.4/docs/Control-Monad-Trans-Reader.html#v:lo…
2022-06-06 22:52:52 +0200 <tomsmeding> lol
2022-06-06 22:53:21 +0200 <Bulby[m]> got it, that makes a lot of sense
2022-06-06 22:53:39 +0200 <Bulby[m]> \o/ thank you
2022-06-06 22:53:48 +0200 <tomsmeding> Bulby[m]: key thing why it can be Reader instead of State is that the computation in a scope does not influence the variable _bindings_ in parent scopes
2022-06-06 22:54:01 +0200 <tomsmeding> (it does modify their _values_, but those are in the heap!)
2022-06-06 22:54:09 +0200 <Bulby[m]> OH
2022-06-06 22:55:25 +0200 <geekosaur[m]> You can think of this as the IORef thing with only one IORef
2022-06-06 22:55:40 +0200 <Bulby[m]> stop bringing up IORef
2022-06-06 22:56:52 +0200chomwitt(~chomwitt@2a02:587:dc1f:5600:f6a9:3725:b3e3:513d) (Ping timeout: 260 seconds)
2022-06-06 22:58:04 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
2022-06-06 22:59:03 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-06-06 22:59:08 +0200 <Bulby[m]> the first malbodge program was written by an AI using beam search 🤣
2022-06-06 22:59:30 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:a007:efa3:2690:a05d)
2022-06-06 22:59:34 +0200lyle(~lyle@104.246.145.85) (Quit: WeeChat 3.5)
2022-06-06 23:00:12 +0200 <raehik> Am I allowed to put CPP #IF s inside a module export list?
2022-06-06 23:00:43 +0200 <raehik> I'm getting a weird CPP error, and I think it might be due to that
2022-06-06 23:00:53 +0200 <geekosaur> it's #if, and yes
2022-06-06 23:01:03 +0200 <geekosaur> (case matters))
2022-06-06 23:01:11 +0200 <raehik> case matters for CPP??
2022-06-06 23:01:20 +0200 <geekosaur> yes
2022-06-06 23:01:25 +0200 <geekosaur> just like it does for C
2022-06-06 23:01:33 +0200 <geekosaur> since it's the C preprocessor
2022-06-06 23:01:36 +0200 <raehik> wow I never knew that. for either lol
2022-06-06 23:01:49 +0200 <raehik> probably I've written more CPP in Haskell that C
2022-06-06 23:01:53 +0200 <raehik> thanks!
2022-06-06 23:02:24 +0200 <raehik> in such a case is my best bet to fill in the problematic definition with (error "not on this GHC") or something
2022-06-06 23:02:49 +0200Unhammer(~Unhammer@user/unhammer) (Ping timeout: 248 seconds)
2022-06-06 23:02:52 +0200 <geekosaur> won't work in an export list
2022-06-06 23:03:03 +0200 <geekosaur> it's just a list of symbols
2022-06-06 23:03:11 +0200 <geekosaur> if you need to fail, use #error maybe
2022-06-06 23:03:16 +0200 <raehik> right, so I'm thinking to export it anyway, but the implementation will simply error on old GHCs
2022-06-06 23:03:23 +0200 <geekosaur> ah
2022-06-06 23:03:40 +0200 <raehik> originally I wanted to only define it for new GHCs (some def that uses GHC primops)
2022-06-06 23:04:03 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Quit: Leaving)
2022-06-06 23:05:39 +0200 <geekosaur> that's probably the best route; changing the export list depending on ghc version seems a bad plan especially since it would violate both POLA and PVP
2022-06-06 23:05:55 +0200 <tomsmeding> Bulby[m]: https://play-haskell.tomsmeding.com/play
2022-06-06 23:05:57 +0200 <tomsmeding> oh fail
2022-06-06 23:06:04 +0200 <tomsmeding> https://play-haskell.tomsmeding.com/play/paste/RRzxMqZH/1
2022-06-06 23:06:38 +0200 <tomsmeding> for stepping in the same trap that geekosaur already submitted a feature request for:
2022-06-06 23:06:40 +0200 <tomsmeding> geekosaur++
2022-06-06 23:06:43 +0200 <EvanR> IORef is basically the in-haskell version of this whole scheme
2022-06-06 23:06:45 +0200littlebobeep(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-06-06 23:06:46 +0200 <raehik> mm, gotcha. ty
2022-06-06 23:07:09 +0200 <EvanR> it's a thing that points to a mutable heap object
2022-06-06 23:07:12 +0200 <tomsmeding> yeah Bulby[m] this version is excruciatingly explicit about the threading through of stack and heap, you could hide this in a state monad
2022-06-06 23:07:35 +0200 <tomsmeding> and yes EvanR is right, your IORef is the name in the stack, and the mutable variable that underlies the IORef is in the heap
2022-06-06 23:07:42 +0200 <tomsmeding> using "stack" and "heap" as in my code
2022-06-06 23:08:44 +0200 <EvanR> the pointer doesn't change, so it's pure data
2022-06-06 23:09:33 +0200 <tomsmeding> oh actually my code is wrong oops
2022-06-06 23:09:40 +0200 <tomsmeding> the Set interpreter allocates a new heap cell
2022-06-06 23:09:42 +0200 <EvanR> ignoring such games as garbage collection
2022-06-06 23:11:00 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-06 23:11:17 +0200 <tomsmeding> eh too tired to fix, but the Set interpreter should check if `n` is already in `fst env`, and if so only update the value in `snd env`
2022-06-06 23:14:02 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-06 23:15:11 +0200Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-06-06 23:16:19 +0200Unhammer(~Unhammer@user/unhammer)
2022-06-06 23:17:29 +0200 <Bulby[m]> how are closures represented? i would like to avoid directly using haskell functions as function values
2022-06-06 23:19:12 +0200 <tomsmeding> represented in my code, or represented in haskell?
2022-06-06 23:19:24 +0200 <Bulby[m]> in haskell
2022-06-06 23:19:44 +0200 <tomsmeding> ah, difficult question :p
2022-06-06 23:19:44 +0200 <Bulby[m]> in my interp - do I store it on the fun value?
2022-06-06 23:20:09 +0200 <Bulby[m]> loxomotive used a seperate map mapping values to envs
2022-06-06 23:20:29 +0200 <tomsmeding> but note that putting a Haskell function in a VFun is completely unnecessary
2022-06-06 23:21:10 +0200 <tomsmeding> if you look at line 106 of my code, you see that what gets put there is a Haskell function that uses `fst env`, `n` and `ex`
2022-06-06 23:21:35 +0200 <tomsmeding> so if you just store that Stack, Name and Expr in a VFun, you can move this code to Apply
2022-06-06 23:21:40 +0200 <tomsmeding> and done
2022-06-06 23:22:51 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-06 23:24:34 +0200 <Bulby[m]> wait, yours is curried
2022-06-06 23:24:42 +0200 <tomsmeding> hm?
2022-06-06 23:25:07 +0200 <tomsmeding> you mean that the binary primitive operations are represented as curried VFun's?
2022-06-06 23:25:10 +0200 <tomsmeding> that's completely irrelevant
2022-06-06 23:25:24 +0200 <Bulby[m]> w/e
2022-06-06 23:25:30 +0200 <tomsmeding> irrelevant to the mutable variable stuff, at least
2022-06-06 23:25:32 +0200 <EvanR> function value contains its environment
2022-06-06 23:30:26 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-06-06 23:32:08 +0200 <Bulby[m]> for ids I could use polysemys input with `runInputList [0..}`
2022-06-06 23:32:09 +0200 <Bulby[m]> /}/]/
2022-06-06 23:36:45 +0200gio123(~gio123@146.255.226.194) (Quit: Client closed)
2022-06-06 23:38:57 +0200yosef```(~user@2409:8a55:e215:42f0:58b9:4cff:fea0:d9)
2022-06-06 23:39:38 +0200yosef``(~user@user/yosef/x-3154124) (Ping timeout: 250 seconds)
2022-06-06 23:42:32 +0200tomboy64(~tomboy64@user/tomboy64) (Ping timeout: 244 seconds)
2022-06-06 23:46:13 +0200causal(~user@50.35.83.177)
2022-06-06 23:47:46 +0200 <Bulby[m]> I would like to rewrite makeExprParser from parser combinators to allow inspecting arguments
2022-06-06 23:48:14 +0200 <Bulby[m]> and reacting in a monadic way
2022-06-06 23:48:45 +0200nate3(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-06 23:49:45 +0200 <Bulby[m]> now that I think about it I could return either and fail if it's left
2022-06-06 23:51:53 +0200tomboy64(~tomboy64@user/tomboy64)
2022-06-06 23:56:29 +0200acidjnk_new(~acidjnk@p200300d0c7068b9820fd9b31811a870a.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
2022-06-06 23:57:20 +0200dcoutts__(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 255 seconds)
2022-06-06 23:58:09 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 276 seconds)
2022-06-06 23:58:21 +0200 <EvanR> the idea that the parser is responsible for certifying a large amount of relevant facts is a game changer. Long ago the obvious place to do this was at the very last minute when you insert into a rails database xD
2022-06-06 23:58:43 +0200 <EvanR> when there's no good way to deal with it
2022-06-06 23:59:09 +0200dcoutts_(~duncan@host86-144-78-203.range86-144.btcentralplus.com)