
f#
Get flash to fully experience Pearltrees
An F# Ant Colony Simulation in Silverlight 4.0 with Dynamic ...
I’ve been enviously watching Phillip Trelford publish excellent F# games all week and tonight I just couldn’t stand it anymore. I stayed in, rolled up my sleeves and ported the very same ant colony simulation I used in my CUFP workshop to Silverlight 4.0. Wow, just look at those little guys go at it. Silverlight sure is pretty! As you might have noticed by the big white “Click To Load Custom AI” message, you can also compile your own AI and battle it out with what I’ve included here. To make things easy I’ve provided a ready to go solution .Many people expect the performance of F# to be comparable to the performance of C# "because they both compile to the same intermediate language (CIL)". Although the VM obviously places the same ceiling on the performance of both F# and C# there are some features that affect performance differently between the two language implementations. Firstly, C# and F# don't actually compile down to the same CIL because only F# generates tail calls.
Performance-related features in F# and C#
Lorenz attractor
Last time, we provided the components to actually make the SEO helpers into a real application . This time, we make the application more friendly. In particular : default files and directories are created if they don’t exist yet. Then, instead of being forced to use a command window, this time, double clicking will suffice. This will also allow us to see how to use events and Winforms (yup, no WPF !), and how to use functions to make form building a tad quicker.
SEO Analysis in F#, a friendly application
Generically Constraining F#
F#: Pipelined Monads
I was actually quite pleased that I got my state/error monad working ( F#: Pipelined Monads ), but there was a far more elegant solution staring me in the face. Thanks to other members of the F# community, I have reverted my code back to how it was and added two operators. In doing so the code is now far more elegant.Units of Measure in F#: Part One
I've stumbled over here into F# land because I started working on a program that needs to process and analyze GPS data contained in GPX files, and it became painfully obvious very quickly that a programming framework that would handle units in a natural way was practically a must, and it ALSO became painfully obvious very quickly that the OO inheritance mechanisms in the common procedural languages (C++, C#, Java, VB etc) all present major roadblocks to implementing a "units of measurement" framework. I cannot even begin to describe how exciting it is to discover that this is a core feature of F#. But going beyond that particular domain, I would propose that the idea that units are not a "near must" almost everywhere else, is actually an illusion born more of ignorance than anything.(Read this blog entry at a pace which is appropriate for you . Some readers will find this mostly old-hat, whereas others will find it rough going at parts. I encourage you to take a break and try out the code examples, if that helps you out.) I would like to discuss catamorphisms. A catamorphism is a generalization of a fold on lists to an arbitrary data type.

