Disclaimer: this is an automatic aggregator which pulls feeds and comments from many blogs of contributors that have contributed to the Mono project. The contents of these blog entries do not necessarily reflect Novell's position.

October 06

Mono 2.0 is out!

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 (And Unity3D is soon coming 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: Open Source Compilers: Commercial Compilers:
  • ISE's Eiffel.
  • Microsoft's C#.
  • Microsoft's F#.
  • Microsoft's VB.NET.
  • RemObject's Oxygene (Object Pascal).
And many more.
Core API:
  • 2.0 core APIs.
  • System, System.Xml.
  • 3.5 System.Core.
  • System.Drawing.
  • System.DirectoryServices.
  • System.Web.Services.
Windows.Forms 2.0:
  • Win32 driver.
  • Quartz/OSX driver.
  • Cairo/X11 Unix driver.
ASP.NET 2.0:
  • Core ASP.NET.
  • ASP.NET AJAX.
  • Apache and FastCGI integration.
ADO.NET 2.0 plus providers for:
  • Managed drivers: Postgresql, MS SQL Server, Sybase.
  • Semi-managed drivers: Firebird, IBM DB2, Oracle, Sqlite.
  • MySQL provides their own drivers.
GUI APIs:
  • Gtk# (Unix, Windows, MacOS X).
  • Cocoa# (MacOS X).
Mono Core:
  • Mono.Addins - Extensibility Framework.
  • Mono.Cairo - Cairo Graphics Binding.
  • Mono.Cecil - ECMA CIL Manipulation.
  • Xml.Relaxng.
  • Novell.Directory.Ldap
  • C5 - Generics Library.
Linux Specific: Other Ecosystem Libraries:
  • Bit# - Bittorrent client/server library.
  • Mono.Fuse - User-space file systems.
  • Mono.ZeroConf - Bonjour stack.
  • Mono.Nat - Network Address Translation.
  • Mono.Upnp - Universal Plug and Play.
  • Tao Framework - OpenGL, OpenAL, SDL and Cg bindings.

We have ported Mono to a wide variety of platforms and operating systems on this 1.0 to 2.0 cycle. These platforms include:

  • Linux (x86, x86-64, PowerPC32, Itanium, SPARC, ARM, s390, s390x.
  • Solaris (x86-64, SPARC).
  • MacOS X (x86, PowerPC32).
  • Windows (x86, support for x86-64 will come in Mono 2.2).
  • Nintendo's Wii.
  • iPhone/iPod Touch (ARM, limited functionality due to licensing requirements; I will blog later this week about this).
  • *BSD (x86, x86-64).

Developing with Mono

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.

Runtime Changes

The Mono Virtual Machine gained plenty of features since Mono 1.2 was released. We have added:

  • Generic Code Sharing and VTable Compression have been implemented: this significantly reduces the use consumed by generic type instantiations, while still getting the speed benefits of using generics.
  • AOT support: in addition to x86, we now also support ARM and x86-64.
  • COM inteop is now complete (works on Windows with "real COM" and can be used on Unix with Mainsoft's COM or Mozilla's XPCOM).
  • AOT code can now AOT parts of 2.0 assemblies (assemblies that contain generics).
  • Full AOT support (allows code to run JIT-less, this is limited to 1.0 code).
  • CIL Verifier: Now Mono has a CIL verifier.
  • CoreCLR Security: the security system used by Moonlight.
  • Many optimizations that improve execution performance: New intrinsics operations (Math.Min/Max for example); various opearations are now inliend by the JIT; managed allocations (no transition to unmanaged code for allocating memory); multi-array access is now tuned by the JIT; constant and block initializations are now handled by the JIT; Faster initialization and access to multi-dimensional arrays (4x faster).
  • The runtime went on a diet, many runtime data structures are smaller making Mono lighter.

Tools

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 compiler do not typically check or have not historically checked.

Feedback

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

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 spend extra hours to get all the bits and pieces in place for the release.

Mono Amazing Release

Mono 2.0 has been released. It is a major release with a lot of bug fixes and new features. The main changes are the compiler upgrade to C# 3.0 with LINQ and the inclussion 2.0 version of ADO.NET, ASP.NET and System.Windows.Forms, which is more than enough for a 2.0 release. Please, go to Mono site to read more.

With this release, I hope Mono could attract a lot of new contributors and enterprises that depend on .NET and want to migrate their systems to Linux.

I encourage any .NET developer to try Mono 2.0, it has the actual heart of multiplatform and multilanguage development. Moreover, this release should be included in any Linux distribution, I hope this release is in time to be included in Ubuntu 8.10 (Intrepid Ibex) and soon to be backported to other distributions that has been released yet (Thanks Meebey to always let us have Mono in Ubuntu & Debian so soon after their release).

Npgsql2 Final Released!!

Hi, all!

The Npgsql Development Team is proud to announce the Npgsql2 RTM!

Npgsql is a .Net Data provider written 100% in C# which allows .net
programs to talk to postgresql backends. Npgsql is licensed under BSD.
More info can be obtained from http://www.npgsql.org


After almost two years of development since Npgsql 1.0, Npgsql 2
brings new features and support for newer versions of .Net.

Although externally Npgsql2 doesn't seem very different of Npgsql1
regarding features, internally Npgsql2 had a lot of improvements which
represents a much more stable product, more bugs fixed and many
implemented methods. It is strongly advised that current users update
from Npgsql1 to Npgsql2.

Main features are:

Support for .Net 2.0 and 3.5

Josh Cooley did a great job and added support for EntityFramework.

Npgsql2 now doesn't read all table contents before returning control
to user code. This makes Npgsql much more memory efficient when
dealing with large tables. Thanks Jon Hanna for this.
Check User Manual for more info about that and how to revert to old
behavior of loading all data if you need it.

Thanks to Daniel Nauck, Npgsql now have support for ASP.Net providers.
You can visit Daniel project page at:
http://dev.nauck-it.de/aspsqlprovider/


You can see full changelog and release notes here:
http://pgfoundry.org/frs/shownotes.php?release_id=1230


You can dowload it from here: http://downloads.npgsql.org


For instructions about how to use NpgsqlFactory, check out our User Manual:
http://manual.npgsql.org

Please, give it a try and let us know if you have any problems.
Check out our forums: http://forums.npgsql.org

Mono 2.0 has been released

Mono's 2.0 grand release has finally arrived.

See our detailed release notes covering both the 2.0 launch and the changes since Mono 1.9.

Or you can go directly and download Mono 2.0 for your platform.

October 05

Parallel-Installable Gtk-Docs

I recently release GMime 2.4.0 but missed the fact that the gtk-docs would install into the same location as the old 2.2 docs, namely ${prefix}/share/gtk-doc/html/gmime. Thwe problem is clear, since GMime 2.4 changed API (rather than just extending the 2.0/2.2 API), GMime 2.4 really needs to be fully parallel installable.

Thanks to Gilles Dartiguelongue from the Gentoo community for discovering this and bringing it to my attention.

As I tried to figure out how to accomplish what I needed, I discovered that Gtk-Doc needed some fixes so I did a quick hack and submitted it upstream.

Unfortunately, my original fix was broken in that I didn't realize that a simple version extension to the install directory wouldn't be enough because GNOME's devhelp program expected the .devhelp and .devhelp2 files would be named with the same version extension, or they would not be detected.

After that was pointed out to me, I looked deeper into the problem and discovered it wasn't such a terribly hard fix afterall, just a little shell scripting magic was all that was needed ;-)

Since Stefan Kost (the gtk-doc maintainer) and myself were both interested in such a solution, I figured there must be other library maintainers who would be interested in this and so thought I would blog about it.

For those interested in packaging GMime 2.4.x for the various distros, I'll be releasing a 2.4.2 release in the next day or so (going to wait a little longer just in case anyone finds any other last minute parallel-install bugs in the gmime-2.4.1.1 tarball I put together for testing; it's bad enough that I've already released a gmime-2.4.1 with nothing but parallel install fixes and that 2.4.2 will be more of the same, I'd rather not have to issue a 2.4.3).

October 04

Why didn’t Nokia change Qt’s licensing model?

Background

Licensing issues have always surrounded Qt. The GNOME project was started partially because at the time, Qt was closed-source and there was a need for a free software desktop. Today, Qt is dual-licensed: GPL and commercial, so KDE is certainly a free software desktop just as GNOME.

However, the GTK/GNOME library stack has one major difference: it is LGPL. Why does this matter?

Commercial development. Now, please don’t get me wrong - I’m a huge fan of free software and the GPL, but there are certain situations where GPL is not an option. A example is an ISV with a flagship free, open source product who wants to sell customizations to businesses. These customizations would likely contain code to access proprietary internal systems, and are just not something this ISV would be able to release to the wider world.

Nokia, Trollltech, and mobile development

After hearing about Nokia’s acquisition of Trolltech, I started thinking about why they bought them, and what their plans are.

My initial thought was (written from Nokia’s point of view):

Wow, the iPhone is a very nice phone - and a very nice software platform, people love writing iPhone applications. Right now, most of our phones are based on Java Mobile or Symbian, which nobody really enjoys. We could try to write our own new platform, but that would take a lot of time… and hey! There’s this thing called Qt which is arguably just as good as Cocoa, and already has a lot of developer support. Let’s buy them and adopt it as our future phone platform, and build a great community of both open source and commercial developers.

Then I realized there’s a serious flaw with this theory: Nokia has maintained Qt’s dual-licensing model as-is.

Qt is now the only mobile phone platform that costs money to develop with.

Sure, Apple and other companies charge a per-release fee to digitally sign your application, make it available for download, etc… but Qt is different. Qt licenses are sold on a per-developer basis. But that’s not the worst part:

You must purchase a Qt Commercial License from Qt Software or from one of its authorized resellers before you start developing commercial software. The Commercial license does not allow the incorporation of code developed with the Open Source Edition of Qt into a commercial product.

Qt is the ONLY framework I can find that forces you to shell out before you have a single line of code written. This completely prevents developers from experimenting, and makes the platform unreachable to individuals and startups. You’re either all in or all out - there’s no middle ground.

Let’s compare that to other mobile platforms:

Name Costs
iPhone Free SDK; a one-time $99 developer fee for an unlimited number of applications; 30% of app sales to cover hosting and distribution costs or free distribution and hosting of free applications
Windows Mobile Free SDK
Blackberry Free SDK; You can get your app signed/certified but its not required, and most people dont bother
Palm Free SDK
Symbian Free SDK; $200 per year; $20-$500 signing fee per application release depending on type of application
Java ME Free SDK; Presumably on its way to being open-source along with the rest of java
Android Free/open-source SDK
Qt Unknown per developer cost at start of development. Pricing information is unavailable online, and they’ve been completely ignoring a friend’s sales inquiry. A commercial Qt linux desktop license was around $3,500 earlier this year.

Note I’m only comparing platforms that anyone to publish software. BREW doesn’t count because you have to form a business deal with the carrier to make apps available (Verizon “Get it now”, etc.). Also please let me know if you have any additional information to add to this table - companies seem to go out of their way to make this information extremely hard to find.

Qt is unique - no other platform works this way. With this sort of pricing structure, Nokia Qt phones will never see the type of developer interest that we’re seeing with the iPhone and Android.

But Nokia certainly knows this, so why not change things? It’s hard to say - maybe they aren’t excited about the cell phone industry becoming more open, maybe they think they can make more money off of a small number of Qt licenses than thousands of developers under the iphone model. And how does Maemo fit into all this?

Qt is a really great toolkit - it’s a real shame to see its potential squandered.

You may have noticed that almost everything here applies beyond the mobile realm too. KDE is the only modern desktop platform out there without a free commercial SDK. I suppose it really is the true free software desktop.

Five Second Linux Boot

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.

October 03

Moonlight Update: Media Codecs

A couple of weeks ago we started the work on porting Microsoft's Media Codecs to Linux and we got the C version running.

Popfly in Firefox3/Linux/x86

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.

monodevelop-python revisited

Development on my python addin for monodevelop has gone so quickly that I've gotten pretty excited about working on it. It has come from realization to working code in just a few short days. So I thought I'd put together a little overview of what I have added this week and where I'd [...]

Setting Up a Multi-Tabbed GNOME-Terminal Development Environment

For many developers (such as myself), the first thing we tend to do when we login to our desktops, is to launch gnome-terminal (or similar) with a number of tabs and then will typically have to setup a bunch of environment variables in each tab.

Most of us have probably simplified this at least somewhat by creating a file that sets our environment variables for us when we do
. ~/project.env
or something to that effect.

The problem is that if we have multiple tabs that we've got to source our project.env files in, this gets tedious.

This morning, Rolf shared with me a way to spawn gnome-terminal and have it automatically cd into a list of specified working-directories... but I wanted to take it a step further and have gnome-terminal auto-magically source my project environment variables.

Here's how I solved this problem:

* Step 1: Create a ~/bin/devterms shell script:
#!/bin/bash -e

MONO_ENV="/bin/bash --rcfile ~/.devtermsrc -i"

gnome-terminal \
--tab --working-directory=/cvs/moon --command="$MONO_ENV" \
--tab --working-directory=/cvs/moon/test --command="$MONO_ENV" \
--tab --working-directory=/cvs/mono --command="$MONO_ENV" \
--tab --working-directory=/cvs/monodevelop --command="$MONO_ENV" \
&


* Step 2: Create ~/.devtermsrc rc file for bash:
# Load ~/.bashrc to setup all of my standard environment variables and aliases
test -s ~/.bashrc && . ~/.bashrc || true

# Load Mono-specific development environment variables
test -s ~/mono.env && . ~/mono.env || true


* Step 3: Create a launcher (in my case, I made ~/Desktop/Development Environment.desktop):
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name[en_US]=Development Environment
Exec=/home/fejj/bin/devterms
Name=Development Environment
Icon=gnome-terminal


Hopefully this will help other people make their own lives a little simpler.

October 02

Who loves lamdas?

I finally started a project where I can use all the new fanciness. How would you process a list of names so that each name is printed out 'i' times?

int i = 5;
IEnumerable<string>() names = new List<string>() { "Alan" };
names.ForEach (n => i.Times().Apply(j => Console.WriteLine(n)));

All your lambdas are belong to us!

Top-level Projects for Upstream

One of my favorite ways to abuse the openSUSE Build Service is to link the packages I want to use into my home project. This is remarkably convenient but it wastes CPU cycles and disk space. It’s generally considered A Bad Thing™. But there are some good reasons why I do it [...]

Microsoft changes the Managed Extensibility Framework License

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!

Webserver for NUnit tests

What's the best way of setting up a simple HTTP file server to be used purely for NUnit tests. What I'm looking for is a way to set up a server so that I can host some files in. My NUnit tests will then initiate HTTP requests to 'download' those files.

Ideally whatever method I choose won't require me to write temporary files to disk. Currently what I do is host a HttpListener and manually fulfill the requested data by creating an in-memory byte[] and writing that into the response. I'd like to do something like:

webServer.Add("path/where/file/is", CreateFakeByteArray());

Then the server will fulfill requests from this faked byte[].

The reason for this setup is that I need a better way to test my implementation of WebSeeding in MonoTorrent without having to code up my own buggy file server ;)

