Moonlight 3.0 Preview 1
We have just released
our first
preview of Moonlight 3.0.
This release contains many updates to our 3.0 support, mostly on the infrastructure level necessary to support the rest of the features.
In the release:
- MP4 demuxer support. The demuxer is in place but there are no codecs for it yet (unless you build from source code and configure Moonlight to pick up the codecs from ffmpeg).
- Initial work on UI Virtualization.
- Platform Abstraction Layer: the Moonlight core is now separated from the windowing system engine. This should make it possible for developers to port Moonligh to other windowing/graphics systems that are not X11/Gtk+ centric.
- The new 3.0 Binding/BindingExpression support is in.
- Many updates to the 3.0 APIs
The above is in addition to some of the Silverlight 3.0 features that we shipped with Moonlight 2.0.
For the adventurous among you, our SVN version of Moonlight contains David Reveman's pixel shader support:
Mono at FOSDEM
I will be arriving in Brussels on Saturday Morning for the FOSDEM conference. We have an activity-packed day on Sunday of all-things-mono.
This is the current schedule, pretty awesome!
| When | Event | Speaker | Media |
|---|---|---|---|
| Sunday 2010-02-07 | |||
| Sun 09:00-09:15 | Opening | Stéphane Delcroix, Ruben Vermeersch | |
| Sun 09:15-10:00 | MonoDevelop | Lluis Sanchez Gual | |
| Sun 10:00-11:00 | The Ruby and .NET love child | Ivan Porto Carrero | |
| Sun 11:00-12:00 | Mono Edge | Miguel de Icaza | |
| Sun 12:45-13:15 | The evolution of MonoTorrent | Alan McGovern | |
| Sun 13:15-13:45 | Image processing with Mono.Simd | Stéphane Delcroix | |
| Sun 13:45-14:15 | ParallelFx, bringing Mono applications in the multicore era | Jérémie Laval | |
| Sun 14:30-15:30 | Building The Virtual Babel: Mono In Second Life | Jim Purbrick | |
| Sun 15:30-16:00 | Moonlight and you | Andreia Gaita | |
| Sun 16:00-16:30 | OSCTool - learning C# and Mono by doing | Jo Shields | |
| Sun 16:30-16:45 | Smuxi - IRC in a modern environment | Mirco Bauer | |
| Sun 16:45-17:00 | Closing | Stéphane Delcroix, Ruben Vermeersch | |
Feedback requested: My plan is to do a state-of-the-union kind of presentation on Mono, but if you have a specific topic that you would like me to present on, please leave a comment, I will try to prepare for that.
See you in Brussels!
iPad - Inspirational Hardware
iPad - Inspirational Hardware
As a software developer, I find the iPad inspirational.
Apple's iPad is not a new idea. They are not the first ones to think of a tablet and as many blogs have pointed out the Apple iPad is not everyone's dream machine, the hardware is lacking gadgets and the software is not that amazing.
Five elements come together to revolutionize software:
- Price
- Multi-touch centric development
- Standard hardware available for consumers
- Apple's AppStore
- Large form factor.
The iPhoneOS is a multi-touch centric operating system. For years application developers have been subjected to the tyranny of the mouse and keyboard. This has been the only input technology that developers could reliably depend on and expect to be available on the user's system. Any software that requires different input mechanism sees its potential market reduced.
The mouse is a great device for certain class of desktop applications. But it has also led to applications that are incredibly frustrating to use. Software for editing music and audio is cumbersome. Find the target, drag it, move it, find the other button, click it, scroll, drag, click. Anyone that has used Garage Band to try to play along knows this. The same applies to software to paint or draw. The mouse and keyboard are poor substitutes for using your hands.
On the iPhone, and now the iPad, the situation is reversed. Multi-touch is the only input mechanism that developers can depend on. Apple's iPhone helped create a community of developers that think in terms of taps, pinches and twirls instead of clicks, double-clicks and right-clicks. It is no longer an after thought. It is no longer a feature that is added if there is enough time in the schedule or enough budget. It is the only option available.
Taps, pinches and twirls allow us to use the full expression of our hands to drive an application. And it is not just any multi-touch, it is multi-touch over the same surface where the application is providing feedback to the user. Software that respond to user input in the same way that a physical object responds to our physical contact is the key to create new user experiences.
This is a whole new space in which we can research, a new space that we can explore and where we can create a whole new class of computer/user interactions. With the new form factor, we can now create applications that just made no sense on the iPhone.
It is fascinating.
The standardized hardware means that software developers do not have face testing their software with dozens of combinatorial options. There are only a handful types of systems. If the software works on the core systems, they will work on all consumer devices. Standardized hardware is at the core of the success of the console gaming market, developers test and develop against a uniform platform. Price is the cherry on top of the cake, this device will be mass produced and the affordable price means that it will have a deep reach.
The possibilities for new computer/user interactions are no longer dampened by this market reality. As developers, a new door to invention and innovation has been opened for us. No longer will software developers have to cripple their user experiences based on the mouse and keyboard.
For the past couple of years I have had some ideas for some software that I wanted to build on a touch-based computer, but the specter of having a small user base for my experiments always discouraged me. Ever since I heard the rumors about Apple producing a tablet computer I have not cared about what the device looked like, or what the software stack for it was going to be. I wanted to try new touch-based UI ideas, I have dozens of ideas that I want to try out. And with Mono, I get to do it in my favorite language.
iPad Support for MonoTouch!
24 hours after we got the iPad SDK we completed the support for the iPad for MonoTouch!
To get started with iPad development, go to http://monotouch.net/iPad and follow the instructions.
Let the iPad# hacking begin!
Release-o-Rama
Nice new releases of software that I use in the last few days.

