Home liberachat/#haskell: Logs Calendar

Logs on 2022-06-06 (liberachat/#haskell)

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

All times are in UTC on 2022-06-06.