Newest at the top
| 2026-06-28 23:15:00 +0000 | <schuelermine> | courtesy of pointfree.io |
| 2026-06-28 23:14:54 +0000 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 245 seconds) |
| 2026-06-28 23:13:38 +0000 | <monochrom> | join bimap. That's an awesome move. |
| 2026-06-28 23:13:14 +0000 | <monochrom> | haha |
| 2026-06-28 23:13:03 +0000 | <schuelermine> | I just love abusing ViewPatterns for nonsense like this |
| 2026-06-28 23:12:51 +0000 | <schuelermine> | yeah |
| 2026-06-28 23:12:41 +0000 | <monochrom> | I think join is easier to work with in this case. |
| 2026-06-28 23:12:25 +0000 | <schuelermine> | (Two a) >>= (($ a) . join bimap -> (Two (x, _), Two (_, y))) = Two (x, y) |
| 2026-06-28 23:12:23 +0000 | <schuelermine> | well, the definition of bind |
| 2026-06-28 23:12:09 +0000 | <schuelermine> | I have written this definition of join in a truly cursed fashion |
| 2026-06-28 23:10:42 +0000 | divlamir | (~divlamir@user/divlamir) divlamir |
| 2026-06-28 23:08:32 +0000 | <monochrom> | So if you try for example (a,x) you will run into a problem. |
| 2026-06-28 23:07:57 +0000 | <monochrom> | I worked for an hour to prove it. Then, like someone just said, I heard "it's just Bool->a" and I was like I'm a moron why did I waste an hour. :) |
| 2026-06-28 23:07:31 +0000 | <schuelermine> | monochrom: honestly not really sure how another definition of join would fail the monad laws but I haven’t checked yet |
| 2026-06-28 23:06:56 +0000 | <monochrom> | schuelermine: You've got it right. In fact, the only way to please the monad laws. :) |
| 2026-06-28 23:05:33 +0000 | divlamir_ | (~divlamir@user/divlamir) (Ping timeout: 252 seconds) |
| 2026-06-28 23:04:33 +0000 | divlamir | (~divlamir@user/divlamir) (Ping timeout: 265 seconds) |
| 2026-06-28 23:00:28 +0000 | divlamir_ | (~divlamir@user/divlamir) divlamir |
| 2026-06-28 22:58:21 +0000 | <schuelermine> | true but I’m not gonna bother just to prove to you this isn’t a homework question lmao |
| 2026-06-28 22:58:00 +0000 | <EvanR> | I think this one might not be that bad |
| 2026-06-28 22:57:50 +0000 | <schuelermine> | yes; annoyingly long equations |
| 2026-06-28 22:57:42 +0000 | <EvanR> | commutative diagrams are shorthand for equations |
| 2026-06-28 22:57:26 +0000 | <schuelermine> | can’t really share that here |
| 2026-06-28 22:57:16 +0000 | <schuelermine> | well I drew the commutative diagrams on paper |
| 2026-06-28 22:57:08 +0000 | <EvanR> | equation theories lend themselves to equational reasoning |
| 2026-06-28 22:56:26 +0000 | <EvanR> | now that you think you know show the work xD |
| 2026-06-28 22:55:36 +0000 | <schuelermine> | EvanR: I just thought of this and I tried working it out. I was pretty sure it is a monad but like not 100% sure |
| 2026-06-28 22:55:04 +0000 | <schuelermine> | shachaf: that makes sense |
| 2026-06-28 22:54:50 +0000 | <schuelermine> | EvanR: no |
| 2026-06-28 22:54:36 +0000 | <shachaf> | schuelermine: Yes. Maybe more commonly seen by the name (Bool ->). |
| 2026-06-28 22:53:57 +0000 | <EvanR> | (alternatively, the IO action samples from a brouwerian lawless sequence) |
| 2026-06-28 22:53:13 +0000 | <EvanR> | though this is a separate subject from my harry potter analogy, where you don't know the provenance of the IO action |
| 2026-06-28 22:52:46 +0000 | <EvanR> | what if the result of an IO operation depends on a high energy particle physics experiment for which we have no good theories yet, hypothetically |
| 2026-06-28 22:51:59 +0000 | <jreicher> | monochrom: that sounds like the result of an IO operation is magic? But not necessarily the operation itself? ("Read from keyboard" is straightforward; but what ends up being read cannot be explained) |
| 2026-06-28 22:51:15 +0000 | peterbecich | (~Thunderbi@71.84.33.135) (Ping timeout: 252 seconds) |
| 2026-06-28 22:49:31 +0000 | mikess | (~sam@S010664777dafd303.cg.shawcable.net) |
| 2026-06-28 22:49:18 +0000 | divlamir | (~divlamir@user/divlamir) divlamir |
| 2026-06-28 22:46:23 +0000 | <EvanR> | is this a homework problem |
| 2026-06-28 22:45:41 +0000 | <schuelermine> | is `newtype Two a = (a, a)` a monad with `join ((a, b), (x, y)) = (a, y)`? (that is are the monad laws fulfilled) |
| 2026-06-28 22:44:45 +0000 | schuelermine | (~Thunderbi@user/schuelermine) schuelermine |
| 2026-06-28 22:40:37 +0000 | peterbecich | (~Thunderbi@71.84.33.135) peterbecich |
| 2026-06-28 22:39:55 +0000 | divlamir | (~divlamir@user/divlamir) (Ping timeout: 264 seconds) |
| 2026-06-28 22:39:42 +0000 | peterbecich | (~Thunderbi@71.84.33.135) (Ping timeout: 252 seconds) |
| 2026-06-28 22:27:59 +0000 | <EvanR> | it could even be Undefined Behavior for all you know |
| 2026-06-28 22:27:12 +0000 | <EvanR> | it doesn't have to even obey good plot guidelines |
| 2026-06-28 22:27:02 +0000 | <EvanR> | if you hae an unknown IO Int, then it's kind of like Harry Potter now |
| 2026-06-28 22:26:37 +0000 | <EvanR> | if you have a Maybe Int and know nothing else, ignore unsafePerformIO, your imagine can't run super wild with what it might be |
| 2026-06-28 22:24:29 +0000 | dolio | (~dolio@130.44.140.168) dolio |
| 2026-06-28 22:21:06 +0000 | tromp | (~textual@2001:1c00:340e:2700:dd19:dfa1:d2a9:f5b7) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 2026-06-28 22:17:49 +0000 | dolio | (~dolio@130.44.140.168) (Ping timeout: 245 seconds) |