I was always afraid of Haskell Monads. But… I like Haskell, which means, Monads are inevitable. Well, so let me have a taste.

Let’s say, the code is:

1
((++) =<<) (const "hello") "world"

What’s that? Let’s get the clue from type.

Recently I was reading a book on programming languages design and came across something interesting related to Y combinator.

The Question: how to write recursion in lambda function without side effects and built-in recursion support?

First, let’s talk about Russell Paradox: Assume P is the set of all the set that does not contain itself. Does P belongs to P?

Under classical set theory, this is a paradox. The type system for dynamic language more or less resemble such set theory. Let’s say, F is a characteristic function of a set. F(x) = true if x is in the set and F(x) = false otherwise. Under such representation, {1, 2, 3} can be represented as F(x) = (x==1 OR x==2 OR x==3).

I tried to play Flappy Bird, but it was hard. I tried multiple times, only got best score of 7.

Flappy Bird

Flappy Bird looks nothing innovative as compared to other ones like JetPack. But why is it so hard?