Method Group Conversions

by Miguel de Icaza

Today I implemented the Method Group Conversions finally, after getting some clarity of mind. The patch was relatively short, mostly shuffling existing code around. So it is now possible to write:

	Button b = new Button ("Hello");
	b.Clicked += handle_click;

	void handle_click (object o, EventArgs e)

Specially interesting to Gtk# developers, since the plan is to move the delegate signatures from the GtkSharp namespace into the class that defines the delegate, so people will be saved from writing:

	// What they would have to write:
	b.SizeAllocated += new Widget.SizeAllocatedHandler (handler);

	// What they can write:
	b.SizeAllocated += handler;

	void handler (object o, SizeAllocatedArgs args)

I talked to Martin today for a while about the debugger. It is finally back in shape: it can debug managed an unmanaged, so people can use it to debug the JIT. The bad news is that it requires an NPTL threading system, which is only available on Red Hat 9 or with 2.6 kernel installations.

One of the limitations of the debugger is its current command line language is yacc-based and grew organically. It is not really great for interactive work.

I have been pondering what to do about this: an option was to use JScript, but its not ready. Another was to use something like IronPython, but that is also far away, and another is to roll-a-tiny-command-line-system.

Am leaning towards rolling our own command line language, my struggle is between a few models:

TCL model
Extrapolate variables first, then parse into strings, implement statements as commands. Ultra simple.
The shell model
extrapolate variables first, perform language parsing, use ; and \n as separators parse chunks as string vectors; use reserved keywords. More complex
The Perl model
The parser drives the process, extrapolation happens at the language level, and is not a input hack. Use semicolons to delimit-statements, and braces for grouping. Not clear if the interactivity will feel right

Each model has its beauty, and it is hard to make a decision. Will roll the dice next week.

On top of that, I want the command line processor to perform some parsing for us, so we can type:

	(mdb) b -thread 4 Main

In C#, the "break" command would be implemented like this:

	class Break : Command {
		[Argument] public int thread { get {} set {} }

		public Break (string [] args)

So the thread property would be set to "4", and the Break command would receive { "Main" } as an argument.

Mono and MacOS X

I installed Mono on MacOS X. This is the first time that I use a Mac for doing development. A few impressions: The Mac UI is incredibly pretty, am glad the Gnome folks are using this as a model to follow. After using the Mac, Longhorn and XP feel cheesy, and Gnome feels rather professional, but not as complete.

Now, the big downside of the MacOS is their kernel. This is on a machine that is faster than my laptop, and still takes three times as much to build the Mono C sources.

The problem can be tracked down to their Mach kernel. In a way its good, because it makes us look much better for server and heavy duty use. On the other hand, if they did not have Avi from the Mach team running their decisions, that kernel would have been long gone and Linux or FreeBSD kernel would be used instead.

A few years ago, I looked into implementing the Mach-O file format, its a primitive beast, it should not be hard to implement that and implement the few things in Linux that MacOS needs to get their UI tools running on a decent kernel.

The new alpha GC from Hans Boehm works on MacOS with Mono, which addresses one of the big problems people had. Mono-wise: there are a few JIT failures with OS 10.3 though while things work on 10.2.

To assist in the debugging, I started learning about the PowerPC architecture. So far I have only seen two nice things about its design (the conditional register files, and the summary overflow bit,) but the choice of opcode names is the worst I have ever seen. Psychologically it has the effect of making me think `This instruction set sucks'. I might be wrong, it might be just a perception thing, but having used the SPARC and the MIPS in the past, which are pretty beautiful designs, you are left wondering about chips designed outside of universities.

Other updates

Jordi Mas is joining the Mono team on Monday. He will be working on GDI+ and System.Drawing, that will be a good first task for him. In the meantime, Peter Bartok is taking over the gargantuan effort to make Wine-current work as a library, and make it use Cairo in the X11 backend to solve the fight we had between those two.

Lluis has checked-in th esupport to th eweb srevice page to render a sample seesion of what a request to the webserver looks like. Gonzalo got the FileSystemWatcher interface implemented on Windows and Linux (using FAM, and falling back to polling) which is pretty cool and Jackson has been working in our tracing support for ASP.NET, all very nice, new toys for the weekend.

Posted on 16 Jan 2004

Chris Toshok and the FBI

by Miguel de Icaza

Chris (of Hungry Programmer's fame, X-Word, LessTif, Jafar and most importantly Evolution) had a close encouter with the FBI and the Secret Service and they took all of his computers, details are here.

Posted on 15 Jan 2004

by Miguel de Icaza

Small Mono Status Report

We keep focused on our Mono 1.0 release, so those of us working on this release get to enjoy fixing bugs, while the others developers get bored to death implementing new code and boring new features.

To keep the excitement some folks have been doing performance tuning, the Mono C# compiler has been a good test bed to improve our performance. Various elements come into play: precompilation (which for compilation gives a 30% performance boost), VM improvements (method to assembly inlyining, optimizations, memory saving), class library improvements (reducing the memory size used by our classes) and in particular the compiler got tons of tune ups. Ben, Gonzalo Jackson, Paolo and Zoltan have all been working on this.

A lot of interesting data came from the mono --profile output on the compiler, and by reducing the memory usage of the compiler we were able to get 26% of performance improvements in a month. So now the compiler is down to 2.9 seconds in bootstrap time (without precompilation compilation, just pure JITing) on my machine.

MonoDevelop, a port to Gtk# of SharpDevelop has been gaining momentum, and we have now moved it to the Mono CVS repository, although we are using Subversion for this project. This project has drawn a lot of attention and has helped improve and tune some of Gtk# which is quite mature nowadays.

On the other fronts, it is mostly bug fixing: the networking stack, the xml stack, the web services stack, is getting a lot of attention, and a lot of bug fixing.

Martin is taking a sabatical to complete the core of the debugger. Once he is done with these core changes, we will bind the UI to MonoDevelop while he completes the compiler Generics support, and maybe we will drag him back to the debugger for another pass of bug fixes.

Peter is working on integrating the Wine and Cairo, so we avoid having them fighting for the screen as we have them now. This will include updating our port of WineLib to the latest version of Wine.

The MacOS X port is working, but it needs testers on MacOS to try the latest editions of the Boehm GC do build fixes and so on. On the PowerPC, we are moving our focus to Linux.

First University Project

Eric Durand and Francois Beauchemin from the Laval University will be implementing the compiler for regular expressions to CIL for the Mono runtime. This is part of their last semester work, and I will get to evaluate their work.

Posted on 14 Jan 2004

Found on Slashdot

by Miguel de Icaza

A couple of interesting links founds on Slashdot posts. First, a fascinating reading at The Register from the CES in Las Vegas: "HP declares war on sharing culture", then the home page for professor William Kahan which contains tons of interesting articles on floating point, algebra, math and java.

Posted on 11 Jan 2004

Mono as a Reasarch Tool

by Miguel de Icaza

Some folks have been using Mono as a research platform recently (virtual machine, dynamic code generation, code optimization, profiling, recompilation, tuning, security) and more.

Duncan told me that he met with a few folks from a University during his holidays and they said that they chose Mono over Rotor for research because Mono has a real JIT as opposed to Rotor's simple JIT, and we also have a solid base for optimizations with our SSA platform.

Many areas in Mono can be improved for people who approach it for research though. We should improve these areas. We need better documents in a per-function basis, a lot of the time we do not have those and unless you are familiar with the code it might be hard to understand on a first read what things do. We also need to document the fields used in our structures better.

Now, the good news is that if you are a dedicated hacker, in a few weeks you can understand the JIT engine and implement some nice optimizations. Recently Patrik Torstensson came back to hack the JIT engine and implemented various optimizations (signed div constant fodling, inlining of common opcodes, peephole optimizations), as well as fixing various hard bugs.

Massimiliano Mantione as part of the hiring interview for the JIT engine wrote Arrays Bound Check elimination.

Posted on 06 Jan 2004

Peter William's new Build System

by Miguel de Icaza

Peter today announced his new MBuild tool. A replacement for Make/Ant/Nant/MSBuild.

As we discussed the various benefits that MBuild has over other systems on irc in #mono, I came to a realization: There are tons of good new, fresh ideas in MBuild. Which is quite unusual in a build system.

The tarball is available here: Start at the README, and then check out doc/Manifesto.txt.

Bush in 30 Seconds

The finalist videos are out, you need QuickTime to watch them.

Slow day

Slow day, mostly administrivia, coping with the new office at the new building. We moved from Boston to Cambridge, very close to Quantum Bookstore. Still got a chance to check up jwz's livejournal and tried to use BlogLines to browse my blogs.

Good article

Can not remember where I found this link today, from George Soros: The Bubble of American Supremacy..

Posted on 05 Jan 2004

Vacations Over

by Miguel de Icaza

Fantastic vacations in Brazil, today am leaving Rio de Janeiro and going back to Boston.

Mono Develop

pedro, tberman and jluke have made a tremendous amount of progress on their effort to port SharpDevelop from Windows.Forms to Gtk#. They got intellisense working, the shell and are now porting the various smaller dialog boxes, which is a great sign of the progress, in only three weeks.

Martin has been improving the reliability of the debugger. The debugger is made up of a core API and various "interfaces" to it. The only one working today (the others have bit-rot) is a bizarre command line language.

Before I went on vacation, I was debating what to do about the UI for the Mono Debugger, I thought we should write a new debugger by pulling as many nice widgets from the gIDE/Anjuta efforts and redo the debugger, but now with MonoDevelop being available it only makes sense to integrate the debugger directly into the IDE instead of creating a new UI just for the debugger, and we get to reuse syntax coloring, intellisense and the other SharpDevelop shell features.

Once MonoDevelop matures a bit more, it will make sense to also do port the code coverage GUI to it, implement a GUI for the profiler and move Gtk-NUnit# to it.

Posted on 04 Jan 2004

Fantastic time in Brazil

by Miguel de Icaza

Spend the first few days in Porto Alegre, with a two day trip to Florianopolis. We are now in Bage, and returning to Porto Alegre tomorrow through Pelotas and Casino. Then next week we head over to Rio to meet with Nat and Alex and spend new years eve there.

Posted on 26 Dec 2003

In Brazil

by Miguel de Icaza

Am in Sao Paolo, going to Porto Alegre later tonight. Will go to Florianoponis this week, later Bag´┐Ż and finally will head over to Rio de Janeiro for new year.

Posted on 16 Dec 2003


by Miguel de Icaza

Ettore, my very dear friend passed away yesterday, December 10th, and has left a big void in my life, and the life of his friends, people he worked with, and people he collaborated with. Hard to think that we were exchanging e-mails just a couple of days ago, and that we were discussing photography two weeks ago in New York, and having greek dinner last week.

I first met Ettore in real life in Paris after we had known each other over the internet for over a year. Ettore he had contributed to Gnome the first docking toolbar and for this occasion we arranged to meet in Paris. In that meeting, he outlined his vision for a file manager (gnome-fm) and we designed the first pass at the gnome-vfs. Eventually, these would become Nautilus, today's GNOME file manager.

Ettore did not hesitate to leave his job to join Nat and myself in the adventure that would be Ximian. He was the second employee at Ximian, and started working on turning the HTML engine into a full-blow editor, this work is in active use today in Evolution. Later on, he became the leader for the Evolution project, which is in use now by thousands of users.

The first time I met Ettore, he and Clara cooked for me a new dish that until that point was unknown to me: spaghetti carbonara, which I loved. Year after year, every time I would prepare it, I would remember fondly how they taught me to make it.

Chema was a great loss a month ago, and this comes as a second very hard moment for our group of friends. Terrible moments like this are a reminder that we should enjoy every minute of our lives and cherish the frienships of everyone we know, on the internet and on the real life.

We are going to miss you bambino.

Posted on 12 Dec 2003

« Newer entries | Older entries »