Newest at the top
2025-02-11 14:20:35 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-11 14:16:25 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-11 14:11:08 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2025-02-11 14:10:43 +0100 | CiaoSen | (~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) CiaoSen |
2025-02-11 14:10:00 +0100 | akegalj | (~akegalj@168-206.dsl.iskon.hr) |
2025-02-11 14:02:28 +0100 | Digit | (~user@user/digit) (Ping timeout: 245 seconds) |
2025-02-11 14:01:14 +0100 | Digitteknohippie | (~user@user/digit) Digit |
2025-02-11 13:59:33 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 248 seconds) |
2025-02-11 13:55:19 +0100 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) kuribas |
2025-02-11 13:54:46 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer) |
2025-02-11 13:53:08 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) |
2025-02-11 13:51:49 +0100 | Square2 | (~Square4@user/square) Square |
2025-02-11 13:44:37 +0100 | tri | (~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 248 seconds) |
2025-02-11 13:40:23 +0100 | tri | (~tri@ool-44c70bcb.dyn.optonline.net) |
2025-02-11 13:40:19 +0100 | Smiles | (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2025-02-11 13:38:21 +0100 | <dminuoso> | `viewP l = getConst . runUpStar (l (UpStar Const))` of course. |
2025-02-11 13:38:10 +0100 | <dminuoso> | Oh |
2025-02-11 13:37:57 +0100 | <dminuoso> | `viewL l = runConst . l Const` and `viewP l = getConst . (l (UpStar Const))` |
2025-02-11 13:37:25 +0100 | <bwe> | alexfmpe, akegalj, ski: thanks, I've gone for alexfmpe's approach, solves my requirement. |
2025-02-11 13:35:01 +0100 | <dminuoso> | In this particular example, the profunctor representation is just vastly more generalized. |
2025-02-11 13:34:21 +0100 | <dminuoso> | So a simple way to run a LensP would be to just turn it into a LensVL by just picking :=> ~ UpStar |
2025-02-11 13:33:19 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer) |
2025-02-11 13:32:58 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-02-11 13:32:46 +0100 | <dminuoso> | type LensVL s t a b = forall f . Functor f => (a -> f b) -> s -> f t |
2025-02-11 13:32:40 +0100 | <dminuoso> | type LensP s t a b = forall (:=>). Strong (:=>) => (a :=> b) -> s :=> t |
2025-02-11 13:31:12 +0100 | <dminuoso> | If we write `p` in an infix position with a nice operator instead, the similarity becomes more obvious: |
2025-02-11 13:30:33 +0100 | <dminuoso> | So `type LensP s t a b = forall p. Strong p => p a b -> p s t` |
2025-02-11 13:30:22 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) |
2025-02-11 13:30:21 +0100 | <dminuoso> | Where type Optic p s t a b = p a b -> p s t |
2025-02-11 13:29:55 +0100 | <dminuoso> | Compare `type LensP s t a b = forall p. Strong p => Optic p s t a b` with `type LensVL s t a b = forall f . Functor f => (a -> f b) -> s -> f t` |
2025-02-11 13:28:26 +0100 | tavare | (~tavare@user/tavare) tavare |
2025-02-11 13:28:21 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-11 13:28:12 +0100 | <dminuoso> | Similarly to how in VL representation you pick a particular functor to "use" it |
2025-02-11 13:28:02 +0100 | tavare | (~tavare@user/tavare) (Remote host closed the connection) |
2025-02-11 13:27:38 +0100 | <dminuoso> | thirdofmay18081814goya: The cute trick in profunctor representation that all optics are just profunctor transformer functions, so "using" them amounts to just applying them to a particular choice of a profunctor |
2025-02-11 13:27:00 +0100 | jespada | (~jespada@2800:a4:2211:9c00:4cb1:4c0:c141:d649) jespada |
2025-02-11 13:24:06 +0100 | sprotte24 | (~sprotte24@p200300d16f05dc007daaf3d6dd12202b.dip0.t-ipconnect.de) |
2025-02-11 13:22:42 +0100 | <dminuoso> | thirdofmay18081814goya: Roughly, the way you "run" a lens does not differ too wildly between all three variants (VL, mixed and profunctor). |
2025-02-11 13:22:09 +0100 | chele_ | (~chele@user/chele) (Ping timeout: 248 seconds) |
2025-02-11 13:20:30 +0100 | chele | (~chele@user/chele) (Ping timeout: 276 seconds) |
2025-02-11 13:19:40 +0100 | chele__ | (~chele@user/chele) chele |
2025-02-11 13:18:42 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) wootehfoot |
2025-02-11 13:18:25 +0100 | picnoir | (~picnoir@about/aquilenet/vodoo/NinjaTrappeur) NinjaTrappeur |
2025-02-11 13:17:49 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer) |
2025-02-11 13:17:13 +0100 | chele_ | (~chele@user/chele) chele |
2025-02-11 13:17:01 +0100 | picnoir | (~picnoir@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.5.1) |
2025-02-11 13:12:39 +0100 | merijn | (~merijn@77.242.116.146) merijn |
2025-02-11 13:11:20 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) |
2025-02-11 13:07:47 +0100 | JeremyB99 | (~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer) |
2025-02-11 13:06:06 +0100 | merijn | (~merijn@77.242.116.146) (Ping timeout: 246 seconds) |