Newest at the top
2025-03-12 21:41:39 +0100 | jespada | (~jespada@r190-135-78-231.dialup.adsl.anteldata.net.uy) jespada |
2025-03-12 21:38:46 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-12 21:37:15 +0100 | jespada | (~jespada@2800:a4:22b4:9a00:f994:da25:97cf:4452) (Ping timeout: 244 seconds) |
2025-03-12 21:36:40 +0100 | sdrfan123 | (~sdrfan123@2607:fb90:ad22:c6ba:1965:cecd:386e:8114) |
2025-03-12 21:34:11 +0100 | <Inst> | https://www.cs.columbia.edu/~sedwards/classes/2023/4995-fall/index.html |
2025-03-12 21:34:02 +0100 | <Inst> | actually, no, I thought Columbia had a course wherein they taught you par and rpar before they taught you recursion, but it's only titled that way and it's a normal haskell course :( |
2025-03-12 21:31:19 +0100 | <Inst> | it's funny in a way, Chalmers starts their intro programming with Haskell in IO |
2025-03-12 21:28:27 +0100 | <Inst> | I'm sort of getting tired of trying to implement parFold, it's fun when I see huge improvements (moved from 80 seconds to 0.7 seconds), but ultimately it's not going to ever really be useful |
2025-03-12 21:27:33 +0100 | <Inst> | by the way, are there any good parallelization exercises for working with the spark parallelism system? |
2025-03-12 21:26:46 +0100 | <tomsmeding> | with only single-argument lambdas, it's very straightforward |
2025-03-12 21:26:43 +0100 | izzyfalco | (~jake_pers@user/izzyfalco) izzyfalco |
2025-03-12 21:26:35 +0100 | <tomsmeding> | if you add multi-argument lambdas to your language, the definition of WHNF gets a bit more intricate |
2025-03-12 21:26:14 +0100 | <Inst> | yeah, partially applied lambda was confusing |
2025-03-12 21:26:01 +0100 | <tomsmeding> | yes, because it's a lambda |
2025-03-12 21:25:50 +0100 | <Inst> | but (\y -> 2 + y) is WHNF |
2025-03-12 21:23:34 +0100 | <tomsmeding> | you're not wrong |
2025-03-12 21:23:23 +0100 | <EvanR> | it's constructors all the way down |
2025-03-12 21:23:09 +0100 | <tomsmeding> | and as I said, if you see lambda as the "constructor" of the function type, then it's just "it's a constructor" |
2025-03-12 21:22:49 +0100 | <tomsmeding> | if you see the lambda calculus as having just single-argument lambda functions (i.e. `\x y -> E` is sugar for `\x -> \y -> E`), then WHNF is "it's a constructor or a lambda" |
2025-03-12 21:21:58 +0100 | <EvanR> | whatever is involved |
2025-03-12 21:21:49 +0100 | <EvanR> | application is not WHNF |
2025-03-12 21:20:36 +0100 | <tomsmeding> | `(\x y -> x + y) 2` is not WHNF |
2025-03-12 21:20:24 +0100 | <tomsmeding> | Inst: what do you mean with "partially applied lambda"? |
2025-03-12 21:20:02 +0100 | <Inst> | iirc WHNF = constructor or partially applied lambda. What's in WHNF but not NF (unless it's been evaluated prior) is constructors holding unevaluated data afaik, right? |
2025-03-12 21:18:33 +0100 | <EvanR> | typescript... whose type system isn't particularly turing complete aiui |
2025-03-12 21:18:03 +0100 | <EvanR> | I don't see why my DOOM implementation in haskell doesn't just run at compile time! This long time joke apparently has become real in typescript recently |
2025-03-12 21:17:44 +0100 | <tomsmeding> | I have never had to use something like that yet. :) |
2025-03-12 21:17:30 +0100 | tomsmeding | had to look up "solvable" |
2025-03-12 21:16:11 +0100 | <c_wraith> | ah, I see. |
2025-03-12 21:16:03 +0100 | <int-e> | So there's some theoretical interest in HNFs. |
2025-03-12 21:15:51 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-03-12 21:15:51 +0100 | <int-e> | A pure lambda term is solvable iff it has a HNF. |
2025-03-12 21:15:41 +0100 | <c_wraith> | or even Integer, for the really bold |
2025-03-12 21:15:39 +0100 | <EvanR> | wouldn't that be nice |
2025-03-12 21:15:24 +0100 | <tomsmeding> | 'Just (1 + 2 :: Int)' then |
2025-03-12 21:15:20 +0100 | tomsmeding | grumbles |
2025-03-12 21:15:11 +0100 | <EvanR> | in haskell |
2025-03-12 21:15:06 +0100 | <EvanR> | though Just (1 + 2) in isolation can't be simplified |
2025-03-12 21:13:10 +0100 | <tomsmeding> | heh |
2025-03-12 21:13:06 +0100 | <c_wraith> | so textbooks include it |
2025-03-12 21:13:04 +0100 | <tomsmeding> | surely if I write 'Just (1 + 2)', a compiler should optimise that to Just 3? But as far as I understand, 'Just (1 + 2)' is in HNF |
2025-03-12 21:12:59 +0100 | <c_wraith> | I think it mostly makes for a really nice exercise to say "implement this optimization" |
2025-03-12 21:12:28 +0100 | <tomsmeding> | only the one at the left seems awfully arbitrary |
2025-03-12 21:12:21 +0100 | <c_wraith> | That's not quite the same, but the idea is related |
2025-03-12 21:12:18 +0100 | <tomsmeding> | c_wraith: but then why would it not reduce _all_ redexes? |
2025-03-12 21:11:55 +0100 | <c_wraith> | tomsmeding: HNF seems related to like... compiler optimizations. Find reducible expressions anywhere in the graph and reduce them at compile time, for instance. |
2025-03-12 21:11:30 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-12 21:09:32 +0100 | <tomsmeding> | EvanR: it makes sense if you consider a lambda to be the "constructor" of the (->) type |
2025-03-12 21:08:53 +0100 | <EvanR> | so lambda is WHNF, regardless of what's in it |
2025-03-12 21:08:43 +0100 | <tomsmeding> | I get WHNF and NF, but is HNF useful for anything? |