Mono at FOSDEM

by Miguel de Icaza

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:15Opening (Ruben Vermeersch, Stéphane Delcroix)
09:15 - 10:00MonoDevelop (Lluis Sanchez Gual)
10:00 - 11:00The Ruby and .NET love child (Ivan Porto Carrero)
11:00 - 12:00Mono Edge (Miguel de Icaza)
Lunch Break
12:45 - 13:15The evolution of MonoTorrent (Alan McGovern)
13:15 - 13:45Image processing with Mono.Simd (Stéphane Delcroix)
13:45 - 14:15ParallelFx, bringing Mono applications in the multicore era (Jérémie Laval)
Coffee Break
14:30 - 15:30Building The Virtual Babel: Mono In Second Life (Jim Purbrick)
15:30 - 16:00Moonlight and you (Andreia Gaita)
16:00 - 16:30OSCTool - learning C# and Mono by doing (Jo Shields)
16:30 - 16:45Smuxi - IRC in a modern environment (Mirco Bauer)
16:45 - 17:00Closing (Ruben Vermeersch, Stéphane Delcroix)

Posted on 11 Jan 2010


Pixel Shaders for Moonlight

by Miguel de Icaza

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.

Posted on 07 Jan 2010


Moonlight: Platform Abstraction Layer Lands

by Miguel de Icaza

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.

Posted on 06 Jan 2010


C# Support for Tuples

by Miguel de Icaza

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, like this:

	(user, password, host, port, path) = ParseUri (url);
	

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:

	Tuple<string, string, string, int, string> ParseUri (string url);
	

Future Work and Ideas

In addition to handling Tuples, I would like to extend this to support collections and IEnumerables as well, for example:

	(section, header) = my_array;
	

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:

	(query, page, other_options) = Request.QueryString;
	

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.

	ParseUri ()
	{
		...
		return (user, password, host, port, path);
	}
	

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:

	using (var (image, audio, badge) = iphoneApp.GetNotifications ()){
	    // use IDisposable image
	    // use IDisposable audio
	    // use trivial int badge
	}
	

Posted on 23 Dec 2009


New Moonlight Covenant has been posted

by Miguel de Icaza

As I mentioned a few days ago, there is a new covenant form Microsoft for Moonlight, it has been posted.

Posted on 22 Dec 2009


Cena Linuxera en el DF, hoy

by Miguel de Icaza

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.

Posted on 22 Dec 2009


C# String Interpolation

by Miguel de Icaza

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.

Posted on 20 Dec 2009


Debugging Silverlight/Moonlight Apps on Linux

by Miguel de Icaza

A little hidden feature from our release of MonoDevelop 2.2 and Mono 2.6 earlier this week was MonoDevelop's support for debugging Moonlight applications:

Moonlight debugging is a feature that came together very recently, but we delayed Mono and MonoDevelop's release to make sure that we shipped with it.

To debug, merely open your Moonlight/Silverlight project, set some breakpoints, and run your program (F5). Your app will be debugged.

I did a quick screencast and annotated it:

Posted on 17 Dec 2009


Releasing Moonlight 2, Roadmap to Moonlight 3 and 4

by Miguel de Icaza

Today we are making a few of announcements:

  • Moonlight 2 is complete: Moonlight 2, our open source implementation of Silverlight 2 is done.
  • An updated collaboration agreement between Microsoft and Novell to bring Silverlight 3 and 4 to open source Unix.
  • Microsoft has an updated patent covenant that will covers third party distributions.

Update: Sean Michael Kerner covers the announcement and talks to Brian Goldfarb from Microsoft.

Update 2: New covenant from Microsoft has been posted.

2.5 API

Moonlight 2 is a superset of Silverlight 2. It contains everything that is part of Silverlight 2 but already ships with various features from Silverlight 3:

  • Silverlight 3 Pluggable Pipeline, this allows developers to hook into the media decoding pipeline at various points:
  • Easing animation functions
  • Partial out-of-browser support
  • Writable bitmaps
  • Some of the new databinding features of XAML in Silverlight 3

We are moving quickly to complete our 3 support. Microsoft is not only providing us with test suites for Moonlight but also assisting us in making sure that flagship Silvelright applications work with Moonlight.

When it comes to prioritization of Silverlight 3 features, we are going to focus on getting the major applications that users want to use first. Sunday Night Football, the Winter Olympics and Bing's Photosynth support.

Smooth streaming works really well. Visit the site and test the immediate seek, and play with the bandwidth limiter to see how Silverlight/Moonlight can adapt the video quality based ont he bandwidth available:

Moonlight 2

Moonlight 2 is the result of love and passion to bring the Silverlight runtime to Linux.

Moonlight 2 engine consists of 142,000 lines of C/C++ code and 320,000 lines of C# code (125,000 lines of code came from Microsoft's open source Silverlight Controls).

Moonlight is built on top of Mono 2.6 runtime, Cairo and Gtk+ and today supports Firefox on Linux. We are hard at work to support Google Chrome on Linux as well.

Updated Patent Covenant

We worked with Microsoft to make sure that Moonlight was available to everyone on Linux and BSD.

Culturally, we started on two opposite ends of the software licensing spectrum. The covenant that was issued for Moonlight 1 and 2 covered every user that used Moonlight, but only as long as the user obtained Moonlight from Novell. This is a model similar to how Flash is distributed: there is a well-known location where you get your plugin.

