POV-Ray : Newsgroups : povray.off-topic : Computers are fast : Re: Reminiscences of an Old Fart Server Time
5 Sep 2024 03:22:34 EDT (-0400)
  Re: Reminiscences of an Old Fart  
From: Invisible
Date: 20 Nov 2009 10:59:20
Message: <4b06bcd8@news.povray.org>
>> A monad is just a monoid in the category of endofunctors. What's the
>> problem?
> 
> "endofunctor" sounds like something a doctor would use on someone's nether 
> regions.
> 
> Or a form of insult "I'll endofunctor your monad, BITCH!" :) :)

(See attachment.)

>> (Even more impressive is the fact that I'M NOT MAKING THIS STUFF UP!!)
> 
> Wait lemme guess... haskell?

Well DUH. ;-)



In case anybody doubts my powers...

- Non-strict: There is some arcane technical distinction between 
"non-strict" and "lazy", but essentially it refers to the property of 
Haskell whereby code is not executed until/unless its result is actually 
"needed" for something.

- Purely-functional: Haskell is a "functional" programming language 
(i.e., a language that uses "functions"). The term *purely* functional 
indicates that it's not a hybrid-paradigm language (like, say, Lisp, 
Erlang, C++...)

- Extended Milner-Hindley type inference: The Haskell compiler can 
automatically work out what type things have without you having to 
manually tell it. The algorithm was invented by Mr Milner and Mr 
Hindley, but Haskell's type system is more complex / powerful, and hence 
requires a somewhat more complicated inference algorithm.

http://tinyurl.com/yby3zdt

- Monadic effects: Haskell uses "monads" to control special effects such 
as I/O, concurrency, transactions, nondeterminism, etc.

- Nested Data Parallelism: This is really a red herring. It's a Haskell 
library designed to accelerate the kind of things that GPUs are good at, 
but in a high-level, user-friendly way. Currently it's hopelessly 
unfinished.

Oh, and a monad really *is* a monoid on the category of endofunctors:

http://en.wikipedia.org/wiki/Monad_(category_theory)

Personally, I have no frickin' idea what the hell a category is or how a 
functor is different from an ordinary function. But what I do know is 
that an endofunctor takes values from one category and returns values in 
the same category (rather than some different category). And a monoid is 
a set of items that can be "added together" and possesses an identity 
element.

Why this is useful for computer programming is an entire *other* 
question alltogether...


Post a reply to this message


Attachments:
Download 'monad.jpg' (22 KB)

Preview of image 'monad.jpg'
monad.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.