Tomas Petricek's homepage

Work, projects and other

I've been Microsoft C# MVP since 2004 and I'm an active member of various technical communities. I'm author of numerous articles about C# and other .NET technologies. I'm functional programming and F# enthusiast and I've been using F# for projects of various size since early Microsoft Research version. For my recent work, check out my blog.

I think that F# and functional program­ming have a large potential for practical use. Together with Jon Skeet, I wrote a book Real-world Functional Prog­ram­ming, which explains basic functional concepts using C# 3.0 (teaching F# alongside) and which shows several appealing real-world uses of F# and functional techniques. See some nice reviews at Amazon [^], Manning book page [^] and my page about the book [^]. I can offer F# trainings and some short-term F# contracting at tomas@tomasp.net.

I'm partly involved in Phalanger, which is a PHP compiler for .NET and allows you to integrate PHP solutions with ASP.NET. If you're interested in Phalanger, contact us via Devsense [^], a company I cofounded.

Academia & research

I'm final year Masters student of Theoretical Computer Science at Faculty of Mathematics and Physics [^] of Charles University in Prague. During my studies, I visited Microsoft Research in Cambridge two times as an intern under the supervision of Don Syme [^].

I'm interested in programming models (that is, what is the best "language" for solving problems from some domain) and how to encode these models in program­ming languages. More specifically, I'm interested in techniques like meta-program­ming, embedded languages, monads and other abstract represen­tations of computa­tions. My most recent projects include:

  • Reactive programming. I'm exploring ways that make event-driven programming in F# easier and I'm also experimenting with small language extension for computation expressions.
  • Client/server web. My F# WebTools framework integrates the development of client-side and server-side of an application in a type-safe way using meta-programming and computation expressions.

More about my publications, teaching, etc. is at my academic page.

Photography

I like taking photos, but updating the online gallery frequently was always a bit of a problem. That's why this page has a calendar, which shows a new picture every month (and also forces me to find and upload a new picture regularly).


Calendar - July 2010

You can browse through calendars for years 2005, 2006, 2007, 2008, 2009 and the first photos of 2010.

Spotlight Topics

Most of the content on this page is related to one of the topics that I was recently interested in, so here you can find a page for every topic with some my articles, comments and other useful links:

Latest writings from my blog

The Duality of Object and Event references

Mathematical duality [2] is a very useful and elegant concept that gives us a nice way of speaking about objects or structures that behave in some way exactly conversely. There is no clear definition of what duality is. However, the idea is that when we have two structures that behave conversely and we know that something is true about the first one, then we get the opposite statement about the other structure "for free" (if you know how to translate from one structure to the other).

In this article, I'll talk about an interesting example of duality that (to my best knowledge) wasn't described by anyone before. The two dual structures are references between objects in a normal program and references between events in a reactive application. The statement that is going to become obvious thanks to the duality principle is describing which of the objects (or events) are garbage and can be safely collected by garbage collector.

This topic is in much more details discussed in a paper [4] I wrote with Don Syme and that I presented at the ISMM Workshop (see also my trip report from PLDI). In this article, I'll try to give an accessible description of the most interesting idea from the paper...

Read the complete article
Monday, July 19, 2010

More Recent Articles

  • Dynamic in F#: Reading data from SQL database (7/9/2010)

    In this article we look at working with SQL databases in F# using ADO.NET. We'll see how to use dynamic invoke operator to make the usual ADO.NET code remarkably elegant and simple...

  • PLDI 2010 Trip Report (7/5/2010)

    In June, I attended PLDI 2010, which is one of the big "programming language" conferences. I presented a paper based on some work that I did during my internship at MSR at one of the workshops and I also attended many interesting talks...

  • Recording and samples from my Reactive F# talk (6/27/2010)

    Almost a week ago, I posted an invitation to my F# talk at the F#unctional Londoners user group. The talk has been recorded, so you can view it online now and you can also get all the Silverlight demos...

  • Reactive Programming with F# in London (6/15/2010)

    I'll be visiting London on June 23 and I'll be talking at the F#unctional Londoners user group. The theme of the talk is Reactive Programming with F# and you can expect many interesting F# features including asynchronous workflows and event combinators.

  • ASP.NET and F# (I.) - Creating MVC web applications in F# (5/9/2010)

    This article shows how to use F# for developing ASP.NET web applications using the MVC framework. It also shows how to access data using LINQ in F# and how to simplify web programming using F# meta-programming, modules and records.

  • Programming user interfaces using F# workflows (2/18/2010)

    F# asynchronous workflows can be used to solve a wide range of programming problems. In this article we'll look how to use asynchronous workflows for elegantly expressing the control flow of interaction with the user. We'll also look at clear functional way for encoding drag and drop-like algorithm.