2025/02/11

Newest at the top

2025-02-11 20:11:52 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-11 20:07:24 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-11 20:05:56 +0100notzmv(~umar@user/notzmv) notzmv
2025-02-11 20:04:06 +0100sprotte24(~sprotte24@p200300d16f05dc00448362a75cf21d07.dip0.t-ipconnect.de)
2025-02-11 19:59:09 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 265 seconds)
2025-02-11 19:56:34 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-02-11 19:55:03 +0100euphores(~SASL_euph@user/euphores) euphores
2025-02-11 19:54:43 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-11 19:54:24 +0100akegalj(~akegalj@168-206.dsl.iskon.hr) (Quit: leaving)
2025-02-11 19:52:00 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-11 19:49:01 +0100euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2025-02-11 19:46:45 +0100 <euouae> Thanks
2025-02-11 19:46:41 +0100peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds)
2025-02-11 19:44:48 +0100mniip(mniip@libera/staff/mniip) (Quit: This page is intentionally left blank)
2025-02-11 19:42:01 +0100Guest93(~Guest93@pool-96-250-224-152.nycmny.fios.verizon.net) (Client Quit)
2025-02-11 19:41:21 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-11 19:41:18 +0100Lord_of_Life_Lord_of_Life
2025-02-11 19:41:06 +0100Guest93(~Guest93@pool-96-250-224-152.nycmny.fios.verizon.net)
2025-02-11 19:40:48 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds)
2025-02-11 19:39:54 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-02-11 19:37:30 +0100 <EvanR> (A -> a, A <- b)
2025-02-11 19:37:09 +0100 <monochrom> lambda the ultimate goto. (->) the ultimate instance.
2025-02-11 19:36:40 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-11 19:35:58 +0100 <ncf> (->) is the canonical example
2025-02-11 19:35:42 +0100 <euouae> oh I see. hm.. I'll keep it in mind when I encounter it
2025-02-11 19:34:59 +0100 <EvanR> profunctor class is for types which are functor in one parameter and contravariant functor in the other
2025-02-11 19:34:18 +0100 <euouae> yes
2025-02-11 19:34:03 +0100 <EvanR> do you know what a contravariant functor is
2025-02-11 19:33:41 +0100 <euouae> what's a profunctor?
2025-02-11 19:33:34 +0100 <monochrom> But I think weakening to functor is impossible.
2025-02-11 19:33:01 +0100 <monochrom> perhaps s/pattern/generalization/
2025-02-11 19:32:41 +0100 <EvanR> lol
2025-02-11 19:32:37 +0100 <tomsmeding> I'm not sure if a "pattern" is the right way to look at those :P
2025-02-11 19:32:33 +0100 <monochrom> Application: Suppose you want a procedure foo such that foo n reads n lines from stdin and return the list of those n lines. Then it is: sequenceA (replicate n getLine)
2025-02-11 19:32:13 +0100 <EvanR> haskell hasn't figured this one out yet
2025-02-11 19:31:44 +0100 <EvanR> the next in the pattern would be something of the form (Traversable t, Functor f) => t (f a) -> f (t a)
2025-02-11 19:31:30 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) TheCoffeMaker
2025-02-11 19:30:53 +0100 <monochrom> OK yeah sequenceA.
2025-02-11 19:30:52 +0100 <haskellbridge> <alexfmpe> * only works when there's
2025-02-11 19:30:42 +0100 <lambdabot> (Traversable t, Applicative f) => t (f a) -> f (t a)
2025-02-11 19:30:41 +0100 <EvanR> :t sequenceA
2025-02-11 19:30:36 +0100 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
2025-02-11 19:30:35 +0100 <EvanR> :t sequence
2025-02-11 19:30:30 +0100jespada(~jespada@2800:a4:2230:3e00:3974:82a3:7f20:1404) jespada
2025-02-11 19:29:41 +0100 <monochrom> If you accept sequence, then traverse is just sequence and fmap.
2025-02-11 19:29:32 +0100 <haskellbridge> <alexfmpe> * suitable combining
2025-02-11 19:29:25 +0100JeremyB99(~JeremyB99@2607:fb90:d362:29:704c:ca03:6a71:2d6c) (Ping timeout: 268 seconds)
2025-02-11 19:29:22 +0100 <monochrom> You can then go ambitious and say "but liftA10 is always 10. can I make it variable length?". Answer: sequence accepts an arbitary list so it's variable length. (The compromise is that we only have homogeneous lists, so the input list has to be homogeneous, whereas liftA10 is OK with 10 different types.)
2025-02-11 19:29:15 +0100 <haskellbridge> Traverse is fmap followed by sequence, so it's kind of foldMap with applicative
2025-02-11 19:29:13 +0100 <haskellbridge> <alexfmpe> Yeah, I'd say sequence is basically folding with applicative, but with a fold function that preserves the original structure.