2023/01/08

2023-01-08 00:07:00 +0100Guest6780(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds)
2023-01-08 00:09:49 +0100hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Ping timeout: 252 seconds)
2023-01-08 00:12:27 +0100hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net)
2023-01-08 00:20:55 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-08 00:23:23 +0100acidjnk(~acidjnk@p200300d6e715c403c13dad5c816a3096.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-01-08 00:23:48 +0100 <energizer> looks like * needs Num. why can't it work on any old monoid?
2023-01-08 00:24:54 +0100 <monochrom> Because any old monoid uses mappend, and any new monoid uses <>
2023-01-08 00:25:04 +0100 <geekosaur> you're looking for `stimes`, I think
2023-01-08 00:25:49 +0100 <geekosaur> and defining an operator to mean completely different things in different contexts is unprincipled
2023-01-08 00:26:13 +0100slack1256(~slack1256@191.126.99.79)
2023-01-08 00:26:30 +0100 <energizer> why doesn't <> do string concatenation?
2023-01-08 00:26:43 +0100 <monochrom> But it does.
2023-01-08 00:26:46 +0100 <geekosaur> > "hello" <> "World"
2023-01-08 00:26:48 +0100 <lambdabot> "helloWorld"
2023-01-08 00:27:09 +0100 <energizer> ghci> "ab <> "cd"
2023-01-08 00:27:09 +0100 <energizer> <interactive>:9:12: error:
2023-01-08 00:27:09 +0100 <energizer> lexical error in string/character literal at end of input
2023-01-08 00:27:24 +0100 <energizer> oh jeez
2023-01-08 00:27:28 +0100 <energizer> ok
2023-01-08 00:27:43 +0100 <monochrom> I mean, it's not even a type error.
2023-01-08 00:28:05 +0100 <energizer> is there a left-division and right-division operator?
2023-01-08 00:28:53 +0100 <monochrom> hmatrix has them for matrices.
2023-01-08 00:28:54 +0100justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 255 seconds)
2023-01-08 00:29:11 +0100 <energizer> > 4 <> 5
2023-01-08 00:29:13 +0100 <lambdabot> error:
2023-01-08 00:29:13 +0100 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M880724369330...
2023-01-08 00:29:13 +0100 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2023-01-08 00:29:26 +0100 <energizer> why doesn't that do multiplication?
2023-01-08 00:29:37 +0100 <mauke> > let (*) = (<>) in 4 * 5 :: Sum
2023-01-08 00:29:38 +0100 <lambdabot> error:
2023-01-08 00:29:38 +0100 <lambdabot> • Expecting one more argument to ‘Sum’
2023-01-08 00:29:38 +0100 <lambdabot> Expected a type, but ‘Sum’ has kind ‘* -> *’
2023-01-08 00:29:45 +0100 <mauke> * :: Sum Int
2023-01-08 00:29:49 +0100 <geekosaur> because there are two possible monoids for numbers
2023-01-08 00:29:49 +0100 <mauke> heh
2023-01-08 00:29:55 +0100 <mauke> > let (*) = (<>) in 4 * 5 :: Sum Int
2023-01-08 00:29:57 +0100 <lambdabot> Sum {getSum = 9}
2023-01-08 00:30:01 +0100 <mauke> there we go
2023-01-08 00:30:03 +0100 <geekosaur> you have to pick one by using the Sum or Product newtype
2023-01-08 00:30:29 +0100 <monochrom> No, my question is why doesn't it do bitwise xor.
2023-01-08 00:30:35 +0100 <energizer> geekosaur: surely multiplication is the better one
2023-01-08 00:30:36 +0100 <geekosaur> (well, a lot more than two, but two reasonable choices tfor "the" monoid)
2023-01-08 00:30:42 +0100 <geekosaur> not so surely
2023-01-08 00:31:04 +0100 <monochrom> At this point you are unable to distinguish between what you want and what other people want.
2023-01-08 00:31:39 +0100 <mauke> why is multiplication better? it doesn't even have an inverse
2023-01-08 00:31:54 +0100 <energizer> is it fair to say haskell's choice of what is "the monoid" for a type is "a judgment call"
2023-01-08 00:32:08 +0100 <monochrom> Oh heh mauke you have a better point. :)
2023-01-08 00:32:44 +0100 <energizer> mauke: multiplication doesn't have an inverse?
2023-01-08 00:32:46 +0100 <monochrom> Has anything in programming not been a judgment call?
2023-01-08 00:33:02 +0100 <darkling> monochrom: It's a matter of opinion. ;)
2023-01-08 00:33:02 +0100 <energizer> yes lots of things have a single correct answer
2023-01-08 00:33:03 +0100 <monochrom> Has programming ever been not a social construct?
2023-01-08 00:33:15 +0100Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-01-08 00:33:44 +0100 <monochrom> Why didn't Turing invent the lambda calculus and why didn't Church invent the state-and-tape machine?
2023-01-08 00:33:55 +0100 <mauke> energizer: what is the multiplicative inverse of 1 :: Integer?
2023-01-08 00:34:04 +0100 <monochrom> And BTW yes invent not discover.
2023-01-08 00:35:37 +0100 <energizer> what is the inverse operator of <> ?
2023-01-08 00:36:50 +0100max_(~max@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 00:37:03 +0100Inst_(~Inst@2601:6c4:4081:54f0:d621:5cdd:9051:c240)
2023-01-08 00:37:25 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
2023-01-08 00:37:45 +0100max_(~max@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 00:39:01 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2023-01-08 00:39:12 +0100tremon(~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
2023-01-08 00:39:37 +0100myxokephale(~max@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 00:40:36 +0100 <energizer> if i can divide by a matrix, seems like i should be able to divide by a string to chop it off
2023-01-08 00:41:01 +0100Inst(~Inst@2601:6c4:4081:54f0:d0af:c75:9422:ed4) (Ping timeout: 252 seconds)
2023-01-08 00:41:44 +0100 <jackdk> https://hackage.haskell.org/package/monoid-subclasses-1.2.1/docs/Data-Semigroup-Cancellative.html#…
2023-01-08 00:44:16 +0100Guest9971(~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds)
2023-01-08 00:45:26 +0100 <dolio> Because Church was trying to invent a meta-theory for variable binding of logic.
2023-01-08 00:46:29 +0100 <mauke> ... and Turing was trying to invent a formal device for turning coffee into theorems?
2023-01-08 00:50:50 +0100 <energizer> jackdk: that's cool, thanks
2023-01-08 00:51:37 +0100 <dolio> Also, every time you add an instance for some random type that is probably unexpected (like saying that Strings being numbers), you have to weigh it against all the errors you're no longer going to get when you accidentally use the operations on the wrong type.
2023-01-08 00:52:27 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 00:52:45 +0100 <energizer> strings being numbers isn't the idea; rather strings and numbers being monoids
2023-01-08 00:53:10 +0100 <dolio> They already are both monoids.
2023-01-08 00:53:28 +0100 <energizer> > 4 <> 5
2023-01-08 00:53:30 +0100 <lambdabot> error:
2023-01-08 00:53:30 +0100 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M438551538721...
2023-01-08 00:53:31 +0100 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2023-01-08 00:53:40 +0100 <mauke> strings and numbers aren't monoids
2023-01-08 00:53:48 +0100 <dolio> Oh yeah.
2023-01-08 00:53:50 +0100 <mauke> (strings, (++), "") is a monoid
2023-01-08 00:53:58 +0100 <mauke> and so is (integers, (+), 0)
2023-01-08 00:54:14 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc20:d690:f22b:cb00) (Remote host closed the connection)
2023-01-08 00:55:11 +0100 <mauke> heh, or (Int, min, maxBound)
2023-01-08 00:55:18 +0100 <dolio> Anyhow, you specifically brought up 'dividing' strings to chop them off.
2023-01-08 00:55:24 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-01-08 00:55:26 +0100 <dolio> Which is also a number operation.
2023-01-08 00:57:34 +0100 <monochrom> I just doubt that anyone who asks "why isn't <my POV> adopted in the standard" can accept "unexpected".
2023-01-08 00:58:52 +0100 <energizer> idk what "unexpected" means there
2023-01-08 00:59:49 +0100 <DigitalKiwi> are you only using prime numbers
2023-01-08 01:01:21 +0100myxokephale(~max@cpe-65-28-251-121.cinci.res.rr.com) (Quit: leaving)
2023-01-08 01:04:09 +0100 <geekosaur> energizer, you asked earlier what the inverse of <> was. inverses are not relevant to all monoids, only those which comprise rings. and iirc it's proven that the * operator in a ring can only have an inverse if the ring is trivial (the set it applies to has only one element)?
2023-01-08 01:04:24 +0100 <geekosaur> (I may well be misremembering, I'm still a bit weak on this stuff)
2023-01-08 01:04:29 +0100myxokephale(~max@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 01:05:04 +0100 <geekosaur> anyway there are arguments for either monoid comprising a ring to be primary, and you can't really pick one without losing something
2023-01-08 01:05:21 +0100 <energizer> i think the answer I was looking for was the </> operator that jackdk linked
2023-01-08 01:05:50 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 260 seconds)
2023-01-08 01:06:48 +0100 <monochrom> OK do you mean your original question was where to find stripPrefix in Data.List and you XY-problem it to the 10th power and decided to ask instead why <> doesn't do multiplication for Integer.
2023-01-08 01:08:52 +0100 <energizer> i dont think this needs to be so aggressive does it
2023-01-08 01:13:25 +0100thongpv87(~thongpv87@2402:9d80:34d:fde9:8a11:e98e:b8b0:cf04) (Ping timeout: 260 seconds)
2023-01-08 01:16:28 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com)
2023-01-08 01:16:30 +0100 <ncf> in the denotational semantics of haskell, is ⊥ supposed to be equal to const ⊥? it certainly seems like it shouldn't, since const ⊥ `seq` x is not ⊥, but if i understand correctly we should have ⊥ = const ⊥ in a dcpo
2023-01-08 01:16:41 +0100 <ncf> so what actually models haskell, if not dcpos?
2023-01-08 01:17:31 +0100 <geekosaur> iirc seq complicates every such model…
2023-01-08 01:18:23 +0100 <ncf> is there a reference that goes into this stuff?
2023-01-08 01:19:44 +0100 <geekosaur> someone who understands better should probably answer that. (I'm not aware of any but that proves little.)
2023-01-08 01:20:01 +0100 <dolio> I think game semantics distinguishes those, while being kind of similar.
2023-01-08 01:21:03 +0100 <dolio> Actually, I'm not 100% sure about game semantics of partial functions. But it seems like the kind of thing it could distinguish.
2023-01-08 01:21:30 +0100 <ncf> hmm
2023-01-08 01:21:44 +0100 <ncf> it feels like there should be a slight modification to dcpos that makes this work
2023-01-08 01:22:00 +0100 <ncf> i.e. add a distinguished ⊥ to function spaces and adapt the closed structure
2023-01-08 01:22:09 +0100 <dolio> Yeah, you might be able to define a lifted function space DCPO.
2023-01-08 01:22:53 +0100 <dolio> Actually, it probably is just that.
2023-01-08 01:27:12 +0100 <ncf> cool
2023-01-08 01:35:37 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc20:d690:f22b:cb00)
2023-01-08 01:36:04 +0100 <dolio> The same thing happens with products in Haskell. They have more lifting than the cartesian product of DCPOs.
2023-01-08 01:38:06 +0100coderpath(~coderpath@d66-183-126-83.bchsia.telus.net) (Quit: ZNC 1.8.2 - https://znc.in)
2023-01-08 01:41:43 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.)
2023-01-08 01:43:08 +0100xff0x(~xff0x@2405:6580:b080:900:c792:9a92:2632:4781) (Ping timeout: 255 seconds)
2023-01-08 01:43:22 +0100 <ncf> indeed. i think all data types are lifted
2023-01-08 01:43:32 +0100xff0x(~xff0x@178.255.149.135)
2023-01-08 01:43:42 +0100 <ncf> (but not newtypes)
2023-01-08 01:44:12 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-01-08 01:44:12 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-01-08 01:44:12 +0100wroathe(~wroathe@user/wroathe)
2023-01-08 01:46:37 +0100 <dolio> Yeah.
2023-01-08 01:46:55 +0100slac38021(~slack1256@186.11.40.220)
2023-01-08 01:49:27 +0100slack1256(~slack1256@191.126.99.79) (Ping timeout: 260 seconds)
2023-01-08 01:49:52 +0100 <monochrom> In a haskell-cafe post today from Eisenberg: "There is much eagerness to use unboxed types." I can't help but perceive the pun there. :)
2023-01-08 01:50:17 +0100 <monochrom> Context: He's describing his job at Jane Street of adding unboxed types to OCaml.
2023-01-08 01:50:28 +0100 <mniip> unboxed closures when
2023-01-08 01:51:25 +0100 <monochrom> (And this being an opportunity of doing levity polymorphism for both Haskell and OCaml.)
2023-01-08 01:52:30 +0100 <mniip> I've given the "KnownRep" typeclass some thought before, but it's not clear to me if it's possible to represent the "calling convention instructions" as haskell code
2023-01-08 01:53:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
2023-01-08 01:54:33 +0100 <mniip> for example part of the behavior that is determined by the representation is how to do an stg-level let binding
2023-01-08 01:54:50 +0100 <mniip> and whether something is let-bound or not, is not reflected in the types at the core/haskell level
2023-01-08 01:57:48 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 02:00:19 +0100xff0x(~xff0x@178.255.149.135) (Ping timeout: 260 seconds)
2023-01-08 02:01:45 +0100xff0x(~xff0x@2405:6580:b080:900:c792:9a92:2632:4781)
2023-01-08 02:01:56 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 02:07:18 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-08 02:10:25 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-01-08 02:16:32 +0100albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-01-08 02:23:45 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-08 02:24:07 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-01-08 02:24:07 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-01-08 02:24:07 +0100wroathe(~wroathe@user/wroathe)
2023-01-08 02:30:34 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 02:35:16 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-01-08 02:39:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 02:42:32 +0100talismanick(~talismani@5.187.27.20)
2023-01-08 02:42:45 +0100v0id_ptr(~adrift@user/ptr-frac7al/x-0038398)
2023-01-08 02:47:14 +0100talismanick(~talismani@5.187.27.20) (Ping timeout: 272 seconds)
2023-01-08 02:47:36 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-08 02:50:34 +0100 <slac38021> mniip: I don't know much about the subject, but why would be unboxed closures great?
2023-01-08 02:52:14 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-08 02:53:16 +0100 <mniip> much like with any other unboxed thing, they live off the heap and you could have more precise control over heap allocation
2023-01-08 02:53:26 +0100slac38021slack1256
2023-01-08 03:03:17 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:04:15 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds)
2023-01-08 03:04:34 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 03:05:39 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:05:53 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:05:56 +0100talismanick(~talismani@5.187.27.20)
2023-01-08 03:06:40 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:06:54 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:08:11 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-01-08 03:08:20 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds)
2023-01-08 03:09:05 +0100myxokephale(~max@cpe-65-28-251-121.cinci.res.rr.com) (Quit: leaving)
2023-01-08 03:09:10 +0100myxokephale_(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:09:24 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-08 03:09:24 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:10:13 +0100talismanick(~talismani@5.187.27.20) (Ping timeout: 252 seconds)
2023-01-08 03:10:29 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:10:44 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:11:21 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:11:34 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:11:56 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:12:10 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:12:16 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com) (Client Quit)
2023-01-08 03:13:05 +0100myxokephale(~myxokepha@cpe-65-28-251-121.cinci.res.rr.com)
2023-01-08 03:14:38 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-08 03:24:15 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2023-01-08 03:25:40 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 03:28:29 +0100thongpv(~thongpv87@2402:9d80:34d:fde9:8a11:e98e:b8b0:cf04)
2023-01-08 03:34:19 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 248 seconds)
2023-01-08 03:34:33 +0100thongpv87(~thongpv87@14.160.124.248)
2023-01-08 03:37:12 +0100accord(uid568320@id-568320.hampstead.irccloud.com)
2023-01-08 03:37:30 +0100thongpv(~thongpv87@2402:9d80:34d:fde9:8a11:e98e:b8b0:cf04) (Ping timeout: 260 seconds)
2023-01-08 03:41:13 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:cc20:d690:f22b:cb00) (Remote host closed the connection)
2023-01-08 03:42:02 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-01-08 03:44:26 +0100ddellacosta(~ddellacos@89.45.224.152)
2023-01-08 03:45:30 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 03:47:34 +0100Umeaboy(~Umeaboy@94-255-145-133.cust.bredband2.com) (Quit: Leaving)
2023-01-08 04:00:32 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-08 04:02:27 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-08 04:04:21 +0100 <DigitalKiwi> mniip: *wave*
2023-01-08 04:06:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 04:08:56 +0100td_(~td@83.135.9.51) (Ping timeout: 255 seconds)
2023-01-08 04:10:42 +0100td_(~td@83.135.9.53)
2023-01-08 04:14:53 +0100caef^(~caef@76.145.190.81) (Remote host closed the connection)
2023-01-08 04:31:05 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-01-08 04:31:30 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 265 seconds)
2023-01-08 04:42:18 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 04:47:41 +0100slac39102(~slack1256@191.126.227.209)
2023-01-08 04:48:14 +0100sus(~sus@user/zeromomentum)
2023-01-08 04:49:06 +0100 <sus> hello all, does anyone have experience with stack? when running stack build, i get this error https://paste.tomsmeding.com/4zIwXgI1
2023-01-08 04:49:18 +0100 <sus> this is like my 2nd time using haskell so i have no clue what's going on
2023-01-08 04:50:19 +0100slack1256(~slack1256@186.11.40.220) (Ping timeout: 268 seconds)
2023-01-08 04:52:27 +0100jinsunGuest1763
2023-01-08 04:52:27 +0100jinsun__(~jinsun@user/jinsun)
2023-01-08 04:52:27 +0100Guest1763(~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services)))
2023-01-08 04:52:27 +0100jinsun__jinsun
2023-01-08 04:52:59 +0100thongpv87(~thongpv87@14.160.124.248) (Ping timeout: 260 seconds)
2023-01-08 04:57:26 +0100sus(~sus@user/zeromomentum) (Quit: Client closed)
2023-01-08 04:58:56 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2023-01-08 04:58:56 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2023-01-08 04:58:56 +0100finn_elijaFinnElija
2023-01-08 05:04:37 +0100sus(1b7af6299f@user/zeromomentum)
2023-01-08 05:08:06 +0100sayola(~sayola@ipservice-092-213-087-211.092.213.pools.vodafone-ip.de)
2023-01-08 05:08:07 +0100 <davean> So I know nothing about stack, don't use it, but that seems like a clear error message?
2023-01-08 05:08:15 +0100CiaoSen(~Jura@p200300c9572e35002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-01-08 05:08:16 +0100 <davean> Do you have LLVM installed in that version range sus?
2023-01-08 05:10:40 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-01-08 05:16:49 +0100haritz(~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk)
2023-01-08 05:16:49 +0100haritz(~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) (Changing host)
2023-01-08 05:16:49 +0100haritz(~hrtz@user/haritz)
2023-01-08 05:16:51 +0100slac39102(~slack1256@191.126.227.209) (Read error: Connection reset by peer)
2023-01-08 05:17:11 +0100haritz(~hrtz@user/haritz) (Remote host closed the connection)
2023-01-08 05:22:42 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 05:23:21 +0100nehsou^(~nehsou@76.145.190.81)
2023-01-08 05:29:18 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 05:29:52 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit)
2023-01-08 05:31:26 +0100thongpv87(~thongpv87@2402:9d80:34d:fde9:bc1f:46cc:53a7:ee8b)
2023-01-08 05:42:18 +0100haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220)
2023-01-08 05:42:18 +0100haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host)
2023-01-08 05:42:18 +0100haritz(~hrtz@user/haritz)
2023-01-08 05:43:41 +0100haritz(~hrtz@user/haritz) (Remote host closed the connection)
2023-01-08 05:44:19 +0100haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220)
2023-01-08 05:44:19 +0100haritz(~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host)
2023-01-08 05:44:19 +0100haritz(~hrtz@user/haritz)
2023-01-08 05:45:12 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
2023-01-08 05:53:45 +0100EvanR(~EvanR@user/evanr) (Remote host closed the connection)
2023-01-08 05:54:04 +0100EvanR(~EvanR@user/evanr)
2023-01-08 05:55:39 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 248 seconds)
2023-01-08 05:55:55 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-08 05:56:36 +0100scoopahdoopah(~quassel@050-089-109-059.res.spectrum.com) (Remote host closed the connection)
2023-01-08 06:06:14 +0100[Leary](~Leary]@user/Leary/x-0910699) (Remote host closed the connection)
2023-01-08 06:06:34 +0100[Leary](~Leary]@user/Leary/x-0910699)
2023-01-08 06:09:23 +0100slack1256(~slack1256@186.11.40.220)
2023-01-08 06:18:57 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-01-08 06:28:32 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 252 seconds)
2023-01-08 06:30:13 +0100johnjaye(~pi@173.209.64.74) (Ping timeout: 268 seconds)
2023-01-08 06:30:13 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 06:31:11 +0100haritz(~hrtz@user/haritz) (Quit: ZNC 1.8.2+deb2 - https://znc.in)
2023-01-08 06:31:52 +0100johnjaye(~pi@173.209.64.74)
2023-01-08 06:34:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 06:36:54 +0100accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-01-08 06:40:25 +0100fizbin(~fizbin@user/fizbin)
2023-01-08 06:43:27 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 06:44:03 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 06:46:38 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 272 seconds)
2023-01-08 06:48:16 +0100monochrom(trebla@216.138.220.146) (Quit: NO CARRIER)
2023-01-08 06:53:13 +0100 <jackdk> My experience is that stack seems to cause a lot of frustration and no longer provides much of an advantage over cabal. But if that's what your tutorial is using then feel free to stay with it, I guess.
2023-01-08 06:53:26 +0100 <jackdk> sus: What OS are you on, and how did you install stack?
2023-01-08 06:54:11 +0100 <jackdk> The recommended method for the "big three" OSes these days is https://www.haskell.org/ghcup/ , FWIW, and I would be very surprised if it didn't at least prompt you to install LLVM
2023-01-08 06:58:06 +0100monochrom(trebla@216.138.220.146)
2023-01-08 07:00:51 +0100irrgit__(~irrgit@146.70.27.250) (Read error: Connection reset by peer)
2023-01-08 07:04:32 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
2023-01-08 07:08:04 +0100 <maerwald[m]> sus: darwin M1?
2023-01-08 07:09:21 +0100jinsun__(~jinsun@user/jinsun)
2023-01-08 07:09:21 +0100jinsun(~jinsun@user/jinsun) (Killed (zinc.libera.chat (Nickname regained by services)))
2023-01-08 07:09:21 +0100jinsun__jinsun
2023-01-08 07:22:36 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex)
2023-01-08 07:28:48 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds)
2023-01-08 07:29:27 +0100werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-01-08 07:44:49 +0100thongpv(~thongpv87@2001:ee0:54ae:93a0:55a8:a4c7:8b73:21a9)
2023-01-08 07:46:28 +0100thongpv87(~thongpv87@2402:9d80:34d:fde9:bc1f:46cc:53a7:ee8b) (Ping timeout: 260 seconds)
2023-01-08 07:51:14 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-08 07:55:57 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 07:56:06 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 08:06:04 +0100 <sm> is the fix to install a newer llvm with brew ? or, don't try to use ghc versions before 9.x on arm mac ? I don't remember
2023-01-08 08:06:11 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 08:09:58 +0100 <maerwald> sm: you install the llvm version it demands
2023-01-08 08:23:12 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 08:27:42 +0100 <freeside> i vaguely remember having a similar problem ... for a while nix had the better option, then the native xcode "command line tools" pulled ahead, and i had to get rid of the nix version of llvm/clang
2023-01-08 08:29:42 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2023-01-08 08:47:02 +0100johnw(~johnw@2600:1700:cf00:db0:d050:b87f:5cc2:4cc8) (Ping timeout: 255 seconds)
2023-01-08 08:47:15 +0100jwiegley(~jwiegley@2600:1700:cf00:db0:d050:b87f:5cc2:4cc8) (Ping timeout: 260 seconds)
2023-01-08 08:50:00 +0100johnw(~johnw@2600:1700:cf00:db0:1:83a7:8879:1baf)
2023-01-08 09:02:48 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 09:04:42 +0100Batzy(~quassel@user/batzy) (Ping timeout: 272 seconds)
2023-01-08 09:10:02 +0100gmg(~user@user/gehmehgeh)
2023-01-08 09:10:05 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-08 09:14:19 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 09:19:16 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 09:26:25 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 252 seconds)
2023-01-08 09:26:46 +0100eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-01-08 09:35:11 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 09:39:45 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2023-01-08 09:44:04 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Ping timeout: 260 seconds)
2023-01-08 09:46:59 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-01-08 09:47:39 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 09:51:39 +0100gmg(~user@user/gehmehgeh)
2023-01-08 09:51:45 +0100jinsun(~jinsun@user/jinsun) (Ping timeout: 252 seconds)
2023-01-08 09:52:14 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 09:56:26 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 255 seconds)
2023-01-08 09:58:16 +0100trev_(~trev@109.252.35.99)
2023-01-08 09:59:51 +0100gmg(~user@user/gehmehgeh)
2023-01-08 10:00:02 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 10:00:07 +0100mrkun[m](~mrkunmatr@2001:470:69fc:105::2:2a39) (Quit: You have been kicked for being idle)
2023-01-08 10:00:38 +0100jargon(~jargon@174-22-197-118.phnx.qwest.net)
2023-01-08 10:04:25 +0100Alex_test(~al_test@178.34.160.164) (Quit: ;-)
2023-01-08 10:04:47 +0100AlexZenon(~alzenon@178.34.160.164) (Quit: ;-)
2023-01-08 10:05:37 +0100AlexNoo(~AlexNoo@178.34.160.164) (Quit: Leaving)
2023-01-08 10:12:32 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-08 10:13:02 +0100AlexNoo(~AlexNoo@178.34.160.164)
2023-01-08 10:13:49 +0100califax(~califax@user/califx)
2023-01-08 10:16:29 +0100acidjnk(~acidjnk@p200300d6e715c403d4287cbb3fd10346.dip0.t-ipconnect.de)
2023-01-08 10:16:36 +0100bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-01-08 10:19:50 +0100mc47(~mc47@xmonad/TheMC47)
2023-01-08 10:19:50 +0100Feuermagier(~Feuermagi@user/feuermagier)
2023-01-08 10:20:34 +0100AlexZenon(~alzenon@178.34.160.164)
2023-01-08 10:20:55 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 10:22:22 +0100Alex_test(~al_test@178.34.160.164)
2023-01-08 10:23:29 +0100Unicorn_Princess(~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection)
2023-01-08 10:23:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 10:25:35 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 10:26:08 +0100califax(~califax@user/califx) (Ping timeout: 255 seconds)
2023-01-08 10:27:15 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-08 10:27:20 +0100califax(~califax@user/califx)
2023-01-08 10:30:06 +0100mcglk(~mcglk@131.191.49.120)
2023-01-08 10:30:08 +0100mei(~mei@user/mei)
2023-01-08 10:32:38 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 246 seconds)
2023-01-08 10:33:24 +0100cheater_(~Username@user/cheater)
2023-01-08 10:34:08 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-01-08 10:35:04 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2023-01-08 10:36:16 +0100cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2023-01-08 10:36:20 +0100cheater_cheater
2023-01-08 10:50:32 +0100arjun(~arjun@user/arjun)
2023-01-08 10:51:19 +0100Tuplanolla(~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
2023-01-08 10:53:20 +0100acidjnk_new(~acidjnk@p200300d6e715c40369f7e4f04255c339.dip0.t-ipconnect.de)
2023-01-08 10:57:19 +0100acidjnk(~acidjnk@p200300d6e715c403d4287cbb3fd10346.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2023-01-08 11:05:46 +0100 <mechap> jackdk: while stack is really frustrating, I think it is better regarding package management than cabal which does not even provide an option to uninstall package
2023-01-08 11:06:26 +0100 <jackdk> When using cabal, I just delete the store every now and than. But most of the time I use Nix, so GCs take care of that.
2023-01-08 11:09:09 +0100 <maerwald> mechap: what?
2023-01-08 11:09:16 +0100 <maerwald> stack can uninstall packages?
2023-01-08 11:09:18 +0100 <maerwald> show me
2023-01-08 11:12:14 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 11:13:20 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 11:17:47 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 11:18:15 +0100 <mechap> nevermind, I thought it was different with stack. Anyway, stack has never worked correctly in my desktop.
2023-01-08 11:18:34 +0100arjun(~arjun@user/arjun) (Ping timeout: 260 seconds)
2023-01-08 11:22:29 +0100 <maerwald> stack puts all your packages into an sqlite database to do some insane "caching" though
2023-01-08 11:24:15 +0100 <mechap> so neither stack nor cabal has a clean solution for uninstalling ?
2023-01-08 11:27:56 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 11:30:06 +0100freeside_(~mengwong@103.252.202.159)
2023-01-08 11:31:31 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2023-01-08 11:31:36 +0100 <maerwald> correct
2023-01-08 11:31:39 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.)
2023-01-08 11:32:00 +0100 <maerwald> people are stuck in their current ways and workarounds that it's hard to consider what workflows actually make sense
2023-01-08 11:32:16 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 272 seconds)
2023-01-08 11:32:39 +0100 <maerwald> that's what gave rise to stack
2023-01-08 11:32:54 +0100 <maerwald> so maybe cabal needs competition again
2023-01-08 11:33:00 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2023-01-08 11:33:08 +0100 <maerwald> I'd do it if I had more time
2023-01-08 11:33:33 +0100 <maerwald> there were a few other attempts that died out
2023-01-08 11:34:11 +0100 <maerwald> and if you "just" improve usability, that's not enough for anyone to get excited to do some funding
2023-01-08 11:34:17 +0100econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2023-01-08 11:35:04 +0100 <[exa]> maerwald: btw any specific ideas on what to do differently? (we're applying for very specific funding for this kind of stuff, might add it to the list)
2023-01-08 11:35:04 +0100 <maerwald> given that cabal is becoming somewhat more modular, it may be more feasible though
2023-01-08 11:35:40 +0100 <maerwald> [exa]: the first thing is to have a reasonable cli interface that's intuitive and where --help is not ludicrous
2023-01-08 11:35:56 +0100 <maerwald> but the problem afair is that some of those flags come from Cabal (the library)
2023-01-08 11:36:10 +0100 <maerwald> which can't add fancy dependencies
2023-01-08 11:36:14 +0100 <maerwald> so it's a mush
2023-01-08 11:36:36 +0100 <[exa]> that kinda implies making the API sane and then just expose it to cli, right?
2023-01-08 11:36:48 +0100 <maerwald> yeah, more separated phases that make sense
2023-01-08 11:36:50 +0100 <[exa]> "sane" as in "complete and well structured"
2023-01-08 11:36:53 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2023-01-08 11:36:56 +0100 <maerwald> 'cabal configure' has weird semantics
2023-01-08 11:37:14 +0100 <maerwald> then have consistent shell hooks for all phases
2023-01-08 11:39:23 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-08 11:39:31 +0100 <maerwald> https://github.com/haskell-mafia/mafia is one
2023-01-08 11:39:34 +0100 <maerwald> there was another
2023-01-08 11:40:11 +0100 <maerwald> (a more interesting one)
2023-01-08 11:41:03 +0100 <[exa]> oh that's lovely
2023-01-08 11:41:15 +0100 <[exa]> except yeah, last commit 3 years ago
2023-01-08 11:41:23 +0100 <maerwald> none of them are usable
2023-01-08 11:41:26 +0100 <[exa]> :(
2023-01-08 11:42:17 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 11:43:10 +0100 <freeside_> it would be fascinating to consider the *.hs and hackageas the only inputs to a build system, which then tries to solve package constraints based on import statements, and keeps trying to build until the build works
2023-01-08 11:44:18 +0100 <[exa]> 10: "keep trying to build" 20: goto 10
2023-01-08 11:45:38 +0100 <maerwald> ah
2023-01-08 11:45:40 +0100 <maerwald> found it
2023-01-08 11:45:42 +0100 <maerwald> https://github.com/judah/pier
2023-01-08 11:46:19 +0100 <maerwald> "Pier invokes tools such as ghc directly, implementing the fine-grained Haskell build logic from (nearly) scratch. In contrast, Stack relies on a separate framework to implement most of its build steps (i.e., Cabal/Distribution.Simple), giving it mostly coarse control over the build"
2023-01-08 11:46:35 +0100 <maerwald> this is true
2023-01-08 11:46:44 +0100 <maerwald> the way cabal orders includes etc an be a nightmare
2023-01-08 11:47:13 +0100opticblast(~Thunderbi@secure-165.caltech.edu)
2023-01-08 11:47:26 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-01-08 11:49:31 +0100 <maerwald> so most of the improvements won't really be "here's another feature"
2023-01-08 11:51:33 +0100 <maerwald> and then pay duncan to implement that constraint algebra (he's been saying it's very easy...)
2023-01-08 11:51:37 +0100 <maerwald> lol
2023-01-08 11:52:03 +0100 <maerwald> except no one else knows exactly how easy
2023-01-08 11:52:22 +0100boxscape_(~boxscape_@81.191.27.107)
2023-01-08 11:55:42 +0100trev_(~trev@109.252.35.99) (Quit: trev_)
2023-01-08 11:55:55 +0100trev_(~trev@109.252.35.99)
2023-01-08 11:56:22 +0100trev_trev
2023-01-08 11:56:33 +0100 <freeside_> it's this easy: https://aphyr.com/posts/354-unifying-the-technical-interview
2023-01-08 11:56:34 +0100trev(~trev@109.252.35.99) (Changing host)
2023-01-08 11:56:34 +0100trev(~trev@user/trev)
2023-01-08 11:57:50 +0100mncheckm(~mncheck@193.224.205.254)
2023-01-08 11:58:31 +0100opticblast(~Thunderbi@secure-165.caltech.edu) (Remote host closed the connection)
2023-01-08 11:59:54 +0100arjun(~arjun@103.57.87.47)
2023-01-08 12:00:45 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 12:01:17 +0100Vajb(~Vajb@2001:999:405:5eb2:8d39:b832:a9ee:9bdf) (Ping timeout: 256 seconds)
2023-01-08 12:01:33 +0100Vajb(~Vajb@2001:999:78d:d7:457c:7773:573e:6903)
2023-01-08 12:05:35 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 264 seconds)
2023-01-08 12:15:04 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-08 12:17:14 +0100acidjnk_new(~acidjnk@p200300d6e715c40369f7e4f04255c339.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2023-01-08 12:19:32 +0100vaibhavsagar[m](~vaibhavsa@2001:470:69fc:105::ffe)
2023-01-08 12:22:18 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-01-08 12:22:44 +0100azimut(~azimut@gateway/tor-sasl/azimut)
2023-01-08 12:26:02 +0100arjun(~arjun@103.57.87.47) (Ping timeout: 268 seconds)
2023-01-08 12:28:46 +0100cheater_(~Username@user/cheater)
2023-01-08 12:30:36 +0100MajorBiscuit(~MajorBisc@2001:1c00:2402:2d00:9eeb:34cf:63b3:9e5b)
2023-01-08 12:31:32 +0100cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2023-01-08 12:31:32 +0100arjun(~arjun@103.57.87.47)
2023-01-08 12:31:42 +0100cheater_cheater
2023-01-08 12:34:37 +0100shriekingnoise(~shrieking@186.137.175.87) (Quit: Quit)
2023-01-08 12:35:52 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-01-08 12:42:34 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 12:44:28 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 12:44:32 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 246 seconds)
2023-01-08 12:45:00 +0100accord(uid568320@id-568320.hampstead.irccloud.com)
2023-01-08 12:47:00 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 268 seconds)
2023-01-08 12:50:11 +0100thyriaen(~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1)
2023-01-08 12:52:37 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-01-08 12:53:37 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
2023-01-08 12:54:00 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-08 12:57:19 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com)
2023-01-08 13:00:28 +0100tremon(~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
2023-01-08 13:04:10 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt)
2023-01-08 13:05:01 +0100jakalx(~jakalx@base.jakalx.net) ()
2023-01-08 13:07:16 +0100 <Athas> I need a parametric Void, that is the empty type 'data Void2 a'. Does this have a standard name.
2023-01-08 13:07:35 +0100 <Athas> A void functor.
2023-01-08 13:07:48 +0100 <tomsmeding> Isn't that Const Void
2023-01-08 13:08:03 +0100 <tomsmeding> Well, not quite maybe
2023-01-08 13:08:18 +0100 <Athas> I need something of kind * -> *. Const Void has kind *.
2023-01-08 13:08:42 +0100 <Athas> Or wait, maybe you're right.
2023-01-08 13:09:02 +0100 <Athas> Where is the Const type defined?
2023-01-08 13:09:10 +0100 <tomsmeding> Data.Functor.Const from base
2023-01-08 13:09:39 +0100 <tomsmeding> It has a constructor though -- just one with, in this case, a void field
2023-01-08 13:09:55 +0100 <tomsmeding> Not sure if that makes it unsuitable for your usecase
2023-01-08 13:10:15 +0100 <Athas> Hm, and I guess that values of that constructor could exist, since all nonstrict types are inhabited.
2023-01-08 13:10:32 +0100 <tomsmeding> Isn't it a newtype?
2023-01-08 13:10:46 +0100 <Athas> Oh yes. Is the exhaustiveness checker smart enough to deal with this?
2023-01-08 13:11:00 +0100 <tomsmeding> 🤷‍♂️ :p
2023-01-08 13:12:30 +0100 <jackdk> There's a `Void1` in generic-lens-core` but I don't think there's a canonical one anywhere
2023-01-08 13:13:37 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 13:14:10 +0100dcoutts(~duncan@host213-122-143-153.range213-122.btcentralplus.com)
2023-01-08 13:16:24 +0100dcoutts_(~duncan@host86-151-44-212.range86-151.btcentralplus.com) (Ping timeout: 260 seconds)
2023-01-08 13:16:35 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de)
2023-01-08 13:18:20 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2023-01-08 13:20:09 +0100alfonsox(~quassel@103.87.57.65)
2023-01-08 13:27:00 +0100jakalx(~jakalx@base.jakalx.net)
2023-01-08 13:27:29 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Ping timeout: 260 seconds)
2023-01-08 13:28:43 +0100jinsun(~jinsun@user/jinsun)
2023-01-08 13:32:03 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 13:33:28 +0100 <[exa]> Athas: btw what's the usecase? (just curions; in all I can see I'd probably just go with Proxy)
2023-01-08 13:34:41 +0100 <Athas> [exa]: a type is parameterised on multiple functors, and sometimes I want some of them to produce Void (indicating that certain branches of a sum type are invalid).
2023-01-08 13:35:06 +0100 <Athas> It's for a compiler AST; somewhat similar to the Trees That Grow idea, if you're familiar with that.
2023-01-08 13:36:01 +0100 <[exa]> aaaah yes so you basically need both the emptiness and the functorish argument at once. At that point yeah, it's Void1.
2023-01-08 13:36:31 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 13:37:51 +0100 <MangoIV[m]> <Athas> "Oh yes. Is the exhaustiveness..." <- The exhaustive mess checker is smart enough to deal with strict voids, yes.
2023-01-08 13:38:06 +0100 <MangoIV[m]> Doesn’t even need to be a new type, strict data is enough.
2023-01-08 13:42:06 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 13:42:44 +0100 <MangoIV[m]> There’s a good blogpost on this topic. It’s called “to void or to Void?”
2023-01-08 13:48:50 +0100boxscape_(~boxscape_@81.191.27.107) (Ping timeout: 260 seconds)
2023-01-08 13:49:47 +0100troydm(~troydm@user/troydm) (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)
2023-01-08 13:50:17 +0100troydm(~troydm@user/troydm)
2023-01-08 13:54:25 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 13:54:59 +0100thongpv87(~thongpv87@2402:9d80:384:79a2:a6b7:db5b:a5f5:6571)
2023-01-08 13:57:20 +0100thongpv(~thongpv87@2001:ee0:54ae:93a0:55a8:a4c7:8b73:21a9) (Ping timeout: 252 seconds)
2023-01-08 13:59:12 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 14:01:09 +0100MajorBiscuit(~MajorBisc@2001:1c00:2402:2d00:9eeb:34cf:63b3:9e5b) (Quit: WeeChat 3.6)
2023-01-08 14:04:31 +0100__monty__(~toonn@user/toonn)
2023-01-08 14:12:53 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2023-01-08 14:13:17 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-01-08 14:15:35 +0100__monty__(~toonn@user/toonn)
2023-01-08 14:17:17 +0100arjun(~arjun@103.57.87.47) (Ping timeout: 256 seconds)
2023-01-08 14:28:24 +0100machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-01-08 14:29:08 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net)
2023-01-08 14:31:50 +0100arjun(~arjun@103.57.87.47)
2023-01-08 14:34:20 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 14:40:24 +0100cheater_(~Username@user/cheater)
2023-01-08 14:41:04 +0100fizbin(~fizbin@user/fizbin)
2023-01-08 14:41:18 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2023-01-08 14:41:21 +0100bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2023-01-08 14:42:53 +0100cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2023-01-08 14:42:59 +0100cheater_cheater
2023-01-08 14:43:10 +0100 <arjun> :kind Int shows "*" even after switching on -StarIsType ext.
2023-01-08 14:43:44 +0100 <arjun> do we need to do more to make "*" a "Type" ?
2023-01-08 14:43:52 +0100 <tomsmeding> arjun: you need the opposite, -XNoStarIsType
2023-01-08 14:44:27 +0100 <tomsmeding> to GHC, Type is the actual thing, * is just a convenient representation that it uses when -XStarIsType is set (which it is by default)
2023-01-08 14:44:47 +0100 <tomsmeding> ("convenient" is subjective, of course)
2023-01-08 14:45:15 +0100 <arjun> tomsmeding, SMH, thanks!
2023-01-08 14:45:56 +0100 <arjun> also, if i have typeOperators enabled, i can't do (1 + 3) Type 4, (using Type as a *, multiplication) ?
2023-01-08 14:46:15 +0100 <tomsmeding> :') no
2023-01-08 14:46:45 +0100 <tomsmeding> it's more the other way round: with -XStarIsType, using * as multiplication can give trouble (I forget exactly how much trouble)
2023-01-08 14:46:46 +0100 <arjun> but i need -XNoStarIsType to do a type level multiplication ( * ) using a star, i see.
2023-01-08 14:46:52 +0100 <tomsmeding> right
2023-01-08 14:49:17 +0100fizbin(~fizbin@user/fizbin) (Ping timeout: 255 seconds)
2023-01-08 14:49:55 +0100 <arjun> thanks for clearing that up tomsmeding : )
2023-01-08 14:51:08 +0100merijn(~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 272 seconds)
2023-01-08 14:51:46 +0100 <Benzi-Junior> Ok I'm getting the following error when using 'get' from the Control.Monad.StateT.Strict "Couldn't match type ‘StateT TodoList m0’ with ‘StateT TodoList IO Ind’"
2023-01-08 14:54:06 +0100 <arjun> Benzi-Junior, did you use a IO function? that fixes m to IO but your type signature probably has "m". try using a liftIO before the IO action ?
2023-01-08 14:54:12 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-01-08 14:59:02 +0100 <Benzi-Junior> arjun, the call is simply "l <- get" it is made in a do block for a function with the signature "StateT TodoList IO Ind
2023-01-08 14:59:38 +0100jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds)
2023-01-08 14:59:50 +0100 <Axman6> we'd need to see more code to have any idea what's going on
2023-01-08 15:00:30 +0100 <Axman6> those two types mentioned have different kinds, so something quite strange is going on
2023-01-08 15:02:31 +0100slack1256(~slack1256@186.11.40.220) (Remote host closed the connection)
2023-01-08 15:02:35 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 15:04:29 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 15:07:44 +0100jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2023-01-08 15:08:13 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2023-01-08 15:09:13 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 15:10:13 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 15:11:09 +0100mechap(~mechap@user/mechap) (Quit: WeeChat 3.7.1)
2023-01-08 15:18:41 +0100Ranhir(~Ranhir@157.97.53.139) (Read error: Connection reset by peer)
2023-01-08 15:22:13 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 15:22:55 +0100Ranhir(~Ranhir@157.97.53.139)
2023-01-08 15:29:02 +0100 <Benzi-Junior> Axman6, sounds like I'm barking up the wrong tree
2023-01-08 15:29:14 +0100razetime(~Thunderbi@49.207.222.244)
2023-01-08 15:30:25 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2023-01-08 15:31:45 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 15:32:32 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-08 15:33:07 +0100thongpv(~thongpv87@2001:ee0:54ae:93a0:9660:d17:ac3f:e790)
2023-01-08 15:34:29 +0100cheater_(~Username@user/cheater)
2023-01-08 15:34:31 +0100thongpv87(~thongpv87@2402:9d80:384:79a2:a6b7:db5b:a5f5:6571) (Ping timeout: 260 seconds)
2023-01-08 15:34:48 +0100 <Axman6> Benzi-Junior: well, like I said, we have no idea what's wrong because you haven't given us enough information to help
2023-01-08 15:35:07 +0100dsfdfs(~dsfdfs@2405:201:c039:9062:68fa:1064:6d2b:6df)
2023-01-08 15:35:32 +0100thongpv87(~thongpv87@14.160.124.248)
2023-01-08 15:35:37 +0100dsfdfs(~dsfdfs@2405:201:c039:9062:68fa:1064:6d2b:6df) (Client Quit)
2023-01-08 15:36:44 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Ping timeout: 246 seconds)
2023-01-08 15:37:53 +0100cheater(~Username@user/cheater) (Ping timeout: 255 seconds)
2023-01-08 15:37:54 +0100cheater_cheater
2023-01-08 15:38:03 +0100thongpv(~thongpv87@2001:ee0:54ae:93a0:9660:d17:ac3f:e790) (Ping timeout: 248 seconds)
2023-01-08 15:38:13 +0100mechap(~mechap@user/mechap)
2023-01-08 15:39:29 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de) (Quit: Leaving.)
2023-01-08 15:40:03 +0100 <Benzi-Junior> Axman6, this is something I'm being assessed on so I want to avoid uploading the code in its entierty, I'll be in touch again if my position changes
2023-01-08 15:41:18 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2023-01-08 15:48:34 +0100Sciencentistguy9(~sciencent@hacksoc/ordinary-member)
2023-01-08 15:50:35 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member) (Ping timeout: 264 seconds)
2023-01-08 15:52:44 +0100ddellacosta(~ddellacos@89.45.224.152) (Ping timeout: 260 seconds)
2023-01-08 15:53:38 +0100Sciencentistguy9(~sciencent@hacksoc/ordinary-member) (Ping timeout: 255 seconds)
2023-01-08 15:58:58 +0100leah2(~leah@vuxu.org) (Remote host closed the connection)
2023-01-08 16:01:18 +0100leah2(~leah@vuxu.org)
2023-01-08 16:10:38 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 16:17:55 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2023-01-08 16:19:04 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-01-08 16:23:23 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 248 seconds)
2023-01-08 16:34:09 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2023-01-08 16:44:59 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-01-08 16:44:59 +0100wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-01-08 16:44:59 +0100wroathe(~wroathe@user/wroathe)
2023-01-08 16:47:39 +0100ddellacosta(~ddellacos@89.45.224.152)
2023-01-08 16:48:16 +0100 <Benzi-Junior> ok here is my code -> https://pastebin.com/65J3Tzmd
2023-01-08 16:48:31 +0100 <Benzi-Junior> I suspect the isse to be simple and fundamental
2023-01-08 16:50:46 +0100 <c_wraith> Benzi-Junior: the type is wrong
2023-01-08 16:51:12 +0100 <c_wraith> Benzi-Junior: you're treating TLM as if it was a type synonym, but it isn't. It's a newtype
2023-01-08 16:52:37 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 16:52:40 +0100 <Benzi-Junior> I suspected as much, could you elaborate briefly what the difference is ?
2023-01-08 16:53:22 +0100 <c_wraith> Benzi-Junior: and after that, you're using both gets and putStrLn in the same do block, which won't work. putStrLn returns an IO value, and gets returns a StateT value, and the two aren't compatible
2023-01-08 16:53:23 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 16:54:01 +0100 <c_wraith> Benzi-Junior: at a first level, think of a newtype as a special case data declaration with exactly one constructor.
2023-01-08 16:54:45 +0100 <Benzi-Junior> c_wraith, ye just looked it up, the putStrLn was just there to force it to be an IO,
2023-01-08 16:55:11 +0100 <Benzi-Junior> c_wraith, so I guess I need to unwrap the TLM constructor to get this to work ?
2023-01-08 16:55:31 +0100 <c_wraith> Other way around. You need to wrap the result in a TLM constructor.
2023-01-08 16:56:21 +0100 <c_wraith> and to use putStrLn, you need to make its result line up with `StateT something IO ()`
2023-01-08 16:56:36 +0100 <c_wraith> for that, look at the `liftIO' function
2023-01-08 16:59:19 +0100thongpv(~thongpv87@2402:9d80:34a:6d5:496e:abe7:cc2:fa15)
2023-01-08 16:59:21 +0100 <Benzi-Junior> c_wraith, I had looked into liftIO, itdidn't seem to be included in the setup and I suspect I'm not supposed to add it, but also printing wasn't part of the specification (or rather it's supposed to happen elsewhere in code)
2023-01-08 17:00:23 +0100 <c_wraith> Well, it's part of MonadIO. So it's definitely in there.
2023-01-08 17:01:02 +0100thongpv87(~thongpv87@14.160.124.248) (Ping timeout: 252 seconds)
2023-01-08 17:01:33 +0100 <c_wraith> It's definitely in scope and you're supposed to be aware of it. But if you don't need to do the output there, the TLM constructor should still force inference of IO
2023-01-08 17:02:39 +0100panovia(~user@user/siracusa) (Quit: Bye!)
2023-01-08 17:05:48 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Remote host closed the connection)
2023-01-08 17:06:33 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 17:08:02 +0100 <Benzi-Junior> c_wraith, I'll keep it in mind
2023-01-08 17:15:55 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 17:19:13 +0100 <Benzi-Junior> umm there must be something I'm not getting, unless I'm supposed to put the constructor around the entire do block
2023-01-08 17:20:20 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2023-01-08 17:20:29 +0100 <c_wraith> where else would it go?
2023-01-08 17:20:40 +0100 <tomsmeding> or around the 'gets nextIndex', right?
2023-01-08 17:21:55 +0100 <c_wraith> the argument to TLM is a `StateT TL IO I' value. And in this case, that whole do block happens to be one of those.
2023-01-08 17:22:10 +0100ddellacosta(~ddellacos@89.45.224.152) (Ping timeout: 252 seconds)
2023-01-08 17:22:21 +0100 <c_wraith> (remember, do blocks are expressions)
2023-01-08 17:22:22 +0100 <Benzi-Junior> huh, ok
2023-01-08 17:22:40 +0100 <Benzi-Junior> ye it just seemed ... wrong to do
2023-01-08 17:23:33 +0100 <tomsmeding> Benzi-Junior: you can also put TLM around the 'gets nextIndex'
2023-01-08 17:23:53 +0100 <tomsmeding> if you put TLM around the entire do block, you're working in the StateT monad, and wrapping the computation in TLM
2023-01-08 17:24:14 +0100 <Benzi-Junior> tomsmeding, I tried that first but it didn't work
2023-01-08 17:24:17 +0100 <tomsmeding> if you put TLM around just the gets call, you're working in the TLM monad, where `TLM (gets nextIndex)` is an operation in the TLM monad (constructed from an operation in the StateT monad)
2023-01-08 17:24:22 +0100 <Benzi-Junior> tomsmeding, but you are correct
2023-01-08 17:24:32 +0100 <tomsmeding> Benzi-Junior: https://play-haskell.tomsmeding.com/saved/QgIGNqFK
2023-01-08 17:24:33 +0100 <tomsmeding> works :p
2023-01-08 17:24:37 +0100 <tomsmeding> as in, compiles
2023-01-08 17:24:55 +0100 <Benzi-Junior> I retried it and now it works, I must havemade some other error when I first tried it
2023-01-08 17:25:50 +0100 <Benzi-Junior> tomsmeding, but what would be the dissadvantage of wrapping up the whole block ?
2023-01-08 17:26:08 +0100 <tomsmeding> Benzi-Junior: in this case none
2023-01-08 17:26:20 +0100 <tomsmeding> though I'd assume that in a larger application, you have other methods that also run im the TLM monad
2023-01-08 17:26:45 +0100 <tomsmeding> you can't use TLM methods inside a StateT do block, but you can use StateT methods inside a TLM do block (by wrapping the TLM constructor around them)
2023-01-08 17:27:13 +0100 <c_wraith> Or ideally by adding a MonadState instance for TLM, but that might be out of scope for the project
2023-01-08 17:27:28 +0100 <tomsmeding> (now, technically you can, because you can write `case x of TLM m -> m` and extract the StateT computation, but that's typically not the intent if you're writing the newtype in the first place)
2023-01-08 17:27:45 +0100 <tomsmeding> and what c_wraith says, then the gets call would get lifted automatically
2023-01-08 17:28:13 +0100 <c_wraith> though I suspect it might be importing StateT directly from transformers, instead of using mtl
2023-01-08 17:28:19 +0100 <c_wraith> just to prevent that sort of thing
2023-01-08 17:28:29 +0100 <tomsmeding> hm true
2023-01-08 17:28:46 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2023-01-08 17:31:54 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 268 seconds)
2023-01-08 17:33:22 +0100 <Benzi-Junior> also, I've asked this before but forgot the answer, what is the signifcance of the '!' preceding the types in the declaration of TItem
2023-01-08 17:33:35 +0100 <tomsmeding> they are strict fields
2023-01-08 17:33:56 +0100 <tomsmeding> % data A = A Int ; data B = B !Int
2023-01-08 17:33:56 +0100 <yahb2> <no output>
2023-01-08 17:34:03 +0100 <tomsmeding> % A undefined `seq` ()
2023-01-08 17:34:03 +0100 <yahb2> ()
2023-01-08 17:34:05 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-08 17:34:06 +0100 <tomsmeding> % B undefined `seq` ()
2023-01-08 17:34:06 +0100 <yahb2> *** Exception: Prelude.undefined ; CallStack (from HasCallStack): ; error, called at libraries/base/GHC/Err.hs:74:14 in base:GHC.Err ; undefined, called at <interactive>:24:3 in interactive:Ghci5
2023-01-08 17:34:45 +0100 <c_wraith> when the constructor is evaluated, those fields will also be evaluated (to WHNF). Note the first clause there. They don't magically cause evaluation when the constructor is applied, only when it's evaluated.
2023-01-08 17:34:45 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-08 17:35:01 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-08 17:37:17 +0100pagnol(~user@213-205-209-87.ftth.glasoperator.nl)
2023-01-08 17:37:19 +0100pagnol(~user@213-205-209-87.ftth.glasoperator.nl) (ERC (IRC client for Emacs 27.1))
2023-01-08 17:37:57 +0100 <tomsmeding> % let x = B undefined in ()
2023-01-08 17:37:57 +0100 <yahb2> ()
2023-01-08 17:41:00 +0100mechap(~mechap@user/mechap) (Ping timeout: 260 seconds)
2023-01-08 17:42:42 +0100mechap(~mechap@user/mechap)
2023-01-08 17:44:24 +0100ddellacosta(~ddellacos@86.106.143.243)
2023-01-08 17:49:40 +0100 <monochrom> My http://www.vex.net/~trebla/haskell/strict-field.xhtml explains it.
2023-01-08 17:55:49 +0100jinsun__(~jinsun@user/jinsun)
2023-01-08 17:55:49 +0100jinsun(~jinsun@user/jinsun) (Killed (zinc.libera.chat (Nickname regained by services)))
2023-01-08 17:55:49 +0100jinsun__jinsun
2023-01-08 17:56:02 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 18:08:00 +0100jil(~user@vps-15050500.vps.ovh.net)
2023-01-08 18:08:07 +0100 <jil> Hi
2023-01-08 18:08:11 +0100 <Benzi-Junior> hullo
2023-01-08 18:08:26 +0100 <[exa]> good evening
2023-01-08 18:09:45 +0100 <jil> I'm trying to lean Haskell from the Hutton's Book Programming in Haskell. I started 2 years ago. It went well up to chapter 11
2023-01-08 18:10:31 +0100 <jil> where he illustrate the first half of the book by developping an interactive tic-tac-toe program.
2023-01-08 18:11:09 +0100thongpv(~thongpv87@2402:9d80:34a:6d5:496e:abe7:cc2:fa15) (Ping timeout: 252 seconds)
2023-01-08 18:11:10 +0100 <jil> He always give some exercices to do I up to now I did all of them even those not corrected
2023-01-08 18:12:05 +0100 <jil> But for several month now, I don't see how I can introduce some randomness in the selection of the tictactoe grid without poluting all the code with IO
2023-01-08 18:12:30 +0100 <jil> the author suggest to use RandomRIO
2023-01-08 18:13:01 +0100 <[exa]> jil: you will generally need to carry _some_ random generator state to places where you want to generate random numbers, but there are certainly far better options that with IO
2023-01-08 18:13:56 +0100 <[exa]> jil: at the bare minimum you can use a State to pass the random seed around instead of IO
2023-01-08 18:13:56 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-08 18:14:16 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2023-01-08 18:14:43 +0100 <monochrom> You can use newStdGen in IO and then randomRs without IO, the latter gives you an infinite stream.
2023-01-08 18:15:00 +0100 <jil> we use the minmax algorithm to tag the tree of possible grid position. At some point we generate a list a all the wining move and take the first one.
2023-01-08 18:15:21 +0100 <jil> What I need is "just" take a random one from the list
2023-01-08 18:15:50 +0100 <jil> I would like to do it with the suggested function randomRIO
2023-01-08 18:16:17 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-08 18:16:41 +0100 <jil> what you are suggesting [exa] is to use some other random function right ?
2023-01-08 18:17:09 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 18:17:28 +0100 <jil> Maybe someone knows the book or the author and could tell me why he suggested to use randomRIO if there are other simpler solution ?
2023-01-08 18:17:49 +0100 <jil> Can I show my code ?
2023-01-08 18:19:23 +0100mechap(~mechap@user/mechap) (Ping timeout: 260 seconds)
2023-01-08 18:19:47 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com)
2023-01-08 18:20:22 +0100 <[exa]> jil: pastebin link in /topic :]
2023-01-08 18:21:05 +0100mechap(~mechap@user/mechap)
2023-01-08 18:22:10 +0100 <monochrom> I wouldn't say "simpler". The other approaches aim at minimizing dependence on IO. That does not mean simpler.
2023-01-08 18:23:39 +0100 <monochrom> I believe that Hutton chose to stay in IO with randomRIO because considering the context of what the book has taught so far and where randomness is needed in this particular program, randomRIO causes the least distraction.
2023-01-08 18:27:50 +0100alfonsox(~quassel@103.87.57.65) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2023-01-08 18:28:08 +0100ddellacosta(~ddellacos@86.106.143.243) (Ping timeout: 260 seconds)
2023-01-08 18:28:17 +0100boxscape_(~boxscape_@81.191.27.107)
2023-01-08 18:28:47 +0100 <jil> I need to do something starting in function best_rnd_move : 126 https://paste.tomsmeding.com/GQwM69T2
2023-01-08 18:28:50 +0100 <monochrom> You can also get a glimpse from the preface or introduction that he is going to embrace IO rather than obsess over purity.
2023-01-08 18:28:51 +0100 <boxscape_> I just published a plugin to bring Idris's !-notation into Haskell, curious what people think https://hackage.haskell.org/package/monadic-bang-0.1.0.0
2023-01-08 18:29:55 +0100 <jil> monochrom: so I should go with putting a lot of IO in the code. I don't really mind as it's probably for a didactical purpose
2023-01-08 18:30:36 +0100 <jil> If I'm correct I'll have to change all my Grid type in 'IO Grid'
2023-01-08 18:30:56 +0100 <[exa]> jil: in your case you're using the best_rnd_move only in 1 function
2023-01-08 18:31:50 +0100 <[exa]> ...in play', which is already IO. So you can just change the best_rnd_move to type `best_rnd_move :: Grid -> Player -> IO Grid`, add the return, bind the result correctly in play', and that should be it, you can rng there :]
2023-01-08 18:32:37 +0100 <[exa]> re "all my Grid types to `IO Grid`" -- no, only the "return" ones, as above
2023-01-08 18:33:08 +0100boxscape_14(~boxscape_@81.191.27.107)
2023-01-08 18:33:13 +0100boxscape_14boxscape__
2023-01-08 18:33:32 +0100razetime(~Thunderbi@49.207.222.244) (Remote host closed the connection)
2023-01-08 18:35:16 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 18:36:14 +0100 <jil> What I tried to do was something like list !! (Rnd.RandomRIO (0, lenght list) :: IO Int) but soon found that will not work because of the IO, So I tried without success to use a `do index <- (Rnd.RandomRIO (0, lenght list) :: IO Int)` somewhere in the best_rnd_move.
2023-01-08 18:36:39 +0100boxscape_(~boxscape_@81.191.27.107) (Ping timeout: 268 seconds)
2023-01-08 18:37:34 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 18:37:36 +0100 <[exa]> yes, you need to "bind" the results of IO actions to be able to access the value they return
2023-01-08 18:37:54 +0100 <jil> bind is using the do and the <- right ?
2023-01-08 18:37:57 +0100 <[exa]> (either using <- in `do` notation or the >>= outside of it)
2023-01-08 18:37:58 +0100 <[exa]> yes
2023-01-08 18:38:30 +0100 <jil> I've not ssen the >>=.
2023-01-08 18:39:57 +0100 <[exa]> <- in `do` internally rewrites to >>=, which is the actual operator that powers the binding of the values
2023-01-08 18:41:31 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 18:42:35 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2023-01-08 18:43:02 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net)
2023-01-08 18:44:17 +0100 <jil> I don't quite get it, because if I don't understand how the state of the world is tracked in this code https://paste.tomsmeding.com/bhnjk44F#file-2
2023-01-08 18:44:30 +0100 <jil> Also the syntaxe is probably incorrect
2023-01-08 18:44:34 +0100boxscape__boxscape_
2023-01-08 18:45:05 +0100arjun(~arjun@103.57.87.47) (Ping timeout: 255 seconds)
2023-01-08 18:47:02 +0100 <[exa]> jil: okay, the best_rnd_move needs to return an IO action (that produces a Grid), but you return a grid. You will need `return`
2023-01-08 18:47:49 +0100 <[exa]> btw, do you know some of the intuition behind monads and how they compose to form bigger programs?
2023-01-08 18:48:07 +0100 <[exa]> :t return -- <- jil
2023-01-08 18:48:08 +0100 <lambdabot> Monad m => a -> m a
2023-01-08 18:48:42 +0100 <jil> there like carrying the state of the world around ?
2023-01-08 18:48:53 +0100 <jil> they are like...
2023-01-08 18:51:07 +0100 <[exa]> yes, IO does precisely that (there are other monads that do other things but let's ignore that now)
2023-01-08 18:51:28 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 18:51:48 +0100econo(uid147250@user/econo)
2023-01-08 18:54:52 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 18:55:51 +0100 <[exa]> jil: I made an illustration here https://paste.tomsmeding.com/Cg940cSU hopefully it shows all the necessary steps
2023-01-08 18:56:02 +0100 <[exa]> (didn't try it though, pls report if it fails to compile or so :D )
2023-01-08 18:56:13 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
2023-01-08 18:56:31 +0100 <freeside_> "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Knuth
2023-01-08 19:00:10 +0100 <[exa]> jil: notably, `do` takes multiple descriptions of IO actions and joins them into one (while handling some of the other things correctly, like the result of one action getting collected with <- and being usable in other actions). Also, integers are not IO (thus they can't be easily used in `do`), but you can construct a trivial IO that's just going to have the integer you give it as a result, using `return`.
2023-01-08 19:01:45 +0100 <[exa]> This way, you basically build a yuge IO out of all small IOs in your program, which becomes your `main`. Haskell runtime then reads and runs all of these to get the whole thing moving.
2023-01-08 19:04:27 +0100accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-01-08 19:04:30 +0100 <[exa]> (it technically doesn't "read and run" them because the program gets compiled to very efficient machine code, but this "interpret the IO description" logic is moreless retained)
2023-01-08 19:04:53 +0100fizbin(~fizbin@user/fizbin)
2023-01-08 19:06:22 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-01-08 19:06:50 +0100arjun(~arjun@103.57.87.47)
2023-01-08 19:07:06 +0100 <jil> I'm reading you again... :)
2023-01-08 19:10:12 +0100 <[exa]> btw try to make sense of the types of things in the small example, that's probably the best way
2023-01-08 19:11:00 +0100 <[exa]> also also, just to clarify `do` notation: it rewrites to >> and >>=, where `do {a; b}` is basically equivalent to `a>>b`:
2023-01-08 19:11:29 +0100 <[exa]> :t print 123
2023-01-08 19:11:31 +0100 <lambdabot> IO ()
2023-01-08 19:11:43 +0100 <[exa]> :t do {print 123; print 123; }
2023-01-08 19:11:45 +0100 <lambdabot> IO ()
2023-01-08 19:12:00 +0100 <iqubic> Hackage's new dark mode is super amazing!
2023-01-08 19:12:04 +0100 <[exa]> :t print 123 >> print 123 -- >> is kinda like a semicolon here
2023-01-08 19:12:06 +0100 <lambdabot> IO ()
2023-01-08 19:12:16 +0100 <jil> ok... I'm trying this `ghci>let x = 0` `ghci>:t x` Num a => a
2023-01-08 19:12:45 +0100 <jil> vs `x <- return 0` `:t x` x :: Integer
2023-01-08 19:12:53 +0100 <[exa]> jil: ...and binding translates to >>=, `do {result <- a; b result;}` becomes `a >>= (\result -> b result)`
2023-01-08 19:13:17 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-01-08 19:13:26 +0100 <jil> you are loosing me [exa]
2023-01-08 19:13:33 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Remote host closed the connection)
2023-01-08 19:13:45 +0100 <[exa]> in your case, you may assume that `<-` temporarily strips the IO from the computations so that you can access the actual value, but the whole result must again be an IO
2023-01-08 19:13:59 +0100 <jil> I'm trying to keep to my objective, drawing a random element from the list of wining grids
2023-01-08 19:14:07 +0100 <[exa]> ah ok :]
2023-01-08 19:15:09 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Ping timeout: 260 seconds)
2023-01-08 19:15:11 +0100 <jil> I think I go that .. <- temprarily strips the IO but I need to add it to my whole result
2023-01-08 19:15:54 +0100 <[exa]> anyway, regarding your attempt, the main problem there was probably that the `do` in best_rnd_move was misplaced, you want to have the `do` as the top element in the funtion so that it can connect the randomRIO to the rest of the function
2023-01-08 19:16:04 +0100 <jil> why the different type in `x <- return 0` and `let x = 0` ?
2023-01-08 19:17:21 +0100 <[exa]> ah, the type actually _should_ be the same but you got hit by defaulting
2023-01-08 19:17:30 +0100 <boxscape_> I'd argue that's a quirk of ghci more so than a property of Haskell
2023-01-08 19:17:41 +0100 <jil> [exa]: yes, I got that I had made another attemp like this, but still not perfect https://paste.tomsmeding.com/V3c8r3YB#file-1
2023-01-08 19:17:53 +0100 <[exa]> ...you can try with `x <- return 'a'` -- Char's typically do not suffer from Num problems.
2023-01-08 19:17:57 +0100 <jil> ok thank you
2023-01-08 19:18:13 +0100 <jil> yes, I checked for the Char and it was ok
2023-01-08 19:18:15 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-01-08 19:18:45 +0100caryhartline(~caryhartl@2600:1700:2d0:8d30:31be:b9b2:d1e5:a2dd)
2023-01-08 19:18:46 +0100 <jil> I don't know where to place the return in my code
2023-01-08 19:18:50 +0100 <[exa]> jil: one hint, with `do` you can have inline `let` instead of the `where`
2023-01-08 19:19:03 +0100 <[exa]> other than that it looks correct to me
2023-01-08 19:19:08 +0100 <[exa]> what's the compiler complaining about?
2023-01-08 19:19:30 +0100 <boxscape_> looks like the where is indented too far
2023-01-08 19:19:37 +0100 <[exa]> likely
2023-01-08 19:19:55 +0100 <freeside_> wherefar art thou, helper function
2023-01-08 19:21:06 +0100 <[exa]> no idea how to type this nicely to IRC so I just fixed it: https://paste.tomsmeding.com/8sjFkf5k
2023-01-08 19:21:26 +0100 <[exa]> this form of `let` in do-notation is quite convenient (notice there's no `in`)
2023-01-08 19:22:23 +0100 <[exa]> also also, I guess that at this point the compiler should be able to see that `indice` needs to be an Int, so the `:: IO Int` annotation is probably redundant
2023-01-08 19:24:52 +0100 <jil> ok, I had repeated the let three times. your code is clearer. When I compile I get error of miss matching Grid (actual) with expected IO Grid.
2023-01-08 19:25:44 +0100 <[exa]> jil: is the error pointing at this function or into play' ?
2023-01-08 19:25:50 +0100 <jil> When I folow the thread I going to find myself having to build Tree of IO Grid
2023-01-08 19:26:27 +0100 <[exa]> ah no, you shouldn't put IO into data structures
2023-01-08 19:26:35 +0100perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-01-08 19:26:38 +0100 <[exa]> (well you can, but it doesn't make much sense usually)
2023-01-08 19:26:39 +0100 <jil> play, then play' then my empty type then best_rnd_move
2023-01-08 19:27:25 +0100 <freeside_> if you ever find yourself holding a Container of IO Something, when you really want an IO of Container Something, use `sequence` to get yourself out of that jam
2023-01-08 19:27:54 +0100 <[exa]> the way to "carry" the IO into functions is to allow them to return their result with the "extra IO description", usually by putting the IO before the return type
2023-01-08 19:28:24 +0100 <jil> ok, we have seen sequence in precending chapter.
2023-01-08 19:28:26 +0100 <[exa]> jil: can you quickly paste the current code + the error message?
2023-01-08 19:28:48 +0100arjun(~arjun@103.57.87.47) (Quit: Quit!)
2023-01-08 19:30:19 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 19:32:57 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-01-08 19:33:32 +0100epolanski(uid312403@id-312403.helmsley.irccloud.com)
2023-01-08 19:33:44 +0100 <jil> https://paste.tomsmeding.com/ed6loKNo
2023-01-08 19:34:39 +0100waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2023-01-08 19:34:57 +0100 <jil> if I change the input Grid to IO Grid in best_rnd_move I'll have to change it in my tree.
2023-01-08 19:35:08 +0100 <jil> right ?
2023-01-08 19:35:31 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 19:35:32 +0100 <jil> unless I find a way to use sequence as freeside_ suggested.
2023-01-08 19:35:36 +0100 <[exa]> jil: but why would you do that?
2023-01-08 19:36:01 +0100 <monochrom> Forget sequence. Bland overgeneralized distracting suggestion.
2023-01-08 19:36:12 +0100 <freeside_> sorry
2023-01-08 19:36:41 +0100haritz(~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk)
2023-01-08 19:36:42 +0100haritz(~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) (Changing host)
2023-01-08 19:36:42 +0100haritz(~hrtz@user/haritz)
2023-01-08 19:36:42 +0100 <[exa]> jil: first, `empty` doesn't need to be IO Grid, just Grid. There's no reason it would use IO actions (unless you want to randomize it later, which we can do later)
2023-01-08 19:37:05 +0100 <[exa]> there's no more problems with best_rnd_move now!
2023-01-08 19:37:12 +0100 <monochrom> best_rnd_move is not wrong. But it has changed. Change how play' uses it.
2023-01-08 19:37:21 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl)
2023-01-08 19:37:25 +0100 <[exa]> +1 ^
2023-01-08 19:37:33 +0100 <jil> but play need an IO Grid and I call play empty
2023-01-08 19:37:53 +0100 <monochrom> Basically it's the equivalent of "putChar $! getChar" (which is wrong) vs "c <- getChar" then "putChar c".
2023-01-08 19:38:09 +0100 <[exa]> jil: that's okay, the argument of `play` should not be IO too
2023-01-08 19:38:40 +0100 <[exa]> jil: generally, IO as an argument means that you're making some kind of IO transformers (IO actions that modify other IO actions), and we're really not there. :]
2023-01-08 19:38:47 +0100 <jil> ok, so I need to extract the Grid from the IO Grid returned by best_rnd_move
2023-01-08 19:39:04 +0100 <[exa]> yes, which is done by running the best_rnd_move "alone" and getting a IO-less result by <-
2023-01-08 19:39:10 +0100 <jil> ok
2023-01-08 19:39:59 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-01-08 19:40:09 +0100 <jil> hurray !! :)
2023-01-08 19:40:13 +0100 <jil> Thank you
2023-01-08 19:40:18 +0100 <[exa]> (note about IO in arguments: it may be tempting to "help" it by taking the string of IO actions there, but that's not the case here -- you really just produce "descriptions" of what the program should do)
2023-01-08 19:40:30 +0100 <monochrom> Personally I would start by addressing the elephant in the room.
2023-01-08 19:40:51 +0100 <[exa]> Int = an integer, IO Int = a description of some IO to do to eventually produce an Integer
2023-01-08 19:40:51 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-01-08 19:40:55 +0100 <[exa]> *Int
2023-01-08 19:40:58 +0100 <monochrom> Hutton had "bestmove = head <the list here>" and I would just delete "head". Then it's tirivally the full list.
2023-01-08 19:41:42 +0100 <monochrom> Then in play' I can do whatever I want to the full list, including "!! i" where i came from "i <- randomRIO (0, ???)".
2023-01-08 19:42:07 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 19:42:10 +0100 <[exa]> ( jil: one extra example where IO is used as an argument. `twice :: IO a -> IO a; twice action = do { action; action; }` )
2023-01-08 19:42:28 +0100 <[exa]> (try as: `twice (print 5)`)
2023-01-08 19:42:37 +0100 <jil> ok monochrom I get that
2023-01-08 19:43:14 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
2023-01-08 19:43:33 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-01-08 19:44:02 +0100merijn(~merijn@c-001-001-016.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
2023-01-08 19:44:11 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 19:46:59 +0100anon(~anon@77-161-12-199.fixed.kpn.net)
2023-01-08 19:47:21 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-01-08 19:52:43 +0100freeside_(~mengwong@103.252.202.159) (Ping timeout: 252 seconds)
2023-01-08 19:57:17 +0100 <jil> Thank you [exa] for your time and your support. Thank you monochrom.
2023-01-08 19:57:47 +0100 <jil> I feel like you've made me do a huge step :) in understanding how to handle IO
2023-01-08 19:58:06 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-01-08 19:58:39 +0100coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-01-08 19:58:45 +0100 <[exa]> oh np
2023-01-08 19:59:52 +0100 <[exa]> you might like to quickly run through some function->applicative->monad tutorial just to make sure this is systematized (even Learn You a Haskell should work, since you now have a piece of code to try this on)
2023-01-08 20:00:05 +0100 <[exa]> s/function/functor ayayya
2023-01-08 20:01:49 +0100mncheckm(~mncheck@193.224.205.254) (Ping timeout: 260 seconds)
2023-01-08 20:04:46 +0100Sciencentistguy(~sciencent@hacksoc/ordinary-member)
2023-01-08 20:04:46 +0100emmanuelux(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-01-08 20:04:47 +0100 <jil> Thank you
2023-01-08 20:09:58 +0100 <[exa]> jil: well, feel free to drop by for examples. :D
2023-01-08 20:10:08 +0100beteigeuze(~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 246 seconds)
2023-01-08 20:10:23 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 268 seconds)
2023-01-08 20:11:37 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 20:11:42 +0100 <anon> Hi! I have this code: `f = \x -> mod x 2 == 0 || mod x 3 == 0 || mod x 5 == 0` where I want to optimise it such that the repeated code doesn't exist, and I'm not too sure how I'd approach this. Any ideas?
2023-01-08 20:12:37 +0100 <c_wraith> anon: write a helper function like `divisible x y = x `mod` y == 0'
2023-01-08 20:12:42 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 20:12:46 +0100 <tomsmeding> or use 'any'
2023-01-08 20:12:49 +0100 <opqdonut> or use something like any
2023-01-08 20:12:53 +0100 <opqdonut> heh
2023-01-08 20:12:56 +0100 <tomsmeding> :)
2023-01-08 20:13:08 +0100 <anon> Thanks; I'll look into it!
2023-01-08 20:13:08 +0100 <tomsmeding> :t any
2023-01-08 20:13:10 +0100 <lambdabot> Foldable t => (a -> Bool) -> t a -> Bool
2023-01-08 20:13:27 +0100 <tomsmeding> which simplifies to: (a -> Bool) -> [a] -> Bool
2023-01-08 20:14:43 +0100 <mauke> :t \x -> or [mod x d == 0 | d <- [2, 3, 5]]
2023-01-08 20:14:45 +0100 <lambdabot> Integral a => a -> Bool
2023-01-08 20:15:26 +0100 <tomsmeding> :t \x -> any (\n -> mod x n == 0) [2, 3, 5]
2023-01-08 20:15:28 +0100 <lambdabot> Integral a => a -> Bool
2023-01-08 20:16:24 +0100 <[exa]> @pl \x -> any (\n -> mod x n == 0) [2, 3, 5] --can't resist trying, sorry
2023-01-08 20:16:24 +0100 <lambdabot> flip any [2, 3, 5] . flip flip 0 . ((==) .) . mod
2023-01-08 20:16:35 +0100 <tomsmeding> chef's kiss
2023-01-08 20:16:47 +0100 <tomsmeding> :t flip flip 0
2023-01-08 20:16:48 +0100 <lambdabot> Num b => (a -> b -> c) -> a -> c
2023-01-08 20:17:07 +0100 <[exa]> it's not that good as I hoped but `flip flip 0` was worth it
2023-01-08 20:17:39 +0100 <opqdonut> nice
2023-01-08 20:17:44 +0100 <tomsmeding> @pl any (\n -> mod x n == 0) [2, 3, 5]
2023-01-08 20:17:44 +0100 <lambdabot> any ((0 ==) . mod x) [2, 3, 5]
2023-01-08 20:17:51 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2023-01-08 20:17:54 +0100 <tomsmeding> letting it keep the 'x' makes it significantly nicer :p
2023-01-08 20:18:03 +0100 <[exa]> yes
2023-01-08 20:19:15 +0100 <tomsmeding> wat does @pl even do with list comprehensions, it clearly doesn't understand them but it butchers them even more badly than I expected?
2023-01-08 20:19:22 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-08 20:19:22 +0100 <tomsmeding> @pl \x -> or [mod x n == 0 | n <- [2,3,5]]
2023-01-08 20:19:23 +0100 <lambdabot> or . return . (0 | n <- [2, 3, 5] ==) . flip mod n
2023-01-08 20:19:32 +0100 <tomsmeding> that is _very_ far from valid syntax
2023-01-08 20:19:45 +0100 <boxscape_> | as infix operator I suppose
2023-01-08 20:19:51 +0100 <tomsmeding> and <- as well
2023-01-08 20:19:52 +0100 <boxscape_> hm no
2023-01-08 20:19:55 +0100jakalx(~jakalx@base.jakalx.net)
2023-01-08 20:20:05 +0100 <boxscape_> that's not enough
2023-01-08 20:20:13 +0100 <boxscape_> you'd still need additional parentheses for the section
2023-01-08 20:20:28 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 20:20:44 +0100 <tomsmeding> not if you assume that | and <- have higher precedence than ==, which it probably assumes because default precedence for a newly-defined operator is 9, higher than ==
2023-01-08 20:20:56 +0100 <boxscape_> % (4 * 5 +) 0
2023-01-08 20:20:57 +0100 <yahb2> 20
2023-01-08 20:20:59 +0100 <boxscape_> oh
2023-01-08 20:21:01 +0100 <boxscape_> TIL
2023-01-08 20:21:02 +0100 <mauke> @. pl undo \x -> or [mod x n == 0 | n <- [2,3,5]]
2023-01-08 20:21:02 +0100 <lambdabot> or . ([2, 3, 5] >>=) . flip flip [] . ((:) .) . flip flip 0 . ((==) .) . mod
2023-01-08 20:21:20 +0100 <tomsmeding> nice
2023-01-08 20:21:24 +0100 <anon> is that even readable?
2023-01-08 20:21:26 +0100 <tomsmeding> no
2023-01-08 20:21:32 +0100 <tomsmeding> none of the @pl things is readable
2023-01-08 20:21:40 +0100 <tomsmeding> we're just messing around
2023-01-08 20:21:51 +0100 <anon> I see
2023-01-08 20:22:05 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 20:22:21 +0100 <mauke> very, very occasionally @pl provides some insight or nice simplification. most of the time it's more like a train crash
2023-01-08 20:22:32 +0100califax(~califax@user/califx)
2023-01-08 20:22:41 +0100 <tomsmeding> mauke++
2023-01-08 20:22:51 +0100 <anon> Is @pl using the `pointfree` appication or something?
2023-01-08 20:22:53 +0100 <hpc> pl doesn't stand for pointfree, it stands for pointless
2023-01-08 20:23:06 +0100 <tomsmeding> but yes
2023-01-08 20:23:46 +0100 <[exa]> I use it to convince myself that I can stop making stuff look nice
2023-01-08 20:23:46 +0100 <boxscape_> ugh kiwiirc is making it really hard to use lambdabot because it wants to complete everything to a username as soon as you press space
2023-01-08 20:24:05 +0100 <boxscape_> (if there's an @ I mean)
2023-01-08 20:24:28 +0100 <[exa]> who ever used @ on irc?
2023-01-08 20:24:31 +0100 <tomsmeding> boxscape_: type 'pl <home>@<end>' and then your stuff
2023-01-08 20:24:47 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 20:24:53 +0100 <tomsmeding> but also that, though I guess kiwiirc would remove the @ after autocompletion?
2023-01-08 20:25:00 +0100 <tomsmeding> i.e. it's just an autocomplete trigger
2023-01-08 20:25:01 +0100 <tomsmeding> I hope
2023-01-08 20:25:15 +0100 <boxscape_> yes it removes the @
2023-01-08 20:25:21 +0100 <[exa]> at that point you can [tab] without the @ right?
2023-01-08 20:25:30 +0100 <boxscape_> you can always use tab for autocomplete yeah
2023-01-08 20:25:33 +0100 <[exa]> je suis confuse
2023-01-08 20:25:37 +0100 <boxscape_> it's a completely useless and counterproductive feature
2023-01-08 20:25:42 +0100 <tomsmeding> yay
2023-01-08 20:25:50 +0100abhixec(~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2023-01-08 20:26:04 +0100 <[exa]> it helps the discord immigrants cope I guess
2023-01-08 20:26:41 +0100 <monochrom> [exa]: The chapter right after tic-tac-toe is functor applicative monad. :)
2023-01-08 20:27:02 +0100 <[exa]> ah. useful. jil ^
2023-01-08 20:30:09 +0100FurudeRika[m](~chitandae@2001:470:69fc:105::1:6039)
2023-01-08 20:30:12 +0100 <tomsmeding> [exa]: apparently kiwiirc autocompletes commands, channels and nicks on tab, and you can autocomplete a specific kind of thing by prefixing / # @
2023-01-08 20:30:14 +0100 <tomsmeding> https://github.com/kiwiirc/kiwiirc/blob/213ba5333690a901c8d28436110ecc1ae9a230a1/src/res/configTem…
2023-01-08 20:30:23 +0100 <tomsmeding> but it's a config option!
2023-01-08 20:30:36 +0100emmanuelux(~emmanuelu@user/emmanuelux)
2023-01-08 20:30:44 +0100avpx(~nick@ec2-54-214-223-1.us-west-2.compute.amazonaws.com) (Ping timeout: 268 seconds)
2023-01-08 20:30:46 +0100 <tomsmeding> also https://github.com/kiwiirc/kiwiirc/wiki/Configuration-Options#showautocomplete
2023-01-08 20:31:33 +0100 <boxscape_> I've been looking through the GUI config but cannot find a way to turn off @ autocomplete without turning off *all* autocomplete
2023-01-08 20:31:47 +0100avpx(~nick@ec2-54-214-223-1.us-west-2.compute.amazonaws.com)
2023-01-08 20:31:57 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-08 20:32:02 +0100 <boxscape_> which probably means I should just be using a proper IRC client
2023-01-08 20:32:05 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-08 20:32:11 +0100 <tomsmeding> yeah one would probably need to change some config file
2023-01-08 20:33:35 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 20:33:39 +0100Kaipei(~Kaiepi@nwcsnbsc03w-47-55-159-86.dhcp-dynamic.fibreop.nb.bellaliant.net)
2023-01-08 20:33:59 +0100 <tomsmeding> boxscape_: if you were really desperate you could probably write a userscript to make one of these things use your config instead of the server config :p https://github.com/kiwiirc/kiwiirc/wiki/Configuration
2023-01-08 20:34:21 +0100 <boxscape_> hmm I think I'll just use a different client :D
2023-01-08 20:34:24 +0100 <tomsmeding> :p
2023-01-08 20:34:59 +0100 <boxscape_> tomsmeding but actually I managed to disable it! It's hidden in advanced settings
2023-01-08 20:35:11 +0100califax(~califax@user/califx)
2023-01-08 20:36:19 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-08 20:36:26 +0100 <tomsmeding> boxscape_: does it not even add a : when autocompleting nicks at the start of a line?
2023-01-08 20:36:35 +0100 <boxscape_> no :(
2023-01-08 20:36:53 +0100 <tomsmeding> weechat > kiwiirc
2023-01-08 20:37:03 +0100 <tomsmeding> takes a bit more setup, granted :p
2023-01-08 20:38:07 +0100 <boxscape_> I have used it in the past yeah
2023-01-08 20:39:08 +0100scoopahdoopah(~quassel@050-089-109-059.res.spectrum.com)
2023-01-08 20:41:20 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2023-01-08 20:41:56 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2023-01-08 20:44:12 +0100accord(uid568320@id-568320.hampstead.irccloud.com)
2023-01-08 20:45:59 +0100boxscape(~boxscape@81.191.27.107)
2023-01-08 20:46:03 +0100boxscape(~boxscape@81.191.27.107) (Remote host closed the connection)
2023-01-08 20:51:28 +0100anon(~anon@77-161-12-199.fixed.kpn.net) (Quit: leaving)
2023-01-08 20:53:24 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2023-01-08 20:53:59 +0100boxscape_(~boxscape_@81.191.27.107) (Quit: Connection closed)
2023-01-08 20:54:08 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 20:54:45 +0100boxscape_(~boxscape_@81.191.27.107)
2023-01-08 20:55:24 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-08 20:56:32 +0100califax(~califax@user/califx)
2023-01-08 20:59:27 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2023-01-08 21:01:08 +0100sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-01-08 21:01:54 +0100instantaphex(~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2023-01-08 21:02:02 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk) (Quit: WeeChat 3.7.1)
2023-01-08 21:05:14 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2023-01-08 21:07:34 +0100Sgeo(~Sgeo@user/sgeo)
2023-01-08 21:07:42 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net)
2023-01-08 21:13:19 +0100talismanick(~talismani@45-23-184-231.lightspeed.frokca.sbcglobal.net)
2023-01-08 21:15:26 +0100gmg(~user@user/gehmehgeh)
2023-01-08 21:19:03 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-08 21:19:54 +0100mizlan(~mizlan@c-67-169-7-31.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
2023-01-08 21:20:04 +0100gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-01-08 21:24:38 +0100nehsou^(~nehsou@76.145.190.81) (Remote host closed the connection)
2023-01-08 21:26:48 +0100hashn3rd(~hashn3rd@ip72-221-42-80.ks.ks.cox.net) (Quit: Leaving.)
2023-01-08 21:27:30 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 21:32:24 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
2023-01-08 21:32:43 +0100califax(~califax@user/califx) (Remote host closed the connection)
2023-01-08 21:36:15 +0100califax(~califax@user/califx)
2023-01-08 21:41:32 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf) (Remote host closed the connection)
2023-01-08 21:45:11 +0100dextaa6(~DV@user/dextaa)
2023-01-08 21:47:24 +0100dextaa(~DV@user/dextaa) (Ping timeout: 260 seconds)
2023-01-08 21:47:24 +0100dextaa6dextaa
2023-01-08 21:55:50 +0100trev(~trev@user/trev) (Remote host closed the connection)
2023-01-08 21:57:54 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 21:58:04 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de)
2023-01-08 21:59:16 +0100eggplantade(~Eggplanta@2600:1700:38c5:d800:9c06:575b:efcb:5bf)
2023-01-08 22:00:04 +0100 <Inst_> tbh, i just realized this, and this is sort of a troll, but is it true that every Haskell function is technically a one-liner?
2023-01-08 22:00:11 +0100 <Inst_> expression-based language
2023-01-08 22:00:14 +0100lewisje(~lewisje@2001:470:1f11:14e:1753:f4c6:e607:e65f)
2023-01-08 22:00:41 +0100 <Inst_> well, not true
2023-01-08 22:00:45 +0100 <Inst_> where clauses, let clauses
2023-01-08 22:00:48 +0100 <Inst_> erm, let expressions
2023-01-08 22:01:11 +0100 <geekosaur> those are one-liners too. use braces instead of layout
2023-01-08 22:01:15 +0100wroathe(~wroathe@50.205.197.50)
2023-01-08 22:01:15 +0100wroathe(~wroathe@50.205.197.50) (Changing host)
2023-01-08 22:01:15 +0100wroathe(~wroathe@user/wroathe)
2023-01-08 22:01:54 +0100 <geekosaur> also they're mostly optional conveniences
2023-01-08 22:02:37 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 268 seconds)
2023-01-08 22:03:10 +0100epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2023-01-08 22:05:48 +0100 <[exa]> unless you go for something unwieldy like C preprocessor or python, most reasonable languages can be smashed into a single line
2023-01-08 22:06:18 +0100 <[exa]> that said, haskell functions really tend to be oneline much more often by default, so I guess we still win
2023-01-08 22:06:53 +0100 <dolio> You can put an entire module on one line, I think. But I wouldn't recommend it.
2023-01-08 22:06:55 +0100 <geekosaur> I think Inst_ meant conceptually, i.e. not counting continuation lines
2023-01-08 22:07:29 +0100Inst_Inst
2023-01-08 22:07:46 +0100 <Inst> Yeah, I know one-liner is derisive in production circles
2023-01-08 22:07:54 +0100 <Inst> "looks cool, impossible to understand and unmaintainable"
2023-01-08 22:09:26 +0100 <[exa]> depends on whether oneliners are a result of good engineering or just golfing
2023-01-08 22:09:57 +0100 <[exa]> also if the type counts, we actually have twoliners
2023-01-08 22:12:04 +0100 <Inst> just trying to understand why Haskell is so different
2023-01-08 22:12:11 +0100 <Inst> i just had a talk with someone, maybe he was drunk
2023-01-08 22:12:31 +0100 <Inst> he's working at an educational firm in Sub-Saharan Africa
2023-01-08 22:12:36 +0100 <geekosaur> I think a lot of it is abstraction
2023-01-08 22:12:46 +0100 <Inst> they're actually very successful and have shown meteoric expansion
2023-01-08 22:12:52 +0100 <Inst> he's thinking about doing a Haskell project
2023-01-08 22:13:11 +0100 <Inst> he's like incredibly confident his team will have 0 problems with Haskell
2023-01-08 22:13:12 +0100 <hpc> there's two different types of one-liners people talk about, that both are called the same thing
2023-01-08 22:13:21 +0100 <hpc> there's "one line of code" one-liners
2023-01-08 22:13:30 +0100 <hpc> and "one line of communicating with the programmer reading your code" one-liners
2023-01-08 22:13:54 +0100 <[exa]> one-thoughts
2023-01-08 22:13:59 +0100 <hpc> the output of @pl doesn't tell anyone anything most of the time, but...
2023-01-08 22:14:05 +0100 <hpc> hah, that's a good way to put it
2023-01-08 22:14:06 +0100kenaryn(~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr)
2023-01-08 22:14:36 +0100 <hpc> but yeah, haskell is good at those one-thought one-liners
2023-01-08 22:14:50 +0100 <Inst> maybe it's the wrong way to think of Haskell code as one-liners, i.e, a line is usually a statement in a traditional, imperative language
2023-01-08 22:15:14 +0100 <hpc> and it's sort of where "a monad is just a monoid in the category of endofunctors" stops being a joke, if you say it in a university math department
2023-01-08 22:15:15 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 22:15:34 +0100 <hpc> as long as you stick to the "language" of who is going to read your code, you can say a lot in very few words or function calls
2023-01-08 22:15:53 +0100 <Inst> atomically, all languages have as their fundamental unit the lexeme
2023-01-08 22:15:58 +0100 <Inst> that's sort of by definition
2023-01-08 22:16:10 +0100 <[exa]> it's like math, you know how stuff works in nature but it takes years to extract a rememberable concept that fits a space for 1 non-scary formula
2023-01-08 22:16:16 +0100 <mauke> well ...
2023-01-08 22:16:25 +0100 <Inst> but in an imperative language, the basic composition of lexemes would be a statement, in Haskell, it'd be a function or operator application, no?
2023-01-08 22:17:05 +0100 <Inst> so then the 1 liner comparison fails
2023-01-08 22:17:39 +0100 <mauke> I can think of an imperative language without statements
2023-01-08 22:17:51 +0100 <Inst> assembly? machine code?
2023-01-08 22:18:04 +0100 <[exa]> c++ `;` isn't an operator??? /me disappoint
2023-01-08 22:18:12 +0100 <mauke> that was my first thought, but you still have instructions there
2023-01-08 22:18:16 +0100 <mauke> but then I remembered False
2023-01-08 22:18:43 +0100 <mauke> (named after the language author's favorite boolean value)
2023-01-08 22:19:31 +0100 <mauke> it's stack based, so I guess you could say each character is its own statement
2023-01-08 22:19:52 +0100 <[exa]> re formal systems without statements&lexemes: Scratch, finite state machine diagrams, flowcharts, LaTeX
2023-01-08 22:19:57 +0100kenaryn(~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving)
2023-01-08 22:20:09 +0100 <mauke> ... Piet?
2023-01-08 22:20:37 +0100 <[exa]> (and there is something that interprets literal freakin bitmaps)
2023-01-08 22:20:47 +0100 <mauke> yeah, Piet
2023-01-08 22:20:55 +0100 <[exa]> ah, nice
2023-01-08 22:21:56 +0100 <[exa]> (wasn't it called differently some years ago?)
2023-01-08 22:22:07 +0100 <mauke> I've personally written a language/interpreter that has statements (kind of), but I have no idea where I'd even start writing a formal grammar for it
2023-01-08 22:22:08 +0100 <mauke> because it has no syntax errors
2023-01-08 22:22:17 +0100talismanick(~talismani@45-23-184-231.lightspeed.frokca.sbcglobal.net) (Read error: Connection reset by peer)
2023-01-08 22:22:35 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2023-01-08 22:22:38 +0100 <geekosaur> there's two of them that take their names from the same place: Piet and Mondrian
2023-01-08 22:23:25 +0100 <monochrom> In practice my functions are multi-line but not too many lines.
2023-01-08 22:23:26 +0100 <mauke> similarly, there are three languages that share a common name: Haskell, B, Curry
2023-01-08 22:24:01 +0100 <hpc> mauke: by that standard tolkien has 3 languages named after him too
2023-01-08 22:24:30 +0100 <geekosaur> someone missed a chance to name a language Brooks
2023-01-08 22:24:59 +0100boxscape_(~boxscape_@81.191.27.107) (Ping timeout: 248 seconds)
2023-01-08 22:25:11 +0100 <mauke> JRPG Torkelson? https://www.youtube.com/watch?v=HHoJSgq6mqc
2023-01-08 22:26:14 +0100 <hpc> geekosaur: someone did, but it's hard to find references to it now
2023-01-08 22:26:53 +0100 <Inst> is a function application analogous to a statement?
2023-01-08 22:27:03 +0100 <Inst> as a unit of thinking?
2023-01-08 22:27:27 +0100 <[exa]> probably a repost here but the Pi program here is absolute pure gold: https://www.dangermouse.net/esoteric/piet/samples.html
2023-01-08 22:28:34 +0100 <monochrom> You will find that in programming there are tons of units of thinking, some large some small some recursive.
2023-01-08 22:28:52 +0100 <monochrom> In other words the answer is "yes but tautological".
2023-01-08 22:29:47 +0100 <[exa]> Inst: you're thinking about what things _are_. Things are not, unless something interprets them, and it depends a lot on who interprets the statements and function applications. Are things in a `do` statements, or applications of >> and >>= ? Are applications still applications if interpreted in a completely statementy RTS?
2023-01-08 22:30:10 +0100 <Inst> Haskell2010 says they're statements :)
2023-01-08 22:30:44 +0100 <monochrom> [exa], in real conversations there is always a chosen interpretation by context or consensus.
2023-01-08 22:30:48 +0100 <Inst> sorry, i won't waste your time, illness acting up a bit, that's all
2023-01-08 22:31:29 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-01-08 22:31:53 +0100 <monochrom> So for example in #haskell it's usually Haskel2010 or GHC or GHC2021
2023-01-08 22:31:53 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2023-01-08 22:31:58 +0100 <[exa]> (np I was trying to highlight the relativeness of all existence :] )
2023-01-08 22:31:59 +0100johnw_(~johnw@2600:1700:cf00:db0:c9ed:4d36:cb4c:4c99)
2023-01-08 22:32:08 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 22:32:26 +0100 <monochrom> Sure! You also find me harping "social construct" more often lately :D
2023-01-08 22:32:48 +0100Lord_of_Life_Lord_of_Life
2023-01-08 22:32:52 +0100johnw(~johnw@2600:1700:cf00:db0:1:83a7:8879:1baf) (Ping timeout: 252 seconds)
2023-01-08 22:33:06 +0100 <Inst> i'm just trying to figure out why people find it so hard to grok Haskell, or specifically, why it's hard for them to grok an expression-styled mode of programming, the initial guess was because Haskell code, as expression-based, is often like a one-liner, and they don't know how to read such a language
2023-01-08 22:33:08 +0100 <monochrom> I gave a talk on intuitionistic logic and why the Kripke semantics makes sense for it. That corrupted me greatly.
2023-01-08 22:33:24 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2023-01-08 22:33:26 +0100 <[exa]> :]
2023-01-08 22:34:11 +0100 <Inst> then the next guess was that expression-based programming is terser than what they're used to, or that they have no idea how to break up and parse an expression
2023-01-08 22:35:05 +0100 <mauke> ah, yes: "Naturally, a more accurate value can be obtained by using a bigger program."
2023-01-08 22:35:22 +0100 <monochrom> Inst, you are looking at a self-selection bias. Your "people" should be corrected to "people who self-chose to be programmers" and then suddenly you realize that this demography chose programming precisely because they hate math.
2023-01-08 22:35:56 +0100Ram-Z(~Ram-Z@li1814-254.members.linode.com) (Ping timeout: 255 seconds)
2023-01-08 22:36:03 +0100 <[exa]> Inst: I often think that it's something like a command indirection, normally in programming languages you give a command and you see a result; in haskell you describe the way the commands will get given and only after some indirection (what does lazily trigger later? how does IO evaluate to this point?) you observe the result. Same applies to people learning to manage other people to do work.
2023-01-08 22:36:12 +0100 <monochrom> Just look at how many of them ask "how to get rid of parentheses".
2023-01-08 22:36:13 +0100 <dolio> I think you'll find that people have trouble understanding programming.
2023-01-08 22:36:20 +0100 <Inst> and somehow weren't weeded out by 4 semesters of calculus in uni
2023-01-08 22:36:27 +0100 <Inst> + discrete mathematics
2023-01-08 22:36:49 +0100 <dolio> Haskell is just a special case.
2023-01-08 22:37:02 +0100 <[exa]> dolio: lol +1
2023-01-08 22:37:17 +0100ddellacosta(~ddellacos@static-198-44-136-50.cust.tzulo.com)
2023-01-08 22:37:37 +0100 <monochrom> Well yes I teach a 3rd year course and I use Haskell heavily. My students survived all that calculus and discrete math, so now I'm looking at the survival bias that my students grok Haskell just fine, some of them even report that they like it.
2023-01-08 22:38:23 +0100 <dolio> And the ones that complain the most about Haskell are those that already learned to program using something else, but their understanding of that isn't helping them as much as they think it ought to. And they forgot how hard it was to originally learn programming.
2023-01-08 22:39:04 +0100 <monochrom> In fact those students who had trouble with the State monad explicitly asked me "could you show me expanding the expressions" and so I did and they were like "that helps".
2023-01-08 22:39:28 +0100 <mauke> [exa]: https://www.ioccc.org/1988/westley.fix.c
2023-01-08 22:39:29 +0100Ram-Z(~Ram-Z@li1814-254.members.linode.com)
2023-01-08 22:39:37 +0100 <Inst> i guess the subsaharan african guy should be fine
2023-01-08 22:39:46 +0100 <Inst> the place where he gets his uni grads from, i'm told
2023-01-08 22:39:51 +0100 <monochrom> But like I said, I don't expect to replicate this success outside my niche demography.
2023-01-08 22:39:58 +0100 <Inst> their CS program is a combination of mathematics and business, and they refuse to teach python / java etc as a waste of time
2023-01-08 22:40:18 +0100 <Inst> presumably under the assumption that python / java etc can be learned on your own
2023-01-08 22:41:13 +0100 <monochrom> Just look at discourse.haskell.org, there is a learner klequis, he usually understands other people's wordy drawn-out explanations better than my cut-to-the-mustard algebra explanations.
2023-01-08 22:41:55 +0100Ram-Z(~Ram-Z@li1814-254.members.linode.com) (Client Quit)
2023-01-08 22:41:58 +0100 <monochrom> Oh management? That makes sense.
2023-01-08 22:42:20 +0100 <monochrom> A manager hires a programmer. A manager doesn't learn a programming language; that would be dumb.
2023-01-08 22:42:50 +0100 <[exa]> mauke: oh my that's so cute
2023-01-08 22:43:30 +0100 <Inst> nah, his description was national
2023-01-08 22:43:37 +0100 <Inst> maybe C? he was talking South Africa
2023-01-08 22:46:06 +0100 <monochrom> Alternatively you're just looking at another interpretation of "CS"---that there are a lot of intellectual topics so programming is only a very small part.
2023-01-08 22:46:10 +0100Ram-Z(Ram-Z@2a01:7e01::f03c:91ff:fe57:d2df)
2023-01-08 22:46:21 +0100 <monochrom> For example Dijkstra would (did) think that.
2023-01-08 22:47:41 +0100 <monochrom> Today most universities are job-oriented, but once upon a time people were more ideal, "CS" was not vocational training.
2023-01-08 22:48:11 +0100 <geekosaur> depends on the university though
2023-01-08 22:48:32 +0100 <monochrom> (And the "most universities are job-oriented" applies to many more areas than CS, too.)
2023-01-08 22:48:38 +0100johnw_(~johnw@2600:1700:cf00:db0:c9ed:4d36:cb4c:4c99) (Ping timeout: 246 seconds)
2023-01-08 22:48:39 +0100 <geekosaur> in 1983 my "CS" choices were Fortran (engineering track) or COBOL (business track)
2023-01-08 22:49:42 +0100 <monochrom> Yeah, "once upon a time" was even older than that :)
2023-01-08 22:49:44 +0100 <monochrom> or :(
2023-01-08 22:50:27 +0100 <monochrom> Don't despair! Knuth says: the best theory is inspired by practice, the best practice is inspired by theory. :)
2023-01-08 22:50:58 +0100biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2023-01-08 22:51:05 +0100 <[exa]> still, much more people is now doing actual CS than in ye olden days
2023-01-08 22:51:30 +0100 <[exa]> labeling pop programming courses as CS I don't like either, but what can we do, that's the nature of names
2023-01-08 22:52:15 +0100titibandit1(~titibandi@xdsl-87-78-235-220.nc.de) (Remote host closed the connection)
2023-01-08 22:55:42 +0100biberu(~biberu@user/biberu)
2023-01-08 22:58:07 +0100 <Inst> What's the tradeoff between HTTP and http-client?
2023-01-08 22:59:20 +0100 <monochrom> I am more optimistic, I'm happy that people learn the basics of programming, and even FIFO vs LIFO vs linked lists vs tress (at which point it counts as CS, even though very small and very beginner).
2023-01-08 23:00:32 +0100 <Inst> ah, HTTP doesn't support HTTPS
2023-01-08 23:05:41 +0100 <mauke> [exa]++ # made me think and actually understand westley.c for the first time
2023-01-08 23:09:23 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-01-08 23:18:46 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-08 23:21:40 +0100freeside(~mengwong@103.252.202.159) (Ping timeout: 260 seconds)
2023-01-08 23:22:48 +0100jinsun__(~jinsun@user/jinsun)
2023-01-08 23:22:48 +0100jinsun(~jinsun@user/jinsun) (Killed (mercury.libera.chat (Nickname regained by services)))
2023-01-08 23:22:48 +0100jinsun__jinsun
2023-01-08 23:32:38 +0100wroathe(~wroathe@50.205.197.50)
2023-01-08 23:32:38 +0100wroathe(~wroathe@50.205.197.50) (Changing host)
2023-01-08 23:32:38 +0100wroathe(~wroathe@user/wroathe)
2023-01-08 23:34:17 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-01-08 23:35:31 +0100hgolden(~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection)
2023-01-08 23:35:47 +0100fizbin(~fizbin@user/fizbin) (Remote host closed the connection)
2023-01-08 23:36:06 +0100fizbin(~fizbin@user/fizbin)
2023-01-08 23:36:34 +0100freeside(~mengwong@103.252.202.159)
2023-01-08 23:39:11 +0100justachejustReddy
2023-01-08 23:39:26 +0100caryhartline(~caryhartl@2600:1700:2d0:8d30:31be:b9b2:d1e5:a2dd) (Quit: caryhartline)
2023-01-08 23:40:48 +0100caryhartline(~caryhartl@2600:1700:2d0:8d30:d067:b8ad:4af0:b156)
2023-01-08 23:43:37 +0100Luj3(~Luj@2a01:e0a:5f9:9681:df7f:d915:e87b:faad) (Quit: The Lounge - https://thelounge.chat)
2023-01-08 23:47:06 +0100wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-01-08 23:47:34 +0100adium(adium@user/adium) (Ping timeout: 260 seconds)
2023-01-08 23:48:10 +0100Luj3(~Luj@2a01:e0a:5f9:9681:4a08:e5d4:539b:20f)
2023-01-08 23:48:34 +0100adium(adium@user/adium)
2023-01-08 23:48:36 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2023-01-08 23:52:11 +0100caryhartline(~caryhartl@2600:1700:2d0:8d30:d067:b8ad:4af0:b156) (Quit: caryhartline)
2023-01-08 23:56:50 +0100jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2023-01-08 23:57:05 +0100jinsun(~jinsun@user/jinsun)
2023-01-08 23:59:54 +0100jinsun__(~jinsun@user/jinsun)
2023-01-08 23:59:54 +0100jinsun(~jinsun@user/jinsun) (Killed (zinc.libera.chat (Nickname regained by services)))
2023-01-08 23:59:54 +0100jinsun__jinsun