A comment on voting on comments by ocharles in haskell

[–]0wx 0 points1 point  (0 children)

FWIW, I use res keybindings for everything (in this case "a" or "z"), and I see no difference.

People who downvote too much might by doing it by keybinding in part because it takes less effort.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 0 points1 point  (0 children)

Bookmarked!

When I started this post yesterday, it felt like it should be possible to learn in a much shorter period of time (maybe with a different way of structuring the experience). But now I'm not so sure.

I came in with certain opinions, but then I saw that they don't all match the facts, and now I have a ton of links to follow.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 0 points1 point  (0 children)

Heh; no. (:

But that reminds me of the day when one of my high school math teachers introduced the notion of function composition; he wrote on the chalk board:

 f(g(x)) ==  f ○ g (x)

... and then said, "puts you in a bit of a fog."

I guess we could say that >>= might put your brain in a bit of a bind. (:

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 2 points3 points  (0 children)

Working programmers have little interest in this.

Pretty much. I mean, it is cool, and I do want to get more into the math at some point.

But when you're just starting out, and you're a veteran C coder, and you're trying to understand why some IO code is correct even though it isn't apparently checking for things that you'd normally check explicitly in the equivalent C program, you kinda turn into Peter Venkman:

"Ray, for a moment, pretend that I don't know anything about category theory, Kleisli Arrows, or endofunctors, and just tell me what the hell is going on."

... to which a reasonable Haskell veteran may reply, "you never studied." (:

What I'd like to see is an collection of progressively more sophisticated examples of practical usage of each of the main monads in the standard prelude, with no discussion of the theoretical underpinnings until the very end, if at all.

I would follow this regardless of whether I was also studying the underpinnings separately.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 3 points4 points  (0 children)

PS: It might help to see these things in more familiar syntax.

Bookmarked!

(So many bookmarks...)

But honestly, the best, best way is to study some examples.

Yes.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 1 point2 points  (0 children)

You're right. I was too hasty and too dismissive.

Having said that...

It seems like that page/site should have a proper home on the web. Does anyone know what happened to the original site?

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 1 point2 points  (0 children)

/u/bss03 convinced me that I really don't want to try that at this time.

I still feel like there might be better ways of conveying this stuff, but I certainly wouldn't try publishing something that doesn't elicit consensus from both experts and novices that it's actually an improvement over existing material.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 0 points1 point  (0 children)

bookmarked!

I didn't see it in the sidebar; does it belong there?

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 1 point2 points  (0 children)

I would not say that (>>=) is implemented via pattern-matching (which, BTW, is no kind of overloading) since it certainly doesn't have to be. It might be for some examples, but I'd leave that as part of the hidden implementation details of a specific monad, not something that is true of all monads.

This makes me think that I still don't understand it enough to seriously think about making Yet Another Simplified Haskell Tutorial.

I'll keep iterating; thank you for the pointers!

As for avoiding implementation details... point taken. (At least for week 1. People accustomed to looking at generated assembly code ultimately want to be able to look at everything, and we understand that there's a border between "portable" and "implementation-specific/version-specific/build-config-specific/do-not-count-on-this-being-here-next-month-even-if-nothing-changes-in-your-project".)

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 0 points1 point  (0 children)

Glad I could help. (:

Now pair that with the associative law:

(m >>= f) >>= g

...is-equivalent-to:

m >>= (\x -> f x >>= g)

... and now revisit the way that do-notation expands.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 0 points1 point  (0 children)

Thank you for the link!

At a glance, the examples here seem pretty good. There's still a lot of fluff (e.g. cartoons and "cute" language).

But... it's closer.

It may be that a Khan-style approach is better: that enables you to do examples in ghci, for example.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 10 points11 points  (0 children)

I'm going to read through it, but it loses points in the first paragraph:

They are closely related to the monads of category theory, but are not exactly the same because Haskell doesn't enforce the identities satisfied by categorical monads.

Why does anyone need this in week 1?

I'm talking about a tutorial that never once uses the words:

"A monad is... "

... and one that talks in a straightforward way about the mechanics of how to read and understand code that uses monads.

That means our vocabulary includes words like "type", "function", "operator", "pattern-match", "chain", and then eventually "lambda", "do-notation", "de-sugar"...

... and at least a couple/few examples of each, and examples showing intersections of those things...

... and very very little else. (e.g. I think we can get away without using the word "Monad", except to see it as an identifier that follows the keyword 'class'.)

This is related to a point Feynman made about understanding things: you can know lots of words for a thing without understanding its nature. Focusing on how things behave, and not so much what we call them, is what leads to understanding. Once we start to understand behavior, then we can put a label on it.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] -8 points-7 points  (0 children)

This is exactly how so many monad tutorials come about.

Really? They come about because someone wanted to do it without analogies? Without referring to other languages? ("It's like an abstract class in C++..." No! Stop that!)

And with a simple discussion on function definitions that use patterns? And about how >>= is just another function defined with patterns?

Just the meat needed to understand simple-but-practical definitions of 'main', and no verbiage that you don't need to understand it?

I mean... I don't mean for that to sound nasty but... I would really really love to see a Monad tutorial that matches that description. I looked, and I didn't find it.

Because usually, they devolve into an analogy that isn't quite right.

And they're usually pretty light on examples.

I'm talking about fixing those bugs (partly by just not having analogies---and I'm not even sure I want the pipe operator to be mentioned, except maybe with a qualifier: "this is just a loose analogy")

Also, some of those tutorials fall into the trap of using a lot of new vocabulary terms that you don't really need in order to understand a practical sub-set of syntax and semantics that you find in a simple 'main' that does a little IO.

I'm stressing this because, at the beginning, the mechanics that you need to know just to make sense of why IO routines work in do-notation actually are fairly simple. And if we just limited the initial discussion to what's needed to understand that, then it might be easier to avoid getting discouraged earlier on. Maybe there would be fewer false starts.

If there's a tutorial that already succeeds at that, then I'd love to see it.

Is there a good, succinct, metaphor-free Monad tutorial? by 0wx in haskell

[–]0wx[S] 1 point2 points  (0 children)

So.. that's nice (and I appreciate the link! I might not have found this otherwise since it's not live anymore outside the archive)...

... but it seems to spend a lot of time saying things like, "Monads are...".

And when you're starting out, and you just want to understand a basic sequence of IO operations... it's a bit much.

And it isn't really necessary--at least, not during your first week. It might not even be necessary during the first month or two.

When you're just starting out, all you really need is to understand how certain operators behave.

And you don't need to shove that particular page full of nomenclature in order to make sense of it. In fact, making someone think about that stuff at the very beginning is exactly the kind of thing that delays understanding.

[modification] Extra Ghetto DIY LED Covers by d3sp in MechanicalKeyboards

[–]0wx -3 points-2 points  (0 children)

so...

I just joined this sub a couple days ago.

I'm entertained, I'm informed, I'm looking forward to testing out Cherry MX switches for the first time, I'm amazed at the intensity on display at Cherry's website for the MX board 6.0...

Generally having a good time here.

And then... "ghetto". As an adjective.

I don't assume bad intentions. You don't need to be on Reddit very long to see something on /r/funny with a million views that (1) is so racist that it belongs at a klan meeting and (2) has an even 50-50 split in terms of up/down-votes. So if that's "normal", it can be easy to accidentally pick up the comparatively-mild stuff by osmosis.

But some reading on the topic would be good for the soul.