Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-14 14:06:48 <Tops2> > (fmap . fmap) (subtract 1) [[1],[2,3]]
2021-04-14 14:06:50 <lambdabot> [[0],[1,2]]
2021-04-14 14:07:01 × Rudd0 quits (~Rudd0@185.189.115.103) (Remote host closed the connection)
2021-04-14 14:07:30 × jchia_ quits (~jchia@jungle.jchia.net) (Remote host closed the connection)
2021-04-14 14:07:54 <whataday> could I name fmap = fmap . fmap?
2021-04-14 14:08:03 <Zemyla> :t \a -> ContT $ \c -> Compose $ a >>= (getCompose . c)
2021-04-14 14:08:04 <lambdabot> forall k (f :: * -> *) a1 (a2 :: k) (g :: k -> *). Monad f => f a1 -> ContT a2 (Compose f g) a1
2021-04-14 14:08:08 <whataday> so [[]] is a functor?
2021-04-14 14:08:09 <Zemyla> :t \a -> ContT $ \c -> Compose $ fmap join $ traverse (getCompose . c) $ a
2021-04-14 14:08:10 <lambdabot> (Monad g, Traversable g, Applicative f) => g a1 -> ContT a2 (Compose f g) a1
2021-04-14 14:08:28 <whataday> ContT is beyond my comprehension now
2021-04-14 14:08:44 <Zemyla> You want to use Compose for nested fmaps.
2021-04-14 14:08:52 <Zemyla> :t Compose [[1], [2, 3]]
2021-04-14 14:08:53 <lambdabot> Num a => Compose [] [] a
2021-04-14 14:09:00 <whataday> I always don't know how callCC worked
2021-04-14 14:09:15 <whataday> aha,
2021-04-14 14:09:34 <whataday> Compose is a functor, right?
2021-04-14 14:10:18 <Tops2> > (getCompose . fmap) (subtract 1) (Compose [[1],[2,3]])
2021-04-14 14:10:20 <lambdabot> error:
2021-04-14 14:10:20 <lambdabot> • Couldn't match type ‘f0 b0 -> f0 b0’
2021-04-14 14:10:20 <lambdabot> with ‘Compose ((->) (Compose [] [] a0)) g a’
2021-04-14 14:10:43 <whataday> fmap (+1) $ Compose [[1], [2,3]]
2021-04-14 14:12:06 <Tops2> > getCompose . fmap (subtract 1) $ Compose [[1],[2,3]]
2021-04-14 14:12:08 <lambdabot> [[0],[1,2]]
2021-04-14 14:12:38 <Tops2> ye it's Data.Functor.Compose
2021-04-14 14:13:19 <whataday> ok
2021-04-14 14:13:26 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
2021-04-14 14:13:29 <Zemyla> I don't know when ContT started making sense to me.
2021-04-14 14:14:00 <whataday> I can understand Cont a little
2021-04-14 14:14:14 <whataday> but callCC is really beyond my comprehension
2021-04-14 14:14:58 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
2021-04-14 14:15:06 <dolio> callCC is arguably the worst control operator.
2021-04-14 14:15:44 <whataday> that use fixed point implement goto with callCC inside Cont, what a twisted!
2021-04-14 14:16:19 <whataday> I never understand why call fixed point inside Cont would create a loop?
2021-04-14 14:16:22 <dolio> You could probably come up with worse, but the worst that is usually talked about.
2021-04-14 14:16:53 __minoru__shirae joins (~shiraeesh@46.34.206.85)
2021-04-14 14:16:59 mrchampion joins (~mrchampio@38.18.109.23)
2021-04-14 14:17:15 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-04-14 14:17:29 <whataday> I saw some people's articles, but no one explained it plainly
2021-04-14 14:17:44 × ukari quits (~ukari@unaffiliated/ukari) (Ping timeout: 252 seconds)
2021-04-14 14:17:47 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-14 14:17:54 <whataday> just make me more confused
2021-04-14 14:18:05 <whataday> so I just leave it alone
2021-04-14 14:20:26 <geekosaur> Cont does that to a lot of people
2021-04-14 14:21:04 <juri_> i keep watching haskell videon, thinking they'll teach me something useful. so far, no dice.
2021-04-14 14:21:19 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
2021-04-14 14:21:32 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
2021-04-14 14:22:34 <yushyin> you have more chances to learn something if you just read along here than watching haskell vidoes, is my guess.
2021-04-14 14:23:40 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-04-14 14:24:34 <whataday> until someone ask you to read books...
2021-04-14 14:24:43 <whataday> like real work haskell
2021-04-14 14:24:53 <whataday> haskell first principal etc
2021-04-14 14:25:15 <whataday> not some like learn your a haskell for good
2021-04-14 14:25:27 <juri_> yeah, the books are more useful.
2021-04-14 14:25:54 curlybangs joins (185a6b4e@cpe-24-90-107-78.nyc.res.rr.com)
2021-04-14 14:26:00 <juri_> unfortunately when i'm down due to headache (bad month), reading a book is much worse than listening to a video.
2021-04-14 14:27:11 <juri_> and when i'm not down due to headache, i'm busy writing (bad) haskell.
2021-04-14 14:27:16 <whataday> I like to learn some skills in haskell and see how it's implemented in others
2021-04-14 14:27:46 <whataday> I use kotlin for most work
2021-04-14 14:27:53 <whataday> and they have arrow-kt
2021-04-14 14:28:16 <whataday> it has some thoughts very like haskell
2021-04-14 14:28:36 <whataday> but implements are in a horrible way
2021-04-14 14:28:57 <whataday> but hey, better than nothing
2021-04-14 14:29:44 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-04-14 14:30:57 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-14 14:31:07 <whataday> they simulate to implement higher kind type with class, that class confused me a while
2021-04-14 14:31:21 ukari joins (~ukari@unaffiliated/ukari)
2021-04-14 14:31:44 Tario joins (~Tario@201.192.165.173)
2021-04-14 14:33:21 dariof4 joins (~dario@5.11.121.66)
2021-04-14 14:37:30 kiweun joins (~kiweun@2607:fea8:2a62:9600:71af:dc19:e65b:7248)
2021-04-14 14:40:29 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.1)
2021-04-14 14:41:28 × aVikingTrex quits (~aVikingTr@2001:8003:340d:d00:b2de:b98:7a93:b0ea) (Ping timeout: 258 seconds)
2021-04-14 14:42:14 × kiweun quits (~kiweun@2607:fea8:2a62:9600:71af:dc19:e65b:7248) (Ping timeout: 258 seconds)
2021-04-14 14:42:26 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Quit: dpl_)
2021-04-14 14:42:28 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-04-14 14:43:53 nineonine joins (~nineonine@50.216.62.2)
2021-04-14 14:43:57 × rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 240 seconds)
2021-04-14 14:45:11 × xff0x quits (~xff0x@2001:1a81:53de:e800:34cf:6978:1caf:5ec6) (Ping timeout: 260 seconds)
2021-04-14 14:45:44 xff0x joins (~xff0x@2001:1a81:53de:e800:f134:1482:73e7:cb45)
2021-04-14 14:46:56 vfaronov joins (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru)
2021-04-14 14:47:51 rj joins (~x@gateway/tor-sasl/rj)
2021-04-14 14:48:46 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 265 seconds)
2021-04-14 14:48:52 <vfaronov> Hi all. Any idea why TH's addDependentFile may not work? I have the exact problem described in https://stackoverflow.com/q/49757162, I do what the answer suggests, and still, changing only the embedded file make `cabal build` say "Up to date".
2021-04-14 14:50:07 <tdammers> off the top of my head, you may need to put it in extra-source-files or sth like that
2021-04-14 14:50:25 × acidjnk_new quits (~acidjnk@p200300d0c72b954090611fa1f3f989eb.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2021-04-14 14:50:36 <merijn> cabal is not aware of addDependentFile, afaik
2021-04-14 14:50:40 <vfaronov> tdammers: it's there already
2021-04-14 14:50:43 BosonCollider joins (~olofs@90-227-86-119-no542.tbcn.telia.com)
2021-04-14 14:50:54 <geekosaur> the problem with addDependentFile is cabal won't know about it until it compiles the file, but it won't compile the file becauseit doesn't know about the extra dep
2021-04-14 14:51:42 <merijn> There was some talk/work on making cabal aware of it, I think. But no clue if anything has been done about that
2021-04-14 14:52:09 frozenErebus joins (~frozenEre@37.231.244.249)
2021-04-14 14:53:42 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2021-04-14 14:54:24 jamm_ joins (~jamm@unaffiliated/jamm)
2021-04-14 14:54:36 <vfaronov> I see, too bad
2021-04-14 14:54:45 <vfaronov> thanks anyway
2021-04-14 14:55:33 × idhugo_ quits (~idhugo@87-49-44-84-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds)
2021-04-14 14:55:35 nbloomf joins (~nbloomf@2600:1700:ad14:3020:49a9:cf03:7849:ab6b)
2021-04-14 14:55:36 × ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-04-14 14:56:59 hypercube joins (hypercube@gateway/vpn/protonvpn/hypercube)
2021-04-14 14:57:20 ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net)

All times are in UTC.