2025/02/11

Newest at the top

2025-02-11 08:23:36 +0100 <dminuoso> Like `lens` has.
2025-02-11 08:23:28 +0100 <dminuoso> thirdofmay18081814goya: The big advantage of the profunctor encoding is that the implementation becomes completely uniform, there's no weird encodings depending on the type of optic.
2025-02-11 08:23:10 +0100CiaoSen(~Jura@2a02:8071:64e1:7180:4e50:ddff:fe9b:8922) CiaoSen
2025-02-11 08:22:38 +0100 <dminuoso> Lens uses an encoding that is a mixture of VL and profunctor.
2025-02-11 08:22:26 +0100 <dminuoso> One should say, that VL lenses themselves are an ancient construct that is not used by `lens` either.
2025-02-11 08:21:48 +0100 <haskellbridge> <thirdofmay18081814goya> oh cool
2025-02-11 08:21:27 +0100tnt1(~Thunderbi@user/tnt1) tnt1
2025-02-11 08:20:10 +0100polykernel(~polykerne@user/polykernel) (Ping timeout: 252 seconds)
2025-02-11 08:17:34 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 260 seconds)
2025-02-11 08:15:34 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca)
2025-02-11 08:15:09 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-11 08:15:01 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca)
2025-02-11 08:14:41 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-11 08:13:29 +0100polykernel_polykernel
2025-02-11 08:13:28 +0100polykernel(~polykerne@user/polykernel) (Ping timeout: 265 seconds)
2025-02-11 08:12:34 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca)
2025-02-11 08:12:20 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-11 08:11:53 +0100sabathan(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr)
2025-02-11 08:10:44 +0100tnt2tnt1
2025-02-11 08:10:42 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca)
2025-02-11 08:10:41 +0100 <haskellbridge> <Bowuigi> Similar syntax can be achieved for the rest of the hierarchy using constraints, like how lens does it but with much less type aliases
2025-02-11 08:09:36 +0100polykernel_(~polykerne@user/polykernel) polykernel
2025-02-11 08:09:19 +0100 <haskellbridge> <Bowuigi> It's a bit nicer to write VL lenses with it. For example, the usual Lens (not generalizing over the profunctor) is just "forall f. Functor f => Optic (->) f s t a b"
2025-02-11 08:08:27 +0100tnt2(~Thunderbi@user/tnt1) tnt1
2025-02-11 08:08:26 +0100tnt1(~Thunderbi@user/tnt1) (Ping timeout: 252 seconds)
2025-02-11 08:08:21 +0100sabathan(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr) (Read error: Connection reset by peer)
2025-02-11 08:06:30 +0100 <haskellbridge> <thirdofmay18081814goya> what did you use it for?
2025-02-11 08:06:26 +0100 <haskellbridge> <thirdofmay18081814goya> huh I haven't encountered a case where "f" is not the identity functor yet
2025-02-11 08:06:16 +0100hattckory(~hattckory@bras-base-toroon4524w-grc-50-70-31-30-224.dsl.bell.ca) (Remote host closed the connection)
2025-02-11 08:04:10 +0100 <haskellbridge> <Bowuigi> Namely, "Optic1 p f s t a b = Optic2 (\x y -> p x (f y)) s t a b" and "Optic2 p s t a b = Optic1 p Identity s t a b"
2025-02-11 07:59:56 +0100 <haskellbridge> <Bowuigi> Oddly enough the definition on profunctor-optics is "type Optic p s t a b = p a b -> p s t", which is equivalent
2025-02-11 07:59:09 +0100 <haskellbridge> <Bowuigi> I had a "type Optic p f s t a b = p a (f b) -> p s (f t)" sitting around my projects
2025-02-11 07:52:26 +0100 <haskellbridge> <thirdofmay18081814goya> hm I see
2025-02-11 07:51:53 +0100 <haskellbridge> <Bowuigi> Like, to get effectful lenses over Kleisli or something like that
2025-02-11 07:51:06 +0100 <haskellbridge> <Bowuigi> But switching the underlying profunctor that you use in a combined VL/profunctor optic could help yeah
2025-02-11 07:49:40 +0100ft(~ft@p4fc2a610.dip0.t-ipconnect.de) (Quit: leaving)
2025-02-11 07:49:21 +0100 <haskellbridge> <Bowuigi> Ah, the nice part of the profunctor encoding is that you have access to the profunctor API. But since arrows are profunctors it doesn't make much of a difference wrt VL lenses
2025-02-11 07:47:57 +0100 <haskellbridge> <thirdofmay18081814goya> it's not a rigorous question tbh, I'm just looking for personal opinions of instructive usages of the profunctor encoding
2025-02-11 07:47:18 +0100 <haskellbridge> <thirdofmay18081814goya> Bowuigi: in general
2025-02-11 07:47:13 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 248 seconds)
2025-02-11 07:46:29 +0100 <haskellbridge> <Bowuigi> thirdofmay18081814goya cleanly wrt VL lenses or in general?
2025-02-11 07:46:14 +0100 <haskellbridge> <thirdofmay18081814goya> we'd expect composition to be easier when using a higher abstraction no?
2025-02-11 07:45:25 +0100 <dminuoso> Profunctors are an implementation detail here.
2025-02-11 07:45:17 +0100 <dminuoso> They dont differ from van laarhoven or the mixed (van laarhoven + profunctor-style) in that sense.
2025-02-11 07:45:09 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-02-11 07:44:53 +0100 <haskellbridge> <thirdofmay18081814goya> dminuoso: the applying of a lens and an action to a datatype
2025-02-11 07:43:11 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-11 07:40:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-11 07:40:29 +0100mange(~user@user/mange) (Quit: Quittin' time!)
2025-02-11 07:39:53 +0100 <dminuoso> thirdofmay18081814goya: What do you mean by transformations?