Author
|
Topic: A Haskell Lover's Plea (Read 995 times) |
|
Bohandez
Initiate  
Gender: 
Posts: 38 Reputation: 5.76 Rate Bohandez

REALITY CHECKS NEVER BOUNCE
|
 |
A Haskell Lover's Plea
« on: 2010-04-11 01:04:03 » |
|
A nice poem for functional programming lovers! 
Original Source: http://gernot-heiser.org/~chak/haskell-poem.html
A Haskell Lover's Plea
Why should I renounce for you, dear Haskell, My much yearned for side-effects? Why should I face the software dragons Without my weapon, my manly spear of destruction? They call you non-strict, oh so elegant and pure Ariel. Yet side-effect celibacy is surely severe.
Your flesh is too weak, you brutish beast. The tarpit demons of software hell await you! This sinful habit in which you indulge Does more harm than good. Restrain yourself! And you too will see The wondrous and refined joys of referential transparency!
Alas, I can do without goto, without call/cc. But sans side-effects, I am lost and forlorn, can't you see? Oh, lady fairer yet than admirable Miranda (tm), Scheme's prolix, parenthetical tedium Is no match for your elegant syntax. What's more, Your list comprehensions outshine even Prolog for sure...
Ah, flatter me not, you low-spirited Caliban! Do you not know what advantages await Those who renounce destructive update? Start with an immaculate high-level specification, Throw in some algebraic code transformation. Soon you will have a provably correct and maintainable implementation.
Show mercy on mere mortals like me! How I dream still of the efficient pleasures of pointer manipulation! How I too wish to mutate memory with thoughts born of von Neumann earthiness! Relent! Relent! Let me have my assignment, my printf, my gensym. Let me fulfill my destructive impulses. Let me set bang. Let me update. Let me assign. Let me mutate.
Fear not, lowly beast, I have heard your pleas. To satisfy your low-level desire I'll give you monads, linear types, MADTs, Even single-threaded polymorphic lambda calculi. My beauty may suffer, still I will aspire To let you do (within typeful limits) what you please.
Rejoice! Rejoice! I'm free! I'm free! The best of both worlds is mine at last. Oh, infinite progeny of Church, Hope, and ML, I curry favor not when I say: Scan me right, fold me left, Lazy lady of many shapes, you've got class.
This poem is from Don Smith (DonaldAlan@excite.com) and was distributed via the Haskell mailing list.
|
|
|
|
David Lucifer
Archon     
Posts: 2642 Reputation: 8.53 Rate David Lucifer

Enlighten me.
|
 |
Re:A Haskell Lover's Plea
« Reply #1 on: 2010-04-16 15:27:12 » |
|
Quite brilliant. Is Bohandez a functional programming lover?
|
|
|
|
Bohandez
Initiate  
Gender: 
Posts: 38 Reputation: 5.76 Rate Bohandez

REALITY CHECKS NEVER BOUNCE
|
 |
Re:A Haskell Lover's Plea
« Reply #2 on: 2010-04-23 06:39:11 » |
|
Well, kind of yes, but because I'm still a Haskell virgin Written just few lines and still studying the basics of functional programming.
My first impression was negative when I saw the syntax (and I immediately tossed it away), but after "giving it a try" and after finally figuring out what exactly "side effects" mean, I fell in love...
It's quite funny, because I tried to understand the idea behind the functional programming by reading an article in MSDN which was using F# for the examples, and I didn't liked F# so I turned my attention back to Haskell...
Now I'm trying to grok monads, but It's hard... My mind was poisoned by the imperative ... - Bhdz
|
|
|
|
|
Bohandez
Initiate  
Gender: 
Posts: 38 Reputation: 5.76 Rate Bohandez

REALITY CHECKS NEVER BOUNCE
|
 |
Re:A Haskell Lover's Plea
« Reply #4 on: 2010-04-25 12:40:14 » |
|
I wonder why they chose the word monad... Truly mystical  http://en.wikipedia.org/wiki/Monad_(Gnosticism)
EDIT: Damn it! I'm infected... I started reading further into the gnostics myths about their Monad (or the one true diety that emanates other stuff) and I lost quite a few hours studying the gospel of Thomas, wikipedia articles, differences of monads and dyads, the poor "evil" Demiurge that does not know about the Monad and the light, Sophia and her blunder to "copulate" with herself producing the flawed Demiurge, and so on...
Some of the stuff makes sense... As in "simulated reality" hypothesis...
For instance the Demiurge should be the lonely cast out super duper programmer hacker that uses his own memes to produce environment for his own "creations" trapping bits of "the light" ('0' & '1' that comes from the Monad) inside the environment (physical universe). The Monad itself should be the ineffable stuff that is intelligence, matter and energy...
And this religion totally solves the problem of Evil by saying "It's not your fault, it's the Creator's fault! 'cause he is trapped&shit..."
Pff... I'm dizzy and exhausted... I'm gonna watch some Daniel Dennett's "Darwin's dangerous idea" series to calm my freaking brain and sleep because I gotta work.... Damn...
|
|
|
|
Fritz
Adept     
Gender: 
Posts: 1746 Reputation: 7.93 Rate Fritz

|
 |
Re:A Haskell Lover's Plea
« Reply #5 on: 2010-04-25 17:33:27 » |
|
Cool a new idea inserted into my aging brain .... wasn't Fortran 77 on RSX-11 "functional" ? ... I know 'aging smart ass'.... enjoying the esoteric 'techno-memed' thoughts on CoV. Thx
Cheers
Fritz
Wiki on Liebniz
<snip> The monads
Leibniz's best known contribution to metaphysics is his theory of monads, as exposited in Monadologie. Monads are to the metaphysical realm what atoms are to the physical/phenomenal.[citation needed] They can also be compared to the corpuscles of the Mechanical Philosophy of René Descartes and others. Monads are the ultimate elements of the universe. The monads are "substantial forms of being" with the following properties: they are eternal, indecomposable, individual, subject to their own laws, un-interacting, and each reflecting the entire universe in a pre-established harmony (a historically important example of panpsychism). Monads are centers of force; substance is force, while space, matter, and motion are merely phenomenal.
The ontological essence of a monad is its irreducible simplicity. Unlike atoms, monads possess no material or spatial character. They also differ from atoms by their complete mutual independence, so that interactions among monads are only apparent. Instead, by virtue of the principle of pre-established harmony, each monad follows a preprogrammed set of "instructions" peculiar to itself, so that a monad "knows" what to do at each moment. (These "instructions" may be seen as analogs of the scientific laws governing subatomic particles.) By virtue of these intrinsic instructions, each monad is like a little mirror of the universe. Monads need not be "small"; e.g., each human being constitutes a monad, in which case free will is problematic. God, too, is a monad, and the existence of God can be inferred from the harmony prevailing among all other monads; God wills the pre-established harmony.
Monads are purported to having gotten rid of the problematic:
* Interaction between mind and matter arising in the system of Descartes; * Lack of individuation inherent to the system of Spinoza, which represents individual creatures as merely accidental.
The monadology was thought arbitrary, even eccentric, in Leibniz's day and since.<snip>
|
Where there is the necessary technical skill to move mountains, there is no need for the faith that moves mountains -anon-
|
|
|
|