A little browser sample

on Friday, November 07, 2008
By popular demand, here is the sample that I used at the ENEI presentation - a browser in 12 lines of code.

Some busy days ahead

on Friday, October 24, 2008
As Mono 2.0.1 is rolling out, I'll be having a few busy days ahead talking about it.

First, at ENEI'08 in Aveiro this sunday October 26, where I'll be doing a presentation on Mono and integrating a roundtable on mobility and convergence.

On November 8th, it's back to Aveiro for the GLUA TechSessions, where besides me talking about Mono, there's going to be talks about Gnome, WebKit and much more.

This one is organized by the excellent guys at the University of Aveiro's Linux user group, which brought you such great hits as the OpenSuse meetup last September. That one went so well that they decided they just had to organize something more technical this time around - apparently, me talking for more than an hour last time was not enough :)

Finally, on November 13 it's time for Codebits in Lisbon and another Mono talk by yours truly. This is the second year of this event, a sort of 3-day hackday with talks and competitions and a chance to network, always fun.

Now if you'll excuse me, I've gotta go make sure the laptop actually works with a projector...

Slides from ENOS 2008 Mono session

on Monday, September 15, 2008
By popular demand, I'm putting up the slides from my afternoon session on the Mono project, presented last weekend (September 6) at ENOS 2008, Instituto Superior de Engenharia do Porto.

The talk covers our platform architecture, development status, and takes a look at some of the leading desktop applications built on Mono technology.

Cover slide
Download PDF


A big thank you goes out to all who attended and made this great event possible, and especially to Carlos Gonçalves, who organized it all and did an awesome job!

It's that time of the year again!

on Monday, February 11, 2008
Hack week!

*does little jiggly dance*

If you're not familiar with what it is, here's the gist of it: For one week, all the geeks at Novell stop what they're doing and dive into a project of their choice. That's right, a full week of pure, anadulterated hacking!

This year I'm going to use this week to scratch an hitch I've been having with bugzilla, by getting together a proper GUI for the thing, together with uber-hacker Marek Habersack. Join up if you're interested, the more the merrier!

Generating C# interfaces the lazy way

on Wednesday, January 02, 2008
Since all this Winforms WebBrowser control / Mono.Mozilla / gluezilla business started, there's one thing that's been nagging me at that place in the brain where I store stuff I'd rather not think about at the moment (and yes, it's a place that quite resembles those junk-filled attics you see in movies where the kids go to play and occasionally encounter old moth-eaten dresses, the occasional treasure map or your garden-variety skeleton of the aunt nobody had seen in 50 years - a stuffy, moldy place where you can't take a step without tripping on something...)...

Where was I? Oh, yes, nagging me was the thought that, while I had successfully created C# interfaces from the mozilla idl files, and was successfully accessing mozilla through XPCOM directly from the managed side, those interfaces were created by hand, which was not that hard at all, and I really could go on doing them by hand, only getting full DOM support on Mono.Mozilla would require generating some 50 interfaces... by hand.... ugh

So, whilst suffering without net last week due to a router dying and a firewall showing solidarity towards said router (i.e., dying too), I ran across some perl scripts that are being used for various tasks all over the mono tree, and decided that enough was enough, I should get it over once and for all and do a little script to parse the idl files and generate my badly needed interfaces.

Queue a fun-filled day playing around with perl, learning from scripts and from what little documentation I could find on my system (no net, no manuals...) In the end, scraped something together which is living on svn in mcs/class/Mono.Mozilla/tools/xpidl2cs

xpidl2cs basically parses an idl file and generates a C# interface that's ready to be used. It goes all the way up the inheritance tree and generates all parents and, since .NET interop doesn't support interface inheritance and requires child interfaces to also include all the declarations from the parent, xpidl2cs recursively includes all the parent declarations, so you end up with a (probably rather) huge but working interface.

xpidl2cs also generates all the interfaces that are used in methods and properties of your target idl (and parents) so that all dependencies are satisfied in one pass. To avoid endless looping on this, the script doesn't generate the interface if a .cs file with the same name already exists in the directory, so if you want to make sure everything is regenerated, you should rm all interfaces first.

The usage is simple: xpidl2cs.pl file.idl [/path/to/idl/files/]

Any bugs, comments, flames, etc, feel free to nag here or on the #mono channel over at irc.gnome.org, or just mail me.