The open source world does not work that way though. In the open source world, the idea is to release source code and have distributions play the role of editors and curators and distribute their own versions of the software.

Microsoft's intention was to expand the reach of Silverlight, but the original covenant was not a good cultural fit. We worked with the team at Microsoft (Brian Goldfarb and Bob Muglia's teams) to make sure that the covenant would cover the other Linux distributions.

The new patent covenant ensures that other third party distributions can distribute Moonlight without their users fearing of getting sued over patent infringement by Microsoft.

There is one important difference between the version of Moonlight that will be available from Novell and the version that you will get from your distribution: the version obtained from Novell will have access to licensed media codecs.

Third party distributions of Moonlight will be able to play unencumbered media using Vorbis, Theora and Ogg inside Moonlight (and Silverlight), but for playing back other formats, they will have a few options:

  • Negotiating directly with the media codec owners a license (MPEG-LA, Fraunhofer).
  • Negotiate access to Microsoft's Media Pack with Microsoft.
  • Plug-in GStreamer or another commercial codec license into their Moonlight implementations.
  • Update: Use a hardware provided decoder like VDPau.

Moonlight 3 and Moonlight 4 Collaboration Agreement

As readers of my blog know, the Silverlight 4 feature set is something that is very interesting to me.

If our experience with the positive feedback that we have gotten from MonoDevelop is of any indication Silverlight 4 will enable a whole new class of cross-platform .NET application development to take place. Like nothing we have seen before.

We are thrilled to be working with Microsoft to make sure that we can improve, fix and fine tune Moonlight to meet those requirements and to do so in a purely open source fashion.

Update: Team Silverlight blogs.

Posted on 17 Dec 2009


Nine Months Later: Mono 2.6 and MonoDevelop 2.2

by Miguel de Icaza

About nine months ago we released MonoDevelop 2.0 and Mono 2.4. Today we are releasing the much anticipated upgrades to both. Mono 2.6 and MonoDevelop 2.2.

For those in a hurry, binaries and source are available from:

And if you want a quick mnemonic to remember this release, just think debugger! and cross platform.

The Mono team and contributors worked on this release like we have never worked before. Thanks to everyone that reported bugs, filed feature requests, contributed code and helped newcomers with Mono.

Mono 2.6 highlights:

  • WCF client and server, the subset exposed by Silverlight 2.0.
  • LLVM support, to improve performance on server/computational loads.
  • Continuations/Co-routine framework Mono.Tasklets (background info)
  • LINQ to SQL using DbLinq.
  • New Soft Debugger, integrated with MonoDevelop on Unix and OSX (background).
  • System.IO.Packaging.
  • csharp shell now supports auto-completion (press tab to complete)
  • xbuild can now build most msbuild projects.
  • Mono debuts a verifier and security sandbox (used by Moonlight).
  • More complete 3.5 API coverage.
  • This release includes Microsoft's open sourced ASP.NET MVC, ASP.NET AJAX and Microsoft's Dynamic Language Runtime.
  • Faster and slimmer.

MonoDevelop 2.2 highlights (screenshots here and here):

  • MonoDevelop code is now LGPLv2 and MIT X11 licensed. We have removed all of the GPL code, allowing addins to use Apache, MS-PL code as well as allowing proprietary add-ins to be used with MonoDevelop (like RemObject's Oxygene).
  • User interface improvements: the first thing that MonoDevelop users will notice is that we have upgraded the UI to fit modern ideas. We borrowed ideas from Chrome, Firefox, Visual Studio, Eclipse and XCode.
  • ASP.NET MVC support, you can now develop, debug and build ASP.NET MVC applications from MonoDevelop.
  • New T4 Macro processor (Text Template Transformation Toolkit) integrated directly into the IDE (Mono's T4 is also available as a reusable library for use and abuse in your own programs).
  • Moonlight Project Support: you can now build, debug and run Moonlight applications using MonoDevelop.
  • New MacOS and Windows support. Check our feature matrix for details.
  • New Debugger support allows debugging Console, Gtk#, ASP.NET, iPhone and Moonlight applications.
  • Extensive text editor improvements:
    • Dynamic abbrev (Just like Emacs' Alt-/)
    • Code generator (Alt-Insert)
    • Acronym matching
    • Code templates
    • Block selection
    • C# Formatter
  • New refactoring commands:
    • Inline Rename (see screenshot).
    • Resolve Namespace
    • Rename Refactoring with Preview
    • Extract Method
    • Declare Local Variable
    • Integrate Temporary Variable
    • Introduce Constant
    • Move Type to Own File
    • Remove Unused Usings
    • Sort Usings
    • Create/Remove Backing Store
    • Keybindable Commands
  • Python add-in has graduated to be a supported plugin, includes code completion, syntax checking, method and class locator and code folding.
  • iPhone development plugin.

The team is on #mono, #monodev and #monodevelop on irc.gnome.org fielding any questions you might have.

Update: the diffstat results for Mono 2.4 to 2.6 on a 2 million line patch:

 7208 files changed, 1392400 insertions(+), 440016 deletions(-)

About a million lines of new code in Mono.

For MonoDevelop the patch is 750,000 lines and:

 2427 files changed, 464284 insertions(+), 120124 deletions(-)

Roughly 300k lines of new code.

Posted on 15 Dec 2009


« Newer entries | Older entries »