Logs: freenode/#haskell
| 2020-10-16 01:59:19 | × | reppertj quits (~textual@pool-96-246-209-59.nycmny.fios.verizon.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 2020-10-16 01:59:44 | <crestfallen> | koz_: yeah thanks. the unification of (>>=) and id , I fully get type-wise. sometimes when I try to visualize function application in the implementation, I visualize it differently from how I understand the types. |
| 2020-10-16 02:00:25 | <crestfallen> | by-hand substitutions I really enjoy koz_ |
| 2020-10-16 02:00:38 | <koz_> | I actually had to do this recently to get myself out of CPS hell. |
| 2020-10-16 02:00:41 | <koz_> | (at Real Job) |
| 2020-10-16 02:01:09 | × | lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (card.freenode.net (Nickname regained by services))) |
| 2020-10-16 02:01:15 | → | lagothrix joins (~lagothrix@unaffiliated/lagothrix) |
| 2020-10-16 02:01:51 | <crestfallen> | koz_: you said to literally look up ... |
| 2020-10-16 02:02:10 | <crestfallen> | dang it irssi won't give me scrollback! |
| 2020-10-16 02:02:37 | <koz_> | crestfallen: Yep, in the sense of 'in the thing you pasted'. |
| 2020-10-16 02:03:35 | <crestfallen> | <koz_> Literally look up the desugaring of do-notation, and rewrite that example with explicit use of return and bind. |
| 2020-10-16 02:03:35 | × | xff0x quits (~fox@2001:1a81:538a:0:f127:8532:42d4:579b) (Ping timeout: 272 seconds) |
| 2020-10-16 02:03:45 | <koz_> | Oh, in that sense. |
| 2020-10-16 02:04:02 | <koz_> | Then I meant 'investigate' or 'find reference materials on'. |
| 2020-10-16 02:04:08 | <koz_> | In the 'look up X in the dictionary' use. |
| 2020-10-16 02:04:53 | → | xff0x joins (~fox@2001:1a81:5391:7900:f127:8532:42d4:579b) |
| 2020-10-16 02:05:16 | <crestfallen> | yeah, you see I thought {ma <- mma; ma} was somehow knowing how to strip off the outer Just, as well as in {y <- x; y} .. somehow |
| 2020-10-16 02:05:28 | × | Tops2 quits (~Tobias@dyndsl-095-033-092-130.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 2020-10-16 02:05:31 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 2020-10-16 02:05:44 | <crestfallen> | but of course that is impossible koz_ |
| 2020-10-16 02:05:59 | × | lemmih_ quits (~lemmih@218.186.157.57) (Remote host closed the connection) |
| 2020-10-16 02:05:59 | <koz_> | crestfallen: Don't let syntax confuse you - the types tell the truth. |
| 2020-10-16 02:06:23 | → | lemmih_ joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) |
| 2020-10-16 02:06:25 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
| 2020-10-16 02:06:42 | × | lucasb quits (uid333435@gateway/web/irccloud.com/x-qhpgfsleurzdehfq) (Quit: Connection closed for inactivity) |
| 2020-10-16 02:06:57 | <crestfallen> | so I'm trying to think of where to find a good explanation of desugared do-notation ... working koz_ ... |
| 2020-10-16 02:07:27 | → | elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
| 2020-10-16 02:07:59 | × | lemmih_ quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection) |
| 2020-10-16 02:08:29 | <koz_> | crestfallen: https://wiki.haskell.org/Typeclassopedia#do_notation |
| 2020-10-16 02:08:37 | <koz_> | The Typeclassopedia is the source of considerable wisdom. |
| 2020-10-16 02:08:42 | → | lemmih_ joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) |
| 2020-10-16 02:08:44 | <koz_> | There's a desugaring grammar right in that entry. |
| 2020-10-16 02:09:52 | <crestfallen> | hit on academic paper by marlow, peyton-jones, kmett et al :/ |
| 2020-10-16 02:10:16 | <koz_> | crestfallen: Yeah, have a read of the link above. |
| 2020-10-16 02:10:16 | <crestfallen> | thanks kindly copy that koz_ |
| 2020-10-16 02:10:18 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:11d5:8dc1:169a:e187) (Quit: oisdk) |
| 2020-10-16 02:10:57 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 258 seconds) |
| 2020-10-16 02:11:04 | <crestfallen> | I do get your explanation now and Ax*man's |
| 2020-10-16 02:11:06 | → | pera joins (~pera@unaffiliated/pera) |
| 2020-10-16 02:12:42 | → | fraktor joins (~walt@129.93.191.18) |
| 2020-10-16 02:12:49 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-16 02:14:45 | <fraktor> | Would it be hypothetically possible to create something like Elm, where web apps are done using FRP and then rendered using a DOM diffing algorithm, to truly native applications? |
| 2020-10-16 02:14:58 | <koz_> | fraktor: Hypothetically yes. |
| 2020-10-16 02:15:04 | <koz_> | Given that Elm does this. |
| 2020-10-16 02:15:14 | <koz_> | However, the practical details of this are... somewhat difficult. |
| 2020-10-16 02:15:53 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-16 02:16:35 | <fraktor> | Yeah. Native GUIs don't have the same features for manipulating a DOM that web browsers do. Plus you need a cross-platform GUI library in the first place. |
| 2020-10-16 02:17:30 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-16 02:18:15 | → | goepsilongo joins (~textual@2604:2000:1201:442c:2468:86aa:3a30:53a6) |
| 2020-10-16 02:18:25 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-16 02:18:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2020-10-16 02:18:37 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-16 02:19:13 | → | drbean joins (~drbean@TC210-63-209-75.static.apol.com.tw) |
| 2020-10-16 02:19:18 | → | polyrain joins (~polyrain@2001:8003:e501:6901:5438:7f7:706e:c9b0) |
| 2020-10-16 02:20:08 | <fraktor> | Speaking of which, I haven't done GUI programming in Haskell. Is there a preferred cross-platform library for it? |
| 2020-10-16 02:20:18 | <koz_> | For what definition of 'cross-platform'? |
| 2020-10-16 02:20:59 | <koz_> | If you consider GTK 'cross-platform', then there's some stuff on top of that. |
| 2020-10-16 02:21:16 | <koz_> | I think there's some FLTK stuff as well. |
| 2020-10-16 02:23:19 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 2020-10-16 02:23:58 | × | theDon quits (~td@muedsl-82-207-238-240.citykom.de) (Ping timeout: 272 seconds) |
| 2020-10-16 02:24:59 | <crestfallen> | koz_: also if I may, this is bugging me. how if we write it using prefix notation: |
| 2020-10-16 02:25:02 | <crestfallen> | (>>=) (Just (Just 5)) id |
| 2020-10-16 02:25:22 | <koz_> | crestfallen: What are you asking? 'how if we write it using prefix notation:' is not a sentence. |
| 2020-10-16 02:25:22 | → | theDon joins (~td@muedsl-82-207-238-153.citykom.de) |
| 2020-10-16 02:25:37 | <crestfallen> | sorry I'm writing it.. |
| 2020-10-16 02:26:26 | → | Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) |
| 2020-10-16 02:26:41 | <crestfallen> | it looks like (m m a) is being applied to id |
| 2020-10-16 02:27:02 | → | danso joins (~dan@107-190-41-58.cpe.teksavvy.com) |
| 2020-10-16 02:28:45 | <koz_> | crestfallen: I still don't understand. What do you mean by that? |
| 2020-10-16 02:28:57 | <koz_> | Like, are you saying that you don't get how prefix syntax is being used with an infix function? |
| 2020-10-16 02:28:58 | × | revprez_1nzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 246 seconds) |
| 2020-10-16 02:29:01 | <koz_> | Or something else? |
| 2020-10-16 02:30:06 | → | revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) |
| 2020-10-16 02:30:11 | <crestfallen> | sorry my thinking is faulty. (<$>) (*10) [4,5,6] << yeah the pattern is the same here |
| 2020-10-16 02:31:23 | <crestfallen> | > (*10) <$> [4,5,6] |
| 2020-10-16 02:31:25 | <lambdabot> | [40,50,60] |
| 2020-10-16 02:31:50 | <crestfallen> | no it's reversed. do you see my point koz_ ? |
| 2020-10-16 02:32:01 | <koz_> | Nothing is reversed. |
| 2020-10-16 02:32:16 | <koz_> | You can make an infix operator prefix by wrapping it in (). |
| 2020-10-16 02:32:26 | <koz_> | And you can make a prefix function infix by wrapping it in ``. |
| 2020-10-16 02:32:40 | <koz_> | Like, are you confused by the prefix-infix distinction? |
| 2020-10-16 02:32:50 | <koz_> | I'm genuinely not sure what you're trying to say, or indeed, what isn't clear to you. |
| 2020-10-16 02:33:48 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:55b2:236:b746:75d5) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-16 02:33:59 | × | lemmih_ quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection) |
| 2020-10-16 02:35:01 | → | lemmih joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) |
| 2020-10-16 02:35:21 | <crestfallen> | in this case , the function is listed on the rhs of the infix: (Just (Just 5)) >>= id |
| 2020-10-16 02:35:29 | <crestfallen> | koz_: ^ |
| 2020-10-16 02:35:46 | <koz_> | crestfallen: Functions can be arguments to other functions. |
| 2020-10-16 02:35:59 | × | lemmih quits (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) (Remote host closed the connection) |
| 2020-10-16 02:36:00 | <koz_> | There's nothing special about 'functions as arguments' versus 'non-functions as arguments'. |
| 2020-10-16 02:36:12 | <crestfallen> | in this case, the function is on the lhs : (*10) <$> [4,5,6] |
| 2020-10-16 02:36:24 | <koz_> | crestfallen: Yeah, and that's no different. |
| 2020-10-16 02:36:29 | <koz_> | :t (>>) |
| 2020-10-16 02:36:31 | <lambdabot> | Monad m => m a -> m b -> m b |
| 2020-10-16 02:36:32 | → | lemmih joins (~lemmih@2406:3003:2072:44:e1c8:96e1:7910:2c4c) |
| 2020-10-16 02:36:33 | <koz_> | Sorry |
| 2020-10-16 02:36:38 | <koz_> | :t (>>=) |
| 2020-10-16 02:36:39 | <lambdabot> | Monad m => m a -> (a -> m b) -> m b |
| 2020-10-16 02:36:44 | <koz_> | This takes a function as an argument. |
| 2020-10-16 02:36:53 | <koz_> | :t (<$>) |
All times are in UTC.