Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 102 103 104 105 106 107 108 109 110 111 112 .. 5022
502,152 events total
2020-09-21 00:41:12 <koz_> No worries! Happy reading.
2020-09-21 00:41:29 isovector1 joins (~isovector@d207-81-8-13.bchsia.telus.net)
2020-09-21 00:41:30 thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de)
2020-09-21 00:44:31 <ski> ddellacosta : one example which can be made into a contravariant functor is the write end of a concurrent communication channel (also a write view on a mutable cell)
2020-09-21 00:45:07 × mariatsji quits (~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Ping timeout: 272 seconds)
2020-09-21 00:45:42 × thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2020-09-21 00:45:56 ddellacosta thinks about it
2020-09-21 00:46:27 <ski> ("can be made", in this case, means that you allow attaching an arbitrary preprocessing step (function), that you apply before you write to the channel/cell)
2020-09-21 00:46:28 ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net)
2020-09-21 00:46:55 <ddellacosta> ski: okay that's helpful, one thing I read earlier today was that the order of processing is conceptually "reversed" when compared to a covariant functor
2020-09-21 00:47:05 <ddellacosta> I mean wrt contramap
2020-09-21 00:47:31 <ski> yes
2020-09-21 00:48:25 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 260 seconds)
2020-09-21 00:48:30 <ddellacosta> now I'm trying to understand how that connects to what Cale said
2020-09-21 00:49:15 <ski> well, the write end/view of the channel/cell consumes values, in that you feed a value to it, when writing
2020-09-21 00:49:17 thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de)
2020-09-21 00:50:18 <ski> (and read end/view will produce values, when reading. so that can be made into a covariant functor (by allowing attaching an arbitrary post-processing step (function), after reading))
2020-09-21 00:51:31 <ddellacosta> okay thank you ski , I think I need to think about that for a bit
2020-09-21 00:52:04 × plutoniix quits (~q@ppp-223-24-94-234.revip6.asianet.co.th) (Ping timeout: 246 seconds)
2020-09-21 00:52:06 <ddellacosta> like intuitively it makes sense, but the deeper structure of it all is eluding me still
2020-09-21 00:52:28 <ski> (if you want to, you could try to wrap `Chan' or `IORef' into such read and write ends/views. and then see if you can, possibly with some modification, make the read ones covariant functors, and the write ones contravariant functors)
2020-09-21 00:52:57 <ddellacosta> okay interesting
2020-09-21 00:53:15 <ski> (also providing some relevant operations on the new data types (which are to be exported abstractly))
2020-09-21 00:53:31 gmt joins (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-21 00:53:40 <Cale> newtype WriteEnd a = MkWriteEnd { writeTo :: a -> IO () }
2020-09-21 00:54:12 <ski> it might perhaps sometimes be nice to have a callback that you want to pass a channel to, but you only want it to write to the channel, not read, so you only pass it the write end
2020-09-21 00:54:26 <ski> Cale : hah :)
2020-09-21 00:54:39 <Cale> ddellacosta: Try writing the instance for that :)
2020-09-21 00:54:53 <ddellacosta> Cale: okay cool
2020-09-21 00:55:01 <ddellacosta> and ski the last thing you just said clicked, thank you
2020-09-21 00:55:32 <ddellacosta> and I can actually kind of see how that's like a predicate now in the general sense
2020-09-21 00:56:26 <Cale> Yeah, there will be basically no difference in what the instance looks like
2020-09-21 01:00:11 <ski> ddellacosta : btw, for the read end, you can try to make a version of `getChanContents' as well
2020-09-21 01:00:53 kenran joins (~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-21 01:00:56 <ddellacosta> okay
2020-09-21 01:02:58 xff0x joins (~fox@2001:1a81:53e2:5200:158c:d17f:d83e:dc7f)
2020-09-21 01:03:23 × zopsi quits (zopsi@2600:3c00::f03c:91ff:fe14:551f) (Remote host closed the connection)
2020-09-21 01:03:32 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2020-09-21 01:05:18 plutoniix joins (~q@175.176.222.7)
2020-09-21 01:05:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-21 01:05:35 wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-21 01:06:08 × kenran quits (~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 272 seconds)
2020-09-21 01:06:24 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-09-21 01:06:30 zopsi joins (~zopsi@irc.dir.ac)
2020-09-21 01:06:46 × xff0x_ quits (~fox@port-92-195-46-13.dynamic.as20676.net) (Ping timeout: 272 seconds)
2020-09-21 01:08:27 <ski> hm, pondering `dupChan'
2020-09-21 01:09:27 <ski> at first sight, it would seen one would do `WriteChan a -> IO (ReadChan a)' ..
2020-09-21 01:09:34 <koz_> Anime has ruined concurrency for me - every time I see any variant of 'chan' I'm amused.
2020-09-21 01:09:56 wroathe_ is now known as wroathe
2020-09-21 01:10:07 <ski> .. however, this isn't compatible with having `WriteChan' a contravariant functor
2020-09-21 01:11:06 <ski> `Chan a -> IO (ReadChan a)' would be possible, of course (just `dupChan' and convert to `ReadChan')
2020-09-21 01:13:26 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Read error: Connection reset by peer)
2020-09-21 01:14:01 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
2020-09-21 01:14:40 × g-belmonte quits (~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d) (Quit: Leaving)
2020-09-21 01:14:55 × arahael quits (~arahael@118.208.100.107) (Ping timeout: 240 seconds)
2020-09-21 01:15:14 × ddellacosta quits (~dd@86.106.121.168) (Ping timeout: 256 seconds)
2020-09-21 01:15:47 <ski> however, it seems that if one had a difunctor, `RWChan a b' being contravariant in `a' (write end type) and covariant in `b' (read end type), then one could do `RWChan a b -> IO (ReadChan b)' (obviously also `RWChan a b -> IO (RWChan a b)' would work)
2020-09-21 01:17:24 arahael joins (~arahael@203.194.42.27)
2020-09-21 01:17:25 × zopsi quits (~zopsi@irc.dir.ac) (Max SendQ exceeded)
2020-09-21 01:18:14 zopsi joins (zopsi@2600:3c00::f03c:91ff:fe14:551f)
2020-09-21 01:18:15 <ski> hm. although if one takes advantage if the fact that `Chan', which `ReadChan' is presumably implemented in terms of, also contains the write end, one could have `ReadChan a -> IO (ReadChan a)' .. although this feels like cheating a bit, since a direct reimplementation, separating the read and write ends, rather than just hiding one or the other, couldn't do this
2020-09-21 01:21:20 xerox_ joins (~xerox@unaffiliated/xerox)
2020-09-21 01:21:28 × ntwhaaci^ quits (ntwhaaci@ip98-184-89-2.mc.at.cox.net) ()
2020-09-21 01:21:38 × CMCDragonkai1 quits (~Thunderbi@124.19.3.250) (Ping timeout: 256 seconds)
2020-09-21 01:22:21 × zopsi quits (zopsi@2600:3c00::f03c:91ff:fe14:551f) (Max SendQ exceeded)
2020-09-21 01:22:46 zopsi joins (zopsi@2600:3c00::f03c:91ff:fe14:551f)
2020-09-21 01:25:36 wei2912 joins (~wei2912@unaffiliated/wei2912)
2020-09-21 01:26:56 × zopsi quits (zopsi@2600:3c00::f03c:91ff:fe14:551f) (Max SendQ exceeded)
2020-09-21 01:27:20 zopsi joins (~zopsi@irc.dir.ac)
2020-09-21 01:27:32 zaquest joins (~notzaques@5.128.210.178)
2020-09-21 01:28:17 qualiaqq joins (~user@47.189.249.188)
2020-09-21 01:31:26 × zopsi quits (~zopsi@irc.dir.ac) (Max SendQ exceeded)
2020-09-21 01:31:50 zopsi joins (~zopsi@irc.dir.ac)
2020-09-21 01:36:34 fulc9277 joins (~fulc927@unaffiliated/fulc927)
2020-09-21 01:36:38 <zebrag> I'm trying to understand what is "existential" in "existential types". Is it related to quantifiers? In what way?
2020-09-21 01:37:38 <ski> yes
2020-09-21 01:38:13 <ski> do you understand what's universal about polymorphism ?
2020-09-21 01:39:12 <MarcelineVQ> Cale: what's that comparing <> example you use all the time?
2020-09-21 01:39:22 <ski> @where monoids
2020-09-21 01:39:23 <lambdabot> comment on "Monoids? In my programming language?" by Cale in 2008 (or 2009 ?) at <http://www.reddit.com/r/programming/comments/7cf4r/monoids_in_my_programming_language/c06adnx> about a use of `
2020-09-21 01:39:23 <lambdabot> instance Monoid a => Monoid (rho -> a)'
2020-09-21 01:39:25 × fulc927 quits (~fulc927@unaffiliated/fulc927) (Ping timeout: 240 seconds)
2020-09-21 01:39:33 <MarcelineVQ> :D
2020-09-21 01:39:35 × adamwespiser quits (~adam_wesp@209.6.42.110) (Ping timeout: 272 seconds)
2020-09-21 01:39:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-09-21 01:40:13 <zebrag> ski: I believe I understand what's universal about polymorphism
2020-09-21 01:40:14 × howdoi quits (uid224@gateway/web/irccloud.com/x-jznybxwchugeubau) (Quit: Connection closed for inactivity)
2020-09-21 01:40:41 hololeap joins (~hololeap@unaffiliated/hololeap)
2020-09-21 01:40:44 <ski> zebrag : and you understand rank-2 ?
2020-09-21 01:41:09 adamwespiser joins (~adam_wesp@209.6.42.110)
2020-09-21 01:41:32 <zebrag> ski: do you mean about the rho being in a negative position?
2020-09-21 01:42:03 <ski> `rho' ?
2020-09-21 01:42:40 <zebrag> wasn't meant for me, instance Monoid a => Monoid (rho -> a)'
2020-09-21 01:42:56 <zebrag> so no I don't quite undestand rank-2
2020-09-21 01:42:58 <ski> nah, that was answering another question
2020-09-21 01:43:27 <ski> well, let me try to fast-forward over `forall'
2020-09-21 01:44:06 <zebrag> should read that: https://wiki.haskell.org/Rank-N_types
2020-09-21 01:44:17 Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-131-92.cust.tzulo.com)
2020-09-21 01:44:26 <ski> in Haskell, it happens that many uses of `forall' are implicit. but that doesn't mean that they're not there. in another language, they could be required to be explicit, always
2020-09-21 01:44:27 <zebrag> back in a jif

All times are in UTC.