• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2
aA :  -   + pdf Infos Unsubscribe

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Tuesday, 21 May 2013 03:40
The F#.NET Journal just published an article about reflection and serialization:
"This article builds upon the recent article about reflecting values of non-recursive F# types in order to create a simple but effective and efficient XML serialization library..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "reflection, serialization, xml"
Send by mail Print  Save  Delicious 
Date: Monday, 13 May 2013 01:51
The F#.NET Journal just published an article about windows programming:
"Long running programs such as daemons are conventionally run as services under the Windows operating system. Windows services can be started automatically when a machine boots up. Logging is conventionally accomplished by writing to an Event Log. This article walks through an example windows service that creates and uses its own event log and provides a TCP echo server..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "event log, daemon, logging, windows serv..."
Send by mail Print  Save  Delicious 
Date: Friday, 10 May 2013 11:27
The F#.NET Journal just published an article about meta programming:
"Reflection has many practical applications but is significantly harder using the built-in API that it can be if consideration is restricted to F# types as they are used in messages. This article describes a simple library that allows non-recursive F# types and values of them to be converted to and from an abstract representation in the form of a union type. This makes it much easier to write fast serialization libraries for a variety of different serialized formats..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "reflection, metaprogramming"
Send by mail Print  Save  Delicious 
Date: Sunday, 05 May 2013 01:33
The F#.NET Journal just published an article about GUI programming:
"There are many parallels between types and the built-in WPF controls. An editable boolean can be represented by a check box. An editable enum can be represented by a combobox. An editable string by a text box and so on. Editable sequences are notably absent from the set of built-in WPF controls. This article describes the design and implementation of a WPF control that allows an arbitrary sequence to be edited..."

To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "slackless, computer aided design, gears"
Send by mail Print  Save  Delicious 
Date: Wednesday, 13 Mar 2013 18:25
The F#.NET Journal just published an article about GUI programming:
"There are many parallels between types and the built-in WPF controls. An editable boolean can be represented by a check box. An editable enum can be represented by a combobox. An editable string by a text box and so on. Editable sequences are notably absent from the set of built-in WPF controls. This article describes the design and implementation of a WPF control that allows an arbitrary sequence to be edited..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "wpf, editable, control, sequence"
Send by mail Print  Save  Delicious 
Date: Monday, 04 Mar 2013 17:35
The F#.NET Journal just published an article about GUI programming:
"Editable user interfaces are often clearer if a distinction is made between views used for display and editing. This article describes the design and implementation of a generic editable control that has a concept of validity and several specialized derivative controls that allow different kinds of values to be edited with visual feedback on the validity of their contents..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "wpf, editable, values"
Send by mail Print  Save  Delicious 
Date: Tuesday, 29 Jan 2013 00:30
The F#.NET Journal just published an article about multicore parallelism:
"The Array.Parallel module provided by the F# standard library includes parallelized versions of some useful aggregate operators, most notably map. However, this module does not provide the full complement of such operators. This article walks through the design and implementation of many more parallel functions based upon three parallel skeletons (with abstract implementations) including a new mapReduce function..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "performance, parallel programming, aggre..."
Send by mail Print  Save  Delicious 
Date: Monday, 28 Jan 2013 15:23
The F#.NET Journal just published an article by Don Ryan about graphics and visualization:
"The great sage and writer, Leo Tolstoy, was fond of applying to various aspects of life a story regarding the Russian painter Briullov who once corrected a student’s sketch by touching “it up a little here and there, and the poor, dead sketch suddenly came to life. ‘Why, you just touched it up a little bit, and everything changed,’ said one of the students. ‘Art begins where that little bit begins,’ said Briullov.”..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "texture, wpf, terrain, 3d, relief map, g..."
Send by mail Print  Save  Delicious 
Date: Sunday, 20 Jan 2013 23:38
The F#.NET Journal just published an article by Martin Trojer about Linux:
"The F# software foundation was recently formed to help diversify the F# programming language beyond the Microsoft ecosystem. This article is the first in a series looking at the use of F# on non-Microsoft operating systems, specifically Linux on the desktop and on a Raspberry Pi..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "linux, raspberry pi"
Send by mail Print  Save  Delicious 
Date: Sunday, 13 Jan 2013 23:09
The F#.NET Journal just published an article about GUI programming:
"Spreadsheets are ubiquitous in business computing but they are a flat unstructured representation of data. Programming languages like F# make it easy to structure data but the ability to convert between flat and structured representations can make it easier to build applications for business users. This article examines the problem of converted structured data into a flat table..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "reflection, flat, wpf, excel, gui, table..."
Send by mail Print  Save  Delicious 
Date: Sunday, 06 Jan 2013 02:01
The F#.NET Journal just published an article about metaprogramming:
"Legacy enterprise applications that predate modern web services often communicate using ad-hoc protocols. Such protocols require a lot of tedious and error-prone maintainance due to the unnecessary duplication of essential information. Reflection and metaprogramming provide an opportunity to automate much of the work involved in using such forms of communication provided they are regular, dramatically reducing maintenance costs. This article examines a protocol that uses key-value pairs encoded as lines of text of the form "key=value" and automates deserialization to a more typeful representation, an F# record type..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "serialization, enterprise, automation, m..."
Send by mail Print  Save  Delicious 
Date: Sunday, 25 Nov 2012 20:58
The F#.NET Journal just published an article about WPF:
"Many enterprise software applications require the ability to visualize a grid quickly and easily. This article looks at the performance of using the built-in WPF Grid control for a modest 80x120 grid of numbers and describes the design and implementation of a bespoke FastGrid control that uses WPF's low-level rendering APIs to make startup 16x faster..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "performance, wpf, culling, grid"
Send by mail Print  Save  Delicious 
Date: Saturday, 24 Nov 2012 23:57
The F#.NET Journal just published an article about metaprogramming:
"The low-level virtual machine (LLVM) is a freely-available high quality code generation library with support for many different architectures and platforms including x86, x64 and ARM. Programs are conveyed to LLVM in its intermediate representation (IR) which is an infinite register virtual machine. LLVM supports both static and JIT compilation of IR to native code. This article describes a compiler written in F# that can compile programs written in a small language to LLVM IR (using PInvoke) in order to evaluate them interactively..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "compilation, metaprogramming, llvm, jit"
Send by mail Print  Save  Delicious 
Date: Sunday, 11 Nov 2012 00:08
Several members of the F# community have combined forces to found The F# Software Foundation (FSSF) with the intention to "promote, protect, and advance the F# programming language, and to support and facilitate the growth of a diverse and international community of F# programmers". Note that Microsoft are still entirely responsible for F# on its native platform: .NET on Windows.

Although the FSSF was only just created, their website is already a gold mine of F#-related links. The "Getting F#" section refers to explanations of how to install F# on Mac, Linux, Windows, Android and iOS as well as HTML5 and GPGPU.

We fully support this movement to encourage wider adoption of F# and, in fact, we are currently experimenting with F# on the Raspberry Pi and intend to look at F# on the Google Nexus 7 tablet and the forthcoming Microsoft Surface Pro tablet.
Author: "Jon Harrop (noreply@blogger.com)" Tags: "FSSF"
Send by mail Print  Save  Delicious 
Date: Wednesday, 07 Nov 2012 00:58
The F#.NET Journal just published an article about concurrent programming:
"Distributed concurrency can be complicated and, consequently, there can be great value in having a complete working prototype to study. The simplicity of asynchronous agents in F# makes them ideal for writing simulation code. This article describes the design of a simple concurrent system that distributes incoming messages between two separate concurrent systems in order to duplicate subsequent processing in order to provide fault tolerance..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "fault tolerance, twin engine, mailbox pr..."
Send by mail Print  Save  Delicious 
Date: Wednesday, 07 Nov 2012 00:55
The F#.NET Journal just published an article about numerical methods:
"Definite integrals can be calculated approximately using a variety of techniques known collectively as numerical integration algorithms. The ability to calculate definite integrals has many practical applications including solving ordinary differential equations. This article describes several basic algorithms for numerical integration and a technique that allows these algorithms to be applied to both finite and infinite limits..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "simpsons rule, numerical integration, tr..."
Send by mail Print  Save  Delicious 
Date: Wednesday, 07 Nov 2012 00:55
The F#.NET Journal just published an article about logic programming:
"Satisfiability solvers or SAT solvers are programs than solve logical problems. A boolean SAT solver is one than solves the problem of finding sets of variable bindings for which a given boolean expression evaluates to true..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "sat solver, logic programming"
Send by mail Print  Save  Delicious 
Date: Wednesday, 05 Sep 2012 21:58
The F#.NET Journal just published an article about reflection:
"Static type systems enforce constraints at compile time by using types as contracts that must be adhered to. Nominal typing compares types according to the explicit interfaces they implement. If two type explicitly implement the same interface then they can be used interchangeably within the context of that interface. Structural typing is an alternative to nominal typing where the comparison of types is based upon the structure of the types rather than explicit interfaces..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "performance, reflection, structural typi..."
Send by mail Print  Save  Delicious 
Date: Wednesday, 05 Sep 2012 21:21

