Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-10 08:52:10 × adm quits (~adm@43.229.88.236) (Remote host closed the connection)
2020-11-10 08:52:39 <dminuoso> 09:47:30 bqv | [06:43:38] Why were affine traversals removed from lens?
2020-11-10 08:53:03 <dminuoso> bqv: To implement affine traversals with the van laarhoven encoding, you'd need to split Applicative into Pointed and Ap, such that affine would use Pointed only
2020-11-10 08:53:06 <dminuoso> % :i Traversal
2020-11-10 08:53:07 <yahb> dminuoso: type role ReifiedTraversal representational nominal representational nominal; type ReifiedTraversal :: * -> * -> * -> * -> *; newtype ReifiedTraversal s t a b = Traversal {...}; -- Defined in `Control.Lens.Reified'; type Traversal :: * -> * -> * -> * -> *; type Traversal s t a b = forall (f :: * -> *). Applicative f => (a -> f b) -> s -> f t; -- Defined in `Control.Lens.Type'
2020-11-10 08:53:33 <dminuoso> So you'd have `type AffineTraversal s t a b = forall f. Pointed f => (a -> f b) -> s -> f t`
2020-11-10 08:55:00 <bqv> That doesn't seem prohibitive, surely have (Pointed, Ap) => Applicative and it's nondestructive?
2020-11-10 08:55:49 <dminuoso> Well, the usefulness depends on how many things have Pointed instances...
2020-11-10 08:56:41 xerox_ joins (~xerox@unaffiliated/xerox)
2020-11-10 08:57:03 <dminuoso> With profunctor this is SIMPLER since you can say: type AffineTraversal s t a b = forall p. (Strong p, Choice p) => a `p` b -> s `p` t
2020-11-10 08:57:45 × drbean quits (~drbean@TC210-63-209-175.static.apol.com.tw) (Ping timeout: 240 seconds)
2020-11-10 08:58:06 <bqv> Hmm
2020-11-10 08:58:12 <dminuoso> bqv: So the issue with Pointed is just, you'd have to modify the Applicative class
2020-11-10 08:58:19 kuribas joins (~user@ptr-25vy0i8gy1ukj7bjvez.18120a2.ip6.access.telenet.be)
2020-11-10 08:58:27 <bqv> Fair
2020-11-10 08:58:32 <dminuoso> such that `class Pointed f => Applicative f where (<*>) :: f (a -> b) -> f a -> f b`
2020-11-10 08:58:41 <dminuoso> so this is not a change you can simply ship in a library
2020-11-10 08:58:56 <dminuoso> You'd have to provide your own applicative class, which is then not compatible with Applicative, and so on..
2020-11-10 08:59:34 <bqv> Another FMA-level reshuffle
2020-11-10 09:00:01 × shoman94 quits (~shoman94@139.28.218.148) ()
2020-11-10 09:00:10 × jalumar quits (uid392211@gateway/web/irccloud.com/x-qysscwojbdelznmr) (Quit: Connection closed for inactivity)
2020-11-10 09:00:21 <dminuoso> So if you dont do that superclass, then you cant compose an affine traversal with say a traversal and obtain a traversal.
2020-11-10 09:00:26 × daGrevis quits (~daGrevis@unaffiliated/dagrevis) (Quit: Ping timeout (120 seconds))
2020-11-10 09:00:32 jhuizy7 joins (~jhuizy@static.241.188.216.95.clients.your-server.de)
2020-11-10 09:00:35 <dminuoso> So you get a lot of inelegancy from that
2020-11-10 09:00:39 daGrevis joins (~daGrevis@unaffiliated/dagrevis)
2020-11-10 09:00:42 × jhuizy quits (~jhuizy@static.241.188.216.95.clients.your-server.de) (Read error: Connection reset by peer)
2020-11-10 09:00:42 jhuizy7 is now known as jhuizy
2020-11-10 09:00:57 chrpape` joins (~user@2a01:4f9:c010:632d::1)
2020-11-10 09:01:13 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
2020-11-10 09:01:23 × andreas31 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 240 seconds)
2020-11-10 09:02:33 × chrpape quits (~user@2a01:4f9:c010:632d::1) (Read error: Connection reset by peer)
2020-11-10 09:04:54 <dminuoso> bqv: For additional thoughts, refer to http://oleg.fi/gists/posts/2017-03-20-affine-traversal.html
2020-11-10 09:06:14 × apoc quits (~apoc@bridge.mattzq.com) (Ping timeout: 256 seconds)
2020-11-10 09:07:19 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-11-10 09:07:45 kritzefitz joins (~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de)
2020-11-10 09:07:58 <bqv> I was linked that earlier, interesting
2020-11-10 09:08:02 × lululululu quits (3dded63f@61-222-214-63.HINET-IP.hinet.net) (Remote host closed the connection)
2020-11-10 09:08:41 <dminuoso> bqv: phadej has quite a few entries on optics and profunctor optics, you should check the rest of his blog
2020-11-10 09:09:15 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-10 09:10:15 andreas31 joins (~andreas@gateway/tor-sasl/andreas303)
2020-11-10 09:11:03 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
2020-11-10 09:12:02 × iqubic quits (~user@2601:602:9500:4870:f97f:76da:55:8502) (Ping timeout: 264 seconds)
2020-11-10 09:13:24 × xff0x quits (~fox@2001:1a81:5351:7d00:ba3e:d041:f86d:6327) (Ping timeout: 240 seconds)
2020-11-10 09:13:43 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-11-10 09:14:27 xff0x joins (~fox@2001:1a81:5351:7d00:8f5e:c1d6:6c3b:a4b)
2020-11-10 09:15:16 keep_learning joins (~keep_lear@43.231.26.152)
2020-11-10 09:15:29 adm joins (~adm@43.229.88.236)
2020-11-10 09:15:54 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-11-10 09:17:14 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-11-10 09:17:25 × jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-11-10 09:17:36 jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl)
2020-11-10 09:17:38 × kritzefitz quits (~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2020-11-10 09:19:45 × adm quits (~adm@43.229.88.236) (Ping timeout: 240 seconds)
2020-11-10 09:20:16 star_cloud joins (~star_clou@124.123.107.46)
2020-11-10 09:21:47 hekkaidekapus_ is now known as hekkaidekapus
2020-11-10 09:24:50 × jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-11-10 09:24:56 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-kmqwoegoouyrgklt) (Quit: Connection closed for inactivity)
2020-11-10 09:26:05 × star_cloud quits (~star_clou@124.123.107.46) (Remote host closed the connection)
2020-11-10 09:27:57 jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl)
2020-11-10 09:30:08 × siggard quits (michalc@gateway/shell/xshellz/x-jnqqvyhozxttnqkw) (Remote host closed the connection)
2020-11-10 09:30:34 kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49)
2020-11-10 09:33:35 star_cloud joins (~star_clou@124.123.107.46)
2020-11-10 09:33:56 apoc joins (~apoc@bridge.mattzq.com)
2020-11-10 09:33:58 × jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-11-10 09:39:37 × sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
2020-11-10 09:40:00 × star_cloud quits (~star_clou@124.123.107.46) (Remote host closed the connection)
2020-11-10 09:41:27 LKoen joins (~LKoen@77.174.9.109.rev.sfr.net)
2020-11-10 09:41:45 Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se)
2020-11-10 09:45:19 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-11-10 09:45:30 jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl)
2020-11-10 09:45:55 × jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-11-10 09:46:45 invaser joins (~Thunderbi@31.148.23.125)
2020-11-10 09:48:29 invaser1 joins (~Thunderbi@31.148.23.125)
2020-11-10 09:49:09 acidjnk_new2 joins (~acidjnk@p200300d0c718f622419774f60b4b795d.dip0.t-ipconnect.de)
2020-11-10 09:50:36 × plakband quits (~plakband@softbank126126238105.bbtec.net) (Quit: WeeChat 2.9)
2020-11-10 09:51:03 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
2020-11-10 09:51:03 invaser1 is now known as invaser
2020-11-10 09:51:16 jamm_ joins (~jamm@unaffiliated/jamm)
2020-11-10 09:52:34 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-11-10 09:54:22 bitmagie joins (~Thunderbi@200116b806cd050085d57d49b88c0858.dip.versatel-1u1.de)
2020-11-10 09:54:34 <idnar> bqv, dminuoso: the laws are also awkward because `(Pointed f, Ap f) => f` doesn't necessarily follow the Applicative laws (see thread at <https://www.reddit.com/r/haskell/comments/60fha5/affine_traversal/>)
2020-11-10 09:55:24 <dminuoso> What laws?
2020-11-10 09:55:33 × da39a3ee5e6b4b0d quits (~da39a3ee5@cm-171-98-91-242.revip7.asianet.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-10 09:55:54 DavidEichmann joins (~david@43.240.198.146.dyn.plus.net)
2020-11-10 09:57:48 <idnar> https://hackage.haskell.org/package/base-4.14.0.0/docs/Control-Applicative.html#t:Applicative
2020-11-10 09:58:25 <dminuoso> No I meant, in what sense wouldnt that follow the applicative laws?
2020-11-10 09:59:58 __monty__ joins (~toonn@unaffiliated/toonn)
2020-11-10 10:01:03 × lemmih quits (~lemmih@2406:3003:2072:44:c5fe:5b97:f10c:4e16) (Remote host closed the connection)
2020-11-10 10:01:23 lemmih joins (~lemmih@2406:3003:2072:44:45cb:65e7:796d:adde)
2020-11-10 10:01:32 christo joins (~chris@81.96.113.213)
2020-11-10 10:01:42 <idnar> in the sense that you can define lawful Pointed and Ap instances that don't combine to fulfil the Applicative laws
2020-11-10 10:02:00 <dminuoso> well that isnt really saying much
2020-11-10 10:02:17 × howdoi quits (uid224@gateway/web/irccloud.com/x-khfppfglbovlyqve) (Quit: Connection closed for inactivity)
2020-11-10 10:02:19 <merijn> idnar: lawful Pointed instances are trivial
2020-11-10 10:02:23 <merijn> There are no laws
2020-11-10 10:02:26 <dminuoso> laws are a contracts between the programmer and the compiler
2020-11-10 10:02:30 <dminuoso> its your job to ensure coherence
2020-11-10 10:02:46 <dminuoso> If you write Pointed an Ap instances that dont follow laws, that's on you
2020-11-10 10:02:49 gkobele joins (~user@dslb-178-010-116-093.178.010.pools.vodafone-ip.de)

All times are in UTC.