Functional Programming

F# – PDF fun with Markdown and FSharp.Formatting

I spent the last cou­ple of nights putting togeth­er a sim­ple Mark­down to PDF for­mat­ter using Tomas Pet­ricek’s FSharp.Formatting project and the Pdf­Sharp-MigraDoc library. To use this library, you can either grab the source from the GitHub repos­i­to­ry or get it from Nuget using the fol­low­ing com­mand: F# Usage To use the library from F#, …

F# – PDF fun with Mark­down and FSharp.FormattingRead More »

Sorting Algorithms in F#

After a long East­er hol­i­day filled with late night cod­ing ses­sions I find myself wide awake at 2am… good job I’ve still got my plu­ral­sight sub­scrip­tion and a quick look at the Algo­rithms and Data Struc­tures course again at least gave me some­thing to do to relax the mind with some back-to-school style imple­men­ta­tion of …

Sort­ing Algo­rithms in F#Read More »

F# – helper functions to convert between Async<unit> and Task

With the offi­cial release of .Net 4.5 and Visu­al Stu­dio 2012, I sus­pect many .Net devel­op­ers will be rush­ing to rewrite their data access or net­work lay­ers (amongst many many oth­er things!) to take advan­tage of the new async-await (see the excel­lent 101 exam­ples here) lan­guage fea­ture in C#, which means you’ll like­ly be work­ing …

F# – helper func­tions to con­vert between Async<unit> and TaskRead More »

F# – Starting an Agent with supervision

In Erlang, we have the Super­vi­sor behav­iour which makes it very easy to pro­vide the means to mon­i­tor and restart a whole net­work of work­ers and oth­er super­vi­sors based on some con­fig­ured strat­e­gy. The Mail­box­Proces­sor (aka agents) in F# doesn’t come with the same high­­er-lev­­el abstrac­tions (such as Erlang’s gen_server, gen_fsm behav­iours) by default, but …

F# – Start­ing an Agent with super­vi­sionRead More »

Takeaways from Hewitt, Meijer and Szyperski’s talk on the Actor model

This is a list of my take­aways from the excel­lent talk between Erik Mei­jer (of the LINQ and Rx fame), Carl Hewitt (cre­ator of the Actor mod­el) and Clemens Szyper­s­ki, on the Actor mod­el.   Dis­claimer : this con­ver­sa­tion revolves around the con­cep­tu­al mod­el of an actor, as opposed to spe­cif­ic imple­men­ta­tions of the Actor …

Take­aways from Hewitt, Mei­jer and Szyperski’s talk on the Actor mod­elRead More »

A simple finite state machine in Erlang and F#

Con­sid­er­ing a very sim­ple finite state machine (FSM) such as a code lock which requires you to enter a 4-dig­it numer­ic code and upon which will open the lock for a brief few sec­onds. Such a FSM have two states: Locked and Open. Every time a key is entered it checks the sequence of dig­its …

A sim­ple finite state machine in Erlang and F#Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close