Newest at the top
2025-03-21 22:41:53 +0100 | <ski> | this coheres with the Prolog roots of Erlang, where `,' means conjunction, which is commutative (although Prolog, unlike e.g. Mercury, does have side-effecting logical formulae (goals), which break commutativity) |
2025-03-21 22:40:47 +0100 | <ski> | Erlang doesn't permit this, will do matching on the second time in `X = foo(),X = bar(X,T)', to check that the two results are equal |
2025-03-21 22:40:06 +0100 | <ski> | EvanR : "keep \"assigning\" to the same variable over and over" -- yes |
2025-03-21 22:39:40 +0100 | <ski> | yes, mauke |
2025-03-21 22:39:06 +0100 | takuan | (~takuan@d8D86B601.access.telenet.be) (Remote host closed the connection) |
2025-03-21 22:39:00 +0100 | <ski> | ("abused", because this relies on a particular implementation of DCGs, the transformation implementation being transparent, rather than opaque) |
2025-03-21 22:38:52 +0100 | <lambdabot> | (8,4) |
2025-03-21 22:38:50 +0100 | <mauke> | > let f x | x <- x + 1, y <- x, x <- x * 2 = (x,y) in f 3 |
2025-03-21 22:38:50 +0100 | <dminuoso> | Hey I have an idea how to resolve the monad debate. If we accept the idea that a single instance is better to start with, why not just introduce Cont. We skip the need to introduce any further instances. |
2025-03-21 22:38:28 +0100 | <ski> | DCGs (Definite Clause Grammars) in Prolog systems can also be (ab)used to thread (a single) state, implicitly |
2025-03-21 22:38:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-03-21 22:37:48 +0100 | <ski> | "State variables" <https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables> in Mercury is a neat syntax, for threading state(s), though |
2025-03-21 22:37:09 +0100 | <EvanR> | is that the idiom where they keep "assigning" to the same variable over and over |
2025-03-21 22:36:39 +0100 | <ski> | i didn't like shadowing of variables in Elixir |
2025-03-21 22:36:31 +0100 | <EvanR> | if you're adding specialized syntax for State monading, then... it might not be that hard to just add monad syntax |
2025-03-21 22:36:05 +0100 | <EvanR> | I posted that in response to people in elixir who are trying to add specialized syntax for basically State monading |
2025-03-21 22:35:32 +0100 | <EvanR> | that's a good one |
2025-03-21 22:35:15 +0100 | <ski> | i also like the (non-tutorial) short overview "Escaping Hell with Monads" by Philip Nillson in 2017-05-08 at <https://philipnilsson.github.io/Badness10k/escaping-hell-with-monads/> |
2025-03-21 22:35:06 +0100 | <EvanR> | but* |
2025-03-21 22:35:01 +0100 | <EvanR> | it's florida by flipped around the Y axis |
2025-03-21 22:34:32 +0100 | <mauke> | the anarchy monad |
2025-03-21 22:34:31 +0100 | <EvanR> | reverse state? |
2025-03-21 22:33:54 +0100 | <davean> | EvanR: Also there are totally non-state related applications, like reverse state. |
2025-03-21 22:33:16 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-21 22:33:09 +0100 | <ski> | mhm |
2025-03-21 22:32:48 +0100 | <EvanR> | hmmmmmmm. No RNG so it's not the one I'm thinking of |
2025-03-21 22:32:32 +0100 | <ski> | EvanR : `Maybe',`State s',`IO' |
2025-03-21 22:32:30 +0100 | <EvanR> | it's gotta be better at that than good ones |
2025-03-21 22:32:17 +0100 | <EvanR> | dminuoso, did you ask it to generate a bad monad tutorial |
2025-03-21 22:31:51 +0100 | <EvanR> | ski, they only have 2 examples! |
2025-03-21 22:31:36 +0100 | <davean> | dminuoso: Its ok, I made sure to use a phantom type when I passed them to the lecture transformer. |
2025-03-21 22:31:25 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-21 22:31:04 +0100 | <ski> | i consider this still one of the best monad tutorials (being the first one that was directed towards ordinary programmers, from what i know) |
2025-03-21 22:30:34 +0100 | <dminuoso> | The Guide concludes that Haskell is ‘almost certainly very important,’ but advises against asking a Haskell programmer what a Monad really is, unless you have packed a towel, a week’s worth of supplies, and a sturdy escape plan." |
2025-03-21 22:30:11 +0100 | <ski> | EvanR : "What the Hell are Monads?" by Noel Winstanley in 1999-02 at <https://web.archive.org/web/19991018214519/http://www.dcs.gla.ac.uk/~nww/Monad.html> ? |
2025-03-21 22:30:08 +0100 | <dminuoso> | Now I finally found out what LLMs are good for. |
2025-03-21 22:29:47 +0100 | <dminuoso> | Hitchhiker's Guide to the Galaxy helpfully suggests that a Monad is 'just a monoid in the category of endofunctors,' which is technically true but about as useful as describing a spaceship as ‘just some metal arranged cleverly in space.’ |
2025-03-21 22:27:47 +0100 | ski | didn't understand the "with some special tweakery to attach a `a ~ IO` constraint as a superclass to Monad a..." part |
2025-03-21 22:27:33 +0100 | <geekosaur> | yeh, I mentioned that earlier. still IMO the only monad tutorial worth anything |
2025-03-21 22:27:07 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-03-21 22:25:28 +0100 | <davean> | Its not quite as I remembered |
2025-03-21 22:25:12 +0100 | <EvanR> | it was like my first intro so I struggled to believe there was some non-state related applications xD |
2025-03-21 22:24:52 +0100 | <davean> | http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html |
2025-03-21 22:24:25 +0100 | <EvanR> | i recall 2 of the examples being basically the same thing (state and RNG) |
2025-03-21 22:24:04 +0100 | <EvanR> | maybe |
2025-03-21 22:23:58 +0100 | <davean> | EvanR: "You could have invented monads"? |
2025-03-21 22:23:53 +0100 | euleritian | (~euleritia@ip5f5ad695.dynamic.kabel-deutschland.de) |
2025-03-21 22:23:46 +0100 | <EvanR> | there was a really old monad ttorial which used 3 examples |
2025-03-21 22:23:32 +0100 | <davean> | I found everything easier once I forgot about instances. Things like "hoist" were way more enlightening for me |
2025-03-21 22:23:31 +0100 | euleritian | (~euleritia@ip5f5ad695.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |