Taking LINQ to Objects to Extremes: A fully LINQified RayTracer

Not too long ago I blogged about a C# raytracer which took advantage of a lot of C#3.0 language constructs.  However, you may have noticed that it did not actually use LINQ query expressions all that much.  Well, after discussing this with a coworker on the PLINQ team at lunch one day – I was convinced that…

51

Monadic Parser Combinators using C# 3.0

Parser combinators are an idea that I enjoy every time I go back and look at again.  They are an approach to building parsers by composing very simple atomic parsers into bigger and bigger units which can ultimately express real world grammars.  This idea has been particularly popular in functional languages where the parsers can naturally…

19

C# 3.0 and CodeDOM

The CodeDOM is a very handy .NET API which allows you to programatically compile code using the .NET compilers and programatically construct code without just pasting together strings.  With the new version of the language, we’ve heard a numer of questions about how to use the CodeDOM with the new compiler. There are two aspects…

12

C#3.0 Session at TechEd2007 – Code Samples

I just presented my C#3.0 session at TechEd Orlando titled “DEV346 – Microsoft Visual C# Under the Covers: An In-Depth Look at C# 3.0”.  The talk introduces the new C# language features and takes a tour behind the scenes of LINQ to Objects to see how C# is used to enable creating rich new kinds…

1

A Ray Tracer in C#3.0

Ray tracers are a lot of fun.  When I was in middle school, I discovered POV-Ray and was so excited about the cool graphics it could create that I would often leave my 286 on overnight rendering ray-traced scenes and movies.  When I was in high school, I discovered Computer Graphics: Principles and Practice and spent weeks…

33

Using LINQ to solve puzzles

A couple months ago, I had a great time participating in Microsoft’s PuzzleHunt event along with our team “Cup<T>”.  Normally, the puzzles in puzzle hunt are designed to limit the value of writing programs to help solve them.  But this year, I did end up writing some code to help with one of the puzzles…

15