2025/12/23

Newest at the top

2025-12-23 19:41:32 +0100 <hololeap> esp for tests and things where you control the input
2025-12-23 19:41:13 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 19:40:46 +0100 <hololeap> also, I have no shame in throwing a `NonEmpty.fromList [1, 2, 3]` into my code
2025-12-23 19:40:46 +0100 <haskellbridge> <loonycyborg> Yes, I think if syntax is shared then there's more potential for ambiguity
2025-12-23 19:39:34 +0100 <hololeap> but I might be wrong on the details
2025-12-23 19:39:25 +0100 <hololeap> and you have to be careful not to give it [] or else you get a runtime error
2025-12-23 19:39:12 +0100Pixi(~Pixi@user/pixi) Pixi
2025-12-23 19:38:56 +0100 <hololeap> but it shares the same syntax with list [1, 2, 3]
2025-12-23 19:38:30 +0100 <hololeap> I _think_ you can already do that with OverloadedLists
2025-12-23 19:38:08 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2025-12-23 19:38:08 +0100 <haskellbridge> <loonycyborg> Were there any proposals to make NonEmpty a builtin list so you could write [1 | 2, 3] instead of 1 :| [2,3]?
2025-12-23 19:34:11 +0100 <haskellbridge> <loonycyborg> ye Foldable1 requires at least 1 item to work with because it has no starting accumulator so it's connected to NonEmpty.
2025-12-23 19:33:45 +0100 <hololeap> I missed the discussion where Foldable1 was added to base and why some of the other things from semigroupoids were left out
2025-12-23 19:33:43 +0100ttybitnik(~ttybitnik@user/wolper) (Quit: Fading out...)
2025-12-23 19:33:16 +0100 <hololeap> I do think that Traversable1 is more useful https://hackage.haskell.org/package/semigroupoids-6.0.1/docs/Data-Semigroup-Traversable.html
2025-12-23 19:31:42 +0100 <hololeap> the fact that toNonEmpty is part of Foldable1 sort of proves that NonEmpty is the canonical Foldable1
2025-12-23 19:31:03 +0100Pixi(~Pixi@user/pixi) (Quit: Leaving)
2025-12-23 19:30:44 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2025-12-23 19:30:40 +0100 <hololeap> with a NonEmpty, you don't have to worry about the case of an empty list, thus you don't need a definition for mempty and can use any Semigroup instead
2025-12-23 19:28:52 +0100 <haskellbridge> <loonycyborg> hmm nwm, it seems to be actually Foldable. But I vaguely remember some use of Foldable1 being related to NonEmpty.
2025-12-23 19:28:46 +0100LaurentH(~LaurentH@e7-72-0-245-18.dynamic.sthy.maskatel.ca) ()
2025-12-23 19:28:41 +0100 <hololeap> it's just that foldMap for NonEmpty carries a Monoid constraint, when Semigroup would be enough
2025-12-23 19:27:56 +0100 <hololeap> NonEmpty is Foldable though
2025-12-23 19:26:23 +0100 <haskellbridge> <loonycyborg> NonEmpty for example is Foldable1 but not Foldable, so Foldable1 is pretty necessary given the push to use NonEmpty to avoid partial functions.
2025-12-23 19:25:26 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 19:22:01 +0100LaurentH(~LaurentH@e7-72-0-245-18.dynamic.sthy.maskatel.ca)
2025-12-23 19:21:25 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:e0a7:677c:4fbf:6fab) (Ping timeout: 256 seconds)
2025-12-23 19:16:32 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:e0a7:677c:4fbf:6fab)
2025-12-23 19:16:15 +0100tromp(~textual@2001:1c00:3487:1b00:20d1:6701:d995:9bb6)
2025-12-23 19:14:38 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-12-23 19:09:54 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 19:03:10 +0100tromp(~textual@2001:1c00:3487:1b00:20d1:6701:d995:9bb6) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-12-23 19:01:42 +0100trickard_trickard
2025-12-23 18:56:32 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-23 18:51:47 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 18:43:49 +0100peterbecich(~Thunderbi@71.84.33.135) (Ping timeout: 264 seconds)
2025-12-23 18:42:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-23 18:39:54 +0100wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2025-12-23 18:37:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 18:34:38 +0100euphores(~SASL_euph@user/euphores) euphores
2025-12-23 18:27:45 +0100 <monochrom> The "Semigroup" hint helped. :)
2025-12-23 18:27:04 +0100 <monochrom> "Oh as in foldr1, not as in Eq1"
2025-12-23 18:26:55 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-23 18:26:35 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds)
2025-12-23 18:26:33 +0100 <monochrom> Took me a while to realize that too. :)
2025-12-23 18:26:00 +0100 <EvanR> it's not a higher kinded Foldable?
2025-12-23 18:25:52 +0100 <EvanR> er, is that what Foldable1 is
2025-12-23 18:24:56 +0100 <monochrom> Yeah, things like maximum may better belong to Foldable1 too.
2025-12-23 18:22:22 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2025-12-23 18:22:06 +0100 <hololeap> being able to use a Semigroup that cannot have a Monoid instance could be very handy on occasion