Mono goes Accessible!

by Miguel de Icaza

Brad Taylor has announced the first release of the Mono Accessibility stack:

UI Automation provides programmatic access to most user interface (UI) elements on the desktop, enabling assistive technology products such as screen readers to provide information about the UI to end users and to manipulate the UI by means other than standard input. UI Automation also allows automated test scripts to interact with the UI.

Mono's Accessibility Framework is an implementation of UI Automation. The same API that is available for WPF and the framework is used by Silverlight and Windows.Forms.

Client Code: The initial launch of Mono Accessibility adds accessibility support to applications built with Windows.Forms to be accessible.

Backend Code: The code has a bridge that talks to the existing ATK framework on Linux.

In the future the Mono Accessibility framework will be used in our own Moonlight 2.0.

Check the release notes, install from source or use OpenSUSE's 1-click install.

Posted on 05 Jan 2008


Moonlight

by Miguel de Icaza

My good friend Robert O'Callahan discusses Silverlight on his latest blog entry, in particular, he asks the question:

No matter how good Silvelright is or how bad the alternatives are, Silverlight domination will be a really bad thing for free software so I question why Miguel wants to push in that direction.

Robert, it is very easy.

I have been using Linux as my main desktop operating system since 1992 and endured every missing feature, every broken driver, every broken X setup and every missing application since I started.

I did so because it was free software, and I had decided that I wanted to run my entire system with free software. I felt that dogfooding Linux and improving Linux on a day-to-day basis would help improve this OS as opposed to improving a proprietary OS.

Sure, using a proprietary OS had its benefits: more consistency, more QA, more applications, lots of support, latest video drivers, but they were not free. So I stuck with free software. Today the only proprietary software that I use on my desktop is Flash (I have acrobat installed, but I use Evince instead, keep it for those cases where Evince has a bug).

From my perspective, it is crucial for Linux to have good support for Silverlight because I do not want Linux on the desktop to become a second class citizen ever again.

Robert, you are asking those of us that use FOSS operating systems to "take one for the team" by not endorsing Silverlight, but yet, you are not willing to live among us. If you are going to preach, preach by example.

The core of the debate is whether Microsoft will succeed in establishing Silverlight as a RIA platform or not. You believe that without Moonlight they would not have a chance of success, and I believe that they would have regardless of us.

In fact, I believe strongly that it is part of Microsoft becoming more open and adapting itself to the multitude of shifts in this industry (open sourcing IronPython, IronRuby, the DLR, the JS library for ASP.NET, the MS-PL, the MS-RL, opening up their code, and so on).

Ever since I met Benjamin Zander am a hopeless romantic, and believe in a world of possibility. I find myself to be happier this way than joining these ranks. And what better way of bringing Silverlight to Linux than to work together with Microsoft: they are giving us specs, they are giving us their test suites, and they are providing technical assistance. Its been a pleasure to work with them, and everything we write is open source software, I for one, could not ask for more.

Now, regardless of the strategic discussion about endorsing Silverlight, there are technicalities about Silverlight that make it a fascinating platform. I personally want to write cross platform web applications using C#, Boo, Python and Ruby. And that matters to me, and matters to others.

And I have loved Silverlight since it embedded the CLR runtime. Nothing new there, you can read the gory details of my fascination from back then.

You advocate using standards that are implemented by multiple vendors. But what if none of those vendors is providing what I want? What if the vendors do not care about my opinion?

What we got here is a case of an underserved market.

This is why competition is good. Now Microsoft is providing something that none of the existing web vendors had provided and some of us want. I liked it so much, that I did not hesitate for a second when a journalist asked me whether we would do an OSS implementation of it. "Can I quote you on that?" he said during the coffee break at Mix "Yes, you can".

You talk about Microsoft's control over Silverlight.

What prevents anyone from taking the Moonlight source code, embracing it, extending it, innovate with it, prototype with it, and enter the same cycle that Linux, or web browsers have entered? Or someone turning it into a standard?

Nothing.

The only thing preventing it is lack of imagination.

Posted on 04 Jan 2008


Obama Wins Iowa

by Miguel de Icaza

Wow.

Barack Obama just won in Iowa.

It was nice to see that Dennis Kucinich endorsed Obama on the second Iowa ballot.

I love it! Go Obama!

Obama speech at Youtube.

Posted on 04 Jan 2008


Plastic 2.0 Preview

by Miguel de Icaza

The guys at Codice Software have just announced the release of their Plastic 2.0 Preview.

Plastic is a cross-platform, distributed source code control management system that has a few interesting features like visualization and it integrates into a number of IDEs.

This is a Windows.Forms application that was originally built for Windows and they have created their own look and feel across multiple platforms. Here is Plastic running on a Mac with our new native drivers for OSX:

And this one is showing their diff tool on Linux:

We are very excited to see a happy Mono user making their software available on new platforms.

For a full tour of the new features see their blog entry.

