Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 766 767 768 769 770 771 772 773 774 775 776 .. 5022
502,152 events total
2020-10-21 06:22:25 × christo quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
2020-10-21 06:24:22 × howdoi quits (uid224@gateway/web/irccloud.com/x-tsohuehqbugpkvfg) (Quit: Connection closed for inactivity)
2020-10-21 06:26:22 × echoreply quits (~echoreply@unaffiliated/echoreply) (Quit: WeeChat 1.9.1)
2020-10-21 06:26:47 dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
2020-10-21 06:26:49 echoreply joins (~echoreply@unaffiliated/echoreply)
2020-10-21 06:29:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-10-21 06:30:02 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
2020-10-21 06:30:18 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
2020-10-21 06:32:10 xerox_ joins (~xerox@unaffiliated/xerox)
2020-10-21 06:34:49 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
2020-10-21 06:35:31 × andyo quits (~andyo@63.228.117.102) (Quit: ZNC 1.7.2 - https://znc.in)
2020-10-21 06:39:00 lep-delete is now known as Guest88073
2020-10-21 06:39:28 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-10-21 06:41:25 britva joins (~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b)
2020-10-21 06:43:48 andyo joins (~andyo@63.228.117.102)
2020-10-21 06:46:45 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-10-21 06:46:45 × taurux quits (~taurux@net-188-152-111-153.cust.dsl.teletu.it) (Ping timeout: 265 seconds)
2020-10-21 06:48:38 taurux joins (~taurux@net-188-216-37-204.cust.vodafonedsl.it)
2020-10-21 06:48:45 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 06:49:23 × britva quits (~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b) (Quit: This computer has gone to sleep)
2020-10-21 06:50:58 mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com)
2020-10-21 06:53:22 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
2020-10-21 06:55:00 × polyrain_ quits (~polyrain@2001:8003:e501:6901:900f:a04:c6e9:3caa) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 06:56:17 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-10-21 06:56:27 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
2020-10-21 06:56:37 ph88 joins (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140)
2020-10-21 06:58:27 × xff0x_ quits (~fox@2001:1a81:529c:a900:9ed:6089:168f:4946) (Ping timeout: 272 seconds)
2020-10-21 06:59:12 xff0x_ joins (~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d)
2020-10-21 07:00:18 Varis joins (~Tadas@unaffiliated/varis)
2020-10-21 07:00:55 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 07:01:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
2020-10-21 07:01:41 × int-e quits (~noone@int-e.eu) (Remote host closed the connection)
2020-10-21 07:02:37 int-e joins (~noone@int-e.eu)
2020-10-21 07:03:56 ffviewer joins (3dded63f@61-222-214-63.HINET-IP.hinet.net)
2020-10-21 07:04:44 <dminuoso> % :t indexed
2020-10-21 07:04:44 <yahb> dminuoso: Indexable i p => p a b -> i -> a -> b
2020-10-21 07:04:46 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
2020-10-21 07:05:15 lambdabot joins (~lambdabot@silicon.int-e.eu)
2020-10-21 07:05:15 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
2020-10-21 07:05:15 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
2020-10-21 07:05:51 <dminuoso> "Build a function from an indexed function."
2020-10-21 07:05:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-10-21 07:06:22 <dminuoso> I've been staring at this for a while now, can someone give me a hint how to make sense of this?
2020-10-21 07:07:00 <dminuoso> Given the instances, this seems to be an overloading for both `const` or `runIndexed`, how is const an indexed function?
2020-10-21 07:07:41 <c_wraith> it returns a function that ignores the index
2020-10-21 07:08:17 <c_wraith> Don't worry about that class much. treat it as internal to how indexed optics work
2020-10-21 07:08:42 <dminuoso> Heh, Im intentionally worrying about the internals, since Ive been diving in to port some functionality over to optics
2020-10-21 07:08:54 <c_wraith> It's just how it provides a uniform interface between Indexed i a b and (a -> b)
2020-10-21 07:09:27 × ph88 quits (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140) (Ping timeout: 246 seconds)
2020-10-21 07:09:58 <dminuoso> Perhaps I should rephrase the question then.
2020-10-21 07:10:03 <dminuoso> withIndex :: (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t)
2020-10-21 07:10:11 <dminuoso> withIndex f = Indexed $ \i a -> snd <$> indexed f i (i, a)
2020-10-21 07:10:30 <dminuoso> In what instance is this called with a function rather than Indexed?
2020-10-21 07:10:34 <dminuoso> (This is sort of hard to grep for)
2020-10-21 07:10:58 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-10-21 07:11:04 <dminuoso> (I guess the question applies to any Indexable optic, not just withIndex)
2020-10-21 07:13:13 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 07:13:19 <dminuoso> Phrased differently, when would you eliminate an Indexable optic with a function?
2020-10-21 07:13:29 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 07:13:29 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 07:13:29 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-21 07:13:34 <c_wraith> you can use it to fake an index, I suppose.
2020-10-21 07:14:47 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
2020-10-21 07:15:09 raichoo joins (~raichoo@213.240.178.58)
2020-10-21 07:16:29 danvet_ joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-10-21 07:17:07 × unlink2 quits (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-10-21 07:17:27 unlink2 joins (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de)
2020-10-21 07:18:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-10-21 07:19:09 berberman_t joins (berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx)
2020-10-21 07:21:06 cfricke joins (~cfricke@unaffiliated/cfricke)
2020-10-21 07:21:11 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-21 07:21:27 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-21 07:21:27 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-21 07:21:27 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-21 07:24:48 kuribas joins (~user@ptr-25vy0i9s82bgras1pw6.18120a2.ip6.access.telenet.be)
2020-10-21 07:25:34 borne joins (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
2020-10-21 07:25:36 <dminuoso> c_wraith: How would that even work?
2020-10-21 07:25:51 <dminuoso> I mean if I look at const, Id rather think its about *dropping* the index
2020-10-21 07:26:04 × isovector1 quits (~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Remote host closed the connection)
2020-10-21 07:26:12 <dminuoso> maybe this is for allowing indexable optics as a non-indexed optics?
2020-10-21 07:26:14 × tzh quits (~tzh@2601:448:c500:5300::19b0) (Quit: zzz)
2020-10-21 07:28:18 <dminuoso> Because the choice of whether f is Indexed or (->) is done at the elimination site, not the optics definition
2020-10-21 07:28:45 <c_wraith> actually, if you chase the arrows around enough... *most* uses of withIndex will be using the (->) instance
2020-10-21 07:29:04 <dminuoso> Do you have an example? Im chasing ghosts here in lens.
2020-10-21 07:30:27 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 07:32:50 × jedws quits (~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-21 07:34:01 <dminuoso> Aha, I think Im getting somewhere
2020-10-21 07:34:29 <dminuoso> % let v l = getConst . l Const
2020-10-21 07:34:29 <yahb> dminuoso: ; <interactive>:123:5: warning: [-Wname-shadowing] This binding for `v' shadows the existing binding defined at <interactive>:122:5
2020-10-21 07:35:08 <c_wraith> I mean, the first example in the docs...
2020-10-21 07:35:23 <c_wraith> > [10, 20, 30] ^.. ifolded . withIndex @_ @(->) [(0,10),(1,20),(2,30)]
2020-10-21 07:35:26 <lambdabot> <hint>:1:28: error:
2020-10-21 07:35:26 <lambdabot> <hint>:1:28: error:
2020-10-21 07:35:26 <lambdabot> Pattern syntax in expression context: withIndex@_
2020-10-21 07:35:32 <c_wraith> hah. oops.
2020-10-21 07:35:39 <dminuoso> % :set -XTypeApplications
2020-10-21 07:35:40 <yahb> dminuoso:
2020-10-21 07:35:44 <dminuoso> % [10, 20, 30] ^.. ifolded . withIndex @_ @(->)
2020-10-21 07:35:45 <yahb> dminuoso: ; <interactive>:127:1: warning: [-Wtype-defaults]; * Defaulting the following constraints to type `Integer'; (Show a0) arising from a use of `print' at <interactive>:127:1-45; (Num a0) arising from a use of `it' at <interactive>:127:1-45; * In a stmt of an interactive GHCi command: print it; [(0,10),(1,20),(2,30)]
2020-10-21 07:35:52 <c_wraith> anyway.

All times are in UTC.