In Case You Haven’t Heard

It has been a while since I have posted.  We have been working hard to get Orcas beta 1 and beta 2 done.  So I apologize for the long interlude between posts but I hope that you are enjoying beta 1 and that you are looking forward to beta 2. Now that beta 1 is out there,…

93

Linq to ASCII Art

Last night I was searching for an audio version of Painters and Hackers by Paul Graham.  Pretty soon I had completely forgotten about the book and found myself reading the Wikipedia article about Hackers.  Isn’t Internet search great? Of all of the things in the article, the one thing that captured my attention was the…

44

The Marvels of Monads

If the word "continuation" causes eyes to glaze over, then the word "monad" induces mental paralysis.  Perhaps, this is why some have begun inventing more benign names for monads. These days, monads are the celebrities of programming language theory.  They gloss the cover of blogs and have been compared to everything from boxes of fruit…

36

Anonymous Recursion in C#

Recursion is beautiful and lambdas are the ultimate abstraction.  But how can they be used together?  Lambdas are anonymous functions and recursion requires names.  Let’s try to define a lambda that computes the nth fibonacci number. Func<int, int> fib = n => n > 1 ? fib(n – 1) + fib(n – 2) : n;…

34

Immutability, Purity, and Referential Transparency

How often do you write code that just works?  It seems to happen so rarely that I find myself suspicious if code does just work.  When was the last time that you wrote a non-trivial program that had no compile errors on the first try and then ran fine as well?  If it happened recently then congratulations.  If…

32

A Brief Introduction to the Reactive Extensions for .NET, Rx

Wow, it has been a long time since I have blogged.  Yesterday, we made the first official public release of Rx on devlabs.  And that means that I can now talk about what has been on my mind for the past while: Rx.  What is Rx?  Rx is short for the Reactive Extensions for .NET. …

28

Extending the World

When people think of C# 3.0 and Linq, they commonly think of queries and databases.  The phenomenal work of the Linq to SQL guys provides ample reason to think of it this way; nevertheless, C# 3.0 and Linq are really much much more.  I have discussed a number of things that can be done with lambdas,…

26

Volta: Redefining Web Development

Anyone who writes web applications knows that web development is not easy.  Developers wrangle with a soup of technologies distributed across multiple tiers.  We live in a world where programmers accept the fact that they need to know four or five different languages, tools, and environments just to get a site up and running.  In…

26

The Virtues of Laziness

It seems that I riled some people up with my blog post yesterday.  After some thought, I think the primary reason that there was some backlash is because some people feel that I violated one of the sacred principles of FP:  lists are *the* data structure.  Well, let me set the matter straight.  I love…

22

Function Memoization

One of my favorite pastimes is playing games.  No not XBox 360, PS3, or Wii games nor other computer games, but board games, card games, and other such games.  It’s probably because I’m from a large family – I have 8 siblings – and we would often spend time together playing games.  It is a…

20