TP

F# quotations visualizer

I already explained what F# quotations are and I explained how you can do some simple manipulations with it. In this article I'd like to present an application that I wrote and that can be helpful when working with quotations. It displays clear graphical representation of given F# quotation (using Windows Forms TreeView control).

Quotation Visualizer

Published: Wednesday, 21 June 2006, 2:20 AM
Tags: meta-programming, f#
Read the complete article

Calling functions in LINQ queries

The LINQ Project [^] is an extension to .NET Framework and most important .NET languages (C# and VB.Net) that extends these languages with query operators and some language features that make it possible to integrate queries in the languages. Thanks to LINQ you can write queries that read data from database (or any other data source). For example, imagine that you want to write set of queries for eshop and you need to perform a price calculation in more queries. The problem with LINQ queries is that you can't simply call a function written in C# that calculates price. The following example is NOT WORKING for this reason:

// function used in filter
static decimal CalcPrice(Nwind.Product p) { return p.UnitPrice * 1.19m; }
// query that uses MyFunc
var q = from p in db.Products where CalcPrice(p) > 30m select p

I think that this is a big limitation, because when you want to keep some more complex logic in the data access layer you should be able to reuse parts of queries that are similar across more queries. The good thing is that with latest release, LINQ became extensible so it is possible to write a extensions that allow this scenario...

Published: Saturday, 10 June 2006, 2:26 PM
Tags: c#
Read the complete article

Slides and demos from F# presentation

This semester I attended Advanced .NET Seminar that was led by Tomas Matousek [^] who is one of the authors of Phalanger project [^] (Which is an amazing project by the way. It takes PHP source code and compiles it without any modification to .NET). Seminar was mostly focused on Rotor and .NET internals, so if you want to learn more about these topics you can look at Advanced .NET programming [^] slides (by Tomas Matousek).

I did one presentation at this seminar too. It was about the F# language developed at Microsoft Research. It was just a quick overview of F# features, because F# is very rich topic, so it coveres only the language (functional vs. imperative behavior), F# type system, compilation of F# constructs to .NET and interoperability with .NET (for example how to create windows forms application in F#). At the end, I also mentioned F# meta-programming that allows you to look at F# code as data.

Published: Friday, 9 June 2006, 9:14 PM
Tags: presentations, academic, universe, f#
Read the complete article

All blog posts by tag

f# (112), functional (66), research (49), c# (37), academic (27), asynchronous (27), parallel (23), programming languages (22), functional programming (20), universe (20), meta-programming (18), philosophy (16), links (15), presentations (14), data science (12), writing (12), joinads (12), web (11), thegamma (11), talks (9), data journalism (9), math and numerics (9), random thoughts (9), phalanger (8), haskell (7), mono (7), webcast (7), design (6), architecture (5), fslab (5), open source (5), visualization (4), fun (4), accelerator (4), type providers (3), linq (3), f# data (3), .net (3), training (2), coeffects (2), deedle (2), monads (2), art (2), fractals (2), funscript (2), new york (2), manning (2), books (2)