CSharpFeeds - All your C# feeds in one place.

Sponsors

Feed: Yet Another Language Geek

Site: http://blogs.msdn.com/b/wesdyer/ Link: http://blogs.msdn.com/wesdyer/rss.xml

Friday, January 11, 2008

The Marvels of Monads

by wesdyer via Yet Another Language Geek on 1/11/2008 3:06:13 AM

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 to love affairs.  Nerds everywhere are exclaiming that the experience of understanding monads causes a pleasantly painful men ...

[ read more ]

Thursday, May 31, 2007

More on Partial Methods

by wesdyer via Yet Another Language Geek on 5/31/2007 8:34:45 AM

Thank you everyone for the feedback.  If you have any more to say then please do express your opinion (and yes it is valued ;).  I think there has been a bit of misunderstanding about what partial methods really are.  So let's set the matter straight.  Here is the current spec (quoting from here on out): Partial methods are a new feature complementing partial classes with the option of declaring “hook” – or compile time events – in the code. Here is an example partial clas ...

[ read more ]

Wednesday, May 23, 2007

In Case You Haven't Heard

by wesdyer via Yet Another Language Geek on 5/23/2007 9:19:06 PM

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, what do you all think of it?  Beta 1 has most of the features that we intend to put into Orcas but not all of them.  Some notable differences you will see in later releases are improved performance, ...

[ read more ]

Friday, March 23, 2007

All About Iterators

by wesdyer via Yet Another Language Geek on 3/23/2007 11:26:00 AM

Design patterns have been all of the rage for a number of years now.  We have design patterns for concurrency, user interfaces, data access, object creation, and so many other things.  The seminal work on the topic is the Gang of Four's book, Design Patterns.  When used appropriately they are a fantastic way to codify the wisdom gleaned from the battles we have fought building software systems. One of the criticisms leveled at design patterns is that they are simply formalisms to ...

[ read more ]

Tuesday, March 20, 2007

Performance Engineering

by wesdyer via Yet Another Language Geek on 3/20/2007 12:52:56 PM

Recently, many people have asked me about the performance of Linq.  The questions have ranged from the broad, "How can I analyze the performance of code using Linq?", to the very specific, "Why is the performance of this code sample not what I expected?" I want to address these questions.  So before I dive into some of them individually, I want to set up a framework for discussions about performance.  The framework consists of ideas that are well known and understood and yet ...

[ read more ]

Friday, March 09, 2007

Extending the World

by wesdyer via Yet Another Language Geek on 3/9/2007 2:06:29 PM

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, expression trees, and queries and will continue to do so but I want to pause and discuss a little gem that is often overlooked in C# 3.0.  This new language feature has funda ...

[ read more ]

Thursday, March 01, 2007

Immutability, Purity, and Referential Transparency

by wesdyer via Yet Another Language Geek on 3/1/2007 10:44:12 AM

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 it hasn't then join the club.  Admittedly, most programmers don't just write a whole program and then submit it to a compiler and a test ...

[ read more ]

Friday, February 23, 2007

Linq to ASCII Art

by wesdyer via Yet Another Language Geek on 2/23/2007 9:02:00 AM

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 ASCII picture of Adrian Lamo.  I immediately thought, "How cool is that!?"  So instead of popping off my current stack frame and returning to searching fo ...

[ read more ]

Wednesday, February 14, 2007

The Virtues of Laziness

by wesdyer via Yet Another Language Geek on 2/14/2007 12:11:57 AM

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 lists.  Especially the singlely linked immutable kind that are found in many functional languages.  Furthermore, Microsoft is not trying to launch some massive marketi ...

[ read more ]

Monday, February 12, 2007

Why all the love for lists?

by wesdyer via Yet Another Language Geek on 2/12/2007 10:41:00 PM

One of the things that I have noticed when participating in interviews with potential candidates is that most candidates have a favorite data structure.  Presumably this is the data structure that they feel the most comfortable with.  The problem is that no matter what coding question I ask them, they see the answer through the lenses of their favorite data structure.  I have met programmers who are in love with hash tables, others who have a certain fondness for B- ...

[ read more ]

Sunday, February 11, 2007

Baby Names, Nameless Keys, and Mumbling

by wesdyer via Yet Another Language Geek on 2/11/2007 9:49:34 AM

Baby Names I recently finished reading Freakonomics.  It is a fascinating book about a number of strange phenomena.  Its topics range from the economics of dealing crack to cheating in sumo wrestling.  Among the sundry topics is a discussion concerning the psychology and sociology underlying babies names. This topic has interested me ever since I found out that my wife and I gave our first two children some of the most popular names for their birth year.  We di ...

[ read more ]

Monday, February 05, 2007

Memoization and Anonymous Recursion

by wesdyer via Yet Another Language Geek on 2/5/2007 9:12:19 PM

Keith Farmer brought it to my attention that there is at least a little confusion about how closures work.  Hopefully, I can help shed a little light on the subject.  The question is why doesn't the following code actually memoize fib in the call to Test? Func<int, int> fib = null;fib = n => n > 1 ? fib(n - 1) + fib(n - 2) : n;Test(fib.Memoize()); Before I explain why this code doesn't work, I want to return to the example that I used in my last post. Func<int, in ...

[ read more ]

