News for hackers. Stuff that matters.
Re:The Monad Challenges: Jump start your understanding of mo... by fizixer on Tuesday January 19, 2016 @08:39PM (#10935486)
> Do I need to know Haskell? Yes.

This is enough for me to reject this blogpost.

No you don't need a specific language to implement any functionality that can be implemented by a turing-complete language.

I watched Crockford's monad talk [1]. He used javascript. The only problem with that talk is that he spent about 10 seconds or less explaining what a monad is (and the rest of the talk on implementation issues and his own perspective, etc, etc).

I'm still waiting for a good monad discussion without CT or Haskell. (this [2] and this [3] look promising, both in python)

[1] https://www.youtube.com/watch?v=b0EF0VTs9Dc

[2] http://www.valuedlessons.com/2008/01/monads-in-python-with-n...

[3] http://www.dustingetz.com/2012/04/07/dustins-awesome-monad-t...

Re:The Monad Challenges: Jump start your understanding of mo... by rntz on Tuesday January 19, 2016 @08:59PM (#10935563)
It's true that you don't need to know Haskell in order to learn about monads, but Haskell is a perfectly reasonable language in which to write a monad introduction.

Haskell is good for learning about monads for the same reasons monads tend to be heavily used in Haskell, but not in other languages. Monads are both part of Haskell's standard library, and have very useful special syntax (do-notation). Writing out monadic code explicitly gets to be a huge pain when using monads in another language. Typeclasses also make it convenient & easy to write code that's generic over any monad.

Re:The Monad Challenges: Jump start your understanding of mo... by imh on Tuesday January 19, 2016 @10:35PM (#10935904)
>Writing out monadic code explicitly gets to be a huge pain when using monads in another language.

Couldn't any other language have a syntax like

    thing.do(\x -> other thing(x)).do(
    \x -> yet another thing(x)).do(
    a function).do(
    more stuff).do(
    etc)
And then replace "\x -> whatever" with the local language's lambda syntax. The only time you get the painful nested parens is if you want

    thing.do(
    \x -> f(x).do(
    \y -> g(x,y)))
It's not too terribly bad.
Re:The Monad Challenges: Jump start your understanding of mo... by ash on Wednesday January 20, 2016 @02:47AM (#10936575)
Like JavaScript Promises?
Re:The Monad Challenges: Jump start your understanding of mo... by mightybyte on Tuesday January 19, 2016 @11:18PM (#10936065)
Hi, I'm sorry you feel that way. Maybe you just aren't my target audience. That being said, Crockford's explanation of monads in that talk was overly simplistic and misses much of the point of the benefit that you get from them in a language like Haskell. And if we're being honest here I think it's safe to say that most programmers wouldn't have even heard of monads if it wasn't for Haskell. I gave a talk at the NY Haskell meetup a few years ago that specifically addresses Crockford's talk in a little more detail [1]. That talk might be about the level you're looking for. There is some Haskell code, but most of the talk should make sense to someone not familiar with Haskell.

[1] https://vimeo.com/59215336

Re:The Monad Challenges: Jump start your understanding of mo... by jimbokun on Tuesday January 19, 2016 @10:26PM (#10935875)
You need to know Haskell to complete the exercises, not to understand Monads.
Re:The Monad Challenges: Jump start your understanding of mo... by 88e282102ae2e5b on Wednesday January 20, 2016 @09:38AM (#10938329)
That may be true in principle, but I have been unable to find any resource ever that explains them well. Presumably this is because I don't know Haskell and the only good explanations are in that language.
Re:The Monad Challenges: Jump start your understanding of mo... by banku_brougham on Tuesday January 19, 2016 @09:22PM (#10935648)
Dude, fine. But the author wrote the tutorial with those assumptions, he's just trying to help you out bro!