This post presents one of our recent pieces of consultancy work as a case study. This case is interesting because it concerns a significant commercial code base ported from OCaml to F#, the introduction of parallelism to the code base and the performance of F# compared to OCaml in the context of a compiler (where OCaml is regarded as being very fast).

We recently ported a compiler written in OCaml to the F# programming language for a client and performance turned out to be an issue. The precise details cannot be disclosed under our contract.

The original compiler was 15,000 lines of OCaml code. The compiler was regularly applied to large code bases and the C code that it produces can be considerable so compilation can take minutes. Consequently, the compiler's performance is valued by our client's customers and, therefore, the original code had been optimized for OCaml's performance characteristics.

A direct translation of the OCaml code to F# proved to be over 10× slower. This was so slow that it impeded testing of the initial translation so some optimization was done before the first working version. Specifically, profiling indicated that the biggest problem was the high rate of exceptions being raised and caught. Exceptions are around 600× slower on .NET than in OCaml and are often used for ordinary control flow in OCaml so direct translations to F# often suffer from poor performance as a consequence. In this case, the hot paths were changed to use union types (usually option types) instead of exceptions. Although this incurs a lot of unnecessary boxing in F# the performance improvements were substantial and the F# version became 5x slower than the OCaml.

Surprisingly, thorough testing showed that our almost-blind initial translation of 15,000 lines of code was completely error free. I think this is a real testament to the power of ML's static type system. In fact, the only error found to date was introduced during subsequent optimization.

After demonstrating the correctness of the translation, effort turned to trying to improve performance in an attempt to compete with the original OCaml code. We expected this to be extremely difficult because OCaml is very heavily optimized for exactly this kind of workload. However, we were actually able to exceed OCaml's performance. This was accomplished by taking a regimented approach where the program was profiled to identify the main hot spots and actions were taken to improve overall performance but only the most effective optimizations were retained before repeating the process and all results (including failures) were carefully recorded. This allowed us to produce a fast code base that was still as familiar as possible to its developers. In particular, the support for parallel programming in .NET 4 and F# 2.0 proved invaluable and was the final boost we needed to exceed OCaml's performance.

This case study proves that it is possible to migrate significant commercial code bases from OCaml to F# without suffering performance degradation. Beyond metaprogramming, we have found that many practical applications see substantial speed improvements when moved from OCaml to F# often due to better support for multicore but also better support for unboxing.

Author: "Jon Harrop (noreply@blogger.com)" Tags: "performance, ocaml, compiler, parallel"
Send by mail Print  Save  Delicious 
Date: Saturday, 18 Aug 2012 17:20
The F#.NET Journal just published an article about concurrent GUI programming:
"This article rearchitects a GUI application from a previous article to use an asynchronous concurrent design. The result is a clean separation between view and model that closely resembles a client-server architecture due to the use of explicit message passing. This design pattern is generally applicable..."
To read this article and more, subscribe to The F#.NET Journal today!
Author: "Jon Harrop (noreply@blogger.com)" Tags: "wpf, tic tac toe, asynchronous, model vi..."
Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader