Live data from Hacker News

Monad Tutorials Timeline

wiki.haskell.org

11–20 of 63 posts

Re: Monad Tutorials Timeline

#13

I still don’t understand why it’s named from Gnosticism ( https://en.wikipedia.org/wiki/Monad_(Gnosticism) )

Monads got their name from monoids (being a monoid in the category of endofunctors). Monoids are equivalent to one-object categories, so the name uses the greek syllable "mono" for one.

Re: Monad Tutorials Timeline

#14
post #7

I understood the monad concept for a few months in university. After the exam was over, I soon stopped understanding it. The same thing happened with the concept of VC dimension. It's kind of interesting, because we usually don't think of "understanding" as something that comes with a time limit.

It happens all the time. For a brief period I understood musical notation and rhythm and then it was gone. Similarly I had a time in my life where I knew by feeling whether a French noun was le or la.

Re: Monad Tutorials Timeline

#15
post #6

To explain like two fundamental rules (we can make wrapper types, and do flatmap) I will: - Write 5 paragraphs setting up an imaginary scenario involving fantasy elements of aliens, dragons, and a magical kindom where they speak using message boxes - Introduce basic category theory by starting with what a functor is - Explain all the effects of a monad in such general terms that it basically amounts to anything and e…

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is.

"You can do IO now." So what? I could do IO before that as well.

Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

Re: Monad Tutorials Timeline

#16
post #15
post #6

To explain like two fundamental rules (we can make wrapper types, and do flatmap) I will: - Write 5 paragraphs setting up an imaginary scenario involving fantasy elements of aliens, dragons, and a magical kindom where they speak using message boxes - Introduce basic category theory by starting with what a functor is - Explain all the effects of a monad in such general terms that it basically amounts to anything and e…

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is. "You can do IO now." So what? I could do IO before that as well. Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

Here's my effort: https://m50d.github.io/2013/01/16/generic-contexts

Re: Monad Tutorials Timeline

#17
post #16
post #15

Earlier quoted context omitted.

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is. "You can do IO now." So what? I could do IO before that as well. Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

Here's my effort: https://m50d.github.io/2013/01/16/generic-contexts

From the very beginning of the article (level 1), I don't see what's wrong with code that looks like the following. Early return seems to fix the "typing this makes me feel ill" part? To me, the following code seems perfectly readable without requiring the reader to know about function composition.

  def doFunctionsInSequence1(): Option[Set[Int]] = {
    val r1 = f1(null)
    if(r1.isEmpty) {
      return None
    }

    val r2 = f2(r1.get)
    if(r2.isEmpty) {
      return None
    }

    return f3(r2.get)
  }

Re: Monad Tutorials Timeline

#18
post #15
post #6

To explain like two fundamental rules (we can make wrapper types, and do flatmap) I will: - Write 5 paragraphs setting up an imaginary scenario involving fantasy elements of aliens, dragons, and a magical kindom where they speak using message boxes - Introduce basic category theory by starting with what a functor is - Explain all the effects of a monad in such general terms that it basically amounts to anything and e…

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is. "You can do IO now." So what? I could do IO before that as well. Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

From my experience having used Haskell (a long time ago), the main benefit of Monads is the `do` and Whether this is the best thing since sliced bread or not, is left as an exercise to the reader.

Re: Monad Tutorials Timeline

#20
post #15
post #6

To explain like two fundamental rules (we can make wrapper types, and do flatmap) I will: - Write 5 paragraphs setting up an imaginary scenario involving fantasy elements of aliens, dragons, and a magical kindom where they speak using message boxes - Introduce basic category theory by starting with what a functor is - Explain all the effects of a monad in such general terms that it basically amounts to anything and e…

I've read more than my fair share of these tutorials, and I'd like to be proven wrong here but I don't think I've ever seen one that explains what the point of these functional constructs (similarly with Applicative etc.) is. "You can do IO now." So what? I could do IO before that as well. Very rarely are practical explanations discussed. Even if they are discussed, the treatment is shallow and useless.

Haskell is primarily a bunch of type gymnastics designed to give the impression of "purity" when no such thing exists in the world.
Post reply on HN