2025/02/11

Newest at the top

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 +0100JeremyB99(~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 +0100tavare(~tavare@user/tavare) tavare
2025-02-11 13:28:21 +0100alfiee(~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 +0100tavare(~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 +0100jespada(~jespada@2800:a4:2211:9c00:4cb1:4c0:c141:d649) jespada
2025-02-11 13:24:06 +0100sprotte24(~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 +0100chele_(~chele@user/chele) (Ping timeout: 248 seconds)
2025-02-11 13:20:30 +0100chele(~chele@user/chele) (Ping timeout: 276 seconds)
2025-02-11 13:19:40 +0100chele__(~chele@user/chele) chele
2025-02-11 13:18:42 +0100wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2025-02-11 13:18:25 +0100picnoir(~picnoir@about/aquilenet/vodoo/NinjaTrappeur) NinjaTrappeur
2025-02-11 13:17:49 +0100JeremyB99(~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer)
2025-02-11 13:17:13 +0100chele_(~chele@user/chele) chele
2025-02-11 13:17:01 +0100picnoir(~picnoir@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.5.1)
2025-02-11 13:12:39 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-11 13:11:20 +0100JeremyB99(~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3)
2025-02-11 13:07:47 +0100JeremyB99(~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3) (Read error: Connection reset by peer)
2025-02-11 13:06:06 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 246 seconds)
2025-02-11 13:02:30 +0100akegalj(~akegalj@78-3-100-82.adsl.net.t-com.hr) (Ping timeout: 252 seconds)
2025-02-11 13:02:11 +0100caconym(~caconym@user/caconym) caconym
2025-02-11 13:00:11 +0100JeremyB99(~JeremyB99@2607:ac80:407:7:b132:8d6d:8d5:36a3)
2025-02-11 13:00:04 +0100caconym(~caconym@user/caconym) (Quit: bye)
2025-02-11 13:00:02 +0100JeremyB99(~JeremyB99@dhcp-251-168.resnet.purdue.edu) (Remote host closed the connection)
2025-02-11 12:59:33 +0100merijn(~merijn@77.242.116.146) merijn
2025-02-11 12:57:23 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 244 seconds)
2025-02-11 12:53:02 +0100Akshat(~Akshat@2409:40d0:11e1:cd05:62b2:b7f8:bf3f:70d) (Quit: Client closed)
2025-02-11 12:52:30 +0100CalimeroTeknik(~calimero@ctkarch.org)
2025-02-11 12:49:30 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2025-02-11 12:44:49 +0100 <haskellbridge> <alexfmpe> bwe: fromMaybe defaultValue $ asum $ fmap ($ input) [fun1, fun2,...]
2025-02-11 12:40:14 +0100CalimeroTeknik(~calimero@user/calimeroteknik) (Ping timeout: 260 seconds)
2025-02-11 12:39:18 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-11 12:39:10 +0100 <lambdabot> "stop,1,10,2,16,3,22,4"
2025-02-11 12:39:08 +0100 <ski> > let foo n | even n = Just (n `div` 2) | otherwise = Nothing; bar 1 = Nothing; bar n = Just (3 * n + 1) in intercalate "," [maybe "stop" show (foo n <|> bar n) | n <- [1 .. 8] :: [Integer]] -- simpler
2025-02-11 12:38:46 +0100 <akegalj> bwe: I would explicitly chain them (\input -> fun1 input <|> fun2 input <|> fun3 input <|> Just 4) (a,b)
2025-02-11 12:38:06 +0100 <lambdabot> "stop,1,10,2,16,3,22,4"
2025-02-11 12:38:05 +0100 <ski> > let foo n | even n = Just (n `div` 2) | otherwise = Nothing; bar 1 = Nothing; bar n = Just (3 * n + 1) in intercalate "," [(maybe "stop" show . getFirst) ((First . foo <> First . bar) n) | n <- [1 .. 8] :: [Integer]] -- hrm ..
2025-02-11 12:37:14 +0100CiaoSen(~Jura@ip-037-201-241-067.um10.pools.vodafone-ip.de) (Ping timeout: 244 seconds)
2025-02-11 12:35:14 +0100Ankhers(e99e97ef8e@2a03:6000:1812:100::2a2) Ankhers
2025-02-11 12:35:14 +0100bheesham(3aa22d8375@2a03:6000:1812:100::e40) bheesham
2025-02-11 12:35:14 +0100fvr(ef3e56ca8b@2a03:6000:1812:100::3c4) fvr
2025-02-11 12:35:14 +0100duncan(c6181279e3@user/meow/duncan) duncan
2025-02-11 12:35:11 +0100eso(a0662dfd5e@2a03:6000:1812:100::1266) jeso
2025-02-11 12:35:10 +0100ursa-major(114efe6c39@2a03:6000:1812:100::11f3) ursa-major