Documenting your Libraries with Monodoc

Christian Hergert has written a tutorial on how to use the Monodoc tools to maintain the documentation for your Mono/.NET-based library.

Vacation

On Saturday we will go for a week to Cancun on vacations. We are flying tomorrow to Mexico City and will be working from there for a couple of days and will take a chance to visit some friends.

Laura

Linux and Open Source

An article talking about Low Bug Counts on Linux. Another take on the same announcement.

A new Study on Linux vs Windows TCO by CyberSource.

Posted on 14 Dec 2004 by Miguel de Icaza

Exposing Mono Libraries to C

Alp has updated the Mono C binding generator cilc to support Gtk#.

The cilc tool is used to produce C bindings from Mono and .NET assemblies. The new Gtk+ support extends this to provide object inheritance of Gtk#-based widgets. So it is now possible to consume Gtk# widgets from C easily.

The code lives in CVS as part of mcs/tools/cilc

Back in November, 2001

Nat used to sleep a lot on airplanes.

Posted on 13 Dec 2004 by Miguel de Icaza

Developing OpenOffice

Michael Meeks has been contributing to OpenOffice for a couple of years now. Initially he made it simple to start contributing to the effort, and wrote the OpenOfficeOrg Hacking guide, and setup a site at Ximian to get open source developers to contribute, you can see it here:

http://ooo.ximian.com/

With all the tools for newcomers to contribute to OpenOffice: Source Code Cross Reference, Bug Tracking System, Tinderbox Status and ready-to-hack source packages.

One of the best features is the Hackers Guide.

Yesterday he posted his slides on OpenOffice hacking here, I found some of them fascinating:

IronPython

Edd, I agree that there is not much action on the IronPython development front, and we would be willing to host a hackable repository for maintaining IronPython.

We could then provide all these patches to Jim for when he has the cycles to do its upcoming release.

Logistically-wise, my hands are tied until January as Cancun is taking precedence over hacking in the upcoming weeks, but the new year is a good time to pick this up.

Mono Updates

We released the latest two versions of Mono 1.0.5 (production) and 1.1.3 (development) both with a long list of goodies.

In the Windows.Forms world, Geoff wrote a native Quartz driver for our Windows.Forms implementation, which you can see here. Geoff reports that we have feature parity with Windows.Forms

Also, ran into IronPHP the same concept of IronPython, but for PHP.

Also Duncan learned today that the University of California Irvine is teaching one of its compiler classes with Mono on MacOS X.

Posted on 09 Dec 2004 by Miguel de Icaza

Bundles in Mono

Over the weekend I checked into the repository a tool to easily create Mono bundles. A mono bundle allows you to ship your Mono application as a single binary: no runtime necessary: everything is "statically linked", there are no external dependencies on a Mono installation of any kind.

To use, just type:

    mono$ mkbundle --deps sample.exe -o mcs
    Sources: 1 Auto-dependencies: True
       embedding: /home/cvs/mcs/mcs/mcs.exe
       embedding: /mono/lib/mono/1.0/mscorlib.dll
       embedding: /mono/lib/mono/1.0/System.dll
       embedding: /mono/lib/mono/1.0/System.Xml.dll
    Compiling:
    as -o /tmp/tmp7aa740ad.o temp.s 
    cc -o demo -Wall temp.c `pkg-config --cflags --libs mono-static` /tmp/tmp7aa740ad.o
    Done
    mono$

In the example above the resulting binary is a healty 7.5 megabyte file, but it contains the Mono C# compiler and three of the system libraries as well as the Mono VM embedded into it:


	mono$ ls -l demo 
	-rwxr-xr-x  1 miguel users 7575630 2004-12-01 02:21 demo*

I then tuned the compilation to use a few shared libraries from the system, in this particular sample, I only want to avoid taking a Mono dependency:


	mono$ mono$ ldd demo
	linux-gate.so.1 =>  (0xffffe000)
	libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4002c000)
	libm.so.6 => /lib/tls/libm.so.6 (0x4003c000)
	libgmodule-2.0.so.0 => /opt/gnome/lib/libgmodule-2.0.so.0 (0x4005e000)
	libdl.so.2 => /lib/libdl.so.2 (0x40062000)
	libgthread-2.0.so.0 => /opt/gnome/lib/libgthread-2.0.so.0 (0x40066000)
	libglib-2.0.so.0 => /opt/gnome/lib/libglib-2.0.so.0 (0x4006b000)
	libc.so.6 => /lib/tls/libc.so.6 (0x409e6000)
	librt.so.1 => /lib/tls/librt.so.1 (0x40afa000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40c68000)

This is just a productification of a feature that Paolo had developed for Mono.

The next step is to write an assembly "linker", so that only the functions necessary to run mcs.exe are included as opposed to the whole three assemblies.

The main problem is that we need a good library for dealing with CIL images, the contenders:

  • Reflection is slightly incomplete, but can be brute-forced to provide the information we need.
  • There is a rumor of a counter part to PEAPI from the folks that wrote Component Pascal, but so far no updates on their web site.
  • Using the Mono unmanaged C API: I rather not.
  • Perl script over the ildasm output. Paolo would be very happy ;-)
  • Use RAIL
  • Write a new library from scratch to cope with these problems.
Posted on 01 Dec 2004 by Miguel de Icaza
This is a personal web page. Things said here do not represent the position of my employer.