The too brief joy of understanding
Being a very curious monkey the joy of understanding new concepts, solving puzzles, grokking complex systems and discovering new ideas is quite powerful in my little cortex.
What is special about those moment is there semelfacticity, they are not reproducible, what seemed complex, mysterious and even a bit magic is now understood. And after the coital moment the object of inquiry become simple and, with time, too often trivial.
It can keep a certain elegance but it lost is power of mystery and therefore can not reproduce the initial intoxication produced by the reward system of the brain.
Mathematics is a rich source of such moment because the objects tend to be extremely complex and the understanding is, by lack of other term, pure. But then their complexity almost completely collapses. A good example is the beautiful connection made by Galois theory.
The semelfacticity is by definition impossible to defeat. If my understanding was flawed the correct insight is spoiled by doubt. And when revisiting previous problems even if the memory of them had faded the spark is never as bright.
I am going to tell you about one of those spark, it is a little one that can be easely shared (assuming some non trivial background).
Pierre and I decided that this year our language of choice for ICFP will be Haskell (I wanted to play with the new version 4.0 of PLT Scheme but someone is still afraid of parenthesis ...) .
I am already quite familiar with Haskell since I implemented a Scheme to PowerPC assembly compiler using it.
And I have a decent grasp of monad both in theory and practice. I am quite excited by the next stage in learning : explaining them to someone else, aka when I suddenly realize that my mental model is very hazy and imperfect (euphemism for faulty).
Before learning Haskell I was extensively using OCaml, therefore I was familiar with the ideas behind the Hindley-Milner family of typed functional language. I also knew about laziness but I did not knew what is was good for and this was one of the main reason behind my motivation to learn Haskell.
So faced with the always difficult quest to find good learning material adapted to my background (this was before the monad tutorial explosion) I ended up reading "A Gentle Introduction to Haskell". I was mostly speed reading it until this line :
With the following picture :

Defining the Fibonacci function is a staple of functional languages and this example is a good expression of laziness. I remember suddenly backtracking a few lines and spending minutes unfolding the function in my head before the haha moment.
To refresh my memory of Haskell I still first fast forward through "A Gentle Introduction to Haskell" but now this line only make me smile as I remember the first time I saw it, the spark is gone ...
What is special about those moment is there semelfacticity, they are not reproducible, what seemed complex, mysterious and even a bit magic is now understood. And after the coital moment the object of inquiry become simple and, with time, too often trivial.
It can keep a certain elegance but it lost is power of mystery and therefore can not reproduce the initial intoxication produced by the reward system of the brain.
Mathematics is a rich source of such moment because the objects tend to be extremely complex and the understanding is, by lack of other term, pure. But then their complexity almost completely collapses. A good example is the beautiful connection made by Galois theory.
The semelfacticity is by definition impossible to defeat. If my understanding was flawed the correct insight is spoiled by doubt. And when revisiting previous problems even if the memory of them had faded the spark is never as bright.
I am going to tell you about one of those spark, it is a little one that can be easely shared (assuming some non trivial background).
Pierre and I decided that this year our language of choice for ICFP will be Haskell (I wanted to play with the new version 4.0 of PLT Scheme but someone is still afraid of parenthesis ...) .
I am already quite familiar with Haskell since I implemented a Scheme to PowerPC assembly compiler using it.
And I have a decent grasp of monad both in theory and practice. I am quite excited by the next stage in learning : explaining them to someone else, aka when I suddenly realize that my mental model is very hazy and imperfect (euphemism for faulty).
Before learning Haskell I was extensively using OCaml, therefore I was familiar with the ideas behind the Hindley-Milner family of typed functional language. I also knew about laziness but I did not knew what is was good for and this was one of the main reason behind my motivation to learn Haskell.
So faced with the always difficult quest to find good learning material adapted to my background (this was before the monad tutorial explosion) I ended up reading "A Gentle Introduction to Haskell". I was mostly speed reading it until this line :
fib = 1 : 1 : [ a+b | (a,b) <- zip fib (tail fib) ]With the following picture :

Defining the Fibonacci function is a staple of functional languages and this example is a good expression of laziness. I remember suddenly backtracking a few lines and spending minutes unfolding the function in my head before the haha moment.
To refresh my memory of Haskell I still first fast forward through "A Gentle Introduction to Haskell" but now this line only make me smile as I remember the first time I saw it, the spark is gone ...
