Difference between revisions of "Koans"

From HaskellWiki
Jump to navigation Jump to search
(+some more)
(fix link to koans)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
==#haskell==
See [[Haikus]] for similar humor.
 
  +
<blockquote><gwern> 'Once, a programmer came to sclv, saying I wish to learn the ways of Haskell.<br>
  +
How long would it take me, assiduously studying [[RWH]]?'<br>
  +
<gwern> 'sclv replied sagely, surely you could learn in 3 months.<br>
  +
The programmer replied, three months is too long!<br>
 
What if I carefully recollect everything I know of my Java experience and study my computer science?'<br>
  +
<gwern> 'sclv thought, and told him, in that case, it will be no less than 4 months.<br>
  +
The programmer despaired, and said, no!<br>
  +
What if I study Knuth ferociously, and every minute of the day hack on C and Java and rewrite my programs in haskell?<br>
  +
Surely I will learn Haskell much quicker than 4 months!'<br>
  +
<gwern> 'sclv said, alas, in that case you will never learn Haskell.<br>
 
If you wish to learn Haskell, empty your mind of all knowledge, and then you will be enlightened within the month.'</blockquote>
   
 
<blockquote><sclv> A student asks master wadler, what is the nature of a recursive type? Wadler replies: Mu.</blockquote> <!-- http://www.cse.unsw.edu.au/~dons/irc/haskell/08.05.22 -->
https://secure.wikimedia.org/wikipedia/en/wiki/Hacker_koan#Master_Foo
 
http://www.reddit.com/r/programming/comments/6tytl/functional_programming_koans/
 
http://www.reddit.com/r/programming/comments/6twbn/the_koan_of_lazy_evaluation/
 
http://web.archive.org/web/20041012103936/http%3a//www.bagley.org/~doug/ocaml/Notes/okoans.shtml
 
http://www.reddit.com/r/programming/comments/6tytl/functional_programming_koans/c04uzsl
 
   
0:22:20 <gwern> 'Once, a programmer came to sclv, saying I wish to learn the ways of Haskell. How long would it take me, assiduously studying RWH?'
+
<blockquote>"gwern> a young novice spoke to #haskell, asking to be taught about the ways of the Maybe monad.<br>
  +
'What have you brought me to see?' asked the #haskeller.<br>
20:23:01 <gwern> 'sclv replied sagely, surely you could learn in 3 months. The programmer replied, three months is too long! What if I carefully recollect everything I know of my Java experience and study my computer science?'
 
  +
'Nothing', replied the noob.<br>
20:24:14 <gwern> 'sclv thought, and told him, in that case, it will be no less than 4 months! The programmer despaired, and said, no! What if I study Knuth ferociously, and every minute of the day hack on C and Java and try to reimplement my programs in haskell? Surely I will learn Haskell much quicker than 4 months!'
 
 
'Then take it away!'"[http://www.reddit.com/r/programming/comments/6tytl/functional_programming_koans/c04uzsl]</blockquote>
20:24:29 <mxc> @hoogle stopwatch
 
20:24:29 <lambdabot> No matches found
 
20:24:32 --- quit: erg0t (Read error: 110 (Connection timed out))
 
20:24:42 <dolio> I think this is going on too long.
 
20:24:49 <gwern> 'sclv said, alas, in that case you will never learn Haskell. If you wish to learn Haskell, empty your mind of all knowledge, and then you will be enlightened within the month'
 
   
  +
<blockquote> -- undo -- The master Cale sometimes included do block examples while teaching new initiates. A very young student began to imitate him, and every time Cale typed 'do', this boy would type an example in imperative style. Everybody laughed.<br><br>
20:27:37 <sclv> A student asks mater wadler, what is the nature of a recursive type? Wadler replies: Mu.
 
  +
One day Cale smiled and remained silent, listening to the laughter. The master leaned over and typed a private message to roshi lambdabot. The next time the boy typed to the roshi... she SHOUTED BACK HER REPLY. The boy began howling, and threatened to leave the temple. "Stop!" shouted Cale, and nodded to the roshi. The boy stopped, and looked at the master through his tears.<br><br>
http://www.cse.unsw.edu.au/~dons/irc/haskell/08.05.22
 
  +
