Logs: liberachat/#haskell
| 2025-08-11 05:48:20 | <ski> | Integer -> Integer -> ContT o (Cont p) Integer |
| 2025-08-11 05:49:26 | <ski> | the former, `Integer -> Integer -> Cont o Integer', could be adapted, by replacing `o' by `m o', getting `Integer -> Integer -> ContT o m Integer' |
| 2025-08-11 05:49:48 | <ski> | similarly, the latter can be adapted to `Integer -> Integer -> ContT o (ContT p m) Integer' |
| 2025-08-11 05:50:30 | <ski> | albet70 : that helps, any ? |
| 2025-08-11 05:50:33 | → | polykernel_ joins (~polykerne@user/polykernel) |
| 2025-08-11 05:50:39 | → | trickard__ joins (~trickard@cpe-48-98-47-163.wireline.com.au) |
| 2025-08-11 05:52:19 | ← | ynzoqn parts (~ynzoqn@user/ynzoqn) () |
| 2025-08-11 05:52:42 | × | trickard quits (~trickard@cpe-57-98-47-163.wireline.com.au) (Ping timeout: 276 seconds) |
| 2025-08-11 05:52:42 | trickard__ | is now known as trickard |
| 2025-08-11 05:54:04 | × | polykernel quits (~polykerne@user/polykernel) (Ping timeout: 255 seconds) |
| 2025-08-11 05:54:04 | polykernel_ | is now known as polykernel |
| 2025-08-11 05:55:25 | × | driib318 quits (~driib@vmi931078.contaboserver.net) (Ping timeout: 255 seconds) |
| 2025-08-11 05:56:26 | → | driib318 joins (~driib@vmi931078.contaboserver.net) |
| 2025-08-11 06:00:44 | × | mzg quits (mzg@abusers.hu) (Server closed connection) |
| 2025-08-11 06:00:51 | → | mzg joins (mzg@abusers.hu) |
| 2025-08-11 06:07:56 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-08-11 06:09:58 | × | jmcantrell quits (~weechat@user/jmcantrell) (Ping timeout: 240 seconds) |
| 2025-08-11 06:12:27 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-08-11 06:19:52 | × | YoungFrog quits (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in) |
| 2025-08-11 06:23:20 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-08-11 06:24:29 | → | __monty__ joins (~toonn@user/toonn) |
| 2025-08-11 06:28:10 | <dibblego> | It is my understanding of Applicative laws, that left and right should always be equal, what am I missing? https://play.haskell.org/saved/wLdeG3EL |
| 2025-08-11 06:28:12 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2025-08-11 06:29:24 | × | Ekho quits (~Ekho@user/ekho) (Server closed connection) |
| 2025-08-11 06:30:17 | × | trickard quits (~trickard@cpe-48-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2025-08-11 06:31:02 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2025-08-11 06:32:46 | <ski> | albet70 : exercise, write `selectC :: (Foldable t,Monad m) => t a -> ContT () m a' (using `for_'), `selectCC :: Foldable t => t a -> ContT () (ContT o m) a' (using `foldr'), and then the corresponding "run" functions `collectCS :: ContT () (State [a]) a -> [a]' and `collectCCL :: ContT () (ContT a []) a -> [a]'. compute `collectCS (selectC [2,3,5,7])' and `collectCCL (selectCC [2,3,5,7])' |
| 2025-08-11 06:38:19 | × | doyougnu quits (~doyougnu@38.175.72.111) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2025-08-11 06:38:42 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-08-11 06:39:45 | <c_wraith> | dibblego: are you basing that on the composition law? |
| 2025-08-11 06:40:03 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 2025-08-11 06:40:15 | → | Ekho joins (~Ekho@user/ekho) |
| 2025-08-11 06:40:19 | <c_wraith> | because the parens in right are different from the composition law |
| 2025-08-11 06:40:35 | → | doyougnu joins (~doyougnu@38.175.72.111) |
| 2025-08-11 06:40:46 | <dibblego> | c_wraith: yes, also, listed here more explicitly: https://hackage-content.haskell.org/package/semigroupoids-6.0.1/docs/Data-Functor-Apply.html#t:Apply |
| 2025-08-11 06:41:02 | <c_wraith> | You need right = (. f) <$> x <*> y |
| 2025-08-11 06:41:13 | <c_wraith> | adding parens changes the association |
| 2025-08-11 06:41:15 | <dibblego> | darnit, thank you |
| 2025-08-11 06:42:19 | <ski> | ($ 99) <$> (x <*> (f <$> y)) = ($ 99) <$> (Just (*) <*> ((+ 1) <$> Just 7)) = ($ 99) <$> (Just ((7 + 1) *))) = Just ((7 + 1) * 99) |
| 2025-08-11 06:42:22 | <ski> | ($ 99) <$> ((. f) <$> (x <*> y)) = ($ 99) <$> ((. (+ 1)) <$> (Just (*) <*> Just 7)) = ($ 99) <$> Just ((7 *) . (+ 1)) = Just (7 * (99 + 1)) |
| 2025-08-11 06:42:52 | <dibblego> | yeah, I just skipped over that, thanks |
| 2025-08-11 06:43:48 | <ski> | mm, that looks more sensible, with that association |
| 2025-08-11 06:44:38 | <c_wraith> | I didn't bother actually working out the way each calculates. I just looked at the law, noticed that the association looked off, and tested changing it. :) |
| 2025-08-11 06:45:06 | ski | didn't recognize where it was supposed to be taken from |
| 2025-08-11 06:45:42 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2025-08-11 06:49:53 | <c_wraith> | I looked at the laws listed in https://hackage.haskell.org/package/base-4.21.0.0/docs/Control-Applicative.html |
| 2025-08-11 06:50:00 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 2025-08-11 06:50:09 | <c_wraith> | I never actually remember what they are - just that they're really squirrely compared to the monad laws |
| 2025-08-11 06:50:33 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 2025-08-11 06:50:45 | → | LBRB joins (~user@user/LBRB) |
| 2025-08-11 06:52:53 | <ski> | pure (.) <*> u <*> v <*> w = u <*> (v <*> w) -- Composition |
| 2025-08-11 06:53:28 | → | merijn joins (~merijn@host-vr.cgnat-g.v4.dfn.nl) |
| 2025-08-11 06:53:47 | <ski> | not seeing how `x <*> (f <$> y) = (. f) <$> x <*> y)' follows, really |
| 2025-08-11 06:53:53 | <ski> | hm. i guess |
| 2025-08-11 06:54:06 | <ski> | u <*> pure y = pure ($ y) <*> u -- Interchange |
| 2025-08-11 06:54:09 | <ski> | may be involved |
| 2025-08-11 06:54:28 | <c_wraith> | nah, the only thing involved is pure f <*> x === f <$> x |
| 2025-08-11 06:54:52 | <c_wraith> | that's the only rewrite away from it being exactly the composition law |
| 2025-08-11 06:55:01 | × | AlexZenon quits (~alzenon@178.34.150.240) (Ping timeout: 276 seconds) |
| 2025-08-11 06:55:19 | × | AlexNoo quits (~AlexNoo@178.34.150.240) (Ping timeout: 260 seconds) |
| 2025-08-11 06:55:33 | <c_wraith> | Oh, no. You're right, you need to factor the f in. |
| 2025-08-11 06:55:49 | <ski> | the order is swapped |
| 2025-08-11 06:57:17 | × | raym quits (~ray@user/raym) (Remote host closed the connection) |
| 2025-08-11 06:58:06 | × | merijn quits (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2025-08-11 06:58:27 | <c_wraith> | ok, yeah. that gets interchange involved |
| 2025-08-11 06:59:28 | → | acidjnk joins (~acidjnk@p200300d6e7171949546b19bac1316c06.dip0.t-ipconnect.de) |
| 2025-08-11 07:00:02 | × | caconym747 quits (~caconym@user/caconym) (Quit: bye) |
| 2025-08-11 07:00:46 | → | caconym747 joins (~caconym@user/caconym) |
| 2025-08-11 07:04:02 | → | AlexZenon joins (~alzenon@178.34.150.240) |
| 2025-08-11 07:04:10 | → | tromp joins (~textual@2001:1c00:3487:1b00:99b3:9a99:29d2:5644) |
| 2025-08-11 07:04:20 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2025-08-11 07:04:59 | → | harveypwca joins (~harveypwc@2601:246:d080:f6e0:27d6:8cc7:eca9:c46c) |
| 2025-08-11 07:05:10 | → | arahael joins (~arahael@user/arahael) |
| 2025-08-11 07:05:31 | <Leary> | I hate the `Applicative` laws in the haddocks. They should just be associativity of `liftA2 (.)` with identity `pure id`. |
| 2025-08-11 07:08:17 | × | laman quits (laman@rego.ai) (Server closed connection) |
| 2025-08-11 07:08:41 | → | laman joins (laman@rego.ai) |
| 2025-08-11 07:09:10 | <ski> | @type GHC.Base.liftA2 |
| 2025-08-11 07:09:11 | <lambdabot> | Applicative f => (a -> b -> c) -> f a -> f b -> f c |
| 2025-08-11 07:09:16 | <ski> | (that's a method) |
| 2025-08-11 07:17:26 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 2025-08-11 07:20:53 | × | ft quits (~ft@p3e9bcd7f.dip0.t-ipconnect.de) (Quit: leaving) |
| 2025-08-11 07:27:42 | × | arahael quits (~arahael@user/arahael) (Ping timeout: 260 seconds) |
| 2025-08-11 07:31:07 | → | chele joins (~chele@user/chele) |
| 2025-08-11 07:32:04 | × | jreicher quits (~user@user/jreicher) (Ping timeout: 260 seconds) |
| 2025-08-11 07:32:56 | → | jreicher joins (~user@user/jreicher) |
| 2025-08-11 07:45:24 | × | fp quits (~Thunderbi@89-27-10-140.bb.dnainternet.fi) (Ping timeout: 252 seconds) |
| 2025-08-11 07:45:41 | × | tromp quits (~textual@2001:1c00:3487:1b00:99b3:9a99:29d2:5644) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2025-08-11 07:45:57 | × | LBRB quits (~user@user/LBRB) (Ping timeout: 252 seconds) |
| 2025-08-11 07:50:04 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 2025-08-11 07:50:06 | × | dfordivam1 quits (~dfordivam@160.16.87.223.v6.sakura.ne.jp) (Server closed connection) |
| 2025-08-11 07:50:35 | → | dfordivam1 joins (~dfordivam@160.16.87.223.v6.sakura.ne.jp) |
| 2025-08-11 07:55:28 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-08-11 07:56:55 | × | werneta quits (~werneta@syn-071-083-160-242.res.spectrum.com) (Ping timeout: 255 seconds) |
| 2025-08-11 07:59:45 | × | xnbya quits (~xnbya@2a01:4f8:c17:cbdd::1) (Server closed connection) |
| 2025-08-11 07:59:51 | → | xnbya joins (~xnbya@2a01:4f8:c17:cbdd::1) |
| 2025-08-11 08:00:06 | <jackdk> | Now that it's a method, could they be revised? |
| 2025-08-11 08:00:39 | → | tromp joins (~textual@2001:1c00:3487:1b00:99b3:9a99:29d2:5644) |
| 2025-08-11 08:05:07 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 2025-08-11 08:07:02 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 2025-08-11 08:07:43 | × | glguy quits (glguy@libera/staff/glguy) (Ping timeout: 624 seconds) |
All times are in UTC.