Today we
released Mono 2.0 to
the world. You can download sources and binaries from
our download
page. And our
official release
notes are up as well. This of course would not be
possible without the open source contributors that worked
tirelessly on Mono sending patches, fixing bugs, helping the
community, answering questions, creating test cases and
supporting us all these years.
Mono 2.0 is both a runtime for application and a kit for developers for writing applications with C# and other ECMA CLI languages for a wide spectrum of uses.
Big thanks go to the fantastic Mono team at Novell that has kept the excitement and the pace over all these years (we started in 2001), the large contributions from Mainsoft, Unity3D and our users that pushed us to fix bugs, implement new features and tune Mono. Also, we very much appreciate the work of the ECMA 334 and 335 committee members that worked on the CLI and C# specifications and everyone at Microsoft that answered our questions over the years and specially those that licensed code under open source licenses.
We originally started to work on Mono, because we
wanted to make developers happier and more productive on
Linux. We liked C#, we liked the CIL and we wanted to have
those technologies available on our platform.
Since we have been active in the Linux Desktop world, it is not a surprise that the early use of Mono was mostly on Linux desktop applications, and Mono continues to shine there. Server-side use of Mono was a natural evolution and we soon were powering ASP.NET sites on Linux.
There is one area where we under-delivered in the past, and it has been a constant source of pain. Up until now, we did not have a working debugger. This has finally changed, and Mono 2.0 includes for the first time a debugger, the time for WriteLine() debugging is now behind us.
As the project matured, developers started taking advantage of Mono's open source nature: essentially .NET on their own terms. A platform that could be adapted, morphed, ported and modified to suit many different uses. Today Mono is embedded in portable mp3 players and powers Unity3D's game engine on the Apple iPhone, the Nintendo Wii, MacOS X and Windows (Some folks at Novell are working with Unity on bringing Unity3d to Linux!).
It has also been deployed to run code on large clusters of servers for SecondLife, powers our open source Silverlight implementation (Moonlight) and powers the popular DekiWiki: a Social Collaboration Tool.
Mono is a large project and it is hard to pick one feature to talk about as there are so many, so instead I put together a quick table of the major features that are part of this release:
| Compiler Support | .NET APIs | Mono APIs | |
Mono's Open Source Compilers:
|
Core API:
|
GUI APIs:
Mono Core:
|
We have ported Mono to a wide variety of platforms and operating systems on this 1.0 to 2.0 cycle. These platforms include:
Long time Linux developers will probably continue to use Emacs and VI, but some new Linux developers might want to use an IDE. New developers can use our open source MonoDevelop IDE on Linux, or alternatively the commercial X-Develop IDE or SlickEdit.
If you are a Windows developer, you can continue using Visual Studio or your IDE of choice to write the code and compile it. Your binaries will run just fine on Linux.
To assist Windows developers in porting their applications to Unix, we have provided the Mono Migration Analysis tool.
The Mono Virtual Machine gained plenty of features since Mono 1.2 was released. We have added:
In addition the the Mono Debugger making its debut appearance on this release, we are very proud of our code analyzer Gendarme.
Gendarme is a extensible rule-based tool to find problems in .NET applications and libraries. Gendarme inspects programs and libraries that contain code in ECMA CIL format (Mono and .NET) and looks for common problems with the code, problems that compilers do not typically check or have not historically checked.
Mono is not perfect, but we want to improve it. Like many other open source projects, we need your bug reports to improve Mono. If you have problems with Mono, help us by filing a bug report.
Special thanks to Hacker Extraordinaire Aaron Bockover who not only brings us the best media player in the world, but created the new web site design and implemented and tuned it over very long extra hours up until 7am in the morning on his weekend.
And to our packaging and QA team that spent extra hours to get all the bits and pieces in place for the release.
by Miguel de Icaza (miguel@gnome.org) at October 06, 2008 10:46 PM
by Fuzzyman (noreply@blogger.com) at October 06, 2008 09:06 PM
I loved this LWN article on the changes necessary to make Linux boot in 5 seconds on the Asus EEE PC (a relatively slow computer).
Hopefully all Linux distributions will adopt these changes for custom deployments.
by Miguel de Icaza (miguel@gnome.org) at October 04, 2008 04:54 PM
A couple of weeks ago we started the work on porting Microsoft's Media Codecs to Linux and we got the C version running.
Geoff, Fernando and Rolf have been hard at work on this, and have also added the infrastructure to download and install the codecs on demand.
The next step was getting all the assembly language supported in Linux, and today Geoff got the assembly optimized SSE1 audio decoder running (the first chunk of the decoders).
Of course, the rest of the team has been busy fixing bugs and improving the performance in preparation for the first public beta of Moonlight.
by Miguel de Icaza (miguel@gnome.org) at October 03, 2008 11:31 PM
MichaelFoord:
by Fuzzyman (noreply@blogger.com) at October 03, 2008 12:48 PM
A couple of weeks ago I suggested that developers interested in having their .NET software run in other platforms should avoid Microsoft's Managed Extensibility Framework (MEF) as it was not an open source library.
I had a chance to discuss with Glenn, Sam and Bob the benefits of using the MS-PL for this library first over twitter and then over email.
Representing .NET's loyal competitor, I did not think that we stood a chance of getting Microsoft to change the license, but I was pleasantly surprised. Glenn understood the value of open source, Sam wanted to do the right thing about this library and CodePlex and Bob argued that Mono already had Mono.Addins anyways.
Today Glenn announced that Microsoft has changed the license for MEF to the open source MS-PL license.
Thanks to everyone at Microsoft that helped change the license!
by Miguel de Icaza (miguel@gnome.org) at October 02, 2008 08:56 PM
Atsushi Enomoto blogs about the work involved in bringing LINQ to Databases to Mono.
The effort was a joint collaboration between the awesome DbLINQ developers, Pablo Iñigo Blasco our Google Summer of Code Student and Novell's Atsushi Enomoto.
The DbLINQ developers had created a general purpose LINQ provider that could be used with database providers other than SQL Server. They also relicensed their code a few months ago to the MIT X11 license to allow for integration with Mono's code base.
Read Atsushi's description of how the effort was put together and how DbLINQ is being refactored to become a full System.Data.Linq implementation and still provide the foundation for third-parties to easily create database LINQ providers.
DbLINQ is a great project, and it needs your help to complete the effort.
by Miguel de Icaza (miguel@gnome.org) at October 02, 2008 12:28 AM
Great News Mono Lovers!
Later this month I will be presenting the session "Mono and .NET" at the Microsoft Professional Developers Conference in LA.
Exciting times!
Update: My talk will cover new technologies that we have created as part of Mono. Some of them are reusable on .NET (we try to make our code cross platform) and some other are features that specific to Mono's implementation of the CLI.
by Miguel de Icaza (miguel@gnome.org) at October 01, 2008 10:51 PM
This weekend the news came out that Microsoft was going to bundle and support John Resig's jQuery as part of Visual Studio and ASP.NET. From Scott's blog:
I'm excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward. We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch. The files will continue to use and ship under the existing jQuery MIT license.
Beyond the obvious benefits to developers, what interests me is that Microsoft is now bundling an open source component into their commercial offerings.
This is a first time for Microsoft.
With IronPython they continued development of an open source project in house. With IronRuby, they were open to external contributions to the libraries of IronRuby. In both cases they were not taking external code or contributions directly into their core products.
Hopefully they will start using more open source code in their products. Maybe one day they will bundle Mono's Cecil or Mono's embeddable C# compiler.
by Miguel de Icaza (miguel@gnome.org) at October 01, 2008 07:49 PM
I've just released the Silverlight Dynamic Languages SDK with the newest DLR, IronRuby, IronPython, and JScript binaries and sources to work against Silverlight 2 RC0!
This release works with Silverlight 2 RC0. Keep in mind this is a developer release, so no "end-user" runtime exists. This is why the "not-installed" experience doesn't take you directly to the download, but to a page where you can install the tools.
As usual, report any issues on the Issue Tracker, and feel free to ask any questions on the Discussions tab.
This release has slightly refactored Microsoft.Scripting.Silverlight, adding two new types: "Package" and "Configuration". You can use "Package" to access files inside the XAP, and "Configuration" can be used to detect languages available in Silverlight.
In past releases, if you wanted to host the DLR you needed to create your own ScriptRuntimeSetup which uses Microsoft.Scripting.Silverlight.BrowserScriptHost to tell your hosted scripts about how Silverlight. Your code would look like this:
using Microsoft.Scripting.Silverlight; using Microsoft.Scripting.Hosting; //... var setup = new ScriptRuntimeSetup(); setup.HostType = typeof(BrowserScriptHost); var runtime = new ScriptRuntime(setup); //...
Now, since the ScriptRuntimeSetup we use to run user code is public, you can simply this code to:
using Microsoft.Scripting.Silverlight; using Microsoft.Scripting.Hosting; //... var runtime = DynamicApplication.Current.Runtime; // or if you wanted to create your own runtime, reuse the setup var runtime = new ScriptRuntime(DynamicApplication.Current.Runtime.Setup); //...
Blah, blah, blah, I always talk about the future. Has anything happened? Nope. Well, it will eventually. Just keep pestering. If you have no idea what I'm talking about, take a look at my last post.
by Jimmy Schementi (noreply@blogger.com) at October 01, 2008 07:10 AM
I know you feel like this sometimes when trying to solve a problem. I do. Almost all the time. Even when I'm not angry ... but I digress.
Silverlight 2 RC0 was released this past Thursday, but anyone wanting to use the DLR in it was surprised ... no new binary release of the DLR bits for Silverlight 2 RC0 yet. As I said on Twitter, it would be delayed until today, but that shouldn't stop anyone from taking the sources and compiling them against the new SIlverlight build, right?
Of course! Everything should just work, since there were no major breaking changes in Silverlight that affect the DLR between Beta2 and RC0. So, you hacked up the csproj files to point at mscorlib.dll, system.dll, etc in the new Silverlight install directory (C:\Program Files\Microsoft Silverlight\2.0.30923.0), compile, and it builds fine. Then you try to run an app ...
"InitializeError- Failed to load the application. It was built with an obsolete version of Silverlight"
Poof! What the hell happened? That's a really bad error message, but what it means to say is:
"The application's AppManifest.xaml has a RuntimeVersion <= 2.0.30523.00, which is Silverlight 2 Beta 2's version number, so Silverlight 2 RC0 won't load this application."
So you see, the XAP file that was produced by Chiron is still for SL2 Beta2. But that's an easy fix;
Welcome to the wonderful world of versioning in Silverlight. :)
by Jimmy Schementi (noreply@blogger.com) at October 01, 2008 06:25 AM
by Fuzzyman (noreply@blogger.com) at September 30, 2008 08:00 PM
by Fuzzyman (noreply@blogger.com) at September 30, 2008 07:55 PM
by Mark Rees (noreply@blogger.com) at September 30, 2008 11:46 AM
People are loving the C# Interactive Shell.
In the past people have embedded languages like Boo into their applications (MonoDevelop and Banshee for example both have options to embed Boo and a shell).
Zoltan designed a new system for Mono that allows developers to inject and execute code into running Mono applications. Paolo provided significant feedback and design guidelines for the code to be incorporated into Mono.
Thanks to both Zoltan and Paolo this functionality is now available through the Mono.Management assembly: you provide an executable and a PID, and the executable is injected and its Main method executed on the target process:
using Mono.Attach;
[..]
// Get a handle to a running Mono process.
VirtualMachine vm = new VirtualMachine (pid);
// Load hello.exe into the target process, and run it
vm.Attach ("/tmp/hello.exe", "");
You can use this for billions of things of course. You could patch running programs, you could attach logging software to a running program, or you could inject a C# evaluator into a live application and examine its state, or tweak it live.
Zoltan came up with a really cool extension to the the csharp command (this is the command-line C# Interactive Shell). The csharp command now takes an --attach command line argument and a PID.
The csharp shell can now use the Mono.Attach.VirtualMachine to injects itself into the remote process and then the client and server communicate through a couple of sockets.
For example, this is the sample that Zoltan used to pitch his idea for supporting attaching to the virtual machine. With the following you can pause a live Banshee process:
$ ps aux | grep banshee miguel 12359 17.0 2.7 141372 55708 pts/5 Sl+ 14:30 0:02 banshee-1 /usr/lib64/banshee-1/Nereid.exe $ csharp --attach 12359 csharp> using Banshee.ServiceStack; csharp> using Banshee.Gui; csharp> var s = ServiceManager.Get (); csharp> s.PlaybackActions ["PlayPauseAction"].Activate ();
All of the code is now on SVN, you need both the mono and mcs modules from trunk.
The above commands are a tiny bit risky and are also limited to the shell.
The above commands will execute on a separate thread from the application, and any commands that you execute would be executed on a separate thread which could corrupt the state of your application.
So this weekend, I wrote a tool that integrates with Gtk# applications, its called gsharp and you can find it in the mono-tools module (it borrows some code from Banshee).
gsharp is a Gtk# version of the csharp command. What is important is that it also supports injection of the code on other programs, but makes sure that all the code executes in the Gtk# thread, by issuing all of its commands from the Gtk# idle handler. This means that it is safe to use gsharp with your Gtk# applications.
GUI version of the tool.
Here you can select which project you want to inject the GUI into:
Needs some work, show process names.
This version shows the gsharp tool attached to F-Spot, as I am not very familiar with the codebase, I can not do very much with it:
We will need to implement one of these as well for Windows.Forms applications. This should luckily be easy to do as most of the smarts live in the Mono.CSharp assembly (our embeddable compiler).
A couple of weeks ago, I asked for people to weigh in on a security concern for temporary files. This was for Zoltan's attach functionality.
The code is now implemented and I would love if security experts could do a source code audit of our implementation. And validate whether our assumptions are safe.
Here is the source code.
by Miguel de Icaza (miguel@gnome.org) at September 29, 2008 03:44 PM
In C# the defaut access level for members in classes and structs is "private".
There is no need to pepper the source code with "private" everywhere. It only introduces noise and makes your code more difficult to read.
by Miguel de Icaza (miguel@gnome.org) at September 28, 2008 08:30 PM
by Fuzzyman (noreply@blogger.com) at September 26, 2008 01:53 PM
by Fuzzyman (noreply@blogger.com) at September 26, 2008 01:36 PM
by Fuzzyman (noreply@blogger.com) at September 25, 2008 07:39 PM
by Fuzzyman (noreply@blogger.com) at September 25, 2008 06:09 PM
by Fuzzyman (noreply@blogger.com) at September 25, 2008 12:32 PM
I had the honor of meeting with a delegation from Fukuoka, Japan this morning at Microsoft's Executive Briefing Center. Part of the delegation represents the Ruby Business Commons, one of the largest Ruby SIGs in Japan (> 500 people as of August 2008). They were here to talk to us about Ruby, its impact in Fukuoka, and how we can work together to help promote Ruby and IronRuby in the IT industry in Fukuoka.
It was a challenging meeting since everything had to be done through a translator (who did a remarkable job). They had some great questions and suggestions for how we can work together to help promote Ruby in the Enterprise in Japan. I'm looking forward to seeing what we can do together to help spread the love.
by Fuzzyman (noreply@blogger.com) at September 24, 2008 09:46 PM
by Fuzzyman (noreply@blogger.com) at September 24, 2008 09:45 PM
Chris Anderson is wearing a Mono T-Shirt on this PDC interview and IronRuby.com is hosted on DekiWiki, a Mono-powered Wiki site.
This is clearly awesome.
In other news, the awesome hackers at Imendio have officially released Gtk+ for OSX packages.
by Miguel de Icaza (miguel@gnome.org) at September 24, 2008 08:32 PM
Funkists, why does System.IO.Stream not have a CopyStream method, it seems like everyone ends up implementing this.
Discuss.
by Miguel de Icaza (miguel@gnome.org) at September 24, 2008 06:56 PM
Today, the IronPython team and the ASP.NET team released ASP.NET Dynamic Language Support on the ASP.NET Codeplex site!
ironpython-webforms-sample.zip: running IronPython ASP.NET website. Either dump this in IIS or open with Visual Studio as a website project.
ironpython-mvc-sample.zip: and IronPython ASP.NET MVC website, so you can get a feel for how dynamic languages can integrate into MVC. However, this just shows IronPython working in Views, not Controllers or Models yet. This requires MVC to be installed to open the project in Visual Studio. Open it with Visual Studio, build, and run your shiny IronPython ASP.NET MVC app.
aspnet-dlr-docs.zip: Documentation on how to use all this stuff. Open intro.html and have fun. :)
This is a project that me, David Ebbo, and Phil Haack have been working on for a bit, and I'm so happy that the ASP.NET team is taking the DLR and committing to making dynamic languages work well on ASP.NET. Phil actually announced this on his blog as well, and I'm sure will be talking about this much more in the future. In short, a big thanks to David and Phil for getting this project kick-started again.
Back in June I talked about this day coming, but I didn't even have a piece offering, other than my whit. To make up for that, I'm going to walk you through using IronPython in ASP.NET.
Note: I'm going to walk you through using Visual Studio to open the website and make changes. However, you can simply drop this directory into your IIS wwwroot and simply edit the files with a text-editor of your choice.
1. Extract ironpython-webforms-sample.zip, open Visual Studio, and then open a website project (File > Open > Web Site ...). Navigate to where you extracted the webforms sample, and click open; now you should see the following.
2. Take a look at the code in Default.aspx and Default.aspx.py. The aspx page has a asp:Literal control, with the id "messageLiteral", and the py file sets the text of that asp:Literal control.
<!-- Default.aspx -->
<%@ Page Language="IronPython" CodeFile="Default.aspx.py" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Literal id="messageLiteral" runat="server" />
</div>
</form>
</body>
</html># Default.aspx.py
def Page_Load(sender, e):
messageLiteral.Text = "Hello Dynamic World!"3. Hit Ctrl+F5 (Start without debugging), and the app will run. If you are not using Visual Studio, simply navigate to Default.aspx in your web browser.
4. Awesome, our app runs! Now let's make it do something. Replace the inside of the <div /> with a Label, TextBox, and a Button control (Note: you can also open the Toolbox in Visual Studio and drag these in).
Enter your name: <br />
<asp:TextBox ID="TextBox1" runat="server">
</asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<br /><br />
<asp:Label ID="Label1" runat="server" Text="Label">
</asp:Label>5. Open Default.aspx.py and change the Page_Load method to be the following:
def Page_Load(sender, e):
if not IsPostBack:
Label1.Text = "...Your name here..."6. Now add the following code to Default.aspx.py to handle the button's Click event:
def Button1_Click(sender, e):
Label1.Text = Textbox1.Text7. Switch back to Default.aspx.py and make the Button handle the event:
<asp:Button ID="Button1" runat="server" Text="Button"
OnClick="Button1_Click"/>
8. Now navigate back to your browser, and refresh the page. Enter any text in the textblock, click the button, and it'll appear in the label below.
Yeah, I know, not very useful, but it gives you an idea of how things work. Look through the "ASP.NET Dynamic Language Runtime Support Documentation" on the downloads page for more walk-throughs with IronPython and ASP.NET WebForms.
I'm so happy that this finally got out, so hopefully I'll hear about people starting to use IronPython in ASP.NET much more. Consult http://codeplex.com/aspnet for any questions about roadmap or tutorials, and feel free to ask me questions as well.
by Jimmy Schementi (noreply@blogger.com) at September 24, 2008 01:21 AM
by Fuzzyman (noreply@blogger.com) at September 23, 2008 03:54 PM
by Fuzzyman (noreply@blogger.com) at September 23, 2008 03:36 PM
The latest version of NWSGI, built for IronPython 2.0 Beta 5, has been posted. There are a couple of changes in this version: one breaking change and one new feature.
To fit with convention, the configuration elements now start with lowercase letters - i.e. Wsgi => wsgi, OSEnviron => osEnviron, etc. This has a consequence because XML is case-sensitive, so the old configuration elements will not be picked up and the defaults will be used instead.
Script mappings can be used to create a virtual .wsgi file that points to a file elsewhere on the filesystem. For example:
<scriptmappings>
<scriptmapping scriptname="dispatch.wsgi" physicalpath="C:\myapp\dispatch.wsgi">
</scriptmappings>
Rather than copy the dispatch.wsgi file into the web aplication directory, any request to dispatch.wsgi will be mapped to c:\myapp\dispatch.wsgi instead. This example is a bit trivial, as an IIS virtual directory could probably be used, but it could be useful for any application that ships a .wsgi file.
I'm working on building an IIS7 admin interface for all of this; it's a bit of a mess right now because the advanced UI tricks aren't really documented that well. I'm hoping to have the IIS7 admin and the installer ready by the time IronPython goes 2.0.
by jdhardy (jdhardy@gmail.com) at September 23, 2008 03:45 AM
by Fuzzyman (noreply@blogger.com) at September 22, 2008 08:16 PM
by Fuzzyman (noreply@blogger.com) at September 22, 2008 07:51 PM
by Fuzzyman (noreply@blogger.com) at September 21, 2008 10:52 AM
by Fuzzyman (noreply@blogger.com) at September 21, 2008 10:45 AM
by Fuzzyman (noreply@blogger.com) at September 21, 2008 10:35 AM
by Fuzzyman (noreply@blogger.com) at September 20, 2008 08:39 PM
by Fuzzyman (noreply@blogger.com) at September 20, 2008 08:33 PM
IronPython Desktop Application will pass userid, password to AppEngine Application, which in turn will validate with Google Accounts Authentication service. If authenticated, AppEngine application will proceed; else it will pass the error back to the desktop application.
by Fuzzyman (noreply@blogger.com) at September 19, 2008 01:24 PM
by Fuzzyman (noreply@blogger.com) at September 19, 2008 11:01 AM