jducoeur: (Default)
[personal profile] jducoeur
[For the serious programming geeks only]

I was just in a conversation, and lamenting the fact that the one bit of functional programming that I just don't *get* yet is Monads. They're clearly terribly important, at least if you like to program at the high level as I like to, but I haven't yet managed to internalize them -- none of the explanations have clicked yet. In general, most get lost in the abstraction, and don't have enough solid and clear examples. This is, I suspect, one of those paradigm-shift concepts like OO, that are blindingly obvious once you *do* get it, but kind of opaque until then.

So I'm curious: do any of my programmer friends have a *good* pet site on the subject? I've read several that didn't manage to get the concept across, but I have to believe that it's possible to find the right blend of the abstract and concrete to drive the idea into my brain, expressing not just what they are but when and why you want to use them...

(no subject)

Date: 2011-01-13 12:10 am (UTC)
From: [identity profile] metageek.livejournal.com
I know I've got a couple of monad tutorial bookmarks squirreled away somewhere. The only one I've really got a handle on is the IO monad, which is sort of the degenerate case.

(no subject)

Date: 2011-01-13 12:18 am (UTC)
From: [identity profile] metageek.livejournal.com
Most of my links seem to be stale. However, the Haskell wiki has a timeline of monad tutorials, which may help you choose the one you want.

(no subject)

Date: 2011-01-13 03:59 pm (UTC)
From: [identity profile] baron-steffan.livejournal.com
So knowing full well it'd be so over my head it'd be the Marianas Trench, I took a look at this to see if I could get any notion of the idea....and I gotta tell ya...check out "Bob the Monadic Lover". Pretty funny.

(no subject)

Date: 2011-01-13 02:02 am (UTC)
From: [identity profile] ilaine-dcmrn.livejournal.com
I hadn't actually heard of them till you asked the question, but my husband's rather sarcastic explanation is that it is 'side effects for functional languages'. So functional programmers can pretend they are still as pure as the new driven snow :o)

(no subject)

Date: 2011-01-16 07:14 pm (UTC)
From: [identity profile] lanome.livejournal.com
Personally, my approach to getting it would be to do some hacking about in Haskell.

(no subject)

Date: 2011-01-17 12:42 pm (UTC)
From: [identity profile] metageek.livejournal.com
Hmm. Scala doesn't need an IO monad, or a State monad, right? (I've just barely started looking at the language, but I know it has mutable vars, and the first programs in the tutorial print text.) So any monad work you did there would be the more challenging stuff, like parsers. Probably a good thing; I know my use of Haskell's IO monad doesn't teach me much, since it just feels like doing IO in an imperative language.

(no subject)

Date: 2011-01-20 07:32 pm (UTC)
From: [identity profile] fredrickegerman.livejournal.com
I wrote some lecture notes that explained the Monad laws in terms of "working the way you expect let bindings to work, because programming with effects works like other kinds of programming". Have no idea if that'd be useful at all, but it at least got my advisor and a bunch of MIT students further along the road of understanding.

Sadly, writing bad monad tutorials is a rite of passage for Haskell programmers. Let us speak no further of "Monads as envelopes", my circa-1995 effort in this direction.

Profile

jducoeur: (Default)
jducoeur

October 2025

S M T W T F S
   12 34
567891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags