Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 544 545 546 547 548 549 550 551 552 553 554 .. 18007
1,800,621 events total
2021-06-19 21:37:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-06-19 21:38:02 × jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2021-06-19 21:38:20 × finsternis quits (~Y@23.226.237.192) (Remote host closed the connection)
2021-06-19 21:39:28 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
2021-06-19 21:40:29 <qrpnxz> eh, bind is kind of like traverse. If i map kleisi over a monad and then join it, that's bind. Likewise if i map a "normal" func over a traversal and then sequence it, that's traverse.
2021-06-19 21:40:49 <qrpnxz> they both kind of "collapse"
2021-06-19 21:40:51 <dminuoso> qrpnxz: not quite
2021-06-19 21:41:09 <qrpnxz> what's not quite what
2021-06-19 21:41:20 × qbt quits (~edun@user/edun) (Ping timeout: 265 seconds)
2021-06-19 21:41:25 <dminuoso> % :t sequence
2021-06-19 21:41:26 <yahb> dminuoso: (Traversable t, Monad m) => t (m a) -> m (t a)
2021-06-19 21:41:27 <dminuoso> % :t join
2021-06-19 21:41:27 <yahb> dminuoso: Monad m => m (m a) -> m a
2021-06-19 21:41:53 <qrpnxz> yes
2021-06-19 21:41:57 <dminuoso> qrpnxz: sequence sort of "flips" these two around (which amounts to running the effects in some structure, in sequence, while putting the results back in)
2021-06-19 21:42:02 <dminuoso> There's no "collapse"
2021-06-19 21:42:55 <dminuoso> Let's set t ~ [], m ~ IO and a ~ Int for arguments sake:
2021-06-19 21:43:02 <dminuoso> [IO Int] -> IO [Int]
2021-06-19 21:43:09 <dminuoso> See how the list is still there at the end?
2021-06-19 21:43:12 × Morrow quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 258 seconds)
2021-06-19 21:43:38 <qrpnxz> ya know i put scare quotes on that for a reason lol
2021-06-19 21:43:46 <qrpnxz> point is they are kinda similar
2021-06-19 21:44:04 ddellacosta joins (~ddellacos@86.106.121.100)
2021-06-19 21:44:08 <dminuoso> only in the sense that `sequence` uses `join/bind` internally
2021-06-19 21:44:14 × egoist quits (~egoist@186.235.85.100) (Ping timeout: 265 seconds)
2021-06-19 21:44:15 <dminuoso> but that's the extend of it.
2021-06-19 21:44:16 × ddellacosta quits (~ddellacos@86.106.121.100) (Remote host closed the connection)
2021-06-19 21:44:22 × ddellaco_ quits (~ddellacos@86.106.121.100) (Read error: Connection reset by peer)
2021-06-19 21:44:33 <dminuoso> strictly speaking, it doesnt even need join/bin, applicative is enough
2021-06-19 21:44:38 <dminuoso> % :t sequenceA
2021-06-19 21:44:39 <yahb> dminuoso: (Traversable t, Applicative f) => t (f a) -> f (t a)
2021-06-19 21:45:04 <qrpnxz> i think the idea that there's a map of a certain kind of function and then the results has a magical transformation is what i'm drawn to
2021-06-19 21:45:27 <dminuoso> well sure, there's a sort of visual similarity between
2021-06-19 21:45:31 <dminuoso> % :t (=<<)
2021-06-19 21:45:32 <yahb> dminuoso: Monad m => (a -> m b) -> m a -> m b
2021-06-19 21:45:35 <dminuoso> % :t traverse
2021-06-19 21:45:36 <yahb> dminuoso: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
2021-06-19 21:47:30 <qrpnxz> (=<<) f = join . fmap f and traverse f = sequence . fmap f
2021-06-19 21:48:25 <qrpnxz> so then i wonder like monad is a thing in category theory, i wonder if then also traversal has a kind of thing in cat theory as well that is simple idk
2021-06-19 21:49:43 <qrpnxz> I think i read somewhere that if you can form a kleisli category for your type then it's a monad. I wonder if there's something like that for tranverse
2021-06-19 21:49:55 <qrpnxz> *traverse
2021-06-19 21:50:27 <dminuoso> So Im looking at a paper that introduces the notion of a "traversable functor" defined as
2021-06-19 21:51:05 <qrpnxz> would that be to traversable as applicative is to monads?
2021-06-19 21:51:35 <qrpnxz> sorry i'll let you finish
2021-06-19 21:51:44 <dminuoso> T : Set -> Set, equipped with a family of natural transfomrations δ_f_x : TFX - > FTX natural in F and respecting the monoidal structure of applicative functor composition.
2021-06-19 21:52:17 <qrpnxz> that's beyond me lol
2021-06-19 21:52:25 <qrpnxz> i'll look into it tho
2021-06-19 21:52:25 Morrow_ joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net)
2021-06-19 21:52:59 ph88^ joins (~ph88@2a02:8109:9e00:7e5c:1960:9d14:60f8:23cf)
2021-06-19 21:53:10 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
2021-06-19 21:54:11 <dminuoso> Well I guess this really is just a traversable functor
2021-06-19 21:54:20 <dminuoso> It's a 1:1 mapping of the traversable laws
2021-06-19 21:54:25 <qrpnxz> yes
2021-06-19 21:54:33 <dminuoso> If we consider
2021-06-19 21:54:37 <dminuoso> traverse (Compose . fmap g . f) = Compose . fmap (traverse g) . traverse f
2021-06-19 21:54:40 <dminuoso> traverse Identity = Identity
2021-06-19 21:55:06 <dminuoso> Identity being the identity element with respect to functor composition
2021-06-19 21:55:28 × MorrowM quits (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 258 seconds)
2021-06-19 21:55:45 <dminuoso> qrpnxz: but really, its different from monad in a lot of ways
2021-06-19 21:56:28 egoist joins (~egoist@186.235.85.100)
2021-06-19 21:56:35 <dminuoso> In some way you can think of traversal as being able to update with sequenced effects, but that is independent of which monad being used.
2021-06-19 21:56:42 <qrpnxz> Yeah they are for totally different things afaict. It just seemed neat that they kind of "rhyme"
2021-06-19 21:57:07 <dminuoso> qrpnxz: If you care for such pleasantries, you might perhaps be interested in the inner workings on `lens` perhaps.
2021-06-19 21:57:52 <qrpnxz> i've been looking into lens a lot yeah. The traversal class in particular. The author made a really nice presentation on it that kind of blew my mind and i have to watch it again xd
2021-06-19 21:58:09 <dminuoso> Lenses are coalgebras of the costate comonad.
2021-06-19 21:58:15 <dminuoso> :)
2021-06-19 21:58:19 × Melvar quits (~melvar@dslb-088-066-199-085.088.066.pools.vodafone-ip.de) (Quit: WeeChat 3.0.1)
2021-06-19 21:58:25 <qrpnxz> 😂️
2021-06-19 21:59:00 <qrpnxz> i'm reading through The Essence of the Iterator Pattern right now thought, because i want better foundation in my head for traversable before i can look more into traversal
2021-06-19 21:59:36 chrysanthematic joins (~chrysanth@user/chrysanthematic)
2021-06-19 22:01:13 cuz joins (~user@c-24-2-210-18.hsd1.ma.comcast.net)
2021-06-19 22:01:16 lavaman joins (~lavaman@98.38.249.169)
2021-06-19 22:01:25 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1543:9aaf:78fa:158) (Remote host closed the connection)
2021-06-19 22:01:29 × chrysanthematic quits (~chrysanth@user/chrysanthematic) (Client Quit)
2021-06-19 22:05:05 laguneucl joins (~Pitsikoko@2a02:587:dc0b:ff00:91aa:a5de:def3:b2bc)
2021-06-19 22:05:49 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 258 seconds)
2021-06-19 22:05:59 × pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Ping timeout: 265 seconds)
2021-06-19 22:06:22 sheepduck joins (~sheepduck@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com)
2021-06-19 22:06:43 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1543:9aaf:78fa:158)
2021-06-19 22:08:18 × chomwitt quits (~Pitsikoko@athedsl-351576.home.otenet.gr) (Ping timeout: 268 seconds)
2021-06-19 22:09:54 × laguneucl quits (~Pitsikoko@2a02:587:dc0b:ff00:91aa:a5de:def3:b2bc) (Ping timeout: 264 seconds)
2021-06-19 22:10:20 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-06-19 22:11:16 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1543:9aaf:78fa:158) (Ping timeout: 265 seconds)
2021-06-19 22:11:22 × teaSlurper quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-06-19 22:12:13 teaSlurper joins (~chris@81.96.113.213)
2021-06-19 22:12:37 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 268 seconds)
2021-06-19 22:12:42 × jneira_ quits (~jneira_@131.red-79-155-1.dynamicip.rima-tde.net) (Quit: Ping timeout (120 seconds))
2021-06-19 22:16:32 ddellacosta joins (~ddellacos@86.106.121.100)
2021-06-19 22:16:33 × teaSlurper quits (~chris@81.96.113.213) (Ping timeout: 258 seconds)
2021-06-19 22:17:57 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1543:9aaf:78fa:158)
2021-06-19 22:19:22 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-19 22:19:22 jneira_ joins (~jneira_@131.red-79-155-1.dynamicip.rima-tde.net)
2021-06-19 22:21:09 × ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 258 seconds)
2021-06-19 22:21:24 Morrow joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net)
2021-06-19 22:26:54 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 258 seconds)
2021-06-19 22:27:17 × chexum quits (~chexum@gateway/tor-sasl/chexum) (Remote host closed the connection)
2021-06-19 22:27:30 chexum joins (~chexum@gateway/tor-sasl/chexum)
2021-06-19 22:28:36 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
2021-06-19 22:29:29 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-06-19 22:30:37 × berberman_ quits (~berberman@user/berberman) (Ping timeout: 272 seconds)

All times are in UTC.