Banshee 1.5
A new Banshee release, now supports new device syncing options, audiobooks, eMusic and GIO for non-local files. Gabriel has more details as well.
Now with a fully self-contained Mono and Gtk+ stacks on OSX. On the OSX note, I recommend Michael Hutchinson's blog entries on how to package your Gtk# app for use in OSX as well as his article on how to make your Gtk# app integrate with OSX. Both based on the lessons of bringing MonoDevelop and MonoDoc to OSX.
Jeroen Frijters released his IKVM.Reflection API. His API could be very useful for Reflection-Emit compiler writers, perhaps we could even use it in Mono's C# compiler to solve our long standing issues with Reflection. More research is needed on this area.
Maurits Rijk has published a new version of GIMP# his Mono-based plugin engine that lets you write plugins in any Mono supported language. There are samples in C# 3, F#, Boo, Nemerle, Oxygene, IronPython, Java/IKVM and Visual Basic.
Sandy released a new version of Tomboy, now supports exporting data in HTML format to the clipboard and jump Lists on Windows 7.
24 hour race
Another Mono-race, in 24 hours we are aiming to:
- Support the iPad SDK from Apple (freshly baked and published).
- Add MonoDevelop support for it.
MVP Award
Thanks to everyone that participated in the campaign to nominate me for a C# MVP award, when I got back to Boston I found on my piles of email that I am now part of the program.
This is Pretty Sweet(tm). This will be a great opportunity to build more bridges with Windows developers and show them that there is an ECMA CLI life in the other side of the OS spectrum.
Looking forward to the group picture!
Mono at FOSDEM
This year we will have a Mono Room at the FOSDEM Conference in Brussels. The FOSDEM conference is held on the weekend on February 6th and 7th.
Ruben and Stephane organized the room and the speakers for the it. has posted the finalized schedule for the Mono activities at FOSDEM on Sunday.
Here is the schedule, there are some pretty interesting talks:
| 09:00 - 09:15 | Opening (Ruben Vermeersch, Stéphane Delcroix) |
| 09:15 - 10:00 | MonoDevelop (Lluis Sanchez Gual) |
| 10:00 - 11:00 | The Ruby and .NET love child (Ivan Porto Carrero) |
| 11:00 - 12:00 | Mono Edge (Miguel de Icaza) |
Lunch Break | |
| 12:45 - 13:15 | The evolution of MonoTorrent (Alan McGovern) |
| 13:15 - 13:45 | Image processing with Mono.Simd (Stéphane Delcroix) |
| 13:45 - 14:15 | ParallelFx, bringing Mono applications in the multicore era (Jérémie Laval) |
Coffee Break | |
| 14:30 - 15:30 | Building The Virtual Babel: Mono In Second Life (Jim Purbrick) |
| 15:30 - 16:00 | Moonlight and you (Andreia Gaita) |
| 16:00 - 16:30 | OSCTool - learning C# and Mono by doing (Jo Shields) |
| 16:30 - 16:45 | Smuxi - IRC in a modern environment (Mirco Bauer) |
| 16:45 - 17:00 | Closing (Ruben Vermeersch, Stéphane Delcroix) |
Pixel Shaders for Moonlight
David Reveman has just posted a fascinating patch that debuts the support of pixel shaders in Moonlight.
David's patch uses Gallium, and he says:
The current implementation uses gallium's softpipe driver but hooking up the llvm driver as well should be a minor task and give significantly better software performance.[...]
My current approach is to focus on getting all these things working in software first. By using a OpenVG backend for cairo we can incrementally move to using gallium and hardware for all rendering.
Moonlight: Platform Abstraction Layer Lands
Chris Toshok has landed the changes necessary to abstract Moonlight's engine from the platform.
The platform abstraction layer lives in moon/src/pal and the Gtk+ interface lives in moon/src/pal/gtk.
This is a necessary step to bring Moonlight to non-X11 powered GUI systems.
C# Support for Tuples
More Mono proof of concept extensions to C#.
As part of the list of things I would like to see in C# is support for tuples in the language. They would show up in a few places, for example, to return multiple values from a function and assign the results to multiple values at once.
In recent versions of the framework there is a new datatype called Tuple, it is used to hold N values, the Tuple for N=2 looks like this:
public class Tuple<T1, T2> {
public Tuple (T1 v1, T2 v2);
T1 Item1 { get; set; }
T2 Item2 {get; set; }
}
The tuple
patch extends the C# language to allow multiple variables
to be assigned from any Tuple The above would assign the four values to user, password,
host, port and path from the call to ParseUri. ParseUri
would be declared like this:
In addition to handling Tuples, I would like to extend this
to support collections and IEnumerables as well, for example:
The above would store my_array [0] in section, and my_array
[1] in header.
If the last element of a tuple is a collection, it could
store the rest of the values from the collection or enumerable
in the last element:
The above would store the first item in the QueryString
into query, the second into page, and the rest into the
other_options array.
Tuple creation syntax:I would like to add nicer
support for creating Tuples as return values, it could just
mirror the assignment syntax.
Handling well-known types: In addition to Tuple,
ICollections and IEnumerables, perhaps the compiler should
know about older versions of Tuple like DictionaryEntry.
Using statements: Today the using statement is
limited to a single resource, with multi-valued return types,
it could handle multiple resources at once, like this:
(user, password, host, port, path) = ParseUri (url);
Tuple<string, string, string, int, string> ParseUri (string url);
Future Work and Ideas
(section, header) = my_array;
(query, page, other_options) = Request.QueryString;
ParseUri ()
{
...
return (user, password, host, port, path);
}
using (var (image, audio, badge) = iphoneApp.GetNotifications ()){
// use IDisposable image
// use IDisposable audio
// use trivial int badge
}
New Moonlight Covenant has been posted
As I mentioned a few days ago, there is a new covenant form Microsoft for Moonlight, it has been posted.
Cena Linuxera en el DF, hoy
Cena Linuxera/Monera hoy (Diciembre 22) en el bar/restaurante del Covadonga a las 7pm. Para todo p�blico (incluso talibanes).
Direcci�n: Puebla 121 cerca de el Metro Insurgentes.
C# String Interpolation
We have discussed in the past adding support to C# to support string interpolation. I have cooked a patch that allows C# developers to embed expressions inside strings, like this:
var a = 'Hello {name} how are you?';
Single quotes are used for strings that will have expressions interpolated between the braces. The above sample is equivalent to:
var a = String.Format ("Hello {0} how are you?", name);
Currently the patch supports arbitrary expressions in the braces, it is not limited to referencing variables:
var a = 'There are {list.Count} elements';
This notation can be abused, this shows a LINQ expression embedded in the string:
var a = 'The {(from x in args where x.StartsWith ("a") select x).FirstOrDefault ()} arguments';
I am not familiar with what are the best practices for this sort of thing in Python, Ruby and other languages. Curious to find out.
Update: after the discussion on the comments the syntax was changed to use $" instead of the single quote to denote a string that will be interpolated. Now you will write:
var a = $"There are {list.Count} elements";
var greeting = $"Hello {name} how are you?";
The updated patch is here.