Memoization and Anonymous Recursion

by wesdyer via Yet Another Language Geek on 2/5/2007 6:12:19 PM

Keith Farmer brought it to my attention that there is at least a little confusion about how closures work.  Hopefully, I can help shed a little light on the subject.  The question is why doesn't the following code actually memoize fib in the call to Test? Func<int, int> fib = null;fib = n => n > 1 ? fib(n - 1) + fib(n - 2) : n;Test(fib.Memoize()); Before I explain why this code doesn't work, I want to return to the example that I used in my last post. Func<int, in ...

[ read more ]

Friday, February 02, 2007

Anonymous Recursion in C#

by wesdyer via Yet Another Language Geek on 2/2/2007 10:17:00 PM

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; But this doesn't work.  The compiler will complain about the use of fib in the lambda. Use of unassigned local variable 'fib' Eric Lippert has a great blog post on ...

[ read more ]

Anonymous Recursion in C#

by wesdyer via Yet Another Language Geek on 2/2/2007 7:17:00 PM

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; But this doesn't work.  The compiler will complain about the use of fib in the lambda. Use of unassigned local variable 'fib' Eric Lippert has a great blog post on ...

[ read more ]

Monday, January 29, 2007

Currying and Partial Function Application

by wesdyer via Yet Another Language Geek on 1/29/2007 11:36:53 PM

When I first heard the term Currying, I thought immediately of tasty Thai and Indian food.  To my dismay, I found that the conversation was not about wonderful spices but rather about transforming a function that takes n arguments into a function that takes only one argument and returns a curried function of n - 1 arguments.  Why in the world would that be useful? From a theoretical standpoint, it is interesting because it simplifies the lambda calculus to include only those functions ...

[ read more ]

Currying and Partial Function Application

by wesdyer via Yet Another Language Geek on 1/29/2007 8:36:53 PM

When I first heard the term Currying, I thought immediately of tasty Thai and Indian food.  To my dismay, I found that the conversation was not about wonderful spices but rather about transforming a function that takes n arguments into a function that takes only one argument and returns a curried function of n - 1 arguments.  Why in the world would that be useful? From a theoretical standpoint, it is interesting because it simplifies the lambda calculus to include only those functions ...

[ read more ]

Friday, January 26, 2007

Function Memoization

by wesdyer via Yet Another Language Geek on 1/26/2007 4:44:00 AM

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 good way to accommodate a wide variety of interests, skills, and aptitudes.  Some of my favorite games are Settlers of Catan, Carcassonne, Spades, Rook, Mafia, Take Two, Stratego, Tick ...

[ read more ]

Function Memoization

by wesdyer via Yet Another Language Geek on 1/26/2007 1:44:00 AM

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 good way to accommodate a wide variety of interests, skills, and aptitudes.  Some of my favorite games are Settlers of Catan, Carcassonne, Spades, Rook, Mafia, Take Two, Stratego, Tick ...

[ read more ]

Thursday, January 25, 2007

Video on Linq Queries and Delayed Evaluation

by wesdyer via Yet Another Language Geek on 1/25/2007 7:32:00 PM

I recently recorded a video with Charlie Calvert about Linq queries and delayed evaluation.  You can find it here (streaming video).  Download it here. ...

[ read more ]

Thursday, January 18, 2007

Why Functional Programming is Important in a Mixed Environment

by wesdyer via Yet Another Language Geek on 1/18/2007 1:37:00 PM

While my last post addressed how to go about learning to think functionally, it did not address why a programmer should embark on the journey in the first place.  Why is learning to think functionally important, especially in a mixed environment like C#, Python, or Ruby?  Why is it not good enough to stick with the tried and true object-oriented and structured programming styles? Learning to program functionally will lead to more modular, expression-oriented, and&nb ...

[ read more ]

Why Functional Programming is Important in a Mixed Environment

by wesdyer via Yet Another Language Geek on 1/18/2007 10:37:00 AM

While my last post addressed how to go about learning to think functionally, it did not address why a programmer should embark on the journey in the first place.  Why is learning to think functionally important, especially in a mixed environment like C#, Python, or Ruby?  Why is it not good enough to stick with the tried and true object-oriented and structured programming styles? Learning to program functionally will lead to more modular, expression-oriented, and&nb ...

[ read more ]

Monday, January 15, 2007

Thinking Functionally

by wesdyer via Yet Another Language Geek on 1/15/2007 9:45:00 PM

Every programmer has a story about how he got his start.  My own journey began at age 14 when I was bored to death while completing a second-year algebra assignment.  My father who was working on the couch with a brand new laptop showed me that I could write a program to do the work for me.  I instantly fell in love with the idea and have been rediscovering that love ever since. I first began programming in BASIC.  It didn't take long to learn BASIC.  Within a ...

[ read more ]

Monday, January 08, 2007

Another Model for Query Interpretation

by wesdyer via Yet Another Language Geek on 1/8/2007 10:59:00 PM

An imperative model for interpreting Linq to Objects queries has already been discussed, but are there any other models or method for interpreting queries?  It turns out that there are other models.  Linq to SQL queries operate in a completely different manner.  In the discussion about Linq to Object queries, it was pointed out that these two queries are fundamentally different even though they produce the same results. var q1 = from x in foo        ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us