News for hackers. Stuff that matters.
Re:Functional Programming Jargon by sdegutis on Sunday July 24, 2016 @12:56PM (#12153795)
Can you recommend a good one? I've read several but still don't get it. And I hardly have time to write code to learn it like people say is necessary.
Re:Functional Programming Jargon by BellsOnSunday on Sunday July 24, 2016 @01:28PM (#12153940)
I think most people would need to write some code to really grok it, I would anyway. It's a simple enough idea in context, but there's no royal road to understanding.

The explanations I know of (all from the Haskell community) are either

1) formal, referring to ideas from category theory,

2) metaphorical, conveying the ideas by intuitions you may already have about burritos or whatever, or

3) pragmatic, focused on how and why you use them in code.

I think this last category, pioneered by byorgey's wonderful TypeClassopedia [1], is by far the most useful in teaching people about monads but it depends on observing them yourself. (Ditching the metaphors actually seemed quite radical to me at the time -- I presumed they were necessary because everyone else did.) It builds up from understanding what a Functor is, then the next abstraction up, and so on until Monads seem like an obvious idea. The same approach is used in Learn You a Haskell for Great Good [2] but you need to doing the exercises to follow the book. sigfpe's classic explanation [3] is also by example and goes into a bit more depth. It still contains exercises for the reader though :)

[1] https://wiki.haskell.org/Typeclassopedia

[2] http://learnyouahaskell.com/functors-applicative-functors-an...

[3] http://blog.sigfpe.com/2006/08/you-could-have-invented-monad...

Re:Functional Programming Jargon by intellectable on Sunday July 24, 2016 @01:31PM (#12153963)
I like how mpj explains it. Monad - FunFunFunction #21 https://www.youtube.com/watch?v=9QveBbn7t_c

Furthermore, the creator of Elm has a fun explanation too. Evan Czaplicki - Let's be mainstream! User focused design in Elm - Curry On https://youtu.be/oYk8CKH7OhE?t=1454

More serious computer scientist explains monads in the following. Erik Meijer: Functional Programming https://www.youtube.com/watch?v=z0N1aZ6SnBk&feature=youtu.be... and here too https://www.infoq.com/interviews/meijer-monads

Re:Functional Programming Jargon by seagreen on Sunday July 24, 2016 @01:05PM (#12153817)

  Can you recommend a good one? ... I hardly have time to 
  write code to learn it like people say is necessary.
The _easiest_ way to learn monads is through code (in haskell they're just a tricky typeclass: http://dev.stephendiehl.com/hask/#eightfold-path-to-monad-sa...) If you don't want to write code you could learn them like a mathematician from first principles (https://en.wikipedia.org/wiki/Monad_(category_theory)), but that seems so much harder to me I'm not sure why you would.
Re:Functional Programming Jargon by Dr_tldr on Sunday July 24, 2016 @06:31PM (#12155226)
Is there a non-haskell resource on monads you could recommend? Anything that starts with "first, learn haskell" is probably not the easiest way, assertions from people who already know haskell notwithstanding.
Re:Functional Programming Jargon by seagreen on Sunday July 24, 2016 @06:53PM (#12155315)
Great point! I found this for python: https://www.stephanboyer.com/post/9/monads-part-1-a-design-p..., but it definitely focuses more on explanation than practical use. A list of "how to practice with monads in various languages" would be a neat thing to have.
Re:Functional Programming Jargon by pron on Sunday July 24, 2016 @02:34PM (#12154220)
Precious few mathematicians ever learn what monads are...
Re:Functional Programming Jargon by RobertKerans on Sunday July 24, 2016 @08:32PM (#12155733)
If you use JS, if you get how Promises work your probably 90% of the way there; abstracting that pattern out to use in other contexts will probably get you the rest of the way.
Re:Functional Programming Jargon by 0xmohit on Sunday July 24, 2016 @01:29PM (#12153946)
Here's one from LYAH: http://www.learnyouahaskell.com/a-fistful-of-monads

There are a couple of other links here [0] including "Don't fear the Monad" by Brian Beckman.

[0] https://github.com/0xmohit/talks

Re:Functional Programming Jargon by amelius on Sunday July 24, 2016 @02:52PM (#12154283)
My favorite:

You could have invented monads (and maybe you already have) [1]

[1] https://news.ycombinator.com/item?id=958789