Newest at the top
| 2026-01-22 03:47:40 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection) |
| 2026-01-22 03:45:49 +0100 | <geekosaur> | list monad with no actions is Cartesian product. maybe you'd find the list comprehension version easier to interpret? |
| 2026-01-22 03:43:08 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-01-22 03:32:13 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2026-01-22 03:31:58 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak |
| 2026-01-22 03:30:44 +0100 | <haskellbridge> | <iqubic (she/her)> But sequenceA "foldr (liftA2 (:)) (pure [])" is a Cartesian product, and I'm not sure why. |
| 2026-01-22 03:29:58 +0100 | <haskellbridge> | <iqubic (she/her)> Erm... not that. It's late and I'm tired. |
| 2026-01-22 03:29:06 +0100 | <haskellbridge> | <iqubic (she/her)> "cart [[11,12], [21,22]]" is "[[11,21,22],[12,21,22]]" |
| 2026-01-22 03:28:17 +0100 | <haskellbridge> | <iqubic (she/her)> How does that compute a Cartesian product though? |
| 2026-01-22 03:27:21 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-01-22 03:27:20 +0100 | <haskellbridge> | <iqubic (she/her)> I see... that's very similar to "foldr (:) []", but with applicative actions. |
| 2026-01-22 03:26:47 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Remote host closed the connection) |
| 2026-01-22 03:25:17 +0100 | <monochrom> | I might rewrite "[[]]" as "pure []". |
| 2026-01-22 03:23:49 +0100 | <haskellbridge> | <iqubic (she/her)> And "foldr (liftA2 (:)) [[]]" does the same thing. |
| 2026-01-22 03:23:27 +0100 | <haskellbridge> | <iqubic (she/her)> sequenceA [[11,12], [21,22]] = [[11,21],[11,22],[12,21],[12,22]] |
| 2026-01-22 03:22:32 +0100 | <haskellbridge> | <iqubic (she/her)> Huh?!?!? How does that work? |
| 2026-01-22 03:22:27 +0100 | <haskellbridge> | <iqubic (she/her)> for lists "sequenceA" is "foldr (liftA2 (:)) [[]]" |
| 2026-01-22 03:22:08 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak |
| 2026-01-22 03:21:55 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Ping timeout: 264 seconds) |
| 2026-01-22 03:21:43 +0100 | <haskellbridge> | <iqubic (she/her)> I see... |
| 2026-01-22 03:16:07 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds) |
| 2026-01-22 03:14:58 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak |
| 2026-01-22 03:14:35 +0100 | FANTOM | (~fantom@87.75.185.177) (Ping timeout: 240 seconds) |
| 2026-01-22 03:13:45 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Read error: Connection reset by peer) |
| 2026-01-22 03:11:58 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-01-22 03:11:47 +0100 | <monochrom> | The reason I prefer functional programming is that I just do algebra and see how two programs do the same thing. As opposed to what most people do for imperative programming: talk in "English" "intuition (read: mince and bend words) and call that "understanding". (LLMs proved that it is not understanding.) |
| 2026-01-22 03:09:34 +0100 | <ncf> | cross f xs ys = xs >>= \x -> map (f x) ys = xs >>= \x -> ys >>= \y -> [f x y] = f <$> xs <*> ys |
| 2026-01-22 03:09:21 +0100 | <haskellbridge> | <iqubic (she/her)> Yeah, that makes sense... |
| 2026-01-22 03:09:16 +0100 | <monochrom> | Or yeah, that. |
| 2026-01-22 03:08:48 +0100 | <monochrom> | Alterantively convert your own recursion to foldr to see. :) |
| 2026-01-22 03:08:47 +0100 | <ncf> | convert foldr to concatMap and remember how the list monad works |
| 2026-01-22 03:08:23 +0100 | <monochrom> | Convert foldr back to your own recursion to see. |
| 2026-01-22 03:07:42 +0100 | humasect | (~humasect@dyn-192-249-132-90.nexicom.net) humasect |
| 2026-01-22 03:07:00 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak |
| 2026-01-22 03:06:11 +0100 | <haskellbridge> | <iqubic (she/her)> cross is the same as liftA2 if you work on lists and I have no clue why!!! |
| 2026-01-22 03:06:03 +0100 | vidak | (~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Read error: Connection reset by peer) |
| 2026-01-22 03:05:41 +0100 | <haskellbridge> | <iqubic (she/her)> So, this is breaking my brain... How the heck is this the same as "liftA2" for lists: "cross f xs ys = foldr (\x rec -> (map (f x) ys) ++ rec) [] xs" |
| 2026-01-22 03:00:52 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2026-01-22 02:59:05 +0100 | connrs | (~connrs@user/connrs) connrs |
| 2026-01-22 02:56:10 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |
| 2026-01-22 02:51:20 +0100 | typedfern_ | (~Typedfern@192.red-83-37-37.dynamicip.rima-tde.net) typedfern |
| 2026-01-22 02:46:49 +0100 | omidmash1 | omidmash |
| 2026-01-22 02:46:49 +0100 | omidmash | (~omidmash@user/omidmash) (Ping timeout: 244 seconds) |
| 2026-01-22 02:45:14 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2026-01-22 02:44:53 +0100 | omidmash1 | (~omidmash@user/omidmash) omidmash |
| 2026-01-22 02:44:14 +0100 | connrs | (~connrs@user/connrs) (Ping timeout: 244 seconds) |
| 2026-01-22 02:44:10 +0100 | FANTOM | (~fantom@87.75.185.177) |
| 2026-01-22 02:42:55 +0100 | FANTOM | (~fantom@87.75.185.177) (Ping timeout: 240 seconds) |
| 2026-01-22 02:40:59 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
| 2026-01-22 02:40:24 +0100 | merijn | (~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn |