2025/02/11

Newest at the top

2025-02-11 21:31:52 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-02-11 21:31:42 +0100 <monochrom> Can you learn anything at all while you sleep?
2025-02-11 21:29:24 +0100 <Digit> ooh, now you're onto something. could hypnotise myself in my sleep to stop being so lazy and self sabotaging around my Haskell aspirations.
2025-02-11 21:28:37 +0100 <EvanR> maybe that's enough
2025-02-11 21:28:28 +0100 <EvanR> maybe subliminal messaging to convince yourself you know haskell
2025-02-11 21:27:44 +0100 <mauke> doubt it
2025-02-11 21:26:50 +0100 <Digit> 20 years since i first got interested in Haskell. i should probably learn how to use it. is there a "learn Haskell while you sleep"? or anything that can be repurposed for such. ... do you think that's even possible? can Haskell be learned in our sleep?
2025-02-11 21:26:35 +0100justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6)
2025-02-11 21:26:17 +0100 <justsomeguy> My battery is about to die! I'm going to experiment with this more.
2025-02-11 21:25:56 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-11 21:24:08 +0100 <mauke> (or rather, Reader is a newtype wrapper around (->))
2025-02-11 21:24:00 +0100 <mauke> if you're familiar with the Reader monad, (->) is the same thing
2025-02-11 21:22:58 +0100 <mauke> which is why you can partially apply a type constructor like (->) and make a Functor instance for it
2025-02-11 21:22:04 +0100 <mauke> perhaps non-obvious: you can curry type applications
2025-02-11 21:22:03 +0100 <monochrom> BTW [a] = [] a
2025-02-11 21:21:58 +0100 <justsomeguy> (By the way, I'm on 7% batter right now.)
2025-02-11 21:21:49 +0100 <mauke> a -> b = (->) a b = ((->) a) b
2025-02-11 21:21:47 +0100 <monochrom> Precisely why all of the above is correct.
2025-02-11 21:21:29 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-11 21:21:29 +0100 <mauke> yes
2025-02-11 21:21:21 +0100 <monochrom> All true.
2025-02-11 21:21:12 +0100 <justsomeguy> I'm not sure. Isn't (->) the type of a function, and e is the type of its first argument?
2025-02-11 21:21:01 +0100JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-02-11 21:20:07 +0100 <mauke> for example, do you know what (->) e means as a type?
2025-02-11 21:19:56 +0100 <mauke> what's the first thing that makes no sense?
2025-02-11 21:19:54 +0100 <monochrom> Write your own Functor instance for (->)e, and discover that its fmap is exactly (.)
2025-02-11 21:19:50 +0100 <mauke> it wasn't very thoughtful :-)
2025-02-11 21:19:17 +0100 <justsomeguy> Honestly, I wish I could say that I understood your thoughtful explanation, but I'm so confused.
2025-02-11 21:15:51 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2025-02-11 21:14:23 +0100 <mauke> = (a -> b) -> (e -> a) -> (e -> b)
2025-02-11 21:14:01 +0100 <mauke> let f = ((->) e) in (a -> b) -> f a -> f b ==> (a -> b) -> (->) e a -> (->) e b
2025-02-11 21:12:57 +0100pavonia(~user@user/siracusa) siracusa
2025-02-11 21:12:53 +0100 <lambdabot> Functor f => (a -> b) -> f a -> f b
2025-02-11 21:12:52 +0100 <mauke> :t fmap
2025-02-11 21:10:52 +0100 <mauke> instance Functor ((->) e) where fmap = (.)
2025-02-11 21:10:35 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds)
2025-02-11 21:10:28 +0100 <mauke> because fmap = (.)
2025-02-11 21:10:23 +0100 <justsomeguy> How does fmap f Just = f . Just?
2025-02-11 21:10:19 +0100 <lambdabot> Just 6
2025-02-11 21:10:18 +0100 <mauke> > fmap fmap fmap sum Just [1,2,3]
2025-02-11 21:09:13 +0100 <mauke> the middle thing is where it gets funky
2025-02-11 21:09:08 +0100 <mauke> the 1st/3rd things I said are just the definition of (.)
2025-02-11 21:08:32 +0100 <mauke> (fmap sum . Just) [1,2,3] = fmap sum (Just [1,2,3])
2025-02-11 21:08:27 +0100 <justsomeguy> Wait wait wait...
2025-02-11 21:08:04 +0100Katarushisu3Katarushisu
2025-02-11 21:08:04 +0100Katarushisu(~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) (Read error: Connection reset by peer)
2025-02-11 21:08:01 +0100Katarushisu3(~Katarushi@finc-20-b2-v4wan-169598-cust1799.vm7.cable.virginm.net) Katarushisu
2025-02-11 21:07:58 +0100 <mauke> because of the naked reader instance
2025-02-11 21:07:52 +0100 <mauke> fmap f Just = f . Just
2025-02-11 21:07:21 +0100 <Rembane> \o/ Functor laws \o/