Saturday, 20 February 2010

Structural properties of amorphous materials (PhD thesis)

Cofounder of Flying Frog Consultancy Ltd., Dr Jon Harrop, did his PhD at the University of Cambridge on the "Structural properties of Amorphous Materials" in the department of chemistry. A large part of this work was on the application of time-frequency analysis to the study of the diffraction data of amorphous materials. The complete PhD thesis is now freely available for download as a PDF here.

In the process, Dr Harrop developed a new approach to time-frequency analysis that is based upon the continuous wavelet transform (CWT). This method of analysis is applicable to a wide variety of signals that arise in many different areas of study including biology, physics, finance, engineering, and bioinformatics.

Chapter 2 introduces the method of time-frequency analysis and discusses various different approaches that have been invented over the years. In particular, the beneficial charactistics of the continuous wavelet transform are described in detail, along with the mathematics behind Delprat's time-frequency interpretation of the CWT.

Chapter 3 describes the evolution of a new approach to time-frequency analysis that avoids the problems of the existing methods. The new framework consists of an objective and quantitative measure of the suitability of a wavelet and the derivation of a wavelet that improves upon all others in the general case. The properties of the wavelet are then determined such that a more accurate time-frequency interpretation can be constructed, allowing the continuous wavelet transform with the new wavelet to be used as an accurate quantitative method of time-frequency analysis.

Creating a computational implementation that is fast, accurate and reliable requires considerable attention to detail. The software developed by Dr Harrop for the analysis of diffraction data has since been developed into a commercial Mathematica add-on package for general-purpose signal analysis.

Miguel de Icaza of Mono on LLVM and F#

Miguel de Icaza of the Mono project made two surprise announcements in a recent blog post:

"We are working to improve our support for F# and together with various groups at Microsoft we are working to improve Mono's compatibility with the CLR to run IronPython, IronRuby and F# flawlessly in Mono. Supporting F# will require some upgrades to the way that Mono works to effectively support tail call optimizations."

"we continue to work on integrating LLVM [better use LLVM to produce better code, use it in more places where the old JIT was still required and expand its use to be used for AOT code]"

We have been pushing for these developments (F# support and an LLVM backend) for over a year now and it is very exciting to hear that the Mono team are taking this seriously. F# is the future of .NET and building upon LLVM offers huge potential not only for improving upon the performance of Mono's code generator but also in improving LLVM itself, which is now the foundation of many fascinating compiler projects including our own HLVM.

Friday, 12 February 2010

Sizes of industrial OCaml and F# code bases

For a bit of fun, we recently ran programs to determine the current sizes of our company's OCaml and F# code bases. This includes the code we use in-house for everything from web analytics to accountancy as well as the code behind our commercial products. We found 345kLOC of OCaml code and 171kLOC of F# code.

In comparison, Jane St. Capital now have around a million lines of production OCaml code and Citrix have 130kLOC of production OCaml code.