You can test drive Plastic with their VMware image.

The Plastic guys are great in that they provide great bug reports and are working with our Windows.Forms team to iron out some of the wrinkles in our Windows.Forms implementation.

Posted on 03 Jan 2008


Mono on the OLPC

by Miguel de Icaza

My good friend Torello Quercy has been working on creating OLPC activities using Mono.

He wrote a tutorial on creating Mono-based activities for the OLPC.

See his blog for screenshots of his own game and a port of Jordi Mas' GBrainy and how he Sugar-ified the apps:

GBrainy Sugarified on the OLPC.

You can get the activity bundles from here and here.

Posted on 03 Jan 2008


Language Shootout

by Miguel de Icaza

Alvaro points out that in the Language Shootout Benchmark Mono comes in 18th place compared to Java's 10th place.

We know that Sun's proprietary Java edition (not the open source one, as that one is nowhere to be found yet) is faster than Mono, but I was surprised that we were so far behind. So I looked at the comparison between Java6 and Mono.

Memory usage wise, we mostly come ahead, but in performance, there were two places where Sun's server VM beat Mono seriously in performance (5x or more), one is the regex-dna test and the other one is pidigits test.

The regex test is a test of the regular expression matching engine in the class libraries, not really a test of the language or VM performance, but library implementation. Clearly, our Regex implementation could use some work.

The pidigits test was showing up as 6x better with Java than with Mono. But the test is basically comparing C# vs assembly language. In Mono's case it is using a full C# implementation of BigInteger while the Java version uses the C/assembly language GMP library that has been tuned with hand-coded assembly language.

I ported Java's pidigits to C# to also use native GMP, and the results are promising, we now have a 4.7x speedup and the process size is one megabyte smaller. I was unable to test the Java version on my machine, as I could not find the native "libjgmp" library.

I wonder what the policy is for the language shootout to use external libraries. If its ok, I should contribute my port, if its not, the Java test should be rewritten to be a fully managed implementation.

If you run all the tests the gap between Java and Mono goes from 8 places, to 3 places; If you remove the two bad tests (Our Regex implementation, and the pidigits test) Mono is only one slot behind Java server; and if you also account for memory usage (but still account for all the tests), Mono comes ahead of Java.

Of course, we got homework to do: why is our Regex implementation so much slower?

Update: As it turns out, Mario Sopena pointed out that, another 25% performance improvement can be achieved if the implementations are similar. The C# sample does a lot more regex work than the Java implementation does. The Python implementation has further refinements on the algorithm that could improve the performance further.

Some Observations

It is interesting to see in the benchmarks the progression:

  • Close to the metal languages are the first tier (C, C++, D, Pascal, even Eiffel).
  • Compiled functional languages come next (OCaml, ML, Haskell, Lisp).
  • Java and Mono are on the next tier.
  • A big jump comes next: Erlang, Smalltalk, MzScheme.
  • Next big jump: Pike, Perl, Python.
  • Another jump: PHP, Javascript.
  • Tcl: a class on its own.
  • Ruby, last one.

There are a few rarities, like Fortran being in the same tier as Java and Mono, which probably means the tests for Fortran have not been tuned up, I would expect it to be in the same tier as C.

Also, am surprised by Ruby being the last on the list, I expected it to be roughly in the same range as Python, so I suspect that the tests for Ruby have not been tuned either. Update: my readers also point out that Ruby 1.9 will improve things.

Update: I just noticed that Eiffel is on the first tier, performance wise, but has pretty much all the properties and features of the third tier (garbage collection, strong typing, bounds checking). This means that you get the best of both world with it (and Eiffel's compiler is now also open source).

Language Productivity

And of course, at the end of the day, what matters is how productive you are writing code in a language. The Wikipedia is powered by PHP, Amazon by lots of Perl and C, Google uses Python extensively, and the stellar productivity that can be achieved with Ruby on Rails is hardly matched. So even if your language is slower than the first few tiers, to many developers and sites deploying software what matters is productivity.

Choosing between Mono's C# and Java, both languages being roughly on the same class, is a function of the libraries that you use, the ecosystem where the code will be developed/deployed and to some extent the language.

Alvaro's teammates at Sun have a difficult challenge ahead of them when it comes to the language: how to fix a language that has been so badly bruised by their generics implementation, their refusal to acknowledge delegates, the ongoing saga over the catastrophic closure proposals [1] and the lack of a strong language designer to lead Java into the future.

So even if we have a slow regular expression engine, we have working closures, iterators, events, the lock and using statements in the language and LINQ.

Of course, I wish them the best luck (in the end, Mono is a language-independent VM, and we are just as happy to run C# code as we are running Java code, which incidentally, just reached another milestone) and we certainly plan on learning from the open source Java VM source code.

Alternatively, you can use Mainsoft's Grasshopper to write C# code, but have it run on a Java VM.

[1] Am tempted to write a post about the mistakes that both Java closure proposals have. But it seems like it will be a waste of time, it feels like there is just too much hatred/NIH towards C# in that camp to make any real progress.

Posted on 28 Dec 2007


Paint Mono Update

by Miguel de Icaza

paint-mono is a port of Paint.NET. The only way it could be built in the past was using a development version of MonoDevelop and there was no way of generating packages for it.

Since then, MonoDevelop has progressed to the point where it can generate standard Unix makefiles and generate the proper scripts, pkg-config files and produce code that conforms to the Mono Application Deployment Guidelines from a Visual Studio solution.

It is now easier than ever to try Paint.NET on Linux, all you need is:

  • Mono 1.2.6.
  • Your favorite form of Unix (Linux, BSD, OSX, Solaris).
  • An SVN client.

To build it, use the following steps:

	$ svn co http://paint-mono.googlecode.com/svn/trunk/src paint-mono
	$ cd paint-mono
	$ ./configure
	$ make
	$ make install
	

To run, just type "paintdotnet" on the shell, this should come up:

I have not spent much time porting the SystemLayer.dll, but it is enough to access most features in Paint.NET. A real method-by-method audit needs to be done for the port to be considered complete though.

We are calling it "Mono Paint" as the authors of Paint.NET have requested us that we do not use the same name for the porting effort. The idea is that eventually the port will merely be a drop-in replacement for the "SystemLayer.dll" the library where all the OS-specific code is located.

For more details on downloading it, filing bugs, or tracking the project, see the paing-mono's home page at Google Code.

Posted on 21 Dec 2007


Colorful Error Output

by Miguel de Icaza

This is a cute hack that I put together today.

For months I have wanted to colorize the output of the compiler for errors. Sometimes in a sea of warnings its difficult to find the error that broke the build with a quick visual inspection.

Most civilized people use IDEs, or even Emacs to build their stuff, but for some reason I end up building from an xterm all the time.

Today I introduced the MCS_COLORS environment variable that the compiler will use to configure its colors, the default. This is the default, witness this high-tech beauty:

My personal default is slightly different, as I use grey-on-black terminals, its more of a DOS-days Turbo-Pascal kind of color scheme for errors:

This is my personal setting:

	export MCS_COLORS=errors=brightwhite,red
	

Am not making this the default, it seems too strong for public consumption.

If you absolutely hate this, you can use:

	export MCS_COLORS=disable
	

Posted on 21 Dec 2007


I did not see this one coming

by Miguel de Icaza

Am not sure how come I never made the connection between Matt Warren and his involvement in C# 3.0 and LINQ (I only made the connection while reading Tim Anderson's review of VS 2008).

I have been re-reading his blog in fascination in my spare time, but this caught my attention:

Ever since I joined up with the C# team nearly two years ago I've been frustrated by my inability to wax poetic about all the goodness we were working on. I was sworn to secrecy. Mum was the word. Perhaps if you were paying attention to the work in C# 2.0 and C-Omega, you may have guessed what was to come. Looking back, it's easy enough to recognize it in the design of Generics, Iterators and Anonymous methods. The existence of Nullables in there as well should have made it obvious. We were planning ahead for the big pay off, language integrated query.

You may be amazed that so much planning goes on in the features that we roll out version to version. Sometimes big ideas and far-reaching visions take many releases to come to fruition. You cannot always do them in one release. Sometimes you have to take a risk and dole them out piece by piece. This may cause a bit of confusion at first, when no one can truly understand why a particular feature was included and not others, or why one design was chosen. Yet once all the pieces are together you can finally make sense of it all, and then as if by magic it all just seems right.

At some ECMA meetings in 2004 (the time stamps for some of my notes on the disk are January of 2004) some of the new features were being presented at ECMA and it was obvious to see the benefit for those features (generics, check; anonymous methods, check; iterators, check; partial classes, check) but a few of the features made no sense.

Nullable type decorations made no sense to me ("int? a"). I remember feeling that they were pure compiler bloat and that the use case of databases made no sense. Am not a database developer, but I felt that the syntactic sugar at the time really was not bringing much to the plate. During one of the meetings, I remember putting together a parody for new type qualifiers (which is the timestamped file I kept) for other domain-specific features that I felt were just as useless.

Even with early access to the C# 2 specification for so long, I did not see these components coming together and fitting perfectly to create LINQ.

Posted on 19 Dec 2007


gui.cs update

by Miguel de Icaza

After the world acclaimed announcement of gui.cs eight months ago the developer user base has doubled!

That is correct. We now have 2 (two) applications using the awesome gui.cs rich-console-application development platform to deliver the best ncurses has to offer to all those vt100-derived emulators:

You can see some screenshots.

Of course, the UI still has to support some legacy users that require GUI support (Vista with Gtk# and the same app running with Gtk# on KDE).

Although I had a great testimonial from my first user, it was not suited to be printed on a family blog.

Posted on 18 Dec 2007


« Newer entries | Older entries »