2026/01/08

Newest at the top

2026-01-08 22:29:18 +0100 <EvanR> jreicher, on the subject of how many folds you need in Foldable... there's a huge number of other folding strategies other than left fold and right fold, just for a tree-like DS
2026-01-08 22:26:41 +0100 <EvanR> I'm thinking of the various Writer monads
2026-01-08 22:25:27 +0100 <EvanR> you have to understand it
2026-01-08 22:25:23 +0100 <EvanR> the whole drama stems from haskell's laziness, which you can't really escape
2026-01-08 22:25:01 +0100 <EvanR> we'd have like 10 different other foldl situations and the conversion would get kind of confusing
2026-01-08 22:24:23 +0100 <EvanR> we spend a lot of time hating on foldl because we think we understand it and think it's completely useless. But if we didn't dwell on foldl so much, we might miss all the other things in the standard library which potentially blow up in your face and don't have real answers
2026-01-08 22:24:12 +0100Vizious(~bes@user/Vizious) (Quit: WeeChat 4.8.1)
2026-01-08 22:21:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-01-08 22:18:08 +0100Square3Square
2026-01-08 22:17:11 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-08 22:11:51 +0100 <monochrom> hehe
2026-01-08 22:11:36 +0100 <darkling> That's the joke I was thinking of.
2026-01-08 22:11:17 +0100 <monochrom> I think the mathematicians also have a joke along the line of "what's the anagram of Banach-Tarski"
2026-01-08 22:10:30 +0100 <monochrom> haha
2026-01-08 22:10:05 +0100 <darkling> monochrommonochrom. An anagram. :)
2026-01-08 22:09:40 +0100 <monochrom> Oh haha there is also a Banach-Tarski one. :)
2026-01-08 22:08:14 +0100 <monochrom> There is one that says "chop ... into pieces" or something like that.
2026-01-08 22:08:06 +0100trickard_(~trickard@cpe-50-98-47-163.wireline.com.au)
2026-01-08 22:07:45 +0100lambdabotmoulds monochrom into a delicous cookie, and places it in her oven
2026-01-08 22:07:45 +0100 <monochrom> @stab monochrom
2026-01-08 22:07:42 +0100lambdabotpulls monochrom through the Evil Mangler
2026-01-08 22:07:42 +0100 <monochrom> @stab monochrom
2026-01-08 22:07:40 +0100trickard(~trickard@cpe-50-98-47-163.wireline.com.au) (Ping timeout: 246 seconds)
2026-01-08 22:07:39 +0100lambdabotthrows some pointy lambdas at monochrom
2026-01-08 22:07:39 +0100 <monochrom> @stab monochrom
2026-01-08 22:07:27 +0100 <dolio> Yeah.
2026-01-08 22:07:23 +0100 <monochrom> Oh, like Perl's chop.
2026-01-08 22:07:02 +0100monochrominvents Prolog's dice, which means "if random() > 0.5 then cut else nop", so literally dice in two senses. >:)
2026-01-08 22:06:45 +0100 <dolio> Exclamation points indicate mutation, I think.
2026-01-08 22:06:35 +0100Enrico63(~Enrico63@host-95-251-99-143.retail.telecomitalia.it) (Quit: Client closed)
2026-01-08 22:06:12 +0100 <dolio> It's in-place trimming or something.
2026-01-08 22:06:04 +0100 <tomsmeding> no, it just sounds funny with the !
2026-01-08 22:05:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-01-08 22:05:55 +0100 <monochrom> What is Ruby's chop? Is it similar to Prolog's cut?
2026-01-08 22:05:19 +0100 <monochrom> Oh haha that inspires me. foldr' and foldr_ to make it more confusing. :)
2026-01-08 22:05:17 +0100 <tomsmeding> (that always makes me think of Ruby's chop!)
2026-01-08 22:04:56 +0100 <ncf> if we had better identifiers we could have foldl! for the strict version
2026-01-08 22:04:44 +0100 <tomsmeding> a prime for a strict version is so entrenched at this point that doing it the other way round would be a crime. :)
2026-01-08 22:04:15 +0100 <dolio> Yes, the only question is which one gets which name.
2026-01-08 22:03:10 +0100 <monochrom> My point is that I want to be allowed to choose between foldr and foldr' and you don't know a priori which one is best for me.
2026-01-08 22:02:43 +0100ridcully(~ridcully@pd951f83e.dip0.t-ipconnect.de) ridcully
2026-01-08 22:02:25 +0100ridcully(~ridcully@pd951fc06.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2026-01-08 22:02:16 +0100 <monochrom> But I would want your foldr' for some other data structure.
2026-01-08 22:02:15 +0100 <tomsmeding> jreicher: you can reduce it to two: foldMap and foldMap'
2026-01-08 22:01:58 +0100 <monochrom> I don't want your foldr' for that.
2026-01-08 22:01:51 +0100 <lambdabot> False
2026-01-08 22:01:50 +0100 <monochrom> > foldr (&&) False (False : undefined)
2026-01-08 22:01:23 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-01-08 22:01:19 +0100 <jreicher> I can't shake the feeling that it shouldn't be necessary to have four instead of two, but I can't assemble a coherent argument just at the moment.
2026-01-08 22:00:40 +0100 <tomsmeding> (and indeed, Foldable does have foldr' since GHC 7.6 :p)