Project of the week: Left-handed guitar

All this quest for a perfect keyboard layout made me realize that I have lost a lot of mobility in my left hand.

I had a series of pretty bad accidents when I was a kid that damaged my left hand, and I believe that coupled with old age, my left hand is getting weaker and weaker. Here's the list of mishaps:

-Left hand stuck in the emergency brake of my mother's car.
-Middle finger stuck in security door.
-Torus fracture of the cubital bone (x2)
-Wrist fracture (x1)
-RSI, stayed stuck for 3 weeks, never fully recovered (damned ants in my left hand)!

So, I picked-up my guitar to relieve stress after a particularly nasty time spent with ceylon and Irony (If I get my hand on the smartass who decided to add the \i and \I prefixes to identifiers....) I realized my ring and middle fingers were just inert.

So here's a fun experiment, I will restring my sg upside-down tonight, and have a go at it. I'll try to use GnR's Nightrain solo as my benchmark (I am never playing Are You Gonna Go My Way ever again...) and report when things improve!

Ceylon's cool features are too addictive for my own good

I have been playing around with Ceylon after hearing UnFromage singing its praises and it is very addictive.

In my mind there is no contest the C# language is much, much more streamlined and expressive than Java7


I am already wishing C# used some of Ceylon's cool features, namely union types.
Consider the following scenario where we use the template method pattern.
    public abstract class Handler<T>
        // do some stuff but don't let the implementor decide of the ordering of actions
        public void DoIt(T value)
            // we're handling the ordering here!
            //  Implementor only provides ways to start and complete
        protected abstract T Start(T value);
        protected abstract void Complete(T value);

Now,  suppose we want to provide a handler that does satisfy both intand double. We have to write two implementations, as C# doesn't do multiple inheritance. If Foo and Bar's implementation are similar we've got to break-down the handler in a third common class. Moar clutter. Don't like it.

Introducing Ceylon's union types!

A union type is defined as being any of the possible types in the union. The type system works its magic retrieves the correct value. Let's pretend our C# union also defines implicit conversion operators and let's take a ride to wonderland.

    public class NumberHandler:Handler<int|double> 
        protected override int|double  Start(int|double value)
            return Math.Pow(value,2);
        override  override void  Complete(int|double value)
            Console.Out.WriteLine("Got {0}",value);

The compiler has to do some magic casting behind the scenes for this to actually work

I'm spoiled already.

Go get hooked on Ceylon now!

I'm itching to see some of those features in the .Net framework...