Home liberachat/#haskell: Logs Calendar

Logs on 2023-01-16 (liberachat/#haskell)

00:04:42 fizbin_ joins (~fizbin@user/fizbin)
00:05:34 × Guest94 quits (~Guest94@2600:8805:d807:e00:9189:eb63:2ecf:8f6e) (Quit: Client closed)
00:08:08 × acidjnk quits (~acidjnk@p54ad56b7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
00:08:25 × fizbin quits (~fizbin@user/fizbin) (Ping timeout: 252 seconds)
00:11:30 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
00:13:47 nehsou^ joins (~nehsou@76.145.190.81)
00:16:22 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
00:17:47 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
00:20:50 pagnol joins (~user@213-205-209-87.ftth.glasoperator.nl)
00:20:50 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
00:22:13 <pagnol> I am working with a very flake HTTP API, and need to make a number of successive calls that build on one another
00:22:51 <pagnol> if any intermediate calls fail, then I need to undo the previous ones
00:23:10 <pagnol> I was just wondering if it would make sense to make a monad for this
00:23:29 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
00:30:25 <anatta> not an advanced haskell user by any means, but it sounds like you could use the state monad and just keep a list of actions as state(?)
00:30:46 <anatta> and if/when it crashes just sequence the actions
00:34:52 <pagnol> I could do that, but I'm interested in finding a way that does it implicitly
00:35:22 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
00:35:23 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
00:35:51 <pagnol> the implementation would definitely have to keep track of the resource ids of everything that was created before
00:35:53 <DigitalKiwi> does undoing a request involve an additional http request
00:35:59 <pagnol> yes
00:36:15 <pagnol> if that also fails... then I guess I'm screwed
00:36:17 <DigitalKiwi> what happens if that one fails lol
00:36:34 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
00:36:35 <anatta> I see, well - then that's outside my area of knowledge, sorry. Maybe there is some transaction monad somewhere
00:36:52 <pagnol> I'd retry a few times and ultimately give up
00:37:01 × Techcable quits (~Techcable@user/Techcable) (Ping timeout: 252 seconds)
00:37:13 <pagnol> transaction monad sounds like a useful keyword, I'll google around a bit
00:38:15 <DigitalKiwi> stm == software transactional monad /s
00:39:24 <DigitalKiwi> https://wiki.haskell.org/New_monads/MonadAdvSTM#Single_Threaded_Code
00:39:32 <DigitalKiwi> https://wiki.haskell.org/Software_transactional_memory
00:40:20 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds)
00:40:21 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:6450:b99c:346:15e5) (Remote host closed the connection)
00:46:36 Techcable joins (~Techcable@user/Techcable)
00:55:36 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
00:56:01 azimut joins (~azimut@gateway/tor-sasl/azimut)
00:56:48 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
00:59:08 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
00:59:09 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
00:59:09 wroathe joins (~wroathe@user/wroathe)
01:01:53 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
01:03:15 × kee quits (~~kee@user/wizzwizz4) (Read error: Connection reset by peer)
01:03:45 kee joins (~~kee@user/wizzwizz4)
01:10:43 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:14:06 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
01:15:28 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
01:16:50 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:19:54 <Artem[m]> Is there an array package that has an array type with both: 1) generic indexing (or at least allowing to index with 2-tuples; 2) sufficiently reach utility list, at the level of, for example, Data.List (to be more concrete, though, I need at least `elemIndicies`). From my research, array and massiv allows 1) but not 2). Vectors have a good shot at 2) but only integer indicies. Anything I missed?
01:40:43 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
01:41:11 × tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
01:41:31 × fizbin_ quits (~fizbin@user/fizbin) (Remote host closed the connection)
01:41:50 fizbin_ joins (~fizbin@user/fizbin)
01:44:16 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
01:47:56 × xff0x_ quits (~xff0x@2405:6580:b080:900:54f9:caff:68f9:e2a8) (Ping timeout: 255 seconds)
01:52:36 × zeenk quits (~zeenk@2a02:2f04:a014:8700::7fe) (Remote host closed the connection)
01:55:35 falafel joins (~falafel@2607:fb91:1449:aea0:1d89:a8de:6784:a10f)
01:56:32 × fizbin_ quits (~fizbin@user/fizbin) (Ping timeout: 265 seconds)
01:56:37 × pagnol quits (~user@213-205-209-87.ftth.glasoperator.nl) (Ping timeout: 252 seconds)
01:58:19 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1)
01:58:56 × Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
01:59:09 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
01:59:43 × oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Client Quit)
02:03:03 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
02:03:34 talismanick joins (~talismani@2601:200:c181:4c40::1be2)
02:03:35 chiselfu1e joins (~chiselfus@user/chiselfuse)
02:06:44 <talismanick> Is it safe to enable OverloadedLabels everywhere like OverloadedStrings?
02:08:53 × tinwood quits (~tinwood@canonical/tinwood) (Remote host closed the connection)
02:09:36 andreabedini joins (~andreabed@2a05:dfc7:7780:1000:8153:ee15:6038:df94)
02:11:56 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
02:11:56 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
02:11:56 tinwood joins (~tinwood@canonical/tinwood)
02:14:24 jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
02:18:46 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 265 seconds)
02:19:59 <maerwald[m]> talismanick: it's not safe to enable OverloadedStrings
02:22:04 × crns quits (~netcrns@user/crns) (Quit: brb)
02:22:20 crns joins (~netcrns@user/crns)
02:22:57 × crns quits (~netcrns@user/crns) (Client Quit)
02:28:07 crns joins (~netcrns@p4ff5e2c3.dip0.t-ipconnect.de)
02:28:07 × crns quits (~netcrns@p4ff5e2c3.dip0.t-ipconnect.de) (Changing host)
02:28:07 crns joins (~netcrns@user/crns)
02:34:25 × beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 268 seconds)
02:37:19 jmorris joins (uid537181@id-537181.uxbridge.irccloud.com)
02:38:46 xff0x_ joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
02:46:01 Umeaboy joins (~Umeaboy@94-255-145-133.cust.bredband2.com)
02:56:57 <talismanick> maerwald[m]: Okay, how about OverloadedLabels? And, what's unsafe about OverloadedStrings? It's one of the recommended global settings in https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/
03:00:00 × talismanick quits (~talismani@2601:200:c181:4c40::1be2) (Read error: Connection reset by peer)
03:00:24 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:04:47 × jero98772 quits (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) (Remote host closed the connection)
03:08:05 Guest13 joins (~Guest13@49.37.243.106)
03:08:13 × Guest13 quits (~Guest13@49.37.243.106) (Client Quit)
03:11:48 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
03:19:18 <Inst> is there an idiom for defining one-time use datatypes?
03:19:34 <Inst> Haskell won't accept data _MyType
03:19:54 <maerwald[m]> talismanick: because the ByteString instance is broken ans truncates your unicode literals
03:20:08 <maerwald[m]> That opinionated guide then is bad
03:20:24 razetime joins (~Thunderbi@117.193.2.82)
03:20:38 <maerwald[m]> Am not sure about OverloadedLabels
03:22:26 <andreabedini> IMHO the ByteString IsString instance is bad, not the guide :D
03:28:37 <maerwald[m]> andreabedini: I don't know. If you suggest to use features that rely on broken instances...
03:29:49 mimmy_ joins (~mimmy@142.126.70.245)
03:30:49 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
03:31:56 <andreabedini> TBH Alexis' guide doesn't suggest to use OverloadedStrings, it suggests to come up with an agreed set of extensions in your team and stick does in default-extensions. OverloadedString is incidentally part of her list of default-extensions.
03:32:34 <andreabedini> ah no, there's another section below, where she says she things it's not optional :D
03:32:35 <andreabedini> my abd
03:32:38 <andreabedini> *bad
03:34:48 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
03:36:47 × waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds)
03:40:05 × ft quits (~ft@p4fc2a257.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
03:41:02 ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de)
03:45:32 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
03:49:59 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 264 seconds)
03:53:00 <Axman6> @hoogle (a -> b -> m b) -> b -> [a] -> m b
03:53:01 <lambdabot> DsMonad foldrM :: Monad m => (b -> a -> m a) -> a -> [b] -> m a
03:53:01 <lambdabot> Data.Foldable foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
03:53:01 <lambdabot> Protolude foldrM :: (Foldable t, Monad m) => (a -> b -> m b) -> b -> t a -> m b
03:54:23 king_gs joins (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a)
03:55:23 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
03:58:17 × td_ quits (~td@83.135.9.57) (Ping timeout: 268 seconds)
03:58:39 t25 joins (~t@2600:8805:d807:e00:9189:eb63:2ecf:8f6e)
03:59:43 td_ joins (~td@83.135.9.45)
04:00:00 <jackdk> Axman6: wyd?
04:01:28 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
04:02:47 <Axman6> trying to make GHC faster while not breaking functionality - proving difficult
04:03:41 <DigitalKiwi> faster cpu
04:05:29 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
04:10:19 <t25> ^ money solves everything
04:11:13 <Axman6> basically the code that generates LLVM output is.. painful because it needs to be able to generate the fast HDoc type but also if a flag is set, it also needs to produce the slow SDoc for pretty printing
04:16:05 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
04:18:56 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:22:07 <Axman6> I'm sure there's a simpler way to write this code: https://paste.tomsmeding.com/5Jc8tgb6
04:22:15 <Axman6> just having a brainfart
04:22:40 <Axman6> it's nearly foldMap but I need to use ($$) instead of (<>) which adds new lines between documents
04:25:11 × king_gs quits (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a) (Remote host closed the connection)
04:25:20 <jackdk> Axman6: https://hackage.haskell.org/package/reflection-2.1.6/docs/Data-Reflection.html#v:foldMapBy but what if you defined a newtype with a monoid instance?
04:25:30 king_gs joins (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a)
04:26:08 rnat joins (uid73555@id-73555.lymington.irccloud.com)
04:28:33 <Axman6> it only needs to be used once, and this is inside GHC so no external packages
04:28:35 × Inst quits (~Inst@2601:6c4:4081:54f0:c85a:c40d:a7df:1361) (Ping timeout: 260 seconds)
04:33:03 <Axman6> I guess I can just use mapM and unzip
04:33:14 <jackdk> Yeah I was being a twit when I brought up the big hammer. But seriously, vertical composition monoid seems like a useful thing to have on isdoc, in case anyone else wants to do something similar
04:38:01 <DigitalKiwi> does ghc use lens
04:52:34 <Axman6> How do you define infix functions in a class whose import is qualified? instance Semigroup.Semigroup HLine where Semigroup.(<>) = (<>) -- the module defines its own (<>)
04:53:30 <Axman6> (Semigroup.<>) also doesn't work
04:53:53 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
04:55:39 × t25 quits (~t@2600:8805:d807:e00:9189:eb63:2ecf:8f6e) (Quit: Client closed)
04:56:26 <[Leary]> Axman6: You just don't qualify, iirc. The class has already been specified, so there's no ambiguity.
04:57:07 <Axman6> (<>) = (<>) looks super wrong, and probably recursive though
04:57:35 <[Leary]> Oh, you can qualify on the RHS.
04:59:00 <Axman6> with the name of the module I'm working in?
04:59:10 <[Leary]> Yeah.
04:59:22 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
04:59:26 <[Leary]> Though I don't think you need to. It's just for clarity.
04:59:57 <Axman6> (<>) = (GHC.Utils.Outputable.<>) looks like it works
04:59:59 eruditass joins (uid248673@id-248673.uxbridge.irccloud.com)
05:01:07 <Axman6> hmm, actually HDoc can't even be a legal Monoid, since the ($$) operator puts a new line between the arguments, so mempty <> x /= x
05:01:20 <Axman6> I guess it is a legal semigroup though
05:02:46 <Axman6> and I'm not evenm going to use the Semigroup instance, so I'll get rid of it. Fun exercise, would not recommend
05:02:59 panovia joins (~user@user/siracusa)
05:08:43 × king_gs quits (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a) (Ping timeout: 252 seconds)
05:23:34 × falafel quits (~falafel@2607:fb91:1449:aea0:1d89:a8de:6784:a10f) (Ping timeout: 252 seconds)
05:25:38 irrgit__ joins (~irrgit@176.113.74.138)
05:28:54 × irrgit_ quits (~irrgit@146.70.27.250) (Ping timeout: 255 seconds)
05:29:25 × zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
05:30:44 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
05:31:59 zaquest joins (~notzaques@5.130.79.72)
05:32:51 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds)
05:33:24 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
05:34:50 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
05:35:11 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 246 seconds)
05:36:07 Xeroine joins (~Xeroine@user/xeroine)
05:40:19 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds)
05:50:28 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 265 seconds)
05:51:00 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
05:52:40 <wroathe> Say I want to build up a Text value one character at a time both space and time efficiently, is there an idiom for doing so? The use case is that I'm playing with Megaparsec, and all of the O(n) text appends are making me wonder if there's a way to pre-allocate a buffer, append my characters, and then copy that buffer into a text value
05:53:38 <wroathe> If the GHC optimizer is already capable of doing this under the hood I'd be very impressed
05:53:49 <monochrom> Data.Text.Lazy.Builder
05:55:39 <wroathe> monochrom: Awesome. Thanks.
06:03:31 × Umeaboy quits (~Umeaboy@94-255-145-133.cust.bredband2.com) (Quit: Leaving)
06:05:20 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
06:10:00 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
06:22:27 mbuf joins (~Shakthi@49.205.86.110)
06:27:14 themc47 joins (~mc47@xmonad/TheMC47)
06:27:28 × mc47 quits (~mc47@xmonad/TheMC47) (Read error: Connection reset by peer)
06:29:46 king_gs joins (~Thunderbi@187.201.20.38)
06:32:25 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:35:45 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
06:39:21 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
06:40:32 ec joins (~ec@gateway/tor-sasl/ec)
06:41:30 thongpv joins (~thongpv87@123.23.88.191)
06:42:24 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
06:46:01 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
06:50:03 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
06:50:03 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
06:50:03 finn_elija is now known as FinnElija
06:54:38 cheater joins (~Username@user/cheater)
06:55:51 kenran joins (~user@user/kenran)
07:00:59 × cheater quits (~Username@user/cheater) (Ping timeout: 246 seconds)
07:04:45 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
07:05:06 cheater joins (~Username@user/cheater)
07:13:44 × king_gs quits (~Thunderbi@187.201.20.38) (Read error: Connection reset by peer)
07:13:49 king_gs1 joins (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a)
07:15:12 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
07:15:51 × rnat quits (uid73555@id-73555.lymington.irccloud.com) (Quit: Connection closed for inactivity)
07:15:54 cheater joins (~Username@user/cheater)
07:16:07 king_gs1 is now known as king_gs
07:18:57 × lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
07:27:05 × jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
07:31:22 mimmy_ joins (~mimmy@142.126.70.245)
07:31:36 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
07:36:07 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 252 seconds)
07:37:15 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
07:42:07 × [_________] quits (~oos95GWG@user/oos95GWG) (Quit: [_________])
07:42:14 × riatre quits (~quassel@2001:310:6000:f::5198:1) (Ping timeout: 246 seconds)
07:42:20 riatre_ joins (~quassel@2001:310:6000:f::5198:1)
07:42:36 [_________] joins (~oos95GWG@user/oos95GWG)
07:43:51 × Unode quits (~Unode@194.94.44.220) (Quit: Not that cable)
07:44:07 × [_________] quits (~oos95GWG@user/oos95GWG) (Client Quit)
07:44:34 [_________] joins (~oos95GWG@user/oos95GWG)
07:44:34 Unode joins (~Unode@194.94.44.220)
07:44:46 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
07:45:30 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
07:46:06 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
07:46:20 × h2t quits (~h2t@user/h2t) (Quit: ZNC - https://znc.in)
07:46:34 h2t joins (~h2t@user/h2t)
07:47:50 × mmaruseacph2 quits (~mihai@198.199.98.239) (Ping timeout: 246 seconds)
07:48:04 mmaruseacph2 joins (~mihai@mihai.page)
07:48:32 × hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 246 seconds)
07:48:46 hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net)
07:52:25 mmhat joins (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de)
07:52:31 × mmhat quits (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
07:54:54 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
08:01:44 elbear joins (~lucian@86.127.154.189)
08:01:53 lortabac joins (~lortabac@2a01:e0a:541:b8f0:4844:f039:6c33:214c)
08:04:24 mmhat joins (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de)
08:10:14 fizbin_ joins (~fizbin@user/fizbin)
08:10:54 chele joins (~chele@user/chele)
08:13:46 cfricke joins (~cfricke@user/cfricke)
08:16:58 opticblast joins (~Thunderbi@2600:8800:400b:5d00:94d0:f448:a2c9:bc9e)
08:22:27 gmg joins (~user@user/gehmehgeh)
08:23:32 × mmhat quits (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8)
08:24:29 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
08:24:37 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
08:26:54 mmhat joins (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de)
08:27:51 × opticblast quits (~Thunderbi@2600:8800:400b:5d00:94d0:f448:a2c9:bc9e) (Ping timeout: 252 seconds)
08:28:33 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
08:28:58 × mmhat quits (~mmh@p200300f1c7123c12ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
08:31:09 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
08:32:47 × wroathe quits (~wroathe@user/wroathe) (Quit: leaving)
08:32:58 × king_gs quits (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a) (Remote host closed the connection)
08:33:17 king_gs joins (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a)
08:35:19 Midjak joins (~Midjak@82.66.147.146)
08:38:56 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
08:39:18 × shriekingnoise_ quits (~shrieking@186.137.175.87) (Ping timeout: 260 seconds)
08:39:39 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
08:43:30 coot joins (~coot@213.134.171.3)
08:46:54 acidjnk joins (~acidjnk@p200300d6e715c403a031d8a705e658ca.dip0.t-ipconnect.de)
08:48:27 merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl)
08:50:21 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
08:51:30 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
08:53:02 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
08:53:38 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 246 seconds)
08:54:22 jespada joins (~jespada@148.252.133.50)
08:55:23 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
08:55:26 opticblast joins (~Thunderbi@2600:8800:400b:5d00:94d0:f448:a2c9:bc9e)
08:56:04 avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32)
08:56:36 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
08:57:52 × razetime quits (~Thunderbi@117.193.2.82) (Remote host closed the connection)
09:07:14 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
09:09:07 enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7)
09:13:39 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
09:17:21 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
09:18:08 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds)
09:18:25 nschoe joins (~q@141.101.51.197)
09:19:48 gtdg joins (~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr)
09:21:39 × fizbin_ quits (~fizbin@user/fizbin) (Remote host closed the connection)
09:21:58 fizbin_ joins (~fizbin@user/fizbin)
09:28:23 × fizbin_ quits (~fizbin@user/fizbin) (Ping timeout: 264 seconds)
09:31:20 × opticblast quits (~Thunderbi@2600:8800:400b:5d00:94d0:f448:a2c9:bc9e) (Ping timeout: 260 seconds)
09:31:49 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
09:32:36 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Quit: Leaving.)
09:36:35 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
09:38:19 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
09:40:40 trev_ joins (~trev@109.252.35.99)
09:45:57 jespada_ joins (~jespada@148.252.133.50)
09:46:34 CiaoSen joins (~Jura@p200300c9570452002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
09:46:55 × jespada quits (~jespada@148.252.133.50) (Read error: Connection reset by peer)
09:46:58 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
09:48:15 elbear joins (~lucian@86.127.154.189)
09:51:25 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
09:52:13 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
09:52:36 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
09:52:37 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 265 seconds)
09:54:21 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
09:55:43 × ft quits (~ft@p4fc2a257.dip0.t-ipconnect.de) (Quit: leaving)
10:02:46 Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542)
10:08:22 × jespada_ quits (~jespada@148.252.133.50) (Read error: Connection reset by peer)
10:08:56 jespada joins (~jespada@148.252.133.50)
10:10:18 × jespada quits (~jespada@148.252.133.50) (Read error: Connection reset by peer)
10:14:56 jespada joins (~jespada@148.252.133.50)
10:15:32 cheater joins (~Username@user/cheater)
10:20:47 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
10:22:37 × acidjnk quits (~acidjnk@p200300d6e715c403a031d8a705e658ca.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
10:23:46 cheater joins (~Username@user/cheater)
10:26:10 × andreabedini quits (~andreabed@2a05:dfc7:7780:1000:8153:ee15:6038:df94) (Quit: WeeChat 3.7.1)
10:32:14 dhil joins (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net)
10:37:17 beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt)
10:38:35 × eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
10:39:43 elbear joins (~lucian@86.127.154.189)
10:40:13 __monty__ joins (~toonn@user/toonn)
10:42:35 mei joins (~mei@user/mei)
10:43:49 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
10:44:08 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 260 seconds)
10:44:38 × xff0x_ quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 272 seconds)
10:46:32 × mei_ quits (~mei@user/mei) (Ping timeout: 268 seconds)
10:46:41 ub joins (~Thunderbi@193.138.7.188)
10:47:51 × ubert quits (~Thunderbi@185.195.232.146) (Ping timeout: 260 seconds)
10:47:52 ub is now known as ubert
10:47:56 × jespada quits (~jespada@148.252.133.50) (Quit: Textual IRC Client: www.textualapp.com)
10:48:26 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
10:53:19 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:53:24 × king_gs quits (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a) (Quit: king_gs)
10:53:49 × thongpv quits (~thongpv87@123.23.88.191) (Ping timeout: 260 seconds)
10:53:51 × scoopahdoopah quits (~quassel@050-089-109-059.res.spectrum.com) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
10:55:17 acidjnk joins (~acidjnk@p200300d6e715c403c44d2e10962ec134.dip0.t-ipconnect.de)
10:56:15 king_gs joins (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a)
10:56:35 × vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in)
11:02:26 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
11:12:11 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
11:12:36 delYsid joins (~user@user/delYsid)
11:15:55 × teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 248 seconds)
11:17:08 × cheater quits (~Username@user/cheater) (Ping timeout: 246 seconds)
11:18:08 × coot quits (~coot@213.134.171.3) (Quit: coot)
11:19:38 × CiaoSen quits (~Jura@p200300c9570452002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
11:19:53 cheater joins (~Username@user/cheater)
11:21:53 cheater_ joins (~Username@user/cheater)
11:23:50 × king_gs quits (~Thunderbi@2806:103e:29:27ee:ec4e:20db:46a1:5e0a) (Quit: king_gs)
11:24:45 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
11:24:49 cheater_ is now known as cheater
11:28:27 × dhil quits (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) (Ping timeout: 268 seconds)
11:29:34 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
11:30:33 × mei quits (~mei@user/mei) (Quit: mei)
11:30:37 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
11:32:54 mimmy_ joins (~mimmy@142.126.70.245)
11:35:52 xff0x_ joins (~xff0x@2405:6580:b080:900:b37:9eab:7cc0:9b97)
11:38:09 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
11:39:04 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d14:f10:c58a:afef)
11:40:35 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
11:43:45 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d14:f10:c58a:afef) (Ping timeout: 260 seconds)
11:47:29 × iteratee quits (~kyle@162.218.222.107) (Ping timeout: 260 seconds)
11:53:09 Inst joins (~Inst@c-98-208-218-119.hsd1.fl.comcast.net)
12:05:42 alternateved joins (~user@staticline-31-183-174-39.toya.net.pl)
12:11:14 mei joins (~mei@user/mei)
12:15:11 CiaoSen joins (~Jura@p200300c9570452002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
12:17:54 azimut joins (~azimut@gateway/tor-sasl/azimut)
12:18:20 × trev_ quits (~trev@109.252.35.99) (Quit: trev_)
12:18:22 × mei quits (~mei@user/mei) (Ping timeout: 272 seconds)
12:18:33 trev_ joins (~trev@109-252-35-99.nat.spd-mgts.ru)
12:18:56 trev_ is now known as trev
12:19:09 × trev quits (~trev@109-252-35-99.nat.spd-mgts.ru) (Changing host)
12:19:09 trev joins (~trev@user/trev)
12:19:51 use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:69f9:e48c:7103:7ff9)
12:22:34 × enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq)
12:26:12 × kenran quits (~user@user/kenran) (Remote host closed the connection)
12:27:03 thongpv joins (~thongpv87@2001:ee0:5577:f0d0:7e44:a04c:94d6:ed7f)
12:42:02 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
12:43:37 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
12:52:20 mei joins (~mei@user/mei)
12:52:28 cheater_ joins (~Username@user/cheater)
12:53:27 × machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: leaving)
12:54:00 machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net)
12:54:03 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
12:54:47 ec joins (~ec@gateway/tor-sasl/ec)
12:55:21 cheater__ joins (~Username@user/cheater)
12:56:01 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
12:56:06 cheater__ is now known as cheater
12:58:25 × cheater_ quits (~Username@user/cheater) (Ping timeout: 252 seconds)
13:07:12 elbear joins (~lucian@86.127.154.189)
13:09:02 × laalyn quits (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net) (Quit: Client closed)
13:10:20 mei is now known as Guest1951
13:10:21 mei_ joins (~mei@user/mei)
13:10:21 × Guest1951 quits (~mei@user/mei) (Killed (copper.libera.chat (Nickname regained by services)))
13:10:21 mei_ is now known as mei
13:10:46 × AlexZenon quits (~alzenon@178.34.160.164) (Quit: ;-)
13:11:03 × Alex_test quits (~al_test@178.34.160.164) (Quit: ;-)
13:11:14 × AlexNoo quits (~AlexNoo@178.34.160.164) (Quit: Leaving)
13:12:03 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 268 seconds)
13:15:38 × jargon quits (~jargon@174-22-197-118.phnx.qwest.net) (Remote host closed the connection)
13:16:32 × sgarcia quits (sgarcia@swarm.znchost.com) (Ping timeout: 246 seconds)
13:16:43 × troydm quits (~troydm@user/troydm) (Ping timeout: 260 seconds)
13:18:08 sgarcia joins (sgarcia@swarm.znchost.com)
13:18:08 cheater_ joins (~Username@user/cheater)
13:19:53 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 256 seconds)
13:20:16 cheater__ joins (~Username@user/cheater)
13:20:43 × cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds)
13:20:50 cheater__ is now known as cheater
13:23:01 × cheater_ quits (~Username@user/cheater) (Ping timeout: 252 seconds)
13:24:59 Xeroine joins (~Xeroine@user/xeroine)
13:28:23 AlexNoo joins (~AlexNoo@178.34.160.164)
13:29:18 AlexZenon joins (~alzenon@178.34.160.164)
13:30:58 Alex_test joins (~al_test@178.34.160.164)
13:31:57 × phma quits (~phma@host-67-44-208-219.hnremote.net) (Read error: Connection reset by peer)
13:32:48 phma joins (phma@2001:5b0:211c:1148:cd31:3368:6dc4:8d0d)
13:36:21 manwithl- joins (~manwithlu@194.177.28.128)
13:37:30 × manwithluck quits (~manwithlu@194.177.28.176) (Ping timeout: 260 seconds)
13:41:37 × Alex_test quits (~al_test@178.34.160.164) (Quit: ;-)
13:41:52 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
13:42:59 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
13:44:11 elbear joins (~lucian@86.127.154.189)
13:45:13 × AlexZenon quits (~alzenon@178.34.160.164) (Quit: ;-)
13:45:55 tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl)
13:48:53 cheater_ joins (~Username@user/cheater)
13:50:13 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
13:50:25 AlexNoo_ joins (~AlexNoo@178.34.160.164)
13:50:27 Alex_test joins (~al_test@178.34.160.164)
13:51:10 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
13:51:18 cheater_ is now known as cheater
13:51:44 × Alex_test quits (~al_test@178.34.160.164) (Client Quit)
13:54:04 × AlexNoo quits (~AlexNoo@178.34.160.164) (Ping timeout: 260 seconds)
13:54:09 AlexNoo__ joins (~AlexNoo@178.34.160.164)
13:54:33 Alex_test joins (~al_test@178.34.160.164)
13:56:21 × Alex_test quits (~al_test@178.34.160.164) (Client Quit)
13:57:08 × AlexNoo_ quits (~AlexNoo@178.34.160.164) (Ping timeout: 246 seconds)
13:58:20 × gtdg quits (~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr) (Quit: Client closed)
13:59:53 Alex_test joins (~al_test@178.34.160.164)
14:00:34 × Inst quits (~Inst@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 252 seconds)
14:01:08 mimmy_ joins (~mimmy@142.126.70.245)
14:04:47 × Alex_test quits (~al_test@178.34.160.164) (Quit: ;-)
14:06:05 zer0bitz joins (~zer0bitz@2001:2003:f443:d600:dcf6:5e2e:6968:3bbf)
14:06:11 Lycurgus joins (~juan@user/Lycurgus)
14:07:14 zer0bitz_ joins (~zer0bitz@dsl-hkibng32-54f843-214.dhcp.inet.fi)
14:07:29 × mncheckm quits (~mncheck@193.224.205.254) (Remote host closed the connection)
14:09:26 AlexNoo joins (~AlexNoo@94.233.240.156)
14:09:56 Alex_test joins (~al_test@94.233.240.156)
14:10:28 × acidjnk quits (~acidjnk@p200300d6e715c403c44d2e10962ec134.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
14:10:33 × AlexNoo quits (~AlexNoo@94.233.240.156) (Read error: Connection reset by peer)
14:11:20 × zer0bitz quits (~zer0bitz@2001:2003:f443:d600:dcf6:5e2e:6968:3bbf) (Ping timeout: 252 seconds)
14:12:29 × AlexNoo__ quits (~AlexNoo@178.34.160.164) (Ping timeout: 268 seconds)
14:13:11 AlexNoo joins (~AlexNoo@94.233.240.156)
14:14:19 × Alex_test quits (~al_test@94.233.240.156) (Ping timeout: 252 seconds)
14:18:55 AlexZenon joins (~alzenon@94.233.240.156)
14:20:42 Alex_test joins (~al_test@94.233.240.156)
14:23:59 gtdg joins (~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr)
14:31:28 thegeekinside joins (~thegeekin@189.217.82.244)
14:32:12 × thegeekinside quits (~thegeekin@189.217.82.244) (Read error: Connection reset by peer)
14:33:43 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
14:34:19 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds)
14:35:49 mimmy__ joins (~mimmy@86.48.14.198)
14:36:39 × tdammers quits (~tdammers@77.109.72.175.res.static.edpnet.net) (Ping timeout: 260 seconds)
14:36:56 × mei quits (~mei@user/mei) (Remote host closed the connection)
14:37:27 Xeroine joins (~Xeroine@user/xeroine)
14:37:45 thegeekinside joins (~thegeekin@189.217.82.244)
14:38:45 × mimmy_ quits (~mimmy@142.126.70.245) (Ping timeout: 260 seconds)
14:43:58 mei joins (~mei@user/mei)
14:44:37 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
14:45:41 acidjnk joins (~acidjnk@p200300d6e715c403c44d2e10962ec134.dip0.t-ipconnect.de)
14:51:46 tdammers joins (~tdammers@77.109.72.175.res.static.edpnet.net)
14:52:01 Joao003 joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
14:53:01 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
14:54:26 × sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
14:54:33 sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
15:10:44 Inst joins (~Inst@2601:6c4:4081:54f0:ac48:655:9d0e:6fdc)
15:12:47 shriekingnoise joins (~shrieking@186.137.175.87)
15:14:19 × mei quits (~mei@user/mei) (Quit: mei)
15:22:36 mei joins (~mei@user/mei)
15:24:11 razetime joins (~Thunderbi@117.193.2.82)
15:25:23 <Joao003> @help
15:25:23 <lambdabot> help <command>. Ask for help for <command>. Try 'list' for all commands
15:25:30 <Joao003> @help pl
15:25:30 <lambdabot> pointless <expr>. Play with pointfree code.
15:26:44 <Joao003> @pl \s -> ((.) concat . (zipWith (\x y -> [x, y]))) s s
15:26:44 <lambdabot> (join .) =<< zipWith ((. return) . (:))
15:26:47 <gnalzo> @list
15:26:47 <lambdabot> What module? Try @listmodules for some ideas.
15:26:53 <gnalzo> @listmodules
15:26:53 <lambdabot> activity base bf check compose dice dict djinn dummy elite eval filter free fresh haddock help hoogle instances irc karma localtime metar more oeis offlineRC pl pointful poll pretty quote search
15:26:53 <lambdabot> seen slap source spell system tell ticker todo topic type undo unlambda unmtl version where
15:27:01 <gnalzo> Joao003: ^
15:27:19 <int-e> @pl \d e i l o s t v -> i l o v e d o t s
15:27:20 <lambdabot> (((((flip . (flip .) . flip) .) .) .) .) . flip flip id . ((flip . ((flip . (liftM2 flip .)) .)) .) . flip (flip . ((flip . ((flip . (flip .)) .)) .) . flip (flip . ((flip . (flip .)) .)))
15:28:02 <gnalzo> I won't use that!
15:28:22 <Joao003> lol
15:28:26 × Joao003 quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Quit: Client closed)
15:29:16 <geekosaur> oh, they left
15:29:18 <geekosaur> https://github.com/lambdabot/lambdabot/pull/205/files#diff-da6264f9c98ad78213813466b3609c2660151828367b44e1059050ca5387f1cf
15:29:38 <geekosaur> I should find a better url for the commands list until it's committed
15:29:39 × mei quits (~mei@user/mei) (Ping timeout: 256 seconds)
15:30:04 fizbin_ joins (~fizbin@user/fizbin)
15:30:43 <geekosaur> https://github.com/geekosaur/lambdabot/blob/command-doc/doc/commands.md
15:30:54 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 272 seconds)
15:31:33 cheater_ joins (~Username@user/cheater)
15:32:12 vgtw joins (~vgtw@user/vgtw)
15:34:17 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
15:34:19 cheater_ is now known as cheater
15:35:35 × son0p quits (~ff@181.136.122.143) (Ping timeout: 264 seconds)
15:40:40 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
15:45:28 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:53:14 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
15:56:17 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
15:57:45 × td_ quits (~td@83.135.9.45) (Quit: waking up from the american dream ...)
15:59:04 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
15:59:30 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.7.1)
16:00:05 × mimi1vx[m] quits (~osukupmat@2001:470:69fc:105::2:418d) (Quit: You have been kicked for being idle)
16:03:19 × hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
16:03:23 td_ joins (~td@83.135.9.45)
16:06:08 × gtdg quits (~gtdg@nat-inria-interne-72-gw-01-lne.lille.inria.fr) (Ping timeout: 260 seconds)
16:07:09 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
16:07:35 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
16:07:46 azimut joins (~azimut@gateway/tor-sasl/azimut)
16:08:29 cheater joins (~Username@user/cheater)
16:13:20 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
16:15:36 Sgeo joins (~Sgeo@user/sgeo)
16:20:25 mei joins (~mei@user/mei)
16:22:24 Joao003 joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
16:22:51 <Joao003> @help let
16:22:51 <lambdabot> let <x> = <e>. Add a binding
16:23:04 <Joao003> @help type
16:23:04 <lambdabot> type <expr>. Return the type of a value
16:23:19 × m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.8)
16:23:56 <geekosaur> you might be interested in https://github.com/geekosaur/lambdabot/blob/command-doc/doc/commands.md
16:24:05 <geekosaur> which is waiting to be committed
16:25:17 m1dnight joins (~christoph@78-22-0-121.access.telenet.be)
16:27:40 elbear joins (~lucian@86.127.154.189)
16:28:23 <Joao003> what if i list prelude
16:30:20 <Joao003> @let please_make_this_point_free s = ((.) concat . (zipWith (\x y -> [x, y]))) s s
16:30:22 <lambdabot> Defined.
16:30:55 <Joao003> :t please_make_this_point_free
16:30:57 <lambdabot> [a] -> [a]
16:31:21 <Joao003> How do i change this from [a] -> [a] to String -> String
16:31:32 <geekosaur> I don't understand "list prelude"
16:31:49 <geekosaur> also, lambdabot is not ghci
16:31:50 × mrvdb quits (~mrvdb@2001:19f0:5000:8582:5400:ff:fe07:3df5) (Quit: ZNC 1.8.2 - https://znc.in)
16:32:00 <Joao003> ik
16:32:46 <geekosaur> specify a type. as written it uses only list operations so its type is specified using list operations
16:32:48 <hpc> Joao003: give it a type signature, if you really want the type to be more specific
16:32:52 mrvdb joins (~mrvdb@185.92.221.186)
16:32:59 <Joao003> but how
16:33:31 <geekosaur> @let please_make_this_point_free :: String -> String; please_make_this_point_free s = ((.) concat . (zipWith (\x y -> [x, y]))) s s
16:33:33 <lambdabot> /sandbox/tmp/.L.hs:209:1: error: [-Woverlapping-patterns, -Werror=overlappin...
16:33:33 <lambdabot> Pattern match is redundant
16:33:33 <lambdabot> In an equation for ‘please_make_this_point_free’:
16:33:42 × alternateved quits (~user@staticline-31-183-174-39.toya.net.pl) (Ping timeout: 268 seconds)
16:33:51 <geekosaur> @undefine
16:33:51 <lambdabot> Undefined.
16:33:53 <geekosaur> @let please_make_this_point_free :: String -> String; please_make_this_point_free s = ((.) concat . (zipWith (\x y -> [x, y]))) s s
16:33:54 <lambdabot> Defined.
16:34:03 <Joao003> thanks
16:34:05 <geekosaur> :t please_make_this_point_free
16:34:07 <lambdabot> String -> String
16:34:33 <Joao003> @pl please_make_this_point_free
16:34:34 <lambdabot> please_make_this_point_free
16:34:40 <Joao003> uhhh...
16:35:05 <Joao003> i think it can't do that :/
16:35:31 <geekosaur> it already is. @pl only does substitutions, it doesn't rewrite existing names and in fact doesn't know about them
16:35:37 <Joao003> lol
16:36:01 <hpc> @pl \s -> ((.) concat . (zipWith (\x y -> [x, y]))) s s
16:36:01 <lambdabot> (join .) =<< zipWith ((. return) . (:))
16:36:03 <geekosaur> it's a little lambda calculus engine
16:36:17 <Joao003> i already tried this code
16:36:42 <hpc> :t (join .) =<< zipWith ((. return) . (:))
16:36:43 <lambdabot> [a] -> [a]
16:36:55 <hpc> if that doesn't work, there's probably something else wrong with the code around it
16:37:05 × acidjnk quits (~acidjnk@p200300d6e715c403c44d2e10962ec134.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
16:37:09 <anatta> why do you want your code to look like that?
16:37:21 <Joao003> i just want it point free
16:38:05 <anatta> yes, but if that means making it look like that, why do you want it point free?
16:38:06 <Joao003> Variable not in scope: join :: [[Char]] -> String
16:38:26 <geekosaur> @index join
16:38:26 <lambdabot> Control.Monad
16:38:49 <dminuoso> It's one of the early steps of Haskell ascension. The previous step is believing for the second time you have finally understood what "IO Monad is all about"
16:39:14 <Joao003> why is join a [[Char]] -> [Char]
16:39:44 <hpc> :t join
16:39:44 <Joao003> :t =<<
16:39:45 <lambdabot> Monad m => m (m a) -> m a
16:39:46 <lambdabot> error: parse error on input ‘=<<’
16:39:55 <Joao003> :t (=<<)
16:39:56 <lambdabot> Monad m => (a -> m b) -> m a -> m b
16:40:00 <dminuoso> Joao003: What other type should it have?
16:40:06 <hpc> join takes a nested thing that supports the Monad interface, and flattens it
16:40:14 <hpc> in this case, a = Char, m = []
16:40:15 hrberg joins (~quassel@171.79-160-161.customer.lyse.net)
16:40:24 <hpc> substitute those into the type and you get what you're seeing
16:40:35 <anatta> dminuoso: To be fair, I have had multiple "how I learned to stop worrying and love the monad" moments
16:40:36 <hpc> > join ["abc", "123"]
16:40:37 <lambdabot> "abc123"
16:40:39 troydm joins (~troydm@user/troydm)
16:40:47 <anatta> and then suddenly, I don't understand anything anymore
16:40:55 <hpc> there's a bunch of other types m can be
16:40:55 <dminuoso> anatta: Sure, I must have had half a dozen of these.
16:41:01 × merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds)
16:41:03 <dminuoso> Each time understanding that, before, I didnt really understand it.
16:41:05 <hpc> ((->) b) is a fun one
16:41:06 <Joao003> Monad [] -> (Char -> [] b) -> [] Char -> [] b?
16:41:08 <hpc> > join (*) 5
16:41:10 <lambdabot> 25
16:41:20 <Joao003> join (+) 1
16:41:22 <hpc> join f x = f x x
16:41:24 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1)
16:41:30 <Joao003> >join (+) 1
16:41:42 <Joao003> lambdabot?
16:41:45 <geekosaur> the space is required
16:41:52 <Joao003> > join (+) 1
16:41:53 <geekosaur> > join (+) 1
16:41:54 <lambdabot> 2
16:41:55 <lambdabot> 2
16:41:58 <Joao003> oh 2
16:42:02 <Joao003> 1+1
16:42:10 <dminuoso> `join f` is a cute trick indeed
16:42:39 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 260 seconds)
16:43:13 <Joao003> > join (*) 4
16:43:15 <lambdabot> 16
16:43:32 <Joao003> OOOH SO `join (*)` SQUARES A NUMBER???
16:44:17 <hpc> yep
16:44:18 <hpc> x * x
16:44:38 <dminuoso> Okay, time to formulate (^) in terms of some fold on kleisli things.
16:45:17 <Joao003> `join (f) x` is basically f(x)(x)
16:45:31 × avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 248 seconds)
16:46:40 <dminuoso> No.
16:46:40 × ubert quits (~Thunderbi@193.138.7.188) (Ping timeout: 252 seconds)
16:46:47 <dminuoso> Or at least that depends on the type of `f.
16:47:05 <ncf> :t \ f x -> join f x
16:47:06 <lambdabot> (t1 -> t1 -> t2) -> t1 -> t2
16:47:10 ubert joins (~Thunderbi@146.70.116.146)
16:47:15 <Joao003> if f just happens to be a `a -> a -> a` it works
16:47:19 <dminuoso> But yeah, I guess under the assumption that it will type check, yes.
16:47:32 <Joao003> `a -> a -> b`*
16:47:37 <Joao003> `a -> a -> b` *
16:47:52 Guest2178 joins (~Guest21@2606:54c0:2500:8::80:102)
16:48:17 <Joao003> i think it's replit that's throwing me off
16:51:56 <Joao003> no
16:52:03 <Joao003> jdoodle throws me off as well
16:52:17 <Joao003> now i hate `join`
16:52:25 Nonabelian joins (~Thunderbi@c-67-166-146-55.hsd1.ca.comcast.net)
16:52:31 justsomeguy joins (~justsomeg@user/justsomeguy)
16:52:40 <Joao003> @index (*)
16:52:40 <lambdabot> GHC.Exts, Prelude, GHC.TypeLits
16:52:48 <Joao003> :t (*)
16:52:50 <lambdabot> Num a => a -> a -> a
16:53:04 <Joao003> wth is this Num a
16:53:10 <Joao003> is that a monad???
16:53:32 <Joao003> :t (+)
16:53:34 <lambdabot> Num a => a -> a -> a
16:53:36 <anatta> it's a typeclass
16:53:55 <Joao003> i didn't know that existed
16:54:44 <anatta> it's "basically overloading in haskell"
16:54:55 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
16:54:57 <anatta> afaik
16:55:08 <Joao003> Oh so it contains Integer Floating stuff like that
16:55:26 × Nonabelian quits (~Thunderbi@c-67-166-146-55.hsd1.ca.comcast.net) (Client Quit)
16:55:56 Nonabelian joins (~Thunderbi@c-67-166-146-55.hsd1.ca.comcast.net)
16:56:08 <Joao003> So it's like + for Integer + for Floating etc etc
16:56:12 <anatta> it means "a type for which certain operations are defined"
16:56:25 × Nonabelian quits (~Thunderbi@c-67-166-146-55.hsd1.ca.comcast.net) (Client Quit)
16:57:03 <anatta> so like, if you define your own type and want to be able to use (+) on it, you can make it part of Num by defining a handful of functions for it
16:57:24 <Joao003> ok i understand it's like in java or c# right?
16:57:59 <anatta> (to be fair, IIRC you need to define (+) to begin with to even make it part of Num, so there's that)
16:58:15 <Joao003> now i'll try to understand that join
16:58:17 <Joao003> :t join
16:58:18 <lambdabot> Monad m => m (m a) -> m a
16:58:28 <anatta> Monad is also a typeclass
16:58:31 <Joao003> So it overloads for monads
16:58:32 <hpc> @src Monad
16:58:32 <lambdabot> class Applicative m => Monad m where
16:58:33 <lambdabot> -- Note: Applicative wasn't a superclass before GHC 7.10
16:58:33 <lambdabot> (>>=) :: m a -> (a -> m b) -> m b
16:58:33 <lambdabot> (>>) :: m a -> m b -> m b
16:58:33 <lambdabot> return :: a -> m a
16:58:34 <lambdabot> fail :: String -> m a
16:58:44 <Joao003> m is a monad
16:59:01 <anatta> yes, anything that's part of the typeclass monad
16:59:11 <Joao003> it's basically flattening a monad
17:00:44 <Joao003> it's basically taking a monad of monads and turning it into a single monad
17:00:59 <hpc> a good puzzle for you might be to work out the definition of join
17:01:02 <anatta> eh, maybe, someone who knows more may correct me on this, but I'd be careful with getting intuitions for it too quickly :p
17:01:15 <anatta> because it depends on how bind is defined for the monad in question
17:01:19 <anatta> right?
17:01:45 <hpc> given (>>=), (>>), return, fail, plus lambda calculus, see if you can create your own join' :: Monad m => m (m a) -> m a
17:02:03 <Joao003> ok...
17:02:06 <monochrom> IMO all these are premature.
17:02:28 × mbuf quits (~Shakthi@49.205.86.110) (Quit: Leaving)
17:02:29 <Joao003> i understand that >>= basically takes a monad applies a function and puts it back to a monad
17:03:15 <Joao003> return wraps a value into a monad
17:03:35 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:4844:f039:6c33:214c) (Quit: WeeChat 2.8)
17:03:48 <Joao003> i don't understand >>
17:04:35 <hpc> (>>) can be defined in terms of (>>=)
17:04:42 × nehsou^ quits (~nehsou@76.145.190.81) (Remote host closed the connection)
17:04:57 <xerox> @src (>>)
17:04:57 <lambdabot> m >> k = m >>= \_ -> k
17:06:01 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
17:06:11 <hpc> as for what makes it different from \_ mb -> mb:
17:06:13 <Joao003> so it's basically (const . flip) but for monads?
17:06:17 <anatta> what's people's opinion on return vs pure?
17:06:18 <hpc> > "abc" >> "123"
17:06:20 <lambdabot> "123123123"
17:06:43 <Joao003> > (const . flip) 1 2
17:06:45 <lambdabot> error:
17:06:46 <lambdabot> • No instance for (Typeable b0)
17:06:46 <lambdabot> arising from a use of ‘show_M3610154435520401717’
17:06:49 <Joao003> uh oh
17:07:03 <hpc> even though it drops the "a" of the (m a) thing, it still uses whatever the "m" part does
17:07:13 <hpc> in the case of [], the length of "abc" but not the actual letters
17:07:16 <Joao003> it basically replaces m a with m b
17:07:39 <anatta> Joao003: fwiw you want to flip const, not const . flip
17:07:43 <hpc> so 'a' becomes "123", 'b' becomes "123", and 'c' becomes "123"
17:07:45 <Joao003> oh
17:07:46 <geekosaur> anatta, it varies but note the upcoming "monad of no return" proposal
17:07:50 <Joao003> > flip const 1 2
17:07:52 <hpc> and then ["123", "123", "123"] is joined
17:07:53 <lambdabot> 2
17:08:19 <hpc> (that's how you can define (>>=) in terms of fmap and join, but that's another topic)
17:08:53 <Joao003> :t flip const
17:08:55 <lambdabot> b -> c -> c
17:09:01 <Joao003> b -> c -> c
17:09:10 acidjnk joins (~acidjnk@p54ad56b7.dip0.t-ipconnect.de)
17:09:14 <Joao003> const is a -> b -> a
17:09:24 <Joao003> :t flip
17:09:25 <lambdabot> (a -> b -> c) -> b -> a -> c
17:09:30 <Joao003> OOH
17:09:35 <Joao003> NOW I UNDERSTAND
17:10:05 <anatta> geekosaur: I see - to me "return" feels a bit wrong somehow, but I also know that I don't really know enough to have a strong opinion.
17:10:06 <Joao003> > [] >> [1]
17:10:08 <lambdabot> []
17:10:24 <Joao003> return wraps a value into a monad
17:10:27 <geekosaur> many people feel `return` was a bad name to begin with
17:10:29 <anatta> but like... it doesn't return anything
17:10:41 <anatta> and especially with do notation it feels so weird
17:10:41 × chele quits (~chele@user/chele) (Remote host closed the connection)
17:10:45 <Joao003> should be called `wrap`
17:10:48 × Guest2178 quits (~Guest21@2606:54c0:2500:8::80:102) (Quit: Client closed)
17:10:55 <anatta> Joao003: use "pure" ;)
17:11:03 <hpc> :t pure
17:11:04 <lambdabot> Applicative f => a -> f a
17:11:04 <geekosaur> reportedly it was chosen to make `do` notation seem more familiar to procedural programmers
17:11:21 <hpc> wherever you use return, pure will be the exact same definition with a nicer name
17:11:23 <Joao003> i come from python btw
17:11:42 <geekosaur> I'm not actually sure `pure` is an improvement (what's impure about lists?) but it's less misleading than `return`
17:12:10 <Joao003> guys let's come up with a different name
17:12:34 <hpc> geekosaur: think of (pure x) as the value with the least extra contextual stuff
17:12:46 <c_wraith> let's rename it "simple"
17:12:50 <Joao003> :t []
17:12:51 <lambdabot> [a]
17:12:58 <hpc> geekosaur: like, [5] is basically just 5
17:13:06 <Joao003> how do i get list's return
17:13:14 <hpc> i think that's the best way to justify the name 'pure'
17:13:16 <Joao003> oh it's just []
17:13:20 <c_wraith> the problem of course is that names are analogies
17:13:24 <geekosaur> @src [] return
17:13:24 <lambdabot> return x = [x]
17:13:40 <c_wraith> and analogies break down when abstraction increases
17:13:49 <Joao003> give me another example of a monad
17:13:56 <hpc> @src Maybe
17:13:56 <lambdabot> data Maybe a = Nothing | Just a
17:14:15 <Joao003> @src Either
17:14:15 <lambdabot> Source not found. I am sorry.
17:14:16 <geekosaur> waiting for monochrom to complain about names…
17:14:58 <Joao003> oh no
17:15:28 <hpc> geekosaur: this is why i never name any of my functions, i just stuff everything into main
17:15:40 <geekosaur> the @src database is pretty sparse and somewhat unreliable
17:16:00 <geekosaur> it's not actually looking up definitions; try hoogle for that
17:16:07 <geekosaur> well, web hoogle
17:16:34 <hpc> if you use duckduckgo, !h is the shortcut for hoogle too
17:16:36 <Joao003> @hoogle Either
17:16:37 <lambdabot> Prelude data Either a b
17:16:37 <lambdabot> module Data.Either
17:16:37 <lambdabot> Data.Either data Either a b
17:17:06 × razetime quits (~Thunderbi@117.193.2.82) (Remote host closed the connection)
17:17:43 <Joao003> :t Either return
17:17:44 <lambdabot> error:
17:17:44 <lambdabot> • Data constructor not in scope: Either :: (a0 -> m0 a0) -> t
17:17:44 <lambdabot> • Perhaps you meant variable ‘either’ (imported from Data.Either)
17:17:49 <Joao003> :t Either
17:17:50 <lambdabot> error:
17:17:50 <lambdabot> • Data constructor not in scope: Either
17:17:50 <lambdabot> • Perhaps you meant variable ‘either’ (imported from Data.Either)
17:17:58 <Joao003> :t either
17:17:59 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
17:18:37 <Joao003> my task now is to guess the source code of either
17:18:50 <Joao003> the function not the monad
17:19:11 <geekosaur> it follows pretty directly from the definition of Either
17:19:58 <geekosaur> also, Either by itself is not a monad because a monad is Type -> Type but Either is Type -> Type -> Type
17:20:06 <Joao003> oh no
17:20:09 <geekosaur> (Either e) for some e is a monad
17:20:27 <Joao003> Either is just a data structure
17:20:36 <Joao003> Left and Right are the monads right?
17:20:52 elbear joins (~lucian@86.127.154.189)
17:20:53 <geekosaur> no
17:21:01 <Joao003> no monads wth
17:21:04 <geekosaur> Left and Right are data constructors for Either
17:21:05 <anatta> this is a bit confusing =)
17:21:25 <geekosaur> Either with a specified type for the Left constructor is a monad
17:21:26 <Joao003> haskell is confusing for a person that comes from python
17:21:33 <geekosaur> to understand this we have to get into kinds
17:21:36 <anatta> it's like how a lot of operations on pairs are unintuitive
17:21:48 oldfashionedcow joins (~Rahul_San@user/oldfashionedcow)
17:22:13 <geekosaur> for now I'd ignore it; get familiar with [] and Maybe before you try to figure out the monads associated with Either
17:22:23 <anatta> Joao003: compare for example
17:22:37 <anatta> fmap (*5) [2, 3]
17:22:39 <anatta> and
17:22:46 <anatta> fmap (*5) (2, 3)
17:22:58 <Joao003> let me run those first
17:23:08 <Joao003> > fmap (*5) [2, 3]
17:23:10 <lambdabot> [10,15]
17:23:14 <Joao003> as expected
17:23:27 <Joao003> > fmap (*5) (2, 3)
17:23:28 <lambdabot> (2,15)
17:23:32 <Joao003> ok what?
17:23:35 <anatta> =)
17:23:47 <Joao003> did it apply for only the last element?
17:23:50 <anatta> yes
17:23:59 <int-e> > fmap (*5) ('a', 2)
17:23:59 <Joao003> omg this is so confusing
17:24:01 <lambdabot> ('a',10)
17:24:04 <geekosaur> you can't iterate over a tuple the way you can iterate over a list, so only the last value in the tuple is "visible"
17:24:04 <Joao003> :t fmap
17:24:05 <lambdabot> Functor f => (a -> b) -> f a -> f b
17:24:29 <Joao003> pairs probably aren't functors
17:24:33 <int-e> it's confusing, but there is a method to the madness
17:24:44 <anatta> pairs are functors
17:24:48 <geekosaur> they are, otherwise you would have gotten a type error
17:25:08 <Joao003> @src fmap
17:25:08 <lambdabot> Source not found. And you call yourself a Rocket Surgeon!
17:25:21 <Joao003> why did it call me a rocket surgeon lol
17:25:24 <geekosaur> fmap has no generic source, it depends on the type
17:25:32 <int-e> data Pair a = Pair a a -- you can also define a type like this and a Functor instance that (by force, more or less) maps both fields.
17:25:55 <geekosaur> @src Maybe fmap
17:25:55 <lambdabot> fmap _ Nothing = Nothing
17:25:56 <lambdabot> fmap f (Just a) = Just (f a)
17:26:00 <anatta> it's just that the f part is sort of "(,) 2"
17:26:04 <geekosaur> @src [] fmap
17:26:04 <lambdabot> fmap = map
17:26:06 <Joao003> i will use duckduckgo now just because of hoogle
17:26:39 <anatta> similar to what geekosaur said about Either, that Either isn't the monad, the monad is Either e
17:27:05 <anatta> in this case the functor includes the leftmost element
17:27:25 <anatta> (sort of, I'm honestly not sure how to explain it formally)
17:28:09 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 260 seconds)
17:28:34 <Joao003> @src Pair fmap
17:28:34 <lambdabot> Source not found. Just what do you think you're doing Dave?
17:28:45 <Joao003> :t pair
17:28:46 <lambdabot> error: Variable not in scope: pair
17:28:50 <Joao003> :t Pair
17:28:51 <lambdabot> error: Data constructor not in scope: Pair
17:29:07 wroathe joins (~wroathe@user/wroathe)
17:29:34 × thongpv quits (~thongpv87@2001:ee0:5577:f0d0:7e44:a04c:94d6:ed7f) (Ping timeout: 252 seconds)
17:29:48 <anatta> but if you look at a monad/functor as a wrapper around something, then the wrapper is (a, _) around some b and not () around some a and some b, and (Either a _) around some b and not Either around some a and some b
17:30:01 <anatta> kinda
17:31:07 × Luj3 quits (~Luj@2a01:e0a:5f9:9681:7266:6c28:8ab:f9df) (Quit: Ping timeout (120 seconds))
17:31:27 Luj3 joins (~Luj@2a01:e0a:5f9:9681:d724:5a99:cff5:17e)
17:34:51 <hpc> (a, _) and (Either a _) are essentially what 'm' is, when you're looking at
17:34:52 <hpc> :t join
17:34:53 <lambdabot> Monad m => m (m a) -> m a
17:34:54 <hpc> @src Monad
17:34:54 <lambdabot> class Applicative m => Monad m where
17:34:54 <lambdabot> -- Note: Applicative wasn't a superclass before GHC 7.10
17:34:55 <lambdabot> (>>=) :: m a -> (a -> m b) -> m b
17:34:55 <lambdabot> (>>) :: m a -> m b -> m b
17:34:55 <lambdabot> return :: a -> m a
17:34:57 <lambdabot> fail :: String -> m a
17:35:25 <hpc> or well, to disambiguate
17:35:30 <Joao003> WAIT APPLICATIVE IS JUST MONAD
17:35:31 <hpc> (x, _) and (Either x _)
17:35:50 <Joao003> > Right (1, 2)
17:35:52 <lambdabot> Right (1,2)
17:35:59 <int-e> nono, Applicative has no (>>=)
17:35:59 <hpc> Joao003: in order to define Monad m for some m, you also need Applicative m
17:36:12 <Joao003> oh no
17:36:12 <hpc> @src Applicative
17:36:12 <lambdabot> class Functor f => Applicative f where
17:36:13 <lambdabot> pure :: a -> f a
17:36:13 <lambdabot> (<*>) :: f (a -> b) -> f a -> f b
17:36:19 <hpc> @src Functor
17:36:19 <lambdabot> class Functor f where
17:36:19 <lambdabot> fmap :: (a -> b) -> f a -> f b
17:36:48 <int-e> it's sutle, but <*> is strictly weaker than >>= (in conjunction with pure/return)
17:37:05 <int-e> *subtle
17:37:16 <Joao003> > (Right 1) >>= (+1)
17:37:17 <lambdabot> error:
17:37:18 <lambdabot> • No instance for (Num (Either () ()))
17:37:18 <lambdabot> arising from a use of ‘e_111’
17:37:34 <Joao003> wrong order :/
17:37:47 <Joao003> > (+1) >>= (Right 1)
17:37:49 <lambdabot> error:
17:37:49 <lambdabot> • Couldn't match expected type ‘a -> a -> b’
17:37:49 <lambdabot> with actual type ‘Either a0 b0’
17:37:54 <Joao003> wth
17:38:13 <Joao003> @src Just
17:38:13 <lambdabot> Source not found. :(
17:38:19 <Joao003> @src Maybe
17:38:19 <lambdabot> data Maybe a = Nothing | Just a
17:38:49 <anatta> fmap (+1) (Right 1)
17:39:05 <Joao003> so i don't use >>=
17:39:17 <Joao003> > fmap (+1) (Right 1)
17:39:19 <lambdabot> Right 2
17:39:20 <hpc> > (Right 1) >>= \n -> Right (n + 1)
17:39:22 <lambdabot> Right 2
17:39:36 <hpc> > (Right 1) >>= \n -> Left "no addition for you!"
17:39:38 <lambdabot> Left "no addition for you!"
17:39:54 <hpc> :t (>>=)
17:39:56 <lambdabot> Monad m => m a -> (a -> m b) -> m b
17:39:59 <Joao003> how do i extract left and right from either
17:40:07 <Joao003> > Either 1 2
17:40:08 <lambdabot> error:
17:40:08 <lambdabot> • Data constructor not in scope: Either :: t0 -> t1 -> t
17:40:08 <lambdabot> • Perhaps you meant variable ‘either’ (imported from Data.Either)
17:40:08 <hpc> the thing on the right needs to match the type (a -> m b)
17:40:18 <Joao003> > either 1 2
17:40:20 <lambdabot> error:
17:40:20 <lambdabot> • No instance for (Typeable a0)
17:40:20 <lambdabot> arising from a use of ‘show_M31668850682641742128’
17:40:34 <anatta> you never have Either 1 2
17:40:58 <Joao003> either is just a data structure to shortcut left | right
17:41:07 <anatta> the type you're working with is Either SomeType SomeOtherType
17:41:07 <Joao003> @src either
17:41:07 <lambdabot> either f _ (Left x) = f x
17:41:08 <lambdabot> either _ g (Right y) = g y
17:42:06 <Joao003> > either _ (+1) (Right 1)
17:42:11 <lambdabot> error:
17:42:11 <lambdabot> • Found hole: _ :: a0 -> c
17:42:11 <lambdabot> Where: ‘a0’ is an ambiguous type variable
17:42:23 <Joao003> > either (+2) (+1) (Right 1)
17:42:25 <lambdabot> 2
17:42:34 <Joao003> it just picks a function to apply
17:42:43 <geekosaur> the `_` in those definitions is a wildcard, like having a variable there but not used
17:42:51 <anatta> yes
17:43:19 <anatta> you say "well, I have one function that works on left-values and one function that works on right-values"
17:43:25 <anatta> and here's some value that could be either
17:43:29 <anatta> pick the right function and run it
17:44:10 <anatta> (pick the "appropriate" function might be better wording in this case, lol)
17:44:35 <Joao003> :t either
17:44:37 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
17:45:02 <anatta> you give a function that works on a:s, and one function that works on b:s
17:45:17 <anatta> and an either-thing that could be either an "a" or a "b"
17:46:00 <anatta> and then the function transforms the either-thing into something of type "c" using the appropriate function
17:46:05 <Joao003> ask me a function and i'll try to guess the type
17:46:22 <anatta> zipwith
17:47:12 <anatta> it makes one list out of two lists, using a combining function
17:47:24 <Joao003> (a -> a -> b) -> [a] -> [a] -> [b]
17:47:40 <anatta> close
17:47:52 <anatta> yours is a bit too restrictive
17:47:59 <Joao003> (a -> b -> c) -> [a] -> [b] -> [c]
17:48:11 <anatta> :t zipWith
17:48:12 <lambdabot> (a -> b -> c) -> [a] -> [b] -> [c]
17:48:17 <Joao003> i'm correct!
17:48:22 <anatta> very good
17:48:39 <Joao003> i'll try print
17:49:01 econo joins (uid147250@user/econo)
17:49:11 <Joao003> Printable a => a -> IO?
17:49:47 <int-e> :t print
17:49:48 <lambdabot> Show a => a -> IO ()
17:49:50 <hpc> almost
17:50:02 <Joao003> i'm good
17:50:11 <hpc> :t show
17:50:12 <lambdabot> Show a => a -> String
17:50:15 <hpc> > show 5
17:50:17 <lambdabot> "5"
17:50:26 <hpc> IO is another Monad
17:50:30 <hpc> :t getLine
17:50:31 <lambdabot> IO String
17:50:33 <hpc> :t putStrLn
17:50:34 <lambdabot> String -> IO ()
17:50:37 <hpc> :t getLine >>= putStrLn
17:50:39 <lambdabot> IO ()
17:51:08 <Joao003> getLine
17:51:09 <Joao003> hmmmm
17:51:15 thebinary joins (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6)
17:51:26 <hpc> this is where you'd probably want to have your own install of ghc, so you have an environment that will execute IO for you
17:51:31 <Joao003> IO () -> String?
17:51:39 <hpc> > getLine -- lambdabot won't do it
17:51:41 <lambdabot> <IO [Char]>
17:51:56 <Joao003> ill check
17:52:00 <Joao003> :t getLine
17:52:01 <lambdabot> IO String
17:52:22 <Joao003> an IO which contains a String. THAT'S IT.
17:52:45 <hpc> or more precisely, an IO action that when executed produces a String
17:52:47 gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
17:53:01 <Joao003> IO is just a program
17:53:14 <Joao003> but not that kind of program
17:53:28 <anatta> it's instructions to do something
17:53:41 <Joao003> @src getLine
17:53:41 <lambdabot> getLine = hGetLine stdin
17:53:51 <Joao003> hGetLine?
17:53:58 <Joao003> :t hGetLine
17:53:58 <hpc> gets a line of input from a file handle
17:53:59 <lambdabot> error:
17:53:59 <lambdabot> • Variable not in scope: hGetLine
17:53:59 <lambdabot> • Perhaps you meant one of these:
17:54:03 <hpc> or well, "file" handle
17:54:27 <Joao003> oh so getLine gets a line from stdin which is a file
17:54:31 <hpc> it can be stdin/stdout, or wrapping around a network socket, etc
17:54:45 <Joao003> @src print
17:54:45 <lambdabot> print x = putStrLn (show x)
17:55:18 <Joao003> ah yes, print is just a more code golfy way of saying (putStrLn . show)
17:55:59 <Joao003> @src Int show
17:55:59 <lambdabot> Source not found. It can only be attributed to human error.
17:56:06 <Joao003> @src show
17:56:06 <lambdabot> show x = shows x ""
17:56:14 cheater_ joins (~Username@user/cheater)
17:56:18 <anatta> Show is another typeclass
17:56:30 <anatta> you define "show" for an arbitrary type
17:56:33 <Joao003> OH MY GOD CAN WE STOP THE TYPE CLASSES
17:56:40 <hpc> Show is a whole other rabbit hole, if you want to read the implementation
17:56:41 <anatta> and it just means "this is how it's represented in text form"
17:56:47 <Joao003> @src shows
17:56:47 <lambdabot> Source not found. Sorry.
17:56:52 <hpc> it does tricky tricks to make sure it always parenthesizes nested values correctly
17:57:05 <Joao003> like __repr__ in python right?
17:57:13 <hpc> yeah
17:57:38 <Joao003> liberachat upgrade cool!
17:57:56 × nschoe quits (~q@141.101.51.197) (Ping timeout: 252 seconds)
17:58:02 <anatta> but you can do things like
17:58:11 <thebinary> Hello everyone. I am new here and in haskell.
17:58:16 <thebinary> Any useful resources to learn haskell for sys administration replacing bash scripts?
17:58:16 <Joao003> hi!
17:58:43 <Joao003> @learn
17:58:43 <lambdabot> https://wiki.haskell.org/Learning_Haskell
17:59:06 <Joao003> not here
17:59:22 <anatta> data Coordinate = C Integer Integer and then define show (C x y) = show (x, y)
17:59:29 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
17:59:44 × cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds)
17:59:48 <gnalzo> thebinary: perhaos look at 'shelly'
17:59:49 <anatta> then you get a (slightly) prettier representation
17:59:51 cheater_ is now known as cheater
18:00:23 <anatta> more specifically it would look something like
18:00:27 <geekosaur> @hackage propellor
18:00:27 <lambdabot> https://hackage.haskell.org/package/propellor
18:00:55 <gnalzo> @hackage shelly
18:00:55 <lambdabot> https://hackage.haskell.org/package/shelly
18:01:00 <anatta> data Coordinate = C Integer Integer
18:01:00 <anatta> instance Show Coordinate where
18:01:00 <anatta> show (C x y) = show (x, y)
18:01:08 <Joao003> data Point = P Integer Integer Integer then define show as show (P x y z) = show (x, y, z)?
18:01:12 <anatta> and then you have a custom show representation
18:01:31 <Joao003> i'll try it
18:01:39 <anatta> you can also derive stuff automatically (but then you don't get the pretty version)
18:01:46 <Joao003> @let data Point = P Integer Integer Integer
18:01:47 <lambdabot> Defined.
18:01:59 <anatta> if you write like: data Coordinate = C Integer Integer deriving (Show)
18:02:02 <Joao003> @let show (P x y z) = show (x, y, z)
18:02:04 <lambdabot> /sandbox/tmp/.L.hs:163:18: error:
18:02:04 <lambdabot> Ambiguous occurrence ‘show’
18:02:04 <lambdabot> It could refer to
18:02:14 <Joao003> wth
18:02:15 <anatta> you need to do it with an instance ^
18:02:26 <anatta> note how I wrote it above
18:02:40 <Joao003> @let show (Point x y z) = (x, y, z)
18:02:41 <lambdabot> /sandbox/tmp/.L.hs:163:7: error:
18:02:41 <lambdabot> Not in scope: data constructor ‘Point’
18:02:41 <lambdabot> |
18:02:46 <thebinary> Thanks lambdabot gnalzo
18:02:59 <Joao003> > Point 1 2 3
18:03:01 <lambdabot> error:
18:03:01 <lambdabot> Data constructor not in scope: Point :: t0 -> t1 -> t2 -> t
18:03:12 <gnalzo> thebinary: your're wellcome
18:03:17 <anatta> your constructor is P
18:03:20 <anatta> and not Point
18:03:27 <Joao003> > P 1 2 3
18:03:29 <lambdabot> error:
18:03:29 <lambdabot> • No instance for (Show Point)
18:03:29 <lambdabot> arising from a use of ‘show_M80138243358793167848’
18:03:38 <anatta> that worked, but you haven't defined show yet
18:04:33 <Joao003> @let show :: Point -> String; show (P x y z) = show (x, y, z)
18:04:34 <lambdabot> /sandbox/tmp/.L.hs:165:18: error:
18:04:34 <lambdabot> Ambiguous occurrence ‘show’
18:04:34 <lambdabot> It could refer to
18:04:50 <Joao003> why is it doing ambiguous occurence 'show'
18:05:51 <geekosaur> because your definition needs to be inside an instance declaration; otherwise you're defining a new one
18:05:56 <anatta> because you're not defining an instance
18:06:07 <Joao003> wth is this instance thingy
18:06:09 <geekosaur> separate from the one in class Show
18:06:21 <anatta> you need to start by saying "instance Show Point where (...)"
18:06:26 <Joao003> oh
18:06:34 <hpc> instances are how you make a thing part of a type class
18:06:52 <Joao003> @let instance Show Point where show (P x y z) = show (x, y, z)
18:06:53 <lambdabot> Defined.
18:06:59 <Joao003> > P 1 2 3
18:07:01 <lambdabot> (1,2,3)
18:07:04 <Joao003> YES
18:07:14 <anatta> now it works =)
18:07:17 <hpc> you can also do this:
18:07:42 <hpc> @let data Point' = P' Int Int Int deriving (Show)
18:07:43 <lambdabot> Defined.
18:07:47 <hpc> > P' 1 2 3
18:07:49 <anatta> and maybe this isn't the most useful example, but sometimes you have big types where you just want to print a small part of it or something
18:07:49 <lambdabot> P' 1 2 3
18:08:01 <Joao003> let's undefine now
18:08:04 <Joao003> @undefine
18:08:04 <lambdabot> Undefined.
18:08:32 pwug joins (~pwug@user/pwug)
18:08:38 × thebinary quits (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6) (Quit: Quit)
18:08:47 <Joao003> let me try a maybe but just stores 2 values
18:09:03 mizlan joins (~mizlan@131.179.77.181)
18:09:14 <anatta> like if you had data Company = C Name CompId Address [Employee]
18:09:27 <anatta> if you derived Show automatically you'd print everything
18:09:38 <anatta> but you could make your own instance just printing the name
18:09:42 <Joao003> @let 2vMaybe a b = 2vJust a b | Nothing deriving (Show)
18:09:43 <lambdabot> Parse failed: Parse error in pattern: 2
18:09:45 thebinary joins (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6)
18:09:51 <Joao003> @let 2vMaybe a b = 2vJust a b | Nothing
18:09:51 <lambdabot> Parse failed: Parse error in pattern: 2
18:10:06 <anatta> they have to start with a letter afaik
18:10:09 <Joao003> oh i forgot variables can't start with numbers
18:10:28 <Joao003> @let dMaybe a b = dJust a b | Nothing deriving (Show)
18:10:28 <lambdabot> Parse failed: Parse error: |
18:10:37 × thebinary quits (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6) (Client Quit)
18:10:38 <geekosaur> you also can't reuse Nothing like that
18:10:39 <Joao003> @let dMaybe a b = dJust a b | Nothing
18:10:40 <lambdabot> Parse failed: Parse error: |
18:10:44 <geekosaur> and it starts with uppercase
18:10:47 thebinary joins (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6)
18:11:03 <Joao003> @let data DMaybe a b = DJust a b | Nothing
18:11:04 <lambdabot> Defined.
18:11:15 <Joao003> > Nothing
18:11:17 <lambdabot> error:
18:11:17 <lambdabot> Ambiguous occurrence ‘Nothing’
18:11:17 <lambdabot> It could refer to
18:11:29 <geekosaur> > Prelude.Nothing
18:11:31 <lambdabot> Nothing
18:11:35 <geekosaur> > L.Nothing
18:11:36 <lambdabot> error:
18:11:36 <lambdabot> • No instance for (Show (DMaybe a0 b0))
18:11:36 <lambdabot> arising from a use of ‘show_M31449724860408322928’
18:11:47 <Joao003> what is L
18:11:57 <Joao003> > DJust 1 2
18:11:59 <lambdabot> error:
18:11:59 <lambdabot> • No instance for (Show (DMaybe Integer Integer))
18:11:59 <lambdabot> arising from a use of ‘show_M13714184071687354578’
18:12:00 <anatta> everything defined in lambdabot
18:12:01 <anatta> I assume
18:12:04 <geekosaur> the module name given to stuff defined with @let
18:12:07 <Joao003> oh
18:12:47 <geekosaur> @where L.hs
18:12:48 <lambdabot> what lambdabot has in scope is at https://silicon.int-e.eu/lambdabot/State/Pristine.hs
18:12:48 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
18:13:23 <Joao003> @let instance Show DJust where show (DJust x y) = "DJust" ++ show (x, y)
18:13:25 <lambdabot> /sandbox/tmp/.L.hs:159:15: error:
18:13:25 <lambdabot> • Expecting two more arguments to ‘DJust’
18:13:25 <lambdabot> Expected a type, but ‘DJust’ has kind ‘a0 -> b0 -> DMaybe a0 b0’
18:13:47 <Joao003> @let instance Show (DJust x y) where show (DJust x y) = "DJust" ++ show (x, y)
18:13:48 <lambdabot> /sandbox/tmp/.L.hs:159:16: error:
18:13:48 <lambdabot> • Expected a type, but ‘DJust x y’ has kind ‘DMaybe a0 b0’
18:13:49 <lambdabot> • In the first argument of ‘Show’, namely ‘(DJust x y)’
18:14:18 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds)
18:14:25 <Joao003> @let instance Show (DMaybe a0 b0) where show (DJust x y) = "DJust" ++ show (x, y)
18:14:27 <lambdabot> /sandbox/tmp/.L.hs:160:39: error:
18:14:27 <lambdabot> • No instance for (Show a0) arising from a use of ‘show’
18:14:27 <lambdabot> Possible fix:
18:15:09 <anatta> you haven't specified that the types you use inside your maybe can be shown
18:15:50 <anatta> you have to say that you promise this really nicely
18:16:24 <anatta> instance Show a, Show b => Show (DMaybe a b)
18:16:28 <anatta> or something
18:17:03 <monochrom> instance (Show a, Show b) => Show (DMaybe a b)
18:17:07 <monochrom> need the parentheses.
18:17:28 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
18:17:42 <anatta> ah, of course
18:17:57 × delYsid quits (~user@user/delYsid) (Quit: ERC 5.4.1 (IRC client for GNU Emacs 30.0.50))
18:18:01 <Joao003> instance (Show a, Show b) => Show (DMaybe a b) where show (DJust x y) = "DJust" ++ show (x, y)
18:18:10 <Joao003> @let instance (Show a, Show b) => Show (DMaybe a b) where show (DJust x y) = "DJust" ++ show (x, y)
18:18:12 <lambdabot> Defined.
18:18:18 <Joao003> > DJust 1 2
18:18:20 <lambdabot> DJust(1,2)
18:18:22 × ChanServ quits (ChanServ@services.libera.chat) (shutting down)
18:18:25 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
18:18:29 <Joao003> > L.Nothing
18:18:30 <lambdabot> *Exception: /tmp/mueval8-0.hs:160:9-49: Non-exhaustive patterns in function ...
18:19:05 <Joao003> @let instance (Show a, Show b) => Show (DMaybe a b) where show (L.Nothing) = "Nothing"
18:19:06 <lambdabot> /sandbox/tmp/.L.hs:159:10: error:
18:19:06 <lambdabot> Duplicate instance declarations:
18:19:06 <lambdabot> instance [safe] (Show a, Show b) => Show (DMaybe a b)
18:19:47 × Joao003 quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Quit: Client closed)
18:20:01 Joao003 joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
18:20:12 <Joao003> @let show L.Nothing = "Nothing"
18:20:13 <lambdabot> /sandbox/tmp/.L.hs:160:39: error:
18:20:13 <lambdabot> Ambiguous occurrence ‘show’
18:20:13 <lambdabot> It could refer to
18:21:43 cheater_ joins (~Username@2001:871:222:4fa4:7d0f:a64:c1af:78c8)
18:25:19 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
18:26:16 <geekosaur> you can't go back and define it, you need to include it with the original definition
18:26:19 <geekosaur> @undefine
18:26:19 <lambdabot> Undefined.
18:26:35 × mizlan quits (~mizlan@131.179.77.181) (Ping timeout: 264 seconds)
18:26:50 <geekosaur> @let instance (Show a, Show b) => Show (DMaybe a b) where show (DJust x y) = "DJust" ++ show (x, y); show Nothing = "L.Nothing"
18:26:52 <lambdabot> /sandbox/tmp/.L.hs:156:36: error:
18:26:52 <lambdabot> Not in scope: type constructor or class ‘DMaybe’
18:26:52 <lambdabot> Perhaps you meant ‘Maybe’ (imported from Data.Maybe)
18:27:00 <geekosaur> oh right, deleted too much
18:27:21 <geekosaur> @let data DMaybe a b = DJust a b | Nothing
18:27:22 <lambdabot> Defined.
18:27:24 <geekosaur> @let instance (Show a, Show b) => Show (DMaybe a b) where show (DJust x y) = "DJust" ++ show (x, y); show Nothing = "L.Nothing"
18:27:25 <lambdabot> /sandbox/tmp/.L.hs:161:14: error:
18:27:25 <lambdabot> Ambiguous occurrence ‘Nothing’
18:27:25 <lambdabot> It could refer to
18:27:37 <geekosaur> @let instance (Show a, Show b) => Show (DMaybe a b) where show (DJust x y) = "DJust" ++ show (x, y); show L.Nothing = "L.Nothing"
18:27:38 <lambdabot> Defined.
18:27:55 <geekosaur> show (DJust 5 3)
18:28:01 <geekosaur> > show (DJust 5 3)
18:28:02 <lambdabot> "DJust(5,3)"
18:28:11 <geekosaur> > show L.Nothing
18:28:14 <lambdabot> "L.Nothing"
18:28:34 <geekosaur> correct way to do that, btw, is to define it as DNothing instead of Nothing since Nothing is already in use
18:30:20 <anatta> the really interesting part is when you realize that you can do stuff like
18:31:16 <anatta> @let data List' a = Nil | Cons a (List' a) deriving (Show, Eq, Foldable)
18:31:17 <lambdabot> Defined.
18:31:35 <anatta> @let listSum = foldr (+) 0
18:31:36 <lambdabot> Defined.
18:32:17 <anatta> @let myList = (Cons 1 (Cons 2 (Cons 7 (Cons 5 (Cons 10 Nil)))))
18:32:19 <lambdabot> Defined.
18:32:26 <anatta> > listSum myList
18:32:28 <lambdabot> 25
18:32:57 finsternis joins (~X@23.226.237.192)
18:33:53 allbery_b joins (~geekosaur@069-135-003-034.biz.spectrum.com)
18:34:22 <anatta> and haskell just figures out how to fold through your data structure
18:34:33 <anatta> that sparks joy in me
18:35:06 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 265 seconds)
18:37:38 cheater__ joins (~Username@2001:871:222:4fa4:ba:8939:32ae:ff7b)
18:37:39 <Joao003> what if i make a list where each cons adds 2 elements
18:38:20 <anatta> well, why not try and see what happens?
18:38:22 <Joao003> @src List
18:38:23 <lambdabot> Source not found. You type like i drive.
18:39:41 <Joao003> @let data DList a b = DNil | DCons a b (DList a b) deriving (Show, Eq, Foldable)
18:39:43 <lambdabot> Defined.
18:40:15 <Joao003> > DCons 1 2 (DCons 3 4 DNil)
18:40:17 <lambdabot> DCons 1 2 (DCons 3 4 DNil)
18:40:22 <Joao003> uh oh
18:40:31 × cheater_ quits (~Username@2001:871:222:4fa4:7d0f:a64:c1af:78c8) (Ping timeout: 252 seconds)
18:41:01 <Joao003> > foldr (+) DCons 1 2 (DCons 3 4 DNil)
18:41:04 <lambdabot> error:
18:41:04 <lambdabot> • Could not deduce (Foldable t0)
18:41:04 <lambdabot> from the context: (Foldable t, Num a, Num a1, Num b,
18:41:24 <Joao003> uh oh
18:41:51 <Joao003> @src Foldable List
18:41:51 <lambdabot> Source not found. I can't hear you -- I'm using the scrambler.
18:41:56 <Joao003> @src Foldable
18:41:56 <lambdabot> Source not found. Wrong! You cheating scum!
18:42:39 <Joao003> @let my_dlist = DCons 1 2 (DCons 3 4 DNil)
18:42:41 <lambdabot> Defined.
18:42:45 wootehfoot joins (~wootehfoo@ua-85-228-153-205.bbcust.telenor.se)
18:42:53 <Joao003> > my_dlist == my_dlist
18:42:55 <lambdabot> True
18:43:05 <Joao003> at least eq works
18:43:34 <Joao003> > my_dlist == DCons 1 2 (DCons 3 0 DNil)
18:43:36 <lambdabot> False
18:44:39 elbear joins (~lucian@86.127.154.189)
18:46:21 Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi)
18:46:34 <Joao003> @let dlist_to_list DNil = Nil; dlist_to_list DCons x y xs = join [x y] (dlist_to_list xs)
18:46:34 <lambdabot> Parse failed: arity mismatch for 'dlist_to_list'
18:46:49 <Joao003> @let dlist_to_list DNil _ _ = Nil; dlist_to_list DCons x y xs = join [x y] (dlist_to_list xs)
18:46:49 <lambdabot> Parse failed: arity mismatch for 'dlist_to_list'
18:47:06 <Joao003> @undefine
18:47:06 <lambdabot> Undefined.
18:47:44 <gnalzo> >foldr (+) (DCons 1 2 DNil) (DCons 3 4 DNil)
18:47:55 <gnalzo> arf!
18:48:48 ChanServ joins (ChanServ@services.libera.chat)
18:48:48 platinum.libera.chat sets mode +o ChanServ
18:48:59 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 255 seconds)
18:49:14 allbery_b is now known as Guest5185
18:49:54 ft joins (~ft@p4fc2a257.dip0.t-ipconnect.de)
18:53:41 × thebinary quits (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6) (Read error: Connection reset by peer)
18:53:41 <Joao003> > foldr (+) (DCons 1 2 DNil) (DCons 3 4 DNil)
18:53:43 <lambdabot> error:
18:53:44 <lambdabot> • Data constructor not in scope: DCons :: t3 -> t4 -> t0 -> b
18:53:44 <lambdabot> • Perhaps you meant variable ‘_Cons’ (imported from Control.Lens)error: ...
18:53:49 <anatta> > show my_dlist
18:53:50 <lambdabot> error: Variable not in scope: my_dlist
18:54:02 × wootehfoot quits (~wootehfoo@ua-85-228-153-205.bbcust.telenor.se) (Quit: Leaving)
18:54:06 <Joao003> i did a undefine i think
18:54:19 wootehfoot joins (~wootehfoo@user/wootehfoot)
18:54:23 <Joao003> @tic-tac-toe
18:54:23 <lambdabot> how about a nice game of chess?
18:54:28 <Joao003> lol
18:55:13 <anatta> @let data List' a = Nil | Cons a a (List' a) deriving (Show, Eq, Foldable)
18:55:15 <lambdabot> Defined.
18:55:29 <anatta> @let myList = (Cons 1 2 (Cons 3 4 Nil))
18:55:29 <gnalzo> you can also /query lambdabot to converse with it.
18:55:30 <lambdabot> Defined.
18:56:10 <anatta> > foldr (+) + myList
18:56:12 <lambdabot> error:
18:56:12 <lambdabot> • Couldn't match expected type ‘b -> t b -> b’
18:56:12 <lambdabot> with actual type ‘List' a0’
18:56:17 <anatta> eh
18:56:18 <Joao003> eq works
18:56:23 <anatta> > foldr (+) 0 myList
18:56:25 <lambdabot> 10
18:56:30 <anatta> that's what I meant
18:56:37 <Joao003> use cons' and nil'
18:57:06 <Joao003> ignore message above
18:57:19 <Joao003> > myList
18:57:21 <lambdabot> Cons 1 2 (Cons 3 4 Nil)
18:57:55 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Quit: Leaving.)
18:57:58 <Joao003> :t L.Cons\
18:58:01 <lambdabot> error:
18:58:01 <lambdabot> parse error (possibly incorrect indentation or mismatched brackets)
18:58:05 <Joao003> :t L.Cons
18:58:07 <lambdabot> a -> a -> List' a -> List' a
18:58:13 <Joao003> :t L
18:58:15 <lambdabot> error: Data constructor not in scope: L
18:58:22 <Joao003> :t List
18:58:23 <lambdabot> GHC.Exts.IsList l => [GHC.Exts.Item l] -> l
18:58:37 <Joao003> :t Prelude.List
18:58:39 <lambdabot> error:
18:58:39 <lambdabot> Not in scope: data constructor ‘Prelude.List’
18:58:39 <lambdabot> Perhaps you meant one of these:
18:59:03 <Joao003> > return []
18:59:05 <lambdabot> error:
18:59:05 <lambdabot> • Ambiguous type variables ‘m0’,
18:59:05 <lambdabot> ‘a0’ arising from a use of ‘show_M30273814737...
18:59:07 Guest5185 is now known as geekosaur
18:59:20 <Joao003> fake
18:59:37 geekosaur is now known as Guest3991
18:59:51 × Guest3991 quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Quit: Leaving)
18:59:54 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
18:59:59 <anatta> (:) is Cons
19:00:01 <Joao003> @src [] return
19:00:01 <lambdabot> return x = [x]
19:00:06 Guest3991 joins (~geekosaur@xmonad/geekosaur)
19:00:12 <Joao003> @src Maybe return
19:00:12 <lambdabot> return = Just
19:00:13 <anatta> > (:) 1 []
19:00:15 <lambdabot> [1]
19:00:22 <anatta> [] is Nil
19:00:38 <Joao003> @src List' return
19:00:39 <lambdabot> Source not found. Have you considered trying to match wits with a rutabaga?
19:01:00 Guest3991 is now known as allbery_b
19:01:12 <Joao003> anybody knows a good lambda calculus channel?
19:01:54 <Joao003> @src :
19:01:54 <lambdabot> Source not found. That's something I cannot allow to happen.
19:01:59 <Joao003> @src (:)
19:01:59 <lambdabot> Source not found. My mind is going. I can feel it.
19:02:49 cheater_ joins (~Username@user/cheater)
19:03:01 <Joao003> > [1] : [2] : [3]
19:03:03 <lambdabot> error:
19:03:03 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_1123’
19:03:03 <lambdabot> • In the expression: e_1123
19:03:17 <Joao003> @undefine
19:03:17 <lambdabot> Undefined.
19:03:24 <Joao003> > [1] : [2]
19:03:26 <lambdabot> error:
19:03:26 <lambdabot> • No instance for (Num [Integer]) arising from a use of ‘e_112’
19:03:26 <lambdabot> • In the expression: e_112
19:03:35 <anatta> you have no nil
19:03:41 <anatta> > [1] : [2] : [3] : []
19:03:43 <lambdabot> [[1],[2],[3]]
19:03:43 <Joao003> > [1] : [2] : []
19:03:45 <lambdabot> [[1],[2]]
19:03:55 <anatta> > 1 : 2 : 3 : []
19:03:57 <lambdabot> [1,2,3]
19:04:05 <anatta> if you don't want it nested
19:04:45 <Joao003> > join ([1] : [2] : [3] : []) []
19:04:47 <lambdabot> error:
19:04:47 <lambdabot> • Couldn't match expected type ‘[a0] -> t’ with actual type ‘[a1]’
19:04:47 <lambdabot> • The function ‘join’ is applied to two arguments,
19:05:06 <anatta> you could also do it prefixed, but : is generally used infix
19:05:07 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
19:05:09 <Joao003> scanl1 (+) [1, 2, 3]
19:05:10 <anatta> > (:) 1 ((:) 2 ((:) 3 []))
19:05:12 <lambdabot> [1,2,3]
19:05:19 <Joao003> > scanl1 (+) [1, 2, 3]
19:05:21 <lambdabot> [1,3,6]
19:05:52 <Joao003> how would i convert a value like 5 into [1..5]
19:06:02 × cheater__ quits (~Username@2001:871:222:4fa4:ba:8939:32ae:ff7b) (Ping timeout: 265 seconds)
19:06:41 <anatta> is there something wrong with [1..5]?
19:06:42 <allbery_b> > (\n -> enumFromTo 1 n) 5
19:06:43 <lambdabot> [1,2,3,4,5]
19:07:36 cheater__ joins (~Username@user/cheater)
19:08:00 <Joao003> > (enumFromTo 1) 5
19:08:02 <lambdabot> [1,2,3,4,5]
19:08:08 <Joao003> point-free
19:08:32 <anatta> @let enumTo n = take n . iterate (+1) $ 1
19:08:33 <lambdabot> Defined.
19:08:40 wootehfoot joins (~wootehfoo@user/wootehfoot)
19:08:48 <Joao003> because look at this
19:09:31 × cheater_ quits (~Username@user/cheater) (Ping timeout: 260 seconds)
19:09:49 <Joao003> @let factorial 0 = 1; factorial = product . (enumFromTo 1)
19:09:50 <lambdabot> /sandbox/tmp/.L.hs:159:1: error:
19:09:50 <lambdabot> Multiple declarations of ‘factorial’
19:09:50 <lambdabot> Declared at: /sandbox/tmp/.L.hs:155:1
19:10:02 <Joao003> @let factorial 0 = 1; factorial x = product . (enumFromTo 1) x
19:10:04 <lambdabot> /sandbox/tmp/.L.hs:159:25: error:
19:10:04 <lambdabot> • Couldn't match expected type ‘a1 -> t0 c’ with actual type ‘[a]’
19:10:04 <lambdabot> • Possible cause: ‘enumFromTo’ is applied to too many arguments
19:10:51 <anatta> @let factorial n = product [1..n]
19:10:52 <lambdabot> Defined.
19:11:02 <anatta> > factorial 3
19:11:02 <Joao003> but no 0?
19:11:05 <lambdabot> 6
19:11:10 <Joao003> > factorial 0
19:11:12 <lambdabot> 1
19:11:23 <Joao003> 0 exists
19:11:34 cheater_ joins (~Username@user/cheater)
19:11:44 <anatta> yes
19:11:50 <anatta> thanks to how product is defined
19:12:00 × cheater__ quits (~Username@user/cheater) (Ping timeout: 252 seconds)
19:12:00 <Joao003> @let factorial = product . (enumFromTo 1)
19:12:01 <anatta> > product []
19:12:02 <lambdabot> /sandbox/tmp/.L.hs:159:1: error:
19:12:02 <lambdabot> Multiple declarations of ‘factorial’
19:12:02 <lambdabot> Declared at: /sandbox/tmp/.L.hs:155:1
19:12:03 <lambdabot> 1
19:12:20 <Joao003> let me declare a point-free version
19:12:23 <Joao003> @undefine
19:12:23 <lambdabot> Undefined.
19:12:39 <Joao003> @let factorial = product . (enumFromTo 1)
19:12:40 <lambdabot> Defined.
19:12:54 <Joao003> map factorial [1..10]
19:12:58 <Joao003> > map factorial [1..10]
19:13:00 <lambdabot> [1,2,6,24,120,720,5040,40320,362880,3628800]
19:13:10 <Joao003> > factorial 0
19:13:12 <lambdabot> 1
19:13:34 <Joao003> :t factorial
19:13:35 <lambdabot> (Num c, Enum c) => c -> c
19:14:48 anatta_ joins (~AdiIRC@h-155-4-132-216.NA.cust.bahnhof.se)
19:15:21 × rodental quits (~rodental@38.146.5.222) (Remote host closed the connection)
19:15:30 rodental joins (~rodental@38.146.5.222)
19:17:54 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
19:18:16 × inversed quits (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 272 seconds)
19:18:35 inversed joins (~inversed@bcdcac82.skybroadband.com)
19:18:54 × anatta quits (~AdiIRC@h-155-4-132-216.NA.cust.bahnhof.se) (Ping timeout: 272 seconds)
19:18:56 anatta_ is now known as anatta
19:22:42 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds)
19:23:23 × CiaoSen quits (~Jura@p200300c9570452002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
19:23:37 <Joao003> why are people just leaving
19:24:37 <allbery_b> unstable clients, suspend/resume, busy elsewhere and timed out because they forgot it was open, etc.
19:29:20 × johnw quits (~johnw@2600:1700:cf00:db0:b438:9e21:5677:dc85) (Quit: ZNC - http://znc.in)
19:29:40 <Joao003> did you notice that the nickname colors cycle in a rainbow
19:30:41 <c_wraith> colors are assigned by your client
19:30:45 <allbery_b> that (and what colors are used) depends on the client
19:30:47 elbear joins (~lucian@86.127.154.189)
19:31:03 <Joao003> liberachat
19:31:35 johnw joins (~johnw@2600:1700:cf00:db0:4874:7c64:7447:a5bd)
19:31:50 <allbery_b> whois says you're using the web chat. many of us run actual IRC clients
19:32:06 <allbery_b> I'm using hexchatm for instance. irssi and weechat are also popular
19:32:41 eggplantade joins (~Eggplanta@2600:1700:38c5:d800:d14:f10:c58a:afef)
19:32:45 <allbery_b> s/hexchatm/hexchat,/
19:32:53 <Joao003> i'm too lazy to install a chat client
19:35:08 son0p joins (~ff@181.136.122.143)
19:35:24 <gnalzo> imo, irc client are more handy than the web chat.
19:35:45 <Joao003> most popular one?
19:37:08 <Joao003> @yow
19:37:08 <lambdabot> Everybody gets free BORSCHT!
19:37:15 <Joao003> @yow
19:37:15 <lambdabot> BELA LUGOSI is my co-pilot ...
19:39:10 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 260 seconds)
19:39:50 elbear joins (~lucian@86.127.154.189)
19:43:09 cheater__ joins (~Username@user/cheater)
19:43:48 <mauke> @quote
19:43:48 <lambdabot> lilac says: > L.randoms <lambdabot> [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,...]
19:44:05 <gnalzo> most popular? Idk. I use weechat ; irssi is very common also. If you want a graphical client, you can try hexchat.
19:44:14 <gnalzo> Joao003: ^
19:44:37 Felipe_ joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
19:44:57 <gnalzo> if you use emacs, try erc or circe
19:45:01 <Felipe_> hello from hexchat
19:45:09 × Joao003 quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Quit: Client closed)
19:45:29 × cheater_ quits (~Username@user/cheater) (Ping timeout: 268 seconds)
19:45:43 × Felipe_ quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Client Quit)
19:46:11 Joao003 joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
19:46:26 <anatta> I use adiirc, but no particular reason - it's ok though
19:46:54 <Guillaum[m]> I have a surprising behavior. In ghci, if I'm typing :reload (even multiples times), most (but not all) of my module involving .hs-boot files are reloaded with [X of Y] Compiling Module[boot] (path/to/Module.hs-boot, interpreted ) [Missing object file]. Does that ring a bell to you?
19:47:05 <Joao003> > "hexchat uses a monospace font :)"
19:47:07 <lambdabot> "hexchat uses a monospace font :)"
19:47:23 <allbery_b> that's configurable
19:47:36 jushur joins (~human@user/jushur)
19:47:42 <Joao003> tell me a handy haskell builtin
19:47:46 <allbery_b> I prefer a monospace font because I'm in channels that involve a lot of code and monospace works better for that
19:47:55 <Joao003> true
19:48:03 <mauke> @quote
19:48:03 <lambdabot> fubo says: I've seen "production" Prolog code and it bends my brain. Also, any language where performance is even less predictable than in Haskell strikes me as an odd choice.
19:48:22 <Joao003> lambdabot mentions Prolog
19:48:44 × shriekingnoise quits (~shrieking@186.137.175.87) (Ping timeout: 260 seconds)
19:48:45 <Joao003> @quote
19:48:45 <lambdabot> JelloBiafra says: The conveniences you demanded are now mandatory.
19:48:52 <anatta> also, if you choose a non-monospace font, you lose that nice late 90s quakenet feeling
19:48:59 <Joao003> lol true
19:49:16 <Joao003> does someone here also use hexchat?
19:49:33 <allbery_b> [16 19:45:01] <Felipe_> hello from hexchat
19:49:43 <allbery_b> [16 19:32:06] <allbery_b> I'm using hexchatm for instance. irssi and weechat are also popular
19:50:17 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
19:50:57 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
19:51:05 barak joins (~barak@77.125.91.132)
19:51:11 <Joao003> > true
19:51:13 <lambdabot> error:
19:51:13 <lambdabot> • Variable not in scope: true
19:51:13 <lambdabot> • Perhaps you meant data constructor ‘True’ (imported from Data.Bool)
19:51:14 × pwug quits (~pwug@user/pwug) (Quit: Leaving)
19:51:18 <Joao003> > True
19:51:19 <lambdabot> True
19:51:23 <Joao003> @src Bool
19:51:23 <lambdabot> data Bool = False | True deriving (Eq, Ord)
19:51:39 <Joao003> > True(1)(2)
19:51:40 <lambdabot> error:
19:51:40 <lambdabot> • Couldn't match expected type ‘t0 -> t1 -> t’
19:51:40 <lambdabot> with actual type ‘Bool’
19:51:48 <Joao003> not like lambda calculus :/
19:52:26 <Joao003> @hoogle select
19:52:26 <mauke> :t bool
19:52:26 <lambdabot> Control.Monad.Trans.Select select :: ((a -> r) -> a) -> Select r a
19:52:27 <lambdabot> Text.Blaze.Html4.FrameSet select :: Html -> Html
19:52:27 <lambdabot> Text.Blaze.Html4.Strict select :: Html -> Html
19:52:28 <lambdabot> a -> a -> Bool -> a
19:52:43 <Joao003> > select 1 2 True
19:52:44 <lambdabot> error:
19:52:44 <lambdabot> Variable not in scope: select :: t0 -> t1 -> Bool -> t
19:52:49 <mauke> > bool 1 2 true
19:52:50 <lambdabot> error:
19:52:50 <lambdabot> • Variable not in scope: true :: Bool
19:52:50 <lambdabot> • Perhaps you meant data constructor ‘True’ (imported from Data.Bool)
19:52:56 <mauke> hargh
19:53:04 <mauke> > bool 1 2 True
19:53:07 <lambdabot> 2
19:53:10 allbery_b is now known as geekosaur
19:53:18 <Joao003> here's a handy builtin
19:53:29 <Joao003> instead of map . zip
19:53:42 thebinary joins (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6)
19:53:51 <mauke> :t zipWith
19:53:53 <lambdabot> (a -> b -> c) -> [a] -> [b] -> [c]
19:53:53 × thebinary quits (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6) (Read error: Connection reset by peer)
19:54:00 <Joao003> > ((map (+)) . zip) [1, 2, 3] [4, 5, 6]
19:54:02 <lambdabot> error:
19:54:02 <lambdabot> • Couldn't match expected type ‘[a2] -> t’
19:54:02 <lambdabot> with actual type ‘[a0 -> a0]’
19:54:20 <Joao003> > wut
19:54:20 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds)
19:54:21 <anatta> you have to do some curry
19:54:21 <lambdabot> error:
19:54:21 <lambdabot> • Variable not in scope: wut
19:54:21 <lambdabot> • Perhaps you meant ‘put’ (imported from Control.Monad.State)
19:54:28 <Joao003> lol
19:54:40 <anatta> or rather uncurry
19:54:56 <Joao003> > map (+) (zip [1, 2, 3] [4, 5, 6])
19:54:58 <lambdabot> error:
19:54:58 <lambdabot> • No instance for (Num (Integer, Integer))
19:54:58 <lambdabot> arising from a use of ‘e_1123456’
19:55:23 <Joao003> > zip [1, 2, 3] [4, 5, 6]
19:55:25 <lambdabot> [(1,4),(2,5),(3,6)]
19:55:43 <mauke> > map (\(x, y) -> x + y) (zip [1, 2, 3] [4, 5, 6])
19:55:44 <lambdabot> [5,7,9]
19:55:47 <Joao003> > map (\x y -> x + y) zip [1, 2, 3] [4, 5, 6]
19:55:49 <lambdabot> error:
19:55:49 <lambdabot> • Couldn't match expected type ‘[a2] -> [a3] -> t’
19:55:49 <lambdabot> with actual type ‘[a1 -> a1]’
19:56:10 <Joao003> > map ((+).(\x y -> [x, y])) zip [1, 2, 3] [4, 5, 6]
19:56:12 <lambdabot> error:
19:56:12 <lambdabot> • Couldn't match expected type ‘[a1] -> [a2] -> t’
19:56:12 <lambdabot> with actual type ‘[(a3 -> [a3]) -> a3 -> [a3]]’
19:56:17 <Joao003> why
19:56:21 <mauke> > map (uncurry (+)) (zip [1, 2, 3] [4, 5, 6])
19:56:23 <lambdabot> [5,7,9]
19:56:33 <mauke> > zipWith (+) [1, 2, 3] [4, 5, 6]
19:56:34 <Joao003> :t uncurry
19:56:35 <lambdabot> [5,7,9]
19:56:35 <lambdabot> (a -> b -> c) -> (a, b) -> c
19:56:51 <anatta> uncurry lets you use (a, b) as an argument to a function that takes a and b as arguments
19:56:56 <Joao003> oh
19:57:08 <Joao003> @src zipWith
19:57:09 <lambdabot> zipWith f (a:as) (b:bs) = f a b : zipWith f as bs
19:57:09 <lambdabot> zipWith _ _ _ = []
19:57:41 <Joao003> cool
19:57:41 <anatta> didn't you learn zipWith before? ;)
19:57:45 <Joao003> yes
19:57:50 gmg joins (~user@user/gehmehgeh)
19:58:26 barak_ joins (~barak@2a02:14f:83:8c51:8201:e0b9:51e:f012)
19:58:55 <mauke> :t flip id
19:58:56 <lambdabot> b -> (b -> c) -> c
19:59:20 <Joao003> f u n c t i o n a p p l i c a t i o n
19:59:53 <mauke> :t fix error
19:59:54 <lambdabot> [Char]
20:00:04 <Joao003> > fix error
20:00:06 <lambdabot> "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex...
20:00:09 <Joao003> lol
20:00:14 <anatta> one nice thing with zip/zipwith is that you can do things like
20:00:46 <anatta> > zipWith (\a b -> show b <> ": " <> a) ["Item 1", "Item 2", "Item 3"] [1..]
20:00:47 <lambdabot> ["1: Item 1","2: Item 2","3: Item 3"]
20:00:47 × barak quits (~barak@77.125.91.132) (Ping timeout: 246 seconds)
20:00:53 <Joao003> yeah
20:01:23 <Joao003> look at this
20:02:16 <Joao003> is the unary negation operator - or something else
20:02:40 <mauke> :t negate
20:02:41 mizlan joins (~mizlan@2607:f010:2e9:21:a875:7a6d:b1bf:f503)
20:02:41 <lambdabot> Num a => a -> a
20:02:43 <geekosaur> it is, but. there's a conflict between sections and unary negation, so you have to wrap it in parens
20:02:51 <geekosaur> or that, yes
20:02:57 <Joao003> oh
20:03:12 <geekosaur> and there's "subtract" for the section since unary - stole it
20:03:23 <Joao003> > zip [1..] (map negate [1..])
20:03:23 <geekosaur> > show -1
20:03:24 <mauke> :t (0 -)
20:03:26 <lambdabot> [(1,-1),(2,-2),(3,-3),(4,-4),(5,-5),(6,-6),(7,-7),(8,-8),(9,-9),(10,-10),(11...
20:03:26 <lambdabot> error:
20:03:26 <lambdabot> • No instance for (Num (() -> String)) arising from a use of ‘e_11’
20:03:26 <lambdabot> (maybe you haven't applied a function to enough arguments?)
20:03:26 <lambdabot> Num a => a -> a
20:03:35 <geekosaur> > show (-1)
20:03:37 <lambdabot> "-1"
20:04:36 <Joao003> each natural number with its negative counterpart
20:04:48 <mauke> > map (ap (,) negate) [1 ..]
20:04:51 <lambdabot> [(1,-1),(2,-2),(3,-3),(4,-4),(5,-5),(6,-6),(7,-7),(8,-8),(9,-9),(10,-10),(11...
20:05:08 <Joao003> :t ap (,)
20:05:10 <lambdabot> (a1 -> a2) -> a1 -> (a1, a2)
20:05:18 <Joao003> @src aap
20:05:18 <lambdabot> Source not found. I can't hear you -- I'm using the scrambler.
20:05:21 <Joao003> @src ap
20:05:22 <lambdabot> ap = liftM2 id
20:05:54 × mei quits (~mei@user/mei) (Remote host closed the connection)
20:05:58 <Joao003> :t (,)
20:05:59 <lambdabot> a -> b -> (a, b)
20:06:20 <Joao003> > map (ap (,) id) [1..]
20:06:22 <lambdabot> [(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,1...
20:06:50 <mauke> > map (join (,)) [1 ..]
20:06:52 <lambdabot> [(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,1...
20:07:00 <Joao003> join is hauting me
20:07:05 <Joao003> haunting*
20:07:14 <Joao003> @src join
20:07:14 <lambdabot> join x = x >>= id
20:07:38 <mauke> > ap (f :: Expr -> Expr -> Expr) g x
20:07:42 <lambdabot> f x (g x)
20:07:47 mei joins (~mei@user/mei)
20:08:11 <Joao003> > map (join (, . ,)) [1..]
20:08:14 <lambdabot> <hint>:1:16: error: parse error on input ‘,’
20:08:24 <mauke> > join (f :: Expr -> Expr -> Expr) x
20:08:26 <lambdabot> f x x
20:08:27 <Joao003> > map (join ((,) . (,))) [1..]
20:08:29 <lambdabot> error:
20:08:29 <lambdabot> • No instance for (Typeable b0)
20:08:29 <lambdabot> arising from a use of ‘show_M80989264104891518178’
20:08:49 <Joao003> > map (join (+)) [1..]
20:08:51 <lambdabot> [2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,5...
20:10:08 <Joao003> > map (ap (,) (-1)) (map (*2) [1..])
20:10:10 <lambdabot> error:
20:10:10 <lambdabot> • No instance for (Num (Integer -> ()))
20:10:10 <lambdabot> arising from a use of ‘e_1121’
20:11:01 <mauke> > map (ap (,) (subtract 1)) [2, 4 ..]
20:11:03 <lambdabot> [(2,1),(4,3),(6,5),(8,7),(10,9),(12,11),(14,13),(16,15),(18,17),(20,19),(22,...
20:11:37 <Joao003> > [1, 2, 4, 8..]
20:11:39 <lambdabot> <hint>:1:12: error: parse error on input ‘..’
20:11:41 <mauke> > map (ap (,) pred) [2, 4 ..]
20:11:42 <lambdabot> [(2,1),(4,3),(6,5),(8,7),(10,9),(12,11),(14,13),(16,15),(18,17),(20,19),(22,...
20:12:06 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 272 seconds)
20:12:20 × peutri quits (~peutri@bobo.desast.re) (*.net *.split)
20:12:20 × cstml_ quits (cstml@tilde.club) (*.net *.split)
20:12:20 × tomku quits (~tomku@user/tomku) (*.net *.split)
20:12:20 × AndreasK quits (sid320732@id-320732.uxbridge.irccloud.com) (*.net *.split)
20:12:20 × jamestmartin quits (~james@jtmar.me) (*.net *.split)
20:12:20 × heartburn quits (~gass@2a00:d880:3:1::b1e4:b241) (*.net *.split)
20:12:20 × srk quits (~sorki@user/srk) (*.net *.split)
20:12:20 × jjhoo quits (~jahakala@user/jjhoo) (*.net *.split)
20:12:52 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
20:13:26 peutri joins (~peutri@bobo.desast.re)
20:13:26 cstml_ joins (cstml@tilde.club)
20:13:26 tomku joins (~tomku@user/tomku)
20:13:26 AndreasK joins (sid320732@id-320732.uxbridge.irccloud.com)
20:13:26 jamestmartin joins (~james@jtmar.me)
20:13:26 heartburn joins (~gass@2a00:d880:3:1::b1e4:b241)
20:13:26 srk joins (~sorki@user/srk)
20:13:26 jjhoo joins (~jahakala@user/jjhoo)
20:13:28 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
20:14:07 <Joao003> > Cons 1 2
20:14:09 <lambdabot> error:
20:14:09 <lambdabot> • Data constructor not in scope: Cons :: t0 -> t1 -> t
20:14:09 <lambdabot> • Perhaps you meant one of these:
20:14:19 <Joao003> > Cons 1 Cons 2 Nil
20:14:20 <lambdabot> error:
20:14:20 <lambdabot> • Data constructor not in scope: Cons :: t2 -> t0 -> t3 -> t1 -> t
20:14:20 <lambdabot> • Perhaps you meant one of these:
20:14:26 <Joao003> > Cons 1 (Cons 2 Nil)
20:14:28 <lambdabot> error:
20:14:28 <lambdabot> • Data constructor not in scope: Cons :: t2 -> t0 -> t
20:14:28 <lambdabot> • Perhaps you meant one of these:
20:14:36 <mauke> > (:) 1 ((:) 2 [])
20:14:38 <lambdabot> [1,2]
20:14:53 <Joao003> > flip (:)
20:14:54 <lambdabot> error:
20:14:54 <lambdabot> • No instance for (Typeable a0)
20:14:55 <lambdabot> arising from a use of ‘show_M64082810815618954257’
20:14:58 <mauke> > 1 : (2 : [])
20:14:59 <lambdabot> [1,2]
20:15:37 <mauke> > let snoc = flip (:) in snoc (snoc [] 2) 1
20:15:38 <lambdabot> [1,2]
20:16:19 × vgtw quits (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in)
20:17:52 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds)
20:17:59 <Joao003> @let powers_of_2_times x = x : powers_of_2 (x * 2)
20:18:00 <lambdabot> /sandbox/tmp/.L.hs:158:27: error:
20:18:00 <lambdabot> Variable not in scope: powers_of_2 :: t -> [t]
20:18:00 <lambdabot> |
20:18:08 <Joao003> @let powers_of_2_times x = x : powers_of_2_times (x * 2)
20:18:09 <lambdabot> Defined.
20:18:10 Xeroine joins (~Xeroine@user/xeroine)
20:18:21 <Joao003> > powers_of_2_times 1
20:18:24 <lambdabot> [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,2...
20:18:58 <mauke> > iterate (* 2) 1
20:19:00 <lambdabot> [1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,2...
20:19:09 × mud quits (~mud@user/kadoban) (Quit: quit)
20:19:14 <Joao003> didn't know that existed
20:19:21 <Joao003> > iterate negate 1
20:19:22 <lambdabot> [1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,...
20:20:00 <Joao003> > flip const 1 2
20:20:02 <lambdabot> 2
20:20:29 telser joins (~quassel@user/telser)
20:21:43 × mizlan quits (~mizlan@2607:f010:2e9:21:a875:7a6d:b1bf:f503) (Ping timeout: 252 seconds)
20:22:26 <Joao003> > iterate (>> ["foo", "bar", "baz"]) []
20:22:28 <lambdabot> [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],...
20:22:41 <Joao003> > iterate (>> []) ["foo", "bar", "baz"]
20:22:43 <lambdabot> [["foo","bar","baz"],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[...
20:22:58 <Joao003> > iterate (>> [1, 2, 3]) ["foo", "bar", "baz"]
20:23:00 <lambdabot> error:
20:23:00 <lambdabot> • No instance for (Num [Char]) arising from the literal ‘1’
20:23:00 <lambdabot> • In the expression: 1
20:23:16 <Joao003> > iterate (>> ["a", "b", "c"]) ["foo", "bar", "baz"]
20:23:17 <lambdabot> [["foo","bar","baz"],["a","b","c","a","b","c","a","b","c"],["a","b","c","a",...
20:24:52 <Joao003> > let my_right_right xs ys = concat (map (const ys) xs)
20:24:54 <lambdabot> <no location info>: error:
20:24:54 <lambdabot> not an expression: ‘let my_right_right xs ys = concat (map (const ys) xs)’
20:25:03 <Joao003> @let my_right_right xs ys = concat (map (const ys) xs)
20:25:05 <lambdabot> Defined.
20:25:35 × trev quits (~trev@user/trev) (Remote host closed the connection)
20:25:52 <Joao003> > my_right_right ["foo", "bar", "baz"] ["a", "b", "c"]
20:25:53 <lambdabot> ["a","b","c","a","b","c","a","b","c"]
20:25:58 nschoe joins (~q@2a01:e0a:8e:a190:b484:b6ee:bcd3:fa3f)
20:27:28 coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
20:28:00 <__monty__> I'm getting the following error from cabal test: `module ‘CubeNets’ cannot be found locally`. The module is part of the exposed-modules of the library stanza and the subdirectory it is in is in the hs-source-dirs list. What am I doing wrong?
20:28:58 <__monty__> (I don't really need this module being part of the library in the first place, it's only used by one executable but if I want to test it there's no alternative AFAIK?)
20:28:59 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
20:29:07 <anatta> Joao003: this is cute
20:29:13 <anatta> > let chunk n = map (take n) . takeWhile (not . null) . iterate (drop n) in chunk 5 [1..22]
20:29:15 <lambdabot> [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22]]
20:30:00 × nschoe quits (~q@2a01:e0a:8e:a190:b484:b6ee:bcd3:fa3f) (Client Quit)
20:30:20 <Joao003> > null Nil
20:30:23 <lambdabot> error:
20:30:23 <lambdabot> Data constructor not in scope: Nil :: t0 a0
20:30:29 <Joao003> > null []
20:30:31 <lambdabot> True
20:30:40 <Joao003> > null [1]
20:30:41 <lambdabot> False
20:30:52 <Joao003> > take 3 [1, 2, 3, 4]
20:30:54 <lambdabot> [1,2,3]
20:31:08 <Joao003> > take 3 [1, 2]
20:31:10 <lambdabot> [1,2]
20:32:03 <Joao003> > drop 3 [1, 2, 3, 4]
20:32:04 <lambdabot> [4]
20:32:22 mud joins (~mud@user/kadoban)
20:32:25 cheater__ is now known as cheater
20:32:52 titibandit1 joins (~titibandi@xdsl-81-173-160-143.nc.de)
20:32:55 <Joao003> > (iterate . (drop 3)) [1..20]
20:32:57 <lambdabot> error:
20:32:57 <lambdabot> • Couldn't match type ‘[a0]’ with ‘a -> a’
20:32:57 <lambdabot> Expected type: [a0] -> a -> a
20:33:17 <anatta> > iterate (drop 3) [1..10]
20:33:18 <lambdabot> [[1,2,3,4,5,6,7,8,9,10],[4,5,6,7,8,9,10],[7,8,9,10],[10],[],[],[],[],[],[],[...
20:33:20 × barak_ quits (~barak@2a02:14f:83:8c51:8201:e0b9:51e:f012) (Ping timeout: 246 seconds)
20:33:22 <Joao003> > iterate (drop 3) [1..20]
20:33:23 <__monty__> Is the problem that the subdirectory has to be part of the name of the module? My subdirectory has spaces in the name.
20:33:24 <lambdabot> [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],[4,5,6,7,8,9,10,11,12,...
20:33:52 <Joao003> > takeWhile (not null) (iterate (drop 3) [1..20])
20:33:54 <lambdabot> error:
20:33:54 <lambdabot> • Couldn't match expected type ‘[a] -> Bool’
20:33:54 <lambdabot> with actual type ‘Bool’
20:34:16 <anatta> not . null
20:34:26 <Joao003> > takeWhile (not (null)) (iterate (drop 3) [1..20])
20:34:28 <lambdabot> error:
20:34:28 <lambdabot> • Couldn't match expected type ‘[a] -> Bool’
20:34:28 <lambdabot> with actual type ‘Bool’
20:34:36 <Joao003> > takeWhile (not . null) (iterate (drop 3) [1..20])
20:34:38 <lambdabot> [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],[4,5,6,7,8,9,10,11,12,...
20:34:50 <anatta> but you have too big lists
20:35:03 <Joao003> > map (take 3) (takeWhile (not . null) (iterate (drop 3) [1..20]))
20:35:04 gentauro joins (~gentauro@user/gentauro)
20:35:04 <lambdabot> [[1,2,3],[4,5,6],[7,8,9],[10,11,12],[13,14,15],[16,17,18],[19,20]]
20:35:19 <anatta> like you get this
20:35:50 <anatta> > takeWhile (not . null) . iterate (drop 3) $ [1..10]
20:35:52 <lambdabot> [[1,2,3,4,5,6,7,8,9,10],[4,5,6,7,8,9,10],[7,8,9,10],[10]]
20:36:04 <anatta> and then you take the first n elements from each
20:36:29 <Joao003> i understand
20:36:36 <Joao003> so you have the list chunked
20:36:43 <anatta> exactly
20:37:09 <Joao003> all thanks to iterate, takeWhile and map
20:37:34 merijn joins (~merijn@86-86-29-250.fixed.kpn.net)
20:37:39 opticblast joins (~Thunderbi@ip72-195-236-18.ph.ph.cox.net)
20:37:51 <Joao003> @hoogle takeUntil
20:37:51 <lambdabot> Data.List.HT takeUntil :: (a -> Bool) -> [a] -> [a]
20:37:51 <lambdabot> Data.FingerTree takeUntil :: Measured v a => (v -> Bool) -> FingerTree v a -> FingerTree v a
20:37:51 <lambdabot> Data.List.Tools takeUntil :: (a -> Bool) -> [a] -> [a]
20:38:03 <Joao003> THERE'S takeUntil
20:38:27 <Joao003> > map (take 3) (takeUntil (null) (iterate (drop 3) [1..20]))
20:38:28 <lambdabot> error:
20:38:28 <lambdabot> Variable not in scope:
20:38:29 <lambdabot> takeUntil :: (t0 a0 -> Bool) -> [[a1]] -> [[a]]
20:39:16 <Joao003> > map (take 3) (takeUntil null (iterate (drop 3) [1..20]))
20:39:17 <lambdabot> error:
20:39:17 <lambdabot> Variable not in scope:
20:39:17 <lambdabot> takeUntil :: (t0 a0 -> Bool) -> [[a1]] -> [[a]]
20:39:54 cowboy8625 joins (~cowboy@96-81-192-225-static.hfc.comcastbusiness.net)
20:39:59 <Joao003> @src takeUntil\
20:39:59 <lambdabot> Source not found. Have you considered trying to match wits with a rutabaga?
20:40:01 <Joao003> @src takeUntil
20:40:01 <lambdabot> Source not found. You untyped fool!
20:40:20 <Joao003> @src [] takeUntil
20:40:20 <lambdabot> Source not found. I don't think I can be your friend on Facebook anymore.
20:40:32 <Joao003> LAMBDABOT STOP MAKING FUN OF ME
20:41:54 <_________> @src Data.List.Tools.takeUntil
20:41:54 <lambdabot> Source not found. Where did you learn to type?
20:42:30 × merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 272 seconds)
20:42:51 <Joao003> @let index = (take 1) . drop
20:42:52 <lambdabot> /sandbox/tmp/.L.hs:156:20: error:
20:42:52 <lambdabot> • Couldn't match type ‘[a0] -> [a0]’ with ‘[a]’
20:42:53 <lambdabot> Expected type: Int -> [a]
20:43:38 <Joao003> @let index i lst = take 1 (drop i lst)
20:43:39 <lambdabot> Defined.
20:43:52 <Joao003> > index 0 [1, 2, 3, 4, 5]
20:43:54 <lambdabot> error:
20:43:54 <lambdabot> Ambiguous occurrence ‘index’
20:43:54 <lambdabot> It could refer to
20:43:59 <Joao003> > L.index 0 [1, 2, 3, 4, 5]
20:44:01 <lambdabot> [1]
20:44:07 <Joao003> @undefine
20:44:07 <lambdabot> Undefined.
20:44:15 <Joao003> > index 0 [1..5]
20:44:17 <lambdabot> error:
20:44:17 <lambdabot> • No instance for (Ix [Integer]) arising from a use of ‘index’
20:44:17 <lambdabot> • In the expression: index 0 [1 .. 5]error:
20:44:28 <Joao003> > index [1..5] 0
20:44:30 <lambdabot> error:
20:44:30 <lambdabot> • Couldn't match expected type ‘(a1, a1)’ with actual type ‘[a0]’
20:44:30 <lambdabot> • In the first argument of ‘index’, namely ‘[1 .. 5]’
20:44:35 <Joao003> @src index
20:44:36 <lambdabot> Source not found. The more you drive -- the dumber you get.
20:44:41 <Joao003> :t index
20:44:42 <lambdabot> Ix a => (a, a) -> a -> Int
20:45:00 <__monty__> Joao003: Colud you keep lambdabot experimentation to private messages? Once you find an interesting incantation feel free to share.
20:45:07 <Joao003> ok
20:45:16 <__monty__> Thank you.
20:45:34 <Joao003> how can i priv in hexchat
20:45:44 <__monty__> Hmm, isn't hs-source-dirs supposed to specify the roots of the module hierarchy? So the location of the module shouldn't matter as long as its directory is part of hs-source-dirs?
20:46:00 <__monty__> Joao003: /msg lambdabot <your message>
20:47:46 × mechap quits (~mechap@user/mechap) (Ping timeout: 268 seconds)
20:48:22 mechap joins (~mechap@user/mechap)
20:49:17 <geekosaur> __monty__, it's a list of source directories. it's only "roots" in the sense that module A.B.C will be sought as A/B/C.hs in one of the listed directories
20:50:10 <__monty__> geekosaur: Yes, so CubeNets should be found in subdir/CubeNets.hs if subdir is in the hs-source-dirs, right?
20:50:20 <geekosaur> yes
20:52:29 × Joao003 quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Quit: Leaving)
20:52:54 × opticblast quits (~Thunderbi@ip72-195-236-18.ph.ph.cox.net) (Ping timeout: 260 seconds)
20:53:17 × Igloo quits (~ian@matrix.chaos.earth.li) (Ping timeout: 252 seconds)
20:55:01 Igloo joins (~ian@matrix.chaos.earth.li)
20:56:19 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
20:59:15 opticblast joins (~Thunderbi@ip72-195-236-18.ph.ph.cox.net)
21:01:35 <__monty__> It looks like I can't specify a directory with spaces in the name in hs-source-dirs for a library maybe? It works for executables if I quote it but if I replace the quoted subdirectory name with a simpler name in the library stanza cabal complain about not finding the module in . and the subdir. With the quoted name with spaces it doesn't say it's looking in multiple directories.
21:02:18 <Inst> if you need to do a fold, and don't need laziness, foldl' is most efficient
21:02:34 <Inst> if you need to do an accumulating parameter, iterate' is most efficient
21:02:46 <Inst> what's the most efficient way to do a while loop in Haskell?
21:05:06 <Inst> actually, until is probably the function i'm looking for
21:07:40 boxscape_ joins (~boxscape_@81.191.27.107)
21:08:58 laalyn joins (~laalyn@c-73-241-126-7.hsd1.ca.comcast.net)
21:09:12 <gnalzo> Inst: there is also Control.Monad.Extra.Loop
21:09:52 <Inst> until needs a strict variant :(
21:10:11 Joao003 joins (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6)
21:10:13 <gnalzo> I use it with Either monad.
21:10:20 <c_wraith> haskell doesn't have a "most efficient way to do a while loop" because it's kind of not the right question
21:10:42 <c_wraith> Haskell has most efficient ways to achieve a specific outcome. Those can vary wildly for things you'd use a while loop for in C.
21:11:11 <Inst> i'm doing a "find single peak of an array" question
21:11:44 <Inst> tried to do it iteratively in Julia to practice iterative algorithms, ended up having to do it recursively in Haskell, then I translated it into tabulation, then moved the tabulation back into Haskell
21:11:54 <c_wraith> like you have some data that's bitonic (first increasing, then decreasing) and you're looking for the maximum?
21:12:02 <Inst> a local maximum
21:12:17 <Inst> with items on the edge ignoring the left and right side as appropriate
21:12:19 <Joao003> single peak?
21:12:21 <c_wraith> You can do that sub-linearly
21:12:34 <Joao003> what's single peak?
21:12:38 <Inst> divide and conquer
21:12:49 <Inst> find a single local maximum of the array
21:13:18 <c_wraith> Just write it with direct recursion, let GHC rewrite it into a loop the natural way
21:13:19 <Joao003> give me an example
21:13:27 × bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
21:13:33 <mauke> like binary search up the gradient?
21:13:40 <Inst> [1,5,3,4] 4 and 5 are local peaks / local maxima of the array
21:13:40 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving)
21:13:52 <Inst> well, 4 isn't, technically, hence the use of the term peak
21:13:53 <c_wraith> mauke: You need to be a little more clever - look at two internal points, not just one
21:14:15 <Inst> the method i ended up using that worked was to slice the array repeatedly, ignoring the pivot point
21:14:16 <Joao003> Inst: I still don't understand.
21:14:17 <c_wraith> Inst: wait, are you looking for *all* local maxima, or just any arbitrary one?
21:14:18 <Inst> select a pivot at the center
21:14:21 <Inst> just any arbitrary one
21:14:44 <Inst> all local maxima is more challenging, and is likely, if it's sub-linear, only slightly so
21:15:06 <Inst> the local maxima i'd imagine would be some kind of fold
21:15:38 <c_wraith> yeah, all maxima requires looking at all elements.
21:15:41 <Inst> i have an iterate' version cooked up in Haskell, but it's pretty ugly because I'm doing dropWhile to get a single solution
21:15:46 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
21:15:47 <Inst> c_wraith: nope
21:15:52 <Inst> slightly less than all elements
21:16:10 <mauke> any element you don't look at could be a secret maximum
21:16:12 <Inst> well, it's all on the definition
21:16:17 <Inst> of maxima
21:16:21 <Inst> hence peak
21:16:31 <Inst> if peak is defined as being greater than its adjacent elements, then, well :)
21:16:49 Lycurgus joins (~juan@user/Lycurgus)
21:18:09 <Inst> i'm probably hopeless
21:18:19 <Inst> doing the opencourseware stuff, took like 8 hours to get through the first example
21:18:21 <Inst> https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-fall-2011/c32185c7158955425455159a8455298b_MIT6_006F11_lec01.pdf
21:18:47 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
21:19:14 × titibandit1 quits (~titibandi@xdsl-81-173-160-143.nc.de) (Remote host closed the connection)
21:19:20 × opticblast quits (~Thunderbi@ip72-195-236-18.ph.ph.cox.net) (Remote host closed the connection)
21:19:39 opticblast joins (~Thunderbi@ip72-195-236-18.ph.ph.cox.net)
21:19:45 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
21:21:33 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Remote host closed the connection)
21:24:46 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
21:25:14 × stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds)
21:25:34 × cowboy8625 quits (~cowboy@96-81-192-225-static.hfc.comcastbusiness.net) (Ping timeout: 272 seconds)
21:26:07 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
21:26:07 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
21:26:07 wroathe joins (~wroathe@user/wroathe)
21:26:53 cowboy8625 joins (~cowboy@2600:380:644a:6d24:c232:3492:ab2e:f14)
21:28:00 <Inst> also, i see what you mean, it's easier to just have the helper function directly loop into itself instead of using an until
21:29:22 × elbear quits (~lucian@86.127.154.189) (Ping timeout: 272 seconds)
21:29:25 × opticblast quits (~Thunderbi@ip72-195-236-18.ph.ph.cox.net) (Remote host closed the connection)
21:29:45 opticblast joins (~Thunderbi@ip72-195-236-18.ph.ph.cox.net)
21:32:37 vgtw joins (~vgtw@user/vgtw)
21:35:20 × cowboy8625 quits (~cowboy@2600:380:644a:6d24:c232:3492:ab2e:f14) (Ping timeout: 256 seconds)
21:35:53 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
21:36:06 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
21:36:07 <Joao003> how do i call a function with a and b as arguments when a and b are in a pair
21:36:30 Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
21:36:32 <__monty__> :t uncurry
21:36:34 <lambdabot> (a -> b -> c) -> (a, b) -> c
21:36:36 <Philonous> The delimited continuation primitives are fun to play around with. Suddenly IO has all the algebraic effects! :D
21:36:37 <Joao003> thx
21:37:16 cowboy8625 joins (~cowboy@96-81-192-225-static.hfc.comcastbusiness.net)
21:38:49 × cowboy8625 quits (~cowboy@96-81-192-225-static.hfc.comcastbusiness.net) (Client Quit)
21:38:52 ddellacosta joins (~ddellacos@89.45.224.240)
21:39:29 stiell_ joins (~stiell@gateway/tor-sasl/stiell)
21:41:43 fserucas joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7)
21:42:23 <anatta> why is quasiquotation so complicated yet looks so nice :(
21:43:08 <Joao003> so uncurry makes a function not use currying
21:43:56 <monochrom> We mean: uncurry f (your pair here)
21:44:36 <hpc> it just takes a tuple and applies those arguments one after the other
21:44:39 <hpc> @src uncurry
21:44:39 <lambdabot> uncurry f p = f (fst p) (snd p)
21:46:51 shriekingnoise joins (~shrieking@186.137.175.87)
21:47:24 × panovia quits (~user@user/siracusa) (Quit: Bye!)
21:49:27 × Joao003 quits (~Joao003@2804:840:8311:d200:4883:8bfa:de92:92a6) (Quit: Leaving)
21:49:40 × mei quits (~mei@user/mei) (Remote host closed the connection)
21:51:28 mei joins (~mei@user/mei)
21:54:06 thebinary joins (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6)
21:54:24 × thebinary quits (~thebinary@2400:1a00:b040:c75d:84c9:5a90:c46b:31e6) (Read error: Connection reset by peer)
21:55:25 × Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
21:56:37 × boxscape_ quits (~boxscape_@81.191.27.107) (Quit: Connection closed)
21:57:39 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
21:59:59 × opticblast quits (~Thunderbi@ip72-195-236-18.ph.ph.cox.net) (Ping timeout: 260 seconds)
22:01:35 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 255 seconds)
22:05:54 Xeroine joins (~Xeroine@user/xeroine)
22:08:34 × fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Remote host closed the connection)
22:10:41 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
22:11:36 × mei quits (~mei@user/mei) (Remote host closed the connection)
22:11:51 × eggplantade quits (~Eggplanta@2600:1700:38c5:d800:d14:f10:c58a:afef) (Remote host closed the connection)
22:12:14 wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com)
22:12:14 × wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
22:12:14 wroathe joins (~wroathe@user/wroathe)
22:12:39 × mud quits (~mud@user/kadoban) (Quit: quit)
22:13:51 mei joins (~mei@user/mei)
22:16:28 tdrsrmaeo^ joins (~tdrsrmaeo@76.145.190.81)
22:20:42 × mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8)
22:25:14 <__monty__> Can anyone reproduce having both `.` and a directory with spaces in a library's hs-source-dirs doesn't work?
22:25:30 waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
22:25:56 × themc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
22:27:35 × m1dnight quits (~christoph@78-22-0-121.access.telenet.be) (Quit: WeeChat 3.8)
22:28:36 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
22:29:20 eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
22:29:36 m1dnight joins (~christoph@78-22-0-121.access.telenet.be)
22:31:26 × Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 256 seconds)
22:31:40 × gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
22:32:04 <geekosaur> seems to work here?
22:34:51 Xeroine joins (~Xeroine@user/xeroine)
22:34:52 <geekosaur> https://gist.github.com/geekosaur/0471ebb68e07386f726b0bc3f3339336 note comment in Dummy.hs (probably should have used paste.t.c)
22:37:07 <geekosaur> oh, I didn't use a library
22:37:53 <geekosaur> just for grins and giggles, what happens if you treat it as a monoidal field? That is, have two hs-source-dir fields, one with . and the other the directory with spaces?
22:40:05 × Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving)
22:40:50 <geekosaur> okay, reproduces with a library
22:41:32 <geekosaur> and still fails with monoidal addition
22:41:51 azimut joins (~azimut@gateway/tor-sasl/azimut)
22:42:01 × troydm quits (~troydm@user/troydm) (Ping timeout: 256 seconds)
22:43:06 mechap joins (~mechap@user/mechap)
22:43:26 <geekosaur> nope, PEBCAK. works here
22:43:41 <geekosaur> (forgot to add the library as a dependency, whoops)
22:45:29 <geekosaur> https://paste.tomsmeding.com/XixdTNBU
22:47:27 <geekosaur> also works if I change hs-src-dirs back to the original
22:47:47 <geekosaur> hm, but I'm running cabal HEAD as of 2 weeks ago
22:48:34 <geekosaur> I can't test with the older one readily because I'm using it in XDG mode which the older cabal doesn't support
22:50:26 × abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
22:50:42 <geekosaur> trying it anyway, will have to nuke it afterward to not break everything else
22:51:07 <geekosaur> worked with 3.8.1.0
22:52:00 × mimmy__ quits (~mimmy@86.48.14.198) (Ping timeout: 252 seconds)
22:53:45 gabiruh_ joins (~gabiruh@vps19177.publiccloud.com.br)
22:54:14 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 260 seconds)
22:54:49 × gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 260 seconds)
22:58:33 bgs joins (~bgs@212-85-160-171.dynamic.telemach.net)
22:58:57 <alexfmpe[m]> is there a name for "expression with the parenthesis to the right" ? that is, placing the parenthesis in the same way `infixr` would?
22:58:57 <alexfmpe[m]> I could have sworn I had seen a name for this somewhere, like 'left-shallow tree' but I can't find anything else
22:58:57 <alexfmpe[m]> it's almost the recursive structure of a cons list, but not exactly if the binary operator, is, say `(,)`
23:00:13 × chiselfu1e quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
23:00:49 chiselfuse joins (~chiselfus@user/chiselfuse)
23:01:19 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
23:06:40 <monochrom> Do you mean like "foo ()" ?
23:07:09 mud joins (~mud@user/kadoban)
23:07:24 × coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
23:11:34 <geekosaur> I think they mean the parse tree is lopsided toward the right
23:14:33 barzo joins (~hd@31.223.41.44)
23:16:23 × p3n_ quits (~p3n@217.198.124.246) (Ping timeout: 268 seconds)
23:18:48 × biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer)
23:23:48 <__monty__> geekosaur: Thank you for trying that out.
23:24:21 biberu joins (~biberu@user/biberu)
23:25:24 <__monty__> I'm a bit stumped. Checking with verbosity it seems like the path *is* being added to the call to GHC. So I don't understand why cabal says the module isn't found but doesn't say which directories it's looking in.
23:26:23 p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1)
23:27:19 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
23:27:20 <alexfmpe[m]> <geekosaur> "I think they mean the parse tree..." <- yeah, something like `(a, (b, (c, (d, e))))`
23:27:39 <EvanR> right biased tree?
23:28:34 AlexNoo_ joins (~AlexNoo@94.233.240.156)
23:28:43 × Alex_test quits (~al_test@94.233.240.156) (Ping timeout: 252 seconds)
23:29:04 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:29:24 <alexfmpe[m]> I guess? is that a commonly used term for this? googling that seems to give me some other 'biased' concept
23:30:20 × AlexZenon quits (~alzenon@94.233.240.156) (Ping timeout: 272 seconds)
23:30:55 × AlexNoo quits (~AlexNoo@94.233.240.156) (Ping timeout: 252 seconds)
23:31:18 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:33:00 <geekosaur> I get multiple kinds of biasing for "right-biased tree" but the first hit sounds closeish: describes a balanced tree that becomes unbalanced in some direction on insertion of a new node
23:33:19 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
23:34:47 <geekosaur> "right-biased parse tree" is no better, sadly
23:36:03 <EvanR> a maximally unbalanced tree xD
23:36:13 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
23:36:22 Alex_test joins (~al_test@94.233.240.156)
23:36:54 mizlan joins (~mizlan@2607:f010:2e9:21:a875:7a6d:b1bf:f503)
23:36:59 AlexZenon joins (~alzenon@94.233.240.156)
23:40:49 <mauke> a tree cosplaying as a linked list
23:41:15 × mizlan quits (~mizlan@2607:f010:2e9:21:a875:7a6d:b1bf:f503) (Ping timeout: 260 seconds)
23:43:10 jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c)
23:46:06 mimmy__ joins (~mimmy@86.48.14.201)
23:46:47 jmorris joins (uid537181@id-537181.uxbridge.irccloud.com)
23:53:20 freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg)
23:54:03 chiselfuse joins (~chiselfus@user/chiselfuse)
23:54:37 abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net)
23:55:26 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:56:24 cheater_ joins (~Username@user/cheater)
23:56:51 × tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
23:58:11 × L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
23:58:24 × freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds)
23:59:11 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
23:59:20 cheater_ is now known as cheater

All times are in UTC on 2023-01-16.