Logs: freenode/#haskell
| 2020-11-15 22:55:26 | <merijn> | You need to disable StarIsType |
| 2020-11-15 22:55:35 | <moet> | merijn: that sounds promising |
| 2020-11-15 22:56:01 | → | jedws joins (~jedws@101.184.175.183) |
| 2020-11-15 22:56:34 | <koz_> | Yeah, that's like {-# LANGUAGE NoStarIsType #-} or something. |
| 2020-11-15 22:57:04 | <moet> | NoStarIsType worked; thank you all |
| 2020-11-15 22:57:27 | <boom> | Ok, I'm stiil not sure why \x\y x z y is really \x\y (x z y), I know you said that it can't be any other way, but I still don't get it. |
| 2020-11-15 22:58:14 | <MarcelineVQ> | check out the wikipedia article for lambda calculus |
| 2020-11-15 22:58:30 | <koz_> | boom: What is the body of '\x . \y . x z y'? |
| 2020-11-15 22:58:31 | × | alp quits (~alp@2a01:e0a:58b:4920:ec99:aa8d:b2f4:59d2) (Ping timeout: 272 seconds) |
| 2020-11-15 22:58:59 | <boom> | \y . x z y |
| 2020-11-15 22:59:12 | → | alp joins (~alp@88.126.45.36) |
| 2020-11-15 22:59:17 | <koz_> | OK, so let's parenthesise it for convenience. |
| 2020-11-15 22:59:24 | <koz_> | \x . (\y . x z y) |
| 2020-11-15 22:59:34 | <koz_> | Now, we note that our body is an abstraction. |
| 2020-11-15 22:59:47 | <koz_> | Namely \y . x z y |
| 2020-11-15 22:59:51 | <koz_> | What is _its_ body? |
| 2020-11-15 22:59:56 | <boom> | so it also has a body |
| 2020-11-15 23:00:00 | <boom> | x z y |
| 2020-11-15 23:00:01 | <koz_> | Yes. |
| 2020-11-15 23:00:11 | <koz_> | So let's parenthesise _that_for convenience. |
| 2020-11-15 23:00:18 | <koz_> | \y . (x z y) |
| 2020-11-15 23:00:24 | <koz_> | And then paste that into our original. |
| 2020-11-15 23:00:30 | <koz_> | \x . (\y . (x z y)) |
| 2020-11-15 23:00:50 | <koz_> | Now, to deal with 'x z y', we apply the rule you pasted way back above. |
| 2020-11-15 23:01:01 | <koz_> | Which says that 'x z y' is really what? |
| 2020-11-15 23:01:07 | <boom> | (x z) y |
| 2020-11-15 23:01:20 | <koz_> | So after convenience parenthesising and pasting, we get? |
| 2020-11-15 23:01:47 | <boom> | \x . (\y . ((x z) y)) |
| 2020-11-15 23:01:53 | → | nexii joins (~user@38-73-246-124.starry-inc.net) |
| 2020-11-15 23:02:08 | <koz_> | Does that help? |
| 2020-11-15 23:02:27 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-11-15 23:02:37 | <boom> | yeah! thanks |
| 2020-11-15 23:03:32 | <koz_> | @pl \f -> f x >=> f y |
| 2020-11-15 23:03:32 | <lambdabot> | liftM2 (>=>) ($ x) ($ y) |
| 2020-11-15 23:04:21 | <koz_> | So wait that'd be like (>=>) <$> ($ x) ($ y) f? |
| 2020-11-15 23:04:24 | <koz_> | Sorry |
| 2020-11-15 23:04:36 | <koz_> | (>=>) <$> ($ x) <*> ($ y) <*> f |
| 2020-11-15 23:04:36 | <boom> | But in this way of doing things have we used the fact that application has priority ? |
| 2020-11-15 23:05:04 | <koz_> | boom: I don't think we have, no. |
| 2020-11-15 23:05:09 | <MarcelineVQ> | ((>=>) <$> ($ x) <*> ($ y)) f ? |
| 2020-11-15 23:05:24 | <koz_> | MarcelineVQ: Egads lol nope. |
| 2020-11-15 23:05:46 | → | conal joins (~conal@64.71.133.70) |
| 2020-11-15 23:06:00 | × | feliocrat quits (~feliocrat@95.70.185.239) (Remote host closed the connection) |
| 2020-11-15 23:06:40 | × | fendor quits (~fendor@178.165.131.163.wireless.dyn.drei.com) (Remote host closed the connection) |
| 2020-11-15 23:07:25 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-11-15 23:09:37 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2020-11-15 23:13:09 | → | Tario joins (~Tario@37.218.241.6) |
| 2020-11-15 23:14:13 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-11-15 23:14:57 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 2020-11-15 23:16:37 | → | conal joins (~conal@64.71.133.70) |
| 2020-11-15 23:17:01 | × | aarvar quits (~foewfoiew@50.35.43.33) (Ping timeout: 260 seconds) |
| 2020-11-15 23:17:48 | <monochrom> | You are also in for a lot of confusion and then disillusionment about what "priority" is really for. |
| 2020-11-15 23:18:27 | <monochrom> | TL;DR the highschool narrative of "do this first, do that later" is simplistic and inapplicable. |
| 2020-11-15 23:18:51 | <monochrom> | Truth be told it has never been about "do what first". |
| 2020-11-15 23:19:06 | <Uniaika> | :o |
| 2020-11-15 23:19:15 | <Uniaika> | so what is it about then? |
| 2020-11-15 23:19:16 | <koz_> | Something something order of reduction something something confluence something something. |
| 2020-11-15 23:19:30 | <monochrom> | Parsing. Where you may omit parentheses. |
| 2020-11-15 23:19:33 | <koz_> | I can something-something about a bazillion more terms in there. |
| 2020-11-15 23:19:41 | <koz_> | (heh) |
| 2020-11-15 23:19:54 | × | Tario quits (~Tario@37.218.241.6) (Read error: Connection reset by peer) |
| 2020-11-15 23:21:04 | × | Aquazi quits (uid312403@gateway/web/irccloud.com/x-ypggeakuiydyhszt) (Quit: Connection closed for inactivity) |
| 2020-11-15 23:21:52 | <monochrom> | It is just a happy coincidence that highschool operators are mostly eager (anti-lazy), therefore what's deeper in the parse tree are also what's "done" earlier. |
| 2020-11-15 23:21:59 | <monochrom> | However, consider this: |
| 2020-11-15 23:22:02 | → | Tario joins (~Tario@37.218.241.6) |
| 2020-11-15 23:22:41 | <monochrom> | @quote monochrom lazy.eval |
| 2020-11-15 23:22:41 | <lambdabot> | monochrom says: some kind of lazy evaluation is already known to highschool kids. teachers tell you that in a*(b+c), "evaluate b+c first", right? well, I challenge you to take 0*(389238493+97283748) |
| 2020-11-15 23:22:41 | <lambdabot> | and find one single student who faithfully evaluate 389238493+97283748 first. |
| 2020-11-15 23:23:08 | <koz_> | :D |
| 2020-11-15 23:23:13 | → | bangtree joins (~user@50-102-199-84.ekht.in.frontiernet.net) |
| 2020-11-15 23:23:38 | <monochrom> | This proves that "precedence is about evaluation order" is a white lie. |
| 2020-11-15 23:24:22 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-15 23:24:29 | <monochrom> | We forgive highschools for this white lie because the average people cannot cope with both concepts, evaluation order and parse tree, at the same time. |
| 2020-11-15 23:25:02 | <monochrom> | But as advanced programmers we cannot hang on to that untenable model ourselves. |
| 2020-11-15 23:25:33 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 23:30:10 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 2020-11-15 23:30:39 | <pjb> | monochrom: this is bullshit. There are he precendence rules, and then there are simplifications and shortcuts. There are numbers a, b and c with non-trivial values o such as a*(b+c) can be evaluated to d quickly, by following some simplification rule. for example, 1289389183012*(812738127389173981+-812738127389173981). |
| 2020-11-15 23:30:50 | <pjb> | or 1289389183012*(812738127389173981+-812738127389173980). |
| 2020-11-15 23:32:44 | <MarcelineVQ> | non-trivial doesn't mean big, it means it won't show up as a question in a trivial pursuit board game |
| 2020-11-15 23:34:56 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 2020-11-15 23:35:15 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 2020-11-15 23:37:16 | × | mirrorbird quits (~psutcliff@176.227.57.79) (Ping timeout: 272 seconds) |
| 2020-11-15 23:37:23 | × | Tario quits (~Tario@37.218.241.6) (Read error: Connection reset by peer) |
| 2020-11-15 23:38:53 | × | forell quits (~forell@unaffiliated/forell) (Ping timeout: 260 seconds) |
| 2020-11-15 23:39:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 2020-11-15 23:40:12 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-11-15 23:42:54 | × | noan quits (~noan@2604:a880:400:d0::12fc:5001) (Quit: ZNC 1.8.1 - https://znc.in) |
| 2020-11-15 23:42:54 | × | DigitalKiwi quits (~kiwi@unaffiliated/digitalkiwi) (Quit: quite.) |
| 2020-11-15 23:43:24 | → | noan joins (~noan@2604:a880:400:d0::12fc:5001) |
| 2020-11-15 23:45:19 | → | DigitalKiwi joins (~kiwi@unaffiliated/digitalkiwi) |
| 2020-11-15 23:45:52 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:4a3c:ad37:e0cc:3345) (Ping timeout: 260 seconds) |
| 2020-11-15 23:46:43 | → | forell joins (~forell@unaffiliated/forell) |
| 2020-11-15 23:48:42 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:8491:5fed:8d7f:daad) |
| 2020-11-15 23:49:48 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-11-15 23:50:28 | → | christo joins (~chris@81.96.113.213) |
| 2020-11-15 23:54:09 | × | mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz) |
| 2020-11-15 23:54:31 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-11-15 23:58:09 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:903c:6f64:11e3:36e2) |
| 2020-11-16 00:00:01 | × | pleia21 quits (~pleia2@92.223.89.101) () |
| 2020-11-16 00:00:59 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
All times are in UTC.