Newest at the top
2025-02-12 20:13:55 +0100 | <monochrom> | :) |
2025-02-12 20:13:26 +0100 | <mauke> | I figured there would be some kind of diagonalization involved |
2025-02-12 20:10:10 +0100 | <monochrom> | But I have proved that the infinite stream monad is unique (and its <*> does zipping). join xss = [xss !! n !! n | n <- [0..]] |
2025-02-12 20:08:27 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
2025-02-12 20:06:07 +0100 | <monochrom> | Yes, moreover you have to ban all finite lists. |
2025-02-12 20:05:57 +0100 | <lambdabot> | ZipList {getZipList = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42... |
2025-02-12 20:05:56 +0100 | <mauke> | > pure 42 :: ZipList Int |
2025-02-12 20:05:48 +0100 | <geekosaur> | iirc ZipList would require `return` to produce an infinite list? |
2025-02-12 20:05:41 +0100 | <monochrom> | But I came close to seeing why ZipList cannot be a monad. |
2025-02-12 20:03:51 +0100 | <monochrom> | I don't actually know of one. I made a bet. :) |
2025-02-12 20:01:55 +0100 | <mauke> | is there a simple proof that Monad [] is unique? |
2025-02-12 20:00:48 +0100 | <lambdabot> | ZipList {getZipList = [10,21]} |
2025-02-12 20:00:47 +0100 | <monochrom> | > pure (+) <*> ZipList [0,1] <*> ZipList [10,20] |
2025-02-12 20:00:20 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2025-02-12 20:00:12 +0100 | <monochrom> | But the stdlib knows your wish! It has the newtype wrapper ZipList that will do zipping for <*>. |
2025-02-12 19:59:22 +0100 | <monochrom> | That in turn is because we would like <*> to be consistent with >>= whenever applicable. List's >>= has to do cartesian product, there is no other List monad. |
2025-02-12 19:59:02 +0100 | <mauke> | <*> on [] is defined this way to remain compatible with the Monad [] instance |
2025-02-12 19:58:28 +0100 | <monochrom> | List's <*> does cartesian product rather than zipping. |
2025-02-12 19:58:19 +0100 | <mauke> | because of how <*> is defined on [] |
2025-02-12 19:57:40 +0100 | <energizer> | why does `pure (+) <*> [0,1] <*> [10,20]` produce [10,20,11,21] and not zipWith? |
2025-02-12 19:56:20 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-12 19:53:01 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-12 19:51:14 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 252 seconds) |
2025-02-12 19:46:37 +0100 | <hololeap> | fair point |
2025-02-12 19:44:52 +0100 | <haskellbridge> | <sm> sometimes seeing code helps |
2025-02-12 19:44:30 +0100 | fun-safe-math | (~fun-safe-@2601:1c2:1b7f:801f:c74b:f0dc:f04d:3261) fun-safe-math |
2025-02-12 19:44:17 +0100 | <hololeap> | no worries. I can just use a regex that people provided on stack exchange, and then I don't have to pull in hledger :) |
2025-02-12 19:44:12 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2025-02-12 19:43:26 +0100 | [tank] | (sid630849@id-630849.tinside.irccloud.com) |
2025-02-12 19:43:25 +0100 | <haskellbridge> | <sm> :) |
2025-02-12 19:43:15 +0100 | fun-safe-math | (~fun-safe-@2601:1c2:1b7f:801f:f530:2eec:1f02:adc2) (Quit: No Ping reply in 180 seconds.) |
2025-02-12 19:42:55 +0100 | <haskellbridge> | <sm> I'm sorry |
2025-02-12 19:42:42 +0100 | <hololeap> | sm: eh, it's just using a regex and not a very good one. but thanks |
2025-02-12 19:42:17 +0100 | Lord_of_Life_ | Lord_of_Life |
2025-02-12 19:41:47 +0100 | <haskellbridge> | <sm> hololeap: String ? https://hackage.haskell.org/package/hledger-lib-1.41/docs/Hledger-Utils-String.html#v:stripAnsi |
2025-02-12 19:40:56 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) Lord_of_Life |
2025-02-12 19:40:50 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 248 seconds) |
2025-02-12 19:36:59 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
2025-02-12 19:35:05 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-12 19:33:22 +0100 | tank_ | (sid630849@id-630849.tinside.irccloud.com) (Client Quit) |
2025-02-12 19:30:58 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-12 19:30:10 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-12 19:29:21 +0100 | tank_ | (sid630849@id-630849.tinside.irccloud.com) |
2025-02-12 19:28:58 +0100 | [tank] | (~tank@213.18.138.85) (Quit: [tank]) |
2025-02-12 19:20:13 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod |
2025-02-12 19:15:14 +0100 | tri | (~tri@ool-44c70bcb.dyn.optonline.net) (Ping timeout: 260 seconds) |
2025-02-12 19:12:13 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) wootehfoot |
2025-02-12 19:11:22 +0100 | jespada | (~jespada@2800:a4:22f4:ae00:fc16:e598:5958:94e6) (Quit: My Mac has gone to sleep. ZZZzzz…) |
2025-02-12 19:11:10 +0100 | Googulator | (~Googulato@2a01-036d-0106-4074-f40d-d825-16f5-119a.pool6.digikabel.hu) (Ping timeout: 240 seconds) |
2025-02-12 19:10:27 +0100 | tri | (~tri@ool-44c70bcb.dyn.optonline.net) |