Monday, April 26, 2010

Hello, Axum!

using System;
using Microsoft.Axum;

public domain HelloWorld {
public agent Program : channel Application {
public Program() {
string[] args = receive(PrimaryChannel::CommandLine);
Console.WriteLine("Hello, World!");
PrimaryChannel::Done <-- Signal.Value;

Saturday, April 10, 2010

Jerk: Scalability and Higher Order Derivatives

I've long thought of scalability as the first derivative in the relationship between resources and operations per unit of time. With no resources, we usually achieve no operations, regardless of how long. With a single resource, we might achieve Om operations over a time span of T. By adding a second resource, we might achieve On operations over the same time span. We would say that the marginal scalabity between Rm (1) and Rn (2) was (On - Om) / (Rn - Rm). Looking at Operations vs. Resources on a line chart, this marginal scalability would be the slope of the line connectiong ORm and ORn. Knowing your application's scalability between m and n is a starting point, but the probability of ideal linear scalability in a real world application is 1/infinity. We need to know what happens when you add a third resource. This (second derivative) will tell us the rate at which the scalability changes as more resources are applied, and can be a much more useful figure. It may take a little more time until I can clarify what jerk might meaningfully contribute to discussion of scalability, but essentially it's the change in acceleration. :-)

Wednesday, April 07, 2010


If you're running Windows 7, PowerShell 2.0 and IIS 7.5 you may wonder how to get started with modifying your IIS configuration using PowerShell scripts (the web site is a bit unclear, the web installer gives an unhelpful lie phrased as an error message, and the downloadable install gives up without being much help either.)
No need for extra installs beyond the usuall Windows Features -> Internet Information Services install, just follow these steps:

  • "Run as Administrator" when starting PowerShell.
  • Set-ExecutionPolicy RemoteSigned (or whatever blows your hair back)
  • Install-Module WebAdministration
  • Get-PSDrive
  • cd IIS:

Saturday, April 03, 2010

F#ing Around

In my last post, I wrote a tiny standalone F# program that would print out a reversed string. It wasn't enough, I wanted to call the function from C#. Difficult? Not at all, but there are a couple of tricks that might catch you at first.
1) Add a new C# project to the solution
2) Add a new assembly reference to the F# project
3) One of two (or is that three?) things:
a) did you name your F# module (a declaration at the top of the .fs file like module MyFirstGreeting? If yes, you will reference the function from C# by it's fully qualified name: MyFirstGreeting.reverse(...)
b) do you have an unnamed F# module? If yes, it's assumed the name of the .fs file, most likely Program, so you'll need to invoke the function by calling Program.reverse(...)
c) if you answered yes to b) and the class in your C# project was also called Program, you are waiting for this: use the global namespace qualifier! global::Program.reverse(...). Remember your C# Program's fully qualified class name is actually something like ConsoleApplication2.Program.

Compile and run! Happy days! And marvel in the wonder of Visual Studio 2010 as you step through the code from C# to F# (the call stack window even shows what language your current stack frame is written in!). This is going to be a fun journey...