2026/01/22

Newest at the top

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 +0100merijn(~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 +0100vidak(~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 +0100vidak(~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak
2026-01-22 03:21:55 +0100vidak(~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 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-01-22 03:14:58 +0100vidak(~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) vidak
2026-01-22 03:14:35 +0100FANTOM(~fantom@87.75.185.177) (Ping timeout: 240 seconds)
2026-01-22 03:13:45 +0100vidak(~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Read error: Connection reset by peer)
2026-01-22 03:11:58 +0100merijn(~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 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2026-01-22 03:07:00 +0100vidak(~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 +0100vidak(~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 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2026-01-22 02:59:05 +0100connrs(~connrs@user/connrs) connrs
2026-01-22 02:56:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-22 02:51:20 +0100typedfern_(~Typedfern@192.red-83-37-37.dynamicip.rima-tde.net) typedfern
2026-01-22 02:46:49 +0100omidmash1omidmash
2026-01-22 02:46:49 +0100omidmash(~omidmash@user/omidmash) (Ping timeout: 244 seconds)
2026-01-22 02:45:14 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2026-01-22 02:44:53 +0100omidmash1(~omidmash@user/omidmash) omidmash
2026-01-22 02:44:14 +0100connrs(~connrs@user/connrs) (Ping timeout: 244 seconds)
2026-01-22 02:44:10 +0100FANTOM(~fantom@87.75.185.177)
2026-01-22 02:42:55 +0100FANTOM(~fantom@87.75.185.177) (Ping timeout: 240 seconds)
2026-01-22 02:40:59 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
2026-01-22 02:40:24 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-22 02:37:37 +0100typedfern_(~Typedfern@81.red-83-37-28.dynamicip.rima-tde.net) (Ping timeout: 246 seconds)
2026-01-22 02:29:25 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2026-01-22 02:24:36 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-22 02:24:04 +0100Pozyomka_(~pyon@user/pyon) pyon
2026-01-22 02:23:57 +0100Pozyomka(~pyon@user/pyon) (Quit: WeeChat 4.8.1)
2026-01-22 02:22:45 +0100typedfern_(~Typedfern@81.red-83-37-28.dynamicip.rima-tde.net) typedfern