Tomas Petricek's blog

Writing about practical F# coding and programming language research

Composing Christmas with F#

This blog post is a part of the awesome F# Advent Calendar (see the previous entry about writing algorithms in F# from Rick Minerich), so it inevitably needs a Christmassy theme. However, there is also going to be a serious theme for the blog post, which is domain-specific languages.

One of my favorite examples of Domain-Specific Languages is a simple OpenGL library that I wrote some time ago for composing 3D graphics in F#. You can see it in my NDC 2014 talk Domain Specific Languages, the functional way and I also used it for Solving Puzzles with F# earlier on this blog.

The nice thing about the library is that it is very simple, but is rich enough to demonstrate all the important concepts. In fact, the library is so easy to use that even 8 years old can do a talk about it. So, if you're spending Christmas with your family, perhaps you can go through this article with your children!

Published: Monday, 8 December 2014, 5:22 PM
Tags: f#, fun, functional programming
Read the complete article

Recent articles from my blog

New features and improvements in Deedle v1.0

Tuesday, 27 May 2014, 3:41 PM

As Howard Mansell already announced we have officially released the '1.0' version of Deedle. In this blog post, I'll have a quick look at a couple of new features in Deedle. Howard's announcement has a more detailed list, but I just want to give a couple of examples and briefly comment on performance improvemens we did.

Welcome fsharpWorks & F# events

Tuesday, 20 May 2014, 1:47 PM

If you are following me or the #fsharp hashtag on Twitter,you might have already come across a link to fsharpWorks or one of theupcoming F# events organized by fsharpWorks. So, what is fsharpWorks and what are we planningfor you?

Stateful computations in F# with update monads

Tuesday, 13 May 2014, 3:41 PM

Most discussions about monads, even in F#, start by looking at the well-known monads for handling state (reader, writer and state). In a recent paper, Danel Ahman and Tarmo Uustalu revisit these and build a nicer abstraction called update monads. I implemented the idea in F# and I find that update monads are an excellent fit for F# computation expressions!

What can programming language research learn from the philosophy of science?

Thursday, 10 April 2014, 5:16 PM

This article looks at programming language research from the perspective of philosophy of science. We look at classic theories such as Popper's falsificationism and Feyerabend's theoretical anarchism and then look what can programming language research learn from the history.

Find older blog articles here

Welcome!

I'm a computer scientist who enjoys combining theory and practice. On the theory side, I'm finishing PhD at the University of Cambridge, working on type systems. On the practical side, I write about F#, run trainings and provide occasional consulting.

Trainings, writing & consulting

I'm a frequent speaker at F# and .NET events, founding member of the F# Foundation author of C# and F# book, numerous articles and a StackOverflow addict. I have been Microsoft C# MVP since 2004 and I used F# since early Microsoft Research versions.

Have you seen the F# testimonials and are you thinking about learning and using F# of functional techniques?

Research & teaching

I'm interested in a wide range of topics in programming languages, ranging from category theory, comonads, reactive and distributed programming to scientific computing and working with data.

I like working on topics inspired by practical problems. I created a web framework for F# that inspired commercial projects like WebSharper and my experimental F# extensions can be tested live on tryjoinads.org.

When the time permits, I enjoy traveling. The calendar shows a new picture each month since 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. See the first photos of 2014.