October 01

DbLINQ, LINQ to Databases and Mono

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.

Mono at the PDC 2008

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.

Mono's Linq to SQL effort based on DBLinq

One of the recent project I am sort of involved is an ongoing effort to implement System.Data.Linq.dll, a.k.a Linq to SQL, with DBLinq project. DBLinq is designed to be like Linq to SQL, but opens the door to support more database systems than SQL Server.

The Bootstrap

When I was asked to get involved in Linq to SQL work in this spring, I drew a rough sketch to implement S.D.Linq.dll based on DBLinq. In the middle of May, Jiri Moudry, one of the core DBLinq hacker, was also starting to work on Mono support. Occasionally we were in the middle of Google Summer of Code (SoC) program (beginning phase) and there was a student who was interested in Linq to DB. The student, Pablo Iñigo Blasco, became the core hacker of this effort. In fact, at first I was rather cautious about it: I haven't drawn good-enough picture of how to get every party involved yet, and especially I definitely needed to talk with DBLinq hackers.

Actually, at first I wrote System.Data.Linq API implementation as a wrapper on top of DBLinq. At that time, DBLinq was designed to be dependent on System.Data.Linq.dll. I thought that I had to resolve this issue (as it is a circular dependency), but it turned out that Pascal Craponne, another core DBLinq hacker, explained their plan to implement System.Data.Linq API by themselves(!) I quickly discarded my implementation and started rethinking about the SoC project with Pablo, which now became much hopeful than before. After all, it started off so well.

DBLinq changes for "Mono_STRICT" mode

When the SoC project started in June, the DBLinq team was busy on "sugar" expression tree implementation. So, I asked Pablo to start from writing samples for DBLinq which could be later ported to use S.D.Linq API. He did awesome job.

In the middle of June, as Pascal finished the first sugar work, we started to talk about Mono integration. Including the purpose to clean up the code, they introduced #if MONO_STRICT code.

Our need for the API was however somehow messy: we had to eliminate extra API members from the resulting System.Data.Linq.dll. And DBLinq itself is extensible enough to allow developing third party "vendor" API and hence exposing a lot of extra members. I had messy concern; I was afraid of getting final System.Data.Linq.dll cutting extra database support than SQL Server, since SQL Server is the only public vendor in System.Data.Linq API. (The concern didn't go away until recent talk.)

After a lot of discussion, Pablo came up with his nice Roadmap to build both DBLinq full and Mono's System.Data.Linq from the same code base, and he quickly made it.

Pablo continued and continues contributing to DBLinq project. I'm extraordinary glad to see his achievement and continuous participation to the project. I thank to all those guys who made it happen :)

Trying it out

Currently we still haven't integrated DBLinq source into our mcs tree yet. Though, I often create System.Data.Linq.dll based on their effort. For now, I have an archive: System.Data.Linq-20080930.zip - replace existing mcs/class/System.Data.Linq with the expanded directory, renamed as System.Data.Linq. And then run make (you need make clean).

As the end of the Soc project, we needed a working sample code for review. So I asked Pablo to cook some instruction, and he wrote it. With the latest svn version the test somehow hit NotImplementedException in "sugar" now, but it'd show you current DBLinq / System.Data.Linq implementation status.

A problem is that the current System.Data.Linq.dll contains only support for SQL Server, so you have to use it for now.

Help DBLinq effort

Yes, there is not a few things that need to be implemented. DBLinq project guys are calling for contributions. If you are interested in joining the effort, that'd be awesome. It helps Mono too.

Other than DBLinq (and System.Data.Linq) itself, there are also some interesting stuff to help this effort: ASP.NET LinqDataSource control in .NET 3.5 SP1 uses Linq to SQL, so implementing it will help dogfooding System.Data.Linq API. DynamicData may also help dogfooding, but that needs some extra love (it looks dependent on LinqDataSource). There's a lot of fun stuff here.

Microsoft to incorporate jQuery into Visual Studio

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.

C# father Hejlsberg, talks about the language and cites Mono and Moonlight

I've read an Anders Hejlsberg's interview about C# history and future. It is scant on future details for C# 4.0, but nevertheless interesting.
A good thing in it, too, is that he cites favorably projects Mono and Moonlight on the middle pages.

:)

