Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 663 664 665 666 667 668 669 670 671 672 673 .. 5022
502,152 events total
2020-10-16 02:36:54 <lambdabot> Functor f => (a -> b) -> f a -> f b
2020-10-16 02:36:59 <koz_> This also takes a function as an argument.
2020-10-16 02:37:04 <koz_> Note where they are positioned.
2020-10-16 02:37:14 <koz_> This is literally readable straight out of the type.
2020-10-16 02:37:29 × lemmih quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection)
2020-10-16 02:37:58 <crestfallen> yes the operands have the function in the first and second places respectively
2020-10-16 02:38:00 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-16 02:38:13 lemmih joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c)
2020-10-16 02:38:18 <koz_> crestfallen: So... what's the issue?
2020-10-16 02:38:39 <koz_> The reason the arguments are arranged that way is literally written into their types.
2020-10-16 02:38:40 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Client Quit)
2020-10-16 02:38:48 <koz_> Is your question '_why_ is it that they're arranged that way?'.
2020-10-16 02:38:54 <koz_> The answer is 'because someone decided it so'.
2020-10-16 02:38:59 × lemmih quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection)
2020-10-16 02:39:06 reallymemorable joins (~quassel@ip68-9-215-56.ri.ri.cox.net)
2020-10-16 02:39:12 <koz_> There's no (particular) reason why the arguments to bind or <$> are in the order that they are.
2020-10-16 02:39:17 <koz_> But that's how they're defined.
2020-10-16 02:39:31 <crestfallen> ok fair enough. because yeah I would have thought that the function would have been in the same operand place
2020-10-16 02:39:31 lemmih joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c)
2020-10-16 02:39:41 <koz_> crestfallen: No, there's no reason for this.
2020-10-16 02:40:00 <koz_> Order of arguments is arbitrary. There are some ergonomic issues regarding currying, but in this case, it's arbitrary.
2020-10-16 02:40:12 <solonarv> oh! I see what you mean now. This is a reason I often use =<< instead of >>=
2020-10-16 02:40:29 × lemmih quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection)
2020-10-16 02:40:38 <koz_> solonarv: Yeah, and I think there's a flipped fmap too.
2020-10-16 02:41:00 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 244 seconds)
2020-10-16 02:41:01 lemmih joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c)
2020-10-16 02:41:30 <crestfallen> excellent. yeah because technically, despite the context that bind is giving us, in some sense id is being applied to (Just (Just 5)) , right?
2020-10-16 02:41:58 <koz_> crestfallen: I don't understand what you're saying.
2020-10-16 02:41:59 × lemmih quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection)
2020-10-16 02:42:04 <koz_> Bind is defined the way it is.
2020-10-16 02:42:08 <koz_> It means what its definition says.
2020-10-16 02:42:14 <crestfallen> but if you look at it as > (>>=) (Just (Just 5)) id it looks odd
2020-10-16 02:42:28 <koz_> Yeah - there's a reason we don't often write infix operators prefix.
2020-10-16 02:42:44 <koz_> We can do it, and sometimes it can be more useful or readable that way, but there's a reason why >>= is infix.
2020-10-16 02:43:18 <koz_> There's no a priori reason why bind needed to be an infix operator. We could actually do _everything_ prefix!
2020-10-16 02:43:37 × ensyde quits (~ensyde@2600:1702:2e30:1a40:48f9:cdc3:db29:25b7) (Ping timeout: 260 seconds)
2020-10-16 02:43:46 × djellemah quits (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54) (Ping timeout: 244 seconds)
2020-10-16 02:43:49 whatisRT joins (~whatisRT@2002:5b41:6a33:0:e9bc:8751:d550:a446)
2020-10-16 02:44:06 <crestfallen> yeah, the distinction affects my perception of it, tis all..
2020-10-16 02:44:26 <monochrom> Some people want to write everything mixfix.
2020-10-16 02:44:35 <koz_> monochrom: These people write Agda.
2020-10-16 02:44:42 <monochrom> yeah :)
2020-10-16 02:44:56 <crestfallen> like looking at a function and saying, ok this goes here, and that goes there, and this is what the machine is doing :)
2020-10-16 02:45:43 <crestfallen> thanks great session koz_ et al
2020-10-16 02:47:52 <crestfallen> yeah solonarv 's point makes it more intuitive:
2020-10-16 02:47:55 <crestfallen> λ> (=<<) id (Just (Just 5))
2020-10-16 02:48:49 <crestfallen> but that's wrong to think of it that way. because id is not applied that way, right koz_ ?
2020-10-16 02:49:04 <koz_> crestfallen: I genuinely don't understand what you're saying or asking.
2020-10-16 02:49:13 <koz_> So I have no idea whether it's wrong to think of 'it' 'that way' or not.
2020-10-16 02:50:16 <crestfallen> nevermind thanks I'm overthinking it to poor results
2020-10-16 02:51:05 × renzhi quits (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 240 seconds)
2020-10-16 02:51:14 nbloomf joins (~nbloomf@2600:1700:83e0:1f40:21a4:edc3:68a:18f4)
2020-10-16 02:51:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-16 02:52:41 <fraktor> I am also quite confused
2020-10-16 02:56:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2020-10-16 02:59:48 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2020-10-16 02:59:54 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-16 03:00:01 × I440r quits (~I440r@195.206.169.184) ()
2020-10-16 03:00:12 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-16 03:00:12 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-16 03:00:12 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-16 03:00:51 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (verne.freenode.net (Nickname regained by services)))
2020-10-16 03:01:00 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-16 03:05:46 × crestfallen quits (~jvw@135.180.15.188) (Quit: leaving)
2020-10-16 03:05:55 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:e9bc:8751:d550:a446) (Ping timeout: 240 seconds)
2020-10-16 03:06:05 crestfallen joins (~jvw@135-180-15-188.fiber.dynamic.sonic.net)
2020-10-16 03:10:42 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2020-10-16 03:12:51 wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-16 03:13:25 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-16 03:13:32 × goepsilongo quits (~textual@2604:2000:1201:442c:2468:86aa:3a30:53a6) (Quit: Textual IRC Client: www.textualapp.com)
2020-10-16 03:19:46 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-10-16 03:20:09 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-16 03:22:02 × crestfallen quits (~jvw@135-180-15-188.fiber.dynamic.sonic.net) (Quit: Lost terminal)
2020-10-16 03:23:32 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Read error: Connection reset by peer)
2020-10-16 03:23:51 thir joins (~thir@p200300f27f02580079ce311adf6fad1c.dip0.t-ipconnect.de)
2020-10-16 03:24:51 × Gurkenglas_ quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
2020-10-16 03:25:15 unlink2 joins (~unlink2@p200300ebcf17c500f1cd4c5efbdddd1e.dip0.t-ipconnect.de)
2020-10-16 03:27:47 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
2020-10-16 03:28:32 × thir quits (~thir@p200300f27f02580079ce311adf6fad1c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-16 03:28:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-16 03:29:55 × ashbreeze quits (~mark@72-161-253-104.dyn.centurytel.net) (Ping timeout: 258 seconds)
2020-10-16 03:30:22 × polyrain quits (~polyrain@2001:8003:e501:6901:5438:7f7:706e:c9b0) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-16 03:32:15 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
2020-10-16 03:32:16 ashbreeze joins (~mark@72-161-252-240.dyn.centurytel.net)
2020-10-16 03:32:43 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-10-16 03:33:01 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-10-16 03:35:23 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
2020-10-16 03:35:48 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
2020-10-16 03:36:07 × jokester quits (~mono@unaffiliated/jokester) (Ping timeout: 260 seconds)
2020-10-16 03:36:09 larou joins (5201f2b7@gateway/web/cgi-irc/kiwiirc.com/ip.82.1.242.183)
2020-10-16 03:36:27 <larou> i rewrote the "typing the knot" with a "cycle"
2020-10-16 03:36:28 hackage hakyll-process 0.0.1.0 - Hakyll compiler for arbitrary external processes. https://hackage.haskell.org/package/hakyll-process-0.0.1.0 (jhmcstanton)
2020-10-16 03:36:28 <larou> https://pastebin.com/raw/J0e4fa3d
2020-10-16 03:37:51 <larou> it gives;
2020-10-16 03:37:52 <larou> *DLink> (fromCycle . (toCycle @False)) [1,2,3]
2020-10-16 03:37:53 <larou> [1,2,3]
2020-10-16 03:38:14 <larou> the regular tying the knot would not be able to do this
2020-10-16 03:38:21 <larou> since it could not "detect the cycle"
2020-10-16 03:38:41 <larou> ie, it would not support "fromCycle"
2020-10-16 03:39:03 <larou> i dont think the type applications machinery it requires was available at the time

All times are in UTC.