Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

monad

Name: Anonymous 2014-03-25 4:23

What is it? Why is it so leet? Why do I need to use it for IO?

Name: Anonymous 2014-03-25 5:33

A monad is just a monoid in the category of endofunctors. What's the problem?

Name: Anonymous 2014-03-25 6:15

Is there any abstraction in mathematics higher than category theory?

Name: Anonymous 2014-03-25 7:52

>>3
anus theory

Name: Anonymous 2014-03-25 14:01

>>1
A monad is something you can connect in a sequence so that the choice of a step can depend on the results of previous steps. In other words, it's the most natural way to exress sequences of actions.

Here's an explanation by Tony Morris where he shows that even programmers in the less practical languages like C# and Java use monads all the time:
http://dl.dropboxusercontent.com/u/7810909/docs/what-does-monad-mean/what-does-monad-mean/chunk-html/index.html

Name: Anonymous 2014-03-25 14:12

>>5
A monad is something you can connect in a sequence so that the choice of a step can depend on the results of previous steps. In other words, it's the most natural way to exress sequences of actions.
Is this a monad then?

int
something (int a)
{
  int b = somethingElse (a);
  int c = somethingElse (b);
  int d = somethingElse (c);
  return somethingElse (d);
}


It reminds me this https://en.wikipedia.org/wiki/Uniqueness_type

Name: Anonymous 2014-03-25 14:14

A monad is the crap, which haskell-fags use, instead of delimited continuation, to precisely control the execution of code. Basically it allows you to slice your usual linear PROGN into serial-lambdas, which allows injection of some other code between their compositions. One example of monads being Unix-like pipes executing in parallel. Basically, if you know continuation-passing-style or x86 assembly push/jmp/pop/ret sequence, you know monads.

Name: Anonymous 2014-03-25 14:17

>>7
can I has more explain?
what's the difference between continuations and this?
What's the pros and cons of each of them?

Name: Anonymous 2014-03-25 14:37

>>6
Yes, and the semi-colons are the monadic >>= (a.k.a. bind). The difference is that Haskellers can overload the semi-colon in lots of ways and the compiler can ensure that monadic code stays in one particular monad and doesn't drip into another (like doing IO inside an STM transaction).

>>8
There is no difference, continuations are monads too, in fact they're the mothers of all monads. Dan Piponi explains it here:
http://blog.sigfpe.com/2008/12/mother-of-all-monads.html

Name: Anonymous 2014-03-25 14:40

>>9
Thank you kindly sir
sussman, stallman and the holly G.d bless you

Name: Anonymous 2014-03-25 14:45

>>6
By the way, the functional languages Clean and Mercury actually do use uniqueness typing for their IO. Haskellers, on the other hand, thought monads arere cleaner (as they eliminate the need to explicitly thread state through a sequence of actions).

Name: Anonymous 2014-03-25 15:05

>>11
As far as I know IO monads can be implemented via uniqueness typing
What do you like more btw?

Name: Anonymous 2014-03-25 15:33

>>12
I like anus

Name: Anonymous 2014-03-25 16:14

>>13
What kind

Name: Anonymous 2014-03-25 16:19

>>14
brown and wrinkly

Name: Anonymous 2014-03-25 17:13

>>13
hax my girly anus ^-^ and penis

Name: Anonymous 2014-03-25 17:50

>>12
Reply to me or else I will cry

Name: Anonymous 2014-03-25 17:56

>>17
cry me an anus

Name: Anonymous 2014-03-25 18:28

>>18
*cires an anus*

Name: Anonymous 2014-03-25 19:16

Monads are something you use when your language is not advanced enough to support side effects natively.

Name: Anonymous 2014-03-25 22:01

>>20
I use monads in C, Mr. dendrophile sake

Name: Anonymous 2014-03-26 7:53

>>21
A C program is a monad by itself. The preprocessor is the purely functional language.

Name: Anonymous 2014-03-26 13:03

>>22
hax my anus

Name: Anonymous 2014-03-26 13:30

>>23
HAX MINE FIRST

Name: Anonymous 2014-03-26 21:41

>>18
you just made a loli like me cry, why did you do it?
that was something horrible. Making a loli cry? really? ;-;

Name: Anonymous 2014-03-27 0:29

u monad?

Name: Anonymous 2014-03-27 9:35

>>26
monadise my anus

Don't change these.
Name: Email:
Entire Thread Thread List