Smart Client Software Factory on Mono

Recently, Miguel posted that Microsoft's Enterprise Library 4.0 is now available under the Ms-PL, a Mono compatible open source license. This week, I downloaded the Smart Client Software Factory (SCSF) to see if it would run under Mono. It comes with a QuickStart tutorial called BankShell that I used to test with.

I hit two bugs in Mono:
430932 - IsolatedStorageFile.GetStore throws exception
431001 - Exception using XmlTextReader after stream is disposed

I also hit one bug in the SCSF:
18740 - ModuleInfo constructor not cross-platform safe

After commenting out or working around the offending lines, the BankShell application popped up and seemed to work nicely.



The sample application looks simple, but it's actually pretty complex. Each UI element is in a different assembly. The "composite application" dynamically loads each one and places them. The theory is that the application can be broken down into smaller pieces that can be distributed to different teams to build and maintain, and the results are put together to form the whole application.

monodevelop-python

Back in February, while at Brainshare, I started putting together python support for monodevelop. It was just basic project file support and a compiler. After Eric mentioned to me that we aren't running enough of our own software every day, I figured I should make this something I can use. Therefore, I added a [...]

September 30

Touching Banshee, Porting Tasque

Toward a more clickable Banshee

I've written on a patch to make the artist and album text in the Banshee track info display interactive. 95% of the time I am listening to my library on shuffle, and sometimes I hear a song and decide I want to hear more from that artist or album. Well, with my patch, you can click on either to perform a search on your library.



You can also right-click and add the album or all tracks by the artist right to the play queue, which is my favorite Banshee trick now. Have you ever used the Banshee Play Queue? It's really cool...if you're listening on shuffle and you add a bunch of stuff to the play queue, it will play those items in order and then go back to shuffling through your library (or whatever you were listening to before you shoved stuff into the queue).



Click to see low-quality demo on YouTube.

So why is this still just a patch and not in Banshee SVN? Well, really, it's kind of ugly, don't you think? Here's this pretty Banshee UI with some gross hyperlink-looking text in the middle of it. What do you folks think I should do?
  • Use a different color, like "Selected"?

  • Only change the text color on hover?

  • Both?

The only thing I like right now about having it colored all the time is that it makes the feature more discoverable. But is it worth it? Any thoughts on the appearance or behavior of this feature? If you build Banshee from SVN, give it a try and see what you think!

I'm busy lately so if somebody else wants to mess with this bug, be my guest. It won't get into SVN until after Banshee 1.4 is released, anyway. ;-)


Tasque Goes Cross-Platform

I couldn't sleep Thursday night, so I yanked some of my code from tomboy-portable2 and got Tasque going on Windows. Then I decided Tasque is simple enough to play with that I'd better get it going on Mac OS X, too. This weekend I even put together I nice little disk image for Mac users. Big thanks to Eoin Hennessy for creating Mono bindings to Immendio's Mac/GTK+ integration library. The next Tasque release will be equally supported on Linux, Windows, and Mac, so feel free to start filing bugs.





Really this is just an excuse to try stuff out for Tomboy.

September 29

Gendarme News Week #39, 2008

at 9/29/2008 7:09:56 PM poupou said...

I've been tuning two new Gendarme rules this weekend on Mono class library source code. A few more tweaks and it should land in SVN.


at 9/23/2008 9:23:13 PM poupou said...

Completed the documentation of Gendarme Correctness rules. Will start the Design rules tomorrow night...


Read older news...

Monovation: Assembly Injection into Live Processes

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.

A GUI Shell

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).

Security of Agents

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.

Visual Studio 2010 and .NET Framework 4.0

Looks like jQuery in .Net isn’t the only news today. Microsoft announced Visual Studio 2010 and the .Net Framework 4.0. Looks like the focus of those releases will be: With Visual Studio 2010 and the .NET Framework 4.0, we are focused on the core pillars of developer experience, support for the latest platforms spanning client, server, services [...]

Disabling a button inside an UpdatePanel causes events to fire twice in Firefox

Those of you who do a lot of web development like me are used to occasional issues where client side code doesn't work the same across browsers, but less common and perhaps more pesky are bugs where things run differently on the server depending on the browser. We typically don't expect things to happen differently on the server due to the browser but sometimes they do.

I ran into this strange issue where events were firing twice for postbacks from Firefox but were firing normally when using IE. When you see double postbacks happening in the log, your first thought would be that the impatient user clicked the button twice, but in this case I knew that wasn't true because I was the user and also I have code to disable the button after it is clicked to prevent double postback. There is a very common technique used by many ASP.NET developers to do this. In mojoPortal we have a helper method that encapsulated it so we just pass in the button and text to show when its disabled like this:

