2023/01/16

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