2026/01/22

Newest at the top

2026-01-22 04:01:25 +0100 <geekosaur> ghc was originally written in HBC, a now lost compiler which was itself written in Lazy ML
2026-01-22 04:01:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-22 03:59:25 +0100 <haskellbridge> <iqubic (she/her)> I'm so lost here... What am I missing?
2026-01-22 03:58:59 +0100 <haskellbridge> <iqubic (she/her)> I'm trying to use the head of the iinput.
2026-01-22 03:58:56 +0100 <haskellbridge> <Nguyễn Trọng Cường> I have a really stupid question: Is the very first GHC executable written in C? I analysed some modern GHC programs by Detect It Easy and all of them are flagged as "C" and "MinGW"
2026-01-22 03:58:32 +0100 <geekosaur> rename the one in map, maybe it'll be a bit clearer (its "[a]" unifies with the "[[a]]" from drop1)
2026-01-22 03:58:20 +0100 <haskellbridge> <iqubic (she/her)> xxs?
2026-01-22 03:57:56 +0100 <geekosaur> xxs is only [a], not [[a]]
2026-01-22 03:57:35 +0100 <haskellbridge> <iqubic (she/her)> I fail to see the issue here.
2026-01-22 03:57:30 +0100 <haskellbridge> <iqubic (she/her)> (drop1 xs) :: [[a]]
2026-01-22 03:56:57 +0100 <haskellbridge> <iqubic (she/her)> (x:) :: [a] -> [a]
2026-01-22 03:56:36 +0100vidak(~vidak@2407:e400:7800:2c01:d0be:76f8:cc84:bd4a) (Remote host closed the connection)
2026-01-22 03:56:20 +0100 <haskellbridge> <iqubic (she/her)> I have "map (x:) (drop1 xs)"
2026-01-22 03:53:46 +0100 <geekosaur> xs is [a], drop1 xs is [[a]], map's result type will be the same as its input type as (x:) simply prepends to the inner lists
2026-01-22 03:53:04 +0100 <haskellbridge> <iqubic (she/her)> drop1 [1,2,3] -> [[2,3], [1,3], [1,2]]
2026-01-22 03:52:47 +0100 <haskellbridge> <iqubic (she/her)> I want a function that computes all the ways to drop a single element from a list.
2026-01-22 03:49:55 +0100 <haskellbridge> <iqubic (she/her)> Why isn't this compiling? https://paste.tomsmeding.com/7dBnZHnU
2026-01-22 03:49:51 +0100typedfern_(~Typedfern@192.red-83-37-37.dynamicip.rima-tde.net) (Ping timeout: 244 seconds)
2026-01-22 03:49:51 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2026-01-22 03:49:20 +0100Inline(~User@2001-4dd6-dd24-0-41c1-f819-9bd9-d884.ipv6dyn.netcologne.de) (Ping timeout: 244 seconds)
2026-01-22 03:48:56 +0100tremon(~tremon@83.80.159.219) (Quit: getting boxed in)
2026-01-22 03:48:44 +0100 <haskellbridge> <iqubic (she/her)> What's the list comprehension version?
2026-01-22 03:47:40 +0100humasect(~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 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-22 03:32:13 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2026-01-22 03:31:58 +0100vidak(~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 +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...