UIHelper.DisableButtonAfterClick(
btnUpdate,
Resource.ButtonDisabledPleaseWait,
Page.ClientScript.GetPostBackEventReference(this.btnUpdate, string.Empty) );
 

and the guts of the method look like this:

public static void DisableButtonAfterClick(
WebControl button,
string disabledText,
string postbackEventReference)
{
if (button == null) return;
button.Attributes.Add("onclick", "this.value='"
+ disabledText
+ "';this.disabled = true;"
+ postbackEventReference);
}

The irony of it is that disabling a button inside an updatepanel actually causes double post back if the browser is Firefox. So the very code we are using to try and prevent double postback actually causes it to happen. All the events fire twice, OnInit, PageLoad and the button click event. Very strange indeed. The symptom doesn't happen in IE, and removing the code that disables the button fixes the problem in Firefox and events fire normally again, that is just once. So we are back to the problem of how to prevent the user from clicking the button twice if the button is inside an UpdatePanel. Our old way works in IE (and works in general outside of UpdatePanels) but actually causes double postback in Firefox.

I did some googling and found where someone else has reported this. I also found a free dll that solves it, but its not open source so I can't use it.

I wish I was posting a solution for this problem, but for the moment I've just gone with not disabling the button. If I find a good solution I'll update this post. but thought it worth mentioning for anyone else who is seeing double postbacks in Firefox. I will say my searches found a number of things that can cause double postback in Firefox, so this isn't the only possible cause to consider. For example if a page has an <asp:Image on it and the ImageUrl has not been specified, that apparently also causes double postbacks in Firefox.

 



Joe Audette  ...

Vista 64 bit Is the Place to be for Developing in Visual Studio

I've finally come full circle and am happy developing on Vista again. I was an early adopter and over time I've complained about Vista a few times, so I think its only fair to be just as vocal now that I'm happy with it. In retrospect I think the main problem was that I upgraded a machine that was several years old and it just wasn't powerful enough.

Ever since I got new workstation, development has been a joy, productivity is high. Visual Studio solutions load fast, build fast, and debug fast. With 64 bit Vista you can use a lot more ram. I've got 8 gigs now where before 32 bit Vista/XP could only use 3 gigs. I've got a fast dual core processor (if I had it to do over I would spend more and go quad core). Also 10,000rpm drives make a big difference.

I can't even imagine going back to a 32 bit machine for day to day development. If you are struggling with VS on a slow machine its well worth the investment to get a new 64 bit workstation.



Joe Audette  ...

Tip/Trick Creating tabs in the mojoPortal Html Content Module

In the mojoPortal 2.2.7.3 release announcement, I mentioned that we changed from ExtJs tabs to YUI tabs in mojoPortal. One side benefit of this is that its now possible to create tabs in your content using the editor.

In the past this wasn't possible. I had written a .NET wrapper control around the ExtJs tabs, but only developers could use that, there was no simple way to create tabs right in your content. The integration with YUI tabs is a little looser, I have not implemented a .NET control for it yet though I may do so in the future. But the main scripts for YUI tabs are included by default, so you can paste a simple chunk of markup into the source view of the editor to get the start of your tabs, and then you can edit it from there to add more tabs or change the labels and contents of the tab.

Now you won't see the tabs in the editor, but when you save it you will see the tabs.

To try it out, add an Html Content instance to a page in your mojoPortal site or on our demo site. Click the edit link to edit the content, then click the source button to see the raw markup view. Now paste in this:

<script type="text/javascript">
var myTabs = new YAHOO.widget.TabView("demo");
</script>
<div class="yui-skin-sam">
<div id="demo" class="yui-navset">
<ul class="yui-nav">
<li class="selected"><a href="#tab1"><em>Tab One Label</em></a></li>
<li><a href="#tab2"><em>Tab Two Label</em></a></li>
<li><a href="#tab3"><em>Tab Three Label</em></a></li>
</ul>
<div class="yui-content">
<div><p>Tab One Content</p></div>
<div><p>Tab Two Content</p></div>
<div><p>Tab Three Content</p></div>
</div>
</div>
</div>

Save, and you will see something like this:

screen shot of YUI tabs

At some point when I implement content templates I will make it easy to do this by selecting a content template, but thought I would mention it for the more html savvy users.



Joe Audette  ...

Form Wizard Pro Is Now On Sale!

I'm happy to announce the first public release of Form Wizard Pro version 0.0.0.2

With Form Wizard Pro installed in your mojoPortal site, you can easily create custom forms for capturing data from your visitors.

Features at a Glance

  • Easily design forms with Text, Paragraph, Multiple Choice (radio buttons), Checkboxes, dropdown lists, Date, or sliding scale question types.
  • Re-arrange questions using drag and drop
  • Option to receive email notifications when a form is submitted.
  • Export form submission data to .csv (Comma Separated Values) for analysis in Excel or other spreadsheet programs.
  • Optional Captcha to prevent spam submissions by automated bots

Form Wizard pro edit screen

Pricing/Licensing

As I'm sure you can imagine, its very difficult to make a living if you give away your products. In order for me to be able to continue working on mojoPortal full time I need some revenue stream. In an ideal world I suppose I would get enough donations to make a living, but in the real world this does not happen. Only a very small percent of people who use mojoPortal ever make a donation or buy me a beer. So the strategy for funding my continued efforts on improving mojoPortal includes selling some premium features that are not included in the free version of mojoPortal. If you are getting a lot of value out of the free version of mojoPortal, consider purchasing our premium features. Every purchase helps provide for the long term vitality of the project by providing funding for continued improvements.



Joe Audette  ...

Microsoft To Ship Open Source Package With .Net (jQuery)

A few days ago if you asked me if Microsoft would ever include an open source piece of code in one of their products, I would say you were insane just for asking! There’s no way! Well, Microsoft is planning to amaze me along with everyone else. ASP.Net and Visual Studio will start shipping with the [...]

September 28

tee-sharp a.k.a. CopyStream

How many times do you have one stream, but you actually want to write the data to multiple places simultaneously[0]? Well, now you can[1]!

I took an hour and spun up this awesome asynchronous beast of a stream splitter. There is an optimisation that could be applied to it: Reads can be performed at the same time as writes. I figured that for a 1.0 implementation, this was good enough. If anyone wants to try their hand at making the read perform in parallel with the writes, feel free. Patches are welcome ;)

[0] http://tirania.org/blog/archive/2008/Sep-24.html
[1] http://www.monsoon-project.org/jaws/data/files/TeeStream.cs

EDIT: There's also a 'deliberate' bug there. 10 points to the first person to spot it and bonus 10 points if you can fix it with less than 5 lines of extra code.

Public Service Announcement

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.

September 26

More Reflection.Emit Brokenness

Pardon me if I sound a little bitter today, but I just wasted almost a full day trying to work around this bug only to be stopped by yet another bug that makes it impossible to generate two mutually dependent assemblies with Reflection.Emit.

Also, while debugging I noticed another mind bogglingly stupid bug in the System.Reflection.Assembly source:

public override int GetHashCode() { return base.GetHashCode(); }

Why would you want to do that? Oh, of course! It's to get rid of a compiler warning... If you override Equals() you should also override GetHashCode(), BUT NOT LIKE THIS.

Here's small program that demonstrates the problem:

using System;
using System.Reflection;
using System.Reflection.Emit;

class Program
{
  static void Main()
  {
    AssemblyBuilder ab1 = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("A"),
                            AssemblyBuilderAccess.Run);
    ModuleBuilder mod1 = ab1.DefineDynamicModule("A.dll");
    TypeBuilder tb1 = mod1.DefineType("T");
    Type type = tb1.CreateType();
    Console.WriteLine(ab1.Equals(type.Assembly));
    Console.WriteLine(ab1.GetHashCode() == type.Assembly.GetHashCode());
  }
}

This prints out:

True
False

That clearly violates the Object.GetHashCode() contract.

September 24

Love World Domination!

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.

Stream.CopyStream

Funkists, why does System.IO.Stream not have a CopyStream method, it seems like everyone ends up implementing this.

Discuss.

FormWizard Pro is almost ready

I've almost finished my second premium feature for mojoPortal. The feature will be called FormWizard Pro and you can try it now on the demo site.

Any feedback on the product is much appreciated. The Form Wizard Pro feature makes it easy to create arbitrary ad hoc forms for capturing input from your site visitors. You can create as many instances of forms as you like on as many pages as you like. It supports Text, Paragraph, Radio Button lists, Checkbox lists, Dropdown lists, Date, and Sliding Scale questions. You can re-arrange the questions using drag and drop, and you can export the submitted data as CSV (Comma Separated Values) which can be opened in Excel or other spreadsheet programs for analysis.

Here is a little snippet of the edit screen, but to see how it really works just try it out on the demo site.

form wizard pro screen shot

I hope to have it on sale very soon.



Joe Audette  ...

IKVM 0.38 Release Candidate 0

As with previous release candidates, this release includes strong named binaries and is considered to be (nearly) ready for production use. Please test this version and give feedback as soon as possible.

Changes since previous snapshot:

  • Changed version to 0.38.0.0 and strong named binaries.
  • Added missing HTMLEntities.res resource.
  • Re-introduced workaround for .NET JIT bug that causes .cctor not to run when a DynamicMethod invokes a method or gets/sets a field.

Binaries available here: ikvmbin-0.38.0.0.zip

Sources: ikvm-0.38.0.0.zip, classpath-0.95-stripped.zip, openjdk6-b12-stripped.zip

September 23

Captchas, a bridge too far?

I was just trying to open a new gmail account when I encountered the unsolvable captcha. I couldn't for the life of me figure out what was written in that horrible mangled imagine of what i can only assume were standard roman-alphabet letters. I can only assume that I am in fact illiterate and that would explain why I couldn't read it.

Thankfully, google have a second option. They have a little link which reads out the captcha for you. It turns out that I can't understand english either. I couldn't make out a word of what was said. So, if anyone out there can speak english, could you please decypher this for me:

http://monotorrent.com/GoogleSucks.wav

Tomboy 0.12.0 Released

Yesterday I unleashed the latest stable Tomboy release. This has been a less active cycle than usual, but in 0.12.0 you can experience the wonder of:

  • New Tasque add-in

  • Add "New notebook..." menu item to Notebook toolbar button

  • Many fixes to note synchronization

  • Improvements to Bugzilla and HTML Export add-ins

  • Tray icon ported to Gtk.StatusIcon

  • Support for --debug, --trace, and --profile when running Tomboy
The following contributors were especially helpful in making Tomboy 0.12.0 happen: Boyd Timothy, Alex Graveley, Alexey Nedilko, John Anderson, John Carr, Jon Lund Steffensen, Łukasz Jernaś, Romain Tartiere, Sebastian Dröge, Stefan Cosma, and Stefan Schweizer. A big thank you to them, and to our hard-working translators, too!

The lack of activity during the 0.11.x cycle has disturbed me (especially because it's mostly my fault!), and I've written to our mailing list about how I think we can do better this cycle. One easy way you can help is by voting for your "favorite" Tomboy bugs.

I'll write more about plans for our next stable release after we have our dev meeting, but you can be sure that I haven't forgotten our proprietary compatriots. I'll be merging the tomboy-portable2 branch into trunk Real Soon Now.

GarageGeeks hosting Microsoft Strategic Trends

GarageGeeks and Yossi Vardi invite you to another meeting with industry leaders.

Strategic Trends: Hosting Microsoft adCenter VP Alexander Gounares

ms_invite.jpg

As Corporate Vice President, adCenter and Commerce Platforms, Alexander Gounares is responsible for leading the engineering efforts for Microsoft's core advertising platform and commerce technologies (including payments, points, and subscriptions).
Before taking this role, Gounares was the Corporate Vice President for Corporate Strategy, where he was responsible for helping set the overall set the overall strategic direction for the company. Prior to that, Gounares spent three years as the technology assistant to Bill Gates, Microsoft's chairman, and he was also responsible for helping formulate and drive the technical strategy for the company. Gounares has been involved with many initiatives across the company, covering everything from search to workflow technologies to new Internet services such as Microsoft Virtual Earth and a number of yet-to-be announced products.

The event will take place on Wednesday June 25th, 21:30, Garage HQ (Hapeled 40, Holon).

IMPORTANT!!!: Please update the Wiki (wiki.garagegeeks.org) with food drinks that you will bring.

please tag photos and videos as GarageGeeks and HGLP

DisrupTV convention


Feng-GUI for Videos will be demonstrate at DisrupTV convention (23 May). We will show how to predict people's attention in videos, commercials, and games.

Disrupt.TV
is an un-conference intents to bring together Israeli and global Technology, content and creative talents that are taking part in creating the future of TV and media for sharing knowledge, exploring the opportunities and to spark new ideas about how TV and Video will change us and we will change TV.
It is aimed for people who are in the conjunction of Media, Content, Creative and Technology.

Kick Ass Free Media Centers

image001.jpg

GarageGeeks and HomeTheater.co.il are happy to invite you to a special session about free media centers. Power users and developers will demonstrate some of the leading free media center applications for different platforms with diffierent capabilities -- movies, music, pictures, PVR, internet services, social features....

Our presentors (list subject to change):
* BOXEE - Social Media Center (Open Source) - Tom Sella and Idan Cohen
* MythTV - Homebrew PVR solution for Linux (Open Source) - Ran Nachmany (a.k.a Shed)
* Tvitty - Free media downloader plugin for Microsoft Media Center - Gil Hirsch
* XBMC - Cross-platform media-player (Open Source) - Yuval Tal (Tentative)
* MediaPortal - The open source media center for Windows - Tentative

When: 24/7/2008 at 20:00
Where: GarageGeeks, 40 Hapeled St, Holon

Please bring with you some snacks and drinks for the rest to enjoy. Please update the wiki (wiki.garagegeeks.org) with stuff that you'll bring.

Monologue

Monologue is a window into the world, work, and lives of the community members and developers that make up the Mono Project, which is a free cross-platform development environment used primarily on Linux.

If you would rather follow Monologue using a newsreader, we provide the following feed:

RSS 2.0 Feed

Monologue is powered by Mono and the Monologue software.

Bloggers