2025/01/31

Newest at the top

2025-01-31 21:17:00 +0100 <lambdabot> ()
2025-01-31 21:16:59 +0100 <mauke> > Just undefined `seq` ()
2025-01-31 21:16:48 +0100 <lambdabot> ()
2025-01-31 21:16:46 +0100 <mauke> > case undefined of { Identity _ -> () }
2025-01-31 21:15:15 +0100 <euouae> rebel newtype
2025-01-31 21:14:33 +0100 <mauke> .oO( and cannot be taxed )
2025-01-31 21:13:42 +0100 <mauke> since there's only one possible constructor, it has no representation at all
2025-01-31 21:13:27 +0100 <mauke> at runtime, newtype patterns are no-ops
2025-01-31 21:13:08 +0100 <euouae> the article I linked above mentioned that newtype is an exception but did not say yet why
2025-01-31 21:12:55 +0100 <euouae> The subtlety is that newtype always matches?
2025-01-31 21:12:46 +0100 <mauke> even though it looks like we're matching on a constructor
2025-01-31 21:12:23 +0100 <mauke> newtype Identity a = Identity a; ... case undefined of { Identity _ -> () } -- evaluates to ()
2025-01-31 21:11:45 +0100 <mauke> oh, and there's a subtlety with newtype constructor patterns
2025-01-31 21:10:23 +0100 <lambdabot> 0
2025-01-31 21:10:21 +0100 <Rembane> > (\(x:_) -> x) [0, undefined]
2025-01-31 21:10:07 +0100 <mauke> otherwise lazy lambda calculus would never get anything done :-)
2025-01-31 21:09:37 +0100 <euouae> ah, thank you...
2025-01-31 21:09:25 +0100 <mauke> yes
2025-01-31 21:09:09 +0100 <euouae> Oh you're saying `f` itself is lazily evaluated until a lambda form is exposed
2025-01-31 21:08:50 +0100 <mauke> I don't think there's any pattern matching here
2025-01-31 21:08:35 +0100 <lambdabot> *Exception: Prelude.undefined
2025-01-31 21:08:34 +0100 <mauke> > undefined 42
2025-01-31 21:08:20 +0100 <lambdabot> 0
2025-01-31 21:08:19 +0100 <Rembane> > (\c _ -> c) 0 undefined
2025-01-31 21:07:36 +0100 <euouae> e.g. `(\c _ -> c) 0 missiles` does not evaluate missiles because it fits into the hole
2025-01-31 21:07:05 +0100 <euouae> Yeah I was thinking that also in terms of pattern matching too, is that wrong?
2025-01-31 21:06:59 +0100 <mauke> can't f x if f is still thunk
2025-01-31 21:06:41 +0100 <mauke> probably also to lambda form for function application
2025-01-31 21:05:17 +0100Guest39(~Guest39@cpc1-lich12-2-0-cust2633.3-2.cable.virginm.net) (Quit: Client closed)
2025-01-31 21:03:07 +0100 <euouae> Is that an accurate understanding?
2025-01-31 21:02:55 +0100 <euouae> I've been reading <https://www.vex.net/~trebla/haskell/lazy.xhtml> and what seems to me is that lazy evaluation in Haskell means that expressions are only evaluated enough to match patterns & guards
2025-01-31 21:01:42 +0100euouae(~euouae@user/euouae) euouae
2025-01-31 21:00:44 +0100caconym(~caconym@user/caconym) caconym
2025-01-31 21:00:07 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-01-31 21:00:04 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-01-31 20:58:49 +0100gehmehgehgmg
2025-01-31 20:48:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-01-31 20:47:54 +0100weary-traveler(~user@user/user363627) (Remote host closed the connection)
2025-01-31 20:43:15 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 246 seconds)
2025-01-31 20:39:06 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-01-31 20:33:37 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2025-01-31 20:32:46 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-01-31 20:31:43 +0100vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-01-31 20:30:17 +0100vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 265 seconds)
2025-01-31 20:18:01 +0100jespada(~jespada@2800:a4:2215:4d00:9c45:c000:6937:52ff) (Client Quit)
2025-01-31 20:17:53 +0100jespada(~jespada@2800:a4:2215:4d00:9c45:c000:6937:52ff) jespada
2025-01-31 20:11:36 +0100Guest39(~Guest39@cpc1-lich12-2-0-cust2633.3-2.cable.virginm.net)
2025-01-31 20:10:39 +0100jespada(~jespada@2800:a4:2215:4d00:20a9:6cd:d7c4:a65f) (Quit: Textual IRC Client: www.textualapp.com)
2025-01-31 20:10:25 +0100ncf(~n@monade.li) ncf
2025-01-31 20:10:09 +0100ncf(~n@monade.li) (Quit: Fairfarren.)