Archive for the ‘F#’ Category

Building a Language for Spreadsheet Refactoring

Saturday, March 22nd, 2014

Building a Language for Spreadsheet Refactoring by Felienne Hermans.

Summary:

Felienne Hermans introduces BumbleBee, a refactoring and metaprogramming spreadsheets tool based on a DSL that can perform transformations against spreadsheet formulas.

Argues that spreadsheets are code, rather convincingly. (Answer to the everybody must code argument?)

Uses code smell based analysis.

Has authored a refactoring tool for Excel.

Covers functional programming in F# to create the refactoring for Excel.

Analyzing and Visualizing Spreadsheets Felienne’s dissertation.

Abstract:

Spreadsheets are used extensively in industry: they are the number one tool for financial analysis and are also prevalent in other domains, such as logistics and planning. Their flexibility and immediate feedback make them easy to use for non-programmers.

But as easy as spreadsheets are to build, so difficult can they be to analyze and adapt. This dissertation aims at developing methods to support spreadsheet users to understand, update and improve spreadsheets. We took our inspiration for such methods from software engineering, as this field is specialized in the analysis of data and calculations. In this dissertation, we have looked at four different aspects of spreadsheets: metadata, structure, formulas and data. We found that methods from software engineering can be applied to spreadsheets very well, and that these methods support end-users in working with spreadsheets.

If you agree that spreadsheets are programming, how often do you think user/programmers are capturing the semantics of their spreadsheets?

That’s what I thought as well.

PS: Felienne’s website: http://felienne.com, Twitter: @felienne

F#

Wednesday, March 5th, 2014

Microsoft-backed F# language surges in popularity by Paul Krill.

From the post:

The Microsoft-backed F# functional programming language is gaining traction, with the platform showing a meteoric year-over-year rise on the Tiobe Programming Community Index gauging language popularity.

Ranked 69th on the index a year ago, F# has risen to the 12th spot in this month’s rankings, with a 1.216 percent rating. As the index headline notes, “F# is on its way to the Top 10.”

Microsoft Research’s F# page says the language is object-oriented and enables developers to write simple code to solve complex problems. “This simple and pragmatic language has particular strengths in data-oriented programming, parallel I/O programming, parallel CPU programming, scripting, and algorithmic development,” Microsoft said. F# originated at Microsoft Research; the F# Software Foundation has been formed to advance the language. The Microsoft Cloud Platform Tools group technically is in charge of F#.

F# Software Foundation. Did you know that F# has an open source license? Just an observation.

You can check the Tiobe Index.

Any topic map software in F#?

Coeffects: The next big programming challenge

Sunday, January 12th, 2014

Coeffects: The next big programming challenge by Tomas Petricek.

From the post:

Context-aware programming matters

The phrase context in which programs are executed sounds quite abstract and generic. What are some concrete examples of such context? For example:

  • When writing a cross-platform application, different platforms (and even different versions of the same platform) provide different contexts – the API functions that are available.
  • When creating a mobile app, the different capabilities that you may (or may not) have access to are context (GPS sensor, accelerometer, battery status).
  • When working with data (be it sensitive database or social network data from Facebook), you have permissions to access only some of the data (depending on your identity) and you may want to track provenance information. This is another example of a context.

These are all fairly standard problems that developers deal with today. As the number of devices where programs need to run increases, dealing with diverse contexts will be becoming more and more important (and I’m not even talking about ubiquitous computing where you need to compile your code to a coffee machine).

We do not preceive the above things as problems (at best, annoyances that we just have to deal with), because we do not realize that there should be a better way. Let me digg into four examples in a bit more detail.

This post is a good introduction to Tomas’ academic work.

A bit further on Tomas explains what he means by “coeffects:”

Coeffects: Towards context-aware languages

The above examples cover a couple of different scenarios, but they share a common theme – they all talk about some context in which an expression is evaluated. The context has essentially two aspects:

  • Flat context represents additional data, resources and meta-data that are available in the execution environment (regardless of where in the program you access them). Examples include resources like GPS sensors or databases, battery status, framework version and similar.
  • Structural context contains additional meta-data related to variables. This can include provenance (source of the variable value), usage information (how often is the value accessed) or security information (does it contain sensitive data).

As a proponent of statically typed functional languages I believe that a context-aware programming language should capture such context information in the type system and make sure that basic errors (like the ones demonstrated in the four examples above) are ruled out at compile time.

This is essentially the idea behind coeffects. Let’s look at an example showing the idea in (a very simplified) practice and then I’ll say a few words about the theory (which is the main topic of my upcoming PhD thesis).

I don’t know that Tomas would agree but I see his “coeffects,” particularly “meta-data related to variables,” as keying off the subject identity of variables.

Think of it this way: What is the meaning of any value with no express or implied context?

My answer would be that a value without context is meaningless.

Be example, how would you process the value “1” Is it a boolean? Integer? A string?

Imbuing data with “meta-data” (or explicit identity as I prefer) is a first step towards transparent data.

PS: See Petricek and Skeet’s Real-World Functional Programming.

Need to discover, access, analyze and visualize big and broad data? Try F#.

Sunday, February 3rd, 2013

Need to discover, access, analyze and visualize big and broad data? Try F#. by Oliver Bloch.

From the post:

Microsoft Research just released a new iteration of Try F#, a set of tools designed to make it easy for anyone – not just developers – to learn F# and take advantage of its big data, cross-platform capabilities.

F# is the open-source, cross-platform programming language invented by Don Syme and his team at Microsoft Research to help reduce the time-to-deployment for analytical software components in the modern enterprise.

Big data definitively is big these days and we are excited about this new iteration of Try F#. Regardless of your favorite language, or if you’re on a Mac, a Windows PC, Linux or Android, if you need to deal with complex problems, you will want to take a look at F#!

Kerry Godes from Microsoft’s Openness Initiative connected with Evelyne Viegas, Director of Semantic Computing at Microsoft Research, to find out more about how you can use “Try F# to seamlessly discover, access, analyze and visualize big and broad data.” For the complete interview, go to the Openness blog or check out www.tryfsharp.org to get started “writing simple code for complex problems”.

Are you an F# user?

Curious how F# compares to other languages for “complexity?”

Visualization gurus: Does the complexity of languages go up or down with the complexity of licensing terms?

Inquiring minds want to know. ­čśë