Cale typed 'do'. The boy pasted his usual do block enumerating paired martial artists' names. Then suddenly he realized it wasn't there, for lambdabot had applied (?pl . ?undo) to the paste. The boy hesitated a moment:<br><br>
  +
Then he bowed.<code> -- from a story about the master Gutei, adapted by sereven</code></blockquote>
   
  +
==Unattributed==
A good programmer can write FORTRAN in any language; a truly great one could write Haskell.
+
<blockquote>"A good programmer can write FORTRAN in any language; a great one could write Haskell."</blockquote>
   
  +
==See also==
<!-- [[Category:Humor]] -->
 
  +
*[[Haskell haikus]]
  +
  +
==External links==
 
*[http://www.reddit.com/r/programming/comments/6tytl/functional_programming_koans/c04v5pc x=x+1 koan]
 
*[https://secure.wikimedia.org/wikipedia/en/wiki/Hacker_koan AI Lab koans]
  +
** [https://secure.wikimedia.org/wikipedia/en/wiki/Hacker_koan#Master_Foo Imperative koan]
  +
* [http://www.reddit.com/r/programming/comments/6twbn/the_koan_of_lazy_evaluation/c04v086 The lazy deadlock koan]
 
* [http://www.reddit.com/r/programming/comments/6twbn/the_koan_of_lazy_evaluation/c04v774 Lazy enlightenment]
  +
*[http://web.archive.org/web/20041012103936/http://www.bagley.org/~doug/ocaml/Notes/okoans.shtml "Functional Programming Koans, in OCaml"] -(and [http://web.archive.org/web/20040604082616/www.bagley.org/~doug/ocaml/Notes/okoans_answered.shtml answers])
  +
* [http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg03277.html Rich men have objects & closures]
  +
 
[[Category:Humor]]

Latest revision as of 16:58, 19 May 2012

#haskell

<gwern> 'Once, a programmer came to sclv, saying I wish to learn the ways of Haskell.

How long would it take me, assiduously studying RWH?'
<gwern> 'sclv replied sagely, surely you could learn in 3 months.
The programmer replied, three months is too long!
What if I carefully recollect everything I know of my Java experience and study my computer science?'
<gwern> 'sclv thought, and told him, in that case, it will be no less than 4 months.
The programmer despaired, and said, no!
What if I study Knuth ferociously, and every minute of the day hack on C and Java and rewrite my programs in haskell?
Surely I will learn Haskell much quicker than 4 months!'
<gwern> 'sclv said, alas, in that case you will never learn Haskell.

If you wish to learn Haskell, empty your mind of all knowledge, and then you will be enlightened within the month.'

<sclv> A student asks master wadler, what is the nature of a recursive type? Wadler replies: Mu.

"gwern> a young novice spoke to #haskell, asking to be taught about the ways of the Maybe monad.

'What have you brought me to see?' asked the #haskeller.
'Nothing', replied the noob.

'Then take it away!'"[1]

-- undo -- The master Cale sometimes included do block examples while teaching new initiates. A very young student began to imitate him, and every time Cale typed 'do', this boy would type an example in imperative style. Everybody laughed.

One day Cale smiled and remained silent, listening to the laughter. The master leaned over and typed a private message to roshi lambdabot. The next time the boy typed to the roshi... she SHOUTED BACK HER REPLY. The boy began howling, and threatened to leave the temple. "Stop!" shouted Cale, and nodded to the roshi. The boy stopped, and looked at the master through his tears.

Cale typed 'do'. The boy pasted his usual do block enumerating paired martial artists' names. Then suddenly he realized it wasn't there, for lambdabot had applied (?pl . ?undo) to the paste. The boy hesitated a moment:

Then he bowed. -- from a story about the master Gutei, adapted by sereven

Unattributed

"A good programmer can write FORTRAN in any language; a great one could write Haskell."

See also

External links