by Miguel de Icaza

Embeddable Game Engine

Many years ago, when working at Xamarin, where we were building cross-platform libraries for mobile developers, we wanted to offer both 2D and 3D gaming capabilities for our users in the form of adding 2D or 3D content to their mobile applications.

For 2D, we contributed and developed assorted Cocos2D-inspired libraries.

For 3D, the situation was more complex. We funded a few over the years, and we contributed to others over the years, but nothing panned out (the history of this is worth a dedicated post).

Around 2013, we looked around, and there were two contenders at the time, one was an embeddable engine with many cute features but not great UI support called Urho, and the other one was a Godot, which had a great IDE, but did not support being embedded.

I reached out to Juan at the time to discuss whether Godot could be turned into such engine. While I tend to take copious notes of all my meetings, those notes sadly were gone as part of the Microsoft acquisition, but from what I can remember Juan told me, "Godot is not what you are looking for" in two dimensions, there were no immediate plans to turn it into an embeddable library, and it was not as advanced as Urho, so he recommended that I go with Urho.

We invested heavily in binding Urho and created UrhoSharp that would go into becoming a great 3D library for our C# users and worked not only on every desktop and mobile platform, but we did a ton of work to make it great for AR and VR headsets. Sadly, Microsoft's management left UrhoSharp to die.

Then, the maintainer of Urho stepped down, and Godot became one of the most popular open-source projects in the world.

Last year, @Faolan-Rad contributed a patch to Godot to turn it into a library that could be embedded into applications. I used this library to build SwiftGodotKit and have been very happy with it ever since - allowing people to embed Godot content into their application.

However, the patch had severe limitations; it could only ever run one Godot game as an embedded system and could not do much more. The folks at Smirk Software wanted to take this further. They wanted to host independent Godot scenes in their app and have more control over those so they could sprinkle Godot content at their heart's content on their mobile app (demo)

They funded some initial work to do this and hired Gergely Kis's company to do this work.

Gergely demoed this work at GodotCon last year. I came back very excited from GodotCon and I decided to turn my prototype Godot on iPad into a complete product.

One of the features that I needed was the ability to embed chunks of Godot in discrete components in my iPad UI, so we worked with Gergely to productize and polish this patch for general consumption.

Now, there is a complete patch under review to allow people to embed arbitrary Godot scenes into their apps. For SwiftUI users, this means that you can embed a Godot scene into a View and display and control it at will.

Hopefully, the team will accept this change into Godot, and once this is done, I will update SwiftGodotKit to get these new capabilities to Swift users (bindings for other platforms and languages are left as an exercise to the reader).

It only took a decade after talking to Juan, but I am back firmly in Godot land.

Posted on 23 Apr 2024


by Miguel de Icaza

SwiftTermApp: SSH Client for iOS

For the past couple of years, programming in Swift has been a guilty pleasure of mine - I would sneak out after getting the kids to sleep to try out the latest innovations in iOS, such as SwiftUI and RealityKit. I have decided to ship a complete app based on this work, and I put together an SSH client for iOS and iPadOS using my terminal emulator, which I call “SwiftTermApp.”

What it lacks in terms of an original name, it makes up for by having solid fundamentals in place: a comprehensive terminal emulator with all the features you expect from a modern terminal emulator, good support for international input and output, tasteful use of libssh2, keyboard accessories for your Unix needs, storing your secrets in the iOS keychain, extensive compatibility tests, an embrace of the latest and greatest iOS APIs I could find, and is fuzzed and profiled routinely to ensure a solid foundation.

While I am generally pleased with the application for personal use, my goal is to make this app generally valuable to users that routinely use SSH to connect to remote hosts - and nothing brings more clarity to a product than a user’s feedback.

I would love for you to try this app and help me identify opportunities and additional features for it. These are some potential improvements to the app, and I could use your help prioritizing them:

To reduce my development time and maximize my joy, I built this app with SwiftUI and the latest features from Swift and iOS, so it won't work on older versions of iOS. In particular, I am pretty happy with what Swift async enabled me to do, which I hope to blog about soon.

SwiftTermApp is part of a collection of open-source code built around the Unix command line that I have been authoring on and off for the past 15 years. First in C#, now also in Swift. If you are interested in some of the other libraries, check out my UI toolkits for console applications (gui.cs for C#, and TermKit for Swift) and my xterm/vt100 emulator libraries (XtermSharp for C# and SwiftTerm for Swift). I previously wrote about how they came to be.

Update: Join the discussion


For later:

For a few months during the development of the SwiftTerm library, I worked to ensure great compatibility with other terminal emulators using the esctest and vttest. I put my MacPro to good use during the evenings to run the Swift fuzzer and tracked down countless bugs and denial of service errors, used Instruments religiously to improve the performance of the terminal emulator and ensured a good test suite to prevent regressions.

Original intro: For the past few years, I have been hacking on assorted terminal tools in both C# and Swift, including a couple of UI toolkits for console applications (gui.cs for C#, and TermKit for Swift) and xterm/vt100 emulators (XtermSharp for C# and SwiftTerm for Swift). I previously wrote about how they came to be.

Posted on 06 Apr 2022


AppStore Reviews Should be Stricter

by Miguel de Icaza

Since the AppStore launched, developers have complained about the review process as too strict. Applications are mostly rejected either for not meeting requirements, not having enough functionality or circumventing Apple’s business model.

Yet, the AppStore reviews are too lax and they should be much stricter.

Let me explain why I think so, what I believe some new rules need to be, and how the AppStore can be improved.

Prioritizing the Needs of the Many

Apple states that they have 28 million registered developers, but I believe that only a fraction of those are actively developing applications on a daily basis. That number is closer to 5 million developers.

I understand deeply why developers are frustrated with the AppStore review process - I have suffered my fair share of AppStore rejections: both by missing simple issues and by trying to push the limits of what was allowed. I founded Xamarin, a company that built tools for mobile developers, and had a chance to become intimately familiar with the rejections that our own customers got.

Yet, there are 1.5 billion active Apple devices, devices that people trust to be keep their data secure and private. The overriding concern should be the 1.5 billion active users, and not the 0.33% (or 1.86% if you are feeling generous).

People have deposited their trust on Apple and Google to keep their devices safe. I wrote about this previously. While it is an industry sport to make fun of Google, I respect the work that Google puts on securing and managing my data - so much that I have trusted them with my email, photographs and documents for more than 15 years.

I trust both companies both because of their public track record, and because of conversations that I have had with friends working at both companies about their processes, their practices and the principles that they care about (Keeping up with Information Security is a part-time hobby of minex).

Today’s AppStore Policies are Insufficient

AppStore policies, and their automated and human reviews have helped nurture and curate the applications that are available. But with a target market as large and rich as iOS and Android these ecosystems have become a juicy target for scammers, swindlers, gangsters, nation states and hackers.

While some developers are upset with the Apple Store rejections, profiteers have figured out that they can make a fortune while abiding by the existing rules. These rules allow behaviors that are in either poor taste, or explicitly manipulating the psyche of the user.

First, let me share my perspective as a parent, and

I have kids aged 10, 7 and 4, and my eldest had access to an iPad since she was a year old, and I have experienced first hand how angering some applications on the AppStore can be to a small human.

It breaks my heart every time they burst out crying because something in these virtual worlds was designed to nag them, is frustrating or incomprehensible to them. We sometimes teach them how to deal with those problems, but this is not always possible. Try explaining to a 3 year old why they have to watch a 30 seconds ad in the middle of a dinosaur game to continue playing, or teach them that at arbitrary points during the game tapping on the screen will not dismiss an ad, but will instead take them to download another app, or direct them another web site.

This is infuriating.

Another problem happens when they play games defective by design. By this I mean that these games have had functionality or capabilities removed that can be solved by purchasing virtual items (coins, bucks, costumes, pets and so on).

I get to watch my kids display a full spectrum of negative experiences when they deal with these games.

We now have a rule at home “No free games or games with In-App Purchases”. While this works for “Can I get a new game?”, it does not work for the existing games that they play, and those that they play with their friends.

Like any good rule, there are exceptions, and I have allowed the kids to buy a handful of games with in-app purchases from reputable sources. They have to pay for those from their allowance.

These dark patterns are not limited applications for kids, read the end of this post for a list of negative scenarios that my followers encountered that will ring familiar.

Closing the AppStore Loopholes

Applications using these practices should be banned:

  • Those that use Dark Patterns to get users to purchase applications or subscriptions: These are things like “Free one week trial”, and then they start charging a high fee per week. Even if this activity is forbidden, some apps that do this get published.

  • Defective-by-design: there are too many games out there that can not be enjoyed unless you spend money in their applications. They get the kids hooked up, and then I have to deal with whiney 4 year olds, 7 year olds and 10 year old to spend their money on virtual currencies to level up.

  • Apps loaded with ads: I understand that using ads to monetize your application is one way of supporting the development, but there needs to be a threshold on how many ads are on the screen, and shown by time, as these apps can be incredibly frustrating to use. And not all apps offer a “Pay to remove the ad”, I suspect because the pay-to-remove is not as profitable as showing ads non-stop.

  • Watch an ad to continue: another nasty problem are defective-by-design games and application that rather than requesting money directly, steer kids towards watching ads (sometimes “watch an ad for 30 seconds”) to get something or achieve something. They are driving ad revenue by forcing kids to watch garbage.

  • Install chains: there are networks of ill-behaved applications that trick kids into installing applications that are part of their network of applications. It starts with an innocent looking app, and before the day is over, you are have 30 new scammy apps installed on your machine.

  • Notification Abuse: these are applications that send advertisements or promotional offers to your device. From discount offers, timed offers and product offerings. It used to be that Apple banned these practices on their AppReview guidelines, but I never saw those enforced and resorted to turning off notifications. These days these promotions are allowed. I would like them to be banned, have the ability to report them as spam, and infringers to have their notification rights suspended.

  • ) Ban on Selling your Data to Third Parties: ban applications that sell your data to third parties. Sometimes the data collection is explicit (for example using the Facebook app), but sometimes unknowingly, an application uses a third party SDK that does its dirty work behind the scenes. Third party SDKs should be registered with Apple, and applications should disclose which third party SDKs are in use. If one of those 3rd party SDKs is found to abuse the rules or is stealing data, all applications that rely on the SDK can be remotely deactivated. While this was recently in the news this is by no means a new practice, this has been happening for years.

One area that is grayer are Applications that are designed to be addictive to increase engagement (some games, Facebook and Twitter) as they are a major problem for our psyches and for our society. Sadly, it is likely beyond the scope of what the AppStore Review team can do. One option is to pass legislation that would cover this (Shutdown Laws are one example).

Changes in the AppStore UI

It is not apps for children that have this problem. I find myself thinking twice before downloading applications with "In App Purchases". That label has become a red flag: one that sends the message "scammy behavior ahead"

I would rather pay for an app than a free app with In-App Purchases. This is unfair to many creators that can only monetize their work via an In-App Purchases.

This could be addressed either by offering a free trial period for the app (managed by the AppStore), or by listing explicitly that there is an “Unlock by paying” option to distinguish these from “Offers In-App Purchases” which is a catch-all expression for both legitimate, scammy or nasty sales.

My list of wishes:

  • Offer Trial Periods for applications: this would send a clear message that this is a paid application, but you can try to use it. And by offering this directly by the AppStore, developers would not have to deal with the In-App purchase workflow, bringing joy to developers and users alike.

  • Explicit Labels: Rather than using the catch-all “Offers In-App Purchases”, show the nature of the purchase: “Unlock Features by Paying”, “Offers Subscriptions”, “Buy virtual services” and “Sells virtual coins/items”

  • Better Filtering: Today, it is not possible to filter searches to those that are paid apps (which tend to be less slimy than those with In-App Purchases)

  • Disclose the class of In-App Purchases available on each app that offers it up-front: I should not have to scroll and hunt for the information and mentally attempt to understand what the item description is to make a purchase

  • Report Abuse: Human reviewers and automated reviews are not able to spot every violation of the existing rules or my proposed additional rules. Users should be able to report applications that break the rules and developers should be aware that their application can be removed from circulation for breaking the rules or scammy behavior.

Some Bad Practices

Check some of the bad practices in this compilation

Posted on 24 Sep 2020


Some Bad App Practices

by Miguel de Icaza

Some bad app patterns as some followers described them

You can read more in the replies to my request a few weeks ago:

Posted on 23 Sep 2020


Apple versus Epic Games: Why I’m Willing to Pay a Premium for Security, Privacy, and Peace of Mind

by Miguel de Icaza

In the legal battle over the App Store’s policies, fees, and review processes, Epic Games wants to see a return to the good old days – where software developers retained full control over their systems and were only limited by their imaginations. Yet those days are long gone.

Granted, in the early 90s, I hailed the Internet as humanity’s purest innovation. After all, it had enabled a group of global developers to collaboratively build the Linux operating system from the ground up. In my X years of experience as a developer, nothing has come close to the good will, success, and optimistic mood of those days.

Upon reflection, everything started to change the day I received my first spam message. It stood out not only because it was the first piece of unsolicited email I received, but also because it was a particularly nasty piece of spam. The advertiser was selling thousands of email addresses for the purposes of marketing and sales. Without question, I knew that someone would buy that list, and that I would soon be on the receiving end of thousands of unwanted pieces of mail. Just a few months later, my inbox was filled with garbage. Since then, the Internet has become increasingly hostile – from firewalls, proxies, and sandboxes to high-profile exploits and attacks.

Hardly a new phenomenon, before the Internet, the disk operating system (DOS) platform was an open system where everyone was free to build and innovate. But soon folks with bad intentions destroyed what was a beautiful world of creation and problem solving, and turned it into a place riddled with viruses, trojans, and spyware.

Like most of you alive at the time, I found myself using anti-virus software. In fact, I even wrote a commercial product in Mexico that performed the dual task of scanning viruses and providing a Unix-like permission system for DOS (probably around 1990). Of course, it was possible to circumvent these systems, considering DOS code had full access to the system.

In 1993, Microsoft introduced a family of operating systems that came to be known as Windows NT. Though it was supposed to be secure from the ground up, they decided to leave a few things open due to compatibility concerns with the old world of Windows 95 and DOS. Not only were there bad faith actors in the space, developers had made significant mistakes. Perhaps not surprisingly, users began to routinely reinstall their operating systems following the gradual decays that arose from improper changes to their operating systems.

Fast-forward to 2006 when Windows Vista entered the scene – attempting to resolve a class of attacks and flaws. The solution took many users by surprise. It’s more apt to say that it was heavily criticized and regarded as a joke in some circles. For many, the old way of doing things had been working just fine and all the additional security got in the way. While users hated the fact that software no longer worked out of the box, it was an important step towards securing systems.

With the benefit of hindsight, I look back at the early days of DOS and the Internet as a utopia, where good intentions, innovation, and progress were the norm. Now swindlers, scammers, hackers, gangsters, and state actors routinely abuse open systems to the point that they have become a liability for every user.

In response, Apple introduced iOS – an operating system that was purpose-build to be secure. This avoided backwards compatibility problems and having to deal with users who saw unwanted changes to their environment. In a word, Apple managed to avoid the criticism and pushback that had derailed Windows Vista.

It’s worth pointing out that Apple wasn’t the first to introduce a locked-down system that didn’t degrade. Nintendo, Sony, and Microsoft consoles restricted the software that could be modified on their host operating systems and ran with limited capabilities. This resulted in fewer support calls, reduced frustration, and limited piracy.

One of Apple’s most touted virtues is that the company creates secure devices that respect user’s privacy. In fact, they have even gone to court against the US government over security. Yet iOS remains the most secure consumer operating system. This has been made possible through multiple layers of security that address different threats. (By referring to Apple’s detailed platform security, you can get a clear sense of just how comprehensive it is.)

Offering a window into the development process, security experts need to evaluate systems from end-to-end and explore how the system can be tampered with, attacked, or hacked, and then devise both defense mechanisms and plans for when things will inevitably go wrong.

Consider the iPhone. The hardware, operating system, and applications were designed with everything a security professional loves in mind. Even so, modern systems are too large and too complex to be bullet-proof. Researchers, practitioners, hobbyists, and businesses all look for security holes in these systems – some with the goal of further protecting the system, others for educational purposes, and still others for profit or to achieve nefarious goals.

Whereas hobbyists leverage these flaws to unlock their devices and get full control over their systems, dictatorships purchase exploits in the black market to use against their enemies and gain access to compromising data, or to track the whereabouts of their targets.

This is where the next layer of security comes in. When a flaw is identified – whether by researchers, automated systems, telemetry, or crashes – software developers design a fix for the problem and roll out the platform update. The benefits of keeping software updated extend beyond a few additional emoji characters; many software updates come with security fixes. Quite simply, updating your phone keeps you more secure. However, it’s worth emphasizing that this only works against known attacks.

The App Store review process helps in some ways; namely, it can:

  • Force applications to follow a set of guidelines aimed at protecting privacy, the integrity of the system, and meet the bar for unsuspecting users

  • Reduce applications with minimal functionality – yielding less junk for users to deal with and smaller attack surfaces

  • Require a baseline of quality, which discourages quick hacks

  • Prevent applications from using brittle, undocumented, or unsupported capabilities

Still, the App Store review process is not flawless. Some developers have worked around these restrictions by: (1) distributing hidden payloads, (2) temporarily disabling features while their app was being tested on Apple’s campus, (3) using time triggers, or (4) remotely controlling features to evade reviewers.

As a case in point, we need look no further than Epic Games. They deceptively submitted a “hot fix,” which is a practice used to fix a critical problem such as a crash. Under the covers, they added a new purchasing system that could be remotely activated at the time of their choosing. It will come as no surprise that they activated it after they cleared the App Store’s review process.

Unlike a personal computer, the applications you run on your smartphone are isolated from the operating system and even from each other to prevent interference. Since apps run under a “sandbox” that limits what they can do, you do not need to reinstall your iPhone from scratch every few months because things no longer work.

Like the systems we described above, the sandbox is not perfect. In theory, a bad actor could include an exploit for an unknown security hole in their application, slip it past Apple, and then, once it is used in the wild, wake up the dormant code that hijacks your system.

Anticipating this, Apple has an additional technical and legal mitigation system in place. The former allows Apple to remotely disable and deactivate ill-behaved applications, in cases where an active exploit is being used to harm users. The legal mitigation is a contract that is entered into between Apple and the software developer, which can be used to bring bad actors to court.

Securing a device is an ongoing arms race, where defenders and attackers are constantly trying to outdo the other side, and there is no single solution that can solve the problem. The battlegrounds have recently moved and are now being waged at the edges of the App Store’s guidelines.

In the same way that security measures have evolved, we need to tighten the App Store’s guidelines, including the behaviors that are being used for the purposes of monetization and to exploit children. (I plan to cover these issues in-depth in a future post.) For now, let me just say that, as a parent, there are few things that would make me happier than more stringent App Store rules governing what applications can do. In the end, I value my iOS devices because I know that I can trust them with my information because security is paramount to Apple.

Coming full-circle, Epic Games is pushing for the App Store to be a free-for-all environment, reminiscent of DOS. Unlike Apple, Epic does not have an established track record of caring about privacy and security (in fact, their privacy policy explicitly allows them to sell your data for marketing purposes). Not only does the company market its wares to kids, they recently had to backtrack on some of their most questionable scams – i.e., loot boxes – when the European Union regulated them. Ultimately, Epic has a fiduciary responsibility to their investors to grow their revenue, and their growth puts them on a war path with Apple.

In the battle over the security and privacy of my phone, I am happy to pay a premium knowing that my information is safe and sound, and that it is not going to be sold to the highest bidder.

Posted on 28 Aug 2020


Yak Shaving - Swift Edition

by Miguel de Icaza

At the TensorFlow summit last year, I caught up with Chris Lattner who was at the time working on Swift for TensorFlow - we ended up talking about concurrency and what he had in mind for Swift.

I recognized some of the actor ideas to be similar to those from the Pony language which I had learned about just a year before on a trip to Microsoft Research in the UK. Of course, I pointed out that Pony had some capabilities that languages like C# and Swift lacked and that anyone could just poke at data that did not belong to them without doing too much work and the whole thing would fall apart.

For example, if you build something like this in C#:

class Chart {
  float [] points;
  public float [] Points { get { return points; } }
}

Then anyone with a reference to Chart can go and poke at the internals of the points array that you have surfaced. For example, this simple Plot implementation accidentally modifies the contents:

void Plot (Chart myChart)
{
   // This code accidentally modifies the data in myChart
   var p = myChart.points;
   for (int i = 0; i < p.Length; i++) {
       Plot (0, p [i]++)
   }
}

This sort of problem is avoidable, but comes at a considerable development cost. For instance, in .NET you can find plenty of ad-hoc collections and interfaces whose sole purpose is to prevent data tampering/corruption. If those are consistently and properly used, they can prevent the above scenario from happening.

This is where Chris politely pointed out to me that I had not quite understood Swift - in fact, Swift supports a copy-on-write model for its collections out of the box - meaning that the above problem is just not present in Swift as I had wrongly assumed.

It is interesting that I had read the Swift specification some three or four times, and I was collaborating with Steve on our Swift-to-.NET binding tool and yet, I had completely missed the significance of this design decision in Swift.

This subtle design decision was eye opening.

It was then that I decided to gain some real hands-on experience in Swift. And what better way to learn Swift than to start with a small, fun project for a couple of evenings.

Rather than building a mobile app, which would have been 90% mobile design and user interaction, and little Swift, I decided to port my gui.cs console UI toolkit from C# to Swift and called it TermKit.

Both gui.cs and TermKit borrow extensively from Apple’s UIKit design - it is a design that I have enjoyed. It notably avoids auto layout, and instead uses a simpler layout system that I quite love and had a lot of fun implementing (You can read a description of how to use it in the C# version).

This journey was filled with a number of very pleasant capabilities in Swift that helped me find some long-term bugs in my C# libraries. I remain firmly a fan of compiled languages, and the more checking, the better.

Dear reader, I wish I had kept a log of those but that is now code that I wrote a year ago so I could share all of those with you, but I did not take copious notes. Suffice to say, that I ended up with a warm and cozy feeling - knowing that the compiler was looking out for me.

There is plenty to love about Swift technically, and I will not enumerate all of those features, other people have done that. But I want to point out a few interesting bits that I had missed because I was not a practitioner of the language, and was more of an armchair observer of the language.

The requirement that constructors fully initialize all the fields in a type before calling the base constructor is a requirement that took me a while to digest. My mental model was that calling the superclass to initialize itself should be done before any of my own values are set - this is what C# does. Yet, this prevents a bug where the base constructor can call a virtual method that you override, and might not be ready to handle. So eventually I just learned to embrace and love this capability.

Another thing that I truly enjoyed was the ability of creating a typealias, which once defined is visible as a new type. A capability that I have wanted in C# since 2001 and have yet to get.

I have a love/hate relationship with Swift protocols and extensions. I love them because they are incredibly powerful, and I hate them, because it has been so hard to surface those to .NET, but in practice they are a pleasure to use.

What won my heart is just how simple it is to import C code into Swift

  • to bring the type definitions from a header file, and call into the C code transparently from Swift. This really is a gift of the gods to humankind.

I truly enjoyed having the Character data type in Swift which allowed my console UI toolkit to correctly support Unicode on the console for modern terminals.

Even gui.cs with my port of Go’s Unicode libraries to C# suffers from being limited to Go-style Runes and not having support for emoji (or as the nerd-o-sphere calls it “extended grapheme clusters”).

Beyond the pedestrian controls like buttons, entry lines and checkboxes, there are two useful controls that I wanted to develop. An xterm terminal emulator, and a multi-line text editor.

In the C# version of my console toolkit my multi-line text editor was a quick hack. A List<T> holds all the lines in the buffer, and each line contains the runes to display. Inserting characters is easy, and inserting lines is easy and you can get this done in a couple of hours on the evening (which is the sort of time I can devote to these fun explorations). Of course, the problem is cutting regions of text across lines, and inserting text that spans multiple lines. Because what looked like a brilliant coup of simple design, turns out to be an ugly, repetitive and error-prone code that takes forever to debug - I did not enjoy writing that code in the end.

For my Swift port, I decided that I needed something better. Of course, in the era of web scale, you gotta have a web scale data structure. I was about to implement a Swift version of the Rope data structure, when someone pointed to me a blog post from the Visual Studio Code team titled “Text Buffer Reimplementation”. I read it avidly, founds their arguments convincing, and in the end, if it is good enough for Visual Studio Code, it should be good enough for the gander.

During my vacation last summer, I decided to port the TypeScript implementation of the Text Buffer to Swift, and named it TextBufferKit. Once again, porting this code from TypeScript to Swift turned out to be a great learning experience for me.

By the time I was done with this and was ready to hook it up to TermKit, I got busy, and also started to learn SwiftUI, and started to doubt whether it made sense to continue work on a UIKit-based model, or if I should restart and do a SwiftUI version. So while I pondered this decision, I did what every other respected yak shaver would do, I proceeded to my xterm terminal emulator work.

Since about 2009 or so, I wanted to have a reusable terminal emulator control for .NET. In particular, I wanted one to embed into MonoDevelop, so a year or two ago, I looked for a terminal emulator that I could port to .NET - I needed something that was licensed under the MIT license, so it could be used in a wide range of situations, and was modern enough. After surveying the space, I found “xterm.js” fit the bill, so I ported it to .NET and modified it to suit my requirements. XtermSharp - a terminal emulator engine that can have multiple UIs and hook up multiple backends.

For Swift, I took the XtermSharp code, and ported it over to Swift, and ended up with SwiftTerm. It is now in quite a decent shape, with only a few bugs left.

I have yet to built a TermKit UI for SwiftTerm, but in my quest for the perfect shaved yak, now I need to figure out if I should implement SwiftUI on top of TermKit, or if I should repurpose TermKit completely from the ground up to be SwiftUI driven.

Stay tuned!

Posted on 24 Mar 2020


Scripting Applications with WebAssembly

by Miguel de Icaza

The Unity3D engine features a capability where developers can edit the code for their program, hit “play” and observe the changes right away, without a visible compilation step. C# code is compiled and executed immediately inside the Unity editor in a seamless way.

This is a scenario where scripted code runs with full trust within the original application. The desired outcome is to not crash the host, be able to reload new versions of the code over and over, and not really about providing a security boundary.

This capability was built into Unity using .NET Application Domains: a code isolation technology that was originally built in .NET that allowed code to be loaded, executed and discarded after it was no longer needed.

Other developers used Application Domains as a security boundary in conjuction with other security technologies in .NET. But this combination turned out to have some holes, and Application Domains, once popular among .NET developers, fell from grace.

With .NET Core, Application domains are no longer supported, and alternative options for code-reloading have been created (dynamic loading of code can be achieved these days with AssemblyLoadContext).

While Unity was ahead of the industry in terms of code hot reloading, but other folks have used embedded runtimes to provide this sort of capability over the years, Javascript being one of the most popular ones.

Recently, I have been fascinated by WebAssembly for solving this particular scenario and solve it very well (some folks are also using WebAssembly to isolate sensitive code).

WebAssembly was popularized by the Web crowd, and it offers a number of capabilities that neither Javascript, Application Domains or other scripting languages solve very well for scripting applications.

Outside of the Web browser domain, WebAssembly checks all of the boxes in my book:

  • Provides great code isolation and memory isolation
  • Easily discard unused code and data
  • Wide reach: in addition to being available on the Web there are runtimes suitable for almost every scenario: fast JIT compilation, optimizing compilers, static compilation and assorted interpreters. One of my favorites is Wasmer
  • Custom operations can be surfaced to WebAssembly to connect the embedded code with the host.
  • Many languages can target this runtime. C, C++, C#, F#, Go, Rust and Swift among others.

WebAssembly is low-level enough that it does not come with a garbage collector, which means that it will not pause to garbage collect your code like .NET/Mono or JavaScript would. That depends entirely on the language that you run inside WebAssembly. If you run C, Rust or Swift code, there would be no time taken by a garbage collector, but if you run .NET or Go code there would be.

Going back to the Unity scenario: the fascinating feature for me, is that IDEs/Editors/Tools could leverage WebAssembly to host their favorite language for scripting during the development stage, but for the final build of a product (like Unity, Godot, Rhino3D, Unreal Engine and really any other application that offers scripting capabilities) they could bundle the native code without having to take a WebAssembly dependency.

For the sake of the argument, imagine the Godot game engine. Today Godot has support for GodotScript and .NET. But it could be extended to support for Swift for scripting, and use WebAssembly during development to hot-reload the code, but generate Swift code directly for the final build of a game.

The reason I listed the game engines here is that users of those products are as happy with the garbage collector taking some time to tidy up your heap as they are with a parent calling them to dinner just as they are swarming an enemy base during a 2-hour campaign.

WebAssembly is an incredibly exciting space, and every day it seems like it opens possibilities that we could only dream of before.

Posted on 02 Mar 2020


by Miguel de Icaza

Blog: Revisting the gui.cs framework

12 years ago, I wrote a small UI Library to build console applications in Unix using C#. I enjoyed writing a blog post that hyped this tiny library as a platform for Rich Internet Applications (“RIA”). The young among you might not know this, but back in 2010, “RIA” platforms were all the rage, like Bitcoin was two years ago.

The blog post was written in a tongue-in-cheek style, but linked to actual screenshots of this toy library, which revealed the joke:

First gui.cs application - a MonoTorrent client

This was the day that I realized that some folks did not read the whole blog post, nor clicked on the screenshot links, as I received three pieces of email about it.

The first was from an executive at Adobe asking why we were competing, rather than partnering on this RIA framework. Back in 2010, Adobe was famous for building the Flash and Flex platforms, two of the leading RIA systems in the industry. The second was from a journalist trying to find out more details about this new web framework, he was interested in getting on the phone to discuss the details of the announcement, and the third piece was from an industry analyst that wanted to understand what this announcement did for the strategic placement of my employer in their five-dimensional industry tracking mega-deltoid.

This tiny library was part of my curses binding for Mono in a time where I dreamed of writing and bringing a complete terminal stack to .NET in my copious spare time. Little did I know, that I was about to run out of time, as in little less than a month, I would start Moonlight - the open source clone of Microsoft Silverlight and that would consume my time for a couple of years.

Back to the Future

While Silverlight might have died, my desire to have a UI toolkit for console applications with .NET did not. Some fourteen months ago, I decided to work again on gui.cs, this is a screenshot of the result:

Sample app

In many ways the world had changed. You can now expect a fairly modern version of curses to be available across all Unices and Unix systems have proper terminfo databases installed.

Because I am a hopeless romantic, I called this new incarnation of the UI toolkit, gui.cs. This time around, I have updated it to modern .NET idioms, modern .NET build systems, and embraced the UIKit design for some of the internals of the framework and Azure DevOps to run my continuous builds and manage my releases to NuGet.

In addition, the toolkit is no longer tied to Unix, but contains drivers for the Windows console, the .NET System.Console (a less powerful version of the Windows console) and the ncurses library.

You can find the result in GitHub https://github.com/migueldeicaza/gui.cs and you can install it on your favorite operating system by installing the Terminal.Gui NuGet package.

I have published both conceptual and API documentation for folks to get started with. Hopefully I will beat my previous record of two users.

The original layout system for gui.cs was based on absolute positioning - not bad for a quick hack. But this time around I wanted something simpler to use. Sadly, UIKit is not a good source of inspiration for simple to use layout systems, so I came up with a novel system for widget layout, one that I am quite fond of. This new system introduces two data types Pos for specifying positions and Dim for specifying dimensions.

As a developer, you assign Pos values to X, Y and Dim values to Width and Height. The system comes with a range of ways of specifying positions and dimensions, including referencing properties from other views. So you can specify the layout in a way similar to specifying formulas in a spreadsheet.

There is a one hour long presentation introducing various tools for console programming with .NET. The section dealing just with gui.cs starts at minute 29:28, and you can also get a copy of the slides.

https://youtu.be/Se1zNWJwDUE

Posted on 22 Apr 2019


by Miguel de Icaza

First Election of the .NET Foundation

Last year, I wrote about structural changes that we made to the .NET Foundation.

Out of 715 applications to become members of the foundation, 477 have been accepted.

Jon has posted the results of our first election. From Microsoft, neither Scott Hunter or myself ran for the board of directors, and only Beth Massi remains. So we went from having a majority of Microsoft employees on the board to only having Beth Massi, with six fresh directors joining: Iris Classon, Ben Adams, Jon Skeet, Phil Haack, Sara Chipps and Oren Novotny

I am stepping down very happy knowing that I achieved my main goal, to turn the .NET Foundation into a more diverse and member-driven foundation.

Congratulations and good luck .NET Board of 2019!

Posted on 29 Mar 2019


by Miguel de Icaza

.NET Foundation Changes

Today we announced a major change to the .NET Foundation, in which we fundamentally changed the way that the foundation operates. The new foundation draws inspiration from the Gnome Foundation and the F# Foundation.

We are making the following changes:

  • The Board of Directors of the Foundation will now be elected by the .NET Foundation membership, and they will be in charge of steering the direction of the foundation. The Board of Directors will be elected annually via direct vote from the members of the Foundation, with just one permanent member from Microsoft.

  • Anyone contributing to projects in the .NET Foundation can become a voting member of the Foundation. The main benefit is that you get to vote for who should represent you in the board of directors. To become a member, we will judge contributions to the projects in the foundation, which can either be code contributions, documentation, evangelism or other activities that advance .NET and its ecosystem.

  • Membership fee: we are adding a membership fee that will give the .NET Foundation independence from Microsoft when it comes to how it chooses to promote .NET and the ecosystem around it. We realize that not everyone can pay this fee, so this fee can be waived. But those that contribute to the Foundation will help us fund activities that will expand .NET.

  • We intend to have elections every year, so individuals will campaign on what they intend to bring to the board.

  • There is a limit in the number of members on the board representing a single company, which prevents the board from being stacked up by contributors for a single company, and will encourage our community to vote for board members with diverse backgrounds, strengthening the views of the board.

  • Companies do not vote. The only way to vote is for contributors to the .NET ecosystem, which could be affiliated with a company to vote, but the companies themselves have no vote. Our corporate sponsors are sponsors that care as much as we care as the growth and health of our ecosystem.

These changes are very close to my heart and took a lot of work to make them happen and make sure that Microsoft the company was comfortable with giving up the control over the .NET Foundation.

I want to thank Jon Galloway, the Executive Director of the current .NET Foundation to help make this a reality.

Going from the idea to the execution took a long time. Martin Woodward did some of the early foot work to get various people at Microsoft comfortable with the idea. Then Jon took over, and had to continue this process to get everyone on board and get everyone to accept that our little baby was ready to graduate, go to college and start its own independent life.

I want to thank my peers in the board of directors that supported this move, Scott Hunter, Oren Novotny, Rachel Reese as well as the entire supporting crew that helped us make this happen, Beth Massi, Jay Schmelzer and the various heroes in the Microsoft legal department that crossed all the t’s and dotted all the i’s.

See you on the campaign trail!

Posted on 04 Dec 2018


Startup Improvements in Xamarin.Forms on Android

by Miguel de Icaza

With Xamarin.Forms 3.0 in addition to the many new feature work that we did, we have been doing some general optimizations across the board, from compile times to startup times and wanted to share some recent results on the net effect on one of our larger sample apps.

These are the results when doing a cold start for the SmartHotel360 application on Android when compiled for 32bits (armeabi-v7a) on a Google Pixel (1st gen).

Release Release/AOT Release/AOT+LLVM
Forms 2.5.0 6.59s 1.66s 1.61s
Forms 3.0.0 3.52s 1.41s 1.38s

This is independent of the work that we are doing to improve Android's startup speed, that both brings additional benefits today, and will bring additional benefits in the future.

One of the areas that we are investing on for Android is to remove any dynamic code execution at startup to integrate with the Java runtime, instead all of this is being statically computed, similar to what we are doing on Mac and iOS where we completely eliminated reflection and code generation from startup.

Posted on 18 May 2018


How we doubled Mono’s Float Speed

by Miguel de Icaza

My friend Aras recently wrote the same ray tracer in various languages, including C++, C# and the upcoming Unity Burst compiler. While it is natural to expect C# to be slower than C++, what was interesting to me was that Mono was so much slower than .NET Core.

The numbers that he posted did not look good:

  • C# (.NET Core): Mac 17.5 Mray/s,
  • C# (Unity, Mono): Mac 4.6 Mray/s,
  • C# (Unity, IL2CPP): Mac 17.1 Mray/s,

I decided to look at what was going on, and document possible areas for improvement.

As a result of this benchmark, and looking into this problem, we identified three areas of improvement:

  • First, we need better defaults in Mono, as users will not tune their parameters
  • Second, we need to better inform the world about the LLVM code optimizing backend in Mono
  • Third, we tuned some of the parameters in Mono.

The baseline for this test, was to run Aras ray tracer on my machine, since we have different hardware, I could not use his numbers to compare. The results on my iMac at home were as follows for Mono and .NET Core:

Runtime Results MRay/sec
.NET Core 2.1.4, debug build dotnet run 3.6
.NET Core 2.1.4, release build, dotnet run -c Release 21.7
Vanilla Mono, mono Maths.exe 6.6
Vanilla Mono, with LLVM and float32 15.5

During the process of researching this problem, we found a couple of problems, which once we fixed, produced the following results:

Runtime Results MRay/sec
Mono with LLVM and float32 15.5
Improved Mono with LLVM, float32 and fixed inline 29.6

Aggregated:

Chart visualizing the results of the table above

Just using LLVM and float32 your code can get almost a 2.3x performance improvement in your floating point code. And with the tuning that we added to Mono’s as a result of this exercise, you can get 4.4x over running the plain Mono - these will be the defaults in future versions of Mono.

This blog post explains our findings.

32 and 64 bit Floats

Aras is using 32-bit floats for most of his math (the float type in C#, or System.Single in .NET terms). In Mono, decades ago, we made the mistake of performing all 32-bit float computations as 64-bit floats while still storing the data in 32-bit locations.

My memory at this point is not as good as it used to be and do not quite recall why we made this decision.

My best guess is that it was a decision rooted in the trends and ideas of the time.

Around this time there was a positive aura around extended precision computations for floats. For example the Intel x87 processors use 80-bit precision for their floating point computations, even when the operands are doubles, giving users better results.

Another theme around that time was that the Gnumeric spreadsheet, one of my previous projects, had implemented better statistical functions than Excel had, and this was well received in many communities that could use the more correct and higher precision results.

In the early days of Mono, most mathematical operations available across all platforms only took doubles as inputs. C99, Posix and ISO had all introduced 32-bit versions, but they were not generally available across the industry in those early days (for example, sinf is the float version of sin, fabsf of fabs and so on).

In short, the early 2000’s were a time of optimism.

Applications did pay a heavier price for the extra computation time, but Mono was mostly used for Linux desktop application, serving HTTP pages and some server processes, so floating point performance was never an issue we faced day to day. It was only noticeable in some scientific benchmarks, and those were rarely the use case for .NET usage in the 2003 era.

Nowadays, Games, 3D applications image processing, VR, AR and machine learning have made floating point operations a more common data type in modern applications. When it rains, it pours, and this is no exception. Floats are no longer your friendly data type that you sprinkle in a few places in your code, here and there. They come in an avalanche and there is no place to hide. There are so many of them, and they won’t stop coming at you.

The “float32” runtime flag

So a couple of years ago we decided to add support for performing 32-bit float operations with 32-bit operations, just like everyone else. We call this runtime feature “float32”, and in Mono, you enable this by passing the --O=float32 option to the runtime, and for Xamarin applications, you change this setting on the project preferences.

This new flag has been well received by our mobile users, as the majority of mobile devices are still not very powerful and they rather process data faster than they need the precision. Our guidance for our mobile users has been both to turn on the LLVM optimizing compiler and float32 flag at the same time.

While we have had the flag for some years, we have not made this the default, to reduce surprises for our users. But we find ourselves facing scenarios where the current 64-bit behavior is already surprises to our users, for example, see this bug report filed by a Unity user.

We are now going to change the default in Mono to be float32, you can track the progress here: https://github.com/mono/mono/issues/6985.

In the meantime, I went back to my friend Aras project. He has been using some new APIs that were introduced in .NET Core. While .NET core always performed 32-bit float operations as 32-bit floats, the System.Math API still forced some conversions from float to double in the course of doing business. For example, if you wanted to compute the sine function of a float, your only choice was to call Math.Sin (double) and pay the price of the float to double conversion.

To address this, .NET Core has introduced a new System.MathF type, which contains single precision floating point math operations, and we have just brought this [System.MathF](https://github.com/mono/mono/pull/7941) to Mono now.

While moving from 64 bit floats to 32 bit floats certainly improves the performance, as you can see in the table below:

Runtime and Options Mrays/second
Mono with System.Math 6.6
Mono with System.Math, using -O=float32 8.1
Mono with System.MathF 6.5
Mono with System.MathF, using -O=float32 8.2

So using float32 really improves things for this test, the MathF had a small effect.

Tuning LLVM

During the course of this research, we discovered that while Mono’s Fast JIT compiler had support for float32, we had not added this support to the LLVM backend. This meant that Mono with LLVM was still performing the expensive float to double conversions.

So Zoltan added support for float32 to our LLVM code generation engine.

Then he noticed that our inliner was using the same heuristics for the Fast JIT than it was using for LLVM. With the Fast JIT, you want to strike a balance between JIT speed and execution speed, so we limit just how much we inline to reduce the work of the JIT engine.

But when you are opt into using LLVM with Mono, you want to get the fastest code possible, so we adjusted the setting accordingly. Today you can change this setting via an environment variable MONO_INLINELIMIT, but this really should be baked into the defaults.

With the tuned LLVM setting, these are the results:

Runtime and Options Mrays/seconds
Mono with System.Math --llvm -O=float32 16.0
Mono with System.Math --llvm -O=float32 fixed heuristics 29.1
Mono with System.MathF --llvm -O=float32 fixed heuristics 29.6

Next Steps

The work to bring some of these improvements was relatively low. We had some on and off discussions on Slack which lead to these improvements. I even managed to spend a few hours one evening to bring System.MathF to Mono.

Aras RayTracer code was an ideal subject to study, as it was self-contained, it was a real application and not a synthetic benchmark. We want to find more software like this that we can use to review the kind of bitcode that we generate and make sure that we are giving LLVM the best data that we can so LLVM can do its job.

We also are considering upgrading the LLVM that we use, and leverage any new optimizations that have been added.

SideBar

The extra precision has some nice side effects. For example, recently, while reading the pull requests for the Godot engine, I saw that they were busily discussing making floating point precision for the engine configurable at compile time (https://github.com/godotengine/godot/pull/17134).

I asked Juan why anyone would want to do this, I thought that games were just content with 32-bit floating point operations.

Juan explained to that while floats work great in general, once you “move away” from the center, say in a game, you navigate 100 kilometers out of the center of your game, the math errors start to accumulate and you end up with some interesting visual glitches. There are various mitigation strategies that can be used, and higher precision is just one possibility, one that comes with a performance cost.

Shortly after our conversation, this blog showed up on my Twitter timeline showing this problem:

http://pharr.org/matt/blog/2018/03/02/rendering-in-camera-space.html

A few images show the problem. First, we have a sports car model from the pbrt-v3-scenes **distribution. Both the camera and the scene are near the origin and everything looks good.

** (Cool sports car model courtesy Yasutoshi Mori.) Next, we’ve translated both the camera and the scene 200,000 units from the origin in xx, yy, and zz. We can see that the car model is getting fairly chunky; this is entirely due to insufficient floating-point precision.

** (Thanks again to Yasutoshi Mori.) If we move 5×5× farther away, to 1 million units from the origin, things really fall apart; the car has become an extremely coarse voxelized approximation of itself—both cool and horrifying at the same time. (Keanu wonders: is Minecraft chunky purely because everything’s rendered really far from the origin?)

** (Apologies to Yasutoshi Mori for what has been done to his nice model.)

Posted on 11 Apr 2018


Fixing Screenshots in MacOS

by Miguel de Icaza

This was driving me insane. For years, I have been using Command-Shift-4 to take screenshots on my Mac. When you hit that keypress, you get to select a region of the screen, and the result gets placed on your ~/Desktop directory.

Recently, the feature stopped working.

I first blamed Dropbox settings, but that was not it.

I read every article on the internet on how to change the default location, restart the SystemUIServer.

The screencapture command line tool worked, but not the hotkey.

Many reboots later, I disabled System Integrity Protection so I could use iosnoop and dtruss to figure out why screencapture was not logging. I was looking at the logs right there, and saw where things were different, but could not figure out what was wrong.

Then another one of my Macs got infected. So now I had two Mac laptops that could not take screenshots.

And then I realized what was going on.

When you trigger Command-Shift-4, the TouchBar lights up and lets you customize how you take the screenshot, like this:

And if you scroll it, you get these other options:

And I had recently used these settings.

If you change your default here, it will be preserved, so even if the shortcut is Command-Shift-4 for take-screenshot-and-save-in-file, if you use the TouchBar to make a change, this will override any future uses of the command.

Posted on 04 Apr 2018


Magic!

by Miguel de Icaza

Mono has a pure C# implementation of the Windows.Forms stack which works on Mac, Linux and Windows. It emulates some of the core of the Win32 API to achieve this.

While Mono's Windows.Forms is not an actively developed UI stack, it is required by a number of third party libraries, some data types are consumed by other Mono libraries (part of the original design contract), so we have kept it around.

On Mac, Mono's Windows.Forms was built on top of Carbon, an old C-based API that was available on MacOS. This backend was written by Geoff Norton for Mono many years ago.

As Mono switched to 64 bits by default, this meant that Windows.Forms could not be used. We have a couple of options, try to upgrade the 32-bit Carbon code to 64-bit Carbon code or build a new backend on top of Cocoa (using Xamarin.Mac).

For years, I had assumed that Carbon on 64 was not really supported, but a recent trip to the console shows that Apple has added a 64-bit port. Either my memory is failing me (common at this age), or Apple at some point changed their mind. I spent all of 20 minutes trying to do an upgrade, but the header files and documentation for the APIs we rely on are just not available, so at best, I would be doing some guess work as to which APIs have been upgraded to 64 bits, and which APIs are available (rumors on Google searches indicate that while Carbon is 64 bits, not all APIs might be there).

I figured that I could try to build a Cocoa backend with Xamarin.Mac, so I sent this pull request to let me do this outside of the Mono tree on my copious spare time, so this weekend I did some work on the Cocoa Driver.

But this morning, on twitter, Filip Navarra noticed the above, and contacted me:

He has been kind enough to upload this Cocoa-based backend to GitHub.

Going Native

There are a couple of interesting things about this Windows.Forms backend for Cocoa.

The first one, is that it is using sysdrawing-coregraphics, a custom version of System.Drawing that we had originally developed for iOS users that implements the API in terms of CoreGraphics instead of using Cairo, FontConfig, FreeType and Pango.

The second one, is that some controls are backed by native AppKit controls, those that implement the IMacNativeControl interface. Among those you can find Button, ComboBox, ProgressBar, ScrollBar and the UpDownStepper.

I will now abandon my weekend hack, and instead get this code drop integrated as the 64-bit Cocoa backend.

Stay tuned!

Posted on 20 Feb 2018


Why I am excited about Unity in 2018

by Miguel de Icaza

While I had promised my friend Lucas that I would build a game in Unity for what seems like a decade, I still have not managed to build one.

Recently Aras shared his excitement for Unity in 2018. There is a ton on that blog post to unpack.

What I am personally excited about is that Unity now ships an up-to-date Mono in the core.

Jonathan Chambers and his team of amazing low-level VM hackers have been hard at work in upgrading Unity's VM and libraries to bring you the latest and greatest Mono runtime to Unity. We have had the privilege of assisting in this migration and providing them with technical support for this migration.

The work that the Unity team has done lays down the foundation for an ongoing update to their .NET capabilities, so future innovation on the platform can be quickly adopted, bringing new and more joyful capabilities to developers in the platform.

With this new runtime, Unity developers will be able to access and consume a large portion of third party .NET libraries, including all those shiny .NET Standard Libraries - the new universal way of sharing code in the .NET world.

C# 7

The Unity team has also provided very valuable guidance to the C# team which have directly influenced features in C# 7 like ref locals and returns

  • In our own tests using C# for an AR application, we doubled the speed of managed-code AR processing by using these new features.

When users use the new Mono support in Unity, they default to C# 6, as this is the version that Mono's C# compiler fully supports. One of the challenges is that Mono's C# compiler has not fully implemented support for C# 7, as Mono itself moved to Roslyn.

The team at Unity is now working with the Roslyn team to adopt the Roslyn C# compiler in Unity. Because Roslyn is a larger compiler, it is a slower compiler to startup, and Unity does many small incremental compilations. So the team is working towards adopting the server compilation mode of Roslyn. This runs the Roslyn C# compiler as a reusable service which can compile code very quickly, without having to pay the price for startup every time.

Visual Studio

If you install the Unity beta today, you will also see that on Mac, it now defaults to Visual Studio for Mac as its default editor.

JB evain leads our Unity support for Visual Studio and he has brought the magic of his Unity plugin to Visual Studio for Mac.

As Unity upgrades its Mono runtime, they also benefit from the extended debugger protocol support in Mono, which bring years of improvements to the debugging experience.

Posted on 20 Feb 2018


Interactive Line Editing in .NET

by Miguel de Icaza

Even these days, I still spend too much time on the command line. My friends still make fun of my MacOS desktop when they see that I run a full screen terminal, and the main program that I am running there is the Midnight Commander:

Every once in a while I write an interactive application, and I want to have full bash-like command line editing, history and search. The Unix world used to have GNU readline as a C library, but I wanted something that worked on both Unix and Windows with minimal dependencies.

Almost 10 years ago I wrote myself a C# library to do this, it works on both Unix and Windows and it was the library that has been used by Mono's interactive C# shell for the last decade or so.

This library used to be called getline.cs, and it was part of a series of single source file libraries that we distributed with Mono.

The idea of distributing libraries that were made up of a single source file did not really catch on. So we have modernized our own ways and now we publish these single-file libraries as NuGet packages that you can use.

You can now add an interactive command line shell with NuGet by installing the Mono.Terminal NuGet package into your application.

We also moved the single library from being part of the gigantic Mono repository into its own repository.

The GitHub page has more information on the key bindings available, how to use the history and how to add code-completion (even including a cute popup).

The library is built entirely on top of System.Console, and is distributed as a .NET Standard library which can run on your choice of .NET runtime (.NET Core, .NET Desktop or Mono).

Check the GitHub project page for more information.

Posted on 12 Jan 2018


Default ColorSpaces

by Miguel de Icaza

Recently a user filed a bug where the same RGB color when converted into a UIColor, and later into CGColor is different that going from the RGB value to a CGColor directly on recent versions of iOS.

You can see the difference here:

What is happening here is that CGColors that are created directly from the RGB values are being created on kCGColorSpaceGenericRGB colorspace. Starting with iOS 10, UIColor objects are being created with a device specific color space, in my current simluator this value is kCGColorSpaceExtendedSRGB.

You can see the differences in this workbook

Posted on 07 Dec 2017


Mono's TLS 1.2 Update

by Miguel de Icaza

Just wanted to close the chapter on Mono's TLS 1.2 support which I blogged about more than a year ago.

At the time, I shared the plans that we had for upgrading the support for TLS 1.2.

We released that code in Mono 4.8.0 in February of 2017 which used the BoringSSL stack on Linux and Apple's TLS stack on Xamarin.{Mac,iOS,tvOS,watchOS}.

In Mono 5.0.0 we extracted the TLS support from the Xamarin codebase into the general Mono codebase and it became available as part of the Mono.framework distribution as well as becoming the default.

Posted on 20 Nov 2017


Creating .NET Bindings for C Libraries with ObjectiveSharpie

by Miguel de Icaza

We created the ObjectiveSharpie tool to automate the mapping of Objective-C APIs to the .NET world. This is the tool that we use to keep up with Apple APIs.

One of the lesser known features of ObjectiveSharpie, is that it is not limited to binding Objective-C header files. It is also capable of creating definitions for C APIs.

To do this, merely use the "bind" command for ObjectiveSharpie and run it on the header file for the API that you want to bind:

	sharpie bind c-api.h -o binding.cs

The above command will produce the binding.cs that contains the C# definitions for both the native data structures and the C functions that can be invoked.

Since C APIs are ambiguous, in some cases ObjectiveSharpie will generate some diagnostics. In most cases it will flag methods that have to be bound with the [Verify]. This attribute is used as an indicator on your source code that you need to manually audit the binding, perhaps checking the documentation and adjust the P/Invoke signature accordingly.

There are various options that you can pass to the bind command, just invoke sharpie bind to get an up-to-date list of configuration options.

This is how I quickly bootstrapped the TensorFlowSharp binding. I got all the P/Invoke signatures done in one go, and then I started to do the work to surface an idiomatic C# API.

Posted on 18 Jan 2017


TLS 1.2 Comes to Mono: Update

by Miguel de Icaza

Update to the Update: See Nov 20th, 2017 Update for further updates.

Short version: the master branch of Mono now has support for TLS 1.2 out of the box. This means that SslStream now uses TLS 1.2, and uses of HttpWebRequest for HTTPS endpoints also uses TLS 1.2 on the desktop.

This brings TLS 1.2 to Mono on Unix/Linux in addition to Xamarin.{Mac,iOS,tvOS} which were already enabled to use TLS 1.2 via the native Apple TLS stack.

To use, install your fresh version of Mono, and then either run the btls-cert-sync command which will convert your existing list of trusted certificates to the new format (if you used cert-sync or mozroots in the past).

In Detail

The new version of Mono now embeds Google's Boring SSL as the TLS implementation to use.

Last year, you might remember that we completed a C# implementation of TLS 1.2. But we were afraid of releasing a TLS stack that had not been audited, that might contain exploitable holes, and that we did not have the cryptographic chops to ensure that the implementation was bullet proof.

So we decided that rather than ship a brand new TLS implementation we would use a TLS implementation that had been audited and was under active development.

So we picked Boring TLS, which is Google's fork of OpenSSL. This is the stack that powers Android and Google Chrome so we felt more comfortable using this implementation than a brand new implementation.

Linux Distributions

We are considering adding a --with-openssl-cert-directory= option to the configure script so that Linux distributions that package Mono could pass a directory that contains trusted root certificates in the format expected by OpenSSL.

Let us discuss the details in the [email protected]

Posted on 30 Sep 2016


Asset Previewer

by Miguel de Icaza

Mobile developers are working with all kinds of graphics assets and until now, to preview them, we would use an external tool to browse them.

We have developed a plug-in for both Visual Studio and Xamarin Studio that will provide live previews of various assets right into the IDE. It works particularly well for UrhoSharp projects.

The previewer can display in the IDE previews of the following asset types.

  • Static Models (*.mdl files)
  • Materials, Skyboxes, Textures (*.dds)
  • Animations (*.ani)
  • 2D and 3D Particles (*.pex)
  • Urho Prefabs (*.xml if the XML is an Urho Prefab)
  • Scenes (*.xml if the XML is an Urho Scene)
  • SDF Fonts (*.sdf)
  • Post-process effects (*.xml if the XML is an Urho RenderPath)
  • Urho UI layouts (*.xml if the XML is an Urho UI).

For Visual Studio, just download the previwer from the Visual Studio Gallery.

For Xamarin Studio, go to Xamarin Studio > Add-ins go to the "Gallery" tab, and search for "Graphics asset previewer" and install.

Posted on 28 Jul 2016


The Evolution of Interactive C#

by Miguel de Icaza

The Early Days

Years ago, in 2008 we introduced an interactive C# shell, at the time a challenge was to adjust the syntax to be suitable for interactive use, to provide a usable decent command line editing API for .NET and to turn our compiler as a service into a tool that could provide code completion.

A few months later, we added a UI shell for this on Linux and used Gtk's text widget to add support for embedding rich content into the responses. It was able to render images inline with the responses:

This was inspired at the time by the work that Owen Taylor at Red Hat had done on Re-interact. You can still watch a screencast of what it looked like.

Like Owen, I added a plot command:

At the time, Re-interact took some ideas from IPython and it seems like they are both inspired to some extent by Mathematica's interactive window.

Re-interact in particular introduced a brilliant idea, which was that users could go back in history, edit the previous expressions and the entire buffer would be re-evaluated. This idea lives on in Apple's Playgrounds for Swift.

In the meantime, the IPython project grew and they added one of my favorite features: it was now possible to blend text, explanations and code into workbooks. You can see a sample of this here. For years, I have desired an IPython for C#.

The Xamarin Years

In the meantime, at Xamarin, we experimented with the idea of bringing sometehing like Re-interact/Playgrounds to Xamarin Studio and we shipped Sketches:

But while these were interesting for trying out ideas and learning C#, they are not very useful for day to day work. We found that what our developers needed was a full C# REPL that was connected to the application they were running on, so they could experiment with their UI live. This is when we introduced Xamarin's Inspector. We took the existing engine and changed the way you interacted with C#.

The inspector was originally planned as a debugging aid, one that you could use to attach to a live Android/iOS/WPF process and use to examine:

We wrote several backends to provide some visual representation of the running app:

While Sketches used the IDE editing surface and a custom renderer view for results, with the Inspector we took a different route. Our interactive surface was an HTML canvas, and our results are rendered using HTML. This allowed us to do some pretty visualizations for results.

We have only started to explore what is possible in this space, and our last release included various data renderers. In particular, we added support for pretty printing collections and a handful of native Android and iOS results.

Up until now, we had been powered by Mono's C# compiler and while it has served us well for many years, it pales in comparison with the services that we could get out of Microsoft's Roslyn. Our code completion and error reporting were limited and the model did not translate too well to F#.

We recently switched the inspector to use Roslyn:

With this release, we ended up with an Inspector that can now be used either to debug/analyze a running app (very much like a web inspector), or one that can be used to experiment with APIs in the same spirit as other shells.

Continuous

In the meantime, Frank Krueger took the iOS support that we introduced for the compiler as a service, and wrote Continuous, a plug-in for Xamarin Studio and Visual Studio that allowed developers to live-code. That is, instead of using this as a separate tool, you can modify your classes and methods live and have your application update as you change the code:

Frank also added support for evaluating values immediately, and showing some values in comments, similar in spirit to his Calca app for iOS:

The Glorious Future

But now that we have a powerful HTML rendering engine to display our results and we upgraded our compiler engine, we are ready to take our next steps.

One step will be to add more visualizers and rendering capabilties to our results in our Inspector.

The second step is to upgrade Sketches based on this work. We will be changing the Sketches UI to be closer to IPython, that is, the ability of creating workbooks that contain both rich HTML text along with live code.

To give you a taste of what is coming up on our next release, check out this screenshot:

Developers will still have a few options of richly interacting with C# and F#:

  • With our inspector experiment with APIs like they do with many other interactive shells, and to poke and modify running apps on a wide spectrum of environments.
  • With Frank Krueger's Continuous engine to see your changes live for your C# code.
  • With our revamped Sketches/workbook approach to use it for creating training, educational materials.

Posted on 17 Feb 2016


Shared Projects or PCL?

by Miguel de Icaza

My colleague Jason Smith has shared his views on what developers should use when trying to share code between projects. Should you go with a Shared Project or a Portable Class Library (PCL) in the world of Xamarin.Forms?

He hastily concludes that you should go with PCLs (pronounced Pickles).

For me, the PCL is just too cumbersome for most uses. It is like using a canon to kill a fly. It imposes too many limitations (limited API surface), forces you to jump through hoops to achieve some very basic tasks.

PCLs when paired with Nugets are unmatched. Frameworks and library authors should continue to deliver these, because they have a low adoption barrier and in general bring smiles and delight to their users.

But for application developers, I stand firmly on the opposite side of Jason.

I am a fan of simplicity. The simpler the technology, the easier it is for you to change things. And when you are building mobile applications chances are, you will want to make sweeping changes, make changes continously and these are just not compatible with the higher bar required by PCLs.

Jason does not like #if statements on his shared code. But this is not the norm, it is an exception. Not only it is an exception, but careful use of partial classes in C# make this a non issue.

Plugging a platform specific feature does not to use an #if block, all you have to do is isolate the functioanlity into a single method, and have each platform that consumes the code implement that one method. This elegant idea is the same elegant idea that makes the Linux kernel source code such a pleasure to use - specific features are plugged, not #ifdefed.

If you are an application developer, go with Shared Projects for your shared code. And now that we support this for F#, there is no reason to not adopt them.

Posted on 22 Jan 2016


getline.cs update: Partying like it is 1992

by Miguel de Icaza

Back in 2008, I wrote about getline.cs, a single-file command line editor for shell application. It included Emacs key bindings, history, customizable completion and incremental search. It is equivalent to GNU's readline library, except it is implemented in a single C# file.

I recently updated getline.cs to add a popup-based completion and C# heuristics for when to automatically trigger code completion. This is what it looks like when using in Mono's C# REPL in the command line:

Posted on 14 Jan 2016


Mono's Cooperative Mode for SGen GC

by Miguel de Icaza

Mono's master tree now contains support for a new mode of operation for our garbage collector, we call this the cooperative mode. This is in contrast with the default mode of operation, the preemptive mode.

This mode is currently enabled by setting the MONO_ENABLE_COOP environment variable.

We implemented this new mode of operation to make it simpler to debug our GC, to have access to more data on the runtime during GC times and also to support certain platforms that do not provide the APIs that our preemptive system needed.

Behind Preemptive Mode

When we started building Mono back in 2001, we wanted to get something up and running very quickly. The idea was to have enough of a system running on Linux that we could have a fully self-hosting C# environment in a short period of time, and we managed to do this within eight months.

We were very lucky when it came to garbage collection that the fabulous Boehm GC existed. We were able to quickly add garbage collection to Mono, without having to think much about the problem.

Boehm is fabulous because it does not really require the cooperation of the runtime to work. It is a garbage collector that was originally designed to add garbage collection capabilities to programs written in C or C++. It performs garbage collection without much developer intervention. And it achieves this for existing code: multi-threaded, assembly-loving, low-level code.

Boehm GC is a thing of beauty.

Boehm achieves its magic by pulling some very sophisticated low-level tricks. For example, when it needs to perform a garbage collection it relies on various operating system facilities to stop all running threads, examine the stacks for all these threads to gather roots from the stack, perform the actual GC job then resume the operation of the program.

While Boehm is fantastic, in Mono, we had needs that would be better served with a custom garbage collector. One that was generational and reduced collection times. One fit more closely with .NET. It was then that we built the current GC for Mono: SGen.

SGen has grown by leaps and bounds and has been key in supporting many advanced scenarios on Android and iOS as well as being a higher performance and lower latency GC for Mono.

When we implemented SGen, we had to make some substantial changes to Mono's code generator. This was the first time that Mono's code generator had to coordinate with the GC.

SGen kept a key feature of Boehm: most running code was blissfully unaware that it could be stopped and resumed at any point.

This meant that we did not have to do too much work to integrate SGen into Mono [1]. There are two main downsides with this.

The first downside is that we still required the host platform to support some mechanism to stop, resume and inspect threads. This alone is pretty obnoxious and caused much grief to developers porting Mono to strange platforms.

The second downside is that code that runs during the collection is not really allowed to use many of the runtime APIs or primitives, because the collector might be running in parallel to the regular code. You can only use reentrant code.

This is a major handicap for development and debugging of the collector. One that is just too obnoxious to deal with and one that has wasted too much of our time.

Cooperative Mode

In the new cooperative mode, the generated code is instrumented to support voluntarily stopping execution

Conceptually, you can think of the generated code as one that basically checks on every back-branch, or every call site that the collector has requested for the thread to stop.

The supporting Mono runtime has been instrumented as well to deal with this scenario. This means that every API that is implemented in the C runtime has been audited to determine whether it can run in a finite amount of time, or if it is a blocking operation and adjusted to participate accordingly.

For methods that run in a finite amount of time, we just wait for them to return back to managed code, where we will stop.

For methods that might potentially block, we need to add some annotations that inform our GC that it is safe to assume that the thread is not running any mutating code. Consider the internal call that implements the CreateDirectory method. It now has been decorated with MONO_PREPARE_BLOCKING and MONO_FINISH_BLOCKING to delimit blocking code.

This means that threads do not stop right away as they used to, but they stop soon enough. And it turns out that soon enough is good enough.

This has a number of benefits. First, it allows us to support platforms that do not have enough system primitives to stop, resume and examine arbitrary threads. Those include things like the Windows Store, WatchOS and various gaming consoles.

But selfishly, the most important thing for us is that we will be able to treat the garbage collector code as something that is a first class citizen in the runtime: when the collector works, it will be running in such a state that accessing various runtime structures is fine (or even using any tasty C libraries that we choose to use).

Today

As of today, Mono's Coop engine can either be compiled in by default (by passing --with-cooperative-gc to configure), or by setting the MONO_ENABLE_COOP environment variable to any value.

We have used a precursor of Coop for about 18 months, and now we have a fully productized version of it on Mono master and we are looking for developers to try it out.

We are hoping to enable this by default next year. [1] Astute readers will notice that it still took years of development to make SGen the default collector in Mono.

Posted on 22 Dec 2015


David Brooks, Op-Ed for All Trades, Master of None

by Miguel de Icaza

I first heard about David Brooks' article criticizing Most Likely to Succeed from a Mom at school that told me it was a rebuttal to the movie, and I should check it out.

I nodded, but did not really expect the article to change my mind.

David Brooks is an all-terrain commentator which dispenses platitudes and opinions on a wide range of topics, usually with little depth or understanding. In my book, anyone that supported and amplified the very fishy evidence for going to war with Iraq has to go an extra mile to prove their worth - and he was specially gross when it came to it.

Considering that the best part about David Brook's writing is that they often prompt beautiful take downs from Matt Taibbi and that his columns have given rise to a cottage industry of bloggers that routinely point out just how wrong he is, my expectations were low.

Anyways, I did read the article.

While the tone of the article is a general disagreement with novel approaches to education, his prescription is bland and generic: you need some basic facts before you can build upon those facts and by doing this, you will become a wise person.

The question of course is just how many facts? Because it is one thing to know basic facts about our world like the fact that there are countries, and another one to memorize every date and place of a historic event.

But you won't find an answer to that on Brooks piece. If there is a case to be made to continue our traditional education and continue relying on tests to raise great kids, you will not find it here.

The only thing that transpires from the article is that he has not researched the subject - he is shooting from the hip. An action necessitated by the need to fill eight hundred words a short hour before lunch.

His contribution to the future of education brings as much intellectual curiosity as washing the dishes.

I rather not shove useless information into our kids. Instead we should fill their most previous years with joy and passion, and give them the tools to plot their own destinies. Raise curious, critical and confident kids.

Ones that when faced with a new problem opt for the more rewarding in-depth problem solving, one that will have them research, reach out to primary sources, and help us invent the future.

Hopefully we can change education and raise a happier, kinder and better generation of humans. The road to get there will be hard, and we need to empower the teachers and schools that want to bring this change.

"Most Likely to Succeed" represends Forward Motion, and helps us start this discussion, and David's opinions should be dismissed for what they are: a case of sloppy stop energy.

Do not miss Ted Dintersmith's response to the article, my favorite part:

I agree with Brooks that some, perhaps even many, gain knowledge and wisdom over time. We just don’t gain it in school. It comes when we’re fully immersed in our careers, when we do things, face setbacks, apply our learning, and evolve and progress. But that almost always comes after our formal education is over. I interview a LOT of recent college graduates and I’m not finding lots of knowledge and wisdom. Instead, I find lots of student debt, fear of failure, and formulaic thinking. And what do I rarely see? Passion, purpose, creativity, and audacity.

So, game on, David Brooks and others defending the 19th Century model of education.

Posted on 19 Oct 2015


Roslyn in MonoDevelop/XamarinStudio

by Miguel de Icaza

As promised, we now have a version of our IDE powered by Roslyn, Microsoft's open sourced C# compiler as a service

When we did the port we found various leaks in the IDE that were made worse by Roslyn, so we decided to take the time and fix those leaks, and optimize our use of Roslyn.

Next Steps

We want to get your feedback on how well it works and to let us know what problems you are running into. Once we feel that there are no regressions, we will make this part of the default IDE.

While Roslyn is very powerful, this power comes with a memory consumption price tag. The Roslyn edition of Xamarin Studio will use more memory.

We are working to reduce Roslyn's and Xamarin Studio memory usage in future versions.

Posted on 21 Sep 2015


Mono and LLVM's BitCode

by Miguel de Icaza

This past June, Apple announced that WatchOS 2 applications would have to be submitted using LLVM BitCode. The idea being that Apple could optimize your code as new optimizations are developed or new CPU features are introduced, and users would reap the benefits without requiring the developer to resubmit their applications.

BitCode is a serialized version of the low-level intermediate representation used by LLVM.

WatchOS 2 requires pure BitCode to be submitted. That is, BitCode that does not contain any machine code blobs. iOS supports mixed mode BitCode, that is, BitCode that contains both the LLVM intermediate representation code, and blobs of machine code.

While Mono has had an LLVM backend for a long time, generating pure BitCode posed a couple of challenges for us.

First, Mono's LLVM backend does not cover all the generated code. There were some corner cases that we handled with Mono's old code generator. Also, Mono uses hand-written assembly language code in various places (lots of small optimizations involving generics code sharing, method dispatch and other things like that). This poses a problem for WatchOS.

Secondly, Mono uses a modified version of LLVM that adds support for many .NET idioms. In particular, our changes to LLVM produce the necessary information to support .NET-style exception handling [1].

We spent the summer adapting Mono to produce Vanilla LLVM bitcode support. This includes the removal of our hand-tuned machine code, as well as devising a new system for exception handling that works in this context. Sadly, the exception handling is not as efficient as the one that we got with our modified LLVM.

Hopefully, we will be able to upstream our changes for better exception handling for .NET-like languages to LLVM in the future and get some of the performance back.

Notes

[1] Vanilla LLVM exception support requires exceptions to be explicit. In .NET some exceptions happen implicitly, for example, when dereferencing a null pointer, or dividing by zero.

Posted on 02 Sep 2015


Xamarin Release Cycles

by Miguel de Icaza

There are four major components of Xamarin's platform product: the Android SDK, the iOS SDK, our Xamarin Studio IDE and our Visual Studio extension.

In the past, we used to release each component independently, but last year we realized that developing and testing each component against the other ones was getting too expensive, too slow and introduced gratuitous errors.

So we switched to a new style of releases where all the components ship together at the same time. We call these cycles.

We have been tuning the cycle releases. We started with time-based releases on a monthly basis, with the idea that any part of the platform that wanted to be released could catch one of these cycles, or wait for the next cycle if they did not have anything ready.

While the theory was great, the internal dependencies of these components was difficult to break, so our cycles started taking longer and longer.

On top of the cycles, we would always prepare builds for new versions of Android and iOS, so we could do same-day releases of the stacks. These are developed against our current stable cycle release, and shipped when we need to.

We are now switching to feature-based releases. This means that we are now waiting for features to be stable, with long preview periods to ensure that no regressions are introduced.

Because feature based releases can take as long as it is needed to ship a feature, we have introduced Service Releases on top of our cycles.

Our Current Releases

To illustrate this scenario, let me show what our current platform looks like.

We released our Cycle 5 to coincide with the Build conference, back in April 29th. This was our last timed release (we call this C5).

Since then we have shipped three service releases which contain important bug fixes and minor features (C5-SR1, SR2 and SR3), with a fourth being cooked in the oven right now (C5-SR4)

During this time, we have issued parallel previews of Android M and iOS 9 support, those are always built on top of the latest stable cycle. Our next iOS 9 preview for example, will be based on the C5-SR4.

We just branched all of our products for the next upgrade to the platform, Cycle 6.

This is the cycle that is based on Mono 4.2.0 and which contains a major upgrade to our Visual Studio support for iOS and plenty of improvements to Xamarin Studio. I will cover some of my favorite features in Cycle 6 in future posts.

Posted on 01 Sep 2015


State of TLS in Mono

by Miguel de Icaza

This is an update on our efforts to upgrade the TLS stack in Mono.

You can skip to the summary at the end if you do not care about the sausage making details.

Currently, TLS is surfaced in a few places in the .NET APIs:

  • By the SslStream class, which is a general purpose class that can be used to turn any bidirectional stream into an TLS-powered stream. This class is what currently powers the web client in Mono.
  • By the HttpWebRequest class, which provides .NET's HTTP client. This in turn is the foundation for the modern HttpClient, both the WCF and WebServices stacks as well as the quick and dirty WebClient API.

HttpClient is in particular interesting, as it allows for different transports to be provided for it. The default implementation in .NET 4.5 and Mono today is to use an HttpWebRequest-based implementation. But on Windows 10, the implementation is replaced with one that uses WinRT's HTTP client.

Microsoft is encouraging developers to abandon HttpWebRequest and instead adopt HttpClient as it both async-friendly and can use the best available transport given on a specific platform. More on this in a second.

Mono's Managed TLS

Mono currently only supports TLS 1.0.

This is the stack that powers SslStream and HttpWebRequest.

Last year we started an effort to bring managed implementations of TLS 1.2 and TLS 1.1. Given how serious security has become and how many holes have been found in existing implementation, we built this with an extensive test suite to check for conformance and to avoid common exploits found in implementation mistakes of TLS. This effort is currently under development and you can see where it currently lives at mono-tls module.

This will give us complete TLS support for the entire stack, but this work is still going to take a few months to audit.

Platform Specific HttpClients

Most of the uses for TLS today is via the HTTP protocol, and not over custom TLS streams. This means that it is more important to get an HTTP client that supports a brand new TLS stack, than it is to provide the SslStream code.

We want to provide native HttpClient handlers for all of Mono's supported platforms: Android, iOS, Mac, Linux, BSD, Unix and Windows.

On iOS: Today Xamarin.iOS already ships a native handler, the CFNetworkHandler. This one is powered by Apple's CFNetwork stack. In recent years, Apple has improved their networking stack, and we now I strongly recommend using Paul Bett's fantastic ModernHttpClient which uses iOS' brand new NSUrlSession and uses OkHttp on Android.

On Android: in the short term, we recommend adopting ModernHttpClient from Paul Betts (bonus points: the same component works on iOS with no changes). In the long term, we will change the default handler to use the Android Java client.

In both cases, you end up with HTTP 2.0 capable clients for free.

But this still leaves Linux, Windows and other assorted operating systems without a regular transport.

For those platforms, we will be adopting the CoreFX handlers, which on Unix are powered by the libcurl library.

This still leaves HttpWebRequest and everything built on top of it running on top of our TLS stack.

Bringing Microsoft's SslStream and HttpWebRequest to Mono

While this is not really TLS related, we wanted to bring Microsoft's implementations of those two classes to Mono, as they would fix many odd corner cases in the API, and address limitations in our stack that do not exist in Microsoft's implementation.

But the code is tightly coupled to native Windows APIs which makes the adoption of this code difficult.

We have built an adaptation layer that will allow us to bring Microsoft's code and use Mono's Managed TLS implementation.

SslStream backends

Our original effort focused on a pure managed implementation of TLS because we want to ensure that the TLS stack would work on all available platforms in the same way. This also means that all of the .NET code that expects to control every knob of your secure connection to work (pinning certificates or validating your own chains for example).

That said, in many cases developers do not need this capabilities, and in fact, on Xamarin.iOS, we can not even provide the functionality, as the OS does not give users access to the certificate chains.

So we are going to be developing at least two separate SslStream implementations. For Apple systems, we will be implementing a version on top of Apple's SSL stack, and for other systems we will be developing an implementation on top of Amazon's new SSL library, or the popular OpenSSL variant of the day.

These have the advantage that we would not need to maintain the code, and we benefit from third parties doing all the hard security work and will be suitable for most uses.

For those rare uses that like to handle connections manually, you will have to wait for Mono's new TLS implementation to land.

In Summary

Android, Mac and iOS users can get the latest TLS for HTTP workloads using ModernHttpClient. Mac/iOS users can use the built-in CFNetworkHandler as well.

Soon: OpenSSL/AppleSSL based transports to be available in Mono (post Mono 4.2).

Soon: Advanced .NET SSL use case scenarios will be supported with Mono's new mono-tls stack

Soon: HttpWebRequest and SslStream stacks will be replaced in Mono with Microsoft's implementations.

Posted on 27 Aug 2015


Roslyn and Mono

by Miguel de Icaza

Hello Internet! I wanted to share some updates of Roslyn and Mono.

We have been working towards using Roslyn in two scenarios. As the compiler you get when you use Mono, and as the engine that powers code completion and refactoring in the IDE.

This post is a status update on the work that we have been doing here.

Roslyn on MonoDevelop/XamarinStudio

For the past year, we have been working on replacing the IDE's engine that gives us code completion, refactoring capabilities and formatting capabilities with one powered by Roslyn.

The current engine is powered by a combination of NRefactory and the Mono C# compiler. It is not as powerful, comprehensive or reliable as Roslyn.

Feature-wise, we completed the effort, and we now have a Roslyn-powered branch that uses Roslyn for code completion, refactoring, suggestions and code formatting.

In addition, we ported most of the refactoring capabilities from NRefactory to work on top of Roslyn. These were quite significant. Visual Studio users can try them out by installing the Refactoring Essentials for Visual Studio extension.

While our Roslyn branch is working great and is a pleasure to use, it also consumes more memory and by extension, runs a little slower. This is not Roslyn's fault, but the side effects of leaks and limitations in our code.

Our original plan was to release this for our September release (what we internally call "Cycle 6"), but we decided to pull the feature out from the release to give us time to fix the leaks that affected the Roslyn engine and tune the performance of Roslyn running on Mono.

Our revisited plan is to ship an update to our tooling in Cycle 6 (the regular feature update) but without Roslyn. In parallel, we will ship a Roslyn-enabled preview of MonoDevelop/XamarinStudio. This will give us time to collect your feedback on performance and memory usage regressions, and time to fix the issues before we make Roslyn the default.

Roslyn as a Compiler in Mono

One of the major roadblocks for the adoption of Roslyn in Mono was the requirement to generate debugging information that Mono could consume on Unix (the other one is that our C# batch compiler is still faster than Roslyn).

The initial Roslyn release only had support for generating debug information through a proprietary/native library on Windows, which meant that while Roslyn could be used to compile code on Unix, the result would not contain any debug information - this prevented Roslyn from being useful for most compilation uses.

Recently, Roslyn got support for Portable Program Database (PPDB) files. This is a fully documented, open, compact and efficient format for storing debug information.

Mono's master release contains now support for using PPDB files as its debug information. This means that Roslyn can produce debug information that Mono can consume.

That said, we still need more work in the Mono ecosystem to fully support PPDB files. The Cecil library is used extensively to manipulate IL images as well as their associated debug information. Our Reflection.Emit implementation will need to get a backend to generate PPDBs (for third party compilers, dynamic code generators) and support in IKVM to produce PPDB files (this is used by Mono's C# compiler and other third party compilers).

Additionally, many features in Roslyn surfaced bloat and bugs in Mono's class libraries. We have been fixing those bugs (and in many cases, the bugs have gone away by replacing Mono's implementation with implementations from Microsoft's Reference Source).

Posted on 21 Jul 2015


In Defense of the Selfie Stick

by Miguel de Icaza

From the sophisticated opinion of the trendsetters to Forbes, the Selfie Stick is the recipient of scorn and ridicule.

One of the popular arguments against the Selfie Stick is that you should build the courage to ask a stranger to take a picture of you or your group.

This poses three problems.

First, the courage/imposition problem. Asking a stranger in the street assumes that you will find such a volunteer.

Further, it assumes that the volunteer will have the patience to wait for the perfect shot ("wait, I want the waves breaking" or "Try to get the sign, just on top of me"). And that the volunteer will have the patience to show you the result and take another picture.

Often, the selfista that has amassed the courage to approach a stranger on the street, out of politeness, will just accept the shot as taken. Good or bad.

Except for a few of you (I am looking at you Patrick), most people feel uncomfortable imposing something out of the blue on a stranger.

And out of shyness, will not ask a second stranger for a better shot as long as the first one is within earshot.

I know this.

Second, you might fear for the stranger to either take your precious iPhone 6+ and run, or even worse, that he might sweat all over your beautiful phone and you might need to disinfect it.

Do not pretend like you do not care about this, because I know you do.

Third, and most important, we have the legal aspect.

When you ask someone to take a picture of you, technically, they are the photographer, and they own the copyright of your picture.

This means that they own the rights to the picture and are entitled to copyright protection. The photographer, and, not you, gets to decide on the terms to distribute, redistribute, publish or share the picture with others. Including making copies of it, or most every other thing that you might want to do with those pictures.

You need to explicitly get a license from them, or purchase the rights. Otherwise, ten years from now, you may find yourself facing a copyright lawsuit.

All of a sudden, your backpacking adventure in Europe requires you to pack a stack of legal contracts.

Now your exchange goes from "Can you take a picture of us?" to "Can you take a picture of us, making sure that the church is on the top right corner, and also, I am going to need you to sign this paper".

Using a Selfie Stick may feel awkward, but just like a condom, when properly used, it is the best protection against unwanted surprises.

Posted on 22 Jan 2015


.NET Foundation: Advisory Council

by Miguel de Icaza

Do you know of someone that would like to participate in the .NET foundation, as part of the .NET Foundation Advisory Council?

Check the discussion where we are discussing the role of the Advisory Council.

Posted on 01 Dec 2014


Microsoft Open Sources .NET and Mono

by Miguel de Icaza

Today, Scott Guthrie announced that Microsoft is open sourcing .NET. This is a momentous occasion, and one that I have advocated for many years.

.NET is being open sourced under the MIT license. Not only is the code being released under this very permissive license, but Microsoft is providing a patent promise to ensure that .NET will get the adoption it deserves.

The code is being hosted at the .NET Foundation's github repository.

This patent promise addresses the historical concerns that the open source, Unix and free software communities have raised over the years.

.NET Components

There are three components being open sourced: the .NET Framework Libraries, .NET Core Framework Libraries and the RyuJit VM. More details below.

.NET Framework Class Libraries

These are the class libraries that power the .NET framework as it ships on windows. The ones that Mono has historically implemented in an open source fashion.

The code is available today from http://github.com/Microsoft/referencesource. Mono will be able to use as much a it wants from this project.

We have a project underway that already does this. We are replacing chunks of Mono code that was either incomplete, buggy, or not as fully featured as it should be with Microsoft's code.

We will be checking the code into github.com/mono by the end of the week (I am currently in NY celebrating :-)

Microsoft has stated that they do not currently plan on taking patches back or engaging into a full open source community style development of this code base, as the requirements for backwards compatibility on Windows are very high.

.NET Core

The .NET Core is a redesigned version of .NET that is based on the simplified version of the class libraries as well as a design that allows for .NET to be incorporated into applications.

Those of you familiar with the PCL 2.0 contract assemblies have a good idea of what these assemblies will look like.

This effort is being hosted at https://github.com/dotnet/corefx and is an effort where Microsoft will fully engage with the community to evolve, develop and improve the class libraries.

Today, they released the first few components to github; the plan is for the rest of the redesigned frameworks to be checked in here in the next few months.

Xamarin and the Mono project will be contributing to the efforts to bring .NET to Mac, Unix, Linux and other platforms. We will do this as Microsoft open sources more pieces of .NET Core, including RyuJIT.

Next Steps

Like we did in the past with .NET code that Microsoft open sourced, and like we did with Roslyn, we are going to be integrating this code into Mono and Xamarin's products.

Later this week, expect updated versions of the Mono project roadmap and a list of tasks that need to be completed to integrate the Microsoft .NET Framework code into Mono.

Longer term, we will make the Mono virtual machine support the new .NET Core deployment model as well as the new VM/class library interface

We are going to be moving the .NET Core discussions over to the .NET Foundation Forums.

With the Mono project, we have spent 14 years working on open source .NET. Having Microsoft release .NET and issue a patent covenant will ensure that we can all cooperate and build a more vibrant, richer, and larger .NET community.

Posted on 12 Nov 2014


Mono for Unreal Engine

by Miguel de Icaza

Earlier this year, both Epic Games and CryTech made their Unreal Engine and CryEngine available under an affordable subscription model. These are both very sophisticated game engines that power some high end and popular games.

We had previously helped Unity bring Mono as the scripting language used in their engine and we now had a chance to do this over again.

Today I am happy to introduce Mono for Unreal Engine.

This is a project that allows Unreal Engine users to build their game code in C# or F#.

Take a look at this video for a quick overview of what we did:

This is a taste of what you get out of the box:

  • Create game projects purely in C#
  • Add C# to an existing project that uses C++ or Blueprints.
  • Access any API surfaced by Blueprint to C++, and easily surface C# classes to Blueprint.
  • Quick iteration: we fully support UnrealEngine's hot reloading, with the added twist that we support it from C#. This means that you hit "Build" in your IDE and the code is automatically reloaded into the editor (with live updates!)
  • Complete support for the .NET 4.5/Mobile Profile API. This means, all the APIs you love are available for you to use.
  • Async-based programming: we have added special game schedulers that allow you to use C# async naturally in any of your game logic. Beautiful and transparent.
  • Comprehensive API coverage of the Unreal Engine Blueprint API.

This is not a supported product by Xamarin. It is currently delivered as a source code package with patches that must be applied to a precise version of Unreal Engine before you can use it. If you want to use higher versions, or lower versions, you will likely need to adjust the patches on your own.

We have set up a mailing list that you can use to join the conversation about this project.

Visit the site for Mono for Unreal Engine to learn more.

(I no longer have time to manage comments on the blog, please use the mailing list to discuss).

Posted on 23 Oct 2014


.NET Foundation: Forums and Advisory Council

by Miguel de Icaza

Today, I want to share some news from the .NET Foundation.

Forums: We are launching the official .NET Foundation forums to engage with the larger .NET community and to start the flow of ideas on the future of .NET, the community of users of .NET, and the community of contributors to the .NET ecosystem.

Please join us at forums.dotnetfoundation.org. We are using the powerful Discourse platform. Come join us!

Advisory Council: We want to make the .NET Foundation open and transparent. To achieve that goal, we decided to create an advisory council. But we need your help in shaping the advisory council: its role, its reach, its obligations and its influence on the foundation itself.

To bootstrap the discussion, we have a baseline proposal that was contributed by Shaun Walker. We want to invite the larger .NET community to a conversation about this proposal and help us shape the advisory council.

Check out the Call for Public Comments which has a link to the baseline proposal and come join the discussion at the .NET Forums.

Posted on 14 Oct 2014


Markdown Style Guide

by Miguel de Icaza

Markdown is as a file format for easily producing text that can be pleasantly read both on the web and while using command line tools, or plain text editors.

Recently, a crop of tools have emerged that deliver some form of WYSIWYG or side-by-side authoring tools to assist writers to visualize the final output as they work.

Authors are turning to these tools to produce documentation that looks good when authoring the document, yet the tools are not true to the spirit and goals of markdown. And in some cases, authors are not familiar with the essence of what makes markdown great, nor the philosophy behind it:

Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.

Using these editors is the modern equivalent of using Microsoft Word to produce HTML documentation.

The generated markdown files very easy to produce, but are not suitable for human consumption. They likely violate a number of international treaties and probably will be banned by the EU.

This short post is a set of simple rules to improve your markdown.

They will help you deliver delight to all of your users, not just those using a web browser, but also those casually reading your documentation with a file manager, their console, and most importantly, potential contributors and copy editors that have to interact with your text.

Wrap Your Text

The ideal reading length for reading prose with a monospaced font is somewhere between 72 and 78 characters.

This is text snippet is from Mark Twain's Adventures of Tom Sawyer, with text wrapped around column 72, when reading in an 80x25 console:

It wont matter if you are using a larger console, the text will still be pleasant to read.

But if you use some of these markdown editors that do not bother wrapping your text, this is what the user would get:

And this is what is more likely to happen, with big consoles on big displays:

There is a reason why most web sites set a maximum width for the places where text will be displayed. It is just too obnoxious to read otherwise.

Many text editors have the ability of reformatting text your text when you make changes.

This is how you can fill your text in some common editors:

  • Emacs: Alt-Q will reformat your paragraph.
  • Vim: "V" (to start selection) then "gq" will reformat your selection.
  • TextMate: Control-Q.

Considering Using Two Spaces After a Period

When reading text on the console, using two spaces after a period makes it easier to see where phrases end and start.

While there is some debate as to the righteouness of one vs two spaces in the word of advanced typography these do not apply to markdown text. When markdown is rendered into HTML, the browser will ignore the two spaces and turn it into one, but you will give your users the extra visual cues that they need when reading text.

If you are interested in the topic, check these posts by Heraclitean River and DitchWalk.

Sample Code

For small code snippets, it is best if you just indent your code with spaces, as this will make your console experience more pleasant to use.

Recently many tools started delimiting code with the "```". While this has its place in large chunks of text, for small snippets, it is the visual equivalent of being punched in the face.

Try to punch your readers in the face only when absolutely necessary.

Headers

Unless you have plans to use multiple-nested level of headers, use the underline syntax for your headers, as this is visually very easy to scan when reading on a console.

That is, use:

Chapter Four: Which iPhone 6 is Right For You.
==============================================

In the previous chapter we established the requirement to buy iPhones
in packs of six.  Now you must choose just whether you are going to go
for an apologetically aluminum case, or an unapologetically plastic
iPhone.
	

Instead of the Atx-style headers:

# Chapter Four: Which iPhone 6 is Right For You.
	

The second style can easily drown in a body of text, and can not help as a visual aid to see where new sections start.

Blockquotes

While markdown allows you to only set the first character for a blockquote, like this:

> his is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
	

Editors like Emacs, can reformat that text just fine, all you have to do is set the "Fill Prefix", by positioning your cursor after the "> " and use Control-x ., then you can use the regular fill command: Alt-Q, and this will produce:

> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere
> lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet
> vitae, risus.

Lists

Again, while Markdown will happily allow you to write things like:

*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
Suspendisse id sem consectetuer libero luctus adipiscing.

You should love your reader, and once again, if you are using something like Emacs, use the fill prefix to render the list like this instead:

*   Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
    viverra nec, fringilla in, laoreet vitae, risus.
*   Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
    Suspendisse id sem consectetuer libero luctus adipiscing.	

Posted on 30 Sep 2014


Three Tricks in Xamarin Studio

by Miguel de Icaza

I wanted to share three tricks that I use a lot in Xamarin Studio/MonoDevelop.

Trick 1: Navigate APIs

Xamarin Studio's code completion for members of an object defaults to showing all the members sorted by name.

But if you press Control-space, it toggles the rendering and organizes the results. For example, for this object of type UIWindow, it first lists the methods available for UIWindow sorted by name, and then the cluster for its base class UIView:

This is what happens if you scroll to the end of the UIWindow members:

Trick 2: Universal Search

Use the Command-. shortcut to activate the universal search, once you do this and start typing it will find matches for both members and types in your solution, as well as IDE commands and the option to perform a full text search:

Trick 3: Dynamic Abbreviation Completion

This is a feature that we took from Emacs's Dynamic Abbrevs.

If you type Control-/ when you type some text, the editor will try to complete the text you are typing based on strings found in your project that start with the same prefix.

Hit control-/ repeatedly to cycle over possible completions.

Posted on 20 Aug 2014


Five Cross Platform Pillars

by Miguel de Icaza

The last couple of years have been good to C# and .NET, in particular in the mobile space.

While we started just with a runtime and some basic bindings to Android and iOS back in 2009, we have now grown to provide a comprehensive development stack: from the runtime, to complete access to native APIs, to designers and IDEs and to a process to continuously deliver polish to our users.

Our solution is based on a blend of C# and .NET as well as bindings to the native platform, giving users a spectrum of tools they can use to easily target multiple platforms without sacrificing quality or performance.

As the industry matured, our users found themselves solving the same kinds of problems over and over. In particular, many problems related to targeting multiple platforms at once (Android, iOS, Mac, WinPhone, WinRT and Windows).

By the end of last year we had identified five areas where we could provide solutions for our users. We could deliver a common framework for developers, and our users could focus on the problem they are trying to solve.

These are the five themes that we identified.

  • Cross-platform UI programming.
  • 2D gaming/retained graphics.
  • 2D direct rendering graphics.
  • Offline storage, ideally using SQLite.
  • Data synchronization.

Almost a year later, we have now delivered four out of the five pillars.

Each one of those pillars is delivered as a NuGet package for all of the target platforms. Additionally, they are Portable Class Libraries, which allows developers to create their own Portable Class Libraries on top of these frameworks.

Cross Platform UI programming

With Xamarin 3.0 we introduced Xamarin.Forms, which is a cross-platform UI toolkit that allows developers to use a single API to target Android, iOS and WinPhone.

Added bonus: you can host Xamarin.Forms inside an existing native Android, iOS or WinPhone app, or you can extend a Xamarin.Forms app with native Android, iOS or WinPhone APIs.

So you do not have to take sides on the debate over 100% native vs 100% cross-platform.

Many developers also want to use HTML and Javascript for parts of their application, but they do not want to do everything manually. So we also launched support for the Razor view engine in our products.

2D Gaming/Retained Graphics

Gaming and 2D visualizations are an important part of applications that are being built on mobile platforms.

We productized the Cocos2D API for C#. While it is a great library for building 2D games -and many developers build their entire experiences entirely with this API- we have also extended it to allow developers to spice up an existing native application.

We launched it this month: CocosSharp.

Offline Storage

While originally our goal was to bring Mono's System.Data across multiple platforms (and we might still bring this as well), Microsoft released a cross-platform SQLite binding with the same requirements that we had: NuGet and PCL.

While Microsoft was focused on the Windows platforms, they open sourced the effort, and we contributed the Android and iOS ports.

This is what powers Azure's offline/sync APIs for C#.

In the meantime, there are a couple of other efforts that have also gained traction: Eric Sink's SQLite.Raw and Frank Krueger's sqlite-net which provides a higher-level ORM interface.

All three SQLite libraries provide NuGet/PCL interfaces.

Data Synchronization

There is no question that developers love Couchbase. A lightweight NoSQL database that supports data synchronization via Sync gateways and Couchbase servers.

While Couchbase used to offer native Android and iOS APIs and you could use those, the APIs were different, since each API was modeled/designed for each platform.

Instead of writing an abstraction to isolate those APIs (which would have been just too hard), we decided to port the Java implementation entirely to C#.

The result is Couchbase Lite for .NET. We co-announced this development with Couchbase back in May.

Since we did the initial work to bootstrap the effort, Couchbase has taken over the maintenance and future development duties of the library and they are now keeping it up-to-date.

While this is not yet a PCL/NuGet, work is in progress to make this happen.

Work in Progress: 2D Direct Rendering

Developers want to have access to a rich API to draw. Sometimes used to build custom controls, sometimes used to draw charts or to build entire applications based on 2D rendered API.

We are working on bringing the System.Drawing API to all of the mobile platforms. We have completed an implementation of System.Drawing for iOS using CoreGraphics, and we are now working on both an Android and WinPhone implementations.

Once we complete this work, you can expect System.Drawing to be available across the board as a NuGet/PCL library.

If you can not wait, you can get your hands today on the Mac/iOS version from Mono's repository.

Next Steps

We are now working with our users to improve these APIs. But we wont stop at the API work, we are also adding IDE support to both Xamarin Studio and Visual Studio.

Posted on 20 Aug 2014


Mono Performance Team

by Miguel de Icaza

For many years a major focus of Mono has been to be compatible-enough with .NET and to support the popular features that developers use.

We have always believed that it is better to be slow and correct than to be fast and wrong.

That said, over the years we have embarked on some multi-year projects to address some of the major performance bottlenecks: from implementing a precise GC and fine tuning it for a number of different workloads to having implemented now four versions of the code generator as well as the LLVM backend for additional speed and things like Mono.SIMD.

But these optimizations have been mostly reactive: we wait for someone to identify or spot a problem, and then we start working on a solution.

We are now taking a proactive approach.

A few months ago, Mark Probst started the new Mono performance team. The goal of the team is to improve the performance of the Mono runtime and treat performance improvements as a feature that is continously being developed, fine-tuned and monitored.

The team is working both on ways to track performance of Mono over time, implemented support for getting better insights into what happens inside the runtime and has implemented several optimizations that have been landing into Mono for the last few months.

We are actively hiring for developers to join the Mono performance team (ideally in San Francisco, where Mark is based).

Most recently, the team added a new and sophisticated new stack for performance counters which allows us to monitor what is happening on the runtime, and we are now able to export to our profiler (a joint effort between our performance team and our feature team and implemented by Ludovic). We also unified both the runtime and user-defined performance counters and will soon be sharing a new profiler UI.

Posted on 23 Jul 2014


Better Crypto: Did Snowden Succeed?

by Miguel de Icaza

Snowden is quoted on Greenwald's new book "No Place to Hide" as wanting to both spark a debate over the use of surveillance and to get software developers to adopt and create better encryption:

While I pray that public awareness and debate will lead to reform, bear in mind that the policies of men change in time, and even the Constitution is subverted when the appetites of power demand it. In words from history: Let us speak no more of faith in man, but bind him down from mischief by the chains of cryptography.

[...]

The shock of this initial period [after the first revelations] will provide the support needed to build a more equal internet, but this will not work to the advantage of the average person unless science outpaces law. By understanding the mechanisms through which our privacy is violated, we can win here. We can guarantee for all people equal protection against unreasonable search through universal laws, but only if the technical community is willing to face the threat and commit to implementing over-engineered solutions.

Last week Matthew Green asked:

Only time will be able to answer whether as a community the tech world can devise better and simpler tools for normal users to have their privacy protected by default.

Snowden has succeeded in starting an important discussion and having software developers and their patrons react to the news.

At Xamarin we build developer tools for Android and iOS developers. It is our job to provide tools that developers use on a day to day basis to build their applications, and we help them build these mobile applications.

In the last year, we have noticed several changes in our developer userbase. Our customers are requesting both features and guidance on a number of areas.

Developers are reaching to us both because there is a new understanding about what is happening to our electronic communications and also response to rapidly changing requirements from the public and private sectors.

Among the things we have noticed:

  • Using Trusted Roots Respectfully: For years, we tried to educate our users on what they should do when dealing with X509 certificates. Two years ago, most users would just pick the first option "Ignore the problem".
    Today this is no longer what developers do by default.
  • Certificate Pinning: more than ever, developers are using certificate pinning to ensure that their mobile applications are only talking to the exact party they want to.
  • Ciphersuite Selection: We recently had to extend the .NET API to allow developers to force our networking stack to control which cipher suites the underlying SSL/TLS stack uses. This is used to prevent weak or suspected ciphersuites to be used for the communications.
  • Request for more CipherSuites: Our Mono runtime implements its own SSL/TLS and crypto stacks entirely in C#. Our customers have asked us to support new cipher suites on newer versions of the standards.

Sometimes developers can use the native APIs we provide to achieve the above goals, but sometimes the native APIs on Android and iOS make this very hard or do not expose the new desired functionality, so we need to step in.

Posted on 21 May 2014


News from the .NET World

by Miguel de Icaza

Some great announcements today from the Microsoft world.

#1 Open Source ASP.NET stack

The first one is that Microsoft's next generation web stack (ASP.NET vNext) is open source from the ground up, and runs on Mono on both Linux and Mac.

There are plenty of other design principles in this new version of ASP.NET. I provide a translation from Microsoft speak into Unix speak in parenthesis:

  • Cloud-ready out of the box (this is code name for "can run with different versions of .NET side by side").
  • A single programming model for Web sites and services
  • Low-latency developer experience (Refresh on browser recompiles)
  • Make high-performance and high-productivity APIs and patterns available - enable them both to be used and compose together within a single app.
  • Fine-grained control available via command-line tools and standard file formats.
  • Delivered via NuGet (package manager, similar to Node's NPM or Ruby Gems).
  • Release as open source via the .NET Foundation.
  • Can run on Mono, on Mac and Linux.

Update: And the software is live at http://github.com/aspnet

Client Libraries to Microsoft Services

They are shipping a number of new components to talk to their online services, and they all have a license suitable for being used from platforms other than Windows.

Posted on 12 May 2014


Roslyn Update

by Miguel de Icaza

As promised, we are now tracking the Unix-friendly Roslyn port on Mono's GitHub Organization.

We implemented a few C# 6.0 features in Mono's C# compiler to simplify the set of patches required to compile Roslyn.

So you will need a fresh Mono (from git).

Posted on 28 Apr 2014


Documentation for our new iOS Designer

by Miguel de Icaza

The team has put together some beautiful getting started documentation for our iOS User Interface Designer.

In particular, check a couple of hot features on it:

Posted on 14 Apr 2014


Mono on PS4

by Miguel de Icaza

We have been working with a few PlayStation 4 C# lovers for the last few months. The first PS4 powered by Mono and MonoGame was TowerFall:

We are very excited about the upcoming Transistor, by the makers of Bastion, coming out on May 20th:

Mono on the PS4 is based on a special branch of Mono that was originally designed to support static compilation for Windows's WinStore applications [1].

[1] Kind of not very useful anymore, since Microsoft just shipped static compilation of .NET at BUILD. Still, there is no wasted effort in Mono land!

Posted on 14 Apr 2014


Mono and Roslyn

by Miguel de Icaza

Last week, Microsoft open sourced Roslyn, the .NET Compiler Platform for C# and VB.

Roslyn is an effort to create a new generation of compilers written in managed code. In addition to the standard batch compiler, it contains a compiler API that can be used by all kinds of tools that want to understand and manipulate C# source code.

Roslyn is the foundation that powers the new smarts in Visual Studio and can also be used for static analysis, code refactoring or even to smartly navigate your source code. It is a great foundation that tool developers will be able to build on.

I had the honor of sharing the stage with Anders Hejlsberg when he published the source code, and showed both Roslyn working on a Mac with Mono, as well as showing the very same patch that he demoed on stage running on Mono.

Roslyn on Mono

At BUILD, we showed Roslyn running on Mono. If you want to run your own copy of Roslyn today, you need to use both a fresh version of Mono, and apply a handful of patches to Roslyn [2].

The source code as released contains some C# 6.0 features so the patches add a bootstrapping phase, allowing Roslyn to be built with a C# 5.0 compiler from sources. There are also a couple of patches to deal with paths (Windows vs Unix paths) as well as a Unix Makefile to build the result.

Sadly, Roslyn's build script depends on a number of features of MSBuild that neither Mono or MonoDevelop/XamarinStudio support currently [3], but we hope we can address in the future. For now, we will have to maintain a Makefile-based system to use Roslyn.

Our patches no longer apply to the tip of Roslyn master, as Roslyn is under very active development. We will be updating the patches and track Roslyn master on our fork moving forward.

Currently Roslyn generates debug information using a Visual Studio native library. So the /debug switch does not work. We will be providing an alternative implementation that uses Mono's symbol writer.

Adopting Roslyn: Mono SDK

Our goal is to keep track of Roslyn as it is being developed, and when it is officially released, to bundle Roslyn's compilers with Mono [6].

But in addition, this will provide an up-to-date and compliant Visual Basic.NET compiler to Unix platforms.

Our plans currently are to keep both compilers around, and we will implement the various C# 6.0 features into Mono's C# compiler.

There are a couple of reasons for this. Our batch compiler has been fine tuned over the years, and for day-to-day compilation it is currently faster than the Roslyn compiler.

The second one is that our compiler powers our Interactive C# Shell and we are about to launch something very interesting with it. This functionality is not currently available on the open sourced Roslyn stack.

In addition, we plan on distributing the various Roslyn assemblies to Mono users, so they can build their own tools on top of Roslyn out of the box.

Adopting Roslyn: MonoDevelop/Xamarin Studio

Roslyn really shines for use in IDEs.

We have started an effort to adopt Roslyn in MonoDevelop/Xamarin Studio. This means that the underlying NRefactory engine will also adopt Roslyn.

This is going to be a gradual process, and during the migration the goal is to keep using both Mono's C# compiler as a service engine and bit by bit, replace with the Roslyn components.

We are evaluating various areas where Roslyn will have a positive impact. The plan is to start with code completion [4] and later on, support the full spectrum of features that NRefactory provides (from refactoring to code generation).

C# Standard

While not related to Roslyn, I figured it was time to share this.

For the last couple of months, the ECMA C# committee has been working on updating the spec to reflect C# 5. And this time around, the spec benefits from having two independent compiler implementations.

Mono Project and Roslyn

Our goal is to contribute fixes to the Roslyn team to make sure that Roslyn works great on Unix systems, and hopefully to provide bug reports and bug fixes as time goes by.

We are very excited about the release of Roslyn, it is an amazing piece of technology and one of the most sophisticated compiler designs available. A great place to learn great C# idioms and best practices [5], and a great foundation for great tooling for C# and VB.

Thanks to everyone at Microsoft that made this possible, and thanks to everyone on the Roslyn team for starting, contributing and delivering such an ambitious project.

Notes

[1] Roslyn uses a few tracing APIs that were not available on Mono, so you must use a newer version of Mono to build Roslyn.

[2] We even include the patch to add french quotes that Anders demoed. Make sure to skip that patch if you don't want it :-)

[3] From Michael Hutchinson:

  • There are references of the form: <Reference Include="Microsoft.Build, Version=$(VisualStudioReferenceAssemblyVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    This is a problem because our project system tries to load project references verbatim from the project file, instead of evaluating them from the MSBuild engine. This would be fixed by one of the MSBuild integration improvements I've proposed.
  • There's an InvalidProjectFileException error from the xbuild engine when loading one of the targets files that's imported by several of the code analysis projects, VSL.Settings.targets. I'm pretty sure this is because it uses MSBuild property functions, an MSBuild 4.0 feature that xbuild does not support.
  • They use the AllowNonModulatedReference metadata on some references and it's completely undocumented, so I have no idea what it does and what problems might be caused by not handling it in xbuild.
  • One project can't be opened because it's a VS Extension project. I've added the GUID and name to our list of known project types so we show a more useful error message.
  • A few of the projects depend on Microsoft.Build.dll, and Mono does not have a working implementation of it yet. They also reference other MSBuild assemblies which I know we have not finished.

[4] Since Roslyn is much better at error recovery and has a much more comprehensive support for code completion than Mono's C# compiler does. It also has much better support for dealing with incremental changes than we do.

[5] Modulo private. They use private everywhere, and that is just plain ugly.

[6] We will find out a way of selecting which compiler to use, either mcs (Mono's C# Compiler) or Roslyn.

Posted on 09 Apr 2014


ISO C++ 2D API

by Miguel de Icaza

Herb Sutter from the ISO C++ group, reached out to the Cairo folks:

We are actively looking at the potential standardization of a basic 2D drawing library for ISO C++, and would like to base it on (or outright adopt, possibly as a binding) solid prior art in the form of an existing library.

And also:

we are focused on current Cairo as a starting point, even though it's not C++ -- we believe Cairo itself it is very well written C (already in an OO style, already const-correct, etc.).

Congratulations to the Cairo guys for designing such a pleasant to use 2D API.

But this would not be a Saturday blog post without pointing out that Cairo's C-based API is easier and simpler to use than many of those C++ libraries out there. The more sophisticated the use of the C++ language to get some performance benefit, the more unpleasant the API is to use.

The incredibly powerful Antigrain sports an insanely fast software renderer and also a quite hostile template-based API.

We got to compare Antigrain and Cairo back when we worked on Moonlight. Cairo was the clear winner.

We built Moonlight in C++ for all the wrong reasons ("better performance", "memory usage") and was a decision we came to regret. Not only were the reasons wrong, it is not clear we got any performance benefit and it is clear that we did worse with memory usage.

But that is a story for another time.

Posted on 04 Jan 2014


Debugging Remote Mono Targets

by Miguel de Icaza

Few guys have approached us recently about doing remote debugging of a Mono process. Typically this involves an underpowered system, or some kind of embedded system running Mono, and a fancy Mac or PC on the other end.

These are the instructions that Michael Hutchinson kindly provided on how to remotely debug your process using either Xamarin Studio or MonoDevelop:

Remote debugging is actually really easy with the Mono soft debugger. The IDE sends commands over TCP/IP to the Mono Soft Debugger agent inside the runtime. Depending how you launch the debuggee, you can either have it connect to the IDE over TCP, or have it open a port and wait for the IDE to connect to it.

For simple prototyping purposes, you can just set the MONODEVELOP_SDB_TEST env var, and a new "Run->Run With->Custom Soft Debugger" command will show up in Xamarin Studio / MonoDevelop, and you can specify an arbitrary IP and port or connect or or listen on, and optionally a command to run. Then you just have to start the debuggee with the correct --debugger-agent arguments (see the Mono manpage for details), start the connection, and start debugging.

For a production workflow, you'd typically create a MonoDevelop addin with a debugger engine and session subclassing the soft debugger classes, and overriding how to launch the app and set up the connection parameters. You'd typically have a custom project type too subclassing the DotNetProject, so you could override how the project was built and executed, and so that the new debugger engine could be the primary debugger for projects of that type. You'd get all the default .NET/Mono project and debugger functionality "for free".

You can get some inspiration on how to build your own add-in from the old MeeGo add-in. It has bitrotted, since MeeGo is no more, but it is good enough as a starting point.

Posted on 29 Oct 2013


Hiring Developers

by Miguel de Icaza

I am hiring software developers.

We are growing our Xamarin Studio/MonoDevelop, Visual Studio, iOS and Android teams.

Ideally, you are a C# programmer and ideally, you relocate to Boston, MA. But we can work with remote employees

Posted on 22 Aug 2013


PlayScript

by Miguel de Icaza

Those of you that saw my What is in Mono presentation at MonkeySpace know that there is a new language in the .NET world being developed by Zynga called PlayScript.

Check their home page on GitHub with cute videos!

PlayScript is a superset of ActionScript and it was based on Mono's C# 5.0 compiler. PlayScript is ActionScript augmented with C# 5.0 features.

Zynga's PlayScript allows developers that have some ActionScript/Flash code to bring their code to any platform that supports the ECMA Intermediate Language (Microsoft .NET and Mono) and blend it with other .NET languages.

But the PlayScript has a fabulous feature, it allows mixing code in both C# and PlayScript in the same compilation unit. For example, you can use the compiler like this:


	# Compile the C# source foo.cs into foo.exe
	$ mcs foo.cs

	# Compile the Playscript source bar.play into bar.exe
	$ mcs bar.play

	# Compile both C# and Playscript into a single executable
	$ mcs foo.cs bar.play
	

On a larger scale, you can see this in action in the pscorlib library. This library contains a blend of PlayScript and C# source code compiled into a single binary.

They have implemented the accelerated 3D APIs from Flash and ported some popular ActionScript libraries to PlayScript, like the Starling framework and Away3D.

They have also an add-on for Xamarin Studio that you can use to get IDE support for it.

At Xamarin we are working to integrate their language changes into Mono directly. You can track the integration work in the playscript-mono branch at GitHub.

Just like Unity's UnityScript, developers will be encouraged to use strong types to improve the performance of their applications.

You can join the PlayScript forum to track the progress of the project. And you can keep up with exciting developments.

Update: Some background on Playscript.

Posted on 20 Aug 2013


What is new on Mono

by Miguel de Icaza

Slides from my MonkeySpace "What is new in Mono?" talk:

Monkey space 2013 from Miguel de Icaza

Posted on 20 Aug 2013


Callbacks as our Generations' Go To Statement

by Miguel de Icaza

This week, as I was preparing my presentation on C# sung on iOS and Android, I came to the realization that callback-based programming has somehow become an acceptable programming model.

It has become an acceptable programming model, in the same way that using IF/GOTO to write programs was an acceptable model back in the 60's. They are acceptable because we did not have anything better to replace them.

Today, both C# and F# support a programming model that will do to our generation what structured programming, high-level languages and control flow primitives did to the developers in the 60's.

Sadly, many developers when they hear the word "C# async" immediately think "I have callbacks in my language already". Variations of this include "Promises are better", "Futures is the way to go", "Objective-C has blocks" and "the operating system provides that". All of these statements are made by people that have yet to study C# async or to grasp what it does.

This is my attempt at explaining why the C# async model is such a leap forward for developers.

Callbacks are a Band Aid

Callbacks have improved significantly over the years. In the pure C days, if you wanted to use callbacks, you would have to write code like this:

void cback (void *key, void *value, void *user_state)
{
	// My data is stored in the user_state, fetch it
	// in this case, just a simple int.

	int *sum = (int *) user_state;

	*sum = *sum + *(int *)value;
}

int sum_values (Hashtable *hash)
{
	int sum = 0;

	hash_table_foreach (hash, cback, &sum);
	return sum;
}

Developers would have to pass around these pointers to the state that they managed manually, which is just very cumbersome.

Today with languages that support lambdas, you can write code instead that can capture the state, so things like the above become:

int sum_values (Hashtable hash)
{
	int sum = 0;
	hash.foreach ((key, value) => { sum += value; });
	return sum;
}

Lambdas have made writing code a lot simpler, and now we see this on UI applications that use events/lambdas to react to user input and Javascript apps on the browser and the client that use callbacks to get their job done.

In Node.js's case the original idea was to scale a server by removing blocking operations and instead offering a pure callback-driven model. For desktop applications, often you want to chain operations "on response to a click, download a file, then uncompress it, then save it to the location specified by the user", all while interleaving some bits of user interface and background operation.

This leads to nested callbacks after callbacks, where each indentation level is executing at some point in the future. Some people refer to this as Callback Hell.

During this week preparation, Marco Arment happened to tweet this:

This is a common idiom. On our web site, when we launched Async, we shared this sample:

private void SnapAndPost ()
{
    Busy = true;
    UpdateUIStatus ("Taking a picture");
    var picker = new Xamarin.Media.MediaPicker ();
    var picTask = picker.TakePhotoAsync (new Xamarin.Media.StoreCameraMediaOptions ());
    picTask.ContinueWith ((picRetTask) => {
        InvokeOnMainThread (() => {
            if (picRetTask.IsCanceled) {
                Busy = false;
                UpdateUIStatus ("Canceled");
            } else {
                var tagsCtrl = new GetTagsUIViewController (picRetTask.Result.GetStream ());
                PresentViewController (tagsCtrl, true, () => {
                    UpdateUIStatus ("Submitting picture to server");
                    var uploadTask = new Task (() => {
                        return PostPicToService (picRetTask.Result.GetStream (), tagsCtrl.Tags);
                    });
                    uploadTask.ContinueWith ((uploadRetTask) => {
                        InvokeOnMainThread (() => {
                            Busy = false;
                            UpdateUIStatus (uploadRetTask.Result.Failed ? "Canceled" : "Success");
                        });
                    });
                    uploadTask.Start ();
                });
            }
        });
    });
}

The problem with these nested callbacks is that you can see very quickly that these are not code bases you want to be working with. Currently it does some basic error handling, but it does not even attempt to do some better error recovery.

Thinking about extending the above functionality makes me pause, perhaps there is something else I can do to avoid patching the above function?

And if I wanted to do better error recovery or implement a better workflow I can see myself annoyed at both the bookkeeping that I need to do, make sure that "Busy" value is property updated on every possible exit (and possible exits I add).

This is ugly to the point that your mind starts to wander "perhaps there is a new article on hacker news" or "did a new cat get posted on catoverflow.com?".

Also notice that in the sample above there is a context switching that takes place on every lambda: from background threads to foreground threads. You can imagine a real version of this function being both larger, getting more features and accumulating bugs in corner cases that were not easily visible.

And the above reminded me of Dijkstra's Go To Statement Considered Harmful. This is what Dijkstra's had to say in the late 60's about it:

For a number of years I have been familiar with the observation that the quality of programmers is a decreasing function of the density of go to statements in the programs they produce. More recently I discovered why the use of the go to statement has such disastrous effects, and I became convinced that the go to statement should be abolished from all "higher level" programming languages (i.e. everything except, perhaps, plain machine code). At that time I did not attach too much importance to this discovery; I now submit my considerations for publication because in very recent discussions in which the subject turned up, I have been urged to do so.

My first remark is that, although the programmer's activity ends when he has constructed a correct program, the process taking place under control of his program is the true subject matter of his activity, for it is this process that has to accomplish the desired effect; it is this process that in its dynamic behavior has to satisfy the desired specifications. Yet, once the program has been made, the "making" of the corresponding process is delegated to the machine.

My second remark is that our intellectual powers are rather geared to master static relations and that our powers to visualize processes evolving in time are relatively poorly developed. For that reason we should do (as wise programmers aware of our limitations) our utmost to shorten the conceptual gap between the static program and the dynamic process, to make the correspondence between the program (spread out in text space) and the process (spread out in time) as trivial as possible.

And this is exactly the kind of problem that we are facing with these nested callbacks that cross boundaries.

Just like in the Go To days, or the days of manual memory management, we are turning into glorified accountants. Check every code path for the proper state to be properly reset, updated, disposed, released.

Surely as a species we can do better than this.

And this is precisely where C# async (and F#) come in. Every time you put the word "await" in your program, the compiler interprets this as a point in your program where execution can be suspended while some background operation takes place. The instruction just in front of await becomes the place where execution resumes once the task has completed.

The above ugly sample, then becomes:

private async Task SnapAndPostAsync ()
{
    try {
        Busy = true;
        UpdateUIStatus ("Taking a picture");
        var picker = new Xamarin.Media.MediaPicker ();
        var mFile = await picker.TakePhotoAsync (new Xamarin.Media.StoreCameraMediaOptions ());
        var tagsCtrl = new GetTagsUIViewController (mFile.GetStream ());
        // Call new iOS await API
        await PresentViewControllerAsync (tagsCtrl, true);
        UpdateUIStatus ("Submitting picture to server");
        await PostPicToServiceAsync (mFile.GetStream (), tagsCtrl.Tags);
        UpdateUIStatus ("Success");
    } catch (OperationCanceledException) {
        UpdateUIStatus ("Canceled");
    } finally {
        Busy = false;
    }
}	

The compiler takes the above code and rewrites it for you. There is no longer a direct mapping between each line of code there to what the compiler produces. This is similar to what happens with C# iterators or even lambdas.

The above looks pretty linear. And now, I can see myself feeling pretty confident about changing the flow of execution. Perhaps using some conditional code that triggers different background processes, or using a loop to save the picture in various locations, or applying multiple filters at once. Jeremie has a nice post that happens to do this.

Notice that the handling of that annoying "Busy" flag is now centralized thanks to the finally clause. I can now guarantee that the variable is always properly updated, regardless of the code path in that program and the updates that take place to that code.

I have just delegated the bookkeeping to the compiler.

Async allows me to think about my software in the very basic terms that you would see in a flow-chart. Not as a collection of tightly coupled and messy processes with poorly defined interfaces.

Mind Liberation

The C# compiler infrastructure for Async is actually built on top of the Task primitive. This Task class is what people in other languages refer to as futures, promises or async. This is probably where the confusion comes from.

At this point, I consider all of these frameworks (including the one in .NET) just as lower-level plumbing.

Tasks encapsulate a unit of work and they have a few properties like their execution state, results (if completed), and exceptions or errors that might have been thrown. And there is a rich API used to combine tasks in interesting ways: wait for all, wait for some, combine multiple tasks in one and so on.

They are an important building block and they are a big improvement over rolling your own idioms and protocols, but they are not the means to liberate your mind. C# async is.

Frequently Asked Questions about Async

Today I had the chance to field a few questions, and I wanted to address those directly on my blog:

Q: Does async use a new thread for each operation?

A: When you use Async methods, the operation that you requested is encapsulated in a Task (or Task<T>) object. Some of these operations might require a separate thread to run, some might just queue an event for your runloop, some might use kernel asynchronous APIs with notifications. You do not really know what an Async method is using behind the scenes, that is something that the author of each user will pick.

Q: It seems like you no longer need to use InvokeOnMainThread when using Async, why?

A: When a task completes, the default is for execution to be resumed on the current synchronization context. This is a thread-local property that points to a specific implementation of a SynchronizationContext.

On iOS and Android, we setup a synchronization context on the UI thread that will ensure that code resumes execution on the main thread. Microsoft does the same for their platforms.

In addition, on iOS, we also have a DispatchQueue sync context, so by default if you start an await call on a Grand Central Dispatch queue, then execution is resumed on that queue.

You can of course customize this. Use SynchronizationContext and ConfigureAwait for this.

Finally, the PFX team has a good FAQ for Async and Await.

Async Resources

Here are some good places to learn more about Async:

Posted on 15 Aug 2013


Richard Dawkins should revisit the letter to his 10 year old daughter

by Miguel de Icaza

Like Richard Dawkins, I am also an atheist. I have also enjoyed his books and I am peripherally aware of his atheist advocacy.

Recently a letter Richard Dawkins wrote to his 10 year old daughter made the rounds.

He needs to ammend the letter and explain to her that it is not enough to find evidence, it is also important to be able to reason effectively about this evidence and avoid a series of logical pitfalls.

He failed to do this in a series of poorly thought out tweets, starting with this:

He followed up with a series of tweets to try to both explain the above as well as retweeting various people that came out in his defense with statements like:

I found the entire episode unbecoming of a scientist.

His original tweet, while true, does not have the effect of trying to advance our understanding of the world. It is at best a troll.

We expect from scientists to use the processes, techniques and tools of science math and logic to advance our understanding of the world, not resort to innuendo, fallacies and poor logical constructions to prove our points.

Correlation Does Not Imply Causation

Among others, I do not expect a scientist to imply that correlation implies causation. Which is what this tweet did.

Today he posted a large follow up where he explains what lead him to make this statement and also to selectively address some of the the criticism he received. He addressed the simpler criticism, but left out the meaty ones (you can find them on the replies to his tweet).

Dawkins failed to address the major problem with his tweet, which was exactly the use of correlation to imply causation.

Instead, he digs down deeper:

Twitter's 140 character limit always presents a tough challenge, but I tried to rise to it. Nobel Prizes are a pretty widely quoted, if not ideal, barometer of excellence in science. I thought about comparing the numbers of Nobel Prizes won by Jews (more than 120) and Muslims (ten if you count Peace Prizes, half that if you don't). This astonishing discrepancy is rendered the more dramatic when you consider the small size of the world's Jewish population. However, I decided against tweeting that comparison because it might seem unduly provocative (many Muslim "community leaders" are quite outspoken in their hatred of Jews) and I sought a more neutral comparison as more suitable to the potentially inflammable medium of Twitter. It is a remarkable fact that one Cambridge college, Trinity, has 32 Nobel Prizes to its credit. That's three times as many as the entire Muslim world even if you count Peace Prizes, six times as many if you don't. I dramatised the poverty of Muslim scientific achievement, and the contrast with their achievements in earlier centuries, in the following brief tweet: "All the world's Muslims have fewer Nobel Prizes than Trinity College, Cambridge. They did great things in the Middle Ages, though."

Now we know that Richard was not merely stating a couple of facts on his original tweet. He was trying to establish a relationship between a religion and scientific progress.

One possible explanation that does not involve Muslim-hood is that the majority of muslims live in impoverished nations (see map). Poverty and access to resources are likely bigger reasons for the lack of advancement in the sciences than belonging to a particular religion.

Is my theory better than Richard's? We could test the theory by looking at the list of Nobel laureates per country.

Let us consider my country, Mexico, a poor country compared to the wealth of the UK. We have twice as many people living in Mexico compared to the UK. Sadly, we only have three Nobel laureates vs Trinity College's thirty two.

If we expand the scope to Latin America which has half a billion people. Even with this, we can only muster sixteen laureates vs Trinity's 32.

Let us look into the African continent, with its billion people. They manage to only score 20 Nobel laureates.

And shockingly, the wealthier the nation, the more laureates. South Africa accounts for half of Africa's laureates (with ten), Egypt which has a better economy than most other African nations and gets tasty American aid gets five, which leaves another five for the rest of the continent.

If I had some axe to grind against Mexicans, Spanish speakers, Africans, Muslims, Bedouins, Brazilians, or Latin Americans I could probably make a statement as truthful as Richard's original tweet, which could be as offensive to those popuations and just like Richard prove absolutely nothing.

I think we have stronger evidence that access to wealth has an effect on how many people get this award than a religion.

The second flaw in his argument is to identify a University with access to funds, and a fertile ground for research and education to a group of people linked only by religion.

Perhaps people go to places like Trinity College becasue it is a fertile ground for research and education. If that is the case, then we have an explanation for why Trinity might have more Nobel laureates.

Luckily, Cesar Hidalgo's research on understanding prosperity shows what we intuitively know: that economic development clusters around existing centers. That is why actors, writers and directors move to LA, financiers move to New York and why companies ship their high-end phone manufacturing to China. You go where there is a fertile ground. Richard, instead of reading the long papers from Cesar, you might want to watch this 17 minute presentation he did at TEDx Boston.

So is Trinity one of these clusters? Can we find other clusters of research and expect them to have a high concentration of Nobel prize laureates? Let me pick two examples, MIT which is next door to my office has 78 laureates and I used to hang out at Berkeley because my mom graduated from there, and they have 22.

So we have three universities with 132 Nobel laureates.

The following statement is just as true as Richard's original tweet, and as pointless as his. Except I do not malign a religion:

All the world's companies have fewer Nobel Prizes than Universities do. Companies did great things in the Middle Ages though.

In fact there is a universe of different segments of the population that have fewer Nobel Prizes as Trinity. And every once in a while someone will try to make connections just like Richard did.

People will make their cases against groups of people based on language, race, sexual preferences, political orientation, food preferences, religion or even what video games they play.

We can not let poor logic cloud our judgement, no matter how importants our points are.

I agree with Richard that I want less religion in this world, and more science-based education. But if we are going to advocate for more science-based education, let us not resort to the very processes that are discredited by science to do so.

The Origins of the Tweet

We now know that Richard could just not stomach someone saying "Islamic science deserves enormous respect" and this is why he launched himself into this argument.

I can only guess that this happened because he was criticizing religion or Islam and someone told him "Actually, you are wrong about this, Islam contributed to X and Y" and he did not like his argument poked at.

The right answer is "You are correct, I did not consider that" and then try to incorporate this new knowledge into having a more nuanced position.

The answer is not to spread a meme based on a fallacy.

Posted on 09 Aug 2013


CFKArgentina Live-Tweets Evo Morales Airplane Crisis

by Miguel de Icaza

Last night Cristina Kirchner, Argentina's President, live tweeted the events around Evo Morales' European airplane hijacking:

  • I returned from la Rosada, Olivos 21:46 hs. They notify me, President Correa is on the phone. “Rafael? Put him on” [link]
  • “Hey Rafa, how are you?” He tells me he is angry and anguished, “You do not know what is happening?” [link]
  • “No, what is happening?”. I was in lala-land. Odd, because I am always paying attention... and viglant. I had just finished a meeting. [link]
  • “Cristina, they detained Evo with his airplane and they won’t let him leave Europe” [link]
  • “What? Evo? Evo Morales has been detained?” Immediately, I remember the last picture I saw with him, in Rusia [link]
  • Next to Putin, Nicolas Maduro and other Chiefs of State. “But what happened Rafael?” [link]
  • “Multiple countries revoked the flight permit and he is in Vienna”, he replies [link]
  • Definitely, everyone is crazy. A Chief of State and his airplane have total immunity. This level of impunity is unacceptable. [link]
  • Rafal tells me that he will call urgently a Ollanta Umala for an urgent meeting of UNASUR [link]
  • I call Evo. On the other line, his voice responds calmly “Hello friend, how are you doing?”. He asks me how I am doing? [link]
  • He has thousands of years of civilization more than me. He describes the situation. “I am here, in a small room in the airport...” [link]
  • “I am not going to let them inspect my airplane. I am not a thief”. Simply perfect. Strength Evo. [link]
  • CFK: “Let me call the Cancilleria. I want to see the jurisdiction, agreements and which court to go to. I’ll call you later”. “Thank you friend”. [link]
  • They confirm the absolute immunity by the right consuetudionario, embodied on the convention of 2004 and the Haye Court. [link]
  • If Austria does not let him leave, or wants to inspect his airplane, he can go to the international court of the Haya and ask.... [link]
  • Yes! AN INJUCTION. I dont’t know if I should laugh or cry. You realize what Injunctions are used for [link]
  • Well, if not, we can send a judge from here. MOther of God! What world! [link]
  • I call Evo again. His Minister of Defense takes note. In Austria it is 3am. They are going to try to reach the authorities [link]
  • I talk with Pepe (Mujica). He is outraged. He is right. The whole thing is very humiliating. Rafa calls me again [link]
  • Ollanta notifies me that he will call for a meeting of UNASUR. It is 00:25AM. Tomorrow will be a day long and hard. Calm. They wont succeed. [link]

Posted on 03 Jun 2013


Need for Exercises

by Miguel de Icaza

For many years, I have learned various subjects (mostly programming related, like languages and frameworks) purely by reading a book, blog posts or tutorials on the subjects, and maybe doing a few samples.

In recent years, I "learned" new programming languages by reading books on the subject. And I have noticed an interesting phenomenon: when having a choice between using these languages in a day-to-day basis or using another language I am already comfortable with, I go for the language I am comfortable with. This, despite my inner desire to use the hot new thing, or try out new ways of solving problems.

I believe the reason this is happening is that most of the texts I have read that introduce these languages are written by hackers and not by teachers.

What I mean by this is that these books are great at describing and exposing every feature of the language and have some clever examples shown to you, but none of these actually force you to write code in the language.

Compare this to Scheme and the book "Structure and Interpretation of Computer Programs". That book is designed with teaching in mind, so at the end of every section where a new concept has been introduced, the authors have a series of exercises specifically tailored to use the knowledge that you just gained and put it to use. Anyone that reads that book and does the exercises is going to be a guaranteed solid Scheme programmer, and will know more about computing than from reading any other book.

In contrast, the experience of reading a modern computing book from most of the high-tech publishers is very different. Most of the books being published do not have an educator reviewing the material, at best they have an editor that will fix your English and reorder some material and make sure the proper text is italicized and your samples are monospaced.

When you finish a chapter in a modern computing book, there are no exercises to try. When you finish it, your choices are to either take a break by checking some blogs or keep marching in a quest to collect more facts on the next chapter.

During this process, while you amass a bunch of information, at some neurological level, you have not really mastered the subject, nor gained the skills that you wanted. You have merely collected a bunch of trivia which most likely you will only put to use in an internet discussion forum.

What books involving an educator will do is include exercises that have been tailored to use the concepts that you just learned. When you come to this break, instead of drifting to the internet you can sit down and try to put your new knowledge to use.

Well developed exercises are an application of the psychology of Flow ensuring that the exercise matches the skills that you have developed and they guide you through a path that keeps you in an emotional state ranging that includes control, arousement and joy (flow).

Anecdote Time

Back in 1988 when I first got the first edition of the "C++ Language", there were a couple of very simple exercises in the first chapter that took me a long time to get right and they both proved very educational.

The first exercises was "Compile Hello World". You might think, that is an easy one, I am going to skip that. But I had decided that I was going to do each and every single of one of the exercises in the book, no matter how simple. So if the exercise said "Build Hello World", I would build Hello World, even if I was already seasoned assembly language programmer.

It turned out that getting "Hello World" to build and run was very educational. I was using the Zortech C++ compiler on DOS back, and getting a build turned out to be almost impossible. I could not get the application to build, I got some obscure error and no way to fix it.

It took me days to figure out that I had the Microsoft linker in my path before the Zortech Linker, which caused the build to fail with the obscure error. An important lesson right there.

On Error Messages

The second exercise that I struggled with was a simple class. The simple class was missing a semicolon at the end. But unlike modern compilers, the Zortech C++ compiler at the time error message was less than useful. It took a long time to spot the missing semicolon, because I was not paying close enough attention.

Doing these exercises trains your mind to recognize that "useless error message gobble gobble" actually means "you are missing a semicolon at the end of your class".

More recently, I learned in this same hard way that the F# error message "The value or constructor 'foo' is not defined" really means "You forgot to use 'rec' in your let", as in:

let foo x =
   if x == 1
     1
   else
     foo (x-1)

That is a subject for another post, but the F# error message should tell me what I did wrong at a language level, as opposed to explaining to me why the compiler is unable to figure things out in its internal processing of the matter.

Plea to book authors

Nowadays we are cranking books left and right to explain new technologies, but rarely do these books get the input from teachers and professional pedagogues. So we end up accumulating a lot of information, we sound lucid at cocktail parties and might even engage in a pointless engineering debate over features we barely master. But we have not learned.

Coming up with the ideas to try out what you have just learned is difficult. As you think of things that you could do, you quickly find that you are missing knowledge (discussed in further chapters) or your ideas are not that interesting. In my case, my mind drifts into solving other problems, and I go back to what I know best.

Please, build exercises into your books. Work with teachers to find the exercises that match the material just exposed and help us get in the zone of Flow.

Posted on 25 Apr 2013


Introducing MigCoin

by Miguel de Icaza

Non-government controlled currency systems are now in vogue. Currencies that are not controlled by some government that might devalue your preciously earned pesos at the blink of an eye.

BitCoin is powered by powerful cryptography and math to ensure a truly digital currency. But it poses significant downsides, for one, governments can track your every move, and every transaction is stored on each bitcoin, making it difficult to prevent a tax audit in the future by The Man.

Today, I am introducing an alternative currency system that both keeps the anonymity of your transactions, and is even more secure than the crypto mumbo jumbo of bitcoins.

Today, I am introducing the MigCoin.

Like bitcoins, various MigCoins will be minted over time, to cope with the creation of value in the world.

Like bitcoins, the supply of MigCoins will be limited and will eventually plateau. Like bitcoin, the MigCoin is immune to the will of some Big Government bureaucrat that wants to control the markets by printing or removing money from circulation. Just like this:

Projected number of Bitcoins and MigCoins over time.

Unlike bitcoins, I am standing by them and I am not hiding behind a false name.

Like BitCoins, MigCoins come with a powerful authentication system that can be used to verify their authenticity. Unlike BitCoins, they do not suffer from this attached "log" that Big Brother and the Tax Man can use to come knocking on your door one day.

How does this genius of a currency work? How can you guarantee that governments or rogue entities wont print their own MigCoins?

The answer is simple my friends.

MigCoins are made of my DNA material.

Specifically, spit.

Every morning, when I wake up, for as long as I remain alive, I will spit on a glass. A machine will take the minimum amount of spit necessary to lay down on a microscope slide, and this is how MigCoins are minted.

Then, you guys send me checks, and I send you the microscope slides with my spit.

To accept MigCoins payments all you have to do is carry a DNA sequencer with you, put the microscope slide on it, press a button, and BAM! 10 minutes later you have your currency validated.

To help accelerate the adoption of MigCoins, I will be offering bundles of MigCoins with the Ilumina MiSeq Personal DNA sequencer:

Some might argue that the machine alone is 125,000 dollars and validating one MigCoin is going to set me back 750 dollars.

Three words my friends: Economy of Scale.

We are going to need a few of you to put some extra pesos early on to get the prices to the DNA machines down.

Early Adopters of MigCoins

I will partner with visionaries like these to get the first few thousands sequencers built and start to get the prices down. Then we will hire that guy ex-Apple guy that was CEO of JC Penney to get his know-how on getting the prices of these puppies down.

Like Bitcoin, I expect to see a lot of nay-sayers and haters. People that will point out flaws on this system. But you know what?

The pace of innovation can not be held back by old-school economists that "don't get it" and pundits on CNN trying to make a quick buck. Hater are going to hate. 'nuff said.

Next week, I will be launching MigXchange, a place where you can trade your hard BitCoins for slabs of spit.

Join the revolution! Get your spit on!

Posted on 12 Apr 2013


Exclusive! What we know about the Facebook Phone

by Miguel de Icaza

We obtained some confidential information about the upcoming Facebook Phone. Here is what we know about it so far:

Posted on 29 Mar 2013


How I ended up with Mac

by Miguel de Icaza

While reading Dave Winer's Why Windows Lost to Mac post, I noticed many parallels with my own experience with Linux and the Mac. I will borrow the timeline from Dave's post.

I invested years of my life on the Linux desktop first as a personal passion (Gnome) and when while awoken for two Linux companies (my own, Ximian and then Novell). During this period, I believed strongly in dogfooding our own products. I believed that both me and my team had to use the software we wrote and catch bugs and errors before it reached our users. We were pretty strict about it: both from an ideological point of view, back in the days of all-software-will-be-free, and then practically - during my tamer business days. I routinely chastised fellow team members that had opted for the easy path and avoided our Linux products.

While I had Macs at Novell (to support Mono on MacOS), it would take a couple of years before I used a Mac regularly. In some vacation to Brazil around 2008 or so, I decided to only take the Mac for the trip and learn to live with the OS as a user, not just as a developer.

Computing-wise that three week vacation turned out to be very relaxing. Machine would suspend and resume without problem, WiFi just worked, audio did not stop working, I spent three weeks without having to recompile the kernel to adjust this or that, nor fighting the video drivers, or deal with the bizarre and random speed degradation that my ThinkPad suffered.

While I missed the comprehensive Linux toolchain and userland, I did not miss having to chase the proper package for my current version of Linux, or beg someone to package something. Binaries just worked.

From this point on, using the Mac was a part-time gig for me. During the Novell layoffs, I returned my laptop to Novell and I was left with only one Linux desktop computer at home. I purchased a Mac laptop and while I fully intended to keep using Linux, the dogfooding driver was no longer there.

Dave Winer writes, regarding Windows:

Back to 2005, the first thing I noticed about the white Mac laptop, that aside from being a really nice computer, there was no malware. In 2005, Windows was a horror. Once a virus got on your machine, that was pretty much it. And Microsoft wasn't doing much to stop the infestation. For a long time they didn't even see it as their problem. In retrospect, it was the computer equivalent of Three Mile Island or Chernobyl.

To me, the fragmentation of Linux as a platform, the multiple incompatible distros, and the incompatibilities across versions of the same distro were my Three Mile Island/Chernobyl.

Without noticing, I stopped turning on the screen for my Linux machine during 2012. By the time I moved to a new apartment in October of 2012, I did not even bother plugging the machine back and to this date, I have yet to turn it on.

Even during all of my dogfooding and Linux advocacy days, whenever I had to recommend a computer to a single new user, I recommended a Mac. And whenever I gave away computer gifts to friends and family, it was always a Mac. Linux just never managed to cross the desktop chasm.

Posted on 05 Mar 2013


The Making of Xamarin Studio

by Miguel de Icaza

We spent a year designing the new UI and features of Xamarin Studio (previously known as MonoDevelop).

I shared some stories of the process on the Xamarin blog.

After our launch, we open sourced all of the work that we did, as well as our new Gtk+ engine for OSX. Lanedo helps us tremendously making Gtk+ 2.x both solid and amazing on OSX (down to the new Lion scrollbars!). All of their work has either been upstreamed to Gtk+ or in the process of being upstreamed.

Posted on 22 Feb 2013


"Reality Distortion Field"

by Miguel de Icaza

"Reality Distortion Field" is a modern day cop out. A tool used by men that lack the intellectual curiosity to explain the world, and can deploy at will to explain excitement or success in the market place. Invoking this magical super power saves the writer from doing actual work and research. It is a con perpetuated against the readers.

The expression originated as an observation made by those that worked with Steve to describe his convincing passion. It was insider joke/expression which has now been hijacked by sloppy journalists when any subject is over their head.

The official Steve Jobs biography left much to be desired. Here a journalist was given unprecedented access to Steve Jobs and get answers to thousands of questions that we have to this day. How did he approach problems? Did he have a method? How did he really work with his team? How did he turn his passion for design into products? How did he make strategic decisions about the future of Apple? How did the man balance engineering and marketing problems?

The biography has some interesting anecdotes, but fails to answer any of these questions. The biographer was not really interested in understanding or explaining Steve Jobs. He collected a bunch of anecdotes, stringed them together in chronological order, had the text edited and cashed out.

Whenever the story gets close to an interesting historical event, or starts exploring a big unknown of Steve's work, we are condescendingly told that "Steve Activated the Reality Distortion Field".

Every. Single. Time.

Not once did the biographer try to uncover what made people listen to Steve. Not once did he try to understand the world in which Steve operated. The breakthroughs of his work are described with the same passion as a Reuters news feed: an enumeration of his achievements glued with anecdotes to glue the thing together.

Consider the iPhone: I would have loved to know how the iPhone project was conceived. What internal process took place that allowed Apple to gain the confidence to become a phone manufacturer. There is a fascinating story of the people that made this happen, millions of details of how this project was evaluated and what the vision for the project was down to every small detail that Steve cared about.

Instead of learning about the amazing hardware and software engineering challenges that Steve faced, we are told over and over that all Steve had to do was activate his special super power.

The biography in short, is a huge missed opportunity. Unprecedented access to a man that reshaped entire industries and all we got was some gossip.

The "Reality Distortion Field" is not really a Steve Jobs super-power, it is a special super power that the technical press uses every time they are too lazy to do research.

Why do expensive and slow user surveys, or purchase expensive research from analysts to explain why some product is doing well, or why people are buying it when you can just slap a "they activated the Reality Distortion Field and sales went through the roof" statement in your article.

As of today, a Google News search for "Reality Distortion Field Apple" reports 532 results for the last month.

Perhaps this is just how the tech press must operate nowadays. There is just no time to do research as new products are being unveiled around the clock, and you need to deliver opinions and analysis on a daily basis.

But as readers, we deserve better. We should reject these explanations for what they are: a cheap grifter trick.

Posted on 07 Nov 2012


Mono 3.0 is out

by Miguel de Icaza

After a year and a half, we have finally released Mono 3.0.

Like I discussed last year, we will be moving to a more nimble release process with Mono 3.0. We are trying to reduce our inventory of pending work and get new features to everyone faster. This means that our "master" branch will remain stable from now on, and that large projects will instead be developed in branches that are regularly landed into our master branch.

What is new

Check our release notes for the full details of this release. But here are some tasty bits:

  • C# Async compiler
  • Unified C# compiler for all profiles
  • 4.5 Async API Profile
  • Integrated new Microsoft's Open Sourced stacks:
    • ASP.NET MVC 4
    • ASP.NET WebPages
    • Entity Framework
    • Razor
    • System.Json (replaces our own)
  • New High performance Garbage Collector (SGen - with many performance and scalability improvements)
  • Metric ton of runtime and class library improvements.

Also, expect F# 3.0 to be bundled in our OSX distribution.

Posted on 22 Oct 2012


The Sophisticated Procrastinator - Volume 1

by Miguel de Icaza

Let me share with you some links that I found interesting in the past few weeks. These should keep the most diligent person busy for a few hours.

Software Reads

Talbot Crowell's Introduction to F# 3.0 slides from Boston CodeCamp.

Bertrand Meyer (The creator of Eiffel, father of good taste in engineering practices) writes Fundamental Duality of Software Engineering: on the specifications and tests. This is one of those essays where every idea is beautifully presented. A must read.

Good article on weakly ordered CPUs.

MonkeySpace slide deck on MonoGame.

David Siegel shares a cool C# trick, switch expressions.

Oak: Frictionless development for ASP.NET MVC.

Simon Peyton Jones on video talks about Haskell, past, present and future. A very tasty introductory talk to the language. David Siegel says about this:

Simon Peyton-Jones is the most eloquent speaker on programming languages. Brilliant, funny, humble, adorable.

Rob Pike's talk on Concurrency is not Parallelism. Rob is one of the crisper minds in software development, anything he writes, you must read, everything he says, you must listen to.

Answering the question of what is the fastest way to access properties dynamically: DynamicMethod LINQ expressions, MethodInfo. Discussion with Eric Maupin.

OpenGL ES Quick Reference Card, plus a good companion: Apple's Programming Guide.

Interesting Software

SparkleShare, the open source file syncing service running on top of Git released their feature-complete product. They are preparing for their 1.0 release. SparkleShare runs on Linux, Mac and Windows. Check out their Release Notes.

Experts warn that Canonical might likely distribute a patched version that modifies your documents and spreadhseets to include ads and Amazon referal links.

Pheed a twitter competitor with a twist.

Better debugging tools for Google Native Client.

Touch Draw comes to MacOS, great vector drawing application for OSX. Good companion to Pixelmator and great for maintaining iOS artwork. It has great support for structured graphics and for importing/exporting Visio files.

MonoGame 3D on the Raspberry Pi video.

Fruit Rocks a fun little game for iOS.

@Redth, the one man factory of cool hacks has released:

  • PassKitSharp, a library to generate, maintain, process Apple's Passbook files written in C#
  • Zxing.Mobile, an open source barcode library built on top of ZXing (Zebra Crossing) runs on iOS and Android.
  • PushSharp, A server-side library for sending Push Notifications to iOS (iPhone/iPad APNS), Android (C2DM and GCM - Google Cloud Message), Windows Phone, Windows 8, and Blackberry devices.

Coding on Passbook: Lessons Learned.

Building a Better World

Phil Haack blogs about MonkeySpace

Patrick McKenzie writes Designing First Run Experiences to Delight Users.

Kicking the Twitter habit.

Twitter Q&A with TJ Fixman, writer for Insomniac Games.

Debunking the myths of budget deficits: Children and Grandchildren do not pay for budget deficits, they get interest on the bonds.

Cool Stuff

Live updates on HoneyPots setup by the HoneyNet Project.

Updated Programming F# 3.0, 2nd Edition is out. By Chris Smith, a delightful book on F# has been updated to cover the new and amazing type providers in F#.

ServiceStack now has 113 contributors.

News

From Apple Insider: Google may settle mobile FRAND patent antitrust claim.

The Salt Lake City Tribune editorial board endorses Obama over Romney:

In considering which candidate to endorse, The Salt Lake Tribune editorial board had hoped that Romney would exhibit the same talents for organization, pragmatic problem solving and inspired leadership that he displayed here more than a decade ago. Instead, we have watched him morph into a friend of the far right, then tack toward the center with breathtaking aplomb. Through a pair of presidential debates, Romney’s domestic agenda remains bereft of detail and worthy of mistrust.

Therefore, our endorsement must go to the incumbent, a competent leader who, against tough odds, has guided the country through catastrophe and set a course that, while rocky, is pointing toward a brighter day. The president has earned a second term. Romney, in whatever guise, does not deserve a first.

From Blue States are from Scandinavia, Red States are from Guatemala the author looks at the differences in policies in red vs blue states, and concludes:

Advocates for the red-state approach to government invoke lofty principles: By resisting federal programs and defying federal laws, they say, they are standing up for liberty. These were the same arguments that the original red-staters made in the 1800s, before the Civil War, and in the 1900s, before the Civil Rights movement. Now, as then, the liberty the red states seek is the liberty to let a whole class of citizens suffer. That’s not something the rest of us should tolerate. This country has room for different approaches to policy. It doesn’t have room for different standards of human decency.

Esquire's take on the 2nd Presidential Debate.

Dave Winer wrote Readings from News Execs:

There was an interesting juxtaposition. Rupert Murdoch giving a mercifully short speech saying the biggest mistake someone in the news business could make is thinking the reader is stupid. He could easily have been introducing the next speaker, Bill Keller of the NY Times, who clearly thinks almost everyone who doesn't work at the NY Times is stupid.

What do you know, turns out that Bill Moyers is not funded by the government nor does he get tax money, like many Republicans like people to believe. The correction is here.

Twitter Quotes

Joseph Hill

"Non-Alcoholic Sparkling Beverage" - Whole Foods' $7.99 name for "bottle of soda".

Jonathan Chambers

Problem with most religious people is that their faith tells them to play excellently in game of life, but they want to be the referees.

Hylke Bons on software engineering:

"on average, there's one bug for every 100 lines of code" this is why i put everything on one line

Waldo Jaquith:

If government doesn't create jobs, isn't Romney admitting that his campaign is pointless?

Alex Brown

OH "It is a very solid grey area" #sc34 #ooxml

Jo Shields

"I don't care how many thousand words your blog post is, the words 'SYMBIAN WAS WINNING' mean you're too high on meth to listen too.

Jeremy Scahill on war monger Max Boots asks the questions

Do they make a Kevlar pencil protector? Asking for a think tanker.

Max Boot earned a Purple Heart (shaped ink stain on his shirt) during the Weekly Standard War in 1994.

Tim Bray

"W3C teams with Apple, Google, Mozilla on WebPlatform"... or we could all just sponsor a tag on StackOverflow.

David Siegel

Most programmers who claim that types "get in the way" had a sucky experience with Java 12 years ago, tried Python, then threw the baby out.

Outrage Dept

How Hollywood Studios employ creative accounting to avoid sharing the profits with the participants. If you were looking at ways to scam your employees and partners, look no further.

Startvation in Gaza: State forced to release 'red lines' document for food consumption.

Dirty tricks and disturbing trends: Billionaire warn employees that if Obama is reelected, they will be facing layoffs.

Israeli Children Deported to South Sudan Succumb to Malaria:

Here we are today, three months later, and within the last month alone, these two parents lost two children, and the two remaining ones are sick as well. Sunday is already in hospital with malaria, in serious condition, and Mahm is sick at home. “I’ve only two children left,” Michael told me today over the phone. The family doesn’t have money to properly treat their remaining children. The hospitals are at full capacity and more people leave them in shrouds than on their own two feet. I ask you, beg of you to help me scream the story of these children and their fate, dictated by the heartless, immoral Israeli government.

When Suicide is Cheaper the horrifying tales of Americans that can not afford health care.

Paul Ryan is not that different from Todd Akin, when it comes to women rights.

Interesting Discussions, Opinions and Articles

A Windows 8 critique: someone is not very happy with it.

On "meritocracy": what is wrong with it.

Fascinating read on the fast moving space of companies: Intimate Portrait of Innovation, Risk and Failure Through Hipstamatic's Lens.

Kathy Sierra discusses sexism in the tech world. How she changed her mind about it, and the story that prevented her from seeing it.

Response @antirez's sexist piece.

Chrystia Freeland's The Self Destruction of the 1% percent is a great article, which touches on the points of her book of Plutocrats

Sony's Steep Learning Process a look at the changing game with a focus on Sony's challenges.

Entertainment

One Minute Animated Primers on Major Theories on Religion.

Cat fact and Gif provides Cat facts with a gif that goes with it. The ultimate resource of cat facts and gifs.

Posted on 21 Oct 2012


Drowning Good Ideas with Bloat. The tale of pkg.m4.

by Miguel de Icaza

The gnome-config script was a precursor to pkg-config, they are tools used that you can run and use to extract information about the flags needed to compile some code, link some code, or check for a version. gnome-config itself was a pluggable version of Tcl's tclConfig.sh script.

The idea is simple: pkg-config is a tiny little tool that uses a system database of packages to provide version checking and build information to developers. Said database is merely a well-known directory in the system containing files with the extension ".pc", one per file.

These scripts are designed to be used in shell scripts to probe if a particular software package has been installed, for example, the following shell script probes whether Mono is installed in the system:

# shell script

if pkg-config --exists mono; then
    echo "Found Mono!"
else
    echo "You can download mono from www.go.mono.com"
fi

It can also be used in simple makefiles to avoid hardcoding the paths to your software. The following makefile shows how:

CFLAGS = `pkg-config --cflags mono`
LIBS   = `pkg-config --libs mono`

myhost: myhost.c

And if you are using Automake and Autoconf to probe for the existence of a module with a specific version and extract the flags needed to build a module, you would do it like this:

AC_SUBST(MONO_FLAGS)
AC_SUBST(MONO_LIBS)
if pkg-config --atleast-version=2.10 mono; then
    MONO_FLAGS=`pkg-config --cflags mono`
    MONO_LIBS=`pkg-config --libs mono`
else
   AC_MSG_ERROR("You need at least Mono 2.10")
fi

There are two main use cases for pkg-config.

Probing: You use the tool to pobe for some condition about a package and taking an action based on this. For this, you use the pkg-config exit code in your scripts to determine whether the condition was met. This is what both the sample automake and the first script show.

Compile Information: You invoke the tool which outputs to standard output the results. To store the result or pass the values, you use the shell backtick (`). That is all there is to it (example: version=`pkg-config --version`).

The tool is so immensely simple that anyone can learn every command that matters in less than 5 minutes. The whole thing is beautiful because of its simplicity.

The Siege by the Forces of Bloat

Perhaps it was a cultural phenomenon, perhaps someone that had nothing better to do, perhaps someone that was just trying to be thorough introduced one of the most poisoning memes into the pool of ideas around pkg-config.

Whoever did this, thought that the "if" statement in shell was a complex command to master or that someone might not be able to find the backtick on their keyboards.

And they hit us, and they hit us hard.

They introduced pkg.m4, a macro intended to be used with autoconf, that would allow you to replace the handful of command line flags to pkg-config with one of their macros (PKG_CHECK_MODULES, PKG_CHECK_EXISTS). To do this, they wrote a 200 line script, which replaces one line of shell code with almost a hundred. Here is a handy comparison of what these offer:

# Shell style
AC_SUBST(MONO_LIBS)
AC_SUBST(MONO_CFLAGS)
if pkg-config --atleast-version=2.10 mono; then
   MONO_CFLAGS=`pkg-config --cflags mono`
   MONO_LIBS=`pkg-config --libs mono`
else
   AC_MSG_ERROR(Get your mono from www.go-mono.com)
fi

#
# With the idiotic macros
#
PKG_CHECK_MODULES([MONO], [mono >= 2.10],[], [
   AC_MSG_ERROR(Get your mono from www.go-mono.com)
])

#
# If you do not need split flags, shell becomes shorter
#
if pkg-config --atleast-version=2.10 mono; then
   CFLAGS="$CFLAGS `pkg-config --cflags mono`"
   LIBS="$LIBS `pkg-config --libs mono`"
else
   AC_MSG_ERROR(Get your mono from www.go-mono.com)
fi

The above shows the full benefit of using a macro, MONO is a prefix that will have LIBS and CFLAGS extracted. So the shell script looses. The reality is that the macros only give you access to a subset of the functionality of pkg-config (no support for splitting -L and -l arguments, querying provider-specific variable names or performing macro expansion).

Most projects, adopted the macros because they copy/pasted the recipe from somewhere else, and thought this was the right way of doing things.

The hidden price is that saving that few lines of code actually inflicts a world of pain on your users. You will probably see this in your forums in the form of:

Subject: Compilation error

I am trying to build your software, but when I run autogen.sh, I get
the following error:

checking whether make sets $(MAKE)... yes
checking for pkg-config... /usr/bin/pkg-config
./configure: line 1758: syntax error near unexpected token FOO,'
./configure: line 1758:PKG_CHECK_MODULES(FOO, foo >= 2.9)'

And then you will engage in a discussion that in the best case scenario helps the user correctly configure his ACLOCAL_FLAGS, create his own "setup" script that will properly configure his system, and your new users will learn the difference between running a shell script and "sourcing" a shell script to properly setup his development system.

In the worst case scenario, the discussion will devolve into how stupid your user is for not knowing how to use a computer and how he should be shot in the head and taken out to the desert for his corpse to be eaten by vultures; because, god dammit, they should have googled that on their own, and they should have never in the first place have installed two separate automake installations in two prefixes, without properly updating their ACLOCAL_FLAGS or figured out on their own that their paths were wrong in the first place. Seriously, what moron in this day and age is not familiar with the limitations of aclocal and the best practices to use system-wide m4 macros?

Hours are spent on these discussions every year. Potential contributors to your project are driven away, countless hours that could have gone into fixing bugs and producing code are wasted, you users are frustrated. And you saved 4 lines of code.

The pkg.m4 is a poison that is holding us back.

We need to end this reign of terror.

Send pull requests to eliminate that turd, and ridicule anyone that suggests that there are good reasons to use it. In the war for good taste, it is ok to vilify and scourge anyone that defends pkg.m4.

Posted on 20 Oct 2012


Why Mitt does not need an Economic Plan

by Miguel de Icaza

Mitt Romney does not need to have an economic plan. He does not need to have a plan to cut the deficit or to cut services.

It is now well understood that to get the US out of the recession, the government has to inject money into the economy. To inject money into the economy, the US needs to borrow some money and spend it. Borrowing is also at an all-time low, so the price to pay is very low.

Economists know this, and Republicans know this.

But the Republicans top priority is to get Obama out of office at any cost. Even at the cost of prolonging the recession, damaging the US credit rating and keeping people unemployed.

The brilliance of the Republican strategy is that they have convinced the world that the real problem facing the US is the debt. Four years of non-stop propaganda on newspapers and TV shows have turned everyone into a "fiscal conservative". The propaganda efforts have succeeded into convincing the world that US economic policy should be subject to the same laws of balancing a household budget (I wont link to this idiocy).

The campaign has been a brilliant and has forced the Democrats to adopt policies of austerity, instead of policies of growth. Instead of spending left and right to create value, we are cutting. And yet, nobody has stopped the propaganda and pointed out that growth often comes after spending money. Startups start in the red and are funded for several years before they become profitable; Companies go public and use the IPO to raise capital to grow, and for many years they lose money until their investments pay off and allows them to turn the tide.

So this mood has forced Obama to talk about cuts. He needs to be detailed about his cuts, he needs to be a fiscal conservative.

But Economists and Republicans know what the real fix is. They know they have to spend money.

If Romney is elected to office, he will do just that. He will borrow and spend money, because that is the only way of getting out of the recession. That is why his plan does not need to have any substance, and why he can ignore the calls to get more details, because he has no intention to follow up with them.

Obama made a critical mistake in his presidency. He decided to compromise with Republicans, he was begging to be loved by Republicans and in the process betrayed his own base and played right into the Republican's plans.

Posted on 04 Oct 2012


Mono 2.11.4 is out

by Miguel de Icaza

A couple of weeks ago we released Mono 2.11.4; I had not had time to blog about it.

Since our previous release a month before, we had some 240 commits, spread like this:

488 files changed, 28716 insertions(+), 6921 deletions(-)

Among the major updates in this release:

  • Integrated the Google Summer of Code code for Code Contracts.
  • Integrated the Google Summer of Code code for TPL's DataFlow.
  • Plenty of networking stack fixes and updates (HTTP stack, web services stack, WCF)
  • Improvements to the SGen GC.
  • TPL fixes for AOT systems like the iPhone.
  • Debugger now supports batched method invocations.

And of course, a metric ton of bug fixes all around.

Head over to Mono's Download Page to get the goods. We would love to hear about any bugs to have a great stable release.

Posted on 02 Oct 2012


TypeScript: First Impressions

by Miguel de Icaza

Today Microsoft announced TypeScript a typed superset of Javascript. This means that existing Javascript code can be gradually modified to add typing information to improve the development experience: both by providing better errors at compile time and by providing code-completion during development.

As a language fan, I like the effort, just like I pretty much like most new language efforts aimed at improving developer productivity: from C#, to Rust, to Go, to Dart and to CoffeeScript.

A video introduction from Anders was posted on Microsoft's web site.

The Pros

  • Superset of Javascript allows easy transition from Javascript to typed versions of the code.
  • Open source from the start, using the Apache License.
  • Strong types assist developers catch errors before the deploy the code, this is a very welcome addition to the developer toolchest. Script#, Google GWT and C# on the web all try to solve the same problem in different ways.
  • Extensive type inference, so you get to keep a lot of the dynamism of Javascript, while benefiting from type checking.
  • Classes, interfaces, visibility are first class citizens. It formalizes them for those of us that like this model instead of the roll-your-own prototype system.
  • Nice syntactic sugar reduces boilerplate code to explicit constructs (class definitions for example).
  • TypeScript is distributed as a Node.JS package, and it can be trivially installed on Linux and MacOS.
  • The adoption can be done entirely server-side, or at compile time, and requires no changes to existing browsers or runtimes to run the resulting code.

Out of Scope

Type information is erased when it is compiled. Just like Java erases generic information when it compiles, which means that the underling Javascript engine is unable to optimize the resulting code based on the strong type information.

Dart on the other hand is more ambitious as it uses the type information to optimize the quality of the generated code. This means that a function that adds two numbers (function add (a,b) { return a+b;}) can generate native code to add two numbers, basically, it can generate the following C code:

double add (double a, double b)
{
    return a+b;
}

While weakly typed Javascript must generated something like:

JSObject add (JSObject a, JSObject b)
{
    if (type (a) == typeof (double) &&
	type (b) == typeof (double))
	return a.ToDouble () + b.ToDouble ();
    else
	JIT_Compile_add_with_new_types ();
}

The Bad

The majority of the Web is powered by Unix.

Developers use MacOS and Linux workstations to write the bulk of the code, and deploy to Linux servers.

But TypeScript only delivers half of the value in using a strongly typed language to Unix developers: strong typing. Intellisense, code completion and refactoring are tools that are only available to Visual Studio Professional users on Windows.

There is no Eclipse, MonoDevelop or Emacs support for any of the language features.

So Microsoft will need to convince Unix developers to use this language merely based on the benefits of strong typing, a much harder task than luring them with both language features and tooling.

There is some basic support for editing TypeScript from Emacs, which is useful to try the language, but without Intellisense, it is obnoxious to use.

Posted on 01 Oct 2012


Free Market Fantasies

by Miguel de Icaza

This recording of a Q&A with Noam Chomsky in 1997 could be a Q&A session done last night about bailouts, corporate wellfare, and the various distractions that they use from keeping us in the dark, like caring about "fiscal responsibility".

Also on iTunes and Amazon.

Posted on 07 Sep 2012


2012 Update: Running C# on the Browser

by Miguel de Icaza

With our push to share the kernel of your software in reusable C# libraries and build a native experience per platform (iOS, Android, WP7 on phones and WPF/Windows, MonoMac/OSX, Gtk/Linux) one component that is always missing is what about doing a web UI that also shares some of the code.

Until very recently the answer was far from optimal, and included things like: put the kernel on the server and use some .NET stack to ship the HTML to the client.

Today there are two solid choices to run your C# code on the browser and share code between the web and your native UIs.

JSIL

JSIL will translate the ECMA/.NET Intermediate Language into Javascript and will run your code in the browser. JSIL is pretty sophisticated and their approach at running IL code on the browser also includes a bridge that allows your .NET code to reference web page elements. This means that you can access the DOM directly from C#.

You can try their Try JSIL page to get a taste of what is possible.

Saltarelle Compiler

The Saltarelle Compiler takes a different approach. It is a C# 4.0 compiler that generates JavaScript instead of generating IL. It is interesting that this compiler is built on top of the new NRefactory which is in turn built on top of our C# Compiler as a Service.

It is a fresh, new compiler and unlik JSIL it is limited to compiling the C# language. Although it is missing some language features, it is actively being developed.

This compiler was inspired by Script# which is a C#-look-alike language that generated Javascript for consuming on the browser.

Native Client

I left NativeClient out, which is not fair, considering that both Bastion and Go Home Dinosaurs are both powered by Mono running on Native Client.

The only downside with Native Client today is that it does not run on iOS or Android.

Posted on 06 Sep 2012


What Killed the Linux Desktop

by Miguel de Icaza

True story.

The hard disk that hosted my /home directory on my Linux machine failed so I had to replace it with a new one. Since this machine lives under my desk, I had to unplug all the cables, get it out, swap the hard drives and plug everything back again.

Pretty standard stuff. Plug AC, plug keyboard, plug mouse but when I got to the speakers cable, I just skipped it.

Why bother setting up the audio?

It will likely break again and will force me to go on a hunting expedition to find out more than I ever wanted to know about the new audio system and the drivers technology we are using.

A few days ago I spoke to Klint Finley from Wired who wrote the article titled OSX Killed Linux. The original line of questioning was about my opinion between Gnome 3's shell, vs Ubuntu's Unity vs Xfte as competing shells.

Personally, I am quite happy with Gnome Shell, I think the team that put it together did a great job, and I love how it enabled the Gnome designers -which historically only design, barely hack- to actually extend the shell, tune the UI and prototype things without having to beg a hacker to implement things for them. It certainly could use some fixes and tuning, but I am sure they will address those eventually.

What went wrong with Linux on the Desktop

In my opinion, the problem with Linux on the Desktop is rooted in the developer culture that was created around it.

Linus, despite being a low-level kernel guy, set the tone for our community years ago when he dismissed binary compatibility for device drivers. The kernel people might have some valid reasons for it, and might have forced the industry to play by their rules, but the Desktop people did not have the power that the kernel people did. But we did keep the attitude.

The attitude of our community was one of engineering excellence: we do not want deprecated code in our source trees, we do not want to keep broken designs around, we want pure and beautiful designs and we want to eliminate all traces of bad or poorly implemented ideas from our source code trees.

And we did.

We deprecated APIs, because there was a better way. We removed functionality because "that approach is broken", for degrees of broken from "it is a security hole" all the way to "it does not conform to the new style we are using".

We replaced core subsystems in the operating system, with poor transitions paths. We introduced compatibility layers that were not really compatible, nor were they maintained. When faced with "this does not work", the community response was usually "you are doing it wrong".

As long as you had an operating system that was 100% free, and you could patch and upgrade every component of your operating system to keep up with the system updates, you were fine and it was merely an inconvenience that lasted a few months while the kinks were sorted out.

The second dimension to the problem is that no two Linux distributions agreed on which core components the system should use. Either they did not agree, the schedule of the transitions were out of sync or there were competing implementations for the same functionality.

The efforts to standardize on a kernel and a set of core libraries were undermined by the Distro of the Day that held the position of power. If you are the top dog, you did not want to make any concessions that would help other distributions catch up with you. Being incompatible became a way of gaining market share. A strategy that continues to be employed by the 800 pound gorillas in the Linux world.

To sum up: (a) First dimension: things change too quickly, breaking both open source and proprietary software alike; (b) incompatibility across Linux distributions.

This killed the ecosystem for third party developers trying to target Linux on the desktop. You would try once, do your best effort to support the "top" distro or if you were feeling generous "the top three" distros. Only to find out that your software no longer worked six months later.

Supporting Linux on the desktop became a burden for independent developers.

But at this point, those of us in the Linux world still believed that we could build everything as open source software. The software industry as a whole had a few home runs, and we were convinced we could implement those ourselves: spreadsheets, word processors, design programs. And we did a fine job at that.

Linux pioneered solid package management and the most advance software updating systems. We did a good job, considering our goals and our culture.

But we missed the big picture. We alienated every third party developer in the process. The ecosystem that has sprung to life with Apple's OSX AppStore is just impossible to achieve with Linux today.

The Rise of OSX

When OSX was launched it was by no means a very sophisticated Unix system. It had an old kernel, an old userland, poor compatibility with modern Unix, primitive development tools and a very pretty UI.

Over time Apple addressed the majority of the problems with its Unix stack: they improved compatibility, improved their kernel, more open source software started working and things worked out of the box.

The most pragmatic contributors to Linux and open source gradually changed their goals from "an world run by open source" to "the open web". Others found that messing around with their audio card every six months to play music and the hardships of watching video on Linux were not worth that much. People started moving to OSX.

Many hackers moved to OSX. It was a good looking Unix, with working audio, PDF viewers, working video drivers, codecs for watching movies and at the end of the day, a very pleasant system to use. Many exchanged absolute configurability of their system for a stable system.

As for myself, I had fallen in love with the iPhone, so using a Mac on a day-to-day basis was a must. Having been part of the Linux Desktop efforts, I felt a deep guilt for liking OSX and moving a lot of my work to it.

What we did wrong

Backwards compatibility, and compatibility across Linux distributions is not a sexy problem. It is not even remotely an interesting problem to solve. Nobody wants to do that work, everyone wants to innovate, and be responsible for the next big feature in Linux.

So Linux was left with idealists that wanted to design the best possible system without having to worry about boring details like support and backwards compatibility.

Meanwhile, you can still run the 2001 Photoshop that came when XP was launched on Windows 8. And you can still run your old OSX apps on Mountain Lion.

Back in February I attended FOSDEM and two of my very dear friends were giggling out of excitement at their plans to roll out a new system that will force many apps to be modified to continue running. They have a beautiful vision to solve a problem that I never knew we had, and that no end user probably cares about, but every Linux desktop user will pay the price.

That day I stopped feeling guilty about my new found love for OSX.

Update September 2nd, 2012

Clearly there is some confusion over the title of this blog post, so I wanted to post a quick follow-up.

What I mean with the title is that Linux on the Desktop lost the race for a consumer operating system. It will continue to be a great engineering workstation (that is why I am replacing the hard disk in my system at home) and yes, I am aware that many of my friends use Linux on the desktop and love it.

But we lost the chance of becoming a mainstream consumer OS. What this means is that nobody is recommending a non-technical person go get a computer with Linux on it for their desktop needs (unless you are doing it so for idelogical reasons).

We had our share of chances. The best one was when Vista bombed in the marketplace. But we had our own internal battles and struggles to deal with. Some of you have written your own takes of our struggled in that period.

Today, the various Linux on the desktops are the best they have ever been. Ubuntu and Unity, Fedora and GnomeShell, RHEL and Gnome 2, Debian and Xfce plus the KDE distros. And yet, we still have four major desktop APIs, and about half a dozen popular and slightly incompatible versions of Linux on the desktop: each with its own curated OS subsystems, with different packaging systems, with different dependencies and slightly different versions of the core libraries. Which works great for pure open source, but not so much for proprietary code.

Shipping and maintaining apps for these rapidly evolving platforms is a big challenge.

Linux succeeded in other areas: servers and mobile devices. But on the desktop, our major feature and our major differentiator is price, but comes at the expense of having a timid selection of native apps and frequent breakage. The Linux Hater blog parodied this on a series of posts called the Greatest Hates.

The only way to fix Linux is to take one distro, one set of components as a baseline, abadone everything else and everyone should just contribute to this single Linux. Whether this is Canonical's Ubutu, or Red Hat's Fedora or Debian's system or a new joint effort is something that intelligent people will disagree until the end of the days.

Posted on 29 Aug 2012


Mono 2.11.3 is out

by Miguel de Icaza

This is our fourth preview release of Mono 2.11. This version includes Microsoft's recently open sourced EntityFramework and has been updated to match the latest .NET 4.5 async support.

We are quite happy with over 349 commits spread like this:

 514 files changed, 15553 insertions(+), 3717 deletions(-)

Head over to Mono's Download Page to get the goods.

Posted on 13 Aug 2012


Hiring: Documentation Writer and Sysadmin

by Miguel de Icaza

We are growing our team at Xamarin, and we are looking to hire both a documentation writer and a system administrator.

For the documentation writer position, you should be both familiar with programming and API design and be able to type at least 70 wpms (you can check your own speed at play.typeracer.com). Ideally, you would be based in Boston, but we can make this work remotely.

For the sysadmin position, you would need to be familiar with Unix system administration. Linux, Solaris or MacOS would work and you should feel comfortable with automating tasks. Knowledge of Python, C#, Ruby is a plus. This position is for working in our office in Cambridge, MA.

If you are interested, email me at: miguel at xamarin.

Posted on 11 Aug 2012


XNA on Windows 8 Metro

by Miguel de Icaza

The MonoGame Team has been working on adding Windows 8 Metro support to MonoGame.

This will be of interest to all XNA developers that wanted to target the Metro AppStore, since Microsoft does not plan on supporting XNA on Metro, only on the regular desktop.

The effort is taking place on IRC in the #monogame channel on irc.gnome.org. The code is being worked in the develop3d branch of MonoGame.

Posted on 19 Apr 2012


Contributing to Mono 4.5 Support

by Miguel de Icaza

For a couple of weeks I have been holding off on posting about how to contribute to Mono, since I did not have a good place to point people to.

Gonzalo has just updated our Status pages to include the differences betwee .NET 4.0 to .NET 4.5, these provide a useful roadmap for features that should be added to Mono.

This in particular in the context of ASP.NET 4.5, please join us in [email protected].

Posted on 13 Apr 2012


Modest Proposal for C#

by Miguel de Icaza

This is a trivial change to implement, and would turn what today is an error into useful behavior.

Consider the following C# program:

struct Rect {
	public int X, Y, Width, Height;
}

class Window {
	Rect bounds;

	public Rect Bounds {
		get { return bounds; }
		set {
			// Some code that needs to run when the	property is set
			WindowManager.Invalidate (bounds);
			WindowManager.Invalidate (value);
			bounds = value;
		}
	}
}

Currently, code like this:

Window w = new Window ();
w.Bounds.X = 10;

Produces the error:

Cannot modify the return value of "Window.Bounds.X" because it is not a variable

The reason is that the compiler returns a copy of the "bounds" structure and making changes to the returned value has no effect on the original property.

If we had used a public field for Bounds, instead of a property, the above code would compile, as the compiler knows how to get to the "Bounds.X" field and set its value.

My suggestion is to alter the C# compiler to turn what today is considered an error when accessing properties and doing what the developer expects.

The compiler would rewrite the above code into:

Window w = new Window ();
var tmp = w.Bounds;
tmp.X = 10;
w.Bounds = tmp;

Additionally, it should cluster all of the changes done in a single call, so:

Window w = new Window ();
w.Bounds.X = 10;
w.Bounds.Y = 20;

Will be compiled as:

Window w = new Window ();
var tmp = w.Bounds;
tmp.X = 10;
tmp.Y = 20;
w.Bounds = tmp;

To avoid calling the setter for each property set in the underlying structure.

The change is trivial and wont break any existing code.

Posted on 11 Apr 2012


Can JITs be faster?

by Miguel de Icaza

Herb Sutter discusses in his Reader QA: When Will Better JITs save Managed Code?:

In the meantime, short answer: C++ and managed languages make different fundamental tradeoffs that opt for either performance or productivity when they are in tension.

[...]

This is a 199x/200x meme that’s hard to kill – “just wait for the next generation of (JIT or static) compilers and then managed languages will be as efficient.” Yes, I fully expect C# and Java compilers to keep improving – both JIT and NGEN-like static compilers. But no, they won’t erase the efficiency difference with native code, for two reasons.

First, JIT compilation isn’t the main issue. The root cause is much more fundamental: Managed languages made deliberate design tradeoffs to optimize for programmer productivity even when that was fundamentally in tension with, and at the expense of, performance efficiency. (This is the opposite of C++, which has added a lot of productivity-oriented features like auto and lambdas in the latest standard, but never at the expense of performance efficiency.) In particular, managed languages chose to incur costs even for programs that don’t need or use a given feature; the major examples are assumption/reliance on always-on or default-on garbage collection, a virtual machine runtime, and metadata.

This is a pretty accurate statement on the difference of the mainstream VMs for managed languages (.NET, Java and Javascript).

Designers of managed languages have chosen the path of safety over performance for their designs. For example, accessing elements outside the boundaries of an array is an invalid operation that terminates program execution, as opposed to crashing or creating an exploitable security hole.

But I have an issue with these statements:

Second, even if JIT were the only big issue, a JIT can never be as good as a regular optimizing compiler because a JIT compiler is in the business of being fast, not in the business of generating optimal code. Yes, JITters can target the user’s actual hardware and theoretically take advantage of a specific instruction set and such, but at best that’s a theoretical advantage of NGEN approaches (specifically, installation-time compilation), not JIT, because a JIT has no time to take much advantage of that knowledge, or do much of anything besides translation and code gen.

In general the statement is correct when it comes to early Just-in-Time compilers and perhaps reflects Microsoft's .NET JIT compiler, but this does not apply to state of the art JIT compilers.

Compilers are tools that convert human readable text into machine code. The simplest ones perform straight forward translations from the human readable text into machine code, and typically go through or more of these phases:

Optimizing compilers introduce a series of steps that alter their inputs to ensure that the semantics described by the user are preserved while generating better code:

An optimization that could be performed on the high-level representation would transform the textual "5 * 4" in the source code into the constant 20. This is an easy optimization that can be done up-front. Simple dead code elimination based on constant folding like "if (1 == 2) { ... }" can also be trivially done at this level.

An optimization on the medium representation would analyze the use of variables and could merge subexpressions that are computed more than once, for example:

	int j = (a*b) + (a*b)

Would be transformed by the compiler into:

	int _tmp = a * b;
	int j = _tmp + _tmp;

A low-level optimization would alter a "MULTIPLY REGISTER-1 BY 2" instruction into "SHIFT REGISTER-1 ONE BIT TO THE LEFT".

JIT compilers for Java and .NET essentially break the compilation process in two. They serialize the data in the compiler pipeline and split the process in two. The first part of the process dumps the result into a .dll or .class files:

The second step loads this file and generates the native code. This is similar to purchasing frozen foods from the super market, you unwrap the pie, shove it in the oven and wait 15 minutes:

Saving the intermediate representation and shipping it off to a new system is not a new idea. The TenDRA C and C++ compilers did this. These compilers saved their intermediate representation into an architecture neutral format called ANDF, similar in spirit to .NET's Common Intermediate Language and Java's bytecode. TenDRA used to have an installer program which was essentially a compiler for the target architecture that turned ANDF into native code.

Essentially JIT compilers have the same information than a batch compiler has today. For a JIT compiler, the problem comes down to striking a balance between the quality of the generated code and the time it takes to generate the code.

JIT compilers tend to go for fast compile times over quality of the generated code. Mono allows users to configure this threshold by allowing users to pick the optimization level defaults and even lets them pick LLVM to perform the heavy duty optimizations on the code. Slow, but the generated code quality is the same code quality you get from LLVM with C.

Java HotSpot takes a fascinating approach: they do a quick compilation on the first pass, but if the VM detects that a piece of code is being used a lot, the VM recompiles the code with all the optimization turned on and then they hot-swap the code.

.NET has a precompiler called NGen, and Mono allows the --aot flag to be passed to perform the equivalent process that TenDRA's installer did. They precompile the code tuned for the current hardware architecture to avoid having the JIT compiler spend time at runtime translating .NET CIL code to native code.

In Mono's case, you can use the LLVM optimizing compiler as the backend for precompiling code, which produces great code. This is the same compiler that Apple now uses on Lion and as LLVM improves, Mono's generated code improves.

NGen has a few limitations in the quality of the code that it can produce. Unlike Mono, NGen acts merely as a pre-compiler and tests suggest that there are very limited extra optimizations applied. I believe NGen's limitations are caused by .NET's Code Access Security feature which Mono never implemented [1].

[1] Mono only supports the CoreCLR security system, but that is an opt-in feature that is not enabled for desktop/server/mobile use. A special set of assemblies are shipped to support this.

Optimizing JIT compilation for Managed Languages

Java, JavaScript and .NET have chosen a path of productivity and safety over raw performance.

This means that they provide automatic memory management, arrays bounds checking and resource tracking. Those are really the elements that affect the raw performance of these languages.

There are several areas in which managed runtimes can evolve to improve their performance. They wont ever match the performance of hand-written assembly language code, but here are some areas that managed runtimes can work on to improve performance:

>Alias analysis is simpler as arrays are accessed with array operations instead of pointer arithmetic.

Intent: with the introduction of LINQ in C#, developers can shift their attention from how a particular task is done to expressing the desired outcome of an operation. For example:

var biggerThan10 = new List;
for (int i = 0; i < array.Length; i++){
    if (array [i] > 10)
       biggerThan10.Add (i);
}	
	

Can be expressed now as:

var biggerThan10 = x.Where (x => x > 10).Select (x=>x);
	
// with LINQ syntax:
var biggerThan10 = from x in array where x > 10 select x;

Both managed compilers and JIT compilers can take advantage of the rich information that is preserved to turn the expressed intent into an optimized version of the code.

Extend VMs: Just like Javascript was recently extended to support strongly typed arrays to improve performance, both .NET and Java can be extended to allow fewer features to be supported at the expense of safety.

.NET could allow developers to run without the CAS sandbox and without AppDomains (like Mono does).

Both .NET and Java could offer "unsafe" sections that would allow performance critical code to not enforce arrays-bounds-optimization (at the expense of crashing or creating a security gap, this can be done today in Mono by using -O=unsafe).

.NET and Mono could provide allocation primitives that allocate objects on a particular heap or memory pool:

	var pool = MemoryPool.Allocate (1024*1024);

	// Allocate the TerrainMesh in the specified memory pool
	var p = new pool, TerrainMesh ();

	[...]
	
	// Release all objects from the pool, all references are
	// nulled out
	//
	Assert.NotEquals (p, null);
	pool.Destroy ();
	Assert.Equals (p, null);
	

Limiting Dynamic Features: Current JIT compilers for Java and .NET have to deal with the fact that code can be extended dynamically by either loading code at runtime or generating code dynamically.

HotSpot leverages its code recompiled to implement sophisticated techniques to perform devirtualization safely.

On iOS and other platforms it is not possible to generate code dynamically, so code generators could trivially devirtualize, inline certain operations and drop features from both their runtimes and the generated code.

More Intrinsics: An easy optimization that JIT engines can do is map common constructs into native features. For example, we recently inlined the use of ThreadLocal<T> variables. Many Math.* methods can be inlined, and we applied this technique to Mono.SIMD.

Posted on 04 Apr 2012


Microsoft's new Open Sourced Stacks

by Miguel de Icaza

Yesterday Microsoft announced that another component of .NET would be open sourced. The entire ASP.NET MVC stack is now open source, including the Razor Engine, System.Json, Web API and WebPages.

With this release, they will start accepting external contributions to these products and will be running the project like other open source projects are.

Mono and the new Stacks

We imported a copy of the git tree from Codeplex into GitHub's Mono organization in the aspnetwebstack module.

The mono module itself has now taken a dependency on this module, so the next time that you run autogen.sh in Mono, you will get a copy of the aspnetwebstack inside Mono.

As of today, we replaced our System.Json implementation (which was originally built for Moonlight) and replaced it with Microsoft's implementation.

Other libraries like Razor are next, as those are trivially imported into Mono. But ASP.NET MVC 4 itself will have to wait since it depends on extending our own core ASP.NET stack to add asynchronous support.

Our github copy will contain mostly changes to integrate the stack with Mono. If there are any changes worth integrating upstream, we will submit the code directly to Microsoft for inclusion. If you want to experiment with ASP.NET Web Stack, you should do this with your own work and work directly with the upstream maintainers.

Extending Mono's ASP.NET Engine

The new ASP.NET engine has been upgraded to support C# 5.0 asynchronous programming and this change will require a number of changes to the core ASP.NET.

We currently are not aware of anyone working on extending our ASP.NET core engine to add these features, but those of us in the Mono world would love to assist enthusiastic new developers of people that love async programming to bring these features to Mono.

Posted on 28 Mar 2012


Mono 2.11.0 is out

by Miguel de Icaza

After more than a year of development, we are happy to announce Mono 2.11, the first in a series of beta releases that will lead to the next 2.12 stable release.

Continuous Integration

To assist those helping us with testing the release, we have setup a new continuous build system that builds packages for Mac, OpenSUSE and Windows at http://wrench.mono-project.com/Wrench.

Packages

To test drive Mono 2.11 head to our our downloads page and select the "Alpha" section of the page to get the packages for Mac, Windows or Linux.

The Linux version is split up in multiple packages.

The Windows version ships with Gtk+ and Gtk#

The Mac version ships with Gtk+, Gtk#, F#, IronPython and IronRuby and comes in two versions: Mono Runtime Environment (MRE) and the more complete Mono Development Kit (MDK).

At this stage, we recommend that users get the complete kit.

Runtime Improvements in Mono 2.11

There are hundreds of new features available in this release as we have accumulated them over a very long time. Every fix that has gone into the Mono 2.10.xx series has been integrated into this release.

In addition, here are some of the highlights of this release.

Garbage Collector: Our SGen garbage collector is now considered production quality and is in use by Xamarin's own commercial products.

The collector on multi-CPU systems will also distribute various tasks across the CPUs, it is no longer limited to the marking phase.

The guide Working with SGen will help developers tune the collector for their needs and discusses tricks that developers can take advantage of.

ThreadLocal<T> is now inlined by the runtime engine, speeding up many threaded applications.

Full Unicode Surrogate Support this was a long standing feature and has now been implemented.

C# 5.0 -- Async Support

Mono 2.11 implements the C# 5.0 language with complete support for async programming.

The Mono's class libraries have been updated to better support async programming. See the section "4.5 API" for more details.

C# Backend Rewrite

The compiler code generation backend was rewritten entirely to support both IKVM.Reflection and System.Reflection which allowed us to unify all the old compilers (mcs, gmcs, dmcs and smcs) into a single compiler: mcs. For more information see Backend Rewrite.

The new IKVM.Reflection backend allows the compiler to consume any mscorlib.dll library, instead of being limited to the ones that were custom built/crafted for Mono.

In addition, the compiler is no longer a big set of static classes, instead the entire compiler is instance based, allowing multiple instances of the compiler to co-exist at the same time.

Compiler as a Service

Mono's Compiler as a Service has been extended significantly and reuses the compiler's fully instance based approach (see Instance API for more details).

Mono's compiler as a service is still a low-level API to the C# compiler. The NRefactory2 framework --shared by SharpDevelop and MonoDevelop-- provides a higher level abstraction that can be -- used by IDEs and other high-level tools.

C# Shell

Our C# interactive shell and our C# API to compile C# code can in addition to compiling expressions and statements can now compile class definitions.

4.5 API

4.5 Profile Mono now defaults to the 4.5 profile which is a strict superset of the 4.0 profile and reuses the same version number for the assemblies.

Although .NET 4.5 has not yet been officially released, the compiler now defaults to the 4.5 API, if you want to use different profile API you must use the -sdk:XXX switch to the command line compiler.

Because 4.5 API is a strict superset of 4.0 API they both share the same assembly version number, so we actually install the 4.5 library into the GAC.

Some of the changes in the 4.5 API family include:

  • New Async methods
  • WinRT compatibility API
  • Newly introduced assemblies: System.Net.Http, System.Threading.Tasks.Dataflow

The new System.Net.Http stack is ideal for developers using the C# 5.0 async framework.

Debugging

The GDB support has been extended and can pretty print more internal variables of Mono as well as understanding SGen internals.

The soft debugger has seen a large set of improvements:

  • Single stepping is now implemented using breakpoints in most cases, speeding it up considerably.
  • Calls to System.Diagnostics.Debugger:Log()/Break () are now routed to the debugger using new UserLog/UserBreak event types.
  • S390x is now supported (Neale Ferguson).
  • MIPS is now supported.
  • Added new methods to Mono.Debugger.Soft and the runtime to decrease the amount of packets transmitted between the debugger and the debuggee. This significantly improves performance over high latency connections like USB.

Mac Support

Mac support has been vastly extended, from faster GC by using native Mach primitives to improves many features that previously only worked on Linux to extending the asynchronous socket support in Mono to use MacOS X specific primitives.

New Ports

We have completed the Mono MIPS port.

Performance

As a general theme, Mono 2.11 has hundreds of performance improvements in many small places which add up.

Posted on 22 Mar 2012


Mono and Google Summer of Code

by Miguel de Icaza

Students, get your pencils ready for an intense summer of hacking with the Google Summer of Code and Mono!

Check out the Mono organization Summer of Code Project site.

Posted on 16 Mar 2012


Cross Platform Game Development in C#

by Miguel de Icaza

If you missed the live session on Cross Platform Game Development in C# from AltDevConf you can now watch presentation.

You can also check the videos for all the AltDevConf presentations.

Posted on 16 Mar 2012


Phalanger's PHP on Mono/.NET Updates

by Miguel de Icaza

The Phalanger developers have published an updated set of benchmarks of their PHP compiler running on top of .NET vs PHP and Cached PHP, and the results are impressive:

There are two cases on the language shootout where they are slower than PHP (out of eighteen cases) and they are also slower on eight of thirtyone microbenchmarks.

But in general with real applications like WordPress and MediaWiki, the performance gains are impressive.

Posted on 05 Mar 2012


Working With SGen

by Miguel de Icaza

As SGen becomes the preferred garbage collector for Mono, I put together the Working With SGen document. This document is intended to explain the options that as a developer you can tune in SGen as well as some practices that you can adopt in your application to improve your application performance.

This document is a complement to the low-level implementation details that we had previously posted.

Posted on 05 Mar 2012


Gtk+ and MacOS X

by Miguel de Icaza

We have released a new build of Mono 2.10.9 (Beta) with the latest version of Gtk+2 containing dozens of bug fixes done by the Lanedo team to improve the quality of Mono/Gtk+ apps on OSX.

This is still a beta release, please take it out for a spin, we are almost ready to graduate this as our stable Mono package.

Posted on 05 Mar 2012


C# for Gaming: Slides

by Miguel de Icaza

You can now get the Slides for my Mono for Game Development talk.

Or you can go straight to the resources for the talk.

Posted on 11 Feb 2012


C# for Gaming: AltDevConf This Weekend

by Miguel de Icaza

It is a great honor to participate this weekend on the online AltDevConf conference. This is an online two-day event

Our goal is twofold: To provide free access to a comprehensive selection of game development topics taught by leading industry experts, and to create a space where bright and innovative voices can also be heard. We are able to do this, because as an online conference we are not subject to the same logistic and economic constrains imposed by the traditional conference model.

I will be participating in the talk on Cross Platform Game Development using C# with Matthieu Laban and Philippe Rollin.

You can register here for our session on Saturday at 3pm Eastern Standard Time, noon Pacific Time, and 9pm Paris Time.

If you are located in the Paris time zone, that means that you get to enjoy the talk sipping a tasty hot chocolate with some tasty baguettes.

Posted on 09 Feb 2012


Mono in 2011

by Miguel de Icaza

This was a very interesting year for Mono, and I wanted to capture some of the major milestones and news from the project as well as sharing a bit of what is coming up for Mono in 2012.

I used to be able to list all of the major applications and great projects built with Mono. The user base has grown so large that I am no longer able to do this. 2011 was a year that showed an explosion of applications built with Mono.

In this post I list a few of the high profile projects, but it is by no means an extensive list. There are too many great products and amazing technologies being built with Mono, but a comprehensive list would take too long to assemble.

Xamarin

The largest event for Mono this year was that the team working on Mono technologies at Novell was laid off after Novell was acquired.

We got back on our feet, and two weeks after the layoffs had taken place, the original Mono team incorporated as Xamarin.

Xamarin's goal is to deliver great productivity and great tools for mobile developers. Our main products are Mono on iOS and Mono on Android.

These products are built on top of the open source Mono project and the MonoDevelop project. We continue to contribute extensively to these two open source projects.

Launching Xamarin was a huge effort for all of us.

Xamarin would not have been possible without our great customers and friends in the industry. Many people cared deeply about the technology and helped us get up and running.

In July, we announced an agreement with Attachmate that ensured a bright future for our young company.

A couple of days later, we were ready to sell the mobile products that had been previously developed at Novell, and we started to provide all existing Novell customers with ongoing support for their Mono-based products.

Half a year later, we grew the company and continued to do what we like the most: writing amazing software.

Meanwhile, our users have created amazing mobile applications. You can see some of those in our App Catalog.

C# Everywhere

On the Mobile Space: This year Sony jumped to C# in a big way with the introduction of PS Suite (see the section below) and Nokia adopted Windows Phone 7 as their new operating system.

And we got you covered on Android and iOS for all of your C# needs.

On the Browser: we worked with Google to bring you Mono to Native Client. In fact, every demo shown at the Google Native Client event on December 8th was powered by Mono.

On the Desktop: this year we added MacOS X as a first-class citizen in the world of supported Mono platforms. We did this by introducing MonoMac 1.0 and supporting Apple's MacStore with it.

Games: continue to take advantage of C# blend of performance and high-level features. Read more on my GDC 2011 post.

It is a wild new world for C# and .NET developers that were used to build their UI using ASP.NET or Winforms only. It has been fascinating to see developers evolve their thinking from a Microsoft-only view of the world to a world where they design libraries and applications that split the presentation layer from the business logic.

Developers that make this transition will be able to get great native experiences on each device and form factor.

Sony PSSuite - Powered by Mono

At GDC, Sony announced that PS Suite was built on top of Mono. PS Suite is a new development stack for cross-platform games and cross-platform applications to run on Android devices and Sony Vita.

The PS Suite presentation is available in this video.

In particular, watch the game in Video 2 to get a feeling for the speed of a 3D game purely written in managed code (no native code):

Some of the juicy details from the GDC announcement:

  • PS Suite will have an open appstore model, different than the traditional game publishing business.
  • Open SDK, available for everyone at launch time.
  • PS Suite supports both game development with Sony's 3D libraries as well as regular app development.
  • Cross-platform, cross-device, using the ECMA Common Intermediate Language.
  • Code in C#, run using Mono.
  • GUI Designer called "UI Composer" for non-game applications.
  • The IDE is based on MonoDevelop.
  • Windows-simulator is included to try things out quickly.

MonoDevelop on PSSuite:

PS Suite comes with a GUI Toolkit and this is what the UI composer looks like:

Google Native Client

Google Engineers ported Mono to run on the sandboxed environment of Native Client. Last year they had added support for Mono code generator to output code for Native Client using Mono's static compiler.

This year Google extended Native Client to support Just in Time Compilation, in particular, Mono's brand of JIT compilation. This was used by all three demos shown at the Google Native Client event a couple of days ago:

Unity Powered Builder

This is another game built with Unity's Native Client code generator:

To get the latest version of Mono with support for Native Client, download and build Mono from Google's branch on github.

Mono 2.10

This was the year of Mono 2.10. We went from a beta release for Mono 2.10 in January to making it our new stable release for Mono.

While the world is on Mono 2.10, we have started our work to get Mono 2.12 out in beta form in January.

Mono on Android

This year we launched Mono for Android, a product that consists of port of Mono to the Android OS, C# bindings to the native Java APIs and IDE support for both MonoDevelop and Visual Studio.

The first release came out in April, it was rough around the edges, but thanks to the amazing community of users that worked with us during the year, we solved the performance problems, the slow debugging, vastly improved the edit/debug/deploy cycle and managed to catch up to Google's latest APIs with the introduction of Mono for Android 4.0.

Mono on iOS

Just like Android, we have been on a roll with MonoTouch.

In short, this year:

  • We kept up with Apple's newly introduced APIs (UIKit, iCloud, Airplay, Bluetooth, Newstand, CoreImage).
  • Integrated XCode 4's UI designer with MonoDevelop< and added support for storyboards.
  • Added the option of using LLVM for our builds, bringing thumb support and ARMv7 support along the way.

We started beta-testing a whole new set of features to be released early next year: a new unit testing framework, a heap profiler, integrating MonoTouch.Dialog in the product and improving the debug/deploy process.<

Mono for iOS has been on the market now for two years, and many products are coming to the market based on it.

Phalanger

Phalanger is a PHP compiler that runs on the .NET and Mono VMs and is powered by the Dynamic Language Runtime.

It is so complete that it can run both MediaWiki and WordPress out of the box. And does so by running faster than they would under PHP.

This year the Phalanger guys released Phalanger 3.0 which now runs on Mono (previously they required the C++/CLI compiler to run).

Phalanger's performance is impressive as it is just as fast as the newly announced Facebook HipHop VM for PHP. The major difference being that Phalanger is a complete PHP implementation and the HipHopVM is still not a complete implementation.

The other benefit of Phalanger is that it is able to participate and interop with code written in other .NET languages as well as benefitting from the existing .NET interop story (C, C++).

CXXI

Our technology to bridge C# and C++ matured to the point that it can be used by regular users.

Compiler as a Service

This year our C# compiler was expanded in three directions:

  • We completed async/await support
  • We completed the two code output engines (System.Reflection.Emit and IKVM.Reflection).
  • We improved the compiler-as-a-service features of the compiler.

Our async/await support is scheduled to go out with the first preview of Mono 2.11 in early January. We can not wait to get this functionality to our users and start building a new generation of async-friendly/ready desktop, mobile and server apps.

One major difference between our compiler-as-a-service and Microsoft's version of the C# compiler as a service is that we support two code generation engines, one generates complete assemblies (like Microsoft does) and the other one is able to be integrated with running code (this is possible because we use System.Reflection.Emit and we can reference static or dynamic code from the running process).

We have also been improving the error recovery components of the compiler as this is going to power our new intellisense/code completion engine in MonoDevelop. Mono's C# compiler is the engine that is powering the upcoming NRefactory2 library.

You can read more about our compiler as a service updates.

Unity3D

Unity is one of Mono's major users. At this point Unity no longer requires an introduction, they went from independent game engine a few years ago to be one of the major game engine platforms in the game industry this year.

The Unity engine runs on every platform under the sun. From the Consoles (PS3, Wii and XBox360) to iPhones and Androids and runs on your desktop either with the Unity3D plugin or using Google's Native Client technology. The list of games being built with Unity keeps growing every day and they are consistently among the top sellers on every app store.

Mono is the engine that powers the scripts and custom code in games and applications built with Unity3D and it also powers the actual tool that users use to build games, the Unity3D editor:

The editor itself it implemented in terms of Unity primitives, and users can extend the Unity3D editor with C#, UnityScript or Boo scripts dynamically.

One of my favorite games built with Unity3D is Rochard was demoed earlier this year on a PS3 at the GDC and is now also avaialble on Steam:

Microsoft

Just before the end of the year, Microsoft shipped Kinectimals for iOS systems.

Kinectimals is built using Unity and this marks the first time that Microsoft ships a software product built with Mono.

Then again, this year has been an interesting year for Microsoft, as they have embraced open source technologies for Azure, released SDKs for iOS and Android at the same time they ship SDKs for their own platforms and shipped various applications on Apple's AppStore for iOS.

MonoDevelop

We started the year with MonoDevelop 2.4 and we finished after two major releases with MonoDevelop 2.8.5.

In the course of the year, we added:

  • Native Git support
  • Added .NET 4.0 project support, upgraded where possible to XBuild/MSBuild
  • MonoMac Projects
  • XCode 4 support for MonoMac, MonoTouch and Storyboards
  • Support for Android development
  • Support for iOS5 style properties
  • Major upgrade to the debugger engine
  • Adopted native dialogs on OSX and Windows

Our Git support was based on a machine assisted translation of the Java jGit library using Sharpen. Sharpen has proved to be an incredibly useful tool to bring Java code to the .NET world.

SGen

Our precise collector has gotten a full year of testing now. With Mono 2.10 we made it very easy for developers to try it out. All users had to do was run their programs with the --sgen flag, or set MONO_ENV_OPTIONS to gc=sgen.

Some of the new features in our new Garbage Collector include:

  • Windows, MacOS X and S390x ports of SGen (in addition to the existing x86, x86-64 and ARM ports).
  • Lock-free allocation to improve scalability (we only take locks when we run out of memory).
  • Work stealing parallel collector and a parallel nursery collector, to take advantage of extra CPUs on the system to help with the GC.
  • Work on performance and scalability work, as our users tried things out in the field, we identified hot-spots in SGen which we have been addressing.

As we are spending so much time on ARM-land these days, SGen has also gained various ARM-specific optimizations.

SGen was designed primarly to be used by Mono and we are extending it beyond being a pure garbage collector for Mono, to support scenarios where our garbage collector has to be integrated with other object systems and garbage collectors. This is the case of Mono for Android where we now have a cooperative garbage collector that works hand-in-hand with Dalvik's GC. And we also introduce support for toggle references to better support Objective-C environments like MonoTouch and MonoMac.

XNA and Mono: MonoGame

Ever since Microsoft published the XNA APIs for .NET, developers have been interested in bringing XNA to Mono-based platforms.

There was a MonoXNA project, which was later reused by projects like SilverXNA (an XNA implementation for Silverlight) and later XNAtouch an implementation of XNA for the iPhone powered by MonoTouch. Both very narrow projects focused on single platforms.

This year, the community got together and turned the single platform XNATouch into a full cross-platform framework, the result is the MonoGame project:

Platform Support Matrix

Currently MonoGame's strength is on building 2D games. They already have an extensive list of games that have been published on the iOS AppStore and the Mac AppStore and they were recently featured in Channel 9's Coding For Fun: MonoGame Write Once Play Everywhere.

An early version of MonoGame/XnaTouch powers SuperGiantGame's Bastion game on Google's Native Client. Which allows users of Windows, Mac and Linux desktop systems to run the same executable on all systems. If you are running Chrome, you can install it in seconds.

Incidentally, Bastion just won three awards at the Spike VGA awards including Best Downloadable Game, Best Indie Game, and Best Original Score.

The MonoGame team had been relatively quiet for the most part of 2011 as they were building their platform, but they got into a good release cadence with the MonoGame 2.0 release in October, when they launched as a cross-platform engine, followed up with a tasty 2.1 release only two weeks ago.

With the addition of OpenGL ES 2.0 support and 3D capabilities to MonoGame, 2012 looks like it will be a great year for the project.

Gtk+

Since MonoDevelop is built on top of the Gtk+ toolkit and since it was primarily a Unix toolkit there have been a few rough areas for our users in both Mac and Windows.

This year we started working with the amazing team at Lanedo to improve Gtk+ 2.x to work better on Mac and Windows.

The results are looking great and we want to encourage developers to try out our new Beta version of Mono, which features the updated Gtk+ stack.

This new Gtk+ stack solves many of the problems that our users have reported over the past few months.

Hosting Bills

I never tracked Mono downloads as I always felt that tracking download numbers for open source code that got repackaged and redistributed elsewhere pointless.

This summer we moved the code hosting from Novell to Xamarin and we were surprised by our hosting bills.

The major dominating force are binaries for Windows and MacOS which are communities that tend not to download source and package the software themselves. This is the breakdown for completed downloads (not partial downloads, or interrupted ones) for our first month of hosting of Mono:

  • 39,646 - Mono for Windows (Runtime + SDK)
  • 27,491 - Mono for Mac (Runtime)
  • 9,803 - Mono for Windows (Runtime)
  • 9,910 - Mono for Mac (Runtime + SDK)

  • Total: 86,850 downloads for Windows and Mac

These numbers are only for the Mono runtime, not MonoDevelop, the MonoDevelop add-ins or any other third party software.

It is also worth pointing out that none of our Windows products (MonoDevelop for Windows, or Mono for Android on Windows) use the Mono runtime. So these downloads are for people doing some sort of embedding of Mono on their applications on Windows.

At this point, we got curious. We ran a survey for two days and collected 3,949 answers. These is the summary of the answers:

What type of application will you run with Mono?

This one was fascinating, many new users to the .NET world:

The best results came form the free-form answers in the form. I am still trying to figure out how to summarize these answers, they are all very interesting, but they are also all over the map.

Some Key Quotes

When I asked last week for stories of how you used Mono in 2011, some of you posted on the thread, and some of you emailed me.

Here are a couple of quotes from Mono users:

I can't do without Mono and I don't just mean the iOS or Android dev with C# but MonoMac and Mono for *nix too. Thanks for everything; from the extraordinary tools to making hell turn into heaven, and thank you for making what used to be a predicament to effortless development pleasure.

I don't think we could have achieved our solutions without Mono in enterprise mobile development. It addresses so many key points, it is almost a trade secret. We extensively use AIR and JavaScript mobile frameworks too but ultimately we desperately need 1-to-1 mapping of the Cocoa Touch APIs or tap into low level features which determines our choice of development platform and frameworks.

That's where Mono comes in.

Gratefulness and paying polite respects aside, the key tenets of Mono we use are:

  • shared C# code base for all our enterprise solutions - achieving the write once, compile everywhere promise with modern language and VM features everyone demands and expects in this century
  • logical, consistent and self-explanatory wrapper APIs for native services - allows us to write meta APIs of our own across platforms
  • low latency, low overhead framework
  • professional grade IDE and tools
  • native integration with iOS tools and development workflow
  • existence of satisfactory documentation and support
  • legal clarity - favorable licensing options
  • dedicated product vision via Xamarin - commercial backing
  • community support

Koen Pijnenburg shared this story with me:

We've been in touch a few times before and would like to contribute my story. It's not really an interesting setup, but a real nice development for Mono(Touch). I've been developing app for iPhone since day 1, I was accepted in the early beta for the App Store. On launch day july 2008, 2 of the 500 apps in the App Store were mine, my share has decreased a lot in the past years ;)

I really, really, really like football(soccer), maybe you do also, I don't know. In september 2008 I created the first real soccer/football stats app for the iPhone called My Football. This was a huge succes, basically no competition at that time. In 2009 I released My Football Pro, an app with 800 leagues worldwide, including live data for more then 100 leagues. Since then I created lots of apps, all created with the iPhone SDK and with Objective-C.

Since the launch of MonoTouch, it merged the best of two worlds in my opinion. I've been a Mono/.NET developer for years before the iPhone apps, for me it was love at first line of code.

The last year I've increased my work with MonoTouch / Droid /MonoGame(Poppin' Frenzy etc ;)), and focused less on working with native SDK's only. Since our My Football apps are at the end of their lifecycle in this form, we are working on a new line of My Football apps. Our base framework supporting our data, is built with Mono, and the apps UI will be built with MonoTouch / MonoDroid / WP7 etc.

Included is the screenshot of our first app built with the framework, My Football Pro for iPad. It has a huge amount of data, stats / tables / matches / live data for more then 800 leagues worldwide. We think it's a great looking app!

Working with MonoTouch is fantastic and just wanted you to know this!

Mono on Mainframes

This year turned out to show a nice growh in the deployment of Mono for IBM zSeries computers.

Some are using ASP.NET, some are using Mono in headless mode. This was something that we were advocating a few years ago, and this year the deployments went live both in Brazil and Europe.

Neale Ferguson from Sinenomine has kept the zSeries port active and in shape.

Mono and ASP.NET

This year we delivered enough of ASP.NET 4.0 to run Microsoft's ASP.NET MVC 3.

Microsoft ASP.NET MVC 3 is a strange beast. It is licensed under a great open source license (MS-PL) but the distribution includes a number of binary blobs (the Razor engine).

I am inclined to think that the binaries are not under the MS-PL, but strictly speaking, since the binaries are part of the MS-PL distribution labeled as such, the entire download is MS-PL.

That being said, we played it safe in Mono-land and we did not bundle ASP.NET MVC3 with Mono. Instead, we provide instructions on how users can deploy ASP.NET MVC 3 applications using Razor as well as pure Razor apps (those with .cshtml extensions) with Mono.

2012, the year of Mono 2.12

2012 will be a year dominated by our upcoming Mono release: Mono 2.12. It packs a year worth of improvements to the runtime, to our build process and to the API profiles.

Mono 2.12 defaults to the .NET 4.x APIs and include support for .NET 4.5.

This is going to be the last time that we branch Mono for these extended periods of time. We are changing our development process and release policies to reduce the amount of code that is waiting on a warehouse to be rolled out to developers.

ECMA

We wrapped up our work on updating the ECMA CLI standard this year. The resulting standard is now at ISO and going through the standard motions to become an official ISO standard.

The committee is getting ready for a juicy year ahead of us where we are shifting gears from polish/details to take on significant extensions to the spec.

Posted on 21 Dec 2011


CXXI: Bridging the C++ and C# worlds.

by Miguel de Icaza

The Mono runtime engine has many language interoperability features but has never had a strong story to interop with C++.

Thanks to the work of Alex Corrado, Andreia Gaita and Zoltan Varga, this is about to change.

The short story is that the new CXXI technology allows C#/.NET developers to:

  • Easily consume existing C++ classes from C# or any other .NET language
  • Instantiate C++ objects from C#
  • Invoke C++ methods in C++ classes from C# code
  • Invoke C++ inline methods from C# code (provided your library is compiled with -fkeep-inline-functions or that you provide a surrogate library)
  • Subclass C++ classes from C#
  • Override C++ methods with C# methods
  • Expose instances of C++ classes or mixed C++/C# classes to both C# code and C++ as if they were native code.

CXXI is the result of two summers of work from Google's Summer of Code towards improving the interoperability of Mono with the C++ language.

The Alternatives

This section is merely a refresher of of the underlying technologies for interoperability supported by Mono and how developers coped with C++ and C# interoperability in the past. You can skip it if you want to get to how to get started with CXXI.

As a reminder, Mono provides a number of interoperability bridges, mostly inherited from the ECMA standard. These bridges include:

  • The bi-directional "Platform Invoke" technology (P/Invoke) which allows managed code (C#) to call methods in native libraries as well as support for native libraries to call back into managed code.
  • COM Interop which allows Mono code to transparently call C or C++ code defined in native libraries as long as the code in the native libraries follows a few COM conventions [1].
  • A general interceptor technology that can be used to intercept method invocations on objects.

When it came to getting C# to consume C++ objects the choices were far from great. For example, consider a sample C++ class that you wanted to consume from C#:

class MessageLogger {
public:
	MessageLogger (const char *domain);
	void LogMessage (const char *msg);
}

One option to expose the above to C# would be to wrap the Demo class in a COM object. This might work for some high-level objects, but it is a fairly repetitive exercise and also one that is devoid of any fun. You can see how this looks like in the COM Interop page.

The other option was to produce a C file that was C callable, and invoke those C methods. For the above constructor and method you would end up with something like this in C:

/* bridge.cpp, compile into bridge.so */
MessageLogger *Construct_MessageLogger (const char *msg)
{
	return new MessageLogger (msg);
}

void LogMessage (MessageLogger *logger, const char *msg)
{
	logger->LogMessage (msg);
}

And your C# bridge, like this:

class MessageLogger {
	IntPtr handle;

	[DllImport ("bridge")]
	extern static IntPtr Construct_MessageLogger (string msg);

	public MessageLogger (string msg)
	{
		handle = Construct_MessageLogger (msg);
	}

	[DllImport ("bridge")]
	extern static void LogMessage (IntPtr handle, string msg);

	public void LogMessage (string msg)
	{
		LogMessage (handle, msg);
	}
}

This gets tedious very quickly.

Our PhyreEngine# binding was a C# binding to Sony's PhyreEngine C++ API. The code got very tedious, so we built a poor man's code generator for it.

To make things worse, the above does not even support overriding C++ classes with C# methods. Doing so would require a whole load of manual code, special cases and callbacks. The code quickly becomes very hard to maintain (as we found out ourselves with PhyreEngine).

This is what drove the motivation to build CXXI.

[1] The conventions that allow Mono to call unmanaged code via its COM interface are simple: a standard vtable layout, the implementation of the Add, Release and QueryInterface methods and using a well defined set of types that are marshaled between managed code and the COM world.

How CXXI Works

Accessing C++ methods poses several challenges. Here is a summary of the components that play a major role in CXXI:

  • Object Layout: this is the binary layout of the object in memory. This will vary from platform to platform.
  • VTable Layout: this is the binary layout that the C++ compiler will use for a given class based on the base classes and their virtual methods.
  • Mangled names: non-virtual methods do not enter an object vtable, instead these methods are merely turned into regular C functions. The name of the C functions is computed based on the return type and the parameter types of the method. These vary from compiler to compiler.

For example, given this C++ class definition, with its corresponding implementation:

class Widget {
public:
	void SetVisible (bool visible);
	virtual void Layout ();
	virtual void Draw ();
};

class Label : public Widget {
public:
	void SetText (const char *text);
	const char *GetText ();
};

The C++ compiler on my system will generate the following mangled names for the SetVisble, Layout, Draw, SetText and GetText methods:

__ZN6Widget10SetVisibleEb
__ZN6Widget6LayoutEv
__ZN6Widget4DrawEv
__ZN5Label7SetTextEPKc
__ZN5Label7GetTextEv

The following C++ code:

	Label *l = new Label ();
	l->SetText ("foo");
	l->Draw ();	

Is roughly compiled into this (rendered as C code):

	Label *l = (Label *) malloc (sizeof (Label));
	ZN5LabelC1Ev (l);   // Mangled name for the Label's constructor
	_ZN5Label7SetTextEPKc (l, "foo");

	// This one calls draw
	(l->vtable [METHOD_PTR_SIZE*2])();

For CXXI to support these scenarios, it needs to know the exact layout for the vtable, to know where each method lives and it needs to know how to access a given method based on their mangled name.

The following chart explains shows how a native C++ library is exposed to C# or other .NET languages:

Your C++ source code is compiled twice. Once with the native C++ compiler to generate your native library, and once with the CXXI toolchain.

Technically, CXXI only needs the header files for your C++ project, and only the header files for the APIs that you are interested in wrapping. This means that you can create bindings for C++ libraries that you do not have the source code to, but have its header files.

The CXXI toolchain produces a .NET library that you can consume from C# or other .NET languages. This library exposes a C# class that has the following properties:

  • When you instantiate the C# class, it actually instantiates the underlying C++ class.
  • The resulting class can be used as the base class for other C# classes. Any methods flagged as virtual can be overwritten from C#.
  • Supports C++ multiple inheritance: The generated C# classes expose a number of cast operators that you can use to access the different C++ base classes.
  • Overwritten methods can call use the "base" C# keyword to invoke the base class implementation of the given method in C++.
  • You can override any of the virtual methods from classes that support multiple inheritance.
  • A convenience constructor is also provided if you want to instantiate a C# peer for an existing C++ instance that you surfaced through some other mean.

This is pure gold.

The CXXI pipeline in turn is made up of three components, as shown in the diagram on the right.

The GCC-XML compiler is used to parse your source code and extract the vtable layout information. The generated XML information is then processed by the CXXI tooling to generate a set of partial C# classes that contain the bridge code to integrate with C++.

This is then combined with any customization code that you might want to add (for example, you can add some overloads to improve the API, add a ToString() implementation, add some async front-ends or dynamic helper methods).

The result is the managed assembly that interfaces with the native static library.

It is important to note that the resulting assembly (Foo.dll) does not encode the actual in-memory layout of the fields in an object. Instead, the CXXI binder determines based on the ABI being used what the layout rules for the object are. This means that the Foo.dll is compiled only once and could be used across multiple platforms that have different rules for laying out the fields in memory.

Demos

The code on GitHub contains various test cases as well as a couple of examples. One of the samples is a minimal binding to the Qt stack.

Future Work

CXXI is not finished, but it is a strong foundation to drastically improve the interoperability between .NET managed languages and C++.

Currently CXXI achieves all of its work at runtime by using System.Reflection.Emit to generate the bridges on demand. This is useful as it can dynamically detect the ABI used by a C++ compiler.

One of the projects that we are interested in doing is to add support for static compilation, this would allow PS3 and iPhone users to use this technology. It would mean that the resulting library would be tied to the platform on which the CXXI tooling was used.

CXXI currently implements support for the GCC ABI, and has some early support for the MSVC ABI. Support for other compiler ABIs as well as for completing the MSVC ABI is something that we would like help with.

Currently CXXI only supports deleting objects that were instantiated from managed code. Other objects are assumed to be owned by the unmanaged world. Support for the delete operator is something that would be useful.

We also want to better document the pipeline, the runtime APIs and improve the binding.

Posted on 19 Dec 2011


2011: Tell me how you used Mono this year

by Miguel de Icaza

I have written a summary of Mono's progress in the year 2011, but I want to complement my post with stories from the community.

Did you use Mono in an interesting setup during 2011? Please post a comment on this post, or email me the story and tell me a little bit about it.

Posted on 15 Dec 2011


Porto Alegre

by Miguel de Icaza

We are traveling to Porto Alegre in Brazil today and will be staying in Brazil until January 4th.

Ping me by email (miguel at gnome dot org) if you would like to meet in Porto Alegre to talk hacking, Mono, Linux, open source, iPhone or if you want to enlighten me about the role of scrum masters as actors of social change.

Happy holidays!

Posted on 14 Dec 2011


Farewell to Google's CodeSearch

by Miguel de Icaza

It seems that part of Steve Jobs' legacy was to give Larry Page some advise: focus. This according to Steve Jobs' recently published biography.

So Larry Page took the advise seriously and decided to focus. His brand of focus is to kill projects that were distracting to their goals. One of them, -and the one I cared the most about- was CodeSearch..

What did CodeSearch do for programmers?

The CodeSearch service was a unique tool as it indexed open source code in the wild.

Codesearch is one of the most valuable tools in existence for all software developers, specifically:

  • When an API is poorly documented, you could find sample bits of code that used the API.
  • When an API error codes was poorly documented, you could find sample bits of code that handled it.
  • When an API was difficult to use (and the world is packed with those), you could find sample bits of code that used it.
  • When you quickly wanted to learn a language, you knew you could find quality code with simple searches.
  • When you wanted to find different solutions to everyday problems dealing with protocols, new specifications, evolving standards and trends. You could turn to CodeSearch.
  • When you were faced with an obscure error message, an obscure token, an obscure return value or other forms of poor coding, you would find sample bits of code that solved this problem.
  • When dealing with proprietary protocols or just poorly documented protocols, you could find how they worked in minutes.
  • When you were trying to debug yet another broken standard or yet another poorly specified standard, you knew you could turn quickly to CodeSearch to find the answers to your problems (memories of OAuth and IMAP flash in my head).
  • When learning a new programming language or trying to improve your skills on a new programming language, you could use CodeSearch to learn the idioms and the best (and worst practices).
  • When building a new version of a library, either in a new language, making a fluent version, making an open source version, building a more complete version you would just go to Codesearch to find answers to how other people did things.

It is a shame that Google is turning their back on their officially stated mission "To organize the world‘s information and make it universally accessible and useful". It is a shame that this noble goal is not as important as competing with Apple, Facebook, Microsoft, Twitter and Yelp.

Comparing Search Engines

While writing this blog entry, I fondly remembered how Codesearch helped me understand the horrible Security framework that ships with iOS. Nobody informed the Apple engineers that "Security through obscurity" was not intended for their developer documentation.

In this particular case, I was trying to understand the semantics of kSecReturnData. How to use this constant and how it interacts with the keyring system is both tricky, and poorly specified in Apple's docs. Sometimes things fail without any indication of what went wrong, other than "error". So I used CodeSearch to figure this out (along with some other 30 constants and APIs in that library that are just as poorly documented).

These are the results of looking for this value in three search engines as of this morning.

First Contender: GrepCode

GrepCode shows absolutely nothing relevant. But shows a bunch of Java packages with no context, no code snippets and if you make the mistake of drilling down, you wont find anything:

Not useful.

Second Contender: Codease

Codase is indexing 250 million lines of code, usually it takes minutes to get this page:

Maybe the server will come back up.

Third Contender: Koders

Koders is part of Black Duck, and searching for the term renders a bunch of matches. Not a single one of the results displayed actually contain a single use of the kSecReturnData constant. And not a single one of the snippets actually show the kSecReturnData constant. It is as useful as configuring your browser to use StumbleUpon as your search engine:

Not useful.

Google's CodeSearch

And this is what Codesearch shows:

The big innovation on Google's search engine is that it actually works and shows real matches for the text being searched, with a relevant snippet of the information you are looking for.

We are going to be entering the dark ages of software research in the next few months.

Is there a hacker White Knight out there?

Running a service like Codesearch is going to take a tremendous amount of resources. There are major engineering challenges involved and hosting a service like this can not be cheap. It is probably not even profitable.

Larry Page's Google has already dropped the project. We can only hope that in a few years Sergey Brin's Google or Eric Schmidt's Google will bring this service back.

Microsoft is too busy catching up to Google and wont have any spare resources to provide a Bing for code search. And if they did, they would limit the search to Win32 APIs.

Thanks!

I should thank Google for funding that project for as long as they did as well as the Google engineers that worked on it as long as they could. Over the years, it helped me fix problems in a fraction of the time and helped me understand complicated problems in minutes.

The Google engineers whose projects just got shutdown for in the name of strategy and focus are probably as sad as all of us are.

On the plus side, I get to share this rant on Google Plus with a dozen of my friends!

Posted on 29 Nov 2011


Updated Documentation Site

by Miguel de Icaza

Jeremie Laval has upgraded our Web-based documentation engine over at docs.go-mono.com. This upgrade brings a few features:

New Look: Base on Jonathan Pobst's redesign, this is what our documentation looks like now:

Better Links: Links to pages on the site will now properly open the left-side tree to the documentation you linked to. This has been an open request for about six years, and it got finally implemented.

Search: the search box on the web site uses Lucene to search the text on the server side, and shows you the matching results as you type:

Easier to Plug: MonoDoc/Web now easily supports loading documentation from alternate directories, it is no longer limited to loading the system-configured documentation.

No more frames: For years we used frames for the documentation pages. They had a poor experience and made the code uglier. They are now gone.

Powered by Mono's SGen: We have reduced the memory consumption of our web documentation by switching to Mono's Generational GC from Boehm's. The load on the server is lower, responses are faster and we scale better.

The source code changes are now on GitHub in the webdoc module.

We have also added Google Analytics support to our web site to help us determine which bits of documentation are more useful to you.

Posted on 22 Nov 2011


Hiring Mono Runtime Hackers

by Miguel de Icaza

As Mono grows on servers, mobile and desktop platforms, we are looking to hire programmers to join our Mono Runtime team.

The Mono Runtime team owns the code generator, the just-in-time and ahead-of-time compilers, the garbage collector, the threadpool and async layers in the runtime and mostly works in the C-side of the house.

If you are a developer with low-level experience with virtual machines, just in time compilers or love garbage collection, real time processing, or you read every new research paper on incremental garbage collection, hardware acceleration, register allocation and you are interested in joining our young, self-funded and profitable startup, we want to hear from you.

Send your resumes to [email protected]

Posted on 18 Oct 2011


Upcoming Mono Releases: Change in Policies

by Miguel de Icaza

We have historically made stable releases of Mono that get branched and maintained for long periods of time. During these long periods of time, we evolve our master release for some four to five months while we do major work on the branch.

Historically, we have had done some of these large changes since we have rewritten or re-architected large parts of our JIT, or our garbage collector, or our compilers.

There were points in the project history where it took us some 9 months to release: seven months of new development followed by two months of beta testing and fixing regressions. With Mono 2.6 we tried to change this, we tried to close the release time to at most six months, and we were relatively good at doing this with 2.8 and 2.10.

We were on track to do a quick Mono 2.12 release roughly around May, but with the April bump in the road, this derailed our plans.

Since 2.10.0 was released two things happened:

  • On Master: plenty of feature work and bug fixing.
  • On our 2.10 branch: bug fixes and backporting fixes from master to 2.10

Now that things have settled at Xamarin and that we are getting Mono back into continuous integration builds we are going to release our first public beta of the upcoming Mono, it will be called Mono 2.11.1. We will keep it under QA until we are happy with the results and we will then release Mono 2.12 based on this.

But after Mono 2.12, we want to move to a new development model where we keep our master branch always in a very stable state. This means that new experimental features will be developed in branches and only landed to the master branch once they have been completed.

Our goal is to more quickly bring the features that we are developing to our users instead of having everyone wait for very long periods of time to get their new features.

New Features in Mono 2.11

These are some of the new features availalable in Mono 2.11:

  • We refactored our C# compiler to have two backends one based on Cecil, one based on Reflection.Emit. Fixing some important usability properties of our compiler.
  • Implemented C# 5 Async.
  • Our C# compiler has TypedReference support (__refvalue, __reftype and __makeref).
  • Our compiler as a service can compile classes now and has an instance API (instantiate multiple C# compiler contexts independently).
  • Added the .NET 4.5 API profile and many of the new async APIs to use with C# 5.
  • Improved our new Garbage Collector: it is faster, it is more responsive and it is more stable. It has also gained MacOS/iOS native support.
  • We made System.Json available on every profile.
  • We added Portable Class Library support.
  • We added tooling for Code Contracts
  • We added a TPL Dataflow implementation
  • We added fast ThreadLocal support
  • We brought our ASP.NET implementation to the year 2011 and it now sports a new enormously cute error page as opposed to that error page that we have which transports you mind back to 1999.
  • Mono's debugger now supports attaching to a live process (deferred support)
  • Our socket stack is faster on BSD and OSX, by using kqueue (on Linux it uses epoll already).

Posted on 14 Oct 2011


WinRT and Mono

by Miguel de Icaza

Today Joseph mentioned to me that some of our users got the impression from my previous post on WinRT that we would be implementing WinRT for Linux. We are not working on a WinRT UI stack for Linux, and do not have plans to.

WinRT is a fabulous opportunity for Mono, because Microsoft is sending a strong message: if you want your code to run in multiple scenarios (server, desktops, sandboxed environments), you want to split your UI code from your backend code.

This is great because it encourages developers to think in terms of having multiple facades for the same code base and the direction that we have been taking Mono on in the last few years.

Use the native toolkit on each platform to produce an immersive user experience, and one that leverages the native platform in the best possible way.

These are the APIs that we envision .NET developers using on each platform:

  • Windows: WinRT, Winforms, WPF (fallbacks: Gtk#, Silverlight)
  • MacOS: MonoMac (fallback: Gtk#, Silverlight)
  • Linux: Gtk#
  • Android: MonoDroid APIs
  • iOS: MonoTouch
  • Windows Phone 7: Silverlight
  • XBox360: XNA-based UI

Even if a lot of code could be reused from Moonlight, WinRT is a moving target. It is not clear that the Linux desktop, as we know it today, is keeping up with the growth of other consumer environments. I talked to Tim about this at Build.

Head-less WinRT

There are some GUI-less components of WinRT that *do* make sense to bring to Mono platforms. There is already an implementation of some bits of the headless WinRT components being done by Eric.

The above effort will enable more code sharing to take place between regular .NET 4 apps, WP7 apps, Mono apps and WinRT apps.

Posted on 26 Sep 2011


WinRT demystified

by Miguel de Icaza

Windows 8 as introduced at Build is an exciting release as it has important updates to how Microsoft envisions users will interact with their computers, to a fresh new user interface to a new programming model and a lot more.

If you build software for end-users, you should watch Jensen Harris discuss the Metro principles in Windows 8. I find myself wanting to spend time using Windows 8.

But the purpose of this post is to share what I learned at the conference specifically about WinRT and .NET.

The Basics

Microsoft is using the launch of Windows 8 as an opportunity to fix long-standing problems with Windows, bring a new user interface, and enable a safe AppStore model for Windows.

To do this, they have created a third implementation of the XAML-based UI system. Unlike WPF which was exposed only to the .NET world and Silverlight which was only exposed to the browser, this new implementation is available to C++ developers, HTML/Javascript developers and also .NET developers.

.NET developers are very familiar with P/Invoke and COM Interop. Those are two technologies that allow a .NET developer to consume an external component, for example, this is how you would use the libc "system (const char *)" API from C#:

	[DllImport ("libc")]
	void system (string command);
	[...]

	system ("ls -l /");
	

We have used P/Invoke extensively in the Mono world to create bindings to native libraries. Gtk# binds the Gtk+ API, MonoMac binds the Cocoa API, Qyoto binds the Qt API and hundred other bindings wrap other libraries that are exposed to C# as object-oriented libraries.

COM Interop allows using C or C++ APIs directly from C# by importing the COM type libraries and having the runtime provide the necessary glue. This is how Mono talked with OpenOffice (which is based on COM), or how Mono talks to VirtualBox (which has an XPCOM based API).

There are many ways of creating bindings for a native library, but doing it by hand is bound to be both tedious and error prone. So everyone has adopted some form of "contract" that states what the API is, and the binding author uses this contract to create their language binding.

WinRT

WinRT is a new set of APIs that have the following properties:

  • It implements the new Metro look.
  • Has a simple UI programming model for Windows developers (You do not need to learn Win32, what an HDC, WndProc or LPARAM is).
  • It exposes the WPF/Silverlight XAML UI model to developers.
  • The APIs are all designed to be asynchronous.
  • It is a sandboxed API, designed for creating self-contained, AppStore-ready applications. You wont get everything you want to create for example Backup Software or Hard Disk Partitioning software.
  • The API definitions is exposed in the ECMA 335 metadata format (the same one that .NET uses, you can find those as ".winmd" files).

WinRT wraps both the new UI system as well as old Win32 APIs and it happens that this implementation is based on top of COM.

WinRT Projections

What we call "bindings" Microsoft now calls "projections". Projections are the process of exposing APIs to three environments: Native (C and C++), HTML/Javascript and .NET.

  • If you author a component in C++ or a .NET language, its API will be stored in a WinMD file and you will be able to consume it from all three environments (Native, JavaScript and .NET).

    Even in C++ you are not exposed to COM. The use of COM is hidden behind the C++ projection tools. You use what looks and feels like a C++ object oriented API.

    To support the various constructs of WinRT, the underlying platform defines a basic set of types and their mappings to various environment. In particular, collection objects in WinRT are mapped to constructs that are native to each environment.

    Asynchronous APIs

    Microsoft feels that when a developer is given the choice of a synchronous and an asynchronous API, developers will choose the simplicity of a synchronous API. The result usually works fine on the developer system, but is terrible when used in the wild.

    With WinRT, Microsoft has followed a simple rule: if an API is expected to take more than 50 milliseconds to run, the API is asynchronous.

    The idea of course is to ensure that every Metro application is designed to always respond to user input and to not hang, block or provide a poor user experience.

    Async programming has historically been a cumbersome process as callbacks and state must be cascaded over dozens of places and error handling (usually poor error handling) is sprinkled across multiple layers of code.

    To simplify this process, C# and VB have been extended to support the F#-inspired await/async pattern, turning async programming into a joy. C++ got a setup that is as good as you can get with C++ lambdas and Javascript uses promises and "then ()".

    Is it .NET or Not?

    Some developers are confused as to whether .NET is there or not in the first place, as not all of the .NET APIs are present (File I/O, Sockets), many were moved and others were introduced to integrate with WinRT.

    When you use C# and VB, you are using the full .NET framework. But they have chosen to expose a smaller subset of the API to developers to push the new vision for Windows 8.

    And this new vision includes safety/sandboxed systems and asynchronous programming. This is why you do not get direct file system access or socket access and why synchronous APIs that you were used to consuming are not exposed.

    Now, you notice that I said "exposed" and not "gone".

    What they did was that they only exposed to the compiler a set of APIs when you target the Metro profile. So your application will not accidentally call File.Create for example. At runtime though, the CLR will load the full class library, the very one that contains File.Create, so internally, the CLR could call something like File.Create, it is just you that will have no access to it.

    This split is similar to what has been done in the past with Silverlight, where not every API was exposed, and where mscorlib was given rights that your application did not have to ensure the system safety.

    You might be thinking that you can use some trick (referencing the GAC library instead of the compiler reference or using reflection to get to private APIs, or P/Invoking into Win32). But all of those uses will be caught by AppStore review application and you wont be able to publish your app through Microsoft's store.

    You can still do whatever ugly hack you please on your system. It just wont be possible to publish that through the AppStore.

    Finally, the .NET team has taken this opportunity to do some spring cleaning. mscorlib.dll and System.dll have been split in various libraries and they have moved some types around.

    Creating WinRT Components

    Microsoft demoed creating new WinRT components on both C++ and .NET.

    In the .NET case, creating a WinRT component has been drastically simplified. The following is the full source code for a component that adds 2:

    
    	public sealed class AddTwo {
    		public int Add (int a, int b)
    		{
    			return a + b;
    		}
    
    		public async IAsyncOperation SubAsync (int a, int b)
    		{
    			return a - await (CountEveryBitByHand (b));
    		}
    	}
    	

    You will notice that there are no COM declarations of any kind. The only restriction is that your class must be sealed (unless you are creating a XAML UI component, in that case the restriction is lifted).

    There are also some limitations, you can not have private fields on structures, and there is not Task<T> for asynchronous APIs, instead you use the IAsyncOperation interface. Update to clarify: the no private fields rule is only limited to structs exposed to WinRT, and it does not apply to classes.

    UI Programming

    When it comes to your UI selection, you can either use HTML with CSS to style your app or you can use XAML UI.

    To make it easy for HTML apps to adhere to the Metro UI style and interaction model, Microsoft distributes Javascript and CSS files that you can consume from your project. Notice that this wont work on the public web. As soon as you use any WinRT APIs, your application is a Windows app, and wont run in a standalone web browser.

    .NET and C++ developers get to use XAML instead.

    There is clearly a gap to be filled in the story. It should be possible to use Microsoft's Razor formatting engine to style applications using HTML/CSS while using C#. Specially since they have shown the CLR running on their HTML/JS Metro engine.

    Right now HTML and CSS is limited to the Javascript use.

    In Short

    Microsoft has created a cool new UI library called WinRT and they have made it easy to consume from .NET, Javascript and C++ and if you adhere by their guidelines, they will publish the app on their appstore.

    Xamarin at BUILD

    If you are at build, come join us tonight at 6:30 at the Sheraton Park hotel, just after Meet the Experts. Come talk about Mono, Xamarin, MonoTouch, MonoDroid and MonoMac and discuss the finer points of this blog over an open bar.

    Comments

    There is a long list of comments in the moderation queue that are not directly related to WinRT, or bigger questions that are not directly related to WinRT, .NET and this post's topic, so I wont be approving those comments to keep things on focus. There are better forums to have discussions on Metro.

  • Posted on 15 Sep 2011


    Xamarin and Mono at the BUILD Conference

    by Miguel de Icaza

    Continuing our tradition of getting together with Mono users at Microsoft conferences, we are going to be hosting an event at the Sheraton Hotel next to the conference on Thursday at 6:30pm (just after Ask the Experts).

    Come join us with your iOS, Android, Mac and Linux questions.

    Posted on 14 Sep 2011


    MonoDevelop 2.6 is out

    by Miguel de Icaza

    Lluis just released the final version of MonoDevelop 2.6.

    This release packs a lot of new features, some of my favorite features in this release are:

    • Git support.
      • It not only provides the regular source code control commands, it adds full support for the various Git idioms not available in our Subversion addin.
      • Based on Java's JGit engine
      • Ported to C# using db4Object's sharpen tool. Which Lluis updated significantly
      • Logging and Blaming are built into the editor.
    • Mac support:
      • Our fancy MonoMac support lets you build native Cocoa applications. If you have not jumped into this Steve Jobs Love Fest, you can get started with our built-in templates and our online API documentation.
      • Native File Dialogs! We now use the operating system file dialogs, and we even used our own MonoMac bindings to get this done.
      • You can also check my Mac/iOS-specific blog for more details.
    • Unified editor for Gtk#, ASP.NET, MonoTouch and MonoDroid: we no longer have to track various forks of MonoDevelop, they have all converged into one tree.

    The above is just a taste of the new features in MonoDevelop 2.6. There are many more nominate your own!

    Congratulations to the MonoDevelop team on the great job they did!

    And I want to thank everyone that contributed code to MonoDevelop, directly or indirectly to make this happen.

    Posted on 07 Sep 2011


    Learning Unix

    by Miguel de Icaza

    As I meet new Unix hackers using Linux or Mac, sometimes I am surprised at how few Unix tricks they know. It is sometimes painful to watch developers perform manual tasks on the shell.

    What follows are my recommendations on how to improve your Unix skills, with a little introduction as to why you should get each book. I have linked to each one of those books with my Amazon afiliates link, so feel free to click on those links liberally.

    Here is the list of books that programmers using Unix should read. It will only take you a couple of days to read them, but you will easily increase your productivity by a whole order of magnitude.

    The Basics

    The Unix Programming Environment by Kernighan and Pike is a must-read. Although this is a very old book and it does not cover the fancy new features in modern versions of Unix, no other book covers in such beauty the explanation of the shell quoting rules, expansion rules, shell functions and the redirection rules.

    Every single thing you do in Unix will use the above in some form or shape, and until you commit those to memory you will be a tourist, and not a resident.

    Then you will learn sed and basic awk, both tools that you will use on a daily basis once you become proficient. You do not have to ever be scared of sed or regular expressions anymore.

    Save yourself the embarrassment, and avoid posting on the comments section jwz's quote on regular expressions. You are not jwz.

    It will take you about a week of commuting by bus to read it. You do not have to finish the book, you can skip over the second part.

    Unix Boot Camp

    While Kernighan's book is basic literacy, you need to develop your muscles and you need to do this fast and not buy a book so thick and so packed with ridiculous screenshots that you will never get past page 20.

    Get UNIX for the Impatient. This book is fun, compact and is packed with goodies that will make you enjoy every minute in Unix.

    Learn Emacs

    Emacs has had a strong influence in Unix over the years. If you learn to use Emacs, you will automatically learn the hotkeys and keybindings in hundreds of applications in Unix.

    The best place to learn Emacs is to launch Emacs and then press Control-h and then t. This is the online tutorial and it will take you about two hours to complete.

    The knowledge that you will gain from Emacs will be useful for years to come. You will thank me. And you will offer to buy me a beer, which I will refuse because I rather have you buy me a freshly squeezed orange juice.

    Tooting my own horn

    Learn to use the Midnight Commander.

    The Midnight Commander blends the best of both worlds: GUI-esque file management with full access to the Unix console.

    The Midnight Commander is a console application that shows 2 panels listing two different directories side-by-side and provides a command line that is fed directly to the Unix shell.

    The basics are simple: use the arrow keys to move around, Control-S to do incremental searches over filenames, Control-t to tag or untag files and the F keys to perform copy, move or delete operations. Copy and Move default to copy to the other panel (which you can conveniently switch to by pressing the tab key).

    There is no better way of keeping your file system organized than using my file manager.

    Becoming a Power User

    If you can not quench your thirst for knowledge there is one last book that I will recommend. This is the atomic bomb of Unix knowledge.

    Unix Power Tools is a compilation of tricks by some of the best Unix users that got compiled into a huge volume. This is a book of individual tricks, each about a page long, ideal to keep either on your bedside or in the restoom to pick a new trick every day.

    Mavis Beacon

    At this point you might be thinking "I am awesome", "the world is my oyster" and "Avatar 3D was not such a bad movie".

    But unless you touch-type, you are neither awesome, nor you are in a position to judge the qualities of the world as an oyster or any James Cameron movies.

    You have to face the fact that not only you are a slow typist, you do look a little bit ridiculous. You are typing with two maybe three fingers on each hand and you move your head like a chicken as you alternate looking at your keyboard and looking at your screen.

    Do humanity a favor and learn to touch type.

    You can learn to touch type in about three weeks if you spend some two to three hours per day using Mavis Beacon Teaches Typing.

    Mavis Beacon costs seventeen dollars ($17). Those seventeen dollars and the sixty three hours you will spend using it will do more to advance your carreer than the same sixty three hours spend reading editorials on Hacker News.

    Classics

    All of the books I list here have stood the test of time. They were written at a time when books were designed to last a lifetime.

    Unlike most modern computer books, all of these were a pleasure to read.

    Posted on 06 Sep 2011


    And we are back: Mono 2.10.3

    by Miguel de Icaza

    This is Xamarin's first official Mono release.

    This is a major bug fix release that addresses many of the problems that were reported since our last release back on April 25th.

    The detailed release notes have all the details, but the highlights of this release include:

    • MacOS X Lion is supported: both the Mono runtime and Gtk+ as shipped with Mono have been updated to run properly on Lion. This solves the known problems that users had running MonoDevelop on MacOS X.
    • Vastly improved WCF stack
    • Many bug fixes to our precise garbage collector.

    Major features continue to be developed in the main branch. Currently we are just waiting for the C# 5.0 Asynchronous Language support to be completed to release that version.

    Mono 2.10.3 also serves as the foundation for the upcoming Mono for Android 1.0.3 and MonoTouch 4.1.

    You can get it from Mono's Download Site.

    Currently we offer source code, Windows and MacOS packages. We will publish Linux packages as soon as we are done mirroring the contents of the old site that contains the Linux repositories.

    On C# 5.0

    Our new compiler, as you might know, has been rewritten to support two backends: a System.Reflection.Emit backend, and the brilliant IKVM.Reflection backend.

    The C# 5.0 support as found on master contains the C# 5.0 support as shipped by Microsoft on their latest public release.

    To try it out, use -langversion:future when invoking the compiler. You can try some of our samples in mono/mcs/tests/test-async*.cs

    Posted on 04 Aug 2011


    MonoDevelop on Lion

    by Miguel de Icaza

    We here at Xamarin are as excited as you are about the release of Lion. But unfortunately we're not quite ready to support you on Lion yet, and MonoDevelop doesn't work quite right. We're working around the clock to make MonoDevelop work perfectly on Lion, and we'll let you know as soon as it's ready.

    Update on July 29th: We have most of the fixes in place for Mono and will issue a build for testing on the Alpha channel soon.

    Posted on 20 Jul 2011


    Novell/Xamarin Partnership around Mono

    by Miguel de Icaza

    I have great news to share with the Mono community.

    Today together with SUSE, an Attachmate Business Unit, we announced:

    • Xamarin will be providing the support for all of the existing MonoTouch, Mono for Android and Mono for Visual Studio customers.
    • Existing and future SUSE customers that use the Mono Enterprise products on their SLES and SLED systems will continue to receive great support backed by the engineering team at Xamarin.
    • Xamarin obtained a perpetual license to all the intellectual property of Mono, MonoTouch, Mono for Android, Mono for Visual Studio and will continue updating and selling those products.
    • Starting today, developers will be able to purchase MonoTouch and Mono for Android from the Xamarin store. Existing customers will be able to purchase upgrades.
    • Xamarin will be taking over the stewardship of the Mono open source community project. This includes the larger Mono ecosystem of applications that you are familiar with including MonoDevelop and the other Mono-centric in the Mono Organization at GitHub.

    We are a young company, but we are completely dedicated to these mobile products and we can not wait to bring smiles to every one of our customers.

    Roadmaps

    Our immediate plans for both MonoTouch and Mono for Android is to make sure that your critical and major bugs are fixed. We have been listening to the needs of the community and we are working to improve these products to meet your needs. You can expect updates to the products in the next week.

    In the past couple of months, we have met with some of our users and we have learned a lot about what you wanted. We incorporated your feature requests into our products roadmaps for both the MonoTouch and the Mono for Android products.

    Another thing we learned is that many companies need to have a priority support offering for this class of products, so we have introduced this. It can be either be purchased when you first order MonoTouch or Mono for Android, or you get an upgrade to get the priority support.

    Next Steps

    Our goals are to delight software developers by giving them the most enjoyable environment, languages and tools to build mobile applications.

    We are thankful to everyone that provided feedback to us in our online form that we published a month ago. Please keep your feedback coming, you can reach us at [email protected]. We are reading every email that you send us and you can use my new miguel at new company dot com email address to reach me.

    We will be at the Monospace conference this weekend at the Microsoft NERD Center, hope to see you there!

    Remember to purchase early and often so we have the resources to bring you the best developer tools on the planet.

    Posted on 18 Jul 2011


    Update on Mono

    by Miguel de Icaza

    I have a posted an update on Mono and the upcoming release of Mono 2.12.

    Posted on 06 Jul 2011


    Mono Consultants

    by Miguel de Icaza

    We are getting flooded with paid support requests for Mono. Developers looking for us to fix bugs in Mono, to do some custom work, to port applications, libraries and adjust Mono for some specific needs.

    But we are trying to be a product company as opposed to a support company.

    We still want to help the Mono user community, and with all of the Mono talent out there, at least we can use this opportunity to get both groups in touch: the users that want custom engineering done, with the talented list of hackers.

    If you are a consultant available to do custom engineering and support for customers, we would love to put you in touch with people that need the custom engineering done. Email us at [email protected], in the subject line, specify that you are available for custom engineering, and in the body of the message list both your Mono skills (C# or C coding) and your availability to engage on those gigs.

    We will then get you in touch with users that needs the work done.

    Posted on 30 Jun 2011


    Xamarin Joy Factory

    by Miguel de Icaza

    Setting up a new company consumes a lot of time. Specially as we are developing as fast as we can not one, but two products: .NET for iPhone and .NET for Android.

    Structurally, we are better off than we were the first time that we built these products. We have more developers working on each product than we did the first time around, so progress is faster. But we also had to swap the developers around: those that wrote Foo, can not work on Foo again. This is just one of the things that we have to do to ensure a clean room implementation.

    Our vision is to create happy developers. We did that in the past by bringing the C# language, garbage collection, LINQ, strongly typed APIs, Parallel FX, intellisense and inline documentation to iPhone and Android developers. And by making it possible for the world's 6 million .NET developers to reuse their skills on the most popular mobile platforms.

    This time around, we are doing even more. We are addressing many of the frustrations that developers had with the old products and making sure that those frustrations go away.

    Nat and myself complement each other very well here. This means that there are a lot of new things that will be present in our offering that we never did in the past.

    There is a new level of polish that those familiar with Nat's previous products had (SUSE Studio, NLD/SLED, Ximian Desktop). Everyone at Xamarin can feel that Nat is hard at work when they noticed that one of the first things Nat did was to engage six design firms and an army of technical writers to ensure that our products go from "Nice" to "Amazing". And that was on his second week as CEO, a lot has happened since.

    I do not want to give away everything that we are doing, it would ruin the surprise, but we are here to deliver joy to programmers everywhere.

    If you are interested in working with us, and making mobile development and .NET development a joy that everyone can enjoy, check out our Jobs page

    Where we are now

    It gives me great pleasure to say that we have elevated the discourse on the iPhone simulator and my Chicken-powered TweetStation is up and running with the new iOS product. The picture on the left is TweetStation powered by MonoTouch, the picture on the right is TweetStation powered by Xamarin's iPhone product:


    TweetStation on MonoTouch

    TweetStation on Xamarin iOS

    Update: TweetStation now starts up on Device! We have the static compiler working!

    We also have the delicious iOS5 APIs exposed as strongly-typed and intellisense-friendly C#. We are now updating the APIs from Beta1 to Beta2, which should be completed today or tomorrow.

    Our Android efforts are moving fast. Only this morning we got Layouts to render on the device. This is a lot of work, as it gets Dalvik to start Mono, and initializes our entire bridge and exercises the C# and Java bridge. In addition, we have identified and fixed a serious problem in the distributed garbage collector.

    We also have a number of surprises for everyone in MonoDevelop, we believe that you guys are going to love the new features for iPhone and Android development.

    There is still a lot of polish left to do. We are working as hard as we can to have Preview releases in your hands, but we feel confident that we will have a great product for sale by the end of the summer. We hope you will all max out your credit cards buying it.

    Posted on 28 Jun 2011


    Xamarin recruits best CEO in the Industry

    by Miguel de Icaza

    I could not be more excited about this.

    Nat Friedman has joined Xamarin as a company founder and CEO this week.

    Nat and I have known each other and worked together on and off since the early days of Linux. In 1999, we started Ximian to advance the state of Linux, user experience and developer platforms - with many of our efforts brought to fruition after our acquisition by Novell in 2003.

    Anyone that has had the pleasure to work with Nat knows that ideas come in one side, and objects of desire come out on the other end.

    In mobile development, we've discovered a great opportunity: a need for products that developers love. And we are going to fill this need with great products that will make everyone's eyes shine every time they use our software.

    Update: Nat's most recent product was SUSE Studio.

    Posted on 25 May 2011


    Announcing Xamarin

    by Miguel de Icaza

    Today we start Xamarin, our new company focused on Mono-based products.

    These are some of the things that we will be doing at Xamarin:

    • Build a new commercial .NET offering for iOS
    • Build a new commercial .NET offering for Android
    • Continue to contribute, maintain and develop the open source Mono and Moonlight components.
    • Explore the Moonlight opportunities in the mobile space and the Mac appstore.

    We believe strongly in splitting the presentation layer from the business logic in your application and supporting both your backend needs with C# on the server, the client or mobile devices and giving you the tools to use .NET languages in every desktop and mobile client.

    Development started early this morning, we will first deliver the iPhone stack, followed by the Android stack, and then the Moonlight ports to both platforms.

    The new versions of .NET for the iPhone and Android will be source compatible with MonoTouch and Mono for Android. Like those versions, they will be commercial products, built on top of the open core Mono.

    In addition, we are going to provide support and custom development of Mono. A company that provides International Mono Support, if you will.

    As usual, your feedback will help us determine which platforms and features are important to you. Help us by filling out our survey. If you give us your email address, we will also add you to our preview/beta list for our upcoming products.

    Fighting for Your Right to Party

    We have been trying to spin Mono off from Novell for more than a year now. Everyone agreed that Mono would have a brighter future as an independent company, so a plan was prepared last year.

    To make a long story short, the plan to spin off was not executed. Instead on Monday May 2nd, the Canadian and American teams were laid off; Europe, Brazil and Japan followed a few days later. These layoffs included all the MonoTouch and MonoDroid engineers and other key Mono developers. Although Attachmate allowed us to go home that day, we opted to provide technical support to our users until our last day at Novell, which was Friday last week.

    We were clearly bummed out by this development, and had no desire to quit, especially with all the great progress in this last year. So, with a heavy dose of motivation from my music teacher, we hatched a plan.

    Now, two weeks later, we have a plan in place, which includes both angel funding for keeping the team together, as well as a couple of engineering contracts that will help us stay together as a team while we ship our revenue generating products.

    Update: although there was a plan to get Angel funding, it turns out that we self-funded the whole thing in the end.

    Next Steps

    Our plan is to maximize the pleasure that developers derive from using Mono and .NET languages on their favorite platforms.

    We do have some funding to get started and ship our initial products. But we are looking to raise more capital to address the shortcomings that we could not afford to do before, these include:

    • Tutorials for our various developer stacks
    • API documentation for the various Mono-specific APIs
    • Dedicated Customer Support Software (assistly or getsatisfaction)
    • Upgrade our Bug system
    • Training
    • Consulting and Support
    • and Marketing: we have a best of breed developer platform, and we need the world to know. Our previous marketing budget is what the ancient Olmec culture referred to as Zero.

    Stay tuned for more, meanwhile, hope to see you in July at the Monospace conference in Boston!

    Posted on 16 May 2011


    Dropbox Lack of Security

    by Miguel de Icaza

    I am a fan of Dropbox. It is a great tool, a great product, and clearly they have a passionate team over at Dropbox building the product.

    Dropbox recently announced an update to its security terms of service in which they announced that they would provide the government with your decrypted files if requested to do so.

    This is not my problem with Dropbox.

    My problem is that for as long as I have tried to figure out, Dropbox made some bold claims about how your files were encrypted and how nobody had access to them, with statements like:

    • All transmission of file data occurs over an encrypted channel (SSL).
    • All files stored on Dropbox servers are encrypted (AES-256)
    • Dropbox employees aren't able to access user files, and when troubleshooting an account they only have access to file metadata (filenames, file sizes, etc., not the file contents)

    But anyone that tried to look further came out empty handed. There really are no more details on what procedures Dropbox has in place or how they implement the crypto to prevent unauthorized access to your files. We all had to just take them at their word.

    This wishy-washy statement always made me felt uneasy.

    But this announcement that they are able to decrypt the files on behalf of the government contradicts their prior public statements. They claim that Dropbox employees aren't able to access user files.

    This announcement means that Dropbox never had any mechanism to prevent employees from accessing your files, and it means that Dropbox never had the crypto smarts to ensure the privacy of your files and never had the smarts to only decrypt the files for you. It turns out, they keep their keys on their servers, and anyone with clearance at Dropbox or anyone that manages to hack into their servers would be able to get access to your files.

    If companies with a very strict set of security policies and procedures like Google have had problems with employees that abused their privileges, one has to wonder what can happen at a startup like Dropbox where the security perimeter and the policies are likely going to be orders of magnitude laxer.

    Dropbox needs to come clear about what privacy do they actually offer in their product. Not only from the government, but from their own employees that could be bribed, blackmailed, making some money on the side or are just plain horny.

    Dropbox needs to recruit a neutral third-party to vouch for their security procedures and their security stack that surrounds users' files and privacy. If they are not up to their own marketed statements, they need to clearly specify where their service falls short and what are the potential security breaches that

    Unless Dropbox can prove that algorithmically they can protect your keys and only you can get access to your files, they need to revisit their public statements and explicitly state that Dropbox storage should be considered semi-public and not try to sell us snake oil.

    Posted on 19 Apr 2011


    Save the Date: Monospace Conferece in Boston

    by Miguel de Icaza

    The dates for the MonoSpace conference have been announced: July 23rd to 25th, 2011. The event will take place at the Microsoft NERD Center.

    The organizers have just made a call for speakers. If you have an interesting topic to discuss, please submit a talk, we would love to hear from you.

    Posted on 18 Apr 2011


    Save the Date: Monospace Conferece in Boston

    by Miguel de Icaza

    The dates for the MonoSpace conference have been announced: July 23rd to 25th, 2011. The event will take place at the Microsoft NERD Center.

    The organizers have just made a call for speakers. If you have an interesting topic to discuss, please submit a talk, we would love to hear from you.

    Posted on 18 Apr 2011


    Mono Android and iPhone Updates

    by Miguel de Icaza

    Today we are happy to release Mono for Android 1.0 as well as MonoTouch 4.0.

    Both products allow you to use the C# language to write applications that run on Android and iOS devices.

    Both products are based on the latest Mono 2.10 core. The Parallel Frameworks can be used to write more elegant multi-threaded code across all devices, and automatically takes advantage of multiple cores available on the iPad2 and Xoom devices. The C# 4.0 is now the default as well as the .NET 4.0 APIs.

    Mono for Android

    Our Mono for Android debuts today after almost a year worth of development.

    Perhaps the most important lesson that we got from MonoTouch's success was that we had to provide a completely enabled platform. What we mean by this is that we needed to provide a complete set of tools that would assist developers from creating their first Android application, to distributing the application to the market place, to guides, tutorials, API documentation and samples.

    Mono for Android can be used from either Visual Studio Professional 2010 for Windows users, or using MonoDevelop on the Mac.

    Mono code runs side-by-side the Dalvik virtual machine in the same process:

    This is necessary since code running in Dalvik provides the user interface elements for Android as well as the hosting and activation features for applications on Android.

    APIs

    The Mono for Android API is made up of the following components: Core .NET APIs, Android.* APIs, OpenGL APIs and Java bridge APIs.

    Let us start with the most interesting one: Android.* APIs. These are basically a 1:1 mapping to the native Java Android APIs but they have been C#-ified, for example, you will find C# properties instead of set/get method calls, and you will use C# events with complete lambda support (with variables being automatically captured) instead of Java inner classes. This means that while in Java you would write something like:

    	// Java code
    	button.setOnClickListener (new View.OnClickListener() {
                 public void onClick(View v) {
    		button.setText ("Times clicked: " + Integer.toString(counter));
                 }
             });
    	
    	// C# code
    	button.Click += delegate {
    		button.Text = "Times clicked: " + counter;
    	};
    	

    In addition to the UI APIs, there are some 57 Android.* namespaces bound that provide access to various Android features like telephony, database, device, speech, testing and many other services.

    In what is becoming the standard in the Mono world, OpenGL is exposed through the brilliant OpenTK API. OpenTK is a strongly typed, Framework Design Guidelines-abiding binding of OpenGL. The benefit is that both Visual Studio and MonoDevelop can provide intellisense hints as you develop for the possible parameters, values and their meaning without having to look up the documentation every time.

    Finally, for the sake of interoperability with the native platform, we exposed many types from the Java.* namespaces (31 so far) that you might need if you are interoperating with third party libraries that might require an instance of one of those Java.* types (for example, a crypto stack might want you to provide a Javax.Crypto.Cipher instance. We got you covered.

    Core Differences

    Mono for Android has a few differences from MonoTouch and Windows Phone 7 when it comes to the runtime. Android supports JIT compilation while iOS blocks it at the kernel level and Windows Phone 7 has limitations.

    This means that developers using Mono on Android have complete access to System.Reflection.Emit. This in turn means that generics-heavy code like F# work on Android as do dynamic languages powered by the Dynamic Language Runtime like IronPython, IronRuby and IronJS.

    And of course, you can also use our own C# Compiler as a Service

    Now, although those languages can run on Mono for Android, we do not currently have templates for them. The Ruby and Python support suffer due to Android limitations. The Dalvik virtual needs to know in advance which classes you customize, and since it is not really possible to know this with a dynamic language, the use of Iron* languages is limited in that they cant subclass Android classes. But they can still call into Android APIs and subclass as much .NET class libraries as they want.

    Native User Interfaces

    MonoTouch and MonoDroid share a common runtime, a common set of class libraries, but each provides different user interface and device specific APIs.

    For example, this code takes advantage of iOS's UINavigationController and animates the transition to a new state in response to a user action:

    void OnSettingsTapped ()
    {
    	var settings = new SettingsViewController ();
    	PushViewController (settings, true);
    }
    	

    This is an equivalent version for Mono for Android:

    void OnSettingsTapped ()
    {
    	var intent = new Intent ();
    	intent.SetClass (this, typeof (SettingsActivity));
    	StartActivity (intent);
    }
    	

    We chose to not follow the Java write-once-run-anywhere approach for user interfaces and instead expose every single bit of native functionality to C# developers.

    We felt that this was necessary since the iOS and Android programming models are so different. We also wanted to make sure that everything that is possible to do with the native APIs on each OS continues to be possible while using Mono.

    For instance, if you want to use CoreAnimation to drive your user interactions, you should be able to leverage every single bit of it, without being forced into a common denominator with Android where nothing similar to this is available.

    Craig Dunn, one of the authors of the MonoTouch Programming Book, has written a nice Mosetta Stone document that compares side-by-side some of the key UI differences across platforms.

    He also has written the Restaurant Guide Sample which sports a unique user interface for Android, iOS and Windows Phone 7:

    You can take a look at this cross platform sample from GitHub.

    Split your Presentation from your Engine

    Faced with the diversity of platforms to support, both mobile and desktop, this is a good time to design, refactor and prepare your code for this new era.

    Today developers can use C# to target various UIs:

    To give your code the most broad reach, you should consider splitting your backend code from your presentation code. This can be done by putting reusable code in shared libraries (for example, REST clients) and shared business logic on its own libraries.

    By splitting your presentation code from your business logic code for your application, not only you gain the ability to create native experiences in each platform, you also get a chance to test your business logic/shared libraries more easily.

    Linking

    In Mono for Android when you build an application for distribution, we embed the Mono runtime with your application. This is necessary so your application is entirely self-contained and does not take any external dependencies.

    Mono for Android uses the Mono Linker to ensure that only the bits of Mono that you actually use end up in your package and that you do not pay a high tax for just using a handful of functions.

    For example, if you want to just use a method from XElement, you would only pay the price for using this class and any of its dependencies. But you would not end up bringing the entire System.XML stack: you only pay for what you use.

    During development a different approach is used: the Mono runtime is installed on your emulator or test device as a shared runtime. This minimizes both the build and deploy times.

    Mono for Android References

    Start with our documentation portal, there you will find our Installation Guide, a tutorial for your first C# Android application, our tutorials (many ported from their Java equivalents) and our How-To Guides and a large collection of sample programs.

    You can also explore the documentation for the Mono for Android API in a convenient to remember url: docs.mono-android.net.

    The first book of Mono for Android will be available on July 12th. In the meantime, we have created many tutorials and guides that will help you go

    I also strongly suggest those interested in parallel programming to check out the Patterns for Parallel Programming: Understanding and Applying Parallel Patterns with the .NET Framework 4. This is a free PDF, and is a must-read for anyone building multi-core applications.

    Thank You!

    Mono for Android would not have been possible without the hard work of the MonoDroid team at Novell. The team worked around the clock for almost a year creating this amazing product.

    The team was backed up by the Mono core team that helped us get C# 4.0 out, WCF, the linker, the LLVM support, improve the VM, extend the MonoDevelop IDE, scale Mono, improve our threadpool, support OpenTK, implement the Parallel Frameworks, ship dozens of betas for MonoDevelop, Mono and Mono for Android.

    Posted on 06 Apr 2011


    Mono and Google Summer of Code

    by Miguel de Icaza

    We have been lucky enough that Google accepted Mono as a mentoring organization for the Google Summer of Code 2011

    This is a great opportunity for students to get involved with open source, contribute, learn and get paid for their work during the summer.

    We have a lot of ideas to choose from in our student projects page, ranging from virtual machine hacking, MacOS X improvements, MonoDevelop extensions, language bindings and even improving the Manos web application framework.

    Do not let our limited imagination stop you. Although there are plenty of ideas to choose from, students should feel free to come up with their own ideas. In the past years projects based on students' ideas have been very successful and we want to encourage more of those.

    Proposal submission is open until Friday April 8, so now is the time to join our wonderful community, discuss your project ideas and start working on those proposals.

    The Mono Summer of Code IRC channel is #monosoc on irc.gnome.org

    Posted on 30 Mar 2011


    Monospace Conference: Boston, July 2011

    by Miguel de Icaza

    The Mono community is organizing the Monospace conference to be held in July in Boston. This event is being organized by Dale Ragan, Louis Salin and Paul Bowden.

    The organizers have just made a call for speakers.

    If you have an interesting technology that you would like to talk about during this 3-day event, you should submit a talk.

    Monospace is on a very aggressive schedule. The good news is that the entire Mono team will be participating in the event.

    Once the dates are set in stone, we will open registration. Currently we are thinking of hosting an event for some 200 attendees.

    Posted on 29 Mar 2011


    Save your Cleverness

    by Miguel de Icaza

    Today, while discussing how @hipsterhacker reminds us some of our friends, Nat pointed me to this interview where Maciej has this beautiful nugget of wisdom:

    Q: The Pinboard about page says: "There is absolutely nothing interesting about the Pinboard architecture or implementation; I consider that a feature!"

    Can you explain why you think that's a feature?

    I believe that relying on very basic and well-understood technologies at the architectural level forces you to save all your cleverness and new ideas for the actual app, where it can make a difference to users.

    I think many developers (myself included) are easily seduced by new technology and are willing to burn a lot of time rigging it together just for the joy of tinkering. So nowadays we see a lot of fairly uninteresting web apps with very technically sweet implementations.

    Too many people over-engineer their software to the point that you can no longer see what the software was supposed to do. Once people find a religion in one of the modern development fads, they tend to jump with both feet, and we end up with uninspiring user-facing software, but internally amazing.

    This disease is widespread. From everyone trying to turn their program into a platform (current fad: dependency injection), to trying to force programming models, to compulsively writing unit tests while ignoring the basic principles that unit tests can not be used to prove the absence of bugs (update: this is my favorite book on the subject; Namedrop alert: Bertrand Meyer introduced me to it).

    There is only one reason to throw away your life writing useless code and that is to train yourself. If you are writing this in a Karate Kid wax-on, wax-off kind of way, go ahead.

    But if you are building a product, you end up spending all of your time designing your architecture, and very little time in delivering a great experience.

    Premature architecture design is like premature optimization: you will be wrong about the things that actually mattered.

    Take the shortcut. Build the product. And if later, it turns out you made a design mistake, refactor the code. But at least you will have a product that your users love.

    Posted on 29 Mar 2011


    Hardware Accelerated Video Playback in Moonlight

    by Miguel de Icaza

    David Reveman has just completed a series of optimizations in the Moonlight engine that allows Moonlight to take advantage of your GPU for the data intensive video rendering operations. This is in addition to the standard GPU hardware acceleration that we debuted a few weeks ago.

    This is what the video rendering loop looks like in Moonlight:

    Every one of those steps is an expensive process as it has to crunch to a lot of data. For example, a 720p video which has a frame size of 1280x720, this turns out to be 921,600 pixels. This frame while stored in RGB format at 8 bits per channel takes 2,764,800 bytes of memory. If you are decoding video at 30 frames per second, you need to at least move from the encoded input to the video 82 megabytes per second. Things are worse because the data is transformed on every step in that pipeline. This is what each step does:

    The video decoding is the step that decompresses your video frames. This is done one frame at a time, the input might be small, but the output will be the size of the original video.

    The decoding process generates images in YUV format. This format is used to store images and videos but and with previous versions of Moonlight, we had to convert this YUV data into an in-memory bitmap encoded in RGB format.

    The final step is to transfer this image to the graphics card. This typically involves copying the data from the system memory to the graphics card, and in Unix this goes through the user process to the X server process, which eventually moves the data to the graphics card.

    New Hardware Accelerated Framework

    The new hardware acceleration framework now skips plenty of these steps and lets the GPU on the system take over, this is what the new pipeline looks like:

    The uncompressed image in YUV format is sent directly to the GPU. Since OpenGL does not really know about YUV images, we use a custom pixel shader that runs on the graphics card to do the conversion for us and we also let the GPU take care of scaling the image.

    The resulting buffer is composited with the rest of the scene, using the new rendering framework introduced in Moonlight 4.

    Although native video playback solutions have been doing similar things for a while on Linux, we had to integrate this into the larger retained graphics system that is Moonlight. We might be late to the party, but it is now a hardware accelerated and smooth party.

    And what does this looks like? It looks like heaven.

    We were watching 1080p videos, running at full screen in David's office and it is absolutely perfect.

    Getting the Code

    The code is available now on Github and will be available in a few hours as a pre-packaged binary from our nightly builds.

    Posted on 23 Mar 2011


    Kid's Games on the iPad

    by Miguel de Icaza

    My eight month old daugther loves her iPad.

    We have gotten a bunch of baby games, kids games and visualizations for her.

    But many of these apps have one fundamental issue: the author adds one or more buttons with useless stuff like "Provide Feedback", "Info", "Visit Web Site", "Check my Other Apps" and other assorted buttons on the screen:

    Now, perhaps the apps did great when used by a professional QA team in Daytona that reported back "yes, every animal in the app makes the proper sound, and the cows scroll as they are intended to".

    In this case, the "Main" button, will bring up a convenient page with options to send feedback to the author, to visit his web site and check out his other apps.

    This means that my daugther can not really enjoy her games without supervision, since every few seconds, she will end up visiting a web site in Safari.

    Joseph has a similar problem, he has equipped both of his kids with iPads, and they routinely report "the iPad broke", every time one of their games ends up in some lame web site for the developer.

    Developers for kid games should use slider switches if they really want to impose their hooks into their customers.

    Some Games

    On twitter Paul Hudson suggested a couple of games for 1-year olds: Uzu (my daughter also loves this one), BeBot and SoundTouch.

    I have found that she likes GarageBand a lot (we just have to be around to make sure we can reset the screen when she changes instruments).

    Posted on 23 Mar 2011


    GDC 2011

    by Miguel de Icaza

    Three years ago, we were almost laughed out of the Game Developer Conference Show floor.

    C# as the heir to C++ back then was mostly an academic discussion. And there were only a few anecdotal examples of developers using C# for fast and safe scripting in games such as Second Life and Unity.

    Three years ago, C# as a scripting language for games had shared the reputation that Javascript had before the Ajax and Web 2.0 revolutions. It was a bad word. Anything short of C++ and assembly language was not up to the taste of most game developers. Ironically, developers were willing to take the hit of an interpreted languages to drive their games.

    It was perhaps Unity Technologies that started to change this when they adopted Mono as their scripting engine, giving their developers a choice of C#, strongly typed Javascript and Boo as programming languages to author their game's logic, effects and behaviors. They got the benefits of high-level languages, with the added performance of being compiled:

    A New Generation of Game Developers

    In the past years, a new generation of game developers have entered the stage. These are developers that have cut their teeth with Unity, XNA and frameworks like PyGame.

    They value malleability, rapid iteration and safe environments without crashing over raw performance. They have grown used to profiling their software and tuning the hot-spots instead of depending on hunches that lead to premature optimizing.

    This year things were very different at our booth. Lots of happy Unity users came by to talk about MonoDevelop, about the new soft debugger, and about the joy of using C# to build applications with Unity. Lots of people are working on big and small game titles using Mono.

    MonoTouch and MonoDroid also helped us gain visibility in this space. Lots of existing users, and users-to-be came to discuss Mono's state.

    But Mono has now spread its wings from being a pure extension system for C++-based systems (like Unity or the Sims3), to be used as the main language for building game engines and game frameworks.

    There is the 2D MonoGame (an open source effort previously known as XNAtouch) which supports iPhone, Android (and they are working on Windows and Mac backends).

    At the show, both DeltaEngine and Silicon Studio were showing pure C#-based 3D game engines powered by Mono. There were as well a number of stealth-mode projects and startups using Mono either as their scripting engine or the main runtime.

    Walking around the GDC show-floor, you could see Mono running in many booths thanks to Unity's overwhelming popularity.

    Perhaps my favorite Unity game at the show was Rochard, an upcoming PS3 game with interesting puzzles and the level of polish that you expect from a game like Ratchet and Clank (videos, screenshots).

    Helping Game Developers

    In the past couple of years we have made some changes to Mono that help developers use Mono as either a scripting system for an existing C or C++ code base, or for those using Mono as their main runtime.

    We still deliver all the bonus features that come from using C# and the CLI, like lambda functions, functional style-programming, garbage collection, type safety, iterators, generics and improve upon the basics to include:

    • Mobile profile: a minimal profile of class libraries that is better suited for mobile, embedded and console uses.
    • LLVM-based code optimizer: in addition to our standard code generator designed for JIT compilation, we now offer developers a choice to use the LLVM optimizing compiler to generate code. Modulo a handful of issues, the code generated is as good as the one you would get by doing low-level programming with C++.
    • SIMD intrinsics: we treat the various Vector data types in the Mono.Simd namespace as first-class types recognized by the JIT and mapped directly to hardware supported SIMD operations:
      		// This code:
      		using Mono.Simd;
      		
      		Vector4f Add (Vector4f one, Vector4f two)
      		{
      			return one + two;
      		}
      
      		// Is inlined by our LLVM code generator when invoked
      		// with the two statics first and second:
      		mov    first,%eax
      		movups (%eax),%xmm0
      		mov    second,%eax
      		movups (%eax),%xmm1
      		addps  %xmm1,%xmm0
      		
    • Unsafe execution: some of our users wanted to continue using Mono and C# for their code for compute intensive operations. We now offer an unsafe option that will remove all arrays bounds check from the code. This, needless to say, is incredibly unsafe as it would open the doors to the sort of bugs that are common in C++. But if you are dying to squeeze the last bit of performance and treat C# as a nicer C++ and are ready to make a commitment to debug memory-corruption bugs, we got you covered.
    • Runtime Continuations: to create lightweight co-routines that are not bound to threads and allow developers to suspend execution at any point without having to change their code, or require new compilers. Silicon Studio's Homei system uses it.

    Additionally, many developers are doing a little bit of embrace-and-extending the Mono runtime in creative ways to extend the CLI in new ways.

    We want for example to introduce both a [ForceInline] and a [UnsafeCode] attributes that can be applied to methods to hint the code generation engine to always inline a method, and to remove arrays-bounds-checking on a per-method basis.

    Hot Topics

    A hot topic at the GDC was when we would bring the new C# 5 "await" feature to Mono.

    C#'s await is a perfect solution to many of the problems that game developers face. Although there are solutions like Unity's co-routines, Mono Continuations/microthreads and Michael Hutchinson's open sourced micro-threading framework these features require a particular set of programming practices and pattern or support in the VM to do this.

    C# Await is beautiful in that it integrates directly into the language and allows developers to focus on the algorithm and not in the administrivia of suspending execution and the boilerplate involved.

    Which leads me to F#. The C# await functionality is based on F#'s Asynchronous Workflows which is available to everyone (thanks to Microsoft open sourcing the F# compiler and runtime).

    What is fascinating is what some people are doing with F# in games: they can use F# to express the game AI in more succinct terms than any other scripting language can do. Not being a game designer, I do not quite understand the domain space, but apparently F# is just what the doctor ordered for complicated AI behaviors.

    This coupled with async execution is a game engine developer's dream. But F# is not for everyone, there is a learning curve for getting to express problems in F# that is not suitable for game developers that have simple needs for their in-game logic.

    WPF: A Recurring Topic

    Many tool vendors (animation, pipeline, version control) have used WPF for their software or are planning on using it for new projects. These vendors have historically only supported Windows and are now looking at adding either Mac or Linux. This became almost a FAQ at the Mono booth: when are you going to ship WPF on Mac/Linux.

    We have no plans on building WPF. We just do not have the man power to build an implementation in any reasonable time-frame.

    Today, we offer a few suggestions to developers. Feel free to pick and choose:

    • Use Gtk# if you want to share the same code across all three platforms.
    • Split your UI code from the non-UI code and build a UI per system. On Windows, use WPF, on Mac use MonoMac, on Linux Gtk#. Or use gtk# on Mac and Linux.
    • For tools that are mostly OpenGL/DirectX based, use Windows.Forms, keeping in mind that some bug fixing or work around on their part might be needed as our Windows.Forms is not actively developed.

    If you can afford building two or three UIs

    Those are the toolkits you can use today to get your .NET-based tools working on multiple platforms. There are a number of longer-term options in the horizon that could be useful, but would require a concerted effort by the community to complete:

      Monomac.Winforms: assist the effort to have a Winforms look-alike API that happens to be based entirely on MonoMac and provides a native experience at the expense of dropping compatibility with some Winforms features.

      Create an SWT-like toolkit, like Eclipse did for Java, but this time for .NET. Mapping UI components to Cocoa, Gtk+ or WPF depending on the platform.

      Use Silverlight on Windows. And then use a modified version of Moonlight on Linux (and assist porting Moonlight to Mac) to get enough support to integrate with the native OS (menus, file dialogs, file system access) and to access and embed OpenGL in their applications.

      WPF implementation: not impossible, but this will require someone to fund some 15-20 developers to implement this enormous stack and some 2-3 years of work.

    Posted on 07 Mar 2011


    Saturday Mono Update

    by Miguel de Icaza

    Following a long established tradition of doing a quick Mono update after we do a major release, we released Mono 2.10.1 to the world.

    There are four big features in this release that we backported from our master branch in addition to some 25 fresh bug fixes:

    • Support for running OrchardCMS on Linux. We also wrote a PostgreSQL backend for it. You can find the patches in this discussion.
    • The Parallel Framework's Default task scheduler has been switched to use our new and improved internal threadpool that we introduced with Mono 2.10. Previously it used its own (and amazing) scheduler, but did not share the same properties as .NET as there were by default two active threadpools, now there is only one.
    • Plenty of updates to the WCF stack.
    • OSX is a fast growing OS for Mono, this release brings performance counters for OSX as well as adding debugging symbols to all of our libraries if you install the CSDK package from our download page.

    There were also three important regressions from Mono 2.8 that have been fixed. We encourage everyone to use Mono 2.10.1.

    Posted on 26 Feb 2011


    MVP Summit and GDC 2011

    by Miguel de Icaza

    Next week I will be in Bellevue, WA from Sunday to Wednesday to participate in the 2011 Microsoft MVP Summit.

    From Wednesday to Friday I will be San Francisco attending the Game Developer's Conference.

    Ping me if you want to get together.

    Posted on 25 Feb 2011


    C# Compiler as a Service Update

    by Miguel de Icaza

    Our C# compiler-as-a-service library can now process any C# construct, it is no longer limited to expressions and statements.

    This means, that you can now enter entire class definitions in the command line:

    csharp> class Demo {
          >     public int Add (int a, int b)
          >     {
          >          return a + b;
          >     }
          > }
    csharp> new Demo ().Add (1, 3);
    4
    csharp>
    

    This work was done by the amazing Marek and is now available on Mono's master branch in github.

    This functionality can also be used for scripts, in particular in Unix, you can now create C# "source executable" files, like this:

    bash$ cat demo.cs
    #!/usr/bin/csharp
    class Demo {
    	public dynamic Add (dynamic a, dynamic b)
    	{
    		return a + b;
    	}
    }
    Console.WriteLine (new Demo ().Add ("this is", " cute"));
    bash$ chmod +x demo.cs
    bash$ ./demo.cs
    this is cute
    bash$
    

    Multiple Compiler Instances

    In addition, we turned the static API Evalutor.Eval (string expression), into an instance API. The instance API allows developers that are embedding the C# compiler-as-a-service in their application to have different contexts.

    This required the entire compiler to be updated from being a giant set of static classes that could safely use global variables and state into a state that was properly encapsulated.

    The API is now richer, we provide a way to configure the compiler settings using a settings class. This can be populated either manually, or by using the build-in command-line parser for compiler options. The following sample shows how this could be used:

    using Mono.CSharp;
    using System;
    
    class Runner {
    	static int Main (string [] args)
    	{
    		var r = new Report (new ConsoleReportPrinter ());
    		var cmd = new CommandLineParser (r);
    		
    		var settings = cmd.ParseArguments (args);
    		if (settings == null || r.Errors > 0)
    			Environment.Exit (1);
    
    		var evaluator = new Evaluator (settings, r);
    
    		evaluator.Run ("class Demo { public static int Add (int a, int b) { return a+b; }}");
    		evaluator.Run ("print (Demo.Add (1,2));");
    		return 0;
    	}
    }

    Testers Wanted

    This revamped compiler will be part of Mono 2.12, but we would love to get users to test the new functionality and to help us identify any problems early on, before we even release this code.

    We do provide a convenient sln file that you can use the compiler as a service, and it works both in Visual Studio/.NET and Mono.

    Silverlight

    We have not tested this with Silverlight, but in theory, it should now work fine with it. We would love to see someone build an interactive shell like the one we did with Gtk# but hosted on the browser:

    Posted on 24 Feb 2011


    Well, Actually

    by Miguel de Icaza

    Why you are not getting laid

    As software developers, we develop habits that allow us to build products that work and do not fail under stress. Every software developer knows what an "off-by-one" error is, and like the Karate Kid, we train extensively so we can avoid those traps. We learn how to avoid these and other similar software problems and we sharpen our skills to find logic errors.

    As we mature as developers, finding logic errors and incomplete solutions becomes our way of life. It defines us.

    But our engineering strength is also our social weakness. Countless times as engineers you will find yourself interrupting someone telling a story, an anecdote or a joke to correct a false assumption, provide an extra fact that the narrator overlooked, give a bigger perspective on the problem or point out that the joke premise is actually flawed.

    You can identify this behavior because the person interrupting usually starts with the phrase "Well, actually...".

    As a kid, I thought this was my strength. I knew a little bit more than my sister. So whenever she would say something, I would quickly interject something like "Well, actually, the origin of the word Shih Tzu means Lion Dog and has nothing to do with the dog's digestive patterns".

    Yes, I was really fun to hang out with.

    As a child, I wondered why my sister could make friends and keep them so easily, while I could not. It would take me years to discover this. And now, as a public service I am sharing with you, my fellow geek friends, what I learned.

    Whoever pulls a "well, actually" almost always shifts the conversation to himself. And now we are no longer following along with your friend's joke, we get to learn how much more you know about the limitations of the Sun Protection Factor scale in sunblock products.

    You are doing it wrong

    As a seasoned engineer, you need to learn control your impulses. Having dealt with my own well, actually problem, I can attest that adjusting this social behavior might even get you laid.

    Jokes are funny because they surprise us. But a joke is not funny if you have to present a 30-page document setting up every little detail. An ill-placed "Well, actually" will get your colleagues to abandon in an instant the water cooler conversation and escape to the peaceful solitude of their workstations.

    Range of Action

    You can find full-time well-actually folks both in person or monitoring your every quip on twitter.

    Even the most rudimentary of the well-actuallistas is able to spoil even the best Ricky Gervais material.

    Twitter being a medium limited to 140 character is like catnip for patronizing douchebags. They can not resist the urge to point out logic flaws in your minimalist observation.

    This is particularly a problem for those of us that love to tweet things that amuse us or that we find amusing. Fear of a barrage of factoids from an omitted detail can be paralyzing.

    Dealing with the Well Actually crowd

    The well-actually crowd wants as much as everyone else to participate in the conversation. They want to be loved.

    But instead of rolling with the punches and participating in a brainstorm of ideas and exploding humor, they contribute interruptions, facts and details that merely produce stop energy on an ongoing discussion. They turn the center of attention towards them.

    The well-actually crowd means well. They want to be loved, they just have not realized that they are undermining their own quest for friends.

    If you are a sagacious well-actuallista you need to understand that you are not outwitting anyone. It takes more intelligence to build a joke, tell a funny anecdote or narrate a gripping story than it takes to nitpick.

    You are not impressing anyone with your hard earned encyclopedic knowledge that you obtained by spending hours on the Internet. You are just making everyone around you realize that you are as much fun to have lunch with as a flaming turd in a bag.

    Those of us in the receiving end of a well-actually, need to start an awareness campaign. Perhaps using Twibbons to cure this disease. Unlike many diseases, this awareness program will lead to a cure.

    While being technically correct is the best kind of correct, what you don't realize is that while you enjoy the triumph of your well-actually, everyone around you is secretly hoping that you choke on a bucket of cocks.

    Practical Solutions

    In the office, we have lots of talented engineers and at one point or another one of us will interject a well placed "well, actually" at an innapropriate moment.

    These days we are fully aware of this social disease and we strive to avoid it. When someone interrupts a discussion with a well-actually you can hear someone say:

    "Did you just well-actually me?"

    Which is basically a way of saying "That has nothing to do with the topic, but thanks for derailing us" without having to go into the explanation and getting lost on the tangent.

    This is a good first step. In our case, we have printed copies of the Ok, It's Time To Explain Some Stuff Patronizing Douchebag Trollcat in two sizes: a full-size well-actually cat, and a small one that is given as an award to the douchiest interruption:

    Okay it’s time to explain some stuff patronizing douchebag trollcat

    On the Internet, you can try to point the patronizing douchebag to this blog post. Or if you have no patience, just click "block" on twitter.

    Posted on 17 Feb 2011


    Moonlight 4 Preview 1 is out

    by Miguel de Icaza

    Yesterday we released Moonlight 4, Preview 1.

    This release of Moonlight completes the Moonlight 3 feature set and includes many features from Silverlight 4. Check out our release notes for the list of things that are currently missing from our Silverlight 4 support.

    Rendering

    Moonlight rendering system uses a painter's algorithm coupled with culling to reduce the amount of rasterization that needs to take place.

    For example, if we had these objects all rendered at the same location, on top of each other:

    A simple implementation would render the triangle, then the rectangle and then the circle, and we would get this result:

    Moonlight optimizes this rendering by computing the bounding boxes of each element and determining which objects are completely obscured. In this case, the triangle never needs to be rendered as it is fully covered.

    Since we have the entire graph scene in memory, we can push all the rendering to the X server without ever having to pull data back from it.

    Each visible element on Silverlight derives from the class UIElement and Moonlight tracks the bounding box for all of each individual element. As you compose elements, the aggregate bounding box is computed. For example, a canvas that hosts these three UIElements would have a bounding box that contains all three of them:

    New Rendering Features

    With Silverlight 3, Microsoft introduced two large important changes to the framework: 3D transformations on objects and support for pixel shaders. Both of these are applied to every visual element in Silverlight (this is implemented in the class UIElement).

    In addition to the properties inherited from Silverlight 2, UIElements now have two new properties: Projection and Effect.

    The Projection property is a 3D matrix transformation (the 3D variation of the 2D affine transform that is available in most 2D graphics APIs). Silverlight exposes both the raw 3D matrix or a set of convenient properties that are easier to use and require no understanding of the interactions of the twelve elements of the 3D matrix (see this page for an explanation).

    Just like 2D affine APIs typically expose convenience methods to scale, rotate, skew and translate, the PlaneProjection properties allow developers to focus on those components.

    You can see a sample here.

    Effects follow a similar pattern. The blur and drop-shadow effects are given convenient names and accessors (BlurEffect and DropShadowEffect but Silverlight exposes an API to create programmable pixel shaders that go beyond these two simple cases.

    The ShaderEffect allows users to load pixel shaders written using the High Level Shader Language (HLSL). Here is a sample app showing pixel shaders in action.

    3D transformations and pixel shaders require that the contents of a UIElement are rendered to an intermediate output surface. The 3D transformation and shader effect is applied when this surface is composited onto the parent output surface. This compositing operation can be accelerated using graphics hardware.

    From our previous example, the three elements would be rendered into a 2D surface, and the actual transformation can be done in the hardware:

    Finally, the third new rendering upgrade was the introduction of a bitmap cache that can be applied to a UIElement. When a UIElement is flagged for being bitmap cached, the same kind of intermediate surface rendering and hardware accelerated compositing is performed as for elements with 3D transformations or pixel shaders. The contents of bitmap cache elements are also rendered once and kept on a bitmap that is later composited. This can improve performance vastly for complex controls with many interlocking pieces: instead of computing and re-rendering the entire contents every time, the bitmap cache is used.

    This of course has some visible effect. If you instruct Silverlight to use a bitmap cache, and then you zoom-in the contents, you will see the result get pixelated. You can learn more about this on the BitmapCache documentation.

    Moonlight's New Rendering Pipeline and GPU Acceleration

    Both effects and projections can be implemented purely in software. Effects can be implemented by providing a small interpreter for HLSL code and projections by performing the rendering in software and compositing the results.

    David Reveman, the hacker behind Compiz joined the Moonlight team last year to implement the new rendering primitives, but also to figure out how we could hardware accelerate Moonlight. The results of his work are available on yesterday's release of Moonlight 4.

    The rendering pipeline was modified. Now, whenever a UIElement has either a Projection, an Effect or has the the flag BitmapCache set the entire UIElement and its children are rendered into a surface that is then off-loaded for the GPU to render.

    When OpenGL is available on the system, the composition of UIElements is entirely done by the GPU.

    Moonlight will use the GPU to accelerate for compositing, perspective transformations and pixel shaders if the hardware is present without having to turn this on. Silverlight by default requires developers to opt into hardware acceleration and has its own set of features that it will hardware accelerate.

    In general, Moonlight uses the GPU more than Silverlight does, except in the case of DeepZoom, where we still do not accelerate this code path.

    Gallium3D

    Our new rendering pipeline is built using OpenGL and Gallium3D.

    Gallium is an engine that is typically used to implement OpenGL. In our case, we use the Gallium3D API when we need to fallback to software rendering 3D transforms on Linux. Otherwise we go through the OpenGL pipeline:

    If we were to only support Linux/X11, Gallium3D would have been a better choice for us. But we want to allow the Moonlight runtime to be ported to other windowing systems (Like Wayland on Linux) and other operating systems.

    Room for Growth

    Now that we have this 3D accelerated platform in place, it is easy to fine-tune specific UIElements to be hardware accelerated.

    This first release did only the basics, but we can now trivially use hardware decoders for video and have that directly composited in hardware with the rest of a scene, or we can offload image transformations entirely to the hardware on a type-by-type basis and of course, DeepZoom.

    Object Lifecycle

    Objects in moonlight live in two spaces, low-level components live in C++ and are surfaced to C#. Typically this means that we have code that looks like this in C++:

    	//
    	class MyElement : public UIElement {
    	  protected:
    		MyElement ();
    	  private:
    	        // fields and methods for MyElement go here
    	}
    	

    In C# we create a mirror, like this:

    
    	public class DependencyObject {
    		// Points to the C++ instance.
    		IntPtr _native;
    	}
    	

    When a user wrote in C# "new MyElement", we would P/Invoke into C++ code that does "new MyElement", get a pointer back to this instance and store it in the "_native" field.

    In the other direction, if we created a C++ object and then we had to "surface" it to the managed world, we would initialize the object based on our C++ "this" pointer.

    We could create instances of MyElement in C++, and when this instance needs to be surfaces to the managed world, we would create an instance of the managed object, and store the pointer to the underlying C++ object in the _native pointer.

    In the Moonlight 2.0 days we used to have C++ objects that would only create managed objects on demand. At the time, we did this to avoid creating thousands of managed objects when loading a XAML file when only a handful of those would be controlled by user code.

    The Moonlight runtime, running in pure C++ code, surfaced objects to the C# world and we tracked the object life cycle with good old reference counts. But with Silverlight 2, we started to see problems with the design as it was possible to end up with cycles. These cycles did not happen only in the C++ side or the C# side, but they spanned the boundaries. This made it very hard to debug and it made it hard to keep Moonlight from not leaking memory.

    Templates for example could create these cycles.

    With Moonlight 4, we have landed a new life cycle management system that works like this:

    • Every C++ object that we create always points to a managed counterpart. Gone are the days where the managed peer was created only when needed.
    • Every C++ instance field that points to a DependencyObject subclass goes through this cool C++ templated class that notifies managed when the reference changes.
    • There are no ref/unref pairs surrounding stores to instance fields in c++ anymore.

    Now our base class in C++ has this:

    	// Our entire hierarchy exposed to managed code
    	// derives from EventObject
    	class EventObject {
            	GCHandle managed_handle;
    	}
    	

    Now all the c++ objects exist and are kept alive solely by their managed peers (there are some rare exceptions for things like async calls) and the whole graph is traversable by Mono's GC because all stores to c++ instance fields result in a managed ref between the respective peers.

    With the new code, we no longer live in a world of refs/unrefs (again, except for some rare cases) and whenever we assign to a C++ field that points to a managed object we notify the managed peer of the change.

    We were not able to ship Moonlight 4 with our new garbage collection system (Sgen) as we ran into a couple of hard to track down bugs at the last minute, but we are going to switch it on again soon.

    Future Work

    There is still room for improvement, and now that we know how to cook this kind of code, the goal is to use Mono's new GC in Moonlight more extensively.

    We want to teach SGen to scan the C++ heap and track references to managed objects, dropping another potential source of problems and reducing the code needed. We would also love to go back to only creating managed objects on demand.

    Platform Abstraction Layer

    Moonlight was originally designed as a Linux-only, X11-only plugin for rendering Silverlight content. Developers constantly ask us whether they could run Moonlight on platform XX that is either not Linux or does not use X11.

    The amount of work to port Moonlight 2 to those kinds of scenarios was so overwhelming that most people abandoned the efforts relatively quickly.

    With Moonlight 4, we have introduced a new platform abstraction layer that will make it simpler for developers to port the Moonlight engine to other platforms.

    Whether you want hardware accelerated user experiences in your video game or you want to put Moonlight on a the FreezeMaster 10000 Domestic Fridge with an Internet Connection and SmoothStreaming running on a barebones ARM CPU, you can now enjoy this in the comfort of your home.

    We have done some minimal tests to exercise the API and can run the Moonlight engine on both MacOS and Android. You can look at exclusive footage of the animation test suite running on OSX and on Android.

    If you are like me, not much of a click-on-the-video kind of person, and would rather get a screenshot, you can bask on the smooth colors of this screenshot on Android or in this delightful test on MacOS.

    We are currently not planning on completing that work ourselves, so this is a fabulous opportunity for a caffeine-driven hacker to complete these ports.

    Some possibilities, from the top of my head include being able to use Silverlight to design parts of your user experience for apps on the Mac AppStore (think MoonlightView in your MonoMac apps), or for your Android app.

    Using Expression beats coding cute animations and futuristic UIs by hand. That is why every major video game embeds ScaleForm, the embeddable Flash runtime for handling the UI.

    New XAML Parser

    Our original XAML parser was written in C++, this worked fine for Moonlight 1, but with Moonlight 2 it started to become obvious that we were spending too much time calling back from C++ to C# to create managed objects.

    This was acceptable up to version 2, but it no longer scaled with Moonlight 3. Too much time was spent going back and forth between the C++ world and the C# world. Those following the development of Moonlight would have noticed that every couple of weeks a new extra parameter to the xaml_load function was added to deal with yet another callback.

    The new XAML parser is entirely written in C#, is faster and more reliable.

    And lots more

    Check out our release notes for Moonlight 4 Preview 1.

    Posted on 16 Feb 2011


    Three Months and Ten Days

    by Miguel de Icaza

    That is the time between our last major Mono release and the new hotness: Mono 2.10.

    New in this release:

    Check out our Mono 2.10 release notes for all the details.

    Posted on 16 Feb 2011


    Nokia Simplifies the Mobile Landscape

    by Miguel de Icaza

    On Friday, Nokia announced that they were adopting WP7 as their operating system. Although some open source advocates might see this as a set-back for Linux, Android is already the best-selling Linux OS of all times. Meanwhile, as a Ben Zander student, all I see is possibility and the the world of opportunities that this opens to developers.

    Although they will continue shipping Symbian for a while, they are effectively sun-setting it. Just like you can still purchase Itanium systems from HP, nobody really develops for those anymore.

    Nokia had this chart to offer on Friday:

    This is fascinating turn of events for C# developers as Nokia will make WP7 more relevant in the marketplace, making C# the lingua-franca of all major mobile operating systems. This astute chart explains why I am basking in joy:

    C# and the ECMA CLI everywhere!

    Now, certainly lots of developer houses can afford to build their software once for each platform. This is fine if your VC has a mandate to "spend that cash quickly" or if you have a surplus of interns at your disposal.

    Now, if trollcats have taught us one thing is that users like the UI of their apps to be as native as possible. That is, mind-blowingly beautiful on iOS and try to match the carpet on the others.

    Other snake oil vendors will tell you that you can use the same code across all platforms and still deliver an emotional experience to your users. I agree, you can deliver the same emotion of disgust when using a cross platform toolkit.

    With Mono we have taken a different approach, based on our own failures from the past. We give developers access to all of the native APIs in the platform to create the best possible user experience, and exploit every single last bit of functionality available on the platform.

    We advise our users to split their user interface code from the engine, or their business logic. Developers should create a native experience for their mobile apps: one per platform. For example, consider Angry Birds on iOS and Angry Birds on Blackberry. Each version adapts to provide the best user experience available on the platform.

    This is a grand time to be a mobile developer. This chart illustrates the elegant balance of native experience and code sharing available to C# developers:

    Update: As much as I have enjoyed responding to the comments on this blog post, the comments are now closed. I will make an exception with anyone that wants to follow up on an existing discussion. For everyone else, if you have something to share, write it on your blog.

    Posted on 14 Feb 2011


    On Reflector

    by Miguel de Icaza

    Red Gate announced that their Reflector tool would soon become a paid-for app. A few years ago they bought the rights to Reflector from Lutz Roeder and started maintaining two editions of the product: a free version and a commercial version with extra features. Many people in the .NET community feel unhappy about that decision.

    Whether Red Gate's decision is good or not for them is up to other blogs to discuss. I am grateful that over the years Reflector ran with Mono's Windows.Forms implementation and that the maintainers were careful to keep the code running with Mono.

    Of course, I would always like more an open source equivalent to a proprietary tool, and while Reflector was a free download, it was never open source.

    Some believe that in response to the announcement we created a competitor to Reflector. We did not.

    We have had a decompiler in Mono for a few years now. First, we had a decompiler contributed to MonoDevelop by Andrea and we later replace it with the one that was developed by JB Evain:

    The current decompiler in MonoDevelop actually originated not as a decompiler, but as a flow-analysis tool in 2005. It was part of db4Object's Native Queries. Native Queries were a way of getting some of the benefits of LINQ without any compiler support. It worked by reassembling the AST at runtime from a stream of IL instructions. For example, you could use the following C# code to query a database:

    IList  pilots = db.Query  (delegate(Pilot pilot) {
    	return pilot.Points == 100;
    });
    	

    The Query method would decompile the code in the delegate and reconstruct the abstract syntax tree and determine that the expression to query was pilot.Points == 100.

    JB Eventually expanded hi IL Manipulation library Cecil to contain a decompiler built based on the ideas of flow analysis. JB described this back in December of 2008 as part of a Hack Week followed by a hack-a-thon:

    During the last Hack-Week, I started refactoring Cecil.FlowAnalysis, and since then, I’ve been working pretty seldom on it. It was last month that I decided to give it a kick, and even took a week of vacations to organize a CodeCamp with friends to give it a boost and have fun altogether

    The decompiler is just one of the various tools built with Cecil and has been a standard component of MonoDevelop for a long time (it is part of MonoDevelop 2.4).

    Although yesterday in response to the announcement, a WPF UI was created for the Cecil.Decompiler.dll, this is not the only effort. There is also an older Cecil Studio that uses Windows.Forms that was created a few years ago and of course, our own MonoDevelop assembly browser.

    We welcome contributions to the decompiler for people interested in improving the core, regardless of their preference for a UI built on top of it:

    That being said, JB has been working on a new system that goes beyond decompilation and will be demoed at QCon next month. Stay tuned for his demo.

    Posted on 04 Feb 2011


    Adult Principles, from JPBarlow

    by Miguel de Icaza

    A few days ago, John Perry Barlow twetted a series of Adult Principles, and I enjoyed reading them. When he was asked where they came from, he said:

    They're from a list I assembled for myself on the eve of my 30th birthday. Many years ago.

    This is the collected set from his twitter feed:

    Adult Principle #1: Be patient. No matter what.

    Adult Principle #2: Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn't say to him.

    Adult Principle #3: Never assume the motives of others are, to them, less noble than yours are to you.

    Adult Principle #4 Expand your sense of the possible.

    Adult Principle #5 Don’t trouble yourself with matters you truly cannot change.

    Adult Principle #6 Don't ask more of others than you can deliver yourself.

    Adult Principle #7 Tolerate ambiguity.

    Adult Principle #8 Laugh at yourself frequently.

    Adult Principle #9 Concern yourself with what is right rather than who is right.

    Adult Principle #10 Try not to forget that, no matter how certain, you might be wrong.

    Adult Principle #11 Give up blood sports.

    Adult Principle #12 Remember that your life belongs to others as well. Don't risk it frivolously.

    Adult Principles #13 Never lie to anyone for any reason. (Lies of omission are sometimes exempt.)

    Adult Principle #14 Learn the needs of those around you and respect them.

    Adult Principle #15 Avoid the pursuit of happiness. Seek to define your mission and pursue that.

    Adult Principle #16 Reduce your use of the first personal pronoun.

    Adult Principle #17 Praise at least as often as you disparage.

    Adult Principle #18 Admit your errors freely and quickly.

    Adult Principle #19 Become less suspicious of joy.

    Adult Principle #20 Understand humility.

    Adult Principle #21 Remember that love forgives everything.

    Adult Principle #22. Foster dignity.

    Adult Principle #23. Live memorably.

    Adult Principle #24. Love yourself.

    Adult Principle #25. Endure.

    A small detour, he also tweeted

    If you want a new, improved mate, try treating the one you have better.

    Posted on 21 Jan 2011


    Help us test Mono 2.10

    by Miguel de Icaza

    Andrew has just released the packages for our first preview of Mono 2.10, we published sources and packages for SLES, OpenSUSE, RHEL, Windows and MacOS X here:

    http://mono.ximian.com/monobuild/preview/download-preview

    From our draft release notes, here are some of the highlights in this release:

    As well as containing a pile of bug fixes.

    As I mentioned last year, we are moving to a faster release schedule to get important features out for our users faster. For instance, our SGen garbage collector has been vastly improved and should perform better under load, and our ParallelFX got some real-life testing which helped us improve it significantly.

    SGen Technical Discussion

    Mark has been blogging the technical details about the architecture of the SGen garbage collector, you can read the documents here:

    Posted on 19 Jan 2011


    Your Own Sandbox

    by Miguel de Icaza

    Since the beginning of time, men have sought to find a way of creating a sandbox for untrusted code running on their Mono virtual machine.

    Those of you familiar with Silverlight's security system, commonly referred as CoreCLR Security, have wondered "how can I get me some of dat". Today Sebastien wrote a How-to guide for those of you interested in creating your own secure sandboxes like Moonlight or Unity3D have done.

    From his blog:

    So what was missing was not facts but orientation. It kind of make sense, most people are not doing an open source implementation of Silverlight, we are. However we're providing a lot of cool (yes it is ;-) stuff within - stuff, like coreclr, xaml, the cecil-based linker... that can be reused in other projects. So the missing piece is an how to for people wishing to enable CoreCLR when embeding mono in their own application. It does not bring a lot of new facts but, hopefully, it will order them in a more useful way.

    Posted on 13 Jan 2011


    Mono at CES: More Games

    by Miguel de Icaza

    During today's Nvidia press conference at CES, a the Monodroid-powered DeltaEngine was shown running the SoulCraft Tech Demo:
    CES Video.

    Although today's demo was powered by MonoDroid the engine is a cross-platform .NET game engine, it runs on on Mono-powered systems like Linux, MacOS X, MonoTouch and MonoDroid as well as Microsoft .NET powered systems like the XBox360, Windows Phone 7 and Windows:


    If you have an iPad, you can try the Zombie Party game on the AppStore, it is the first game powered by DeltaEngine. ExDream is the group behind DeltaEngine.

    For information on how the demo was built check out this blog post. The engine will be open sourced this year.

    Posted on 06 Jan 2011


    Mono for Android

    by Miguel de Icaza

    Now that we feel that we have fixed all the embarrassing bugs in Mono for Android, so we have opened up our Mono for Android preview program to anyone that wants to take it out for a spin.

    Mono for Android brings the full Mono VM to Android. We use a library profile that is better suited for mobile devices, so we removed features that are not necessary (like the entire System.Configuration stack, just like Silverlight does).

    In addition to bringing the core ECMA VM to Android, we bound the entire set of Android Dalvik APIs to C# and in the process C#-ified them. This includes using C# properties for metadata (less XML config file messing around), exposing C# events, C# properties, strongly typed generic types where necessary, implicit conversions where needed, using the C# API style, IEnumerable where appropriate (to let you LINQ over your Dalvik, and we turn IIterable into IEnumerables for you).

    On the OpenGL front, we brought the same OpenTK library that is popular among .NET developers on both Windows, Linux and iPhone, so you can share the same OpenGL logic across all platforms.

    Unlike iOS where the JIT is not supported, Mono on Android supports the full JIT, so you can use Reflection.Emit and dynamic code compilation as much as you want.

    This initial release only comes with templates for C#, but other .NET compilers should work, as long as they reference Mono for Android's libraries (as we removed a few methods that make no sense on mobile devices).

    Support for OSX

    Through the lifetime of our preview program, Mono for Android only supported Windows development using Visual Studio. Today we are also releasing support for developing Android applications on MacOS X using MonoDevelop.

    Getting Started

    Please check our Welcome page, it contains installation instructions, links to tutorials, mailing lists, chat rooms and more.

    I strongly advise our users to join our mailing list and to check the previous discussions on the mailing list for some tasty insights.

    You can also browse the API that we expose to C# developers.

    Upcoming Features

    We are working as fast and as hard as we can to complete Mono for Android. This includes Linux support and bringing MonoDevelop to Windows, for users that can not run Visual Studio 2010 Professional.

    Giving us Feedback

    Please provide your feedback on the product directly on our mailing list, as this is what the MonoDroid developers monitor. Bug reports should be filed on Novell's Bugzilla.

    Posted on 04 Jan 2011


    Open Source Contribution Etiquette

    by Miguel de Icaza

    Some developers, when faced with fixing, or adding a feature to an open source project are under the mistaken impression that the first step before any fixing takes place, or before adding a new feature takes place is to make the code "easier for them" to work on.

    "Easier for them" usually is a combination of renaming methods, fields, properties, locals; Refactoring of methods, classes; Gratuitous split of code in different files, or merging of code into a single file; Reorganization by alphabetical order, or functional order, or grouping functions closer to each other, or having helper methods first, or helper methods last. Changing indentation, aligning variables, or parameters or dozen other smaller changes.

    This is not how you contribute to an open source project.

    When you contribute fixes or new features to an open source project you should use the existing coding style, the existing coding patterns and stick by the active maintainer's choice for his code organization.

    The maintainer is in for the long-haul, and has been working on this code for longer than you have. Chances are, he will keep doing this even after you have long moved into your next project.

    Sending a maintainer a patch, or a pull request that consists of your "fix" mixed with a dozen renames, refactoring changes, variable renames, method renames, file splitting, layout changing code is not really a contribution, it is home work.

    The maintainer now has to look at your mess of a patch and extract the actual improvement, wasting precious time that could have gone to something else. This sometimes negates the effort of your "contribution".

    If you really have an urge to refactor the code, first of all, discuss the changes with the maintainer with the rationale for the changes. If the maintainer agrees with the changes, make sure that you keep your refactoring and changes independent from code fixes, it makes reviewing the code a lot simpler.

    The alternative, to keep your fork, is usually a guarantee that your effort will be wasted, and wont help other users. People have tried to do this. It is attempted every year, by hunders of developers who in tbe back of their minds are thinking "I can do better" and "I wont make the same mistakes". After 18 years doing open source I can probably think of a handful of project forks that have survived and flourished. Out of hundreds of such failures. So the odds are not good.

    So respect the original coding style, and if you want to make refactoring changes, discuss this with the maintainer.

    Posted on 31 Dec 2010


    For your OOXML Conspiracy Theories

    by Miguel de Icaza

    The staff at Groklaw has never really tolerated any dissent when it came to OOXML. They spent years advocating against OOXML only to have OOXML emerge not only stronger, but also with an ISO stamp of approval.

    Today they tried to insinuate that my involvement and opinion on OOXML was somehow the result of the 2006 Microsoft/Novell agreement.

    Their conspiracy theory falls apart as our active involvement on OOXML goes back to the year 2005, 11 months before there is any agreement between Microsoft and Novell.

    My interest in the file format interop problem goes back to 1998-1999 when I wrote the Gnumeric spreadsheet and both Michael and his brother started contributing a plugin for reading and writing Excel files.

    My involvement with OOXML started in 2005, when Jack Messman was still Novell's CEO and the company was in the middle of various legal disputes with Microsoft. Not the best environment for collaboration between companies.

    ECMA was starting a new working group to look into standardizing OOXML, and since we were already members of ECMA (as part of our work on C# and CLI) I recommended that we should participate in the effort to come up with solid documentation that we sorely needed for improving OpenOffice's interoperability story. ECMA had been great in particular for the CLI, in large part thanks to Sam Ruby at IBM who pushed for the file format to be specified (the original drafts did not document the actual assembly file format, only the instruction set).

    In 2005, one of our major goals was to make Linux suitable for enterprise desktop deployments, and interoperability with Microsoft protocols and file formats was key to this strategy. We were the major contributors to OpenOffice outside of Sun (and perhaps still are) and what mattered to us was to get a good spec we could use to fix customer issues that prevented us from deploying the Linux desktop to enterprise customers.

    For years, we had been reverse engineering Word and Excel. This was our chance of getting important information on the file formats. Our work in this area today benefits every OpenOffice and Gnumeric users.

    So we attended and participated in the ECMA OOXML meetings starting with the initial meeting on December 15th. I blogged about this publicly on November 2005, and so did Novell which on the same month Novell blogged about our participation on the Open Invention Network (we were founding members) and was actively promoting OpenOffice.. The minutes of this meeting and every other meeting ever since are available to all ECMA members.

    It was our team that pushed to get the entire Formula Spec in OOXML back in 2006 (those 700 pages of formula specs, the ones that actually make spreadsheets work) as well as filing piles of issues as we prototyped the work with Gnumeric and OpenOffice. And all of this happened before any Novell-Microsoft agreement.

    My involvement after setting up the initial participation was superficial, as the actual hackers working on OpenOffice and Gnumeric took over (Jody Goldberg and Michael Meeks). These were important years for Mono, and that is where my energy has been going since about 2002.

    The 2006 agreement with Microsoft did not impact much of my work, despite Mono being something where interop could really be helped.

    The ECMA work on OOXML brought hackers together and allowed our teams to interact as people looking for some shared goals instead of interacting as foes. In my experience face-to-face meetings, like the ECMA working groups, help smooth out human relationships that might have been poisoned by preconceived biases.

    But the interop agreement certainly allowed other collaborations and meetings in other areas with Microsoft, for example, it lead to various components used by Mono to become open source, and to our Moonlight/Silverlight collaboration.

    So two full months into having signed an agreement with Microsoft, I wrote my first pro-OOXML post, largely based on a news report that I felt was misguided. We had been working on this at this point for a year, and clearly people with no actual office experience had already formed an opinion.

    In retrospect, had I known that double standards, hypocrisy and character assassination would become the tool of choice of the anti-OOXML crowd I would not have said a thing.

    The energy that went into stopping OOXML could have been better used in actually completing the formula spec for ODF, which almost four years later is still not part of the ISO spec. In the eyes of the ISO world, it remains an "implementation specific" work. But "advocacy" is a little bit like watching the TV, it is relatively easy. While actually working on improving open source, or open standards is equivalent to going to work. It requires skills, time and longs hours of difficult work (particularly if you are working on the OpenOffice code base).

    As for the March agreement of 2010, it is absolutely brilliant. Microsoft is funding our OpenOffice team to develop open source code that will improve the OOXML import and export capabilities and we help drive the OOXML standard forward based on the experience that we will gain from doing this work.

    If you do not like us doing this work, there is an easy solution for you: do not open or save files in OOXML format with OpenOffice.

    See what I did there Trevor? I found out what bothered you emotionally, decomposed the problem, and BAM! I provided you with a solution. It is called teamwork, Trevor.

    Michael Meeks from our OpenOffice team provides more color as he was the one actively working on this.

    Posted on 21 Dec 2010


    Brazil

    by Miguel de Icaza

    Tomorrow we are flying to Porto Alegre in Brazil to spend two weeks in a nice, warm climate tasting delicious foods and hanging out with good friends.

    If you are a Porto Alegre-based Linux-ista, Mono-ista, Android-ista, MacOS-hacker-ista, .NET-ista, C#-ista, or, iPhonista and would like to get together for coffee, lunch or dinner, drop me an email.

    Posted on 16 Dec 2010


    MonoReports: Report Designer and Reporting Engine

    by Miguel de Icaza

    This is quite cool, Tomasz Kubacki has released a report engine and designer that runs on Mono:

    MonoReports has a nice Gtk# based GUI designer that runs on Linux, Mac and Windows and can generate reports that you can later run GUI-less.

    From Tomasz announcement:

    • Simple layouting - if control in section is growable and will grow due to assigned data, engine will do layouting to make report look properly
    • Page breaking - Monoreports engine will break or keep together report sections whatever is needed
    • Generating and running reports from designer and code.
    • PDF export
    • Reporting engine is not tightly coupled with gtk/cairo stuff, therefore it's reasonably easy to write new export backends (e.g. html, or xls for example).

    He also made a six minute video walkthrough of MonoReports's features.

    Posted on 09 Dec 2010


    Mono: What we are Cooking

    by Miguel de Icaza

    Although everything we do is public in some form or another, folks that are not keeping track of things might be wondering what the Mono team at Novell has been up to.

    Here are some of the projects that we have been working on, and that we expect to release in the next three months, some sooner, some later. You are welcome to join us in testing, all you need is to get comfortable building Mono from git.

    Bundling F#, IronPython, IronRuby and UnityScript: Now that all of these languages are open source, we want more people to use them, and we want to remove any friction that there might be in getting started. So we are doing a push to provide packages on Linux and bundle with our OSX installer all of them.

    The first three languages are from Microsoft, the third one is from Unity, and it is a strongly-typed and class-based incarnation of JavaScript. The lightweight syntax of Javascript, with the components necessary to produce optimal native code.

    Getting F# to build and run on Mono was a challenge on its own. This is not a language that many of us were familiar with, but we are now at a point where things are baked. We should be uploading our modified version of F# to the fsharp organization on GitHub.

    MonoDevelop's Git support: MonoDevelop 2.6 will come with Git support. Originally Lluis prototyped this by calling out to the system Git, but this is not very elegant and also hard to make reliable and work smoothly across Windows, Linux and MacOS. So Lluis used db4object's tool to convert Java source code into C# source code to bring Eclipse's jGit into Mono as NGit. Now MonoDevelop has a full managed Git implementation that works the same on Windows, Linux and MacOS.

    MonoDevelop's Online Template System: To help developers get up and running with any kind of interesting .NET project, we are going to make MonoDevelop use an online gallery system and we are going to open it up for contributions.

    New Profiler: our new profiler is a complete new implementation that obsoletes the old logging profiler, the old heap-shot profiler and the old heap-buddy profiler and our old statistical profiler into a single profiler that does it all, does it better, and does it well.

    This new profiler was already used to pinpoint bugs and performance problems in our own web server, our Parallel Frameworks and inspired Alan to write a leak detector for Moonlight.

    MonoDevelop's Profiler GUI: The companion to our new profiler. Currently it only has a CPU profiling mode, but in the future we will add a GUI for memory profiling as well.

    Mono on Android: we are very close to shipping Mono on Android. The experience right now is very close to what we want.

    This has taken longer than we anticipated, but mostly because we are providing a full binding to the Android APIs. Not just a subset. This is made possible by Google publishing the Android API contract in XML form.

    WCF: Our WCF implementation so far has been the Silverlight client profiler and its mirror on the server. This is clearly not sufficient for many of our users, so we have redoubled our efforts to fill in all the gaps in WCF. Mono 2.10 will have better coverage for WCF, but it wont be complete. That is still some ways off.

    MonoDevelop support for MonoDroid: Currently our entire toolchain is Visual Studio based, just because we figured this is where the majority of developers would be. We are hard at work to bring the same experience to MonoDevelop users on MacOS and Linux.

    Upgrade MonoTouch to Mono 2.8: Currently our MonoTouch product is based on our older Mono 2.6 release, and there are too many features in Mono 2.8 that users want.

    One feature in particular that we are working on is the use of LLVM's optimizing compiler for Mono on the iPhone. As MonoTouch is entirely batch-compiled and has no JIT, we can use the LLVM backend of Mono instead of our codegen backend to generate smaller and faster code.

    And this is only weeks after we pushed our jumbo 3.2.2 release.

    Deploy Cecil/Light: Cecil is JB's library that we use every time we need to process ECMA CIL images. Debuggers, compilers, assembly browsers, linkers, mergers, spliters, injectors, decompilers and many other tools in Mono are built with Cecil.

    JB has revamped Cecil to be a lot lighter memory-wise, and has improved its API. This new version has been already deployed on most of our master trees in GitHub and will be available to everyone on the next iteration.

    C# Compiler to use IKVM Engine: Our C# compiler has historically used System.Reflection.Emit as its code generation engine. We are adding a second backend to the compiler, this time Jeroen Frijters's IKVM.Reflection engine.

    This will eliminate the need to have our compilers "bound" to an mscorlib profile. This means that we will no longer need various hacks that we have in place to build special compilers to target special profiles of Mono. Just one compiler for all API profiles.

    VB Compiler using Cecil Engine: Rolf updated the Visual Basic compiler to use Cecil as its backend engine.

    Upgrade our Online API documentation: a very much needed upgrade to our documentation system is ongoing, based on Jonathan's Kipunji ASP.NET MVC documentation engine and Jackson's hard work to productize it. We are going to move our documentation to this new system. You can preview our new documentation system here: MonoMac's Documentation Test Site.

    Hopefully, this time, we will make our documentation editable on the web.

    Moonlight GPU Acceleration and Perspective 3D transforms: this project has been underway for a little more than a year and I blogged about the GPU Acceleration recently.

    GPU acceleration is based on the fine work from Gallium, and also has made Moonlight's engine more reusable as a general purpose accelerated framework.

    Moonlight's RichText control: this is basically a word-processor on a widget. And who better to work on this than Chris Toshok who originally wrote XWord for Unix almost 13 years ago and which lead to the creation of LessTif.

    Moonlight Test Suite: We are up to 47.77% of the Silverlight 4 test suite passing. This is a really big number considering that we only started work on Silverlight 4 features very recently. We have been making progress at about 3% every week.

    Moonlight Beta: as the stars of codecs, tests and MS-PL code align, we are getting ready to do the first public beta of Moonlight 4 early next year.

    Moonlight Platform Abstraction Layer: We did a proof of concept port of Moonlight to Android and OSX to improve Moonlight's Platform Abstraction Layer. It should now be possible to reuse the Moonlight engine in other platforms and operating systems. Think of this as a "porting kit". You get the source, get it running elsewhere and if it breaks, you get to keep both pieces.

    MonoMac: we just released MonoMac 0.4 and we are now adding support for creating self-contained application bundles that developers can redistribute themselves or even submit to the Apple AppStore for MacOS.

    MonoMac has been a lot of work, mostly, due to popular contributions. There is a nice emerging community of new contributors to Mono that has sparked in the last few weeks.

    Garbage Collector Performance Tuning: with Mono 2.8 we shipped our new copying and precise collector and we made it easy for users to try it out (mono --with-gc=sgen). With the information we have collected, we are now improving the reliability and performance of the collector.

    Sgen already helped us get up to 30% performance boosts on ASP.NET workloads, and the new results are nothing short of amazing. We can not wait to share this with the world (or you can try it out today by building Mono from master).

    System.Xaml: The venerable desktop version of the XAML parser is coming to Mono in our next release.

    Precise Stack Scanning for SGen: we have also added support for precise stack scanning that will be useful in a few workloads.

    One surprising thing that we found out, and this will come as a shocker to many --it certainly was for me--, precise stack scanning over conservative scanning requires a lot of extra memory to keep stack maps. Unless you have some particular need to use precise stack scanning, you will be better off memory-wise and CPU-wise using conservative stack scanning.

    Concurrent GC with SGen: as you can guess, SGen has been great for Mono, and more concurrent configurations of GC scanning will be supported in our next release. Some were disabled in 2.8, some are new.

    Moonlight and DeepZoom: we had a decent DeepZoom implementation, but now we have a fabulous one. And by fabulous I mean, we pass Microsoft's tests :-)

    Intellisense for Android's markup: Atsushi created a DTD for us to bundle with MonoDroid to let users at least edit their Android UI XML with auto-complete in Visual Studio.

    ParallelFX: our parallel FX in Mono 2.8 was the first time that we distributed it. We have been working on improving its performance, distribution and balancing algorithms.

    Update: both the ParallelExtra samples gallery and Microsoft Biology Foundation are now runnable.

    Monodevelop Addins: Lluis launched the Beta for MonoDevelop's Addins system. You can use this to publish your MonoDevelop add-ins to your users, maintain multiple versions of them and get cute statistics on your add-in.

    This is the app-store of MonoDevelop addins, except they are all free. For example, this shows that in the last 7 days, 144 users installed the MonoMac addin:

    And that is what has kept us busy since the releases of Mono 2.8, Moonlight 2, MonoDevelop 2.4 and MonoTouch 3.2.

    January and February will be busy months for us as we release betas for Moonlight 3/4, MonoDevelop 2.6, Mono 2.10 and the official launch of MonoDroid 1.0.

    Posted on 09 Dec 2010


    Gtk# designer on OSX

    by Miguel de Icaza

    Happy to see that Gtk+ and Gtk# on MacOS are complete enough that the MonoDevelop GUI designer can be used there to build UIs.

    In the past, we had to use Linux to do all of our GUI design. Now our Gtk+ GUI design on OSX is self-hosting:

    You need the latest Mono and MonoDevelop to get this working.

    Posted on 08 Dec 2010


    Mono Introspect: Binding GObject-based APIs for use in Mono

    by Miguel de Icaza

    Alan McGovern, the hacker behind the amazing Moonlight GC tracking device has started work on a tool to bind the new Gtk+ 3.0-based APIs that use GObject instrospection for Mono consumption.

    Check out his project hosted in Github's mono-introspect module.

    Posted on 06 Dec 2010


    Beautiful Hack: Using Mono's Profiler to find Hard Memory Leaks

    by Miguel de Icaza

    Alan McGovern of MonoTorrent, Moonlight and Mono Introspect fame has written a blog post explaining how he used the new Mono Profiling interface to write a custom memory leak detector for Moonlight.

    His post is a step-by-step document on how he created a new loadable profiling module that the Mono runtime uses. He then registers for listening to profiling events for the GC roots (MONO_PROFILE_GC_ROOTS) and then tracks the GC handle use.

    This is how he found a difficult memory leak involving Mono's VM, the browser Javascript VM and the C++ code that backed every Moonlight object.

    Hard core hacking reading.

    Posted on 06 Dec 2010


    New iOS/OSX blog

    by Miguel de Icaza

    I have started a new blog on my iOS/OSX experiences with MonoTouch and MonoMac over at https://tirania.org/monomac.

    Posted on 30 Nov 2010


    David Reveman lands GPU acceleration for Moonlight…

    by Miguel de Icaza

    David Reveman had a great birhtday present for me today. He just completed the hardware accelerated support for Moonlight.

    You can watch two quick videos I made today with David: Hardware acceleration with Moonlight and Moonlight 3D Perspective Support.

    In Moonlight hardware acceleration is used for a number of features:

    • Applying 3D transforms to any Silverlight objects (drawings, images, videos).
    • Accelerating rendering of surfaces by pre-caching the contents on hardware textures.
    • Pixel shaders.

    Although Silverlight is able to accelerate some pixel shaders, Moonlight is able to accelerate all custom pixel shaders.

    The code currently lives on GitHub and we are doing daily builds of Moonlight for users interested in trying it out.

    Posted on 23 Nov 2010


    MonoDevelop 2.4.1 is out

    by Miguel de Icaza

    MonoDevelop 2.4.1 has been released. This release is focused mostly on bug fixes, but we still managed to add a few nice features:

    • we now support .NET 4.0 projects;
    • the Gtk# designer now works on OSX;
    • better native OS integration on Mac and Windows.
    • Improved support for XBuild projects

    Check out our release notes for the details about our changes.

    Posted on 22 Nov 2010


    Fund Raising 2.0

    by Miguel de Icaza

    It occurs to me that in this whole debate over angels and VCs, there is an important third option that is missing from the table and I have been referring to it colloquially as "Social Network Offering", or SNO.

    The idea is that instead of raising money directly from an angel investor or a professional venture capitalist, you raise money through a network of friends, acquaintances and contacts in the industry.

    The startup to-be creates a prospectus with some basic information like the business they are in, the execution plan, and the capital requirements to go from startup to profitability, acquisition or another exit strategy.

    So far, that is not any different than any other financing option available for a startup. The difference is how the share holders are invited into this process. Instead of being a closed door event where the angel or the vc sets the terms, the founders of the company set the terms for the investment as well as the initial round of capital that they are trying to raise and offer this to the social network.

    The Social Network Offering round would be setup through an escrow system that would give different investors a chance to participate in the first round of finacing, and if enough startup capital is raised in this phase, the money is given to the company and shares are distributed to the investors. If the startup fails to raise enough capital, the money is returned to the investors.

    Social Network Offerings are transparent in nature. They would not work well if you are trying to create something in secret, something that nobody has ever heard of, since you would need a level of secrecy for this to work. But it would work great for business built around open-core, or business where the strategy is to do it better than existing offerings.

    Balance

    If you have a social network of friends that can help you raise this kind of cash, the advantages are:

    • Your social network knows you better than a new VC firm or an angel.
    • Individuals that have historically not had a channel to invest in startups, get a chance to participate. This is fairly unique.
    • Easier to keep the company vision intact.

    There are also some downsides to go with Social Funding: VCs can help you get a seasoned executive team in place, they assist you by filling the gaps during the early stages of the company, they let you tap into their network of companies and resources and they will not hesitate to course-correct any ideological problems that do not necessarily blend well with becoming profitable.

    What is your take?

    If you had a chance to invest on a high-tech startup, how much of your own money would you be willing to put up-front for something like this?

    Fill my survey here.

    Update: On twitter, @eoinh pointed out that one company already did something like this. They used Linked-In to raise 350,000 dollars through their contacts, and found matching funds from the government raising the total to 700,000.

    Posted on 17 Nov 2010


    GitHub Organizations for IronLanguages and F#

    by Miguel de Icaza

    The IronPython and IronRuby languages are now under the "IronLanguages" umbrella and are being maintained using GitHub's Organization support.

    Tomas has also created an organization for F#, it currently hosts the MonoDevelop F# Add-In, and we are going to maintain there F#'s changes that we make in the open source world to get it tuned for Linux and OSX.

    Posted on 17 Nov 2010


    F# MonoDevelop Add-In Available

    by Miguel de Icaza

    Tomas Petricek has announced the availability of the F# MonoDevelop Add-In.

    The add-in provides intellisense for MonoDevelop, inline documentation and access to the F# interactive shell. Most of the heavy lifting is done by the F# compiler itself which is used directly by the Add-In as a service:

    His blog also has screencasts on getting F# and the F# add-in installed on Linux and also shows how to create Gtk# applications with F#:

    Check his blog for more details.

    Posted on 16 Nov 2010


    Mono Developer Room at FOSDEM

    by Miguel de Icaza

    Ruben has announced that FOSDEM 2011 was kind enough to host a Mono Developer Room at next year's conference.

    Ruben is organizing the talks, if you want to present, please submit a proposal for a presentation.

    There are plenty of topics to discuss: Gtk# and the Gnome desktop; MonoDevelop and MonoDevelop add-ins; Mono Runtime; Languages: Iron*, UnityScript, C# 4, F#; Server programming with Manos or ASP.NET.

    Posted on 15 Nov 2010


    New Mono Log Profiler

    by Miguel de Icaza

    Paolo has checked into Mono's GIT repository our brand-new profiler for Mono applications.

    The new profiler is documented in detail here, and is available with Mono 2.9+ (this means: it is available if you build Mono from GIT, and will be part of the upcoming 2.10 release).

    We would love to hear your feedback on it, and we hope to have a UI integrated into MonoDevelop soon.

    Update: This is what one of the reports of the new profiler can produce, this is taken from running an ASP.NET application (a question that came up a few days ago on IRC):

           Heap shot 5 at 14.518 secs: size: 43684432, object count: 562907, class count: 543
                Bytes      Count  Average Class name
             10506984      87373      120 System.Collections.Hashtable.Slot[] (bytes: +1939272, count: +16161)
                   87346 references from: System.Collections.Hashtable
              8130304      87486       92 System.Int32[] (bytes: +1706912, count: +16164)
                   87346 references from: System.Collections.Hashtable
                   40 references from: System.Collections.Generic.Dictionary
                   30 references from: System.Globalization.NumberFormatInfo
              6846000      57050      120 System.Web.Caching.CacheItem (bytes: +1232880, count: +10274)
              4891432      87347       56 System.Collections.Hashtable (bytes: +904176, count: +16146)
                   28526 references from: System.Web.HttpStaticObjectsCollection
                   28525 references from: System.Threading.ReaderWriterLock
                   28524 references from: System.Web.SessionState.SessionStateItemCollection
              1597344      28524       56 System.Web.SessionState.InProcSessionItem (bytes: +287672, count: +5137)
                   28524 references from: System.Web.Caching.CacheItem
              1597344      28524       56 System.Web.SessionState.SessionStateItemCollection (bytes: +287616, count: +5136)
                   28524 references from: System.Web.SessionState.InProcSessionItem
    
    	This heapshot was taken 14.518 seconds after application startup, at the
    	time there were 562907 objects in the heap, of 543 different types,
    	using about 43 MB of memory.
    	

    Posted on 11 Nov 2010


    F# Goes Open Source

    by Miguel de Icaza

    Last week, Don Syme announced that Microsoft has open sourced the F# compiler and the F# core libraries under the Apache 2 license.

    In addition, on Tuesday, Don also announced a new release that fixes a handful of bugs specifically for users targeting Mono.

    F# is a fascinating language, but I had not really spent much time with it as we could not really distribute it as an open source compiler limiting its usefulness in the Linux and Mac worlds. Now F# can become just another language that developers can use.

    F# supports asynchronous programming today, and it was the inspiration for C# 5.0's async support. There is no need to wait for C# 5 to come out, you can start using async workflows today with F# everywhere.

    MonoDevelop plugin

    At the F# in Education workshop Tomas Petricek announced his MonoDevelop add-in for F#. Although he has not released a binary add-in, the source code to his plugin is available here. It provides intellisense, parameter documentation, on-the-flight error underlying and support for the F# interactive shell from the IDE.

    Distributing F#

    Our plan is to distribute F# as part of Mono for both OSX and Linux. This will take some time, in the meantime, check fsxplat.codeplex.com for instructions on how to get started with F# on MacOS and Linux.

    It will likely run out of the box on Mono/Android and Mono/Wii. Since F# uses generics extensively, we do not know if it can be used to target the iPhone or the PS3 as both require Mono's full static compiler. We will be evaluating this in the coming weeks.

    Don, minutes after open sourcing F# enjoying a tasty meal.

    F# Resources

    These resources are straight from Don's blog:

    Posted on 11 Nov 2010


    Visiting Redmond and PDC

    by Miguel de Icaza

    If you are attending PDC or at Microsoft and love Mono, .NET, Open Source, Linux, MacOS, iPhone, Silverlight, Android or WP7 and want to hang out, discuss, or debate the finer points of trollcats in contemporary society, drop me an email at [email protected].

    Alternatively, we can also indulge in some Java-driven schadenfreude or debate whether chubby pixels are worth staring at.

    I will be in Redmond from Tuesday afternoon until Friday night.

    Posted on 26 Oct 2010


    IronRuby and IronPython Opportunities

    by Miguel de Icaza

    Yesterday, Jason Zander announced that the maintenance and future development of IronRuby and IronPython languages was being turned over to the Iron* communities.

    Microsoft reached out to some of the users of the Iron languages to take over the coordination for these projects. Together with JB Evain, Michael Foord, Jeff Hardy and Jimmy Schementi I agreed to help coordinate the future development of these languages. The Iron* community reaction to the opening of the process has been very supportive judging by the emails on the mailing list and the twitter responses.

    There are four pieces of code involved, all licensed under the Apache 2.0 license:

    Both IronPython and IronRuby will be developed like other open source projects without any of the limitations that previously existed. In particular, from my very Unix-centric view, we will be able to get the proper fixes into the Iron* languages to make them work out of the box on Linux and MacOS.

    Our Contributions

    Although we will help with the coordination efforts in the Iron languages as the community grows and evolves, we have some concrete tasks that we will be working towards right away:

    • Ensure that the Iron* languages build and work out of the box on Linux, MacOS and Unix.
    • Use Mono's Continuous build system to keep an eye on any regressions on IronRuby and IronPython.
    • Package the latest IronRuby and IronPython for Linux and MacOS.

    Opportunities

    Ruby and Python make programmers happy. They bring joy and smiles to programmers everywhere in the Unix world. Both have strong user bases on Linux and MacOS and there is a strong ecosystem of independent implementations for both Ruby and Python, each with their unique features.

    In Iron's case the major feature is being able to use your scripting language of choice while having access to all Mono APIs for building standalone applications or for extending existing applications like MonoDevelop, F-Spot, Banshee, SparkleShare and Tomboy.

    From my Unix-biased standpoint, this means that all of the libraries that we have been working on over the years from Gtk# for building desktop Gnome apps, to MonoMac for creating native Mac applications with the entire universe of .NET libraries at your disposal.

    The Iron* languages, combined with our MonoMac will make an appealing platform for building apps for the Mac AppStore.

    Another fascinating project is the Pyjama Educational Project. Pyjama is written in IronPython, Gtk#, and GtkSourceView and currently supports 5 DLR languages.

    Teaser

    As the announcement came out last night, Geoff Norton cooked this simple teaser of IronRuby on the iPhone.

    Check it out here.

    Posted on 22 Oct 2010


    Missed Opportunities at Microsoft and Ray Ozzie Departure

    by Miguel de Icaza

    Microsoft has three big tasks ahead of itself: (a) make Azure successful; (b) make Windows Phone 7 successful; (c) keep the existing Windows and Office businesses printing money.

    There is probably not a lot of political support at this point to embark on more large-scale innovations at Microsoft while there are probably hundreds of smaller innovations that are waiting under all of their product groups.

    Ray Ozzie incubated a number of projects like Azure and Mesh at Microsoft that once they reached a level of usefulness were transferred to the product groups.

    He is probably leaving his position as Chief Architect at Microsoft as he transfers the Azure assets to the product group and he is once again left as a general without an Army. Starting new project and recruiting teams from scratch for new products has probably taken a toll on him and he is ready to move on.

    Missed Opportunities

    Back in June I blogged about what I would do if I was in charge of Windows 8: among other things, I would have created a Windows AppStore.

    This AppStore would have helped independent ISVs tremendously by opening the entire Windows user base as potential customer for Microsoft's products. It would have helped Microsoft make Windows even more relevant, and it would have done more to push native applications on Windows than anything else they have tried in the past.

    The Windows PC market is a market that is many times larger than today's iPhone market. It would have been a gold mine, and there would have been a renewed gold rush to ship "Windows AppStore-ready" applications for Windows.

    Hundreds of people at Microsoft must have had this idea, the question is why it never bubbled up to the top?

    Short of a Microsoft-powered AppStore, Intel has announced that their Windows Appstore will now include .NET software.

    On the one hand, Intel has now given up any attempts to make their AppStore be a cross-platform app-store, which I felt was a gracious thing for them to do, as it would have helped Linux.

    Financially, having a strong Windows-based appstore was probably the right thing to do for Intel. There was really no point in Intel undermining his own efforts by forcing people to use cross platform tools in the first place.

    If Microsoft was the one providing the AppStore, they would be reaching a much bigger market than what Intel hopes to reach.

    This could have been a great Ray-Ozzie level hack to pull at Microsoft. In the meantime, Apple today announced an AppStore, and they are going to get a bucket of apps and a bucket of developers to push software on their platform.

    Live Mesh

    Live Mesh had a lot of promise, but sadly, the groups working on it refused to open up the specs on time, and the product became fairly uninteresting over time.

    If you are going to open something for the world to see, you should be ready to let the world interoperate with it from the start. Otherwise you merely give your competitors the good ideas, and they throw away your bad ideas and avoid paying any of your strategy taxes.

    Posted on 20 Oct 2010


    Shipping Smiles on the AppStore

    by Miguel de Icaza

    Happy days at Mono Central. Just a few months ago we decided that we should apply the lessons learned from MonoTouch to Mono on the Mac and we built a new set of .NET APIs for developing native Mac applications. We called this MonoMac.

    We recently brought tears of joy to developers by shipping it.

    MonoMac will be a great tool to build native Mac application using your favorite .NET programming language.

    We clearly have to take this to the next step as MonoMac is merely a binding to .NET. We are going to have to extend MonoDevelop to create fully self-contained applications that embed both your application, any library dependencies that it needs as well as the Mono runtime.

    The above really had not been my priority, as far as I was concerned "Download Mono and Install it" was a perfectly suitable solution. So you have Apple to thank for my change of heart.

    Hopefully we will have an experience as smooth as the MonoTouch experience has been.

    Posted on 20 Oct 2010


    Bringing Smiles to the Faces of MacOS developers

    by Miguel de Icaza

    As part of our efforts to bring a superb developer experience to every platform in the world, we have made a new release of our bindings to the MacOS X APIs: MonoMac.

    We know that Mac users like to have a smooth installation experience, and we have worked hard to make this as simple as possible. Currently MonoMac is still not a 1.0 product, this is what developers need to do:

    The result is a .app that you can distribute to your users.

    The MonoMac API design is inspired by work that we did for MonoTouch.

    We have achieved a beautiful blend between C# and MacOS that will turn Mac developer's tears of pain into tears of joy.

    Community

    Update: to get started with MonoMac, you can join other MonoMac-ers on the IRC channel #monomac on server irc.gnome.org.

    We use the mono-osx mailing list to discuss the binding.

    Hackers

    If you want to get your hands on the source code for MonoMac, head over to GitHub and download both monomac and maccore. The former contains the MacOS-specific bindings, while the latter contains the shared code between MonoMac and MonoTouch.

    The introductory post to MonoMac still contains many useful links and design details, you might want to read that if you want to hack on MonoMac.

    Contributors

    Our API coverage right now is very complete. We will certainly add more C# features to the binding as we learn how developers are using the API, but that is a bit of an organic process.

    One area that we need help to improve the developer experience is to fill-in all the "summary" sections in our documentation. This information is shown during auto-complete/intellisense for the developer for classes, methods, enumeration values and properties.

    Details on how you can contribute to this are on this post of mine.

    Posted on 12 Oct 2010


    A Mono Success Story of Biblical Proportions

    by Miguel de Icaza

    Read David Mitchell's experience in using Mono to reuse code between the Windows and Mac platforms.

    Posted on 07 Oct 2010


    Mono 2.8 is out

    by Miguel de Icaza

    We have just released Mono 2.8 a major upgrade to the Mono developer platform. This release contains ten months worth of new features, stability fixes, performance work and bug fixes.

    The highlights of this release include:

    • C# 4.0
    • Defaults to the 4.0 profile
    • New Generational Garbage Collector
      • Use mono --gc=sgen or mono-sgen to use Mono with the new GC
    • New Frameworks from Mono MIT X11 and Microsoft MS-PL/Apache2:
      • ASP.NET 4.0
      • Parallel Framework: including PLINQ.
      • System.XAML
      • System.Dynamic
      • Managed Extensibility Framework
      • ASP.NET MVC 2
      • System.Data.Services.Client (OData client framework)
      • WCF Routing
      • .NET 4.0's CodeContracts
    • Performance:
      • Large performance improvements
      • LLVM support has graduated to stable
        • Use mono-llvm command to run your server loads with the LLVM backend
    • Version 2.0 of the embedding API
    • Removed the 1.1 profile and various deprecated libraries.
    • OpenBSD support integrated
    • Mono no longer depends on GLIB
    • Threadpool exception behavior .NET 2.0

    For the full details, check our detailed Mono 2.8 Release Notes

    Posted on 06 Oct 2010


    The Mystery Behind the Hacking the Boston Museum of Fine Arts

    by Miguel de Icaza

    A decade ago some hackers went into the Boston Museum of Fine Arts and replaced the guided tour audio with their own content. The identity of the hackers remains a close guarded secret and one of Boston's biggest unsolved mystery's. Investigators could only agree on one thing: that the voice in the tape did not belong to Lev Davidovich Bronstein.

    I got my hands on the audio file back in 1999 and during one of my visits to MIT that year I saw the news paper coverage of the event. I vaguely remember the news article, but it described the reactions of the visitors and featured interviewed with shocked citizens.

    This is the recording.

    Update: Dylan tells me that the cat is out of the bag. Read the interview with BJ Novak here.

    Posted on 29 Sep 2010


    Chicken Tikka Masala Burrito

    by Miguel de Icaza

    	toshok: oh man… chicken tikka masala burrito
    	toshok: i got it to share with conchita, but she's asleep on the couch...
    	

    20 seconds later:

    	toshok: it's so good, i might eat it all
    	

    Posted on 16 Sep 2010


    Unix Stack Exchange: Call for Help

    by Miguel de Icaza

    Thanks to everyone that helped us get the Unix StackExchange group up and running.

    The site went into preview in record time, and then we went into Beta.

    My call for help: I am currently at 1,211 points, on 6th place answering questions on the site.

    So what I need you guys is to go and ask some interesting questions about Unix, Linux, Gnome in there, and I get to answer them with some awesome background.

    If you ever had a pressing Unix question, now is the time to ask it on the site, and help me get those points up.

    Posted on 14 Sep 2010


    This was news to me

    by Miguel de Icaza

    I have been living in the US for 10 years, and I never thought that people that many of the people that went through college end up with huge debts that they had to repay for 30 years.

    This is probably creating a generation of graduates that is unable to take risks, start their own business, take a year off, launch the next startup or just catch a break.

    During the discussion today on Twitter, this link came up, this one as well as this infographic from College Scolarships:

    Posted on 13 Sep 2010


    Great News for MonoTouch Users

    by Miguel de Icaza

    Apple has removed the restrictions that were introduced earlier this year (the famous section 3.3.1).

    Although Apple had not blocked any MonoTouch applications since the new rules were introduced, many developers either took a wait-and-see approach, or switched their development. We never stopped working on MonoTouch, just yesterday we released MonoTouch support for the new iOS 4.1 APIs. We did this within eight hours of the new operating system going public.

    With these new terms, the ambiguity is gone and C# lovers and enthusiasts can go back to using MonoTouch. Developers that like garbage collection and their strongly typed languages can resume their work.

    In addition, Apple has published their detailed review guidelines for application developers. This should help developers get their apps approved. And the MonoTouch Book is a great way to get started.

    Thank you!

    We would like to thank the MonoTouch community that stayed by our side all along and helped us improve MonoTouch and continued to build great applications during this time.

    Those of us that have a crush on iOS and .NET are grateful to Apple and the Apple employees that helped make these changes happen.

    Expanded MonoTouch iOS investment

    Although we continued to extend, improve and polish MonoTouch the older terms made it harder to justify taking on some larger tasks, the risk was high.

    We had some big projects in mind for MonoTouch. We are going to start prioritizing these new features, but we want to hear from our users, and we want to know what is more important to you. Please fill out this survey to tell us what do you think it would be more important to bring to MonoTouch.

    We will balance your input with our own "gut" (we would not be truth to the Stephen Colbert spirit if we didn't).

    ....and discounts!

    Joseph Hill has just told me that we are doing a 15% discount for the next two weeks for anyone buying MonoTouch. Use discount code "MONO-331" on http://monotouch.net/Store.

    We have also a surprise in store for existing MonoTouch customers that we will be announcing next week.

    Posted on 09 Sep 2010


    Initial Thoughts on Oracle vs Google Patent Lawsuit

    by Miguel de Icaza

    Today Oracle sued Google over Java patents and copyrights that they claim Google's Android OS infringes. The lawsuit claims that Google knowingly infringed on those patents, and that the continued distribution of Google's Android is harming Oracle's Java Business.

    You can read the actual complaint, the patents referenced are:

    There is also a copyright lawsuit, but there are not enough details on the complaint to figure out what the claim is. Until there is a trial, we will not really know what is being asked here.

    Pundit Prediction Time!

    I would like to think that this is going to be solved with a quick settlement where Oracle will shake Google for a few billion dollars and the entire matter will be put behind.

    Oracle will likely want to settle with Google under terms that will only cover Google's own use as they want to go shaking other OEM trees for more cash.

    An unlikely scenario is for Google to pay the bills for all Android OEMs as they are coming out fast and strong from every corner of the world.

    It occurred to me that Oracle could sell all the Java assets to Google. But Google probably passed on this opportunity back when Sun was put on the market.

    What Jonathan Schwartz Knew

    Sun's Ex-CEO Jonathan Schwartz has recently taken to the blogwaves to blog about the things he could not tell us while he was a CEO of Sun. While he might have found a new voice for gossip from the Sun days, he will not say a word on this matter, because he was likely engaged in shopping the patent lawsuit around.

    Sun had created Java, but it turned out to be very difficult for Sun to monetize Java directly after the initial source code license deals that they struck with IBM, Microsoft, Oracle, Netscape and others. They created the J2EE market, just to find that other companies and startups executed better than they did on the systems that they had initially engineered.

    Sun was left in the uncomfortable position of being the owner of the technology that everyone was cashing out on, but they themselves had very few revenue streams for Java. Like Clemens Vasters joked on Twitter today:

    They had the Microsoft lawsuit cash and they had the embedded licensing business with Java Micro Edition and Java Standard Edition licensing deals.

    The open sourcing of Java was also carefully planned. By picking the GPL as their license, they ensured that embedded system OEMs and developers would have to negotiate a different license with Sun if they wanted to use the OpenJDK on their systems.

    There is very little public information on the Google/Sun split over Java ME and the creation of Dalvik. The rumors on the grapevine were that Google and Sun could not reach an agreement over the Java Micro Edition licensing. Sun wanted to sit in the middle between Google and the handset OEMs, while Google wanted to create a free-for-all operating system.

    When it became clear that they would not be able to reach an agreement, Google started a project to replace Java Micro Edition and they used some clever engineering techniques that blended the best of both worlds.

    It is likely that during these negotiations, Google threatened to build their own Java runtime and Sun countered with a list of patents. This would explain why Google went through the trouble of making the Dalvik virtual machine explicitly incompatible with the existing Java virtual machine instructions.

    Although Dalvik uses a different set of instructions, Google created a translator that recompiled Java code into Dalvik code, and with this, they worked around whatever licensing technicalities they were aware at the time of the negotiations.

    Needless to say, Sun was not happy with Dalvik. Not only because Sun had lost a large licensing deal, but also because it had the potential of becoming the de-facto Java virtual machine that everyone on the embedded space would pick instead of Sun's own Java Micro Edition.

    In late 2007 Google announced both Android and the Open Handset Alliance to the public. On the Java front, Sun had delivered on the promise of open sourcing Java, but it had been a rough year for Sun and it would get worse, in the next twelve months after the announcement, Sun stock would lose 80% of its value.

    Sun had their plates full, so Sun did not feel the need to react immediately to the Android threat, so they kept their grievances to themselves.

    But Jonathan started to shop the company in late 2008. The monetary value of the Java assets had been devaluated due to the open sourcing of the technology under the GPL. I am going to bet that the same careful planning that went into picking the GPL went into pitching the potential for lawsuits.

    The world had already witnessed the awesome iPhone and the eyes were on Google to deliver a killer phone. Jonathan must have known this and he must have been pitching this to the potential suitors.

    By the time Oracle bought Sun, they knew that they would be going after Google and anyone else with a big, fat checkbook that did not have a licensing deal in place.

    And that explains the Exodus of famous Java people from Sun shortly after the acquisition. The wheels of the lawsuit started spinning the moment the sale was done. Those employees are probably under NDA.

    Update: I was wrong, apparently Gosling was not under NDA and has confirmed exactly what I said above:

    Oracle finally filed a patent lawsuit against Google. Not a big surprise. During the integration meetings between Sun and Oracle where we were being grilled about the patent situation between Sun and Google, we could see the Oracle lawyer's eyes sparkle. Filing patent suits was never in Sun's genetic code. Alas....

    I hope to avoid getting dragged into the fray: they only picked one of my patents (RE38,104) to sue over.

    So now we know that Jonathan shopped Sun with a big "Sue Google" sign. So much for his visionary patent defense against Apple and of course this jewel:

    The most egregious of such suits was filed against Sun by Kodak (yes, the film photography people).

    Egregious, because Kodak had acquired a patent from a defunct computer maker (Wang) for the exclusive purpose of suing Sun over an esoteric technology, Java Remote Method Invocation (“Java RMI” – not exactly the first thing that comes to mind when you hear “Kodak”).

    And he was just playing Wang's role a couple of months ago.

    Update: this post from the Dalvik announcement era discussed how Dalvik's work around the license-from-Sun challenge.

    Some Background on the Java Patents

    The Java specification patent grant seems to be only valid as long as you have a fully conformant implementation:

    (a) fully implements the Specification including all its required interfaces and functionality;

    (b) does not modify, subset, superset or otherwise extend the Licensor Name Space, or include any public or protected packages, classes, Java interfaces, fields or methods within the Licensor Name Space other than those required/authorized by the Specification or Specifications being implemented; and

    (c) passes the Technology Compatibility Kit (including satisfying the requirements of the applicable TCK Users Guide) for such Specification ("Compliant Implementation").

    This is more stringent than the Microsoft Community Promise that applies to .NET as the Community Promise only requires a minimum subset, it does not prevent supersets.

    This seems to be what the lawsuit is hinged upon.

    Is this it?

    I vaguely remember in one of the endless anti-Mono discussions that someone pointed (maybe it was Gosling himself?) that Java had a patent grant for anyone to implement under any conditions.

    They pointed to the spec. And I remember seeing this on the spec and thinking that it was a generous patent grant. Perhaps I was confused and the only patent grant is the one in the previous section, but if you know of the other document, please let me know.

    Sun's GPL

    By GPLing Java, Sun lost some of the exclusive rights that they used to have, in particular, anyone using the open sourced version of the OpenJDK is given the patent rights to run the software.

    The problem is that the rights are only available as long as you are using the GPL version of Java. Any patent grants are not available if you use a third-party licensed version of the Java virtual machine. In that case, it seems like the only option would be to to go back to the Sun licensing terms.

    Wishful thinking

    Too many engineering resources are devoted to Android at Google and at their partner companies, but I can not help to think that Google could migrate Android from Java to the ECMA/ISO CIL and C#.

    Unlike the Java patent grant, the Microsoft Community Promise for both C#, the core class libraries and the VM only require that you have a full implementation. Supersetting is allowed.

    Additionally, Microsoft has placed the .NET Micro Edition entirely under the Microsoft Public License which comes with an even more generous patent grant, and covers a superset of the code covered by ECMA/ISO 335.

    We have open source implementations of both, and even more luckily, the ECMA/ISO VM specification allows for different profiles, to allow for ultra-small or server-sized versions of the VM to be created. Ideal for mobile platforms.

    Google could settle current damages with Oracle, and switch to the better designed, more pleasant to use, and more open .NET platform.

    Some Humor

    There is a silver lining in this whole mess, and it is that the tweetosphere came up with a few funny tweets, here are my favorites:

    And while you are here

    I am very excited to see the first MonoTouch book published.

    Posted on 13 Aug 2010


    Unix and Linux StackExchange

    by Miguel de Icaza

    Help create a non-tribal version of StackOverflow for Unix and Linux questions.

    As we know, tribalism makes you stupid. So let us commit to the Linux and Unix Q&A site powered by StackOverflow that will help answer questions for Unix and Linux users of all distributions and blends.

    At the time of this writing, only 91 users have committed.

    Tell your Solaris, FreeBSD, NetBSD, OpenBSD, Unix, OSX, Linux, Red Hat, Fedora, Ubuntu, Debian, Mandrake, Mint, Arch, Slackware, CentOS, Gentoo, OpenSUSE, friends to commit to it and help create a global community of Unix love.

    Posted on 05 Aug 2010


    MonoTools 2 for VisualStudio has been released

    by Miguel de Icaza

    We just released Mono Tools for Visual Studio.

    There are four main features in MonoTools 2:

    • Soft debugger support.
    • Faster transfer of your program to the deployment system.
    • Support for Visual Studio 2010 in addition to 2008.
    • Polish, polish and more polish.

    Thanks to everyone that participated on our beta program for all of the bug reports and feedback!

    MonoTools is the foundation on which we are building the upcoming Mono for Android toolchain.

    New Long-Term Maintenance Mono Release

    With the introduction of MonoTools for Visual Studio, we are also moving our long-term maintenance Mono release from the Mono 2.4 release to Mono 2.6, the release that we announced last week.

    Getting Started

    Download our betas from this page. On Windows, you would install our plugin for either 2008 or 2010 and you need to install Mono 2.6.5 on the target platform (Windows, Linux or MacOS).

    On Linux, run `monotools-gui-server' or `monotools-server', this will let Visual Studio connect to your machine. Then proceed from Windows.

    On MacOS, double click on the "MonoTools Server" application.

    Once you run those, MonoTools will automatically show you the servers on your network that you can deploy to or debug:

    ASP.NET debugging with this is a joy!

    Soft Debugger

    This release is the first one that uses our new soft debugger. With is a more portable engine to debug that will allow our users to debug targets other than Linux/x86 for example OSX and Windows.

    This is the engine that we use on MonoTouch and that we are using for Mono on Android.

    Our previous debugger, a hard debugger, worked on Linux/x86 systems but was very hard to port to new platforms and to other operating systems. With our new soft debugger we can debug Mono applications running on Windows, helping developers test before moving to Linux.

    Faster Transfers

    When you are developing large applications or web applications, you want your turn around time from the time that you run hit Run to the site running on Linux to be as short as possible.

    Cheap Shot Alert: When dealing with large web sites, we used to behave like J2EE: click run and wait for a month for your app to be loaded into the application server.

    This is no longer the case. Deployments that used to take 30 seconds now take 2 seconds.

    Support for Visual Studio 2010

    Our plugin now supports the Visual Studio 2010 new features for plugin developers.

    This means you get a single .vsix package to install, no system installs, no registry messing around, no dedicated installers, none of that.

    The full plugin installs in 3 seconds. And you can remove it just as easily.

    Then you can just from VS's Mono menu pick "Run In Mono" and pick whether you want to run locally or remotely.

    We now also support multiple profiles, so you can debug from Visual Studio your code running on Linux boxes, Mac boxes or your local system.

    Polish and more Polish

    MonoTools was our first Windows software and we learned a lot about what Windows developers expected.

    We polished hundreds of small usability problems that the community reported in our last few iterations. You can also check our release notes for the meaty details.

    Appliances

    And we integrate directly with SuseStudio to create your ready-to-run appliances directly from Visual Studio.

    Posted on 03 Aug 2010


    Mono has migrated to GitHub

    by Miguel de Icaza

    We have now migrated all of Mono's source code from the Subversion at our Cambridge office over to GitHub.

    We are going to be maintaining a migration FAQ and providing help to developers on irc.gnome.org channel #mono for the new setup.

    The web site has not been updated yet and we still reference Subversion urls, but this will be fixed in the next few days.

    Posted on 22 Jul 2010


    Mono 2.8 Trick: tracing exceptions

    by Miguel de Icaza

    Mono has an strace-like feature built into the runtime. This is useful to see which methods are being called by your application, just invoke Mono with --trace.

    Our upcoming version has a neat new feature, when you use --trace=E:ExceptionName or --trace=E:all you get a stack trace of where the exception was thrown from:

    $ gmcs.exe
    mono$ gmcs missing.cs
    error CS2001: Source file `missing.cs' could not be found
    Compilation failed: 1 error(s), 0 warnings
    

    And now with tracing enabled, we do it setting the MONO_ENV_OPTIONS variable:

    mono$ MONO_ENV_OPTIONS=--trace=E:all gmcs missing.cs[0xb75136f0:] EXCEPTION handling: System.IO.FileNotFoundException: Could not find file "missing.cs".
    
    "{unnamed thread}" tid=0x0xb75136f0 this=0x0x53f18 thread handle 0x403 state : not waiting owns ()
      at System.IO.FileStream..ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,bool,System.IO.FileOptions) {0x00619}
      at System.IO.FileStream..ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) {0x00022}
      at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) {0x0004f}
      at System.IO.File.OpenRead (string) {0x0002c}
      at Mono.CSharp.Driver.Parse (Mono.CSharp.CompilationUnit) {0x00016}
      at Mono.CSharp.Driver.Parse () {0x00068}
      at Mono.CSharp.Driver.Compile () {0x00098}
      at Mono.CSharp.Driver.Main (string[]) {0x000a2}
      at (wrapper runtime-invoke) {Module}.runtime_invoke_int_object (object,intptr,intptr,intptr) {0x00033}
    error CS2001: Source file `missing.cs' could not be found
    Compilation failed: 1 error(s), 0 warnings
    

    Posted on 21 Jul 2010


    Banshee Ships with Amazon Store Support

    by Miguel de Icaza

    Aaron just shipped Banshee 1.7.3 which lets you purchase MP3s from Amazon from the player directly.


    Banshee Amazon MP3 Store Screencast!

    Get it fresh!

    Posted on 21 Jul 2010


    Building apps for the Retina Display

    by Miguel de Icaza

    While adding Retina Display support to TweetStation I learned a couple of tricks that I figured would help other developers.

    iOS 4 Points

    Apple's Retina Display conveniently doubles the number of pixels on each dimension, the previous iPhone display had 320x480 pixels while the new new phone has 640x960 pixels.

    To make existing applications run out of the box on these new displays Apple changed the units on the display and instead of using pixels they now use points. They are not really typographical points, but iOS "points". Both the old iPhones and the new iPhone have a resolution of 320x480 points.

    This means that existing code that absolutely positioned views on the screen will get the views laid out in the same positions regardless of the device that the code is running on.

    In UIKit points are interpreted based on the value of the UIView.ContentScaleFactor. If the value is 1.0 each point is mapped to one pixel. If the value is set to 2.0 each point is mapped to four pixels (2x on each dimension).

    UIKit layout and CoreGraphics rendering primitives will automatically take this factor into account and position and render accordingly.

    Images

    The Image loading routines have been extended to load higher-resolution images by default when you use UIImage.FromBundle. On Retina Displays the code will probe for a [email protected] filename when you request file.ext to be loaded. For example this loads the background texture you use:

    	texture = UIImage.FromBundle ("Images/texture.png");
    	

    TweetStation's images are here.

    Bitmaps and Inkscape

    All the icons and images on TweetStation were done using Inkscape. When I exported the icons they would invariably look blurry. For example, this is from my first attempt at getting the swipe menu on TweetStation working:

    I would just draw my icons on Inkscape and then export them as bitmaps. Inkscape would then anti-alias the result, you can see how the reply icon is not rendered properly:

    The Inkscape FAQ contains this bit of information that is very useful if you are drawing small icons:

    With the current renderer, it is not possible to completely get rid of antialiasing. However, it is possible to partially suppress it on export. Usually, antialiasing is unwelcome in horizontal and vertical lines which become "blurred". To work around this, make sure your horizontal/vertical edges are snapped on the pixel grid, and all strokes are a whole number of pixels wide. Then, export bitmap at the default 90dpi so that 1 px unit corresponds to 1 bitmap pixel. In the resulting bitmap, snapped color boundaries will be perfectly crisp.

    These are the settings that I use now to export the same graphic:

    I used guidelines on Inkscape to help me:

    This is the new version of the icon before it gets composited with the background

    To export the same image at high resolution, set the DPI in the dialog box to 180. Inkscape will automatically change the width and height for you.

    The other problem that I had was related to my centering code, this is what the rewteet icon looks like from the menu above:

    The blurry sides of the retweet icon were caused by the math code setting the X position of the image at a fraction of a point (0.5).

    After fixing both problems and adding a nice backdrop shadow, this is what the menu looks like:

    Graphics Context

    Loading images with more pixels for the background texture and the icons wont do you any good if you are drawing the images yourself.

    When you create a graphics context using the pre-iOS 4 APIs you will end up with a context that assumes that you are not aware of the Retina Display and hence will rescale your drawing up. When you create an image context of 100x100 points like this:

    	UIGraphics.BeginImageContext (new SizeF (100, 100));
    	

    You will end up with a context that has 200x200 points, but will automatically double all of your pen widths and will scale any images up. If you had a high-resolution image, it will first be scaled down when rendering to the context, then scaled up when rendering the data.

    To take advantage of the retina display you need to call a new method:

    	UIGraphics.BeginImageContextWithOptions (SizeF size, bool opaque, float scale);
    	

    If you set scale to zero, it will pick 1.0 for old display and 2.0 for retina displays. I use this helper method to support both iOS 3.x and iOS 4.0:

    	void BeginImageContext (SizeF size)
    	{
    		if (Graphics.HighRes)
    			UIGraphics.BeginImageContextWithOptions (size, false, 0);
    		else
    			UIGraphics.BeginImageContext (size);
    	}
    	

    This is how the swipe menu is rendered at high resolution:

    More

    Apple's Supporting Resolution Independence document has more information.

    Posted on 20 Jul 2010


    Mono's Git Migration

    by Miguel de Icaza

    Mono's source code is being migrated to GitHub on July 22nd, starting at 9am Boston time.

    We are psyched that Github was kind enough to host Mono's large repositories for free on their system. We are also taking advantage of their new Organizations functionality.

    Gonzalo posted the following details about the migration:

    We are moving our source code repository to GitHub.
    
    On July 22nd ~9am EDT (1300 GMT) the subversion repository at "svn
    +ssh://mono-cvs.ximian.com/source" will be set to read-only mode and
    kept that way forever.
    
    We estimate that the process of migrating all the projects and moving
    them to GitHub will take more than 3 and less than 8 hours. Once it is
    completed we will send an email to this list with URLs to the new
    repositories, FAQs,...
    	

    If you have any questions about the migration, please ask them here and we will add them to our Git Migration FAQ.

    Posted on 20 Jul 2010


    Fresh Mono Baked

    by Miguel de Icaza

    Andrew just announced Mono 2.6.7, the version that is replacing our long-term maintenance release of Mono with plenty of bug fixes as well as the following new features:

    • Microsoft's ASP.NET MVC2 is now bundled with Mono.
    • Upgraded xbuild tool (Mono's msbuild)
    • Upgraded our LINQ to SQL (DbLinq)
    • Upgraded our Soft Debugger
    • We now publish CentOS/RHEL packages.

    Our CentOS/RHEL packages install on /opt/novell/mono, just like our packages for SUSE Linux Enterprise and should not conflict with your own packages of Mono that you might have from some other sources.

    Posted on 20 Jul 2010


    Microsoft Licensing Changes for IronRuby and IronPython

    by Miguel de Icaza

    If you check the latest versions of IronRubyIronPython or the Dynamic Language Runtime you will see that Microsoft has now relicensed the code from the Microsoft Permissive License to the Apache 2 License.

    Posted on 17 Jul 2010


    Spaniard Anger Towards Mexicans

    by Miguel de Icaza

    It has been brought to my attention that the upcoming 200 year celebration of Mexico's independence from Spain on September 15th has lead to office unrest all across the country between teams that have both Mexicans and Spaniards working side-by-side.

    Spain might have won the world cup, but Mexico upgraded from being a colony of Spain and being subject to the will of the Kings of Spain, to a democracy subject to the will of drug dealers.

    To resolve this animosity, I propose we settle the score this September 15th with a cook-off between Spaniard food and Mexican food.

    I propose the cook-off from the Novell/Cambridge team be held at my place the weekend before the festivities to settle the score before the celebrations take place. We will make delicious tacos. Gonzalo will be making a Paella.

    Posted on 17 Jul 2010


    New Mono Runtime Features

    by Miguel de Icaza

    With Mono 2.8 we want to make it very easy for developers to use the LLVM powered Mono engine and the new Mono Garbage Collector.

    Previously users had to build Mono from source code and choose as part of their build whether they wanted the Mono VM to be powered by LLVM or not and whether they wanted to use the Boehm GC or the new Generational GC. Typically users would have to keep multiple parallel Mono installations.

    This is no longer necessary.

    Mono 2.8 by default behaves just like any other Mono, by default you get the regular fast Mono JIT with the Boehm GC.

    You can then pass the --llvm flag to instruct the Mono runtime to use LLVM for code generation (much slower to JIT, but produces better code for long-running applications or compute intensive applications).

    To use the new garbage collector you pass the --gc=sgen command line argument.

    New MONO_ENV_OPTIONS

    We wanted users to try LLVM, SGen or the LLVM/Sgen combination without having to modify all of their launch scripts or existing tools so we introduced a new environment variable that Mono parses on startup, the MONO_ENV_OPTIONS variable.

    Mono will parse the contents of the MONO_ENV_OPTIONS variable as if the arguments had been passed in the command line, so you could do a full bootstrap of Mono's class libraries with both by doing:

    	$ export MONO_ENV_OPTIONS="--llvm --gc=sgen"
    	$ make
    	

    How to test LLVM and SGen

    Update: Both the --gc=sgen and --llvm options depend on your architecture and operating system being supported by SGen and LLVM and depend on you compiling your runtime with these features.

    SGen will be automatically enabled if your OS/architecture is supported when you run configure.

    LLVM requires the installation of the LLVM libraries. We strongly recommend that you use our modified version of LLVM that has been extended to support various constructs required by .NET.

    For more information on compiling LLVM and building your Mono with it, see our web page

    Posted on 14 Jul 2010


    GZip your downloads

    by Miguel de Icaza

    Gonzalo yesterday pointed me to a feature in the HTTP client stack for .NET that I did not know about.

    If you want the server to gzip the response before sending it to you, set the AutomaticDecompression flag in your HttpWebRequest:

    	var request = (HttpWebRequest) WebRequest.Create (uri);
    	request.AutomaticDecompression = DecompressionMethods.GZip;
    	

    This will set the Accept-Encoding HTTP header to gzip when you make your connection and automatically decompress this for you when you get the response stream.

    Update: on the comments there is a suggestion that Deflate is another option you can use, and you can combine both GZip + Deflate on the flags above.

    Update2: Dennis Dietric emailed me to point out an important bit: if the server side does not support GZip or Deflate content, you will could get a 406 return code, so when dealing with third party web sites you need to be prepared to fall back and retry your request without compression in place. The relevant sections of rfc 2616 are 10.4.7, 14.1 and 14.3.

    Posted on 09 Jul 2010


    Microsoft MS-PL code in Mono

    by Miguel de Icaza

    Over the past couple of years Microsoft has been open sourcing some key .NET libraries under the MS-PL or Apache 2 license.

    We are tremendously grateful to Microsoft for making these components open source. This has allowed us to distribute this in the past, and we are going to be bundling a lot more of it with Mono 2.8:

    In Mono 2.8, the following assemblies and code come from Microsoft:

    With Mono 2.8 we are going to default to the .NET 4.0 profile. So from the list above MEF, the DLR, OData and MVC2 become first class citizens in Mono-land, no longer third-party packages that you needed to install.

    Update: as of July 17th 2010, the DLR, IronPython and IronRuby changed their licenses from MS-PL to Apache2.

    Posted on 07 Jul 2010


    First MonoTouch Book is out

    by Miguel de Icaza

    I am very excited to see the first MonoTouch book published.

    You could not ask for a better team of authors to explain the MonoTouch and the iPhone platform. Chris, Craig, Martin, Rory, and Wally.

    This book was a team effort by various active members of the MonoTouch community. They nurtured the community from the start by exploring MonoTouch, by reporting bugs and missing functionality in MonoTouch and by guiding .NET developers through the new world of building iPhone applications.

    Congratulations on the book release guys!

    You can find them here:

    Posted on 06 Jul 2010


    Pinta 0.4 Released

    by Miguel de Icaza

    Jonathan Pobst has released a new version of his paint program, Pinta, a lightweight app that runs on Linux, OSX and Windows and is built entirely using Gtk#.

    In this version, Jonathan added the MonoDevelop docking library to allow users to reorder the editing tools to match their workflow:

    There are ready-to-run packages available for Windows, OSX, Ubuntu and OpenSUSE.

    Posted on 06 Jul 2010


    TweetStation: Elevating the Discourse

    by Miguel de Icaza

    (See below for Updates).

    TweetStation is my first native iPhone app (as opposed to my award-winning HTML5-app iCoaster). More screenshots can be seen here

    Just like Rails, TweetStation is an opinionated Tweeting client, it contains my personal blend of features that I enjoy from other twitter clients, but also tries to do something about changing the world.

    TweetStation has been designed to elevate the level of discourse on Twitter.

    At a conceptual level, this is achieved by applying the cardinal rule of not taking anything too seriously, specially any interactions you might have online.

    At a practical level this is achieved with two features. The first feature plays back chicken noises whenever you request more Tweets (this is bound to the Tweetie-like "Pull to Refresh" feature). These chicken noises have been engineered to remind you that no matter how important an argument appears to be in Twitter, you should not take it too seriously.

    Additionally, the chicken-noise-on-refresh serves as a cue to other people talking to you that you rather see what @jacksonh, or @Mickey__Rourke have to say than hear them parrot back the physics of clouds wikipedia page that they just read twenty minutes ago.

    When you compose a message with TweetStation music starts playing back in the background. This music was specially selected to elicit in you the desire to write a witty and clever response as opposed to the usual "well, fuck you too" response seen too often on social media sites. The result will be the kind of tweet that your local newspaper would publish in the front page, or in their "Social Media Expert" column.

    But there is an elephant in the room, and I want to speak directly about it. Many Twitteristas are concerned about the Tweetpocalypse and Twitter's transition to use some bizarro world non-feature called OAuth.

    Tweetstation is feature packed and does not suffer from either problem. You can trust that Tweetstation was developed using the best engineering techniques available today, and that you will never be the victim of the Tweetpocalypse and be left incommunicado due to some silly programming mistake. Not in this 32-bit century, not in the next, and not under my watch. If my years of experience taught me one thing is and one thing only, it is when to use a 32-bit integer data type and when to use a 64-bit one. Do not fear dear user, I also master many other data types, but I digress.

    But you might be wondering, why another Twitter client, and why now? As a twitterista you know that there is a special bond, an intimate bond if you will, between the twitterista and his twitter client. This bond can exist as long as both the twitterista and the twitter client grow hand in hand, if they co-develop. And I found myself at odds with the design decisions and paths that other twitter clients were taking. In a metaphorical way, I felt uncomfortable, like a Woody Allen character under pressure. But a character that lacked Woody Allen's command of the language.

    And this is how TweetStation was born, it was a labor of love, but mostly of social awkwardness when my friends mocked my Twitter client for lacking a chicken noise, or when they suggested things at dinner like "would it not be cool if...". I decided to change all that, and make sure that other twitteristas in the future did not feel the social scorn that I had gone through, and this is why TweetStation's source code is on github.

    Getting TweetStation

    You can get TweetStation from iTunes.

    Activating the Chicken Noises

    By default, the chicken noises are off. To turn on this features, go to "Settings" and in the "Poultry" section set "Chicken Noises" to the "ON" position.

    TrollStation Pro vs TweetStation

    Since this is going to become a FAQ, I wanted to address this here.

    I have two sets of keys that I got from Twitter to access the service using OAuth. One set of keys is the regular set of keys that anyone can get, and I attached the name "TrollStation Pro" to that one. This set of keys is what I placed on the public code on GitHub, so anyone can try and anyone can use. I reserve the right to change that name on a day-by-day basis depending on what I consider to be funny that particular day.

    The second set of keys are labeled as "TweetStation" and that one is used for the actual application on the AppStore. These keys are special because Twitter was kind enough to give me access to their service using "xAuth" which improves the login experience (no web browser is involved).

    Retina Display

    TweetStation was submitted to Apple before I could get my hands on an iPhone4, so it is missing the high-resolution artwork. I just submitted a build that contains high-resolution icons for the iPhone4.

    Updates

    Login bug: There is a login bug if your password contains any special characters. I have submitted a bug fix to Apple (including the Retina display update). For now you can work around this issue by changing your password to use letters and numbers.

    Posted on 01 Jul 2010


    Guadec this year.

    by Miguel de Icaza

    This year I will be skipping the Guadec conference. Like Ted Gould we are expecting our first baby this year around the same time that Guadec will take place.

    The good news is that next year any of you attending my talk at Guadec 2011 will get to enjoy a presentation packed with baby pictures.

    I wish a happy Guadec to all the Gnomers attending!

    Posted on 30 Jun 2010


    What I would do if I was in charge of Windows 8

    by Miguel de Icaza

    Apple and its AppStore did for software programmers what Google's AdWord did for bloggers and writers: it provided a mechanism for people to make money while doing what they love.

    The AppStore takes a big weight from the shoulders of software developers by taking care of the distribution and billing system.

    If I was in charge of the Windows 8 future (or MacOS for that matter), I would try to reproduce that formula on my mainstream operating system. And it seems from the leaked presentations that this is where Microsoft's head is.

    The leaked mockups for the AppStore are creative, but the entire slide deck misses the fundamental point that people are scared of installing software on Windows.

    Everyone is scared of installing applications on Windows either because they break the system or because you might be accidentally installing malware. In either case, the end result is countless wasted hours backing data up, reinstalling the operating sytem and all the applications.

    An AppStore wont fix this.

    For a Windows appstore to work, they need to guarantee that installing software wont ever break the system.

    They need to produce an appliance that allows users to install and remove software in seconds, and yet, guarantee that installing and removing apps will never break the system. This is not a problem that can be solved by hiring an army of curators and people that just sit all day rejecting apps.

    To solve the problem, Microsoft needs to both alter their kernel to ensure the safety of the host OS and come up with a new way of distributing applications. They need:

    • A sandboxed execution system.
    • Self contained applications, fully embedded in a single directory that require no installation.
    • A set of supported APIs that will run in the Sandbox execution system.
    • A public contract for extension points.

    The Sandboxed Execution System: would prevent applications from touching the registry, installing any drivers, any hooks, any visualizers or any other deep integration features that applications typically use to integrate with the OS.

    The sandboxed execution system would prevent applications from looking at the file system, except for locations that have been predetermined for sharing.

    The kernel would have to enforce what files they get access to, what devices and what components they get access to. And should be set to a bare minimum.

    Self Contained Applications would be required to install software from the network, or from their appstore. These applications would get absolutely no rights to modify anything outside their directory. Any extension points that they could register with the system ("open with") would have to be registered with the public extension point contract.

    Public Contract for Extension Points Any extension points like "open with", or handlers for mime-types would be self contained in a manifest in the application directory.

    Instead of having every app poking at the system registry and dumping their junk everywhere, applications would list all of their requirements from the operating system on the manifest and the OS would rebuild its internal data from all of the application manifests available from a user.

    Limited APIs: File access APIs, display access APIs would have to be altered to give applications limited access to the host operating system, and to give them as little access to anything that most applications do not need.

    The above obviously does not apply to frameworks like the .NET framework, Java or Adobe's AIR. But beyond frameworks, there are very few cases where an application really should have legitimate access to all of the features in the OS. Video games certainly do not need it, and even applications like Visual Studio would not need it.

    Posted on 28 Jun 2010


    Moonlight 3.0, Preview 7

    by Miguel de Icaza

    Chris Toshok has just announced our 7th preview of Moonlight 3.0. You can get it from our preview site.

    What is new in this release:

    • Roughly API complete to SL4.0 beta. Next preview will be API compatible with SL 4.0 RTW.
    • Video capture support, but support for pixel formats is sparse. right now the supported formats are YUYV and YV12/YUV420 (planar).
    • SSE2 fast paths for gradient fills in the embedded pixman/cairo, this improves performance significantly as some people seem to have discovered the use of gradients.
    • Fixes for chrome support and to our curl bridge.
    • Several html bridge fixes.
    • element to element binding.
    • Client HTTP stack
    • cascading (BasedOn) styles are now supported
    • new right-click dialog so we can (finally!) managed isostore usage.

    Posted on 18 Jun 2010


    Infragistics Announces Support for Mono

    by Miguel de Icaza

    Today Infragistics announced that their NetAdvantage for ASP.NET will support Mono out of the box.

    We loved working with Infragistics on this project, and I am very proud of the work that the Mono team did to get these fabulous controls working with Mono.

    You can read more about Infragistics and Mono on Infragistics site where you can also try out some of their sample applications running on Linux with Mono.

    From the press release:

    "In recent years, our customers have indicated that their organizations are moving to mixed IT environments and require UI tools that enable them to deploy applications in either Windows or open source environments," said Dean Guida, CEO of Infragistics. "With Mono compatibility in our ASP.NET toolkit, we enable developers who have a need for open source development to create UIs that are the basis for Killer Applications and deliver the best user experiences possible."

    Infragistics ASP.NET toolset excels in top performance, flexibility and usability and enables developers to build rich Web applications for line of business. By providing full compatibility with the Mono runtime, Infragistics extends this functionality to the Mono community.

    Coinciding with today's NetAdvantage for .NET 2010 Volume 2 availability, Infragistics highlights the ASP.NET toolkit's Mono compatibility through Sample Showcase hosted on a live Linux Server running Mono: http://mono.infragistics.com/

    For us this is a very important milestone as developers building .NET applications need to complement the core framework with packaged components like the ones that Infragistics provides.

    It also shows the maturity of the project, as commercial ISVs start supporting more Mono on Linux.

    Posted on 16 Jun 2010


    We have released MonoDevelop 2.4

    by Miguel de Icaza

    We have finally released MonoDevelop 2.4. You can read a high-level description of the changes or see screenshots with the details. I would go for the screenshots myself.

    We made packages for OpenSUSE, SLES, Windows and MacOS X. For other Linux distributions, you should consult with your favorite package provider or you can build it yourself from sources.

    Congratulations to the team. They not only improved the UI and the editing experience, but they support Gtk#, ASP.NET MVC, Silverlight, MonoMac and MonoTouch deployments from the same IDE. We have also added support for WCF references and T4 macro processing.

    Next Steps for MonoDevelop

    For the next release we have a couple of big goals in mind for MonoDevelop:

    • Git support, using GitSharp.
    • Mono on Android support (debugging, templates, deployment).
    • Templates and support for MVC2.

    Support for Foo is missing

    As you can see from our list of MonoDevelop Tasks there are plenty of tasks that currently have nobody assigned to. This includes even popular features like F#, IronPython, IronRuby or PHP support.

    We have limited resources and a huge wish-list. If you want to help us take on any of those tasks, please join us on IRC at irc.gnome.org on channel #monodevelop, or join our mailing lists.

    Posted on 16 Jun 2010


    Road to MonoDevelop 2.4: Navigation

    by Miguel de Icaza

    Perhaps my favorite feature in MonoDevelop 2.4 is the "Navigate To" functionality that we added. This new feature is hooked to Control-comma on Linux and Windows and to Command-. on Mac.

    This feature lets you quickly jump to a file, a class or a method:

    I used to navigate between my files by opening then from the solution explorer, and then using Control-tab or the tabs. Needless to say, the old way just felt too clumsy for a fast typist like me.

    With Navigate-To, I can just hit the hotkey and then like I would in Emacs, type the filename, type or method and jump directly to the method. This is fabulous.

    This will also search substrings, so you can either start typing the name of a method or you can fully qualify the method (for example: "Vector.ToString").

    But it gets better, you can use abbreviations, so instead of typing "DialogViewController" you can just type "dvc":

    BREAKING UPDATE Michael just told me of a cute extra feature: if your match is for a filename, if you type ":NUMBER" it will jump to the selected file to the specified line number.

    The result:

    Posted on 14 Jun 2010


    Conditional Attribute

    by Miguel de Icaza

    One cute feature of C# 1.0 was the introduction of the Conditional attribute. When you apply the conditional attribute to a method, calls to this method are only included in the resulting code if the appropriate define is set.

    For instance, consider:

    	[Conditional ("DEBUG")]
    	void Log (string format, params object [] args)
    	{
    		Console.WriteLine (String.Format (format, args));
    	}
    	

    Calls to Foo.Log become no-ops unless you pass the -define:DEBUG command line option to the compiler.

    What is interesting about this compiler-supported feature is that that the code inside the method Log is checked for errors during compilation as any other regular method. They are first class citizens.

    Posted on 12 Jun 2010


    My first iPhone app

    by Miguel de Icaza

    I am proud to introduce my first iPhone App built entirely using standard HTML5 technologies.

    I felt that I had to go with HTML 5 as I did not want to write the app once for the iPhone and once for the Android. I am also open sourcing this application in its entirety, to help future generation of mobile HTML 5 developers learn from my experiences and hopefully help them write solid, cross platform mobile applications using HTML 5.

    I use this app every time we go to a pub, or when we are having lunch at the Cambridge Brewing Company.

    Before you check it out, my lawyer has advised me that I need to add the following disclaimer:

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    I give you: iCoaster.

    Stay tuned for my Cheese Table app, coming soon to the iPad.

    What People Are Saying about iCoaster!

    From my survey on iCoaster for iPad:

    "I am currently resorting to use my four iPhones to create one giant iCoaster; this is ridiculous. Need iCoaster HD!!!!"

    "Buying an iPad every time I want to put a drink down is expensive, though it is better than getting those little rings all over my shiny new table."

    "Four coasters per iPad would be ideal"

    "Please keep up the great work. Not sure what I would do without this app, would at least have a lot of ruined coffee tables."

    Sadly, we do have some bugs being reported, and I can assure everyone that I am working around the clock to fix these issues. Ensuring that iCoaster is reliable is my top priority:

    "If I put my drink on iCoaster, and then rotate my phone to the landscape orientation, my drink gets spilled onto my lap. Please fix this in the iPad version."

    Survey Results as of 14:50 EST

    Updates

    Update: We have confirmation that it works on WebOS and Blackberry as well. HTML5 FTW!

    Update 2: Due to popular demand, I am launching an effort to bring iCoaster to the iPad. If you want to participate in the beta for iCoasterHD, please fill in this survey, your feedback will help me prioritize features.

    Update 3: iCoaster works on walls too: http://yfrog.com/c9wlkogj.

    Update 4: For those of you complaining about the missing DOCTYPE Geoff Norton has done what any honorable open source contributor would have done: he forked iCoaster and made it HTML "compliant": icoaster-fork.

    Update 5: After today's brouhaha over Apple's HTML 5, Mike Shaver from Mozilla talks about the elephant in the room.

    Update 6: iCoaster's HTML 5 fork has been forked to support full-screen on WebKit and Opera browsers.

    Update 7: We have a Silverlight port! This enables iCoaster to run on the upcoming Windows Compact Edition Media 7 Series Phone Embedded Release Plus Pro Advanced.

    Update 8: We got a Unity port of iCoaster, and showing true open source spirit, sethillgard open sourced the code.

    Posted on 04 Jun 2010


    First Beta of MonoTools 2 for VisualStudio

    by Miguel de Icaza

    Last week we released our first beta for the upcoming MonoTools2.

    There are four main features in MonoTools 2:

    • Soft debugger support.
    • Faster transfer of your program to the deployment system.
    • Support for Visual Studio 2010 in addition to 2008.
    • Polish, polish and more polish.

    Getting Started

    Download our betas from this page. On Windows, you would install our plugin for either 2008 or 2010 and you need to install Mono 2.6.5 on the target platform (Windows, Linux or MacOS).

    On Linux, run `monotools-gui-server' or `monotools-server', this will let Visual Studio connect to your machine. Then proceed from Windows.

    On MacOS, double click on the "MonoTools Server" application.

    Once you run those, MonoTools will automatically show you the servers on your network that you can deploy to or debug:

    ASP.NET debugging with this is a joy!

    Soft Debugger

    This release is the first one that uses our new soft debugger. With is a more portable engine to debug that will allow our users to debug targets other than Linux/x86 for example OSX and Windows.

    This is the engine that we use on MonoTouch and that we are using for Mono on Android.

    Our previous debugger, a hard debugger, worked on Linux/x86 systems but was very hard to port to new platforms and to other operating systems. With our new soft debugger we can debug Mono applications running on Windows, helping developers test before moving to Linux.

    Faster Transfers

    When you are developing large applications or web applications, you want your turn around time from the time that you run hit Run to the site running on Linux to be as short as possible.

    Cheap Shot Alert: When dealing with large web sites, we used to behave like J2EE: click run and wait for a month for your app to be loaded into the application server.

    This is no longer the case. Deployments that used to take 30 seconds now take 2 seconds.

    Support for Visual Studio 2010

    Our plugin now supports the Visual Studio 2010 new features for plugin developers.

    This means you get a single .vsix package to install, no system installs, no registry messing around, no dedicated installers, none of that.

    The full plugin installs in 3 seconds. And you can remove it just as easily.

    Then you can just from VS's Mono menu pick "Run In Mono" and pick whether you want to run locally or remotely.

    We now also support multiple profiles, so you can debug from Visual Studio your code running on Linux boxes, Mac boxes or your local system.

    Polish and more Polish

    MonoTools was our first Windows software and we learned a lot about what Windows developers expected.

    We polished hundreds of small usability problems that the community reported in our last few iterations. You can also check our release notes for the meaty details.

    Appliances

    And we integrate directly with SuseStudio to create your ready-to-run appliances directly from Visual Studio.

    Posted on 03 Jun 2010


    Linux for Consumers: MeeGo Updates

    by Miguel de Icaza

    Excited to see the work happening on the Linux consumer space in the MeeGo Universe. There is now a MeeGo 1.0 download available for everyone to try out.

    At Novell we have been contributing code, design and artwork for this new consumer-focused Linux system and today both Michael Meeks and Aaron Bockover blog about the work that they have been doing on MeeGo.

    These screenshots are taken directly from Aaron's and Michael's blog posts. Aaron discusses the new UI for the music player Banshee and Michael discusses the new UI for the Email/Calendar program.

    Media Panel in MeeGo

    You can still get access to the full Banshee UI themed appropriately:

    Themed MeeGo UI for Banshee

    Check Aaron's blog for the details on the design process and the new features coming out for it.

    Then, on the Evolution side of things Michael discusses Evolution Express a renewed effort to make Evolution suitable for netbooks. The work done there is amazing, here are some screenshots:

    Evolution Express on MeeGo

    Just like Banshee, Evolution now integrates with MeeGo panels, like this:

    Summary of your tasks on the MeeGo Panel

    This is what the new preferences panel looks like:

    Themed MeeGo UI for Banshee

    And finally the calendar:

    Evolution Express Calendar on MeeGo

    Third Party Applications

    You can also run existing Mono applications on MeeGo. I give you the photo management application F-Spot:

    F-Spot on MeeGo

    And this is Jonathan's Pinta painting program built on Mono with Gtk#:

    The Mono-based paint program Pinta

    Pinta is fascinating as it shows how much punch can be packed by CIL code. Pinta and all of its effects use 328k of disk space and for distribution it only takes 108k of disk space.

    Development Tools

    And we are of course very happy to be supporting developers that want to target MeeGo using Windows, Mac or Linux with our MonoDevelop plugin for MeeGo.

    If you are more of a Visual Studio developer, our upcoming MonoTools for Visual Studio 2.0 will also support developing applications for MeeGo from Windows.

    MeeGo

    I am blown away by the way that everyone involved in MeeGo has been able to execute on the vision of bringing Linux to the consumer space by the way of the netbook.

    Kudos to everyone involved.

    Posted on 27 May 2010


    MonoDroid - Mono for Android Beta Program

    by Miguel de Icaza

    We are hard at work on MonoDroid -- Mono for Android -- and we have created a survey that will help us prioritize our tooling story and our binding story.

    If you are interested in Monodroid and in participating on the beta program, please fill out our Monodroid survey.

    Here is what you can expect from Mono on Android:

    • C#-ified bindings to the Android APIs.
    • Full JIT compiler: this means full LINQ, dynamic, and support for the Dynamic Language Runtime (IronPython, IronRuby and others).
    • Linker tools to ship only the bits that you need from Mono.
    • Ahead-of-Time compilation on install: when you install a Monodroid application, you can have Mono precompile the code to avoid any startup performance hit from your application.

    We are still debating a few things like:

    • Shared Full Mono runtime vs embedded/linked runtime on each application.
    • Which IDE and OS to make our primary developer platform. Our options are VS2010, VS2008 and MonoDevelop and the platforms are Windows, OSX and Linux.

      We are currently leaning towards using VS2008/2010 for Windows during the beta and later MonoDevelop on Linux/Mac.

    Like we did with MonoTouch, we will bring developers into the preview in batches of 150 developers, please enter enough information on the "comments" section if you want to be in the early batches.

    Posted on 21 May 2010


    Group Completion in MonoDevelop 2.4

    by Miguel de Icaza

    In our Beta for MonoDevelop 2.4 we introduced a new feature designed to help developers better explore a new API.

    Many developers use the IDE code-completion as a way of quickly navigate and explore an API. There is no need to flip through the documentation or Google for every possible issue, they start writing code and instantiating classes and the IDE offers completion for possible methods, properties and events to use as well as small text snippets describing what each completion does as well as parameter documentation:

    With MonoTouch, we were dealing with a new type hierarchy, with new methods. We found that our users wanted to explore the API through code completion, but they wanted more context than just the full list of possible options at some point.

    For example, the UIButton class has this hierarchy:

    Looking through the methods, properties and events of this class can be confusing, as for the UIButton class there were some 140 possible completions that came from the complete hierarchy. Sometimes the user knows that the method they want is a button-specific method, and as fascinating as UIResponder, UIView or UIControl might be, the method they are looking for is not going to be there.

    With MonoDevelop 2.4 we introduced a new shortcut during code completion that changes the completion order from alphabetic to grouped by type, with completions from the most derived type coming up first:

    To switch between the modes you use Control-space when the popup is visible. You can use shift-up and shift-down to quickly move between the groups as well.

    I have been using this feature extensively while exploring new APIs.

    Posted on 09 May 2010


    MonoDevelop's New Search Bar

    by Miguel de Icaza

    MonoDevelop 2.4 was a release in which we focused on improving the ergonomics of the IDE. We did this in dozens of places and we did this by dogfooding the IDE and comparing it to other tools and environments that we have been using.

    With MonoDevelop 2.0 and earlier we used a dialog box like most other GUI applications from 2005. The dialog would remain on top of the text and the user would press next, and move the dialog box around as the matches were found.

    In the current MonoDevelop (2.2) we adopted a more Firefox-like UI, this is what the search bar looks like:

    We have a relatively big bar at the bottom of the screen, big labels, a drop down for picking previously searched items and an options menu that would let users pick manually case sensitivity, whole world matching or toggling regular expressions.

    This took too much space, in a prime location of screen real estate. Additionally, the features although present were hard to pick. You would start an incremental search with Control-f but if you wanted to change the settings, you would have to use the mouse to access the options menu. If you later changed your mind, you would have to change the defaults again.

    With the new release of MonoDevelop (2.4) we have changed this again, this time adopting the Google Chrome search bar and done a few other usability changes:

    The first thing to notice is that instead of taking valuable horizontal space in the form of a full row, we now only take a corner of the screen, and we take it on the top right corner which is less likely to contain the information you are looking for as you search forward.

    Case sensitivity searches now use the same model used by Emacs. If you start searching for a term and you type only lowercase letters, the search will be case insensitive.

    Searching for "thread" will match "thread", "Thread" or "THREAD". But if at any point during the search you type an uppercase letter, then the search for this particular activation will switch into case-sensitive search. Searching for "Thread" will only match the word "Thread" and not "thread" or "THREAD".

    And we also highlight matches like some Mac applications do, all matching words in the screen are highlighted, and the current match gets both a brighter color as well as a bubble that inflates and deflates on every match.

    The replace functionality is built into this new UI, and is accessed either with a hotkey (Control-H) or by clicking on the left-side icon:

    Just like Google Chrome, we use a watermark to show the number of matches in the document.

    MonoDevelop 2.4 is packed with new features, and I hope to blog about some of the design decisions of the new feature as time permits. In the meantime, check out the list of new features in the Beta for MonoDevelop 2.4.

    Posted on 06 May 2010


    Pinta 0.3 is out

    by Miguel de Icaza

    Jonathan Pobst has announced the release of Pinta 0.3:

    Live Preview

    Pinta is a lightweight paint application for Linux, OSX and Windows written entirely in C# and using the Gtk# toolkit for its user interface. From the FAQ:

    Is Pinta a Port of Paint.NET?

    Not really, it's more of a clone. The interface is largely based off of Paint.NET, but most of the code is original. The only code directly used by Pinta is for the adjustments and effects, which is basically a straight copy from Paint.NET 3.0.

    Regardless, we are very grateful that Paint.NET 3.0 was open sourced under the MIT license so we could use some of their awesome code.

    Jonathan further adds that this release is very close to feature parity with the original Paint.NET.

    Posted on 03 May 2010


    CLI on the Web

    by Miguel de Icaza

    In the last few days Joe Hewitt has been lamenting the state of client side web development technologies on twitter. TechCrunch covered the progress in their The State Of Web Development Ripped Apart In 25 Tweets By One Man.

    Today Joe followed up with a brilliant point:

    joehewitt: If CLI was the ECMA standard baked into browsers instead of ECMAScript we'd have a much more flexible web: http://bit.ly/sLILI

    ECMA CLI would have given the web both strongly typed and loosely typed programming languages. It would have given developers a choice between performance and scriptability. A programming language choice (use the right tool for the right job) and would have in general made web pages faster just by moving performance sensitive code to strongly typed languages.

    A wide variety of languages would have become first-class citizens on the web client. Today those languages can run, but they can run in plugin islands. They can run inside Flash or they can run inside Silverlight, but they are second class citizens: they run on separate VMs, and they are constrained on how they talk to the browser with very limited APIs (only some 20 or so entry points exist to integrate the browser with a plugin, and most advance interoperability scenarios require extensive hacks and knowing about a browser internal).

    Perhaps the time has come to experiment embedding the ECMA CLI inside the browser. Not as a separate plugin, and not as a plugin island, but as a first-class VM inside the browser. Running side-by-side to the Javascript engine.

    Such an effort would have two goals:

    • Access to new languages inside the browser, optionally statically typed for major performance boosts.
    • A new platform for innovating on the browser by providing a safe mechanism to extend the browser APIs.

    We could do this by linking Mono directly into the browser. This would allow developers to write code like this:

    <script language="csharp">
    from email in documents.ElementsByTag ("email")
    	email.Style.Font = "bold";
    </script>
    	

    Or pulling the source from the server:

    <script language="csharp" source="ImageGallery.cs"></script>
    

    We could replace `csharp' with any of the existing open sourced compilers (C#, IronPython, IronRuby and others).

    Or alternatively, if users did not want to distribute their source and instead ship a compact binary to the end users, they could embed the binary CIL directly:

    <script language="cil" source="MailApp.dll"></script>
    	

    Pre-emptive answer to the "view-source" crowd: you can use .NET Reflector to look at the source code of a compiled binary. If it is obfuscated, you will enjoy reading that as much as you would enjoy reading any Javascript in the real web.

    Embedding the CIL on the browser would create isolated execution environments for each page (AppDomain in ECMA parlance) and sandbox the execution system.

    The security model exposed by Silverlight exposes exactly what is needed to go beyond a language-neutral runtime. The security model distinguishes between untrusted code which is subject to verification, strict requirements on what it can do and limits what they can do from "platform" code that is trusted.

    Trusted platform code is granted special permissions that untrusted code is not given. The runtime enforces that no untrusted code can call into any security sensitive and protected areas.

    This would allow browser vendor to expose new APIs that get full access to the underlying operating system (for example getting direct access to special hardware on the system like microphones and camera) while enforcing that the user code accesses them only through safe gateways.

    This is very important to allow developers to try out new trusted APIs: new UI models, rendering systems and APIs built entirely on the same core.

    I am absolutely fascinated by the idea and I only regret not having come up with it. We have been too focused on the Moonlight-as-a-plugin to take a step back and think in more general terms: how can we use the ECMA CIL engine for *all* applications without a browser plugin.

    Joe like many of us is conflicted between the power of reach that the web has versus the polish and speed that native GUI toolkits deliver.

    Althought Silverlight provides a nice UI system inside the plugin, Joe's point is that we need a platform in which we can more quickly innovate new UI ideas, and probably completely different new ideas quickly. And with the ECMA sandbox model we can start testing new ideas without waiting for browser vendors to add the features themselves and we can make the integration between these plugins and the browser stronger than they have ever been.

    The plugin model does not provide the necessary tools to drive more innovation in the web. We need a new model, and I am ready to start prototyping Joe's idea.

    The only question is what browser to target first Firefox or Chrome.

    Gestalt

    Gestalt allows developers to use the CLI inside the browser and it shows what can be done with other languages in the browsers. It requires Silverlight to run and the interaction between the code and the browser is limited in the level of integration that can be achieved via the browser-plugin interface.

    This solves only the half the problem: multi-languages and does it in a limited way.

    Resources

    You can learn more about the security model in my previous blog post.

    Our open source Silverlight implementation.

    Posted on 03 May 2010


    MonoTouch and Apple's Section 3.3.1: Two Theories

    by Miguel de Icaza

    Before April 8th, developers targeting the iPhone had to deal with this section:

    3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.

    The above is a pretty reasonable requirement as it gives Apple the chance to not have to maintain and support internal APIs, temporary APIs or APIs that have not fully matured.

    When iPhoneOS 4.0 was announced, the wording was changed to:

    3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

    This spelled disaster for many developers that had chosen to use other programming languages like C#, Delphi, Lua, Python, Javascript, Java, Scheme, ActionScript and a handful of others. It also put a stop to porting efforts for languages like Eiffel and other industrial languages that can be used on the iPhoneOS and the iPad.

    Much of the discussion for the rationale of these changes on the blogosphere has centered around personal language preferences. They amount to little more than the usual discussions of Mac vs PC or Emacs vs VI.

    When Greg from Tao Effect discussed this with Steve Jobs his reply shed light into the reason. There is a business reason, and possibly a UI reason. Here are my theories.

    Theory #1: The Business Case

    With the iPhone Apple revolutionized the phone market in a way that nobody had planned for. Microsoft, Nokia, RIM, HTC and everyone else was left to catch up with the user experience and the operating system. One year after the iPhone took the world by surprise, Apple opened up the developer stack, launched the AppStore and leapfrogged every competitor in the field.

    Apple had the first mover advantage in a space that they created: the high-end smart phone market.

    The problem that Apple faces is that now every competitor has a blueprint of what they need to aim for. Competitors now know what the minimum required user experience and features required are. And they all likely have plans on how they can differentiate themselves and add features that Apple does not have.

    And this is where Adobe enters the picture.

    Flash and Flex have a huge user base of developers that have been building web and desktop applications for the past few years.

    Although Flash applications on the iPhone do not look and act like native iPhone applications they are useful for a certain class of development. It would very likely attract Flash developers to the iPhone, but also Objective-C developers to Flash. Developers that probably are not interested in creating UITableViews or using the low-level APIs, but wanted to focus more on the interactive content creation or exploring new UI ideas or games.

    Flash's killer feature would be that the same code that ran on the iPhone would run on many devices with minimal changes. The applications do look alien on every platform, but not every application needs to use native controls. Games, storyboards, marketing tie-ins and a whole new class of ideas do not need a native UI.

    Flash would erode some of Apple's first mover advantage in the market they created. So section 3.3.1 was added to protect Apple's shareholder's interests.

    Apple being the #1 platform for mobile applications and being the largest distribution channel for those applications probably felt that it would be ok to do.

    Eventually, Android, Windows Mobile 7 and Nokia will catch up in terms of UI with Apple. It might take a few years before there is a marketplace as large as Apple's AppStore and a few years before these phones catch up to Apple's dominance in the space.

    My prediction is: When those platforms do catch up to Apple in terms of market share and applications Apple will lift the restrictions on section 3.3.1. Apple at that point will have nothing left to lose and everything to gain. Adobe will also bring Flash back to the iPhone as it will be a nice bump in revenues.

    Theory #2: The UI

    As I mentioned before, using cross-platform solutions like Flash or Silverlight would make every application look alien. But also like Steve Jobs alluded to, developers would not have access to new features on the iPhoneOS if they had chosen a technology that did not expose it.

    For example, when Apple introduced in iPhoneOS 3.2 the new split views that the iPad uses extensively when rotating your screen, that functionality would have taken too long to bring in a satisfactory way to say Silverlight on iPhone or Flash on iPhone. Or when Apple introduced the UIView that can be used to render maps, it would also have been challenging to embed this control. Or when Apple introduced GameKit, an API to connect iPhones and exchange messages between them.

    As a developer, I feel that I should be responsible for my technological choices. If I pick a cross-platform toolkit that looks horrible on the iPhone, it will just leave the space open for a competitor to do a better job. Or if my application does not take advantage of a new API in iPhoneOS, I am also leaving a flank open for a competitor to take over. Apple does not need to intervene with guidelines as the application quality, the AppStore, magazines, reviews and word of mouth are creating the conditions for an all-out darwinian survival of the fittest.

    Why MonoTouch has been misrepresented

    MonoTouch has been misrepresented, initially by Gruber and by most people covering the debate over section 3.3.1. Probably because few of them have actually used MonoTouch or because they are not familiar with .NET. Probably folks think that MonoTouch is .NET, and .NET is Microsoft's Java and draw their own conclusions.

    MonoTouch brings the C# language and the core of .NET to the iPhone, but does nothing to provide a cross-platform UI experience or for that matter any sort of mobile device cross-platform APIs.

    We bring the C# language, garbage collection, a type safe system that help reduce errors, make programmers happier and more productive on the iPhone while getting access to every single iPhoneOS API that they want to.

    We have also been able to expose new APIs that Apple has exposed in record time thanks to the fact that we are not really an abstraction layer over the iPhoneOS, but merely a compiler that talks to the native APIs.

    We released the iPad support 24 hours after Apple released the SDK. We released the iPhoneOS 4.0 support within days of the release (mostly because every one of us was pretty bummed out). Our APIs are a 1:1 mapping to the iPhone APIs.

    Just like C and C++, if developers want to reuse code between MonoTouch, Windows 7 or MonoDroid, they will have to split their UI and device-specific code from their business logic. MonoTouch does not provide such an abstraction layer.

    The "core of .NET" that I refer to previously means: garbage collection, type safety, the platform-invoke bridge, file and networked streaming APIs (contrast with the iPhone ones), XML and Json libraries, Language Integrated Query, access to web services and the ability to reuse hundreds of GUI-less libraries that have been created for .NET.

    We believe that MonoTouch does not erode Apple's first mover advange and nourishes the iPhone ecosystem by giving developers and users the native iPhoneOS experience.

    Posted on 28 Apr 2010


    Mono's C# Compiler as a Service on Windows.

    by Miguel de Icaza

    The Mono team is proud to bring you a preview of C# 5.0 a few years before our friends in Building 41 do.

    A snapshot of the code is available in the demo-repl.zip file. This contains the csharp.exe C# REPL shell and the Mono.CSharp.dll compiler-as-a-service assembly.

    With Today's code drop all those scenarios now work:

    • Run Mono's C# compiler on .NET
    • Embed Mono's Evaluator in your C# app.
    • Use Mono's REPL with the .NET framework runtime.

    Update April 28th: I have now uploaded a new version that fixes the bug that people were getting when importing other libraries. Thanks to Marek for the rapid fix.

    Background

    Although we have had a compiler-as-a-service framework since September of 2008 it has been so far limited to Mono users, which effectively means only Linux and OSX users could use our C# REPL and the compiler as a service.

    The reason is that the Mono's C# compiler uses System.Reflection.Emit as its code generation backend. This API was fine for implementing C# 1.0 but required a few changes to support compiling its own core library (mscorlib, the equivalent of libc in C or rt in Java).

    When we started to work on our C# 2.0 support, we were working on our compiler as the language was being standardized at ECMA. Our compiler evolved faster than the underlying support for Reflection and Reflection.Emit did and this lead to more Mono-specific extensions being added to our Reflection and Reflection.Emit code. The more extensions that we depended on, the fewer chances we had of running with Microsoft's runtime.

    As time went by, Microsoft did improve their System.Reflection.Emit, but at that point, it was too late for us to go back to it.

    This had the unfortunate side effects that our compiler could not run on the Microsoft runtime. Now, this per se is not a major problem since Windows users likely use Microsoft's CSC compiler.

    But this also meant that our awesome compiler as a service could not be used by .NET developers and it also meant that our REPL shell could not be used with .NET and most importantly, neither one would run on Silverlight.

    Our compiler also relied heavily on our extended System.Reflection and System.Type as its own type system. And we could not just change our APIs for Microsoft's APIs to run on the Microsoft runtime.

    Today's commit at the coref replaces our dependency on System.Type and introduced our own Mono.CSharp.TypeSpec which lifts many of the restrictions that we had on System.Type. All of the hard computations that we had to do for inflating generics types are done here now and we can query the types without the backward Reflection limitations.

    With today's changes, not only we became more portable, but the move from System.Type to TypeSpec and MemberCache improved the compiler performance by 30% and fixes dozens of bugs that were very hard to fix with the previous compiler architecture.

    REPL Love

    We have a small guide on using the C# REPL on Linux.

    Caveat: both the Microsoft and the Mono C# compilers loads libraries from their "base directory", never from the Global Assembly Cache.

    In Mono, the csharp command happens to be in the same directory as the rest of Mono, so loading implicit libraries just works (Loading System.Core for example). But when running our csharp command on Windows, unless you put the binary in the same location as csc.exe the REPL wont be able to load libraries using their short names.

    This is particularly obnoxious because to use LINQ you need to use the full assembly name, or copy csharp.exe to the directory that contains System.Core so you can just do:

    	csharp> using System.Linq;
    	csharp> from x in "Foo" select x;
    	

    Future work

    Public API: There is still some work left to do: we need to turn 99% of the public API in that assembly into a private API, the only class you should care about is the Mono.CSharp.Evaluator class, the rest you should consider internal.

    The Evaluator API needs to evolve, right now it is a big singleton that exposes all of the variables defined as global variables. They really should be tied to some kind of context so we can support multiple and independent execution contexts on the same address space.

    Chances are that we want to expose some of the internals of the compiler to the world, but we first need to figure out what makes sense.

    Now that the code runs on .NET, hopefully those of you that wanted to embed it can provide us some feedback on how you would like to see this API change or even better, provide patches for it.

    C# as a DLR language: Someone had suggested to also provide a hook into the DLR, so you can instantiate C# eval engines with the same API that you instantiate IronPython and IronRuby eval engines.

    Silverlight support: in theory this works out of the box, but we have not tested it yet.

    Contributions: Yes, we are accepting contributions to this awesome compiler.

    Keybindings: Currently the csharp command line repl uses Emacs keybindings as part of my fabulous getline.cs command line editor. We are aware that developers of different faiths might find other keybindings more appropriate. We are taking patches.

    Add support for IKVM Reflection: Jeroen has written a drop-in replacement for System.Reflection[.Emit] that will allow us to decouple the compile from the profile that it compiles code for (Monoistas are familiar with dmcs, smcs, gmcs and mcs; We will be able to have a single compiler).

    Source Code and Hacking

    The source code for Mono's C# compiler, the Compiler as a Service and the interactive REPL are all available from SVN, do a checkout from our subversion repository for the module "mcs".

    Download from GitHub the "mono" module

    Then open the VS2008 solution in mcs/tools/csharp. This will build the Mono.CSharp compiler as a service library and the csharp tool.

    We do not typically provide VS Solution files for most of Mono, but we are making an exception for the compiler as a service to encourage .NET developers to play with it.

    Update: Our compiler is MIT X11 licensed, so even developers at Microsoft can download this code and look at it. It is all kosher guys!

    Posted on 27 Apr 2010


    MonoMac Bindings: Blending Cocoa and .NET on OSX

    by Miguel de Icaza

    Today we released MonoMac, a new foundation for building Cocoa applications on OSX using Mono.

    MonoMac is the result of years of experimentation in blending .NET with Objective-C and is inspired by the same design principles that we used for MonoTouch.

    It is also the result of weekend hacking as our day to day work revolves around Mono's efforts on Linux servers, Linux desktops, Visual Studio integration and our mobile efforts. Luckily, it shares some components with MonoTouch.

    To get MonoMac, you need to get two modules from GitHub: monomac and maccore.

    Background

    Many years ago Geoff Norton produced CocoaSharp, the first set of .NET bindings to the Cocoa API. CocoaSharp was a fine first binding at the time and it was a good place to start learning about the challenges of binding Objective-C APIs to be consumed by .NET clients.

    Over the years three other frameworks were created to integrate the Objective-C world and the Objective-C APIs with C# and other .NET languages. Each one of these new frameworks had its pros and cons, and a year ago we made a call for all three competing frameworks to be merged, but sadly nothing came out of it.

    When we created MonoTouch, we wanted a binding for the Cocoa APIs that would fit the patterns and idioms used in the C# and .NET worlds, that would comply with the .NET Framework Design Guidelines and would allow give developers all the tools required to build full Cocoa applications.

    We had two main requirements: the binding should just work and the code should be MIT X11 licensed. For the binding to just work, we turned to the .NET Framework Design Guidelines book as it captures years of design decisions, programming idioms and advise that would help C# and .NET developers. By following the Design Guidelines we:

    • Avoid surprises
    • Blend with other C# and .NET libraries
    • Reduce the room for errors
    • Increase developer joy
    • Minimizes time for the developer to be productive
    • Every bit of existing .NET knowledge translates

    Luckily for us, .NET was designed from the start to be an interoperability framework. A framework that supports the most advanced requirements to make multiple runtimes and frameworks to communicate seamlessly with each other. We used these features to create our bindings.

    The above goals turned into the following technical requirements:

    • Developers should be able to consume Cocoa APIs as C# APIs
    • Allow developers to subclass Objective-C classes
      • Subclass should work with C# standard constructs
      • Derive from an existing class
      • Call base constructor
      • Overriding methods should be done with C#'s override system
      • Do not expose developers to Objective-C selectors
    • Provide a mechanism to call arbitrary Objective-C libraries
    • Make common Objective-C tasks easy, and hard Objective-C tasks possible
    • Expose Objective-C properties as C# properties
    • Expose a strongly typed API, for example instead of exposing the generic-container NSArray or individual NSObjects. This means that developers get a few benefits:
      • MonoDevelop can flag errors as you write the code
      • MonoDevelop can present documentation popups on types, methods, properties and parameters as you type them.
      • Minimize runtime errors by catching invalid casts at compile time.
      • Encourage in-IDE API exploration without rebuilding, and without having to look up the types in the documentation.
    • Turn int and uint parameters that should have been enums as C# enumerations and C# enumerations with [Flags] attributes
    • Expose the basic Foundation as C# native types:
      • NSString becomes string
      • NSArray becomes strongly-typed array
    • Events and notifications, give users a choice between:
      • Support the Objective-C delegate pattern:
        • Strongly typed version is the default
        • Weakly typed version for advance use cases
      • C# event system
    • Class libraries should be MIT X11 licensed, like the rest of Mono's class libraries.
    • Expose C# delegates (lambdas, anonymous methods and System.Delegate) to Objective-C APIs as "blocks".
    • Curated APIs: there is no point in binding every UNIX or CoreFoundation C API available, as those are not very useful in practice. Bind only those that are required to build applications or get access to mandatory functionality.

    More information about our API can be found here: http://monotouch.net/Documentation/API_Design

    Binding Cocoa

    Cocoa consists of two sets of APIs, one set is an object oriented C-callable API and another one is the Objective-C based API.

    C-based APIs were bound using a traditional P/Invoke approach where the C-based API is wrapped in a C# class. This includes APIs like AudioToolbx, CoreGraphics, CoreFoundation and CoreText. There is very little magic in these bindings, they are straight forward bindings, similar in spirit to what you would do if you wrapped those APIs for C++ use. I am in particular very proud of the much simpler AudioToolbox API.

    The Objective-C APIs is where the UI heavy lifting takes place and where most of the high-level functionality is found, and this includes APIs like Foundation and AppKit. The Objective-C APIs are bound using a new binding engine (MonoMac.ObjCRuntime) and the btouch binding generator.

    The btouch binding generator consumes an API contract in the form of a C# source file and generates a binding that matches the specified contract., for example, this is the API definition for the NSActionCell:

    	[BaseType (typeof (NSCell))]
    	interface NSActionCell {
    		[Export ("initTextCell:")]
    		IntPtr Constructor (string aString);
    	
    		[Export ("initImageCell:")]
    		IntPtr Constructor (NSImage  image);
    	
    		[Export ("target")]
    		NSObject Target  { get; set; }
    	
    		[Export ("action")]
    		Selector Action  { get; set; }
    	
    		[Export ("tag")]
    		int Tag  { get; set; }
    	
    	}
    	

    We produced a comprehensive guide to binding Objective-C APIs with MonoTouch that applies directly to MonoMac.

    Since a lot of the work of binding an Objective-C API is very repetitive, we have also included a header parser that does most of the heavy lifting in producing the above API from the Objective-C header file. The parser output then needs to be then massaged a bit to produce a binding that satisfies our design requirements. For example, NSArray arguments and return types must be looked up on the documentation and the proper strong typed inserted.

    Status

    Unlike MonoTouch, MonoMac is not a complete binding for all of the Cocoa APIs at this point. This has been a weekend effort for Geoff and myself but it has reached the point where it can be used for building applications and it has reached the point where we can start taking contributions to the effort.

    Currently MonoMac binds:

    • CoreFoundation (the parts that are needed, see the design principles)
    • CoreText (done)
    • CoreGraphics (done)
    • Foundation (the parts that are needed, and helper tools to support the rest)
    • AppKit (About 30% left to be done)

    If you are interested in advancing the state of MonoMac, we are currently looking for contributors to help us bind the other Objective-C frameworks and help us complete AppKit.

    Where we are going

    MonoMac is merely the library that gives C# developers access to the underlying APIs on OSX, it does not include the tooling necessary to create a full application bundle.

    Luckily, MonoDevelop has already most of the code needed in the form of the MonoTouch plugin. We will update this plugin to also support creating full application bundles for OSX.

    A new feature that developers will be interested in is the new "Mono bundler" tool that we are hoping we can include in Mono 2.8. This bundler examines your .NET application and generates an application bundle that contains both your application code and any dependencies that it needs from Mono in a self-contained package.

    This is the technology being used by Banshee on OSX today. The tool constructs a self-contained application based on your system installed Mono that you can distribute to your users, without requirement them to install Mono in the first place.

    But we need your help. There are many small and medium tasks that developers can help us with that will free our already busy weekends and will allow us to have a full MonoMac experience done in a shorter period of time.

    The more help we get, the sooner this will be done.

    We need contributors in the following areas:

    • API binding for the rest of the Frameworks
    • We need samples to be written
    • We need tutorials to be written (like the ones we did for MonoTouch)
    • We need to port existing Cocoa samples to C#:
      • To exercise the binding
      • To serve as reference for new developers
      • To identify missing frameworks
      • To prioritize bindings
    • We need to alter MonoDevelop's plugin to produce OSX Application bundles.

    Please join us on the mono-osx mailing list to discuss the future of MonoMac.

    Update Currently this requires a preview Mono to work from http://mono.ximian.com/monobuild/preview/download-preview/

    Posted on 19 Apr 2010


    MonoTouch 3.0

    by Miguel de Icaza

    We have just released MonoTouch 3.0.0 with support for iPhoneOS 4.0's new APIs. To try it out, you need to have Apple's iPhone 4.0 SDK installed otherwise MonoTouch 2.0 wont let you download the new toolkit (since it is Apple confidential at this point).

    This release is a preview, the final release will be some sort of 3.0.XX number.

    This release includes API support for the features that Apple announced last week, in broad terms:

    • Background application support
    • iAd support
    • Local notifications
    • Game Center support
    • Support for enterprise data protection

    We also sneaked in some new work that is not bound to the iPhoneOS 4.0 API and can be used when building for iPhoneOS 3.1.x and 3.2.x:

    • Size reductions:
      • Linker updates to reduce executable size
      • More fat trimmed from the final executable.
      • "Hello world" is 500k slimmer now
    • Native support for Objective-C blocks on the binding generator:
      • Exposed as C# delegates
      • Both lambdas and anonymous methods can be used as blocks
      • Standard C# semantics for variable capturing

    Posted on 16 Apr 2010


    Moonlight 3 Preview 6

    by Miguel de Icaza

    We have released a big update to Moonlight on Linux, our Moonlight 3, Preview 6.

    New in this release:

    • Chrome support and chrome packages
    • Many performance improvements
    • Most Silverlight 3 features are in now, including taking apps out-of-browser
    • Hundreds of bug fixes and improvements our Silverlight 3 compatibility story

    Remember to file bug reports. If you do not file a bug report, we have no way of knowing that something is not working.

    Posted on 16 Apr 2010


    ECMA 2010 Common Language Infrastructure Public Draft

    by Miguel de Icaza

    The ECMA working group that drives the Common Language Infrastructure standard (ECMA 335) has published the working draft for the 2010 edition of the standard.

    These are the work-in-progress documents that the team is working on.

    In addition to the Novell mirror copy above, you can get the standard from the following sites:

    Posted on 09 Apr 2010


    C#, Mono and the Google Summer of Code

    by Miguel de Icaza

    This year, Michael Hutchinson is the administrator for Mono's involvement in the Google Summer of Code.

    We are looking for motivated students that would like to either work on one of the ideas that we listed in our Student Projects page like work on MonoDevelop's IDE, Mono's runtime, Mono's class libraries and in Mono-based applications.

    Additionally, if you are a student and you have been thinking "The Mono guys really should do...", do not hesitate and propose your idea. Perhaps you get to implement your idea, get paid to do so, and be mentored by our group of awesome C and C# hackers.

    If you are a student, you can apply here and Google has a convenient list of frequently asked questions about the program.

    Remember: There are only 3 days left.

    Posted on 05 Apr 2010


    MonoTools for Visual Studio 1.1

    by Miguel de Icaza

    We just released our updated version of MonoTools for Visual Studio:

    A tool that helps Windows/.NET developers target Linux systems directly from Visual Studio, this release is still intended to be used with Visual Studio 2008 and includes some important improvements:

    • Smarter Remote File Copying
    • Automatically Detect Future Updates
    • Preview of Visual Studio 2010 Support
    • Easier Packaging of Precompiled Web Applications

    We are hard at work on our 2.0 release that will include soft-debugging support, MacOS support and will also run with Visual Studio 2010.

    Posted on 05 Apr 2010


    The Right Spirit

    by Miguel de Icaza

    From Steve Jobs 1997 presentation when he announced his partnership with Microsoft:

    Where we are right now is, we are shepherding some of the greatest assets in the computer industry.

    If we want to move forward, seeing Apple helping an prospering again.

    We have to let go of this notion that for Apple to win, Microsoft has to lose. We have to embrace the notion that for Apple to win, Apple has to do a really good job. And if others are going to help us, that's great. Because we need all the help we can get. And if we screw up and do not do a good job, it is not somebody else's fault, it is our fault.

    So I think that is a very important discussion.

    If we want Microsoft office on the Mac, we better treat the company that puts it out with a little bit of gratitude. We like their software.

    So the era of setting this up as a competition between Apple and Microsoft is over as far as I am concerned. This is about getting Apple healthy and this is about Apple being able to make incredibly great contributions to the industry and get healthy and prosper again.

    I feel exactly this way about open source. For open source to win, we do not need Microsoft, Apple or proprietary software to lose. The industry is not a zero-sum game, not only we enrich each other's platforms by exploring different ideas, but it is also incredibly healthy for the industry to have a blend of different approaches to computing.

    Open source software leads in some areas in the industry and we as a community are very proud of its success. But when it comes to the areas where open source has not delivered a full solution like our proprietary competitors have, we resort to finger pointing and blaming others.

    Some in the open source movement would like all the software in the industry to be open source/free software. Desktops, servers, games, embedded systems and everything that every human touches.

    Although it is a noble goal, it has set people up for suffering by making the goal unachievable. It has been 15 years since the rise of the first large open source companies and by now we should know that our dream of a pure open source stack ruling the world is not going to happen any decade now.

    Luckily, today, we have a much better understanding of where open source works and where it does not.

    It would do us good to ponder Steve's 1997 message:

    And if others are going to help us, that's great. Because we need all the help we can get. And if we screw up and do not do a good job, it is not somebody else's fault, it is our fault.

    Once again, I want to recommend Ben Zander's The Art of Possibility book, a book with various recipes on how to look at the world through new eyes.

    Posted on 03 Apr 2010


    Microsoft and .NET

    by Miguel de Icaza

    It seems that David's article on Windows strategy tax on .NET lacked enough context for my actual quotes in there.

    When David contacted me, he was writing a piece on the evolution of .NET and since he was speaking to Microsoft, he wanted to get feedback from other people on what we thought Microsoft got right and what they got wrong. This is how my email to David started:

    Well, I am a bit of a fan of large portions of .NET, so I might not be entirely objective. You might want to also get some feedback from a sworn enemy of Microsoft, but you should get at least the statements from a sworn enemy that has tried .NET, as opposed to most people that have strong opinions but have never used it.
    David said:
    Given your familiarity with the framework, are there any iterative changes that you find questionable or you feel require some explanation?
    There are certain areas that I do not quite like about .NET, they are not major issues as they can be either worked around or ignored (to some extent), but here are some.

    And this is where the quote on Microsoft shooting the .NET ecosystem comes from, I reproduce from my email for the sake of completeness, none of this is a secret:

    The most important part is that Microsoft has shot the .NET ecosystem in the foot because of the constant thread of patent infringement that they have cast on the ecosystem. Unlike the Java world that is blossoming with dozens of vibrant Java virtual machine implementations, the .NET world has suffered by this meme spread by Ballmer that they would come after people that do not license patents from them.

    Sun on the other hand said from day one: we will not sue you over patent infringement if you implement your own Java. Google does something similar with their APIs and Google's Wave: they are giving everyone access to their stuff.

    As the only implementor of the ECMA standards outside of Microsoft, I sure would have hoped that they had given rights to everyone to implement. They would still be the #1 stack, but it would have encouraged an ecosystem that would have innovated extensively around their platform.

    Instead, people went and innovated on Java or other platforms that might not have been as advanced as .NET, but at least they were not under Microsoft threat.

    Google could have used .NET, Rails could have been built on .NET, the Wikipedia and Facebook could have been built using ASP.NET.

    All of those are failed opportunities. Even if the cross-language story was great, the web integration fantastic, the architecture was the right one to fit whatever flavor of a platform you wanted, people flocked elsewhere.

    This is their largest mistake, and it is perhaps too late to do anything about it.

    It took Microsoft eight years, a new management and a fresh set of eyes to change some of these mistakes. The veil of threats that existed over the runtime in 2001 was lifted with the Community Promise announcement but it took eight years, and those were eight years of lost opportunity and FUD directed at all things Microsoft.

    I still believe that Microsoft lost a great opportunity of having .NET become the universal runtime of the net, and they could still have the best implementation. I still believe that they should put the rest of .NET under the Community Promise or OSP and even with Mono as an open source implementation, they would retain their edge.

    On Innovation on other Runtimes

    David quotes Ted Neward (a speaker on the .NET and Java circuits, but not an open source guy by any stretch of the imagination). Ted tried to refute my point about Java and innovation but seemed to have missed the point.

    The article attributed this to Ted: "Microsoft has made an open-source CLI implementation codenamed 'Rotor' freely available, but it has had little or no uptake".

    There is a very simple reason for that. Rotor was not open source and it was doomed to failure the moment it came out. When Microsoft released Rotor in 2002 or 2003 they had no idea what they were doing and basically botched the whole effort by using a proprietary license for Rotor.

    Rotor's license was "look but do not touch" and prohibited commercial use of it. This is a non-starter for anyone that wants to call their software open source. Had Rotor been open source, we would have just used that instead of building Mono and we would have invested in it.

    The article also gets the facts on the interest on Java virtual machines wrong. Certainly only a handful are used for large server deployments, but minor Java VMs were part of the Java culture for years. Fine-tuned versions of the JavaVM are used for all sorts of embedded scenarios and it has also been used extensively in research.

    The Jikes RVM Java implementation is still an important playground for researchers where new garbage collectors, code generator technology, large memory problems, and optimization have been prototyped and tested. The open source Kaffe was the first open source JIT engine and it lead to way for many developers to explore the problems of cross platform JIT compilation, Japhar lead the way for a full open source class library stack (this became GNU class path). The Cacao open source VM explored new code generation optimizations techniques that were eventually used by other JIT engines.

    In the industrial world, variations on Java were used for embedded systems, the most popular one today is Dalvik, Google's runtime for a Java-like runtime.

    The list above is by no means comprehensive and the above is merely the innovation that happened in the JavaVM world. What is clear is that .NET/ECMA CLI fixed a lot of the design mistakes in Java, improved in many areas and built on the knowledge that had been gained from Java.

    But my point about the ecosystem goes beyond the JVM, it is about the Java ecosystem in general vs the .NET ecosystem. Java was able to capitalize on having implementations on Linux and Unix, which accounts for more than half the web today. The Apache Foundation is a big hub for Java-based development and it grew organically.

    Had Microsoft been an open company in 2001 and had embraced diversity we would live in a different world. The awesome Mono team would probably be bigger, and the existing team members would have longer vacations.

    But for everyone that missed the point, luckily, Microsoft has new management, new employees that know open source, fresh new ideas, is becoming more open and is working actively on interoperability with third parties. They even launched the CodePlex Foundation.

    As I told David on that interview, I am still a fan of .NET, and we are going to continue working to bring Mono everywhere where we think we could improve developer's experience. We are actively working on improving Mono on Linux, Mono for MeeGo, Mono for OSX, Mono for the PlayStation, Mono for Xbox360, Mono for the Wii, Mono for the iPhone, Mono for Android and Mono everywhere.

    Just like everyone that complains about Sun's tight control over the Java development process, I have my own regarding Microsoft's development process for .NET. But that is just business as usual.

    The best C# and .NET days are ahead of us.

    Posted on 25 Mar 2010


    OData Client goes Open Source

    by Miguel de Icaza

    Microsoft is trying to succeed where web services failed before with their new Open Data Protocol (oData).

    A few years ago, I had an epiphany when listening to Don Box talk about data services and web services. Web services and web sites are merely public facades to your internal databases. Web sites expose your database rendered as HTML while web services expose them in some sort of data format, defined on a case-by-case basis.

    With Web Services, developers need to define what bits of information should be exposed and how it is exposed (this applies to both SOAP and REST-based services). The problem is that developers might not have the time to spend on exposing every possible bit of interesting information that you maintain in your databases. Most importantly, there are very few web services that provide server-side queries making the information harder to mine.

    oData is a little bit different, for a given oData endpoint (like http://odata.netflix.com/Catalog/CatalogTitles) you can request that the server do some work for you, for example, you can pass a query that will limit the results to only those that you are interested in, and you can also specify the information that you are interested in.

    For example:

    It seems like Microsoft is doing the right things to get oData to be adopted. It reused Atom as the exchange format, made the services REST-based, it made client libraries available for many developer platforms and placed the spec under the OSP.

    Consuming oData sources

    Microsoft is taking a very Google-y approach with oData. They have created client libraries for a wide range of platforms to encourage adoption of this new way of exposing data.

    In addition to the JavaScript, Java, PHP, .NET and Objective-C bindings, Microsoft has announced that they will be open sourcing the .NET client library under the Apache 2 license. I was pleasantly surprised to learn that they were open sourcing this code, as we can consume it right away on Mono.n

    So this is good news for everyone that wants to consume the information. The bindings for .NET are in particular great since you get strongly typed client-side code that you can use to invoke remote servers.

    Producing oData: the need to open source System.Data.Services

    This is trickier, and I believe that if Microsoft wants to bootstrap the oData universe they need to seed this space not only with some existing services but also with an open source OData server implementation for Unix.

    I should further add that they should not wait a single minute and open their server-side .NET implementation if they want to accelerate the oData adoption.

    Let me explain why.

    Although the client libraries are great step to drive the adoption of the protocol for clients, it will do very little to unlock the data that sits today out in the web behind Linux servers running PHP, Java, Ruby or Python-based applications.

    At the end of the day, the client side code is a relatively simple parser for an XML file format. The server side on the other hand is much more complicated to get right.

    The server side requires a complete implementation of the query syntax, selection as well as access control and transaction support required to expose the data safely.

    It is clearly possible to implement the oData server technology, IBM did it for WebSphere, but this is an unnecessary wait. Placing a standard under the OSP and documenting it is not enough to drive open source or even third party implementations.

    If Microsoft were to open source their server side implementation of oData, we could overnight allow Linux users to expose their data in a format that can be mined. Linux users would only need to run a Mono front-end to the System.Data.Services library to expose the data that currently lives in their servers and is being served by Joomla, Wordpress, Rails, Django front-ends to become available as data services.

    Witness what happened with the M modeling language: great idea, OSP-covered, and yet the steep work required to implement it means that not a single implementation has been created in the 18 months since the project went public.

    Update: I stand corrected, Douglas Purdy points out that there is an open source implementation of M built with Javascript here.

    Ok, so not the best example, risking another egg in my face, I want to say that chances are that jsmeta is not a complete implementation of M.

    More on oData

    A detailed overview is available on the oData site.

    The best intro to oData that I have seen is Douglas Pourdy tour-de-force during the second day keynote as he walks through all the pieces in a span of 20 minutes.

    The MIX sessions on oData are packed with great information. The transaction and access control requirements on the server-side support are discussed on the How to create a feed for that session.

    If you want to explore oData services, you can use this Silverlight application to build your queries.

    Posted on 22 Mar 2010


    Baby on the Way

    by Miguel de Icaza

    Laura and myself will become parents sometime this summer. This will be our first baby.

    A friend told me that "Most kids turn ok, despite of their parents" which I interpreted as a green light for raising our daughter with a touch of Dali-like surrealism.

    Also, as much as I love the Summer conference circuit, I will be skipping on most travel from May to October and spend some quality time nesting.

    Posted on 22 Mar 2010


    Big Day in MonoLand

    by Miguel de Icaza

    Mark Probst found and squashed one of the hardest bugs in our upcoming garbage collector. Pablo from Codice has been testing the new GC under stress and posted a nice message to the list.

    Plenty of great feedback on deprecating old libraries and tools from Mono. We will have a lighter distribution. As things are coming together so fast and we are now well into the features we had planned for 3.0, we might end up just calling the next version 3.0 instead o 2.8.

    Andreia got Moonlight running on Chrome.

    Posted on 03 Mar 2010


    Simplified User Interfaces on the iPhone with MonoTouch.Dialog

    by Miguel de Icaza

    At the core of the iPhone UI lies the UITableView, a powerful table rendering widget that is used by pretty much every application on the iPhone. The UITableView is a powerful widget that can render its data in many different ways based on how you configure the widget, these are all variations of the UITableView:

    This is one powerful widget.

    The contents of the UITableView are rendered by calling into a developer supplied set of routines that provide the data on demand. The protocol includes queries like "How many sections?", "How many rows in section N?", "What is the title for section N?" as well as callbacks to provide the actual contents of a cell. Although the widget is pretty powerful, creating UIs with it is a chore and a pain to maintain. The pain to maintain and the repetitive nature of the process leads to developers either spending too much time customizing each view, bare minimum configuration and lack of polish on certain configurations. As I ported many of the Objective-C samples to C# I found myself repeating the same process over and over.

    My fingers developed calluses, and at night I kept thinking that there should be a better way. But at the time, I was just doing a line-by-line port, I was not really ready to build a new API on top of it.

    Recently, when my favorite twitter client on the iPhone butchered its UI I figured I would write my own Twitter client. The first step was to create the account configuration for my twitter account. As you can imagine, the configuration is done with a variation of the UITableView. And once again I found myself setting up the model, responding to view events, sprinkling switch and if statements liberally all through my source code and just plainly not having any fun writing the code. This is how MonoTouch.Dialog was born.

    I wanted to reflection to allow a class to be mapped to a dialog box, something that would allow me to write a C# class and have it mapped to a UITableView, something like this:

    class TwitterConfig {
        [Section ("Account")]
          [Entry] string Username;
          [Password] string Password;
    
       [Section ("Settings")]
          bool AutoRefresh;
          bool AutoLoad;
          bool UseTwitterRetweet;
    }

    Instead of starting with the Reflection code to deal with this, I first created an in memory representation of the entire dialog. The idea was that the Reflection code would then be a bridge that could use the engine code.

    The engine code is built on the idea that each row could be a specific kind of widget. It could contain text, a switch box, a text editing line, a slider control, a calendar picker or any other kind of user created control. I call these "Elements" and I created a bunch of these:

    • BooleanElement: rendered with a UISwitch
    • FloatElement: rendered with a slider.
    • HtmlElement: when tapped, starts the web browser on a url.
    • StringElement: used to render plain strings.
    • MultilineElement: A multi-line string element.
    • RadioElement: a radio-item, to select one of many choices.
    • CheckboxElement: like the BooleanElement, but uses a checkbox instead of a UISwitch.
    • ImageElement: Allows the user to pick an image or take a photo.
    • EntryElement: text entry element.
    • DateTimeElement, DateElement, TimeElement: pickers for dates and times, dates and times.

    The MonoTouch.Dialog follows the Apple HIG for the iPhone and implements as much of the UI policy allowing me to focus on the actual application instead of focusing on the administrivia.

    Although the UITableView is built on the powerful Model/View/Controller setup that would allow it to scale efficiently to large data sets, most configuration pages and data entry pages do not require this complexity.

    Another feature is that it takes care of all the bookkeeping required to do text entry without any work from the programmer: accepting keyboard input, automatically switching to the next entry line on return, aligning all entry lines in a section, dismissing the keyboard with the last input is reached.

    Here is a sample of the API in action:

    var root = new RootElement ("Settings") {
      new Section (){
        new BooleanElement ("Airplane Mode", false),
      new RootElement ("Notifications", 0, 0) { Notifications }
      new Section (){
        new RootElement ("Sound"), { Sound },
        new RootElement ("Brightness"){ Brightness },
        new RootElement ("Wallpaper"){ Wallpaper }
      },
      new Section () {
        new EntryElement ("Login", "Your login name", "miguel"),
        new EntryElement ("Password", "Your password", "password", true),
        new DateElement ("Select Date", DateTime.Now),
        new TimeElement ("Select Time", DateTime.Now),
      }
    }
    	

    Once the RootElement has been created, this can be passed to a DialogViewController to manage it:

    var dv = new DialogViewController (root);
    navigation.PushViewController (dv, true);
    

    Reflection API

    The reflection API inspects a class and looks for fields that have some special attributes on them.

    Here is a sample class and how it is rendered:

    class AccountInfo {
        [Section]
        public bool AirplaneMode;
    
        [Section ("Data Entry", "Your credentials")]
    
        [Entry ("Enter your login name")]
        public string Login;
    
        [Caption ("Password"), Password ("Enter your password")]
        public string passwd;
    
        [Section ("Travel options")]
        public SeatPreference preference;
    }
    	

    As you can see, enumerations (SeatPreference) are automatically turned into a radio selection that uses the UINavigationController to navigate and the captions are computed from the field names, a behavior that you can customize with the [Caption] attribute.

    The attributes that are attached to each instance variable control how things are rendered and can be used to specify a variety of attributes like captions, images and overriding the defaults from MonoTouch.Dialog.

    Some Samples

    Code:

    new RootElement ("Settings") {
      new Section (){
        new BooleanElement ("Airplane Mode", false),
        new RootElement ("Notifications", 0, 0) { Notifications }
      new Section (){
        new RootElement ("Sound"), { Sound },
        new RootElement ("Brightness"){ Brightness },
        new RootElement ("Wallpaper"){ Wallpaper }
      },
      new Section () {
        new EntryElement ("Login", "Your login name", "miguel"),
        new EntryElement ("Password", "Your password", "password", true),
        new DateElement ("Select Date", DateTime.Now),
        new TimeElement ("Select Time", DateTime.Now),
      }
    }
    	

    LINQ and MonoTouch.Dialog

    Craig has written a great Conference application for the Mix 2010 conference. I helped him reduce the code size of the application by removing all of the repetitive code required to set up UITableViews for various pieces of the application with MonoTouch.Dialog. Since the conference application deals with a database schedule, I extended MonoTouch.Dialog to work better with LINQ.

    In the same spirit of the System.Xml.Linq API that allows you to create XML documents with nested LINQ statements, you can use MonoTouch.Dialog to create your entire UIs.

    For Craig's application, I wrote a SessionElement that allows sessions to be "starred" and shows both the title of the session as well as the location of the session.

    This code constructs the entire UI for the "My Schedule" tab. The data is populated on demand (Apple recommends that all views are loaded lazily)

    public class FavoritesViewController : DialogViewController {
      public FavoritesViewController () : base (null) { }
    
      public override void ViewWillAppear (bool animated)
      {
        var favs = AppDelegate.UserData.GetFavoriteCodes();
        Root = new RootElement ("Favorites") {
          from s in AppDelegate.ConferenceData.Sessions
            where favs.Contains(s.Code)
            group s by s.Start into g
            orderby g.Key
            select new Section (MakeCaption ("", g.Key)) {
              from hs in g
                select (Element) new SessionElement (hs)
            }
        };
      }
    }
    	

    That is it. The entire source code.

    So use any of the two models that you enjoy the most: Reflection for quick one-offs and quick data-entry or the Element API for more advanced user interfaces but without having to spend your life writing boilerplate code.

    I hope that this helps guys spend more time improving their applications, and less time writing boilerplate code.

    MonoTouch.Dialog is not perfect and does not have every possible bell and whistle that you might want to add. Although I do welcome patches for certain features, feel free to fork the code and patch at will to suit your needs.

    Posted on 23 Feb 2010


    MeeGo Support in MonoDevelop

    by Miguel de Icaza

    We just landed the support on MonoDevelop's trunk to support developing applications that target MeeGo powered devices.

    MeeGo is a Linux-based operating system designed to run on mobile computers, embedded systems, TVs and phones. Developers would not typically use a MeeGo device as a development platform, but as a deployment platform.

    So it made sense for us to leverage the work that we have done in MonoDevelop to support the iPhone to support MeeGo. Unlike MonoTouch, we are not limited to running on a Mac, you can use MonoDevelop on Windows, Linux and OSX to target Meego Devices.

    Developers would continue using their Linux Workstation, their Windows PC, or their Mac to develop and test and the resulting cross-platform binary can be deployed and debugged remotely over the wire using Mono's Soft Debugger.

    In this video, I interview Michael Hutchinson as he demostrates the developer experience:

    The MonoDevelop/Mono that we will be supporting is entirely Gtk# based, both during development as well as during deployment.

    Posted on 22 Feb 2010


    Using MonoDevelop to Debug Executables with no Solution Files

    by Miguel de Icaza

    Every once in a while I need to debug some Mono program that does not come with a solution. Either a program that was compiled using a Makefile or an executable that I installed with RPM on my system.

    Sometimes I would end up cretaing MonoDevelop solution that contained every source file, command line option and resource that I meticulously copied from the Makefile. In other words, I was in for a world of pain just to be able to use MonoDevelop's awesome debugger.

    Lluis offered this solution, and I am blogging it hoping that it will help someone else in the future. Follow these steps to debug a Mono executable and set breakpoints on the source code or class libraries source code:

    1. Create a Generic Solution

    Select File/New Solution and select Generic Solution:

    2. Open the Project Properties

    Double click on your project, in my case I called the project "compiler":

    3. Add an Execute Custom Command

    In your project select Custom Commands:

    Add a custom Execute command by selecting it from the "Select a Project Operation" option and point to your Mono executable:

    4. Load source files

    Use File/Open to load the source file where you want to set a breakpoint (the executable source or some class library source) and set your breakpoints:

    Then use Run/Debug to start your program in debugging mode (Linux and Windows users can use F5, MacOS X users can use Command-Return).

    Posted on 20 Feb 2010


    What have we been up to?

    by Miguel de Icaza

    Every once in a while I would run into someone that will ask me what exactly we are up to in Mono. As Mono becomes larger, and various big projects "land" into the trunk, we can no longer do releases on a monthly basis. Some of the work that we do is inherently very attractive, things like new features, new libraries, new UIs and new frameworks. But probably more important are the efforts to turn our code into programming system products: fixing bugs, testing it, packaging it, supporting it, writing documentation, test suites, improving error handling, scaling the software, making it faster, slimmer and backporting bug fixes.

    I wanted to give my readers a little bit of an insight of the various things that we are doing at Novell in my team. This is just focused on the work that we do at Novell, and not on the work of the larger Mono community which is helping us fill in the blanks in many areas of Mono.

    MonoDevelop work

    We just released MonoDevelop 2.2, a major upgraded to our IDE story, and the backbone that allows developers on Linux to debug various kinds of Mono-based applications. With support for the new Soft debugging engine, it has allowed us to support debugging ASP.NET web sites, ASP.NET web services, Silverlight applications, Gtk# and Console applications with minimal effort. Since the soft debugger leverages Mono's JIT engine, porting the soft debugger to a new architecture is very simple.

    MonoDevelop 2.2 major goal was to create a truly cross platform IDE for .NET applications. We are off to a solid start with Linux, Windows and OSX support as well as solid support for C#, VB, Vala and Python.

    We are now turning our attention to MonoDevelop 2.4. This new release will incorporate many new UI touch ups which I will blog about separately.

    MeeGo/Moblin Support

    We have been working closely with the MeeGo (previously Moblin) team at Novell to offer a streamlined developer experience for developers on Windows, Mac and Linux to target MeeGo devices.

    Developers will be able to develop, test and deploy from their favorite platform software for MeeGo devices.

    Mono Service Pack

    A service pack release of Mono's enterprise supported ASP.NET release is ahead of us and we will be upgrading Mono from release 2.4 to release 2.6.

    This will bring to our customers support for all of the new features in Mono 2.6 with the added benefit that it has gone through four months of extra testing and polish.

    As part of this effort we are also upgrading the MonoTools for Visual Studio to support the new Mono Soft Debugger.

    Runtime Infrastructure

    Mono's runtime is being upgraded in various ways: we continue to work on integrating LLVM [1], productize our new copying garbage collector that can compact the heap, and make Mono scale better on multi-core systems with the integration of ParallelFX into Mono as well as re-architecting thread management and thread pools in Mono.

    A big upgrade for Mono 2.8 will be the support for obfuscated assemblies that insert junk in dead blocks. This is a feature that we never had, but with many Silverlight applications being deployed with these options we started work on this.

    We are working to improve our support for F# and together with various groups at Microsoft we are working to improve Mono's compatibility with the CLR to run IronPython, IronRuby and F# flawlessly in Mono. Supporting F# will require some upgrades to the way that Mono works to effectively support tail call optimizations. [1] LLVM: better use LLVM to produce better code, use it in more places where the old JIT was still required and expand its use to be used for AOT code.

    Mono for Mobile Devices

    We recently shipped Mono for the iPhone and we continue to develop and improve that platform. Our goal is to provide developers with a great experience, so we are doing everything in our power to make sure that every wish and whim of the iPhone developer community is satisfied. We are working to expand our API coverage, write helper libraries to assist developers, tune existing .NET libraries to run on Mobile devices, reduce startup time, and reduce executable sizes.

    But we have also just started an effort to ship MonoDroid: Mono for the Android platform. This will include a comprehensive binding to the Java APIs, but accessible through the JIT-compiled, 335-powered runtime engine.

    Our vision is to allow developers to reuse their engine and business logic code across all mobile platforms and swapping out the user interface code for a platform-specific API. MonoTouch for iPhone devices and the Monodroid APIs for Android devices.

    Head-less Tasks

    A big part of Mono's effort is in the development kit: the compiler, the tools and the server side components.

    Mono has now a complete C# 4.0 implementation that will be ready to ship with the next version of Mono. Anyone can try it today by building Mono from SVN. We are also porting our C# compiler to work with Microsoft's Reflection.Emit to enable us to run our C# Interactive Shell in Silverlight applications and to allow .NET developers to embed our compiler in their applications to support C# Eval.

    Our MSBuild implementation is very robust these days, and it will be fully supported in Mono 2.8 (and we will be backporting it to Mono 2.6 as well).

    On the ASP.NET front, we are working with third party vendors to certify that their controls work with Mono's ASP.NET (we will have some tasty announcements soon) and we are also catching up to the new features that are coming with .NET 4.0.

    WCF has turned out to be one of the most requested features. We had historically only paid attention to WCF for its Silverlight/Moonlight use cases, but as time goes by, more and more users are moving to WCF. We are working on completing our WCF support.

    On the ADO.NET front our major focus has been to complete the support for LINQ to SQL as part of the DbLinq project that we are contributing to. At this point we have no plans to implement Entity Frameworks due to the large scope of that project.

    Moonlight 3

    I do not need to say much about Moonlight 3. Moonlight 3 is one of our most visible projects right now due to the adoption of Silverlight and Smooth Streaming.

    By the first week of Feburary there had been 610,000 downloads of Moonlight 2.0 for Linux. This is only counting the downloads since the official release on December.

    Policy Changes

    Mono 2.6 was the last release of Mono to support the .NET 1.0 API profile. With Mono 2.8 we are going to drop the class library support for 1.0 and ship both 3.5 and 4.0 assemblies.

    With Mono 2.8 we are also switching the default tools and compiler to be 4.0-based as opposed to be based on the 3.5 profile. We will be doing a release of Mono 2.8 a couple of months after .NET 4.0 ships.

    Ciao!

    The above probably reflects the main focus of the team in the past three months. There are many community driven efforts that are very cool and that deserve their own space and a future blog post. Things like the amazing work that was done on Qyoto and the Synapse IM client come to mind.

    We look forward to a great year ahead of us.

    Posted on 17 Feb 2010


    Valentine's Day Call to Action

    by Miguel de Icaza

    Everyone knows that in this day an age a software product is not complete until it offers a Desktop UI, a Web UI, and a front-end on the Appstore.

    We access beautiful web sites, we purchase 0.99 apps on our phones and install gorgeous native software on our desktops.

    The sysadmin community, once the backbone of Linux adoption, keeps asking "but what about me?". Indeed. What about them?

    What are we doing about these heroes? The heroes that ssh in the middle of the night to a remote server to fix a database; The heroes that remove a chubby log file clogging the web server arteries; The very same heroes that restore a backup after we drag and dropped the /bin directory into the trashcan?

    They are a rare breed in danger of extinction, unable to transition into a GUI/web world. Trapped in a vt100 where they are forced to by conditions to a small 80x24 window (or 474 by 188 with 6 pixel fonts on a 21 inch flat screen display).

    These fragile creatures need our attention.

    Today I am doing my part, my 25 cents to help improve their lives.

    I am releasing Mono Curses 0.4 a toolkit to create text-based applications using C# or your favorite CLR language.

    The combination of C#'s high-level features, Mono's libraries, Mono/.NET third party library ecosystem and the beautifully designed gui.cs, we can bring both hope and change to this community. Hope and change in the form of innovative text-based applications that run comfortably in 80x24 columns.

    What is gui.cs

    We know that hardcore sysadmins will want full control over what gets placed on the screen, so at the core of mono-curses we expose a C# curses binding.

    On top of this, we provide a widget set called "gui.cs". gui.cs was introduced in 2007 enjoying unprecedented public acclaim among a circle of five friends of mine. Eight months after its introduction, it experienced an outstanding 100% growth when a second application was written using it.

    Today, gui.cs is the cornerstone of great work-in-progress applications that any decade now will see the light of day. Including a new and riveting version of the Midnight Commander:

    With only 3% of features implemented progress is clearly unstoppable!

    I believe in dogfooding my own software before I unleash it to the world:

    On a typical 21" sysadmin setup: 474x188 with the "Sysadmin Choice" award winning 6 pixel font.

    Valentine's Day

    So in this Valentine's Day, after you are tired of spending quality time with your grandmother, making out with your significant other or a stranger you just met at the checkout line in Costco, consider donating. Donate some of your time towards building some nice applications for your favorite sysadmin. God knows that he spent the whole day monitoring the dmesg output, looking for a SATA controller failure and keeping an eye on /var/log/secure, waiting for your ex to deface your wordpress installation.

    And you have a choice, you can use Boo, IronRuby, IronPython, F# for building your app. VB.NET is also available if you want to teach your sysadmin a lesson in humility.

    Get inspired today with some of the old screenshots.

    Posted on 14 Feb 2010


    Winter Olympics on Linux

    by Miguel de Icaza

    The amazing Moonlight Team lead by Chris Toshok just released Preview 2 of Moonlight 3 just in time for the Winter Olympics' broadcast:

    The player has some nice features like live streaming, Tivo-like "jump-back", accelerated playback and slow motion and it does this using Smooth Streaming which adjusts the quality of your video feed based on your bandwidth availability.

    Thanks to Tom Taylor, Brian Goldfarb and the rest of the team at Microsoft for assisting us with test suites and early access to some of the technologies in use at NBC Olympics. With their help we were able to make sure that Moonlight 3 would work on time for the event (with full 24 hours and 14 minutes still to burn!).

    As usual, the team did a great job, considering that we had to implement in record time plenty of Silverlight 3 features for Moonlight.

  • Release notes for Preview 2
  • List of Known Issues with the Olympics Player.

    Firefox 3.7 runs this code better than 3.5, and you can improve the performance by disabling the pixel shaders in Moonlight, like this:

    	MOONLIGHT_OVERRIDES=effects=no firefox
    	
  • Posted on 11 Feb 2010


    Moonlight 3.0 Preview 1

    by Miguel de Icaza

    We have just released our first preview of Moonlight 3.0.

    This release contains many updates to our 3.0 support, mostly on the infrastructure level necessary to support the rest of the features.

    In the release:

    • MP4 demuxer support. The demuxer is in place but there are no codecs for it yet (unless you build from source code and configure Moonlight to pick up the codecs from ffmpeg).
    • Initial work on UI Virtualization.
    • Platform Abstraction Layer: the Moonlight core is now separated from the windowing system engine. This should make it possible for developers to port Moonligh to other windowing/graphics systems that are not X11/Gtk+ centric.
    • The new 3.0 Binding/BindingExpression support is in.
    • Many updates to the 3.0 APIs

    The above is in addition to some of the Silverlight 3.0 features that we shipped with Moonlight 2.0.

    For the adventurous among you, our SVN version of Moonlight contains David Reveman's pixel shader support:

    From Silverlight Parametric Pixel Shader.

    Posted on 03 Feb 2010


    Mono at FOSDEM

    by Miguel de Icaza

    I will be arriving in Brussels on Saturday Morning for the FOSDEM conference. We have an activity-packed day on Sunday of all-things-mono.

    This is the current schedule, pretty awesome!

    Feedback requested: My plan is to do a state-of-the-union kind of presentation on Mono, but if you have a specific topic that you would like me to present on, please leave a comment, I will try to prepare for that.

    See you in Brussels!

    Posted on 02 Feb 2010


    iPad - Inspirational Hardware

    by Miguel de Icaza

    iPad - Inspirational Hardware

    As a software developer, I find the iPad inspirational.

    Apple's iPad is not a new idea. They are not the first ones to think of a tablet and as many blogs have pointed out the Apple iPad is not everyone's dream machine, the hardware is lacking gadgets and the software is not that amazing.

    Five elements come together to revolutionize software:

    1. Price
    2. Multi-touch centric development
    3. Standard hardware available for consumers
    4. Apple's AppStore
    5. Large form factor.

    The iPhoneOS is a multi-touch centric operating system. For years application developers have been subjected to the tyranny of the mouse and keyboard. This has been the only input technology that developers could reliably depend on and expect to be available on the user's system. Any software that requires different input mechanism sees its potential market reduced.

    The mouse is a great device for certain class of desktop applications. But it has also led to applications that are incredibly frustrating to use. Software for editing music and audio is cumbersome. Find the target, drag it, move it, find the other button, click it, scroll, drag, click. Anyone that has used Garage Band to try to play along knows this. The same applies to software to paint or draw. The mouse and keyboard are poor substitutes for using your hands.

    On the iPhone, and now the iPad, the situation is reversed. Multi-touch is the only input mechanism that developers can depend on. Apple's iPhone helped create a community of developers that think in terms of taps, pinches and twirls instead of clicks, double-clicks and right-clicks. It is no longer an after thought. It is no longer a feature that is added if there is enough time in the schedule or enough budget. It is the only option available.

    Taps, pinches and twirls allow us to use the full expression of our hands to drive an application. And it is not just any multi-touch, it is multi-touch over the same surface where the application is providing feedback to the user. Software that respond to user input in the same way that a physical object responds to our physical contact is the key to create new user experiences.

    This is a whole new space in which we can research, a new space that we can explore and where we can create a whole new class of computer/user interactions. With the new form factor, we can now create applications that just made no sense on the iPhone.

    It is fascinating.

    The standardized hardware means that software developers do not have face testing their software with dozens of combinatorial options. There are only a handful types of systems. If the software works on the core systems, they will work on all consumer devices. Standardized hardware is at the core of the success of the console gaming market, developers test and develop against a uniform platform. Price is the cherry on top of the cake, this device will be mass produced and the affordable price means that it will have a deep reach.

    The possibilities for new computer/user interactions are no longer dampened by this market reality. As developers, a new door to invention and innovation has been opened for us. No longer will software developers have to cripple their user experiences based on the mouse and keyboard.

    For the past couple of years I have had some ideas for some software that I wanted to build on a touch-based computer, but the specter of having a small user base for my experiments always discouraged me. Ever since I heard the rumors about Apple producing a tablet computer I have not cared about what the device looked like, or what the software stack for it was going to be. I wanted to try new touch-based UI ideas, I have dozens of ideas that I want to try out. And with Mono, I get to do it in my favorite language.

    Posted on 29 Jan 2010


    Release-o-Rama

    by Miguel de Icaza

    Nice new releases of software that I use in the last few days.

    Banshee 1.5

    A new Banshee release, now supports new device syncing options, audiobooks, eMusic and GIO for non-local files. Gabriel has more details as well.

    Now with a fully self-contained Mono and Gtk+ stacks on OSX. On the OSX note, I recommend Michael Hutchinson's blog entries on how to package your Gtk# app for use in OSX as well as his article on how to make your Gtk# app integrate with OSX. Both based on the lessons of bringing MonoDevelop and MonoDoc to OSX.

    Jeroen Frijters released his IKVM.Reflection API. His API could be very useful for Reflection-Emit compiler writers, perhaps we could even use it in Mono's C# compiler to solve our long standing issues with Reflection. More research is needed on this area.

    Maurits Rijk has published a new version of GIMP# his Mono-based plugin engine that lets you write plugins in any Mono supported language. There are samples in C# 3, F#, Boo, Nemerle, Oxygene, IronPython, Java/IKVM and Visual Basic.

    Sandy released a new version of Tomboy, now supports exporting data in HTML format to the clipboard and jump Lists on Windows 7.

    Posted on 28 Jan 2010


    iPad Support for MonoTouch!

    by Miguel de Icaza

    We did it!   MonoTouch for iPad!

    24 hours after we got the iPad SDK we completed the support for the iPad for MonoTouch!

    To get started with iPad development, go to http://monotouch.net/iPad and follow the instructions.

    Let the iPad# hacking begin!

    Posted on 28 Jan 2010


    24 hour race

    by Miguel de Icaza

    Another Mono-race, in 24 hours we are aiming to:

    • Support the iPad SDK from Apple (freshly baked and published).
    • Add MonoDevelop support for it.

    Posted on 27 Jan 2010


    Preordering the Apple Tablet

    by Miguel de Icaza

    Posted on 25 Jan 2010


    MVP Award

    by Miguel de Icaza

    Thanks to everyone that participated in the campaign to nominate me for a C# MVP award, when I got back to Boston I found on my piles of email that I am now part of the program.

    This is Pretty Sweet(tm). This will be a great opportunity to build more bridges with Windows developers and show them that there is an ECMA CLI life in the other side of the OS spectrum.

    Looking forward to the group picture!

    Posted on 11 Jan 2010


    Mono at FOSDEM

    by Miguel de Icaza

    This year we will have a Mono Room at the FOSDEM Conference in Brussels. The FOSDEM conference is held on the weekend on February 6th and 7th.

    Ruben and Stephane organized the room and the speakers for the it. has posted the finalized schedule for the Mono activities at FOSDEM on Sunday.

    Here is the schedule, there are some pretty interesting talks:

    09:00 - 09:15Opening (Ruben Vermeersch, Stéphane Delcroix)
    09:15 - 10:00MonoDevelop (Lluis Sanchez Gual)
    10:00 - 11:00The Ruby and .NET love child (Ivan Porto Carrero)
    11:00 - 12:00Mono Edge (Miguel de Icaza)
    Lunch Break
    12:45 - 13:15The evolution of MonoTorrent (Alan McGovern)
    13:15 - 13:45Image processing with Mono.Simd (Stéphane Delcroix)
    13:45 - 14:15ParallelFx, bringing Mono applications in the multicore era (Jérémie Laval)
    Coffee Break
    14:30 - 15:30Building The Virtual Babel: Mono In Second Life (Jim Purbrick)
    15:30 - 16:00Moonlight and you (Andreia Gaita)
    16:00 - 16:30OSCTool - learning C# and Mono by doing (Jo Shields)
    16:30 - 16:45Smuxi - IRC in a modern environment (Mirco Bauer)
    16:45 - 17:00Closing (Ruben Vermeersch, Stéphane Delcroix)

    Posted on 11 Jan 2010


    Pixel Shaders for Moonlight

    by Miguel de Icaza

    David Reveman has just posted a fascinating patch that debuts the support of pixel shaders in Moonlight.

    David's patch uses Gallium, and he says:

    The current implementation uses gallium's softpipe driver but hooking up the llvm driver as well should be a minor task and give significantly better software performance.

    [...]

    My current approach is to focus on getting all these things working in software first. By using a OpenVG backend for cairo we can incrementally move to using gallium and hardware for all rendering.

    Posted on 07 Jan 2010


    Moonlight: Platform Abstraction Layer Lands

    by Miguel de Icaza

    Chris Toshok has landed the changes necessary to abstract Moonlight's engine from the platform.

    The platform abstraction layer lives in moon/src/pal and the Gtk+ interface lives in moon/src/pal/gtk.

    This is a necessary step to bring Moonlight to non-X11 powered GUI systems.

    Posted on 06 Jan 2010


    C# Support for Tuples

    by Miguel de Icaza

    More Mono proof of concept extensions to C#.

    As part of the list of things I would like to see in C# is support for tuples in the language. They would show up in a few places, for example, to return multiple values from a function and assign the results to multiple values at once.

    In recent versions of the framework there is a new datatype called Tuple, it is used to hold N values, the Tuple for N=2 looks like this:

    	public class Tuple<T1, T2> {
    		public Tuple (T1 v1, T2 v2);
    		T1 Item1 { get; set; }
    		T2 Item2 {get; set; }
    	}
    	

    The tuple patch extends the C# language to allow multiple variables to be assigned from any Tuple, like this:

    	(user, password, host, port, path) = ParseUri (url);
    	

    The above would assign the four values to user, password, host, port and path from the call to ParseUri. ParseUri would be declared like this:

    	Tuple<string, string, string, int, string> ParseUri (string url);
    	

    Future Work and Ideas

    In addition to handling Tuples, I would like to extend this to support collections and IEnumerables as well, for example:

    	(section, header) = my_array;
    	

    The above would store my_array [0] in section, and my_array [1] in header.

    If the last element of a tuple is a collection, it could store the rest of the values from the collection or enumerable in the last element:

    	(query, page, other_options) = Request.QueryString;
    	

    The above would store the first item in the QueryString into query, the second into page, and the rest into the other_options array.

    Tuple creation syntax:I would like to add nicer support for creating Tuples as return values, it could just mirror the assignment syntax.

    	ParseUri ()
    	{
    		...
    		return (user, password, host, port, path);
    	}
    	

    Handling well-known types: In addition to Tuple, ICollections and IEnumerables, perhaps the compiler should know about older versions of Tuple like DictionaryEntry.

    Using statements: Today the using statement is limited to a single resource, with multi-valued return types, it could handle multiple resources at once, like this:

    	using (var (image, audio, badge) = iphoneApp.GetNotifications ()){
    	    // use IDisposable image
    	    // use IDisposable audio
    	    // use trivial int badge
    	}
    	

    Posted on 23 Dec 2009


    New Moonlight Covenant has been posted

    by Miguel de Icaza

    As I mentioned a few days ago, there is a new covenant form Microsoft for Moonlight, it has been posted.

    Posted on 22 Dec 2009


    Cena Linuxera en el DF, hoy

    by Miguel de Icaza

    Cena Linuxera/Monera hoy (Diciembre 22) en el bar/restaurante del Covadonga a las 7pm. Para todo p�blico (incluso talibanes).

    Direcci�n: Puebla 121 cerca de el Metro Insurgentes.

    Posted on 22 Dec 2009


    C# String Interpolation

    by Miguel de Icaza

    We have discussed in the past adding support to C# to support string interpolation. I have cooked a patch that allows C# developers to embed expressions inside strings, like this:

    	var a = 'Hello {name} how are you?';
    	

    Single quotes are used for strings that will have expressions interpolated between the braces. The above sample is equivalent to:

    	var a = String.Format ("Hello {0} how are you?", name);
    	

    Currently the patch supports arbitrary expressions in the braces, it is not limited to referencing variables:

    	var a = 'There are {list.Count} elements';
    	

    This notation can be abused, this shows a LINQ expression embedded in the string:

    	var a = 'The {(from x in args where x.StartsWith ("a") select x).FirstOrDefault ()} arguments';
    	

    I am not familiar with what are the best practices for this sort of thing in Python, Ruby and other languages. Curious to find out.

    Update: after the discussion on the comments the syntax was changed to use $" instead of the single quote to denote a string that will be interpolated. Now you will write:

    	var a = $"There are {list.Count} elements";
    	var greeting = $"Hello {name} how are you?";
    	

    The updated patch is here.

    Posted on 20 Dec 2009


    Debugging Silverlight/Moonlight Apps on Linux

    by Miguel de Icaza

    A little hidden feature from our release of MonoDevelop 2.2 and Mono 2.6 earlier this week was MonoDevelop's support for debugging Moonlight applications:

    Moonlight debugging is a feature that came together very recently, but we delayed Mono and MonoDevelop's release to make sure that we shipped with it.

    To debug, merely open your Moonlight/Silverlight project, set some breakpoints, and run your program (F5). Your app will be debugged.

    I did a quick screencast and annotated it:

    Posted on 17 Dec 2009


    Releasing Moonlight 2, Roadmap to Moonlight 3 and 4

    by Miguel de Icaza

    Today we are making a few of announcements:

    • Moonlight 2 is complete: Moonlight 2, our open source implementation of Silverlight 2 is done.
    • An updated collaboration agreement between Microsoft and Novell to bring Silverlight 3 and 4 to open source Unix.
    • Microsoft has an updated patent covenant that will covers third party distributions.

    Update: Sean Michael Kerner covers the announcement and talks to Brian Goldfarb from Microsoft.

    Update 2: New covenant from Microsoft has been posted.

    2.5 API

    Moonlight 2 is a superset of Silverlight 2. It contains everything that is part of Silverlight 2 but already ships with various features from Silverlight 3:

    • Silverlight 3 Pluggable Pipeline, this allows developers to hook into the media decoding pipeline at various points:
    • Easing animation functions
    • Partial out-of-browser support
    • Writable bitmaps
    • Some of the new databinding features of XAML in Silverlight 3

    We are moving quickly to complete our 3 support. Microsoft is not only providing us with test suites for Moonlight but also assisting us in making sure that flagship Silvelright applications work with Moonlight.

    When it comes to prioritization of Silverlight 3 features, we are going to focus on getting the major applications that users want to use first. Sunday Night Football, the Winter Olympics and Bing's Photosynth support.

    Smooth streaming works really well. Visit the site and test the immediate seek, and play with the bandwidth limiter to see how Silverlight/Moonlight can adapt the video quality based ont he bandwidth available:

    Moonlight 2

    Moonlight 2 is the result of love and passion to bring the Silverlight runtime to Linux.

    Moonlight 2 engine consists of 142,000 lines of C/C++ code and 320,000 lines of C# code (125,000 lines of code came from Microsoft's open source Silverlight Controls).

    Moonlight is built on top of Mono 2.6 runtime, Cairo and Gtk+ and today supports Firefox on Linux. We are hard at work to support Google Chrome on Linux as well.

    Updated Patent Covenant

    We worked with Microsoft to make sure that Moonlight was available to everyone on Linux and BSD.

    Culturally, we started on two opposite ends of the software licensing spectrum. The covenant that was issued for Moonlight 1 and 2 covered every user that used Moonlight, but only as long as the user obtained Moonlight from Novell. This is a model similar to how Flash is distributed: there is a well-known location where you get your plugin.

    The open source world does not work that way though. In the open source world, the idea is to release source code and have distributions play the role of editors and curators and distribute their own versions of the software.

    Microsoft's intention was to expand the reach of Silverlight, but the original covenant was not a good cultural fit. We worked with the team at Microsoft (Brian Goldfarb and Bob Muglia's teams) to make sure that the covenant would cover the other Linux distributions.

    The new patent covenant ensures that other third party distributions can distribute Moonlight without their users fearing of getting sued over patent infringement by Microsoft.

    There is one important difference between the version of Moonlight that will be available from Novell and the version that you will get from your distribution: the version obtained from Novell will have access to licensed media codecs.

    Third party distributions of Moonlight will be able to play unencumbered media using Vorbis, Theora and Ogg inside Moonlight (and Silverlight), but for playing back other formats, they will have a few options:

    • Negotiating directly with the media codec owners a license (MPEG-LA, Fraunhofer).
    • Negotiate access to Microsoft's Media Pack with Microsoft.
    • Plug-in GStreamer or another commercial codec license into their Moonlight implementations.
    • Update: Use a hardware provided decoder like VDPau.

    Moonlight 3 and Moonlight 4 Collaboration Agreement

    As readers of my blog know, the Silverlight 4 feature set is something that is very interesting to me.

    If our experience with the positive feedback that we have gotten from MonoDevelop is of any indication Silverlight 4 will enable a whole new class of cross-platform .NET application development to take place. Like nothing we have seen before.

    We are thrilled to be working with Microsoft to make sure that we can improve, fix and fine tune Moonlight to meet those requirements and to do so in a purely open source fashion.

    Update: Team Silverlight blogs.

    Posted on 17 Dec 2009


    Nine Months Later: Mono 2.6 and MonoDevelop 2.2

    by Miguel de Icaza

    About nine months ago we released MonoDevelop 2.0 and Mono 2.4. Today we are releasing the much anticipated upgrades to both. Mono 2.6 and MonoDevelop 2.2.

    For those in a hurry, binaries and source are available from:

    And if you want a quick mnemonic to remember this release, just think debugger! and cross platform.

    The Mono team and contributors worked on this release like we have never worked before. Thanks to everyone that reported bugs, filed feature requests, contributed code and helped newcomers with Mono.

    Mono 2.6 highlights:

    • WCF client and server, the subset exposed by Silverlight 2.0.
    • LLVM support, to improve performance on server/computational loads.
    • Continuations/Co-routine framework Mono.Tasklets (background info)
    • LINQ to SQL using DbLinq.
    • New Soft Debugger, integrated with MonoDevelop on Unix and OSX (background).
    • System.IO.Packaging.
    • csharp shell now supports auto-completion (press tab to complete)
    • xbuild can now build most msbuild projects.
    • Mono debuts a verifier and security sandbox (used by Moonlight).
    • More complete 3.5 API coverage.
    • This release includes Microsoft's open sourced ASP.NET MVC, ASP.NET AJAX and Microsoft's Dynamic Language Runtime.
    • Faster and slimmer.

    MonoDevelop 2.2 highlights (screenshots here and here):

    • MonoDevelop code is now LGPLv2 and MIT X11 licensed. We have removed all of the GPL code, allowing addins to use Apache, MS-PL code as well as allowing proprietary add-ins to be used with MonoDevelop (like RemObject's Oxygene).
    • User interface improvements: the first thing that MonoDevelop users will notice is that we have upgraded the UI to fit modern ideas. We borrowed ideas from Chrome, Firefox, Visual Studio, Eclipse and XCode.
    • ASP.NET MVC support, you can now develop, debug and build ASP.NET MVC applications from MonoDevelop.
    • New T4 Macro processor (Text Template Transformation Toolkit) integrated directly into the IDE (Mono's T4 is also available as a reusable library for use and abuse in your own programs).
    • Moonlight Project Support: you can now build, debug and run Moonlight applications using MonoDevelop.
    • New MacOS and Windows support. Check our feature matrix for details.
    • New Debugger support allows debugging Console, Gtk#, ASP.NET, iPhone and Moonlight applications.
    • Extensive text editor improvements:
      • Dynamic abbrev (Just like Emacs' Alt-/)
      • Code generator (Alt-Insert)
      • Acronym matching
      • Code templates
      • Block selection
      • C# Formatter
    • New refactoring commands:
      • Inline Rename (see screenshot).
      • Resolve Namespace
      • Rename Refactoring with Preview
      • Extract Method
      • Declare Local Variable
      • Integrate Temporary Variable
      • Introduce Constant
      • Move Type to Own File
      • Remove Unused Usings
      • Sort Usings
      • Create/Remove Backing Store
      • Keybindable Commands
    • Python add-in has graduated to be a supported plugin, includes code completion, syntax checking, method and class locator and code folding.
    • iPhone development plugin.

    The team is on #mono, #monodev and #monodevelop on irc.gnome.org fielding any questions you might have.

    Update: the diffstat results for Mono 2.4 to 2.6 on a 2 million line patch:

     7208 files changed, 1392400 insertions(+), 440016 deletions(-)
    

    About a million lines of new code in Mono.

    For MonoDevelop the patch is 750,000 lines and:

     2427 files changed, 464284 insertions(+), 120124 deletions(-)
    

    Roughly 300k lines of new code.

    Posted on 15 Dec 2009


    Apple's Reply to Nokia

    by Miguel de Icaza

    I felt like an archaeologist trying to formulate a theory of what had happened there. I loved the feeling of trying to put together the story from a partial puzzle.

    The patent infringement lawsuit against Apple was a list of accusations and patent lists that Nokia claims that Apple infringes with their iPhone. But behind the background information provided in the legal document and the list of ways in which Nokia felt Apple had wronged them, it was difficult to put together a narrative. Scanning the discussion forums for clues did not lead to anything significant beyond the superficial analysis.

    As a software developer, and in particular a Linux software developer, I have mixed feelings about this lawsuit. Apple has not been exactly a model citizen when it comes to interoperability between Apple and Linux products while Nokia has embraced Linux, embraced open source development and contributed to the universal pool of software. But I also found myself enjoying using my iPhone and building software for the iPhone.

    I wanted to give both companies the benefit of the doubt. What had happened between these two companies that had forced Nokia to sue Apple?

    There were various possibilities.

    The lack of immediate response from Apple suggested that they were caught unprepared, but that was just a small chance. Probably the companies had been on negotiations and these negotiations broke off when they could not reach an agreement. The iPhone had taken the world by surprise, nobody had seen it coming and nobody had envisioned that Apple would not merely do an incrementally better phone, but it would be many times better than anything available at the time.

    When Apple launched the iPhone, Steve Jobs wanted everyone to know that iPhone's innovations were patented and that Apple planned to prevent others from copying those ideas.

    Apple's response to Nokia is a very educational document. It reads as a crash course on patent litigation when it lays out Apple's strategy for their defense. It is also a crash course on the patent system and how corporation work with international bodies to develop technology. But most importantly for me, it fills some the gaps of what happened behind the scenes.

    We do not know yet which company approached the other first about patent infringement. It could have been someone on Nokia's board that decided to extract some revenue from their patents to compensate for their business losses or it could have been initiated by Apple's team notifying Nokia that their new phones used some idea from their phones.

    What does emerge from Apple's reply is that Nokia tried to use the patents that they had pledged to license under reasonable terms to get themselves rights to Apple's juicier iPhone innovations. Nokia's pledged patents might be formidable patents and key to the implementation of certain cellular and WiFi communications, but by being pledged under F/RAND terms to various industry consortia they lost a significant amount of value. But what they lost in value, they made up in volume. This is in stark contrast with Apple's un-pledged, pristine, fully proprietary patents that Nokia and everyone but China are trying to get rights to.

    Posted on 12 Dec 2009


    Marek Announces Mono's C# 4.0 has been completed

    by Miguel de Icaza

    Marek has just announced that Mono's C# compiler 4.0 is complete.

    To try it out, get the modules mono and mcs from our Anonymous Subversion Repository and build Mono like this:

    	$ mkdir $HOME/mono4
    	$ ./autogen.sh --prefix=$HOME/mono4 --with-profile4=yes
    	$ make && make install
    	

    Posted on 09 Dec 2009


    First MonoTouch Book is out!

    by Miguel de Icaza

    This was fast! Wallace B. McClure has written the first e-book on getting started with Mono on the iPhone with MonoTouch.

    This is a short e-book, 42-pages in size, but it is also very cheap, it is only 6.99 USD and will help you get started in no time with MonoTouch.

    Here is the table of contents:

    Table of Contents

    iPhone Requirements 2

    Development Strategies 3

    Web Development with ASP.NET 3

    MonoDevelop and MonoTouch 4

    Visual Studio .NET ➪MonoDevelop 4

    Classes in MonoTouch 4

    What Is MonoTouch? 4

    Namespaces and Classes 5

    Introduction to Development on the Mac with MonoDevelop 6

    Interface Builder 8

    Outlets 10

    Actions 14

    Deploying to an iPhone 15

    Mapping 17

    MKMapView 17

    The Application 18

    Annotating the Map 20

    Debugging 21

    Interacting with Other Applications 22

    UIPicker 22

    NSUrl 24

    UIAlertView 26

    UITableView 26

    DataSource 27

    Binding Data to a UITableView 29

    Customizing UITableView 30

    Accelerometer 33

    Settings 34

    Things to Watch Out For 37

    Resources Used 38

    Posted on 03 Dec 2009


    Mexico 2009

    by Miguel de Icaza

    Voy a Mexiquito lindo estas vacaciones de Diciembre.

    Si quieren que nos reunamos para hablar de software libre, Mono, Linux, Moonlight, Silverlight, C# o para discutir por que La Mancha ya no escribe o el ultimo blog del Jetas mándenme un correo para ponernos de acuerdo.

    Posted on 03 Dec 2009


    Mono Developer Room at FOSDEM

    by Miguel de Icaza

    Stephane and Ruben are chairing the first Mono-developer room at the upcoming FOSDEM 2010.

    Ruben writes:

    As of now, you can submit your talk proposals! We want to make this a fun room and we want to accomodate all kinds of talks. For that reason, one thing we're experimenting with is having dynamic timeslots. Only want 15 minutes? That's okay! Need an hour? We'll see if we can squeeze it in! The most important factor is that it's interesting and fun.

    So send in your proposals, be it large earth-shaking projects, or little hackery experiments that make you giggle with hacker joy, we want to hear it. We have the complete Sunday to schedule. Still have questions? Email me: ruben @ savanne be.

    The submission form is here, go fill it in now! (Send in your proposals before December 20)

    See you there!

    Posted on 02 Dec 2009


    Silverlight: Universal GUI toolkit

    by Miguel de Icaza

    The most important piece of news from last week's PDC was Microsoft's decision to turn Silverlight into the universal platform for building cross platform applications.

    The upcoming version of Silverlight will no longer be a Web-only technology. It will now be possible to build full desktop applications with Silverlight.

    Desktop Silverlight applications differ from the standard Silverlight in a few ways:

    • Full access to the host file system, like any other .NET application would have.
    • None of the socket connectivity limitations that are present on the sandboxed versioned of Silverlight. Full network access (we should build a MonoTorrent UI for it!)
    • Built-in Notifications API to show up bubbles to the user when they need to interact with the application.

    Although Moonlight has supported this mode of operation since day one, turning this into a standard way to develop applications was going to take a long time. We would have needed to port Moonlight to Windows and OSX and then we would have to bootstrap the ecosystem of "Silverlight+" applications.

    But having Microsoft stand behind this new model will open the gates to a whole new class of desktop applications for the desktop. The ones that I was dreaming about just two weeks ago.

    This was a big surprise for everyone. For years folks have been asking Microsoft to give Silverlight this capability to build desktop apps and to compete with Air and it is now finally here. This is a case of doing the right thing for users and developers.

    Desktop Tools in Silverlight?

    Now that this technology is available, perhaps it is a good time to start a movement to create a suite of Silverlight-based desktop applications.

    The benefits to me are many:

    • .NET applications that actually look good. In the past your choices were basically of Gtk# or Winforms, neither one really designed for this graphic-designer driven world.
    • We can join forces with Windows/MacOS developers to create the next generation of desktop applications.
    • Developers can tap into the large ecosystem of third-party controls that exists for Silverlight.

    For the Moonlight team, this means that there is a lot of work ahead of us to bring every Silverlight 3 and 4 feature. I think I speak for the whole Mono team when I say that this is exciting, fascinating, challenging and feels like we just drank a huge energy boost drink.

    If you want to help, come join us in the #moonlight or #mono channels on the IRC server at irc.gnome.org.

    Silverlight 4

    There are many other great features in Silverlight 4, but none as important as Silverlight becoming a universal runtime for the CLR. This is a revolution.

    If you are curious about all the new tactical features of the revolution, check Tim's Complete Guide to the new Silverlight Features.

    If you have the time, watch Scott's keynote's presentation where he introduced the new features (he starts at 1:02). I loved the use of HTML as a Silverlight brush (paint with HTML and even Flash). If you have time, these are some great sessions on Silverlight:

    Droolingly yours,
    Miguel de Icaza.

    Posted on 23 Nov 2009


    The future of Moonlight

    by Miguel de Icaza

    With Moonlight quickly approaching its first official 2.0 release (which has feature parity with Silverlight 2.0 and has a handful of 3.0 features in place) we have been thinking about the work ahead of us, 3.0 and beyond.

    Although there is much work left to do to achieve full parity with Silverlight 3.0, a solid 2.0 core means that we can start thinking about new innovative ideas.

    Here are some ideas of things that Moonlight could prototype:

    • Video camera and audio support (Chris has a working prototype).
    • Native menu support for out-of-browser: we feel strongly that out-of-browser apps should get native menus and not be done with XAML. To allow proper MacOS, Windows and Linux integration.
    • Right-click support for taking screenshots of Moonlight apps, record a screencast of a video, support for saving individual images, XAML and video from the plugin.
    • Print the current canvas.
    • User opt-in for full network access and full file system access (This is possible with Moonlight if compiled for the desktop APIs, but perhaps we should extend this to the browser version).
    • Make the "Moonlight" widget ubiquitous. Allow any existing Gtk+, Win32, OSX, iPhone and Android to create content from a XAML file:
      		var splash = Moonlight.LoadFrom ("splash.xaml");
      		container.Add (sphash);
      		[...]
      
      		var mainMenu = Moonlight.LoadFrom ("mainMenu.xaml");
      		mainMenu.FindObject ("Start").Clicked += {
      			StartGame ();
      		};
      		window.Add (mainMenu);
      		

    We could use Silverlight to build the next wave of cross-platform desktop applications.

    I think of the Moonlight relationship to Silverlight as the Firefox relationship to IE four years ago. It is a chance to try out new ideas in the Silverlight-o-sphere, we can try those ideas out, and if the ideas have merit, they could become part of the official Silverlight.

    This echoes to some extent what Bob Muglia said on an interview a few days ago: "[it] will allow for Silverlight to move into all sorts of places where we can't - we can't see."

    For example, we are hard at work to make Silverlight run on the native PlayStation 3 and the Wii.

    In any case, we have been working on Moonlight for a long time. With our security system in place, and both our smooth streaming media engine and GUI engine in place I feel that open source innovation can begin.

    Posted on 12 Nov 2009


    Concurrency with DREAM

    by Miguel de Icaza

    Arne's presentation on concurrent programming at Monospace ago has been published.

    Posted on 12 Nov 2009


    Apps

    by Miguel de Icaza

    Although making changes to Moonlight might be a very fun thing to do, for the longest time I have had this entry in my TODO list: "Blog about writing a video editor in Moonlight".

    As much as I love Gtk+ and the Gnome desktop, our contributions for our desktop applications and for Gtk+ come mostly from from folks developing on Linux for Linux (with a handful of exceptions). And we are a small fraction of desktop developers.

    In my mind what is interesting to me about building applications with Silverlight is that we can create an ecosystem of free software applications that run on all three major platforms: Windows, Linux and MacOS.

    A few years ago, as part of the Google Summer of Code for Mono we created a project that could have had a great future, the Diva project (by MDK). Sadly, Michael moved on to other things, but in the back of my mind, I always wanted to have a nice video editing application for Linux.

    I like to think that with Silverlight we have a new opportunity: we can create a community of open source developers that goes beyond the Linux-desktop community, but will pull developers interested about such a project from the Windows and MacOS worlds. I know that various members of the Moonlight team are passionate about Moonlight because it is this next generation API for building GUI applications.

    Which applications do you think are needed nad could be built with Moonlight?

    I say video editing, and I have some ideas of how it should work.

    Posted on 12 Nov 2009


    BitTorrent in Silverlight

    by Miguel de Icaza

    A few years ago, thanks to the Google Summer of Code, I got to meet a brilliant programmer that wrote an entire BitTorrent implementation as a reusable library called bitsharp. Today, I am lucky enough to work with Alan in the team team at Novell.

    Alan wrote a Gtk+ UI on top of his library called Monsoon:

    With Mono running in the browser as part of Silverlight, I have always felt that we needed to build a UI for bitsharp.

    The most important advantage is that every web browser can be turned into a BitTorrent client without having to install extra software.

    Some other advantages: you could connect to a web page that contains the BitTorrent client, it would turn your machine into a seeding/downloading host, it could be shut down with minimal fuzz and it would be trivial to spice up the UI and add all kinds of visualizations for the download.

    Silverlight 2 now provides direct socket/network access and supports storing files in your local file system. Most of the pieces are already in place to make this happen.

    There are a few challenges though. Silverlight does not allow a client to listen on a port, and for security reasons it has a limited set of ports it can connect to.

    The first problem could be addressed by having the client initiate connections to third parties requesting and providing data. This might require a protocol extension.

    The second problem is easy to solve, but would require other Bittorrent clients to listen in a new port to explicitly grant access to Silverlight clients by exposing a clientaccesspolicy.xml file.

    Finally, at least for Moonlight's case, we could start doing some changes to the core and grant the out-of-browser plugin to have full network access.

    Posted on 12 Nov 2009


    Moonlight Branches

    by Miguel de Icaza

    Chris posted the new rules for the moonlight-2-0 branch and how to start working on 3.0 stuff.

    Another intesting post is David's initial take on bringing pixel shaders, perspective transforms and hardware acceleration to Moonlight.

    Posted on 11 Nov 2009


    Mono Tools for Visual Studio

    by Miguel de Icaza

    Today is a big day for the Mono team, we just released the Mono Tools for Visual Studio. The goal of this release is to make it simpler for Visual Studio developers to deploy their applications on Linux. ASP.NET, Windows.Forms, server and console applications are supported. These are the major features in the release:

    Deploy to Linux: You can deploy from Visual Studio to a Linux machine running Mono your software. We are using Universal Plug and Play to detect Linux machines on your local network, or you can enter the IP address of your favorite hosting provider.

    Debug Linux system remotely from Visual Studio: Developers complained that our debugging story left much to be desired, that deploying to Linux was possible, but debugging cumbersome. We now allow you to debug your application running on Linux without ever having to leave Visual Studio.

    You can continue to edit, build and debug the way you have always done it, but the software will be running on a Linux machine:

    We hooked the Mono debugging engine to Visual Studio, so all the regular debugging tasks are available (watches, locals, breakpoints, stepping) that you come to expect from Visual Studio debugging are available.

    Review your code for portability: We have integrated Mono's Migration Analysis (MOMA) tool into Visual Studio so you can check your software for Windows/Linux differences right from your IDE and work around APIs that do not exist in Linux or Mono and refactor your code accordingly.

    Package your software for Linux: Right from Visual Studio you can package your .NET application in Linux native installation format. Just create a packaging project in your solution, configure your package and produce an RPM that you can distribute:

    And finally, one of the most exciting features in this tool: go from shipping applications into shipping appliances in minutes:

    You use our wizard to prepare your appliance, select a base operating system template (Server, Client, and base operating system) and off you go.

    Once your appliance is built, you can test it and apply the finishing touches over the web (using a Flash applet that connects to our virtual machines in our data center) and when you are happy with the results, you can download and redistribute your appliance to your users.

    Appliances

    Earlier this year I wrote about Novell's SUSE Studio our hosted service that helps developers create ready-to-run appliances.

    Today, as a .NET developer, when you distribute your software to your users and customers, you probably have a list of requirements that goes like this:

    • Install Windows XXX, Reboot.
    • Install security updates A through Z, reboot as many times as needed.
    • Install .NET runtime, reboot as needed.
    • Install SQL server, reboot as needed.
    • Populate database, reboot as needed.
    • Install third party tool, reboot as needed.
    • Just to be sure, reboot.

    Then your users can start installing your software. At that point, you initiate a series of support calls that go like this:

    • Did you make sure that .NET xxx.yy was installed? Ah, so do that and resume the steps.
    • Wrong databases, uninstall, reboot, reinstall database, reboot.

    And repeat the above process for every single one of your users.

    Basically, every user has to repeat the same steps. Everyone has to assemble the solutions made up of the operating system, various pieces of dependencies that you have and your software, like this:

    The experience today is like trying to buy a car by buying the individual parts:

    We believe that for a class of developers there is a better way.

    We believe that we can help you put together the full car, and deliver the car in a single piece.

    With appliances you can ship a pre-configured operating system, pre-configured database and every service pre-configured and installed together with your software to deliver a full package, so you prepare your software for distribution once, you configure the database once, and then you give your users a ready-to-run virtual machine, CD-ROM or USB stick:

    SUSE Studio has been used to build Linux based appliances (over four thousand per week), and now we are making it easy for .NET developers to take advantage of one of Linux's strengths: it is free, it is open source, you can shrink it, you can grow it and you can ship your own version (and yes, we do provide the updates for all of the core components that you pick).

    Getting Started

    Check out our getting started document.

    Cool use of MonoVS

    This is a cool use of Mono for Visual Studio debugging the Axiom 3D engine from the amazing Michael Cummings:

    Visual Studio remotely debugging Axiom on an Ubuntu virtual machine hosted in Sun's VirtualBox.

    Update: How to get it to work with Ubuntu

    Posted on 10 Nov 2009


    Third Party MonoTouch controls

    by Miguel de Icaza

    This is pretty sweet in a couple of levels.

    A couple of hackers at RemObjects have released some reusable controls for use with MonoTouch that simplify some common tasks with UITableViews, they are part of their "Project Plateau":

    Not only this is sweet in that these are the first set of 3rd party controls for MonoTouch, they are also sweet because the authors built these controls using Oxygene, their Object Pascal compiler.

    Update: Some documentation can be found here: introducing Plateau for MonoTouch.

    Posted on 09 Nov 2009


    Mono's new Compacting GC

    by Miguel de Icaza

    I missed this post from Friday.

    Mark Probst has posted a call for testers for Mono's new garbage collector:

    Our new garbage collector, SGen, is now at the point where it's ready
    for early testing.  It's still a long way from being ready for
    production use - it's still slow and consumes too much memory,
    especially for long-running processes - but if you'd like to help us
    find bugs, please consider giving it a try.  I'm especially interested
    in cases where Mono crashes or hangs with SGen (other than for memory
    exhaustion).  The simpler the test cases the better.
    
    To use SGen instead of Boehm, configure mono with the switch
    "--with-gc=sgen".  At this point it's only known to run on x86 and
    AMD64 Linux.
    

    This collector is a precise-heap, conservative stack, moving, copying collector and will return unused memory back to the operating system. The details of this collector are available in our Compacting GC page.

    I am rebuilding my own Mono with Compacting GC now as we speak.

    Posted on 09 Nov 2009


    MonoTouch application for the PDC

    by Miguel de Icaza

    Craig Dunn has turned his Monospace application for the iPhone into a Microsoft PDC application that conference attendees can use at the upcoming conference.

    Mandatory screenshot:

    Since this app is not on the AppStore, you need to compile it and use Ad-Hoc deployment to run it into your phone.

    Update: If you do not have a Mac, come to our booth at the Microsoft PDC, and we will ad-hoc deploy the app for you.

    Posted on 09 Nov 2009


    Alleviating Memory Fragmentation in Mono

    by Miguel de Icaza

    Currently, Mono's Garbage Collector does not compact the heap and one of the problems that users have is that certain allocation patterns might result in a heap fragmentation that is hard to recover from. The observable side effect is that your process memory usage grows, but the memory is mostly unused:

    You can read more about this in the Compacting GC page at the Mono web site.

    Although a new GC is being developed to address this, the code is still not switched on by default in Mono as we do not consider it ready for production use (you must compiled Mono with --with-gc=sgen).

    Avoid allocating very large buffers, instead allocate smaller buffers, and if you need to provide the illusion of a large buffer, hide this behind an interface.

    If you must use large buffers, you might want to consider using MindTouch's ChunkedMemoryStream which exposes the same interface as MemoryStream, except that it uses 16k chunks instead of a very large buffer.

    This will avoid the fragmentation for a very common use case.

    Posted on 09 Nov 2009


    Introducing Debugging for MonoTouch

    by Miguel de Icaza

    Today we released MonoTouch 1.2.

    Perhaps the most important new feature in MonoTouch 1.2 is that it now has a debugger that supports debugging on both the iPhone simulator and on the iPhone/iPod Touch.

    The debugger is integrated directly into MonoDevelop/OSX. All you have to do is select one of the debugging configurations (either Debug|iPhone or Debug|iPhoneSimulator):

    and run your application:

    To set breakpoints, you use the usual MonoDevelop UI, just click on the left-hand side of the editor, or use Command-/:

    The debugger offers the usual watch windows, and also allows you to navigate object state by hovering over the value in the IDE:

    The Technology

    Although this was developed for the iPhone, I should probably have said that this is Mono's new soft debugger engine.

    The iPhone is once again a challenging platform to get debugging working on. Since Apple has not published the information necessary to implement something like GDB or Mono's own MDB and we are not going to reverse engineer the protocol, instead we created a new way of debugging Mono applications.

    The Mono Debugger for the iPhone platform uses a soft-debugger. Unlike traditional debuggers that act like a fully controlling entity over the Mono process, the soft-debugger is actually a debugger that is built into the Mono process itself. MonoDevelop communicates with this debugger over a compact protocol, similar to what has been done in the past with Java debuggers:

    We are providing a new library, the Mono.Debugger.Soft.dll that encapsulates the protocol and offers an API that developers can use to debug a remote Mono process.

    On systems where we have access to breakpoints the soft debugging engine will use the standard operating system facilities to single step and set breakpoints.

    But on systems like the iPhone and some video game consoles where there is no way to modify memory without special privileges we had to resort to a different technique. The Mono static compiler inserts special code at every sequence point that checks for single stepping or breakpoints. The code generated during these debug builds is larger, but it allows us to support the iPhone without having to resort to undocumented APIs in any form or shape.

    MonoDevelop and the iPhone

    When the user selects an application for debugging, MonoDevelop configures the application to contact MonoDevelop on startup and link the debugger to it, starts listening on a couple of ports (one for the debugging protocol, and one for redirecting standard output/standard error) and waits for the application on either the iPhone simulator or the iPhone to contact it.

    Upon contact, the debugger handshake takes place and operation continues. For the simulator, this takes place with a local socket; for the device, this happens over a TCP/IP socket over WiFi.

    One of the nice side effects of this approach to debugging is that it is possible to distribute binaries to testers (using the Ad-Hoc distribution model) and debug problems on a user's iPhone over the network.

    To support this scenario, when you build applications with the "Debug|iPhone" configuration, MonoDevelop will modify your application's Settings file on the iPhone.

    This allows your beta-testers to enable debugging and connect to your debugger for inspection. This is what the settings looks like:

    The first port is the port where MonoDevelop will be listening to. The second port is the port where the standard output and standard error will be redirected to.

    All of the Console.Output and Console.Error output will be sent to this port when debugging is enabled on the application.

    Pros and Cons

    There are pros and cons to the soft debugger approach.

    Soft debuggers are unable to do low-level debugging or debug Mono itself (mixed-mode debugging) and they are unable to stop applications at will, all it can do is request politely that the application stops, and when the Mono runtime decides that it is a good time to stop, it will stop.

    On the pro side, the soft debugger is easier to port and is more robust as it eliminates some dead-lock situations. These can happen when the runtime has been forcefully stopped by the debugger, and then the debugger invokes methods on the target. These methods in turn might require an internal lock that is currently held by a different thread.

    The Protocol

    The protocol used between the debugging agent running inside the Mono process and a debugger is implemented in the debugger-agent.c file.

    Availability

    MonoTouch customers will be offered the update the next time they start MonoDevelop or if they manually "Check for Updates" on the MonoDevelop IDE.

    Users of MonoTouch for the iPhone simulator can get the it from the trial page.

    The source code for the soft-debugger is available on SVN. The API to communicate with the Mono runtime is available in the Mono.Debugger.Soft assembly and the debugger itself has already been integrated into the Mono 2.6 branch and Mono trunk on SVN.

    This should prove useful to other users of Mono that might benefit from a soft debugger like Unity3D or Second Life.

    Screenshots

    Brent has a nice gallery of screenshots of the debugger in action on his MonoTouch 1.2 with debugging released! post.

    Posted on 04 Nov 2009


    Pig Farm Tour Oaxaca 09

    by Miguel de Icaza

    April IM logs:

    Posted on 04 Nov 2009


    10 years of Ximian

    by Miguel de Icaza

    Today is the ten year anniversary of the incorporation of Ximian, Inc. A company founded by Nat Friedman and myself whose goal was to advance the state of the Linux desktop. It was also an excuse for Nat and myself to hang out as we had become best friends forever in the previous two years.

    Our conversations over the years have always been a little surreal. I have megabytes worth of logs that look like this:

    Ximian was made up of friends that shared this vision, and its founders had no startup, business or management experience when we launched the company. We learned on the job and we were advised by friends that believed in our goals, and by people that cared about our mission.

    From the archive: Ettore Perazzoli, Raph Levien, Nat and myself in Summer of Linux.

    Ximian hired 90% of its employees from open source contributors in the community and folks that we had met over mailing lists or IRC channels.

    Nat was a Computer Science and Math graduate; I was a math drop out and we had no management experience. This means that we made every possible management mistake in the book, but all of our friends and employees stuck with us as we learned and as we worked to get the company off the ground.

    This is an interesting time to reflect on 10 years of hacking adventures. Writing, funding and advancing the state of the art of open source. In the next few weeks, Nat and myself will be publishing some short stories from Ximian.

    Today Ximian has been incorporated into Novell. Our goals have been expanded, but we still continue to work to advance the state of the art in Linux.

    Looking forward to another 10 years of joy and hacking.

    Posted on 19 Oct 2009


    iPhone application for MonoSpace Conference

    by Miguel de Icaza

    I woke up this morning and found that the amazing Craig Dunn put together an iPhone app for the Monospace Conference using MonoTouch!

    The app provides the schedule, access to the twitter feeds for the speakers and the conference, access to the MonoSpace blog, speaker profiles and access to their blogs and twitter feeds and a map to find the event.

    You can learn more, see larger screenshots and download the code to run on your iPhone from Craig's Post.

    Posted on 17 Oct 2009


    MonoSpace Conference in Austin - October 27 through 30

    by Miguel de Icaza

    Over the past few weeks, the final details of the program for the Monospace Conference have been announced, and now the event is just less than two weeks away. Some key details you may have missed:

    • The Monspace conference features 2 days of workshops and 2 days of Open Space sessions.
    • The full conference agenda has been posted, and now includes a full day of MonoTouch training (Mono for the iPhone).
    • The two-day open space sessions will be kicked off on Thursday with an Open Source Panel featuring Sam Ramji (CodePlex Foundation), Ayende Rahien (NHibernate and Castle Contributor), and Glenn Block (Managed Extensibility Framework) and moderated by Rod Paddock, Editor of CoDe Magazine.
    • The famous, prolific and thorough Ayende Rahien will be speaking on NHibernate.
    • Microsoft's own Glenn will be talking about the Managed Extesibility Framework.
    • M David Peterson will be discussing Mono on Amazon EC2.
    • The ThoughtWorks crew will be talking about F# on Mono.
    • Eric Hexter from Headsprings will be covering ASP.NET MVC.

    From the Mono team, various engineers will be presenting on special topics:

    • Larry Ewing will talk about the Moonlight, the open source implementation from
    • Aaron Bockover will talk about cross platform GUI development with Gtk#.
    • Geoff Norton will discuss development with MonoTouch on the iPhone.
    • Jackson Harper will talk about ASP.NET MVC development with Mono and Joseph Hill will discuss Mono Tools for Visual Studio.
    • Rodrigo Kumpera from our JIT team will do a low-level talk on Mono's Virtual Machine covering some of the innovations on the VM that are Mono-specific.
    • And I will focus on the schmoozing.

    The Monospace conference will be held in Austin, TX on Tuesday, October 27 through Friday, October 30. To register for the event, visit the Monospace Conference Registration Page.

    Check the program for more information.

    Registered Monospace attendees will receive a $150 discount on MonoTouch, if they purchase in the month of October.

    Posted on 16 Oct 2009


    Event mapping in MonoTouch

    by Miguel de Icaza

    When we were designing the MonoTouch APIs we had to map some of the constructs used by CocoaTouch and Objective-C to what C# developer expect.

    Like other modern toolkits, the behavior of a control can be customized by the programmer by hooking up to events and the responses to those events.

    This is a common pattern used in other toolkits. In Gtk+ objects emit signals, and the programmer can connect event handlers to individual signals, for example this is how you would connect

    void pause_player ()
    {
    	// pause the player.
    }
    
    void configure_pause ()
    {
    	button = gtk_button_new_with_label ("pause");
    	gtk_signal_connect (button, "clicked", pause_player, NULL);
    }
    	

    In the ECMA CLI world developers hook up to events by connecting to events directly in the object, it is similar in spirit:

    void configure_pause ()
    {
    	button = new Button ("Pause");
    	button.Clicked += delegate {
    		// Pause the player here.
    	};
    }
    

    In both the Gtk+ and the ECMA CLI worlds there can be multiple subscribers to the event.

    In CocoaTouch, instead of having an event per action they use a pattern where the components emits all of its messages to an instance of an object. If a button were to emit messages like "clicked", "clicked_violently" and "caption_changed" all of those messages will be sent to an object that implemented the required interface.

    I am going to give myself a literary license and use some terms loosely and write a little bit of imaginary C#.

    A button implementation would look like this:

    interface ButtonDelegate {
    	optional void clicked ();
    	optional void clicked_violently ();
    	optional void caption_changed ();
    }
    
    class Button {
    	public ButtonDelegate Delegate { get; set; }
    
    	public Button (string text) { ... }
    
    	public string Text {
    		get { return text; }
    		set {
    			text = value;
    			DoSomeRepainting ();
    			Delegate.caption_changed ();
    		}
    	}
    
    	public EventHandler ()
    	{
    		...
    		if (event_this_is_the_user_clicking){
    			// Send the message to the Delegate
    			Delegate.clicked ();
    		}
    		
    

    The user of the Button class then needs to implement the interface ButtonDelegate to respond to messages. This in Objective-C is made simple by allowing this interface to have optional methods.

    This would not work with C# interfaces as those require that all the methods on the interface are implemented.

    So we came up with a design that would blend those worlds together.

    Supporting the Objective-C approach

    We can support the Objective-C model where a class can satisfy the contract by just registering methods to respond to the actions. A user could respond to some events like this:

    class Foo : NSObject { 
    	void ConfigureButton ()
    	{
    		button = new Button ("pause");
    		button.WeakDelegate = this;
    	}
    	
    	[Export ("clicked")]
    	void pause_clicked ()
    	{
    		// Pause the button.
    	}
    }
    

    In MonoTouch we expose the "WeakDelegate" property as the weakly-typed version of the delegate, that means that you can assign to it anything that derives from the NSObject class, and respond to messages by just annotating your method with the [Export ("name")] attribute.

    But weakly typing could introduce errors. What if the parameters of the method or the return value do not match the actual signature of the selector. If the developer introduce a typo, the compiler would not be able to point this out, and you would get a nice crash or some corrupt memory.

    So we introduced strongly typed delegates, these require the programmer to implement a class and override methods that have a very specific signature. The code would then look like this:

    class Foo : ButtonDelegate {
    	void ConfigureButton ()
    	{
    		button = new Button ("pause");
    		button.Delegate = this;
    	}
    
    	// strongly typed: override ensures that this method exists in
    	// the base class, or the contract is not satisfied. 
    	public override void pause_clicked ()
    	{
    		// Pause the button.
    	}
    }
    

    The ButtonDelegate class is flagged with a special attribute, the [Model] attribute which informs the MonoTouch runtime that only methods that are overwritten from this class will be dispatched, any other methods will be considered optional and treated like optional methods.

    The problem of course is that if you wanted to respond to multiple buttons, you would have to actually distinguish them somewhere in your pause_clicked with some sort of closure value, or use helper classes, one for each button that you want to respond to. But that is a minor detail.

    So Objective-C developers that like the separation between model, view and controller can continue to use those patterns.

    That being said, although there is a lot of literature and discussion about the clean separation of Models, Views and Controllers, most samples I run across are a hodgepodge of Controller code for all sorts of things. At least the production code and the samples I have seen make it obvious that the separation of concerns is mostly academic, and in practice an instance object becomes a general purpose responder to all events, very much like you see in Gtk+, Qt, or Winforms.

    Our approach also has a limitation: the hodgepodge approach does not really work with the strongly-typed signatures as you can only derive from one class at a time. The solution is to use separate classes for each controller. Although that cleans things up and has some aesthetics associated with it in terms of clean separation of concerns, in my opinion, it is not very practical.

    Supporting the C# style

    With MonoTouch we wanted to preserve the C# style of programming where you could attach code to these notifications one-by-one.

    With C# you can use anonymous methods or lambda functions. These are incredibly powerful as they are able to capture the environment in which they were created. This means that you can trivially pass information and share information between multiple handlers.

    Additionally, you more than one method can "subscribe" to the same event, you are not limited to a single method being the receiving of the events.

    This means that in MonoTouch you configure buttons like this:

    void configure_button ()
    {
    	button = new UIButton (dims) { Text = "Pause" };
    	button.Clicked += delegate {
    		// Pause the video
    	};
    }
    

    What MonoTouch does internally is that the first time that you attach to a C#-like event, it create an instance of the ButtonDelegate that merely raises the event in the C# style.

    This means that you only pay for the memory usage if you use the feature. But when you do, you can subscribe to individual events and you can have more than one listener attached to the event.

    The Pattern

    Although we brought the pattern to most places in MonoTouch where a delegate was used, it is notably missing from the UITableView as we felt that the number of methods that had to be overwritten were too big for the model to make sense.

    In a few instances like UITableView, we suggest that developers just use the strongly typed version of the delegate classes and override the methods accordingly.

    One of the things that I would like to see is a UITableView derived class that can present the data and style the data entirely based on properties discovered at runtime with System.Reflection.

    Another thing that I want to see is support for System.Data data binding style versions of the UITableView and other UI controls in a single page.

    More details on the low-level implementation are available on the API design document on the web site.

    Posted on 15 Oct 2009


    Git# - First Public Release

    by Miguel de Icaza

    Meinrad Recheis has lead the effort to bring a full managed GIT implementation to the .NET and Mono worlds and he just announced the release of GitSharp 0.1.3, the first public release of Git#.

    The code is based on the original work from Kevin Thompson who ported the JGit Eclipse plugin to C#. Meinrad has put together a great community of contributors that integrated every JGit improvement, the credits for the first release are as follows:

    • Dave Cameron: for fixing bugs
    • Björn Carlson: for killing bugs that crept into the core
    • caytchen: for porting huge parts of the transport layer, and hunting down nasty bugs. btw, what's your real name?
    • Emeric Fermas: for eliminating some of the hardest to find bugs and for verifying the complete test suite against jgit
    • Martinho Fernandes: for fixing bugs
    • Andriano Machado: for porting massive amounts of code and tests, also fixing many bugs
    • Jim Radford: for the continuous integration server account and the support
    • Gil Ran: for porting and fixing lots of tests and initial efforts on Mono
    • Dan Rigby: for porting and fixing tests
    • rolenun: for the command line interface framework. hey, what is your real name?
    • Mauricio Scheffer: for the testing and build server expertise and CI server trouble shooting
    • Neil Stalker: for holding up the flag for git# on Mono compatibility and squashing bugs
    • Kevin Thompson: for initially porting large amounts of code and letting me rise the baby

    An easy to use API is being developed on top of the GIT core, check out some of the examples.

    Posted on 12 Oct 2009


    Your anthropological tidbit of the day

    by Miguel de Icaza

    In 1991 or 1992, I wrote a curses-based file manager for Unix, a clone of the DOS Norton Commander.

    Unlike the Norton Commander, curses, xterms and Linux did not support the mouse. So I called my file manager "The MouseLess Commander".

    Linux at that time was a cauldron of hot ideas. And Alessandro Rubini created a library for console applications to get mouse support on Linux. We worked to add mouse support to the MouseLess Commander and by the end of this exercise we renamed the file manager to "The MouseLess Commander With Mouse Support".

    Somehow I was talked into changing the name of the Mouseless Commander with Mouse Support. Since I was pretty bad at naming, we organized a vote on the mailing list and eventually the current name "Midnight Commander" was picked.

    I miss the previous name.

    Posted on 06 Oct 2009


    World Views

    by Miguel de Icaza

    Richard Stallman does not seem to have anything better to do than launch personal attacks against me. In his last piece he has decided to call me a Microsoft apologist because I do not participate in his witch hunt.

    I merely happen to have a different perspective on Microsoft than he has. I know that there are great people working for the company, and I know many people inside Microsoft that are steering the company towards being a community citizen. I have blogged about this for the last few years.

    At the end of the day, we both want to see free software succeed. But Richard, instead of opening new fronts to promote his causes, attacks his own allies for not being replicas of himself. To him, ridiculous statements like Linus "does not believe in Freedom" are somewhat normal [1].

    A Matter of Perspective

    A few years ago, I had the chance to listen to Benjamin Zander in person talk about his world of possibilities. His book "The Art of Possibility" had a profound effect on me.

    Benjamin tells this story in the book:

    Two shoe salesmen were sent to Africa in the early 1900's to scout the territory.

    One telegraphed back: "Situation hopeless. Stop. No one wears shoes."

    The other telegraphed: "Business opportunity. Stop. They have no shoes."

    Since we only have a limited time on earth, I have decided to spend my time on earth as much as I can trying to be like the second salesman. Looking at opportunities where others see hopelessness.

    This is why I love my work, because I work with friends that have consistently beat the odds and we have consistently proved our critics wrong. Because everyone that I work with wants to change the world and nobody I work with is dominated by fear.

    Far too many times, fear has prevented people from coming up with creative solutions. I rather work on constructive solutions to problems than moan and complain.

    Fear mongering is a vibrant industry, it is the easy way out for those that can not lead with the example. Create a bogeyman, make things up, lie, or tell half-truths, and demonize and you got a recipe to energize your base.

    Richard's Fear Mongering

    The documentary "The Power of Nightmares" is a fascinating view at the industry of selling "safety" to the scared population and how leaders like to scare people to push their own agendas. Richard's fear mongering is no different.

    Richard Stallman frequently conjures bogeymen to rally his base. Sometimes it is Microsoft, sometimes he makes up facts and sometimes he even attacks his own community [2]. His language is filled with simple, George W Bush-eque terms like Good vs Evil, Us vs Them.

    The creation of the CodePlex foundation was an internal effort of people that believe in open source at Microsoft. They have been working from within the company to change it. Working at CodePlex is a great way of helping steer Microsoft in the right direction.

    But to Richard, this simply does not compute.

    To Richard, the state of the world is hopeless. I on the other hand see possibility and opportunity.

    Not only you attract more bees with honey than with vinegar, there are lots of shoes to sell.

    [1] Plenty of attacks on other open source/free sofftware advocates/developers are readily googable.

    [2] the "open source" vs "free software" non-issue and the "Linux" vs "GNU/Linux" wars of the 90's that haunt us to this day.

    Comments

    I am now closing the comments for this post. Feel free to move this to the Slashdot forum.

    Posted on 05 Oct 2009


    Feedback wanted: StackOverflow DevDays in Boston

    by Miguel de Icaza

    I will be presenting at StackOverflow DevDays in Boston, on October 7th at 4.20pm.

    As usual, I will be talking about Mono. But since Mono is an giant universe, I would like to know what the audience would like to hear about.

    Please fill in my small survey to provide feedback.

    See you there!

    Posted on 30 Sep 2009


    Pictures: ECMA 334/335 January 2003

    by Miguel de Icaza

    At the ECMA meeting in January of 2003 Anders was presenting C# 2.0:

    Todd Proebsting had just developed iterators for C# and was presenting, it was inspired by his previous work on Icon's iterators. Sam Ruby (from IBM), Thomas Plum (from Plum Hall) and Todd:

    Anonymous methods, the foundation for lambdas in C#, used a beautiful code generation technique. Anders who has a beautiful hand writing was explaining the design to the committee:

    Jim Hogg presented the design for generics in the ECMA CIL. Here he is discussing with Arch (at the time with Intel, and the guy behind ECMA's System.Parallelization), Jon Jagger and Emmanuel Stapf (ISE Eiffel):

    Joel Marcey, then at Intel and Jim Miller:

    Todd and Chris Fraser. I was fanboying them. Mono's original JIT design was based on a lot of his work. At dinner Chris recommened Csikszentmihalyi's book on Flow, which I loved:

    Posted on 26 Sep 2009


    Comment Policy on my Blog

    by Miguel de Icaza

    Here is a rough draft of the comment policy for my blog.

    When you come to my blog to comment, you are a guest in my blog and your opinions are hosted there in the same way that you would be hosted if you showed up at my place to chat.

    So standard rules of social engagement are required. If you are unable to operate under regular social situations and you feel the need to insult others or myself in my blog, not only you are not welcome, but your comment will not show up and will be promptly deleted.

    Constructive criticism is always welcome on my blog, now

    If you feel the need to be rude, offensive, lie or you are intentionaly trying to start a fight, I encourage to do that in your blog.

    If you can not articulate your thoughts without attacking and you can not keep your temper in check, I encourage to do that on your own blog.

    Trolling will be removed.

    Posted on 25 Sep 2009


    Branching for Mono 2.6

    by Miguel de Icaza

    Today Andrew branched Mono trunk for the Mono 2.6 release.

    Mono 2.6 is the last release that will support the mscorlib 1.1 profile and the C# 1.0 compiler. We are now moving to a pure generics world with Mono.

    Update: Specifically, we will be removing the 1.0 assemblies from the build, the mcs.exe command will now point to gmcs.exe, all of the xxx1 command versions will be eliminated and all of the conditional code in the Mono class libraires that depended on NET_1_0 and NET_1_1 will be removed.

    As for the Mono 2.6 release notes: we will put those together in the next few days. Please be patient.

    Posted on 25 Sep 2009


    On Richard Stallman

    by Miguel de Icaza

    I want to say that God loves all creatures. From the formidable elephant to the tiniest ant. And that includes Richard Stallman.

    As for me, I think that there is a world of possibility, and if Richard wants to discuss how we can improve the pool of open source/free software in the world he has my email address.

    Love, Miguel.

    Posted on 23 Sep 2009


    MonoTouch 1.0 goes live.

    by Miguel de Icaza

    MonoTouch is a commercial product based on Mono and is made up of the following components:

    • MonoTouch.dll The C# binding to the iPhone native APIs (the foundation classes, Quartz, CoreAnimation, CoreLocation, MapKit, Addressbook, AudioToolbox, AVFoundation, StoreKit and OpenGL/OpenAL).
    • Command Line SDK to compile C# code and other CIL language code to run on the iPhone simulator or an iPhone/iPod Touch device.
    • Commercial license of Mono's runtime (to allow static linking of Mono's runtime engine with your code).
    • MonoDevelop Add-in that streamlines the iPhone development and integrates with Interface Builder to create GUI applications.

    The MonoTouch API is documented on the Mono site. The MonoTouch API is a combination of the core of .NET 3.5 and the iPhone APIs.

    We have created some tutorials on how to use MonoTouch and you can read the design documentation on the MonoTouch framework.

    Some History

    Almost a year ago when we released Mono 2.0 for OSX, I asked the readers of this blog to fill a survey to help us understand where we should take Mono.

    Many developers asked us to provide Mono for the iPhone.

    A year ago, it was possible to use Mono's static compiler to compile ECMA 1.0 CIL bytecode for the iPhone. This is the technology that powered Unity3D's engine for the iPhone.

    Users of Unity3D have published more than 200 applications on the AppStore.

    We debated internally what exactly Mono for the iPhone would be. We considered doing a Windows.Forms port, to bring Compact Framework apps to the iPhone, but that would have required a complete new backend for Windows.Forms and would have required also a "theme" engine to make it look like the iPhone. We discarded this idea early on.

    We decided instead to go with a native binding the iPhone APIs. It would not be a cross platform API and it would tie developers to the iPhone platform, but it would also mean that applications would look and feel native, and developers would get closer to the iPhone.

    Creating a binding for the Objective-C APIs with .NET in the past has relied extensively on dynamic code generation, and this feature is not available on the iPhone (the kernel prevents JIT compilation from taking place). As we started doing the work to bind the low-level C APIs, Geoff started prototyping a new Objective-C/C# bridge that was specifically designed to work within the iPhone requirements.

    By the time we had sorted out the foundation and the Objective-C bridge we had gained some fresh experience from binding the C++ PhyreEngine to .NET and we decided to create a new binding generator to simplify our life (I will blog about this new approach to binding creation in another post).

    At this point, we started investing into supporting not only the device, but support the simulator. This would prove to be incredibly useful for quickly testing the code, without having to wait a long time to compile and deploy on the device.

    The Developer Experience

    At this point, we had enough to create mix-mode GUI applications (they were mostly Objective-C apps hosting Mono) and the pipeline was horrible: it involved using some 3 compilers, having 3 Mono checkouts and applying individual patches to all trees.

    We were aware of how easy Unity had made things for their users, they had set the bar pretty high in terms of usability for us. Unity had some advantages, they could "debug" without deploying the code to the device, something that we could not really do ourselves.

    We were still far from this.

    We introduced a command that would isolate all of the complexities of creating simulator and ARM executables, the mtouch command.

    With the mtouch command and the bindings complete, we started trying out the API by porting the Apple iPhone samples from Objective-C to C#. And in the process finding two things: C# 3.0 constructor initializers are a thing of beauty:

    UIControl SliderControl ()
    {
    	var slider = new UISlider (new RectangleF (174f, 12f, 120f, 7f)){
    		BackgroundColor = UIColor.Clear,
    		MinValue = 0f,
    		MaxValue = 100f,
    		Continuous = true,
    		Value = 50f,
    		Tag = kViewTag
    	};
    	slider.ValueChanged += delegate {
    		Console.WriteLine ("New value {0}", slider.Value);
    	};
    	return slider;
    }
    	

    And also that the samples ported were half the size of the equivalent Objective-C programs.

    As we were doing this work to iron out the kinks in the API design, Michael got started on designing the MonoDevelop support for the iPhone. This included the regular bits that you would expect like templates, building, running and deploying, but most importantly the Interface Builder integration.

    Interface Builder produces an XML file that describes your UI, and it is able to generate some header files for you, but in general developers that want to refer to components in the UI and implement their backing store have to repeat the same stuff over and over. For example, controlling the contents of a label on the screen requires the developer to declare the same variable three times: 2 in the header file, and one in the Objective-C file (if you are lucky).

    We took a different approach. We made it so that MonoDevelop would automatically generate a code-behind partial C# class for each Interface Builder file. This meant that to users the entire process would be transparent.

    They would define outlets or messages, and those would just become part of their class. Intellisense and code completion would become available to them without any extra coding.

    Posted on 14 Sep 2009


    CodePlex Foundation

    by Miguel de Icaza

    Microsoft today launched the CodePlex Foundation a non-profit organization to promote the open source collaboration between companies and open source communties, projects and individuals.

    This is another step in the right direction for Microsoft. I have been working on open source software since 1992, and back then a world where open source played a major role was a dream to many of us. Microsoft adopting open source licenses, releasing some of their code under open source licenses and being a better community member was the stuff of fiction.

    There are still many things that I would like to see Microsoft do, and many things that I believe Microsoft has to change to become a full member of the open source community, but it is encouraging to me to see Microsoft evolve. I hope that the CodePlex foundation will help us continue to build bridges between our communities.

    I am glad that I was asked to be part of the board of directors of the foundation. And to work together with some great advisory board.

    I hope that I can last more on this foundation than I lasted at the FSF, where I was removed by RMS after refusing to be an active part of the campaign to rename Linux as GNU/Linux.

    Posted on 10 Sep 2009


    MonoDevelop 2.2 Beta 1: We go cross platform.

    by Miguel de Icaza

    MonoDevelop goes cross platform.

    Since the beginning of time, man has yearned to get a cross platform .NET IDE. Homer's Odyssey described one man's effort to achieve such a thing. And it was not until today, September 9th of 2009 that the world can test out such a tool.

    With this release MonoDevelop leaves its cozy Linux nest and embarks on a wild adventure into the hearth of MacOS and Windows. The MonoDevelop team made this one of their major goals for this release: to turn our loved IDE into a cross platform IDE.

    If you are curious about the details, check out the What is new in MonoDevelop 2.2 page.

    MonoDevelop on Windows

    We are not only bringing MonoDevelop to OSX and Windows as a plain GUI port, but we are also providing installers, deep operating system integration and support for native debugging on each platform.

    MonoDevelop on MacOS X

    In addition to becoming a cross platform IDE, there are many new features in MonoDevelop.

    For instance, MonoDevelop can be used to develop ASP.NET MVC applications on OSX and Linux and Silverlight applications on OSX and Linux.

    Debugger

    MonoDevelop now has integrated debugger support. Not only it is able to debug Mono applications, it also can work as a frontend to GDB to debug native applications.

    In addition, on Linux it is possible to debug ASP.NET pages.

    New Add-ins

    New exciting add-ins: ASP.NET MVC, Silverlight and iPhone (for use with MonoTouch).

    Policies

    A common problem that we face as open source developers is that not every project uses the same coding style. Different teams use different coding conventions. MonoDevelop now supports policies to describe how files should be edited and what defaults should be used in each:

    Editor Improvements

    My favorite new feature is Dynamic Abbrev (Alt-/) a feature that we brought from Emacs and that fills me with joy. That being said, for the non-Emacs lovers there are plenty of features that you asked for, and that we implemented:

    • Extensive refactoring support. And I mean, it is extensive.
    • Code templates.
    • On the fly formatting.
    • Acronym Matching in Code Completion
    • XML Documentation Shown in Code Completion
    • VI mode for those users hooked up on VI commands, they can now use those within MonoDevelop.

    Another pretty cool feature is the code generation support that is triggered with Alt-Insert. When you press Alt-insert it will popup a context sensitive dialog box that offers a few options of code that could be generated at this point: ToString methods, Equals/GetHashCode methods all based on existing fields and properties.

    Why go Cross Platform?

    Going cross platform means that developers will have the same tool across all of the operating systems they use: Windows, Mac and Linux.

    .NET developers that have been enchanted by OSX will be able to continue developing software with their favorite programming languages while enjoying OSX and will be able to go back and forth between Windows, OSX and Linux as needed. This also means that they can work with developers in other platforms, regardless of the personal choices of other team members.

    As many of you know, the number of contributors to a project is linked to the number of users of that project. By expanding our market presence from Linux, we expect to get contributions, fixes, improvements, bug reports, code and add-ins from developers in other platforms.

    We intend to make MonoDevelop the Eclipse of the .NET community. Just like Eclipse became the foundation for Java development, we hope that MonoDevelop will become the foundation for .NET development, and hopefully for much more than that.

    A multi-system IDE

    We are not religious when it comes to supporting other programming languages [1]. We want to embrace not only .NET-based projects like Gtk#, Silverlight, ASP.NET, Boo, C#, F#, Visual Basic and Windows.Forms. We are also embracing other developer platforms like Python, C/C++, Vala, and we want to expand our presence to work with the Flash, PHP, Ruby, Rails, Flex and any other communities that need a cross platform IDE.

    [1] we are just religious about the fact that C# is a better programming language to build an IDE than Java is.

    Thanks!

    This release could not have been possible without the endless nights and the collaborations of our contributors and all of the end users that reported bugs and gave us feedback.

    Posted on 09 Sep 2009


    Mono Survey Time!

    by Miguel de Icaza

    Is it that time of the year when I unleash Google Docs' Survey platform on the users of my blog.

    Every once in a while people ask us "When will you support Mono on..." and our answer is usually "thanks for your feedback, we will carefully consider it".

    The reality is that all we have at this point is a lot of anecdotal data. Since my previous surveys on Mono, Mono for OSX, Mono for the iPhone and Mono for Visual Studio turned out to be great tools to understand what people actually want, I have created a new survey.

    In this survey, I want to know how much people are willing to pay for (or not pay) for Mono commercial support on a variety of platforms: Red Hat Enterprise Linux, HP-UX, AIX, Solaris on a variety of architectures.

    Go to my survey

    Posted on 08 Sep 2009


    Mono/.NET CodeCamp in Catalonia, Spain

    by Miguel de Icaza

    The .NET and Mono user communities are working together in Spain to organize a joint .NET/Mono Code Camp. This Code Camp is going to be interesting because it is putting together two communities with very different points of view, but between which there is a lot of synergy. It will be a good chance to talk about Mono, Moonlight, MonoDevelop, MonoTouch and all the stuff we are working on.

    Lluis just announced that the call for papers is ending this Friday, so not much time is left if you want to participate with a talk. There are more details in his blog post

    Posted on 08 Sep 2009


    MonoTouch Resources

    by Miguel de Icaza

    While I was gone, a pretty nice site called MonoTouch.infowas created that is aggregating all kinds of MonoTouch samples, posts, and discussions.

    From the MonoTouch Bill Splitter page.

    It is aggregating many of the samples being discussed in the tweetosphere and from the MonoTouch mailing list.

    The samples are particularly useful as MonoTouch merges two worlds: .NET development and Objective-C programming on the iPhone/iTouch.

    MonoTouch supports the Objective-C like setup where classes can respond to messages and you have to structure your code with MVC patterns. But it also supports the C# event-style programming mode, where developers can use lambda functions to hook up to interesting events.

    You can also follow @monotouchinfo on twitter.

    Posted on 01 Sep 2009


    GitSharp making progress

    by Miguel de Icaza

    Meinrad Recheis emailed me to inform me that he has forked the Gitty project (a project that was doing a line-by-line port of a Java version of GIT) and that the project is making progress on having a full C# based GIT implementation.

    GitSharp source code can be downloaded from github and they are making sure that GitSharp works on both .NET and Mono.

    I can not wait for a MonoDevelop UI for it!

    Posted on 01 Sep 2009


    Silverlight/C#, Flash/ActionScript 3 and Canvas/Javascript

    by Miguel de Icaza

    Been following some of the discussion around Action Script 3 on the tweetosphere. Here are three implementations of the same model from Joa Ebert (he works on a fabulous Flash product for doing music that I absolutely love).

    From his Flirting with Silverlight post:

    Lately a lot of discussion had the ActionScript language as its focus. People start complaining about complex language features but I think they are great because the end user will benefit from that. Yesterday evening I had my very first test with Silverlight — and I am really impressed.

    It took me a short amount of time to port the strange attractor to Silverlight. I agree that this is may be not a fair comparison because I know C# already but have a look at the source code. I make heavy use of type inference and the Matrix4x4 class has the plus, multiply and array-index operator overloaded. The code is more readable. And besides: it executes really fast. Faster than my heavily optimized ActionScript version. Imagine I would write var bleh = 1.0 in ActionScript. Framerate would drop to something like zero. But this is sad since there is no reason for me to write var bleh: Number = 1.0. A modern compiler should be able to figure this out. haXe can do it, C# can do it, OCaml can do it and lots of others as well.

    Remember: This was my first time using Silverlight. To achieve the same result with Flash you have to be kind of an expert in strange player and language “features”. Now tell me again that the end user will not benefit.

    Here are the three implementations:

    Posted on 12 Aug 2009


    C# 4's Dynamic in Mono

    by Miguel de Icaza

    C# 4.0 introduces the dynamic type into the language. The language will ship in Visual Studio 2010.

    Once a variable is declared as having type dynamic, operations on these value are not done or verified at compile time, but instead happen entirely at runtime.

    Marek has been working on Mono's C# 4 implementation and it is coming along nicely. Zoltan wrote a small "PInvoke" dynamic class using Mono's C# compiler that allows you to call C library methods like this:

    	dynamic d = new PInvoke ("libc");
    	d.printf ("I have been clicked %d times", times);
    	

    In this case "printf" is resolved at runtime to be a method in the "libc" library. This is similar to Python's ctype library in about 70 lines of C# leveraging LINQ Expression, the Dynamic Language Runtime and C#'s dynamic:

    The code is:

    using System;
    using System.Dynamic;
    using System.Reflection;
    using System.Reflection.Emit;
    using System.Runtime.InteropServices;
    using System.Threading;
    using System.Linq.Expressions;
    
    class PInvokeMetaObject : DynamicMetaObject {
    
        public PInvokeMetaObject (Expression parameter, object o) :
            base (parameter, BindingRestrictions.Empty, o) { }
    
        public override DynamicMetaObject BindInvokeMember (InvokeMemberBinder binder, DynamicMetaObject[] args) {
    
            var self = this.Expression;
            var pinvoke = (PInvoke)base.Value;
    
            var arg_types = new Type [args.Length];
            var arg_exps = new Expression [args.Length];
    
            for (int i = 0; i < args.Length; ++i) {
                arg_types [i] = args [i].LimitType;
                arg_exps [i] = args [i].Expression;
            }
    
            var m = pinvoke.GetInvoke (binder.Name, arg_types);
            var target = Expression.Block (
    			    Expression.Call (m, arg_exps),
    			    Expression.Default (typeof (object)));
            var restrictions = BindingRestrictions.GetTypeRestriction (self, typeof (PInvoke));
    
            return new DynamicMetaObject (target, restrictions);
        }
    }
    
    public class PInvoke : DynamicObject {
        string dll;
    
        AssemblyBuilder ab;
        ModuleBuilder moduleb;
        int id_gen;
    
        public PInvoke (string dll) {
            this.dll = dll;
        }
    
        public override DynamicMetaObject GetMetaObject (Expression parameter) {
            return new PInvokeMetaObject (parameter, this);
        }
    
        public MethodInfo GetInvoke (string entry_point, Type[] arg_types) {
            if (ab == null) {
                AssemblyName aname = new AssemblyName ("ctype");
                ab = AppDomain.CurrentDomain.DefineDynamicAssembly (aname, AssemblyBuilderAccess.Run);
                moduleb = ab.DefineDynamicModule ("ctype");
            }
    
            // Can't use DynamicMethod as they don't support custom attributes
            var tb = moduleb.DefineType ("ctype_" + Interlocked.Increment (ref id_gen) + "_" + entry_point);
    
            tb.DefinePInvokeMethod ("Invoke", dll, entry_point,
    			    MethodAttributes.Static|MethodAttributes.PinvokeImpl,
    			    CallingConventions.Standard, typeof
    			    (void), arg_types,
    			    CallingConvention.StdCall, CharSet.Auto);
    
            var t = tb.CreateType ();
            var m = t.GetMethod ("Invoke", BindingFlags.Static|BindingFlags.NonPublic);
    
            return m;
        }
    }
    
    public class Tests
    {
        public static void Main (String[] args) {
            dynamic d = new PInvoke ("libc");
    
            for (int i = 0; i < 100; ++i)
                d.printf ("Hello, World %d\n", i);
        }
    }    
    	

    You can download the C# 4.0 Future document for details.

    Mono's C# 4 compiler so far implements optional parameters, named parameters, has support for the new covariant and contravariant specifiers and the dynamic keyword is evolving very quickly (as shown by the example above).

    If you want to test drive Mono's C# 4.0 compiler, you need Mono from Git and you must pass the "--enable-profile4=yes" argument. Once you do this, the new compiler will be installed as dmcs on your system.

    Nikhil has a nice sample that shows JSon integrated directly into C#.

    Posted on 11 Aug 2009


    C# Sqlite

    by Miguel de Icaza

    Noah Hart did a line-by-line port of Sqlite to C# and has uploaded the code to code.google.com/p/csharp-sqlite.

    The frequently asked questions on the web site talks about performance (it is about 5 times slower than native code, but still, it can do 1.5 million selects per second, 300k inserts per second).

    Still, not bad for a line-by-line port; Folks on the #mono channel on irc.gnome.org a couple of days ago were commenting on the possible ways of tuning it up by not forcing the C way where the C# way would work just fine.

    The potential for this library is huge. It could be used for ASP.NET servers running in medium trust mode, or it could be used by Silverlight applications.

    It seems like Tim Anderson is attempting to remove all the P/Invokes from it to make it run on Silverlight (the P/Invokes are mostly used for doing file-level locking; Again part of the line-by-line history of it).

    Posted on 06 Aug 2009


    IronRuby Progres

    by Miguel de Icaza

    Antonio Cangiano from IBM compares the performance of the recently released IronRuby with Ruby 1.8 and 1.9 on Windows.

    On his blog post he looks at both the micro benchmarks and overall benchmarks. The summarized results:

    Antonio comment:

    IronRuby went from being much slower than Ruby MRI to considerably faster across nearly all the tests. That’s major progress for sure, and the team behind the project deserves mad props for it.

    One final warning before we get too excited here. IronRuby is not faster than Ruby 1.9.1 at this stage. Don’t let that first chart mislead you. While it’s faster in certain tests, it’s also slower is many others. Currently, it’s situated between Ruby 1.8.6 and Ruby 1.9.1, but much closer to the latter. The reason why this chart is misleading is that it doesn’t take into account any tests that timed out, and several of such timeouts were caused by IronRuby (more than those caused by Ruby 1.9.1). If you were to add, say, 300 seconds to the total, for each timeout for the two implementations, you’d quickly see that Ruby 1.9.1 still has the edge. The second chart that compares macro-benchmarks does a better job at realistically showing how IronRuby sits between Ruby 1.8.6 and Ruby 1.9.1 from a performance standpoint. If you were to plot every single benchmark on a chart, you’d find a similar outcomes for a large percentage of the tests.

    Whether it’s faster than Ruby 1.9 or not, now that good performances are staring to show up, it’s easier to see IronRuby delivering on it’s goal of becoming the main implementation choice for those who both develop and deploy on Windows. This, paired with the .NET and possible Visual Studio integration, the great tools available to .NET developers, and the ability to execute Ruby code in the browser client-side thanks to projects like Silverlight/Moonlight and Gestalt, make the project all the more interesting.

    Posted on 03 Aug 2009


    MonoTouch: Mono on iPhone closed preview

    by Miguel de Icaza

    We have reached feature completion status for our MonoTouch project and we are looking for some adventurous iPhone developers that might be interested in trying out Mono for the iPhone and the MonoTouch APIs (A C# API for building Cocoa applications).

    We are doing a closed preview to gather feedback on MonoTouch, if you would like to be part of this preview/beta, please fill out the signup form.

    You can browse the source code for the sample widget catalog built using the MonoTouch.UIKit .NET binding to Cocoa's UIKit.

    Posted on 03 Aug 2009


    MonoTouch: Mono on iPhone closed preview

    by Miguel de Icaza

    We have reached feature completion status for our MonoTouch project and we are looking for some adventurous iPhone developers that might be interested in trying out Mono for the iPhone and the MonoTouch APIs (A C# API for building Cocoa applications).

    We are doing a closed preview to gather feedback on MonoTouch, if you would like to be part of this preview/beta, please fill out the signup form.

    You can browse the source code for the sample widget catalog built using the MonoTouch.UIKit .NET binding to Cocoa's UIKit.

    Posted on 03 Aug 2009


    Bridging C# and C++ on Unix

    by Miguel de Icaza

    Unlike Microsoft's .NET, Mono lacks a C++ compiler that can generate CIL code or mixed CIL/native code. This makes it harder for C++ codebases to integrate with C# code.

    One solution to the problem is to write C wrappers for every C++ method and then use P/Invoke to call into each wrapper. Dealing with virtual methods then becomes challenging.

    Andreia Gaita explains on Binding C++ APIs a technique that can be used to bridge the C++ and C# worlds using Mono's built-in support for COM objects.

    Posted on 03 Aug 2009


    SUSE Studio is out - The Linux Appliance Builder

    by Miguel de Icaza

    Update: Nat Friedman has written two great blog posts on SUSE Studio, check them out here:

    Today Novell announced the release of Nat's latest project: SUSE Studio. Nat has been working on this for a very long time.

    Studio is a tool that allows anyone with a web browser to create Linux-based systems and appliances. We believe that this is one of Linux' major strengths and we wanted to turn this potential into a reality.

    In addition to custom Linux builds, Nat's team has put a strong focus on Linux-based appliances.

    The goal of an appliance is:

    • Perform a single task well.
    • Requires minimal assembly and setup.
    • It comes as a standalone unit.

    The idea is that software developers can combine into a single deployable unit (a) the operating system; (b) your software plus any dependencies requires; (c) the proper configuration and data files required to operate.

    When you build your appliance with Studio, you can select the kind of system you want, the packages you want to install, you can preconfigure the system and you can even test-drive the result over the web (it uses a Flash applet) and even fine tune or do some last minute touches over the web (inside the Flash applet) before producing your final version:

    Test your Linux over the web.

    The resulting Linux distribution can be downloaded as an ISO image, you can update it, you can create a bootable USB Linux system with your software, generate a VMWare image or VPC image and next week you should be able to deploy them in Amazon EC2.

    We have been using Studio for building the Mono downloaded VMware/VPC images for a while. We bundle the latest Mono, MonoDevelop and various ASP.NET and Windows.Forms samples for developers to try out.

    As a software developer, you can move from a world where you let the end users assemble the solution themselves:

    Into a setup where you deliver the entire package to your end user:

    The above scenario is common in the Linux world, non-existent in the OSX world, and only large OEMs are able to do the same on the Windows world.

    What we wanted to do was enable anyone, with little Linux expertise to setup their own operating systems. You do not have to be an expert on kernels, boot loading, dependencies or anything else to produce your own operating system.

    In addition to Unix software, we are going to make it very easy for Windows developers to bring their applications to Linux. Our Mono for Visual Studio project will now allow developers to go straight from Visual Studio into a Linux powered appliance:

    Mono Visual Studio Plugin allows .NET to Appliance compilation.

    Posted on 28 Jul 2009


    Proposed C# extensions

    by Miguel de Icaza

    Scott Peterson has written a proposal to extend C# to support parameterless anonymous methods.

    Scott's proposal includes a patch for Mono's C# compiler that implements the suggestion.

    The short story is that with this patch allows constructor initializers to also initialize events in an object. So you can now write code like this:

    var button = new Button () {
        Label = "Push Me",
        Relief = ReliefStyle.None,
        Clicked +=> Console.WriteLine ("ouch!")
    };
    	

    Both Bockover and myself love the 3.0 initializer syntax for objects and the only place where the awesomeness broke was the event initialization.

    Posted on 27 Jul 2009


    Improving Mono's compatibility with .NET CLR

    by Miguel de Icaza

    For as long as we remember, most new versions of IronPython, IronRuby or the Dynamic Language Runtime exposed new missing functionality in Mono.

    After a major release of any of these tools that deeply exercise the internal Reflection.Emit support and the runtime we would implement the missing features and ship a new Mono version.

    As part of the Microsoft/Novell collaboration on Silverlight for Linux, a couple of months ago, we received from Microsoft the test suite for the Silverlight class libraries.

    We have been working on fixing all of the issues exposed by the test suite. The test suite exposed bugs in Mono and missing features that are necessary for Silverlight in general, as well as the DLR and the DLR-based languages like IronRuby and IronPython.

    We are pretty excited about the progress and the increased compatibility of Mono with Microsoft's .NET.

    Posted on 27 Jul 2009


    MonoDevelop Refactoring

    by Miguel de Icaza

    The other day I did a quick tweet-vey asking folks what they wanted to see in MonoDevelop the most. It turned out that what they wanted the most matched pretty much what we had been working on.

    About 50% of the features requested will be in our upcoming MonoDevelop 2.2. One cool refactoring tool is bound to the F2 key. You press F2 in a parameter or local variable, and as you edit the local/variable, all the references in your method are updated accordingly live.

    ObScreenshot:

    There are many more features on the pipeline, but they deserve more than a quick post-and-run.

    Posted on 24 Jul 2009


    Using Ruby and Python on Web Clients

    by Miguel de Icaza

    Project Gestalt allows developers to use Ruby and Python to script their web UIs.

    The project is powered by Silverlight's Dynamic Language Runtime and the IronPython and IronRuby. This means that they run under a sandboxed JIT engine.

    Using it in your web pages is very simple. All you need to do is include in your web page the "gestalt.js" javascript. Once you do that, you can then embed Python or Ruby source code using <script> language="python"<script> or <script> language="ruby"<script>

    <body>
    
    <button id="say_hello">Say, Hello!</button>
    
    <script language="python">
    def OnClick(s,e):
      document.say_hello.innerHTML = "Hello, World!"
        
    document.say_hello.AttachEvent("onclick", 
                       EventHandler[HtmlEventArgs](OnClick))
    </script>
    </body>
    </html>
    	

    This addresses a part of Silverlight's story that I always felt was less than ideal. Without the Gestalt script, developers using Ruby or Python had to package their software on a ZIP file before sending down to the client.

    Jimmy covers in more detail this important development. We both disliked the ZIP-file deployment model that Silverlight comes out of the box with.

    With Gestalt developers can treat Python and Ruby on the client in the same way they have been treating HTML and Javascript. Write code, hit save, refresh page.

    Check the samples.

    All four pieces (Gestalt, the Dynamic Language Runtime, IronRuby and IronPython) are open source technologies that run on either Microsoft's Silverlight or our own open source Moonlight.

    Posted on 22 Jul 2009


    Popular Topics on ServerOverflow

    by Miguel de Icaza

    In the comments from my previous post someone pointed out ServerFault's question clouds:

    The StackOverflow tags are:

    I love to be working, contributing and participating with fabulous people that are advancing the hottest topics of discussion at Stack/Server/Overflow.

    Posted on 22 Jul 2009


    Popular Topics on StackOverflow

    by Miguel de Icaza

    I am probably the last person to find about this, but I find the number of questions/tagged on StackOverflow fascinating:

    Posted on 21 Jul 2009


    TreemapViewer: Building Silverlight Applications on Unix

    by Miguel de Icaza

    A few months ago, to get an idea of what contributed to the size of Mono libraries I wrote a small Treemap visualizer using Moonlight:

    Moonlight's assemblies; area represents the codesize.

    You can browser the code or get a copy from our AnonSVN repository.

    There are a couple of tools here:

    My Treemap is not very ambitious, and it is nowhere as complete as the new Treemap control that is part of the open source Silverlight Toolkit. But it was a fun learning experience for me.

    Reusable Engine

    I did not really know where we would use this control, on the web or on the desktop when I started. So I split the actual engine that does the heavy lifting from the actual chrome for the application.

    This is why I ended up with a Silverlight user interface and a Gtk# user interface. This idea in general might be useful for other developers as well.

    The Custom Control

    The custom control is very simple, it is called TreemapRenderer and derives from UserControl. The code overwrites two methods: MeasureOverride and ArrangeOverride. These methods are used to allow the control to participate in the Silverlight layout system (for example, the control can be embedded in a table that can auto-stretch). Silverlight invokes your MeasureOverride to find out the desired size that you control would like to consume:

    public class TreemapRenderer : UserControl {
    	protected override Size MeasureOverride(Size availableSize)
    	[...]
    
    	protected override Size ArrangeOverride(Size finalSize)
    	[...]
    }
    	

    Silverlight will invoke your control's ArrangeOverride to layout its contents once it has determined the size that the control will use.

    This is where my TreemapRenderer lays out its contents.

    This code renders an actual region on the treemap, I like the C# 3.0 initializer syntax for the text created:

    public void SetRegion (Rect newRegion)
    {
            region = newRegion;
            content.Children.Clear ();
            content.Width = region.Width;
            content.Height = region.Height;
            
            if (caption != ""){
                    int max;
                    string formatted = MakeCaption (caption, out max);
                    double w = region.Width * 1.60;
                    double s = w / max;
    
                    var text = new TextBlock () {
                            FontSize = s,
                            Text = formatted,
                            Foreground = new SolidColorBrush (Color.FromArgb (255, 0x5c, 0x5c, 0x5c))
                    };
    
                    Canvas.SetTop (text, (region.Height-text.ActualHeight)/2);
                    Canvas.SetLeft (text, (region.Width-text.ActualWidth)/2);
                    content.Children.Add (text);
            }
     
            Rect emptyArea = region;
            Squarify (emptyArea, root.Children);
     
            Plot (root.Children);
    }
    	

    To provide feedback to the user, I change the background color of the treemap on enter/leave. I use anonymous two anonymous methods, one for MouseEnter, one for MouseLeave.

    Notice that state is shared by these two blocks of code using C# variable capturing. A key feature of the language:

    	bool inside = false;
    	host.MouseEnter += delegate {
    	        host.Background = new SolidColorBrush (Colors.Yellow);
    	        if (text != null)
    	                text.Foreground = new SolidColorBrush (Colors.Black);
    	        inside = true;
    	};
    	
    	host.MouseLeave += delegate {
    	        host.Background = transparentBrush;
    	        if (text != null)
    	                text.Foreground = borderBrush;
    	        inside = false;
    	};
    	

    One thing that proved very useful was the ability to zoom-into an area. If you click on an assembly, you will get a rendering of the code size used by a type; If you click on that, you get a method breakdown on a class:

    drill-down into mscorlib's sizes.

    To transition, I added a cute animation where I render the new image and animate it from the area occupied in the larger view into the final size. This is the code that queues the animation:

            // Render a child
            void Clicked (Node n)
            {
    		// This is the child rendered, configure it to its final size
                    TreemapRenderer c = new TreemapRenderer (n, n.Name);
    
                    Size ns = new Size(region.Width, region.Height);
                    c.Measure (ns);
                    c.Arrange(region);
    
    		//
    		// Scale it and position on the spot that it currently
    		// occupies on the screen
    		//
                    var xlate = new TranslateTransform () {
                            X = n.Rect.X,
                            Y = n.Rect.Y };
    
                    var scale = new ScaleTransform () {
                            ScaleX = n.Rect.Width / region.Width,
                            ScaleY = n.Rect.Height / region.Height };
    
                    c.RenderTransform = new TransformGroup { Children = { scale, xlate } };
                    c.Opacity = 0.5;
                    content.Children.Add (c);
                    activeChild = c;
    
                    //
    		// Animate this to its final location
    		//
                    TimeSpan time = TimeSpan.FromSeconds (0.3);
    
                    var s = new Storyboard () {
                            Children = {
                                    Animate (time, xlate, "X", 0),
                                    Animate (time, xlate, "Y", 0),
                                    Animate (time, scale, "ScaleX", 1.0),
                                    Animate (time, scale, "ScaleY", 1.0),
                                    Animate (time, c, "Opacity", 1.0),
                            }};
    
                    s.Begin ();
    	}
    
    	// Helper method;   
            static Timeline Animate (TimeSpan time, DependencyObject target, string path, double to)
            {
                    var animation = new DoubleAnimation () {
                            Duration = time,
                            To = to
                    };
    
                    Storyboard.SetTarget (animation, target);
                    Storyboard.SetTargetProperty (animation, new PropertyPath (path));
    
                    return animation;
            }
    	

    The Silverlight Application

    Using the control is fairly simple, but since it loads a large XML files (feel free to change this to use a web service) I use the downloader and a callback to render the control.

            private void Application_Startup(object sender, StartupEventArgs e)
            {
    	    [...]
                var webclient = new WebClient();
                webclient.DownloadStringCompleted += delegate (object sender2, DownloadStringCompletedEventArgs ee){
                    try {
                        RootVisual.Dispatcher.BeginInvoke(() => LoadNodesFromString(ee.Result));
                    }
                    catch (Exception ex) {
                        main.BackButton.Content = ex.ToString();
                    }
                };
    
                webclient.DownloadStringAsync(new Uri("../mscorlib.xml", UriKind.Relative));
            }
    	

    The actual creation of the control happens in LoadNodesFromString:

            void LoadNodesFromString(String s)
            {
    	    // Use Size for the area.
                Node n = LoadNodes(s, "Size", "Extra");
                while (n.Children.Count == 1)
                    n = n.Children[0];
                
                treemap = new TreemapRenderer(n, "");
                Grid.SetColumn(treemap, 0);
                Grid.SetRow(treemap, 1);
                main.grid.Children.Add(treemap);
            }
    

    Building a Gtk# Out-of-Browser Client

    The above works great for Silverlight, but I like my application on the desktop, so I created a Gtk# version of it.

    Moonlight provides a Gtk# widget that can be embedded into C# desktop applications. This is what it looks like when running on the desktop. I know this screenshot is not too exciting as I did not do much with the Gtk+ side of things:

    Gtk# is rendering, seriously.

    The core of embedding Moonlight as a Gtk# widget is very simple, here it is:

    using Moonlight.Gtk;
    using Moonlight;
    
            public static void Main(string[] args)
            {
                    n = LoadNodes (args [0], "Size", "Foo");
    
                    Gtk.Application.Init ();
                    MoonlightRuntime.Init ();
    
    		// My container window.
                    Gtk.Window w = new Gtk.Window ("Foo");
                    w.DeleteEvent += delegate {
                            Gtk.Application.Quit ();
                    };
                    w.SetSizeRequest (width, height);
    
    		// The Moonlight widget that will host my UI.
                    MoonlightHost h = new MoonlightHost ();
    
    		// Add Moonlight widget, show window.
                    w.Add (h);
                    w.ShowAll ();
    
                    // Make it pretty, skip all levels that are just 1 element
                    while (n.Children.Count == 1)
                            n = n.Children [0];
    
                    // Render
                    TreemapRenderer r = new TreemapRenderer (n, "");
                    Size available = new Size (width, height);
                    r.Measure (available);
                    r.Arrange (new Rect (0, 0, width, height));
    
    		// This informs the widget which widget is the root
                    h.Application.RootVisual = r;
                    Gtk.Application.Run ();
            }
    
    

    There are Visual Studio and MonoDevelop solutions on the SVN for folks to try out.

    You can also try a sample live on the web.

    Posted on 20 Jul 2009


    MiggyTour 2009

    by Miguel de Icaza

    In the third and fourth weeks of August, Laura and I will be spending a couple of days in Madrid visiting friends.

    Then a couple of days hanging out with Nat, Stephanie and a bunch of awesome friends and family friends in Florence.

    And then we are spending a week in Morocco, most likely in Marrakesh.

    If you live in Madrid or Marrakesh and would like to get together to meet and talk, send me an email.

    Posted on 17 Jul 2009


    StackOverflow DevDays in Boston

    by Miguel de Icaza

    Joel Spolsky and Jeff Atwood have invited me to participate on StackOverflow's DevDays in Boston on October 7th.

    I will be talking about Mono, Mono and Visual Studio and Mono on iPhone. Come equipped with questions.

    Shocking, I know.

    Posted on 17 Jul 2009


    LLVM powered Mono

    by Miguel de Icaza

    Mono from SVN is now able to use LLVM as a backend for code generation in addition to Mono's built-in JIT compiler.

    This allows Mono to benefit from all of the compiler optimizations done in LLVM. For example the SciMark score goes from 482 to 610.

    This extra performance comes at a cost: it consumes more time and more memory to JIT compile using LLVM than using Mono's built-in JIT, so it is not a solution for everyone.

    Long running desktop applications like Banshee and Gnome-Do want to keep memory usage low and also would most likely not benefit from better code generation. Our own tests show that ASP.NET applications do not seem to benefit very much (but web apps are inherently IO-bound).

    But computationally intensive applications will definitely benefit from this. Financial and scientific users will surely appreciate this performance boosthttp://www.mono-project.com/.

    Taking it out for a spin

    Note: the notes here are no longer relevant, these applied to Mono back in 2009. LLVM has now been integrated into Mono, follow the steps in http://www.mono-project.com/Mono_LLVM instead

    You need to install both LLVM and Mono from SVN.

    Get and install LLVM like this:

    $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    $ cd llvm
    $ ./configure --prefix=/mono --enable-optimized
    $ make && make install
    

    Then get Mono, and you need to apply a tiny patch to configure.in.

    $ wget https://tirania.org/tmp/m7a9da378.txt
    $ svn co svn://anonsvn.mono-project.com/source/trunk/mcs 
    $ svn co svn://anonsvn.mono-project.com/source/trunk/mono 
    $ cd mono
    $ patch -p1 < m7a9da378.txt
    $ ./autogen.sh --prefix=/mono --enable-llvm=yes
    $ make && make install
    

    Now you have an LLVM-powered Mono.

    LLVM is not able to support some of the features that Mono needs, so in those cases the JIT compiler will still fall back to Mono's JIT engine (methods that contain try/catch clauses or methods that do interface calls).

    This backend was written by Zoltan.

    Posted on 16 Jul 2009


    Banshee as a Platform?

    by Miguel de Icaza

    Aaron Bockover recently discussed Banshee's modular architecture. Aaron discusses using Banshee as a foundation for managing not only music, and videos but merging with F-Spot to manage photos as well:

    The slides from his talk go into a bit more detail.

    Jonathan Pobst takes the platform idea one step further and suggests that Banshee's core could also be used to replace YAST's Software Installer UI:

    Jonathan says:

    Every time I use YaST's Software Manager, I wonder if it would be better implemented using Banshee. Banshee's interface has been tuned for usability, both on its own, and what it borrows from iTunes. Software management is a naturally scary operation, and using an interface that the user is already familiar with could help reduce user fear.

    Of course, it would just be the interface pieces of Banshee in a new app, you wouldn't actually start Banshee for software installation.

    Another feature I would like to see taken from iTunes/Banshee is downloading/installing in the background. Once I hit Install, go ahead and download the application in the background, and install it in the background. I can click on the "Downloading/Installing.." menu item if I want to see what's going on. Most of the time, I'd rather be looking at other things to download.

    I think this is a brilliant idea.

    Posted on 15 Jul 2009


    From Microsoft: C# and CLI under the Community Promise

    by Miguel de Icaza

    First the big news: Microsoft will be applying the Community Promise patent licensing to both C# and the CLI.

    The announcement was done by Peter Galli at Microsoft over at Port25 and it states (emphasis is mine):

    I have some good news to announce: Microsoft will be applying the Community Promise to the ECMA 334 and ECMA 335 specs.

    ECMA 334 specifies the form and establishes the interpretation of programs written in the C# programming language, while the ECMA 335 standard defines the Common Language Infrastructure (CLI) in which applications written in multiple high-level languages can be executed in different system environments without the need to rewrite those applications to take into consideration the unique characteristics of those environments.

    "The Community Promise is an excellent vehicle and, in this situation, ensures the best balance of interoperability and flexibility for developers," Scott Guthrie, the Corporate Vice President for the .Net Developer Platform, told me July 6.

    It is important to note that, under the Community Promise, anyone can freely implement these specifications with their technology, code, and solutions.

    You do not need to sign a license agreement, or otherwise communicate to Microsoft how you will implement the specifications.

    The Promise applies to developers, distributors, and users of Covered Implementations without regard to the development model that created the implementations, the type of copyright licenses under which it is distributed, or the associated business model.

    Under the Community Promise, Microsoft provides assurance that it will not assert its Necessary Claims against anyone who makes, uses, sells, offers for sale, imports, or distributes any Covered Implementation under any type of development or distribution model, including open-source licensing models such as the LGPL or GPL.

    You can find the terms of the Microsoft Community Promise here.

    I told you this was good news!

    A few months ago we approached Bob Muglia and Brian Goldfarb (@bgoldy) at Microsoft with a request to clarify the licensing situation for the ECMA standards covering C# and the CLI (also ISO standards, for the ISO loving among you).

    Previously Microsoft had detailed the patent license plans and today they have delivered on those plans.

    Astute readers will point out that Mono contains much more than the ECMA standards, and they will be correct.

    In the next few months we will be working towards splitting the jumbo Mono source code that includes ECMA + A lot more into two separate source code distributions. One will be ECMA, the other will contain our implementation of ASP.NET, ADO.NET, Winforms and others.

    Depending on how you get Mono today, you might already have the this split in house or not.

    Thanks to everyone at Microsoft that worked to get this approved and released. We appreciate that they made this a priority when we approached them, and we know that everyone in the .NET team was also incredibly busy with various betas: .NET 4, Visual Studio 2010, Silverlight, MVC, MEF and much more.

    I am overflowing with joy right now. Cheers!

    Update: Send your thanks to @bgoldy on tweeter, who crossed all the t's and dotted all the i's to make this happen.

    Update: Moderation of comments is taking place. Off topic messages will be removed immediatly. Trolling, as mild as it might be will be deleted. If you want to argue what language is the best one take the debate to a newsgroup.

    Posted on 06 Jul 2009


    PhyreSharp runs on the PS3

    by Miguel de Icaza

    Mono on the PS3 has been making some nice progress. Supporting the PS3 requires some special features in Mono, for instance, a static compiler for .NET code for the PowerPC/Cell processor.

    PhyreSharp, our .NET binding to Sony's PhyreEngine game engine ran on Thursday for the first time.

    Posted on 03 Jul 2009


    Some Cool Mono Announcements

    by Miguel de Icaza

    Yesterday we shipped Mono 2.4.2, our long-term supported version of Mono. It ships Microsoft's opensourced ASP.NET MVC stack for the first time (you could get it before on your own, but now it is integrated) and fixes over 150 reported bugs.

    Chris Toshok announced M/Invoke a tool to port applications that use P/Invokes on Win32 to Linux and MacOS.

    What Chris does not talk about on his post is that he was trying to use some .NET software that interfaces via USB to his glucose meter and was trying to get this to run on Linux. The tool is mostly .NET with the usual handful of P/Invokes to Win32. And this is how M/Invoke was born: a tool to retarget P/Invoke happy applications into becoming pure managed applications.

    This opens new doors to forcefully port more apps to Linux.

    Alan McGovern released a new version of Mono.Nat one of the libraries used by MonoTorrent.

    Jordi Mas released a new version of Mistelix a DVD authoring tool for Linux:

    Jordi's GBrainy brain teaser game was picked up by MoLinux, a regional Linux distribution, and shipped it translated to Spanish:

    Joe Audette's mojoPortal was being installed four times as much when it got included in in Microsoft's Web Platform Installer site (more stats here).

    For years I have loved the Joel on Software rules for software engineering. And one of those rules is "Build in one step". We have not always succeeded, but we have always tried. Lluis delivers the one step to build and run for MonoDevelop on Windows: Load solution, Hit F5, up and running.

    Google Chrome really lead the way here, and I want very badly to have all of Mono building in Visual Studio with one keystroke, but we are not there yet.

    Stephane reports on some nice startup performance improvements for F-Spot. Loading time for 10 images from Stephane's own image collection went from 1.2 seconds to .5 seconds.

    MonoDevelop got some enhanced support for autoconf integration.

    Jeremy Laval released another version of ZenComic a desktop Comic reader:

    David Siegel announced a new release of Gnome Do on behalf of the Gnome Do team. In particular, it is now easier to write "Docklets" for the Gnome Do panel and for those of us that like the Emacs keybindings, it is now possible to use C-N and C-P for navigation

    And of course the Google Summer of Code is in full swing:

    And we have various very exciting projects brewing.

    Jonathan Pobst has been exploring integration points for Mono and Visual Studio 2010:

    Guadec: I will sadly not be attending the Guadec/Akademy conference in Canaria next week. This is going to be a busy summer for us as we are shipping a lot of code in the next few months: Moonlight 2.0, Mono for Visual Studio, MonoTouch 1.0 and Mono 2.6.

    Posted on 30 Jun 2009


    MonoSpace Conference Announced

    by Miguel de Icaza

    Scott Bellware has announced the MonoSpace Conference in Austin Texas on October 27-30th.

    Scott has made a Call for Speakers:

    The Monospace Conference is looking for teachers to give tutorials on the Mono framework, tools, languages, and platforms supported by Mono.

    Some tutorials are aimed at .NET developers with little experience with operating systems other than Windows, and others are geared to experienced Mono developers with exposure to the various Mono platforms.

    The tutorials are two hour to three hour interactive sessions that can be any combination of follow-along examples, labs, and lecture.

    We're looking for tutorials on subjects such as Linux, Mac, Windows, web, desktop, servers, message queues, databases, iPhone, Android, Amazon's EC2, among others.

    You can track the progress of the conference at the MonoSpace Conf Blog.

    You can also follow the progress on twitter.

    Scott was one of the founders of the Alt.Net series of conferences.

    Posted on 30 Jun 2009


    Mono

    by Miguel de Icaza

    Posted on 29 Jun 2009


    PhyreEngine, Mono, cool Mono uses in Gaming, and more.

    by Miguel de Icaza

    Last week there was a little Mono surprise. It can be found on this Novell-hosted web page web page (scroll a little bit).

    It has been a few very busy weeks at Novell's Eastern Research and Development Facility (Novell NERD Facility) here in Cambridge and we have been incredibly busy polishing some nice toys.

    A few weeks ago we learned about Sony's developer event in the West Coast. Michael, Zoltan and myself worked very hard to put together a demo to show the virtues of C# and the CIL to developers. So we cranked on some record time some code:

    • PhyreEngine#
    • Static compiler for PowerPC for Mono on PS3
    • A yield-based co-routine framework.

    We picked Sony's PhyreEngine to demostrate how to use Mono to write the high-level code for a game using Sony's finely tuned engine. We figured this was better than showing a for loop printing the numbers 1 to 10 on the screen.

    PhyreEngine# wraps PhyreEngine using the same techniques that we used in Gtk# and Moonlight. The resulting API is glorious and by letting PhyreEngine do all the heavy lifting while driving all the high-level from C# there is no way of telling that the driving force is not C++. All you get is pure unadultered productivity.

    To make our demos a little more interesting, Michael wrote a minimalistic yield-based co-routine framework inspired by some of the ideas that our friend Lucas gave us. It is a tiny toy, but we used it to illustrate the concept of using C# iterators as the foundation for game logic development and how a cooperative scheduler would work (Unity game logic works just like this).

    We were also working on completing Mono's port to the PlayStation 3's native operating system (this is different than running Mono on Linux on the PS3: that already works, and it was used for developing CellDotNet, a JIT for the PS3's SPUs). Zoltan developed the static compiler for PowerPC and I did the platform support.

    Mono can now run "Hello World" on the PS3 native OS. There are still lots of ins, lots of outs and lots of whathaveyous that need to be tied up before this fully works and before we are able to run PhyreEngine# on the PS3.

    Posted on 08 Jun 2009


    Developing Cross Platform application with MonoDevelop

    by Miguel de Icaza

    Yesterday Lluis announced the last missing piece from our strategy to make MonoDevelop a full cross-platform IDE: MonoDevelop now runs on Windows as well:

    When we started the planning for MonoDevelop 2.2, the major goal of that release was to get feature parity on Linux, MacOS and Windows.

    We want to grow the community of developers that contribute to MonoDevelop and we wanted to attract add-in developers that wanted to bring their IDE extensions to all three platforms.

    MonoDevelop has recently been getting some nice community contributed plugins like Flash/Flex development support, Vala language support, Mono debugger for OSX (thanks to the nice folks at Unity for this!), VI editing mode and of course our own Silverlight and ASP.NET MVC add-ins.

    My theory is that supporting MonoDevelop on all the three major operating systems will have a multiplication effect in terms of contributions to MonoDevelop: it will help both users and will enable developers that extend MonoDevelop with add-ins to reach more users.

    I secretly want Unity to adopt MonoDevelop as the code editor for Unity; for the FlashDevelop guys on Windows to adopt MonoDevelop as their cross-platform foundation (their users want a cross platform Flashdevelop); for Flashbang to bring their UnityScript framework to MonoDevelop

    Developing an add-in for MonoDevelop now brings your enhancements to a much larger community.

    Look and Feel

    Although the IDE is built using Gtk#, but we are aware that developers want to get things integrated with their operating system as much as possible. This is why we have invested in properly integrating MonoDevelop with the Mac and Windows.

    The Look of MonoDevelop still has a heavy feel of the Linux Gtk+, but we are bluring the lines by making the theme and style match the operating system. Development in Gtk native themes will also continue to improve things.

    Feel wise, we make MonoDevelop follow the conventions of the host platform. For example, on the Mac, MonoDevelop uses the Mac system menu, it uses an entirely different keybinding style that follows what every Mac developer expects (Command-KEY operations that match X-Code for example) and even text selection in the editor behaves differently:

    More work will come, because we want MonoDevelop to feel native on each platform.

    On Windows for example, MonoDevelop runs on top of the .NET Framework and uses the .NET managed debugger instead of using Mono's runtime and Mono's debugger, so there is no dependency on Mono to be installed on the system.

    Posted on 04 Jun 2009


    Moonlight 2 Preview 3

    by Miguel de Icaza

    Another week of excellent work on the Moonlight universe and we bring you our Preview 3 release of Moonlight. Alan McGovern said it best though.

    This week stats:

    This is what the Silverlight Toolkit Sample page looked with Preview 2:

    Moonlight 2 Preview 2

    This is what the Silverlight Toolkit page looks with Preview 3:

    Moonlight 2 Preview 3

    You should be able to update directly from Firefox, or if you are trying it for the first time, go to our http://go-mono.com/moonlight-preview/ page.

    Now, although Preview 2 was able to run the IronPython mini-Web IDE I am still going to try to pass that as a new feature.

    And now you can try the IronPython mini-Web IDE!

    Posted on 18 May 2009


    Three Melon's Quest for R2-D2

    by Miguel de Icaza

    I had the honor to meet the Three Melon developers at Unity's party this year at the Game Developer Conference. Three Melons is an Argentinian-based company that builds online games, and most recently they have been using Unity to build their new online games.

    Today they just announced that their latest online game powered by Unity and Mono. "Quest for R2-D2" is now live at Lego.com:

    Pato Jutard, co-founder of Three Meleons announced the launch and posted the Making of Lego Star Wars game by Three Melons:

    Congratulations to the Three Melon developers for their launch!

    You can follow them on twitter.

    Posted on 16 May 2009


    Moonlight 2 Preview 2

    by Miguel de Icaza

    As we promised last week (threatened?) now that the foundation for Moonlight 2 is in place, we will be doing weekly releases for folks to try out, and to increase the feedback that we have received.

    Thanks to everyone that provided bug reports and contacted us about the problems with last week's preview. In particular the issue affecting Ubuntu and SLED 10 users has been fixed and the plugin should work.

    If you installed Moonlight already, you can update either by restarting Firefox or by following these steps:

  • Click Tools/Addons
  • Click on the "Extensions" toolbar icon.
  • Click "Find Updates":
  • This will check for updates, and take you to the updates tab. Then clikc "Install Updates".

    If you have not installed Moonlight yet and want to try it out, go to http://www.go-mono.com/moonlight-preview.

    This release fixes various rendering problems, more sites should be working and the performance was increased in multiple hot spots.

  • Posted on 12 May 2009


    Micro Focus Video

    by Miguel de Icaza

    My friend Stephen sent me an interesting video they just cooked up at Micro Focus giving some hints as to what is coming up on the keynote of Micro Focus Live.

    They recently bought Borland.

    Video: Micro Focus Live Developers Keynote.

    Posted on 11 May 2009


    Developing Silverlight Apps on Linux and MacOS with Moonlight

    by Miguel de Icaza

    Earlier this week I promised I would blog about how to build Silverlight apps in Linux. Michael beat me to this and did a couple of screencasts.

    In Moonlight Development in Linux with MonoDevelop he walks us through the steps necessary to install the Moonlight SDK on top of Mono 2.4 and using MonoDevelop to create your app. Once you get these installed, here is how you get started with development:

    To render this content, you need Silverlight or Moonlight Preview or Silverlight

    MonoDevelop will provide auto-complete for the Silverlight APIs and also provide auto-complete in XAML files.

    In addition to Linux, you can also use MonoDevelop on OSX to do the same thing. We shipped Moonlight's SDK as part of the MonoDevelop/OSX release, the result runs with Microsoft's Silverlight.

    Michael again talks about it and produced a nice screencast:

    Screencast

    Posted on 08 May 2009


    I, for one, welcome our new SH4 embedded overlords.

    by Miguel de Icaza

    ST Microelectronics, the maintainers of GCC-CIL (the GCC code generator backend that produces ECMA CIL bytecodes for Mono/.NET) have announced their port of Mono to the SH4 platform.

    The code is currently available from http://code.google.com/p/mono-sh4/.

    In addition to the MIPS64 port that I mentioned last week from SiCortex/nIX is now being merged into Mono's repository.

    MIPS apparently is not only used in super computers, but apparently is also powering $169 dollar netbooks.

    Posted on 07 May 2009


    Innovation

    by Miguel de Icaza

    Dana Blankenhorn comments on the the Moonlight 2.0 release and says:

    It's the kind of open source success story Microsoft wants publicized. Microsoft innovates, open source copies.

    It's not the kind of open source story open source needs, however.

    What open source needs is real innovation, created by teams who may or may not represent Microsoft's fierce competitors. This can be hard to deliver, and Microsoft would like us all to know resistance in this case is futile.

    A few points.

    First: Moonlight's core is designed to ensure that Linux users get access to content that is produced for Silverlight on the web.

    This is about making sure that Linux (and for that matter any other system where Moonlight can be compiled) does not become a second class citizen on the web.

    Folks will argue all day whether the Silverlight model is the right one; whether it is gaining adoption; whether it is necessary; whether it is part of the open web.

    But none of that matters when trying to access content on Linux: it is either possible to use it, or not. And having a working relationship with Microsoft allows us to bring it to Linux.

    Second: Dana is looking in all the wrong places for innovation. If he wants to see my team's work that deviates from the set of APIs that Microsoft has created, he could look at our work on SIMD; our interactive C#; Static compilation technology to support things like the iPhone; our cross platform MonoDevelop (Linux, OSX, Windows); Our Gtk# API for building the above; He could look at all of our Mono.* classes, or all of the libraries and APIs produced by our community (Mono.Addins, Mono.Nat, Mono.ZeroConf, BitSharp, Cecil, CocoaSharp, MonoObjc, Crimson, and some forty others; I just got tired of going through the list here and here).

    All of these created to solve a particular problem with the tools that we had on the platform we used.

    Or for that matter, even reading the announcements on my blog.

    Or he could look elsewhere in the vast universe of open source projects for ideas that match his definition of innovation. Not everything that is built in the open source world has to be about innovating in a completely new direction.

    Third, and most important one: The definition of Innovation.

    Innovation

    Most people that discuss innovation have not even bothered to actually think about what this means in the first place. And I am particularly bothered when people claim that open source does not innovate, but can only copy.

    Google's define:innovation is a good starting point.

    Are Ideas Innovations? Everyone has ideas, even great ideas. Every day you go to lunch, every day you are taking a shower, every day you are walking alone and thinking you are having new ideas.

    You can have a million ideas, and these might be innovative, but if they do not reach the world, did they matter?

    For an idea or an innovation to have a practical effect, they need to go beyond the discussion at the lunch table with your friends and become a reality.

    Bringing an Idea to Life Once I sit down and turn my idea into an actual tangible result there are a number of hurdles in my path.

    The idea must be good enough for people to try out, I must get it distributed, and I must get people to use it.

    Being first versus being to market first: It does not matter that many great ideas originate in the open source world or at the lunch table with your friends. You must bring the ideas to the public and the public must be in a position to adopt it.

    For instance, Compaq/Digital were showing portable MP3 players based on Linux years before the iPod took the world by storm. Yet, nobody remembers these devices anymore and Apple gets the credit for bringing digital audio to the masses.

    Or tagging and searching your email. GMail uses it today, but few people remember that the idea had been implemented before in Digital's Pachyderm.

    Many ideas might originate as personal prototypes or even open source prototypes, but without a distribution channel and an ecosystem that would sustain the innovation many of those ideas exist merely to be replaced by folks in a better position to market/distribute it.

    Claiming "I had the idea first" or "we were the first ones" is of little consolation if someone out-executes and out-markets you.

    Definitions of Innovation: Wikipedia (as of 10 seconds ago) defines Innovation as:

    The term innovation means a new way of doing something. It may refer to incremental, radical, and revolutionary changes in thinking, products, processes, or organizations. A distinction is typically made between invention, an idea made manifest, and innovation, ideas applied successfully.

    I also like this one (from Google's define: too):

    Innovation is the process that translates knowledge into economic growth and social well-being. It encompasses a series of scientific, technological, organizational, financial and commercial activities.

    I think that Moonlight fits this definition perfectly well in that case.

    Moonlight and Innovation

    Sure, we do follow the APIs that Microsoft set for Silverlight.

    But we have innovated in a number of ways:

    • We innovate in the development process: we are an open source project, taking contributions and consuming other open source components.

      We dogfood other FOSS components, and we iterate to improve them.

      In 1999, the MIT Technology Review magazine named me the innovator of the year. In the award ceremony, Bob Metcalfe said that I was receiving the award for the work on Gnome, not because Gnome was a ground-breaking system, but because the goals and processes of Gnome were.

    • We innovate in our cross-platform stance: Moonlight runs on more platforms (although admittedly, with a smaller market share than Windows and MacOS).
    • We had out-of-browser support before Silverlight did: Sure it was trivial, but we had it before (see above note on futility of claiming "we were here first").
    • Working with Microsoft: Ok, this is a bit of a stretch to claim as innovation, but here it goes: I am very proud that we are finding ways of working with a company that for many years resisted Linux and open source as well as helping Microsoft with all of its inertia become more open source friendly.
    • Update: Mats on the comments points out something that I wish I had thought of when I wrote this: "Innovation is also, and I'd say mostly if history teaches us anything, about building and improving upon ideas - not just making new ones from scratch."

    We (the Mono/Moonlight team) are not Dana's beacon of revolutionary change. But it is no secret that we are fans of the CLI virtual machine, and we believe that giving developers this platform will help them turn their ideas into innovations by giving them the best technologies available.

    Users of Mono and Moonlight have already demonstrated that they have way better ideas than I have ever had. And they already have used Mono in brilliant ways. Dana might want to check my blog more periodically to take note of those innovations.

    Posted on 06 May 2009


    Mono talk at the Beantown.NET Users Group

    by Miguel de Icaza

    Tomorrow, Joseph, Michael, Gonzalo and myself will be talking at the Beantown.NET Users Group about Mono, Moonlight and MonoDevelop at 6pm.

    If you are in the Boston area, come join us for these open source festivities at Microsoft NERD center in Cambridge.

    Posted on 06 May 2009


    MonoDevelop on MacOS X

    by Miguel de Icaza

    Good news for all OSX users, a build of MonoDevelop that integrates with OSX is now available:

    MonoDevelop OSX-ified.

    For the impatient among you, click and run MonoDevelop.app.zip.

    It requires Mono 2.4 for OSX, on the upside, you can use this to develop ASP.NET MVC apps on the Mac.

    Some Background

    Back in February I showed a screenshot of MonoDevelop 2.0 for the Mac, it looked like this:

    Super-Alpha-Preview of MonoDevelop on OSX.

    It was basically the Gtk# based MonoDevelop IDE binary executing on the Mac. There was no porting involved, just the same executable running under Mono/OSX. The code works, but it did not feel like a Mac app:

    • The Menu bar was embedded in the window.
    • The keyboard accelerators were the Linux ones. They felt unnatural for OSX users, and also did not take advantage of the spare key (Command) to liberate the control key for other uses.
    • The editor behaved like a Linux editor.

    There is a vibrant Mono on OSX community out there, and it will only grow larger. We wanted to make sure that all of the work that is going into creating a great IDE is available for folks on the Mac in a way that is actually comfortable to use.

    So working with folks in the Mac Community and with folks at Unity Michael has been working on tuning up MonoDevelop on the Mac to become an editor that does not get in the way of Mac users and developers and integrates better from the "feel" perspective with other tools in the OS.

    For instance, not only does the new MonoDevelop for MacOS use the Mac menu bar, and the Mac accelerators (a combination of XCode and Textmate accelerators), but even the text editor has been altered to support the way selection and navigation works on the Mac.

    I figured that for every 100 users of MonoDevelop one of them will contribute patches back to the effort. If you happen to be that 1% hacker that will contribute back, you might want to look at a list of ideas to improve MonoDevelop on the Mac.

    MonoDevelop on Windows.

    MonoDevelop on Windows is on a similar boat: the 2.0 release works "out of the box" on Windows, but again, it is a GNOME IDE in a Windows land.

    Stay tuned for news from the MonoDevelop community as to what will happen there.

    Update: Lluis posted an update on the progress of MonoDevelop on Windows.

    Posted on 05 May 2009


    Smooth Streaming with Moonlight

    by Miguel de Icaza

    I never tested Smooth Streaming before, just the more basic media tests, but the Smooth Streaming stack is running with our Moonlight preview:

    You can see a few rendering glitches for the controls on the screen. But this is really good news for our new media pipeline.

    Posted on 05 May 2009


    First Moonlight 2.0 Preview is Out

    by Miguel de Icaza

    After a loving incubation period, the Moonlight 2.0 preview, an open source implementation of Microsoft's Silverlight for Linux has been released:

    This is really the release I have been looking for since Microsoft first introduced Silverlight 1.1 and ever since our 21-day hack-a-thon to bring Silverlight to Linux.

    This is the ECMA VM running inside the browser and powering C# and any other CIL-compatible languages like Ruby, Python and Boo. You can use Moonlight/Silverlight as a GUI (this is what most folks do) or you can use it as the engine to power your Python/Ruby scripting in the browser.

    Installing Moonlight 1.9

    Go to our preview page, select the platform and hit the download icon.

    That will download and install the plugin in your Firefox installation. You can then restart the browser, and you should see this:

    Then you can try out some of the test web sites we have been working on. This is CNN's The Moment that uses Silverlight/Photosynth:

    If instead of binaries you want to build Moonlight in the comfort of your own living room while sipping margaritas, fetch the source code for mono, mcs, mono-basic and moon from the branch and build them in this order: mono, mono-basic and moon.

    While one hand holds your margarita, use the other one to follow the instructions on how to compile Mono from SVN.

    Some Notes on this Release

    Now some qualifications to this release:

    This is a preview release. By this we mean that we are not yet feature complete with Silverlight 2.0 feature-to-feature but we are relatively close. For example, we do not yet pass the entire Silverlight GUI 2.0 test suite that was provided to us by Microsoft and you can spot glitches in various web sites.

    Security Sandbox: One of the reasons we delayed the first preview of Moonlight for public consumption was that we did not want to release Moonlight without the security sandbox. In the pre-Moonlight days there was no reason for Mono to implement a security sandbox, so we never had it. With Moonlight a security sandbox is mandatory so we implemented it.

    Moonlight 2.0 ships with the new CoreCLR Sandbox that was introduced in Silverlight 2.0. This security system is very easy to understand, it is pretty straightforward and is a lot easier to secure and audit than something like CAS. I will blog about the security stack in another post.

    But even if we now have a security sandbox , we have not completed the security audit.

    Weekly Releases: Our current plan is to update the plugin once a week during this preview/alpha period hoping that we can get good bug reports and to ensure that we work in as many Linux distributions as possible.

    Debug Builds: During the preview/alpha cycle we are shipping our code with debugging symbols hoping that this will improve the quality of the bug reports that we receive. This means that the plugin size instead of being 3.9 megs is 8.8 megs on average. This will change when we do the final release.

    The Cool Toys

    There are a number of cool toys on this release, the foundation for many things to come. Here are some:

    Silverlight Unix SDK: If you install Mono 2.4 and Moonlight SDK (not the browser plugin, but the -devel package) you can now develop Silverlight applications entirely in Unix.

    In fact when you install Eclipse4SL (a Microsoft sponsored project) you need Mono 2.4 to build Silverlight apps. With the Moonlight SDK you can skip an entire step by having the SDK assemblies present at installation time.

    I will do another blog on how to build Silverlight apps from the ground up on Unix using the Moonlight SDK.

    Microsoft MS-PL Controls: Instead of reimplementing the high-level controls (buttons, Checkboxes, listboxes, containers, calendars, datepickers, sliders) or the very advanced controls (like a full database bound datagrid) Moonlight reuses Microsoft's open sourced Silverlight controls.

    Iron* Languages: In addition to C# you can run code written in a variety of programming languages that target the ECMA CLI. In particular dynamic languages.

    IronRuby and IronPython are open source implementations of Ruby and Python done by Microsoft that can be used in Silverlight but you can also use a variety of other languages in the browser like Visual Basic or PHP (Phalanger).

    Visual Basic Runtime: This is just a plug for the work that Mainsoft did a few years ago. One of the things that Silverlight ships with is a Visual Basic class library for all the VB helper functions.

    Mainsoft contributed a few years ago a VB runtime written entirely in VB

    We ship a "tuned" version of their assemblies as part of the Moonlight release.

    Adaptive Streaming: This also deserves a blog entry of its own. In addition to the support for HTTP-Streaming (to support seeking and stream quality selection) Silverlight allows developers to create their own transports to fetch media and not be limited by HTTP.

    For instance, a developer could write a transport that fetches different bits of the media from different servers. Or use bittorrent to fetch the media instead of depending on a single server. More in an upcoming blog entry.

    DeepZoom: with all of the bells and whistles that you expect.

    Hard Rock Memorabilia on Moonlight/Linux.

    Silverlight 3.0 APIs: As we were implementing the 2.0 APIs a handful of features from 3.0 fit naturally into our design. So instead of going the extra mile to limit things in 2.0, we just expose the 3.0 APIs in a forward-compatible fashion.

    This Moonlight preview includes a few 3.0 features:

    • Out-of-browser support (although this is currently a manual process, not yet automated, and without a GUI).
    • WritableBitmap class.
    • 3.0 pluggable media pipeline.
    • SaveDialog support.

    There are more details see Chris Toshok's blog entry.

    The pluggable media framework is very exciting to us, because it means that developers can author their own codecs without waiting for Silverlight or Moonlight to add support for it.

    We have developed a handful of open source codecs for Dirac, Vorbis and ADPCM that can be used with Silverlight 3/Moonlight Preview based on existing C# and Java implementations. Hopefully someone will help us fill in the blanks with more codecs (like Theora).

    For up-to-date news check out our README file.

    In the words of Paris Jobs, this release is nothing short of hawt.

    Moonlight Twitteristas

    If you want to follow the progress of various Moonlight activities on Twitter, you can follow these folks:

    • moonproject: the twitter account for project news.
    • kumpera: in charge of the Mono metadata and IL verifier and creator of Mono.SIMD.
    • spouliot: Mono's security and cryptography Czar and graphics hacker.
    • lewing: Moonlight core hacker, in charge of Moonlight's layout and performance and also the creator of the Linux logo and co-developer of F-Spot.
    • toshok: Moonlight team leader and maintainer of the core of Moonlight. ex-Winforms team lead.
    • jbevain: In charge of the Silverlight 2.1 API, Mono's Linker and Cecil.
    • kangamono: Codec hacker, hard-problem solver, iPhone support, Mono on Mac.
    • atsushi_eno: XML, LINQ to XML, WCF and pluggable codec author.
    • sh4na: Recovering winformista, in charge of the new toggle ref implementation and the Moonlight/Javascript bridge.
    • rolfkvinge: media pipeline, visual basic runtime, vbnc compiler (Mono's VB compiler written in VB).
    • jstedfast: text layout engine, and ex-Evolution hacker.
    • jacksonh: All things XAML, a recovering Winformista/Ilasm-ista. A must-follow twitterista, considering that even Aimee_b_loved follows him.
    • rustyhowell: release engineering.

    Some of the team members are not twitteristas yet.

    Alternatively, if you are not really into twitter, you can always check our aggregated blogs at monologue.

    Posted on 04 May 2009


    Interactive C# Code Completion

    by Miguel de Icaza

    Last month I introduced code completion in Mono's Interactive C# shell. You can use the TAB key to auto-complete at the current cursor position. Pressing the TAB key twice will list all possible completions.

    This should make the csharp more pleasurable to use and for bash junkies like me a more natural fit.

    This is particularly useful to explore an API like Gtk#:

    	csharp> LoadPackage ("gtk-sharp-2.0");
    	csharp> using Gtk;
    	csharp> Application.Init ();
    	csharp> var w = new Window ("Hello");
    	csharp> w.SetF[tab]
    	SetFlag SetFocus SetFrameDimensions
    	csharp> w.SetFo[tab]
    	csharp> w.SetFocus ();
    	

    This comes in quite handy for completing namespaces, types and valid methods. It works with the C# 3.0 initializer syntax as well, that one is useful in Silverlight for those of us that can not stand to type XAML instead of C#:

    	csharp> new TextBlock () { Bac[tab]
    	

    Does the nice:

    	csharp> new TextBlock () { Background
    	

    Bonus points: another tab at that point inserts the equal sign to assign the value.

    This was done by extending the Mono.CSharp.Evaluator API to provide code completion.

    The API is fairly simple:

    public static string [] GetCompletions (string input, out string prefix)
    	

    This will provide possible completions (methods, properties, fields) that are valid at that point in the string.

    A discussion that details the implementation of how the compiler supports code completion is in the mailing list and our compiler documentation has been updated to include a tutorial on expanding code completion.

    The next step is to implement this for the interactive GUI shell.

    Posted on 28 Apr 2009


    Gtk# 2.12.8 Installer for Windows

    by Miguel de Icaza

    Mike Kestner yesterday announced the availability of the new Gtk# installer for Windows.

    A few good news: the entire stack (Gtk+, Cairo and Gtk#) comes in a nice 8 meg download, it is packaged as an MSI and it is now signed by Novell's certificate, so you no longer get a scary "Unknown Publisher" dingus on the screen.

    This is the equivalent of the greek god Prometheus giving fire to humans.

    We are giving Windows developers a nice cross-platform toolkit that is nicely integrated into Visual Studio. To try a sample application using it, you can download Tomboy, load the Tomboy.sln solution, hit F5 and enjoy.

    Posted on 22 Apr 2009


    PseudoTerminal class

    by Miguel de Icaza

    As a follow up to yesterday's post I did the "hard work" of cut-and-pasting the VTE pseudo-terminal support+gnome-pty-helper into an independent module and wrote a managed binding for the code, autoconf-ified it and put it on SVN.

    Code lives in the pty-sharp module, or you can get a tarball.

    Now someone needs to do the trivial hack of writing the Mono terminal emulator.

    Posted on 21 Apr 2009


    Pseudo Terminals and Terminal Emulators

    by Miguel de Icaza

    There was a discussion about how to host REPLs in applications like MonoDevelop recently and some of the discussion was centered around how to host something like a shell into a program like MD.

    Since I have been thinking about building a Silverlight-based version of the Midnight Commander (OH NOES!) I figured I should share some thoughts that I had on this matter.

    Widgets like ZVT and VTE today bundle a number of things in a single widget:

    • A Unix Pseudo terminal with login/logout support (Unix flavor-specific).
    • A terminal emulator that turns escape sequences generated by a stream into rendering commands.
    • A binding to the Gtk+ toolkit to send input events to the child process and render the terminal results.

    I would like to see some nice C# libraries for doing each one of those tasks independently of each other. Think of it as the MVC of terminal widgets. Like this:

    Reusable Blocks for Terminal Emulation.

    Pseudo-terminal support: the functionality to create pseudo terminals is very OS-specific, it is hard to get right and getting the more advanced features like registering your session is even harder. Very few applications get this right (mc, zvt and vte all use the same code that took me years to fine tune but has never been made reusable for other applications).

    This can be used beyond terminal emulators, it can be used to script or control programs expect a real terminal to run. These are typically interactive Unix console applications.

    Those applications either break or refuse to run when their standard input or standard output are redirected. Expect is a system built on top of this functionality

    Terminal Emulation: A terminal emulator class that supports the vt100/xterm command set and render it into some internal buffer; can take high-level keystrokes and encode them as byte streams (for example turning Alt-X into ESC-x) and supports terminal resizing.

    This terminal emulator should not be bound to Gtk+ it should merely render into a text buffer.

    Gtk#, Silverlight and Curses Bindings: Once the underlying terminal emulator exists we will need to write a handful of bindings to the terminal emulator.

    The Gtk# is an obvious choice for embedding terminal emulators inside things like MonoDevelop.

    The Silverlight binding would allow people to create full fledged SSH clients on the web.

    The curses binding could be used to implement an application like GNU Screen or it could be used in an application like the Midnight Commander (the Midnight Commander plays some Unix tricks to avoid having to emulate a terminal, and this has been a small weakness).

    Posted on 20 Apr 2009


    Banshee and Tomboy over the weekend

    by Miguel de Icaza

    Over the weekend a couple of interesting post were made:

    In "Fitting the Kitchen Sink into a CD" Jo from the the Debian/Ubuntu Mono developers and describes how the way they have split Mono on Debian/Ubuntu makes it so that replacing Rhytmbox with Banshee Media Player ends up consuming less space on Ubuntu's LiveCD (6 megs) and brings more features.

    Nice to see that using managed code consumes less space and delivers more features. There is a heated debate on the comments as well.

    Sandy Armstrong also posted an update on the desktop note-taking application Tomboy that now runs on Windows and MacOS X.

    Sandy was just saying a few weeks ago that porting Tomboy to Windows brought new developers to the project. Although some people have historically been against the idea of making Linux software available on other platforms, it is nice to see day-to-day validation that by expanding the scope of our open source software to other platforms it directly improves the software in our own platform (as many predicted).

    Posted on 20 Apr 2009


    Common Compiler Infrastructure and Cecil.

    by Miguel de Icaza

    Last week at Lang.NET 2009 conference the Common Compiler Infrastructure was open sourced under the terms of the MS-PL license.

    This library was developed used internally at Microsoft some years ago to support some internal projects. This provides a set of services similar to our own Cecil library. Despite this, it is nice to see Microsoft open source more code.

    Cecil, in addition to the low-level APIs for reading and writing ECMA CIL files has a few niceties layered on top of it like a Flowanalysis engine (it is used to decompile byte codes into ASTs) and a full fledged decompiler.

    Additionally, Marek is currently replacing the backend in our C# compiler to move away from System.Reflection.Emit into using Cecil so that we can bring our C# REPL to Windows developers.

    Mono's C# REPL currently works in a very limited mode in .NET (no generics, no LINQ) because .NET's System.Reflection has several limitations for building full-fleged compilers. To work around this issue Mono has over the years extended the Reflection stack to provide the features that were missing. We were never quite happy with this and we are now dropping it in exchange for Cecil.

    JB, the creator of Cecil shares with us his take on Cecil and the CCI.

    Posted on 20 Apr 2009


    Job Posting: Mono Hacker Looking for a Job

    by Miguel de Icaza

    A good friend of mine that has extensive experience with C# and has written significant portions of the Banshee media player, has contributed to our C# 3.0 and C# 4.0 support and to our runtime is looking for a programming job.

    If you want to hire him, drop me an email and I will get you in touch with him.

    Posted on 10 Apr 2009


    Continuations in Mono: Embrace and Extending.NET, Part 3

    by Miguel de Icaza

    Update: I accidentally published an incomplete version of this blog entry the other day before the actual content and samples were ready.

    As part of our ongoing Embrace and Extend.NET series (SIMD, supercomputing), today I wanted to talk about the Mono.Tasklets library that has just landed on Mono's repository.

    This library will become part of the Mono 2.6 release.

    Mono.Tasklets is the Mono-team supported mechanism for doing continuations, microthreading and coroutines in the ISO CLI. It is based on Tomi Valkeinen's excellent work on co-routines for Mono.

    Unlike the work that we typically do in Mono which is pure C# and will work out of the box in .NET (even our Mono.SIMD code will work on .NET, it will just run a lot slower) Mono.Tasklets requires changes to the VM that are not portable to other ISO CLI implementations.

    History

    Unity Early Experiments

    Back in 2004 when Unity first started to explore Mono, Joachim Ante brought up the topic of coroutines in Mono. On an email posted to the mono-devel-list he stated:

    I want to be able to write scripts like this:
    	void Update ()
    	{
    	    Console.WriteLine ("Starting up");
    	    //Yields for 20 seconds, then continues
    	    WaitFor (20.F);
    	    Console.WriteLine ("20 seconds later");
    	}
    	

    The WaitFor function would yield back to unmanaged code. The unmanaged code would then simply go on, possibly calling other C# methods in the same class/instance. After 20 seconds, the engine would resume the Update method.

    The idea here is to have multiple execution paths running on a single thread using a sort of cooperative multitasking. GUI programmers are already used to this sort of work by using callbacks: event callbacks, timer callbacks and idle callbacks. In Gnome using C or C# 1.0 you use something like:

    	void do_work ()
    	{
    		printf ("Starting up\n");
    		g_timeout_add (20 * msec, do_work_2, NULL);
    	}
    
    	void do_work_2 ()
    	{
    		printf ("20 seconds later\n");
    	}
    	

    Although lambdas help a little bit in C# 2.0 if the core of your application needs to chain many of these operations the style becomes annoying:

    	DoWork ()
    	{
    		Console.WriteLine ("starting up");
    		Timeout.Add (20 * msesc, delegate {
    			Console.WriteLine ("20 seconds later");
    		});
    	}
    	

    In event-based programming everything becomes a callback that is invoked by the main loop. The developer registers functions to be called back later in response to a timeout or an event.

    Another alternative is to build a state machine into the callbacks to put all of the code in a single method. The resulting code looks like this:

    	void do_work (void *state)
    	{
    		MyState *ms = (MyState *) state;
    	
    		switch (ms->state){
    		case 0:
    			printf ("starting up\n");
    			ms->state = 1;
    			g_timeout_add (20 * msec, do_work, state);
    			break;
    		case 1:
    			printf ("20 seconds later");
    		}
    	}
    	

    It is worth pointing out that Joachim and in general the gaming world were ahead of our time when they requested these features. This style of threading is commonly referred as microthreading or coroutines.

    At the time, without runtime support, Rodrigo suggested that a framework based on a compiler-supported generator-based system using the yield instruction would satisfy Joe's needs for coroutines in the gaming space.

    This is what Unity uses to this day.

    C# Yield Statement in Mono

    The yield statement in C# works by building a state machine into your method. When you write code like this:

    	IEnumerable DoWork ()
    	{
    		Console.WriteLine ("Starting up");
    		yield return new WaitFor (20 * msec);
    		Console.WriteLine ("After resuming execution");
    	}
    	

    The compiler generates a state machine for you. In the above example there are two states: the initial state that starts execution at the beginning of the function and the second state that resumes execution after the yield statement.

    A year later we used a variation of the above by employing nested yield statements in C# to implement Mono's HttpRuntime pipeline stack.

    Cute screenshot from my blog at the time:

    Yield statements can be used to solve this class of problems, but they become annoying to use when every method participating in suspending execution needs to become an iterator. If any part of the pipeline is not built with explicit support for yield, the system stops working. Consider this:

    void Attack()
    {
    	 DoTenThings ();
    }
    
    void DoTenThings()
    {
    	  for (int i=0; i < 10; i++){
    	      C();
    	  }
    }
    
    IEnumerable C()
    {
    	   yield WaitForIncomingMessageFromNetwork();
    }
    	

    Here, even if the WaitForIncomingMessageFromNetwork uses yield the callers (DoTenThings and Attack) are not participating, they merely discard the return from yield, so the execution does not return to the main loop.

    Using a yield-based framework is not much of a problem if you only need to use this every once in a while. For example we use this in our ASP.NET engine but it is only used in a handful of places.

    Unity used an approach built on top of the yield framework to suspend and resume execution. For example this is invoked by the Update() function on an enemy script:

    function Patrol() {
    	while(true) {
    		if (LowHealth ())
    			RunAway();
    		else if (EnemyNear ())
    			Attack();
    		else
    			MoveSomewhere();
    		yield; // done for this update loop!
    	}
    }
    
    function Attack () {
    	while (!LowHealth () && EnemyNear ()) {
    		DoTheAttack ();
    		// done with this update, and wait a bit
    		yield WaitForSeconds (attackRate);
    	}
    	// return to whatever invoked us
    }
    	

    The same can be done in Unity with C#, but your functions should be declared as returning an IEnumerable.

    Microthreading in SecondLife

    In 2006, Jim from LindenLabs introduced the work that they had done in SecondLife to support microthreading.

    Jim's work was a lot more ambitious than what both Joe had requested. SecondLife required that code be suspended at any point in time and that its entire state be serializable into a format suitable for storage into a database. Serialized state could then be restored at a different point in time or on a different computer (for example while moving from node to node).

    For this to work, they needed a system that would track precisely the entire call stack chain, local variables and parameters as well as being able to suspend the code at any point.

    Jim did this by using a CIL rewriting engine that injected the state serialization and reincarnation into an existing CIL instructions stream. He covered the technology in detail in his Lang.NET talk in 2006.

    The technology went in production in 2008 and today this continuation framework powers 10 million Mono scripts on SecondLife.

    Tomi's Microthreading Library

    That same year Tomi posted a prototype of coroutines for Mono called MonoCo, inspired by the use of Stackless Python for EVE Online.

    The Stackless Python on EVE presentation goes through the concepts that Tomi adopted for his Mono.Microthread library.

    Tomi's approach was to modify the Mono runtime to support a basic construct called a Continuation. The continuation is able to capture the current stack contents (call stack, local variables and paramters) and later restore this state.

    This extension to the runtime allowed athe entire range of operations described in the Stackless Python on Eve presentation to be implemented. It also addresses the needs of developers like Joachim, but is not able to support the SecondLife scenarios.

    Mono.Tasklet.Continuation

    The Mono.Tasklet.Continuation is based on Tomi's Microthreading library, but it only provides the core primitive: the continuation. None of the high-level features from Tomi's library are included.

    This is the API:

    	public class Continuation {
    		public Continuation ();
    		public void Mark ();
    		public int Store (int state);
    		public void Restore (int state);
    	}
    	

    When you call Store the current state of execution is recorded and it is possible to go back to this state by invoking Restore. The caller to Store tells whether it is the initial store or a restore point based on the result from Store:

    
    	var c = new Continuation ();
    	...
    
    	switch (c.Store (0)){
    	case 0:
    		// First invocation
    	case 1:
    		// Restored from the point ahead.
    	}
    	...
    	// Jump back to the switch statement.
    	c.Restore (1); 
    	

    Tomi implemented a Microthreading library on top of this abstraction. I ported Tomi's Microthreading library to Mono.Tasklet framework to test things out and I am happy to report that it works very nicely.

    Tomi's patch and library were adopted by various people, in particular in the gaming space and we have heard from many people that they were happy with it. Not only they were happy with it but also Paolo, Mono's VM curator, liked the approach.

    Frameworks

    Speaking with Lucas, one of the advocates of Tomi's VM extensions, at the Unite conference it became clear that although the Mono.Microthreads work from Tomi was very useful, it was designed with the EVE scenario in mind.

    Lucas was actually not using Mono.Tasklets on the client code but on the server side. And when used in his game the Stackless-like primitives were getting on his way. So he used the basic Continuation framework to create a model that suited his game. He uses this on his server-side software to have his server micro-threads wait for network events from multiple players. The Tomi framework was getting in Lucas' way so he created a framework on top of the Continuations framework that suited his needs. He says:

    I found however, that what system you build on top of the core continuations tech, really depends on what kind of application you're building. For instance, I have a system where I send serialized "class ProtocolMessage" 's over the network. they have a questionID and an answerID, which are guids.

    in my code I can say:

    	// automatically gets questionID guid set.
    	var msg = new RequestLevelDescriptionMessage();         
    	someConnection.SendMessageAndWaitForAnswer (msg);
    	

    the last call will block, and return once a message with the expected type, and matching answerID has been received. This is made to work because the SendMessageAndWaitForAnswer<T>() call adds itself to a dictionary<GUID,MicroThread> that keeps track of what microthreads are waiting for which answer. A separate microthread reads messages of the socket, and reads their answerID. it then looks to see if we have any "microthreads in the fridge" that are waiting for this message, by comparing the guid of the message, to the guid that the microthread said it was waiting for. If this is it, it reschedules the microthreads, and provides the message as the return type for when the microthread wakes up.

    This is very specific to my use case, others will have things specific to their use cases.

    Going back to the Joachim sample from 2004, using Tomi's code ported to Mono.Tasklets, the code then becomes:

    	void Update ()
    	{
    	    Console.WriteLine ("Starting up");
    	    //Yields for 20 seconds, then continues
    	    Microthread.WaitFor (20.F);
    	    Console.WriteLine ("20 seconds later");
    	}
    	

    The MicroThread.WaitFor will suspend execution, save the current stack state --which could be arbitrarily nested-- and transfer control to the scheduler which will pick something else to do, run some other routine or sleep until some event happens. Then, when the scheduler is ready to restart this routine, it will restore the execution just after the WaitFor call.

    A sample from the game world could go like this:

    	prince.WaitForObjectVisible (princess);
    	prince.WalkTo (princess);
    	prince.Kiss (princess);
    	

    The code is written in a linear style, not in a callback or state machine style. Each one of those methods WaitForObjectVisible, WalkTo and Kiss might take an arbitrary amount of time to execute. For example the prince character might not kick into gear until the princess is visible and that can take forever. In the meantime, other parts of the game will continue execution on the same thread.

    The Continuation framework will allow folks to try out different models. From the Microthread/coroutine approach from Tomi, to Lucas' setup to other systems that we have not envisioned.

    Hopefully we will see different scheduling systems for different workloads and we will see libraries that work well with this style of programming, from socket libraries to web libraries to file IO libraries. This is one of the features that Lucas would like to see: Networking, File and other IO classes that take advantage of a Microthreading platform in Mono.

    Posted on 09 Apr 2009


    Boston .NET Users Group Presentation

    by Miguel de Icaza

    Today both Joseph and myself are doing a presentation on Mono, Moonlight at the Boston .NET Users Group meeting in Waltham.

    We will be demoing the Visual Studio integration and remote debugging capabilities of Mono as well as SuseStudio to go from an ASP.NET application into an appliance with a handful of clicks.

    Posted on 08 Apr 2009


    Update

    by Miguel de Icaza

    The actual post on Mono continuations and coroutines is available here.

    Posted on 07 Apr 2009


    Monday Mystery: Poetry Showing up on my Surveys.

    by Miguel de Icaza

    Yesterday I was pondering whether I should go to Lang.NET 2009 and unable to make a decision, I ran an online poll and asked people to vote on twitter:

    In my survey I listed the pros and cons to give people a feeling of what I was up against.

    The first couple of votes were not very helpful, I got 2 votes, one said yes, one said no.

    Then another twenty or so votes came and the balance started to shift towards "go". Here is the final result:

    And then something very strange happened, the comment section for the online poll started getting people's opinion in the form of poems or Haikus.

    I copy pasted some of the poems below:

    In my heart you will always be now in heaven i cant wait again to see

    When I decided not to roam
    I just stayed home
    Got a lot done
    Enjoyed some time in the sun


    Listen to good talks with your friends
    Before all the fun ends!

    Catch up and learn about Google's V8
    --Maybe you'll even get a date!

    You should go because it will be a blast
    Life is short, so make it last!


    a haiku for miguel:

    Improve your cv
    Boston is lovely right now
    Drink with nerdy folks


    I can’t make up my mind.
    I really am in a bind.
    I can go to Lang dot net,
    And my day will be set.
    Or stay at home and work,
    Like a common store clerk.
    This choice will be easy.
    Lang is where I will be.

    Should I stay,
    or should I go?
    For every con,
    there is a pro.

    I could see old friends,
    and make some new.
    Or stay at home,
    and get work done too.

    I could learn about Second Life,
    and Google's V-8.
    And actually accruing miles
    would really be great.

    It would take a whole week.
    And delay my work,
    But learning something new
    Is definitely a perk.

    A programmer I am,
    and a programmer I will be.
    I think this great poem
    made my mind up for me.


    New friends
    Old friends
    Learning new things
    And when you get back to Boston
    You can have some baked beans


    destroyer of days seven
    bringer of travel expenses
    Lang.NET

    provider of lectures
    connector of colleagues
    Lang.NET

    delayer of projects
    impeder of family time
    Lang.NET

    programmer of dynamic C#
    granter of Second Life
    Lang.NET

    Why go across the country to have a v8?
    Because that's what .NET is 4.
    Lang.NET


    Kill time
    or make new friends?
    Lose a little time from work
    or catch up with those you've fallen out of touch with?
    Work can always wait Miguel
    opportunity cannnot.


    Another dollar for yet another day,
    That is what they all used to say.
    For Lang.NET 2009 I pine away
    The cost to do it makes me say “Hey!”
    Give me Second Life with which to play
    If only I could go to the conference that way
    I’d program it if C was their programming thang’


    Let me help Miguel on what to do.
    He's undecided...can't decide between the two.
    If he goes to Lang. NET, work at home will pile high.
    If he stays home to work, perhaps he'd cry.
    He'd miss the chance to learn Second Life,
    Or make new friends, maybe even find a wife!

    So it costs a few bucks to get to there.
    He'd blow it on something else other than air fare!
    Make the reservations today and don't delay.
    You'll have a good time....that's what I say!


    Divided I stand
    The opportunity to advance ahead
    A week of talks and new friends await me
    On my way to Lang.NET 2009.

    One week gone,
    Trekking across the country.
    Putting all tasks aside,
    I delay work
    On my way to Lang.NET 2009.

    In the end,
    The journey made
    Is better than the journey dreamed.


    Oh the choice, to go or to stay
    that is Miguel's question of the day!

    Should he go, he would have a great time
    Should he stay...he might save a dime!

    Going he will learn about new things out there
    Staying he might...get more work done fair.

    The choice looks easy to someone like me
    but then again I'm not Miguel....I'm Susie


    Once when Miguel was feeling weak,
    A conference looked to kill his week.
    But opportunity there it seemed was rife:
    A chance to master Second Life!


    Miguel's Dilemma
    Should I stay or should I go
    The trip could be for not
    But my gut says I should go
    Money,work,time and home
    Oh, well bye bye I go.....


    knowledge is calling me to fill him up
    my friends are quite expecting
    there are also some guys I don't know that i have to spy on

    who cares about work!
    who cares if I hitchhike to Lang.Net!

    home will always wait
    across the country I will enlighten myself


    To Lang.NET or not to Lang.NET ... that is the question.
    Whether 'tis nobler to learn about great stuff
    Like Second Life and dynamic C#,
    Or consider it the death of
    An entire week away from home,
    Thereby missing out on the catching up with old friends.
    What value, then, shall be given
    This knowledge and friendship?
    Is it greater than the cost of transport and per diem?
    Only Miguel can truly tell.

    Lang.NET
    Lang.NET
    Oh this decision should not make you fret

    Think about the things that are great
    Second Life! .NET 4 and Google V8!

    These things are worth the week away
    your delay in work, and your hit in pay

    Think about the old friends you'll greet
    And all the new ones that you will meet

    The knowledge base you'll gain and learn
    will help you back help you back home and what you earn

    Lang.NET
    Lang.NET
    Looks like going is really your best bet.


    Haiku:

    While traveling sucks
    Experience should be worthwhile
    Go enjoy Lang.NET


    There are times we can't resist
    Pondering the things we've missed.
    We vow, "Next time I won't be slow.
    I'll just pick up myself and go.".
    And when we're back, our money spent,
    We often think, "I'm glad I went".


    Lang.Net
    Not a bad gig to get
    Sure it's a road trip
    And a work skip
    A budget breaker
    But 'cmon,
    Ain't it grand to be a taker?


    Lang.Net
    Not a bad gig to get
    Sure it's a road trip
    And a work skip
    A budget breaker
    But 'cmon,
    Ain't it grand to be a taker?


    Miguel should fly cross country,
    And not worry about the money.
    The trip will be great,
    You must learn about Google V8.

    Leaving home for a week,
    Does sound rather bleak,
    But you'll chat with old pals,
    And may meet some gals.


    There is much to learn,
    but conferences return.
    If you stick to your guns,
    keep your money in your pocket,

    you'll have more in store
    when next year rolls around.
    So stand on solid ground!,
    and in 2010 launch rocket.


    Not quite sure why I got so many replies in the form of poems, and Google surveys do not track the IP address of the submissions, so I have no idea if these were all submitted by the same person or not.

    Need to get to the bottom of this mystery.

    Posted on 06 Apr 2009


    Supercomputing Mono

    by Miguel de Icaza

    Last year we did some work in Mono together with Luis Ortiz to support 64-bit arrays in the VM.

    What was interesting about this work is that even though the ECMA standard allows the index of arrays to be a long .NET on Windows64 does not support this and Java would require modifications to the bytecode format. Altering Mono became the natural choice for those looking to host very large arrays in an advanced and managed VM.

    This means that you can continue to use your existing tools to build applications, but when running under Mono you will get to use those arrays without that pesky 2,147,483,648 upper boundary.

    Today Ian Dichkovsky (from N-iX)announced on the mailing list their work to bring Mono to the MIPS64 from SiCortex. This is based on the excellent work from Mark Mason that did the MIPS32 port.

    SiCortex has an entry-level desktop computer with 72 MIPS processors and if you have the budget you can get modules with 5,832 processors. The MIPS processors helps them stay eco-friendly.

    Posted on 06 Apr 2009


    Telerik Announces Support for their ASP.NET controls on Mono!

    by Miguel de Icaza

    Telerik is one of the most famous provider of controls for .NET. We have been working for the past few months with Telerik to make sure that their RadControls for ASP.NET AJAX product worked out of the box with Mono:

    Today Telerik announced the availability of their product officially for Mono-based customers on Linux systems. From their press release:

    Telerik, the leading vendor of development tools and components for the Microsoft .NET platform announced that RadControls for ASP.NET AJAX fully supports the Mono runtime environment, an open source .NET framework sponsored by Novell, tailored for development of Linux applications. The Telerik AJAX UI components is the first major commercial user interface (UI) suite to go cross-platform and allows developers to build rich .NET applications in a Linux environment. “This has been a long-awaited feature, which we have been quietly working on for quite some time. Over the past few months, we have been actively testing the compatibility of our RadControls for ASP.NET AJAX offering with Mono", said Hristo Kosev, Telerik CTO. "We are extremely happy that our joint work with Novell will allow customers to build compelling high-performance ASP.NET AJAX-based applications and run them on Linux using Mono 2.4.” The decision to work with Novell to extend the capabilities of RadControls over other platforms is in direct response to customer feedback and interest in Mono. Telerik and Novell are optimistic about the effect their partnership will have on the industry and the benefits it will bring to .NET developers.

    Telerik is a major player in the control space in the .NET world and many developers turn to them for ready to use controls for their applications. Developers that were previously using Telerik products can now host their products on Linux servers.

    Special thanks go to Marek Habersack in the Mono team who worked tirelessly to fix Mono's ASP.NET stack. Working with the Telerik folks was a pleasure. Telerik helped us by providing us access to their source code, their test suite and their QA team that made sure that their thousands of tests ran equally well on Mono as they did on Microsoft's .NET.

    You can try the Telerik controls running on Mono at http://mono.telerik.com/.

    Posted on 03 Apr 2009


    MonoDevelop Support for ASP.NET MVC

    by Miguel de Icaza

    Michael Hutchinson blogs about how to use the recently open sourced ASP.NET MVC framework with MonoDevelop. Go from installing MonoDevelop 2.0 to your first ASP.NET MVC application 3 minutes:

    There are a few very simple steps:

    • Go to Tools/Add-in Manager.
    • Click "Install Add-ins".
    • In ASP.NET select "ASP.NET MVC".
    • Install.
    • Select File/New Solution
    • Select ASP.NET MVC project.
    • Hit F5 (run) to run your first app:

    This will give you basic templates and dialog boxes for solutions, views, controllers and master pages. The code uses Michael's recent implementation of the T4 engine.

    Check Michael's Blog for a complete step-by-step setup.

    The Add-in bundles Microsoft's recently open sourced ASP.NET MVC engine to run on top of Mono 2.4.

    Kudos to Michael that created this add-in in his copious spare time. And kudos to the MonoDevelop team that created such a pleasant platform to extend.

    Posted on 02 Apr 2009


    Microsoft releases ASP.NET MVC under the MS-PL License

    by Miguel de Icaza

    Microsoft's ASP.NET MVC is an extension built on the core of ASP.NET that brings some of the popular practices and ease of development that were popularized by Ruby on Rails and Django to the .NET developers.

    Scott Guthrie ---the inventor of ASP.NET--- just announced that Microsoft is open sourcing the ASP.NET MVC stack under the MS-PL license:

    I’m excited today to announce that we are also releasing the ASP.NET MVC source code under the Microsoft Public License (MS-PL). MS-PL is an OSI-approved open source license. The MS-PL contains no platform restrictions and provides broad rights to modify and redistribute the source code. You can read the text of the MS-PL at: http://www.opensource.org/licenses/ms-pl.html

    These are incredibly good news. Worth dancing for!

    I know that a lot of developers inside Microsoft worked to get this important piece of code released under the MS-PL to ensure that the users of ASP.NET could benefit from the code being open source. I know that at least Phil Haack, Scott Guthrie, Scott Hanselman, Dimitry Robsman, Rob Conery and Brian Goldfarb pushed for this.

    I am psyched, not only because ASP.NET MVC is usable in Mono and the code is licensed under open source terms, but also because I strongly believe that the same innovation, rapid adoption and experimentation that has happened with the new wave of web stacks will come to ASP.NET MVC across all platforms.

    The source code is available for download and we are hoping to integrate this into Mono shortly. Scott Hanselman has a nice blog entry on how ASP.NET MVC went from price-free to open-source free.

    In Scott's PDF tutorial he discussed how to build applications with ASP.NET MVC using Visual Studio and how the Rails practices of not repeating yourself and convention over configuration are used by ASP.NET MVC.

    We have developed a MonoDevelop add-in that provides a set of templates, dialog boxes and the tooling necessary to take advantage of ASP.NET MVC on Linux and MacOS X as well. Hopefully the experience will be very similar to Visual Studio.

    It was only two weeks ago that we were sipping virgin pina coladas at Mix09:

    Posted on 02 Apr 2009


    CoreCLR Security Model

    by Miguel de Icaza

    Mono is quickly approaching having a complete implementation of the CoreCLR security model for Mono. This is being developed primarily for use in Moonlight.

    This new and simplified security model allows Moonlight to download and execute untrusted code and run it inside a sandbox. A full implementation requires Mono to have an executable image verifier (making sure the binary that we download follows all of the rules and does not try some funny business), an IL verifier that ensures that the code does not contain any unsafe operations and the sandbox system that ensures that the downloaded code only calls methods that it has permission to call.

    Click for passable illustration of how the sandbox works.

    MSDN has a short introduction to the sandbox and I blogged a long list of links to the original blog entries that documented it.

    CoreCLR security can be customized using a handful of attributes. Instead of sprinkling our source code with the attributes and a gazillions #ifdefs we are using our Mono Linker and a few tools and configuration files to reshape our libraries to contain the necessary attributes required to secure the sandbox. We use a number of tools to automate this process and a manual auditing process to audit the results.

    This is cool because this is a much simpler sandbox system than CAS ever was and our tools make it very simple for third parties embedding Mono into their applications to create their own sandboxes and reshape what is allowed or not allowed by the sandbox based on their specific needs.

    The bad news: this sandbox is only available from trunk right now and will not be easily available until Mono 2.6.

    Posted on 31 Mar 2009


    Mono 2.4 and MonoDevelop 2.0 released

    by Miguel de Icaza

    We just released two big projects we have been working on for quite a while.

    Mono 2.4 is a much faster, scalable and tuned version of Mono, like you have never seen before. Major highlights from the previous release are documented in our release notes.

    And MonoDevelop 2.0

    And a brand new web site

    I previously blogged about the list of all the new MonoDevelop 2.0 features. The most visible one is the integrated debugger both for Mono applications and for C-based applications (using GDB).

    Dogfooding: In addition to all the nice features in MonoDevelop 2.0, Lluis migrated the web site for MonoDevelop from MediaWiki to the Mono-powered MindTouch Deki content management system.

    Posted on 30 Mar 2009


    Game Developers Conference

    by Miguel de Icaza

    I am heading out to the Game Developers Conference in San Francisco as an attendee after some strong endorsments from some friends on tweeter.

    If you are at the GDC or in San Francisco and would like to get together at some point drop me an email (miguel at gnome dot org). Or if there are any great hacker get-togethers for game developers, I would love to hang out with them.

    I would not want to dissapoint, and as a one trick pony kind of person, I will likely be talking about Mono, Moonlight and the virtues of managed code to anyone willing to listen.

    Looking forward to see what my friends have been up to. I can not wait to see the C# repl in a Unity/Web app.

    Posted on 24 Mar 2009


    Moonlight 1.9 and Ogg

    by Miguel de Icaza

    As I mentioned on a previous post Silverlight 3 opens the doors for developers to plug their own Codecs into the Silverlight media pipeline.

    Only a few hours later I read on twitter that Atsushi and Rolf has implemented not only the Ogg/Vorbis Codec for Silverlight 3, but also implemented the Silverlight 3 API in Moonlight:

    This means that you can now use your Silverlight-based players to playback Ogg/Vorbis content. Theora and Dirac are still missing, but with the sample code that we now have, it is going to be merely a weekend hack to get it done. Fluendo has a nice implementation of both already in Java.

    Update on May 6th, 2009: open source implementations of Dirac, Vorbis and adpcm now live in the mooncodecs module.

    Update: link fixed.

    You can see the sample in action in Atsushi's test page.

    Like Jo said on IRC:

    it also works on SL3 though. that's the bit that excites me, since it means we have proper cross-platform playback with Free codecs *today* working in most browsers that matter

    In the words of Annie Hall: La de da.

    Go Moonlight Go!

    Posted on 24 Mar 2009


    Hot Hot Hot: Silverlight 3 Pluggable Codec Architecture (OGG, Theora, Vorbis and Dirac).

    by Miguel de Icaza

    Burried in the list of what is new in Silverlight 3 there is this gem:

    Extensible media format support: With the new Raw AV pipeline, Silverlight can easily support a wide variety of third-party codecs. Audio and video can be decoded outside the runtime and rendered in Silverlight, extending format support beyond the native codecs.

    What the above means is that with Silverlight 3 in addition to the built-in codecs for VC-1 and H.264 and the built-in containers (ASF and MOV) developers can plug an arbitrary audio or video codec and containers into the pipeline to support other formats like Dirac, vorbis, theora and the OGG container.

    Both the codecs and the container parsers are authored using C# (or any other .NET supported language).

    It would be nice to use Mono.SIMD where appropriate for these codecs. Mono.SIMD works out of the box on .NET, but it is hardware accelerated in Mono.

    Atsushi at Novell has done some of the work to get an old C#-based Vorbis codec working with Silverlight 3. We will post more details when we have more information (the fix is on SVN).

    Posted on 23 Mar 2009


    Mono and the Google Summer of Code 2009

    by Miguel de Icaza

    Once again, the Mono project will be participating in the fabulous Google Summer of Code.

    This is a great opportunity for students that want to get involved with open source to contribute, learn and get paid for their work during the summer.

    We have been very lucky in recruiting some great students in the past years and these students have taken on some very sophisticated tasks over the years. MonoTorrent, ParallelFX, FastCGI for mod_mono, WinForms designer and theming, Gendarme development, Gtk# widgets and much more.

    We have posted some ideas for students to get started, but students that are passionate about Mono should feel free to pitch their own ideas.

    We tend to pick students for advanced projects over the milder, simpler tasks.

    This year, I am excited about a few special projects:

    • Making the Mono VM use LLVM as a code generation backend.
    • Porting Mono.SIMD to new architectures.
    • ParallelFX updates.
    • Using NVidia's VDPAU library to provide a new codec implementation in Moonlight to support VC-1/H.264.
    • Managed (C#) implementations of Dirac and Vorbis as Silverlight 3 codecs.
    • A Database designer Add-in for MonoDevelop to support DBML editing.

    There are many more of course, but the above are the ones that are making me drool.

    Posted on 23 Mar 2009


    BareFTP

    by Miguel de Icaza

    Christian just pointed me to BareFTP a graphical file transfer client that supports FTP, FTPS, SSH and SFTP protocols to transfer files.

    I am a command line kind of person, but many of my friends like to use GUI clients for this.

    Posted on 22 Mar 2009


    Hot Off the Presses: Unity Goes to Windows

    by Miguel de Icaza

    Unity has announced that their Unity 2.5 IDE is now cross platform and now works Windows in addition to MacOS.

    Unity rebuilt the entire Cocoa-based UI that they had previously with a Unity-powered UI. The entire UI is now built in C# using the Unity built-in APIs (all the controls, views, widgets).

    This is a little bit like a compiler compiling itself. This time it is an IDE built using the IDE itself

    Posted on 19 Mar 2009


    Moonlight brings Playboy archives to Linux

    by Miguel de Icaza

    Since yesterday's announcement that the Playboy archives would be hosted using Silverlight's DeepZoom folks have been hard at work getting the remaining Silverlight 2 features implemented in Moonlight.

    Click for screenshot.

    Posted on 19 Mar 2009


    Lucas integrates csharp REPL into Unity

    by Miguel de Icaza

    Lucas Meijer has integrated Mono's C# REPL into Unity.

    Visit his post and check out the flash demo of the C# REPL in action.

    Posted on 18 Mar 2009


    Mono and Qt

    by Miguel de Icaza

    The KDE folks have created some brilliant bindings for Mono and .NET called Qyoto.

    But there is nothing like a polished application to really test the bindings. This week Eric Butler announced Synapse: an advanced Instant Messaging platform.

    This is the first large application built with Qt/Qyoto/Mono and it is a beautiful application:

    I had a chance to see Synapse live a couple of weeks ago in Seattle when we met Eric for dinner. Eric has written a very polished application. This is what love does to software.

    Congratulations to Eric for the release of his app, to the Qymono crowd for creating these polished applications and Nokia/Trolltech for releasing Qt under the LGPL license.

    Developers interested in doing Qyoto development with MonoDevelop can take advantage of the QyotoDevelop add-in that Eric created as well. This add-in generates code from the Qt Designers UI files (click for a screenshot).

    Posted on 16 Mar 2009


    Voices from Post-Saddam Iraq

    by Miguel de Icaza

    My friend Victoria Fontan who works at the UN's University for Peace in Costa Rica just published the book from her research work on Iraq.

    The book is Voices from Post-Saddam Iraq: Living with Terrorism, Insurgency, and New Forms of Tyranny. From the editorial reviews:

    Even today, most Americans can not understand just why the fighting continues in Iraq, whether our nation should be involved there now, and how we could change our tactics to help establish a lasting peace in the face of what many fear will become a full-fledged civil war. In the book at hand, Victoria Fontan - a professor of peace and conflict studies who lived, worked and researched in Iraq - shares pointed insights into the emotions of Iraq's people, and specifically how democratization has in that country come to be associated with humiliation. Including interviews with common people in Iraq this work makes clear how laudable intentions do not always bring the desired result when it comes to international conflict and cross-cultural psychology. For example, Fontan explains, one might consider the comment of a young Shiite: "The greatest humiliation of all was to see foreigners topple Saddam, not because we loved him, but because we could not do it ourselves." This gripping text is focused on a new and growing area of human psychology - humiliation studies.

    Please vote to have the book available on Kindle. I got a hardcopy, but I would love to travel with it instead.

    Posted on 16 Mar 2009


    Mono's Text Template Transformation Toolkit (T4)

    by Miguel de Icaza

    At the ALT.NET Seattle conference I was introduced for the first time to the Text Template Transformation Toolkit. Also known as T4. T4 is built into Visual Studio and developers use TT to generate code from all kinds of data sources. This tutorial covers the basics.

    T4 Support in MonoDevelop, with error reporting and document outline.

    T4 is very much like ASP.NET in that code is mixed with output code. Additionally TT has access to data on its "host". This allows for some creative data extraction from the environments before it generates output.

    To my surprise T4 thing is wildly used by lots of people. Daniel Cazzulino's company has a product just to improve Visual Studio's support for editing .tt files.

    What really got me interested in T4 were the templates that Damien wrote to convert from DBML files into C# code that is suitable for use with Linq. A nice replacement for the SQLMetal tool.

    I mentioned this -in passing- to Michael Hutchinson as he had been working on ASP.NET MVC support for MonoDevelop and there are some nice ASP.NET MVC T4 files out there.

    In a week he implemented: the T4 command line tool, the MonoDevelop host (to support ASP.NET MVC) and he even added syntax highlighting to it (see the above screenshot).

    We have also started using it to migrate the code that previously used assorted WriteLines to generate RPM files from Visual Studio/MonoDevelop projects into a nice T4 template:

    Packaging Template

    Posted on 10 Mar 2009


    Gnome Do

    by Miguel de Icaza

    Gnome Do got a new and shiny web site.

    Posted on 24 Feb 2009


    ALT.NET this weekend

    by Miguel de Icaza

    My friend تلة جوزيف (Youssef) and myself will be heading out to Redmond for the ALT.NET Seattle event this weekend.

    This will be my first ALT.NET conference and I do not know quite what to expect. Youssef keeps telling me "You should not prepare for this", but I feel like I should at least prepare something exciting to get the juices flowing for discussion.

    Thoughts?

    Posted on 24 Feb 2009


    CoyoteLinux uses Mono for syadmin tools

    by Miguel de Icaza

    Interesting find: Coyote Linux -a firewall in a box- configuration of Linux is using Mono and ASP.NET for its admin tools.

    Web Admin

    Here is the rationale for the switch to C#:

    One of the biggest changes to this release of Coyote Linux is the use of C# as the primary development language used for most of the administration, configuration, and maintenance utilities. Previous implementations of Coyote Linux made heavy use of C, Pascal (namely Delphi), and Bash shell scripting for this purpose. The change is being made to C# after nearly 2 years of working with the language in a cross-platform setting which involved the use of both Red Hat Linux and Windows 2003/2008 servers. The ability to use a single development environment (in my case, Visual Studio 2008) and produce executables that will execute in unmodified form on both Linux and Windows has seriously put the “R” in RAD programming. I am still actively involved in projects that require the development of cross-platform utilities and am already paying for all of the necessary licenses to provide my company with a full array of software and hardware to develop applications that work in a mixed server OS environment.

    I have spent a great deal of time testing C# applications under Linux using Mono as the executing environment. While this is not necessarily the best choice for small, embedded hardware (486 / ARM class processing power) it works very well for anything using i686 or better technology. Another wonderful advantage of using this technology is the ability to run the same set of executables on both 32 and 64 bit hardware without the need for compatibility libraries to be installed. The installation of Mono dictates the 32/64 bit execution environment, preventing the need to recompile the full Coyote Linux software package.

    Traffic

    Posted on 22 Feb 2009


    System.Shell.CommandLine does not belong in System.Core

    by Miguel de Icaza

    Update: Justin Van Patten at Microsoft clarifies that the System.Shell.CommandLine API that was on the CTP for VS2010 will not be part of the final .NET 4.0. Instead better versions (similar in spirit to Mono.Options) will be made available in CodePlex in the future. Relief.

    Update 2: Justin gave me permission to quote from his private email, which I include:

    We are not shipping System.Shell.CommandLine in .NET 4. This was based on an intern project from a couple of years back that was mistakenly public in the .NET Framework 4.0 CTP. It wasn't a design that we were happy with and has been removed and will not be present in the next preview release.

    We have a *much better* command line parsing API, along the lines of Mono.Options, that we're planning to release on CodePlex later this year.

    Today I was alarmed by a new API being introduced into .NET 4.0, the System.Shell.CommandLine which is being dumped into System.Core.

    An introductory blog post shows a bloated, over-engineered, too rich in the OO, too poor in the taste look at the API. Not only it is a terrible API, it is being dumped right in the core of the framework on the System.Core assembly.

    This is the kind of API that you get when the work is commissioned as opposed to be created as an act of love. This is what you get from a culture of process. Some PM figured out "We need command line parsing". And since it does not look like rocket science they assigned this to someone that had absolutely no interest in this task. And clearly nobody involved (the PM, the developer and the tester) fought back. They were forced to do this, and they came up with this aberration, hoping that the sooner they were done with this, the sooner they could move on with their lives.

    Compare this with the labor of love from Jonathan Pryor and his Mono.Options library. This API was discussed publicly, it was adopted in a few applications and tried out, it was morphed to support Windows, Unix and GNU style command line options and the result shows what passion and love deliver when it comes to APIs.

    Compare and contrast. This is the sample posted for on the blog above:

    	using System;
    	using System.Shell.CommandLine;
    
    	class Program
    	{
    	static void Main()
    	        {
    	            Console.WriteLine("Checks a disk and displays a status report.\n");
    
    	            CommandLineParser cmd = new CommandLineParser();
    	            cmd.AddParameter(CommandLineParameterType.String, "volume", ParameterRequirement.Required,
    	            ParameterNameRequirement.NotRequired, "Specifies the drive letter.");
    	            cmd.AddParameter(CommandLineParameterType.Boolean, "F",      ParameterRequirement.NotRequired,
    	            ParameterNameRequirement.Required,    "Fixes errors on the disk.");
    	            cmd.AddParameter(CommandLineParameterType.Int32, "L",      ParameterRequirement.NotRequired,
    	            ParameterNameRequirement.Required,    "Changes the log file size to the specified number of kilobytes.");
    
    	            try
    	            {
    	                cmd.Parse();
    	            }
    	            catch (ParameterParsingException ex)
    	            {
    	                Console.WriteLine(cmd.GetHelp());
    	                Console.WriteLine(ex.Message);
    	                return;
    	            }
    
    	            string volume = cmd.GetStringParameterValue ("volume");
    	            bool fix      = cmd.GetBooleanParameterValue("F");
    	            int? logSize  = cmd.GetInt32ParameterValue  ("L");
    
    	            Console.WriteLine("Checking volume {0}...", volume);
    
    	            if (fix)
    	                Console.WriteLine("Fixing errors...");
    
    	            if (logSize != null)
    	                Console.WriteLine("Changing log size to {0}...", logSize);
    	            else
    	                Console.WriteLine("Current log size: {0}", 1024);
    	        }
    	    }
    	

    This is the equivalent in Mono.Options. With Mono.Options you can take advantage of C# 3 features and make the code more succinct. An important style difference is that the policy is not limited by what can be poorly expressed by an enumeration but can be anything that can be expressed with a real language.

    What is the point for "ParameterNameRequirement.Required" for example? This is essentially a bool option with a long name. The fundamental problem is not that it looks like someone left a turd on my source code or the fact that it is a glorified bool value. The problem is that enumerations and an OO structure will not give you the flexibility that is required for command line handling. This API would not be able to cope magically with conflicting options (either -a or -b can be used) or with options that are required if another option is set (if -v set, then -log is needed) or with custom parsing required after the basic command line options are parsed (consider a C compiler, -I and -L and -l options can be specified multiple times).

    This is the equivalent code in Mono.Options. Notice that the policy can be enforced either outside of the parameter parsing (after the basic parsing has been done) or as each one of the delegates for the options:

    	using System;
    	using Mono.Options;
    
    	class Program {
    	    static void ShowHelp (string msg, OptionSet p)
    	    {
    	        p.WriteOptionDescriptions (Console.Error);
    	        Console.Error.WriteLine (msg);
    	    }
    
    	    static void Main (string [] args)
    	    {
    	        Console.WriteLine("Checks a disk and displays a status report.\n");
    
    	        bool fix = false;
    	        int logSize = 1024;
    	        string volume = null;
    
    	        OptionSet p = new OptionSet ()
    	            .Add ("volume=", "Specifies the drive letter.", v => volume = v)
    	            .Add ("f|F",  "Fixes error on the disk", v => fix = true)
    	            .Add ("l=", "Changes the log file size to the specified number of kilobytes",
    	                  v => logSize = int.Parse (v));
    
    	        try {
    	            p.Parse (args);
    	        }
    	        catch (OptionException)
    	        {
    	            ShowHelp ("Error, usage is:", p);
    	        }
    	        if (volume == null)
    	            ShowHelp ("Error: must specify volume", p);
    
    	        Console.WriteLine("Checking volume {0}...", volume);
    
    	        if (fix)
    	            Console.WriteLine("Fixing errors...");
    
    	        if (logSize != null)
    	            Console.WriteLine("Changing log size to {0}...", logSize);
    	        else
    	            Console.WriteLine("Current log size: {0}", 1024);
    	    }
    	}
    	

    The number of lines is roughly the same, but one is an eye sore and limited. The other is both beautiful and extensible.

    Both APIs are capable of more. But System.Shell.CommandLine will merely give you more enumerations with limited functions and you will end up rolling out your own if you want to do anything remotely interesting.

    Mono.Options is more of an open ended, future-proof and extensible API. It is implemented as a single C# source file (1,112 lines of code) that you can use in your own projects (and even tune/modify), you can start using today and will work on .NET 2.0 and up, it is nicely documented. More examples: here, here and here.

    System.Shell.CommandLine does not belong in System.Core. System.Core is a fundamental assembly that will be everywhere .NET is, and it will soon enough run into the same upgrade and maintenance restrictions that mscorlib has.

    This API needs to be moved into CodePlex or be available as an unsupported "PowerOverEngineeredPack.dll".

    Posted on 21 Feb 2009


    MonoDevelop 2.0 Beta 1

    by Miguel de Icaza

    Earlier this week we released the first beta of MonoDevelop 2.0.

    MonoDevelop 2.0 is a very ambitious release in terms of the new functionality available since the MonoDevelop 1.0 release back in March 2008. It is ambitious, but also very stable, we have had hundreds of people dogfood this new release of MonoDevelop during the entire development cycle.

    There are a number of new features since MonoDevelop 2.0 that are worth calling out:

    Built-in Debugger

    MonoDevelop now has a built-in debugger. The debugger supports both debugging Mono-based applications as well as native applications using GDB.

    While hovering over variables, you can explore the values of complex data structures:

    Breakpoints and Tooltips

    You can debug both at the source code level, or the generated assembly code:

    Debugging the Mono Runtime

    Auto-complete on the watch window:

    Auto-complete in the watch window.

    You can also attach to running processes, both native or Mono processes and debug them:

    Process selector

    For more information see our list of supported features.

    Improved ASP.NET support

    Our ASP.NET story is getting better. web projects are now compatible with Visual Studio 2008 and Visual Web Developer 2008 SP1.

    Our ASP.NET text editor now offers code completion of tag, attributes, attribute values and event handlers is now supported for ASP.NET and various HTML DTDs. For example:

    We also now have DOM breadcrumbs in the editor as you edit your file, and a nice DOM/Document outline for navigating your HTML and DOM documents.

    The beta does not contain this feature, but we will be publishing an Add-in that will help you get your ASP.NET MVC projects up and running with minimum hassle by the time ASP.NET MVC ships.

    New Text Editor

    A new text editor, this text editor is written entirely in C# and replaces the GtkSourceView widget. This has allowed us to more easily add features to the editor and bring MonoDevelop to the 21st century. Some of the features in the new text editor include:

    • Flagging errors with underlines on the fly.
    • Change bars (track what changes are in your buffers).
    • Incremental search.
    • Code folding: Support for collapsing regions of text (#region), methods, classes.
    • Themes for the editor.
    • Source code split views.
    • Transparent popups. Holding down the Control key when a completion popup is shown will make the popup transparent to make it easier to see the text that is underneath the popup.
    • VI-mode support. We understand that some of our users would rather use VI keybindings than Emacs keybindings. VI support is here.

    Source Code Editing

    Intellisense now works for pretty much every piece of the C# 3 language. I am not supposed to use the word "Intellisense", but I just did.

    Also, sagacious readers will have noticed that I sneaked in "3.0" in the above statement. MonoDevelop now understands the C# 3.0 syntax. A great companion to our award-winning C# 3.0 compiler.

    Now, technically speaking we have not received any awards for our C# 3.0 compiler, but we should have, because we are awesome. And in fact, I will be arranging a dinner at my place this coming weekend where we will award prizes to the best pieces of technologies and our C# compiler is a nominee.

    Notice how it also supports nice automatic generations of methods when you declare an event:

    MonoDevelop is also aware of types, so for example, if you type "override" when entering a method, it will offer a list of methods that can be overwritten. O-M-G.

    There are other cute features like MonoDevelop can stub out interface methods for you. O-M-G.

    There are also a few features that we liked from editors like TextMate that should make it more suitable for managing web projects like the revamped "Go to File" dialog (invoke it with control-alt-o). It is now able to do acronym searches.

    New XML Editor

    The XML Editor from SharpDevelop has been fully integrated into MonoDevelop and improved. It supports code completion of tags, attributes and attribute values (available for registered XSD schemas). A range of schemas are supplied with MonoDevelop.

    XML files can be validated using the built in schemas, and can have XSL transforms applied. in addition, XSD schemas can be generated from XML files.

    For instance, it is currently used to allow editing of Silverlight XAML files and have auto-completion of XAML tags that are valid for Silverlight/Moonlight.

    Project Improvements

    We have switched to msbuild-style project files to increase interoperability with Visual Studio.

    Support for opening multiple solutions at once, and support for Workspaces.

    We now have cascading project policies. This is useful for example to use different coding styles depending on the project that you are working on.

    Cascading Project Policies

    Gtk# GUI Designer

    You can now make your custom widgets available on the toolbox, by just adding the [ToolboxItem] to your widget.

    My favorite one is that now constructed dialogs and windows expose the Gtk.UIManager as a field. It was previously hidden, and not possible to adjust the UI dynamically without much work.

    Assembly Browser

    There is no better way of learning an API than browsing the data types exposed and their relationships. A new Assembly Browser has now been included.

    Assembly Browser

    Switching

    A cute little window pops-up when you press Control-Tab these days:

    Vala Support

    Support for the Vala programming language has been integrated:

    Vala Support

    The Future: MonoDevelop, the Cross Platform IDE.

    We are very excited about this release, and there are a few areas in which we would like to improve MonoDevelop for future releases.

    We want to bring MonoDevelop to Windows to be able to reach into more users and to help developers doing Gtk# development on Windows.

    MonoDevelop on Vista.

    We are also currently shipping a preview of MonoDevelop for the Mac, it is not yet ready as there are a few kinks that need to be sorted out on that platform, but we are working to resolve those issues. For example, we want to integrate with the Mac menu system, and to provide bindings that are familiar for Mac users. Here is a preview:

    Super-Alpha-Preview of MonoDevelop on OSX.

    Unity has stated that they will be making MonoDevelop the standard editor for Unity3D on MacOS.

    Posted on 19 Feb 2009


    Mono Runtime Debugging

    by Miguel de Icaza

    We now have better integration of GDB with Mono. Information on how to use this is in Debugging with GDB in XDEBUG mode in our wiki.

    This will be useful if you are debugging the Mono runtime, or debugging Mono embedded into an application new versions of Mono (for example debugging Moonlight).

    This will give you symbols for managed code in stack traces, for example the bold text in this example are the managed frames. These would previously just be rendered as "????????" by gdb.

    (gdb) xdb
    (gdb) bt
    #0  0x0000000040cd707e in Tests:pass_floats_doubles (a=100, b=101, c=102, d=103, e=104, f=105, g=106)
    #1  0x0000000040cd6fd8 in Tests:test_721_sparc_float_argument_passing ()
    #2  0x0000000040a6228a in (wrapper runtime-invoke) Tests:runtime_invoke_int (param0=0x0, param1=0x7fc05e5b0e00,
        param2=0x0, param3=0x40cd6f80)
    #3  0x00000000004219f7 in mono_jit_runtime_invoke (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at mini.c:4253
    #4  0x00000000005c1d2c in mono_runtime_invoke (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at object.c:2399
    #5  0x00000000005c39d7 in mono_runtime_invoke_array (method=0x9daa70, obj=0x0, params=0x0, exc=0x0) at object.c:3488
    #6  0x00000000005cdc31 in ves_icall_InternalInvoke (method=0x7fc05c371be0, this=0x0, params=0x0, exc=0x7fff66729368)
        at icall.c:3038
    #7  0x0000000040cd6bee in (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (
        this=0x7fc05c371be0, param0=0x0, param1=0x0, param2=0x7fff66729368)
    #8  0x0000000040cd690c in System.Reflection.MonoMethod:Invoke (this=0x7fc05c371be0, obj=0x0, invokeAttr=0x0,
        binder=0x0, parameters=0x0, culture=0x0)
    #9  0x0000000040cd683b in System.Reflection.MethodBase:Invoke (this=0x7fc05c371be0, obj=0x0, parameters=0x0)
    #10 0x0000000040a6275c in TestDriver:RunTests (type=0x7fc05e5b6dc8, args=0x0)
    #11 0x0000000040a62380 in TestDriver:RunTests (type=0x7fc05e5b6dc8)
    #12 0x0000000040a62354 in Tests:Main ()
    #13 0x0000000040a6228a in (wrapper runtime-invoke) Tests:runtime_invoke_int (param0=0x0, param1=0x7fc05e5b0e00,
        param2=0x0, param3=0x40a62340)
    #14 0x00000000004219f7 in mono_jit_runtime_invoke (method=0x9576f0, obj=0x0, params=0x7fff66729600, exc=0x0)
        at mini.c:4253
    	

    For people running the archer branch of gdb, there is a "mono mode" implemented in python for gdb, which offers additional features: http://anonsvn.mono-project.com/viewvc/trunk/mono/data/gdb/

    Posted on 19 Feb 2009


    Mono on Android, update

    by Miguel de Icaza

    Koushik Dutta has posted two great updates on his blog about Mono running on the Android powered G1 phone. The code necessary to build Mono on Android is available at the androidmono page.

    The first bit is his work to allow Mono code to call Dalvik code as well as the bridge to allow Dalvik/Java to call into .NET code. This is necessary to allow Mono-based applications to call into the phone API and integrate with the existing stack.

    The second bit is a cute show of DLR-based IronPython running on the phone.

    This of course means that with the bridge in place, any CLR or DLR-based language can access the functionality exposed in Dalvik.

    Posted on 16 Feb 2009


    Mono 2.0 - .NET Tool/Add-in of the Year

    by Miguel de Icaza

    Jeff just pointed out to me that Mono 2.0 won the ".NET Tool/Add-in of the Year" award from the guys at developer.com.

    Sweetness!

    Posted on 13 Feb 2009


    Linus does 25 things

    by Miguel de Icaza

    Linus Torvalds does 25 things about me.

    Posted on 12 Feb 2009


    Moonshine

    by Miguel de Icaza

    Now that Moonlight 1.0 is out, I should talk a little bit about Aaron Bockover's amazing Moonshine plugin.

    Moonshine's About Box while playing HBO.com

    Moonshine is a tiny plugin that registers itself with Firefox to render Windows Media streams and emulates the Windows Media Javascript API by redirecting it to Moonlight.

    So when you visit a page that in the past used to embed the Windows Media Player (for example at HBO.com or at C-SPAN), instead you get a Moonlight-based rendering engine and uses Microsoft's Media Pack for doing the video and audio playback.

    It is trivial to install it, just go to this page and click on the moonshine that is right for your platform.

    Internally we referred to this project as "Pornilus" a homage to the Roman senator and patron of the arts from the 3rd century. And like Pornilus, we want to bring the arts to the people.

    Cute fact: Pornilus/Moonshine will pick-up your Gnome theme and theme itself accordingly.

    Oddly enough, there is no Wikipedia page for Pornilus yet. Someone needs to correct this.

    Posted on 12 Feb 2009


    Moonlight 1.0 goes live

    by Miguel de Icaza

    Moonlight, the open source implementation of Silverlight for Unix systems has officially reached its 1.0 level. We are feature complete, we pass all the Microsoft regression test suites and we shipped support for Microsoft's Media Pack for x86 and x86-64 architectures.

    Moonlight is available as a Firefox plugin that can be installed with a single click from the moonlight download page.

    What is in Moonlight 1.0

    Moonlight 1.0 contains our plugin that can be used in Firefox 2 and 3 on Unix systems using the X11 windowing system.

    Moonlight 1.0 (and Silverlight 1.0) both come with a graphics pipeline, video and audio frameworks and a javascript bridge and neither one of them contains an actual execution environment. The execution environment is the browser's own Javascript engine. When developers build 1.0-based plugins they script all of the functionality using the browser's own Javascript engine.

    The browser Javascript engine communicates with Silverlight (or Moonlight) through the Javascript API exposed by the plugin.

    With Silverlight 2.0 and Moonlight 2.0 in addition to this model where the browser's Javascript drives the interaction a new model is available: the ECMA CLI execution system powers the actual execution of the code and will deliver performance anywhere between 20 to 300 times faster execution speed than even the most modern Javascript implementation if you use a strongly typed language like C# or Boo.

    CNN's The Moment on Moonlight.

    It is worth pointing out that Moonlight is provided both for 32 bit systems and 64 bit systems on the launch date.

    We are also hoping to expand our reach to other Unix variants that use X11 like the various BSD systems and Solaris and make codecs available for those.

    How we got here

    The development of Moonlight has been a fascinating adventure. It all started at the Mix conference in May 2007 when Scott Guthrie introduced Silverlight 1.1. It was a bold move for Microsoft to embed the ECMA CLI into their Silverlight 1.0 plugin.

    In my blog post called "Mix 07, Silverlight, Dynamic Languages Runtime and OpenSource". From that post you can see that I was already excited about the technology, and I could not wait to get this technology to Linux. The talk on the DLR at Mix 07 was also fascinating and got me interested in bringing this to Linux.

    A few weeks after the DLR had been announced and open sourced, our team had it working on Linux with Mono and by the end of May I had cooked up enough to render a spinning video on the screen.

    IronPython 3D visualization on Moonlight

    It was during the dynamic language workshop at Microsoft that I had a chance to have dinner with Jason Zander and Scott Guthrie in an Indian restaurant in downtown Redmond. In this dinner they discussed some of the design tradeoffs in Silverlight and these would become part of our own implementation a few days later.

    At Mix 2007 I had the chance to meet Marc Jalabert from Microsoft France. Marc invited me to the Remix event in Paris but did not take the invitation seriously until he offered us to demo Moonlight on Jun 21st.

    Other than a spinning video and the DLR we did not really have much code so on May 31st I sent an email to the team and asked them to work on an intense 21-day hackaton to bring Silverlight 1.1 to life on Linux. By Jun 21st we had a demo working and we showed Silverlight 1.1 applications (with the CLR) running on Linux.

    A few weeks passed by, and Jeff Jaffe from Novell asked me to present our Moonlight to Bob Muglia as part of the regular Microsoft/Novell interoperability meetings. After struggling with the video projector for what seemed like an eternity the Silverlight Chess and the Silverlight Airlines demo came up on the screen on Linux.

    In the meantime, we were in love with our Moonlight engine, and we used to build desktop applications in addition to web applications.

    After this meeting, I do not remember exactly how things happened as too much happened too quickly, but Microsoft and Novell agreed to collaborate on bringing Silverlight to Linux. We announced the collaboration on September 5th.

    It was early on, at that dinner with Jason and Scott that the issue of how to properly license codecs for MP3, WMV and VC-1 had been discussed. We knew that we could implement the engine, but the question remained: how to get codecs to end-users in a fully licensed way. This and other problems had been already discussed and agreed on the collaboration agreement. Microsoft would develop, distribute and maintain their own Media Pack for Linux users and other Unix operating systems.

    The entire media work involved hard work at every level, but it was worth the effort. We now have one of the best open source media pipelines implemented. And it will only get better with all the new features in Silverlight 2 for adaptive streaming.

    The Immediate Future

    We are now hard at work on Moonlight 2, and those of you interested in trying it out can do so by following the build instructions on our web site.

    Silverlight 2.0 was a major upgrade from its original announcement Silverlight 1.1. It is more complete, more polished and has been future-proofed.

    Microsoft has continued to help us all along in creating an open source implementation of Silverlight. They have open sourced the Microsoft DLR, the Microsoft MEF framework and the crown jewels: the Microsoft Silverlight Control Library and the Control Toolkit under the OSI-approved MS-PL licenses. Without this it would have taken years for us to catch up.

    Jimmy Schementi's IronRuby + DOM + Flickr sample.

    Up until two weeks ago we could not see much in the screen as a lot of Moonlight had inter-dependencies between various subsystems. But once Larry Ewing's layout system landed in our tree, magically many things started to come together.

    You can try out yourself Moonlight with some very hot demos including CNN's The Moment, the Photosynth-based 3D browsing engine for Obama's Inauguration and of course the always amazing DLR demostrations.

    Silverlight 3

    Silverlight 2 is incredibly exciting, it is delicious and mindblowing. There is a lot of excitement about it, my favorite three sites on Silverlight 2 include:

    Microsoft will be announcing the details about Silverlight 3 at their Mix conference in March in Las Vegas.

    My wish list

    I love Silverlight and the use of the CLR for building web applications. That is just how I am wired up.

    I still personally wish that Silverlight 2.0 had a JSon interface to XAML, like the prototype that Chris Toshok did, or that Silverlight had a more fluent model for application deployment. I would like the XAP model to be entirely optional or non-existent for IronRuby or IronPython.

    Posted on 11 Feb 2009


    It is that time of the Quarter! Traveling to Microsoft.

    by Miguel de Icaza

    When Joseph and myself head out to Redmond to meet with some folks at Microsoft about Moonlight.

    This is a call for all cool cats at Microsoft that would like to get together and talk shop to drop me an email (miguel at gnome dot org) and we can schedule something.

    Posted on 05 Feb 2009


    XBox Division at Microsoft

    by Miguel de Icaza

    For about a year I have been trying to find someone in the XBox360 division at Microsoft that we can talk to about bringing Mono to the XBox360 to allow C/C++ developers to script their applications with the high performing C#, Boo or the Iron* languages as opposed to interpreters.

    A year ago Mono could not target the XBox360 as apparently this platform, like the iPhone, does not support JITing. Mono now supports full static compilation of .NET code into native code before deployment and we would very much like to bring this to the XBox360.

    If you are a Microsofty and you know how to get a hold of someone on the XBox360 group in the Middleware division and you could hook us up, I would love if you could arrange an introduction.

    Posted on 03 Feb 2009


    Linux Outlaws Podcast

    by Miguel de Icaza

    Last week the folks at Linux Outlaws interviewed me about Mono.

    The idea was that someone on a previous episode apparently did not quite like Mono and they wanted to hear my take. In the end I am not sure that we even talked about their concerns, but it was a fun interview.

    Posted on 03 Feb 2009


    IronClad

    by Miguel de Icaza

    The guys at Resolver Systems have released IronClad. IronClad is a library that allows IronPython to use any existing compiled CPython extension.

    The new version has matured to the point that it is able to use CPython's numpy and pass its test suite.

    It is lovely to see third parties start to test their code with Mono in addition to .NET as part of the release process. The code has been tested with Mono, and comes with Unix makefiles.

    Posted on 30 Jan 2009


    One Month of Email Gone

    by Miguel de Icaza

    If you sent me an email in the last month, and you are waiting for me to reply, please resend your email.

    I accidentally deleted all email since December 18th, 2008.

    Posted on 27 Jan 2009


    DekiWiki powers WhoRunsGov.Com

    by Miguel de Icaza

    Aaron Fulkerson and his team at Mindtouch have done it again. This time they landed the Washington Post new http://whorunsgov.com project:

    WhoRunsGov.com provides a unique look at the world of Washington through its key players and personalities. The site features concise profiles of influential political officials who shape government policy, including members of the new presidential administration, Pentagon officials, lawmakers, senior congressional aides and committee staff. The first several hundred profiles are being crafted by a newly created editorial team at the Washington Post Company, as well as a group of experienced outside contributors. Each profile provides in-depth information on an official’s policy experience, involvement in government decision-making, major policy positions, key associates, political affiliations, voting records, campaign and personal finance information, plus relevant news articles from around the Web.

    Their Deki project has gone from the cutest Wiki system to a full collaboration platform.

    Their press release has the details.

    And as my readers have come to expect, yes, this is also built on top of Mono. Deki is not built with ASP.NET --Microsoft's web platform-- instead the engine is built on top of Mindtouch's Dream framework and the presentation layer is built on top of PHP.

    Congraulations to Mindtouch on this important launch!

    Posted on 23 Jan 2009


    Cartoon Network's Kid's MMO and Mono.

    by Miguel de Icaza

    The amazing Joachim Ante from Unity3D wrote me to tell me that Cartoon Network's new browser-based MMO for kids FusionFall has finally launched to the public.

    Fusion Fall takes advantage of many new features in Unity3D for creating large worlds. I live blogged some of the details as Joachim presented them at the Unite Conference.

    Unity uses the Mono runtime on both Windows and MacOS and it might become one of the largest deployment vehicles for the Mono VM.

    There is an air of coolness in the fact that Mono is being used on Windows instead of .NET. And part of it has to do with the fact that Mono's open source engine allowed Unity to modify it to suit their very specific needs.

    As I mentioned at my PDC talk, the .NET engine is fantastic, but up until Mono only Microsoft was in a position to reshape .NET into different forms (Silverlight and Mesh both use a special trimmed-down .NET called CoreCLR). I would love to see a world where people take Mono (or chunks of Mono) tune it and shape it to suit their needs.

    Congratulations to the team at Unity for a job well done, and to the team that produced FusionFall. You can see the introduction video:

    One thing that stands out in FusionFall is that it shows what a big creative budget can do with Unity.

    Go Mono gaming, Go!

    Posted on 22 Jan 2009


    Linux and the Inauguration

    by Miguel de Icaza

    Not only was the inauguration transmitted using Silverlight, but also on each window for everyone watching the inauguration from pic2009.org the following caption was at the bottom of every page:

    Every viewer could see "Linux-compatible Silverlight Player".

    Posted on 21 Jan 2009


    Watching the Obama Official Inauguration on Linux with Moonlight.

    by Miguel de Icaza

    I just wanted to confirm that you can watch today's Barack Obama Official Inauguration video stream using Moonlight on Linux/x86 and Linux/x86-64 systems.

    All you need to do is to go to the Moonlight Download page, install Moonlight and restart your browser. Then you can visit www.pic2009.org in a few hours and watch the event from Linux.

    Microsoft worked late last night to get us access to the code that will be used during the inauguration so we could test it with Moonlight.

    Thanks to: Joseph, Larry, Geoff, Rusty and specially Aaron who all worked tirelessly to implement and get everything tested tonight and ready to go on the Novell side. To Brian, Eric, Ben at Microsoft and Mio at IStreamPlanet to make sure that Linux users will be able to watch Obama's inauguration.

    Ben Waggoner has posted an update on the Microsoft side..

    Aaron's code will also be powering MacOS/PPC streaming.

    Now everyone say at once: O-ba-ma! O-ba-ma! O-ba-ma!

    Posted on 20 Jan 2009


    Mono's New Code Generation Engine

    by Miguel de Icaza

    Three years ago, in November of 2005 we started a project to upgrade Mono's code generation engine as the engine started to age and it became increasingly difficult to improve code generation and extend the JIT engine in meaningful ways.

    The new code generation engine is based on a linear intermediate representation as opposed to the tree-based intermediate representation that we had used up to Mono 2.0.

    Switching the code generation engine is a pretty significant effort and we did not want to switch it shortly before we had to ship Mono 2.0, so we decided to ship 2.0 with the engine that had been in wide use.

    Shortly after we branched Mono's tree for the 2.0 release Zoltan merged his work from the linear branch into the main tree.

    We have now shipped all of this as part of Mono 2.2, you can get it here.

    Some Benchmarks

    Mono's new engine generates much better code than the version found in Mono 2.0.

    Speed: The engine will mostly benefit computationally intensive code, usually between 10% and 30% performance increase, with some cases going up as high as being 50% faster.

    Code size: the new engine generates slimmer code, typically 12% to 20% smaller code generated.

    Check out some of the benchmark results.

    Debugging the Transition

    Although we had our test suite, and we regularly tested the code against most apps, we were still afraid that something might go wrong. The new code could miss-compile something, and it would be hard in a large project to pin point exactly what went wrong.

    For example, the problem might not appear while compiling a small test program like `hello world', but could appear when running a web site under heavy load or when running MonoDevelop.

    Zoltan came up with a very interesting solution: for a period of time Mono had two JIT engines built into it, the new and the old one. Here is where the clever trick comes in: an environment variable contained the number of methods that should be compiled with the new JIT engine. After the Nth method had been compiled, the engine would switch code generators.

    This was used to bisect regressions and failures.

    A couple of months after we had done the switch and both our unit tests and our system tests passed the old JIT engine was eliminated from Mono.

    SIMD

    Using SIMD for accelerating certain floating point operations had been in the back of our minds for a while. We looked into implementing that in our old engine, but that turned out to be very difficult.

    With the new engine, Rodrigo was able to put together a prototype in a weekend (the legend goes that Rodrigo's wife was busy that weekend).

    This prototype was later turned into Mono.SIMD an API for accelerating vector operations.

    Mono 2.2 is the first release to officially support and distribute it. To learn more about Mono.SIMD support, you can see this blog entry.

    Full Generics Sharing

    With this release, the generics code sharing engine has been completely debugged and is now enabled not only for code that lives in mscorlib, but for all generics code written by the user.

    The Technical Details

    We have provided A complete description of Mono's new engine design and the the various code generation stages.

    Posted on 20 Jan 2009


    More Mono-based games on the iPhone

    by Miguel de Icaza

    Update: as of September there are at least 258 games on the AppStore build with Unity3D according to this interview. And 5 out of the Top100 applications are Unity based.

    Randy Edmonds pointed out in my previous post that FlashBang Studios's RaptorCopter is not the first or the only Unity3D/Mono-based game on the Apple AppStore.

    I counted almost 40 apps on the AppStore based on Mono, from the thread here.

    These are a few other games available today from the AppStore that are powered by Mono:

    • Downhill Bowling (5 stars), (screenshots and video).
    • Billiards.
    • SpacePig.
    • Age of Curling.
    • Dusktreaders.
    • X-Razer.
    • Tapball (video).
    • InvinciBall (video).
    • SlidePop.
    • FuguMaze.
    • Monkey Diving (video).
    • Ball-X (with the dash in the middle, or you wont find it).
    • FuguTilt.
    • Pizza Dash (you deliver pizzas in a car).
    • Debris (you do controlled demolitions).
    • Trash it!
    • Rotunda.
    • Asteroid Strike.
    • Crazy Snowboard (and 2.0).
    • Bubble Bang (video).
    • iStronaut Willy.
    • Bounce Pop.
    • Labyrinth 3D.
    • FuguBall.
    • SpaceRace (video).
    • iDrone.
    • Mars Explorer.

    Word games:

    • Christmas spell.
    • Alpha Blocks: Brain Freeze.

    Not really games, but cool hacks:

    • Moobox 3D, cute!
    • Widget Monkey.
    • Butterflies.
    • Dice 3D.
    • Night Divine.
    • Rainbow Day.
    • Zen of Snow and Zen of Snow 2.
    • Jingle Bells.
    • ArtiFISHal Life (3D Aquarium).
    • Leaves.
    • iFeathers.
    • Bobblehead Santa.

    Update:

    • Cricket (from SpinFast).
    • Rock'em Blocks (video).
    • Pelagic Tones.

    Posted on 07 Jan 2009


    First Mono-based Wii Game on the Shelves

    by Miguel de Icaza

    Christian Lassmann from Weltenbauer Software Entwicklung GmbH, who I had the pleasure of meeting at the Unite Conference in Denmark in October, just wrote to tell me that "My Animal Center", a game built with Unity3D's Wii Edition and Mono hit the shelves on December 20th in Germany.

    The game uses C# extensively. It was a joy to hear Christian explain how the various effects were created, I wish he blogged about it.

    Cute trailer (text is in German):

    The game is coming to a Wii near you in the US soon.

    Posted on 06 Jan 2009


    First Mono-game hits the Apple AppStore

    by Miguel de Icaza

    Blurst's Raptor Copter game built using Unity3D and Mono just hit the Apple AppStore.

    From the announcement:

    Raptor Copter has become our first Unity-made iPhone game to hit the App Store! We’re making it available for a limited-time price of $0.99. The game is a loose follow-up to Off-Road Velociraptor Safari. Instead of a jeep, you have a Chinook helicopter, but the basic game loop is the same: Capture raptors, drop them into factories, and teleport their sweet meats to the future.

    You can get it for your iPod Touch or iPhone from this Raptor Copter iTunes Link.

    Cute video:

    Unity3D is using Mono's full static compilation to allow the game to run JIT-less and interpreter-less on the iPhone.

    Posted on 06 Jan 2009


    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 2009


    Mono Goes to Android

    by Miguel de Icaza

    Koushik Dutta got Mono running on the Android-based G1 phone.

    He posted a video of the phone compiling "Hello World" (he points out that it is slower due to Mono running from the SD card):

    He also posted some performance and memory usage comparisons between Dalvik, Mono and Java/ARM. Short story: Mono does great!

    There are some caveats on running Mono on the G1, see the comments on this post. Still, these are encouraging news.

    Posted on 05 Jan 2009


    F-Spot Extensions

    by Miguel de Icaza

    Today I upgraded my F-Spot, I had not upgraded it since before the PDC.

    It is now has a Picassa-like toolbar on the left:

    And third-party extensions are starting to come out:

    Posted on 19 Dec 2008


    Mono brings Plastic's Windows.Forms UI to Linux and MacOS

    by Miguel de Icaza

    Pablo has sent me these two screencasts of their Plastic SCM product running on Linux and MacOS using Mono 2.0's Windows.Forms support:


    Plastic on Linux, the GUI toolkit is Windows.Forms with custom widgets and a nice color scheme.

    Plastic has a nice graphical diff tool:


    A preview of Plastic on MacOS X.


    Cute graphs

    More screenshots here.

    Plastic is one of the finalists for this year's Jolt Awards.

    Posted on 18 Dec 2008


    Evolution wish-list: IMAP server built into the client

    by Miguel de Icaza

    For a while I wanted to be able to get programmatic access to my email store in Evolution, just like it is possible to have programmatic access to the contacts and calendar through the Evolution Data Server.

    The advantages of using IMAP as the protocol to talk to Evolution are simple: I can use any existing IMAP client library, or any other IMAP client to connect to my Evolution store. The protocol is well known, documented and the large ecosystem of IMAP clients makes it a natural feature.

    There is also an application that I have in mind for it. I keep all of my email in Evolution, I download all of my email into my local hard disk so I can have all my information with me even when I am disconnected from the net. This means I can always check patches, review comments, discussions even when I am disconnected or with poor network connectivity.

    But when I go on vacation, I do not want to bring my laptop or Evolution with me. Instead I end up using internet cafes to read my gmail and all of the other email addresses end up in Novell's server. Novell provides a convenient Web UI that I can use to read my email.

    But the problem is that I end up reading emails twice: once in the road with the web UIs, and another time when I get back home and import all my email into Evolution.

    By having Evolution expose an IMAP interface, I could use any IMAP client on the road, or ssh into my box and use mutt to read from the same email store that Evolution is keeping track of.

    Posted on 17 Dec 2008


    Visiting Microsoft

    by Miguel de Icaza

    Joseph, Chris and myself are visiting Microsoft this week to learn more about Silverlight 3.0

    If you are in town and have some time to meet to discuss open source, Mono, .NET, the CLI, the DLR or and whatever else you think we might have a fun conversation about, please drop me an email.

    Posted on 09 Dec 2008


    Moonlight goes 3D

    by Miguel de Icaza

    Argiris Kirtzidi (one of the developers behind Managed OGRE) modified Moonlight to run inside the Ogre3D engine. You can render Moonlight applications or XAML files inside Ogre3D.


    The Moonlight Calculator Example.

    Your standard XAML tiger.

    We are merging his patches to make it simpler for Moonlight to be compiled by Windows users.

    Update:For more details about how this was done, and how he modified Cairo to be hardware accelerated check Argiris's post.

    Posted on 08 Dec 2008


    Moonlight's Media Stack

    by Miguel de Icaza

    As part of the Moonlight Beta release, I wanted to devote a few blog posts to exploring the features in Moonlight and how we implemented those Silverlight features in Moonlight.

    Before I get started on today's topic, we would like to get some feedback from our users to find out which platforms they would like us to support with packages and media codecs. Please fill out our completely platform and media codec survey.

    Moonlight 1.0 is an implementation of the Silverlight 1.0 API. It is an entirely self-contained plugin written in C++ and does not really provide any built-in scripting capabilities. All the scripting of an embedded Silverlight component is driven by the browser's Javascript engine. This changes with the 2.0 implementation, but that is a topic of a future post.

    The Silverlight/Moonlight Developer View.

    One of the most important features of the Silverlight/Moonlight web plugin is to support audio and video playback.

    Silverlight takes an interesting approach to video and audio playback. In Silverlight the video can be treated like any other visual component (like rectangles, lines) this means that you can apply a number of affine transformations to the video (flip, rotate, scale, skew), have the video be composed with other elements, add a transparency layer to it or add a clipping path to it.

    This is the simplest incarnation of a video player in XAML:

    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
        <MediaElement x:Name="ExampleVideo"
    		  Source="TDS.wmv"
    		  Width="320" Height="240"
    		  AutoPlay="true"/>
    </Canvas>
    	

    The result looks like this when invoked with when embedded in a web page (or when using the mopen1 command that I am using to take the screenshots):

    The MediaElement has a RenderTransform property that we can use to apply a transformation to it, in this case, we are going to skew the video by 45 degrees:

    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    	<MediaElement x:Name="ExampleVideo" AutoPlay="true" Source="TDS.wmv" Width="320" Height="240">
    	   <MediaElement.RenderTransform>
    	     <SkewTransform CenterX="0" CenterY="0" AngleX="45" AngleY="0" />
    	   </MediaElement.RenderTransform>
    	</MediaElement>
    </Canvas>
    	

    The result looks like this:

    But in addition to the above samples, MediaElements can be used as brushes to either fill or stroke other objects.

    This means that you can "paint" text with video, or use the same video source to render the information in multiple places on the screen at the same time. You do this by referencing the MediaElement by name as a brush when you paint your text.

    This shows how we can fill an ellipse with the video brush:

    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    	<MediaElement x:Name="ExampleVideo" AutoPlay="true" Opacity="0.0" Source="TDS.wmv" Width="320" Height="240"/>
    
    	<Ellipse Width="320" Height="240" >
    	   <Ellipse.Fill>
     	      <VideoBrush SourceName="ExampleVideo"/>
    	   </Ellipse.Fill>
    	</Ellipse>
    </Canvas>
    

    This looks like this:

    You can also set the stroke for an ellipse. In the following example we use one video for the stroke, and one video for the fill. I set the stroke width to be 30 to make the video more obvious.

    <Canvas xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    	<MediaElement x:Name="ExampleVideo" AutoPlay="true" Opacity="0.0" Source="TDS.wmv" Width="320" Height="240"/>
    	<MediaElement x:Name="launch" AutoPlay="true" Opacity="0.0" Source="launch.wmv" Width="320" Height="240"/>
    
    	<Ellipse Width="320" Height="240" StrokeThickness="30">
    	   <Ellipse.Fill>
     	      <VideoBrush SourceName="ExampleVideo"/>
    	   </Ellipse.Fill>
    	   <Ellipse.Stroke>
     	      <VideoBrush SourceName="launch"/>
    	   </Ellipse.Stroke>
    	</Ellipse>
    </Canvas>
    	

    Notice that in the examples above I have been using AutoPlay="true". Silverlight provides fine control over how the media is played as well as a number of events that you can listen to from Javascript for various events (for example, you get events for buffering, for the media being opened, closed, paused, or when you hit a "marker" on your video stream).

    Streaming, Seeking and Playback

    Depending on the source that you provide in the MediaElement, Moonlight will determine the way the video will be played back.

    The simplest way of hosting a video or audio file is to place the audio or video file in a web server, and then have Moonlight fetch the file by specifying the Source attribute in the MediaElement. You do not need anything else to start serving videos.

    Seeking on the standard Web server scenario: When the programmer requests the media to be played (either by calling the Play method on the MediaElement, or because the MediaElement has AutoPlay set to true) Moonlight will start buffering and play the video back.

    If the user wants to seek backwards, or forward, Moonlight will automatically take care of this. In the case where the user fast-forwards to a place in the file that has yet to be downloaded, playback will pause until then.

    Seeking with an enhanced media server: If your server implements the Windows Media Streaming HTTP extension if the user seeks to a point in the file beyond the data that has been downloaded, it will send a special message to the server to seek. The server will start sending video from the new position. The user will get the playback started immediately without having to wait. The details of the protocol are documented in the MS-WMSP specification. This is enabled by using the "mms://" prefix for your media files instead of using the "http://" prefix.

    Notice that even if it says "mms", Silverlight and Moonlight do not actually speak to an MMS server, they merely replace that with "http" and speak http/streaming to the server.

    The extension is pretty simple, it is basically a "Pragma" header on the HTTP requests that contains the stream-time=POSITION value. Our client-side implementation is available here.

    You can use IIS, or use the mod_streaming to enhance the video experience for your end users.

    This basically means that you can stream videos on the cheap, all you need is a Linux box, two wires, and a 2HB pencil.

    Adaptive Streaming

    Another cool feature of the Adaptive Streaming support in Moonlight is that the server can detect the client throughput, and depending on the bandwidth available, it can send a high bitrate video, or a low bitrate video. This is a server side feature.

    This feature was demoed earlier this year at Mix 08:

    I am not aware of an adaptive streaming module for Apache.

    Supported Media Formats in Moonlight 1.0

    Although Moonlight 1.0 exposes the Silverlight 1.0, Moonlight 1.0 ships a 2.0 media stack (minus the DRM pieces). This means that Moonlight ships with support for the media codecs that are part of Silverlight 2.0 and supports adaptive streaming. This is what we are shipping:

    Video:

    • WMV1: Windows Media Video 7
    • WMV2: Windows Media Video 8
    • WMV3: Windows Media Video 9
    • WMVA: Windows Media Video Advanced Profile, non-VC-1
    • WMVC1: Windows Media Video Advanced Profile, VC-1

    Audio:

    • WMA 7: Windows Media Audio 7
    • WMA 8: Windows Media Audio 8
    • WMA 9: Windows Media Audio 9
    • WMA 10: Windows Media Audio 10
    • MP3: ISO/MPEG Layer-3
      • Input: ISO/MPEG Layer-3 data stream
      • Channel configurations: mono, stereo
      • Sampling frequencies: 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, and 48 kHz
      • Bit rates: 8-320 kbps, variable bit rate
      • Limitations: "free format mode" (see ISO/IEC 11172-3, sub clause 2.4.2.3) is not supported.

    We also support server-side playlists.

    For more information see the Silverlight Audio and Video Overview document on MSDN.

    Media Pipeline

    When we first prototyped Moonlight we used the ffmpeg media pipeline. A media pipeline looks like this:

    Charts by the taste-impaired.

    Originally ffmpeg handled everything for us: fetching media, demultiplexing it, decoding it and scaling it.

    Since we needed much more control over the entire pipeline, we had to write our own, one that was tightly integrated with Moonlight.

    Today if you download Moonlight's source code you can build it with either the ffmpeg codecs or you can let Moonlight fetch the binary Microsoft Media Pack and use Microsoft's codecs on Linux.

    Microsoft Media Pack

    The Microsoft Media Pack is a binary component that contains the same code that Microsoft is using on their Silverlight product.

    The Moonlight packages that we distribute do not actually have any media codecs built into them.

    The first time that Moonlight hits a page that contains media, it will ask you whether you want to install the Microsoft Media Pack which contains the codecs for all of the formats listed before.

    Today Microsoft offers the media codecs for Linux on x86 and Linux x86-64 platforms. We are looking for your feedback to find out for which other platforms we should ship binary codecs.

    Tests

    No animals were harmed in the development of the Moonlight Video Stack. To ensure that our pipeline supported all of the features that Microsoft's Silverlight implementation supports we used a number of video compliance test that Microsoft provided us with as part of the joint Microsoft-Novell collaboration.

    In addition to Microsoft's own tests, we created our own set of open source tests. All of these tests are available from the moon/test/media module. This includes the videos that are specially encoded with all the possible combinations and features used as well as XAML files and associated javascript.

    Posted on 02 Dec 2008


    Groupwise Calendar to Google Calendar Exporter

    by Miguel de Icaza

    I wrote a small tool that exports my Groupwise Calendar to Google Calendar.

    This tool only runs on Windows as it is using the Groupwise COM APIs to fetch the calendar data. I would love to have this work on Linux if someone knows how to get to these from Unix.

    You will need the Google Calendar assemblies (Google.GData.AccessControl, Google.GData.Calendar, Google.GData.Extenions) and the Groupwise Assemblies (GroupwiseTypeLibrary, GroupWiseCommander) and a text file that contains your passwords (called `passwords').

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    using Google.GData.Calendar;
    using Google.GData.Client;
    using Google.GData.Extensions;
    using Google.Accounts;
    using System.Threading;
    using System.IO;
    
    namespace CalendarExporter
    {
        class Program
        {
    	const string google_email = "[email protected]";
    	const string groupwise_login = "YOURNAME";
    	
            static void Main(string[] args)
            {
                var f = File.OpenRead("passwords");
                var reader = new StreamReader(f);
                var google_passowrd = reader.ReadLine();
                var groupwise_password = reader.ReadLine();
    
                new Thread(delegate() {
                    Thread.Sleep(1000 * 120);
                    Console.Error.WriteLine("Timing out");
                    Environment.Exit(1);
                }).Start();
    
                ClientLoginRequest login = new ClientLoginRequest();
                login.AccountType = "GOOGLE";
                login.Email = google_email;
                login.Password = google_password;
                login.Service = "cl";
                login.Source = "YOURNAMECo-CalendarPush-1";
    
                var token = login.Login();
    
                CalendarService cs = new CalendarService("YOURNAMECo-CalendarPush-1");
                cs.SetAuthenticationToken(token.Auth);
    
    
                CalendarQuery cq = new CalendarQuery();
                cq.Uri = new Uri("http://www.google.com/calendar/feeds/default/owncalendars/full");
                CalendarFeed resultFeed = cs.Query(cq);
                CalendarEntry gw_at_google = null;
                foreach (CalendarEntry entry in resultFeed.Entries) {
                    if (entry.Title.Text == "Groupwise Calendar") {
                        entry.Delete();
                        break;
                    }
                    
                }
                gw_at_google = new CalendarEntry();
                gw_at_google.Title.Text = "Groupwise Calendar";
                gw_at_google.Summary.Text = "This is the syncrhonized calendar at Novell's Groupwise server";
                gw_at_google.TimeZone = "America/New_York";
                gw_at_google.Hidden = false;
                gw_at_google.Color = "#2952a3";
                gw_at_google.Location = new Where("", "", "Boston");
                gw_at_google.Selected = true;
                Uri postUri = new Uri("http://www.google.com/calendar/feeds/default/owncalendars/full");
                CalendarEntry cal = (CalendarEntry)cs.Insert(postUri, gw_at_google);
    
                string calurl = cal.EditUri.Content;
                int p = calurl.LastIndexOf ('/');
                string code = calurl.Substring (p);
    
                
                Uri edit_uri = new Uri ("http://www.google.com/calendar/feeds" + code + "/private/full");
                GroupwareTypeLibrary.GWSession2Class gsc = null;
                try
                {
                    gsc = new GroupwareTypeLibrary.GWSession2Class();
                }
                catch
                {
                    Console.WriteLine("Did not regsvr the file c:\novell\groupwise\gwcma1.dll and is this program x86-only?");
                    return;
                }
                var account = gsc.Login(groupwise_login, "", groupwise_password, null, null);
                var path_to_host = account.PathToHost;
    
                //alendar calendar = new iCalendar();
    
                
                int count = 0, skipped =0;
                foreach (GroupwareTypeLibrary.Message m in account.Calendar.Messages)
                {
                    if (!m.ClassName.StartsWith ("GW.MESSAGE.APPOINTMENT"))
                        continue;
    
                    GroupwareTypeLibrary.Appointment2 app = (GroupwareTypeLibrary.Appointment2) m;
    
                    // Ignore appointments that are older than 15 days.
                    if (app.EndDate < DateTime.Now - TimeSpan.FromDays(7)) {
                        skipped++;
                        continue;
                    }
    
                    var ee = new EventEntry();
                    ee.Title.Text = app.Subject.PlainText;
                    ee.Content.Content = app.BodyText.PlainText;
                    ee.Locations.Add (new Where () { ValueString = app.Place });
                    ee.Times.Add(new When(app.StartDate, app.EndDate));
                    ee.EventVisibility = app.Private ?
                        EventEntry.Visibility.PRIVATE : EventEntry.Visibility.PUBLIC;
    
                    cs.Insert (edit_uri, ee);
                }
                
                Console.WriteLine("Done2");
                Environment.Exit(0);
            }
        }
    }
    	

    You will also need the Login.cs which is some sample code that I found on the tubes for doing Google Account authentication.

    Posted on 02 Dec 2008


    Moonlight 1.0 Beta 1

    by Miguel de Icaza

    We have released the first beta of Moonlight 1.0.

    This release supports the Microsoft Media Pack for playing back video and audio files. These are the same video and audio decoders that Microsoft uses in Silverlight 2.0.

    Check our Moonlight roadmap for details on upcoming versions.

    You can try some of the sites tests that we used to test Moonlight.

    Here are some Silverlight 1.0 materials:

    You can also read the Silvelright's XAML vocabulary description and its XAML Foundation Specification.

    Posted on 02 Dec 2008


    Mono on PowerPC 64

    by Miguel de Icaza

    As part of SUSE 11, Mono needs to run on the PowerPC in 64 bit mode. The effort was bootstrapped with some early work from Andreas Faerber.

    It was fun to watch Mark's daily commits progress of the port, the tests referenced here are the basic runtime tests that we use to check for regressions and to get a port up and running, it is a good roadmap for how a port comes to life:

    	* mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64
    	passes basic.exe now.
    
    	---
    
    	* cpu-ppc64.md: Fixed a few instruction lengths.
    
    	* mini-ppc64.c: Don't emit SETLRET.  Now PPC64 passes
    	basic-float.exe.
    
    	---
    
    
    	* decompose.c: Decompose carry and overflow add on PPC64 like
    	on other 64 bit archs.  Don't decompose sub at all on PPC64.
    
    	* mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c,
    	cpu-ppc64.md: 	Several fixes and new opcodes.  Now PPC64 runs (but doesn't
    	pass) basic-long.exe.
    
    	---
    	
    	* ppc/ppc-codegen.h: Use ppc_load_reg instead of ppc_ld in
    	ppc_load_func to fix the 2 bit shift.
    
    	---
    
    	* mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.
    	Now PPC64 passes basic-long.exe.
    
    	---
    
    	* ppc/ppc-codegen.h: Make ppc_is_[u]imm16() work with 64 bit
    	values.
    
    	---
    
    	* mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved
    	floating point regs.  Now PPC64 passes basic-calls.exe.
    
    	---
    
    	* mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c,
    	tramp-ppc64.c, cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
    
    	---
    
    	* mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
    	arrays.exe and basic-math.exe.
    
    	---
    
    	* mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c,
    	cpu-ppc64.md: Several fixes.  PPC64 now runs exceptions.exe and
    	devirtualization.exe.
    
    	---
    
    	* mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
    
    	---
    
    	* mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic
    	code sharing.  PPC64 now passes generics.exe.
    
    	---
    
    	* basic-long.cs: New test case.
    
    	---
    
    	* mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md:
    	Several	fixes.  PPC64 now passes most of the runtime regressions.
    	
    	

    Followed by today's tweet:

    The bootstrap means that the Mono JIT is actually doing a full build of Mono's compilers and class libraries and can be built on the target platform.

    Update: Mark has posted a great picture of Jim Purbrick from Second Life, the man behind Mono running on Second Life.

    Posted on 25 Nov 2008


    Unity on Linux, First Screenshots

    by Miguel de Icaza

    The first Unity3D on Linux screenshot:

    The above program was built on MacOS, the result copied to Linux and then executed using the LinuxPlayer. This is still very basic, the port is yet far from done.

    I followed Joachim's advise and added a tiny script to update the cube on the screen. See the video of the cubes in action: ogg and wmv.

    Posted on 14 Nov 2008


    Framework Design Guidelines, 2nd Edition

    by Miguel de Icaza

    A couple of years ago I wrote an enthusiastic review of Brad Abrams and Krzysztof Cwalina's Framework Design Guidelines, a book that I absolutely love.

    The book is a great compendium of best-practices for building software, traps and pitfalls to avoid.

    But most importantly, it is the best source to learn the idioms and patterns used in the .NET Frameworks. Learning these idioms will have you writing code like the native C# speakers in no time.

    I was incredibly honored when Brad asked me earlier this year to write the foreword for the second edition of the Framework Design Guidelines.

    The second edition tracks the evolution of .NET and they apply as well to Mono. For instance, it now contains LINQ design patterns, extension methods patterns and DependencyProperties (used in WPF and Silverlight).

    Posted on 13 Nov 2008


    Silverlight Toolkit, now MS-PL

    by Miguel de Icaza

    Update: Fixed some links, corrected some text.

    Shawn Burke announced the Silverlight Toolkit and it is licensed under the open source MS-PL. The code is available here complete with unit tests (check Ning's blog on the unit testing framework).

    With the Silverlight Toolkit they are taking a new approach to shipping new controls in an effort to move swiftly and deliver the controls to people at the right time. Their previous approach was to ship the Toolkit when every component was ready, and completely fleshed out.

    Now they will be shipping the Toolkit with controls that might have different levels of quality (and they are clearly flagged in the documentation). Shawn explains the new "Quality Bands" model that they are using in his post.

    You can try the components on the web. The charting control can be tried out with the ChartBuilder (check David's blog for details on the ChartBuilder):

    The source code for the Toolkit and the Controls is great to learn how to use Silverlight and it is great for people that need to tweak them for their own applications. When it comes to these controls, you no longer need Microsoft to make small changes for you or the small bug fixes that impact your application.

    Themes: An interesting control container in Silverlight is the theming control. You wrap your code around this, and it will let you skin your control with XAML and define the animations and interactions with XAML and the Visual State Manager:

    Some of these themes reminded me of the Gtk+ themes from 1998. Back in the days of Enlightenment and the "Cheese Pixmap" theme were hot. Mehdi explains how the themes work and Jafar explains the ImplicitStyleManager, the foundation for themes.

    Shawn's Talk

    Shawn's talk at the PDC was very interesting. I did not get to see it during the conference, but I watched it in the comfort of home (wmv, mp4 and slide deck).

    Posted on 10 Nov 2008


    Moonlight Updates

    by Miguel de Icaza

    Last week we branched Moonlight for the 1.0 release, full with the licensed Microsoft Codecs and started our release process for Moonlight Beta 1 to be available in the next few days. This release is not yet published on our web site, watch this space.

    The Moonlight engine team has now resumed our work on Moonlight 2.0, the version that will track Silverlight 2.0.

    In the meantime, while the GUI team was busy completing 1.0, the Mono core team has been working on the security framework for Moonlight, the networking stack (Silverlight allows Socket connections using policy files) and web services (System.ServiceModel, a subset of WCF).

    The security system is the trickier and is the one that has received the most attention. We started early on last year in to implementing this, as we knew it would end up burning a lot of cycles to get it right.

    Our hero has posted the initial work partition for the upcoming GUI work on Moonlight 2.0.

    Moonlight is a blast, and who knows, maybe with our static compilation engine we might be able to deliver Silverlight on the iPhone.

    Posted on 10 Nov 2008


    Change.Gov

    by Miguel de Icaza

    I wanted to thank everyone that helped get Barack Obama elected. Those that endorsed Obama passionately, those that videocasted, blogged, improved Obama's web site, donated to his campaign, wrote, discussed and voted on Tuesday to get him elected.

    Barack does not only represent a change of direction for public policy, he is a truly brilliant candidate.

    Some cool links on Barack:

    I was surprised that the Obama campaign already launched their Change.Gov (thanks Nat) web site. You can now see how the team operates in real life, and you can share your story and you can share your vision of where America should go. The blog is here.

    The above starts to deliver on the promise he had made during the campaign.

    Got a cool collection of pictures about Obama or the reaction to the results? Please post it in the comments.

    Inflamatory or misinformed comments will be deleted pronto.

    Posted on 06 Nov 2008


    Static Compilation in Mono

    by Miguel de Icaza

    Another nice piece of technology that we showed at the PDC was static compilation, the feature behind allowing Mono to run on the iPhone in a fully legit way (no jail-breaking):

    Screenshot from the Unity IDE.

    Although Mono has supported batch compilation from CIL into native code in the past there was a small amount of code that was still generated dynamically. The intention originally was to help reduce startup and increase code sharing across multiple processes.

    Code sharing is important once you have a handful of Mono processes running on the system. Instead of having to JIT the same code once per Mono instance for say "System.Console.WriteLine", the code laid out in essentially a shared object.

    Our generated code uses many of the concepts found on the ELF file format to ensure that we can share code and that the code pages are read-only and not written to. This means that methods are invoked through a program linkage table instead of directly (to cope with the shared libraries being loaded at different addresses).

    The Extra Mile

    Although we are not certified XBox360 developers yet (we have yet to find the right person at Microsoft to talk to) we know from some of our users that have ported Mono to the XBox360 that JITing is not an option on that platform.

    The XBox360 seems to have the same security-imposed limitations that the iPhone has, it is not possible for a Just-in-Time compiler to run in the platform as either the license terms or the kernel do not allow writable pages to become executable pages.

    During the last few months we developed a static compilation mode for Mono. First we did this for the 1.0 profile, and now we are working on the 2.0 profile (so that we can support static compilation of generics). The work to support the 2.0 profile is reusing Mark's work on generic code sharing, which I found out to be a very nice synergy of efforts internally.

    This means that it is now possible compile code from CIL to native code and not even ship the JIT compiler in your final program (saving some precious kilobytes from the final executable).

    To do this, you must:

    • Use Mono 2.0.1 at least.
    • Request that Mono performs a full AOT compilation by using: mono --aot=full program.exe. That will generate your static executable. This executable still needs the runtime for things like garbage collection, threading and other runtime services.
    • You then run your executable with Mono: mono --full-aot program.exe
    • Optionally: build a new Mono on a separate location that removes the JIT engine by configuring Mono like this: configure --enable-minimal=jit. This will reduce your deployment by a few hundred Ks as the code generation and JIT engines are stripped out.
    • Optionally: build a smaller set of libraries by using the Mono Linker (this is the tool that we use for turning Mono's 3.5 APIs into the Silverlight 2.0 APIs).
    • Optionally: strip out the CIL code from the assemblies. We still require the assemblies for their rich metadata, but the actual CIL instructions can be safely removed. The new cil-strip tool built on top of Mono.Cecil can further shrink your deployed executables.

    Developers interested in trimming down Mono can look into our documentation for more features that can be removed by using the --enable-minimal option.

    Of course, once you remove the JIT you will not be able to use any dynamically generated code. This means no Reflection.Emit dynamically and at least for the time being or no IronPython/IronRuby.

    John Lam told me at the PDC that they are looking into bringing static compilation for IronPython/IronRuby/DLR back, so this might just be a short-lived limitation.

    For those interested in using Mono on the iPhone today the situation is a bit painful right now. You must run Mono on the target system to do the batch compilation and send the data back to assembly it on the host before you send the code back to the iPhone to run.

    If you are wondering how did the demo go so smoothly at the PDC, the reason is that I was using Unity. Unity modified their local copy of Mono to be hardwired to do cross compilation to that exact platform. A more general purpose solution is needed to allow arbitrary platform-to-platform cross compilation, and we hope that this will be available in the future.

    If you must quench your thirst for C# on the iPhone today your best choice is to use Unity's product and start building games instead of the enterprise application you always dreamed of.

    From the Unity's Video Sample

    If your boss demands that line of application running on the iPhone, you have a perfect excuse to learn the Unity gaming APIs and deliver the most glorious multi-touch, 3D-transformed line of business application to ever grace this world full with spinning AI for your "Sort By Customer Last Name" button.

    Posted on 05 Nov 2008


    C# 4.0: var, object and dynamic

    by Miguel de Icaza

    Anders presentation on C# 4 was as usual great to listen to. He continues to evolve the language with solid steps, and the presentation was quite fun.

    You can watch his presentation or just read the slide deck.

    With C# 4 the new "dynamic" keyword has been introduced to flag a variable as a dynamic variable.

    This is slightly different than var and object, the differences are as follows:

    • "object x" is a shorthand for "System.Object x". This declares the variable x to have the type System.Object, this is strongly typed. And since C# provides autoboxing, you can assign anything you want to this variable.
    • "var x = E" declares a variable x to be of the type of the expression E. The E is required, not optional. This is a strongly typed declaration, and you can only assign values whose type is typeof(E) to it.
    • "dynamic x" declares the variable x to have dynamic semantics. This means that the C# compiler will generate code that will allow dynamic invocations on x. The actual meaning of "x.M" is deferred until runtime and will depend on the semantics of the IDynamicObject implementation.

    Posted on 03 Nov 2008


    Mono's SIMD Support: Making Mono safe for Gaming

    by Miguel de Icaza

    This week at the Microsoft PDC we introduced a new feature in the Mono virtual machine that we have been working on quietly and will appear in our upcoming Mono 2.2 release (due in early December).

    I believe we are the first VM for managed code that provides an object-oriented API to the underlying CPU SIMD instructions.

    In short, this means that developers will be able to use the types in the Mono.Simd library and have those mapped directly to efficient vector operations on the hardware that supports it.

    With Mono.Simd, the core of a vector operations like updating the coordinates on an existing vector like the following example will go from 40-60 CPU instructions into 4 or so SSE instructions.

    Vector4f Move (Vector4f [] pos, ref Vector4f delta)
    {
    	for (int i = 0; i < pos.Length; i++)
    		pos [i] += delta;
    }
    	

    Which in C# turns out to be a call into the method Vector4f.operator + (Vector4f a, Vector4f b) that is implemented like this:

    Vector4f static operator + (Vector3f a, Vector3f b)
    {
    	return new Vector4f (a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
    }
    	

    The core of the operation is inlined in the `Move' method and it looks like this:

    movups (%eax),%xmm0
    movups (%edi),%xmm1
    addps  %xmm1,%xmm0
    movups %xmm0,(%eax)
    	

    You can see the details on the slides that I used at the PDC and look at the changes in the generated assembly, they are very large.

    Ideally, once we tune the API based on our user feedback and contributions, it should be brought to ECMA for standardization. Hopefully we can get Microsoft to implement the SIMD support as well so all .NET developers have access to this.

    Making Managed Code Viable for Gaming

    Many developers have to resort to C++ or assembly language because managed languages did not provide the performance they needed. We believe that we can bring the productivity gains of managed languages to developers that seek high performance applications:

    But even if you want to keep using your hand-tuned C++ game engine, the SIMD extensions will improve the performance of your scripting code. You can accelerate your ray casting operations by doing all the work in the managed world instead of paying for a costly managed to unmanaged transition and back.

    You can avoid moving plenty of code from C# into C++ with this new functionality.

    Some SIMD Background

    Most modern CPUs contain special instructions that are able to perform arithmetic operations on multiple values at once. For example it is possible to add two 4-float vectors in one pass, or perform these arithmetic operations on 16-bytes at a time.

    These are usually referred to as SIMD instructions and started showing up a few years ago in CPUs. On x86-class machines these new instructions were part of MMX, 3DNow or the SSEx extensions, on PowerPC these are called Altivec.

    CPU manufacturers have been evolving the extensions, and newer versions always include more functionality and expand on the previous generations.

    On x86 processors these instructions use a new register bank (the XMM registers) and can be configured to work on 16 bytes at a time using a number of possible combinations:

    • byte-level operations on 16 elements.
    • short-level operations on 8 elements.
    • single precision or integer-level operations on 4 elements.
    • double precision or long-integer operations on 2 elements.

    The byte level operations are useful for example when doing image composition, scaling or format conversions. The floating point operations are useful for 3D math or physics simulations (useful for example when building video games).

    Typically developers write the code in assembly language to take advantage of this feature, or they use compiler-specific intrinsic operations that map to these underlying instructions.

    The Idea

    Unlike native code generated by a compiler, Common Intermediate Language (CIL) or Java class files contain enough semantic information from the original language that it is very easy to build tools to compute code metrics (with tools like NDepend), find bugs in the code (with tools like Gendarme or FxCop, recreate the original program flow-analysis with libraries like Cecil.FlowAnalysis or even decompile the code and get back something relatively close to the original source code.

    With this rich information, virtual machines can tune code when it is just-in-time compiled on a target system by tuning the code to best run on a particular system or recompiling the code on demand.

    We had proposed in the past mechanisms to improve code performance of specific code patterns or languages like Lisp by creating special helper classes that are intimately linked with the runtime.

    As Mono continues to be used as a high-performance scripting engine for games we were wondering how we could better serve our gaming users.

    During the Game Developer Conference early this year, we had a chance to meet with Realtime Worlds which is using the Mono as their foundation for their new work and we wanted to understand how we could help them be more effective.

    One of the issues that came up was the performance of Vector operations and how this could be optimized. We discussed with them the possibility of providing an object-oriented API that would map directly to the SIMD hardware available on modern computers. Realtime Worlds shared with us their needs in this space, and we promised that we would look into this.

    The Development

    Our initial discussion with Realtime Worlds was in May, and at the time we were working both towards Mono 2.0 and also on a new code generation engine that would improve Mono's performance.

    The JIT engine that shipped with Mono 2.0 was not a great place to start adding SIMD support, so we decided to postpone this work until we switched Mono to the Linear IL engine.

    Rodrigo started work on a proof-of-concept implementation for SIMD and after a weekend he managed to get the basics in place and got a simple demo working.

    Beyond the proof of concept, there was a lingering question: were the benefits of Vector operations going to be noticeably faster than the regular code? We were afraid that the register spill/reload would eclipse the benefits of using the SIMD instructions or that our assumptions had been wrong.

    Over the next few weeks the rest of the team worked with Rodrigo to turn the prototype into something that could be both integrated into Mono and would execute efficiently (Zoltan, Paolo and Mark).

    For example, with Mono 2.2 we will now align the stack conveniently to a 16-byte boundary to improve performance for stack-allocated Mono.SIMD structures.

    So far the reception from developers building games has been very positive.

    Although today we only support x86 up to SSE3 and some SSE4, we will be expanding both the API and the reach of of our SIMD mapping based on our users feedback. For example, on other architectures we will map the operations to their own SIMD instructions.

    The API

    The API lives in the Mono.Simd assembly and is available today from our SVN Repository (browse the API or get a tarball). You can also check our Mono.Simd documentation.

    This assembly can be used in Mono or .NET and contains the following hardware accelerated types (as of today):

    Mono.Simd.Vector16b  - 16 unsigned bytes
    Mono.Simd.Vector16sb - 16 signed bytes
    Mono.Simd.Vector2d   - 2 doubles
    Mono.Simd.Vector2l   - 2 signed 64-bit longs
    Mono.Simd.Vector2ul  - 2 unsigned 64-bit longs
    Mono.Simd.Vector4f   - 4 floats
    Mono.Simd.Vector4i   - 4 signed 32-bit ints
    Mono.Simd.Vector4ui  - 4 unsigned 32-bit ints
    Mono.Simd.Vector8s   - 8 signed 16-bit shorts
    Mono.Simd.Vector8us  - 8 unsigned 16-bit shorts
    	

    The above are structs that occupy 16 bytes each, very similar to equivalent types found on libraries like OpenTK.

    Our library provides C# fallbacks for all of the accelerated instructions. This means that if your code runs on a machine that does not provide any SIMD support, or one of the operations that you are using is not supported in your machine, the code will continue to work correctly.

    This also means that you can use the Mono.Simd API with Microsoft's .NET on Windows to prototype and develop your code, and then run it at full speed using Mono.

    With every new generation of SIMD instructions, new features are supported. To provide a seamless experience, you can always use the same API and Mono will automatically fallback to software implementations if the target processor does not support the instructions.

    For the sake of documentation and to allow developers to detect at runtime if a particular method is hardware accelerated developers can use the Mono.Simd.SimdRuntime.IsMethodAccelerated method or look at the [Acceleration] atribute on the methods to identify if a specific method is hardware accelerated.

    The Speed Tests

    When we were measuring the performance improvement of the SIMD extensions we wrote our own home-grown tests and they showed some nice improvements. But I wanted to implement a real game workload and compare it to the non-accelerated case.

    I picked a C++ implementation and did a straight-forward port to Mono.Simd without optimizing anything to compare Simd vs Simd. The result was surprising, as it was even faster than the C++ version:

    Based on the C++ code from F# for Game Development

    The source code for the above tests is available here.

    I use the C++ version just because it peeked my curiosity. If you use compiler-specific features in C++ to use SIMD instructions you will likely improve the C++ performance (please post the updated version and numbers if you do).

    I would love to see whether Johann Deneux from the F# for Game Development Blog could evaluate the performance of Mono.Simd in his scenarios.

    If you are curious and want to look at the assembly code generated with or without the SIMD optimizations, you want to call Mono's runtime with the -v -v flags (yes, twice) and use -O=simd and -O=-simd to enable or disable it.

    Presentation

    You can watch the presentation to get some color into the above discussion or check it in the Silverlight player, Get it as PDF, or PPTX.

    Posted on 03 Nov 2008


    Interactive GUI Shell

    by Miguel de Icaza

    This week at the Microsoft PDC I showed gsharp, our GUI repl for the C# 3.0 language, a tool that I had previously talked about.

    Before the PDC we copied an idea from Owen's great reinteract shell where we provide our REPL with a mechanism to turn objects into Gtk.Widgets which we then insert.

    Out of the box we support System.Drawing.Bitmap images, we turn those into Gtk Widgets that then we render:

    I also added a toy Plot command that can take a number of lambdas that return floats to do some cute plots. The plots are just rendered into a System.Drawing.Bitmap so they get painted on the screen automatically:

    But you can add your own handlers for any data types you want, all you have to do is call RegisterTransformHandler with a function that can return a Gtk.Widget based on an input object, or null if it does not know how to render it.

    The implementation to render images is very simple, this is the implementation:

    using System;
    
    public class MyRenderHelpers {
    	public static object RenderBitmaps (object o)
    	{
    		System.Drawing.Bitmap bitmap = o as System.Drawing.Bitmap;
    		if (bitmap == null)
    			return null;
    
    		return new BitmapWidget (bitmap);
    	}
    }
    	

    You can put your own library of helper methods in a compiled assembly in ~/.config/gsharp, and then register all of your types from a file ending with the extension .cs in ~/.config/gsharp:

    RegisterTransformHandler (MyRenderHelpers.RenderBitmaps);
    	

    And you are done.

    The above could be used for example to create all kinds of information visualizers for the GUI REPL. I would love to see a LINQ query navigator, similar to the one in LinqPad.

    Update: A one line change that brings gsharp into the new millenium by rendering `true' and `false' with icons instead of text:

    Posted on 02 Nov 2008


    Mono and .NET talk at PDC video.

    by Miguel de Icaza

    The PDC 2008 was a blast. It was a privilege to be able to present Mono to all of these developers.

    Joseph Hill helped me prepare my presentation for the PDC. Our goal was to explore how Mono could help .NET developers, but we did not want to go down a laundry list of features, or a list of APIs, or rehash what the advanced audience at the PDC already knew.

    player, pdf, pptx

    The idea was to pick a couple of interesting innovations from Mono and try stitch a story together. I discussed our embeddable C# compiler (which we need to start calling "Compiler Service"), some applications of Mono in gaming, our recent SIMD extensions and using Mono on the iPhone.

    As for me, I am catching up on all the sessions I missed this weekend. All of the videos and slide decks are available for free from the Microsoft PDC site, and republished in Channel9.

    In the next few days I will blog in more detail about each topic.

    Posted on 02 Nov 2008


    In LA for the Microsoft PDC

    by Miguel de Icaza

    After a great week in Copenhagen with the Unity community I spent 14 hours on a high-tech tin can flying to LA for the Microsoft PDC conference.

    Mono Talk

    I am doing a talk on Wednesday at 4:45 in room 515B.

    Unlike previous talks that I have done about Mono, this is an advanced talk and will skip over all the generalities and go straight to Mono CLI/C# features and innovations.

    I decided against talking about Moonlight or APIs, as information about can be better learned elsewhere.

    Speculation

    There has been enough leaked information that we know some bits about C# 4. Some guess it includes dynamic support, other that it will be more F#-like and add immutability, others that it will introduce some Alef-like threading capabilities.

    Then there is talk about .NET 4, and I just have no clue what they will announce.

    So what do you think they are announcing this week?

    Speculate away in the comments.

    Posted on 25 Oct 2008


    Live Blogging from Unite

    by Miguel de Icaza

    I am live blogging from Unite, the Unity3D conference, one of the most fun users of Mono.

    Announcements

    Next UnityEditor will run on Windows, and its rewritten in C# (it originated on MacOS, and is now moving to Windows).

    Unity as of today ships for building games on the iPhone. These are fully legit binaries, no need to crack your iPhone, they are using Mono's batch compilation to generate static binaries with no JITing involved (per Apple licensing requirements).

    Side Note

    Since I am a Linuxista, you might be wondering why I am so excited about Unity. Of course I am excited because they use Mono, but I am also excited because Novell is working with Unity to bring this to Linux:

    erandi$ uname -a
    Linux erandi 2.6.25.16-0.1-pae #1 SMP 2008-08-21 00:34:25 +0200 i686 i686 i386 GNU/Linux
    erandi$ ls -l unity-linux/build/LinuxPlayer 
    -rwxr-xr-x 1 miguel users 45735629 2008-10-12 00:37 unity-linux/build/LinuxPlayer*
    	

    We do not have a timeline yet, please do not spam the Unity guys with requests, stay tuned to this blog for updates.

    FusionFall pre-mortem

    12:17am Joachim explains their strategy with the web plugin and how they will cope with multiple versions of it as time goes by.

    12:06am Cartoon Network will drive a lot of the plugin penetration.

    11:50am Joachim is showing profiling information (particle, physics, the top scripts, time taken per frame).

    The game went from 2gigs to 300megs by using some interesting compressions fo meshes and animations.

    All of the features that were added for FusionFall are being folded back into the future Unity 2.5.

    Pics: I wish I had brought my USB cable to post pictures from the camera. I will try to spice up this post tonight with the photos.

    11:45am Runtime World Streaming: scenes are dynamically loaded and unloaded base on the player position in the world, the world is made up of a 16x16 grid. Scene loading happens when a player approaches a boundary in the world.

    11:40am The Unity guys are talkng about the challenge of converting the assets from Gamebryo to Unity, the volume was large (25k files of Gamebryo data, which was constantly changing and growing).

    They added support to Unity to interoperate with the Gamebryo and Cartoon Network data and wrote plenty of C# importing scripts and tools.

    11:30am FusionFall talk by Joachim Ante.. FusionFall is a project that was done for the Cartoon Network.

    It is an MMO with platform game elements.

    It has a huge streaming world, so there are no pauses as you navigate the world. The game is targetted at kids (8-14).

    The game was produced by Cartoon Network and developed by Grigon Entertainment, a team of 40 developers, 10 of them programmers, and has been under development for 3 years. Originally this was Windows-only standalone executable, developed with Gamebryo.

    The cycle at some point included the prototyping done in Unity, shipping the executable to engineering, and engineering reimplementing in Gamebryo. They realized that they could turn the prototype as the actual client and that they could just communicate to their backend server. This allowed them to switch the entire game from Gamebryo to Unity.

    Originally the standalone game was 2gb in size (lots of music, voice overs, terrains). This was a problem for kids, since they are not going to wait for 2 gigs to download, this was a big barrier to entry.

    Unity's web based distribution and the strong world-streaming features were a good match for this project. This allowed Cartoon Network to give a great experience.

    The entire MMO was ported in four months by a team Grigon developers and four Unity engineers working with them. They were on a very tight schedule. Four developers at Grigo ported the game client from C++ to C#.

    Keynote

    10:52am Interesting overview of the challenges of the game industry. Where does the game industry go next? A discussion on integrarting games with the web and delivering games as services.

    On one end there is the flashy stuff, on the other end lots of talk about the enterprise components of gaming. I had no idea.

    Between the low-barrier to entry and the high-barrier to entry markets, there is a large space for gaming and where 3D games on the browser will make a difference.

    Phil sees Unity as an agent that will help transform the game industry.

    10:31am Phil Harrison president of Atari is now on stage, "First time I have done a presentation in a Planetarium". Atari has no commercial relationship with Unity or investing-wise. He is here because "I wanted to be here, what David and his team are doing is transformational for the industry. I had an Eureka moment early this year, I had just joined Atari, and someone told me `check out Unity3d.com', I had heard about it, but never used it. Using the Web player demo was eye opening for me. [...] This is something similar to what I saw at Sony in 1993, when we first got the dinosaur demo on the PS1 [...] The island demo I believe is a game changer in this industry".

    "I have become an unpaid evangelist of Unity".

    Phil is now going to talk about the game industry, wont blog that.

    10:29am Introspection, why we want to do this? Goals: we want people to build games for the web, the iPhone, the Wii, and for everything else.

    10:29am Announcing Indie version, 199 dollars, but has some watermark/splashscreen at the beginning.

    10:26am Windows Vista logo on screen.

    "This is true, I have to admit it", they are demostrating the new Unity3D IDE on Unix. The same Unity3D tool but now running on Windows.

    "We are going completely cross platform", every script that you write will run on both platforms (Woohoo! Go CIL! Go!).

    10:21am Nicholas is going to talk about "Secret Labs". He talks about "Jus t Press Play", "Buliding for multiple targets" and the script property editor.

    They wanted to improved upon th eUnity editor.

    They rewrote the Unity editor from zero. Created entirely on top of the Unity APIs themselves - EditorWindows, unityGUI, GameObjects and Components. Unity is built on Unity now. "It is way faster than cocoa".

    He is showing Unity 2.5, looks like Unity 2.1; They now use tabs and the various windows can be dragged around, very much like MonoDevelop. He is showing the editor by dragging a lightpost into a paradise island and showing the new GUI tools like snapping, rotation and UIs that are closer to Maya's tools.

    He shows "Snap to surface" so you can easily position stuff on the 3D terrain. People like it.

    The UI is a lot easier to use. "We have been focused on the tiny details, but we are not shipping this yet". Everything in the IDE can now be scripted.

    He shows how a few lines of code a developer can attach a camera view when clicking on a property.

    130 new API entry points, Unity developers can now do everything that the Unity3D GUI can do.

    10:20am David talks about the pricing; Two pricing: cheap and expensive.

    10:13am Joachim Ante is introducing Unity for the iPhone. "With Unity we have always focused on iteration time". He goes into some of the technical details, "With all the new input mechanisms for theiphone, how do we provide a quick feedback system, we wanted to keep the experience of develop, hit run under a second".

    They provide a "Unity remote" that runs on the iPhone, you use the iPhone to control the game, but the debugging actually happes on the PC. So you hit "run" and there is no wait at all.

    Joachim is explaining how they are using AOT to run native code on the iPhone without having any JIT on the iPhone.

    Joachim shows "Build and Run" that does the cross compiler and sends the code to the iPhone. It takes about 10 seconds and he now has the game running on the iPhone and shows how both Javascript and C# code running on the system.

    10:10am Some stats: sold out event; 180 attendees; community doubled in the last year (2x employees, 2x posts, 2x users);

    Last year they released Unity 2.0.

    Unity 2.1 was released, should have been 3.0, but they did not charge more.

    They announced Unity for Wii.

    Big games using Unity: Sony, Disney. Virtual worlds like Hangout.Net is out (very pretty!) A new online community was created (Blurst). SeriousGames released a new title "Global Conflicts" Latin America.

    Hard to keep up with the list of users.

    10:04am The Unity founders Joachim, David and Nicholas are on stage to start Unite'08.

    They moved us from the room downstairs to the iMax auditorium whihc is packed with game guys. During the moments of panic that ensued after they moved us from the downstairs room into the switched rooms, I ended up in the front row, which in retrospect was a big mistake, you cant take pictures with the standard lens of this massive screen.

    Registration

    9:48am Waiting for the keynote at the Unite conference. There are about two hundred people packed in the Tycho Planetarium. The Blurst guys are all wearing matching shirts and have taken over the first line of the auditorium, From here I can see a them debugging a Sonic-like game that he is prototyping. Then he switched to some game that has an angry minotaur breaking dishes in a museum.

    The minotaur looks angry and just scored 3,000 points of some kind.

    Everyone in this conference seems to be using a Mac, and I could swear this computer is the only Linux machine in the audience.

    Pre-Conference

    Last night I had dinner at the Unity headquarters and got a chance to meet some of the Unity hackers and users before the conference started.

    Gained a deeper insight into what we can do to improve Mono's VM for games. Lots of good ideas.

    Phil Harrison brought up "the debugger" issue ;-).

    Hopefully Rasmus from CellDotNet will show up for the Unity Mingle tonight.

    Posted on 22 Oct 2008


    Mono 2.0 OSX Installer Ready

    by Miguel de Icaza

    We released an updated installer for Mono 2.0 on MacOS X.

    This release got delayed because we wanted to upgrade our bundled Gtk# stack to contain the latest release of Imendio's Gtk+ for MacOS X.

    Banshee coming to an OSX near you this week.

    Mono OSX Survey!

    We are trying to understand how we can improve Mono on the OSX space. Help us figure this out by filling out our Mono on OSX Survey.

    Relocatable Applications

    If you have followed our Guidelines for Application Deployment your software should be easy to be packaged and distributed for MacOS X as a relocatable application.

    Eoin Hennessy worked on integrating Banshee into the OS, and packaging it into a bundle that runs out of the box on MacOS. The following are some screenshots from Aaron's box:

    The Banshee open source media player.

    Sandy has ported Tomboy and Tasque to MacOS and Windows and provided installers for both.

    Tomboy integrates into the dock and menus.

    Aaron Bockover from the Novell Desktop Team has promised that Eoin's work will be part of Friday's Banshee release. From this point on, Banshee will be released both for Linux and MacOS X at the same time.

    Maybe F-Spot is not too far behind?

    The Small Print

    • We downgraded the bundled Gtk+ from 2.15 to 2.14.3, as 2.15 was a development version and 2.14 is the officially supported Gtk+.
      This means that applications that linked directly against Gtk+ 2.15 from Mono 1.9 will fail to run. Please re-link those binaries.
    • We removed MonoDevelop from this distribution, so our package only contains the Mono SDK and Mono runtime.
      A MonoDevelop installation package will come later, we apologize for this delay.
      On the upside: now that the distribution is split, we will be doing MonoDevelop Beta 2 previews as DMGs after the PDC.

    Help us improve Mono on OSX by completing the Mono on OSX Survey and providing comments at the end.

    Posted on 20 Oct 2008


    Parallel Programming

    by Miguel de Icaza

    As much as I personally dislike the use of threads for user code, multi-cores systems are here to stay. They are becoming increasingly popular (most laptops now ship with dual core systems, home computers ship with 3 cpus and gaming consoles ship with multiple general purpose cpus as well).

    Developers will need new frameworks for developing software that is ready to take advantage of multiple CPUs. But most importantly they will need to learn the traps and pitfalls of writing parallel/threaded code.

    Here are two fantastic articles on MSDN that cover these topics:

    J�r�mie Laval worked on an ParallelFX implementation for Mono over the summer as part of the Google Summer of Code.

    The implementation currently lives on the student repository at code.google.com. I can not wait for the API to be stabilized so we can move it into the main Mono distribution.

    Posted on 19 Oct 2008


    Going to Copenhagen

    by Miguel de Icaza

    Next week I will be in Copenhagen for Unity3D's Unite conference.

    Unity3D is one of the most fun users of Mono as they create IDEs for Game Developers and they are driving the adoption of Mono, C#, Boo and their own UnityScript in the gaming space.

    As a newcomer into this industry, there are various sessions from actual Unity user on how they have built their games from start to finish. Other sessions include details on publishing, production (ArtPlant), Physics (Flashbang), Shader Programming (Unity), developing on the iPhone (Unity), a post-morterm on FusionFall's work for Cartoon Network and the hands-on lab.

    Some cool stuff from the agenda includes a keynote participation from Atari's President.

    If you want to meet up, drop me an email. I will likely be going to the Unity Mingle events at night and departing early on Friday to fly to the Microsoft PDC in LA.

    Posted on 17 Oct 2008


    Alan "BitSharp" McGovern Joins Novell

    by Miguel de Icaza

    Alan McGovern, who created BitSharp during a Google Summer of Code for Mono has joined the Moonlight team at Novell.

    Imagine the possibilities! Bittorrent clients, servers, trackers all running from Silverlight 2.0 Web Applets!

    Discuss.

    Posted on 14 Oct 2008


    Mono 2.2 Feature: Mono.Options

    by Miguel de Icaza

    In the upcoming Mono 2.2 release we will be distributing Jonathan Pryor's most excellent Mono.Options library.

    Mono.Options is a beautiful command line parsing library. It is small, succinct, a joy to use, easy and powerful, all in one.

    It is one of those libraries that does more with less. Something that every programmer aspires to write, but that we seldom achieve.

    It has also struck a good balance for Unix and Windows developers as options can be used on both systems, and map well to practices on both systems. It took a long time to get the right "blend" of parsing, but I think Jonathan has achieved it.

    Consider this example:

    
    using System;
    using System.Collections.Generic;
    using NDesk.Options;
    
    class Test {
        static int verbosity;
    
        public static void Main (string[] args)
        {
            bool show_help = false;
            List names = new List ();
            int repeat = 1;
    
            var p = new OptionSet () {
                { "n|name=", "the name of someone to greet.",
                  v => names.Add (v) },
                { "r|repeat=", "the number of times to repeat the greeting.",
                  (int v) => repeat = v },
                { "v", "increase debug message verbosity",
                  v => { if (v != null) ++verbosity; } },
                { "h|help",  "show this message and exit", 
                  v => show_help = v != null },
            };
    
            List extra;
            try {
                extra = p.Parse (args);
            }
            catch (OptionException e) {
                Console.Write ("greet: ");
                Console.WriteLine (e.Message);
                Console.WriteLine ("Try `greet --help' for more information.");
                return;
            }
    
            if (show_help) {
                ShowHelp (p);
                return;
            }
    
            string message;
            if (extra.Count > 0) {
                message = string.Join (" ", extra.ToArray ());
                Debug ("Using new message: {0}", message);
            }
            else {
                message = "Hello {0}!";
                Debug ("Using default message: {0}", message);
            }
    
            foreach (string name in names) {
                for (int i = 0; i < repeat; ++i)
                    Console.WriteLine (message, name);
            }
        }
    
        static void ShowHelp (OptionSet p)
        {
            Console.WriteLine ("Usage: greet [OPTIONS]+ message");
            Console.WriteLine ("Greet a list of individuals with an optional message.");
            Console.WriteLine ("If no message is specified, a generic greeting is used.");
            Console.WriteLine ();
            Console.WriteLine ("Options:");
            p.WriteOptionDescriptions (Console.Out);
        }
    
        static void Debug (string format, params object[] args)
        {
            if (verbosity > 0) {
                Console.Write ("# ");
                Console.WriteLine (format, args);
            }
        }
    }
    	

    And here is an example of its use:

    $ mono greet.exe --help
    Usage: greet [OPTIONS]+ message
    Greet a list of individuals with an optional message.
    If no message is specified, a generic greeting is used.
    
    Options:
      -n, --name=VALUE           the name of someone to greet.
      -r, --repeat=VALUE         the number of times to repeat the greeting.
      -v                         increase debug message verbosity
      -h, --help                 show this message and exit
    
    $ mono greet.exe -v- -n A -name=B --name=C /name D -nE
    Hello A!
    Hello B!
    Hello C!
    Hello D!
    Hello E!
    
    $ mono greet.exe -v -n E custom greeting for: {0}
    # Using new message: custom greeting for: {0}
    custom greeting for: E
    
    $ mono greet.exe -r 3 -n A
    Hello A!
    Hello A!
    Hello A!
    
    $ mono greet.exe -r not-an-int
    greet: Could not convert string `not-an-int' to type Int32 for option `-r'.
    Try `greet --help' for more information.
    
    	

    He has also documented it thoroughly.

    Where possible (new tools being written, or tools that have a similar command line structure that is compatible) we will be switching to this command line parsing library.

    The library is small, so developers should include a copy of the source code in their application, this is how you should include it in your makefiles:

    
    Options.cs:
    	cp `pkg-config --variable=Sources mono-options` .
    
    	

    Then your code can just include a reference to it.

    Posted on 14 Oct 2008


    MonoDevelop gets VI bindings

    by Miguel de Icaza

    I grew up mostly with Turbo Pascal as my development environment. When I started to write C code in DOS, I used Turbo C briefly but for some reason I switched to the BRIEF text editor for a while.

    Around 1989 my friend Max Mendizabal who used nothing but Epsilon told me "Unix is the future, if you learn Epsilon, you will be ready to switch to Emacs when the time comes".

    Prophetic words.

    When I eventually switched to Unix in 1992, having learned Epsilon was useful, but Emacs was too slow for quick edits. I still used Emacs for programming, but for quickly making changes to a file, I ended up learning vi.

    When computers got faster, I tried to switch to Emacs for all my editing tasks, but my brain had been hardwired. I even added "alias vi=emacs" to by shell, and I would find myself typing subconsciously "/usr/bin/vi".

    To this day, I use both editors interchangeably.

    In any case, the above story was just an excuse to introduce VI Mode for MonoDevelop.

    Posted on 14 Oct 2008


    Mono 2.0 is out!

    by Miguel de Icaza

    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 (Some folks at Novell are working with Unity on bringing Unity3d 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 memory footprint of 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 interop 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 operations are now inlined 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 compilers 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 spent extra hours to get all the bits and pieces in place for the release.

    Posted on 06 Oct 2008


    Five Second Linux Boot

    by Miguel de Icaza

    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.

    Posted on 04 Oct 2008


    Moonlight Update: Media Codecs

    by Miguel de Icaza

    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.

    Posted on 03 Oct 2008


    Microsoft changes the Managed Extensibility Framework License

    by Miguel de Icaza

    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!

    Posted on 02 Oct 2008


    Mono at the PDC 2008

    by Miguel de Icaza

    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.

    Posted on 01 Oct 2008


    DbLINQ, LINQ to Databases and Mono

    by Miguel de Icaza

    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.

    Posted on 01 Oct 2008


    Microsoft to incorporate jQuery into Visual Studio

    by Miguel de Icaza

    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.

    Posted on 01 Oct 2008


    Monovation: Assembly Injection into Live Processes

    by Miguel de Icaza

    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.

    Posted on 29 Sep 2008


    Public Service Announcement

    by Miguel de Icaza

    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.

    Posted on 28 Sep 2008


    Love World Domination!

    by Miguel de Icaza

    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.

    Posted on 24 Sep 2008


    Stream.CopyStream

    by Miguel de Icaza

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

    Discuss.

    Posted on 24 Sep 2008


    reCaptcha.NET

    by Miguel de Icaza

    Kudos to Ben and the rest of the Captcha team.

    Today I downloaded the binaries for reCaptcha.NET for a web page that I was setting up and it worked out of the box. No recompiles necessary:

    • Drop the Recaptcha.dll in the bin directory of the ASP.NET app.
    • Get your public/private key.
    • Insert this in your page:
      		<recaptcha:RecaptchaControl
                              ID="recaptcha"
                              runat="server"
                              Theme="red"
                              PublicKey="YourKey"            
                              PrivateKey="YourOtherKey"/>
      		
    • Hit refresh. Ta da!

    Posted on 17 Sep 2008


    Encrypted File Systems

    by Miguel de Icaza

    I just found out about encfs, a user-space encrypted file system that runs on top of FUSE.

    To use it, just type:

    	$ encfs ~/.encryptedstorage ~/secure
    	

    And follow the directions. You then will have a ~/secure directory where you can stash all the material that you would not want to become public if you were to lose your laptop.

    But it gets better than this. You can use sshfs to store files on a remote server, and then use the sshfs-backed file system as your encrypted storage, you can then keep your files stashed on a remote server, completely encrypted.

    Posted on 16 Sep 2008


    Mono team, hiring again

    by Miguel de Icaza

    Hey folks, it is that time of the year when we are looking to hire some developers to work on Mono.

    We are looking for people with experience in Linux, with experience building software from source code and good C# or Java skills. Experience with ASP.NET and ADO.NET is a plus.

    The positions this time are only available in Boston, if you are interested, send me an email.

    Update: we have filled this position.

    Posted on 15 Sep 2008


    Securing a Unix Domain Socket: Looking for Help

    by Miguel de Icaza

    There is a cool hack that we want to introduce in Mono that would allow a remote process to debug a examine data in a running Mono instance. The hack uses the embeddable compiler.

    The proposed extension to Mono would use a socket on /tmp/mono-USER/.mono-PID created by the Mono process and set the permissions to read/write for the owner and nothing for the group or other users.

    What can go wrong security-wise with the above setup? What should we check that is not immediately obvious?

    So far:

    • Create directory with 0600 permissions, bail if mkdir returns anything but 0.
    • Create socket in directory; It should be safe at this point, and change the permissions of the socket (is this really needed?).

    Posted on 15 Sep 2008


    Credit where credit is due

    by Miguel de Icaza

    The csharp interactive shell and the embeddable compiler hacks could only have been possible thanks to the work that Marek Safar has put into implementing C# 3.0, cleaning up the compiler and laying down the foundation for a reusable compiler.

    Some time ago, our regression test suite for the compiler was taking 20-30 minutes to run. Marek refactored the compiler so that we could reuse the same instance without launching a new process for each of our 1,500 individual tests.

    Without Marek's dedication and love for the compiler, we would never have gotten here.

    Posted on 11 Sep 2008


    C# Eval: An Embeddable Compiler

    by Miguel de Icaza

    Hello Internets and C# Lovers!

    After the C# Interactive Shell started working, it became obvious that we now had C#'s eval and that it would be incredibly interesting to enable people to embed a C# Eval in their application.

    I did a little bit of refactoring on the codebase last night, and now we expose a few methods that allow developers to evaluate C# expressions and statements dynamically.

    Usage is very simple, you must reference the `gmcs.exe' assembly, this contains the C# Eval, then you invoke the CSharpEvaluator.Evaluate method, and get the results back.

    The following is a small command line calculator that takes C# expressions:

    using Mono.CSharp;
    using System;
    
    class MyCalculator {
    	static void Main (string [] args)
    	{
    		Console.WriteLine (CSharpEvaluator.Evaluate (args [0] + ";"));
    	}
    }
    	

    Compile the above, and execute:

    $ mono calculator.exe '1+2'
    3
    	

    There are a number of overload methods for Evaluate that give more control over how things are evaluated. The csharp command is now written entirely using the CSharpEvaluator API. The code is now pretty simple: pretty printing of values, dealing with partial input, loading startup files (if any) and import the default namespaces.

    A few uses that come to mind:

    • Use C# as a scripting language for your application.
    • Use it for startup scripts of your own application (similar to .emacs, but with C# instead).
    • Use it to explore the state of your application live.
    • Use it to debug your application as it is running.
    • Embed the compiler on Silverlight and run C# on your web browser, similar to how Jimmy did it for Ruby.
    • Embed it into your app and expose it as a service that you can connect to, and do it live!

    The four or five public methods of the API are documented in the source using C# doc tags. When Mono 2.2 goes out, we will publish docs for them.

    As we announced back in April, Mono's C# compiler is now licensed under the MIT X11 license, so you can embed at will.

    Manhole

    Joe Shaw mentioned a few days ago that it would be nice to support something like Twisted's Manhole where your application is listening on a port and then you can connect to it and debug it. It should take a dozen lines to write it, but I am heading out for dinner now.

    But if I were to do it, I would probably make the csharp command (all 240 lines of it) support a --server command line option and have it connect to the server and send strings over the wire instead of executing locally. That way you get to use the awesome getline.cs command line editor and history locally and let the server run the code.

    Getting Your Hands on This

    To enjoy this hack, you have to either wait for Mono 2.2 or install Mono from SVN, all of the code is checked in.

    Update: Clarification

    Since it was not obvious, we do support C# 3.0, which includes the entire LINQ stack in the above expression evaluator:

    using Mono.CSharp;
    using System.Collections;
    using System;
    
    class X {
    	static void Main (string [] args)
    	{
    		Evaluator.Run ("using System; using System.Linq;");
    		bool ress;
    		object res;
    		string s = Evaluator.Evaluate (
    			"from x in System.IO.Directory.GetFiles (\"/etc\") where x.Length < 10 select x;",
    			out res, out ress);
    
    		foreach (var v in (IEnumerable) res){
    			Console.Write (v);
    			Console.Write (' ');
    		}
    	}
    }
    
    

    The above uses a LINQ expression, and this is the result in my system (files whose full pathname is less than 10 characters):

    /etc/motd /etc/mtab /etc/raw /etc/rpc 
    

    Posted on 10 Sep 2008


    Enterprise Library 4.0 now Open Source

    by Miguel de Icaza

    Hello Internets!

    Some very good news: As part of the ongoing discussion on the MS Limited Permissive License, I was doing some Google searches on it and came across the Enterprise Library 4.0 release.

    Enterprise Library was a project that came out of the Patterns and Practices group at Microsoft, and they had historically used licenses that were not open source friendly. This new release is now licensed under the terms of the open-source friendly MS-PL license.

    In the past, various people have asked us to implement an open source version of it, so they could use those building blocks on Unix with Mono. We never had any spare cycles to look into this, so the blocks provided by Enterprise Library were always beyond Mono users.

    As it turns out, since May 2008 it has been possible to use the library with Mono on non-Windows platforms.

    Now all there is left to do is to package it in a convenient form.

    Posted on 09 Sep 2008


    Interactive C# Shell

    by Miguel de Icaza

    During the last HackWeek, I had a chance to work on a project that we had been discussing in the Mono team: an interactive C# shell.

    The idea was simple: create an interactive C# shell by altering the compiler to generate and execute code dynamically as opposed to merely generating static code.

    The result is the csharp command. The command provides an read-eval-print loop for entering C# statements and expressions:

    	csharp> 1;
    	1
    	csharp> "Hello, World".IndexOf (",");
    	5
    	csharp> Console.WriteLine ("Hello");
    	Hello
    	

    Statements are executed; Expressions are evaluated, and the result displayed. There is support for rendering arrays, IEnumerables and dictionaries specially, consider the following C# 3 declaration:

    	csharp> new Hashtable () { { "/bin", "executable files" }, { "/etc", "configuration files" } };
    	

    You will get this back when rendered:

    	{{ "/tmp", "Temporary files" }, { "/bin", "executable files" }}
    	

    Statements can span multiple lines; In those cases the interactive shell will use a different prompt to indicate that more input is expected, for example:

    	csharp> 1 +
    	      > 2;
    	3
    	csharp>
    	

    One of the main advantages of this shell is that you can try out your LINQ expressions directly on the shell, for example, the following query works on the result from Directory.GetFiles:

    	csharp> using System.IO;
    	csharp> var last_week = DateTime.Now - TimeSpan.FromDays (7);
    	csharp> from f in Directory.GetFiles ("/etc") 
    	      >    let fi = new FileInfo (f)
    	      >    where fi.LastWriteTime < last_week
                  >      select f;
            { "/etc/adjtime", "/etc/asound.state", "/etc/ld.so.cache",
    	"/etc/mtab", "/etc/printcap", "/etc/resolv.conf" }
    	

    The LINQ expressions are not limited to working on IEnumerables, you can also use LINQ to XML or LINQ to any database provider supported by Mono by loading the assembly:

    	csharp> LoadLibrary ("System.Xml.Linq");
    	csharp> using System.Xml.Linq;
    	csharp> var xml = new XElement("CompilerSources",
    	      >   from f in Directory.GetFiles ("/cvs/mcs/mcs")
    	      >   let fi = new FileInfo (f)
    	      >   orderby fi.Length
    	      >  select new XElement ("file", new XAttribute ("name", f), new XAttribute ("size", fi.Length)));
    	csharp> xml;
    	<CompilerSources>
    	  <file name="/cvs/mcs/mcs/mcs.exe.config" size="395" />
    	  <file name="/cvs/mcs/mcs/gmcs.exe.config" size="464" />
    	  <file name="/cvs/mcs/mcs/OPTIMIZE" size="498" />
    	  <file name="/cvs/mcs/mcs/lambda.todo" size="658" />
    	  <file name="/cvs/mcs/mcs/smcs.exe.sources" size="726" />
    	  [...]
    	</CompilerSources>
    	

    A differences between csharp and the C# language is that I felt that for interactive use, it would be important to change the type of a variable, so the following is allowed:

    	csharp> var a = 1;
    	csharp> a;
    	1
    	csharp> a.GetType ();
    	System.Int32
    	csharp> var a = "Foo";
    	csharp> a;
    	"Foo"
    	csharp> a.GetType ();
    	System.String
    	csharp>  
    	

    To load code interactive I added two methods: LoadAssembly and LoadPackage.

    LoadAssembly is the equivalent of passing the -r command line argument to csharp or mcs, this example shows System.Xml.Linq in use:

    csharp> LoadAssembly ("System.Xml.Linq");
    csharp> using System.Xml.Linq;
    csharp> XDocument doc = new XDocument(
          >     new XDeclaration("1.0", "utf-8", "yes"),
          >     new XComment("Sample RSS Feed"),
          >     new XElement("rss", 
          >         new XAttribute("version", "2.0"),
          >         new XElement ("channel",
          >             new XElement("title", "RSS Channel Title"),
          >             new XElement("description", "RSS Channel Description."),
          >             new XElement("link", "https://tirania.org"),
          >             new XElement("item",
          >                 new XElement("title", "First article title"),
          >                 new XElement("description", "First Article Description"),
          >                 new XElement("pubDate", DateTime.Now.ToUniversalTime()),
          >                 new XElement("guid", Guid.NewGuid())),
          >             new XElement("item",
          >                 new XElement("title", "Second article title"),
          >                 new XElement("description", "Second Article Description"),
          >                 new XElement("pubDate", DateTime.Now.ToUniversalTime()),
          >                 new XElement("guid", Guid.NewGuid()))
          >             )
          >         )
          >      );
    	

    The variable doc is then rendered:

    csharp> doc;
    <?xml version="1.0" encoding="utf-16" standalone="yes"?>
    <!--Sample RSS Feed-->
    <rss version="2.0">
      <channel>
        <title>RSS Channel Title</title>
        <description>RSS Channel Description.</description>
        <link>https://tirania.org</link>
        <item>
          <title>First article title</title>
          <description>First Article Description</description>
          <pubDate>9/8/2008 5:13:34 PM</pubDate>
          <guid>bc6825ab-f1ab-4347-ad6e-3cf076011379</guid>
        </item>
        <item>
          <title>Second article title</title>
          <description>Second Article Description</description>
          <pubDate>9/8/2008 5:13:34 PM</pubDate>
          <guid>a474b2bb-deba-4973-9581-762857b24b53</guid>
        </item>
      </channel>
    </rss>
    
    	

    LoadPackage is the equivalent of invoking the compiler with the -pkg: flag. This is a Mono-ism that integrates Mono libraries with Unix's pkg-config. Packages allow definitions and multiple assemblies to be loaded in a single call, for example, this loads the Gtk# 2.0 package:

    	csharp> LoadPackage ("gtk-sharp-2.0");
    	csharp> using Gtk;
    	csharp> Application.Init ();
    	csharp> var b = new Button ("Hello Interactive Shell");
    	csharp> var w = new Window ("So cute!");
    	csharp> b.Clicked += delegate { Application.Quit (); };
    	csharp> w.Add (b);
    	csharp> w.ShowAll ();
    	csharp> Application.Run ();
    	

    Pleasure

    This shell has been incredibly useful to debug things in the last few weeks, as it avoids the tedious typing to try out APIs and to see what some function might return. Launch csharp and test things away.

    To improve the experience of the command line editing, I wrote a managed readline replacement, it provides history, keyboard navigation and searching.

    Also the System, System.Linq, System.Collections, and System.Collections.Generic namespaces are imported by default.

    Additionally, the csharp command will load any assemblies and C# scripts that you have in the ~/.config/csharp directory. If you are working constantly say on LINQ, you can put there all of your using and LoadLibrary statements.

    Availability

    The csharp command will be available in Mono 2.2, which is still a few months away, or it can be obtained by compiling Mono from SVN today.

    Interactive Commands

    Currently there are a few static methods and properties that you can invoke from the command line, like the "help" property that will display some help, and the "quit" property that terminates the shell as well as things like LoadLibrary and LoadPackage that I have described before. A complete list is available on the CsharpRepl page.

    I am interested in hearing which other features should be added to the shell. I think we need some special commands to describe types and objects, like monop.

    Additionally, currently values are displayed by using ToString(), but perhaps we need a method Inspect(object) that would show the values of all public fields and properties, like a debugger would.

    Which other commands should be added?

    Posted on 08 Sep 2008


    Avoid the Managed Extensibility Framework.

    by Miguel de Icaza

    Update: Microsoft has now changed the license to the MEF to the open source MS-PL license. Please see the follow up post for details.

    As a .NET developer, you should avoid using the newly released Managed Extensibility Framework as its license prevents its use beyond the Windows platform. This will prevent your .NET software from running on Linux or MacOS in the future.

    Luckily, there is a cross platform solution available today that has no platform limitations: Mono.Addins, a technology inspired by Eclipse's own plugin system. We have tutorials, reference manuals, API docs, our FAQ our public groups and multiple large applications with source code available that you can learn from (MonoDevelop, Banshee, F-Spot and Gnome-Do).

    The rule obviously applies to any new APIs that are built for .NET as they are not immediately available for Mono. But unlike the binary-only APIs, these half-open source code releases pose additional problems for the open source CLI:

    • More people are exposed to the source code, preventing them from working on a fully open source implementation of it.
    • There is a smaller desire from the community to reimplement the code, as it is relatively easy to just use the existing implementation or ignore the issue for the time being.
    • Some folks might not care about the license restriction, and ignore it altogether. A practice I do not endorse.

    There are two additional issues that are worth pointing out. Should non-open source libraries be hosted on CodePlex to begin with? CodePlex is branded as the "Open Source Project Hosting" from Microsoft, yet, this license is clearly not open source and does not qualify as open source according to the definition and is a clear violation of Codeplex.Com's requirements:

    The above link points to http://en.wikipedia.org/wiki/Open_source_licenses.

    MEF should be pulled out of the CodePlex site along with all other platform-limiting software, like ASP.NET MVC (h/t to gblock for pointing out that MVC is also violating the terms). Unless CodePlex cooks up a special exception that some software and restrictions are more equal than others.

    The second point that is worth making is that picking licenses like the MS-LPL for .NET software is shooting the .NET community in the foot. The LPL license is obviously an effort to tie things into the Windows platform, putting company first, community and developers second.

    The MS-LPL is a poisonous license, do not use it (do not confuse with the MS-PL which is a decent license, the extra "L" makes a big difference).

    Update: gblock points out that CodePlex technically only requires a "license" to be picked, but does not require it to be OSI compliant. But even if the wording on the FAQ does allow for that interpretation, it is misleading as there is a link to OSI licenses next to it, and the main page clearly states that Codeplex is an "Open Source Project Hosting" site. Capital "O" and capital "S".

    The "CodePlex Basics: Getting Started" page also points to the Open Source License Definition, there are no words about custom licenses or about hosting proprietary code with source code available.

    Update2: Glenn has reached out to the community and clearly wants to improve the status quo when it comes to MEF, open source, CodePlex and the official policies. Good luck to Glenn.

    It is also worth pointing out that Glenn was one of the early adopters and advocates of the MS-PL at Microsoft (to clarify: the MS-PL is an open source license).

    Posted on 07 Sep 2008


    Using Visual Studio to Debug Mono

    by Miguel de Icaza

    The following screenshots shows Visual Studio debugging a remote Mono process running on a Linux box.

    Breakpoints, current line, and stack traces.

    The setup works like this: you run a debugging server on Linux. On Windows you install a Visual Studio extension that provides a Debugging Engine and the configuration tools to start your application.

    Then you start your application from Visual Studio (Tools/Launch with Mono) which will send the binaries and debug information over to Linux and execute it.

    Showing the disassembled code generated by Mono's JIT

    The core of the above work is to get the Windows to Linux debugging functionality enabled. We will have more news when the debugging experience is more complete and we are approaching the time to test drive it.

    If you are interested in trying it out, sign up for our preview on our web site.

    Debugging Support

    Mono 2.0 will for the first time include a debugger, the command line mdb command.

    Beyond this, we want to offer GUI debugging. The native solution is being built on top of MonoDevelop and will be available when we release MonoDevelop 2.0. It will work on both Linux and MacOS hosts.

    The second GUI engine will be the above Visual Studio plugin for developers that use Windows as their main OS and Visual Studio as their IDE.

    More Visual Studio Integration

    In addition to this work to integrate Visual Studio with Mono for remote debugging, thanks to the Summer of Code (Ed Ropple) and Jonathan Pobst's work in this hack week we got some support to run applications on Mono/Windows and run our Mono Migration Analysis tool.

    Jonathan's work is available today as an MSI, check out his post for more details.

    You can also check Ed's summer of code report on CloverLeaf.

    Posted on 04 Sep 2008


    getline.cs: Partying like its 1988

    by Miguel de Icaza

    In an age where the Unix shell is more relevant every passing minute, we need to have proper command line editing tools everywhere.

    For a project of mine, this weekend I put together a command-line editing class for .NET shell applications. The Mono.Terminal.LineEdit class can be used by shell applications to get readline-like capabilities without depending on any external C libraries.

    To use it, just do:

    	using Mono.Terminal;
    
    	LineEditor le = new LineEditor ("MyApp");
    	while ((s = le.Edit ("prompt> ", "")) != null)
    		Console.WriteLine ("You typed: " + s);
    	
    	

    It supports the regular cursor editing, Emacs-like editing commands, history, incremental search in the history as well as history loading and saving.

    The code is self-contained, and can be easily reused outside of my project. To use it, you just need to include the getline.cs file in your project. This is built on top of System.Console, so it does not have external library dependencies and will work on both Mono and .NET (finally bringing joy to people using command-line applications that use Console.ReadLine).

    It is licensed under the MIT X11 license and the Apache 2.0 license so there are no annoying licensing issues and can be mixed with anything out there.

    Update, Jan 2016: New popup dialog for completion has been added.

    Posted on 26 Aug 2008


    Second Life Demos

    by Miguel de Icaza

    Cool performance demos comparing SecondLife's LSL engine vs LSL running on Mono's VM.

    Posted on 21 Aug 2008


    SecondLife rolls out Mono-powered servers

    by Miguel de Icaza

    Big news for the Mono team today.

    Linden has started the roll out of their Mono-powered simulation servers.

    Users can now opt into having their LSL scripts executed using the Mono VM (it remains an opt-in feature, because some scripts are timing sensitive and the performance increase could break code).

    Some choice quotes from Jim Purbrick's blog post:

    As well as providing immediate benefits, the integration of the Mono virtual machine makes many future improvements possible: the use of mainstream languages to script Second Life alongside the existing LSL language; the removal of arbitrary per-script limits on script resource usage and the use of mainstream libraries and tools for scripting to name a few.

    And:

    The integration of Mono is the first step in the evolution of Second Life into a true software development platform. Thank you to all the residents who have helped us take this first step.

    Congrats to Linden on their launch!

    The Technology

    From a SecondLife developer perspective, some of the technical details about how Mono is integrated into the Second Life simulators can be found on their Wiki.

    When a user opts into using Mono, a special LSL compiler that generates ECMA CLI byte codes is used. The resulting CLI byte codes are then instrumented with some magic (more below) and then the code is exectuted using the Mono VM which translated the bytecodes into native x86 code.

    I find the SecondLife technology fascinating. Embedding Mono into SecondLife was not an ordinary task, it was not just a matter of linking with Mono and writing an LSL to CIL compiler.

    SecondLife distributes the virtual world on hundreds of servers, and as visitors move through the virtual world, their inventory, character and scripts migrates from server to server.

    This migration requires that running scripts be suspended, serialized to a database and their execution resumed on a different server. This means that all the state of a script, including the current location must be preserved while the user navigates across servers.

    The technology to do this is absolutely brilliant. I strongly recommend the Lang.NET presentation that Cory and Jim did in 2006.

    The first half of the video is an introduction to Second Life, the second delves into the hackery necessary to make it happen.

    This are clearly hugenormous news for us, and for everyone that worked with Linden, for everyone that fixed bugs and implemented new features in Mono to run under the conditions that Linden has.

    Posted on 20 Aug 2008


    OSX Development with Oxygene, Cocoa and Mono

    by Miguel de Icaza

    The RemObject folks have been doing some tutorials on how to build applications with Visual Studio and Interface Builder to target both Windows and MacOS with .NET and Mono respectively.

    Check out their tutorial and their notes on cross platform development. The lessons in the tutorial also apply to C#-based development.

    It is also worth noting that recent versions of their Oxygene compiler now support generics.

    Posted on 20 Aug 2008


    Pleo Days

    by Miguel de Icaza

    I just got my Google Android present! An awesome Pleo Dinosaur!.

    So cute. SO CUTE!

    Posted on 20 Aug 2008


    Dynamic Method Invocation Performance

    by Miguel de Icaza

    Jon Skeet has an in-depth explanation of how to improve the performance of code that needs to dynamically invoke methods through reflections.

    The bottom line is that if you have performance sensitive code that needs to invoke methods that you fetch from reflection, you should avoid using MethodInfo.Invoke() and instead create a delegate from the MethodInfo, and perform the invocations that way:

    [...]Using a delegate invocation is only about 10% slower than direct invocation, whereas using reflection takes over 600 times as long. Of course these figures will depend on the method being called - if the direct invocation can be inlined, I'd expect that to make a significant difference in some cases.

    This is a well-known trick, but Jon provides a great exploration of the subject.

    Protocol Buffers for .NET

    Additionally, you can see that Jon's effort to port Google's Protocol Buffers to C# are almost complete.

    There are currently three separate approaches to support Protocol Buffers in .NET. Jon's effort essentially mimics the existing support for C# and integrated with the Google implementation and compilers. The other efforts have taken slightly different approaches, one of them is designed with the WCF approach in mind: use C# classes/interfaces as the actual public contract, as opposed to the .proto files.

    Posted on 14 Aug 2008


    First preview of Mono 2.0 is out

    by Miguel de Icaza

    Our first preview for Mono 2.0 is out; It has been almost six months since we branched version 1.9 so this is a gigantic update to Mono.

    Many of the features are listed on the release notes, but the release notes do not even begin to capture the enormous number of fixes, performance improvements, tuning and work that went into this release.

    As usual, this is our "best release ever", but it is also the longest we have gone without doing interim releases, so it is possible that we might have regressed where our test suite lacks tests. We would love to get folks to test this, with their code, and to bug reports on any issues they find before our final 2.0 release.

    See our Roadmap for more details on the release schedule and the upcoming post-2.0 releases.

    Posted on 01 Aug 2008


    GovTrack.Us Interview with Joshua Tauberer

    by Miguel de Icaza

    Jon Udell interviews Joshua Tauberer on his service GovTrack.us that helps citizens track legislation and voting in the US.

    Posted on 28 Jul 2008


    C# 3.0 and Parallel FX/LINQ in Mono

    by Miguel de Icaza

    For a while I wanted to blog about the open source implementation of the Parallel Extensions for Mono that Jeremie Laval has been working on. Jeremie is one of our mentored students in the 2008 Google Summer of Code.

    Update: Jeremie's code is available from our mono-soc-2008 repository.

    Dual CPU laptops are becoming the norm; quad-core computers are now very affordable, and eight CPU machines are routinely purchased as developer workstations.

    The Parallel Extension API makes it easy to prepare your software to run on multi processor machines by providing constructs that take care of distributing the work to various CPUs based on the computer load and the number of processors available.

    There are various pieces in the Parallel Extensions framework, the simplest use case is Parallel.For, a loop construct that would execute the code in as optimally as possible given the number of processors available on the system.

    Parallel.For is a simple replacement, you usually replace for loops that look like this:

    	for (int i = 0; i < N; i++)
    		BODY ();
            

    With the following (this is using lambda expressions):

    	Parallel.For (0, N, i => BODY);
            

    The above would iterate from 0 to N calling the code in BODY with the parameter scattered across various CPUs.

    C# 3 and Parallel LINQ

    Marek Safar recently announced that Mono C# compiler was now completely compliant with the 3.0 language specification.

    In his announcement he used Luke Hoban's brutal ray tracer-in-one-LINQ statement program. This was a hard test case for our C# compiler to pass, but we are finally there. I had blogged about it in the past. Luke Hoban's ray-tracer-in-one-linq-statement looks like this:

    var pixelsQuery =
      from y in Enumerable.Range(0, screenHeight)
      let recenterY = -(y - (screenHeight / 2.0)) / (2.0 * screenHeight)
      select from x in Enumerable.Range(0, screenWidth)
        let recenterX = (x - (screenWidth / 2.0)) / (2.0 * screenWidth)
        let point = Vector.Norm(Vector.Plus(scene.Camera.Forward, 
    Vector.Plus(Vector.Times(recenterX, scene.Camera.Right), Vector.Times(recenterY, scene.Camera.Up)))) let ray = new Ray { Start = scene.Camera.Pos, Dir = point } let computeTraceRay = (Func<Func<TraceRayArgs, Color>, Func<TraceRayArgs, Color>>) (f => traceRayArgs => (from isect in from thing in traceRayArgs.Scene.Things select thing.Intersect(traceRayArgs.Ray) where isect != null orderby isect.Dist let d = isect.Ray.Dir let pos = Vector.Plus(Vector.Times(isect.Dist, isect.Ray.Dir), isect.Ray.Start) let normal = isect.Thing.Normal(pos) let reflectDir = Vector.Minus(d, Vector.Times(2 * Vector.Dot(normal, d), normal)) let naturalColors =
    from light in traceRayArgs.Scene.Lights let ldis = Vector.Minus(light.Pos, pos) let livec = Vector.Norm(ldis) let testRay = new Ray { Start = pos, Dir = livec } let testIsects = from inter in from thing in traceRayArgs.Scene.Things select thing.Intersect(testRay) where inter != null orderby inter.Dist select inter let testIsect = testIsects.FirstOrDefault() let neatIsect = testIsect == null ? 0 : testIsect.Dist let isInShadow = !((neatIsect > Vector.Mag(ldis)) || (neatIsect == 0)) where !isInShadow let illum = Vector.Dot(livec, normal) let lcolor = illum > 0 ? Color.Times(illum, light.Color) : Color.Make(0, 0, 0) let specular = Vector.Dot(livec, Vector.Norm(reflectDir)) let scolor = specular > 0 ? Color.Times(Math.Pow(specular, isect.Thing.Surface.Roughness), light.Color) : Color.Make(0, 0, 0) select Color.Plus( Color.Times(isect.Thing.Surface.Diffuse(pos), lcolor), Color.Times(isect.Thing.Surface.Specular(pos), scolor)) let reflectPos = Vector.Plus(pos, Vector.Times(.001, reflectDir)) let reflectColor =
    traceRayArgs.Depth >= MaxDepth ? Color.Make(.5, .5, .5) : Color.Times(isect.Thing.Surface.Reflect(reflectPos), f(new TraceRayArgs(new Ray { Start = reflectPos, Dir = reflectDir }, traceRayArgs.Scene,
    traceRayArgs.Depth + 1))) select naturalColors.Aggregate(reflectColor, (color, natColor) => Color.Plus(color, natColor)))
    .DefaultIfEmpty(Color.Background).First()) let traceRay = Y(computeTraceRay) select new { X = x, Y = y, Color = traceRay(new TraceRayArgs(ray, scene, 0)) }; foreach (var row in pixelsQuery) foreach (var pixel in row) setPixel(pixel.X, pixel.Y, pixel.Color.ToDrawingColor());

    And renders like this:

    The above now compiles and runs as fast as it does on .NET.

    Jeremie then modified the above program to use the parallel extensions to LINQ. He replaced Enumerable.Range with ParallelEnumerable.Range and foreach with the parallel ForAll method to take advantage of his library.

    You can watch the above ray tracer with and without LINQ on his screencasts (LINQ ray tracer, Parallel LINQ ray tracer).

    Tracking Parallel FX

    There is much more information on the PFXTeam Blog. Another great blog to follow, in particular check out their Coordination Data Structures Overview, PLINQ Ordering and some demos.

    Posted on 26 Jul 2008


    Must follow blog

    by Miguel de Icaza

    Another fantastic blog to follow: Fake Twitter Status.

    Posted on 26 Jul 2008


    Mono 2.0 branched, and the Linear IL

    by Miguel de Icaza

    On Tuesday of last week we branched Mono for the 2.0 release; Packages are being QAed for our first release candidate and will be available next week. Bug fixing for the final release will happen on this branch.

    Meanwhile, the excitement continues on trunk. Zoltan today merged the Linear IL branch.

    The Linear IL code has been under development for two years and eight months and it was an effort that we started to address some of the main limitations in our current JIT design. Some of these limitations in the old design made it very hard to bring some code generation optimizations into the JIT, or made the optimizations not as effective as they could have been.

    The new JIT engine will debut in Mono 2.1, later this year. Now that Linear IL is the default, the entire JIT team will focus on tuning the engine and extracting more performance out of it. But even without tuning, the new engine is already performing very well as you can see in the results comparing the engines.

    Additionally, a number of creative ideas that we have to improve Mono all depended on doing this switch. We have a few surprises for developers in the next coming months.

    Congratulations to Zoltan for getting this work merged.

    Posted on 22 Jul 2008


    C# 4.0 Design

    by Miguel de Icaza

    From a recent interview on the design team for C# 4.0 Anders said about the room they meet to discuss the C# design:

    We have been meeting in this room for nine years, three times a week.

    This seems to be one of the reasons C# has evolved so nicely.

    Sadly there are no actual details on the interview about what is coming up on C# 4.0. We have to wait until the PDC to get an idea of what will be coming.

    Luckily, Mono's C# compiler is already 3.0 compliant, and we are ready to start adding 4.0 features the moment they become public.

    Posted on 21 Jul 2008


    Smuxi: a new IRC client

    by Miguel de Icaza

    My friend Mirco Bauer has been maintaining and coordinating the Mono packaging for Debian for many years.

    Today he released smuxi. His own IRC client that he built on top of Gtk#:

    Posted on 21 Jul 2008


    Gtk+ 3.0, take 2

    by Miguel de Icaza

    Emmanuele Bassi has summarized a discussion that happened on IRC after my Gtk+ 3.0 post.

    His blog entry starts by saying that we should not use blogs to discuss and then goes on to discuss. I agree with the sentiment, but IRC is not a good place to do the meeting either as we do not even have IRC logs for whatever channel they were on discussing.

    It is about the ISVs

    Emmanuele seems to think that this is a marketing problem. It is not.

    This is about the effect that the current Gtk+ 3.0 plan has on ISVs.

    KDE has almost no ISVs, Qt does.

    GNOME has almost no ISVs, Gtk+ does.

    Most likely because anything beyond the core toolkit is too unstable in both cases, and because things are too quickly flagged as deprecated with no roadmap in place.

    The Qt situation is much better, as it is commercially designed, and they have existing customers that are paying them money to solve problems for them, not introduce new ones.

    Qt is also designed to be bundled with your application, and you can make your proprietary application not break if the user upgrades his Qt. This is not the modus operandi for Gtk+.

    Having an "abandoned Gtk 2.x" and a "maintained, but API and ABI incompatible 3.x" which will not be available everywhere at the same time is a major turn off for ISVs.

    Creating an ISV ecosystem is incredibly hard, and somehow the new generation of Gtk+ developers is now "OK" to throw away years of work of those that had to work with fewer resources than Gnome has today, fewer developers, a smaller community, slower computers, bigger challenges and yet, managed to keep Gtk+ 2.0 API compatible.

    Perhaps it is not a matter of being "OK", but the new crop of Gtk+ developers does just not appreciate just how much value ISVs are for Gtk+, Gnome and the Linux desktop in the first place. They did not have to fight to get those guys on board on the first place.

    The premises and the conclusions of Imendio's paper would not hold if you were to consider application developers in the mix. But in particular, it seems that the mindset is dangerously close to the rationalization used recently by a KDE spokesperson and lampooned by the Linux Hater Blog.

    What bothered me last night

    What bothered me last night after I blogged was the realization that most of the Imendio developers have switched to OSX as their main desktop operating system (At least rhult, hallski and kris).

    These are great developers, but for their day-to-day activities, they have given up on the Linux/Gnome desktop. Their concern is no longer to attract ISVs, as long as the source compiles with some changes, they will be OK.

    There are certainly some developers at Imendio that still use Linux, and I am sure they have a "Linux partition" to test things out. But when it comes to ensuring the viability of the Linux desktop ecosystem, I do not feel comfortable about wiping out the ISV ecosystem that we have.

    Discussion

    Emmanuele says:

    for instance, I would have loved to have Miguel at the gtk+ team meeting of Tuesday at GUADEC: it would have been a great discussion, I’m sure of it, and we might have had a different state of the union talk.

    I mentioned this problem in my previous blog entry. Even if I had made it to Istanbul on Tuesday, I am merely one of the voices concerned about API stability. "Tuesday Meeting at Guadec" is hardly inclusive:

    There was no Adobe.

    There was no VMware.

    There was no Medsphere.

    There were no Eclipse folks (who have complained previously about the ABI/API issues).

    There was no Gnumeric.

    And these are the ones I can think of the top of my head.

    Senior voices from our own community were missing, like Morten Welinder who has expressed his opinion in a shorter post:

    The best thing about tabs that I can think of is that it will keep certain people from doing more harmful things like changing the gtk+ api for no good reason.

    I do not know who attended the Gtk+ planning on Tuesday, but it was not inclusive, and I suspect it was heavily tilted towards the Nokia-ecosystem.

    From a Nokia standpoint, I understand the desire of dropping older code, get a smaller version of Gtk+ out there, and be able to get a very flashy system at all costs. The iPhone and OSX are strong UIs, and I can understand the desire to compete, but lets not throw the baby with the bathwater.

    Decisions about the future of Gtk+ can not be done without all the stakeholders, and specially without those that have worked for years in keeping the API stability under duress and have built applications on top of it.

    Features

    Emmanuele says:

    Yes, 3.0.0 might not have features. is this bad marketing? probably. so we need to fix this. a way1 to do this would be keeping the 3.0.0 in alpha state, call it 2.99.02 and add features to that until we get to a 3.0.0 that developers will want to migrate to, like the new scenegraph API or the new style API. let’s break with 2.x in style

    As I said previously, I would endorse such a plan if it is shown that fundamental new features could not be implemented in an API/ABI compatible way. Nobody has yet refuted my assessment of the various areas that would not break compatibility, and that covers most of the new features.

    Although I am not the only stake holder, nor the only ISV, nor the only developer.

    Communication

    Emmanuele says:

    communication: there’s a certain lack of communication between the gtk+ team and the users of the library. in my opinion, it’s due to the small number of active developers and to the fact that ISVs don’t really get involved into shaping the platform they are using. they have the source code, and sometimes it’s easier to fix in-house than to communicate and go through the proper process — and this is a structural problem that is caused by the small number of people involved in the said process as well. the gtk+ team needs to open up more, and at the same time the ISVs need to get more involved. sometimes it feels to me that the team is waiting for features, direction and help in the development, while the users of the library are waiting for the team to come up with the perfect plan to fix all the bugs and warts while retaining the whole API and ABI.

    I agree with Emmanuele.

    We setup the GNOME Foundation for things like this; Lets use the GNOME Foundation organizational powers to reach out to ISVs; to organize a platform and Gtk+ summit as it is now clearly needed; Lets include all the stakeholders, not only the active developers.

    Process

    Emmanuele says:

    process: this is connected to the first point - we have a lot of channels, and it might be daunting to actually follow them all; but we're also open in terms of discussion and revision. this is our strength. so please: if you want to discuss, join the IRC meetings on the #gtk-devel channel on Tuesday at 20:00 UTC or send an email to gtk-devel-list with your points. get involved. help shaping the future. don’t stand idly by, and wait for stuff to break to complain.

    Casual discussion on IRC is OK, but that should not be the repository for decision making for such a fundamental component of GNOME and the Linux desktop.

    Perhaps the discussion can start on IRC, but minutes, summaries and decisions should be posted to the Gtk+ developers and users mailing list and given enough time for all the stake holders to participate.

    Additionally, you can not expect that your blog has now reached all the ISVs, not even the gtk-devel-list (which is presumably a mailing list for the developers of Gtk+ not for its users).

    We need to have a mailing list discussion, and then we need to have an outreach program to get to all stakeholders, including the ISVs to formulate a plan.

    Posted on 15 Jul 2008


    Gtk+ 3.0

    by Miguel de Icaza

    The Gtk+ 3.0 proposal being discussed currently sounds like a disaster for GNOME. The reasoning was first articulated in the histrionic Imendio Gtk+ 3.0 Vision presentation done at the Gtk+ Hackfest in Berlin. This is a meeting where application developers were underrepresented, and somehow we have accepted those proposals as the community consensus.

    The proposal goes like this: Gtk+ 3.0 will hide all public fields in objects, provide accessors to these, remove APIs that have been flagged as deprecated and introduce no new features.

    All the actual new features that some people want would come up in future versions. Which features will come is yet to be decided, because nobody knows when and what will be implemented.

    There are lots of technical problems with the proposal, and from my discussions this week at GUADEC it does not seem that the Gtk+ developers have discussed the implications with the users of Gtk+.

    There is a major strategic problem with the plan as well. The most important one is that there is no actual plan for which features will be added, and when these features will be added. There are no prototype implementations, and the idea of first developing the new features in a branch to actually study the code, the implementation and its potential APi breakage is not even on the agenda.

    Basically, we are being told that we should trust that first breaking the API and hiding fields will suddenly enable a whole generation of new features to be implemented.

    But it gets better. There are no guarantees that 3.x will not break the API if the feature in question turns out to require API breakage. Which means that we might actually end up in a situation where there will be multiple API breakages.

    This by all means sounds like a bad plan.

    Towards a Better Plan for Gtk+ 3.0

    I am not against breaking the API for newer versions of Gtk+ if the benefits outweigh the downsides, and the execution presented is not bad. But "3.0 will help us clean up" is not a good enough reason.

    We need:

    • A Clear Roadmap: We need a clear roadmap of which features will be implemented and when they will be implemented. This is the first step to making decisions.
      A clear roadmap would also allow new developers to join the efforts and big companies like Red Hat and Novell to dedicate some full time resources to make some of these feature happen. As things stand today, we are basically being told to "wait-until-3.0-then-we-will-sort-it-out".
    • Working Code: Before a feature for a future version of Gtk+ can be considered a reason to break the API, the technology must exist in the form of a patch/branch.
      This is not new, and should be of no surprise to anyone. This is how the Cairo integration into Gtk+ was done, how the layout changes are being implemented and how every other software product is ran.
    • New API-breaking features must be publicly discussed with the community: Since this will affect every application developer (open source and proprietary) we should get the feedbacks of these communities.
      We could all get as excited as we want about a "gboolean bouncing_text" field in a GtkLabel, but that does not mean that we should break the API for the sake of it.
      Application developers were underrepresented at the Berlin hackfest, and even GUADEC is a microcosm of the ISVs that we had to reach. For instance, I did not see anyone from Adobe, VMware or Medsphere at the conference.
    • Transitional 2.x Releases: For a long-enough period to get distributions to include the code, Gtk+ 2.x should include getter/setter macros to allow software developers to upgrade their source code to work with and without the public fields. To soft-land the switch to a hiding-field Gtk release (this is covered in the Imendio proposal).

    This is by no means a comprehensive plan, it is only the beginning of a plan.

    Lets please avoid inflicting in GNOME a KDE 4.0 (yes, I know its not the exact same scenario; and yes, I know those clock applets are cute).

    Gtk+ Extensions

    From looking at the original Imendio proposal. it seems that plenty of the things they want can be implemented without breaking the API:

    • Animation: doable entirely without breaking the API. The animation/storyboard framework is an entirely new codebase, that would not touch anything in Gtk+. Some widgets might require smoother rendering on changes, but all can be done in an API-compatible framework. public API.
    • Physics: same, add-on.
    • Data-binding: same, add-on.
    • Easier language bindings: same, add-on.
    • Improved back-ends, more OS integration: Can not think of a major issue, but granted, I could be missing something, and Imendio has done the OSX port.

    And my own favorite: killing all Gtk+ theme engines, and replacing it with a Qt-like CSS theme engine. This is not really an API break, as the only consumers of this code are the theme engines, and those we can safely kill and replace with CSS themes, no application code would break.

    Maybe Havoc's proposal requires an API breaking change. And maybe this is worth breaking the API for. But breaking it for no gain, and no prototype to even understand the actual effects post 3.0 is wrong.

    Update: For what its worth, I would lean towards breaking compatibility in 3.0 if it meant 3.0 would include the Havoc-like Scene system. That would make it worthier of a change.

    Update: As usual, the Linux Hater Blog has some great commentary. Some of his feedback on KDE 4.0 applies to our own decision making. Worth a read.

    Posted on 14 Jul 2008


    RIA BOF at GUADEC

    by Miguel de Icaza

    Thanks to Behdad and the organizers at GUADEC, I will be having a BOF/discussion session tomorrow at 4:30pm to discuss a new class of applications built on Silverlight or Flash and how they relate to the future of the Linux Desktop.

    Some of the ideas are clearly derived from Alex and Chris thinking about the desktop; it is heavily influenced by our work on Moonlight; by the recent strides that Adobe has made on creating great looking applications on the web (Buzzword and Photoshop Express) and the future of Gnome.

    Join me tomorrow for a discussion on how to launch an effort to create an open-source, RIA-based desktop applications.

    I am very excited.

    Posted on 08 Jul 2008


    Guadec/Istanbul; Rich Desktop Applications.

    by Miguel de Icaza

    Next week I will be attending the GNOME Developer Conference in Istanbul.

    Looking forward to meet old friends and looking forward to discuss with people the future of rich applications.

    BOF: Does anyone know how to apply for a last-minute BOF?

    If there is some free presentation slot, I would like to hold an informal BOF to discuss these ideas.

    Posted on 04 Jul 2008


    Aaron and Banshee

    by Miguel de Icaza

    Today I walked into Aaron's office unannounced and I just saw him glowing. Like a girl that has been kissed for the first time, like a donkey in the spring.

    A voice in the background was narrating Banshee features, and I was wondering just what is that noise?

    As I went around to his monitor to see what he was watching and listening to, I saw this Linux.com review on Banshee that included a screencast/podcast.

    He was *so* excited that he was actually watching it in three computers at once.

    I could not believe it.

    Three computers at once. One, two and three. All playing the podcast. At the same time.

    I was speechless.

    From economic mastermind to flattered developer.

    He said to me: "I have never seen a production of such caliber" as he listened to the background music in the above podcast.

    I just stood there quietly. Unsuspectingly recovering the Twix office supply.

    Posted on 03 Jul 2008


    Moonlight 0.7 Installers

    by Miguel de Icaza

    Yesterday I forgot to point to the actual page to install the Moonlight plugins.

    You can download the latest plugin from here. Just like the last release, these plugins are compiled without ffmpeg support.

    The source code is available here.

    You can track the progress and try out a few applications yourself from our Moonlight Status page.

    Posted on 03 Jul 2008


    Moonlight 0.7 is now Available

    by Miguel de Icaza

    A new release of Moonlight is now available. The team has been working very hard on improving the performance of Moonlight as well as improving our compatibility with Microsoft's Silverlight.

    Get your copy here. Source code is moon-0.7.tar.bz2.

    This release will also work with both Firefox 2.0 and Firefox 3.0. We have also switched our installation system to use signed XPIs, but we will also require a browser restart (we could not figure out a way of avoiding this).

    Some of my favorite work that happened on this cycle is the effort to improve our multi-browser support, work towards supporting WebKit and Opera is underway and will improve over time. This work benefitted from our own work to support both Firefox 2.0 and 3.0 in the plugin.

    Windowless mode (the mode that allows blending of HTML content and Silverlight content) is vastly improved but is only available on Firefox 3.0. This is a feature that is used extensively by Silverlight designers.

    More details from the release:

    • Webkit loads the plugin (kangaroo, lewing)
    • The stream/downloader/request/response logic (used for downloading media) has been been almost entirely moved from the browser bridges into libmoon, with the browsers providing subclasses. (kangaroo, sde)
    • Finally add argument checking to all wrapped plugin objects (fejj).
    • Windowless mode fixes (lewing, toshok)
    • Plugin event handling fixes (lewing)
  • Engine
    • Many clock/animation framework fixes. We now pass both animation matrix tests, and many, *many* other bugs (and regressions) have been fixed. (mdk).
    • Bug fixes in the Stroke{Collection}.HitTest and Stroke{Collection}.Bounds code (toshok, sde).
    • Namescope merging fixes (sde, jackson)
    • Parser fixes, and changes paving the way for 2.0 work (jackson)
    • Fix mouse event bubbling behavior (toshok)
  • Media
    • Big, big strides in our media framework and the various (file, http, mms) downloaders, (fejj, rolf, kangaroo, fer)
    • MMS stream selection (kangaroo)
  • Performance
    • Shape caching and bounds computation reduction (spouliot)
    • Geometry bounds work (spouliot)
    • Fast path for position updates (Canvas.Left/Canvas.Top) (toshok)
    • Improved temporary cairo surface bounds (lewing)
    • Glyph rendering speedups (fejj)
    • Resort by ZIndex as a dirty pass (toshok)
  • Silverlight 2.0
    • work is progressing. A very simple 2.0 application successfully ran. (miguel, jackson, sde).
  • Posted on 02 Jul 2008


    Hanging out at Microsoft

    by Miguel de Icaza

    I will be at Microsoft on Thursday and Friday, and only have meetings on Thursday afternoon.

    I would love to meet other hackers. If you want to meet, discuss, talk, drop me an email: [email protected]

    Posted on 18 Jun 2008


    Office Justice, at Last!

    by Miguel de Icaza

    For the past few weeks, since Aaron Bockover found out that some of us like Twix. He then bought all the 70 cent twixes in the vending machine at the office and started reselling them for a dollar.

    Michael struck back by bringing fruits and vegetables today. To which Aaron replied "I hope those fruits rot".

    Today the machine was refilled:

    This has brought finally an end to the empire of speculation from this rapacious market meddler. With at least 12 new twix bars injected into the local office economy we should enjoy a smooth sailing for the rest of the week.

    Update: Some sources inform me that Aaron was trying to create an artificial scarcity in the office by buying the remaining 12 twixes, he hit a glitch in the machine, he got two bars for the price of one.

    This is not bodding well for the local Twix aficionados:

    Update 2: Capitalism knows no limits:

    Update 3: To add insult to injury, he is now selling individual Twix bars for 70 cents each, or a full pack for 1 dollar.

    Update 4: We will be picketing Aaron's office at 4pm this afternoon:

    Posted on 17 Jun 2008


    oh. hai.

    by Miguel de Icaza

    People at the office became LOLcat fans by reading every day i can has cheezburger a few months ago. It was harmless entertainment.

    But recently I have discovered that LOLspeak has started to creep into our codebase.

    Consider the IHasSourceView interface or the ActiveSourceCanHasBrowser property.

    What other naming conventions should we adopt?

    Discuss.

    Posted on 17 Jun 2008


    OpenOffice-based applications with Mono and MonoDevelop

    by Miguel de Icaza

    The entire OpenOffice suite is built on top of a component technology called UNO (which is inspired by COM, but heavily extended). Pretty much all of the functionality in OpenOffice is exposed through some UNO interface, and although the native interface is built on top of C++ many bridges have been created over the years that expose UNO to a variety of languages, runtimes and object brokers.

    A few years ago, Sun implemented a .NET bridge for UNO. This bridge allowed .NET developers to script, extend and reuse open office as a library from C# or any other .NET language.

    A couple of years ago, Michael Meeks and the OpenOffice community ported the bridge to work with Mono which allows developers to create OpenOffice based solutions using any of the Mono programming languages (C#, Boo, IronPython, IronRuby, F#, VB, Nemerle and so on).

    But even if the engine existed, it was not properly installed in the system and getting a C#-based OpenOffice solution required lots of Unix skills, the kind of skills that would likely be in short supply by those interested in OpenOffice automation. We fixed this in this last development cycle, so now a Novell OpenOffice installation will have everything you need.

    Michael Hutchinson, one of our MonoDevelop hackers has put together the missing pieces to simplify the process. He has created the solution templates necessary to create these solutions, and packaged them as a Mono.Addin for exiting MonoDevelop users.

    To build OpenOffice solutions, you need to install the OpenOffice addin for MonoDevelop. To do this, follow these steps.

    Activate the Add-in Manager

    Select Templates.

    Select the OpenOffice Automation Samples

    Complete the installation for the Mono.Addin, once you are done, create a new Solution:

    You can skip this step, and get back here later, but you might want to select "Unix integration":

    Take advantage of code-completion:

    This is what the default sample looks like, you can use this as a foundation for your program. Since this is a COM-based API, it is not an API that is easy to discover with code-completion popups, so we figured it was best to ship full working samples:

    Build and run your application by hitting F5:

    Your OpenOffice solution in all of its glory, this is from the samples that we distribute as part of the templates:

    Improving the OOo API

    Sadly, the OOo API exposed by UNO does not look or feel very .NET-ish at all. It is a COM-based API and is not very discoverable. Code-completion will sadly not be of much help without the samples.

    Additionally, the conventions used in the code are not very .NETish, so it will feel a little bit odd.

    There are a few options here, we could either massage the .NET exposed API into something more .NET-friendly, or we could create a wrapper around the UNO API for most common usage scenarios. We are not sure what would be best.

    We believe using a Cecil-based tool-massager we could rewrite the cli_types.dll library to get a more .NET-ish API:

    • Rename classes and methods to follow the casing conventions for .NET.
    • Turn setters and getters into properties.
    • Change the XBlah convention into IBlah convention for interfaces.

    This still leaves the issue of interface identity to be solved where an underlying object that always implements IA, IB and IC interfaces is usually only exposed as one of those interfaces, and you must do an explicit cast to the other interfaces to access the other features.

    Thanks to the Michaels for all the hard work.

    Posted on 12 Jun 2008


    LinuxHater's blog, I am a fan

    by Miguel de Icaza

    I love the LinuxHater's Blog. This is a must-read RSS feed.

    It is funny in a way that xkcd is funny to Unixers. Whoever is writing that blog has extensive experience on Linux and enviable writing skills.

    A first class grilling/roasting of Linux and the Linux community. It should help keep things in perspective.

    Some good starting points:

    Posted on 12 Jun 2008


    Gnome-Do 0.5: "The Fighting 0.5!"

    by Miguel de Icaza

    Another beautiful desktop application, this one by David Siegel. I have become a fan of it in the last few months since David started working on it:

    Gnome-Do is another very polished application, one that shows a lot of love and care for taking care of the small details. David just released a new version a couple of days ago.

    Gnome-Do is inspired by Quicksilver from MacOS and like Banshee, it uses Mono.Addins extensively to make the application more useful:

    Go to David's page for more details and screenshots on all the new features (Skype, Flickr, Twitter, IM, Google Calendar integration; community plugins, configuration and more).

    Posted on 11 Jun 2008


    Banshee 1.0 is out.

    by Miguel de Icaza

    Banshee the Gtk#/Mono based media player for Unix has finally reached its 1.0 status.

    Congratulations to the Banshee team for this release!

    This is one of the finest applications built with Mono, Gtk#, GStreamer, Mono.Addins, DBus#, C# and Boo. The Banshee developers have worked very hard in creating a very polished UI and have paid a lot of attention to the smallest details to provide an enjoyable user experience.

    This really should be considered Banshee 2.0 as SLED shipped two years ago with Banshee 0.10, which was already a stable product.

    Since that first public release, a lot of work went into improving the user experience by making Banshee faster and cope better with large libraries. This required new custom Gtk# widgets (these are reusable widgets, with a model-view-controller system, and part of the Banshee Core) as well as rethinking the way that storage was handled by pushing as much work as possible to the SQLite layer and never loading all the data in memory.

    The full list of the features will give you a better idea of what this player can do.

    Plugin Architecture, a Foundation For Experimentation.

    This is an architectural overview of Banshee's Core:

    Banshee is split up in various components, but most importantly the core does very little work. Pretty much all of the functionality for the media player is implemented as Mono.Addins. Mono.Addins provides services that allow users to install new extensions for Banshee to add new features to the core.

    To make it simpler to develop plugins we will be shipping MonoDevelop and VisualStudio templates to get developers started on creating new plugins for Banshee.

    For example, Alan McGovern, the creator of MonoTorrent a bittorrent library for Mono and .NET extended the Podcast functionality in Banshee to download your podcasts using Bittorrent (this extension is not part of the 1.0 release).

    In this screencast you can see how a download for a Democracy Now podcast goes from 1.5k/s to 650k/s (OGG, low-quality WMV).

    Windows

    In the next couple of weeks we will package Banshee for Windows to expand the reach of Banshee to more users. And as part of this distribution we will also distribute templates for Visual Studio developers to create their own extensions.

    Posted on 10 Jun 2008


    Unity3D now available for the Wii

    by Miguel de Icaza

    Unity3D has announced that their game creation tool is now available for Wii developers. Unity lets you script your games in Boo, Javascript or C# with Mono.

    Congratulations to Joachim, David and the rest of the team at Unity3D for getting this working.

    Posted on 05 Jun 2008


    More Gtk# Widgets

    by Miguel de Icaza

    I had forgotten about Medsphere's LGPLed Gtk# widgets, the Medsphere Widgets.

    Today Brad blogged about them.

    This is my favorite:

    Posted on 02 Jun 2008


    Wow. Adobe Buzzword

    by Miguel de Icaza

    I am blown away by Adobe's Buzzword web-based word processor.

    It feels like a great native application, with great widgetry and lots of attention paid to the details.

    Posted on 02 Jun 2008


    Holly Gtk Widgets

    by Miguel de Icaza

    Daniel has announced his "Holly Widgets" for Gtk#. A collection of useful Gkt# widgets. The widgets also support MonoDevelop/Stetic integration.

    The code is available from http://code.google.com/p/holly-gtk-widgets.

    Picker screenshots:

    Font picker.

    Date and time picker.

    Color picker.

    Nice extensions:

    Baloon Tooltips.

    Regular expression validating entries.

    IP address entry.

    Combo box with file system navigation.

    Simplified API wrappers:

    A simple combobox.

    A simple list (avoids TreeView binding, and supports Measure/Draw on a per-item basis).

    Simplified tree view API.

    Combo box with tree view.

    Daniel also has nice samples and documentation for all of his new widgets.

    Posted on 01 Jun 2008


    Custom Controls in Gtk# Article

    by Miguel de Icaza

    CodeProject has a nice article by Olivier Lecointre on how to write custom Gtk# controls.

    Sample widget from the article.

    Oliver writes:

    I recently made the switch to Ubuntu and I am quite delighted with it. I develop mainly on .Net and my dependence on some Windows tools was the sticky point that made me wait this long. This is now not really an issue, thanks to the great work of the Mono and MonoDevelop teams, and the related libraries like Gtk#, Cairo and Pango.

    Mono brings the .Net platform to Linux and MonoDevelop offers a good alternative to Visual Studio, making the development of GUI applications on Gtk desktop almost painless.

    I wrote a cooperation tool that I use on a daily basis and my first goal after the switch was to port it over with Mono and Gtk#. After a few adjustments caused by the fundamental differences between Windows.Forms and Gtk#, I have to admit that the port of the application was a lot easier that I initially thought; I replaced the UI controls by widgets, set the various forms to use the Gtk# layout, and that is pretty much it. The rest of the non UI code worked as expected with an overall good performance.

    An area that gave me the most difficulty was the usage of custom controls with a behavior that is different from the base Gtk components. This is the focus of this article.

    Posted on 01 Jun 2008


    Mono Embeds Nabble

    by Miguel de Icaza

    Mono has always been developed on mailing lists like pretty much every other classic open source project. But many of our younger or migrating users are more used to Web-based forums and have always wanted to have a forum-like interface for the Mono mailing lists.

    Thomas Wiest and Joseph Hill have just finished the integration Nabble into the Mono web site. Now people can access all of the Mono mailing lists with a Forums UI.

    Messages posted in the forum will go to the appropriate mailing list (either hosted at lists.ximian.com or groups.google.com), and messages posted on the mailing lists get reflected on the forums.

    You can access the forums http://www.go-mono.com/forums here.

    Summary

    Message View

    Enjoy!

    Posted on 19 May 2008


    Silverlight 2.0 Hello World

    by Miguel de Icaza

    Silverlight's 2.0 deployment model changed significantly from the 1.1 alpha model. In the past you would load a XAML file, and then on demand load any managed libraries referenced from the XAML file before parsing could continue.

    With Silverlight 2.0 the model has changed. One of the downsides is that now you deploy things as a ZIP file with a manifest file which feels obnoxious. On the upside, the loop "try-to-parse-or-keep-requesting-files-from-the-browser-until-all-dependencies-are-downloaded" is now gone. Now you get a zip file asynchronously, unpack it, load all the assemblies in the zip file, create an instance of the class specified as the entry point, and off you go. No more latency.

    This hopefully also solves an obnoxious pattern that was common in 1.1: calling createFromXaml from Javascript could hang execution while Moonlight waited for the browser to fetch a missing assembly.

    This week Silverlight 2.0 said hello in Linux:

    This corresponds to the standard template with the content of the user control set to a TextBlock.

    There are some peculiar patterns in Silverlight 2.0 instantiation model. Instead of creating objects from a XAML description, an object of a known-type is first created, and then the object is initialized from a XAML file. Your object is supposed to call LoadComponent ("my-xaml-definition") to initialize itself.

    Posted on 18 May 2008


    Games Worth Playing

    by Miguel de Icaza

    As you might know, I do not consider myself a gamer although I now understand the Penny Arcade cartoon.

    I have done my best in the past year to increasing BestBuy and Game Stop share holder value by dumping thousands of dollars in my quest to be entertained by video games.

    The games that I actuall enjoyed playing are very few:

    • Wii Sports, but the fun fades away after a couple of months.
    • Metroid Prime 3, on the Wii, fantastic controls.
    • Ratchet and Clank on the PS3, incredibly fun.
    • Bioshock on the xbox360, by far, my favorite game.
    • Ratchet and Clank on the PSP, just because I love the PS3 version so much.
    • Sudoku on the DS.
    • Update: I forgot the incredibly fun Simpsons game.

    I continue to refuse to play propaganda games and do not enjoy sport games, racing games or fantasy games. I could not get into the games in the Orange Box, even if everyone loves it (Portal was ok). And I have not tried Rock Band or Guitar Hero because I do not want to have a drumset ont he living room.

    I guess I like games that have a developing story and are not very repetitive.

    Is there anything like Bioshock on the game pipeline?

    Posted on 18 May 2008


    Google IG and Sudoku

    by Miguel de Icaza

    A few months ago, am not sure how, but Nat talked me into getting a widescreen laptop. I no longer remember what were the touted benefits of it, but this warpig of a machine is both buggy and heavy.

    Since the warpig is just too heavy to carry home every day (and also requires a base station hooked up to high-def output to stay at 2.4 GHz of speed) I just leave it at work and use my five year old computer at home to surf the internets. When I bought the machine I remember distinctively describing it to friends as "a silent computer". Five years later every time I load a new web page the fans make as much noise as the construction site across the street. Was I deaf back then, or did the fans become dirty and loud?

    I am a fan of Google IG, and recently I discovered that they have a tiny IDE that you can add to your Google IG page. So I decided to try to write a Silverlight Sudoku application entirely using that tiny editor in my old computer at home:

    I actually cheated a little and used Emacs here and there every once in a while.

    But I ended up with this cute Sudoku/Silverlight application that has exactly one puzzle:

    I am very proud of my one-puzzle Sudoku because it has some of the features that I like from Big Bang's Sudoku (click to flag, double click to set the value, hints) and some cute and simple animations that I wrote in xaml and shows my allegiance to the clean and simple configuration religion:

    I published it on IG as "Moonlight Sudoku". To add it to your IG home page, go here and click "Add to Google".

    Now the only problem with it is that it seems to work just fine with Firefox but seems to have problems with IE and Safari. I must be doing something wrong with Javascript, but I have no idea what it could be. If you can find the bug, let me know so I can make it work on other browser.

    My toy sudoku only has one puzzle, this is clearly a design decision to prevent people from becoming addicted to Moonlight Sudoku. But if you know of a source of http-fetchable Sudoku puzzles, let me know, as I might want to revisit this design decision to include more puzzles.

    You can download the self-contained module (ig + html + xaml + js) from here. You might also need the Silverlight.js file.

    In clear violation of David Mamet's advise to the aspiring actor, I am now going to act surprised:

    In other news, Firefox 3 RC1 came out, and the release notes have nothing to say about the bugs that prevent Silverlight from working with it.

    Posted on 17 May 2008


    Moonlight - Full Packages Available from Packman

    by Miguel de Icaza

    Larry Ewing pointed this out.

    PackMan now has full packages of Moonlight for OpenSUSE users (it includes ffmpeg codecs).

    You can use these packages to check some videos at channel9 or see the dual-stream updated videos from Mix 08. Keep us posted about bugs and limitations.

    Posted on 17 May 2008


    First Moonlight Release

    by Miguel de Icaza

    Today we are making the first public release of Moonlight, supporting the Silverlight 1.0 profile for Linux. The release comes in two forms:

    • No-media codecs supported, but easy to install: head to http://www.go-mono.com/moonlight and click on the cute installer for Moonlight. This currently hosts builds for Linux x86 and x86-64 for Firefox.
    • Source-code compilation, but you can optionally compile FFMpeg codecs yourself. To do this, download our moon-0.6.tar.bz2. And follow the build instructions.

    Update: I apologize for the confussion; This is not Moonlight 1.0, this is the first source code release that we are making of Moonlight for interested contributors and developers. This release is not even a Beta release, as we are not yet feature complete (missing components in media codecs, the media pipeline, as well as fixing about 70 known bugs). Apologies for any confussion.

    Although Moonlight works on Firefox 2 and Firefox 3, recent changes in Firefox 3 prevent Silverlight and Moonlight from working (For details see #432371, #430965). There is a user contributed Greasemonkey script that will work around this bug for some sites (requires Greasemonkey).

    Windowless: Moonlight supports "windowless" mode, a mechanism that allows Silverlight content to blend with other HTML ements on a page. This is only supported by Firefox 3, users of older versions of Firefox might run into Silverlight applications and web sites that do not work correctly as many Silverlight applications depend on this functionality (Flash sites have the same problem with Firefox 2).

    1.1 and 2.0 support: This release only supports the Silverlight 1.0 profile. The 1.1 support is no longer maintained and the release happened at the time when we are transitioning the APIs to 2.0.

    If you find bugs, please file them for us to fix.

    Posted on 13 May 2008


    Mono's Winforms 2.0 is now API Complete

    by Miguel de Icaza

    Jonathan Pobst has posted the update on our Windows.Forms 2.0 work.

    Some interesting points from his blog entry:

    • We are now API complete, which means that our public API is exactly the same as .Net's (all 12,776 methods).
    • The first check-in to our current Winforms implementation was on July 8th, 2004. It took 4 years to get here, and 6,434 individual SVN commits.
    • The toolkit is made up of 115k lines of code.

    Also:

    • We currently have three backends: X11, OSX and Win32.
    • There is a Google Summer of Code effort to improve our theming and OS integration this summer.
    • Winforms 2.0 will also debut support for XIM to allow input for CJK character sets.
    • We have a nice binding to Gecko as our implementation for WebControl which we started last year (currently we are limited to Gecko on X11 though, no Mac support yet for this WebControl).
    • The Desktop team at Novell is adding UI Automation and accessibility support to Windows.Forms integrating it with Gnome's ATK. They have a full team dedicated to that goal.
    • R-to-L support: It is not an priority for us at this point, but it would be nice if someone with RtoL needs were to complete the work that Sebastien did last year to use Pango inside GDI+.

    Winforms 2.0 was the last piece of code holding off the Mono 2.0 release. We anticipate that there will be bugs, so we want to encourage folks to submit their bug reports and to evaluate the portability of their sofwtare using our Mono Migration Analyzer tool.

    Congratulations to the Winforms team, and everyone that provided bug reports, test cases, contributed code, tested and worked with us to bring it to where it is today.

    Posted on 13 May 2008


    Cross-platform, standalone Silverilght Applications

    by Miguel de Icaza

    Tamir Khason published an interesting approach at hosting standalone Silverlight applications.

    His solution is a Windows.Forms application that hosts a Windows.Forms.WebControl and inside the WebControl he hosts Silverlight.

    Unlike my proposal for standalone Silverlight Applications that is currently Moonlight-specific (and currently limited to Linux/X11) this approach works on Windows with .NET and with Linux using Mono and Moonlight:

    Left side: .NET hosting WebControl and Silverlight on Windows; Right side: Mono hosting WebControl and Moonlight running on Linux.

    In addition to hosting the WebControl for hosting Silverlight, a thread is running to dispatch http requests locally using HttpListener. HttpListener is an embeddable HTTP server that is part of the class libraries, and exposes a very limited API. You can host ASP.NET with HttpListener by doing the bindings by hand, or you could use our Mono.WebServer library (part of our XSP/mod_mono distribution) to allow your applications to have a fully hosted ASP.NET server.

    Mono.WebServer is what iFolder uses to embed the ASP.NET server to expose SOAP-based WebServices to clients.

    Of course, this currently does not work on MacOS X as we do have no implementation of WebControl for Windows.Forms on OSX, something that a contributor might want to look into.

    You can get the source for the sample from Tamir's page.

    Posted on 06 May 2008


    Consulting Gig at Novell

    by Miguel de Icaza

    We are looking for consultants to work on a six to nine month project at Novell to write a prototype for a Visual Studio addin in C# or C++ that will connect Visual Studio and its debugging infrastructure to a remote Linux machine running Mono and the Mono Debugger.

    If you are interested in working with us in this project, you must have good C# and C++ skills, experience with networking and protocol design, knowledge of COM and assembly language programming are pluses.

    We are looking to bring two consultants for the duration of this project. If you are interested, please click this link and attach your resume, pointers to some existing projects of yours and so on.

    Posted on 06 May 2008


    Rodrigo Kumpera Completes the Mono Verifier

    by Miguel de Icaza

    Rodrigo Kumpera, one of our VM developers has completed the instruction verifier for Mono's virtual machine. This effort started in June of last year.

    The verifier is a late addition to the Mono VM as it was not a priority to run untrusted code inside the virtual machine.

    But as Mono user base grew, it became important to support this feature. Second Life needs this to run potentially malicious code that is uploaded by a user, and we need this to provide an execution sandbox when running Moonlight on the browser.

    Rodrigo did this work in stages: the first stage was to add support for the 1.0 virtual machine opcodes. Once that was done, verificiation for the 2.0 generic instructions was added.

    This is an important milestone in our support for Silverlight 2.0 support on Linux.

    Congratulations to Rodrigo for his work!

    Posted on 30 Apr 2008


    Mono and the Google Summer of Code 2008

    by Miguel de Icaza

    This year Mono is participating again on the Google Summer of Code. A list of the applications that were accepted is available at Google's page.

    This year the quality of the applications and the new ideas submitted (aside from those we proposed) was fantastic. They were too good, and it was very hard to select the final projects (we wanted to pick 33 of the 75 projects proposed, but there were only 15 slots available).

    Posted on 28 Apr 2008


    LinuxersForObama

    by Miguel de Icaza

    Linuxers, BSDers, FLOSSers, GNUers, OSSers, Mysqlers, Gnomers, KDErs, Monoers, Javaers, PHPers, I invite you to donate to Obama through the LinuxersForObama campaign hosted at My.BarackObama.com web site.

    If you are a US citizen, or a legal immigrant (green card holder), you can contribute 10, 20, or perhaps 2,300 to the Obama campaign.

    You can donate here http://my.barackobama.com/page/outreach/view/main/LinuxersForObama.

    I called the campaign "LinuxersForObama" because its short. I know it should have been called "GNULinuxBSDApacheX11PythonPerlMySQLPostgressPerlRubyJavaRailsMonoForObama", but it was getting hard to type.

    And if you are a Windowser or Mac()er, but you like how Linuxers stick it to the man, feel free to donate to my LinuxersForObama campaign.

    In retrospect, I should have created one campaign per product, and use that to settle once and for all, which is the best FLOSS project.

    Posted on 18 Apr 2008


    Standalone Silverlight Applications

    by Miguel de Icaza

    Last year we created a framework to run Silverlight applications as native applications. At the time we called those applications moonlight desklets.

    The desklets are Silverlight applications that run in standalone mode, with full access to the entire Mono API stack (as opposed to be limited to the .NET subset for the web) and that can optionally render without frames. This is a screenshot from three desklets running on Linux from last year:

    Beyond hack-value, there are in my opinion many reasons why this is valuable. Powerful .NET programming model, powerful graphics and animation framework, reuse the same code base for Web and desktop development, and a sandboxed execution model.

    Many people have asked us privately about this.

    The Magical mopen Command

    To run a standalone desklet, all you have to do run the mopen command, like this:

    	$ mopen ruler
    	

    The above command will look for a directory called "ruler" listed in your PATH, and if the file default.xaml lives inside that directory, it will open that file up. This XAML file can in turn reference managed code.

    We did this so applications could be deployed in directories, very much like they are deployed on MacOS. The rules are simple, applications should be self-contained, keep all their data relative to their executable base directory, the foundation for this started with our application deployment guidelines.

    It also draws inspiration from the bundles from MacOS X and the `open' command there.

    How does this work? Lets consider our enterprise pixel measuring tool, the Moonlight ruler, which is made up of two files:

    • default.xaml, the basic XAML container, it references the managed code in ruler.dll
    • ruler.cs contains the code to draw the ruler.

    This is what it looks like when you run it:

    Awesome Moonlight desktop ruler.

    Details

    At LugRadio Live this weekend in San Francisco I decided to turn my Mono talk into a Moonlight talk, and I discussed some of the things that we have been doing with Moonlight.

    Let me start with this artist rendition of Moonlight's Core:

    The orange pieces were built by the Mono/Moonlight team at Novell. The green pieces are provided by Microsoft (and only for use in the browser context, we will get back to this later) and the blue stuff is stuff that we consume from the community.

    The Moonlight Core provides the high-level canvas, the XAML loading, the animation framework, timers, media streaming and demuxing and event dispatching. It also has very few dependencies, it uses Cairo to render graphics and interfaces with our media pipeline and needs codecs to do video (currently ffmpeg if you build from source, or Microsoft's when we release).

    Our engine today has three frontends:

    The most important one of course is the plugin front-end, the one that is embedded into Firefox and renders the Silverlight content.

    The other front-end is a Gtk# widget, a simple Gtk+ host that embeds the Moonlight Core into a widget and allows developers to embed any kind of XAML content (including managed code) inside it. I did a demo of Banshee embedding a grid of video players at LugRadio.

    This is a widget that can be used to spice up your application. If you feel that you need some bling for your application, some gratuitous animations and special effects, the GtkSilver widget can help you. Using it is trivial:

    	using Gtk.Moonlight;
    
    	[...]
    	void SetupWidget ()
    	{
    		Application.Init ();
    	
    		GtkSilver surface = new GtkSilver ();
    
    		surface.LoadFile ("MyAnimation.xaml");
    
    	        
    		Window w = new Window ("Demo");
    		w.Add (surface);
    		w.ShowAll ();
    		Application.Run ();
    	}
    	

    If you want to get a handle on specific objects, you can just use the FindName method on the surface's canvas:

    
    	MediaElement handler = (MediaElement) surface.Canvas.FindName ("MyVideoPlayer");
    
    	// Start playback.
    	handler.Play ();
    	

    And the third interface is the fabulous mopen command that we previously described (which is conveniently implemented on top of GtkSilver; yes, we know, we are geniuses).

    The Two Stacks

    As you might suspect from reading about GtkSilver and the browser, the Moonlight managed stack (that is, the C#/.NET APIs) actually comes in two shapes:

    • Browser API: This is what people creating Silverlight applications are familiar with. Its a subset of .NET 3.5 and it has limitations as to what you can do: no local file system access and a sandbox that encapsulates all the actions of Silverlight applications.
    • Full API: We also offer the full API, this is our implementation of .NET 3.5 that has been augmented with the Silverlight APIs.

    As you can guess, GtkSilver and the desklets today use the Full API; And our browser plugin uses the more limited Browser API and the security sandbox.

    We will get back to this soon.

    Adobe Air

    Adobe AIR has a great experience for installing native applications on your system, and they are cross platform (Windows, Mac and Linux).

    I found a cute twitter application built with it, and have been a happy user of it for a few weeks (see screenshot).

    I have no idea how extensive the AIR APIs are, whether they are sandboxed or whether they provide full access to all the APIs like our Moonlight Full API provides, but you can build some cute desktop applications with it.

    I like it.

    Silverlight Desktop Apps

    Part of the reason why our Desklets did not evolve much in the last year was because there were no controls for them. You could build your own, but that was a lot of work, and it was hard to share, and most importantly, everyone knew that Microsoft was going to ship controls for Silverlight.

    Now that controls are part of Silverlight 2.0 and that most of the high-level controls have been open sourced and that they are incredibly powerful and great to skin it makes sense to think again about native desktop applications using Silverlight.

    We as a team can certainly create a Linux-only platform for these controls, and live happily with mopen, but we would miss an opportunity of having something cross platform like AIR is.

    Ideally, Microsoft would follow our direction and implement and distribute the same mopen functionality that we have for Windows and Mac. This would ensure maximum adoption of standalone Silverlight-applications.

    In a less ideal world, we (the Mono/Moonlight community) could port Moonlight's mopen command to Windows and MacOS, but with none of the power of influence that Microsoft has.

    Directions and Challenges

    Michael Hutchinson has suggested that we should have an minstall tool in the same spirit of mopen. This tool would take care of installation on each platform, creating shortcuts, desktop links and using the right icon.

    Moonlight currently runs on systems with Cairo, and requires Gtk+ for event processing. It might be interesting to get it running on Win32, OSX and others with the tiniest footprint possible (bundling Gtk+ for Windows and MacOS for native apps sound large).

    Another alternative is to use Microsoft's Silverlight on Windows to implement `mopen' as opposed to porting Moonlight. Apparently its possible to instantiate it through COM in some form, but that would still leave OSX out.

    The codecs that Microsoft will distribute for use with Moonlight are limited to use inside the browser. This will prevent Moonlight's standalone applications from playing back any vc-1, wmv, wma, mp3 content.

    We could add OS-specific codecs; On Linux we could call into Fluendo's commercial codecs, on Windows and Mac use the system codecs.

    But we could also standardize on free video and audio codecs for the desktop edition: add support for the free video and audio codecs (BBC's Dirac, which will become VC-2, Vorbis and Theora).

    We are currently busy doing Moonlight 1.0, and then we will get busy doing 2.0. So we will not be able to spend time on any of these projects for quite some time, but these are projects that developers in the community could work on or companies interested in pushing Moonlight in that direction.

    Discuss.

    Posted on 17 Apr 2008


    Mono C# compiler now also MIT X11 licensed

    by Miguel de Icaza

    I know, so exciting, a license.

    We are dual-licensing under this uber-liberal license because:

    We are changing the license to allow parts of the compiler to be reused as part of MonoDevelop, our LINQ class libraries and to embed it in ASP.NET.

    In MonoDevelop: This will allow the compiler to be used to improve code-completion to support C# 3.0 as well as improving the heuristics when offering completions. This will reuse the front end and parts of the backend.

    Compiler hosting inside ASP.NET: This will embed the whole compiler into the ASP.NET process, eliminating about one second for each compilation of a piece of code. In the past, for each request for an uncompiled resource, we would have to call the compiler, wait for its output and then load the output. This typically shaves between 0.7 to 1 second on those scenarios, ideal to improve the developer experience.

    LINQ Class Libraries: This will allow us to reuse parts of the compiler in our System.Core implementation for LINQ for the current 3.5 generation and upcoming generations. Many corner cases are handled by the compiler, and we will now be able to lift those pieces. This will mostly use the backend of the compiler.

    Posted on 16 Apr 2008


    Detailed InvalidCastException Goodness Comes to a VM Near You.

    by Miguel de Icaza

    When you perform an invalid cast in Mono (trying to force one type into another with a cast) or JIT would throw an InvalidCastException. If you are lucky, you would get a line number (compile with -g, run with --debug), but if you had a complicated expression you would have no idea what the problem was.

    A few weeks ago, in support of Marek's growing pains in tracking down some bugs, Zoltan checked in support for a new feature in the Mono runtime: --debug=casts. Now, When you pass this option to the runtime, it will report the type that you are trying to cast. This feature is not activated by default as it generates more code, and consumes more memory.

    This sample:

    	$ cat demo.cs
            class Test {
                    static void Main ()
                    {
                            string s = "hola";
                            object j = s;
    
                            object d = (Test) j;
                    }
            }
    	$ mono demo.exe
    
    	Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
    	   at Test.Main () [0x00000] 
    
    	$ mono --debug=casts demo.exe
    
    	Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Test'.
    	  at Test.Main () [0x00008] in /tmp/demo.cs:10 
    	

    Awesome.

    Posted on 16 Apr 2008


    Generic Code Sharing: Good and Bad News

    by Miguel de Icaza

    Mark Probst has been working for the past few months on adding support to the Mono JIT to support generic code sharing. This is a technique that allows the JIT to share the same code generated for two differently instantiated types, for example:

    	class Stack<T> {
    	    T [] data = new T [10];
    	    int top;
    	
    	    public void Push (T t) { data [top++] = t; }
    	    public T    Pop  ()    { return data [--top]; }
    	    public int  Count      { get { return top; } }
    	}
    
    	class Test {
    		static void Main ()
    		{
    			Stack<long> ls = new Stack<long> ();
    			ls.Push (10);
    	
    			Stack<Test> ts = new Stack<Test> ();
    			ts.Push (new Test ());
    	
    			Console.WriteLine ("Count={0} {1}", ls.Count, ts.Count);
    		}
    	}
    	

    The JIT must generate different code for the actual Stack instantiation, one must contain a pointer (32 bits on 32 bit machines) and another one must contain 64 bits. So the structures are different in memory, and so is the implementation for Push and Pop.

    But certain methods do not depend on the datatype sizes (for example) and could be shared regardless of how their container type is instantiated.

    Mark posted the Good news, the bad news and his strategy to deal with the bad news. Am going to limit myself to the good news, and you can click on the link and read the thread for the bad news:

    Now for some interesting statistics.  Apart from the runtime's test
    suite I've used three other test suites/benchmarks, namely IronPython
    (running pystone), Nemerle (compiling its own compiler) and FSharp
    (compiling and running a Hello World program).  Here are the
    Good-News-statistics.  The numbers given are "no sharing / sharing"
    and have been collected on a 32 bit system:
    
    IronPython
      Methods compiled: 3614 / 3368
      native code space used: 719k / 691k
    
    Nemerle
      Method compiled: 7210 / 6302
      native code space used: 2001k / 1943k
    
    FSharp
      Methods compiled: 15529 / 11431
      native code space used: 2193k / 2062k
    	
    	

    See his post for the rest.

    Update: Mark informs me that the "bad news" that I conveniently left out of this post (memory consumption in FSharp for bookkeeping was 600k of memory) has now been fixed.

    The 600k of bookkeeping in the FSharp test has been now turned down to 14k. So we can scratch that "bad news" part. Congratulations Mark!

    Posted on 16 Apr 2008


    Open Source Powershell Implementation

    by Miguel de Icaza

    This weekend ath the Code Camp in Waltham, Igor Moochnick announced the release of pash his open source power shell implementation. It currently runs on Linux, MacOS, WindowsCE and Windows.

    pash on Linux.

    Igor's project is hosted on sourceforge.

    A few years ago Ryan Paul from Arstechnica wrote a nice guide to powershell (when it was still called Monad Shell).

    Posted on 07 Apr 2008


    OOXML: The Wins

    by Miguel de Icaza

    Regardless of where you stand on the outcome of OOXML becoming an ISO standard, it is worth pointing out that the opposition to OOXML pushed Microsoft into more open directions.

    If you are sulking because OOXML was approved, it is worth looking at what actually was accomplished since December of 2005 when the process begun.

    Before OOXML came to ISO and the global review of it begun:

    • Microsoft moving away from their proprietary file formats to open, and XML-based (easier to manipulate, produce and consume) file formats.
    • Novel raised a record number of issues on the specification, many of which were solved before the spec was approved by ECMA.
    • About 700 pages worth of descriptions for the formula specifications (one of the major issues from our end when we joined ECMA TC45 in December of 2005).
    • The OOXML specification placed under the OSP.

    Once OOXML went for discussion at ISO, a number of good things came out and are major community wins:

    1. The specifications for the old binary file formats were published under the OSP (February of 2008).

    2. The above documents were backed up by the British Library in case Microsoft ever stops publishing them (announcement).

    3. Microsoft is funding the development of a translator between the old binary file formats and OOXML which should assist folks that have experience in one format and want to understand the other, or just want to convert documents back and forth. If your app lacked support for OOXML, but had support for the old formats, you can use these tools.

    4. Microsoft agreed that future versions of OOXML will be covered by the OSP a concern that some people had about future versions of the document.

    5. Microsoft pledged to modify future versions of Office to implement the ISO version of OOXML.

    6. working group was created to look into harmonization of OOXML and ODF, something that many developers involved in office suites have been advocating for a long time.

    7. Microsoft pledged to support features to support other file formats as native file formats in their office suite:

    Last year we sponsored a translator project that gave people the ability to read and write ODF files from Microsoft Office. Last month we announced that we would update the Office product so that the ODF translators could natively plug into Office and give people the same options they get from the other file formats. People will be able to set ODF as the default format in Office if that's what they want by simply installing the translators and then changing their settings.

    8. Lots of clarifications went into the spec, and people should be happy about that.

    9. And finally, now that OOXML is an ISO standard, as Patrick Durusau implied there are many winners.

    Anyways, I wanted to keep this short and uplifting, this seems like a win for everyone all around.

    Preemptive-reply-to-the-above-paragraph: I will not reply/approve any flames, FUD or half-truths.

    Posted on 02 Apr 2008


    I love Reddit Captions

    by Miguel de Icaza

    Posted on 28 Mar 2008


    OOXML, looking forward

    by Miguel de Icaza

    I have been reading the OOXML storm in a teacup for more than a year now. Am looking forward to the approval of OOXML as an ISO standard and to be able to move the discussion back to the things that actually matter: free and open source software.

    For a year, countless bytes have been wasted on what is now a very difficult plot to follow, specially for people that have not followed it since the start (or as Bill Maher said last week "Its like trying to make sense of a LOST episode". Note: am a Lost fan).

    When we go back to what matters, we should be ready to ask IBM to open source its Lotus Notes software based on Open Office (as staunch supporters of open formats, and open source, I think its in their best interest to do so). There are nice components in Lotus Notes that would be nice to integrate into the upcoming OpenOffice 3.

    But most importantly, it is a time for all of those strong advocates of open standards to stop talking, and start walking. I look forward for all that energy that went into discussing the pros and cons of OOXML to join an open source project and start contributing code, documentation, support, create support forums, file good bug reports and help us make free and open source software better.

    In case you have not been noticing, Apple is gaining market share on the desktop. Some of our own kernel hackers, desktop hackers, web hackers that used to be Linux or BSD users are flocking to the proprietary OSX.

    We need to change that, lets reverse that trend, and lets focus on what actually matters: the free and open source desktop. To make this happen we will need all the help that we can get.

    Punditry and lobbying will not get us very far, real work will.

    Posted on 26 Mar 2008


    Mono: 2008 Google Summer of Code

    by Miguel de Icaza

    The Mono project will be participating once again in the Google Summer of Code.

    Although some ideas from various teams are available in our student projects page this year, I want to encourage students to feel free to submit ideas that they think should be done with Mono.

    In past years, a handful of students suggested their own ideas as to what would be an interesting project to work on during the summer, we liked those and turned those into full fledged projects.

    Feel free to suggest a project that you think would be useful to the Mono community, and to discuss your idea with us in the Mono Summer of Code IRC channel: #monosoc on irc.gnome.org

    Posted on 24 Mar 2008


    Documentation: Generics and CSS

    by Miguel de Icaza

    Mono contributor Jonathan has been hard at work and has added support for Generics to Monodoc as well as importing the ECMA documentation for the new generic APIs.

    Monodoc now also support man pages (we have a handful now, and we will later add all the mono ones) and we now render using a CSS stylesheet instead of the collection of gross hacks that we used to have.

    Check the new docs out.

    Posted on 24 Mar 2008


    Pastor Wright

    by Miguel de Icaza

    From Dave Winer's blog:

    Melroy Hodge, from Queens, NY, a contact on Twitter, sent a pointer to a YouTube video of a longer excerpt of Jeremiah Wright's post-911 sermon, one of the speeches that soundbites were shown repeatedly on cable news this week. I guess it's not surprising that the cable news excerpts gave a very misleading impression. (Next time this happens we must do an immediate fact-check.) http://www.youtube.com/watch?v=QOdlnzkeoyQ

    This is a must-watch video. Stop what you're doing, right now, and watch it.

    I found myself captivated by Wright's ideas and the way he expresses them.

    I agree with everything he said.

    I would have been willing to cut him some slack, because this was less than a week after the attack, and those were crazy days, who knew what was coming next. But he was right, we have done what they did to us, and we're doing it again in Iraq. The US was led by despotic people and we followed; we wanted to punish someone, anyone, and it didn't matter if they had anything to do with what happened to us. And we did.

    Read the whole post from Dave Winer's blog. The video as he says, is a must-watch.

    Also, from the twitter-o-sphere:

    Posted on 22 Mar 2008


    OOXML SDK

    by Miguel de Icaza

    Microsoft is working on a OOXML SDK for managed languages. They have announced a roadmap:

    Being selfish here, I would love to see this SDK relreased under an MS-PL license myself, I think it would be great to get folks outside of the Windows world consume and produce OOXML files easily.

    This is a win-win for everyone. Microsoft gets more products consuming and producing OOXML documents on the Windows and MacOS worlds through Mono, and we get a great API to use on Linux with .NET languages.

    Although I have emailed a few friends, am not sure am reaching the right people inside Microsoft. I would love to discuss the advantages that MS-PLing the code base would have.

    It has to be under a license like the MS-PL as opposed to just a license to use and distribute on Linux for this code to make it and be distributed eventually into Linux distributions.

    Posted on 22 Mar 2008


    Dog Whisperer

    by Miguel de Icaza

    We became fans of the Dog Whisperer TV show from the Discovery Channel in the past few months. Sadly, we are unable to have a dog at home, so we might look for a new place.

    My friend Shelly pointed me to Gladewell's article on the New Yorker about Cesar Milan, just as fun and interesting as watching the show.

    Posted on 22 Mar 2008


    Mono Debugger, now with 2.0 support

    by Miguel de Icaza

    Last week, Martin Baulig announced that the debugger in trunk adds supports to many 2.0 features, our last major feature missing in the debugger.

    The biggest news is that the debugger now has support for C# 2.0
    features such as generics, anonymous methods and iterators:
    
      * We can currently print fields in generic instances, print their
        types and parent classes.
    
      * Recursive generic types (see test/src/TestRecursiveGenerics.cs for
        an example) are supported, but need more testing.
    
      * There is some limited support for method invocations, but we can't
        get their types yet.
    
      * Support for anonymous methods and iterators should now be pretty
        much complete; we can fully access captured variables etc.
    

    To try out the updated debugger in trunk, you must use Mono from trunk. With this code in place, we have now started the work to integrate it into MonoDevelop.

    MonoDevelop 1.1 (due in six months) will have support for the debugger.

    Remote Debugging

    Additionally, Harald announced that they have modified the Mono Debugger to support remote debugging (useful for debugging embedded systems for instance).

    They wrote a detailed document on the architecture for their remote debugging framework.

    Their work is now licensed under the MIT X11 license, which will allow us to integrate this directly into the Mono and Mono Debugger distributions.

    Posted on 19 Mar 2008


    Banshee Release

    by Miguel de Icaza

    Yesterday Aaron released the first preview of Banshee 1.0, the Digg-o-Sphere does an in-depth review of the release announcement:

    This is what Banshee looks like:

    Banshee on Linux.

    In other news, thanks to the work of Scott, Banshee will soon be distributed for Windows as well:

    Bringing open source media players to Windows.

    Banshee uses Lluis' Mono.Addins framework to allow third party developers to extend banshee with interesting new features.

    Posted on 14 Mar 2008


    MonoDevelop 1.0 has been Released

    by Miguel de Icaza

    After a few years in the oven, we are ready to announce the first release of MonoDevelop. Lluis has put together a set of in-depth release notes that covers the major features available in MonoDevelop and links to various tutorials and screencasts as well as extensive screenshots of what is available in MonoDevelop 1.0.

    MonoDevelop 1.0 is designed mostly for Linux developers creating Gnome and ASP.NET applications but MonoDevelop is also available for MacOS users that download our Mono installer and will still be useful if they are building Mono-based applications on OSX.

    The IDE has many of the features that you would expect from a modern IDE for Mono: support for programming in multiple languages, an extensible design, editors and designers for ASP.NET and Gnome applications, integration with Unix toolchains and Visual Studio Solutions, support for source code control and following standard Unix development practices, integrated NUnit testing, Unix Packaging and Deployment (following the GNU conventions, and Mono conventions for libraries and packages), internationalization and localization, tools to maintain your project documentation and command line tools to access this functionality.

    We have some pretty good language support in this release: C#, VisualBasic.NET, Java, C and C++. Check the previous link for the details as to how extensive the support is for each feature.

    Some screencasts:

    There is more documentation on MonoDevelop available as well.

    The Early MonoDevelop History.

    In late 2003, a few developers were looking for an IDE to write C# code in Linux, not something too fancy, but something that would provide Intellisense features.

    Windows developers were used to Visual Studio, and Mike Krueger and the developers at Alpha Sierra Papa had created the very successful SharpDevelop project, a .NET Windows.Forms-based application. At the time, Mono did not have a working Windows.Forms implementation (it would take another three years before our official 1.0 release of Windows.Forms) so this ruled.

    Although there had been an attempt to make SharpDevelop portable by Mike (with a variation on the theme of Eclipse's toolkit) this effort had not been completed, and SharpDevelop continued to be a Windows.Forms application.

    Pedro Abelleira first extracted the editor and intellisense engine from SharpDevelop into a standalone component that rendered using Gtk# instead of Windows.Forms. This was back late in 2003. Initially it was only going to be a text editor.

    Development started mostly on irc and quickly contributors started to porting various other pieces from SharpDevelop or rewriting the GUI components with Glade and Gtk#. By late 2003 Todd Berman had taken over the maintenance duties of MonoDevelop and sent me a email on December 31st:

    Oh, and we are shooting for eating our own MonoDevelop dog food by the end of this coming weekend, and it looks like we will be there even before then.

    History of the GUI Designers

    As regular Gnome developers were were very happy using Glade and Gtk#'s [Widget] attributes to bind the XML GUI representation to our own variables. You double clicked on the .glade file, and Glade would launch from within MonoDevelop, you would tweak your UI, save it, and rerun from MonoDevelop.

    Around this time Dan Winship from the desktop team started working on a new GUI designer for Gnome, the Stetic GUI designer. This was a Gtk#-based GUI designer, and the idea is that this could be embedded in other applications. An early screencast of Stetic capabilities is available here:

    Stetic in March 2005.

    Work continued, but Dan eventually moved on to other projects. By the end of 2005 we were looking at integrating a GUI designer directly into MonoDevelop and Stetic was not ready to do that, so instead Lluis integrated Glade-3 into MonoDevelop:

    MonoDevelop with Glade-3, January 2006

    This project did not live for too long. Glade-3 had to be patched, and we quickly realized that all the features that we wanted would require more than trivial changes to Glade-3. So we decided that instead of investing time in the C code base and the bridge to C#, that we would complete Stetic which was entirely written in C#, this is what it looks like today:

    Stetic Designer inside MonoDevelop.

    A complete screencast of Stetic and today's MonoDevelop integration shows all the work that Lluis and his team did to provide a smooth editing experience.

    Today MonoDevelop not only supports forms design, but it also provides menu and toolbar editors and support for managing your icon collection in your application.

    Menu editor

    A key feature of .NET is the creation of reusable components. Lluis brought this to MonoDevelop and the stetic editor. This screencast shows how to create widget libraries with MonoDevelop and Stetic that you can later reuse in your projects or in other projects.

    The Future

    The team has already started work on the next release of MonoDevelop, version 1.1. Our goal is to release new versions of MonoDevelop every six months. To do this, we are planning on doing all of the disruptive changes on branches, and always keep our HEAD revision stable.

    There are a number of incremental improvements on our task list, but also some exciting new features. There were many things that we could not get in time for 1.0 are being incorporated or implemented since the 1.0 tree branched a few months ago. Some of the new features that trunk users or alpha testers can get include:

    New Managed Editor: The text editor is now entirely managed and has many new features like configurable keybindings (Really nice Emacs keybindings), split windows, Emacs/Firefox-like incremental search on a toolbar (no more annoying dialog box popping up in the middle of your source code) and one of the most requested features: region folding.

    Moving to a fully managed widget written in C# gives us a lot of flexibility to improve the editor. This is a theme that was consistent in the 1.0 release, moving from Glade to Stetic and moving from the GdlDock to our own managed dock paid off every time in terms of developer agility and features that we could implement.

    ASP.NET editor: new improvements will provide auto-complete and intellisense while editing .aspx files. Also, with the maturity of WebKit/Gtk we are hoping to replace Mozilla as the GUI editor for ASP.NET pages with this.

    Integrated Debugging: Currently the Mono Debugger is only available as a command line tool. Our next release of MonoDevelop will provide debugging directly from the IDE.

    Windows Port: There is now a Windows profile release of MonoDevelop. This will be great for developers that are building applications using Gtk# on Windows and want to get access to the Stetic GUI designer which currently requires them to use Linux to do this. It is not our intention to compete with SharpDevelop as an open source IDE for Windows Programmers although there might be some overlap.

    msbuild-based model: We want to move to the Visual Studio build model to improve interoperability with Visual Studio, Blend and SharpDevelop and other tools that use msbuild files as their interoperability layer. This will allow developers to easily move across tools to work on different parts of a project.

    XML Editor: A backport from SharpDevelop's XML editor has been integrated.

    Future versions of MonoDevelop will extend on this feature set an integrate Ivan's Windows.Forms designer, Alan's Silverlight designer and improve Michael's ASP.NET designer.

    Posted on 14 Mar 2008


    Mono on the iPhone, video

    by Miguel de Icaza

    This video shows the Mono C# compiler building a sample native ObjC# application on the iPhone and then running the resulting executable on the iPhone.

    Pay special attention to the beautiful error messages that our C# compiler generates.

    This is using the ObjC# bindings that provide access to the Objective-C APIs from C#.

    Discussion of the bindings and the Cocoa# APIs takes place in the cocoa-sharp and mono-osx mailing lists.

    Update: better version, this one the typing with two hands and with some widgets on the screen and some events hooked up:

    See Geoff's Norton for more details and also this one with comic included.

    Of course, the iPhone is a locked platform, and chances of people being allowed to run Mono seem low.

    The real question is when Android will be open enough that we can do a port of Mono to it (there is no C SDK at this point for Android).

    Posted on 12 Mar 2008


    Mix 08

    by Miguel de Icaza

    Just got back from Mix 08 in Las Vegas. It was good to catch up again with old friends and make new friends. As usual, the event was a blast. To me the big interesting news were Silverlight 2.0 and the ASP.NET MVC release (details at Phil's blog).

    Ray's keynote was light on the details, and too abstract for my taste.

    The IE8 announcements were interesting. Their contributed test suite for CSS is good news, and came up with two nice new features: activities and webslices. Both ideas and their specifications were released under the OSP, and apparently by the end of the day there was a Mozilla plugin that implemented Activities. Hopefully we will get WebSlices on Linux as well.

    Of course my personal favorite were the Silverlight 2 updates.

    Since I attended mostly the hallway session, am using this weekend to catch up on the actual sessions. But I loved Joe Stegman's presentation on Silverlight 2 which Mike Harsh described as "we wanted to show code, not slides, lots of examples; you know, developer porn".

    Sadly, I could not make it back to Part 2 with Mike, as the room was full and the bouncers were turning people away (and I also missed the repeat the next day).

    Office Ribbon

    If you love the software that you build, Jensen Harris' presentation on the History of the Office Ribbon is probably the most inspiring talk I have seen in years.

    Every developer building GUI applications should listen to this presentation. This is as inspiring as Joel's articles on UI design were a few years ago when we were working on GNOME 2 or Andy's focus on empowering users were back on the Eazel days.

    Silverlight 2

    First things first. Catching up with Silverlight 2 is a great place to get demos, samples, tutorials, presentations and in-depth coverage of what is new in Silverlight 2.

    Silverlight 1.1 consisted of a .NET binding on top of the core Silverlight 1.0 engine and the addition of the DLR and DLR-based languages. This was never intended to be the last word on it, and it was mostly a showcase of things to come.

    Silverlight 2 is the evolution of the 1.1 model in a number of directions.

    The distribution model: Possibly the most interesting change is that there is now a "core" of Silverlight that will be available on every system and a model to bundle extra libraries for Silverlight. This keeps the Silverlight 2 download small, but most importantly it means that Silverlight 2.0 can ship without having to complete and freeze the APIs for every possible feature that people want.

    The "extras" collection of controls are delivered in this way (like the databound controls) as well as things like the DLR. This means that you can use the DLR today, and still allow the DLR and Iron* teams to continue working and improving it without locking developers to an old version of the DLR that would have been deployed with every 2.0 installation.

    Some other important changes:

    • The application model is more consistent, and some of the common usage patterns for applications are directly handled by the new model (download all assets at once).
    • A control framework. In 1.0 and 1.1, every developer had to create his own control framework, with 2.0 the control framework is in the core, and there is a nice collection of standard controls available (with text input!).
    • Styles: The control framework also allows for skinning of controls through XAML snippets. For instance, consider a button, there a number of states that a button is rendered as: focused, unfocused, pressed, not-pressed. To transition from one to the other you can specify a XAML storyboard that will transition the button from any state to any other state. And you can also controls what is rendered, and how, independently of the control itself.
    • Seadragon images. This is the support to quickly download images and implement infinite zooming. See this TED presentation for the details and a nice demo.
    • Networking: support for socket connections (there are many restrictions here on what can be done) and support for allowing clients to issue HTTP requests to other web sites (this is similar to Flash policy files for the same feature).
    • Updated DLR and Iron*.

    Open source Silverlight Controls

    At the keynote Scott announced that the high-level Silverlight controls were going to be open sourced, they will be released under the MS-PL.

    There was apparently a miss-understanding and the controls were released inadvertently under a more restrictive license, but both Scott and Brian confirmed that they wanted us to use those controls.

    This is brilliant, not only because it helps us, but for a load of useful reasons: it will let developers learn how to write controls early on the Silverlight 2 release process and will allow developers to fine-tune controls if they don't do exactly what they need.

    This is important in particular for things like the DataGrid view, as there history has shown that there is no one-size-fits-all (regardless of how parameterized these controls are)

    Moonlight

    On Thursday I did a presentation on Moonlight. Due to the general nervousness of this presentation I forgot to do a few demos that I wanted to show. I wanted to show Popfly and wanted to show the Silverlight Journal (both 1.0-based applications).

    If you install Moonlight from SVN, you will be able to watch the presentation on Linux.

    Sebastien is now working on the security aspects of Moonlight (auditing code, understanding the attack surface, trying to break our code). He posted an updated diagram of the trusted callers in the various Silverlight 2 assemblies.

    Improving Mix

    I personally would like to see "Meet the Experts" come back. Meet the Experts last year (and at the PDC) happens in the afternoon, as a last-session, there is food delivered and there are no other sessions scheduled, so its a good time for everyone to get together and quickly get some questions answered.

    In my opinion, the bars and the party are no substitute for this session. Discussing styling of Silverlight controls on the bar goes more or less like this "WHAT ARE THE LIMITATIONS?", "NONE, YOU CAN CHANGE THE ENTIRE VISUAL TREE", "THE WHAT TREE?", "VISUAL", "WHAT?", "THE VISUAL TREE", "WHERE IS THE TREE?".

    I still had a blast, but I would like to see "Meet the Experts" back on the agenda.

    Posted on 11 Mar 2008


    Mono on the iPhone

    by Miguel de Icaza

    Luke Howard from PADL Software Ltd sent me some screenshots of Mono ported to the iPhone:

    Some stats:

    # hostinfo
    Mach kernel version:
             Darwin Kernel Version 9.0.0d1: Wed Oct 10 00:07:50 PDT 2007; 
    root:xnu-933.0.0.204.obj~7/RELEASE_ARM_S5L8900XRB
    Kernel configured for a single processor only.
    1 processor is physically available.
    1 processor is logically available.
    Processor type: armv6 (arm v6)
    Processor active: 0
    Primary memory available: 116.00 megabytes
    Default processor set: 26 tasks, 164 threads, 1 processors
    Load average: 0.00, Mach factor: 0.98
    # export MONO_DISABLE_SHM=1
    # ./mono hello.exe
    Hello Mono World
    #	
    	

    Posted on 10 Mar 2008


    Channel9 works with Moonlight!

    by Miguel de Icaza

    I just got back from Mix, updates my Moonlight from SVN and the videos at channel9 are now working with Mono.

    Inside Silverlight 2 Beta 1, an overview with Scott Guthrie

    This is one of the important pieces of our media pipeline that was missing (support for the HTTP streaming protocol). The implementation is based on the work that Fernando and Rolf did using the recently released specifications that Microsoft published.

    Sadly, I was not able to show that at Mix. Its also the first take, so more testing and exercising will be required.

    Posted on 08 Mar 2008


    Pre-Mix 08: Moonlight Updates

    by Miguel de Icaza

    We have been hard at work in Moonlight and I keep postponing when to blog some updates about our work every few days hoping to cram some new feature in the blog post.

    And every few days turn into every few weeks and the next thing you know what should have been published a month ago ends up being my pre-Mix post.

    Some of the most important changes in the last two months have been:

    Moonlight Media Pipeline: So far we had been using ffmpeg's pipeline to process media. This means that ffmpeg was in charge of detecting the media formats, locating the codecs, demultiplexing the data, and decoding the data into video and audio frames.

    The ffmpeg pipeline was fine as a sample pipeline, but we needed a few more things. We needed more control over the pipeline to implement things like media streaming and supporting seek operations over HTTP; We want to be able to relicense the code under non-LGPL terms (for people that can not use the LGPL or some commercial uses) and we need to plug Microsoft's Media Pack media decoders.

    Rolf rewrote our multimedia pipeline so that the code on SVN no longer depends on ffmpeg's pipeline and only uses ffmpeg's decoders for video and audio:

    The end goal is to plug Microsoft's Media Pack (this contains the codecs video and audio) into Moonlight:

    The installers that we currently distribute for Linux do not contain the ffmpeg media codecs. If you need to test media you will need to compile the code from source.

    Streaming: With our new pipeline we are now able to stream media. In the past Moonlight downloaded the media file into the local file system, and only when the entire file was downloaded we would start the playback.

    Moonlight can now start playback as soon as there is enough buffered data. This works for media that is only available over HTTP. Fernando has been working on the support for media that supports the MMS-over-HTTP (controlling seeking for example). Luckily, the specs for HTTP-based streaming to Windows Media servers were released last week (also the specs for the ASF container format, which should help validate our implementation).

    Test Tools: As part of our collaboration with Microsoft we received various tools that are used to test Silverlight. We could not reuse the tools directly for Moonlight (too many Win32-isms, too hard to plug into Mozilla/Linux) so Jackson rewrote all of that code for Linux.

    The test tools include plugins that expose Javascript APIs to control Silverlight and the browser, simulate user events and take snapshots of the screen. Microsoft has given us permission to open source our implementation of these tools.

    This should help us in creating our own tests, and in checking our own code for regressions beyond the test suites that we will have received from them.

    The code should hit SVN soon.

    Mozilla Installers: We created some installers for Mozilla that should offer a one-click install experience for users on Linux.

    Verifier: Rodrigo continues to work on Mono's CIL verifier and on strengthening the image loader, work that will not be used immediately for our Silverlight 1.0 support, but that will be important for 2.0 (when Mono is required).

    Historically Mono had not been used to execute untrusted code as we mostly were a runtime for desktop and server applications and errors in the images fell directly in the "doctor it hurts when I do this" category.

    But with Silverlight 2.0 the story changes, Mono will be executing potentially hostile code so this work is mandatory. Additionally, Sebastien has been improving Gendarme and his Monoxide tool to help in the audit process and we have created a security audit plan for the runtime. This work, like the verifier work is a work in progress.

    In addition to using it for Silverlight, the verifier work will enable the SecondLife folks to allow the execution of binary code in their simulators instead of being limiting SecondLife to use LSL-based scripts.

    Windowless Support: As it turns out Windowless rendering is used by many Silverlight applications. This is where Silverlight content seamlessly blends with the HTMl content. This is a must-have for things like Tafiti, the XamlPad, and the Vista simulator and nice-to-have for some other sites.

    The good news is that Chris has implemented the support for it:

    The bad news is that this is limited to Firefox 3.0, the 2.0 edition does not have support for Windowless rendering.

    See Chris' blog entry for the details about the challenges and limitations of Moonlight/Windowless in Firefox/Linux.

    Bug weeks: With the test suite running on Linux we have been focusing on passing all the Microsoft tests that we can and implementing the major features missing (like Windowless support).

    Silverlight 2.0 Other than the JIT support for Silvelright 2.0 at this point we have not done any work on it (well there are 3 classes stubbed privately).

    There are two reasons for this: the updated 2.0 API is not public and although we have access to it, it is a bit of a mess to try to keep two separate trees (public and private) to support this and since Mix is just around the corner, we will just wait until next week.

    The second reason is that we want to focus on shipping 1.0, completing the media pack integration and working on the configuration aspects of Moonlight (auto-update configuration for instance).

    Our Priorities

    Everyone on the team has been working very hard to get all the pieces in place, and we are getting closer to completion. Every time we fix a bug, it has a nice ripple effect of fixing various other issues that we had seen in some sites at once.

    Our priority currently is to ship Moonlight 1.0, and this means more or less:

    • Integrate the Microsoft Media Pack.
    • Complete our media pipeline.
    • Fix all the bugs exposed by the test suites.
    • Investigate some of the problems with some video card/driver configurations that seem to burn a lot of cycles.
    • Improve the performance for heavily animated scenes.

    Am excited about the Mix conference, looking forward to see the demos and what gets announced. And obviously very excited about my own session on Thursday to talk about Moonlight and Mono.

    Time to go to sleep. Marek and myself are on a 7am flight and it will be hard to make it.

    Posted on 03 Mar 2008


    Wooohooo! Am on Channel9!

    by Miguel de Icaza

    The interview that I had when I visited Microsoft for the Lang.NET 2008 has been posted to Channel9. Its a conversation between Charles, Dragos (from the Volta team) and myself on open source, .NET, Mono, Moonlight and other fun topics.

    Posted on 29 Feb 2008


    Mono and the Game Developers Conference

    by Miguel de Icaza

    Last week some of us from the Mono team at Novell went to San Francisco for the Game Developers Conference. As some of my dear readers know, I was not much of a gamer a year ago, and I do not claim to understand this industry.

    Mono is currently being used by a major publisher [1] to script a new version of a popular franchise (the new edition) and Mono is also the engine that drives Unity3D for scripting and SecondLife is beta testing Mono now on their beta grid.

    Other than being fascinated by Unity3D and SecondLife, we had not really paid much attention to games. But in the last nine months we started to get a constant stream of requests to license the Mono runtime to power more and more games.

    When Joseph Hill joined Novell in January as Mono's product manager we started to revisit some of these request. People wanted to get a proprietary license for Mono to use on the PlayStation, the XBox and the Wii and some folks also wanted Mono under non-LGPL terms (as it turns out, important to prevent cheating).

    Three weeks before the GDC conference, our in-house expert on the game industry Michael Hutchinson told us that this conference existed. In a couple of days we booked some space on the show and we got things in place, we were going to promote Mono as an accelerated scripting engine.

    Mono in Games

    As it turns out, .NET-based tools and .NET-based scripting of tools are pervasive in the game industry.

    As for the games themselves, engines are typically written in a combination of C++, C and assembly language and the high-level code is written with scripting languages. Lua is the most popular language to embed in a game (a procedural C-like language) and Python, variations on Lisp and a never ending stream of evolved batch languages.

    People want to reuse Mono on games for a few different tasks. These are some of the reasons that we know about:

    • Speed: as games become more complex, and people spend more money on software that takes advantage of GPUs, optimizing compilers and even special hardware for physics the weakest performance spot on a game has typically been the language that has been used to implement the high-level portions of the game.
      In a world that is increasingly green, it is a waste of perfectly healthy computer cycles to interpret your code when you can use an optimizing JIT compiler to run your code.
    • Mainstream Language Support: In some cases, game companies have created their own languages, evolved or modified existing languages (modified versions of Lua are common). Some people would like to get access to more mainstream languages to develop their game logic.
      In the short term, jumping from procedural languages to object oriented languages is a first jump.
      Hopefully they will drink the functional kool-aid and use some of the C# functional features, or even F# to write their games.
    • Code Sharing: C# or .NET code that is today written to run on servers, or as part of the tools being used to create games can now be easily be reused on the game itself.
    • Mainstream Tool Support: Many games engines are already being developed with Visual Studio. Game developers can use the same tools to develop and debug the high-level game play scripts that they use to develop and debug the game engine.

    Luckily, developers that have been writing Lua code for years will be happy to know that they can compile their Lua code to run on Mono (and get the performance boost they need) by using the Lua2IL compiler.

    Update: The always great Lua developers have pointed out that the new thing is not Lua2IL but LuaCLR.

    Mono and XNA

    Mono does not really attempt to compete with Microsoft XNA

    Microsoft's XNA is an end-to-end solution for game developers that want to create games for Windows, the XBox and the Zune, the XNA approach is to write manage code on *top* of XNA.

    This works for certain kinds of games, but in the game developer space, some developers need to support more than one console and the high-end games (am sure there is a technical terms for these) end up licensing game engines, audio engines, graphics and physics from all kinds of middleware vendors.

    In those cases (even when targeting the XBox) C# and .NET would not be available to the game developer.

    So we basically think of the Mono runtime merely as a fast scripting engine with all of the ECMA/ISO CLI benefits and not really as providers of gaming APIs.

    There has been some discussion in the #mono channel recently about whether we would create or endorse a gaming API developed by a third party. Like blessing Tao or OpenTK as the standard way of building games for Mono.

    Although there is some value in having a blessed set of libraries for Mono, and I have no problem if people want to call their libraries Mono.Gaming, at this point the team at Novell is not able to dedicate any cycles to this effort (we can provide spiritual support, along the lines of yelling "Go team! Go" from the sidelines).

    Intrinsics and Parallel Code

    Am personally fascinated by running computational code on the GPU or taking advantage of special CPU instructions at the runtime level. Last year I wrote a bit about how we could implement this in Mono (Microsoft has already an implementation) and later we even made it part of our interviewing process.

    Gratuitous Cell Processor imageAt the conference some people asked as to whether it would be possible to take advantage of the PlayStation3 six SPE processors. During the conference I had no idea that there was already a project using Mono on the PS3 with Linux that already does this, but the idea sounded fascinating.

    It is particularly fascinating because the SPEs on the PS3 do not have the same limitations than GPU computations have, these are full blown CPUs (with some memory limitations) but still general purpose computation devices.

    Paolo pointed me to CellDotNet: A project to make it possible to run .NET code on the Cell architecture.. CellDotNet is basically a JIT compiler (written in entirely in C#) that can compile CIL bytecodes into native code for the PS3 SPE processors (this is a project from Klaus Hansen and Rasmus Halland).

    They have ported the SciMark benchmark to use some vector operations in the SPE. Currently I am unable to report the numbers as I do not have a PS3 running Linux, but I am expensing a PS3 as we speak to be able to report these back to you dear readers.

    What makes CellDotNet all the more interesting is combining C# new functional features with the the Parallel Extensions to .NET.

    Two good articles to get a grasp on what this offers are: Optimize Managed Code For Multi-Core Machines and Parallel LINQ: Running Queries On Multi-Core Processors.

    PLINQ is built on top of the Language Integrated Query (LINQ), and although it has been promoted mostly as a technology to do database queries, the Parallel LINQ extensions basically supports map/reduce inside C#.

    These libraries are only available as a technology preview currently for .NET and they do not exist yet for Mono. Hopefully we will get these implemented at some point.

    [1] Our contract with said major publisher does not allow me to disclose who they are or the the game they develop on my blog. But it allows Novell to publish the information on the Novell site. After a year of asking Novell people to put this information on the web site, the information has not yet been posted. So the mystery as to what this is will sadly continue.

    Posted on 26 Feb 2008


    Lang.NET talks available

    by Miguel de Icaza

    The Lang.NET 2008 talks have been published.

    They require Silverlight 1.0, but Moonlight compiled from source with ffmpeg support is able to play those presentations back.

    If you are in a rush, see the following post for details on downloading the WMV file (so you do not need to install Moonlight from source on Linux).

    Posted on 24 Feb 2008


    Mono Hackweek Summary

    by Miguel de Icaza

    Some of the Mono folks have blogged about their work for last week hack-week:

    Paolo and Zoltan rearchitected the Regular expression library in Mono and got a 9x performance improvement in regular expression matching. The work had two components: redesign of the opcodes in the regular expression engine, and generating native code using Reflection.Emit. At least for the Language Shootout case, the new regular expression code is the second best (Tcl is faster, but apparently Tcl does not cope with Unicode regexes).

    Wade worked on MythTV under XGL and making Tomboy Scale.

    Andrew added Zeroconf/Bonjour support to Giver (a tool used to easily share files with friends or nearby users). And he also worked on Tasky a simple task management tool that integrates with Remember the Milk. He also wrote a command line tool to remotely control Tomboy. screencast.

    Mike added support to importing data to his Exert Project (fitness/workout log software) that he started last Hack Week.

    Sebastien revamped and added various new rules to Gendarme, our analyzer for CLI assemblies to spot errors and common programming mistakes.

    He also improved its APIs and performance. He also started to fix some bugs in our class libraries based on the analysis done by Gendarme.

    Jonathan ported his XMPP/VB.NET client to Mono:

    And also got MonoDevelop running natively on Windows:

    Jonathan Pryor spent the week polishing various loose ends. Including the release of his fantastic NDesk.GetOptions command-line parsing library and providing documentation to various components in Mono.

    Atsushi worked on the implementation of WebHttpBinding (part of 3.5 WCF) and various other parts. See his blog for details.

    Mark polished his MathMap composer tool.

    Marek did some work towards replacing System.Reflection.Emit with Cecil. After some discussion we believe we can keep both backends, one to keep things as usual, and another to be used with MonoDevelop (so MCS provides the actual parsing for the editor intellisense and compile-as-you-type support).

    Jackson worked on a couple of interesting demonstrations with Aaron, which hopefully they will be able to demo soon.

    Carlos spent his time improving System.IO.Serial, there were a handful of events not implemented that he worked on.

    Andreia and Marek worked on a Gtk# native client for Bugzilla.

    Stephane created a new Gtk.Print/Cairo dialog for F-Spot and worked on support for TimeZones in F-Spot (code has not been commited yet).

    Everaldo worked on packaging Mono for Maemo4. He has promised a number of blog posts detailing the work on GarMono, and the new packages that will be included on it.

    Rolf continued to replace SRE with Cecil in the VB.NET compiler.

    Lluis worked on improving Mono.Addins and creating an add-in for authoring add-ins in MonoDevelop.

    Paolo early on also extended C# to allow inline-IL assembly language code (similar to __asm__ in C or C++ in some compilers). See the blog post for the various samples of C# with embedded IL.

    Chris worked on a scheme compiler.

    Jeff learned more about Regular Expressions than he wanted to. Update: Jeff wrote an add-in for MonoDevelop to do Evolution plugins in C#.

    Update: I had not finished reading all the status reports on the mailing list. Dick Porter wrote bluetooth support for F-Spot. There is a bug in the system underlying bluetooth C libraries that prevents it from working correctly out of the box, but hopefully that will get fixed.

    Update: Mike Krueger improved extensively the search functionality in MonoDevelop, it now implements Emacs/Mozilla-like searching and he also wrote an assembly browser/decompiler that is plugged right into the solution browser.

    As for me, I spent the week going insane over the incredibly frustrating T61p problems with performance. Inspired by Marek's encouragement to learn LINQ and functional-style programming, I started a project that I abandoned quickly to implement a managed spreadsheet.

    At least I learned two lessons: am more comfortable writing tokenizers using the regular call-back system than the automatically generated state machine from generators. I also learned that OOXML is very easy to parse, but it would be nice for PDF files to have hyperlinks in the spec.

    I am probably missing a few things, but I did not catch all the blog posts this week.

    Posted on 23 Feb 2008


    Game Developer's Conference

    by Miguel de Icaza

    Some of us in the Mono team are in San Francisco for the Game Developers Conference at the Moscone Center.

    For more details see Joseph's post Mono at the Game Developers Conference.

    Posted on 20 Feb 2008


    Politics as Theater

    by Miguel de Icaza

    My friend Jon Perr (he was Ximian's Marketing VP) did a fun presentation at Ignite Portland.

    The presentation uses an unusual format: you talk for 5 minutes, and 20 slides are displayed, each for 15 seconds (they advance automatically).

    Watch his presentation here. The slides contain more data than the 15 seconds allowed, so you can read that here (also check the notes).

    Posted on 18 Feb 2008


    ThinkPad T61P Speed Problems

    by Miguel de Icaza

    I recently upgraded to a ThinkPad T61p. I did not reinstally my OS, but instead just moved the old hard drive into the new machine.

    The new machine is supposed to run at 2.4Ghz when plugged to the AC power, but it keeps going down to 1.2Ghz when am trying to get some work done (start a build: cpu speed goes down; Start firefox, cpu speed goes down). When am idling, the CPU speed will happily go back to 2.4Ghz. It can get as bad as 800Mhz, and in fact, it tends to boot in that mode at 800Mhz so booting takes forever.

    The machine is cool, unlike the last laptop it does not feel warm at all (perhaps because it never performs better than a PC/XT).

    I have Googled and Googled and various people seem to be having this problem across some other machines and Linux distributions, but there does not seem to be any solution posted. This is also not a new problem.

    gnome-power-manager shows that the speed policy is "Always Maximum Speed":

    This is what cpufreq-info shows:

    I have tried:

    • powersave -f, it sometimes makes the machine go to 2.4Ghz, but it will happily go back to 1.2 a few seconds later.
    • Setting the minimal frequency in /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq by writing 2401000 to it. This sometimes works, but sometimes I get:
      		root# echo 2401000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 
      		sh: echo: write error: Invalid argument
      		
    • Calling: cpufreq-set -c 0 -d 2401000 -u 2401000 -g userspace this again works sometimes but when the CPU insists on sticking to 1.2Ghz it will just produce an error.
    • Variants on cpufreq-set's governor: I tried userspace, and performance. They both seem to fail sometimes, and work sometimes. When they work, the processor speeds only stays for a few seconds before it goes back to slow speed.
    • Tried disabling the speed stepping support in the BIOS. Although /proc/cpuinfo then reports that the CPU is running at 2.4Ghz, regular benchmark programs show that the machine is actually running at 1.2Ghz (building mcs goes from 2.7 seconds to 4.7).
    • Tried killing powesaved, gnome-power-manager to make sure they wre not interfering, they still do not work.

    If you got some ideas, drop me an email, I will post any solutions

    Posted on 13 Feb 2008


    MonoDevelop goes to MacOS X

    by Miguel de Icaza

    We have released an updated Mono 1.2.6 package for MacOS X that contains Imendio's Native Gtk+ for OSX, Gtk# and MonoDevelop with Mac support. It is now available from our downloads page.

    MonoDevelop on OSX.

    MonoDevelop has pretty much the same feature parity than Linux does. There are a few missing features that we hope to resolve in the future, and there is plenty of room to improve.

    Our recent efforts to better support the OSX stem from our belief that some Windows expats will want to continue building .NET applications using the Mac. And once they have updated their applications to run on the Mac, the code will run just as well on Linux.

    Also, we believe that Unity3D developers will find auto-complete a useful tool when writing extension scripts for Unity. No templates or integration yet, but hopefully we will have those in the future.

    This is only our first step.

    MonoDevelop for Windows

    Eventually, we would also like to bring MonoDevelop to Windows. Not to compete with SharpDevelop as they are focused on being a great IDE for Window developers. Our focus will be in bringing Stetic (our Gtk# GUI designer) to developers building cross platform applications.

    Posted on 07 Feb 2008


    Updated Mono VM

    by Miguel de Icaza

    Joseph blogs about our updated Mono VM. This new release is based on OpenSUSE 10.3 (instead of what we had been using which was based on 10.2).

    It includes various new .NET and Mono applications that we had not shipped before (and that you can find the Mono:Community section of the Build Service).

    Posted on 07 Feb 2008


    Lenovo ThinkPads preloaded with Linux

    by Miguel de Icaza

    I was doing some shopping today for a Lenovo ThinkPad T series, and noticed that they are finally offering them with SUSE Linux Enterprise Desktop 10 preinstalled.

    (At least in the US).

    Posted on 07 Feb 2008


    Election Results

    by Miguel de Icaza

    Larry Lessig has a fantastic presentation, in the very best Larry Lessig style, of why he supports Obama over Hillary. Chris has a transcript of the presentation for those reading blogs from work.

    While reading CNN summary:

    But the two-term senator from New York surpassed the one-term senator from Illinois when voters were asked about experience, with 91 percent of voters saying she "has the right experience," versus just 5 percent who said the same thing about Obama.

    Both John F Kennedy and Bill Clinton were younger than Obama is today when they became presidents. It seems odd that this fact is not mentioned more often. (Update: Raphael pointed out that I used the wrong word here; Sorry, not a native speaker and all that).

    And Wonkette goes through the checklist: Hillary Pre-Election Day Cry For Points: Check:

    With Super Tuesday coming tomorrow, and polls showing Hillary Clinton in a dead heat with Barack Obama in states like, let’s see... Connecticut... it seemed like a good opportunity to CRY again. Not that this has anything to do with anything, but Hillary Clinton did cry in New Haven today while discussing children’s health care, one of the various things that she cares about. We’re ashamed at Hillary for this: If she had planned it around mid-afternoon, it might be a fresher topic for the evening news cycle.

    Which is at odds with the speech I heard from her appearance in Massachusetts two nights ago when I jumped in a taxi. She was yelling repeatedly "am ready to lead" with a loud and strident voice. Which makes the perfect timing for the crying all too suspicious.

    Larry Lessig's post underlines an important point about the way that Obama is conducting his campaign vs the way Hillary is. Hillary will have a debt with all the lobbyist, there will be favors to repay, concesions to make, special initiatives to pass through congress.

    The video with Hillary's position on taking lobbyist's money is educational. Not only she is very happy taking their money, but she also twists facts when she says "They represent real Americans, they actually do". She should have added "The top 1% of Americans", you know, the Americans that actually count.

    This is the complete context for the debate where the previous video was taken from. Edwards and Obama interventions are brilliant, "we do not have to start for the next election to start reforming, we need to start a grass roots movement to start reform today". Edwards and Obama went down this path: they did not take lobbyist money. Watch the full thing.

    Obama as a president would not have those ties, he refuses to take money from the lobbyists.

    Posted on 06 Feb 2008


    Moonlight Talks (Paris Tech Days, Las Vegas Mix 08)

    by Miguel de Icaza

    Next week I will be in Paris for the Microsoft Tech Days talking about our work on Moonlight. JB Evain will be doing a tutorial on Moonlight on Monday as well. Sadly, due to all the work we have right now in Mono-land, I will only be in Paris for a very short time before I have to head back home. But hopefully Mono-ers and Opensourcers can have some dinner on Sunday night. Drop me an email.

    I will also be speaking in depth at the Mix 08 about Moonlight. This will be a more detailed talk about Moonlight than the talk at Lang.NET which was more of a potpourri of Mono stories.

    Posted on 04 Feb 2008


    MathMap

    by Miguel de Icaza

    Only recently I found out about Mark Probst's MathMap plugin for the GIMP. I ran into it when he posted about a new feature in it called the MathMap Composer.

    Check out this video demostration of MathMap's Composer.

    I would have put a good screen capture of it, but Google Video seems to have regressed and no longer lets user skip over parts of the video.

    Posted on 04 Feb 2008


    Mono Does Robotics

    by Miguel de Icaza

    Shawn at Cogmation has written us to notify us that Mono is being used as the scripting engine for their robotFoundry application.

    From their testimonial page:

    We needed a portable cross-platform, architecture compiler system that would allow us to develop code on one OS or architecture and deploy it on another with out recompiling. The problem with using gcc was that for every target OS or architecture we would need a separate cross compiler. Additionally maintaining and developing this toolset would be a large task.

    Initially Python was selected as our cross platform language. Python was great but we were always concerned with its speed, especially in real-time applications.

    We discovered Mono while we were evaluating 3D engines. Mono was successfully being used to develop video games and it was extremely fast. We performed a small test and compared the speed between Python and C# mono and were shocked at how fast mono was compared to python. In addition to the speed increase and portability, we now had the ability to allow our users to write scripts in any .Net language.

    Switching to Mono has given us the ability to write very fast cross platform applications and has provided us with a multi-language scripting interface, and the integration of Mono within our application suite has proved to be a huge success.

    (Emphasis added).

    From the product description:

    robotFoundry is a powerful graphical coding environment for robotics. Use drag and drop modules to add functionality to your code, quickly linking them to create program flow and robot controls. Generate code with a click, and transfer your code to your robot or robotSim with another click.

    Code for a physical robot or simulated robot at the same time - switch between them at any time to generate code for the robot or robotSim to run identical code. Choose from pre-existing robotFoundry robot templates, or add components to create your own. Many modules are available, ranging from simple controllers such as line trackers and wall followers to basic building blocks like variables, mathematics and logical operators. Choose your own level of programming, and allow robotFoundry to take the coding out of your coding.

    Additionally their robotSim lets you simulate your robot software in a simulated virtual world. RobotSim is built using Unity3D which is also scripted with Mono:

    RobotSim: Simulated Packbot with ARM

    You can use robotFoundry and robotSim to write code for your Roomba or your iRobot Create without burning the batteries:

    RobotSiming a Roomba

    Posted on 03 Feb 2008


    Dave Winer Posts

    by Miguel de Icaza

    Dave Winer has a couple of great posts on the campaign:

    Here he points out:

    Most of what Chris Matthews says is mindless trash, but today he pulled out a great analogy immediately after Ted Kennedy's stirring endorsement of Obama.

    He compared Hillary Clinton to the character Salieri in the movie Amadeus. Until Mozart came along he was the leading composer in Vienna, but he was just a workman, a technician. Mozart had inspiration, feeling, the spirit. Salieri, even though he lived a long life and Mozart died young, is a footnote to Mozart's lasting greatness.

    Matthews nailed it.

    This is a great nugget that encapsulates perfectly how I feel about Hillary.

    Dave also wrote: Bill Clinton as Trent Lott 2.0, some parts that I liked:

    It was an interesting election until the Clintons started calling Obama the nice young African-American candidate.

    [...]

    The problem for Clinton is actually much worse, we now saw how she'd govern. Let's say a young African-American Senator from Illiinois got in the way. Would she argue the issues with him in a respectful way? Why bother when you can smear him into silence.

    [...]

    What a fantastic way to recover from Bush, who so completely represented the greed and arrogance and uglyness of America, to reinvent ourselves in the image of our best, in the image of hope.

    (Emphasis added).

    Posted on 01 Feb 2008


    Mig Tamale in da Sim!

    by Miguel de Icaza

    My SecondLife dude walks around the Mono Simulator in SecondLife, am running this with the Linux client:

    Mig Tamale Explores the Space.

    The work that we are doing on Mono's runtime to support Silverlight (the sandbox system and the hardening of the runtime) is going to enable the use of other programming languages to script components on Second Life.

    Go SecondLife! Go!

    Posted on 31 Jan 2008


    Second Life Opens Public Beta for Mono Scripting

    by Miguel de Icaza

    Today Jim announced the beta launch of their Mono integration into SecondLife.

    We’re very pleased to announce the beta testing of Mono in Second Life. Mono is a technology which will increase the speed of scripts running in Second Life. The goal is that everyone will experience reduced lag and improved stability and that it will be possible to script complex behaviours that were not previously feasible in Second Life.

    With a mono viewer on a Mono region, normal LSL scripts can optionally be compiled and run on Mono. If you are a scripter we would love you to download the Mono viewer, connect to the beta grid, teleport to a Mono-enabled region and test your scripts on both the Mono and LSL virtual machines side by side

    Currently the focus of this beta is to focus on identifying any problems with the Mono integration, so the language use is currently still limited to LSL. Linden has plans to allow any .NET language that will run on Mono to be used to write scripts for SecondLife.

    For more information of Mono on SecondLife see the Mono page and if you want to participate in the beta, see SecondLife Mono Beta FAQ

    Congratulations to the Jim and the Lindens for their beta launch and for seeing this project through.

    I strongly recommend Cory's and Jim's video from the Lang.NET 2006 conference which explains some of the formidable things they did to bring Mono into their simulators.

    I can not stress enough how interesting this talk was. It is a great introduction to SecondLife and it is a great talk on software engineering and the wonderful hacks that they came up with.

    Brady, this is your chance to start hacking on it!

    Posted on 29 Jan 2008


    Usability Disaster Story

    by Miguel de Icaza

    In December, someone asked me about how many Mono downloads we had per month to estimate the size of Mono users. With software like Mono the download numbers do not mean much, because most of our users get their software through their distribution, package channels or as a bundled executable.

    Since we are short on space on the machine hosting the files, we do not keep logs for too long, they are rotated and discarded pretty quickly, but we could at least do some guesswork based on a week worth of downloads. The data would not have been very useful, as this story takes place on December 27th, but I was still curious.

    What I discovered with horror as I looked through the logs was that people using Windows and MacOS were downloading software that was two years old. Mono 1.1.7 (released sometime in May of 2005) was the most popular download.

    Only 5% of the Mac downloads were actually getting the latest version, 95% was downloading this two year old version. I don't have my notes handy for Windows, but they were similarly abysmal [Update: found the notes, they were 95% as well].

    The Linux downloads for RPMs were mostly fine (probably because they had to select the architecture from a separate list). But a whole 1/3rd of the people downloading the Mono "Universal Installer" were getting the wrong Mono as well (Update: clarified).

    Using the referrer logs, we tracked down a few problems to people that had linked for their software directly to a particular version of Mono, but this could not explain the popularity of this aging Mono 1.1.7 release, and the logs were very odd, people apparently were selecting this from our list of options.

    This made no sense.

    Can you spot the problem?

    I clicked on our links, they were fine. They downloaded the proper software, the logs matched the download. I was puzzled.

    Only after a while I realized what was going on:

    Since we are using MediaWiki for our web site and we were adding cute little icons for each platform, clicking on the image actually took users to the page for the image. In the Windows case, this was the page:

    	http://www.mono-project.com/Image:Mono_icon_windows.gif
    	

    Which happens to contain the image, and some automatically generated content for the image. Some of the generated content lists all of pages that *link* to the image:

    Now, that looks like a messy page, but most users were picking the largest number they found listed there, which happened to be an old legacy page of ours for the release "1.1.7". Going to this page, would be a very similar download page to the main one, and people at this point figured out "do not click on the image, click on the text". Except now they were clicking on the downloader for this ancient release.

    I have no idea for how long this has been going on, but this is a colossal disaster.

    We came up with a quick fix, luckily, you can replace the markup [[Image:Blah.png]] in MediaWiki with [url] and if the url points to an image, it will insert an unclickable image into the page.

    But the quick fix could not address another problem: we probably had the worst download page in the history of human kind. It was incredibly bad, and you can still see it on the archives.

    In the past few weeks, we wrote the beginnings of a new download page. Users will now be directed to this page, you can see it here. Thanks to the whole team in Provo that put together this new system and the folks in x-m-l that provided feedback on it.

    There is still some work left to do on it, but the entry page is no longer the disaster that it was. Luckily since the correctly on December 27th or so, people have finally been downloading our latest Mono.

    We of course feel terrible to all of the 95% of the users that wanted to try Mono on Windows and the Mac and ended up using a two year old version of Mono.

    Posted on 24 Jan 2008


    Lang.NET 2008

    by Miguel de Icaza

    Next week, am attending Lang.NET 2008 in the Microsoft Campus, two years ago this conference was a blast.

    Am looking forward to what looks like a fantastic program. Marek Safar, one of Mono's C# compiler developers, will be there as well.

    Since am not really a language designer myself, my talk will focus on discussing a few interesting solutions to a number of problems that we have faced while developing Moonlight and Mono and show a few creative applications that have been built with Mono.

    Posted on 24 Jan 2008


    New Mono Packages in RPM form

    by Miguel de Icaza

    Last year we ported various ASP.NET Starter Kits and we also started an effort to package popular Mono and .NET-based software in easy to install RPM packages using the OpenSUSE build service.

    The OpenSUSE build service allowed us to submit source packages with a specification on how to build it, and get RPM packages for various Linux distributions and various versions of those distributions. Currently we support Fedora, OpenSUSE and SUSE Enterprise.

    ASP.NET Starter Kits

    The starter kits were a useful test of Mono's ASP.NET implementation, and we routinely use these for QA before we make a release.

    When we did the port of these applications, this is what we did:

    • Switch the database to Postgress (so it is easier to test on Linux).
    • Cooked up a policy that our ASP.NET applications should follow to integrate with the system (Apache or FastCGI and our xsp engine). The docs are currently here and we are going to migrate them into our main server.
    • Integrate the application with the system, you can install and remove ASP.NET apps using the mono-asp-apps command line tool.

    RPMs of the Starter Kits are available from the Mono:Community directory from the build service, we have packages for various distributions there (OpenSUSE, Fedora and SUSE Enterprise).

    The OpenSUSE 10.3/noarch (platform independent, that means, they do not contain any x86 code) packages can be downloaded from here:

    There are of course many new starter kits published at www.asp.net, and someone (hint, hint) should look at porting them as well ;-)

    More Software

    Also, over the past few months we have been packaging some other popular Mono-based applications. Packages can be found from the community page as well, some favorites include:

    Web Apps:

    • MindTouch's DekiWiki: the GUI Wiki from Mindtouch. The cutest Wiki engine in the world.
    • MojoPortal: one-stop portal software based on .NET.

    Hopefully, when it comes to ASP.NET, our recent work on supporting FastCGI with Mono should expand the ways you can deploy ASP.NET apps on your Linux systems (in addition to our Apache support).

    Libraries and Tools:

    • gnome-keyring-sharp (access to the Gnome keyring from your desktop application).
    • Google GData's APIs for C#.
    • MySQL 5 connector.
    • The latest NUnit.
    • OpenTF, client and libraries to communicate with Team Foundation servers.
    • The TAO Framework for building cross-platform OpenGL, OpenAL, SDL, Cg, PhysicsFS and FreeGlut applications with C# and Mono.
    • Mono.ZeroConf, for all your Bonjour needs, with tutorials here.
    • Mono.Fuse: support for writing user-level file systems on Linux using C#. A sample is here.

    Desktop Apps and Libraries:

    • Banshee with ipod-sharp and podsleuth (the latest versions).
    • Gnome-do, the crazy delicious application starter for Gnome.
    • GBrainy, Jordi Mas' puzzles and training game.
    • WF-Apps: a collection of open source Windows.Forms applications that we use to test Mono's Windows.Forms.
    • Last Exit, the Last.FM player.

    Installing the Software

    You can either download the individual RPMs from your distribution and have your browser install the software, or you can subscribe your package management software to the repositories.

    OpenSUSE users for example, have to type this command:

    $ zypper ar -r http://download.opensuse.org/repositories/Mono:/Community/openSUSE_10.3/Mono:Community.repo
    	

    Or add it from the GUI Yast tool.

    After you have done that, the software collection will be ready to use, and you will be able to search for the new packages and install or upgrade software that we put in the Mono:Community group.

    YUM users just need to grab the above .repo file and save it in /etc/yum.repos.d.

    Debian and Ubuntu Users

    Although the OpenSUSE build system supports both of these platforms, it requires us to create new "descriptions" on how to build the software for those platforms.

    So far, we lack the experience and the time to maintain the Debian based packages ourselves.

    We would love if someone with Debian/Ubuntu experience wants to co-maintain the packages here (maybe a script to transform the .spec + sources into a debian package can be written?).

    Future Directions

    We have a long list of things that we want to package for Mono. The only thing that is limiting us at this point is the lack of time (some software needs to be massaged a bit to make it conform to our ASP.NET deployment guidelines, or our Application Deployment Guidelines.

    The Build Service is an open service (and its also open source, if you want to host your own build service in the comfort of your own living room).

    Hopefully some folks in the community can help us package some of the other pieces of software that we have listed there.

    Thanks!

    Thanks to our QA team, Marek and everyone else that has contributed to package this software for Mono.

    Posted on 23 Jan 2008


    Free Software Users Taxonomy

    by Miguel de Icaza

    For people in the Windows world, Bruce Byfields' A Field Guide to Free Software Supporters will help them understand the various groups that make up the free software/open source software movement:

    When you look, there are at least seven different types of FOSS supporters.

    To outsiders, these schools of thought are more similar than different. In the same way that many Europeans see few real differences between a New Englander and a Californian, outsiders may see little to distinguish a Softcore Advocate from an Activist.

    It is a great piece.

    This is a great starting point for anyone that is getting involved in FOSS. Understanding that these groups exist and their positions will make it much easier to understand the dynamics of development and advocacy that you will run into while working with the FOSS community.

    I feel that this article could be expanded on in a few areas, but eventually this could become a great taxonomy of the FOSS movement.

    For instance, I think that there is room to dissect the editorialist advocate. This is the do-as-I-say-not-as-I-do advocate which will praise and preach open source, freedom, open systems, open standards but yet always ends up using the latest-and-greatest proprietary, DRM-enabled, crypto-locked gadgets and software.

    Bruce has written a couple of other pieces that I liked on a similar subject: Conspiracy Theorists and Free Software and his follow-up Writing About Conspiracies essay.

    Posted on 23 Jan 2008


    As seen on JWZ

    by Miguel de Icaza

    As seen on JWZ's blog:

    outrage fatigue

    Posted on 18 Jan 2008


    Zing is acquired by Dell

    by Miguel de Icaza

    Zing, the company that created the Mono-based Sansa Connect has been acquired by Dell and is now offering at a discount price.

    They have released a new product for listening to Satellite Radio with Sirius in the US. The Stiletto 2.

    Posted on 17 Jan 2008


    Obama Fund Raising

    by Miguel de Icaza

    My friend Nat Friedman is raising funds for the Obama Campaign. If you are an American Citizen or a permanent US resident, please consider donating to Obama's campaign through Nat's fundraiser page (all the money goes to Obama, and you help Nat with his personal fund raising goal).

    Although am myself a Kucinichista myself, I also supported Obama's campaign by donating to Nat's fundraising effort.

    As readers of this blog know, am not a fan of the policies of the last seven years, and as an extension, not really a fan of the republicans.

    On the democratic side, I just can not agree with Hillary on anything.

    I have been personally bothered by Hillary Clinton since this March 2003 incident in which she walked out on the Code Pink girls and was parroting the administration party line.

    These days those that voted for that disastrous war claim that they were "tricked" into voting for it. But like some comedian said recently, "All these democratic candidates claim that they were tricked into War by President Bush. [...] but if you are a person that can be tricked by President Bush you are not presidential material".

    This Flash animation from November 2002 turned out to be prophetic and right on the spot.

    Chomsky turned out to be right: September 2002 interview.

    Fisk turned out to be right: September 2002 interview.

    The French and the Germans turned out to be right as well.

    The facts were there for anyone to see.

    Nat recently pointed out that Obama did not rush to "support the President" like every other drone did. He made a conscious decision at a time when it was not popular to oppose the crooks and liars at the White House.

    Posted on 17 Jan 2008


    Writer Strike: Daily Show and the Colbert Report

    by Miguel de Icaza

    Despite the writer's strike, both the Daily Show and the Colbert Report have been fantastic these last two weeks.

    The first couple of days, Stephen seemed to have fall out of shape after this long break, but by the end of last week he was in full Colbert swing.

    They have both been fantastic, and am even more impressed now with John and Stephen. They truly are masters of their domain.

    Still, a few things are missing here and there. I miss "The Word" segment very much.

    Posted on 17 Jan 2008


    Good News on File Formats

    by Miguel de Icaza

    Brian Jones posted two great news today on his blog.

    Microsoft has agreed to:

    • Publish their file format specification for the .doc, .xls and .ppt and do this under their Open Specification Promise.
    • To simplify the understanding of the mapping between the old binary formats and the new ones, they will start an open source project to generate OOXML files from the old binary file formats.

    These specs and projects are scheduled for February 15th.

    The full details are on Brian's Blog. These are great news for all third party implementations that need to interop with those documents.

    Some cheering is in order.

    Posted on 17 Jan 2008


    Joseph Hill Joins Novell

    by Miguel de Icaza

    Long time Mono contributor Joseph Hill (also an early advocate of Boo, and its integration and use in MonoDevelop) joined Novell today as Mono's Product Manager.

    Joseph will be my peer in the PM organization at Novell.

    Joseph blogs at Beyond Focus and is currently based in Dallas, but will soon be moving to Boston.

    Posted on 08 Jan 2008


    GNOME Do Gets Home Page

    by Miguel de Icaza

    David has setup a web site for Gnome DO, my new favorite app. The one that is helping me move away from the shell.

    See some screenshots or his latest screencast.

    For Banshee and Evolution integration, you need to download the extra plugins from here.

    Posted on 06 Jan 2008


    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


    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


    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


    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


    Nat in Boston

    by Miguel de Icaza

    Nat just landed, and we were touring the office when we ran into a messy room.

    Nat: what happened here?

    me: Oh, that's the xbox room.

    me: but the xbox is not here now.

    Nat: so what do you call this now? "The room"?

    Posted on 18 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


    Mono/Winforms jobs: follow up

    by Miguel de Icaza

    Calvin who is way better organized than I am posted the details about the job positions at Novell working on UIA for Linux.

    In Calvin's blog there is a link to Michael's details about the work that they will be doing.

    You can still send me your information, I will likely help the guys doing the interview, but the actual HR-esque process that organized people at Novell use is available.

    Again, these are not a jobs in the Mono team, but in the desktop team although plenty of the code that you will write will end up in the standard Mono distribution.

    Posted on 17 Dec 2007


    We are hiring: Accessibility Work

    by Miguel de Icaza

    We are doing some work to make Windows.Forms and Moonlight accessible. The desktop team is hiring people for the Cambridge office (USA) that want to work on accessibility technologies, free software, C#, Mono and the UI Automation framework.

    If you are interested, drop me an email with the subject line "AccessibilityJob" and we will reply in the next couple of weeks with one of those exercise interviews that we do.

    Although a lot of the work will end up in Mono, this is part of an effort from the desktop team, so technically you will be reporting into a different organization than the Mono team.

    Posted on 14 Dec 2007


    Hopeless Romantic

    by Miguel de Icaza

    The Dennis Kucinich campaign is doing a fund drive this Saturday. You can sign up here or contribute directly by clicking on "Contribute: Online" at the top.

    Reddit-poll after reddit-poll has shown that am most closely aligned with Kucinich than any other candidate for president of the US. Read the summary of his positions:

    More details: here.

    Posted on 14 Dec 2007


    Diabetes Experimental Treament

    by Miguel de Icaza

    My dear friend Chris Toshok recently discovered that he had developed diabetes.

    Tomorrow he is going to be admitted into an experimental treatment program for it. He will undergo four days of treatment.

    The day that he told us about the experimental program, I had just seen this:

    Good luck Chris!

    Posted on 12 Dec 2007


    Essential Chomsky

    by Miguel de Icaza

    Amazon reports that a new Chomsky book is on the pipeline. Essential Chomsky. Hope it is as awesome as some of the collected essays from Gore Vidal.

    Am myself a fan of his Understanding Power book. Maybe as much as a fan of it, as a fan of the various Gore Vidal books that they sell on airports, the pocket book editions (Imperial America, Perpetual War for Perpetual Peace).

    Posted on 12 Dec 2007


    Wii Remotes

    by Miguel de Icaza

    Guy Lunardi just emailed me a link to a very clever hack from Johnny Chung Lee at CMU.

    How to use the Wii remote to capture finger movement. A brilliant hack.

    The Wiimote library is released under the MS-PL, and I think this requires a port to Linux. I have added this wish-item to the Google Highly Open Participation project for Mono.

    Posted on 12 Dec 2007


    Wanted: Game Console

    by Miguel de Icaza

    Having missed on games for the past 15 years last year I finally got myself a Wii. Other than Wii Sports and now Metroid 3, I have yet to find anything worth playing.

    Nat recommended a Nintendo DS, and you guys had some great suggestions back in September. So far the only one I liked was Metroid Hunters (the control is so similar to the Wii, that its a pleasure to play) and am still making my way through the Sudoku's on the DS.

    I tried Halo3 but with its up/down/left/right-cursor-like technology to aim at enemies, it feels almost like am playing with a keyboard in 1988. After using the Wii for point-and-shoot, anything short of that for point-and-shoot feels unnatural. Like when the dentist stuffs your mouth with junk and still tries to have a conversation with you or trying to use a bendy straw for snorkeling.

    So am looking at expanding my Console Empire at home and purchasing either a PS3 or an XBox360. Aaron insists that I should not get the PS3 because Blue Ray this-and-that which I do not particularly care about.

    Aaron also claims that eventually you get used to up/down/left/right. I guess I will have to live with that, as the Wii is barely getting any games worth playing. And as a rule, I do not play anything that glorifies war, but am OK shooting at strange looking aliens.

    So am stuck, and willing to learn to use those unnatural controls on the PS3 and the XBox if there is something worth playing.

    Dear readers, what should I get, PS3 or XBox? And which games are worth playing? I do not care about movies on demand, or whatever other TV features they are trying to sell me, I already have Tivo HD and Tivo with DVD playback and recording.

    You can either email me or post here your suggestions.

    Posted on 08 Dec 2007


    Track Moonlight Status

    by Miguel de Icaza

    Rusty has setup a nice page that tracks the Moonlight 1.0 status with various applications out there. We are using this as part of our QA and development process.

    As it turns out, it was easier to support .NET-based Silverlight (1.1) applications than the Javascriped-based ones (1.0) as the .NET-based ones tend to do all the heavy lifting in managed code. And it was very easy for us to use tools like corcompare to ensure API completeness.

    With 1.0, the story was different, we were debugging things on a when-we-find-a-problem-we-fix-it approach. JB recently created a tool based on the Microsoft specifications that helped us close the gap quickly. We went from hundreds of missing entry points to less than a dozen in a week.

    We now have cute Firefox installers for 1.0 and 1.1 on Linux/x86 and Linux/x86-64, once we have the new codec framework in place we will make them available to the public for testing. In the meantime, people interested in testing Moonlight still need to build it themselves. See our Mono Olive mailing list for details.

    Posted on 07 Dec 2007


    Embedded, its not part of foreplay, but it is still very important.

    by Miguel de Icaza

    I still hate the classification of anything that describes itself as enterprise (and I work for a company slogans are sprinkled with enterprise).

    Yesterday someone emailed me:

    It was not the point of your blog today but I'd be interested in hearing about company's usage of Mono in embedded systems. Because of our affinity for C#/.NET we originally looked at WinCE for the next generation of one of our product platforms. It didn't go very well (we were still at WinCE 5 so I can't say how 6 is). Ironically, using Mono on a Linux Embedded system seems to give you more .NET / C# then you get with CF on WinCE.

    So I reached out to a friend that has raved about Mono in the past, and I wanted to get a quotable answer from him (I asked him if I could quote one of his emails from last year). He did give me a quote that I can send around to folks, but his company will not publicly endorse his quote.

    Which is exactly the problem that I was describing yesterday. Anyways, the quote is:

    C# and mono is a great way to develop embedded products. If you separate the heavy lifting from the application logic properly, the performance impact of C# is not significant and makes application development much faster and less buggy.

    I've been doing embedded development with C# for over 5 years and mono is way better than .NetCF due to superior performance and binary compatibility with MSFT's desktop .Net.

    One thing that is particularly handy is that you can prototype on a desktop PC and just drop the managed binaries on the device and they just work - no need to recompile.

    So anyways, you are going to have to trust me that I did not make up that quote myself.

    And today we delivered a gift (or in Don Box parlance, a "small bouquet of flowers") for those embedded people that use ARM processors.

    Update: The author of the quote comments:

    When you mention embedded development with mono, it might be worth mentioning that there is some startup cost for the JIT, depending on the CPU speed and how much managed code there is, and that the memory footprint with mono will be larger than it would be without. For most devices this may not be an issue, but it is something a device developer should keep in mind. Hopefully the AOT support will mitigate the startup costs.

    Posted on 07 Dec 2007


    Pre-compilation support for ARM processors

    by Miguel de Icaza

    Zoltan just checked-in support for ahead-of-time (AOT) compilation in Mono for ARM processors.

    We are looking for volunteers to test the support and post their findings to [email protected]. In particular, we are hoping that this should further reduce startup time and memory usage on Maemo devices.

    An old post of mine covers the basics of using it.

    Posted on 07 Dec 2007


    Mono Usage in the Enterprise

    by Miguel de Icaza

    Over at the Enterprise Linux Blogs there is a quite positive article about Mono and I wanted to comment on it without having to fill 20-pages worth of questions to post a reply there.

    Schley makes a few good points, but its worth pointing out some things:

    2. People assume that Mono is not ready for the enterprise.

    One of the reasons for this is because not many enterprise projects are being built with it (I'll get to that later.) Instead, Mono is primarily being used to construct desktop software.

    The second reason for this misconception is the Mono project's inability to stay in step with Microsoft .NET. Currently, Mono is somewhere between .NET version 1.1 and 2.0 while .NET 3.5 was just released. This is not the Mono team's fault. Microsoft does not collaborate with them, so everything the Mono team accomplishes is through their own blood, sweat and tears. Nevertheless, this version discrepancy creates the perception that Mono is just a .NET wannabe.

    [...]

    With the exception of iFolder, Mono is not being used to develop any truly useful enterprise applications. Great desktop applications are being created, like Tomboy and Beagle, but no one has created the next great server application using Mono.

    He is correct that Novell's use of Mono has been mostly focused on the desktop.

    But there are quite a number of applications beyond the desktop that are being developed with Mono outside Novell. We have been tracking a list of companies using Mono and the list of programs and libraries keeps on growing every day.

    A problem that we do have is that of the companies using Mono have policies of not publicly endorsing third party products. Also, we typically only find out about who is using Mono when they have a bug to report, or need some new feature to be implemented. And in many of those cases we are not in a position to use them as reference customers.

    If you look at the posts, sigs and domains of people posting to the forums and the mailing lists, you will get a better idea of what kind of applications people are building, and who is building them.

    A few companies have agreed to allow us to publish success stories about their use of Mono, some of them are:

    Some other serious uses of Mono, but without a full success-story case include Fiducial.FR (their intranet runs on Mono), Zing (mp3 and Sirius radio players), Medsphere (Health Care software), Quantify Solutions (financial tools), MindTouch (commercial Wiki hosting) and its even used by companies in the USC 2257 space to build enterprise solutions (for an interesting definition of enterprise).

    At least a few years ago, the Wikipedia search engine was powered by Mono. I do not know if that is still the case.

    The goal of the Mono team at Novell is not only to help our internal users, but to make sure that external developers can use Mono without a problem. We fix bugs, improve performance, improve compatibility and write new libraries (both Microsoft compatible, or part of Mono's own stack).

    Maybe the issue is that we do not have a lot of server-side applications that are part of a default Linux install. What we do have are plenty of vertical applications that people are developing or porting.

    Memory Leaks If you have ever used Beagle you know that it can heinously crash your system. Since it's inception, Mono has been plagued with a random memory bug. Your system memory will go from 1% to 1000% in a matter of seconds, without warning. If the Mono developers want to make Mono more than just a desktop hobbyists language then they need to fix this bug once and for all.

    As for memory usage problems: there are certainly memory leaks in Mono, but nothing as bad as a show stopper. Mono can not reduce memory usage if an application uses a lot of memory. Sometimes the blame for memory consumption falls on the application and is usage patterns.

    Beagle might have had bad memory usage patterns on its early days, but a lot of this changed in newer releases.

    There is one particular class of memory-hungry applications: any .NET applications that used generics (the 2.0 profile) extensively was negatively impacted by memory consumption before Mono 1.2.5. On one hand, we are glad that application developers switched to 2.0, as they helped us find the bugs and limitations in Mono, but it also meant that users had to suffer as we understood all the ramifications of the 2.0 profile and generics.

    The situation will dramatically improve with our upcoming Mono 1.2.6. As Aaron already reported 1.2.6 had a dramatic impact on memory usage in Banshee (a generics-heavy application).

    Python Effect There is a huge movement in the Gnome community to make Python the standard language for Gnome development. Mono is a close second, thanks in part to the great desktop applications being written with it. However, if Python is officially adopted, there will be a backlash against Mono, or pressure on developers to adopt Python and port their once Mono applications to the official language. In order to prevent this from happening, Mono developers need to demonstrate Mono’s cross-compatibility.

    Python is indeed making great strides as a desktop development platform and am not sure that we are in the business of competing with it. If people like writing Python code, they should just keep writing python code.

    Myself, I like the IronPython variation of Python more. IronPython just happens to be JITed Python and in most tests it is faster than CPython. For the past year or so, we have also been in love with Boo, another .NET language. Boo has support for strong typing, so for certain scenarios you will get even better performing code (basically, when you can determine the type of a variable ahead of time, instead of having the variable be entierly late bound).

    At the Mono Summit, a developer had built a game that was scripted with Python, said something more or less like this: "Our game used to be very slow, when we switched to Mono, all those problems went away" (edited for political correctness).

    So each developer will make up his mind as to what is best for a particular use case.

    The Mono team needs to have Mono installed by default into Linux so that if you write an application with Mono it can run in Windows AND Linux (and even OS X).

    We agree with that. Applications built with Mono on Linux already work on Windows and MacOS (including Windows.Forms).

    When it comes to Gtk# applications, Our Mono on Windows ships with Gtk# and we recently announced that we will be supporting it as well on MacOS X and that we will be extending our OSX support.

    Posted on 06 Dec 2007


    Real Time Linux

    by Miguel de Icaza

    Today there was some claims from a Red Hat VP regarding Novell shipping of Real Time Enterprise Linux.

    I find it odd that Red Hat would make those claims, as for more than a year on all sorts of meetings SUSE Real Time development status updates come back and forth. Usually they are high level, but we get to hear a lot about Moiz's team work at these meetings.

    Kevan Barney from Novell PR posted a response to the claims that Novell has not contributed code. And points to the mailing list where you can see that Novell engineers have been contributing code and participating on Real Time Linux with the rest of the community for a long time.

    Posted on 05 Dec 2007


    Pure Comedy

    by Miguel de Icaza

    It can not get better than this.

    The neoconservatives response was swift, check the professionally summarized version of all the punditry in one easy blog post.

    Posted on 04 Dec 2007


    Love Kucinich

    by Miguel de Icaza

    This is just brilliant.

    Hope my American friends like Kucinich as much as I do.

    Update: Slate covers the health plans. Kucinich is the best.

    More Kucinich Awesomeness: New NIE Report Shows Bush Administration Has Once Again Tried To Falsify Grounds For A War With Iran.

    Posted on 04 Dec 2007


    Mono on OSX, Win32

    by Miguel de Icaza

    In general, the focus of the Mono team is on Unix system, and more specifically for open source versions of Unix (Linux and BSD) but we still provide provide some support for Win32, Solaris and OSX even if they are proprietary and OpenSolaris (even if its licensed for mininal collaboration and cross pollination with Linux).

    In general, our cross platform story has suffered a little bit when it comes to GUI toolkits: our Windows.Forms implementation works with X11, but Mac users really want to run a native version of it, without requiring an X server.

    Gtk# suffers from the same problem: it works on X11, OSX and Windows, but on OSX it requires the X11 driver which is suboptimal.

    In general, I do not like to support proprietary operating systems, but in the particular case of OSX, there is enough of a user-base that it made sense to bend backwards for the sole purpose of increasing the contributor and user bases.

    At the Mono Summit we outlined our new strategy for OSX:

    • Our Windows.Forms now has a native OSX back-end. Mono 1.2.6 will ship with it, and Mono 1.2.7 will ship with several upgrades (some already on SVN) that will make Windows.Forms applications run even better on OSX.
    • We will distribute Imendio's Gtk+ for OSX and Gtk# as part of our runtime. It has now reached a maturity point that allows applications like MonoDevelop to run natively (without X11).
    • We will distribute MonoDevelop for OSX users as a pre-compiled package, and we will provide support for it.
    • MonoDevelop will also be ported to Windows. The work necessary to port MonoDevelop to OSX is also going to help the port of MonoDevelop to Windows. This should be useful for people that are building Gtk#-centric applications on Windows. For other uses Visual Studio and SharpDevelop will continue to be better IDEs to use.

    We will support the following, but only as a lower priority, and work on them will be preempted by other needs in Mono:

    • We will support Objc-Sharp for those that need bridges between Objective-C and Mono. But
    • We will depend on the community, and provide some assistance to those that rather use the CocoaSharp bindings to the native Cocoa APIs.

    A screenshot of a Windows.Forms app running with the native driver (click for a full shot):

    A screenshot of MonoDevelop, our Gtk# based IDE on MacOS with Gtk's native OSX driver:

    We are shipping MonoDevelop 1.0 at the end of January, after this, we will start work on the debugger integration into MonoDevelop (the most requested feature) and we will also add support for developing Silverlight applications with it.

    At the Mono Summit, we got Moonlight running on MacOS X (including desklets!) which means that our Silverlight designer (currently called LunarEclipse) will be available on MonoDevelop on OSX. But we will not support Moonlight on the browser on Safari or Firefox on OSX as you can run Microsoft's edition there.

    Posted on 02 Dec 2007


    The Mono Summit is Over

    by Miguel de Icaza

    The summit was fantastic. The first two days we did a bit of internal planning for the project (we had Novell employees and contributors that day).

    Although I had originally wanted to have as much empty space as possible to do some more Unconference style presentations, we probably had too much structure in place. At least we had some large holes between presentations for people to talk to each other (except that not one talk finished on time, which meant that we were always a few hours later to end the day).

    The event was supposed to end every day at 17:45pm, but most of us barely left the place before 9pm (which was nice of them, to keep the place open for us until late). Followed by a late-dinner in Madrid, and a then some socializing in the hotel lobby or nearby bars turned into four hours of sleep every night.

    Thanks to everyone that made this happen, and for our Ismael Olea who provided our logistic support at the event every day and Alejandro S�nchez that got us this beautiful venue in Madrid.

    I hope that all the attendees got to talk to the team members; I know that many of you did, and I hope that we fixed your issues, or we came up with a solution for your issues.

    Posted on 02 Dec 2007


    XML Conference

    by Miguel de Icaza

    Next week I will be attending the XML Conference here in Boston. Am looking forward to the opening keynote on Monday by Douglas Crockford.

    My friend Rich Saltz invited me to talk about Moonlight: our open source implementation of Silverlight on Linux (Wednesday).

    On Tueday I will talk about our efforts to support both ODF and OOXML at Novell in our edition of OpenOffice.

    Posted on 02 Dec 2007


    Botijos in New York City

    by Miguel de Icaza

    My friend Karla Frechilla will be presenting her artwork in New York City starting this Saturday until the 15th.

    There will be an opening reception on Tuesday December 4th from 6 to 8 pm at Jadite Galleries 413 W 50th St in New York City.

    She will be presenting her Botijos as well as some of her paintings.

    Posted on 30 Nov 2007


    Generics Memory Usage

    by Miguel de Icaza

    Aaron walked into my office today to get some some feedback on some implementation detail for his new listview in Banshee.

    Before he left the office he said something like, but not necessarily "In some Microsoft blog someone commented that I should not use generics for small arrays of value types" (see Update at the bottom).

    So we decided to measure with a trivial program the memory consumption for storing small arrays with and without generics with Mono 1.2.5 and Mono 1.2.6.

    Storing 8 megs of ints (32-megs of data) on an array of objects has a high overhead: the actual data, the box, the object lock which means that you end up using about 21.5 bytes per int:

    		object [] e = new object [size];
    
    		for (int i = 0; i < size; i++)
    			e [i] = 1;
    	

    With a generic array, you are as close as possible to a real array and you only consume 38 megs of ram (this is the full process size, the 32 meg array plus the Mono runtime, JIT, etc), the following sample ensures that am not using a regular int array, but an instantiated generic class with ints:

    		public class D<T> {
    			public T [] t;
    			
    			public D (int size)
    			{
    				t = new T [size];
    			}
    		}
    
    		D<int> d = new D<int> (size);
    		for (int i = 0; i < size; i++)
    			d.t [i] = 1;
    	

    The regular collection consumes 178 megs of ram, while the generics collection consumes 38 megs of ram (when running with Mono).

    I was a bit shocked about the 178 megs of ram used by regular object wrappers, so I wrote the equivalent for Java, to see how they fared compared to Mono:

    	      Object [] x = new Object [8*1024*1024];
    
    	      for (int i = 0; i < 8*1024*1024; i++)
                         x [i] = new Integer (i);
            

    Java uses 248 megs of ram, so it is chubbier than regular C# at 30 bytes per boxed int on average (this was with Sun's Java 1.6.0, maybe there are newer versions, but thats what I got on my system).

    I got no Java/generics skills to implement the above with Java, but since Java does not really have generics at the VM level (they are implemented purely as a language-level feature), I do not think that the numbers would be significantly different).

    Mono 1.2.6 also introduces a number of memory reduction features for generics that reduce the size of our interfaces. When using generics, in 1.2.5 on a List<int> case we were generating a lot of useless stuff:


    IMT tables size: 7752
    IMT number of tables: 102
    IMT number of methods: 2105
    IMT used slots: 872
    IMT colliding slots: 486
    IMT max collisions: 27
    IMT methods at max col: 134
    IMT thunks size: 19060

    With the upcoming 1.2.6 release the memory savings for the metadata kept resident by the runtime are also significant:


    IMT tables size: 7752
    IMT number of tables: 102
    IMT number of methods: 4
    IMT used slots: 2
    IMT colliding slots: 1
    IMT max collisions: 3
    IMT methods at max col: 3
    IMT thunks size: 34

    There is still an issue of locality. Using the boxing collections has the advantage that the same code is shared across all possible types. The generic versions on the other hand get their own JITed versions of every method involved (at least today).

    You can track Mark's progress to change this as he continues with our implementation for generic code sharing.

    Summary: From a memory consumption point of view, the bottom line is: if you are storing value types (non-object values like ints, longs, bools) it is better to use generic collections (System.Collections.Generic) than using the general-purpose collections (System.Collections). If you are just going to store references to objects, there is really no difference.

    Update: The comment was from Rico Mariani, and the source of the confusion was:

    List<T> offers generally better performance than ArrayList as well as type safety. We recommend using List<T> over ArrayList always if T is a reference type. If T is a value type there is additional cost assocated with creating a specialized version of List<T> for that value type. When T would be a value type we recommend List<T> if the savings in boxing is greater than the cost of the additional code -- this tends to happen if you store about 500 elements across all your List<T> objects.

    OK, so the confusion is not that it might be worse for value types, but that the JIT will have to generate specific instantiations of generic methods (Insert for example) based on the parameter type.

    So the JIT generates separate code for a List.Insert of int and for a List.Insert of long. Considering the savings for even small apps, I will go with "Go wild with the value types" myself as the code for the collection code is really small.

    Posted on 21 Nov 2007


    Javascript Decompressor Roundup

    by Miguel de Icaza

    Thanks to everyone that emailed me answers to the Javascript decompressor issue. This is a reply in case other people are looking at ways of de-obfuscating or have to debug some compressed Javascript code.

    I included the names of the nice folks that emailed me, and some comments for those that I actually tried out.

    Some annotations:

    • [CMD] works from the command line, my favorite kind.
    • [WEB] Provides a web UI.
    • [GUI] GUI
    • [SOURCE] comes with source code.
    • [WINDOWS] Windows-only

    Here they go:

    • [WEB, CMD, SOURCE] Beautify is a PHP-based, server-side decompressor. This was the one I used to debug some of the problems we were having, and the results are very good. Source code is available for you to run on your local server, or you can reuse it from the command line (some assembly required for command-line use).
    • [CMD, SOURCE]Qooxdoo's pretty printer written in Python (Fabian Jakobs, Sebastian Werner), to use:
      $ INSTALL_PATH/frontend/framework/tool/modules/compiler.py file.js
      		

      Alternatively, you can get only the pretty printer from SVN:

      $ svn co https://qooxdoo.svn.sourceforge.net/svnroot/qooxdoo/trunk/qooxdoo/frontend/framework/tool/
      $ modules/compiler.py -w originalFile.js
      		
    • [WEB, SOURCE] Beautify.aspx. Get the source code as the link from their web page is broken (Jokin Cuadrado, Steven Coffman).
    • [GUI, WINDOWS] A Plug-in for Fiddler: Fiddler is a Windows HTTP debugger, if you are using Windows and Fiddler this plugin might be for you (Jokin Cuadrado, Steinar Herland).

    If you are a VIM user, this VIM script provides Javascript indentation. but it seems like a lot of work for general-purpose decompression of javascript (Kjartan Maraas).

    If you feel that none of the above is good for you and you want to prepare for your interview at Google, Jeff Walden suggests a hard-core approach:

    One of the less well-known aspects of SpiderMonkey, Mozilla's C JavaScript engine, is that it includes a decompiler which translates from SpiderMonkey bytecode to JavaScript (most people only use it the other way around). You can see it at work any time you convert a function to a string. Most JavaScript engines, when asked to convert a function to a string, do one of two things: return the exact source text (I believe IE does this, but I haven't double-checked), or return a string provides the minimum ECMAScript requires -- that the string have the syntax of a function declaration, i.e. that it be be evaluable to create a function (I think this is what Safari does). SpiderMonkey's choice to eliminate the overhead of storing source text after converting means that it can't do the former, and the latter is unpalatable from a developer standpoint. Instead, it decompiles the bytecode back to a JavaScript string representing the function as exactly as possible, while at the s ame time formatting the decompiled source to be reasonably readable. How would you use SpiderMonkey to reformat obfuscated source? First, you get a copy of SpiderMonkey:
      export CVSROOT=:pserver:[email protected]:/cvsroot
      cvs co mozilla/js/src
      cd mozilla/js/src
      make -f Makefile.ref clean && make -f Makefile.ref  # work around broken dependency system
      .obj/js # to run the interpreter
    

    Next, you dump the JS code you want to reformat into a function, and you have SpiderMonkey pretty-print it:

      echo "function container() {" > obfuscated.js
      cat file-to-clean-up.js >> obfuscated.js
      echo "} print(container.toString());" >> obfuscated.js
      path/to/js -f obfuscated.js
    

    SpiderMonkey will then print the container function's string representation, adjusting indentation and such to create a readable, if still name-obfuscated, version.

    A couple things to know about this: first, SpiderMonkey doesn't pretty-print functions found in expression context:

      (function() {
         print("this won't get cleaned up");
       })();
      call_method(function() {
        print("this will probably be crunched to one line");
        print("not pretty-printed");
      });
    

    These examples are converted (once stripped of the containing function) to:

      (function () {print("this won't get cleaned up");}());
      call_method(function () {print("this will probably be crunched to one line");print("not pretty-printed");});
    

    The former pattern's become fairly common for reducing namespace collisions (unfortunately for the decompiler), and the latter's become more popular as the functional aspects of JavaScript have been more played up recently in libraries. For now at least I think you just have to tweak the original source file to fix these problems. The decompiler could do a better job on these given some changes, but I don't see this happening any time soon. The decompiler is generally agreed to be one of the hairiest and least-well-understood pieces of code in SpiderMonkey, and people don't touch it that often.

    Incidentally, the decompiler is also what allows SpiderMonkey to give the informative error messages it gives when your code throws an uncaught exception; the error messages I've seen in any other JavaScript interpreter are woefully less useful than the ones SpiderMonkey gives you using the decompiler.

    Posted on 16 Nov 2007


    RayTracing in one LINQ statement

    by Miguel de Icaza

    Through Don Syme's blog I read about Luke Hoban moving from the C# team at Microsoft to the F# team, I did not know about Luke's blog until now, it is a fantastic collection of cool C# 3 nuggets.

    One of the things that impressed me the most is a recent sample he posted.

    Luke implements a RayTracer in one line LINQ code. This test is insane (and sadly, our C# compiler is not yet able to handle that kind of complexity yet for LINQ statements). I reproduce it here (directly copy-pasted from Luke's blog):

    var pixelsQuery =
      from y in Enumerable.Range(0, screenHeight)
      let recenterY = -(y - (screenHeight / 2.0)) / (2.0 * screenHeight)
      select from x in Enumerable.Range(0, screenWidth)
        let recenterX = (x - (screenWidth / 2.0)) / (2.0 * screenWidth)
        let point = Vector.Norm(Vector.Plus(scene.Camera.Forward, 
    Vector.Plus(Vector.Times(recenterX, scene.Camera.Right), Vector.Times(recenterY, scene.Camera.Up)))) let ray = new Ray { Start = scene.Camera.Pos, Dir = point } let computeTraceRay = (Func<Func<TraceRayArgs, Color>, Func<TraceRayArgs, Color>>) (f => traceRayArgs => (from isect in from thing in traceRayArgs.Scene.Things select thing.Intersect(traceRayArgs.Ray) where isect != null orderby isect.Dist let d = isect.Ray.Dir let pos = Vector.Plus(Vector.Times(isect.Dist, isect.Ray.Dir), isect.Ray.Start) let normal = isect.Thing.Normal(pos) let reflectDir = Vector.Minus(d, Vector.Times(2 * Vector.Dot(normal, d), normal)) let naturalColors =
    from light in traceRayArgs.Scene.Lights let ldis = Vector.Minus(light.Pos, pos) let livec = Vector.Norm(ldis) let testRay = new Ray { Start = pos, Dir = livec } let testIsects = from inter in from thing in traceRayArgs.Scene.Things select thing.Intersect(testRay) where inter != null orderby inter.Dist select inter let testIsect = testIsects.FirstOrDefault() let neatIsect = testIsect == null ? 0 : testIsect.Dist let isInShadow = !((neatIsect > Vector.Mag(ldis)) || (neatIsect == 0)) where !isInShadow let illum = Vector.Dot(livec, normal) let lcolor = illum > 0 ? Color.Times(illum, light.Color) : Color.Make(0, 0, 0) let specular = Vector.Dot(livec, Vector.Norm(reflectDir)) let scolor = specular > 0 ? Color.Times(Math.Pow(specular, isect.Thing.Surface.Roughness), light.Color) : Color.Make(0, 0, 0) select Color.Plus( Color.Times(isect.Thing.Surface.Diffuse(pos), lcolor), Color.Times(isect.Thing.Surface.Specular(pos), scolor)) let reflectPos = Vector.Plus(pos, Vector.Times(.001, reflectDir)) let reflectColor =
    traceRayArgs.Depth >= MaxDepth ? Color.Make(.5, .5, .5) : Color.Times(isect.Thing.Surface.Reflect(reflectPos), f(new TraceRayArgs(new Ray { Start = reflectPos, Dir = reflectDir }, traceRayArgs.Scene,
    traceRayArgs.Depth + 1))) select naturalColors.Aggregate(reflectColor, (color, natColor) => Color.Plus(color, natColor)))
    .DefaultIfEmpty(Color.Background).First()) let traceRay = Y(computeTraceRay) select new { X = x, Y = y, Color = traceRay(new TraceRayArgs(ray, scene, 0)) }; foreach (var row in pixelsQuery) foreach (var pixel in row) setPixel(pixel.X, pixel.Y, pixel.Color.ToDrawingColor());

    Although the above is pretty impressive, you might want to read about Luke's history of writing ray tracers as test cases for a new language (I write the factorial function, Luke writes Ray Tracers). His original sample from April goes into the details of how to define the scene, the materials and the objects and is useful to understand the above LINQ statement.

    The full source code (includes the support definitions for defining the Scene and materials) is available here.

    The original code (not LINQ-ified) is available here.

    Posted on 16 Nov 2007


    Javascript decompressors?

    by Miguel de Icaza

    Recently we have been debugging lots of Javascript from web pages, and the Javascript is either white-space compressed or obfuscated.

    Does anyone know of a tool (preferably for Unix) to turn those ugly Javascript files into human readable form?

    Am currently using GNU indent which is designed for C programs, but it does a mildly passable job at deciphering what is going on, but it is not really designed to be a Javascript pretty-printer. I would appreciate any pointers.

    Posted on 13 Nov 2007


    Mono Summit Schedule Published

    by Miguel de Icaza

    Jackson has published the Mono Summit 2007 Program Schedule.

    If you are attending, please remember to register.

    Posted on 13 Nov 2007


    A Cool Mono Success Story

    by Miguel de Icaza

    Salvatore Scarciglia wrote an email today to tell me their story of using Mono on Clinical Trials. His team currently uses Oracle Clinical Trials, but when they wanted new features, they decided that it was better for them to build their own software than licensing the extra modules they needed to grow.

    Salvatore has a description of their project where he explains why they built the software using .NET in the first place (they were mostly a Microsoft shop, with Microsoft servers, and they liked Visual Studio).

    Recently something changed:

    I believe in Mono (take a look at the projects page of this site) and I think that it can grows very fast in the next years. When I read that one of the latest release of Mono supports almost all the .NET Framework 2.0 I've decided to try our framework with it. The original architecture based on:
    Windows Server 2003 + .NET Framework 2.0 + SQL Server 2005

    has been substitute with:

    Debian 4 + Apache + Mono 1.2.5 (mod_mono2) + MySQL (with .NET connector)

    and... it works !

    It was very hard to rewrite all the stored procedures and views developed with T-SQL in SQL Server, but at the end all the "dirty" work was done. On the other hand Monodevelop 0.16 has compiled the entire framework with no errors. The .NET connector provided by the MySQL team works fine and, finally, Apache + mod_mono was not so easy to configure but I did it.

    Using Microsoft technology you have the advantage to use the best development environment (Visual Studio 2005), a fully supported database engine (SQL Server 2005) and the availability of many documentation and tutorial sites (first of all the MSDN). Using Mono you have the great opportunity to develop in C# on Linux.

    [Ed: some typos fixed by my speller while quoting.]

    This has also been our experience: porting the stored procedures from a SQL server to another is probably the most time consuming piece of work and it is also not mandatory. Mono comes with a SQL Server provider, and if you just want to replace your front-end ASP.NET servers with Linux hosts, you can continue to talk to your backend MS SQL Server if you want to.

    Sadly, it has also been our experience that the most difficult piece to setup in Mono is mod_mono. The last time I set it up it was difficult, and people regularly have problems setting it up. A year or so ago, we came up with a pretty cool extension to mod_mono that (in my mind) simplified the deployment: AutoHosting, but it does not seem to be enough.

    Am hoping that the new the FastCGI support for Mono will make it simpler to configure for some setups.

    If you are interested in porting your ASP.NET application to Linux, you will like Marek Habersack's tutorial on porting ASP.NET apps that covers many of the details.

    Posted on 13 Nov 2007


    Android's VM

    by Miguel de Icaza

    Or <jwz>I, for one, welcome our new virtual machine overlords</jwz>

    A very interesting theory on why Google created a new VM for Android instead of using an existing VM:

    Dalvik is a virtual machine, just like Java's or .NET's.. but it's Google's own and they're making it open source without having to ask permission to anyone (well, for now, in the future expect a shit-load of IP-related lawsuits on this, especially since Sun and Microsoft signed a cross-IP licensing agreement on exactly such virtual machines technologies years ago... but don't forget IBM who has been writing emulation code for mainframes since the beginning of time).

    But Android's programs are written in Java, using Java-oriented IDEs (it also comes with an Eclipse plugin)... it just doesn't compile the java code into java bytecode but (ops, Sun didn't see this one coming) into Dalvik bytecode.

    So, Android uses the syntax of the Java platform (the Java "language", if you wish, which is enough to make java programmers feel at home and IDEs to support the editing smoothly) and the java SE class library but not the Java bytecode or the Java virtual machine to execute it on the phone (and, note, Android's implementation of the Java SE class library is, indeed, Apache Harmony's!)

    With this VM, they managed to not depend on Sun terms for the future of the language and the VM or be bound by any definitions of the Java language. It is worth reading the entire article.

    Once the source code for Android is released, it would be interesting to look into integrating Mono wiht it. It should already run on it, as its just Linux. What would be interesting is continuing to use C# to write code for it.

    Some ideas that have been bounced around in the mono channels recently include:

    • CIL to Dalvik recompiler: Translate CIL bytecodes into Dalvik ones, like (like Grasshopper does) and provide a class library add-on.
    • DalvikVM: Implement a VM similar on top of Mono that can run Dalvik bytecodes side-by-side with other CIL code. This would be similar to the IKVM approach: a JavaVM for CIL.
    • Dalvik Support in Mono: Paolo suggested to add support to the Mono VM to have a Dalvik loader and turn the Dalvik instructions into the internal Mono IR (the rest at that point would be shared).
    • D/Invoke: Add support to the Mono VM to transparently call code into another VM. Very much along the lines of P/Invoke or COM's it-just-works support.

    Looking forward to the release.

    Posted on 13 Nov 2007


    On parsing integers: Jeft Stedfast's Beautiful Code

    by Miguel de Icaza

    While the world is debating what is the proper object oriented and syntactic decoration for another wrapper around getElementById we back in Mono-land were coping with a bug related to parsing integers.

    In the CLI the original API to parse integers threw exceptions when an overflow was detected. So if you tried to parse a value that is too large to fit on an int, you would get an overflow exception. This is trivial to implement in C# because you just write the parser code more or less like this:

    		int value, digit;
    		...
    		value = checked (value * 10 + digit);
    		
    	

    If the result for the expression value * 10 + digit the JIT just throws. Beautiful.

    This is great as long as your input is error-free, but if you are going to cope with lots of errors, you are going to be coping with a lot of exceptions. And throwing and catching exceptions is consideraly slower than returning an error code. So with .NET 2.0, a new family of methods was introduced, something like this: bool Int32.TryParse (string value, out int result).

    The idea here is that instead of raising exceptions left and right we instead try to parse the value, and if the value overflows we just return an error condition.

    A simple approach is to use a type that is bigger than the type you are parsing and you just check the boundaries for errors, for example, a byte could use an int:

    
    		int value;
    
    		value = value * 10 + digit;
    
    		if (value < Byte.MinValue || value > Byte.MaxValue)
    			// error.
    	

    The downside with this is that parsing 32-bit ints requires 64-bit longs. This alone is quite expensive as 64-bit operations on 32-bit machines take many more instructions, consume more registers and produce slow code for a very common case. For the 64-bit case, things are worse, since there is no 128-bit longs in .NET, which means that we have to either come up with something clever, or you need to do checked expressions (like before), use try/catch and return an error on the catch handler. Very suboptimal.

    The ideal situation is to do the parsing with the data type at hand (use an int for int parsing, a long for long parsing) and catch the overflow before it causes a problem.

    Without going into the embarrassing details (which anyone with an inclination to point fingers can do) recently we had to rewrite these routines and Jeff Stedfast came to the rescue with two beautiful routines: one to parse signed integers, and one to parse unsigned integers in C.

    His routines are beautiful because they are able to parse a 32-bit int in a single loop, only using 32-bit ints; And 64-bit ints in a single loop, only using 64-bit longs.

    His routines were for C code, but variations of these rewritten for C# are now part of our runtime (they will ship as part of Mono 1.2.6).

    These routines have a very clever way of coping with overflows.

    Posted on 13 Nov 2007


    Undoing Bush

    by Miguel de Icaza

    Joseph Stiglitz discusses the Economic Consequences of Mr. Bush. Looking back at seven years of mistakes, a great big-picture summary of what went wrong and why, and the damage these policies have inflicted in the US.

    Harper's Magazine ran a series of essays on how to fix the mess left behind in Undoing Bush: how to repair eight years of sabotage, bungling, and neglect.

    Posted on 10 Nov 2007


    Mono Bug Days

    by Miguel de Icaza

    On Monday and Tuesday (November 5th and 6th) we want to spend some time triaging, prioritizing and applying easy fixes to Mono from Bugzilla.

    We will be on irc.gnome.org on the channel #monobugday on Monday and Tuesday going over various Mono components.

    Our entry point is: http://www.mono-project.com/Bugs.

    There is a lot of low-hanging fruit that could be easily fixed in Mono, bugs that are invalid, bugs that are missing information, bugs that needs owners, bugs that need confirmation and patches that have been waiting on the bug tracking system to be applied.

    I have zero experience running a bug day and am not sure quite how to run this on Monday, if you have some experience, feel free to drop by, or send your comments.

    Posted on 03 Nov 2007


    FastCGI support for Mono's ASP.NET

    by Miguel de Icaza

    Brian Nickel worked on extending our hosting server for ASP.NET applications (XSP) to support FastCGI. Robert Jordan today integrated his Summer of Code project into the main distribution for XSP.

    Until today developers had two options to host ASP.NET applications with Mono: mod_mono (using Apache) or using a standalone, minimalistic HTTP 1.0 server (the xsp command).

    XSP provides the Mono.WebServer.dll ASP.NET application hosting library (controls application domains, starts up new instances of HttpApplication, configures and most importantly implements the communication endpoint for HttpWorkerRequest). Mono.WebServer.dll is not very useful on its own as it does not actually implement the HTTP protocol.

    For Mono.WebServer.dll to actually be useful, it is necessary to write an HTTP front end for it. Something that speaks the protocol and passes on the request to the application hosting interface.

    Most setups today look like this:

    You just have to imagine the "Internet" on the left side (TODO: get a cloud picture, and copy-paste it).

    Some courageous people use our test server (xsp) which merely implements HTTP 1.0 and has no configuration options (other than the port to listen to):

    Courageous because really, there is not much other than serving files and requests in that server and it is limited to HTTP 1.0.

    With Brian's setup, we now add this to the family:

    From the FastCGI and Mono Documentation:

    The FastCGI Mono Server was developed as part of the 2007 Google Summer of Code with the goal of increasing the availablity of ASP.NET and simplifying configuration. Requiring as little as zero command line options and supporting a large number of servers, the FastCGI Mono Server makes it simple to include ASP.NET on your server.

    Documentation on how to configure the FastCGI support for various servers is available here (In particular lighttpd).

    This code is available now from our SVN Repository. This should be available on Mono 1.2.6.

    Thanks to Brian for writing this nice code and Robert for integrating this into trunk and Marek for his ongoing maintenance of the ASP.NET stack.

    Now, who does one have to bribe to get early access to the ASP.NET MVC bits around here or get invited to the ASP.NET SDRs ;-)

    Posted on 30 Oct 2007


    Mono Versioning

    by Miguel de Icaza

    A common problem that I face is explaining to people the current situation of Mono. This is a problem of our own creation when we sketched the major milestones for Mono.

    When we originally plotted the course for the Mono Roadmap things looked pretty simple, they were roughly like this:

    Mono 1.0:

    • Ship the VM 1.0
    • Ship the C# 1.0 compiler
    • Ship System, Xml, Data, Drawing Web and Web.Services
    • Gtk# and friends.

    Mono 2.0:

    • Upgrade VM to 2.0
    • Upgrade compiler to 2.0
    • Upgrade libraries to 2.0
    • Add Windows.Forms
    • Ship Gtk# 2
    • Favorite extra stuff (debugger, compacting GC, internal embedding API upgrade)

    As you can see, we intended our versioning scheme to track the major Microsoft releases to expedite explanations of what level of APIs Mono supported. So Mono 1.x would be roughly .NET 1.x, Mono 2.x would be roughly .NET 2.x, Mono 3.x would be roughly 3.x and so on.

    There is a bit more than just tracking the API, as you can see, there are really two dimensions to what we wanted to call Mono 2.0:

    One dimension is the 2.0 compatibility with .NET, and another one has some internal goals of ours. For example, we considered that 2.0 was a good time to break the embedding API for the runtime and also to release the compacting collector.

    Complications

    There were a few factors that started to complicate our numbering scheme:

    • Our Windows.Forms implementation was lagging behind other class libraries (as writing a Winforms control requires much more work than say a Web Control).
    • Our desire to implement some major optimizations and improvements in the VM (improved code generation, AOT for 2.x, compacting garbage collection, switch to eglib-based public APIs, change in the embedding API).
    • Generics being a requirement for a lot of the 2.0 work that was necessary.
    • Microsoft releasing .NET 3.0 which was really just a new set of libraries that just ran on top of 2.0 (we track these in a separate project, called project Olive).
    • Microsoft releasing .NET 3.5 which is the actual upgrade to 2.0.
    • Some areas would be developed faster than others: sometimes this was due to planning, lack of planning, or big boosts in external contributions (for example, Mainsoft contributed extensively to making ASP.NET 2.0 and ADO.NET 2.0 happen, and they have been shipping their Grasshopper product since ~May).
    • We might not support the full API for a given assembly: there might be some features that do not make sense on Linux or features that will never be implemented (like System.Management).

    By the time we shipped our Mono 1.2 last year, the problems with the simple versioning numbers started to show. Mono 1.2 included many features from 2.0:

    • C# 2.0.
    • Generics support in the VM.
    • A lot of the 2.0 support in the class libraries. (core, XML, Data and ASP.NET was almost done).
    • Support for Windows.Forms 1.0.

    Almost a year has passed and we are about to release Mono 1.2.6, six releases after Mono 1.2. Compared to last year's Mono, this upcoming release is a major upgrade, we have since:

    • Completed most of the 2.0 support, including:
      • Completed C# 2.0.
      • Completed ASP.NET 2.x (modulo WebParts).
      • Completed ADO.NET 2.x.
      • Most of Windows.Forms 2.0 (about 80% of it at this point).
    • Implemented most of C# 3.0 (few tidbits missing).
    • Implemented LINQ, and LINQ to XML (.NET 3.5).
    • Implemented some other bits from .NET 3.5
    • A Visual Basic.NET compiler, and its runtime.
    • Added a Silverlight toolchain (.NET 2.1).
    • Added COM/XPCOM support to Mono.

    From an API perspective, with the exception of Windows.Forms 2.0 we have pretty much completed the 2.0 support (what remains to be done is tracked here for the core and here for winforms).

    In addition, some bits from 3.5 are being shipped in this upcoming version.

    Since we continue to ship updated versions of Mono every 8 to 10 weeks we have only felt that we needed to update the smallest version number (1.2.6 is our upcoming release) each time.

    My concern is that 1.2.xx does not really convey the feature set in Mono and some people get the wrong impression of where Mono is at. This problem is made worse because we have been using the simplified numbering scheme for years.

    Just today someone emailed me asking when ASP.NET 2.0 will be released, another person asked about ASP.NET AJAX (supported in SVN, and in the upcoming 1.2.6).

    Options

    We are looking for a creative solution to this problem.

    Without using Mono versions, these are roughly the upcoming milestones:

    • Mono A: Estimated 3-4 months of work.
      • The core 2.0 done + ASP.NET 2.
      • 2.0 profile (minus Winforms) becomes officially supported.
    • Mono B: Estimated 6-9 months of work.
      • Windows.Forms 2.0 complete.
    • Mono C: 9+ months.
      • When the Compacting GC is done.
      • Make the runtime embedding API changes here.
    • Mono D: 9+ months.
      • When the new IR/optimization framework is ready
    • Mono E: 6-9 months of work.
      • When System.Core and other 3.5 libraries are finished; maybe we could even split this up in chunks.
    • Mono F: 12 months of work, Silverlight security features:
      • New security system (done).
      • StackOverflow protection (done).
      • Complete the Verifier.
      • Harden the Mono loader (for Silverlight).
      • Full runtime security audit.

      The order of the above releases is not necessarily the one listed above, and I used letters to avoid discussing the actual release numbers. Three of those (C, D and F) are difficult to come up with an estimate now.

      Massi advocate a model where for large Mono upgrades (ABI changes, like the GC and the runtime API change) we change the major version.

      This would mean that we could ship a Mono 1.4 at the time that the "core" 2.0 is done; A Mono 1.6 when Winforms 2.0 is done; A Mono 1.8 when the 3.5 APIs are ready; and Mono 2.0 when we do the GC changes. This proposal does not fix the confusion problem with "1.x" though.

      Marek has a slightly modified proposal: when we ship 2.0 minus winforms we call it Mono 1.8; Mono 2.0 includes Winforms, GC, ABI breakage; Mono 2.2 includes new optimization framework;

      Jonathan suggest that we could use the major version number to document what is the version number that we feel we can officially support. 2.0 means "2.0 minus Winforms" with an upcoming 2.2 version with Winforms support and 3.5 thrown in the middle at some point (you will notice that the Olive/3.0 discussion is not part of this decision making).

      Thoughts? email them to the devel group and CC me ([email protected]).

    Posted on 29 Oct 2007


    DB_LINQ now MIT X11

    by Miguel de Icaza

    George Moudry from the DB_LINQ team has just emailed me to inform me that his multi-database LINQ implementation for .NET is now MIT X11 licensed!

    Posted on 28 Oct 2007


    Rob Conery Joins Microsoft

    by Miguel de Icaza

    Wow. Rob Conery, the author of SubSonic has accepted a job to work for Microsoft. These are the highlights:

    • He will continue to work on Subsonic, paid by Microsoft.
    • Subsonic will remain open source.
    • Rob will continue doing his SonicCasts.
    • Subsonic will be playing an important role on ASP.NET's new MVC framework.

    Congratulations!

    Now only Jon and Jeff remain independent after Mix 07.

    [from Phil Haack].

    Posted on 27 Oct 2007


    OpenSource LINQ providers

    by Miguel de Icaza

    Microsoft upcoming .NET 3.5 and C# 3.0 have support for Language Integrated Queries (LINQ). This gives C# and VB users a SQL-like syntax right in the language to access databases directly. For example, this is now valid C#:

    public void Linq1() {
        int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 };
    
        var lowNums =
            from n in numbers
            where n < 5
            select n;
    
        Console.WriteLine("Numbers < 5:");
        foreach (var x in lowNums) {
            Console.WriteLine(x);
        }
    }
    	

    For more samples, check the 101 LINQ Samples.

    There are a number of LINQ providers for different kinds of sources. For example, there is a built-in provider for things like arrays, collections and IEnumerables.

    A more useful sample comes from Don Box, this is a program to extract the top ten read articles from an Apache log file file:

    	var regex = new Regex(@"GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+)");
    
            var grouped = from line in ReadLinesFromFile("logfile.txt")
                          let match = regex.Match(line)
                          where match.Success
                          let url = match.Value
                          group url by url;
    
            var ordered = from g in grouped
                          let count = g.Count()
                          orderby count descending
                          select new { Count = count, Key = g.Key };
    
            foreach (var item in ordered.Take(10))
                Console.WriteLine("{0}: {1}", item.Count, item.Key);
    

    There is another provider for creating and consuming XML data: LINQ to XML. The LINQ distribution comes with a nice sample where many of the samples from the XQuery specification have been rewritten into C# with LINQ with code that is roughly the same size (which sadly, I can not find online to point to).

    Luckily, we have implementations for both of these in Mono.

    And finally there are providers for databases. Microsoft ships one that will integrate natively with Microsoft SQL.

    Unlike the XML and in-memory providers, the SQL providers are more complicated as they need to turn high-level operations into optimized SQL statements. Unlike many object to database mapping systems that produce very verbose SQL statements LINQ is designed to provide a very efficient representation.

    The Db_Linq is an open source project to create a LINQ provider for other databases. The project is lead by George Moudry and so far has providers for PostgreSQL, Oracle and Mysql.

    George keeps a blog here where you can track the development of DbLinq.

    Thanks to Bryan for pointing me out to this fantastic piece of code.

    Mono users on Linux will now be able to use LINQ with open source databases from C# (in addition to our in-memory and XML providers).

    Currently we are still missing some support in our compiler and our class libraries for this to work in Mono, but this will be a great test case and help us deliver this sooner to developers.

    Update: A nice blog entry talks about Parallel LINQ. A version of LINQ that can be used to parallelize operations across multiple CPUs:

    	IEnumerable data = ...;
    	
    	// Regular code:
    	var q = data.Where(x => p(x)).
    		Orderby(x => k(x)).Select(x => f(x));
    	foreach (var e in q) a(e);
    
    	// Parallelized version, add the "AsParallel" method:
    	var q = data.AsParallel().Where(x => p(x)).
    		Orderby(x => k(x)).Select(x => f(x));
    	

    See more details about the above in the Running Queries On Multi-Core Processors article.

    Update2: Am not up to speed in the databases vs object databases wars, but am told that there is also a LINQ binding for NHibernate. A sample is here.

    Posted on 24 Oct 2007


    Cardboard Regatta

    by Miguel de Icaza

    Today, before lunch Aaron, David, Jeff, Michael and myself went to the Carboard Regatta at MIT, the Head of the Zesiger competition.

    A perfect complement for the Head of the Charles this weekend. Here are some cell-phone pictures of the event:

    The Black Pearl:

    The winner was a cardboard boat called "Ship Happens" that looped the swimming pool twice without sinking. All other boats sank. The "Titanic" award was given to the "Unsinkable 2" ship.

    Here is "Ship Happens":

    Everything sank, except for "Ship Happens". I suspect that the cleaning crew was as surprised as I was to see one of the boats disintegrate so quickly into so many little pieces that went to the bottom of the pool.

    Posted on 19 Oct 2007


    JIT Updates

    by Miguel de Icaza

    For people interested in JIT technology, there are two great posts this weekend from folks in my team.

    JIT engines have some great properties, but unlike batch compilation they suffer from having to cope with code generated dynamically. Paolo talks about the memory reduction tricks that he has implemented in Mono.

    The tricks are related to the temporary thunks that are generated during JITing ("trampolines"), and some future directions to reduce memory usage in the JIT even more.

    Mark talks about his ongoing work to implement generic code sharing. Unlike Java generics that are a language feature, .NET generics are a virtual machine feature. Each approach has its pros and cons. In Java you only JIT the code once, and every generic instantitation reuses that implementation (because it is really a language feature); The .NET approach makes for simpler use or generics and better performance, but it comes with a price: new instantiations of the generics class need to be re-JITed.

    Mark discusses his ongoing work to share generics JITed code (when two instantiations of a generic type would generate the same code, say when the sizes and semantics of the types are compatible).

    Posted on 15 Oct 2007


    Moonlight at the Boston Remix Conference

    by Miguel de Icaza

    On Monday I joined Brad on stage at the Boston Remix conference to show a preview of Moonlight.

    As you can imagine, after years of working on Mono, I was pretty excited to be able to show our work at a Microsoft event.

    Brad blogged a summary of all the things that he showed on his keynote here. I was familiar with some of the stuff there, but there were various new things, like the ComponentOne controls for Silverlight 1.1 (they are similar in spirit to Flex: you get some high-level controls that you can use with your Silverlight applications).

    Videos of the keynote have been posted, see this page for the videos. The Moonlight section is covered here.

    I was running development versions of both Mono and Moonlight (SVN as of 24 hours or so) and you can see that some of the performance tuning that has been going into the Mono runtime (Paolo has not blogged about it, but Mono 1.2.6 will have plenty of performance improvements in the JIT and the memory consumption keeps going down).

    I showed the Chess game and you can see from the numbers that Mono running Chess is now getting similar scores as the .NET runtime gets on similar hardware.

    Brad also gave us a copy of TopBanana in advance, and everyone in the team worked hard to get it ready for the show:

    Lastly, I got a chance to show the Compiz Cube to the audience while playing some videos with Moonlight from the Halo web site.

    It was the old cube, the one that we shipped with SLED, but still it makes for a good demo. On my Tuesday session, I borrowed a machine that had more up-to-date software to show the latest Compiz.

    Q and A on Moonlight

    On Tuesday I had a session on Moonlight (the slides are here).

    One of the problems that I face with my presentations is that am not good at transitioning from the presentation to the questions and answer part of it. I always enjoy the questions and answers more than the presentation, and somehow I always botch it by reaching the end and asking "Questions?".

    This presentation was quite fun, because the audience asked a lot of questions as I did the presentation which made the presentation a lot more interesting than the slide deck shows.

    This was mostly a Windows audience, and I took the chance to show them the Linux desktop, the Mono/.NET compatibility, the MonoDevelop IDE, showed internationalization on Unix, the automatic right-to-left support and automatic layout of desktop apps and a few other features of Mono-based apps on Linux.

    Silverlight Performance

    On Sunday I had the chance to meet Seema Ramchandani who is a performance PM on Silverlight. On her blog she has some useful hints on how to improve the performance of your Silverlight apps (here and here).

    Posted on 11 Oct 2007


    Mono Summit, Spain

    by Miguel de Icaza

    We will be holding the Mono Summit in Madrid Spain, from the 26th to the 30th of November. Five days of Adventures in Open Source Managed Code and tapas sampling.

    The first two days are focused on project planning and discussion among the active contributors to the Mono and Moonlight projects (contributors and employees).

    The second three days are more general, these are for users of the Mono project: the application developers. In these days we will have some talks and tutorials on what we have been doing, what is available since the last year, meet-the-experts discussions and to present our roadmap and plans that we discussed in the first two days.

    This is a good time to introduce a gorgeous Moonlight logo that was designed by Tony Alexander and Miguel Liberero on the Mono-Olive mailing list.

    I will be working on an agenda in the next few days and post it next week on the Mono web site.

    Alejandro Sanchez and Juantomas worked very hard to look for our venue, it was tricky to schedule in the original dates that I had planned ("sometime in October"). Thanks Alejandro and Juantomas!

    Update Booking: Jonathan suggests that booking Sunday-to-Sunday gives you good prices, better than Saturday-to-Saturday, I have not checked.

    I have been using Kayak.com myself to book trips recently, and it is my favorite so far.

    Posted on 05 Oct 2007


    iPhones

    by Miguel de Icaza

    Mark Pilgim shares his opinion on his managed expectations on the iPhone.

    Love the post, worth reading from top to bottom.

    But what is really interesting is that the majority of the replies to that post are incredibly insightful, worth reading as well. How does Mark manage to get this much of an educated audience?

    Update: correction, as you keep reading the blog, the crazies come out of the woodworks. I guess we are doomed.

    Posted on 05 Oct 2007


    A Journey Into the Dumb-o-Sphere

    by Miguel de Icaza

    It did not take long for the IT pundits to declare that having the source code available for .NET is either "a trap for Mono", "the end of Mono" or some similarly low accuracy per bit arguments.

    It is amazing though, as some of these pundits are supposed to be covering "free software" and "open source" and yet, they know very little about history and how open source software is actually developed. More worrying is the fact that they could have researched this instead of sticking their foot in their mouth.

    I was not going to blog about this, hoping that this would just go away, but I keep getting emails asking about these articles (which am not going to link to, you can google them up):

    Lets look at Pundit #1:

    Thanks to Mono, we now have the popular Linux programs such as the Banshee music player, Beagle search tool and F-spot photography program. With Mono, you can also now run Visual Basic programs on Linux. Mono is also working on porting Microsoft's Silverlight 1.0, a cross-browser, cross-platform plug-in for delivering richer Web user experiences in a project called Moonlight.

    All of these programs are now in danger from Microsoft.

    I know, I know, if you just look at the headline, the executive summary, "Microsoft opens up .NET," it sounds great for Mono open-source developers. It's actually a death trap for Mono.

    No, it is not a death trap for Mono.

    It seems that Pundit #1 needs a history lesson on free software.

    When GNU was launched in 1983 there were concerns similar to this one. In particular, a concern was what would happen to people that contributed code, but the code came from the wildly available proprietary source code?

    To put things in perspective, at the time, Universities were getting source code licenses to ATT's Unix and it was wildly available (by the 1980's standards of availability). It was important that contributions to GNU were not tainted by proprietary code that belonged to someone else.

    I quote section 2.1 of the GNU Standards document on this matter:

    2.1 Referring to Proprietary Programs

    Don't in any circumstances refer to Unix source code for or during your work on GNU! (Or to any other proprietary programs.)

    If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can't write an imitation of it, but do try to organize the imitation internally along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results.

    For example, Unix utilities were generally optimized to minimize memory use; if you go for speed instead, your program will be very different. You could keep the entire input file in memory and scan it there instead of using stdio. Use a smarter algorithm discovered more recently than the Unix program. Eliminate use of temporary files. Do it in one pass instead of two (we did this in the assembler).

    Or, on the contrary, emphasize simplicity instead of speed. For some applications, the speed of today's computers makes simpler algorithms adequate.

    Or go for generality. For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead. Make sure your program handles NULs and other funny characters in the input files. Add a programming language for extensibility and write part of the program in that language.

    Or turn some parts of the program into independently usable libraries. Or use a simple garbage collector instead of tracking precisely when to free memory, or use a new GNU facility such as obstacks.

    (Emphasis added).

    Now, Mono is an open source project and follows those rules (and I have followed those rules myself since 1992 when I first started writing free software).

    If only reporters had a way to find out this information, some kind of wizard that they could use to fact check their pieces...


    [Ziing!] Hi! Am the Great Gazoogle!

    Oh hi, Great Gazoogle. Say, what’s this?

    Mono Project -- Contributing -- Important Rules
    • If you have looked at Microsoft's implementation of .NET or their shared source code, you will not be able to contribute to Mono.
    • In general, be careful when you are implementing free software and you have access to proprietary code. We need to make sure that we are not using someone else's copyrighted code accidentally.
    • Do not use the ildasm, reflector or other equivalent tools program to disassemble proprietary code when you are planning to reimplement a class for Mono. If you have done this, we will not be able to use your code.
    • Please stick to published documentation for implementing any classes; when in doubt, post to the mailing list and discuss the possible approaches with others.

    This text was originally added before the launch of the project, as indicated by the Great Gazoogle:


    [Zeerp!] "I looked it up, this horse was beat to death on the mailing lists!" says the Great Gazoogle.

    The Great Gazoogle can be used to identify other times when we the issue of Rotor, SSCLI and Mono has come up in the past.

    We go even further than that. We do not even accept LGPL contributions to our own class libraries, we use the MIT X11 license for that, and as such we are unable to incorporate changes that were developed as LGPL or GPL with exceptions (which is why we could not work together or accept patches from pnet folks unless they relicensed their code).

    So we do not take proprietary code, and we do not take open source code that is not suitably licensed to be included in Mono itself.

    A similar situation existed forever for Java. Java was only open sourced less than a year ago, but before it became open source, the source code for Java was wildly available for anyone that wanted to look at it under a non-open source license.

    Obviously open source efforts --GNU Classpath, the older class library project and the various open source Java VMs-- could not accept contributions from people that had looked at Sun's code.

    And of course, there was Rotor. Rotor was Microsoft's first attempt at giving developers some access to the source code of .NET. Rotor used a Shared Source license instead of MS-RL that prevented people from using its source for commercial purposes (so just like this new release, it is a non-stater for Mono).

    Rotor differs also from the upcoming release in that Rotor contained the source to the C# compiler and the virtual machine and this release does not. But Rotor did not include the "major" class libraries like ASP, ADO and Winforms that are included in the upcoming release.

    So the doomsday scenario has existed for as long as 24 years for free software, but Pundit #1 just thought of this scenario all by himself:

    If you ever, and I mean ever, want to write open-source code, I recommend you not come within a mile of Microsoft's .NET Framework code or any other similar projects that the boys from Redmond "open" up.

    To be fair though, it is an important warning, and it is good that this is kept in mind by anyone contributing to open source software.

    Now lets look at Pundit with an Axe to Grind (referred to from now on as Pundit #2). Pundit #2 likes to setup a strawman, but he does so in a careful way, with plausible deniability, look at this carefully crafted piece:

    If you believe some of the headlines, Microsoft just open sourced a bunch of software related to its .Net libraries. Don't be fooled. The definition of open source is very clear. This is not open source. Not even a little bit. In fact, this may actually be an insidious trap (more on that below).

    Microsoft never claimed they were open sourcing anything in .NET. They do not even use that language. Am not sure where the rumor that it was open source started, but clearly people did not even bother reading the actual announcements from Microsoft, because such text is nowhere to be found. You would think that in this day an age they could have done a quick check. But alas, when you got an Axe to Grind the axe comes first. Facts and research come last.

    Some creative uses of the Axe (I had to use the great Gazoogle to get the "joke"):

    Far-fetched? Well, not if you look at Microsoft's history. Microsoft is playing to win, and it seems to believe the only way to win is if open source loses. This is myopic, but the company refuses to get LASIK.

    Do you get it? LASIK: so you can fix the myopic view!

    So this is a pundit that repeats and quotes the claims from Pundit #1 (the guy that did not know history) and invokes history. To be fair, he is a pundit, his depth of knowledge is razor thin.

    In my opinion, Pundit #2 is failing at both punditry and humor.

    Credits: Great Gazoogle artwork and concept originally from Gavin M. at Sadly, No!.

    Posted on 05 Oct 2007


    GInterfaces in Gtk#

    by Miguel de Icaza

    Mike Kestner has been working for the past few months in supporting GLib's GInterfaces in Gtk#. He has commited his code, and written a tutorial.

    There were two main use cases that people discussed with us:

    • The need to implement new Gtk TreeView models.
    • The need to support interfaces for the sake of Atk.

    Am not sure if there are any other uses for this.

    If you have experience with GInterfaces, we would love if you could send us some comments (Mike Kestner) about the implementation and suggestions on improving the tutorial.

    Posted on 05 Oct 2007


    Mono on OpenMoko

    by Miguel de Icaza

    Cliff Brake has announced that there are now packages of Mono available for OpenEmbedded which you can use on your OpenMoko NEO1973 phone, to install, he says:

    add the following to a /etc/ipkg/*-feed.conf file:
    src/gz mono-armv4t http://dev.bec-systems.com/feed/openmoko/mono
    
    ipkg update
    ipkg install mono
    

    OpenMoko is a completely open phone platform: starting at the hardware level (they have hardware kits for hardware developers) up to the software level (all the software is open source/free software).

    Unlike other phones, this is completely open, and development and innovation on the phone are encouraged.

    All those people that were disappointed that the iPhone is being locked down to developers, this is a good time to help improve a completely open platform. And you should be able to run Gtk/WebKit (the same engine from the iPhone) on the device.

    A comparison chart for the hardware is here. OpenMoko today is a developer platform, so expect some updates in the near future.

    Posted on 04 Oct 2007


    Extending Evolution with Mono

    by Miguel de Icaza

    Sankar has updated the Mono-based plugin for Evolution the Gnome email/calendar/pim client.

    It is possible again to write plugins using any of the Mono supported languages to extend Evolution.

    The code builds on the previous effort from Michael Zucchi.

    You can download the sample plugin here. The sample plugins adds a new menu option to translate an email message to Spanish, and then uses Google to do the translation.

    Posted on 04 Oct 2007


    Microsoft Opens up the .NET Class Libraries Source Code

    by Miguel de Icaza

    I read on Scott Guthrie's blog the news that Microsoft will release the source code to the class libraries that make up .NET:

    Today I'm excited to announce that we'll be providing this with the .NET 3.5 and VS 2008 release later this year.

    We'll begin by offering the source code (with source file comments included) for the .NET Base Class Libraries (System, System.IO, System.Collections, System.Configuration, System.Threading, System.Net, System.Security, System.Runtime, System.Text, etc), ASP.NET (System.Web), Windows Forms (System.Windows.Forms), ADO.NET (System.Data), XML (System.Xml), and WPF (System.Windows). We'll then be adding more libraries in the months ahead (including WCF, Workflow, and LINQ).

    The source code is released under a new license they are calling the Microsoft Reference License, this is not an open source license.

    First of all, congratulations to everyone at Microsoft that made this happen. Am sure many .NET developers will be happy with this new development and there will be many genuine uses for this.

    I heard a podcast with Shawn Burke where he discussed some of the history of behind this move. The discussion seemed mostly tactical, and am sure that to do this they must have presented a strong business case to their management that opening up the access to the source code (even under the MS Reference License terms) was important.

    Even if the license for the code is not open source, it is an important step. Sun had done something similar with Java in the past and over time they moved towards opening more and more of it. Am still hope that one day Microsoft will open pieces of this under more liberal licenses that would allow those pieces to be used for any purposes, including Mono.

    Mono, free software and the source code release

    The source code that will be released goes beyond the scope of the C# source code that was released as part of Microsoft Rotor.

    But like Rotor, the license under which this code is released is not open-source. People that are interested in continuing to contribute to Mono, or that are considering contributing to Mono's open source implementation of those class libraries should not look at this upcoming source code release.

    At the same time, Microsoft already releases some class libraries under an open source license, the Microsoft Permissive License (MS-PL, which will soon be renamed the Microsoft Open License).

    Mono manages to benefit from code that Microsoft releases under the MS-PL license and we even redistribute some of it: The Dynamic Language Runtime, IronPython, IronRuby and the ASP.NET AJAX Javascript client-side library.

    Speculation

    Am not sure why Microsoft did this, there have been a few theories around this, but my own guesses are:

    • Scott and many people reporting to him understand developers (Scott did ASP.NET). Scott being in charge of .NET probably has made this organization be more Web-y, in that they understand that developers are more effective if they can "View Source". So it might be a natural cultural shift.
      Scott and his team are behind the Microsoft/Novell collaboration on Silverlight for instance.
    • Large .NET users probably already had access to the source code, and probably had access to under a myriad of customer-specific NDAs or licenses and this was hard to work with, and hard for the organization to manage. This could be license consolidation and streamlining of the process to get people access to the source code.
    • Getting access to the source code alone was probably very cumbersome. This is probably why the focus of the release is on the simplicity of getting the source code for debugging (the most important scenario presented so far).
    • Sun and Java: it is possible that some customers were getting cozy with the ease of access to Java source code to the class libraries and this had some mounting pressure on Microsoft.

    Some of the statements are very similar to what Sun used to make about Java before they agreed to open source it:

    Allowing developers to rebuild a framework, any framework, from source, and then redistribute the modified result, can introduce problems with providing support, serviceability, integrity and security of the framework itself. This is true with .NET, Java, Ruby, and other frameworks. Multiple independent redistributed modified versions of a framework can decrease the reliability and dependability of the common platform, which is not desirable. In the path we've taken here, we are seeking to balance the requirements we hear from the developer community for transparency and of reliability and dependability of the platform. In striking that balance, we believe the Microsoft Reference License is the right license for this release.

    There are a number of scenarios that go beyond looking at the source code which are think are valuable in the existing Microsoft ecosystem and which is ultimately why it would be useful for some chunks to become open source.

    For example:

    • Bugs in Class Libraries: If there are bugs in the class libraries that can not be worked around, the user does not have to ship a replacement System.dll, but he could copy-paste the code, make the adjustments in the code and ship the resulting executable.
    • Different Needs: If the code is close, but not quite what he needs, a developer could cut-and-paste, and then tune the code to do what he needs. This is a very common case that we see with Mono's own source code.
    • Complement Existing Frameworks: Microsoft ships a number of reduced versions of .NET: Compact Framework and Silverlight 1.1. People often need features that are only available on the full framework.
      Many folks today cut-and-paste code from Mono to be used on the Compact Framework edition because the subset that Microsoft chose for the CF is a good starting point, but it does not fit all the needs, specially in a market that is heavily slanted towards embedded systems (our XML Serializer is one of the most cut and pasted pieces of code for example).
    • Supporting old Frameworks: With 3.5 coming out it is very likely that some features would be useful for applications that must run with 1.1 or 2.0 on systems that can not be upgraded to 3.5. Cut and pasting code would be useful.
    • Innovation: Although people can always innovate on "top" of an API, some kinds of new features can only be done if you can alter the inner workings of it. Certainly Microsoft has the right to not let people do that.

    For the above cases, people today can continue to use the Mono source code and cut and paste at will (with our super-liberal license the MIT X11 that comes with no strings attached).

    But I still believe that there is a good business case for opening more stuff under the more liberal MS-PL license.

    And of course, beyond the Microsoft ecosystem, there is the Mono ecosystem, where we could leverage that code if it were open source :-).

    Posted on 03 Oct 2007


    Talks at MIT: The Israel Lobby and U.S. Foreign Policy

    by Miguel de Icaza

    As Jeff and myself walked back from a dose of fried quesadillas from Anna's taqueria on MIT I was telling him "There is always an interesting event announced on these walls".

    And in the middle of one of the corridors I found that both John Mearsheimer and Stephen Walt, the authors of the "The Israel Lobby and U.S. Foreign Policy" will be talking at the Stata Center at MIT on Wednesday.

    The book has been excellent so far. It expands on a paper that was widely discussed last year but goes into a lot more depth.

    Another excellent book that I just finished reading recently is Israel-Palestine on Record: How the New York Times Misreports Conflict in the Middle East.

    Update: Robert pointed out that I forgot the link to the event.

    Posted on 01 Oct 2007


    Google Summer of Code: Database Support in MonoDevelop

    by Miguel de Icaza

    Over the summer Ben Motmans rewrote the database support in MonoDevelop. Working with Ben was a pleasure.

    Part of the challenge was that I personally had no idea what it is that people do with these database UIs. My contact with databases is so bad that about once a year I google up the instructions to setup Postgres again, and figure out my login, password and connection string followed up by extensive cut-and-pasting of "CREATE" statements until I have something that roughly can store a few values.

    His work has now been integrated in the First MonoDevelop Beta release.

    Query Result and Database Explorer

    Alter Table

    Creating a SQLite connection.

    This Database Add-in replaces the old Mono.Query add-in, and will hopefully continue to improve to have a central location for all of your database needs.

    Posted on 01 Oct 2007


    Media you can't trust

    by Miguel de Icaza

    Dave Winer on Media you can't trust. Reflections on Ahmadinejad and its coverage.

    Dave also recommends "All the Shah's Men" a book that I recommended earlier this year.

    Posted on 26 Sep 2007


    Evo Morales on the Daily Show

    by Miguel de Icaza

    Tonight, Jon Stewart had Evo Morales, the president of Bolivia on his show and interviewed him.

    I learned in the interview that Evo Morales made two promises during his campaign: to nationalize the energy sector and to do "Reforma Agraria" (sorry, forgot the translation).

    He achieved both within eight months in office.

    In the energy sector, he said that the Bolivian government used to receive 300 million dollars for its energy and today it receives 2,000 million dollars.

    Posted on 26 Sep 2007


    Remix Boston

    by Miguel de Icaza

    In addition to my participation on the keynote at Remix07 with Brad Abrams, I will be hosting a session on Silverlight on Linux which will be heavily oriented towards questions and answers.

    Now, I have been living in Boston for seven years, and I have no idea that there was a Hyatt Regency in town.

    Hope to see you there!

    Posted on 25 Sep 2007


    Mono-less Moonlight

    by Miguel de Icaza

    For the sake of minimizing our valgrind time, dividing and conquering the task of spotting leaks, and to reduce the surface that must be audited for security for Silverlight, Rolf has commited support that removes the Mono dependency from Moonlight.

    Moonlight 1.0 will not require Mono anymore (Moonlight 1.1, that tracks Silverlight 1.1 will).

    In the meantime the team has been busy performance tuning video playback for Moonlight. As it turns out there is no one-size-fits all optimization for video on Linux as different video cards are accelerated differently.

    When we were describing one of our hacks to improve performance to Kevin Gallo he quoted a friend of his on graphics performance, and it went more or less like this "Graphics performance work is basically a collection of hacks".

    It inspired confidence in some of the tricks that we have been doing to reduce the work that Moonlight does.

    My friend Chris Toshok is looking for a college to attend to learn a few new tricks. He has a few constraints, but if you can help him find a place in Boston, we might be able to bring him back to the Norteast.

    Posted on 24 Sep 2007


    LugRadio Interview

    by Miguel de Icaza

    Last week I was interviewed by the LugRadio crew. The interview is now available.

    The last question I think was the most interesting, but I did not have time to actually finish answering it.

    The crew has a nice gallery of pictures for their Rock-band look. But a picture at Starbucks?

    Posted on 24 Sep 2007


    Bullet-proof Gandhi

    by Miguel de Icaza

    From Scott Adam's Sorry I confused You post where explains his satiric post from the day before:

    Still, the bulk of my sympathies are with whatever group suffers the most, regardless of how much of the problem is their own damned fault. To feel otherwise would be inhuman. Sometimes it feels as if the Palestinians are only one Gandhi away from fixing their problems. But he’d need to be bulletproof.

    Posted on 23 Sep 2007


    Generics Improvements

    by Miguel de Icaza

    Mark, the hacker behind Mono's CoreCLR Security implementation has committed to SVN the support for generic code sharing.

    Generic code sharing allows the same native code generated by the JIT to be reused for more than one generic instantiation. This can be done when the JIT can ensure that the code generated for the given method would be exactly the same.

    This optimization currently needs to be enabled with -O=gshared

    Update: Mark blogged some details and clarifications

    Posted on 21 Sep 2007


    Weekend Movies

    by Miguel de Icaza

    Posted on 21 Sep 2007


    One Day We Won't Know What To Do

    by Miguel de Icaza

    On the comments section at Sadly, No! comes this observation:

    (This is about American conservatives, as the word has different meanings across country boundaries).

    Posted on 20 Sep 2007


    Apple locked ecosystem and the EU

    by Miguel de Icaza

    Ian Williams mailed me to point out an article this morning at the BBC about Apple and its practices.

    The article builds on the EU ruling against Microsoft and points out:

    Apple has spent much time trying to ensure that anyone who buys an iPod is completely locked in to an Apple-centred world in which they use iTunes, buy from the iTunes Music Store, purchase only Apple-certified iPod accessories and, ideally, abandon their plans to migrate from Windows XP to Vista and instead purchase a shiny new iMac.

    It is very nice to see the BBC coverage go into the depth of the issues involved in the closed interfaces (the now read-only database; the streaming limited to Apple products by means of using encryption to lock the competition out; the new cable add-ons; the locking-out of Linux jukebox software; and the ringtones fiasco):

    It is hard to see what justification there can be for these various measures other than an attempt to lock customers in and keep competitors out.

    I've asked Apple why it is doing this, but it has remained characteristically silent, preferring to invest its time and energy in the iPhone's UK launch.

    [...]

    But its business practices do not stand up to scrutiny, and when it comes to music downloads it is just as bad as Microsoft on servers, putting its time and energy into creating barriers to competition instead of letting its developers and designers concentrate on doing great stuff.

    If Apple was serious about building a music industry around downloads and digital devices then it would open up its devices and interfaces to allow greater innovation and greater competition.

    It would have faith in its own products to compete in this larger ecosystem instead of trying to lock everyone in with tactics that resemble those of IBM in the days of the mainframe.

    I wrote a presentation this morning using Microsoft's PowerPoint, but displayed it using Apple's Keynote. Apple can sell Keynote because it took PowerPoint apart and figured out how the files work.

    Had Apple been unable to do so, or found that every time it figured out what was happening Microsoft changed the format, it would have complained loudly.

    Yet this is exactly the technique it is using against third party jukeboxes. And it is time it stopped.

    Read the whole piece.

    The BBC article missed the bit where purchasing DRM music also locks you into a particular platform (Apple could license the DRM to allow users to re-encode the songs into another DRM if necessary).

    So the EU has teeth, lets make sure that they do not end up wrapped around Apple marketing and they act decisively to ensure interoperability and an open ecosystem.

    Posted on 20 Sep 2007


    Qt bindings for Mono

    by Miguel de Icaza

    Back in June David Canar from the Qyoto project emailed me pre-announcing the launch of Qyoto. Qyoto is a Mono/.NET bindings for TrollTech's Qt4 library:

    You can:

    This is another toolkit that you can use to develop cross platform GUI applications.

    Posted on 18 Sep 2007


    iPods Hash Puzzle Unlocked

    by Miguel de Icaza

    The folks in #gtkpod figured out the hash used for newer iPods using a debugger on Windows. The code is here and hopefully it will be integrated in the relevant applications soon enough.

    Thanks to everyone on #gtkpod that made this possible (wtbw, nopcode, retar_d, oleavr, desrt and everyone that provided DBs and IDs).

    Although we -the Linux community- can choose not to buy iPods, many other people will. And it is our goal to make Linux a viable modern computing platform that allows people to use all of their existing devices.

    Breaking the hash is not really a long-term solution, as they can keep making the process harder every time. The long-term solution is for iPods to have a standard interface that third parties can communicate with.

    This probably should be compounded to the EU's findings on Apple's anti-trust practices to ensure open access to a popular device.

    Posted on 16 Sep 2007


    iPods

    by Miguel de Icaza

    Yesterday after rumors that new iPods require a cryptographic checksum on the song database we confirmed that Banshee can no longer store songs on the new iPods.

    The new firmware will now refuse to play any songs that you legally own unless you use Apple's iTunes (which is only supported for Windows and MacOS)

    A temporary solution is to not upgrade the firmware on your current iPods and avoid purchasing any of the new iPods until someone figures out hwo to generate the checksum.

    As a consumer I can vote by not buying Apple products. What bothers me is that they are the market leader and pretty much own that space, other people will buy iPods and they will just not be able to use them with Linux.

    With this move they are preventing people from using their iPods with Linux which will be added to the list of things that "Linux can not get right". Not because we can not get it right, but because of Apple's anti-competitive practices. What better way to keep your potential competitors down than with a little lock-out strategy, using the strength in one market to help weed out the competitors on another market. In fact, today's experience with Banshee is no different than using iTunes: plug, sync, unplug.

    Apple being the darling of the computer industry will face little or no criticism over this.

    Maybe this need to be brought up with the EU commission as another unfair business practice from Apple.

    Although someone will eventually break the new lock from Apple, they can keep changing it, and every time they change it, they will keep stopping consumers from using their iPods with Linux. Maybe it is time for Apple to be subject to some quality-time government sponsored regulation.

    Update: As Lennart points out, this is hardly the first time that Apple has locked out competitors or products that interoperate.

    Cory Doctorow weighs in on the issue, and states:

    I guess my next player won't be an iPod after all.

    Cory last year stated that he would switch to Linux from OSX. I hope that he did.

    Posted on 15 Sep 2007


    Mono's GC

    by Miguel de Icaza

    Paolo covers three issues on his blog post about the Mono GC:

    • Setting expectations as to what the new Compacting GC will be able to do.
    • The new support for purely managed object allocation (without having Mono transition from managed to unmanaged code to allocate objects).
    • Performance improvements that you might expect from this optimization in Mono 1.2.6

    Zoltan has also implemented the needed support for managed-based allocation on the ahead of time compiler.

    Posted on 12 Sep 2007


    Mono Bugzilla Migration

    by Miguel de Icaza

    This Saturday morning (September 15th) at 8am MDT we will be doing our final migration to the Novell Bugzilla system. Although we expect this migration to take much less time, we have planned a http://bugzilla.ximian.com outage until Monday (September 17th) at 8am. During the outage, http://bugzilla.ximian.com will not be accessible.

    Once the migration is complete, http://bugzilla.novell.com will be the official Mono Bugzilla. In preparation for the switch, please create a Novell.Com account by going to the following URL.

    Novell Login Creation Page.

    It is important that you use the same e-mail address for this account that you use on http://bugzilla.ximian.com.

    Posted on 12 Sep 2007


    Not a Gamer, Part 2

    by Miguel de Icaza

    As I discussed back in January am not much of a gamer. The only redeeming feature of the Wii was watching Laura and my friends play Wii Sports

    Nat recently convinced me to get a Nintendo DS, he said something like, but not necessarily "This stuff is great while waiting for your next flight, and going through all those security checkpoints". He strongly recommended the brain training games for the Nintendo DS.

    So I went and purchased a DS and just like in January, I asked the sales guy to give me a bunch of the best games for the DS he had on store. I figured, maybe am the kind of gamer that could get used to the DS.

    Like January, I did not really get into any of the games.

    A few observations:

    • The Internet Destroyed the Fun in Puzzle/Adventure Games: I still fondly remember playing Space Quest: one hour every day, then discussing with friends the possible solutions and eventually solving it.
      The Internet makes it so easy to get solutions to most of the problems that it has taken the fun out of it.
    • Stories: The stories for the games I have tried so far (on the DS and the Wii) seem incredibly dull and there is a linearity and lack of interesting challenges.
    • Game Play is Not That Different: Until this year, I had spent about 15 years not playing games (with a short stint for about nine-twelve months playing Quake) and the games are not significantly different.
      But at least the graphics are superb (uh oh, hope Slashdot does not come after me), the animations are very gracious and some of the details are incredibly well taken care of.

    I got some mistery game (Hotel something or other), a remake of SimCity, some cooking game, some Lego point-and-shoot and some others that were not worth remembering.

    The only game that I liked was the brain games. I like the practice exercises and most importantly, the Sudoku which I play every night before going to sleep.

    So I spent about 300 dollars in hardware and games to end up playing Sudoku. A better investment would have been to buy a 5 dollar Sudoku book.

    So all of the above was just an excuse to blog about my good friend Jordi Mas' brain games for Gnome.

    He has been working on a set of pretty cool games for the desktop. He wrote GBrainy which comes with an assorted collection of mind games that are quite fun in the same way that the Brain Games for the DS is:

    Anyways what are good games for the Wii and the DS for aging software developers? (And am not really a fan of Quake derivatives; I got Metroid, and its passable).

    Posted on 12 Sep 2007


    Jon Galloway Introduces New Acronyms

    by Miguel de Icaza

    From Twitter today:

    Posted on 10 Sep 2007


    Short Internet Case Studies: Creating Mortal Enemies

    by Miguel de Icaza

    Jeff Artwood uses Twitter to quick-blog (as opposed to his usual larger treaties).

    From today's twitterness, how to go from "Flickr, good but not for me" to "Flickr, mortal enemy" in 10 seconds:

    Posted on 09 Sep 2007


    ReMix 07 in Boston

    by Miguel de Icaza

    Brad Abrams (one of the authors of the .NET Framework Design Guidelines, which PVanhoof really likes) invited me to share the stage at his keynote for ReMix 07 in Boston.

    Oh the excitement!

    Posted on 09 Sep 2007


    Moonlight Follow-Up

    by Miguel de Icaza

    After my last post, Matt Asay and myself exchanged a few emails regarding Novell and open source. And Matt posted a very nice follow up: "80% on Novell" on his blog about Novell and our involvement in open source, so some good came out of this:

    Net net: I'm going to work on seeing Novell with less bite and more neutrality. It's admittedly very hard for me.

    His post is difficult to quote without removing too much context and doing justice to it, so you should read it yourself.

    Simon engadged in a lengthy discussion on my blog's comments on Google Group here and here.

    We exchanged platitudes and concluded that patents are bad (shocking, I know) and that the "system" is far from optimal (second shock). We both agreed that Sticking it to the Man was a worthy goal.

    Posted on 09 Sep 2007


    Servers Storing Passwords in Plain Text

    by Miguel de Icaza

    Turns out that one of my favorite sites (Reddit) stored plain text passwords on a database. The reddit database recently was stolen, and now whoever stole it has all the passwords to reddit. The rationale for this was:

    Personally, I prefer the convenience of being having my passwords emailed to me when I forget, which happens from time to time since I use difference passwords everywhere.

    Not hashing was a design decision we made in the beginning, and it didn't stem from irresponsibility-- it stemmed from a decision to provide functionality that I liked.

    It bit us in the ass this time, and we are truly sorry for it. The irresponsibility (and there is some) was allowing our data to get nabbed.

    So the convenience of emailing a password when you forget it is what caused the developers to keep the passwords in the open.

    Now, I do not particularly care if my reddit password is stolen. I have a policy of using a different password for every site that wants me to create an account with them. I use wildly different passwords for each site that I register with, so I manage to limit my exposure by limiting the damage to that particular site.

    But many of my friends use combinations of "the same password everywhere" (specially the non-technical), "the password with the site name" (slightly more technical), "three tiers of passwords: weak, normal and high-security".

    Everyone in those groups is vulnerable to have their password cracked open on other sites. Not good.

    But the second realization that I had is that this practice is incredibly common. In the last month I have probably requested to "recover my password" from six or seven sites and at least two of them sent me back my original password. I remember thinkin "Oh, that is handy, am glad I did not have to go through a reset password process". Only now I realize that these sites are basically exposing my password to the world. This is not a phenomenon limited to reddit, it is incredibly common.

    Here is a tutorial on how to implement this correctly on your web site: Don't let password recovery keep you from protecting your users. If you are using ASP.NET, the Membership infrastructure will take care of this for you.

    Server folks also need to use stronger encryption mechanisms. As Jeff points out on his Rainbow Hash Cracking

    You should use a differnet password for each site that you visit. Even if you knew the site you visit will not store the password in plain text (and there is no way of finding out) these days tools to crack passwords take advantage of available memory and disk space to crack stuff rapidly. See Jeff Artwood's Rainbow Hash Cracking post where he installs Ophcrack (open source software, available for most platforms) and cracks most "strong" passwords in a matter of minutes.

    For dealing with one-password-per-site I keep a GPG encrypted file and use a script that Gonzalo wrote. Maybe its too simple, but it works (source is here).

    Windows has a couple of tools that can keep your passwords encrypted. It would be nice if someone wrote a nice UI for this for Unix. The gnome-keyring is a step in the right direction, but the UI (gnome-keyring-manager) is not really designed for end users to use. It is more of a front-end to the password backend for the desktop.

    We need to make this kind of tool pervasive on all of the desktop systems (and Mozilla remembering passwords is not enough to be practical).

    Update: Jensen Somers in the comments points us to Revelation a tool for the Gnome desktop that does this.

    Posted on 09 Sep 2007


    Naomi Klein's Shock Doctrine

    by Miguel de Icaza

    Always loved Naomi Klein and today I found on reddit that Alfonso Cuaron did a short based on her latest book The Shock Doctrine. Am a fan of both.

    The short-film is six minutes, and you can watch it here.

    Posted on 08 Sep 2007


    Reading Comprehension and the English Language

    by Miguel de Icaza

    Last night Simon Phipps blogged about the Moonlight announcement.

    It is funny to be lectured about software freedom from people that use MacOS computers as their main desktops instead of Linux. And to be lectured about whether implementing Moonlight for Linux or not is a good idea. If you smell an inconsistency here, is because its their trademark.

    Simon is usually a sensible person, I met him at GUADEC a few years ago and I consider him a good friend and has a great reputation in the open source world for helping Sun open source Java. I have fond memories of hanging out at FooCamp and FOSDEM with him, so I was surprised about his post.

    As I pointed out on his blog entry comments he made a number of mistakes on his analysis of the license.

    He opens with the following paragraph:

    I see Miguel is expecting flak for his initiative to implement Silverlight on GNU/Linux, and I'm sure he'll get it. The thing that caught my eye, however, was what terms I was asked to agree to if I as much as give Silverlight a try on any other platform in the ecosystem Miguel is helping create. Just take a look at the license agreement you're assumed to agree to if you so much as click the "Get Silverlight" button (yes, your acceptance is there in 4-point text in the Get... graphic). You will be agreeing you will not:

    He is implying that Moonlight will be covered by Microsoft's EULA. This is not the case. Moonlight is released under a combination of LGPLv2 and MIT X11 licenses. I did bring this up on his comments, and Simon replied with:

    Oh, and I didn't intend to imply Moonlight was equally tainted, I didn't think for a moment that you'd license it as anything but Free software and I think I made that clear in my first paragraph. My apologies if you thought otherwise.

    I keep re-reading the original paragraph and it is very ambiguous to the point of leading to the confusion. The only point where he addresses this is several paragraphs later: "Miguel is encouraging you to surrender your freedoms if you're using the technology he promotes anywhere but the operating system he is working on. He's the lure for someone else's trap.".

    Simon is concerned that using Silverlight on Windows comes with a bunch of requirements that are contrary to software freedom. But Simon, if you care about your software freedom, why are you using MacOS (or Windows) in the first place? If people care about that issue, they should switch to a fully open source system. And correct me if am wrong Simon, but since you link to a Mac license, I can imagine your main desktop is a MacOS machine (I vaguely remember that to be your main desktop; Why not OpenSolaris or Linux?), it seems like you have already surrendered your software freedom rights a long time ago.

    And let me add, you can always port Moonlight to Windows. It is free software, remember?

    His blog post is confusing, a commenter on Simon's blog points exactly that:

    Just to let you know that I skimmed this post after it was linked on Louis' blog and got the impression that the points in the license that you raise are in Moonlight rather than Silverlight.

    I didn't realize until I read Miguel's comment that this is not the case.

    Of course, it is obvious on a second reading that you are talking about Silverlight. But I hope no-one else makes the same mistake as me, but worse does not realize it.

    So one person is already confused. But it gets better. Pundit Matt Asay gets it wrong too (For those not familiar with Matt Asay, he is like the Robert Novak of open source punditry). He opens his own blog entry with:

    Simon Phipps takes apart the licensing maze required to start "enjoying" Novell's Moonlight. Novell clearly wants to be popular with someone, and so has settled on Microsoft.

    So Simon text is definitely obscure enough that pundits are making the same "mistake" I made when I read Simon's obscure blog post. On the other hand, it was pundits that got the US into the Iraq war, so we must cut the punditry circles some slack, we can not expect them to be scholars.

    Now it is time to take exception at Matt's claim that:

    Simon [...] takes apart the licensing maze required to start enjoying Novell's Moonlight"

    No Matt, Simon did not explain anything about Moonlight, he was talking about Silverlight's EULA license, and while doing so, he managed to botch his analysis on several counts.

    I am not in the business of defending Microsoft's EULAs, but in this case Simon tried to imply that we were covered by it. And well, Moonlight is not, as I said above Moonlight is under the LGPL/X11 licenses.

    It seems that the EULAs for these proprietary plugins are pretty much all the same. As Stephen Walli pointed out on the comments for Simon, he is throwing rocks in a glasshouse, here are some EULAs that just as bad or worse as the Silverlight one:

    Silverlight terms are simpler to read than any of the previous five. This seems like an improvement.

    When it comes to damages, a topic that Simon seems to care about as he writes: "that the limit of Microsoft's liability in any matter (including "internet services") is $5", here is the breakdown of the other EULAs:

    • Acrobat: 50 dollars.
    • Helix: 5 dollars.
    • Silverlight: 5 dollars.
    • Java: 0 dollars.
    • Flash: 0 dollars.

    And for good measure the GPL, LGPL and MIT X11 licenses put that at zero. So Acrobat, Helix and Silverlight are actually the most generous in this space.

    I am not going to accuse Simon of double-standards, as he acknowledges in a comment that he would like to see those removed from Sun software as well:

    As to glass houses: I expect there are Sun agreements that actually are a threat to software freedom, but it's my (and I believe Sun's) goal to eliminate as many of them as possible. By contrast, the Silverlight agreement is new, and its terms appear intended not just to protect Microsoft but to advantage them. I'm a bit surprised to find you making this apples-to-oranges comparison. I'm an easy target when I'm talking about what concerns me, but do you really believe there's no issue here?

    I am not sure to what extend the EULA for Silverlight "its terms appear intended not just to protect Microsoft but to advantage them". Simon botched the analysis on most of his claims (including his statement about video and the MPEG-LA claim, he needs to read the (b) section).

    So what we have is a case of exaggerated outrage over a silly license and for good measure a little bit of smearing of Moonlight by association.

    Simon also complains that by accepting the license, "* that Microsoft can gather information about your computer and internet connection; * that they can automatically modify the software."

    That is incorrect Simon. The license that you accept does not give Microsoft the right to gather the information (unlike the Java license that explicitly states that Sun can gather the information). In addition, Simon conveniently ignores the fact that the the Silverlight EULA states that you can opt-out from automatic-updates (see the license for yourself).

    Finally, Simon's take on Mono:

    I suppose this is just the same as my issue with Mono; that it's a trailing-edge implementation of an ecosystem that's intended by its architects to take away freedoms. That's what I'm reacting to.

    Simon, that was uncalled for. Mono might be trailing behind Microsoft's APIs, but Mono has its own vibrant community and its own stack of open source libraries that are 100% independent of Microsoft's own stack based on the ECMA 335 core. You should know better than that. Mono is able to plot its own destiny and its own ecosystem on his own thank-you-very-much.

    Matt Asay Shortsightedness

    Matt Asay's bitter blog post misses the point as well, his argument of "position of strength" is a laughable one. Lets play, spot the inconsistencies (post your thoughts):

    In other words, if someone is going to be Microsoft's toady, Novell wants to be darned sure it's them. It would be much better to command interoperability from a position of strength, as Red Hat is doing (or as MySQL is doing in databases, JBoss has done in application servers, etc.), rather than between mouthfuls of Microsoft's toejam.

    Well Matt, we actually started on Moonlight without any management approval. All my bosses knew about our effort to implement Moonlight was that I requested a trip to Paris on June 21st ("Am going to accept this invitation to ReMix in Paris, the opportunity sounds priceless"). Nobody knew what my engineering group was cooking. And I for one had no expectations at that point to become a "toady", but I guess that is for a psychiatrist to figure out the day I get one.

    So we are very excited that we turned our 21-day hackaton into a collaboration to productize Moonlight and to be able to bring Silverlight to Linux users.

    To me, Moonlight is of crucial importance because I believe that Microsoft will be successful in getting Silverlight deployed in many sites, and as a Linux desktop user (unlike some outraged open source advocates that stick to OSX :-) I want to make sure that I have access to the Silverlight content from my Linux box.

    And speaking of freedom and outrage, Simon you do not seem to mind surrendering your freedoms to Apple when you buy proprietary iPods and proprietary connectors, using the proprietary iTunes. And there are other mp3 players that are purely open source. Why are you using that instead of the purely open source Linux + Banshee?

    You have the right to choose to iTunes, and others have the right to choose Silverlight. But of course people like to paint things in apocalyptic terms, more along the lines of "Will someone think of the children?". It may be funny, but only when its part of a Simpsons sketch.

    It took real change inside Microsoft and Microsoft's internal organization to push for an agreement with Novell that would officially endorse Moonlight and would provide assistance of a kind that has never been seen between Microsoft and the open source community.

    Moonlight will probably help Silverlight get adoption, and advance Microsoft's interest position in this space, but:

    • From a pure technical perspective: Silverlight is the best of breed on this space. I like it, and it matches my opinions. Maybe not everyone's opinions, but mine and some others.
    • As long as I can have my LGPL/X11 licensed code base, am more than happy for Silverlight to become another option on the Internet. Live and let live kind of scenario (Unlike others, I actually love Flash as well, and I love the open source efforts trying to create an open source version even more).
    • Silverlight vs Flash vs JavaFX vs AIR is not a zero-sum game. Those who believe that have a strong scarcity mindset. I for one believe that the ecosystem will become richer by having more options. You know, competition, choice, options, styles.
      Just like on the server space source we have competing frameworks: django, rails, turbogears, asp.net and j2ee.

    Posted on 07 Sep 2007


    Sun and NetApp Lawsuit

    by Miguel de Icaza

    Am no fan of patents or patents lawsuits, but this lawsuit is going to provide some entertainment value for months to come.

    It is quickly moving into "he said, she said" territory. NetApp claims that Sun started this thing when they approached NetApp to monetize some patents:

    Like many large technology companies, Sun has been using its patent portfolio as a profit center. About 18 months ago, Sun’s lawyers contacted NetApp with a list of patents they say we infringe, and requested that we pay them lots of money. We responded in two ways. First, we closely examined their list of patents. Second, we identified the patents in our portfolio that we believe Sun infringes. With respect to Sun’s patent claims, our lawsuit explains that we do not infringe, and ---in fact--- that they are not even valid. As a result, we don’t think we should be paying Sun millions of dollars.

    If this is true, Sun brought this upon themselves.

    Of course, on the other hand, Sun claims that this was not the case:

    Many of the claims raised in the lawsuit are factually untrue. For example, it was NetApp who first approached Sun seeking to acquire the Sun patents NetApp is now attempting to invalidate. It is unfortunate that NetApp has now resorted to resolving its business issues in a legal jurisdiction (East Texas) long favored by "patent trolls."

    BURN!

    And from Jonathan Schwartz:

    NetApps first approached StorageTek behind the cover of a third party intermediary (yes, it sounds weird, doesn't it?) seeking to purchase STK patents. After Sun acquired STK, we were not willing to sell the patents, We've always been willing to license them. But instead of engaging in licensing discussions, NetApp decided to file a suit to invalidate them. To be clear, we never filed a complaint or threatened to do so, nor did anyone, to the best of my knowledge, in the ZFS community.

    Sun also positions this as an attack on open source (since ZFS is under some open source license, the one that is incompatible with the Linux kernel GPLv2):

    NetApp's legal attack against Sun's open source ZFS solution which is freely available in the marketplace is a clear indication that NetApp considers Sun technology a threat, and is a direct attack on the open source community.

    So software patents suck, we all know that.

    One one side, if there is any truth to NetApp's claim that Sun tried to monetize their patents by going on the offenseive this seems to be a case of Sun bringing this upon themselves.

    NetApp could respond by issuing a patent covenant for users of open source operating systems (which would include Linux and OpenSolaris, but would still allow them to monetize from the Solaris uses).

    Someone on Jonathan's blog raises a good point:

    I find your comments contradictory.

    "First, Sun did not approach NetApps about licensing any of Sun's patents and never filed complaints against NetApps or demanded anything." on the one hand, and "... we were not willing to sell the patents, We've always been willing to license them."

    Can you please address the contradiction between "never demanded" and "always willing to license", Since "Willing to license" is usually simply a code word for "demanding payment for licensing."

    If Sun's position that NTAP does not in fact violate the patents in question, and Sun does not violate NTAP's patents, why can't Sun affirmatively state that instead of leaving the issue unresolved?

    Warmest Regards,
    Max

    That is one good question.

    On the other side, perhaps NetApp has turned into a patent troll. And there are some indications from NetApp's blog. This is worrysome:

    On the other hand, I won’t pretend that we would never have sued if Sun hadn’t approached us first. We focus on innovation as a company, and we do intend to defend our intellectual property.

    [...]

    Our interest is on commercial use of ZFS. That is, we are concerned with companies who take our IP and turn it into products that they make money on. For obvious reasons, we are especially concerned about commercial use of our IP that would compete with NetApp.

    This seems to undermine NetApp's initial claim.

    In the meantime, am buying POPC-orn shares, I predict this drama will have the same ratings as the second season of Lost.

    Posted on 06 Sep 2007


    Microsoft/Novell Collaboration on Silverlight.

    by Miguel de Icaza

    Update: I have updated this post addressing some questions that people have raised over email and the group. The updates are flagged with an Update label.

    Update: Scott Guthrie at Microsoft blogs about the news: updates to Silverlight 1.1, organizations adopting Silverlight 1.0 and links to various tutorials.

    Today we are announcing a new collaboration with Microsoft around Silverlight. The Mono team at Novell will implement open source versions of Silverlight 1.0 and Silverlight 1.1.

    Our implementation of Silverlight is Moonlight.

    We have had a cordial relationship with many developers at Microsoft for quite some time. Scott Guthrie and Jason Zander provided us with informal advice on how to implement Moonlight, and we also have good relations with the open source teams working on IronPython and IronRuby.

    Today we are formalizing a collaboration between Microsoft and Novell with the explicit purpose of bringing Silverlight to Linux and do this in a fully supported way. The highlights of this collaboration include:

    • Microsoft will give Novell access to the test suites for Silverlight to ensure that we have a compatible specification. The same test suite that Microsoft uses for Silverlight.
    • Microsoft will give us access to the Silverlight specifications: details that might be necessary to implement 1.0, beyond what is currently published on the web; and specifications on the 1.1 version of Silverlight as it is updated.
    • Microsoft will make the codecs for video and audio available to users of Moonlight from their web site. The codecs will be binary codecs, and they will only be licensed for use with Moonlight on a web browser (sorry, those are the rules for the Media codecs[1]).
    • Novell will implement Silverlight 1.0 and 1.1 and will distribute it for the major Linux distributions at the time of the shipment. We will offer some kind of one-click install for Linux users (no "Open a terminal and type su followed by your password..." as well as RPM and DEB packages for the major distros and operating systems.

    This is an historical collaboration between an open source project and Microsoft. They have collaborated with other folks on the server space (Xen and PHP) but this is their first direct contribution to the open source desktop.

    Microsoft benefits by making Silverlight reach the Linux and BSD spaces. We benefit by ensuring that users of open source operating systems get access to sites that adopt Silverlight to deliver content or spice up their web apps.

    [1] Currently Moonlight video support has been prototyped using the fabulous and LGPLed ffmpeg engine for video and audio. We are unable to redistribute this code commercially due to licensing conflicts. Update: This means that individuals that want to use a 100% pure free software setup can do so. We are unable to redistribute this edition though.

    The binary codecs will initially support x86 and x86-64, with other platforms supported on an as-needed basis. Update: The full list of codecs supported in Silverlight 1.0 are listed here (scroll down a bit).

    Update: Some comments indicate that people would like to use GStreamer as the media backend (as GStreamer already has licensed codecs and some people might have purchased them already). We would be glad to merge any patches that people send us (copyright assignment required) to add support for GStreamer.

    Update: Some folks are asking whether they could use OGG for the video rendering in Moonlight. Today this is already possible because the media engine we use to prototype is ffmpeg which has support for this. From the standpoint of a desktop developer this might be enough, but for the web, the problem becomes an issue of compatibility with the Microsoft Silverlight implementation.

    We will bring up with Microsoft the issue of adding a new codec, but I suspect that since they are pressed to minimize the download size this might be difficult. There are other competing codecs though that people on the Silverlight groups are fairly vocal about and my eclipse our request. If you want official Ogg support from Microsoft, please bring this up on the Silverlight.net forums, Microsoft does listen to user feedback.

    Update: The "Silverlights"

    Update: There are two versions of Silverlight. The version released today (1.0) is basically a canvas that can be programmed through the browser's Javascript engine. ie, you can use "View Source" on your browser to see how everything is done.

    The upcoming version (1.1, a year from now) extends the browser plugin with a embedded CLR runtime. This is what got us in the Mono team interested in the technology was precisely this.

    Moonlight was originally designed to only implement 1.1, and only later we noticed that it was forwards compatible with 1.0 and that we could deliver both 1.0 and 1.1.

    For developing 1.0 applications the only tool you need is either a text editor or a programming language that supports the "print" command. Designers are useful, but not mandatory (on Windows Blend supports Silverlight, and there might be others). We are building an open source designer ourselves for using on Linux.

    If you want to take advantage of the features in 1.1, you will most likely want a .NET compiler and the Silverlight 1.1 libraries to link against. Our next release of Mono (1.2.6) contains a C# 3.0 compiler as well as the Silverlight 1.1 libraries that you can use to target Silverlight 1.1 using Mono on your favorite OS. Of course, with this setup you lose the ability to "View Source" as it now features compiled code in binary form (although if you really want to, you can just use Lutz's Reflector to look at it).

    Today our plugin depends on Mono on both cases (1.0 and 1.1), but we are exploring our options to remove Mono from the 1.0 case as it would simplify our profiling and valgrinding of our C++ runtime (valgrinding Mozilla + Mono + Moonlight + a web site is a bit slow).

    Working Well With Others

    We will be supporting Firefox and Linux initially (that is our first goal).

    But we are looking forward to work with developers from other operating systems (BSD, Solaris) and other browser (Konqueror, WebKit and Opera) to ensure that Moonlight works fine on their systems.

    Thanks

    Getting this collaboration in place took a lot of work on both ends: both the business and legal teams in both companies as well as various people inside Microsoft that endorsed the idea of having an independent implementation of Silverlight endorsed by Microsoft.

    Special thanks to Bob Muglia at Microsoft and Jeff Jaffe at Novell for getting the official collaboration rolling.

    Scott Guthrie, Bill Hilf and many members of his team that are transforming Microsoft from the inside out and have championed approaching the open source community. Brian Goldfarb made sure that the clock ticked and we got the agreement in place and Marc Jalabert invited us to demo Moonlight at the Paris ReMIX, which led to our 21-day hackathon. And everyone that has so kindly answered our questions on .NET and Silverlight and have championed us from the inside.

    In the Novell side, Frank Rego, Denzil Harris, Patrick McBride and Guy Lunardi worked around the clock to get everything in place for this launch.

    And of course, none of this would be possible without all the members of the Mono team that made our original proof-of-concept possible on June 21st and that have continued to work on all the various pieces that make up Moonlight possible.

    Oh, by the way

    We are hiring.

    If you are a talented software developer with experience in C#, C++, graphics, fonts, audio, Mozilla, Opera, WebKit, QA, packaging or Gtk+ and you do not mind intense and grueling hours of work to produce something millions of people will see and use, send me an email.

    Interviews with the Mono team are usually conducted over email and usually include a complicated and completely useless programming exercise that you complete at home.

    Watching Moonlight in Action

    If you are attending the IBC2007 conference in Amsterdam you will be able to see Moonlight in action at the Microsoft booth. Hacker extraordinaire Rolf Bjarne (of Mono's VisualBasic.NET fame) will be demonstrating Moonlight running on Linux at the show.

    Alternatively, if you want to try out Moonlight yourself, you will need to follow the instructions on our Moonlight page. It currently requires users to compile code from our Subversion repository, we will try to put together in the next few weeks a VirtualBox/VMware image for people to try it out easily.

    If you try it out, please report bugs here.

    Recently we have been fine tuning Mono to render the Halo3 site:

    Halo3 Site on Linux.

    You can see more screenshots of Moonlight in action here.

    Posted on 05 Sep 2007


    Sample Interviews

    by Miguel de Icaza

    Some folks have been asking what kind of interviews we conduct over email for hiring in the Mono team. We allow people to work remotely. To find out how well they can work independently away from our office we came up with some tasks that we give out on job interviews.

    In my experience with hiring people at Ximian, the face-to-face interviews did not yield as good results as reviewing someone's existing track record and contributions or these programming exercises.

    A resume, plus an interview when you ask the candidate to "implement XX on the whiteboard" and some trick questions have too many problems which are probably worth discussing some other day. In my experience these kinds of interviews that have been popularized in the industry are bad. They evaluate developers on all the wrong dimensions that you need to produce software.

    Am posting here two of the interviews that we used in the past to hire for positions into the Windows.Forms group and the Mono VM engine. These interviews are typically conducted over two to three weeks.

    A story that I find funny was when we did the Windows.Forms interview. Once I emailed back the applicants with the 2 week deadline, Andreia Gaita replied to me within 2 or 3 days. She was the first to reply, but thought that she was the last, and her code was great, did everything I requested (and if she gives me permission I can post her submission).

    Andreia turned out of course to be a superb hacker, see her recent work on Mono/Mozilla integration.

    The interviews follow.

    These are not the interviews that we will use for Moonlight, but it will give you an idea of what kind of thing we do ;-)

    Windows.Forms Interview

    Remember: these interviews are designed to be answered at home during your afternoons when you get back from school/work and would usually take a few days.

    * The Widget
    
        You must implement a small rendering engine for a small
        XML-inspired markup language, the language accepts:
    
        <p>...</p>    To start paragraphs.
    
        Paragraphs in turn can contain the following:
    
        <b>...</b>    Where the text ... is bolded.
    
        <i>...</i>    Where the text ... is italicized
    
        <link>...</link> Where the ... is rendered as a link
    
        <blink>...</blink> The text should blink.
    
            The control must expose one property:
    
            string Markup { get; set; }
    
        Which allows the developer to programatically set the markup
        language, for example:
    
              m = new MarkupControl ();
              m.Markup = "<p>Hello <b>World</b>!</p>";
    
        The control must also expose an event, so I can hook up
        whenever someone clicks on a link:
    
        delegate void LinkClicked (object sender, string link_text);
    
        So I can use it like this:
    
              m.LinkClicked += my_clicked;
          ...
            
          void my_clicked (object sender, string link_text)
          {
            Console.WriteLine ("The link {0} was clicked", link_text);
          }
                    
        You must also provide a complete program that will run when I
        run it in Linux, and you must also exercise the property and
        the event, this would be nice to have:
    
          void my_clicked (object sender, string link_text)
          {
            Console.WriteLine ("The link {0} was clicked", link_text);
            ((MarkupControl) sender).Markup = "<p>This is the new text after clicking</p>";
          }
    
        Extra points: when I use blink, you will have to refresh,
        bonus points if you avoid flicker by using double buffering, or
        by only repaining the area that has changed. 
    
        I want a small and succinct implementation, but this is your
        opportunity to show that you can write *robust* code, so impress
        me.
    
    * Trick Question
    
        In our corlib implementation, in System/DateTime.cs we have a
        suboptimal implementation of the method "TryParse", we basically
        call Parse inside try/catch.
    
        Explain:
    
            * Why do I say that our solution is "suboptimal"?
    
            * What would it take it to make more efficient?
    
            * Why did the maintainer that wrote that code not do
              the more efficient thing?
    
        The trick question is: Why was the faster process not done in
        the first place.
    
        Explain.
        

    JIT Interview

    This interview was constructed by Paolo Molaro when we were hiring folks for the JIT. The developers that joined us have been fantastic, Mark and Rodrigo. They are working in adding the CoreCLR security (I blogged about Mark's work before) and the verifier to Mono (which we will need for Moonlight) and have also been doing many other needed tasks on the VM.

        This interview should take a week to complete in your
        afternoons.  Between 8 to 16 hours for someone not familiar
        with Mono.
    
        We figured that not everyone has time to allocate to this
        immediately, so we will wait until March 30th to review the
        applications.
    
        All of this can be answered by using the officially released
        Mono packages from:
    
                http://www.mono-project.com/Downloads
    
        Get the mono-1.2.3.tar.gz source code download.
    
        Feel free to ask any questions privately or in any Mono public
        forums.
    
    First Task: Extending the Mono VM
    
        Given the following program, change the mono JIT to intercept
        the Datum.Add () function and implement it internally with a
        SSE instruction so that the additions happen in
        parallel. Datum.Add () is to be treated like an intrinsic:
        this means that the JIT knows exactly what it's supposed to do
        and doesn't need to actually compile the IL code in it.
    
        Ie, you catch early on the call to Datum.Add (), there is no
        need to do any advanced compiler optimizations.  The current
        implementation here will be ignored once you have this
        implemented.
    
    using System;
    
    struct Datum {
        float f1; float f2; float f3; float f4;
    
        Datum (float val) {
            f1 = f2 = f3 = f4 = val;
        }
    
        void Add (ref Datum b) {
            f1 += b.f1;
            f2 += b.f2;
            f3 += b.f3;
            f4 += b.f4;
        }
    
        void Print () {
            Console.WriteLine ("{0}:{1}:{2}:{3}", f1, f2, f3, f4);
        }
    
        const int count = 100;
    
        static void Main ()
        {
            Datum[] array = new Datum [count];
            float f = 0.1f;
            for (int i = 0; i < count; ++i) {
                    array [i] = new Datum (f);
            }
            for (int i = 1; i < count; ++i) {
                    array [i].Add (ref array [i - 1]);
            }
            array [10].Print ();
            array [count - 1].Print ();
        }
    }
    
    Second Task: 
    
         Pick one of two:
    
            * GC Analysis
    
            * JIT and Generic Analysis
    
    * GC Analysis.
    
        Given the description in:
    
            http://www.mono-project.com/Compacting_GC 
    
        and the implementation in 
    
                    mono/metadata/sgen-gc.c
    
        describe briefly 3 changes to the GC code and/or JIT-GC
        interface that would provide a significant performance
        speedup. 
    
        Explain the changes, the reasons it will improve performance
        and provide rough speedup numbers with a benchmark of your
        choice.
    
    * JIT and Generic Analysis
    
       Mono supports generics in its compiler and VM, this means that
       code like this is supported:
    
           class MyStack<T> {
                   T [] storage;
                   int top;
    
                   MyStack ()
                   {
                           storage = new T [10];
                   }
    
                   public void Push (T datum)
                   {
                           storage [top++] = datum;
                   }
    
                   public bool Empty {
                           get {
                                   return top == 0;
                           }
                   }
           }
    
       If the above code is used like this:
    
           MyStack<object> object_stack = new MyStack<object> ()
           MyStack<string> string_stack = new MyStack<string> ()
           MyStack<int> string_stack = new MyStack<int> ()
    
       Explain:
    
           * When a generic class is instantiated, what pieces of
             code are shared?
    
           * Why they should be shared?
    
           * Are they shared in Mono?   
    
           * If yes, why?   If not, why not?
    
           * How could this be improved?
    
        

    Posted on 05 Sep 2007


    Steve Jobs on Jon Stewart

    by Miguel de Icaza

    From Engadge's coverage, Steve Jobs apparently just said today:

    "I love Jon Stewart, I hope all of you watch his show. It's the best place to get the news every day."

    People living outside the US can watch Jon Stewart on the web. Highly recommended.

    Posted on 05 Sep 2007


    Mono's WebControl

    by Miguel de Icaza

    As part of the work that we are doing to implement Windows.Forms in Mono we needed to provide a WebControl that applications could use to embed a Web browser.

    We needed a bit more control than the control that gtkmozembed offers. Zac Bowling started the work to wrap Mozilla and Andreia Gaita completed it:

    See Andreia's post on wrapping Mozilla for use in Windows.Forms.

    The public interface is Mono.WebBrowser which currently only provides access to Mono.Mozilla, but we envision that we will have other providers as time goes by (in particular our users on MacOS X with Windows.Forms).

    Posted on 04 Sep 2007


    Michael Hutchinson

    by Miguel de Icaza

    Michael Hutchinson who co-created during the first Google Summer of Code Project the Mono ASP.NET designer has started work at Novell in the Mono team.

    Michael will be joining Ankit Jain, Lluis Sánchez and Mike Krüeger on improving MonoDevelop.

    Michael started working today from the UK, but will be joining the enormous Mono team (all two of us) in Cambridge (USA) in October.

    I hope he likes sushi. He looks like someone that would like it:

    Posted on 03 Sep 2007


    Diary of a Web Media Player

    by Miguel de Icaza

    On Scott Guthrie's blog I found out about Jose Fajardo's journey on learning Silverlight.

    Jose decided to write an iTunes-like media player using Silverlight. He has documented his development in about 20 blog posts here.

    His application looks like this:

    His exercise is aimed towards pixel-similarity with iTunes. Joe Shaw took a more Web-by approach at playback on the web.

    Posted on 02 Sep 2007


    Am Becoming Chubbier

    by Miguel de Icaza

    I just noticed that I can barely fit in a shirt that used to be my favorite two years ago. It must be the large amount of fat in those carrots:

    	miguel: I think am becoming chubbier
    	snorp: it's your part-time veggie diet
    	snorp: carrots are high in fat
    	snorp: stick to cow
    	

    Posted on 31 Aug 2007


    Moonlight Designer

    by Miguel de Icaza

    Alan McGovern who worked with us last summer as part of the Google Summer of Code to build a BitTorrent API for Mono called MonoTorrent joined us at Novell this summer as an intern.

    When Alan arrived in Cambridge we had just decided that we would start our hack-a-thon on Moonlight to demo whatever we could get done in 21 days to show at the Mix Paris event.

    Alan worked in the summer on a XAML designer for Silverlight that he called "Lunar Eclipse":

    Ok, do not make fun of it. The important stuff is the engine, not the looks. Am sure Christianism has a quote for this, but I would not know how to google it up, but something like "look at the heart, not at the look". And if not, it is probably on one of those self-help books that I got at a discount price on that bookstore in Newbury St before they shut down.

    The idea was to write the Silverlight designer in Silverlight itself. Currently our designer uses Gtk+ for its user interface plus a Silverlight surface for the designer. We felt that we could also build a web version of it and hence tap into the MacOS crowd that would not have access to the Blend designer either.

    He started when we barely got anything working, it was quite challenging, because every few hours the code would be in a completely different stage. He reported more bugs than anyone else as he was our first "native" user of Moonlight.

    The designer is able to serialize the designs into XAML, it is possible to hand-edit the XAML and go back to the rendering surface and is also has a timeline editor for creating animations.

    Some videos for your pleasure created by Alan:

    Of course, our long term goals would be to polish this up and create a Mono Add-In for MonoDevelop to offer a complete Silverlight development stack on Linux.

    On the development stack side, we have most of the bits to have a Silverlight development stack for Linux, Unix and MacOS ready. Sadly this will not be part of Mono 1.2.5, it will be part of our next release: Mono 1.2.6 scheduled for sometime in October or November. The adventurous among you can already use this by using Mono from SVN (for full instructions, see this link).

    You might notice that LunarEclipse lacks file loading and file saving. This was because Alan insisted that file loading must use the Bittorrent protocol (his argument was that XAML files one day could span multiple gigabytes), but he did not know how to save files with Bittorrent.

    For the time being, you can use cut-and-paste to load and save your XAML files. Either that, or send us a patch ;-)

    Working with Alan this summer was a pleasure. It was my first time working with an Irish that considered the idea of a "seven course meal" to be a six-pack of Guinness and potatoes. The good news is that we turned him around, and by the end of the summer he was an avid chicken-quesadilla consumer.

    Posted on 31 Aug 2007


    Nice Unity Interview

    by Miguel de Icaza

    An interview with Nicholas Francis from Otee, the makers of the Unity game development system.

    The Unity folks have been reusing the Mono JIT engine as a game engine, here is a nice blurb about what Mono got them:

    If I have to pull out a specific feature it would be our scripting interface: We use Mono to get C#, JavaScript and Boo languages in there for gamecode. This means you get a scripting language running incredibly fast (*footnote: Initially, we used Python for GooBall. With that we were spending 50% of the CPU time inside scripting code. When we switched to Mono, the same functionality dropped to 1-2% CPU usage - we were completely blown away with how fast it is.) so this is what you make your games in (we also have C++ plugins for people who are passionate about C++ or need to use an existing library). When you make a Mono class, all public variables show up in the inspector for easy modification. So basically, Scripts are 1st class citizens of Unity. We're also using Mono for extending Unity - It really is that good.

    Hopefully, when I have some spare cycles (hahahaha) I would like to assist the Unity folks in porting their game engine to Linux.

    Once we have a port to Linux, we could run most of the games unmodified (the only exception would be those that require C++ plugins), educational software, architecture and advertising software that is being built today with Unity.

    Posted on 31 Aug 2007


    Google SoC: Gtk# Ribbon Library

    by Miguel de Icaza

    This is the first on a series of posts to comment on the results from the students that contributed to Mono as part of the Google Summer of Code.

    Laurent Debacker completed his Ribbons widget for Gtk#:

    You can also see the widget in action in the following screencast: Ribbons-final.ogg.

    Laurent posted his final SoC status report on this blog entry.

    Laurent needs a special mention because he also documented this class.

    My hope for this widget would be:

    • To move the widget to Mono's SVN repository from the Summer of Code temporary repository.
    • To start packaging it for developers to start using and provide packages for multiple distributions.
    • Get applications to start using the Ribbon. Am I crazy thinking that MonoDevelop could take advantage of the Ribbon to better expose the extensive functionality it has?
      Nobody has used the Ribbon for an IDE before. This has a lot of potential.

    Update2: Laurent followed up with a proposal that he had drafted to improve MonoDevelop with the Ribbon UI. What a funny coincidence!

    Update: Alan found some nice prior-art applications that used the Ribbon-like interface:

    Alan posted on some blog comments a few months ago a much better screenshot. If you own that blog, and remember it, please post the link.

    Posted on 30 Aug 2007


    Gtk+ on OSX

    by Miguel de Icaza

    Michael Natterer posts on the work to integrate the Gtk+ menu with the OSX menu:

    A video is available here.

    Congratulations to the folks involved in getting Gtk+ running on OSX.

    Update: Replaced the ugly screenshot with a beautiful one from Mikael Hallendal from Imendio.

    Posted on 30 Aug 2007


    Automatic Playlist Generation Using Similarity Models

    by Miguel de Icaza

    Dominik Schnitzer's Mirage is an automatic playlist generation plugin for the Banshee Media Player.

    This is what makes it interesting:

    Mirage uses the latest AI/music information retrieval techniques to compute a similarity model for each song. So before you can use Mirage to automatically compute playlists, your whole music collection has to be analyzed once.

    After it is analyzed just drag and drop a song you like on the Playlist Generator item in Banshee and a playlist with similar sounding music will be computed.

    Mirage is by far not perfect! Yet :-) - Imagine it is a radio station playing songs from your collection.

    Video: banshee-mirage.ogg.

    Posted on 30 Aug 2007


    Nice Mono Testimonial

    by Miguel de Icaza

    Found this today, it is a very nice testimonial from someone that tried out Mono to port their code using our VMware image.

    This is for ProMesh.NET a Web platform built on top of the basic System.Web that replaces ASP.NET:

    I was a little curious to see how ProMesh.NET (MVC Web Framework for .NET 2.0) would run on Mono (if at all), so I did the following:

  • Download the VMWare image with a pre-installed Mono installation on SUSE Linux 10.2
  • Download VMPlayer (free)
  • Copied the latest ProMesh.NET source tree to the virtual machine
  • Fired up MonoDevelop
  • Compiled the framework... Works (well, it compiled)
  • Copied the ProMesh.NET demo application to the virtual machine
  • Compiled the demo app... Works!
  • Started xsp2.exe (the lightweight .NET web server for Mono)
  • Opened the index.ashx page using FireFox: WORKS
  • Went through the complete demo site. Everything worked!

    I was utterly amazed by the painless process of compiling and running a ProMesh.NET application on Mono, something I've never tried before (I did have some previous experience with MonoDevelop, but not a lot).

    This is pretty exciting stuff, knowing you can just grab your ProMesh.NET web application, dump it on a Linux box and run it from a Linux web server.

  • Posted on 30 Aug 2007


    Vegetarianism

    by Miguel de Icaza


    Vector-based, then rasterized, electronic carrot.

    As a part-time vegetarian, I face some small problems. They do not bother me very much, but I feel discriminated by both my meat-eating friends and my full-time vegetarian friends.

    The former mock my ways, the latter doubt my commitment.

    Posted on 29 Aug 2007


    Replying to My Critics

    by Miguel de Icaza


    Vector-based, then rasterized,
    electronic burger with bacon.

    Some people continue their unabashed criticism of my life-style choices.

    Yes, that was a meat burger with bacon. But as I also explained before we walked into the burger joint that consuming such a burger configuration was perfectly within the limits of my part-time vegetarianism.

    I was not on veggy duty while I chugged it down.

    Also, for those interested, recommended link of the day: The Meatrix.

    Update: My critics have also pointed out my spelling mistakes in the sphere of meat-related naming actitives.

    Posted on 29 Aug 2007


    Blogging: Interesting Observation

    by Miguel de Icaza

    Dave Winer has an interesting observation on blogging, fact checking and correcting previous statements.

    Sometimes I use an "Update" tag when corrections are sent my way, sometimes I use a new post, sometimes I update and link, sometimes am guilty of being sloppy.

    What is your take?

    Posted on 29 Aug 2007


    ASP.NET AJAX in Mono

    by Miguel de Icaza

    The Mainsoft developers have been busy implementing the core foundation for ASP.NET AJAX. They usually do all their testing on Grasshopper.

    Recently System.Web.Extensions got added to the default build in Mono (I do not think this will make it into Mono 1.2.5, you will need to use the code from SVN for that) but we had not really tested it directly with Mono.

    Onur Gumus posted a How To: ASP.NET Ajax with Mono document today.

    For doing native development in Unix this is a bit cumbersome (due to all the new stuff that needs to be added to the Web.config file; Should we put most of this in the standard machine.config?) but if you are moving an application, the Web.config should have been produced by Visual Studio already.

    Konstantin Triger reports that the open source ASP.NET AJAX Toolkit works on Grasshopper, we have not tested this directly with Mono and XSP, but hopefully someone will try it soon.

    Posted on 28 Aug 2007


    Mono and XPCOM: Scripting VirtualBox

    by Miguel de Icaza

    A few weeks ago Thomas introduced me to Achim Hasenmueller from Innotek, the makers of VirtualBox, an open source virtual machine system (similar to VMware and VirtualPC).

    It turns out that much of the functionality of VirtualBox is exposed through COM interfaces and at least on Unix they use Mozilla's XPCOM as their COM layer.

    Achim wanted to use Mono to script and control VirtualBox through its XPCOM interfaces.

    The good news is that for the past few months, Jonathan Chambers has been working on adding COM support to Mono. Jonathan has some software that exposes COM interfaces, and wants to be able to control it from Mono, instantiate COM classes from Mono, consume COM interfaces from Mono and export Mono objects to COM applications.

    Jonathan's initial goal was to support COM on Windows, but as the recent testing showed, Mono can use Mozilla's XPCOM to script VirtualBox.

    Last time I talked to Jonathan he was putting together a tool that can import type libraries from XPCOM and generate the C# stubs that are necessary to get access to all the APIs exposed by XPCOM instead of having to manually bind each interface.

    Hopefully Jonathan will post his sample code for folks that might be interested in using COM with Mono on Unix.

    Here is a C# sample that he emailed me recently (for VirtualBox):

            static void listVMs(IVirtualBox virtualBox)
    	{
    	    IMachineCollection collection;
    	    IMachineEnumerator enumerator = null;
    	    collection = virtualBox.Machines;
    
    	    if (collection == null) return;
    	    enumerator = collection.Enumerate();
    	    if (enumerator == null) return;
    
    	    while (enumerator.HasMore)
    	    {
    	    	IMachine machine = enumerator.Next;
                	if (machine != null){
    		    IntPtr ptr;
                        string machineName;
                        ptr = machine.Name;
                        machineName = Marshal.PtrToStringUni(ptr);
                        Console.WriteLine ("\tName:        {0}\n", machineName);
    		}
    	    }	    
    	}
    	
    	static int Main (string[] args)
    	{
                    int hr = 0;
                    nsIServiceManager sm;
                    hr = NativeMethods.NS_InitXPCOM2 (out sm, IntPtr.Zero, IntPtr.Zero);
                    IntPtr ptr;
    
                    nsIComponentRegistrar cr = (nsIComponentRegistrar)sm;
                    Guid kEventQueueServiceCID = new Guid("be761f00-a3b0-11d2-996c-0080c7cb1080");
                    sm.getService(kEventQueueServiceCID, typeof(nsIEventQueueService).GUID, out ptr);
    
                    nsIComponentManager cm = (nsIComponentManager)sm;
                    string NS_VIRTUALBOX_CONTRACTID = "@virtualbox.org/VirtualBox;1";
                    IVirtualBox virtualBox = (IVirtualBox)cm.createInstanceByContractID(
    			NS_VIRTUALBOX_CONTRACTID, null, typeof(IVirtualBox).GUID);
    
                    listVMs(virtualBox);
    
                    Marshal.ReleaseComObject (virtualBox);
                    
                    NativeMethods.NS_ShutdownXPCOM(sm);
                    return 0;
            }
    
    	

    The code above would also automatically work with any other .NET language (for scripting purposes, IronPython, and one day IronRuby).

    COM on Unix

    COM does not exist on Unix as a service that applications can depend on. Developers today have a choice between using Mainsoft's COM runtime or embedding a variation of Mozilla's XPCOM in their application.

    For example, VirtualBox today bundles a copy of XPCOM in its source code distribution.

    Some folks have a lot of code that has been built with COM in mind and this should open the doors for folks to take advantage of it on Unix with Mono.

    Posted on 28 Aug 2007


    Election Money

    by Miguel de Icaza

    A useful Flash interactive application to browse how much money candidates have raised, how much they have spent and who are their major donors.

    Three folks that have impressed me (Dennis Kucinich, Mike Gravel and Ron Paul Gravel) have raised very little money compared to the multi-million juggernauts in the mainstream.

    Electability seems to be highly correlated to how much money these folks are raising and spending.

    Posted on 27 Aug 2007


    Libros Educativos

    by Miguel de Icaza

    Cuando era niño, era fan de esta colección de libros de Pemsa que tristemente ya no están a la venta.

    Ahora un esfuerzo está tratando de digitalizar libros de segunda mano y completar un acervo histórico en línea (por Barrapunto).

    Posted on 27 Aug 2007


    Silverlight and Moonlight: A Summary.

    by Miguel de Icaza

    Edd Dumbill has authored a superb summary on where Moonlight is.

    He has put together a great description that pulls information from multiple sources to put together a really nice story and give a good idea of where we are headed to.

    Posted on 23 Aug 2007


    Google Summer of Code: Windows.Forms Designer

    by Miguel de Icaza

    Ivan has posted the final status report for his Mono.Design work for the summer:

    During the summer Ivan worked on implementing a Windows.Forms designer surface and various pieces of the infrastructure to load and save designs. He also worked on integrating Windows.Forms with Gtk# to enable the designer to be used from within MonoDevelop.

    Read his entire report here and you can comment on his blog.

    Posted on 23 Aug 2007


    Annotated C# Standard

    by Miguel de Icaza

    Today I received my copy of the Annotated C# Standard that Jon Jagger, Nigel Perry and Peter Sestoft put together.

    This book is an annotated version of the C# specification that comes with plenty of comments and contributions from people that have implemented the language (It has contributions from Mono's Marek Safar, Martin Baulig, Paolo Molaro, Raja Harinath and myself, but also from the C# team at Microsoft, contributors to ECMA and some universities that researched C#).

    Jon has been passionate about C# for a long time. The C# specification that we distribute as part of Monodoc was based on his hyperlinked version of the standard.

    Nigel contributed to both the CLI and C# standards over the years and recently joined Microsoft.

    Peter has written a number of books (Java Precisely, C# Precisely) and is also behind the implementation of C5 a Generic Collection Library (this was a great test case for Mono's C# compiler: it was quite a challenge).

    Congratulations to Jon, Nigel and Peter. They have been working on this project for a long time.

    Posted on 22 Aug 2007


    OMG2 OMG2 OMG2 OMG2 OMG2

    by Miguel de Icaza

    OMG2 OMG2 OMG2 OMG2 OMG2 Mark Probst pointed me out to the announcement of Canon's 40D camera. I skipped over the 30D, so this is my opportunity to continue shopping until I drop.

    OMG3 OMG3: it can do Wifi file transfers and hook up to a GPS.

    Posted on 22 Aug 2007


    OMG OMG OMG OMG OMG

    by Miguel de Icaza

    As a very happy Rhapsody customer, the news that Rhapsody will start selling DRM-less music at 0.89 cents a pop is ubertastic.

    If I was European or Canadian I would be 30% more excited -- considering the falling dollar.

    I have been using it mostly as a radio so far, and avoided purchasing music because it would be DRMed, but there are a bunch of titles that I would like to own.

    Let the double-click all-amateur shopping begin!

    Posted on 22 Aug 2007


    Rafi on Grasshopper

    by Miguel de Icaza

    A few years ago we met Rafi at one of our Mono summits in Boston, he works for Mainsoft and he has always been amazing.

    Watch his interview on what he is doing with Grasshopper here and here.

    He talks about Mainsoft's contributions to Mono, about his testing procedures and the kind of things that are possible with Grasshopper when integrating ASP.NET applications when running on J2EE servers.

    Posted on 16 Aug 2007


    Mono Bugzilla: Important

    by Miguel de Icaza

    As you may or may not know, the Mono team is in the process of switching from the Ximian Bugzilla to the Novell Bugzilla. The Ximian Bugzilla installation is a very old, patched, modified, buggy and unmaintained version of Bugzilla. The Novell Bugzilla team has offered to take over the maintenance of Bugzilla and give us both a modern Bugzilla installation and access to various tools that will help our process.

    As part of this process we need everyone to create Novell.Com accounts.

    When creating your Novell.Com account, please make sure to use the same e-mail address that you use to login to the Ximian Bugzilla. This will ensure that your Bugzilla configuration stays the same.

    Please create your Novell.Com account now, so that you will be able to immediately access the Novell Bugzilla when we do the final switchover.

    To create a Novell.Com account, please go to this URL and fill out the form: here

    Important: To link your existing bugs from bugzilla.ximian.com to the new bugzilla make sure that you use the same email address in that form so you can keep tracking the bugs that we had for you before.

    We appreciate all of the contributions that you have made to mono in the Ximian Bugzilla and hope that you will continue to contribute in the Novell Bugzilla.

    Posted on 16 Aug 2007


    Toshok: International Man of JSonified Xaml

    by Miguel de Icaza

    Given Toshok's initial reaction to the lack of JSon support in Silverlight last night:

    He decided to do something about it.

    Silverlight is "webby" in that you can use plain text files and you can generate its content from PHP or any other webby framework by using the mighty print statement.

    But XAML is annoying to type, it is webby, but its not uber-webby. It would be nice if Silverlight supported incarnation from JSon instead of incarnation from XAML, for one, it is more wrist friendly than XAML and it also a lot nicer on the eyes.

    This morning Chris implemented a JSon to XAML. See his blog post.

    This is done with a Javascript program, so it will work with your stock Silverlight installation.

    It would be much nicer if Silverlight's Control class had a CreateFromJson in addition to CreateFromXaml.

    See Chris post on the subject. You can now use syntax like this for Silverlight:

    	
    var json = {
      Canvas: {
        name: "Toplevel Canvas",    children: {
          TextBlock: {
            Text: "Hello World"
          }
        }
      }
    }
    	

    Posted on 14 Aug 2007


    Moonlight's 2.1 profile

    by Miguel de Icaza

    Silverlight comes with a shrunk down version of the CLR called the CoreCLR and also comes with a reduced version of the core class libraries.

    Silverlight uses a subset of the 2.0 API and removes a lot of stuff that would only be used on a desktop or a server and removes overloads that people are not likely going to use and according to some blog posts even things like System.Collections will be removed giving preference to the generics-based API in System.Collections.Generic.

    Nice graphic showing my Inkscape skills:

    To support this "thin" profile in Moonlight we had a couple of choices.

    We really did not want to branch our source code and chop code left and right until we removed all the extra baggage. We also did not want to use compilation defines because that would get ugly very fast.

    Instead what we did was productize Linker tool that was developed as part of the Google Summer of Code last year.

    The Linker could take an assembly and a description of the desired API entry points and produce a new assembly that only contains the requested entry points plus any of its dependencies. Although the Linker from last year was able to do some basic linking, but as with all software projects, the devil is on the details. JB has been working on productizing the tool ever since he joined Novell back in May.

    The idea was that we would feed the linker a superset of our 2.0 library (2.0 plus the handful of Silverlight-esque APIs) plus a linker description file, and it would produce the resulting Silverlight compatible assembly.

    The above approach allowed us to minimize the number of ifdefs that were required in the source code. In addition to the linking stage we also needed a way of inject a number of security attributes (again to avoid having a mess of ifdefs everywhere).

    So JB created new specialized tool that allows us to add, remove and validate assemblies. We call this the Tuner. Both the linker and the tuner are based on Cecil a library for handling CIL files.

    The tuner can do most of the heavy lifting, but there are a couple of areas that still required human intervention:

    • In a handful of cases abstract methods are no longer exposed in Silverlight, we had to work around this directly (XmlReader).
    • In a few cases there are some interfaces and class hierarchy changes required, those also had to be done manually.

    Finally, since our C# compiler depends very strongly on its mscorlib (the reason we have 3 compilers today, one for each profile is linked precisely to this dependency on mscorlib) we had to add special support to the VM to allow the compiler to call into methods that we had hidden as part of the tuning process.

    This afternoon for the first time JB was able to build the 2.1 profile from the start up to the Silverlight support libraries and the Silverlight plugin with the tuned assemblies.

    Although we have been debugging Moonlight with 2.0 assemblies for the past few months due to some of the API changes some applications like the SimpleXPSViewer did not work.

    There is still some work left to do as you can see from the warnings generated by the tuner, but we are getting there.

    Silverlight Toolkit

    With the 2.1 profile in place it is now possible for people on Linux and MacOS to develop Silverlight applications without using Windows.

    The bad news is that the 2.1 profile will not be available in Mono's 1.2.5 release as we branched that release a few weeks ago. So developers interested in doing Silverlight development on Linux or MacOS will have to wait until our 1.2.6 release in a couple of months.

    In the meantime Ankit has added support to MonoDevelop for compiling existing Silverlight VS Solutions as well as generating Unix makefiles from the VS solution file. You must be using an SVN release of MonoDevelop (sadly, 0.15 wont do it). for this to work though:

    bash$ mdtool generate-makefiles SilverlightAirlines.sln --simple-makefiles
    Creating configure script
    Creating rules.make
    Creating Makefile.include
    Adding variables to top-level Makefile
    Makefiles were successfully generated.
    bash$ 	
    	

    The default is to generate auto-tools based makefiles. It is recommended that people with acid reflux, ulcers or other delicate stomach conditions use the --simple-makefiles option. --simple-makefiles produces a configure and Makefile script that are essentially the labor of love.

    If we can sort out the license for the Silverlight.js template, we should also be able to ship MonoDevelop templates for creating Silverlight content.

    Posted on 11 Aug 2007


    Microsoft Visit

    by Miguel de Icaza

    Chris Toshok and myself will be in Microsoft offices in Redmond, WA from Monday to Wednesday next week. Email or post in the comments if you are interested in doing some kind of get together/dinner.

    In related news, Jackson posted a screenshot of Silverlight Scribbler running on Moonlight on his blog:

    Jackson and Sebastien also got parsing of XAML bezier paths working just in time for the June 21st demo, I like this screenshot:

    Posted on 11 Aug 2007


    CoreCLR Security

    by Miguel de Icaza

    An important component of Silverlight is a simplified security system for protecting what can be done and what can not be done by user code.

    .NET 1.x and 2.x have a system called the "Code Access Security" (CAS) which Mono has never completely implemented since it there are very few applications that actually took advantage of it (Update: On the comments someone points out that CAS is fundamental for any uses of ClickOnce deployment; Mono has no support for ClickOnce deployment either). This is probably due to its complexity, which leads to people not trying it out in the first place.

    With Silverlight it becomes very important to ensure that we can execute code in a secure fashion and without allowing malicious code to get access to any resources on the system. Code that is downloaded and executed inside Silverlight/Moonlight needs to be sandboxed.

    This new security system is described in a few blog entries from Shawn Farkas:

    Today Mark posted his first implementation of this new security system for Mono for use in Moonlight:

    Here's a preliminary patch for CoreCLR security, including a small patch for System.Security. It should do pretty much everything with the exception of catching method calls via reflection (I'm not sure how this is handles in Silverlight yet, and Silverlight on my Windows machine doesn't like me anymore - grr). I've included a small C# test program which tries out all the different ways (of which I'm aware) to call a method. That'll become a regression test eventually.

    If mono is called with "--security=core-clr" then security attributes are only honored in system assemblies (those in $(PREFIX)/lib/mono/2.1) - other assemblies are always security transparent. To do better testing there's also an option "--security=core-clr-test" which honors security attributes in all assemblies.

    Comments are welcome.

    In addition to the new CoreCLR security system, the needs of Silverlight have finally pushed us to implement the code verifier in Mono. This is currently under development by Rodrigo.

    CoreCLR is very similar to the design that Jim Pubrick has prototyped for SecondLife. Hopefully Jim can switch to the CoreCLR security system. Some of the needs for sandboxing that folks like SecondLife have (execution of untrusted code) can be found in our MonoSandbox page.

    This is a great summary of how the security system works, from Shawn Farkas:

    Over the last week we took a look at the new Silverlight security model. When you're writing a Silverlight application though, there's a lot of information there that you may not want to wade through to get yourself unblocked.  Here's a quick cheat sheet highlighting the important points that you'll need to know when working with the Silverlight security model:

    • All applications written for Silverlight are security transparent.  This means that they cannot: [details]
      • Contain unverifiable code
      • Call native code directly
    • Silverlight applications can access public methods exposed by platform assemblies which are either: [details]
      • Security transparent (neither the defining type nor the method has any security attributes)
      • Security safe critical (the method has a SecuritySafeCriticalAttribute)
    • Silverlight applications may contain types which derive from: [details]
      • Other types defined in the application
      • Unsealed, public, security transparent types and interfaces defined by the platform
    • Silverlight applications may contain types which override virtual methods and implements interface methods which are: [details]
      • Defined in the application itself
      • Defined by the platform and are transparent or safe critical

    Posted on 08 Aug 2007


    Mozilla JIT Choices

    by Miguel de Icaza

    I was reading a comparison between Adobe's Tamarin JIT and Sun's HotSpot and there was some discussion started by Chris:

    Maybe, I'm missing something, but I really don't see why Mozilla doesn't build on the Java platform rather than Tamarin. Investing effort in writing a full ECMAScript 3 or 4 translator to JVM byte-code seems like an easier and faster way to get much better results than Tamarin.

    To which one of Brendan Eich's replies was:

    We don't depend on closed source in-process code, period. I've also mentioned the license requirements, not that it mattered due to the lateness of Java's open source transition (GPL alone is not ok).

    I ran the same program that was posted there on Mono, and extrapolating the values (my machine is faster than Chris, but am using Java HotSpot 1.6):

    • Tamarin: 58 second
    • Rhino JS engine: 31.944 seconds;
    • Mono: 10 seconds;
    • HotSpot: 2.23 seconds

    Someone on the thread pointed out that using type annotations might bring Tamarin to 11 seconds. Update: , but Chris was not able to replicate that behavior..

    It is clear that Mono's floating point performance is far from ideal. Currently Mono on x86-32 platforms is still using the x87 "stack" style of floating point operations as opposed to the more efficient XMM style of code generation that we used on x86-64. We should look into this.

    Update: Mike ran the tests on x86-64 where Mono has a different floating point implementation and the results are promising, instead of being 4 times slower than Java in this test Mono is only 2 times slower.

    That being said, for Mozilla purposes, it seems that using Mono as their JIT instead of Tamarin would be a better choice:

    • Mono can be shrunk down to 5 megs by picking files (uncompressed) and even more if you are willing to ifdef stuff.
    • Mono's VM is licensed under the LGPL.
    • Mono runs IronPython, IronRuby and the DLR out of the box, no need to modify either one of them.
    • Mono already supports more platforms than Tamarin (and I believe we support more than Sun's JVM).

    Planning-wise its probably too late to use Mono on Mozilla, which is a shame.

    It might still be interesting to prototype using Mono + Rhyno as a Javascript engine or completing the DLR-based Javascript and see how fast it can get.

    This could probably be prototyped on WebKit/Gtk easily.

    Posted on 06 Aug 2007


    Silverlight Chess in Mono

    by Miguel de Icaza

    Early this morning Jackson got the Silverlight Chess program working on Mono's Moonlight:

    This demo did not work for a while as it requires that the x:Name declarations from controls created dynamically be merged with the container namescope.

    Between Chris and Jackson the javascript bridge is complete enough that a few hours later (after fixing a double free) it is now possible to have the Mono VM play against the browser Javascript in Firefox/Linux as well:

    Although the original plans were to only support Silverlight 1.1 because we thought that they would be very different runtime, it turns out that by supporting 1.1 we can also support 1.0.

    Various 1.0 demos are working with our implementation as well. The limitations currently are more with our overall support than in a 1.0 vs 1.1 difference.

    Speed

    Testing the Chess on Windows vs MacOS on relatively similar hardware seems to give an edge to Windows (as I do not have any two identical machines to compare, it just feels like the Windows box is performing about twice as fast).

    Am interested in finding out from folks that have similar hardware if there is any significant performance difference in the CoreCLR implementations between OSX and Windows.

    The second screenshot is Mono running on a ThinkPad T60P ([email protected]) am curious if someone with Windows with the same machine can report on the .NET vs Javascript nodes/sec.

    Posted on 06 Aug 2007


    ZeroGravity: Winning

    by Miguel de Icaza

    There is some kind of bug in Mono's implementation of Silverlight that is causing ZeroGravity to claim that I have won:

    But at least Aaron's favorite music is playing in the background.

    In other news, Chris just got Silverpad Pad working with the refreshed version of Silverlight:

    And Silverlight Airlines from the 1.1 Refresh:

    Posted on 04 Aug 2007


    Progress on C# 3.0

    by Miguel de Icaza

    Marek Safar reports on the progress on the C# 3.0 compiler front:

    This week:

  • Finished 3.0 type inference.

    Next Week:

  • Review and finish the implementation of collection initializers and anonymous types. They are the only remaining bits to have all LINQ components ready for the integration.
  • Pretty much all the C# 3.0 features are now completed. As Marek points out there are a couple of areas that still need some work (collection initializers and anonymous types), but we are in good shape to complete the LINQ support in Mono's C# compiler.

    JB Evain has also been busy creating a new profile of our compiler for developing Silverlight applications. The new command is smcs and it differs from gmcs in the following ways:

    • It enables -langversion:linq by default (so C# 3.0 is the default in the Silverlight profile).
    • Generates assemblies that reference the 2.1.0.0 mscorlib (as opposed to 2.0 that gmcs does).
    • It references by default all the Silverlight assemblies. With mcs and gmcs we only reference System and System.XML by default. We felt that in the case of Silverlight we could reference all the libraries needed by default.

    The majority of our C# 3.0 support will be available in Mono 1.2.5. The recent developments (type inference) did not make it into the release, so folks will have to wait for 1.2.6.

    Posted on 04 Aug 2007


    Mono Summit 07

    by Miguel de Icaza

    Last year we had a pretty fun meeting in Boston, but there were a few problems: the event was too short, and renting the hotel was too expensive and we also announced it with very little time ahead.

    We want to do another Mono Summit and we would like to do this event in Spain if possible. The reason is that it is relatively easy to reach Spain and for the European Mono developers (the majority of the Mono team is European) it would be cheaper to fly there than to fly to the US. Spain is also a bit cheaper than other destinations.

    I would like to find a University that could host us for a week of talks, meetings and conferences of the Mono community.

    We would need space for about 120-150 people: maybe some conference rooms for a couple of talks, otherwise classrooms and a place to hack, discuss and some internet connection would be all that we need. This would be sometime in October.

    My preference would be for Madrid or Barcelona as they both are well connected by international air travel.

    Anyone out there interested in hosting us?

    Posted on 03 Aug 2007


    Strawman Central

    by Miguel de Icaza

    As I was reading this morning Twenty-Five Ways To Suppress Truth: The Rules of Disinformation I was pointed to about Groklaw's latest attempt to defy gravity.

    As it is becoming common in some circles, some folks like to be purer than the virgin Mary. Groklaw has been for a while expanding into new levels of fundamentalism. The ends justify the means and all that:

    That, to me, wasn't the news, since a Microsoft license was submitted once before, although I gather not by the company. But what I'm noticing is reactions. ComputerWorld collected some truly astonishing responses, and if you follow their links, it gets worse. First, though, the reaction that matters, from Michael Tiemann:
    Michael Tiemann, president of the non-profit Open Source Initiative, said that provisions in three out of five of Microsoft's shared-source licenses that restrict source code to running only on the Windows operating system would contravene a fundamental tenet of open-source licenses as laid out by the OSI. By those rules, code must be free for anyone to view, use, modify as they see fit.

    "I am certain that if they say Windows-only machines, that would not fly because that would restrict the field of use," said Tiemann in an interview late Friday.

    Why would this need to be said? What nerve Microsoft has to even dream of trying for such a restriction. A license that restricts use to only the Windows operating system. Why would OSI even consider that? Have we lost our minds?

    Groklaw: Another Smooth Move from Microsoft: Watch out, Ruby. Watch out OSI.

    Really?

    4. Use a straw man. Find or create a seeming element of your opponent's argument which you can easily knock down to make yourself look good and the opponent to look bad. Either make up an issue you may safely imply exists based on your interpretation of the opponent/opponent arguments/situation, or select the weakest aspect of the weakest charges. Amplify their significance and destroy them in a way which appears to debunk all the charges, real and fabricated alike, while actually avoiding discussion of the real issues.

    The Rules of Disinformation

    Microsoft has a number of licenses under the "Shared Source" umbrella. Most of them are completely useless from an open source standpoint. Michael Tiemann correctly points that out and they would fail the test.

    The only license that can be submitted for OSI approval is the Microsoft Permissive License (Ms-PL) and possibly the Microsoft Community License (Ms-CL). The former is an Apache-like license, the latter is a GPL-like license. Am personally only interested in the first as that is what IronPython, IronRuby, the Dynamic Language Runtime and the ASP.NET client library are licensed under.

    Groklaw goes on to rally up the troops over *other* licenses that are not even under discussion. You would think that this was so obvious that it did not need pointing out, but I guess it needs pointing out.

    Later Groklaw seems confused: how a company can have software open sourced but not embrace it as an open source?

    And does Microsoft want to be an Open Source company? Puh-lease. They may want you to think that, but Steve Ballmer just told the world that it can't embrace that model:
    "Open source has been the issue that surrounds us. Could a commercial model like Microsoft compete with open source? And we've worked very hard on making the value of a commercial company surpass what the open-source community can deliver, because frankly, it's not a business model we can embrace. It's inconsistent with shareholder value."
    Does it get any clearer? And if they have no intention of adopting that business model, the right question is: why are they proposing open source licenses?

    There is no contradiction here. It is only contradictory if you live in a binary world world of black and white. Or if you find images like this to be magic:

    You can open source pieces of software, contribute to open source projects and still not embrace open source as your business model. It is easy to prove this by way of existing examples. Consider IBM and Google: they use open source software, they contribute to open source projects and they fund open source development, but yet their business model is not an open source model.

    An ugly trend is the adoption of the absolutist mindsets. "You are with us or you are against us". Well, for one, am not with Groklaw and am not with Microsoft. My goal is to make open source succeed as a platform and use open source for all of my server and desktop activities. I see no problem in taking open source contribution from companies that have not embraced open source as their business model as long as the code is open source. So I will happily consume open source code produced by Google, IBM and even Microsoft.

    Groklaw asks:

    By the way, guys, check those license submissions carefully. Do they exclude the GPL? Do they exclude sublicensing or allow it only if the sublicensee contacts Microsoft to get permission? How about if a licensee sells the company?

    Well, you would think they would have read the license, but it is easier to get on a rage binge than actually reading the licenses. There is no exclusion for the GPL or Copy-left licenses, the only problem is that the GPL is incompatible with pretty much anything, so chances are these will be incompatible altough am no lawyer and I do not know for sure; They do not exclude sublicensing and you do not need permission from Microsoft, nor do you need to contact them if you sell the company.

    The rage binge continues:

    In that connection, I suggest you look very, very carefully at the IronRuby initiative. The first rule with Microsoft proposals has to be: look for the devilish part. It won't be obvious. Here's the license for it, Microsoft's Permissive Licence, one of the shared source licenses. Is it Open Source?

    The MsPL seems to satisfy both the open source definition and the Debian Free Software Guidelines.

    Groklaw questions IronRuby motives and in the best conspiracy theory tone ponders:

    Is that the only question we should be asking? Here's another. Is IronRuby Ruby? [...] Ruby with a Microsoft twist.

    Obviously they do not know much about IronPython and IronRuby and the trouble they went to in IronPython to remain compatible with CPython. The troubles they went into to be compatible have been explained numerous times, but they are also available on Jim's Zen of the DLR slide deck. I removed the OpenXML remarks as they were just more pandering.

    The article continues by mixing half-facts and speculation as it is now a tradition over there:

    In Ruby's case, my understanding is that it started as Ruby.NET under the MIT license.

    It has different goals, IronRuby is layered on top of the DLR. They got permission to reuse the parser and tokenizer from Ruby.NET which had done all the leg-work of figuring it out (since Ruby does not have a formal language specification).

    The half facts continue:

    Microsoft has added some WPF functions to it. WPF stands for Windows Presentation Foundation. Some would tell you that WPF threatens an open web, the W3c standards, and basically anything involved with the open Internet. I don't know, not being a programmer, but that's what I hear.

    I will agree that you do not know what you are talking about. IronRuby can call any CLI methods and classes just like Ruby.NET and IronPython can (or, gasp, CPython extensions can do so as well) . WPF being just a collection of .NET classes they can be invoked by IronRuby.

    Being able to call CLI code is why I can write IronRuby applications that use Gtk# today on Linux without any changes to IronRuby, there is no magic needed:

    IronRuby Alpha running on Linux/x86 with Mono, calling Gtk#.

    LOOKOUT! ITS SPIDER PIG! MICROSOFT'S SECRET PLOT TO OVERTAKE THE INTERNETS BY ADDING GTK# SUPPORT TO IRONRUBY!

    Oh wait. Does that means that libraries are an evil plot as well? Tune in next week at the same bat-time on the same bat-channel for an answer.

    Then, Groklaw tries a little of guilt by association, always a fine choice in the most reputable sophistry circles:

    For me, it's enough of a warning that Miguel likes the MPL as he did the patent deal and all things Microsoft. He says the license is "by all intents and purposes an open source license". Whose intents? And whose purposes? Remember Lily Tomlin's old joke? If love is the answer, can you rephrase the question? And if this is "by all intents and purposes an open source license" then maybe it's time to look at that definition again.

    Facts and legal terms mean nothing. If Miguel likes it, it must be bad. I hope Groklaw gets nominated for "Best use of Fallacies to Advance a Political Cause" award next year.

    So if the license were to fit the open source definition then "it's time to look at the definition again". Why? Well, because Groklaw said so. Not because "they know" as we already know that they barely researched the subject.

    Now am off to get some more work done on Moonlight, which will serve two purposes: allow Linux users to access Silverlight content and produce an ulcer on Groklaw's posters.

    Disclaimers

    And as usual to avoid the usual round trip in the comments:

    • I speak for myself, I do not speak for Novell;
    • This blog entry does not represents the views of my employer.
    • I do not like Microsoft's overall business model, I do not like the pricing, I do not like lock-in into proprietary standards, do not like their patent threats, nor do I endorse FUD (theirs or anyone else's).
    • Liking MsPL does not mean "endorsing Microsoft" wholeheartedly.
    • I have been asking for collaboration between Microsoft and the open source community for years, and advocating it with their employees and representatives at every turn in the past. Most recently, before I even knew about the Microsoft/Novell agreement am on the record calling for such a thing.

    I think that we have reached a sorry state when our community has to resort to half-truths pandering with fear, uncertainty and doubt. The very actions that people criticize Microsoft for. We can do better than that.

    Posted on 31 Jul 2007


    Support the Troops: Conditional Blogger Style

    by Miguel de Icaza

    Last week or so an article that described some ugly scenes in Iraq was published, the article was written by an American soldier in Iraq under a pseudonym.

    Since the picture painted was not very rosy, war supporters set out to discredit the article and its author. The author eventually had to come out and now the war supporters are launching a campaign to punish him.

    Blogger Jon Swift has collected the twisted logic and hillarious conclusions in a phenomenal post.

    You could not ask for a better radiography of cognitive dissonance.

    On the Topic of Serving in Iraq, oh, and the anti-Christ.

    Continuing with the previous topic, Max Blumenthal from the Nation has a great video: Generation Chickenhawk: The Unauthorized College Republican National Convention Tour:

    Max goes on to ask College Republicans why they have not enlisted to serve in Iraq, the answers are pure gold.

    If you liked that video, check also his new "Rapture Ready" video as it contradicts the common notion that the antichrist is Rosemary's baby:

    Posted on 28 Jul 2007


    Microsoft and Open Source

    by Miguel de Icaza

    These are good news, as reported on the O'Reilly Radar by Tim:

    In his keynote at OSCON, Microsoft General Manager of Platform Strategy Bill Hilf announced that Microsoft is submitting its shared source licenses to the Open Source Initiative. This is a huge, long-awaited move. It will be earthshaking for both Microsoft and for the open source community if the licenses are in fact certified as open source licenses. Microsoft has been releasing a lot of software as shared source (nearly 650 projects, according to Bill). If this is suddenly certified as true open source software, it will be a lot harder to draw a bright line between Microsoft and the open source community.

    Bill also announced that Microsoft has created a new top level link at microsoft.com, microsoft.com/opensource to bring together in one place all Microsoft's open source efforts. Bill sees this as the culmination of a long process of making open source a legitimate part of Microsoft's strategy. Open source has survived Microsoft's process of "software darwinism" and is becoming an ever more important part of its thinking.

    Bill understands open source.

    As I said last year on Microsoft's Port25, in my opinion, part of the reaction that Microsoft had towards Linux and open source had its roots in the way it was portrayed as a Microsoft killer. Anything that is portrayed as a killer of something will be less than welcome. Or like they say out there, you attract more bees with honey than with vinegar.

    Open sourcing software is a great step for Microsoft. I hope that they continue on this path of openness, and I hope that they will have a good experience with external collaborations with the software projects that they are opening up to external contributors.

    In the last year Microsoft moved away from merely opening up source code under open source terms to actually creating communities that would co-develop components with them. This is the case with their AjaxToolkit for ASP.NET AJAX (Mono-plug: soon in a Linux server near you).

    With IronRuby and its class libraries they will be taking new steps again. These will be the the first projects in which the software is not only open source, but where they will taking contributions back into it.

    Update: In the comments to the piece, Tim has some interesting things to say, and I agree with them:

    Ultimately, I believe this is significant because I believe that Microsoft realizes that they are on the losing side of history. Year by year, they have come closer to recognizing that the old models are dead, and that new ones need to be explored.

    This doesn't mean that all their software will be open source. But I don't see people abusing Chris DiBona about Google's open source program because all of Google's software isn't open source either. And IBM gets lots of love for eclipse and other open source moves without being castigated for all the things they (still) do on the other side of the ledger.

    You guys seem like the Shiites and Sunni in Iraq. No, the other side isn't to be trusted. But the consequence of not trusting, and escalating hostilities, is far worse than exploring what trust is offered, and building on it.

    If you care about Microsoft becoming more free and open, support the people at Microsoft who are trying to bring them along.

    This other piece is right on track:

    Demonizing the other side (in business or in war) is an easy way of actually ignoring the actual facts, after all its easy to say that the devil is bad:

    Dalibor -- my reference to "you guys" was specifically to all the people saying Microsoft is innately bad. All I can say is that if you believe that, you've never spent much time with folks at Microsoft. It's easy to demonize someone you don't know. Harder when you actually talk with them. There are some people there (including the top leadership) that I don't trust, but there are a lot of people trying to make positive change. Help them, don't hate them.

    As to the "losing side of history", my thinking is shaped profoundly by my study of the history of the IBM PC, which broke IBM's old stranglehold on the industry via proprietary hardware. That change didn't make IBM go away, but they had to change to survive, and now everyone thinks they are a good guy.

    I predict a very similar outcome for Microsoft. Free and open source software have changed the world, but not in the way we expected. It doesn't mean that "free" triumphs, just that the locus of proprietary value capture and protection changes from software to something else, just as it previously changed from hardware to software.

    I've written about these ideas at length in The Open Source Paradigm Shift and What is Web 2.0, and events since I wrote those pieces have only confirmed my view.

    I completely agree that Microsoft is participating where they find it useful ... but so is IBM, and Sun, and Google, and Oracle, and even Red Hat, Canonical, MySQL and other "open source" companies. It's never just black and white.

    I could not agree more.

    Posted on 27 Jul 2007


    Getting Your Priorities Right

    by Miguel de Icaza

    Republican candidates have been busy crying wolf in the past set of presidential debates. They have gotten their share of softball question on the issue ("if a bomb is about to go off and kill a million people and you had a chance to stop it, would you?") but they barely discuss anything that actually matters.

    From St Pete for Peace Fact Sheets there is this interesting chart on the real threats to America:

    Click on the previous link for the sources.

    More fact sheets here.

    Posted on 27 Jul 2007


    Olive Oil

    by Miguel de Icaza

    I like Olive oil so much, that I would be willing to pay good dollars to whoever manufactures an Olive-oil based soda product.

    Posted on 23 Jul 2007


    IronRuby released

    by Miguel de Icaza

    John Lam at Microsoft has released the first preview of IronRuby: a Ruby compiler that targets the .NET framework (licensed under the MS-Pl license, which is by all intents and purposes an open source license).

    The source code is here. Seo Sanghyeon has already put together a kit to build and run it on Linux with Mono. There is one downside, you will need Mono from SVN, as you need the same fixes for Mono that were required to run IronPython 2.0 and Dynamic Language Runtime (DLR).

    Congratulations to the DLR team at Microsoft for this release. They have also been working towards opening up the development process to external contributors:

    We're also happy to announce that we will be accepting source code contributions into the IronRuby libraries. Right now we have a lot of logistical work that we still need to do, but we fully intend on getting IronRuby onto Rubyforge by the end of August.

    Some of you may be wondering why we are only accepting contributions into the libraries and not the entire compiler. It's because IronRuby is built on top of the Dynamic Language Runtime (DLR), and the public interfaces to the DLR are not complete at this time. Since the DLR will ship as part of the CLR in the future, we cannot accept contributions into the IronRuby compiler, at least initially. However, once the DLR matures and reaches 1.0 status with fully supported public interfaces, we will fully open up all parts of the IronRuby project for external contributions.

    It is worth noting that the future home of IronRuby wont be CodePlex but RubyForge, John said:

    I (and I'll use I here since I fully take responsibility for this decision if it doesn't work) felt that more folks contributing to open source projects were comfortable with Subversion than with TFS. I wanted to make it as easy as possible for folks to contribute, so Rubyforge was the natural choice here.

    This is a probably a good time to point to Joel Reed's work. He wrote an open source client for accessing TFS systems (CodePlex or your own company's server) from Unix systems running Mono.

    Value Types and Null, the mistery continues

    You will notice a patch in Seo's distribution. This patch is necessary because until today I had refused to implement this broken behavior of CSC 2.0 in Mono's C# compiler.

    Today I finally gave up the resistance and implemented it in version 82517. But I must point out that so far there is no good explanation as to why this broken behavior is present in CSC in the first place. A few months ago I posted the question on this blog and we had a lively discussion but never found a satisfactory answer to this behavior.

    Posted on 23 Jul 2007


    Weekend Videos

    by Miguel de Icaza

    "Feel Good", by Nick Anderson, my favorite part: the Dick Chenney rap sequence.

    video.

    The United States, Israel and the Jewish Community.

    Jeff Halper on is the director of the executive director of the Israeli Committee Against House Demolitions. This is a video from his talk in Portland, Oregon. Produced by PDCJustice.org.

    He is a superb speaker. In particular he touches on a few points that we discussed a few weeks ago on the comments section.

    Watch it here.

    The presentation is 1:10 or so, and there is about 50 minutes of questions and answers at the end.

    It will save us all time if you watch the two hours before you post on the comments section.

    Posted on 23 Jul 2007


    Hack Week reviewed in Ars Technica

    by Miguel de Icaza

    Ryan Paul interviews various folks from the Novell HackWeek in this article.

    Posted on 19 Jul 2007


    PyroDesktop

    by Miguel de Icaza

    Our own Chris Toshok (Moonlight, Winforms, ASP.NET, Japhar, Hungry hacker) and Alex Graveley (Tomboy, VMware, libSoup) have cooked a pretty interesting desktop environment based on Firefox. It is a combination of window manager, compositing manager built on top of Firefox.

    Check their PyroDesktop project.

    Posted on 18 Jul 2007


    Google Gears and Silverlight

    by Miguel de Icaza

    Nice post on using Silverlight with Google Gears.

    Posted on 13 Jul 2007


    ASP.NET AJAX in Mono/Grasshopper

    by Miguel de Icaza

    Noam Lampert posted an update on the ongoing efforts at Mainsoft to implement the ASP.NET AJAX APIs for Grasshopper and Mono.

    Mono's implementation of ASP.NET AJAX is limited to the server components. Luckily the client-side library is effectively open source under the terms of the Ms-PL license (same one used by IronPython, DLR; it lacks the OSI stamp of approval, but it is effectively a FLOSS license).

    A bunch of AJAX-enabled ASP.NET components are also being developed in an open source way. You can check out Microsoft's sampler here.

    In other news, Mainsoft has also launched http://blog.mainsoft.com/blog, an aggregator for all-things Grasshopper, .NET on Java and Mono. Check it out!

    Posted on 13 Jul 2007


    Go Michael Moore Go!

    by Miguel de Icaza

    Magnificent interview with Michael Moore on CNN.

    That was one solid intervention.

    Stay tuned until the end, when Lou Dobbs has a chance to show his rethorical skills.

    Posted on 10 Jul 2007


    Life Imitates The Onion

    by Miguel de Icaza

    Life Imitates The Onion, as seen on reddit.com:

    Posted on 09 Jul 2007


    Runtime Sizes

    by Miguel de Icaza

    Mirco Bauer maintains the Mono packages for Debian Linux. Today a minimal install of Mono is quite small.

    He has posted some details here.

    A minimal Mono installation (just the basic runtime) is 2.4M for download and takes 7M on disk.

    Beautiful.

    What was surprising is that a minimal Python install is larger (3.9M download, 13.4M intalled).

    Not surprising is that Sun's Java (JRE) is 34.5M and uses 95.2M on disk. But this is just because its an all-or-nothing installation due to licensing. A full Mono installation is 27M and takes up 78M on disk (this is with symbols stripped, with symbols that goes to 32.7M for download and 107M after unpacking).

    Mono is somewhere in between the JRE and the JDK. Our "complete" package includes the runtime, plus our development kit but does not include documentation, that is separate.

    If we pull in Gnome#, Gtk# and the Mono documentation browser and XSP (with all of their deps) it goes up to 84M for download and 250M installed.

    Mirco has some stats for the various other open source Java VMs as well.

    Silverlight/Moonlight size

    Just looking at the native libraries that we will have to ship with Moonlight/Silverlight I estimate that we will need about 7 megs of disk space plus any other native libraries that we might end up linking statically (Cairo most likely) plus the Dynamic Language Runtime + compilers when they are ready (another 3-4 megs).

    Compressed it will likely come down to 4-5 megs, so our Silverlight implementation for Linux will likely be in the 8M-9M range for the download.

    Rumors

    We know that some products like OTee's Unity ship a stripped down version of Mono for the generated games they produce.

    A friend mentioned that Cisco's DVD documentation ships with Mono and Mono's ASP.NET server (Sadly, Windows-only). Can anyone confirm this?

    Posted on 08 Jul 2007


    Font Rasterization -- from Maxim

    by Miguel de Icaza

    Maxim ---of AntiGrain fame--- has written a fantastic analysis of the various text rendering systems used in Windows, MacOS and Linux and proposes some solutions to this problem: Texts Rasterization Exposures -- An attempt to improve text rasterization algorithms using only publicly available information:

    Joel Spolsky in his article "Font smoothing, anti-aliasing, and sub-pixel rendering" [1] compares Microsoft and Apple ways of text rendering and explains why windows people don't like Safari. Text in Safari looks too blurry and that must be why. I want to go further and sum up my experience and observations about it. I'm not an expert in digital typography, but I "have something to say". At least, some ideas may be useful for the GNU/Linux community.

    Posted on 08 Jul 2007


    Basic Tuning of Mono's ASP.NET

    by Miguel de Icaza

    Someone was asking the other day about raw PHP vs ASP.NET performance. I do not remember on which forum this was, but I found on JuanCri's blog a couple of simple tips that can improve the performance of your apps:

    • Disable ViewState on forms that do not require it (put EnableViewState="False"). You can set this on a per-control basis for a page, or for all the pages.
    • Use the output cache on pages that load data from databases.. From JuanCri's blog, set the <% @OutputCache Duration="60" VaryByParam="None" %>.

    Posted on 08 Jul 2007


    The Pentagon Papers: How They Were Released

    by Miguel de Icaza

    Mike Gravel tells the story on how he released the Pentagon Papers and his involvement in stopping the draft. He is a great story teller. His speech is also quite funny.

    The entire episode from Democracy Now is available here. The Real Player stream is here.

    I loved the last bit about how they managed to publish the papers. When they were running out of sources and it seemed like MIT Press would not publish it, Beacon Press decided to publish them: they had the money and were willing to go ahead with it.

    The Gravel bit (alone) here:

    Posted on 04 Jul 2007


    Mono Meets Facebook

    by Miguel de Icaza

    R Tyler describes how you can integrate Mono applications in Facebook.

    His solution uses Mono's ASP.NET, Mono's Facebook-Sharp and he creates a sample application: Weather#.

    Weather# combines Mono, with SOAP webservices to retrieve the weather information and render information specific to your profile.

    Check out his tutorial. It covers how to use MonoDevelop to create ASP.NET applications.

    Posted on 04 Jul 2007


    Strong Words

    by Miguel de Icaza

    Someone uses better, accurate, and stronger words to succinctly describe Bush's presidential pardon from yesterday.

    Posted on 03 Jul 2007


    No Criminal Left Behind

    by Miguel de Icaza

    President Bush commuted Libby's sentence on the case of ratting out an undercover CIA agent.

    We got our bread and circus when they put Paris Hilton in jail. But when it comes to the real crooks, doing real damage, those either walk free or Congress is too weak to take their jobs away.

    If this was a public corporation, stockholders would have fired the board and the CEO a long time ago and pressed charges.

    Posted on 02 Jul 2007


    Porting your ASP.NET 2.x Application to Linux

    by Miguel de Icaza

    Marek Habersack has written a Guide on Porting ASP.NET Applications to Linux using Mono. This is a complement to Jonathan Pobst's Porting Winforms Applications to Linux using Mono.

    AjaxWidgets

    In addition to the two Guides above, the Thomas from Frost Innovations (the makers of Ajaxwidgets has written a tutorial on how he run ASP.NET 2.0 apps on Linux with Mono.

    AjaxWidgets announced 100% Mono-compatible Controls

    The new version of Gaia Ajax Widgets now is shipping with full support for Mono ASP.NET 2.0.

    If you were considering an ASP.NET control library for use in a cross-platform fashion, these guys offer a very nice suite of controls, and they will support you in Mono and Linux.

    In addition to the controls, they provide MonoDevelop solution files and ready-to-run components. In addition to supporting the "big browsers", AjaxWidgets works just fine with Opera.

    If you are an open source project, you can use those controls for free. For commercial projects they offer a commercial version that is very reasonably priced.

    Posted on 02 Jul 2007


    Google and HMOs

    by Miguel de Icaza

    A couple of weeks ago, I was reading reddit.com when I found a link to the Michael Moore new movie Sicko playing at video.google.com. Moore had made some comments at the time about his position on the leaked movie. When I saw this on reddit I thought it was a joke, but there it was in video.google.com.

    So I watched the entire thing at the time, I was up until 4am in the morning watching it.

    Tonight am going with Laura and some friends that did not see it to watch it again at the theater.

    A Handful of Events

    For years I have been incredibly annoyed at the power that special interest groups have over policy making in the United States. It all begun by reading Howard Zinn, Noam Chomsky and the progressive sites.

    Around that time there were a series of events happening, but I was too busy with the Moonlight hack-a-thon.

    Luis Villa posted a link to Larry Lessig post where he has decided to move his work and activism in a different direction, a much needed one: . You should read the whole thing, but here are some bits that I found interesting:

    If you've been reading these pages recently, you'll know my allergy to that word. But this friend's use of the term not to condemn me, but rather as play, made me recognize just how general this corruption is. Of course he would expect I was in the pay of those whose interests I advanced. Why else would I advance them? Both he and I were in a business in which such shilling was the norm. It was totally reasonable to thus expect that money explained my desire to argue with him about public policy.

    I don't want to be a part of that business. And more importantly, I don't want this kind of business to be a part of public policy making. We've all been whining about the "corruption" of government forever. We all should be whining about the corruption of professions too. But rather than whining, I want to work on this problem that I've come to believe is the most important problem in making government work.

    And so as I said at the top (in my "bottom line"), I have decided to shift my academic work, and soon, my activism, away from the issues that have consumed me for the last 10 years, towards a new set of issues: Namely, these. "Corruption" as I've defined it elsewhere will be the focus of my work. For at least the next 10 years, it is the problem I will try to help solve.

    The other thing that bothered me at the time was that one of the Supreme Court Justices in the United States became an apologist for torture:

    The conservative jurist stuck up for Agent Bauer, arguing that fictional or not, federal agents require latitude in times of great crisis. "Jack Bauer saved Los Angeles. ... He saved hundreds of thousands of lives," Judge Scalia said. Then, recalling Season 2, where the agent's rough interrogation tactics saved California from a terrorist nuke, the Supreme Court judge etched a line in the sand. [...]

    So there you have it, America making sound legal decisions based on the hit-show 24.

    Google and HMOs

    The US is a country that has grown to believe that two differing points of view should be given "equal time" to portray their position regardless of the value of the arguments.

    Except things are not fair and not equal in a country where you get the best democracy that money can buy.

    So Michael Moore presents a film in 2007 after 30 years of HMO propaganda and will be up against a multi-billion dollar industry that will use every tool at their disposal to keep the profits rolling, and the health service at the lowest possible level.

    And now we have Google's Health Advertising team pitching their services to a rotten industry (from Boingboing).

    They are willing to help this industry catapult the propaganda:

    Many of our clients face these issues; companies come to us hoping we can help them better manage their reputations through "Get the Facts" or issue management campaigns. Your brand or corporate site may already have these informational assets, but can users easily find them?

    We can place text ads, video ads, and rich media ads in paid search results or in relevant websites within our ever-expanding content network. Whatever the problem, Google can act as a platform for educating the public and promoting your message. We help you connect your company’s assets while helping users find the information they seek.

    If you're interested in learning more about issue management campaigns or about how we can help your company better connect its assets online, email us. We'd love to hear from you! Setting up these campaigns is easy and we're happy to share best practices.

    Ah, "Get The Facts" campaigns to better manager company reputations. Where have I heard that one before?.

    Sure, Google could keep selling their ads and do Get the Facts campaigns out, but actively reaching out to this rotten industry saddens me.

    Update: An official response from Google.

    Posted on 30 Jun 2007


    Jonathan Pobst's: Banshee Integration with Nike+ Accessory

    by Miguel de Icaza

    For Hack Week, Jonathan Pobst did a pretty cool hack: he added support for Banshee to work with the Nike+ Accessory on iPods.

    From his blog:

    I decided that part of my Hack Week would be to venture from my "happy place" of Winforms in Visual Studio and write something in GTK# using MonoDevelop. I chose to write a plugin for Banshee that allows it to sync with and display files generated by taking your iPod for a run with the Nike+ accessory. Oh, and using Moonlight, just because it seemed fashionable.

    Posted on 29 Jun 2007


    Hack Week: Ankit

    by Miguel de Icaza

    Ankit from the Mono/MonoDevelop team had a fantastic idea: embedding VIM into MonoDevelop.

    Watch the video:

    He shows:

    • Code completion/intellisense with VIM/MonoDevelop.
    • Class/method combo boxes for navigation.
    • Full duplex communication between the two of them.

    Posted on 29 Jun 2007


    Moonlight Desklets Update

    by Miguel de Icaza

    Everaldo has a nice update on the result from the HackWeek on the Moonlight/Gtk#-based desklets project.

    Check Everaldo's blog for more details.

    Posted on 29 Jun 2007


    Valgrind Support for Mono

    by Miguel de Icaza

    During hack week, I took an afternoon to add Valgrind support for Mono symbols. It was kind of a hackternoon thing.

    Mono works great with Valgrind, but when there is an error in unmanaged code stack traces only contain symbols from the native libraries and do not contain information from the JITed code. During the Moonlight hacking sprint we used Valgrind extensively for finding errors in our code and it was becoming annoying to manually lookup addresses from stack traces and match them up with Mono's -v output. Today the output looks like this:

    
    ==22441== Mismatched free() / delete / delete []
    ==22441==    at 0x4020E26: operator delete(void*) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
    ==22441==    by 0x5EB49FA: Value::FreeValue() (value.cpp:261)
    ==22441==    by 0x5EB4AAC: value_free_value (value.cpp:275)
    ==22441==    by 0x66E5E60: ???
    ==22441==    by 0x66E4587: ???
    ==22441==    by 0x66E3FF1: ???
    ==22441==    by 0x66E3DE5: ???
    ==22441==    by 0x66E3D35: ???
    ==22441==    by 0x809D294: mono_runtime_class_init (object.c:329)
    ==22441==    by 0x815920C: mono_jit_compile_method (mini.c:10905)
    ==22441==    by 0x81595C4: mono_jit_runtime_invoke (mini.c:11081)
    ==22441==    by 0x809FD34: mono_runtime_invoke_array (object.c:2616)
    
    	

    This app is the culrpit for the above stacktrace. A developer first reaction to the "???" text is to panic.
    Today we lower the panic alert level.

    At the beginning of the hackternoon, I did not know it, but Nat had written a script that achieved similar results:

    I added a new client API to Valgrind that JIT compilers can use to register generated code with Valgrind so that the actual method name is displayed on the stack traces, the new output looks like this for the same error:

    ==22478== Mismatched free() / delete / delete []
    ==22478==    at 0x4020E26: operator delete(void*) (vg_replace_malloc.c:244)
    ==22478==    by 0x5EB49FA: Value::FreeValue() (value.cpp:261)
    ==22478==    by 0x5EB4AAC: value_free_value (value.cpp:275)
    ==22478==    by 0x66E5E60: (wrapper managed-to-native) Mono.NativeMethods:value_free_value (Mono.Value&)
    ==22478==    by 0x66E4587: System.Windows.DependencyObject:SetValue (System.Windows.DependencyProperty,System.Windows.Media.Color)
    ==22478==    by 0x66E3FF1: System.Windows.Media.SolidColorBrush:.ctor (System.Windows.Media.Color)
    ==22478==    by 0x66E3DE5: Desklets.Monitor:.cctor ()
    ==22478==    by 0x66E3D35: (wrapper runtime-invoke) Desklets.Monitor:runtime_invoke_void (object,intptr,intptr,intptr)
    ==22478==    by 0x809D294: mono_runtime_class_init (object.c:329)
    ==22478==    by 0x815920C: mono_jit_compile_method (mini.c:10905)
    ==22478==    by 0x81595C4: mono_jit_runtime_invoke (mini.c:11081)
    ==22478==    by 0x809FD34: mono_runtime_invoke_array (object.c:2616)
    	

    The patch is here.

    Support your Valgrind/Mono addiction by voting my idea up.

    Posted on 29 Jun 2007


    Hack Week: Moonlight Desklets.

    by Miguel de Icaza

    The folks over at #desklets have been making some progress on their hack for week.

    Andreia wrote an SVG to XAML conversion tool that is very handy to import artwork from tools like Inkscape into XAML.

    Everaldo did a screencast of a few desklets that the folks have been working on during Hack Week:

    YouTube Video:

    Gtk#/Moonlight Desklets in action

    Some screenshots, because they look nicer than the YouTube video:

    Screenshot

    These are of course not as advanced as other desklets systems, this was written only in a couple of days, but we have a few interesting things in them that we think are interesting concepts in general:

    • A new launch tool called "mopen" that can launch either XAML files directly, or can launch applications that are contained in a directory (directory/default.xaml, directory/default.exe and eventually directory/default.XX where XX is an extension for a scripting language supported by Mono: Boo, IronPython, Javascript, etc).
    • mopen can launch multiple applications into the same Mono virtual machine and isolate each desklet from each other using Application Domains. This feature is important to us because it means that only one Mono Virtual Machine, Gtk# and Moonlight are loaded at a given time to run multiple applications at the same time.
      The way we did this was by adding a "--host" command line option. You can instruct your desklets (or in fact any program that can be opened with mopen) to go into a specific container. You would for example load all your stable desklets into one VM:
      	$ mopen --host desklets clock
      	$ mopen --host desklets calendar
      	$ mopen --host desklets flickr
      	$ mopen --host desklets picasa
      		

      But keep your development desklets into a separate VM to prevent bringing everything down:
      	$ mopen --host devel stockapplet
      		
    • Security System: today deskltes run without a security sandbox. We will be working on the Silverlight security system for Mono. Once that is implemented users will be able to run untrusted code into the sandboxed environment.
      The new Silverlight security system is a lot easier to understand than the old CAS, so we are looking forward to implement this (it is also a requirement for the Moonlight browser plugin).
    • Mono: we get to leverage our favorite CLI-based languages (C#, Boo, IronPython, Nemerle or any other language that targets the CLI) and we get to leverage the CLI APIs.

    Another one

    Desklets are of course not a new thing, Google and Yahoo both ship desklet systems. OSX and Vista have widgets and gadgets as well. Gnome has gDesklets, KDE has SuperKaramba.

    This is merely our take on the challenge as part of Novell's hack week and it is also a good way of exercising our Moonlight engine, the Gtk# binding, Mono and try to learn something new in the process.

    Marek's weather applet

    If you have not seen them, you should check out what other folks at Novell are doing during their hack week. There are some videos here. Today it seems to be strongly slanted towards Evolution and panel applets.

    Posted on 28 Jun 2007


    Desklets and Getting Started with XAML

    by Miguel de Icaza

    Jackson has written a fantastic tutorial on his blog (and I think it should be moved to the Mono web site as a Guide). check it out: A Mono Developers Guide To Writing XAML.

    For those of you participating in the #desklets effort, the above is a good getting started guide on XAML.

    Posted on 26 Jun 2007


    HackWeek: Moonlight-based Desklets for the Desktop

    by Miguel de Icaza

    I have yet to choose what I will do for Hackweek (likely do tech support for those trying to use Moonlight to spice up their desktop apps), but I helped a little bit on the Desklets project that Everaldo initiated:

    As you can see, although the clock is transparent it is still showing the title bar, am not sure what is the right way these days of removing it. I do not think its using a POPUP window, is it?

    Some folks from the Moonlight group (and other Mono hackers) are building a new desklet infrastructure for the desktop. The idea is here: Implement Desklets Using Moonlight and some sample code is available already in moon/desklets/lameclock as a reference in our Anonymous SVN repository.

    You will need to install Moonlight to get it going.

    You can watch a video of the new tool "mopen" launching the clock desklet that I hacked in a few minutes. The animation does a double fade: fade from clock to config and from config to clock. We could use more complex animations, using the Storyboard and Animation features, but this is what I cooked in 10 minutes:

    Posted on 25 Jun 2007


    Video Capture of Moonlight in Action

    by Miguel de Icaza

    I finally managed to do video capture, I ended up using ffmpeg for generating the file.

    This shows the Surface Silverlight application running in Linux with Moonlight. It also shows two modified versions of it:

    • The first replaces pictures with bezier paths (the Mono logo) and a "live" clock photo.
    • The second one introduces a video playing live as part of the surface.

    Watch the video here.

    Posted on 25 Jun 2007


    Hack Week Begins

    by Miguel de Icaza

    The next week is Hack Week at Novell, where all engineers in the Open Source group get to work on their own pet ideas during their work hours.

    There is an idea database here: http://idea.opensuse.org.

    Posted on 25 Jun 2007


    Concert Weekend

    by Miguel de Icaza

    Nice week for concerts: Music Party in Paris on the 21st, Cesaria Evora in Boston on Saturday and Manu Chao today.

    Posted on 24 Jun 2007


    Banshee Media Player Goes to Windows

    by Miguel de Icaza

    Scott Peterson posts a screenshot of his progress, Banshee now starts up on Windows with Mono/Gtk# (there is a buglet somewhere that prevents it from running with the .NET Framework):

    If you want to track other Summer of Code projects, check our weekly status reports here

    Posted on 24 Jun 2007


    Moonlight Demo/Interview in French

    by Miguel de Icaza

    Didier Girard met me at my hotel on Friday and we did a quick interview with a demo, which you can see on video (since I have yet to figure out how to do screen captures myself).

    In the demo you can see Moonlight and the Gtk# binding to Moonlight in action as well as various assorted samples.

    See it here.

    Posted on 24 Jun 2007


    Paris Dinner

    by Miguel de Icaza

    Jetlag caused me to not get any good sleep in my trip to Paris. On Friday I was woken up at 3:30pm by the hotel staff asking whether they could clean the room. Oops. I overslept.

    That afternoon I met with Mono contributor Olivier Dufour (Winforms GUI for Bitsharp/MonoTorrent, and more recently the author of our new Javascript engine for Moonlight) and with Fabrice Bellard.

    I am a fan of Fabrice Bellard since he wrote lzexe on the DOS days. He later wrote the smallest C compiler, then Tiny C Compiler, QEMU, FFMPEG and many other wonderful hacks.

    Olivier blogged our dinner with Guy Lunardi from Novell here.

    It was a pleasure to interrogate them about their hacking projects and to get the history behind Fabrice's projects.

    Posted on 23 Jun 2007


    Mono Sightings

    by Miguel de Icaza

    If you are curious about the state of the Mono Debugger, check out Martin Baulig's detailed blog on the work he has been doing to improve the debugger and add support for AppDomains (ie, debugging ASP.NET and Silverlight applications).

    Scott Peterson got Banshee launching on Windows, see his report.

    The Google Summer of Code students have been doing a great job, see their status reports here.

    And finally, a nice article from Ars Technica on the Moonlight hack-a-thon.

    Posted on 22 Jun 2007


    Moonlight hack-a-thon

    by Miguel de Icaza

    Some member of the hack-a-thon team have blogged about this, here are some blog entries:

    My good friend Joshua at Microsoft sets the record straight: we did not know anything about Silverlight 1.1 before its announcement. And thanks to Joshua for the nice blog message.

    Posted on 22 Jun 2007


    Implementing Silverlight in 21 Days

    by Miguel de Icaza

    The past 21 days have been some of the most intense hacking days that I have ever had and the same goes for my team that worked 12 to 16 hours per day every single day --including weekends-- to implement Silverlight for Linux in record time. We call this effort Moonlight.

    Needless to say, we believe that Silverlight is a fantastic development platform, and its .NET-based version is incredibly interesting and as Linux/Unix users we wanted to both get access to content produced with it and to use Linux as our developer platform for Silverlight-powered web sites.

    Am now on a flight to Paris to show the results of 20 days of intense work that the team has implemented. It is hard to contribute to the effort sitting on a plane when the tree is changing every 10-20 minutes.

    There is technically still some time left to improve what we can show.

    You can see our screenshot-log to see our progress or the Moonlight Project Planning Page.

    Testing Silverlight on Linux

    At this point we do not have a packaged release of Silverlight for Linux and we still have to sort out a few things that would have to be done in order to ship a ready-to-use plugin.

    But if you are curious or want to contribute to the effort check our page for information on downloading, compiling and getting started with the project.

    Demo of Silverlight Airlines Demo

    Progress on the Silverlight Airlines, June 20th.

    How the Hackathon got Started

    At the Mix conference this year, after the open source panel, I had a chance to meet with Marc Jalabert from Microsoft France who invited me to participate in a re-play of the Mix event in Vegas, this time in Paris.

    Although Marc had sent me an email on May 9th, I did not notice his email until he pinged me back again on the 28th of May and got his confirmation on the 31st to participate at Mix in Paris. On the 31st he suggested:

    We suggest you speak during the conference keynote and show a preview of moonlight if you already have something to show.

    But on the 31st, other than having learned about Silverlight, explored how to decode video, experiment a little with video and started planning for an implementation we had nothing to show. Nothing am telling you. Also, May was a busy month for me HR-wise as we were hiring new developers to join the Mono team.

    By 1pm on Thursday the 31st, I posted this to our internal Novell Mono mailing list (edited to remove all the embarrassing parts) calling for a hack-a-thon:

      Hello folks,
      
          The organizers of ReMix 07 in Paris (ReMix is the repeat of the
      Microsoft Mix conference) have offered us a 10 minute slot to talk
      about Mono and demo whatever it is that we have done with Mono's
      Silverlight.
      
          There are two problems: other than a video (rendered in blue,
      instead of natural colors) and a rectangle that moves, we do not have
      much.
      
          The second problem is that this event is in June 21st so that leaves
      very little time to get things in shape.
      
          Now, it might very well be the case that we should not show anything
      and we should not rush things out, but it is also a major opportunity,
      and I think it would be foolish not to take advantage of this.
      
          I do not think we need to demo things embedded in the browser, but
      it would be useful to demo something loaded from a XAML file (video,
      rectangles, bezier paths, and some limited maybe C# controlled
      animation, to avoid doing the full animation framework).   
      
          Issues:
      
              * We have a XAML parser written in C# but I have not checked on
                its state nor checked whether it can do more than just the
                basics (like doing data type conversion).
      
              * Microsoft suggested (and made a good point for it) that the 
                XAML parser be implemented in native code (as 99% of the 
                objects created by XAML are never manipulated by managed
                code).
      
                So we will end up with a C-based XAML parser, whether it is 
                a good idea to do this now, and not reuse the managed one
                is open to discussion.
      
              * Other than the rectangle (that is currently not even
                rendering) and the video (without audio) I got nothing.
      
              * We would need to bind the C implementation to C#, and I think
                that we can use the same model that Mike used for Gtk#.
      
                Not gapi, but the overall model where we mirror the class
                hierarchy in C# that exists in C++ (in this case, the class
                is determined by C#, not by C++, but you get the idea).
      
              * I have decided to use Cairo for now (David convinced me on 
                the grounds of hardware acceleration).
      
          We would need a dedicated hack team to drop whatever it is that they
      are doing for this noble cause.    The question is: who wants to
      participate in an intense two-week hackathon to make it happen?
      
          Obviously, not everyone can work on this at the same time, and
      having too many people would make things difficult to coordinate.   But
      who is interested?
      
      Miguel.
      	
    

    We modified the Silverlight Surface demo to show a live clock and the Mono Logo.

    The Team

    The team was assembled quickly in response to the email, a limited group from the Mono team to avoid having too many coordination conflicts.

    Sebastien, our resident security expert and also maintainer of our GDI+ implementation was the first to reply an hour after my posting. Sebastien would in the next few days be in charge of implementing most of the rendering primitives:

      Me. I haven't looked SL much outside the new security model (and I have
      the feeling this isn't what you have in mind for the demonstration ;-)
      but I have heard about that Cairo-thing.
    

    Jackson who in the past worked on our IL assembler and has been working for a few years on our managed Windows.Forms implementation and been maintaining the Tree and Text controls in Windows forms followed up with:

      I'm in.  Not exactly sure which area would be best for me to get started
      on, so if anyone has suggestions...otherwise I'll just pick something
      without the words text or tree in it.
            

    Jeff Stedfast, who had been working on MonoDevelop for the last couple of months and works with me in the Cambridge office followed up:

      I am down with the dope!
    
      count me in.
    	

    Jeff's first task would be to fix audio in the media player. He would eventually rewrite the video playback engine so we could provide Video brushes in all of its glory and implement the audio support.

    Some other people signed up on IRC, so I do not have their early sign up messages. By Sunday things started to get in shape team-wise. Some folks had started work already and became the de-facto maintainers of those pieces of code:

    • Jackson started work on the Expat-based XAML parser (we wanted to use a small XML parser so we can eventually make this a small download as well).
    • Everaldo started work on the browser plugin.

    At this point I got the feeling that "DependencyObject" and "DependencyProperty" might be playing a role more important than I had originally thought of. My initial reaction to DependencyObject was a mix between "ugh" and "its kind of clever". At the time it seemed important, but did not quite grasp its importance, I asked Rolf (of Visual Basic compiler in Visual Basic) fame to take over that.

    Eventually we would end up with a complete type system and I would describe if it wasn't for the fact that it is still changing and being refactored. Our "Value::Kind" enumeration just vanished and became part of our "Type" class in a valiant effort by Rolf to clean up the code base.

    Chris Toshok started work on timelines, which as a dependency required him to start work on transformations as well. He would later take over the entire animation, clock, and frame rendering infrastructure pieces.

    The rest of the Mono team was charged with keeping an eye on the rest of the project, continue to fix bugs and provide us with cover for our fresh project. They also would help when we ran into problems (like helping out with performance on Monday the 18th when we were things were not looking great for the Surface demo).

    In addition other Novell employees (Atsushi Enomoto, JB Evain, Marek Safar and Mark Probst) are indirectly working on Moonlight. JB by improving Cecil and his Linker (originally funded by the Google Summer of Code, thanks Google!) that would allow us to shrink our existing assemblies into assemblies that would be identical to the Silverlight ones.

    Atsushi has done most of our WCF platform, JSon serialization, Marek by implementing LINQ for our C# 3 compiler and its underlying infrastructure and Mark will be working on the JIT support for the new Silverlight security system and of course everyone else in the Mono team that continues to improve our runtime.

    Various members from the Mono community have also contributed to Moonlight directly or indirectly through their contributions to the Olive sub-project: Stephen, Joel, Olivier, Antonello, Marek and many more am missing.

    The Development: Early Choices

    My original plan was to write the low-level rendering engine in C and expose some sort of "scene" API that the managed world would control. With only a few primitives and a handful of operations on those primitives this idea sounded passable. The first code checked into the tree was written in C with the usual Gtk+-like programming pattern and a glib-like object system.

    The early tests of Silverlight content rendering side-by-side with SVG content.

    There were a few factors that altered the design: the advice from Scott Guthrie and Jason Zander during my trip to the Compiler Lab; David Reveman's [1] (the wizard behind Glitz, Xgl and Compiz) suggestion for moving the engine into the compositing manager and early changes to the class hierarchy that moved me away from C.

    I discussed with Scott Guthrie and Jason Zander that I wanted to do as much as possible in managed code, but they made an interesting observation. XAML content might have a few thousand objects defined here and there, but most applications would only care about a couple of high-level objects: a handful of buttons, handles, animations, and so forth but it was not worth having all of those objects in managed memory and for a graphics intensive system we wanted to minimize the number of managed to unmanaged transitions.

    The above being said, in 20 days we really had no time to implement two versions and compare whether these assumptions were correct or not.

    The other consideration to move away from C# to C at the time had to do with the early conversations with David Reveman who wanted to hardware accelerate this. The idea was to turn the Silverlight high-level operations into a scene description that we could transfer from the client applications directly onto the compositing manager (On modern X installations this is what actually puts the bits on the screen and what has enabled all those spicy effects like the rotating cube).

    The idea here is that the Silverlight client could detect if it was running under a compositing manager that offered rendering on the server and it would off-load all the rendering to the layer that can talk directly to the OpenGL hardware.

    As the hack-a-thon got started and I started introducing a C-virtual function here and a C-virtual function there, the second time I had to change the hierarchy I got annoyed, bit the bullet and moved the code to C++.

    We kept our use of C++ features to a bare minimum, it helped us in quite some cases and in some other cases we hated it. A proper rant about C++ will have to wait for another day.

    At least we stayed within the confines of the "C" family of languages.

    [1] David Reveman is one of the main wizards behind the graphics revolution going on in Linux: Glitz, Xgl and Compiz. He also happens to be based in the Cambridge office and host an international crowd at his fabulous apartment for drinks.

    Communications

    The project was originally organized over email but the day-to-day technical discussions moving into a private IRC channel.

    We did use email as a way of communicating with some of the developers on other time zones to either pass the baton and as a poor man's bug-tracking system.

    We did have a handful of one-to-one phone conversations when we started to merge things together: some components were independent of each other and due to the hacking intensity during this period.

    The crowd in America would go to sleep and Atsushi (Japan) and Rolf (Spain) would take over development for the next eight hours until we were able to catch up again: Everaldo in Sao Paolo, Sebastien in Canada, Jeff, Alan in Boston and later Jackson, and myself on the East Coast (due to our sleeping hours) and Chris on the West Coast.

    This is basically how we do things in the Mono team, except this time we were under tight pressure.

    The Documentation

    The .NET API to Silverlight shipped with very little in the form of documentation, but a lot of it could be inferred from the Silverlight 1.0 API and from the WPF API.

    The Silverlight .NET API is a flatter API than WPF is, but in some cases (the work that Chris did on animations) we would internally on the C++ side implement some of the classes that are found on the bigger brother of Silverlight as support infrastructure for it.

    The API reference that we used was what was available on the Visual Studio Object Browser (or Mono's equivalent command line tool: monop).

    Second Week

    Alan McGovern (of BitSharp fame) would be arriving to Boston a week after the hack-a-thon and we asked him to start work on a Silverlight-based designer and on bits of the C# API (exercising our C++ code).

    At this point the class hierarchy was no longer the "early" check-in that was more focused on "scenes" but instead mirrored the C# API one-to-one. Also, the type system had been in place and we had to come up with a mechanism to provide the equivalent to object identity and boxing to communicate between C# and C++. Keeping the two sets of typecodes in sync had become a source of frustration which lead to Chris and Rolf to write some sanity checking scripts and auto-generate one from the other.

    During this week the C# binding came to life. We had been doing all of our work in C++ and testing every new class by sticking the new object, brush, opacity setting, transformation, animation, storyboard and flag into a single demo. One ugly demo with CNN and the Colbert Report spinning on the background.

    The object system was designed with reference counts in mind, similar to The GObject system and also has the notion of "sunk" references. By the end of the week we had not really paid much attention to proper object management and ownership and problems started to creep up when we had to properly shutdown (say, when loading a second XAML file in the same Surface that might have been animated).

    Chris fixed the reference counting before the weekend and we closed the week. This is more or less what happened during the week, based on my partial log:

    June 14th:

    • Text renders (Jeff).
    • Radial gradients (Sebastien).
    • Attached properties are now handled by Canvas on changed children.
    • Implemented the downloader (Toshok).
    • Managed downloader (Miguel).
    • Mouse enter/leave events (Miguel).
    • It is possible to load images from the net
    • everaldo gets plugin using <object> embedding instead of the hack we were using.

    June 15th:

    • Inlines and Runs in text
    • Performance improvements
    • Mouse event routing to individual objects.
    • Loading of custom objects from XAML files using assemblies.
    • Everaldo gets plugin to change surfaces with javascript.
    • Sebastien starts work on porting the surface to Gtk# with Silverlight, just in case.

    June 16th

    • Loading of xaml dependency files (Miguel, Jackson).
    • Toshok optimizes rendering using bounding boxes.
    • Jackson hooks this dependency loader.
    • Jeff refactors the video engine to make it reusable.
    • C# bindings.

    June 17th

    • Jeff implement VideoBrush
    • Sebastien implements the various image properties, so that they render with the specified parameters.
    • Event system updated, Surface now gets events in the correct order.
    • Animation parser fixes, surface animations are now properly timed.
    • Everaldo added support for XAML content in HTML pages (referenced with '#' in a url).
    • Jackson got support for x:Class on XAML loading.

    June 18th:

    • Rolf implemented support for nullable types in the Moon typesystem and bindings to map Nullable in the C# code to our C++ Nullables.
    • Jeff implemented support for having VideoBrushes share a MediaElement.
    • Jeff implements brushes for Runs.
    • Paolo helps with the profiling of Moonlight's Surface and helps us get interaction smoother.
    • Chris and Sebsatien worked on tuning the performance for rendering on the screen.
    • Chris improves animations and screen refreshes, and sets up xlib-based image surfaces.
    • Jackson completes Path Data parsing, the underlying infrastructure was done by Sebsatien enabling the remaining samples from Sam Ruby's sample site to render.
    • Jackson and Sebastien implement the various segments that are missing for the Path rendering
    • Jackson implemented XAML support for <Run/>

    June 19th:

    • Javascript bridge to DependencyObjects works, the Javascript-controlled XAML Clock sample works now.
    • Collection iterators are implemented
    • Work on proper browser shutdown.
    • Many missing managed bindings are implemented by Rolf.

    Some stats

    In the last 20 days, the team:

    • Made 1,228 commits to the SVN repository (Everaldo was the lucky commiter for revision r80000 in our tree).
    • Wrote 24,373 lines of C++
    • Wrote 1,367 lines for the C# binding to Gtk# and the Mozilla C# host.
    • Wrote 13,207 lines of C# class libraries (not including the ongoing work on an open source Javascript compiler for the DLR from Olivier, nor including the fine work going on to implement LINQ, nor upgrade our C# compiler and runtime).

    What Worked And Did Not Work

    There are various factors that I think worked very well for the project:

    • The availability of Cairo.
    • Pango for doing text rendering.
    • The team background and familiarity with Mono, C#, C, C++, Gtk+, X11, Cairo and Pango.
    • Valgrind. Best C/C++ debugging tool in the world. When the bugs get nasty Valgrind was able to pinpoint the problems while we mixed Mozilla, Mono, Cairo and our runtime library.

    Some of the things that we need to sort out and have been problematic:

    • Cairo performance, we probably need to learn how to better employ Cairo, but there are some bottlenecks in there that are quite bad.
    • Alternatively we can mix rendering with Cairo with rendering with Antigrain (shared RGB buffer) or we could explore replacing Cairo with Antigrain.
    • Cairo does not offer options to render the end cap and start cap differently.
    • Cairo needs to offer an "alpha" enabled version for sources, not only "_set_source_rgba", but allow the "a" to exist for patterns and sources.
    • Pango text rendering with Cairo, two problems:
      • Rotated text looks terrible and even miss-aligned. Antigrain has a "round-off" mode that makes these rendering glitches go away, it would require us to port pango-cairo to use Agg though. See what it looks like.
      • Ligatures do not seem to be implemented, this is a problem for rendering arabic strings as it renders each character in its standalone form instead of the linked way. Pango does this, but we could not figure out why it does not work with Cairo (see image showing Linux spelled in Arabic).

    Future Directions

    I did not think we would be able to get this far in 21 days, I was hoping at most to have a simple XAML file loading and some animations going but the team really achieved an incredible project . I think we are still quite impressed that it could be done.

    But there is still much work left to do to before we can work flawlessly as a Silverlight plugin.

    There are still some important chunks of work missing: from ensuring that everything we have implemented is complete to completing large chunks of work that are still missing.

    One of the major areas that needs work is the C# to browser integration as well as improving the browser plugin which only recently started working. Some work has been done (all on our public SVN repository) but the pieces came in too late to be integrated.

    We have a to-do list for some of the remaining tasks.

    Future Directions: Gtk# Widget and the Gnome Desktop

    Although Silverlight is intended to be used in a web browser we think it would be very useful to Linux desktop programmers to have Silverlight reusable as a widget.

    We already have been talking to a few folks about how we can help them improve and spice up their desktop applications with Silverlight. Obvious choices are all the existing Gnome/Mono based applications, but ever since we got started on this, the idea of writing a "Media Center" sort of UI has been making the rounds.

    I have for years talked about my desire of having a "Flash on a Widget" widget for Gtk+, an idea that was not very popular back in the days when Flash was considered only a technology to do animations.

    We finally have such a widget and it can be scripted, hosted, embedded or extended from any ECMA CLI compliant language: all the traditional static languages for .NET as well as the new batch of dynamic languages that take advantage of the Dynamic Language Runtime (DLR).

    Larry of F-Spot fame for example has already prototyped F-Spot integration with the Surface demo:

    He also has this mode printing PDFs already.

    Future Directions: Media Codecs

    Currently we are using the fantastic ffmpeg video library but for the sake of distribution in some countries we might have to write a new video/audio backend.

    Novell will be requiring copyright assignments or contributions to be made under the MIT X11 license to Moonlight to ensure that we can ship this plugin with proprietary drivers if necessary (and also to relicense Moonlight for embedded system users).

    Future Directions: Silverlight Designer

    We will be working on a simple designer for Silverlight written in Silverlight itself. We hope to achieve:

    • Allowing Linux users to develop rich user experiences in Linux without having to learn XAML by memory or requiring a Windows machine with Blend to design UIs.
    • To integrate this directly into our MonoDevelop IDE so people can create web sites using Silverlight (Michael Hutchinson of aspnet-edit, another Google SoC graduate will be joining us in September).
    • By developing Silverlight in Silverlight we will also allow the MacOS crowd that currently can consume Silverlight content but not produce it to participate in the production ecosystem.

    Future Directions: Logo

    We need a logo for the Moonlight project, so we can print T-Shirts.

    Jackson suggested on irc for the Silverlight Airlines demo:

    <jackson> also, we should totally add snakes, time permitting

    Contributing

    If you want to help on the effort, the best thing to do is to get the source code, instructions are here and post your questions or suggestions to the Mono Olive discussion group.

    Posted on 21 Jun 2007


    Interview with Brad Abrams

    by Miguel de Icaza

    A very nice interview with Brad Abrams from Microsoft on various topics.

    He talks about Silverlight, creating Silverlight content that is indexable and the current state and future directions of Silverlight.

    Also interesting for the Silverlighters among us is ScottGu's "My 'Lap Around Silverlight' Talk at TechEd" it is now available for watching online.

    Posted on 18 Jun 2007


    Government Spies

    by Miguel de Icaza

    What I found fascinating about the accidental leak of the intelligence agencies in the US was not the dollar amount (48 billion, 60 billion, to me they are just very large numbers) but the poor quality of the powerpoint presentation.

    I wont rehash the argument that powerpoint presentations are bad, we all know that by now, but the unclassified data is fairly revealing.

    Slides like this look like a 13-year old shrine to their crush.

    That slide is an embarrassment to the whole human species. Someone please hide that before the aliens invade or we will lose our chances of being taken seriously.

    It seems like the agencies are a few cycles behind the latest computing fads. I fully expect the CIA to launch a "Extreme Spying" program next year: two spies working together to spy, fund some militant group or torture while the one making side comments and writing tests.

    Posted on 10 Jun 2007


    Little Snippet of News

    by Miguel de Icaza

    For the Windows.Forms crowd out there using Moma, this is form Jonathan Pobst's weekly status report:

    This week:
    - Implemented AutoSize for: Form, Button
    - Finished 2.0 versions of: Button, ColumnHeader, Splitter, ScrollBar, 
    ScrollableControl, Panel, and GroupBox.
    	

    Winforms 2.0 Autosize is soon coming to your nearest Linux workstation.

    Mono's LINQ support

    Marek now has where, group, into implement for LINQ expressions on SVN.

    Posted on 08 Jun 2007


    Paris, June 21st

    by Miguel de Icaza

    Bon jour France!

    I will be attending a replay of Microsoft Mix'07 in Paris on June 21st at Le Cirque d'hiver.

    We are working around the clock to demo Silverlight on Linux (our own open source version of it).

    You can track the progress in our screenshots page. It would be best if I could figure out how to make a video of it so you could see what we have come up with so far (Atsushi Enomoto, Chris Toshok, Everaldo Canuto, Jackson Harper, Jeff Stedfast, Rolf Bjarne, Sebastien Pouliot and myself).

    Question: Whats the hip thing to use to record video on Linux these days? Many years ago I used a tool that generated flash files but I do not remember what it was nor where in the machine it lives.

    Spare time: I got some time to kill on the 20th and the 22nd, and the morning of the 23rd, anyone interested in getting together and discuss all things Mono, Linux, Gnome?

    Posted on 07 Jun 2007


    Porting Windows.Forms application to Linux using Mono

    by Miguel de Icaza

    Jonathan Pobst has written a terrific guide that explains how Windows.Forms developers can port their Windows.Forms applications to Linux using Mono.

    Check it out.

    Posted on 04 Jun 2007


    Flight of the Conchords on HBO

    by Miguel de Icaza

    Back in 2005 I saw an amazing half hour stand-up show on HBO with a band called the Flight of the Conchords, New Zealands fourth most popular digi-folk paradists.

    They now got their own show, this is one of the best news for the summer.

    Fans of the Conchords can watch an episode here here.

    Posted on 04 Jun 2007


    Rodrigo, Mark and Marek Join Novell's Mono Team

    by Miguel de Icaza

    A few more developers have joined the Mono team at Novell.

    Rodrigo Kumpera and Mark Probst have joined the Mono team to work on the Mono Virtual Machine and will be working with Dick, Massi, Paolo and Zoltan to work on various tasks: improving our performance, reducing the memory usage, port maintenance.

    As warm up exercises Rodrigo is completing the Mono VM verifier and Mark Probst is implementing the Silverlight security system for our Mono-based implementation.

    Marek Safar, who has been a long-time contributor to the C# compiler (he implemented CLS compliance, did a big push to improve our error and warning system, implemented extension methods and C# 3 delegate type inference) will be joining us to work on the C# 3 compiler (building on a lot of the work that Scott did).

    Silverlight Security

    The Silverlight security system (described here, here and here in Shawn Farkas' blog) promises to be very useful.

    Unlike CAS that was hard to understand, the Silverlight security model is very simple and can be explained in a couple of minutes. This should be useful very useful to folks running untrusted code like SecondLife.

    Posted on 04 Jun 2007


    Interview with Michael Meeks

    by Miguel de Icaza

    Daniel James interviews Michael Meeks. Michael has been involved in the desktop starting with Gnome from around 1998 when he single handedly wrote the Gnumeric Excel import functionality.

    He currently leads the OpenOffice.org effort at Novell, this is truly a great interview. Michael radiates excitement in this interview, it is a pleasure to read.

    Posted on 02 Jun 2007


    C# and Silverlight

    by Miguel de Icaza

    InfoQ is reporting that:

    "First of all, C# won't be fully supported in Silverlight. Unlike VB, Python, Ruby, and JavaScript, C# does not support the Dynamic Language Runtime and cannot be hosted for runtime compilation in Silverlight."

    This is a bit of a stretch. What happens is that Silverlight will ship with compiler/interpreters that can compile source code written in Javascript, Python, Ruby and Visual Basic to native code.

    But Silverlight will not include a C# compiler on the client side. You will still be able to author libraries and assemblies with C# and write your application with it, you just wont be able to dump a C# source file over the network and expect that to be compiled and ran on the client machine.

    That being said, Mono does have a C# compiler written in C# and we could ship that compiler, and people could use this as a dependency if they wanted to.

    Now, what would be an adorable hack would be to relicense Mono's C# compiler commercially to Microsoft and have them distribute it for Silverlight ;-)

    Thanks to some fine contributions, Mono's C# 3.0 compiler is in great shape (missing some things, but they will be done in no time).

    Posted on 01 Jun 2007


    Blowback, Seymour Hersh inteview

    by Miguel de Icaza

    From the Seymour Hersh interview on the US and Lebanon.

    GORANI: The Senora government, in order to counter the influence of Hezbollah in Lebanon would be covertly according to your reporting funding groups like Fatah al-Islam that they're having issues with right now?

    HERSH: Unintended consequences once again, yes.

    ...

    HERSH: Well, the United States was deeply involved. This was a covert operation that Bandar ran with us. Don't forget, if you remember, you know, we got into the war in Afghanistan with supporting Osama bin Laden, the mujahadin back in the late 1980s with Bandar and with people like Elliott Abrams around, the idea being that the Saudis promised us they could control -- they could control the jihadists so we spent a lot of money and time, the United States in the late 1980s using and supporting the jihadists to help us beat the Russians in Afghanistan and they turned on us. And we have the same pattern, not as if there's any lessons learned. It's the same pattern, using the Saudis again to support jihadists, Saudis assuring us they can control these various group, the groups like the one that is in contact right now in Tripoli with the government.

    ...

    HERSH: [...] Condoleezza Rice, the secretary of state, has been very articulate about it. We're in the business now of supporting the Sunnis anywhere we can against the Shia, against the Shia in Iran, against the Shia in Lebanon, that is Nasrullah. Civil war. We're in a business of creating in some places, Lebanon in particular, a sectarian violence.

    The blowback discussion seems to be the political equivalent mistake of introducing new species and then wondering what went wrong.

    Except biologists do not get to claim that the rabbit population in New Zealand exploded and became a problem because "Rabbits hate our freedoms". There had to be a downside to being a scientist.

    Lebanon War of 06

    Last year, while the US claimed they were doing everything in their power to negotiate stopping the '06 Lebanon War (and as usual in these cases, taking as much time to show up and enforce anything and block any attempts at real progress) those that got their news from outlets outside the Foxosphere-of-influence [*] knew that these claims were far from honest.

    Its nice to find out -again- that we were right and they were as usual lying.

    Once again, am shocked! shocked!

    [*] Foxosphere: About 90% of the news outlets in the US, with notable exceptions like the comedy central fake news line up.

    Summer Wars

    Last year I read an interesting article about managing wars from a PR standpoint.

    Just like Bush administration waited over the summer to introduce the Iraq War, as "From a marketing point of view, you don't introduce new products in August." There is a similar rule for launching unpopular wars and attacks, although I can not longer find the article anymore, the thesis is simple: launch those attacks during the summer.

    You introduce these during the summer because Universities in the US are on vacation, and Universities are a central hub of information and organization.

    Lets test the theory and see see what this summer has in store for us.

    Posted on 01 Jun 2007


    The other side of Giuliani

    by Miguel de Icaza

    Rolling Stone magazine is running Giuliani: Worse than Bush article (from reddit).

    Printer friendly version here.

    Posted on 01 Jun 2007


    Google Gears

    by Miguel de Icaza

    Pretty cool!

    Google published Google Gears a plugin that exposes an APIs to Javascript applications for off-line storage.

    It also comes with an embedded Sqlite3 database, very nice.

    Posted on 31 May 2007


    Occupation 101 Released

    by Miguel de Icaza

    Occupation 101 has finally been released, after years in production the movie can now be purchased on DVD.

    This is an incredibly important movie to understand the living conditions of the palestinian population in the West Bank.

    The Production

    The movie was directed, shot and produced by two guys which explains why it took so long for the movie to be released.

    Resources

    B'Tselem: The Israeli Information Center for Human Rights in the Occupied Territories (West Bank and Gaza) has extensive information.

    John Pilger's Palestine is Still the Issue documentary is now available on video.google.com.

    Posted on 31 May 2007


    Novell and the EFF Announce Patent Reform Partnership

    by Miguel de Icaza

    Nat was today in San Francisco to announce Novell's partnership with the EFF to work on Patent Reform.

    The details can be found here.

    "EFF is partnering with Novell to try to get rid of software patents that are hurting innovation all over the world," stated Shari Steele, Executive Director of the EFF in an interview prior to the panel session.

    In essence, Novell is committed to working with the EFF to improve patent quality, while at the same time work to lobby with government agencies to reform existing patent policies and litigation, according to Nat Friedman. Novell's Chief Technology and Strategy Officer for Open Source. Specifically, Novell will assist the EFF in two ways.

    First, they will work with and support the EFF's existing Patent Busting Project, which targets existing patents that cover technology concepts that are perhaps to fundamental or already have prior art.

    "They're awarded for fundamental concepts in computer science on a too regular basis," Friedman stated. "Things like XOR, the ISNOT operator."

    "If you go on our Web site," Steele added, "we asked Internet users to identify the ten most egregious patents out there. We have our 'Ten Most Wanted.' And we've been one by one hacking away away at them."

    The second part of the partnership will have Novell working with the EFF and legislators to lobby for patent reform, initially in the US, but also branching out to Europe, where patent problems continue to arise. The EFF and Novell will also work with standards groups to assist in patent reform.

    The news is notable because it's the first time, Steele confirmed, that a corporate entity has publicly thrown in this level of support for the EFF on the patent issue. Normally, Steele said, companies have been much more circumspect and allowed the EFF to solely take the lead on this issue.

    The goal is to continue defending Linux from IP threats (as we have done in the SCO lawsuit that has costed Novell millions of dollars) and as we did when we were one of the founding members that contributed significantly to the creation of the Open Invention Network.

    Posted on 23 May 2007


    Dynamic Language Runtime: The Slides

    by Miguel de Icaza

    For those of you that could not attend the Compiler Lab but would like to see the slides, John Lam has published two slide decks:

    Posted on 23 May 2007


    Compiler Lab: Second Day

    by Miguel de Icaza

    Today was a bonding day for those of us that attended the Compiler Lab, after the morning session and the lightning talks were over most of us stayed around and talk until the end of the day.

    In the afternoon, while some of us were busy schmoozing and debating important topics like what was better: Jon Stewart or the Colbert report and lamenting the results of the French elections some other people were actually busy hacking in the afternoon.

    Apparently some folks that are working on a ColdFussion compiler got their Cold Fusion compiler using the DLR. Rodrigo and JB were also quite busy hacking in the afternoon.

    Good news for Boo users: after I posted my message yesterday about readline-like functionality Cédric Vivier pointed out that he had just implemented the readline capabilities in Booish. You can see the details here.

    Hosting and the Case for Multiple Hosts

    The morning sessions focused on how to host DLR-bound languages into an application and the various services offered by the DLR infrastructure.

    A question that came up is whether it is necessary to support more than one hosting "context" in a single application. Where global variables and types would be shared across multiple scripting instances.

    Although today the DLR does not support more than one context, I believe that it should support independent contexts. A case was made for Processes and AppDomains already existing and that adding a scripting contexts was not necessary but if there were interesting scenarios for this setup they could look into it.

    In my opinion, AppDomains are too heavy of a separation barrier in an application. They are hard to setup properly and depending on them requires an entire application to be restructured around this new boundary. In the particular case of Boo, multiple hosting environments can exist in a single application and I think this is a good thing.

    The best use can I can think of for the need to have multiple hosting contexts would be if the DLR is hosted in two independent libraries A and B developed by two independent groups and then having both of those libraries consumed by a third party. The developers of A and B should not have to talk to each other.

    Another example: I could imagine a setup where I want a scripting context for extending the internals of my application and on the same process, I would like to have a second scripting context that does not have access to the internals of my application, but instead is used by the user to write/prototype whatever it is that my application hosts.

    An accounting application that is heavily scripted internally would use one hosting context for its internal scripting facilities: forms, rendering, accounting and another scripting context would be used for doing report scripting: a much more limited environment that would not get access to all the application internals and types and globals, but only those that make sense for the reporting infrastructure.

    Anyways my vote: yes, we need multiple hosts per AppDomain.

    There was a demo of some scripting editor during the talk that hosted the DLR itself but Google does not turn up anything useful about it (Nessie), it looked cute.

    DLR Code Generation Scenarios

    In the second part of the sessions they showed some examples of what kind of code IronPython, IronRuby and the Javascript compilers generate.

    The DLR in particular provides support for capturing the environment (to create proper lambda functions). A key point during the presentations was that providing as much information the DLR as possible allowed it to optimize the code.

    Rodrigo -the author of Boo- pointed out during one of the breaks that he did like the optimizations that scripting developers were getting for free.

    Milo: Compiler Infrastructure

    In a similar spirit to what the DLR team did by refactoring IronPython into the DLR and then growing languages out of it, Rodrigo and JB talked about a similar project.

    Based on the Boo codebase and their joint work on Cecil while they both worked at db4objects they created Milo (which is available here: http://code.google.com/p/milo/.

    Milo's goal is to simplify the development of a compiler that targets the .NET framework

    Cute Anecdotes

    Their new DLR-based Javascript compiler (that implements the current ECMA spec) was written by two developers in four months. Nandan Prabhu was at the conference and he explained that if they were to rewrite it today it would probably take three months for a programmer to implement as such a person would not have to keep up with the daily changes in the DLR.

    The current sizes for the runtime and the compiler are:

    -rw-r--r-- 1 root root 114688 2007-05-02 04:07 Microsoft.JScript.Compiler.dll
    -rw-r--r-- 1 root root 299008 2007-05-02 04:07 Microsoft.JScript.Runtime.dll
    	

    Extrapolating that from our compiler source code it seems that the code is roughly 35,000 lines of code for both the compiler and the runtime. And the compiler is only one fourth of that, so something in the 9,000 line range.

    Another interesting detail: the new Javascript compiler is written in Visual Basic.NET.

    Dinner

    The day ended up with a fascinating discussion in the kitchen with the Jims (Miller and Hugunin) about languages, big integer support, scheme, python, academia and practice and tons of anecdotes of the early days of the CLR and Jim's days at MIT.

    Posted on 23 May 2007


    Moonlight, trivial Video and Canvas

    by Miguel de Icaza

    As part of my Silverlight for Linux research I have prototyped a native code library that uses Cairo and ffmpeg to prototype some of the ideas from the Silverlight canvas.

    The above picture shows 2 videos playing, one of them rotated and a triangle object rendered in the middle as well. This was just a test to get an idea of what is involved.

    The code does no attempt to keep up with the clock or do anything reasonable with time: it just renders stuff as fast as it can and does have no audio support. The next step is tune this a little bit (I do too many copies right now, too much stuff is done on the critical path) and then contrast this with an Agg-based implementation.

    The canvas implementation that am using right now is inspired by the Gnome Canvas in many regards.

    Compiler Lab: First Day

    Today was the first day of the Compiler Lab and got to see again many good friends and some folks I had not seen for ages. This will feel like a name-dropping blog post, but here it goes anyways.

    Scott Gunthrie introduced the day with a general overview of where they are and where they are going with .NET, Silverlight and WPF.

    JB Evain and Rodrigo Oliveira were both late for the opening session, but they looked like they had been hacking all Sunday.

    Jim Hugunin introduced the Dynamic Language Runtime in the second half of the morning and went through the design decisions behind the DLR. Although he has covered some of this information in blog this presentation was colored with the history of how decisions were made and the engineering choices that they had made that took them from IronPython to work on a general purpose framework for hosting dynamic languages.

    The historical bits are always the most interesting to me. Jim talked about how they decided to go for a general purpose framework as people started asking for support for more dynamic languages. They were not really interested in writing all the compiler themselves, so instead they decided to turn their experience in building IronPython in some reusable work that could be used by others.

    To accomplish this, they chose to implement four different dynamic languages extracting the common infrastructure into a reusable framework. Jim did not say how much they had learned from each language (which I guess is a good question for tomorrow), but he mentioned that the DLRConsole sample for Silverlight originally was pure Python. That it took him about three hours to add Javascript, three days to get Ruby in shape to work on the DLR and their new VisualBasic required almost no work.

    I have extensive notes, but they are too extensive and am not sure I want to edit those, but you can get a good idea of what the presentations were all about from his blog posts:

    The DLR is pretty serious, there were at least six people in the audience from the DLR team. I finally got to meet Dino Viehland, Bill Chiles was handing out copies of ToyScript (a reference small interpreter), Martin Maly was there, John Lam sat on the back (we all presume he was working furiously on his presentation for tomorrow) and Mahesh Prakriya was there as well.

    Jim Miller of Scheme fame was there and made things all the more amusing by pointing out the similarities of certain features to Scheme. He also brought up a few issues that would need to be included in the DLR to support languages like Scheme as the day went by.

    Jim Hugunin has always found interesting ways of demoing IronPython. He used to build a calculator with Avalon and rotate the buttons. Today he showed us some XNA space ship controlled with an Xbox control and later used IronPython to control a Lego Robot that his nine year old son had built.

    John Gough was also here and he has retired from teaching at QUT. Nigel Perry has left the University too and is now working at Microsoft.

    John Lam is organizing the lightning talks, and he has divided things neatly into three categories: Monday was the day for 5 minute talks. Tuesday was the day for 10 minute talks and Wednesday is the day for 15 minute talks.

    When I left the building there were zero talks scheduled for 5 or 15 minutes. Everyone is listed on the 10-minute column for tomorrow.

    I had a fantastic dinner with Scott Gunthrie and Jason Zander. I got a chance to pepper them with questions about the early history of the .NET framework for my pet project on the archaeology of .NET to be published in May 2nd, 2076. They were also kind enough to explain to me some of the technicalities about the Silverlight implementation. I should be updating the wiki page with the details later.

    Help Rodrigo

    Apparently "Console.ReadLine" on Cygwin in some way gets line editing even from C# applications. Am not sure how this works, but Rodrigo can not live without this feature in Booish.

    I remember that a few years ago there was a Unix program that will provide readline capabilities to any program that lacked them by running a process under a pseudo terminal and providing line editing functionality to tools like ftp, nslookup or any other Unix tool that did not provide its own command-line editing functionality.

    Posted on 22 May 2007


    Rob Connery Interviewed

    by Miguel de Icaza

    In this interview Rob Connery explains how he came up with SubSonic. A tool that helps developers build applications:

    That someday came when I was refactoring the Commerce Starter Kit, trying to leverage as much Data access code into the base classes as I could. I was using generics in a way that they probably weren’t designed to be used, but in the process I stumbled on a really cool pattern for generating very little code for a full data access layer. When I first got it to work I literally jumped out of my chair, swearing to myself.

    I gave it about 2 weeks and tested and tested and when it didn’t break or slow down, I remember thinking "I’ve got something here!". I had been doing some Ruby/Rails stuff at the time, and I had the idea that much of that ΄love‘ could be brought over to the ASP world. Although the real joy of Rails is the language Ruby - but maybe someday RubyCLR will be finished (or some other dynamic language package for .NET) and that’s when I think SubSonic will come into it’s own.

    Through Phil Haack

    Once Subsonic runs on Mono, we should integrate it into MonoDevelop. Rob did a great demo of it at Mix.

    Posted on 22 May 2007


    Compiler Lab Meeting at Microsoft

    by Miguel de Icaza

    I will be arriving at noon to Redmond on Sunday and spend Monday and Tuesday (skipping Wednesday) at the Compiler Lab meeting at Microsoft.

    Drop me a note if you want to get together on Sunday afternoon or swing by and say hi during the meeting.

    Rodrigo de Oliveira from Boo fame and JB Evain will be both there as well.

    Mono and the Dynamic Language Runtime (DLR)

    Thanks to Zoltan Varga, Marek Safar and Sanghyeon Seo it is now possible to run the Dynamic Language Runtime in Mono and run the new DLR-based IronPython 2.0 in Mono.

    Update: Mono already supports the pre-Alpha releases of IronPython and has for a long time. What is different is that this is the DLR-based IronPython.

    The changes did not make it into Mono 1.2.4 (Mono 1.2.4 was branched before MIX 07 even started, or the DLR was announced). So you will need to build Mono from the source on SVN or wait for Mono 1.2.5 to include the fixes.

    Posted on 17 May 2007


    Paint.NET 3.0 for Mono: Now Public

    by Miguel de Icaza

    We have used Paint.NET for a long time as a test for our Windows.Forms implementation. In the past I have blogged about it (here and here).

    Until now, releasing the port was either painful (because I had botched the 1.x port) or not very useful (because newer versions of Paint.NET depended on 2.x features that we were missing). In Mono 1.2.4 we finally have an implementation of the *Strip classes that are heavily used in Paint.NET for the menus, toolbars and floating editing gadgets so now Paint.NET looks great.

    The port is not complete, but it works. Am releasing it to the public since so many people asked about it and volunteered to contribute to complete the port.

    Links:

    Feel free to join the effort.

    Posted on 15 May 2007


    Mono.DataConvert

    by Miguel de Icaza

    Our just released Mono 1.2.4 contains a class that replaces System.BitConverter: Mono.DataConvert.

    We created this interface a few months ago when we ran into problems with the limitations in System.BitConverter in Mono and when we noticed that it was not possible to fix this API. Mono is switching internally to use this instead of BitConverter as it leads to subtle errors when making your code work in big-endian systems.

    Mono.DataConvert offers conversions from and to .NET types to raw byte sequences:

    • Host types to native byte arrays, little endian byte arrays and big endian byte arrays.
    • native, little endian, big endian to Host types.
    • Helper routines for Stream I/O.
    • Perl-like convenience routines for packing and unpacking data structures.

    I like the Perl-like interface, for example:

    	// The following means:
    	// Little endian encoding of a Int16, followed by an aligned
    	// int32 value.
    	byte [] r = DataConverter.Pack ("_s!i", 0x7b, 0x12345678);
    
    	DataConverter.Pack ("^ii", 0x1234abcd, 0x7fadb007)
    	// Result: 12 34 ab cd 7f ad b0 07
    	

    We also have a more traditional APIs, for example:

    	// The instance-based API
    	byte [] x;
    	x = DataConverter.LittleEndian.GetBytes (my_double_value);
    	x = DataConverter.Host.GetBytes (my_double_value);
    	x = DataConverter.BigEndian.GetBytes (my_double_value);
    
    	// Or a static version of it:
    	x = DataConverter.GetBytesLE (my_double_val);
    	x = DataConverter.GetBytesNative (my_double_val);
    	x = DataConverter.GetBytesBE (my_double_val);
    	

    The code is licensed under the MIT X11 license, and we encourage developers on both Mono and .NET to use this library as opposed to the fundamentally limited and broken BitConverter.

    This class is bundled as part of corlib, and is by default "internal". Since this is a small class, developers are encouraged to copy the source code into their own applications. See this for details

    Posted on 15 May 2007


    JB Evain joins Novell

    by Miguel de Icaza

    Jean-Baptiste Evain, the author of Cecil the CIL manipulation library that is now used by various Mono components as well as the Mono Linker has joined the Mono team at Novell.

    Posted on 15 May 2007


    أهلاً حَبِيبين,أهلاً (Ahlan habibin, ahlan)

    by Miguel de Icaza

    J'ai essayé de faire une interview en Français l'autre jour, mais mon français est pire chaque année, vous pouvez la voir ici.

    J'y parle de nos plans d'écrire une version libre de Silverlight pour Mono.

    Autres nouvelles: j'adore Arvo Pärt et pour quelque raison mon Emacs ne fonctionne pas avec l'arab. of أهلاً

    Posted on 13 May 2007


    TimeZoneInfo in Mono

    by Miguel de Icaza

    A few months ago, Stephane Delcroix was working on F-Spot and he needed to track time zone information for pictures.

    The .NET framework did not offer anything to make this easy. Only one timezone could be constructed: the system one.

    His original plan was to implement Mono.ExtendedTimeZone that would be a derived class from the TimeZone class in the framework but that would be populated from some other database.

    He considered a few choices and discussed:

    • Use libc in some form, to pull the data out of it (external program) and create the instances of the timezone as needed. This could be slow due to using an external program with a temporary TZ setting.
    • Parse the libc datafiles, very OS/distribution-specific.
    • Ship our own databases.

    We did not want to go into the business of maintaining the timezone files and redistribute Mono updates every time new countries were created or rules changed, so we opted for dumping the data out of libc in some form.

    Stephane ended up parsing the GNU libc datafiles: they did not depend on external programs, works on Linux easily and is fast. This will require the code to be ported to other platforms though.

    Around that time we discovered that Orcas (.NET 3.5) included a class to cope with this problem in the form of System.TimeZoneInfo in the System.Core.dll assembly. So his API effort changed from implementing a Mono.ExtendedTimeZone to implement System.TimeZoneInfo. Yesterday he emailed me the above screenshot and we got the code commited to SVN.

    Check Stephane's PicasaWeb album it contains various screenshots of his F-Spot work.

    Posted on 12 May 2007


    C# 3.0 updates

    by Miguel de Icaza

    Scott Peterson blogs about his recent contributions to the C# 3.0 compiler:

  • Variable type inference (the "var" keyword)
  • Anonymous types.
  • Implicitly typed arrays.
  • Object initialization.
  • Collection initialization.
  • Scott is participating in the Google Summer of Code. His summer project is to port the Banshee Media Player to Windows. But I guess he had to have those 3.0 features before he could start. It makes perfect sense. This patch was reviewed and mentored by Marek Safar who has been implementing various other parts of the C# 3 support (extension methods, the new LINQ parser and the updated delegate semantics).

    The new object initialization allows properties to be set at construction time, for example:

    	// C# 2 style
    	Gtk.Window w = new Gtk.Window ();
    	w.Title = "My App";
    	w.Visible = true;
    
    	// C# 3 style
    	Gtk.Window w = new Gtk.Window () { Title = "My App", Visible = true };
    	

    This also works for events:

    	Gtk.Button b = new Gtk.Button ("Ok") { Clicked = ok_clicked };
    	

    Or using the new lambda expressions:

    	Gtk.Button b = new Gtk.Button ("Ok") {
    		Visible = true,
    		Clicked = (sender,args) => { Console.WriteLine ("Clicked"); }
    	};
    	

    The last case (delegate) is currently not supported by mcs.

    Posted on 09 May 2007


    Dynamic Language Runtime

    by Miguel de Icaza

    The presentation by Jim Hugunin and John Lam on the Dynamic Language Runtime (DLR) was a great introduction for the general public on what they are trying to do.

    They showed their Ruby compiler consuming JavaScript and Visual Basic code from a single program: In the above example, Ruby has been extended to allow importing modules, for instance

    	JS = require '3DText.js'
    	

    Imports the code that does 3D transformations (written in Javascript) into the constant JS. To access functions in that javascript module, you just prefix the call with JS, like show on the screenshot (JS.playAnimation for example).

    The Dynamic Language Runtime augments the Common Language Runtime and is made up of a few chunks:

    • A shared type system for dynamic languages.
    • A shared AST that can be used by language developers to create new dynamic languages.
    • Helper/utility routines for compiler developers.
    • A common hosting interface, to embed the general purpose scripting language interface into your program, and allowing developers to extend applications with one or more dynamic languages.
    • Console support, they even have a simple console interface for doing interactive programming.

    Today Jim has a post describing in more detail the shared type system:

    They demonstrated the DLR Console, a sample application written in IronPython that allows developers to interactively write and test their code for Silverlight.

    You can watch the presentation here.

    Variables and functions declared in one language are automatically visible to the other languages, and by clicking on the language at the bottom of the screen programmers can switch between languages on the same session.

    My photo did not come out very clear, but in this shot you can see vb, javascript and ruby. The popit routine written in VB, the event wired up in Javascript, and another event wired up in Ruby: An interesting feature of the DLR is that they added a mapping system for function names, so that code does not feel alien in other programming languages.

    So the event MouseLeftButtonDown from the CLR is exposed to NRuby as mouse_left_button_down in Ruby, here you can see auto-complete when running under the Ruby context: Those properties in .NET are capitalized.

    Various technical details appear on this interview by Darryl Taft:

    Hugunin: In many ways, all the DLR does is it takes these things that we did custom for IronPython and it makes them work for a broad spectrum of languages. So instead of having a Python type system we now have a dynamic type system. So any language that has dynamic operations can share them

    The DLR and Mono

    As usual, Hugunin's team keeps exposing bugs in our compiler. For example, we did not notice when C# 2.0 came out that the operator declaration grammar now allowed for attributes on operator parameters:

    operator-declaration:
    attributesopt operator-modifiers operator-declarator operator-body

    That one is fixed on SVN, but am not sure its worth backporting to the 1.2.4 branch. Another issue seems to be a case of not implementing fully method group conversions as the code seems to be comparing a delegate variable against a method and we barf on that one. A simple fix for now is to merely do a manual conversion in the source "new DelegateType (Method)".

    I did not research this one yet, but plan on doing that today.

    The final issue seems to be an issue with the operator priorities, our compiler does not like expressions like this:

    type t = var as TypeName ?? dingus;

    A temporary fix for now is to put parenthesis around "var as TypeName". It should be an easy fix

    With those fixes you can get the DLR building on Mono, I have not tried the rest of IronPython as am just freshly unpacked from Vegas.

    JavaScript

    Deepak Jain pointed out by email that the Javascript support in the DLR is their new engine, and not a research prototype.

    This new Javascript implementation is following the steps of IronPython: to be true to the original language without .NET extensions. So this is different than JScript.NET that added a bunch of extensions to be a CLR citizen.

    Their new ECMAscript implementation is more of a DLR citizen and true in spirit of it.

    Ruby, Python and the DLR are released under the MsPl, and it would be great if they also did this for Javascript.

    Posted on 03 May 2007


    Digger on Silverlight

    by Miguel de Icaza

    So we have all seen the spinning text, the video puzzles and the rotating spiderman trailer.

    But real programs are more complicated than those simple demos. Lutz Roeder has a page with Silverlight applications that he has written.

    My favorite: his Windows.Forms digger port. You can see it here or you can download the sources and learn for yourself here.

    Posted on 03 May 2007


    Mike Krueger Joins the Mono Team

    by Miguel de Icaza

    Mike Krueger, the creator of the Sharp Develop IDE, has joined Novell.

    Mike will be working with Ankit, Lluis and Jeff to improve the MonoDevelop IDE, and to try to share more code between SharpDevelop and MonoDevelop.

    Posted on 03 May 2007


    Mix 07, Silverlight, Dynamic Languages Runtime and OpenSource

    by Miguel de Icaza

    A very impressive set of demos at Mix 07, the 72 hour conversation that Microsoft is having in las Vegas.

    The focus was mostly around Silverlight, Microsoft's new web plugin to author rich application and tools used to design this content.

    The whole Expression suite was adorable, and Blend is fantastic.

    The demos were pretty amazing, Scott built a nice animation for an airline reservation system on stage:

    Silverlight and WPF

    Today Microsoft announced two Silverlight editions: one that went into beta (Silverlight 1.0) and is a relatively simple technology.

    Silverlight 1.0 uses a retained graphics system (a canvas) that exposes the internal structure to the browser DOM. It has no scripting capabilities built into it, all the scripting support is actually done by the Javascript interpreter in the browser and all changes are done by talking to a Javascript object exposed by the hosted Silverlight surface.

    The scene definition is done using the XAML markup using a subset of the WPF primitives available in the full-blown WPF. Then the big announcement came:

    The second edition was Silverlight 1.1, and this one is a different beast altogether. 1.1 extends the model by embedding a complete Common Language Runtime. Here is the slide that Scott used for this part of the presentation:

    Scott did a demo of a chess program that had logic built with JavaScript and C#, notice the nodes per second computation:

    The outcome of the famous battle between dog vs vampire:

    There are a handful of changes to the runtime. Here are some notes on what I found out about it today. It might not be complete nor accurate:

    • A new security system: Unlike the CAS there is no stalk walking but instead there are trusted and untrusted assemblies. This is part of a new sandboxing model.
    • Trusted assemblies have a way of flagging entry points as being untrusted. which requires that the caller be a trusted assembly.

      This means that calling things like FileStream File.Open (string filename) from an untrusted assembly is not permitted.

      Instead developers would call something like FileStream File.OpenDialog(...) (which is hosted in a trusted assembly) and this would in turn call File.Open(string) and this would return a FileStream that the user selected with a dialog box.

    • The API has been trimmed down: some classes were removed that did not make much sense for the core.
    • A Minimalist WPF implementation: this is now available as a new assembly. This implementation at this point does not seem to have support for high-level controls like Buttons or Sliders, those have to be authored in a per-application basis.

      There is talk about which pieces belong in the minimal WPF and which pieces do not.

      In my opinion, keeping the controls out was a good idea as the controls in the real WPF are a bit too big.

    • Dynamic Language Runtime: the dynamic language runtime is an integral part of the Silverlight distribution.

    Dynamic Language Runtime

    The Dynamic Language Runtime was announced today. Jim Hugunin's blog has the details and rumor is that in the next couple of days/weeks he will be posting on his blogs the technical details behind the design of the DLR.

    Binaries of the DLR were released today as part of Silverlight 1.1, and the source code was included with IronPython 2.0 (also released today).

    The release for the DLR is done under the terms of the Microsoft Permissive License (MsPL) which is by all means an open source license. This means that we can use and distribute the DLR as part of Mono without having to build it from scratch. A brilliant move by Microsoft.

    During the keynote they announced support for four dynamic languages built on top of the DLR: Python, JavaScript (ECMAScript 3.0), Visual Basic and Ruby.

    The rumor on the halls is that IronPython and Ruby will be released under the MsPL license, while ECMAscript and Visual Basic will continue to be proprietary. From Jim's announcement:

    For the short term, our focus is on using a small number of languages to drive the first wave of DLR development where we can work closely and face-to-face with the developers in order to iron out the worst kinks in the DLR design. After this initial phase, we want to reach out to the broader language community. If you're building a language on top of .NET and are interested in supporting dynamic language features then we want your feedback on the DLR. However, I'd discourage you from trying to implement on top of the DLR today. I don't want you to get frustrated trying to work with these really early bits and then not be interested in working with us when we're better prepared to engage with the language community. We plan to kick off a broader engagement with language implementers at the upcoming lang.net conference in three months - at the end of July. This will be the best place to really engage with the DLR and let us know what we got wrong.

    Mono and Silverlight

    For a long time a common question to the Mono team was when we were planning on implementing WPF.

    Most people want to hear a date like "tomorrow", "next month", "in a year". But the answer is more complex than just thinking "we can do this in N months".

    We as a team have to evaluate the cost of implementing a technology and contrast it with the impact that such technology would have. With our finite development resources (in the Mono community and the companies contributing to it) we have to pick our battles.

    And implementing WPF was never really high up on the priority list for a couple of reasons:

    • WPF requires a very big investment before things will start working.
    • Users of WPF is limited to those starting new applications and are willing to start those applications using WPF.
    • Only a minority of existing users (Windows.Forms) were willing to rewrite their software to move it to WPF. The rest basically will continue developing Windows.Forms and using the technologies they have been using for the time being.

    So it is fair to say that we currently do not have plans to look at WPF.

    But a Mono-based Silverlight is an entirely different story. Unlike WPF that requires people to rewrite their software to take advantage of it, Silverlight is aimed at the Web and it will become a nice complement, a way of spicing up existing web applications without rewriting what already works.

    It makes tons of sense for us to start looking at an implementation of Silverlight on Linux with Mono. There is already a XAML loader, it is the perfect excuse to use Antigrain for high-speed graphics and that only leaves the pesky media issue to be solved.

    In fact, am kind of happy that Microsoft did not do the port themselves as implementing this sounds incredibly fun and interesting.

    Upsides

    The major upside of this show has been how open the Microsoft folks have been open to discuss technicalities of any sorts.

    I had the chance of participating on an open source panel at the conference and PHP, Mozilla, SubSonic.NET and Mono were well represented and I did not fell any angry mood from anyone.

    There is also a surprising amount of talk about using the MsPL license, again, all good news.

    Finally, I also made tons of new friends, have had a great time with everyone I have met here. I also noticed that both Jon Udell and Dave Winer both look happier, they were always smiling,

    IE 8?

    Someone mentioned (and I forget whom it was) that talk about IE8 was strangely missing from the whole conversation. There were no announcements about new upcoming features in IE, no mention of whether IE8 will support what-wg nor any future plans.

    Predictions

    So how did my predictions score?

    • "They will spend most of the time showing the new features in the recently released Orcas and probably the Silverlight media encoder." At least on the keynote there were little demos of Orcas, most of the demos were demos about Expression, but they did show the Silverlight media encoder. Am going to give myself half a point.
    • "There will be a fresh Silverlight update." score 1.
    • "Blend and Expression Design will probably ship as a final product, or a new beta will be released." They did. score 1.
    • "Dynamic Language Runtime: a set of class libraries with some sort of supporting infrastructure in the CLR to help dynamic language authors speed up their code.". score 1.
    • "Javascript: probably Microsoft will announce that they are upgrading the JScript compiler in .NET." Although they did announce that it would be writing a new JavaScript compiler, it is not clear if its a research prototype to test the DLR or the real thing, so am going to go with half a point.
    • "Silverlight will bundle a micro-clr." Silverlight bundled a full CLR. So zero points, although I was close.
    • "Silverlight for Linux. And if there is no announcement, we should try to get someone drunk enough to get them to do it." There was no announcement of Silverlight for Linux, but I was still kind of joking. But I did get drunk with senior Microsoft employees. One point.

    So 5 point out of 7, not bad.

    Update: Deepak Jain points out that the new Javascript implementation is not a research prototype, but their new Javascript implementation. The real thing.

    Which gives me full point, so 5.5 out of 7, I think I fared better than most analysts and pundits. I should become an analyst at RedMonk in my next life.

    Posted on 01 May 2007


    Right-sizing the API

    by Miguel de Icaza

    Jason Zander's blog entry on the Silverlight announcement contains a very important information nugget:

    2. The APIs we are releasing are "right sized". That means we looked for the most powerful subset we could find while keeping the size small.

    This I think is what makes Silverlight so interesting to me. Compared to WPF which is a complete framework for desktop applications, they are doing an effort to keep the APIs to a minimum.

    Default Widgets: Silverlight comes with no pre-defined widgets, and although at first this seems like a weakness, during one of the presentations today it was clear that one-size-fits-all was not going to give everyone what they wanted.

    I believe it was during Mike Harsh presentation, where he created a nice looking custom button out of simple primitives.

    Posted on 01 May 2007


    Two Great Democratic Candidates.

    by Miguel de Icaza

    Mike Gravel, ex-Alaska senator is running for the presidency. Here are some brilliant clips of his participation at the first democratic debate:

    Last night Dennis Kucinich was interviewed by Bill Maher on Real Time. The whole show was fantastic.

    See Bill Maher opening monologue and his interview here or if you want to see only the interview click here.

    Posted on 28 Apr 2007


    Mix 07

    by Miguel de Icaza

    I will be at Microsoft's Mix 07 conference next week, am getting to Las Vegas around 5pm, if you are interested in talking about gnome, open source, mono and wildly speculate over the announcements of the week, drop me an email to my gmail account (miguel.de.icaza).

    I will be on a panel on opensource on Monday at 1:30pm

    Update: Dave Winer setup a signup page for those attending Mix 07.

    Posted on 28 Apr 2007


    MonoTorrent Curses 0.1 released

    by Miguel de Icaza

    Due to popular demand (all two of you), I have made a tarball of the Curses GUI interface for MonoTorrent as well as Monotorrent.

    Download both:

    Update: Some folks are reporting that the internet tubes are clogged. Wait a little bit for the transfers to start, am using the Coral Cache for distribution (another de Icaza Industries innovation).

    You need to have Mono and ncurses (will work on any modern Unix with ncurses).

    You must first configure, make, make install the monotorrent-0.2.tar.gz tarball and then repeat the same for monotorrent-curses-0.1.

    Once you are done, you can start up this gem of software engineering by typing monotorrent in your console.

    Posted on 25 Apr 2007


    Dynamic Language Runtime: Let the Speculation Begin

    by Miguel de Icaza

    For the last couple of weeks news started tricklying over IM and email that Microsoft was going to announce some Dynamic Language Runtime at Mix 07.

    There have been some hints on the blogs, some friends of friends of MVPs, some friends of MVPs and some journalists. The MVPs have been leaking like there is no tomorrow.

    Am not very good at predicting, but here are a few guesses for next week's Mix 07 announcements, in my confidence order:

    • They will spend most of the time showing the new features in the recently released Orcas and probably the Silverlight media encoder.
    • There will be a fresh Silverlight update.
    • Blend and Expression Design will probably ship as a final product, or a new beta will be released.
    • Dynamic Language Runtime: a set of class libraries with some sort of supporting infrastructure in the CLR to help dynamic language authors speed up their code.
    • Javascript: probably Microsoft will announce that they are upgrading the JScript compiler in .NET.
    • Silverlight will bundle a micro-clr.
    • Silverlight for Linux.
      And if there is no announcement, we should try to get someone drunk enough to get them to do it.

    The conference looks like it will be incredibly fun and I am looking forward to meet a lot of people. Lots of talks that I do not want to miss.

    Posted on 25 Apr 2007


    Race to Linux Interviews

    by Miguel de Icaza

    These are the interviews for the various winners from the Race to Linux contest that we did in collaboration with Mainsoft and IBM.

    The exercise included porting existing ASP.NET-based applications to Linux. All the ports were completed in a matter of hours, in some cases the download of the VMware image took longer than the port itself.

    Here are the interviews:

    Posted on 23 Apr 2007


    Mono 1.2.3 to 1.2.4 Progress

    by Miguel de Icaza

    Jonathan Pobst just emailed me the comparison from Mono 1.2.3 to Mono 1.2.4 from the Mono Migration Analysis tool:

    Mono 1.2.3Mono 1.2.4Change
    Missing Methods19,10518,425680
    Methods throwing
    NotImplementedException
    4,0043,714290
    Methods flagged as "TODO"3,7343,69143

    So 1,013 fresh new implementations since our last release.

    Update: Jonathan pointed out that the numbers for APIs included internal classes (his tool has been fixed) and for internal assemblies or assemblies that we will not be supporting (VB6 support for example).

    So the grand total for missing methods is 10,315 methods and not 18,425. I would fix the table, but I do not have all the updated numbers other than the grand total for Missing Methods.

    From those 10,315, my senses it that we can live happily with up half of them not being implemented (fringe methods that are never used, do not show up in Moma reports or other relics).

    Posted on 23 Apr 2007


    Pong on Mono.XNA

    by Miguel de Icaza

    Stuart from the Mono.XNA team today posted a screenshot of the game of Pong (which am guessing is some kind of XNA demo program) running on their open source implementation (called Mono.XNA).

    Posted on 22 Apr 2007


    Call for Testers: Mono 1.2.4

    by Miguel de Icaza

    We are about to release Mono 1.2.4. It has been a personal difficult decision, as only a few times in the life of a project you reach such a nicely rounded release name.

    Wade has uploaded the test packages for Mono 1.2.4 for various architectures here: http://mono.ximian.com/monobuild/preview/download-preview

    The diffs between 1.2.3 and 1.2.4 for the mono package (mono and mcs) are almost 20 megabytes in size (I did not count mono-basic, libgdiplus, monodoc, libgdiplus, xsp or mod_mono).

    This release has a pretty much finished version of ASP.NET 2.0, with the exception of WebParts, which we have not done much about yet.

    See my current embryonic release notes for more details.

    Posted on 21 Apr 2007


    Clay Movie

    by Miguel de Icaza

    A few years ago I passed my Canon D60 camera to one of my younger brothers (Franciso Isaac):

    He made this animation with clay:

    Posted on 20 Apr 2007


    Microsoft Happenings

    by Miguel de Icaza

    A couple of things.

    Panel at Microsoft's Mix 07

    My friend Joshua Allen invited me to participate in an open source panel at Microsoft's Mix 07 conference in Las Vegas.

    I will be paneling with Rob Conery (he is behind Subsonic, a rising star in the ASP.NET world), Mike Schroepfer from Mozilla, Sam Ranji from Microsoft (from Port25).

    Rob is collecting questions for the panel. If you have some feedback, post on his blog.

    Silverlight, Flash and open source alternatives

    Microsoft renamed their WPF/E rendering engine "Silverlight".

    Silverlight is basically:

    • An object oriented canvas, this canvas can be controlled trough the DOM by the containing web page.
    • The contents of the Canvas can be preloaded with a XAML-based description. The XAML supported is a subset of the full WPF/Avalon supported by .NET 3.0.
    • So far it offers no built-in scripting, instead it relies on the browser's Javascript engine.
    • It supports video playback using the highly proprietary VC-1 formats.
    • Silverlight is cross platform in the "Windows and Apple are supported" way, no support for Linux has been announced. So it is even more limiting than Flash.

    Silverlight has one thing going on for it, the file format to populate it can be trivially generated by web developers, so it will be easy for people to create cute controls and generate those on the flight.

    The major difference in my opinion between what-ng's <canvas> tag and Silverlight is that Silverlight includes video playback support, and I can imagine that Microsoft will try to convince content providers to switch from Flash or their existing embedded windows media experiences to Silverlight.

    As a Linux/BSD user, this might pose another setback for our desktop. For years video playback on Linux has been a pain due to the lack of codecs for the various proprietary formats (Considering that even on Windows WMA/WMV playback is a random experience). This all changed with Google Video and YouTube.

    Google Video and YouTube popularized the use of Flash for delivering video and it quickly became the norm for video delivery. This opened the doors to the Linux desktop users to watch video content just like everyone else and the pain had been mostly eliminated.

    swfdec open source Flash player.

    Although Flash is not open source and it is not available on every Linux platform at least those of us using x86/x86-64 systems could watch those videos (and in addition, there is a project that is making great progress).

    Reimplementing most of Silverlight is trivial but the difficult bit is getting the audio/video decoding in place (I will not give the Ximian crowd the pleasure of saying "its a weekend hack").

    Lacking a viable open source-based competitor today for rich media delivery on the web and given the current state of both Flash and Silverlight, it is in open source's best interest to ensure that Flash gets ahead of the competition.

    In my opinion, Flash needs a couple of things to stay ahead:

    • A text-based format to populating the flash contents, either from a JSON representation or an XML file.
    • An open specification that allows for third-party implementations. My understanding is that today's Flash specification is semi-open.

    And of course, I think that Flash should be open sourced, but that is a long shot.

    A completely open alternative would be ideal, a combination of:

    • OGG Video and Audio objects as part of the what-wg specification, to complement the existing <canvas> tag.
    • Tools to convert popular design formats like XAML and whatever Flash uses into Canvas tags.
    • Tools and Javascript hacks to implement dynamic loading of extra content for the canvas tags.

    It does not seem like a far shot, but it would require cross-browser support and would prevent us from being locked into either proprietary stacks.

    Opening up Microsoft

    Synergy

    Although there are some groups inside Microsoft that seem to be opening up, pushing open standards, and using licenses like the MsPl (for the Ajax client library for example).

    Scott Guthrie, the star from ASP.NET is now in charge of .NET at Mircosoft. If there is anyone at Microsoft that understands the value of open standards and becoming more standards compliant it is him. So there are good possibilities on the horizon.

    But it seems that larger company considerations like the use of VC-1 will prevent Silverlight from ever using unencumbered technologies.

    This reminds me of that movie In Good Company (with Topher Grace and Scarlett Johansson) where decisions in the company are made to leverage synergy.

    I look forward to discuss this at Mix 07.

    Posted on 20 Apr 2007


    Gonzo, part 2

    by Miguel de Icaza

    Yesterday I watched Alberto Gonzales on C-SPAN, but I did not see these shots from the audience. From Reddit:

    Gonzo did not recall or remember 71 things yesterday, and the audience was keeping track:

    Posted on 20 Apr 2007


    Alberto Gonzales' Amnesia

    by Miguel de Icaza

    Regardless of whether Attorney General Alberto Gonzales is innocent or guilty on the case of the fired Federal Prosecutors, it seems that the guy has a severe case of amnesia.

    In my opinion, he should yield the position just on the grounds of exhibiting very strong signs of senility.

    Senator Grilling

    One Republican senator told Gonzales (paraphrasis), regarding all the incompetence in the whole deal:

    "The exact same standards [that you applied to the firing of the prosecturos] should be applied to you"

    "Why shouldn't those standards apply to you?"

    "you ought to suffer the consequences that others have suffered, the best way of put this behind is for you to offer your resignation".

    Gonzales' reply is "Good work is being done, I will rectify".

    Posted on 19 Apr 2007


    Ports from the Race to Linux

    by Miguel de Icaza

    The ports of the various contests from the Race to Linux are available here. There are two ports done with Mono/XSP and two ports done with Mainsoft's Grasshopper.

    We got the winners for the second Race to Linux.

    Here is what Jenna just emailed me:

    Congratulations to Mark Cafazzo from Canada! He was the first Race to Linux 2.0 entrant to successfully port the Blog Starter kit to Java EE and run it on Linux using the Grasshopper 2.0 Technology Preview, Visual Studio 2005 and MySQL as the backend database. Says Mark: "The combination of Grasshopper and VMware made porting the Blog Starter Kit a breeze!"

    The Race #2 winner in the Mono category is Rodrigo Queipo of Argentina. He used Mono's XSP ASP.Net server and SQL Server 2000 SP4 for the database.

    Both entries duplicated the look and feel of the original application to the smallest detail and can be accessed from the Race to Linux Website.

    Congratulations to the winers!

    Update: I registered to download the ports and they run out of the box. You type run.sh and its up and running on Linux:

    The Race to Linux site has the description on how the port was done by each participant.

    Posted on 18 Apr 2007


    Introducing: gui.cs

    by Miguel de Icaza

    Update: almost 12 years after I wrote this post, I have a 2019 Update on gui.cs

    Every once in a while, people ask us "Will the Mono project implement WPF/XAML?" or "What is your position on Apollo?".

    Some suggest that we must have a one-to-one implementation available in Mono. Some others believe that we should implement a new GUI toolkit and plot our own destiny.

    Some argue that to win the hearts and minds of the Linux community we should appeal, not only to the desktop users, but also to other members of the community: system administrators, designers, musicians, perl programmers and users of Midnight Commander.

    There has been a lot of debate over Flash, Adobe's Atlas and WPF/E and how these technologies might be the future of application development.

    For the past few months we have heard you loud and clear. And we have been working on a technology that we believe will revolutionize user interfaces.

    Today we are announcing the response to Microsoft's WPF/XAML, a response to Flash and WPF/E. A cross-platform GUI toolkit (supports Windows, MacOS and Linux and is easily ported to new platforms) written entirely in managed code and 100% open source. It is completely licensed under the MIT X11 license terms as well, for your freedom-zero needs.

    We have been developing this under secrecy until we had something worth showing to the world. It builds on years of building user interfaces, toolkits and frameworks.

    This is a preview release, currently the major sample application is a BitTorrent client built using Alan McGovern and Gregor Burger's MonoTorrent library (Alan and Gregor wrote this library as part of Google's Summer of Code 2007).

    You can download a tarball from here, browse the source code here. To build the software, you will need to also download monotorrent and edit the Makefiles accordingly.

    The BitSharp GUI is something that I quickly put together this weekend, so it might need some extra polish, feel free to send your MIT X11 contributions my way.

    Everyone loves screenshots, you can see a few screenshots here. Or go directly to main window, torrent control and options configuration.

    You can also see an early prototype, from the days when no color was yet supported on it here.

    Some documentation is here.

    Windows.Forms UI for BitSharp

    In other news, there is now also a Windows.Forms GUI for the BitTorrent BitSharp libraries, available in http://code.google.com/p/monotorrent/.

    Posted on 16 Apr 2007


    Google Summer of Code 2007: Mono Project

    by Miguel de Icaza

    The Google Summer of Code has begun!

    A grand total of 24 students were accepted this year to work on various projects related to Mono. The list of students and projects accepted is available here.

    For those interested in tracking the progress of the 24 projects over the summer, we have created a group for the students and mentors here.

    Guidelines for students have been posted in the reference page.

    And we have also created a Google Code Hosting site for all students to upload their code. If you want to track the actual source code development, the group is at http://code.google.com/p/mono-soc-2007/.

    Update: fixed the links.

    The list of accepted projects are:

    by Ivan Zlatev, mentored by Miguel de Icaza
    by David Srbecký, mentored by Martin Baulig
    by Brian Nickel, mentored by Marek Habersack
    by Hector Enrique Gomez Morales, mentored by Mike Kestner
    by Jeff Tickle, mentored by Mike Kestner
    by Lukasz Knop, mentored by Sebastien Pouliot
    by Christopher J Parnin, mentored by Sebastien Pouliot
    by Jesse Tov, mentored by Raja R Harinath
    by Ben Motmans, mentored by Miguel de Icaza
    by Marcos Cobeña Morián, mentored by Atsushi Enomoto
    by Laurent Debacker, mentored by Mike Kestner
    by George Giolfan, mentored by Miguel de Icaza
    by Gernot Margreitner, mentored by Alan McGovern
    by Jared Hendry, mentored by Alan McGovern
    by Leonardo Pires, mentored by Marek Habersack
    by Néstor Salceda, mentored by Sebastien Pouliot
    by Artur Dwornik, mentored by Raja R Harinath
    by Marcos David Marin Amador, mentored by Michael James Hutchinson
    by Kenneth Parnell, mentored by Atsushi Enomoto
    by Scott Peterson, mentored by Aaron Bockover
    by Matej Spiller-Muys, mentored by Atsushi Enomoto
    by Andrew Pendleton, mentored by Miguel de Icaza
    by Nidhi Rawal, mentored by Sebastien Pouliot
    by Khaled Mohammed, mentored by Massimiliano Mantione

    Posted on 12 Apr 2007


    First few hours with the Sansa Connect

    by Miguel de Icaza

    As of 2pm am the happy owner of the Sansa Connect.

    The Sansa Connect runs Linux and uses Mono for its user interface, so am 100% biased about the level of awesomness that the device has.

    Opening up the Sansa Connect

    Zing should open up the development for the Sansa Connect.

    The device has tons of potential: the great color screen, the Wifi, their custom-built GUI toolkit and the fact that they use C# and Mono to build all of this stuff.

    In the last couple of hours, knowing that the device was running Linux and Mono, I could not stop thinking of the things I would like to implement:

    • Expose an http interface, so I can post songs to it over the WiFi instead of the USB.
    • Expose my device through HTTP, so I can download song from it using a Web client.
    • Post my songs to last.fm in addition to the Yahoo service.
    • Stream music from last.fm (we already have all the code to play it back) in addition to yahoo streaming.
    • Share my music list over Jabber (this is what Google Talk uses). I sadly have no friends in Yahoo Messenger, as I never have used it.
    • Add a picasa client for the pictures using Google-Sharp, again, because I gravitate in the Google universe instead of the Yahoo universe.
    • Allow the machine to stream from Shoutcast, HTTP or DAAP servers on my local networks (what I have at home and at work), this would automatically make it a client for the various iTunes machines around and use my server at home as my streaming source.
    • Update: I forgot to mention (thanks bhale!) last.fm playback (we already got the C# code, last-exit).
    • Games ;-)

    I understand that going from being an embedded system vendor into a platform provider might not be easy but opening up the platform just a bit would achieve plenty. All that would be needed is:

    • Publishing the assemblies that the device exposes. The community can use `monop' to actually generate the public class definitions and prototypes. We could get by with little or no documentation.
    • Documenting a process for re-flashing, uploading or tricking their operating system into loading the new assemblies.

    A hackable platform for portable media players would be one way of differentiating from the iPod. Growing an ecosystem of third party developers that produced applications and components for Zing's tools would make these devices more appealing than the iPod is.

    The WiFi on the device and the complete stack really open tons of new options on this device.

    Early Impressions

    The device came in one of those plastic seals that are known to have caused more deaths that drunk driving in Guatemala. After a few seconds of Googling I gave up and teared the thing apart by cutting and bending until the thing was reduced to pieces of confetti. In the process I ruined Katey's scissors. Sorry about that Katey.

    There was a sticker that said something along the lines of "IMPORTANT: Do not plug this device before installing the software". Or something about not turning it on before doing something. I would report the actual wording if the sticker was not burried underneath the remains of my tuna sandwich and the potato leak soup that I threw in the garbage can.

    I ignored the sticker, because programmers know best. And besides, I was not going to plug it into Windows, I was going to plug it into Linux.

    The device does not expose a USB mass storage interface, instead it exposes a Media Transfer Protocol (MTP) interface. Luckily we can use libgphoto2 and libmtp to access the device.

    With the libmtp clients you can actually copy files into the device (the clients command line arguments are awful) which worked to upload "Don't fear the Reaper" and get enough cowbell out of it.

    My Banshee was not compiled with MTP support and Amarok hung while trying to access the device. I shall look into recompiling my Banshee later with the proper support.

    Internet Radio and the WiFi

    This was fantastic. You select a wireless network and the little guy goes and gets an IP address and lets you play internet radio and browse Flickr pictures.

    The Flickr browser seems fine, but am not really a Flickr user. It appears to come with a Yahoo messenger, but since I have exactly zero friends on my Yahoo Messenger (pretty much everyone I know has moved to Google Talk) I have not even tried it.

    Service

    I am still pondering whether it is worth buying a Yahoo subscription for the device. The radio streaming from the radio stations on the device is pretty passable so am left wondering if I really want to give Yahoo 14 bucks a month. Am already paying Rhapsody and at least Rhapsody has a Linux web player (it sucks, but at least I can play it on Linux).

    Two questions: Yahoo advertises that they have 2 million songs on Yahoo Unlimited. I am pretty used and happy with the music selection at Rhapsody, but I could not find how the music collections at both sites compare.

    Rhapsody does not let me play music when am traveling outside of the US. I once read the excuse, but it must have been incredibly lame because I did not bother to remember it.

    Would Yahoo let me play music when I travel? Decisions, decisions.

    If I buy the Yahoo service, would they allow me to http get DRM-ed songs to upload to my device, so I can play all my music on Linux?

    Posted on 10 Apr 2007


    Sansa Connect is Shipping

    by Miguel de Icaza

    The Mono-based Sansa Connect MP3 player is now shipping.

    The device comes with WiFi and 4 gigs of space for 250 dollars (50 dollars more expensive than the equivalent iPod, but comes with WiFi, internet radio and a Flickr browser). It has an expansion slot, so you can add more memory to it, so you can upgrade the space without upgrading the hardware and it integrates with Yahoo Music.

    I will be ordering mine today.

    Engadget has an updated review, it is pretty good, but they say regarding the music services:

    We're disappointed that the Connect isn't a little more open than it is; we'd like to be able to stream whatever the heck we want for starters, but Yahoo! Music Unlimited and LAUNCHcast aren't bad starts. Now the trick is to keep up the WiFi momentum for these things -- Apple, Creative, iRiver, Archos, we're looking straight at you!

    Someone on the blog comments a few months ago asked whether Zing would open up the platform for people to develop plugins for it, but it seems that at this point they have no plans to do so. I wish they did.

    Online Music Services

    A problem with the Sansa Connect is that Yahoo Music does not have a Linux client.

    I am currently a Rhapsody user, and I use it mostly on the Windows machine that I use for testing .NET and reading the MSDN documentation. Although Rhapsody has a Linux client, you must be using Firefox to play your music (they use a firefox plugin and a web page with Javascript for their web player).

    The situation is far from ideal, I would much rather have Banshee be my music front end.

    So this weekend I tried to make a fake plugin host that would trick the Rhapsody plugin into loading, but am getting one misterious crash while calling NP_Initialize in the plugin (it loads Flash just fine) (source here, in case someone feels like debugging it).

    Posted on 09 Apr 2007


    First Race to Linux, Winners

    by Miguel de Icaza

    Lam Loune is the winner of our first Race to Linux. Lam is from Australia and ported Microsoft's Small Business Starter Kit to Linux.

    Lam picked Mono and XSP to do the port, he completed the port in five hours and twenty six minutes (5:26) since the race started.

    Hector Ramirez from Mexico was the first to port the Small Business Starter Kit to Linux using Grasshopper (so the software runs on a Java VM). Sorry, I do not have the time for this one.

    They both won Wii's.

    The Small Business Starter Kit is a sample ASP.NET 2.0 application that Microsoft distributes for people to study the patterns and best practices while developing a web application.

    This race shows that although Mono and Grasshopper do not have a 100% coverage for the entire application stack, it is possible to port most ASP.NET code out there.

    And its also interesting that the port was done by two newcomers to Mono.

    Check the Race to Linux page for upcoming articles describing how these applications were ported.

    Congratulations to Hector and Lam, and good luck for the folks on the second Race!

    Posted on 31 Mar 2007


    Mexico City

    by Miguel de Icaza

    Am flying to Mexico City for the week; Mauro convinced me to buy a cheap ticket through Kayak.

    Tacos tonight!

    Posted on 31 Mar 2007


    Google in the News

    by Miguel de Icaza

    Two fascinating bits today:

    Google using solar power in the Google campus:

    The move to solar made sense for Google, and not just "hippie Gaia-loving" sense. Ravitz said that Google will earn its investment back in 7.5 years, after which it will continue to enjoy inexpensive power for decades. With the company sprawled across a large campus of many low buildings, roof space was easily available. Solar also has the unique property of pumping out more energy when power is the most expensive --- peak afternoon hours. When air conditioners across California kick into action on sunny days, Google generates the most power.

    Then the fantastic response to Viacom. Worth reading the whole thing:

    Viacom is attempting to rewrite established copyright law through a baseless lawsuit. In February, after negotiations broke down, Viacom requested that YouTube take down more than 100,000 videos. We did so immediately, working through a weekend. Viacom later withdrew some of those requests, apparently realizing that those videos were not infringing, after all. Though Viacom seems unable to determine what constitutes infringing content, its lawyers believe that we should have the responsibility and ability to do it for them. Fortunately, the law is clear, and on our side.

    Posted on 30 Mar 2007


    Interview

    by Miguel de Icaza

    A few years ago I met Andreas Proschofsky, a reporter that knew a lot about Mono dynamics, group and technicalities. It has ever since a pleasure to do interviews with Andreas as they are typically interesting conversations.

    This year I did not attend the Brainshare conference so we did an email interview on the state of Mono. And this year he published it in English.

    Re-reading my replies looks like they were answered by a robot though, it certainly felt more human when I originally replied to that email.

    The crowd at OSNews got upset because I said advocate more collaboration between Mono and Microosft. It is hardly news, I advocated the same thing in August during an interview that I did with Sam Ramji from Microsoft, before I knew of any MS/Novell collaboration.

    Posted on 26 Mar 2007


    Bill Maher Monologues

    by Miguel de Icaza

    The last two weeks the "New Rules" Monologues from Bill Maher have been fantastic. They are now available on YouTube:

    Posted on 25 Mar 2007


    Lame Blog: The Official Entry

    by Miguel de Icaza

    This is the official blog entry for the spicy Lame Blog an under-powered, static content, C# and rsync based blog system.

    LameBlog is powered by almost nothing, the idea is that you edit text files with your favorite text editor on your computer, and when you feel like publishing your blog entries you type "make push".

    Configuration of LameBlog is done through an XML file and editing a Makefile. It contains enough so you can hook reddit/digg and plug your Google Analytics, Google Reader sharing and to do posts with Google groups.

    Ismael Olea has modified LameBlog for using Haloscan for comments and include a bunch of "flag me as a cool cat" options.

    To download LameBlog, click on "download as tarball" on the link above, read the README file for details on how to install this.

    Update: folks, I need your help. Please link to this blog entry, there are tons of Google matches for "Lame Blog", but only a piece of software deserves to be at the top spot, not some lame entry about blogging.

    Posted on 24 Mar 2007


    Second Ad

    by Miguel de Icaza

    A follow up to yesterday's spoof ad from Novell. This is part 2. Click here for watching it at YouTube.

    Alternatively, you can get the mpg or ogg files directly from Novell's site.

    Posted on 21 Mar 2007


    Novell Linux Ad

    by Miguel de Icaza

    Yesterday at Brainshare Novell had this video spoof on Apple's campaign.

    Direct link

    Mhm, it seems to go down (some "high database load" message or something). If you have problems go here: http://www.novell.com/video and then click on "PC Mac Linux (0:55)".

    Or you can download the mpg file or ogg file.

    Other videos from Brainshare are here.

    Posted on 20 Mar 2007


    Shader Languages

    by Miguel de Icaza

    The other day I wrote:

    The other day Cody Russell was asking on IRC what we could do in the Mono universe to take advantage of some special instruction sets like SIMD or how to use C# to generate code for pixel shaders or vertex shaders.

    One idea that we discussed was the creation of a library that would be able to expose this kind of functionality.

    jeevan.james pointed out on the comments to that blog entry that there is already a project that is working on precisely this idea.

    The project is called Brahma-FX and is hosted at SourceForge. And its implemented in a similar spirit that I described on that post.

    They use C# as the language to express the shading operations, they decompile the code at runtime and compile that to the hardware specific shading system.

    For example to invert an image, they write:

    
    	public override void Compute (Vector2 kernel_position)
    	{
    		Vector4 color = Sample2D (0, kernel_position);
    		Output = new Vector4 (1.0f - color.X, 1.0f - color.Y, 1.0f - color.Z, 1.0f);
    	}
    	

    Currently they have a compiler only for DirectX (and stubs for OpenGL and XNA) it looks like a great project to contribute to.

    Ananth's blog is here.

    Posted on 19 Mar 2007


    SIMD support in Mono

    by Miguel de Icaza

    The other day Cody Russell was asking on IRC what we could do in the Mono universe to take advantage of some special instruction sets like SIMD or how to use C# to generate code for pixel shaders or vertex shaders.

    One idea that we discussed was the creation of a library that would be able to expose this kind of functionality. Take for example the following Cg example:

    // input vertex
    struct VertIn {
        float4 pos   : POSITION;
        float4 color : COLOR0;
    };
    
    // output vertex
    struct VertOut {
        float4 pos   : POSITION;
        float4 color : COLOR0;
    };
    
    // vertex shader main entry
    VertOut main(VertIn IN, uniform float4x4 modelViewProj) {
        VertOut OUT;
        OUT.pos     = mul(modelViewProj, IN.pos); // calculate output coords
        OUT.color   = IN.color; // copy input color to output
        OUT.color.z = 1.0f; // blue component of color = 1.0f
        return OUT;
    }
    	

    A C# rendering of the above would be:

    class MyShader {
    	struct VertIn {
    	    [Position] float pos;
    	    [Color]    float color;
    	};
    	
    	// output vertex
    	struct VertOut {
    	    [Position] float pos;
    	    [Color]    float color;
    	};
    	
    	// vertex shader main entry
    	public VertOut main(VertIn IN, [Uniform] float4x4 modelViewProj) {
    	    VertOut OUT;
    	    OUT.pos     = mul(modelViewProj, IN.pos); // calculate output coords
    	    OUT.color   = IN.color; // copy input color to output
    	    OUT.color.z = 1.0f; // blue component of color = 1.0f
    	    return OUT;
    	}
    }
    	

    The above is a direct translation. Now, the value of the library would be basically a method that generates a delegate with the proper signature:

    
    	Delegate Compile (MethodInfo method)
    	
    	

    It would be used like this:

    	delegate VertOut main_delegate (VertIn In, [UniForm][float4x4] model);
    	...
    	main_delegate shader;
    	shader = (main_delegate) Compile (typeof (MyShader).GetMethod ("main"));
    	...
    	shader (my_in_data, model);
    	

    The Compile method would use the Cecil library to decompile the code, perform flow analysis and ensure that the code in the method passed (in this case main) meets the restrictions imposed by the target (in this case Cg's target).

    In some cases (SSE instructions) you might want a delegate back, or a method token that you could then Reflection.Emit call. In some other cases you might want the code to give you some handle back that you can pass to your graphics hardware.

    (Cecil has a very nice flowanalysis engine, the one used by db4objects to provide the LINQ-like functionality with today's C# compilers).

    The above model can be extended to other operations, and in some cases the return value from Compile could be just a delegate to the original method (if the hardware is not supported).

    Today a student interested in doing something very similar for the Summer of Code emailed me, so I decided to dump here some of the ideas.

    Posted on 15 Mar 2007


    Mono and the Google Summer of Code

    by Miguel de Icaza

    The Google Summer of Code has started. Students interested in participating in the Summer of Code need to submit their applications in the next ten days.

    Some ideas of interesting things that can be done with Mono are available in our Student Projects page.

    If you think that you have a good idea for a project to be implemented for Mono, but is not listed on that page, feel free to submit your idea.

    We are looking at improving Mono's OSX support (Winforms, debugger support, improving Cocoa#); new ports and improving existing Mono ports; Profiling Mono, Gtk#, MonoDevelop; low-level optimizations; New Windows.Forms widgets; Work on 3.0 components and libraries; Improving MonoDevelop and creating new C# class libraries for Mono.

    Other Apps: We are also interested in tasks improving popular Mono-based applications for the desktop to showcase how great building applications with Mono is. Make sure you send your submission on time.

    Posted on 15 Mar 2007


    Eiffel now Open Source

    by Miguel de Icaza

    One of my favorite books is Bertrand Meyer's Object Oriented Software Construction

    The book explores object oriented programming using the Eiffel language and one of the things that I always loved about Eiffel was the defensive programming techniques that it teaches and the strong focus on contracts and preconditions (a technique that is used extensively in Gnome).

    Until very recently I had not noticed it, but the Eiffel compiler and the Eiffel suite of libraries and even the development IDE (EiffelStudio) were open sourced (Emmanuel mentions this to me during the Lang.Net conference and I do not remember any big news about it).

    They have just launched a community site Eiffel Room.

    There are a bunch of Flash-based presentations on Eiffels here.

    In this presentation you can see a demo of the IDE. In particular see the "System Metrics" section.

    Posted on 13 Mar 2007


    Value Types and Null

    by Miguel de Icaza

    Anyone has any idea of what is going on with value type comparisons against null in the Microsoft C# 2.0 compiler (and also the Orcas compiler exhibits this problem):

    The compiler allows code like this:

    	DateTime dt = DateTime.Now;   // this is a value type
    
    	// Compare value type to null, invalid in CSC 1:
    	if (dt != null){
    		// ...
    	}
    	

    The problem is that the above is always known to be false (dt can not be null), so CSC generates generates the equivalent to "if (true)" every single time (it becomes a no-op).

    Adding support for this to the Mono compiler is simple enough but this sounds wrong. Because those testing a value type against null are doing a pointless test and they might be under the mistaken impression that the test is guarding them from an invalid state which it is not.

    A few folks have reported this, but I can not find any rationale for this in the ECMA spec, it sounds like a bug in Microsoft's compiler related to the nullable-type support in their compiler.

    Posted on 13 Mar 2007


    Mono on the Nokia 770 and 800

    by Miguel de Icaza

    Everaldo and Wade have now published packages for Mono on the Nokia 770 and 800.

    Visit our Maemo page to install the packages on your device.

    The packages feature single-click install, and will add the repositories to your system so you can install only the pieces of Mono that you need to run specific applications.

    Posted on 12 Mar 2007


    Must Blog This: Bush in Latin America

    by Miguel de Icaza

    As I said two days ago Bush is not really loved in Latin America.

    Wonkette asks the question: "Are the protesters hot?" on their "South Americans Welcome George W Bush -- With Style".

    The answer: not safe for work.

    This is the first time I link to Pravda, but they got photos of the welcoming.

    Posted on 09 Mar 2007


    Mono JIT Developer.

    by Miguel de Icaza

    We are looking for a developer to work on Mono's JIT engine.

    What: We are looking for someone that would be interested in porting the Ahead-of-Time compilation engine in Mono for ARM processors and look at improving Mono startup performance on small devices.

    You would work on both the virtual machine and the class libraries to improve performance and reduce memory usage for embedded systems.

    Experience with assembly language, compilers, virtual machines, performance and garbage collectors will be useful, but it is not necessary. We are looking for a talented individual that is not scared by hard tasks.

    How: If you are interested, email me, you will later receive a challenging interview to respond to.

    Where: You can either work in the Boston office, or from home.

    Why: Because we got a fantastic logo, which is much better than Microsoft's logo for .NET and working on Mono is a blast.

    Posted on 09 Mar 2007


    FOSDEM Presentation

    by Miguel de Icaza

    My "Turbocharging Linux With Mono" presentation from FOSDEM is now online, it is a pretty large file (300 megs) but you get to hear Coca Cola guy at the end.

    The presentation is here.

    At night, I kept running into Michael Meeks and Simon Phipps in all these tiny bars in town. Simon did a quick interview on Sunday.

    Posted on 08 Mar 2007


    It made me smile

    by Miguel de Icaza

    From Google News a few minutes ago:

    That made my day, funniest thing so far!

    If you thought that Europe was less than supportive towards the Iraq war you have not seen Latin America. Unlike the US population that has kind of grown tired of the Iraq war in the last year, Latin America has been fuming over the retardedness of it way before it started.

    He is not going to meet a friendly audience, so unless he throws money out of the windows, announces a withdrawal from Iraq, agrees to pay reparations and announced an "open doors policy" this trip is not going to win him any bonus points.

    A timely Common Dreams article.

    Update from Friday: This is now in Reddit's home page, it links to this article:

    Second Update:

    GUATEMALA CITY - Mayan priests will purify a sacred archaeological site to eliminate "bad spirits" after President Bush visits next week, an official with close ties to the group said Thursday.

    "That a person like (Bush), with the persecution of our migrant brothers in the United States, with the wars he has provoked, is going to walk in our sacred lands, is an offense for the Mayan people and their culture," Juan Tiney, the director of a Mayan nongovernmental organization with close ties to Mayan religious and political leaders, said Thursday.

    More updates, this is the Wonkette coverage. Wonkette asks the question: Are Brazilian protesters hot?: "Of course they’re hot! They’re Brazilian, for god’s sake.".

    Posted on 08 Mar 2007


    Fun Mono Updates

    by Miguel de Icaza

    Jackson has a couple of blog entries where he discusses how to use memcached for doing output caching of ASP.NET pages. Memcached was created to improve the performance of LiveJournal:

    Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. memcached dropped the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.

    His memcached module is described here and an explanation on why and how to add caching to your ASP.NET controls is here.

    What is interesting about Jackson's approach is that it hooks up to ASP.NET's caching system and allows caching to be parameterized based on some values (for example, your login name would update only the login-bound information, but information that does not depend on this would be rendered from the cache).

    Hopefully Jackson's work will become a standard part of Mono installations in the future.

    Windows.Forms 2.0 Updates

    Jonathan Pobst has posted some screenshots showing the progress from Mono 1.2.3 released a few weeks ago and the current SVN for some of the 2.0 Strip controls:

    click for full image.

    The Winforms team has been using our Paint.NET 2.72 port as a test case, see Jonathan Pobst's blog for more screenshots.

    Jackson is also running a screenshot contest for Mono's Windows.Forms.

    Jeff's new MonoDevelop Indent Code

    Jeff Stedfast recently joined the Mono team, his first contribution was the implementation of a smart indenter for MonoDevelop's C# mode.

    We basically wanted something that indented as well as Emacs would indent C# code. See his blog entry for details, the code is now checked into SVN in the module "monodevelop".

    ASP.NET 2.0 support improving

    Marek got a few new features implemented for ASP.NET: Themes are now working, and MojoPortal 2.0 works with Mono now:

    Marek also reduced the space that we consume for ASP.NET setups. Instead of creating a new temporary directory every time, we now create predictable directory names based on the assembly name.

    We have run into a number of small problems with our TDS provider when porting applications that use MS-SQL stored procedures. Luckily Andreia Gaita has a patch that should be going into SVN in the next couple of days that resolves that.

    Posted on 07 Mar 2007


    Need some Google Help

    by Miguel de Icaza

    Folks, it has come to my attention the fact that my blog uses Google Groups is not very Web 2.0-ish, or is not very bloggy of me or something. Either that, or people have not been flaming me in public as much as I hoped to.

    Part of the challenge is that my blog system is based on purely static HTML pages, and I would like to keep it that way. I get it for free (Thanks Gonzalo!) and server side solutions feel like cheating.

    So I had a two-prong idea to address the issue:

    • Add some comment form at the bottom that would post to the Google Group.
    • Add some Json Magic to load the comments that are posted on the Google Group to be rendered on each blog entry.

    Now, it seems that posting to the Google Group requires to be signed on to the group, am not sure if that is even fixable, but I would love to hear your thoughts.

    Now, the second issue must be solvable, there must be a simple set of steps, an HTTP url I can query that would load the content from Google Groups and then render it with some magic jay-son love on the client (just like the cute "shared" links thing on the right side of my blog).

    Google probably already has some JSon generator for this, but I have been unable to Google this information. If anyone knows how to do this, please share your thoughts.

    Again, the trick is that even if I could setup a server-side thing in my hosting provider, it has no hack value. So the trick is basically to do this without burning any CPU cycles on the blog server, am fine with delegating the cycle burning to third parties.

    A combination of Yahoo Pipes, Google searches and clogging the series of tubes with tremendous amounts of material, tremendous amounts of JSon material are all acceptable solutions.

    Posted on 07 Mar 2007


    Race to Linux 2.0

    by Miguel de Icaza

    Very soon we will be launching the The Race to Linux 2.0 together with Mainsoft and IBM. The goal of the Race to Linux is to have ASP.NET developers port applications from Windows to Linux.

    Wii consoles will be given out as prizes. Guys, it is a lot easier to port an application in ASP.NET from Windows to Linux in a record time than it is to keep bidding on EBay for the console and the controls. Been there, been outbidded time and time again.

    The contest will start on March 23rd, if you are interested in participating, check the Race to Linux 2.0 web page.


    What is the Race to Linux 2.0?

    Register for the Race

    Mark your calendars! Races start:
    Race #1 -Friday, March 23rd at 5:00 p.m. (PST) March 24th at 1:00 a.m. (GMT)
    Race #2 -Friday, March 30th at 9:00 a.m. (PST) March 30th at 5:00 p.m. (GMT)
    Race #3 -Friday, April 6th at 5:00 p.m. (PST) April 7th at 1:00 a.m. (GMT)

    If you are a Windows developer, you can get started downloading our VMWare image and reading on the various articles that DevX has published, or you can check Mono's own article archive.

    A good introductory tutorial on porting your applications from Windows to Linux is Paul Ferrill's Migrating .NET Applications with Mono.

    Also, Joe Audette has written a tutorial on how to he setup a Mono Development machine here for those that want to roll out your own installation instead of using our VMware image, but also contains tips for those who want the latest and greatest:

    Posted on 07 Mar 2007


    Web Development Technologies

    by Miguel de Icaza

    Dare is pondering what comes after Ajax, in response to Ted's Adobe Wants to be the Microsoft of the Web.

    On Flash Ted says:

    What is not appealing is going back to a technology which is single sourced and controlled by a single vendor. If web applications liberated us from the domination of a single company on the desktop, why would we be eager to be dominated by a different company on the web? Yet, this is what Adobe would have us do, as would the many who are (understandably, along some dimensions, anyway) excited about Flex? Read Anne Zelenka’s post on Open Flash if you don’t think that Flash has an openness problem. I’m not eager to go from being beholden to Microsoft to being beholden to Adobe.

    And later touches on OpenLaszlo, but OpenLaszlo is a server-side engine used to generate Flash, so the runtime remains the same (Yes, I know that Laszlo can now generate DHTML, but Ted's point was that Javascript was too slow for large apps running on a browser).

    Dare wants to add WPF/E to the list of web development technologies, and argues:

    Ted Leung mentions two contenders for the throne; Flash/Flex and OpenLaszlo. I'll add a third entry to that list, Windows Presention Foundation/Everywhere (WPF/E). Before discussing what it will take for one of these contenders to displace AJAX, I should point out that being "open" has nothing to do with it. Openness is not a recipe for success when it comes to development platforms. According to TIOBE Java is the most popular programming language today and it was a proprietary language tightly controlled by Sun Microsystems. Before that, it was commonly stated that Visual Basic was the most popular programming language and it was a proprietary language controlled by Microsoft. I believe these count as existence proofs that a popular development platform can rise to the top while being controlled by a single vendor.

    WPF/E has a number of challenges ahead of it: Flash-based development environments are very advanced both for designers and developers and are going through their Nth iteration, while WPF/E is not even officially launched.

    WPF/E is currently limited to Windows and the Mac, which you could argue makes up the majority of the platforms, but Flash works today on Linux and various embedded systems and portable systems.

    But like Flash, it is another proprietary tool, and the whole point of Anne Zelenka's post and Ted's comment. He wanted something that did not lock him into a vendor.

    WPF/E best feature is probably the fact that generating XAML files is trivial and requires no special tools or compilers. echo, cat and perl will generate XAML output right away. A bonus feature would be deserialization from a JSON structure in addition to XML.

    WPF/E feels more webby than Flash does.

    Then again, Flash could add support for hydrating elements from an xml or json sources as well.

    Unlike its "big brother", WPF, the WPF/E is framework looks fairly simple so far. The subset of WPF is reasonable, it is sufficiently opaque that a developer with a lot of spare time in its hands could implement it fairly rapidly.

    A major drawback seems to be the use of WMV as a video format. If there is one thing that the video industry has learned is that WMV and MOV do not work. They barely work on their native platforms, they are ridden with glitches, upgrades sometimes break and of course they do not work on Linux.

    Ignoring the WMV file format support, WPF/E has so few external dependencies today, that someone looking for a cool use for Antigrain could implement a prototype in a few weeks and get a community going in no time to finish it up (Alp has been showing around his record-time XPS renderer and viewer around).

    Flash as an Open Platform?

    Flash has really succeeded in the area of working out of the box, even on the Linux desktop the experience is outstanding (the proprietary Flash).

    The best possible outcome for the world would be to follow Sun's path in open sourcing Java and open source both Flash and WPF/E.

    Adobe is not making any money on the Flash player today on the desktop. On the mobile space the story is different, they could probably license Flash under terms that required mobile vendors to get a proprietary license (I imagine they could look into what Sun did with their mobile runtime, which would be a similar situation).

    Microsoft is not going to be making any money on the WPF/E player either, and since they are limited to Windows and MacOS X (today) they are not going to be making any money on that one either.

    If Microsoft is serious about WPF/E, open sourcing it would eliminate the doubts about WPF/E's future and the fact that some people perceive WPF/E to be a slippery slope to a full blown WPF use and tie-in (in my opinion, it is more of a rocky slope to move a WPF/E app to a WPF one).

    Dare on Java

    But I think that Dare gets this wrong:

    Before discussing what it will take for one of these contenders to displace AJAX, I should point out that being "open" has nothing to do with it. Openness is not a recipe for success when it comes to development platforms. According to TIOBE Java is the most popular programming language today and it was a proprietary language tightly controlled by Sun Microsystems.

    Even if Java was tightly controlled by Sun in the past, they did have a mechanism that was open enough to get third party companies involved in the future of Java.

    Anyone could argue that the JSR process has managed to mess up key components like Generics and has inflicted humanity with mistakes like the J2EE stack.

    But the JSR process is still relatively open. And even before Sun open sourced Java in November there were a number of independent Java VM vendors, both open source and proprietary (specially on the embedded market).

    Java became successful because it filled a space that was previously not properly serviced. At the time it hit a sweet spot.

    In the meantime, as far as Rich Internet Application development goes, we will continue to use a mix of technologies. It seems that the browser is becoming the universal runtime and it has opened the doors for incredible opportunities with the mashups. WPF/E is ready to enter the mashup scene, something that am not sure WPF will ever do.

    Ted's Update

    Update: Ted follows up.

    Posted on 06 Mar 2007


    FOSDEM

    by Miguel de Icaza

    This conference was just too good.

    There is no blog entry that can make justice to how good this was. The tiniest details were taken care of, like having food and drinks all day (for those of us who could not make it to our hotel breakfasts this was a life saver).

    I think that part of the success of FOSDEM is that after the conference adjourns, folks can go back to the hotels, freshen up, go to dinner and then bar hoping and run into the attendees until 3am in the morning.

    FOSDEM deserves a full blog post in full detail, but for now a big thank to everyone that made this possible. I have not enjoyed a conference this much for years.

    Posted on 01 Mar 2007


    Best Tech Support So Far.

    by Miguel de Icaza

    So I got to Mexico and my 3G connection did not work, so I repeated the European steps and called Cingular Tech Support to complain that something was wrong with my 3G card in Mexico.

    Since neither the 2g or 3g lights turned on and this was working in Boston and Washington, it must have been some configuration issue on Cingular's side.

    I explained to the tech guy my situation, and he walked me through the usual "connection manager", "try a different setting", "eject your card", and so forth and I pretended to do the Windows steps with the equivalent Linux command as far as I could.

    My goal in this call was to avoid saying that I was using Linux, I feared they would just say "Sorry, we dont support that" and hang up.

    There was the dangerous "What does the connection manager say?", to which I replied "Mhm, no network". And "What version of it you have?" to which I replied "Well, I use the equivalent, its called yast".

    But then the fatal, "Which version of Windows is this?" to which I had to say "Linux".

    Contrary to what I expected, he said "Can you configure the AT commands or enter them?", I said I could, I launched minicom and he walked me through the process of configuring the Sierra card (probing for providers, selecting the provider, reseting the card).

    He determined during the call that there was a setup problem with Mexico's provider, he was able to patch that stuff on their end and got me going with a 2g connection after a little while.

    Many thanks to Mr Robinson in tech support over at at&t

    Posted on 01 Mar 2007


    Covert Operations in Iran

    by Miguel de Icaza

    On Februrary 16th, in an interview with Noam Chomsky, the interview is one of Chomsky's best.

    At one point he speculates about the potential strategy being applied to Iran:

    [...] So it could be that one strain of the policy is to stir up secessionist movements, particularly in the oil rich regions, the Arab regions near the Gulf, also the Azeri regions and others. Second is to try to get the leadership to be as brutal and harsh and repressive as possible, to stir up internal disorder and maybe resistance. And a third is to try to pressure other countries, and Europe is the most amenable, to join efforts to strangle Iran economically. Europe is kind of dragging its feet but they usually go along with the United States.

    This week Seymour Hersh publishes on the New Yorker some of his findings. The article makes the case that the US is now funding terroristsfreedom fighters in Iran to destabilize the regime (as speculated by Chomsky before). The article also happens to match some of Chomsky's observations.

    For a quick overview you can watch this video interview with Seymour Hersh.

    Chomsky:

    It’s very hard to predict the Bush administration today because they’re deeply irrational. They were irrational to start with but now they’re desperate. They have created an unimaginable catastrophe in Iraq. This should’ve been one of the easiest military occupations in history and they succeeded in turning it into one of the worst military disasters in history. They can’t control it and it’s almost impossible for them to get out for reasons you can’t discuss in the United States because to discuss the reasons why they can’t get out would be to concede the reasons why they invaded.

    If you listen to Seymour's interview it seems that the strategy is going from "unimaginable catastrophe in Iraq" to "unimaginable catastrophe in the whole Middle East".

    In the meantime, it turns out that the weapons that were presented a couple of weeks ago as being "manufactured in Iran" turned out to be manufactured in Iraq.

    If that was not enough, the UN Calls US Data on Iran's Nuclear Aims Unreliable:

    The officials said the CIA and other Western spy services had provided sensitive information to the Vienna-based International Atomic Energy Agency at least since 2002, when Iran's long-secret nuclear program was exposed. But none of the tips about supposed secret weapons sites provided clear evidence that the Islamic Republic was developing illicit weapons.

    "Since 2002, pretty much all the intelligence that's come to us has proved to be wrong," a senior diplomat at the IAEA said. Another official here described the agency's intelligence stream as "very cold now" because "so little panned out."

    For those of us too cynical to believe anything the Bush administration has to say on any matter, this is hardly news. But it is always nice to see them debunked in public.

    Posted on 27 Feb 2007


    Getting Ripped Off: A Consolidation Strategy

    by Miguel de Icaza

    Last week I described how international travel for an Internet addict can be very costly, 10 euros here, 12 dollars there 20 euros for 24 hours there and very soon you have paid a hundred dollars in a two-day trip on Internet access fees.

    Now, instead of paying half a dozen people to get WiFi access, I have consolidated my "getting ripped off" with AT&T. Now they bill me an insane amount for getting "3G worldwide access".

    Two problems though: "3G worldwide" actually means "3G in Boston, and 9600 baud modem speed in Europe". During the entire trip I could not get the "3G" light on the card to turn on, it consistently stayed in "2G" mode.

    But just before you think "Well, GPRS/2G is not so bad", I want to point out that it took 25 seconds to load www.google.com.

    Posted on 27 Feb 2007


    Usability Interview with Anna Dirks

    by Miguel de Icaza

    Ted Haeger interviews Anna Dirks.

    Anna leads the team at Novell that was in charge of improving the usability of the desktop. Her team launched Better Desktop, the Tango Icons and prototyped, tuned, improved, mocked-up and tested various elements of the usability elements in the SLED desktop.

    Her interview is here in Novell's Open Audio.

    She talks about the process used to design the new features of SLED and it also got a few hints on what is coming up for SLED 10 SP1 (pay attention to the physical weight of the Usability Labs).

    Posted on 26 Feb 2007


    Reflector 5.0

    by Miguel de Icaza

    Lutz Roeder has just released a new version of Reflector:

    This time Reflector will work out of the box with Mono on Unix (no special handling or special flags) and will even detect the presence of your Mono libraries:

    Recently, while implementing the second chunk of lambda expressions, I had to go through all the classes that derived from the Mono.CSharp.Expression and the Mono.CSharp.Statement classes to implement the "CloneTo" methods, and Reflector came in as a great tool to find those classes with minimal fuzz and without wasting any grep batteries in the process:

    Reminder: the use of Reflector to look at third-party code is prohibited if you are planning on ever contributing to Mono. You are free to use Reflector to decompile Mono code though.

    I would have blogged early this morning when the news came out, but I struggled betwen Consolas, Monaco and Tahoma for the screenshot. Solving the dilemma was only possible thanks to the extensive dinner discussion with Garrett and Jeff at Kashmir.

    One great feature is the Reflector Analyzer to explore who exposes, uses, depends or inherits a given type:

    There are no borders on the screenshots due to the way Compiz paints windows on the screen (a separate process paints the decorations).

    Jackson has been fixing various issues in Winforms to improve the rendering. These screenshots are the result of his endless hours of work. Thanks Jackson!

    Posted on 21 Feb 2007


    Feedback requested: FOSDEM Conference

    by Miguel de Icaza

    This weekend am heading to Brussels to the FOSDEM conference. The last time I spoke there, Mono was in its infancy (2002). At the time the C# was about to be self-hosting on Linux, but was not quite there (0.8 and 0.9 releases).

    Now, five years later Mono has gone through 60 releases and is made up of a few million lines of code and has spawned plenty of software projects.

    The question is: What kind of things should I talk about in my two sessions at FOSDEM?

    I have one general Mono session, and one session in the OpenSUSE track. Since Mono is so large, and there are so many interesting things being done with it, I find it challenging to find a good topic to discuss with a technical audience like FOSDEM.

    I could do a general overview and give some high-level overview of what we are doing, but I feel that the FOSDEM audience is probably more interested in something more technical. So I should probably limit my presentations to two or three key topics.

    Should I talk about what is available today, and what are people doing today, or should I talk about the future, and what we want to do?

    Maybe the general session could be about the state of the project and where we want to go in the future; And the OpenSUSE session about the practical things that can be done today. Not sure.

    What would you like to hear about?

    Posted on 21 Feb 2007


    Sierra Aircard 875, Cingular and SUSE Linux

    by Miguel de Icaza

    After being ripped off by hotels and airports for my Internet connections (with some places charging as much as 20 euros per hour, and your standard 10 euro per hour at CDG), I have purchased a 3G card from Cingular and a plan to use it internationally.

    I followed the instructions on this blog post that covers another card on OpenSUSE 10.2.

    With SLED 10 and the Aircard 875, the only difference is that I had to use a different vendor and product ID:

    	# /sbin/modprobe usbserial vendor=0x1199 product=0x6820
    	

    Or alternatively dump that in the /etc/udev/rules.d/51-3g-datacards.rules file.

    Once you configure the modem in yast as described in the above blog post, go to NetworkManager, and select the "modem0" serial connection. There seems to be a bug in NetworkManager, when the modem0 connection is active, the icon seems to go away (am guessing its not finding the icon for it, and hence the applet vanishes).

    A few minutes later, you will be online.

    Am still missing some tools to determine the upload/download speed, anyone have some good pointers?

    Posted on 21 Feb 2007


    Visual Basic Love

    by Miguel de Icaza

    Today we announced the support of Visual Basic.NET in Mono.

    Visual Basic is still one of the most used languages in the Windows world, and with this release we hope to assist a large segment of the population to bring those applications to Unix with Mono.

    Rolf developed the new compiler. The new compiler is fascinating because it is a VB 8 compiler (this means that it supports generics), but also because it is written in VB itself. This compiler was sponsored last summer by the Google Summer of Code (2006 edition).

    The compiler on my laptop takes 12 seconds to compile itself (78,000 lines of code).

    The new runtime (for 1.0 and 2.0) was developed by Boris Kirzner, Guy Cohen and Rafael Mizrahi at Mainsoft and just like the VB compiler it was written in VB, and it is made up of roughly 17,000 lines of code.

    As some people have pointed out, the compiler and the runtime are not enough to run applications. A lot of the portability will be mandated by your API consumption. If your application is based on .NET 1.0, you should be ready to use Mono now. If you are using .NET 2.0, you will need to check whether everything your application needs is supported by using Moma the Mono Migration Analyzer.

    Our 2.0 support these days for ASP.NET and the core is passable. It is not 100% there, but the ASP.NET Starter Kits should run, and so should applications like mojoPortal.

    Posted on 20 Feb 2007


    My Name

    by Miguel de Icaza

    I was reading Rolf's post where he complains that people never get his name right. I am used to it.

    English speakers typically pronounce my name as "Mi-koo-elle", or "Mi-goo-elle", while the actual pronunciation is more like "Mig-elle".

    Bonus Update: Also most English speaking people miss-pronounce "de Icaza" as "di-eye-kaza", but it is pronounced "the-eekaza".

    Posted on 20 Feb 2007


    Updated Main Menu

    by Miguel de Icaza

    Ted Haeger discusses the changes done recently to the Main Menu. Link to the video:

    I love the main menu that Anna's team designed and Jimmy implemented. The KDE folks then improved upon the design and on this new iteration some of the ideas from the KDE design are incorporated.

    The code is available from Gnome's SVN

    Update: Someone at the office told me story of how the "Search" input box at the top of the main menu ended up at there.

    In the early days of the main menu the search bar was at the bottom of the main menu, similar in spirit to Vista, but this prototype existed before Vista integrated it.

    Garrett created a "Gnome Desktop" with HTML and Javascript a few months back, and they used this HTML-based desktop to quickly try out many ideas with different people.

    During the routine usability tests that are conducted in the Cambridge office, one of the tasks that was part of the test was something along the lines of "Find the document that contains foo". But people would not use the built-in search, they did not notice it on the main menu. Instead people went to the file manager and started opening file by file to find the document.

    When the search was moved to the top, the subjects in the usability tests immediately started using it.

    Then Vista released their first menu with search integrated at the bottom of the menu. I have been wondering if the guys in the Vista team had conducted any similar tests with their start menu.

    Joel posted a few months ago his complains about the logoff functionality in the Vista menu. The developer involved in implementing that bit for Vista then blogged about it and followed up here:

    Then someone from the MacOS team weighted in and described the process used at Apple.

    From Ted Haeger's video you can see that logout/shutdown also got redesigned with the new menu. I do not know the story behind how it got implemented (there are now two options: shutdown/logoff in the menu) and both bring up two dialogs with further options.

    It would be interesting from someone on the Novell Desktop team to blog about that process to complement the Vista and OSX postings.

    Posted on 18 Feb 2007


    Gnome Bittorrent Client

    by Miguel de Icaza

    Alan McGovern has created a fantastic BitTorrent client library in C#. The effort was part of last year's Google Summer of Code. Alan continued to tune it and implement many of the protocol extensions after the SoC was over so it is now a very complete.

    We have a very early Gnome UI that was created last year, but it has not been updated very much, and it could really use some work to get it updated.

    The library these days is quite mature and the command line client works well, but we really ought to have a Gnome UI.

    There is also a case to be made for a simple and clean UI for Bittorrents.

    The library, as well as the simplistic UI can be downloaded from here (tarball is here).

    A Winforms UI should also be possible, and am sure our friends in the Windows world would appreciate it.

    MonoTorrent Update

    Alan posted some updates on the current state of the library:

    uPnP support has been enabled in MonoTorrent using Mono.Nat. So all you people with uPnP routers no longer have to worry about manually creating the port mapping in your router. It'll all be done automagically (all going well ;) ).

    ...

    Disk writes are now fully asynchronous, but now will automatically throttle download speed if you are downloading faster than your harddisk can write. So you won't ever get 100s of megs of ram being used and 100% cpu usage when exceeding your write speed.

    Upload and download speed calculations have been improved drastically (ish) for torrents. What i did before was calculate each individual peers upload and download speed, then sum up that for all connected peers to see a torrents overall download rate.

    Posted on 17 Feb 2007


    Compiler Updates - C# 3.0

    by Miguel de Icaza

    Progress on the C# 3.0 front.

    Marek Safar has started blogging. Marek has been a contributor to the Mono C# compiler for a long time and has made the compiler very pleasant to use (fixing bugs, improving errors and warnings and doing some large changes).

    Today Marek checked in his code to add C# 3.0 Extensions Methods to the compiler. More about it on his debut blog entry.

    In the last couple of weeks I implemented the parsing support for C# 3.0 lambda expressions and coded the support for explicitly typed lambdas. Today I added support for overload resolution in lambda expressions.

    Implementing lambda expression support in the compiler was challenging and incredibly fun.

    Parsing Lambda Expressions: The first problem was that the grammar for describing the parameters in a lambda expression caused a lot of conflicts with our yacc-based parser. For example, this is a valid lambda expression:

    	type var = (x, y) => x + y;
    

    The above is problematic because a parser would not be able to tell when it finds the first open parenthesis if it was a parameter list for a lambda expression, or if it is just a parenthesized expression).

    I originally feared that lambda expressions would force us to rewrite the parser from yacc into a hand-coded parser.

    But I came up with a cute solution: when the tokenizer sees the first parenthesis, it starts a minimal hand-coded top-down parser that will parse the lambda parameter list plus the optional arrow, and depending on the result return either a OPEN_PARENS or a OPEN_LAMBDA_PARENS token.

    Implicit Typed Parameters: The second challenge was implicitly typed parameters. Unlike anonymous methods which require the type of the parameters to be specified, lambda expressions do not require them, so it is possible to write code like this:

    	delegate string rets (string s);
    	delegate int reti (int i);
    
    	Foo (rets s)
    	{
    		Console.WriteLine (s ("hello, "));
    	}
    
    	Foot (reti i)
    	{
    		Console.WriteLine (i (10));
    	}
    	
    	Foo (x => x + "world");
    

    The complication is that the lambda expression 'x + "world"' needs to be probed for validity against `reti' and `rets', this means that x can be either a string or an int.

    For this to work, I added a cloning infrastructure that would clone blocks and expressions and attempt to resolve each expression without side effects until a valid lambda expression is parsed.

    Return Rules: Finally, the last interesting bit was the implementation that allowed code blocks or expressions to return values. The body of a lambda expression can be either a block or an expression.

    The problem with expressions is that depending on the delegate type, we might or might not be interested in the result of the expression (void return, no interest; typed return, interest).

    I believe I have a quite elegant solution in the form of the ContextualReturn statement. This is a Statement that is pretty much a copy of our "Return" statement implementation. The only difference is that it would become a "return-with-value" if there is an expected return type and would become a "expression-statement; return" in the case that this was a void return.

    Posted on 15 Feb 2007


    Jon Lech's on Music

    by Miguel de Icaza

    Jon deconstructs the arguments from Steve Jobs recent letter:

    Steve takes as many poetic licenses as necessary to portray himself as the David battling the Goliath.

    Jon has more on his DRM blog.

    Am all for abolishing DRM .

    Posted on 07 Feb 2007


    Packages for Mono on the Nokia 800

    by Miguel de Icaza

    Jarosław Pendowski wrote me to say that he has created proper packages for Mono on the Nokia 800 and the Nokia 770.

    His preview packages are here

    Jarosław is looking for feedback on what else to package. Please comment on his blog.

    I personally think that we should have all the assemblies shipped in units and have proper dependencies. So if an application uses Gtk# and XML, only the dependencies required are installed (System.xml, gtk-sharp*.dll and family).

    If an application needs Windows.Forms and System.Data, only those and its dependencies get installed, but there would be no need for example for Gtk# in that case.

    Posted on 05 Feb 2007


    Mono on the Nokia 800

    by Miguel de Icaza

    I have good news for everyone that has been asking about how to get Mono on the Nokia 800,

    Michael Dominik has posted a HOWTO document to build your own version of Mono from source code on the Nokia 800.

    This is still a developer package to get things going. Ideally someone that understands the Debian packaging system could do the right packaging. My knowledge of Debian packages is limited to the fact that they use the ".deb" extension.

    Posted on 04 Feb 2007


    Mono in Games

    by Miguel de Icaza

    I have talked about Otee's Unity3D in the past. A company that is building a game runtime and development environment.

    Their game runtime provides physics, 3D rendering, audio streaming and execution of developer provided code. Developers can write code in C#, Boo or Javascript, the code gets compiled into CIL, and the Mono runtime turns that into native code, so your javascript is actually compiled down to x86 code.

    The guys at Unity have a few interesting updates:

    Global Conflicst/Palestine: Global Conflicts is about to be released. This game is not a point-and-shoot game, in this game you play a journalist and its your job to interview the players in a conflict.

    CNN interviewed the game developers here and discussed the game:

    WolfQuest: A network based game in which you are part of a wolf pack.

    A video for the wolf-hunting game.

    Libraries: Starting with Unity 1.6 it is now possible to use externally developed libraries, in the past all the code had to be bundled and managed inside Unity.

    This will be incredibly useful to have game widgets that can be reused across multiple games (on-screen keyboard entry, scores, buttons, scrollbars and all the rest).

    BigBrainz: an educational game vendor is moving their games development to Unity.

    More: Unity's updated gallery has many other games and applications (including the new Freeverse games for the Mac):

    We are currently trying to find a collaboration with the Otee guys so the Unity runtime is available for Linux. What we would want is that every game produced with Unity would run unmodified in Linux.

    Today they offer a great "Build for..." button in Unity that today generates game executables for Windows and Mac. Either as standalone programs, or as "web plugins". What we want is for them to be able to add Linux to the mix.

    I would personally love to see MonoDevelop running with Gtk+/Quartz so that game developers could use a more advanced IDE than the current text editor that they are using with Unity.

    Update: Otee is hiring.

    If you live in Denmark, and you have experiences with games, low-level coding and consoles, you might want to apply to their job posting. They are looking for Nintento Wii developers.

    Posted on 03 Feb 2007


    Spain, Badajoz, Madrid

    by Miguel de Icaza

    Am going to Badajoz, Spain to the Free Software World Conference.

    I will be in Madrid on Monday and Friday nights, if people want to get together, drop me a line. I was thinking dinner at Rias Bajas with Juantomas, Roberto and Ismael.

    Posted on 03 Feb 2007


    Terror in Boston

    by Miguel de Icaza

    Bruce Schneier discussed the Non-Terrorist Embarrassment in Boston.

    For hours of fun, check Sadly No!'s coverage of the response from the paranoid districts in the blogosphere.

    Joe has the best T-Shirt material in his office. Joe, we want CafePress T-Shirts!

    YouTube interview with the guys, the reporters got pretty upset here.

    It is hilarious, they refuse to answer any questions that are not related to hair "Am sorry, that is not a hair question". Then a reporter asks if they are afraid about their hair if they go to prison. The answer "That is a very good question".

    Posted on 01 Feb 2007


    Retrospective

    by Miguel de Icaza

    Yesterday Stephen Colbert's had the editor for some jingoistic web site, and one of the comments that he made caught my attention. He said something along the lines of "We have no problem against the Iranian people".

    And I was reminded of Bush's statements from 2002:

    The United States has no quarrel with the Iraqi people; they've suffered too long in silent captivity. Liberty for the Iraqi people is a great moral cause, and a great strategic goal. The people of Iraq deserve it; the security of all nations requires it.

    There might have been "no quarrel", but it does not seem that Iraqis got a great deal out of this.

    A well timed cartoon appeared on Reddit today:

    Since the US seems to be in a path to extend the war to Iran (Condoleezza Rice seems to be avoiding a direct answer to Senator Webb), the following excerpt from from 2003 seems relevant:

    The government of Iraq, and the future of your country, will soon belong to you.

    The goals of our coalition are clear and limited. We will end a brutal regime, whose aggression and weapons of mass destruction make it a unique threat to the world. Coalition forces will help maintain law and order, so that Iraqis can live in security. We will respect your great religious traditions, whose principles of equality and compassion are essential to Iraq’s future. We will help you build a peaceful and representative government that protects the rights of all citizens. And then our military forces will leave. Iraq will go forward as a unified, independent and sovereign nation that has regained a respected place in the world.

    The United States and its coalition partners respect the people of Iraq. We are taking unprecedented measures to spare the lives of innocent Iraqi citizens, and are beginning to deliver food, water and medicine to those in need. Our only enemy is Saddam’s brutal regime --- and that regime is your enemy as well.

    In the new era that is coming to Iraq, your country will no longer be held captive to the will of a cruel dictator. You will be free to build a better life, instead of building more palaces for Saddam and his sons, free to pursue economic prosperity without the hardship of economic sanctions, free to travel and speak your mind, free to join in the political affairs of Iraq. And all the people who make up your country --- Kurds, Shi’a, Turkomans, Sunnis, and others --- will be free of the terrible persecution that so many have endured.

    The nightmare that Saddam Hussein has brought to your nation will soon be over. You are a good and gifted people ---the heirs of a great civilisation that contributes to all humanity. You deserve better than tyranny and corruption and torture chambers. You deserve to live as free people. And I assure every citizen of Iraq: your nation will soon be free.

    George W Bush
    President's Message to the Iraqi People
    April 10, 2003

    Ignoring the political angle (the lies and deception of the administration) there is still an issue of execution.

    These people have drank their own kool aid, they almost seem unable to accept that they should stop digging the hole they are in. It feels like the government is in the hands of Jim Jones and they are doing anything in their power to convince people around them to follow them.

    It seems that war with Iran will happen.

    My prediction based on the news from the past two weeks is that they will either provoke the Iranians to get their casus belli or an appropriate incident will be manufactured.

    History of Iran

    Patrick Cockburn's Occupation: War and Resistance in Iraq book contains a colorful popular saying.

    The popular saying was something along the lines of Iraq was a religious country ruled by a secular government, while Iran is a secular society ruled by a religious government.

    I found "All the Shah's Men: An American Coup and the Roots of Middle East Terror" a fascinating read.

    The 1953 CIA coup on the democratically elected and populist Mohammad Mosaddeq had repercussions that went beyond 1953.

    The overthrow of Mosaddeq and the appointment of the Shah lead to the the Savak repression police. This in turn lead to 1980's Islamic Revolution and the Hostage Crisis, which would lead to the funding of Saddam's war against Iran (the motives for the war, the lies and deception used to push Iraq into the war are described in great detail in Robert Fisk's "The Great War for Civilization" book).

    Posted on 01 Feb 2007


    We did it!

    by Miguel de Icaza

    Today Novell announced in Paris that Peugeot Citroën will be deploying 20,000 Linux desktops and 2,500 Linux servers.

    These are very important news. Linux on the desktop has got good traction with governments, but it is just great to see the open source desktop being chosen for commercial deployments of this size.

    Congratulations to the team!

    I know that folks have been working really hard for the past few months to make sure that our server and desktop offerings were solid and that they meet the needs of a large organization.

    Congrats to Anna's team for all their hard work in doing the usability studies that made the desktop so much better, and all the desktop hackers that worked on making all those features happen.

    For those of you considering a migration to Vista, you might want to see Novell's Compare to Vista web site.

    Btw, I think someone should do a "We did it" animation like the one that shows up in Stephen Colbert's Colbert Report, as it captures the emotion of making this deal happen.

    Posted on 30 Jan 2007


    The EU Prosecutors are Wrong.

    by Miguel de Icaza

    The file format wars between Open Document Format (ODF) file format against the Office Open XML (OOXML) are getting heated.

    There are multiple discussions taking place and I have been ignoring it for the most part.

    This morning I read on News.com an interview with Thomas Vinje. Thomas is part of the legal team representing some companies in the EU against Microsoft.

    The bit in the interview that caught my attention was the following quote:

    We filed our complaint with the Commission last February, over Microsoft's refusal to disclose their Office file formats (.doc, .xls, and .ppt), so it could be fully compatible and interoperable with others' software, like Linux. We also had concerns with their collaboration software with XP, e-mail software, and OS server software and some media server software with their existing products. They use their vast resources to delay things as long as possible and to wear people down so they'll give up.

    And in July, we updated our complaint to reflect our concerns with Microsoft's "open XML." (Microsoft's Office Open XML is a default document format for its Office 2007 suite.) And last month, we supplemented that information with concerns we had for .Net 3.0 (software designed to allow Vista applications to run on XP and older-generation operating systems).

    And I think that the group is not only shooting themselves in the foot, they are shooting all of our collective open source feet.

    I'll explain.

    Open Source and Open Standards

    For a few years, those of us advocating open source software have found an interesting niche to push open source: the government niche.

    The argument goes along these lines: Open Office is just as good as Microsoft Office; Open Office is open source, so it comes for free; You can actually nurture your economy if you push for a local open source software industry.

    The argument makes perfect sense, most people will agree to it, but every once in a while our advocacy has faced some problems: Microsoft Office might have some features that we do not have, the cost of migration is not zero, existing licensing deals sweeten the spot, and there are compatibility corner cases that slow down the adoption.

    A new powerful argument was identified a few years back, when Congressman Edgar Villanueva in 2002 replied to a letter from Microsoft's Peru General Manager.

    One of the key components at the time was that the government would provide free access to government information and the permanence of public data. The letter those two points said:

    To guarantee the free access of citizens to public information, it is indispensable that the encoding of data is not tied to a single provider. The use of standard and open formats gives a guarantee of this free access, if necessary through the creation of compatible free software.

    To guarantee the permanence of public data, it is necessary that the usability and maintenance of the software does not depend on the goodwill of the suppliers, or on the monopoly conditions imposed by them. For this reason the State needs systems the development of which can be guaranteed due to the availability of the source code.

    The letter is a great document, but the bit that am interested in is the bit about open standards.

    Using Open Standards to Promote Open Source

    Open standards and the need for public access to information was a strong message. This became a key component of promoting open office, and open source software. This posed two problems:

    First, those promoting open standards did not stress the importance of having a fully open source implementation of an office suite.

    Second, it assumed that Microsoft would stand still and would not react to this new change in the market.

    And that is where the strategy to promote the open source office suite is running into problems. Microsoft did not stand still. It reacted to this new requirement by creating a file format of its own, the OOXML.

    Technical Merits of OOXML and ODF

    Unlike the XML Schema vs Relax NG discussion where the advantages of one system over the other are very clear, the quality differences between the OOXML and ODF markup are hard to articulate.

    The high-level comparisons so far have focused on tiny details (encoding, model used for the XML). There is nothing fundamentally better or worse in those standards like there is between XML Schema and Relax NG.

    ODF grew out of OpenOffice.org and is influenced by its internal design. OOXML grew out of Microsoft Office and it is influenced by its internal design. No real surprises there.

    The Size of OOXML

    A common objection to OOXML is that the specification is "too big", that 6,000 pages is a bit too much for a specification and that this would prevent third parties from implementing support for the standard.

    Considering that for years we, the open source community, have been trying to extract as much information about protocols and file formats from Microsoft, this is actually a good thing.

    For example, many years ago, when I was working on Gnumeric, one of the issues that we ran into was that the actual descriptions for functions and formulas in Excel was not entirely accurate from the public books you could buy.

    OOXML devotes 324 pages of the standard to document the formulas and functions.

    The original submission to the ECMA TC45 working group did not have any of this information. Jody Goldberg and Michael Meeks that represented Novell at the TC45 requested the information and it eventually made it into the standards. I consider this a win, and I consider those 324 extra pages a win for everyone (almost half the size of the ODF standard).

    Depending on how you count, ODF has 4 to 10 pages devoted to it. There is no way you could build a spreadsheet software based on this specification.

    To build a spreadsheet program based on ODF you would have to resort to an existing implementation source code (OpenOffice.org, Gnumeric) or you would have to resort to Microsoft's public documentation or ironically to the OOXML specification.

    The ODF Alliance in their OOXML Fact Sheet conveniently ignores this issue.

    I guess the fairest thing that can be said about a spec that is 6,000 pages long is that printing it out kills too many trees.

    Individual Problems

    There is a compilation being tracked in here, but some of the objections there show that the people writing those objections do not understand the issues involved.

    Do as I say, not as I do

    Some folks have been using a Wiki to keep track of the issues with OOXML. The motivation for tracking these issues seems to be politically inclined, but it manages to pack some important technical issues.

    The site is worth exploring and some of the bits there are solid, but there are also some flaky cases.

    Some of the objections over OOXML are based around the fact that it does not use existing ISO standards for some of the bits in it. They list 7 ISO standards that OOXML does not use: 8601 dates and times; 639 names and languages; 8632 computer graphics and metafiles; 10118-3 cryptography as well as a handful of W3C standards.

    By comparison, ODF only references three ISO standards: Relax NG (OOXML also references this one), 639 (language codes) and 3166 (country codes).

    Not only it is demanded that OOXML abide by more standards than ISO's own ODF does, but also that the format used for metafiles from 1999 be used. It seems like it would prevent some nice features developed in the last 8 years for no other reason than "there was a standard for it".

    ODF uses SMIL and SVG, but if you save a drawing done in a spreadsheet it is not saved as SVG, it is saved using its own format (Chapter 9) and sprinkles a handful of SVG attributes to store some information (x, y, width, height).

    There is an important-sounding "Ecma 376 relies on undisclosed information" section, but it is a weak case: The case is that Windows Metafiles are not specified.

    It is weak because the complaint is that Windows Metafiles are not specified. It is certainly not in the standard, but the information is publicly available and is hardly "undisclosed information". I would vote to add the information to the standard.

    More on the Size of the Spec

    A rough breakdown of OOXML:

    • ~100 page "Fundamentals" document;
    • ~200 page "Packaging Conventions" document;
    • ~450 page "Primer" document (a tutorial);
    • ~1850 page Word Processing reference document;
    • ~1090 page Spreadsheet Processing reference document;
    • ~270 page Presentation Processing reference document;
    • ~1140 page Drawing Processing reference document;
    • ~900 pages for other references (VML, SharedML)
    • ~42 future extensibility document.

    I have obviously not read the entire specification, and am biased towards what I have seen in the spreadsheet angle. But considering that it is impossible to implement a spreadsheet program based on ODF, am convinced that the analysis done by those opposing OOXML is incredibly shallow, the burden is on them to prove that ODF is "enough" to implement from scratch alternative applications.

    If Microsoft had produced 760 pages (the size of ODF) as the documentation for the ".doc", ".xls" and ".ppt" that lacked for example the formula specification, wouldn't people justly complain that the specification was incomplete and was useless?

    I would have to agree at that point with the EU that not enough information was available to interoperate with Microsoft Office.

    If anything, if I was trying to interoperate with Microsoft products, I would request more, not less.

    SVG

    Then there is the charge about not using SVG in OOXML. There are a few things to point out about SVG.

    Referencing SVG would pull virtually every spec that the W3C has produced (Javascript, check; CSS, check; DOM, check).

    This can be deceptive in terms of the "size" of the specification, but also makes it incredibly complex to support. To this date am not aware of a complete open source SVG implementation (and Gnome has been at the forefront of trying out SVG, going back to 1999).

    But to make things worse, OpenOffice does not support SVG today, and interop in the SVG land leaves a lot to be desired.

    Some of my friends that have had to work with SVG have complained extensively to me in the past about it. One friend said "Adobe has completely hijacked it" referring to the bloatedness of SVG and how hard it is to implement it today.

    At the time of this comment, Adobe had not yet purchased Macromedia, and it seemed like Adobe was using the standards group and SVG to compete against Flash, making SVG unnecessarily complicated.

    Which is why open source applications only support a subset of SVG, a sensible subset.

    ISO Standarization

    ODF is today an ISO standard. It spent some time in the public before it was given its stamp of approval.

    There is a good case to be made for OOXML to be further fine-tuned before it becomes an ISO standard. But considering that Office 2007 has shipped, I doubt that any significant changes to the file format would be implemented in the short or medium term.

    The best possible outcome in delaying the stamp of approval for OOXML would be to get further clarifications on the standard. Delaying it on the grounds of technical limitations is not going to help much.

    Considering that ODF spent a year receiving public scrutiny and it has holes the size of the Gulf of Mexico, it seems that the call for delaying its adoption is politically based and not technically based.

    XAML and .NET 3.0

    From another press release from the group:

    "Vista is the first step in Microsoft‘s strategy to extend its market dominance to the Internet," Awde stressed. For example, Microsoft's "XAML" markup language, positioned to replace HTML (the current industry standard for publishing language on the Internet), is designed from the ground up to be dependent on Windows, and thus is not cross-platform by nature.

    ...

    "With XAML and OOXML Microsoft seeks to impose its own Windows-dependent standards and displace existing open cross-platform standards which have wide industry acceptance, permit open competition and promote competition-driven innovation. The end result will be the continued absence of any real consumer choice, years of waiting for Microsoft to improve - or even debug - its monopoly products, and of course high prices," said Thomas Vinje, counsel to ECIS and spokesman on the issue.

    He is correct that XAML/WPF will likely be adopted by many developers and probably some developers will pick it over HTML development.

    I would support and applaud his efforts to require the licensing of the XAML/WPF specification under the Microsoft Open Specification Promise.

    But he is wrong about XAML/WPF being inherently tied to Windows. XAML/WPF are large bodies of code, but they expose fewer dependencies on the underlying operating system than .NET 2.0's Windows.Forms API does. It is within our reach to bring to Linux and MacOS.

    We should be able to compete on technical grounds with Microsoft's offerings. Developers interested in bringing XAML/WPF can join the Mono project, we have some bits and pieces implemented as part of our Olive sub project.

    I do not know how fast the adoption of XAML/WPF will be, considering that unlike previous iterations of .NET, gradual adoption of WPF is not possible. Unlike .NET 2.0 which was an incremental upgrade for developers, XAML/WPF requires software to be rewritten to take advantage of it.

    The Real Problem

    The real challenge today that open source faces in the office space is that some administrations might choose to move from the binary office formats to the OOXML formats and that "open standards" will not play a role in promoting OpenOffice.org nor open source.

    What is worse is that even if people manage to stop OOXML from becoming an ISO standard it will be an ephemeral victory.

    We need to recognize that this is the problem. Instead of trying to bury OOXML, which amounts to covering the sun with your finger.

    We need to make sure that OpenOffice.org can thrive on its technical grounds.

    In Closing

    This is not a complete study of the problems that OOXML has, as I said, it has its share of issues. But it has its share of issues just like the current ODF standard has.

    To make ODF successful, we need to make OpenOffice.org a better product, and we need to keep improving it. It is very easy to nitpick a standard, specially one that is as big as OOXML. But it is a lot harder to actually improve OpenOffice.org.

    If everyone complaining about OOXML was actually hacking on improving OpenOffice.org to make it a technically superior product in every sense we would not have to resort, as a community, to play a political case on weak grounds.

    I also plan on updating this blog entry as people correct me (unlike ODF, my blog entries actually contain mistakes ;-)

    Updates -- February 1st

    There are a few extra points that I was made aware of after I posted this blog entry.

    Standard Size

    Christian Stefan wrote me to point out that the OOXML specification published by ECMA uses 1.5 line spacing, while OASIS uses single spacing. I quote from his message:

    ODF             722 pages
    SVG             719
    MathML		665
    XForms          152     (converted from html using winword, ymmv)
    XLink            36     (converted from html using winword, ymmv)
    SMIL            537     (converted from html using winword, ymmv)
    OpenFormula     371
                    ----
                  3,202
    
    Now I'm still missing some standards that would add severall hundred
    pages and changing line spacing to 1.5 will bring me near the 6000
    pages mark I guess. This is not very surprising (at least for me)
    since both standards try to solve very similar problems with nearly
    equal complexity.
    

    Review Time

    The "one month to review OOXML" meme that has been going around the net turns out to be false. It is unclear where it originated. Brian Jones from Microsoft has a complete explanation. For OOXML to become a standard it is going to take sevent months at least.

    Posted on 30 Jan 2007


    OpenSUSE Build System

    by Miguel de Icaza

    For the last couple of years the folks at SUSE have been building a new build system that could help us make packages for multiple distributions from the same source code.

    Yesterday, Andreas Jaeger announced the open sourcing of the Open SUSE Build Service (the post is archived here).

    The service has been in beta testing for a few months.

    The Problem

    One of the problems that the Linux community faces is that a binary package built in one distribution will not necessarily work on a different distribution. Distributions have adopted different file system layout configurations (from the trivial to the more complex), different versions of system libraries and configuration files are placed in different locations. In addition different revisions of the operating system will differ from release to release, so the same software will not always build cleanly.

    Although there are efforts to unify and address this problem, these efforts have failed because they require all major distributions to agree on file system layout, in the adoption of a core. Without the buy-in of everyone, it is not possible to solve this problem, which has made the life of the Linux Standard Base folks incredibly frustrating.

    If you are ahead of the pack, the mentality has been that you will prevail over other distributions and become the only Linux distribution so there is no need to spend extra engineering work in trying to unify distributions.

    At Ximian, when we were a a small independent software vendor trying to distribute our software for Linux users (Evolution, and as a side effect the "Ximian Desktop") we had to set up internal build farms to target multiple operating systems. We created a build system (build-buddy) with "jails" which were a poor man's operating system virtualization system to build packages for all of the Linux distributions.

    To this date shipping software for multiple Linux distributions remains a challenge. For instance, look at the downloads page for Mono. We are targeting various distribution of Linux there, and we know we are missing many more, but setting up multiple Linux distributions, building on every one of them, running the tests and maintaining the systems takes a lot of time.

    And this problem is faced by every ISV. Folks at Mozilla and VMware have horror stories to tell about how they have to ship their products to ensure that they run on a large number of distributions.

    The OpenSUSE Build System

    Originally, the OpenSUSE Build System was a hosted service running at SUSE. The goal of the build system was to build packages for various distributions from the same build specifications.

    Currently it can build packages for the Novell, Red Hat, Mandriva, Debian and Ubuntu (the versions supported currently are: SUSE Linux 9.3, 10.0 and 10.1, OpenSUSE 10.2, SUSE Linux Enterprise 10, Debian Etch, Fedora Core 5, 6, Mandriva 2006 and Ubuntu 6.06).

    For example, Aaron is packaging Banshee for a number of platforms, you can browse the packages here.

    This hosted service means that developers did not have to setup their own build farms, they could just use the build farms provided by SUSE.

    With the open sourcing of the build system, third party ISVs and IT developers no longer have to use the hosted services at SUSE, they are now able to setup their own build farms inside their companies and produce packages for all of the above distributions. If you need to keep your code in-house, you can use the same functionality and setup your own build farms.

    Currently those creating packages can use either a web interface or a command line tool to get packages built by the system (a nice API is available to write other front-ends; GUI front-ends are currently under development).

    Testimonials

    From the Scribus blog:

    While we recently released 1.3.3.7 into the wild, one of the tools we used for the first time is the new OpenSuse Build Server. So why the rant ?

    In a word it is terrific. :) It still is in beta phase and there are features to be added. However, it is a major helper for time stretched developers to package their application in a sane way and then automagically push them to rotating mirrors worldwide without a lot of fuss.

    It is all fine and well if you write the best code in the world if no one can use it. And that means packaging. For Linux, that means creating a .deb or creating rpm packages which many Linux distributions use.

    The magic is one can upload the source and a spec file which is a recipe to build rpms. Select which platforms to build, push a button and voila. In an hour or two you have all your packages built in a carefully controlled manner. This allowed us to supply 1.3.3.7 for all Suse releases 9.3+ including the Enterprise Desktop 10 for the first time. Even better for users, they can use what ever tool be it Yast, Smart or Yum to add these repositories to get the latest greatest Scribus with all dependencies automatically satisfied. Push button packaging for users too :)

    Installation

    The resulting packages that are submitted today to the build service can be installed with a number of popular software management tools including Smart, apt, yum and yast.

    We hope that this cross-distribution build system will remove the burden of picking a subset of Linux distributions to support and will make more packages available for more distributions.

    A tutorial on getting started is here.

    Congratulations to the OpenSUSE team for this release!

    Posted on 26 Jan 2007


    Monkey Magic!

    by Miguel de Icaza

    Linux Format Magazine is running a contest to get your idea implemented in Mono. The contest goes like this:

    Get your dream application made! In Linux Format issue 89, our Mono cover feature includes a competition called Make it with Mono, where you design your ideal piece of software. Just jot down your suggestions, and in April other users will rate them -- if your entry makes it into the top 30, you'll win a cool Mono T-shirt. And if yours is the number 1 rated entry, it will be programmed in Mono!

    See www.linuxformat.co.uk/makeitwithmono/.

    To see the entries submitted so far, go to: Entries Page, and you can submit your application here.

    Posted on 25 Jan 2007


    Microsoft's Ajax.Net License

    by Miguel de Icaza

    Microsoft recently announced the release of ASP.NET AJAX, their extension to ASP.NET to spice it up with Ajax goodness (Scott Guthrie's blog is always the best source for the details).

    Microsoft must be commended for picking the Microsoft Permissive License (Ms-PL) for all the of their client-side Javascript libraries and the AJAX Control Toolkit.

    The Ms-PL is for all intents and purposes an open source license.

    This is a diagram from the introduction to ASP.NET AJAX:

    The left-hand side is what has been released under the Ms-PL. For the whole stack to work on Mono, we will have to do some work on the server-side assemblies that provide the support (the System.Web.Extensions assembly). It is likely a lot of work, but considerably less than the whole stack.

    The AJAX Control Toolkit comes with 30 controls for common tasks, with a nice sampler of the controls. The Control Toolkit is actually being developed in the open, and Microsoft is integrating external contributions.

    Nikhil has a retrospective on how the project came to be. A good chunk of information for those of us interested in the archaeology of software.

    A big thanks to everyone at Microsoft involved in picking the Ms-PL license for these technologies.

    Posted on 24 Jan 2007


    SecondLife Updates

    by Miguel de Icaza

    Jim has posted an update on using Mono to script SecondLife.

    The challenges that they were facing were related to memory leaks that were experienced when they loaded and unloaded thousand of application domains (I gather this happens when they refresh a specific script in SecondLife).

    Posted on 22 Jan 2007


    Score Music in Wiki Form

    by Miguel de Icaza

    Wikifonia has been launched, a Wiki to share sheet music, it is on its early stages, but it already has some content.

    Posted on 22 Jan 2007


    Buck Stopping and the White House

    by Miguel de Icaza

    In his Open Letter to the President Ralph Nader points out that although Bush admitted "mistakes were made", he quickly moved on, and changed the subject:

    You say "where mistakes have been made, the responsibility rests with me." You then quickly change the subject. Whoa now, what does it mean when you say the responsibility for mistakes rest with you?

    Responsibility for "mistakes" that led to the invasion-which other prominent officials and former officials say were based on inaccurate information, deceptions, and cover-ups?

    Responsibility for the condoning of torture, even after the notorious events at abu-Gharib prison were disclosed?

    Responsibility for months and months of inability to equip our soldiers with body armor and vehicle armor that resulted in over 1,000 lost American lives and many disabilities?

    Responsibility for the gross mismanagement over outsourcing both service and military tasks to corporations such as Haliburton that have wasted tens of billions of dollars, including billions that simply disappeared without account?

    Responsibility for serious undercounting of official U.S. injuries in Iraq-because the injuries were not incurred in direct combat-so as to keep down political opposition to the war in this country?

    Click to read the rest of the letter.

    Posted on 21 Jan 2007


    Crap in Vista, part 2

    by Miguel de Icaza

    Microsoft has posted some answers to questions regarding the Content, Restriction, Annulment and Protection (or CRAP, some people euphemistically call it "Digital Rights Management") features built into Vista. I previously blogged about Peter Gutmann's explanation of the problems that it would cause Vista.

    Microsoft has responded to these claims here.

    The response does little to contradict Peter's findings, and merely tries to shed some positive light on things. They answer questions in the best style of Ari Fletcher; for example, when it comes to cost, they conveniently ignore the question and instead focus on the manufacturing benefits (!!!).

    It is interesting to compare this with the presentation by ATI at Microsoft's Hardware conference in 2005 (WinHEC), Digital Media Content Protection which has a more honest look at the costs all throughout the stack.

    The discussion at Slashdot browsed at +4 has the good stuff.

    Posted on 21 Jan 2007


    Sansa Connect Video

    by Miguel de Icaza

    You can see the UI of the Sansa Connect in action in this Engadget video:

    It apparently will also let you browse your Flickr (wonder if they use the Flickr.Net API) and share songs with your friends, and it seems to have some sort of last-fm like listening mode.

    The details on the song sharing are not very clear, it all seems bound to the service. But I wonder if you can pass around your own mp3s.

    Anyways, am buying this on the grounds that it runs Mono, and so I can finally show a physical object to the family that runs it.

    Posted on 18 Jan 2007


    Mono-based device wins Best-of-Show at CES

    by Miguel de Icaza

    The SanDisk Sansa Connect MP3 player won the Best of Show award in the MP3 and Audio category:.

    The Sansa Connect is running Linux as its operating system, and the whole application stack is built on Mono, running on an ARM processor.

    There is a complete review of it at Engadget, among the features it includes:

    • 4GB of memory.
    • SD slot for extra storage.
    • WMA, MP3 subscription WMA and PlayForSure are supported.
    • Internet Radio streaming.
    • WiFi.
    • Photo browser.
    • 2.2 TFT color screen.

    The WiFi support allows users to download music from providers or their own home servers.

    The Sansa Connect is designed by the great guys at Zing and it will be available to purchase in a couple of months.

    Posted on 17 Jan 2007


    Not a Gamer

    by Miguel de Icaza

    With all the rage and discussion over the PS3 vs the Wii and how the Wii is a breakthrough in interactivity, I decided to get myself one of those, and auctioned my way to one on eBay.

    The last time I owned a console it was an Atari 2600, and I barely got to play with it.

    Wii Sports is a very nice program, and I enjoy playing it. As reported, your arms are sore the next day after playing Wii Tennis.

    I went to the local game store and bought some assorted games for the Wii, the clerk said "excellent choices sir", as if I was picking a great cheese at Formaggio Kitchen.

    The graphics are amazing, but I could not stand playing any of them. The Zelda graphics are incredibly well done.

    But all I could think of was the poor guy in QA that must have debugged been filing bugs against this. Man, do I feel sorry for the QA guys that do games.

    But I just do not feel like solving Zelda. Am sure it must have some kind of appeal to some people, but solving puzzles in a 3D world and shooting at stuff and earning points did not sound like an interesting enough challenge. I can appreciate the cuteness of having to find the cradle in exchange for the fishing pole and shooting rocks and "zee-targeting" something.

    As far as challenges go, to me, fixing bugs, or writing code is a more interesting puzzle to solve. And for pure entertainment, my blogroll and reddit provide a continuous stream of interesting topics.

    Am keeping the Wii though. Playing Wii box and Wii tennis with Laura is incredibly fun (well, watching Laura play Wii Box accounts for 80% of the fun).

    When I got the Wii, I told myself "If I like this, am getting the PS3 and the XBox". Well, I actually just thought about it, I do not really talk to myself.

    But am obviously not a gamer.

    Posted on 11 Jan 2007


    Programmer Guilt

    by Miguel de Icaza

    With Mono, is has often happened that I have wanted to work on a fun new feature (say, C# 3) or implement a fun new class.

    But most of the time, just when am about to do something fun for a change, I think "don't we have a lot of bugs out there to fix?", so I take a look at bugzilla and try to fix them, follow up on some bugs, try to produce test cases.

    By the time am done, I have no energy left for the fun hack.

    I need some "guilt-free" time, where I can indulge myself into doing some work that is completely pointless. But there is a fine balance between happy-fun-fun hacking, and making sure that Mono gets a great reputation.

    Posted on 11 Jan 2007


    Mono and C# 3.0

    by Miguel de Icaza

    Since a few folks have asked on irc and they are not using my innovative comment-reading service, am reposting (with some slight edits and clarifications) the answer to "Will Mono implement C# 3.0?"

    Yes, we will be implementing C# 3.0.

    We have been waiting for two reasons: first, we wanted to focus on bug fixing the existing compilers to ensure that we have a solid foundation to build upon. I very much like the Joel Test that states `Do you fix bugs before writing new code?'.

    C# 3.0 is made up of about a dozen new small features. The features are very easy to implement but they rely heavily on the 2.0 foundation: iterators, anonymous methods, variable lifting and generics.

    Since we have been fixing and improving the 2.0 compiler anyways, we get to implement the next draft of the specification instead of the current draft. This means that there is less code to rewrite when and if things change.

    Fixing bugs first turned out to be a really important. In C# 3.0 lambda functions are built on the foundation laid out by anonymous methods. And it turned out that our anonymous method implementation even a few months ago had some very bad bugs on it. It took Martin Baulig a few months to completely fix it. I wrote about Martin's work here. The second piece is LINQ, some bits and pieces of the libraries have been implemented, those live in our Olive subproject. Alejandro Serrano and Marek Safar have contributed the core to the Query space, and Atsushi did some of the work on the XML Query libraries. We certainly could use help and contributions in that area.

    Anecdote: we started on the C# 2.0 compiler about six months before C# 2.0 was actually announced at the 2003 PDC. Through ECMA we had early access to the virtual machine changes to support generics, and the language changes to C#. By the time of the PDC we had almost a functional generics compiler.

    The spec was not set in stone, and it would change in subtle places for the next two years. So during the next two years we worked on and off in completing the support and implementing the changes to the language as it happened.

    Most of the hard test cases came when C# 2.0 was released to the public as part of .NET 2.0. About six weeks into the release (mid-December and January) we started receiving a lot of bug reports from people that were using the new features.

    Second Mini-Anecdote: Pretty much every new release of IronPython has exposed limitations in our runtime, our class libraries or our compilers. IronPython has really helped Mono become a better runtime.

    Posted on 11 Jan 2007


    Keith Olberman Evaluation of the Iraq War

    by Miguel de Icaza

    Just minutes before the speech last night, Keith Olberman had a quick recap of the mistakes done so far.

    Loved the delivery. Crooks and Liars has the video and the transcript (the video is better, as it has a moving sidebar with the summary, like Colbert's "The Word").

    Posted on 11 Jan 2007


    Functional Style Programming with C#

    by Miguel de Icaza

    C# 3.0 introduces a number of small enhancements to the language. The combination of these enhancements is what drives the LINQ.

    Although much of the focus has been on the SQL-like feeling that it gives the language to manipulate collections, XML and databases in an efficient way, some fascinating side effects are explored in this tutorial.

    The tutorial introduces the new features in C# one by one, there are a couple of interesting examples, a simple functional-style loop:

    // From:
    for (int i = 1; i < 10; ++i) Console.WriteLine(i);
    
    // To:
    Sequence.Range(1, 10).ForEach(i => Console.WriteLine(i));
    	

    A nice introduction to delayed evaluation, an RPN calculator:

    // the following computes (5*2)-1
    Token[] tkns = {
        new Token(5),
        new Token(2),
        new Token(TokenType.Multiply),
        new Token(1),
        new Token(TokenType.Subtract)
    };
    
    Stack st = new Stack();
    
    // The RPN Token Processor
    tkns.Switch(
        i => (int)i.Type,
        s => st.Push(s.Operand),
        s => st.Push(st.Pop() + st.Pop()),
        s => st.Push(-st.Pop() + st.Pop()),
        s => st.Push(st.Pop() * st.Pop()),
        s => st.Push(1/st.Pop() * st.Pop())
    );
    
    Console.WriteLine(st.Pop());
    

    And finally a section on how to parse WordML using LINQ, extracting the text:

    	wordDoc.Element(w + "body").Descendants(w + "p").
    		Select(p => new {
            		ParagraphNode = p,
            		Style = GetParagraphStyle(p),
            		ParaText = p.Elements(w + "r").Elements(w + "t").
    				Aggregate("", (s1, i1) => s1 = s1 + (string)i1)}).
    		Foreach(p =>
    			 Console.WriteLine("{0} {1}", p.Style.PadRight(12), p.ParaText));
    	

    Very educational read.

    Posted on 10 Jan 2007


    SecondLife: Cory Pre-Town Hall Answers

    by Miguel de Icaza

    After the release of the SecondLife client as open source software, Cory has a pre-town hall answers post.

    The SecondLife client is dual licensed under the GPL and commercial licenses.

    Regarding the use of Mono, Cory states:

    Open Sourcing the client does not impact continued development of Mono or other planned improvements to LSL. Although Mono is also an Open Source project, that code will be running on the server, not the client. As has been previously discussed, part of the reason for going to Mono and the Common Language Runtime is to eventually allow more flexibility in scripting language choice.

    Cory explains some of the rationale for open sourcing the client:

    Third, security. While many of you raised question about security, the reality is that Open Source will result in a more secure viewer and Second Life for everyone. Will exploits be found as a result of code examination? Almost certainly, but the odds are far higher than the person discovering the bug is someone working to make Second Life better. Would those exploits have been found by reverse engineering in order to crack the client? Yes, but with a far smaller chance that the exploit will be made public. Also, as part of the preparation for Open Source, we conducted a security audit and took other precautions to mitigate the security risks.

    Fourth, as we continue to scale the Second Life development team --- and thank you to the many folks who have helped to get our hiring pipeline humming again --- Open Source becomes a great way for potential developers to demonstrate their skill and creativity with our code. Moreover, it makes it even easier for remote developers to become part of Linden Lab. The possibility space for Second Life is enormous, so the more development horsepower we can apply to it --- whether working for Linden Lab or now --- the faster we all can take Second Life from where it is today into the future.

    And also, a new book on SecondLife is coming out.

    Posted on 10 Jan 2007


    Rolf's Visual Basic 8 compiler: Self Hosting on Mono

    by Miguel de Icaza

    Rolf has committed to SVN his latest batch of changes that allowed his Visual Basic.NET compiler to bootstrap under Mono/Linux. This basically means that the full cycle for VB in Mono has now been completed.

    Rolf's VB compiler is an implementation of Visual Basic.NET version 8. So it has support for generics and all the new stuff in the language.

    Rolf wrote his compiler in VB itself, and he uses generics everywhere, so in addition of being a good self-test, it has proven to be a good test for Mono (he already has identified a few spots where the Mono JIT should be tuned).

    The following are from an internal email he sent on Friday (am trying to convince him to have a blog and blog these fun facts):

    Friday Results:

    
            compile vbnc with vbc:                      4.8 seconds
            compile vbnc with vbnc/MS:                 14.2 seconds
            compile vbnc with vbnc/Mono/Linux:         15.1 seconds
            compile vbnc using a bootstrapped binary:  19.0 seconds
    
            compile vbruntime with vbc:                 1.4 seconds
            compile vbruntime with vbnc/MS:             3.5 seconds
            compile vbruntime with vbnc/Mono/Linux:     4.2 seconds
            compile vbruntime with bootstrapped binary: 4.9 seconds
    

    The memory consumption on Friday was at 475 megs of RAM. Ben and Atsushi provided some suggestions, and the results for Monday are:

    
    	compile vbnc using a bootstrapped binary:  10.0 seconds
    
    	Memory usage: 264 MB
    

    In managed applications memory allocations are important, because they have an impact on performance. Also notice that memory usage as reported by the Mono default profiler, means all the memory allocation. The actual working set is much smaller, since the GC will reuse all unused memory.

    Atsushi also has a few tune-ups to the string class that reduces plenty of the extra allocations that the compiler was incurring into.

    To bootstrap your own VBNC compiler, get the vbnc module, then go into the vbnc/bin directory, and run make bootstrap.

    Bonus: in addition to bootstrapping itself, the compiler can now compile the Microsoft.VisualBasic runtime (the new version is written in VB.NET as well). And can do a full bootstrap with the new runtime as well.

    Although binaries compiled with Microsoft's VB.NET compiler would run unmodified on Linux, it was not possible to use VB code in ASP.NET applications (as those get compiled on the first page hit) or if developers wanted to debug and tune up a few things on their target Linux/OSX machine.

    In the next few weeks we hope to have this packaged.

    Posted on 09 Jan 2007


    Development Exchange: Evolution and Mono.

    by Miguel de Icaza

    I will exchange an equivalent number of hours hacking your favorite Mono feature in exchange for someone implementing Google Calendar support into Evolution.

    The APIs to use Google calendar service are here.

    Meta-proposal: someone writes a "Software Contribution Exchange" (SCE) where people offer patches to software in exchange for patches in other applications. The NASDAQ of patches.

    Posted on 09 Jan 2007


    Blog Comments

    by Miguel de Icaza

    I just had a stroke of genius.

    My blog software is this home-grown tiny program that generates static HTML, and never quite bothered to turn that into a server application for the sake of supporting comments.

    So I was looking to host comments on some comment hosting provider like HaloScan, I signed up, registered but was not very happy with the interface offered to posters. For anything more than a small form, you have to upgrade the basic account.

    The stroke of genius was to create a Google Group for my blog and just link to it. That way I get adequate tools to manage the comments, and posters get adequate tools to track it.

    Thanks, thanks; you are welcome; I know!; yes, yes; I love that show too. You can just put your donation in the hat.

    The open question is whether the comment link should only appear on the blog, or it should also appear at the end of each entry on the RSS feed, for the sake of those using things like Google Reader. Discuss among yourselves.

    Posted on 06 Jan 2007


    Billmon Archives

    by Miguel de Icaza

    Seems like my favorite blog Billmon is off the air.

    Since Billmon hinted for a while that he was going to stop blogging, I made a backup of his site a few days before he shut down the site.

    If you are a Billmon fan, and want to get a copy of the archive I made, you can get it here (Hosted at Coral).

    Posted on 06 Jan 2007


    Assorted Links

    by Miguel de Icaza

    Aaron Bockover has a couple of interesting posts on the Banshee music player:

    • Scripting Banshee. Aaron embedded the Boo language into Banshee to help prototype, test and extend it.
    • Audio Profile Configuration for the Masses: in which he presents his work to provide a user friendly interface to configuring your underlying media platform.
      Screencast and screenshots included.
    • Radio Support in Banshee. Check his description of the implementation, but most importantly of his use of the Rhapsody Web Services to match the radio music with cover art, artist information and more.

    Aaron has shown his craftsmanship in building Banshee, which is a labor of love.

    Paco posted a few screenshots of Gtk SQL# a tool to interact with SQL databases using the System.Data API.

    The Mono.Xna developers continue to make progress. Alan blogs about the progress here.

    Jonathan Pobst will be joining the Managed Windows.Forms team at Novell on Monday. Jonathan has been a Windows.Forms 2.0 contributor and also developed the Mono Migration Assistant tool (Moma).

    Posted on 06 Jan 2007


    OpenSUSE 10.2 and Mono VMWare Image.

    by Miguel de Icaza

    We have upgraded our VMWare Mono Image from SLED to OpenSUSE 10.2. In the process we fixed most of the problems that were reported by our Windows users doing their .NET migration from Windows to Linux. Please keep sending us your feedback!

    I have also migrated my desktop computer at home to OpenSUSE 10.2 (my laptop remains in SLED-land for now), and here are some personal experiences.

    Duncan improved my computing experience ten times by suggesting that I install the Smart package management system for OpenSUSE (Smart home page is here).

    Smart is fantastic, and I like it a bit better than apt-get so far (still got apt-get installed, but I have switched to smart for my package management now).

    The second piece of advise from Duncan was to configure the Additional Package Repositories. Which is a fantastic universe of packages for OpenSUSE, pretty much anything under the sun is packaged there. I accidentally ran into the "GuitarScaleAssistant" while trying out the smart search features. GuitarScaleAssistant: lovely piece of software.

    Jonathan Pryor has also a blog entry on caring and feeding your new OpenSUSE 10.2 installation, which should be very useful to Windows guys migrating to Linux.

    Posted on 06 Jan 2007


    CRAP In Vista

    by Miguel de Icaza

    The new Content, Restriction, Annulment and Protection (CRAP) subsystem built into Vista is another reason to stay away from it.

    Leaving aside the political issues of CRAP, this is what users of Vista will be treated to:

    Executive Executive Summary

    The Vista Content Protection specification could very well constitute the longest suicide note in history.

    ...

    This document looks purely at the cost of the technical portions of Vista's content protection. [...] However, one important point that must be kept in mind when reading this document is that in order to work, Vista's content protection must be able to violate the laws of physics, something that's unlikely to happen no matter how much the content industry wishes it were possible.

    Read the whole piece, its hilarious.

    The "remote shutdown" capability for device drivers, if true is a reason enough to not buy Vista in any form or shape.

    Microsoft: Shooting itself in the foot. One toe at a time.

    Posted on 23 Dec 2006


    Cocoa APIs for Linux and Windows

    by Miguel de Icaza

    Cocotron is a cross-platform, MIT X11-licensed implementation of the Cocoa APIs.

    The Foundation works on Windows, Linux and Solaris. The GUI side (AppKit) currently only has a Win32 backend.

    The TODO list is here.

    It might be useful to hack on Cocoa# and Dumbarton on non-Apple platforms.

    Posted on 23 Dec 2006


    Billmon Retrospective

    by Miguel de Icaza

    The quality of the writing over at Billmon never ceased to amaze me. I wish I had the anything remotely as good in the way of writing, constructing and researching that Billmon had.

    The blog started in April 10th of 2003. A time when the anti-war movement had been served a slap in the face, jingoism in the US reached new levels and war peddlers were at the top of their game.

    Today Billmon has a retrospective on the blog posts from those days:

    By my rough guess, at least two thirds, if not more, of the almost three thousand posts I've written since that day have concerned the Iraq War, directly or indirectly. Over the past three-and-a-half years the war has come to define my thinking just as thoroughly as it has come to define Shrub's presidency -- not to mention the world we now live in.

    What I also realized, ploughing through hundreds of forgotten or half-remembered posts, is that much of what I wrote back then proved not only true but also extremely prescient -- especially in the first few months after "mission accomplished," when the corporate media by and large was still drinking the White House Kool-Aid and the conservative movement was proclaiming the deification of Emperor George.

    It's not that the story wasn't being told. Then as now, most of what I understood to be true about Iraq came from reading between the lines of the semi-official media (New York Times, Washington Post) from the samzidat journalists at Knight-Ridder, from the foreign press (the Guardian and the Independent in particular) and from the Juan Cole's crucial work translating and analyzing Iraqi and other Arabic-language sources. The downward trends could even be seen in the bare factual bones of wire service reports with obscure datelines like Fallujah and Haditha and Tikrit.

    But to piece together the truth in those days you had to scrounge for it, ignore the ignorance and lies pouring out of Donald Rumfeld's mouth and defy the prevailing political tide of arrogant triumphalism. Very few journalists, and even fewer politicians, were willing to do that. Some in Left Blogistan were (Kos, Needlenose and Steve Gilliard, among others, also come readily to mind). As a result we presented a far more accurate picture of the war to our readers than the corporate media -- with a few honorable exceptions -- did to its own. I'm proud enough of that to want to remind the world, and the moronic media blog bashers in particular, of it.

    The retrospective is here.

    Posted on 22 Dec 2006


    Compiz Site and Compiz Forums

    by Miguel de Icaza

    Compiz has a new web site and they now also have forums.

    Logo contest is here and you can vote here.

    Posted on 22 Dec 2006


    Mono-based Ultima Online Server

    by Miguel de Icaza

    SunUO is a free Ultima Online server based on "RunUO".

    SunUO has released a new version of their server that runs on Mono.

    Posted on 21 Dec 2006


    SecondLife, Town Hall Meeting

    by Miguel de Icaza

    Mono adoption in SecondLife was discussed in the Technical Town Hall with Cory Linden:

    There are some technical changes we still need to make in particular, we’ll need to compile Mono on the server side which requires a distributed compilation service to be running on the grid (yay, backbone!) but I expect that we will begin testing Mono on the main grid in Q1/Q2 2007.

    The process there will be to have places on the grid where you can bring scripts and recompile them into Mono for testing. That will let you report broken scripts to us.

    Since Mono tends to execute LSL about 600 times faster, I expect that there will be some interesting borkage around carefully timed scripts. Babbage has talked about the implications of Mono extensively, but it’s important to remember that the sequence will be:

    • Start allowing compilation of LSL to Mono/CLI. Test existing scripts like crazy. (Q1/Q2)
    • Think about ways to include other languages (Q more than 2)

    Posted on 21 Dec 2006


    Dollar

    by Miguel de Icaza

    A small article explaining the dangers that the dollar faces ahead here.

    Posted on 19 Dec 2006


    Web Developer Tools

    by Miguel de Icaza

    My Friend Taylor Hayward has launched a site that tracks hundreds of widgets that people can use to develop web applications, the ThePeoplesToolbox.

    Check it out, and if you like it, digg it.

    Posted on 18 Dec 2006


    Paint.NET and SafeHandles

    by Miguel de Icaza

    Earlier this year, I ported Paint.NET to Mono. At the time, we used the port to help us identify performance bottlenecks, missing functionality and bugs in our code. It turned out to be a fantastic test case for Windows.Forms.

    The port was never released because the port is botched. In general the port went fine, but I made a few mistakes early on which lead to the half-done Paint.NET port.

    Broken Port of Paint.NET 1.x on Linux.

    Here are some of the lessons I learned:

    Removal of Code: Paint.NET 1.x used a proprietary third-party library that we did not have access to, and this third-party library used plenty of P/Invoke calls to achieve some special effects. This library for doing toolbars and special buttons was called DotNetWidgets and it seems to have morphed from a freeware library to some sort of commercial library.

    During the initial phase of the port I started removing references to this library one by one and during this removal I either removed the code completely (those pieces that seemed unnecessary) or I replaced it with Windows.Forms 1.x controls that had similar functionality.

    Halfway through the port, I realized it would have been better to just implement the API exposed by this third party control than to amputate left and right Paint.NET.

    So I implemented a barely functioning wrapper class that exposed the same API but barely worked. This was good, as I did not have to amputate any more code. The downside is that by the time I did this, half the classes that used this library had been amputated, and I did not feel like redoing the work.

    So I ended up with half the code base amputated, and half the code base semi-working (semi-working because my wrapper was not completed).

    Emulation vs Refactoring: In a handful of places I decided to implement small native wrappers that are distributed with Mono and that provide some of the P/Invoke methods that Paint.NET uses. In particular the Heap* family of calls from Win32.

    At the time, it made sense to emulate a handful of calls, and we also came up with a design for routing P/Invoke calls done to USER32 to be forwarded to our managed System.Windows.Forms library. The infrastructure is still in place and we could use it to simplify the porting of applications, but am still debating if this is a good idea or not.

    In retrospect, I should just have taken advantage of Paint.NET's architecture. Paint.NET actually had isolated the system-dependant code in their SystemLayer library, I could have provided Unix alternatives in that library instead of trying to emulate its underlying functionality (this was another part where half the code was emulated, and half was worked around).

    Based on the various Moma Reports it seems that we might be better served by having a portability library that developers could use with their application.

    From the Moma reports that people have submitted, we have noticed that some people are using incorrect P/Invoke signatures. This means that their software is actually broken and is probably fragile. It only happens to work because this month stars are properly aligned, but it could break easily, or could have undesirable effects easily (and this is on Windows!).

    Second, there are some APIs that can be used for many different things, like "SendMessage".

    So it seems like it would be best to provide a portability library "Winforms.Portability" and make sure that the software is migrated to use it. The nice side effect of this would be that features that are not supported would be explicitly visible on the source code.

    In any case, we are still considering the options and what our recommendation will be.

    The Release: So I never felt like releasing the Paint.NET changes because they are broken, and people would judge Mono's Windows.Forms implementation not on its strengths and limitations but on the broken nature of this port (for example, a bunch of button actions are not even wired up).

    Paint.NET 2.x

    I never went back to fix Paint.NET 1.x because the developers of Paint.NET were working towards their 2.x series, and this release would replace DotNetWidgets with the various "Strip" controls in Winforms 2. So it was not a very good time investment to work on the 1.x codebase anymore.

    We still use the 1.x codebase as a gigantic test case, but we are not going to be upgrading it.

    Instead, we will complete the support for the Winforms 2.x APIs that are in use and do the Paint.NET refactoring again.

    The 2.x port of Paint.NET is underway, but we are still missing some classes in Windows.Forms that prevent it from building.

    The SystemLayer, SetupFrontEnd, Resources, Help, PdnLib and Data components compile fine. The Effects component and the shell still needs some API calls to be implemented (TableLayout related code).

    Once those APIs are completed, the real porting work will begin. That is when I will have to do the refactoring or provide a Unix-specific implementation of the SystemLayer API that Paint.NET uses.

    SafeHandles

    As part of my mission to modify as little code as possible from the Paint.NET 2.x codebase, I implemented SafeHandles for Mono. The current status of our implementation is tracked here.

    Implementing SafeHandle support in Mono was a lot of fun. It was the first time I touched the code in the Mono marshaler and it was interesting to figure out all the relations between SafeHandles, CriticalFinalizerObjects how P/Invoke provided the magic that allowed a type-safe object to be marshaled as an IntPtr and where to hook all the behind-the scene calls that happen inside SafeHandles.

    The most important source of information was Chris Brumme's "Finalization" blog entry and Ravi Krishnaswamy's "SafeHandles: the best V2.0 feature of the .NET Framework" blog entry.

    The patch to support the user visible features of SafeHandles is now on SVN and I plan on continuing some of the work outlined here. Likely, I will need some help from the runtime guys, as I do not quite understand all the issues involved.

    As I was exploring the magic behind SafeHandles, I discovered that some of the features that I considered to be ratholes turned out to not be supported, and instead of trying to come up with a confusing solution, certain uses of SafeHandles are just not supported (changes on a SafeHandles passed in ref structures is not mapped back to the managed world, and instead an exception is thrown).

    See the mono/mono/tests/safehandle.2.cs file for some other interesting tidbits.

    Posted on 16 Dec 2006


    Parameters in Indexer Properties

    by Miguel de Icaza

    C# allows an arbitrary number of parameters (similar to varargs in C) in indexer properties. This looks like this:

       class Vector {
    	 public object this [params object [] items]
    	 {
    	 	get { ... }
            	set { ... }
             }
        }
    
        // ...
    
        Vector v = new Vector ();
    
        v [1, 2, 3] = 10;
    	

    This is one of the parts of the spec that I did not find on the first pass of writing the compiler, so the internal design of the compiler did not allow for this particular usage. Not many applications depended on it, but there have been a few.

    The problem was that the compiler had a flag describing whether a method's last parameter was a "params" (setters and getters are treated as methods). This works for the getter method, but the problem is that the setter method has a params in the middle, the above would turn into:

    	object set_Item (object [] items, object value) 
    	

    Today Marek Safar submitted a fix to this long standing bug. Although the bug was filed by a third party a year ago, it was on my personal compiler TODO list for at least three years.

    This fix will be on Mono 1.2.3 or it's available on SVN on r69571.

    Posted on 16 Dec 2006


    Bush has created a comprehensive catastrophe across the Middle East

    by Miguel de Icaza

    Excellent article on the Guardian:

    So here's the scoresheet for Afghanistan, Iraq, Iran, Israel, Palestine, Lebanon and Egypt: worse, worse, worse, worse, worse, worse and worse.

    ...

    Many a time, in these pages and elsewhere, I have warned against reflex Bush-bashing and kneejerk anti-Americanism. The United States is by no means the only culprit. Changing the Middle East for the better is one of the most difficult challenges in world politics. The people of the region bear much responsibility for their own plight. So do we Europeans, for past sins of commission and current sins of omission. But Bush must take the lion's share of the blame. There are few examples in recent history of such a comprehensive failure. Congratulations, Mr President; you have made one hell of a disaster.

    Posted on 14 Dec 2006


    The American Right Punditry

    by Miguel de Icaza

    The same folks that were calling for "Iraqi Liberation" from Saddam are now pitching the need for a strong man. They never made any sense, but they are now venturing into new delusional grounds when they suggest that Augusto Pinochet is a good model to follow.

    Of course, this particular columnist has always shown the intellectual prodigy of a clam, the wit and finese of a dumb rock.

    His claim: Pinochet's abuses "helped create a civil society". Well, you can not get any dumber than that. All he knows about Chile he probably learned this week.

    Posted on 14 Dec 2006


    Palestine Follow Up

    by Miguel de Icaza

    My books on the Israeli/Palestine conflict now amount for a considerable part of my bookshelf real estate.

    A few weeks ago, I was having a discussion with a friend of mine around the pros and cons of the "one state" vs "two state" solutions to the conflict.

    For those not familiar with the options, they are:

    One State Solution: Israel and the West Bank become one country, with the same rights and laws applying to all the inhabitants. No distinction made based on ethnicity or religion.

    Two States Solution: Israel continues as it exists today; the West Bank and Gaza become a sovereign state and the inhabitants of the West Bank are governed by its inhabitants. The Israeli military evacuates the occupied territories, and Israeli citizens living in the West Bank become Palestinian citizens or have an option to emigrate back.

    My friend had good points against both solutions, the one state solution and the two state solutions. And I agree that both have problems, but the status quo of "one state and a colony" is way worse.

    The One State and a Colony is the current configuration: Israel is an independent country and the West Bank is a colony under a military occupation.

    This is a good Q&A with Chomsky on the prospects of a solution. This article lead to Noah Cohen's reply: Apologetics for Injustice in Palestine?. He advocates the one-state solution. Chomsky replied in Advocacy and Realism A reply to Noah Cohen.

    The problems of the two state solution today are explored by Haim Bresheeth.

    Posted on 13 Dec 2006


    Palestine and Iraq Books

    by Miguel de Icaza

    Just ordered three new books:

    Patrick Cockburn's Occupation is a very interesting read on the occuptation of Iraq and what went on. The story is told from the perspective of the Indepedent's journalist point of view. Patrick's book is packed with interesting stories, but Robert Fisk is still a better story teller.

    Mexico Updates

    Meanwhile, Mexico is going back to the 70's style repression. With hundreds of "disappeared", tortured and a handful of killed protesters at the hands of the state and federal police and an incompetent new president whose only significant act so far has been to propose education budget cuts (he back-pedaled yesterday on his plan) and raise the salaries of the military.

    Democracy Now has a complete report on the situation in Oaxaca.

    Brad Will's (a journalist with Indymedia) was covering one of the confrontations between the police and Oaxaca protestors, when government gun men shot him. His reporting and in particular his own video where he is killed is available with subtitles in English on YouTube.

    Posted on 13 Dec 2006


    A Night at the Movies

    by Miguel de Icaza

    One of the advantages of going to the movies in Boston is that the experience is enhanced by comments from expert graduates and undergraduates from the many famous universities in town.

    We recently went to see the new James Bond movie, "Casino Royale" at one of Boston's largest movie theaters. We arrived with plenty of time to spare, and we managed to get some great seats: middle, center-front.

    There were four or five Harvard students sitting behind us. Properly dressed, well groomed, and with impeccable haircuts. On our left, an MIT student with his date. He reminded me of the comic guy from the Simpsons.

    MIT guy provided some valuable data throughout the movie.

    When the first bullet was fired and the character dies, he solemnly informed his date "That is unrealistic" and he gave some details to back up his assertion "a bullet fired in that direction and speed would not push the body in that angle, let alone throw a guy from a chair".

    This was a premonition of the things to come. He had found a mission, a goal worth standing up for. During the rest of the movie he kept us informed about which parts were realistic and which ones were not. For the next two hours and a half, we were treated to a string of assessments "realistic" and "not realistic".

    Every once in a while he would also comment on the technological developments in this new Bond movie, "that technology actually exists.". He complements it with, "they are actually different". I was hoping he would say to his date at some point "That myth has been busted", but I waited in vain.

    I probably could have learned more from this MIT fellow about poker and the probabilities in the game, but the movie was distracting me from his fascinating lecture on the math and strategy behind poker.

    The Harvard guys were definitely more social, more outgoing. And they also shared with the rest of us their movie evaluations.

    Although they mostly focused on the various Bond girls. Unlike the MIT guy that went into longer discussions and technical explorations, they limited their comments to short sentences, they had developed an advanced taste for succinct statements: "Yeah Baby" was a favorite, a few "I want some of that" and sometimes they just used a few guttural sounds.

    They also shared with us their jet-setting background as they addressed the local culture "That is totally Venice".

    If I had to guess, I would guess they were not English Majors.

    What I found interesting is that the well-groomed Harvard folks giggled every time a girl was on screen. If the scene contained some erotic material, love declarations or kissing, the giggling usually turned into chatter. I learned a lot from them. Four out of five would "totally do her" and one of them would "Also quit the job for her", perhaps he was a secret agent wearing a Harvard sweat shirt yearning for a better undercover assignment.

    Posted on 06 Dec 2006


    Mono Migration Analysis Tool: Updated.

    by Miguel de Icaza

    An updated version of the Mono Migration Analysis has been released, you can download this from here.

    This new release from Jonathan Pobst has some important updates:

    • It tracks the API of Mono 1.2.2 (just released today).
    • It will automatically update to new API releases as we make them, so you can keep an eye on the progress we make as we publish new versions of Mono without having to update your Moma installation.
    • It optionally allows you to send us feedback and information about the software you are analyzing: you can tell us more about your product, your target and the time frame that you are thinking of to port to Linux.

    In the last week since the release of Moma, we have received 524 application submissions, from 299 different IP addresses (196 of them were single submissions, 48 were two submissions, 28 were three and a few folks sent more than that).

    Posted on 05 Dec 2006


    OpenOffice Forks?

    by Miguel de Icaza

    Groklaw is running a sensationalistic headline today:

    Novell "Forking" OpenOffice.org

    Well, if there are any Novell supporters left, here's something else to put in your pipe and smoke it. Novell is forking OpenOffice.org.

    There will be a Novell edition of OpenOffice.org and it will support Microsoft OpenXML. (The default will be ODF, they claim, but note that the subheading mentions OpenXML instead.) I am guessing this will be the only OpenOffice.org covered by the "patent agreement" with Microsoft. You think?

    Facts barely matter when they get in the way of a good smear. The comments over at Groklaw are interesting, in that they explore new levels of ignorance.

    Let me explain.

    We have been working on OpenOffice.Org for longer than anyone else has. We were some of the earliest contributors to OpenOffice, and we are the largest external contributor to actual code to OpenOffice than anyone else.

    We have for years maintained go-ooo.org (as well as its previous incarnations) a site where we encouraged new developers to join the OpenOffice effort, and worked to lower the barrier for contributors by creating tutorials, pre-compiled images and provide tools for contributors to work on it (some of this content is now being migrated to OpenOffice's new Wiki system).

    For years we have been shipping a patched version of OpenOffice because the release schedule of OpenOffice did not match our release schedule. In the very same way that Linux distributions have to ship patches against vanilla packages because the release schedule of those packages does not necessarily match the release schedule of a distribution.

    The work at go-ooo.org started in the Ximian days, when we were an independent startup, and we did quite a lot of work to make OpenOffice better integrate with the Linux desktop, upgrading its aging pieces and did quite some work on improving its performance.

    Our patches have been published in here (see for example) for the longest time. And plenty of them have already been merged upstream.

    But technically, Ximian never shipped a vanilla OpenOffice, we always shipped an improved version of it (with bug fixes, with backports or new features). This is nothing new.

    Today we ship modified versions of OpenOffice to integrate GStreamer, 64-bit fixes, integrate with the GNOME and KDE file choosers, add SVG importing support, add OpenDMA support, add VBA support, integrate Mono, integrate fontconfig, fix bugs, improve performance and a myriad of others. The above url contains some of the patches that are pending, but like every other open source project, we have published all of those patches as part of the src.rpm files that we shipped, and those patches have eventually ended up in every distribution under the sun.

    But the problem of course is not improving OpenOffice, the problem is improving OpenOffice in ways that PJ disapproves of. Improving OpenOffice to support an XML format created by Microsoft is tantamount to treason.

    And of course, the code that we write to interop with Office XML is covered by the Microsoft Open Specification Promise (Update: this is a public patent agreement, this has nothing to do with the Microsoft/Novell agreement, and is available to anyone; If you still want to email me, read the previous link, and read it twice before hitting the send button).

    I would reply to each individual point from PJ, but she either has not grasped how open source is actually delivered to people or she is using this as a rallying cry to advance her own ideological position on ODF vs OfficeXML.

    Debating the technical merits of one of those might be interesting, but they are both standards that are here to stay, so from an adoption and support standpoint they are a no-brainer to me. The ideological argument on the other hand is a discussion as interesting as watching water boil. Am myself surprised at the spasms and epileptic seizures that folks are having over this.

    Btw, I believe the translator that people are discussing is built with C# and XSLT and is available here. I wonder some of the posters on the Groklaw thread are going to have a stroke over the fact that the software is hosted at source forge.

    Posted on 04 Dec 2006


    Gulev: Free Software Conference in Cancun, Mexico

    by Miguel de Icaza

    Mexico is in a turmoil over the questionable elections this year.

    Fighting erupted among the representatives over the new appointed president. The new president was sworn-in in a rush, the international guests barely could sit before they had to whisk him out. Link

    The upside is that what is typically an incredibly boring TV broadcast that goes for a few hours was reduced to less than five minutes.

    I will be talking at the GULEV conference in Cancun next weekend. The GULEV conference has been running for a few years and it has always been incredibly fun. It is usually hosted in the port city of Veracruz.

    The last time I attended, my friend Arturo had just broken the screen of his powerbook. He traveled to Veracruz with an external monitor, underwear and a toothbrush.

    Posted on 02 Dec 2006


    Pato y Mancha

    by Miguel de Icaza

    Posted on 01 Dec 2006


    Top 1619

    by Miguel de Icaza

    There are 1,619 API calls that folks have reported that are either flagged with a [MonoTODO] attribute or are not implemented in Mono yet.

    The list was compiled out of the 244 Moma submissions available as of 8pm.

    A lot of these are 2.0 calls. The API lists are available here:

    I will be updating those urls with API updates as we move along.

    Posted on 28 Nov 2006


    Mono Migration Analyzer, Results

    by Miguel de Icaza

    Within 12 hours of announcing Moma we received 114 submissions generated by the tool detailing what features were missing.

    There were a number of interesting discoveries, these are:

    False Positives: One of the most commonly reported error were method calls and property accesses to the System.Net.WebRequest class. These turned out to be incorrect, since this class is an abstract class that happens to have stubbed all those methods and throws NotImplementedExceptions as a mechanism to ensure that implementors get those methods right.

    Developers will always be using a subclass that is created by the WebRequest.Create factory method (It makes me wonder why the methods were not flagged as abstract)

    New or overwritten methods: In a number of places, overwritten methods are showing up in the report. For example, a very common one is Exception.GetType(), or with Label::set_Text (the Label.Text setter), in both cases the problem is caused by 2.0 introducing a new method that overrides the base definition.

    The code, if compiled with Mono would have produced the correct result, but the binaries would not have worked as the member references were done to newer classes. Most of these are innocuous, and we already introduced the missing APIs for the most commonly reported problems.

    Outdated MonoTODOs: We have plenty of miss-used MonoTODOs, these are the messages that we used internally to flag that something in a method is incomplete, and ideally, it should provide an explanation of why the flag was set.

    But this is an attribute that we have used a bit recklessly over the past few years, and has had a number of meanings, from valid uses like "This method only implements half the specification" to less useful instances like "I do not like this API", to "Someone should optimize this routine" to "One day I would like to look improve this". So plenty of MonoTODOs were hints aimed at the source code maintainer, and not really to the developer that consumes the API.

    Eliminating all of the bogus MonoTODOs is an ongoing process, but we might still get a few erroneous reports for a while that might confuse developers.

    In particular, a lot of people hit on various methods in DataSet. None of those errors are correct, they are implemented, but they had old "MonoTODO" flags left behind.

    Limitations in the .NET API: In a number of cases, developers have resorted to P/Invoke into the Win32 API, and the results are very interesting, the top reasons for using P/Invoke have been:

    • Message dispatching: SendMessage, PostMessage.
    • GDI/DC operations: GetDC, CreateBrush, CreateRgn, SelectObject, DrawText.
    • Window operations: SetWindowPos, SetForegroundWindow ShowWindow, GetWindowRect, ClientToScreen, MoveWindow and Hook handling.
    • Allocation: GlobalAlloc
    • Fonts and Printing Dialogs.
    • Shell access: to get recently used files, icons for files and a handful of others.

    There are of course many more, but these are the majority of the uses.

    Some of those APIs are easily translated into portable calls (Message dispatching, window operations, allocation) while others are very hard (GDI/DC operations) and some others are better if replaced as a chunk with alternative code.

    Our next goal will be to provide a portability assembly that will take care of those operations that are easily translated, so P/Invoke calls would be replaced with calls into this portability assembly. On Windows, we will continue to P/Invoke the same methods, while on other platforms we would route the request through Mono's internals.

    In the case of Shell access, the best thing to do is to provide a cross-platform API that does the integration with the user shell, and provide an API that developers can migrate to. This would be effectively a "complement" for APIs that are today not available for Windows.Forms and even be a lot simpler for many people to use than resorting to P/Invoking.

    Lack of Comments: The first version of Moma lacked support for entering some comments from the person submitting the report, so all we got in our hands are the list of unimplemented methods, but we do not know much about the applications that are using it.

    When we ran this over applications we had, we were able to identify pieces that can be replaced as units based on the class names where they were used (this is part of the report that people get, but not part of the information transmitted to us). For example, a commercial application that we want to port (with the assistance of the owners) has neatly isolated things like printing dialogs in its own file.

    Cecil and Obfuscated Assemblies: Some of the applications that were processed were obfuscated. But the P/Invoke signatures also seem obfuscated, am not sure how those are actually resolved at runtime.

    Moma's version: at some point, we will need to enable Moma to download new API definitions from our site, to allow developers to check back if their applications are ready without having to download a new copy of Moma.

    Accounting: There are a number of limitations on the accounting and statistics that can be done with the results.

    It is hard to tell with precision how many of these are .NET 1.1 vs .NET 2.0, which ones are C# and VB and which ones are ASP.NET vs Windows.Forms. This is caused because Moma only uploads lists of missing methods, it does not upload other information that might be confidential, so Moma erred on the side of safety and removed data that was not necessary for us.

    The accounting for ASP.NET is further limited, since Moma does work on assemblies, and not on .aspx files. Those that used ASP.NET are most likely helper code that is used in ASP.NET applications.

    Another challenge with the data is that each submission contains the report for all the assemblies submitted. The end user might have chosen a single program, a single project (made up of many executables and libraries) or multiple programs.

    This is not a problem, but it is worth keeping in mind when you read the results below.

    Results

    From the submitted applications, ten of them work out of the box without any changes; Another 30 contained reports that could be ignored (MonoTODOs that should not have been there, the NotImplementeds that did not exist). Almost all of them contain calls to methods that are either easy to implement, or were already implemented.

    At least 29 of the applications are 2.0-based (by looking at Label::set_Text and Exception::GetType) and 16 of them are VisualBasic applications. One of the applications embeds IKVM.

    32 applications were ASP.NET applications; 56 used Windows.Forms; 32 use System.Data and 44 used System.Drawing (see the above caveats about interpreting this data; This is based on assemblies and submissions, not on projects).

    P/Invoke usage, from the 114 applications submitted:

    • 67 do not contain any P/Invoke calls.
    • 9 contain between 1 and 3 P/Invoke calls.
    • 10 contain between 4 and 10 P/Invoke calls.
    • 9 contain between 11 and 20 P/Invoke calls.
    • 5 contain between 22 and 48 P/Invoke calls.
    • 6 contain between 55 and 100 P/Invoke calls.
    • 5 contain between 102 and 180 P/Invoke calls.
    • 3 container more than 200 P/Invoke calls
      In the three cases, about half of the P/Invokes are to their own libraries.

    (details).

    So roughly half of the .NET applications can port without any concerns about P/Invoke. The remaining 40% are easily portable (those that have less than 48 P/Invokes) another 5% would take a few weeks, and maybe a Linux/Mono expert to assist on the port. The last 5% will require some large refactoring to work on Linux.

    The application that uses the most P/Invoke that we have received so far seems to be some kind of designer and also happens to use the System.Security.CodeAccessPermission::Assert a lot.

    Update: Sebastien comments that this is most likely a case of badly designed software, it is intended to avoid lots of stack walks to check for permissions. The above was probably copy/pasted from some recipe as an optimization that was useful in the 1.x frameworks. It is not required for 2.0.

    From the received applications, 15 of them need more work on VisualBasic. Although most of the Visual Basic applications reported NotImplementedExceptions for a number of their methods in CompilerServices, that turned out to be false positives, which leaves us with only 24 methods missing in the VB.NET runtime

    Unsupported Technologies

    There are a few features that we do not support, and do not plan to support, in Mono. These technologies are either being phased out (EnterpriseServices, System.Messaging, to be replaced by WCF/Olive), or they would require a lot of work that we are currently not planning on doing (COM).

    EnterpriseServicesis was used only by two applications, and all they seem to miss is a call to ServicedComponent::Dispose(). I suspect these are generated by a tool, considering the lack of any other methods references (and that we know are flagged).

    System.Messaging is another of the libraries that we have not implemented and it showed up in only three applications.

    COM, showed up in three applications.

    Update

    By the time this post went up this morning, we had received 171 submissions.

    Posted on 28 Nov 2006


    Mono Migration Analyzer 1.0

    by Miguel de Icaza

    Update: Moma 1.0 reports some false positives, see the post here for some explanations.

    Jonathan Pobst wrote a very nice tool, the Mono Migration Analyzer (Moma) a tool that can be used by Windows .NET developers to evaluate whether their software will need any modifications to run on the Mono supported platforms, here is the welcome screen:

    Moma works by analyzing all the instructions that the code contains and all the references to external types and assemblies (.exe and .dll files). The analysis is done using Cecil, a library used to examine, introspect and manipulate ECMA CIL images.

    The first step is to select the assemblies to analyze:

    During the analysis, Moma will look for any references to methods, fields, properties or events that the program does on external assemblies and report any of the following problems:

    • Using un-implemented classes, methods or accessing missing properties or fields.
      This would happen for example if a piece of functionality that developers expect is not yet available on Mono (most likely, 2.0 features).
    • Calls to methods, references to fields or types that have been flagged with the special "MonoTODO" attribute.
      Class libraries in Mono, when incomplete, are flagged with an attribute, like this:
      	[MonoTODO ("In Mono this is controlled by the --share-code flag")]
      	public LoaderOptimization LoaderOptimization {
      		// implementation details.
      	}
      		

      If your program uses the above property, Moma will provide a warning with the above text.
    • P/Invoke invocations. P/Invoke has two uses: to call into your own unmanaged libraries, or to call into Win32 APIs that are not exposed in the .NET API.
      Moma will report all uses of P/Invoke (uses, not declarations; A lot of people include a lot of declarations that they never use).
    • Any methods in Mono whose signature exists, but that throws a NotImplementedException when called.

    After analyzing your code, Moma will then present a summary of the issues found in your application:

    The report is a summary of the issues identified by Moma. You can get a detailed report of issues by clicking on "View Detailed Report". This new report is what you will be using when you go through your application making sure that your code is portable, the report looks like this:

    Finally, you can help us prioritize which classes and features are most important, you can do so by submitting the report to our team:

    Early Experiences

    I used Moma in a couple of applications from third party vendors that we are interested in bringing to Linux. The results so far are very promising as we are not missing that much.

    The majority of the problems so far have been in sections of code that P/Invoke to get to some features not available in the framework, things like preferences, recently used documents, CPU detection and a handful of features to get information about windows, items on the screen and a few more.

    To help port those applications we will be creating a portability assembly that will provide an API that Windows developers can call and will provide the proper native equivalent on Linux, Windows and OSX.

    Getting Moma

    You can download Moma 1.0.1 from here.

    Update New version is here.

    Posted on 27 Nov 2006


    MonoDevelop 1.0 Planning

    by Miguel de Icaza

    Lluis Sánchez has posted his tentative release plan for MonoDevelop 1.0.

    Posted on 27 Nov 2006


    More on Mexico's Election Fraud

    by Miguel de Icaza

    My father has a follow-up to his previous studies where he estimates the number of fake votes introduced in the July election. The programs to run the study at home are here.

    The interesting result is that statistically 3,700,000 were inserted into the election results (to match the actual published results), with the majority of the inserted votes going to the party that officially won (by a less than 220,000 votes).

    Posted on 24 Nov 2006


    Compiz Roadmap

    by Miguel de Icaza

    David has posted a roadmap for Compiz. It is all about the core engine, not much about plugins.

    It also seems like a new repository for plugins will be created.

    Also, he released a new version of Compiz, it is much smoother than the Compiz I have installed on my laptop.

    Posted on 23 Nov 2006


    Perl/Linux

    by Miguel de Icaza

    A Linux distribution that contains only 3 binaries compiled with the C compiler: the kernel, libc and perl.

    Someone needs to do a Mono/Linux distribution and follow the steps of these guys ;-)

    Posted on 23 Nov 2006


    Gaza

    by Miguel de Icaza

    Uri Avneri on the ongoing massacre in Gaza.

    Gideon Levy:

    "Gaza threatens to become Chechnya. There are thousands of wounded, disabled and shell-shocked people in Gaza, unable to receive any treatment. Those on respirators are liable to die due to the frequent power outages since Israel bombed the power plant. Tens of thousands of children suffer from existential anxiety, while their parents are unable to provide help. They are witnesses to sights that even Gaza's old-timers have never seen before".

    Posted on 22 Nov 2006


    Update: Mono on the Nokia 770

    by Miguel de Icaza

    Paolo has blogged his updates on running Mono on the Nokia 770, with the techincal details about the port.

    Posted on 20 Nov 2006


    Top 10 reasons against DRM

    by Miguel de Icaza

    From Reddit, Top 10 Reasons against DRM.

    And a nice new discovery Defective by Design.Org.

    Posted on 19 Nov 2006


    AjaxPro in Mono

    by Miguel de Icaza

    Michael Schwarz has a tutorial for Windows users that are using the Mono VMware image on how to run their ASP.NET and AjaxPro applications on Mono.

    The tutorial is a step-by-step tutorial on how to move your files from Windows to Linux and accessing it from there.

    At the end of the article, he focuses on running the application with XSP, I left a comment on how to run it with Apache:

    Running xsp in a console is similar to running Microsoft "Cassini" server, it is a small web server, and it is not very powerful.

    The VMWare image comes with both the small server, and Apache integration (which would be equivalent to running your ASP.NET with IIS on the Windows world).

    To run your applications with Apache, instead of xsp, just put your whole ASP.NET application in the /srv/www/htdocs directory.

    To go there, just open the file manager, type Control-L, that will open the location bar, and enter /srv/www/htdocs

    Copy the files there, and you are done, say you the directory MyWeb20App in /srv/www/htdocs, now you can browse to that location by going to:

    http://localhost/MyWeb20App

    Posted on 18 Nov 2006


    Mono on the Nokia 770 2006 OS

    by Miguel de Icaza

    Paolo has completed the support for the new ABI on the Nokia 770 which was part of the OS upgrade earlier this year.

    The code currently lives in SVN, and will be part of the upcoming Mono 1.2.1.

    But now would be a good time to use the new dependency tracking system on the Nokia and package all the Mono components.

    Posted on 16 Nov 2006


    More Mono Games

    by Miguel de Icaza

    I read on the Unity web site that FreeVerse is shipping their first Unity-based game.

    And we are of course very proud of it, because Mono is driving all of those effects.

    Mono is 10 megs out of the 66 megs in the distribution. Now that our embeddable eglib has been completed, we can shrink down an extra megabyte from the game download.

    Posted on 16 Nov 2006


    Open Sourcing of Java

    by Miguel de Icaza

    Congratulations to the Sun guys for the open sourcing of Java, another great contribution of Sun to free software.

    I blogged about this in the past, but it is worth linking to it again, as I raised what I think are some interesting points regarding the open source community and implementation of large bodies of code.

    Also, from reading Slashdot today I get the impression that there is too much of zero-sum mindset, a feeling that those of us in the Mono community would not be happy about this development, which is nonsense. We are after all, free software developers. Maybe this is based on the assumption that we are competing for the same contributors, and hence a fear of scarcity prevails. I like to think that although there is some overlap, our communities are vastly different.

    Or maybe it is not a zero-sum mindset, but merely a matter of rooting for the home team brought to the world of programming languages.

    In any case, a big hug to all the folks involved in open sourcing Java, am sure there will be quite a lot to learn from it, and am sure distributions cant wait for the full SDK release next year.

    Update: interesting post from Tim Bray and Sam Ruby on the subject.

    Posted on 13 Nov 2006


    HeapShot - New Memory Profiler

    by Miguel de Icaza

    Lluis checked-in last week a new memory profiler for Mono applications.

    He originally created this profiler based on `heap-buddy', while trying to understand memory consumption in MonoDevelop. I used it last week to trim down 340k of Tomboy memory consumption (removed a Hashtable that contained bools).

    If you are a Mono application developer, you will find this tool very helpful in finding where your memory is going. It will look your app look better (and Mono look better ;-)

    Joe and Larry will hopefully be pleased.

    The profiler lives in module `heap-shot' on SVN.

    For more information see Lluis' Blog

    Posted on 13 Nov 2006


    Mono 1.2 is out

    by Miguel de Icaza

    After two years of brewing, we finally released Mono 1.2. The release notes are here.

    I would have blogged a lot more details, but it has been a couple of busy weeks: the Mono meeting burned all my spare time for two weeks, last week events and this week in Barcelona at the TechEd have not given me much time to blog about it.

    Next week: Baden-baden for the Prio .NET Conference in Germany where am doing a keynote to present Mono to the .NET audience, and a tutorial session on Mono.

    Some press coverage is here.

    Posted on 10 Nov 2006


    Novell Answers Some Questions

    by Miguel de Icaza

    Thanks for sending your questions, some questions I could not answer myself, and I passed them on to Novell.

    Novell has now posted the answers to some of the most frequently asked questions here

    In particular, this covers the GPL section 7 questions, and our commitment to OIN (the patents listed today in OIN's site are Novell's contribution to the pool).

    Posted on 07 Nov 2006


    Mono in Barcelona, two talks

    by Miguel de Icaza

    In Spanish: Miguel de Icaza, on Wednesday November 8th at 19:30 in the Aula Magna at the Universitat de Barcelona at Gran Via de les Corts Catalanes, 585.

    Topics: Mono, Desktop Development with Mono, Xgl and Compiz, Linux, Microsoft and Novell announcement,

    In English: Miguel de Icaza (Novell) and Philippe Cohen (Mainsoft) On Thursday November 9th at 19:00 in the Barcelona Princess Hotel, next to the TechEd forum.

    Topics: Porting .NET applications using Novell's Mono or Mainsoft's Grasshopper. Deployment of applications into J2EE application servers with Mainsoft's Grasshopper.

    Posted on 07 Nov 2006


    Microsoft and Novell Collaboration, follow

    by Miguel de Icaza

    Thanks to everyone that sent their comments and questions, there are a few questions that I would like to answer that have been a common theme.

    These are my personal opinions, and do not represent in any way Novell's official position (its at the end of every page on my blog, but I figured its worth pointing out up front).

    Q: Which Patents Does Mono Infringe?

    I do not know of any patents which Mono infringes.

    Although Novell provides most of the work to develop Mono, Mono is still a community project with many constituents and collaborators from companies, universities, governments and individuals, and as such we will continue to work and operate as a community project.

    This means that we will continue to follow the rules that we have set for ourselves when it comes to patents:

    The Mono strategy for dealing with these technologies is as follows: (1) work around the patent by using a different implementation technique that retains the API, but changes the mechanism; if that is not possible, we would (2) remove the pieces of code that were covered by those patents, and also (3) find prior art that would render the patent useless.

    This is what we would have done before the agreement, and that is what we will continue to do.

    Not providing a patented capability would weaken the interoperability, but it would still provide the free software / open source software community with good development tools, which is the primary reason for developing Mono.

    There is more information on the web site on the above link.

    We will continue to develop Mono under the same restrictions that we had before the agreement.

    Q: Is it now possible to integrate code that uses Microsoft patents today?

    Although it is possible, we will not integrate such code, as Mono is a community project.

    And we will also continue to keep the Microsoft and Mono stacks separated, as there is no need to add dependencies between them and also makes it easy to split out all the non-ECMA components of Mono out.

    Why did you guys work this deal with Microsoft?

    Although I did not take part of the actual negotiations, and was only told about this deal less than a week before the announcement, I had been calling for a long time for a collaboration between Microsoft and Open Source and Microsoft and Novell.

    There are numerous interviews that touch on this topic and most recently my interview in Microsoft's Port25

    In the past I had called for this same kind of cooperation with other companies. In 1999, we started talking to Sun and HP regarding GNOME; In particular in 2000 we had a meeting with Marco Boerries at Sun to discuss the desktop, and their adoption of GNOME as their new desktop. At that time we discussed the plans to have a combined desktop made up of components of StarOffice and GNOME (at that meeting, I conceded that I would no longer work on Gnumeric, and instead we would improve OpenOffice; Sun conceded that Evolution would be their default mailer instead of the StarOffice one).

    Have you not learned from history? Microsoft has damaged all of their partners in the past!

    I have gotten a few emails along those lines and folks asking for comment, and a lot of hate mail (more than usual). I find it hard to reply to this comment, because this is really going to come down to personal opinions and personal biases.

    In my personal opinion, I think that we have to give it the benefit of the doubt, try to turn the hand that has been dealt into the best possible outcome for everyone. Or as Benjamin Zander would say, I will give them an A, and work from there.

    Similar deals have been done in the past, in 1997 Microsoft signed a similar deal with Apple, and Apple used that agreement and the incoming monies to turn the company around.

    Sun signed a similar agreement with Microsoft in 2004, which at the time I realized enabled Sun to ship Mono on Solaris (which we already supported at that time).

    Now, I can not say that the crowd applauded Apple and Sun at the time, and both of them ship a lot of GPL code, not the Linux kernel, but a lot of GPL code, and the sky has yet to fall on our heads.

    Back in April of 2004, I wrote about that deal:

    I am counting the minutes for Sun to ship our Mono implementation for Solaris. Maybe we can still make it to the Solaris 10 release.

    Just picture the benefits, out of the box free C# compiler on Solaris SPARC and Solaris Intel. Out of the box ASP.NET and ADO.NET on SPARC, and the Gtk# bindings for writing applications for the Java Desktop System.

    Not to mention that they get the industry's most sexy JIT compiler for free.

    I am walking with an extra cell phone battery in case McNealy or Schwartz decide to call me up over the weekend to discuss potential agreements (if I don't pick up, please leave a message, the wonders of ATT wireless).

    Am afraid to report that neither Scott nor Jonathan emailed me or left a voice mail at the time. I think it would have been grand for Sun, but maybe Java emotions were too strong inside the company for this to be even considered.

    Could a better deal been struck for the Open Source community?

    Possibly. But I do not know what the latitude was inside the deal.

    What I can personally say is that considering that Microsoft is 100 times larger than Novell (market cap wise alone) it was probably difficult.

    Getting rid of patents completely would probably have to involve a few giants. Microsoft has a 282B market cap, so maybe a combination of IBM (138B), Google (143B), Oracle (92B) and even Sun (18B) would have to come together and enter a gigantic patent love-fest to make a better deal for everyone happen (By comparison Novell is at 2.2B).

    And this is why I find it surprising that Sun's Simon Phipps had forgotten that Sun entered a similar agreement a few years ago, and had this to say about the Microsoft/Novell deal:

    It's a remarkable reversal of opportunity, all the more remarkable that the Novell participants smiled the whole way through what had clearly become a Microsoft event. They went in seeking a huge payout, and emerged with the payout, yes - but also with a commitment to pay it back in royalties on open source software they sell.

    A larger opportunity could probably happen with a setup like the one I described previously. But whether this could actually be done, is left as an exercise to the reader (or alternative approaches that would completely eradicate software patents from the map).

    Let me point out that McNeily seemed to be all smiles at the equivalent event a few years ago; Nothing bad about that, but Simon probably should notice that Sun is eight times larger than Novell, and if anything, his company is 8.18 in a better position that Novell is to take advantage of these opportunities.

    Posted on 04 Nov 2006


    Microsoft and Novell Collaborate

    by Miguel de Icaza

    The big new of the day: Microsoft and Novell are set to collaborate. You can read all about it here, you can also go straight to:

    But the question on everyone's mind regarding today's announcement is what is the position regarding Mono, from the Q&A:

    Q: What are you announcing?

    ...

    Under a patent cooperation agreement, Microsoft and Novell provide patent coverage for each others customers, giving customers peace of mind regarding patent issues.

    Q: What does the patent agreement cover with regard to Mono and OpenOffice?

    Yes, under the patent agreement, customers will receive coverage for Mono, Samba, and OpenOffice as well as .NET and Windows Server. All of these technologies will be improved upon during the five years of the agreement and there are some limits on the coverage that would be provided for future technologies added to these offerings. The collaboration framework we have put in place allows us to work on complex subjects such as this where intellectual property and innovation are important parts of the conversation.

    And from our joint letter:

    Mono, OpenOffice and Samba:

    • Under the patent agreement, customers will receive coverage for Mono, Samba, and OpenOffice as well as .NET and Windows Server.
    • All of these technologies will be improved upon during the 5 years of the agreement and there are some limits on the coverage that would be provided for future technologies added to these offerings.
    • The collaboration framework we have put in place allows us to work on complex subjects such as this where intellectual property and innovation are important parts of the conversation.
    • Novell customers can use these technologies, secure in the knowledge that Microsoft and Novell are working together to offer the best possible joint solution.

    So today we have secured a peace of mind for Novell customers that might have been worried about possible patent infringements open source deployments. This matters in particular for Mono, because for a long time its been the favorite conversation starter for folks that find dates on Slashdot.

    Anyways, now that we got that out of the way, I wanted to point to Michael Meeks' blog entry on the OfficeXML collaboration, which one of the major areas of collaboration, his blog entry is here, regarding the general question around why support Office XML, Michael says:

    This should not be a surprise - Jody Goldberg (on my team) has been working hard for months with Microsoft and others on the ECMA process. At one stage there around 1/2 the open 'issues' wrt. improving disclosure (and hence the spec.) came from Jody. I for one am proud of the job that he did there, an (ongoing) investment that will yield better interoperability for years to come.

    Anecdotally, I would like to point out that the work that happened through the ECMA TC45 has proved very fruitful, as things that were completely left out of the Oasis specification and in the original TC45 submission were put in there because Jody and Michael that have previously worked on Gnumeric and OpenOffice managed to get these things into the spec.

    Read Michael's blog for more details, as he has many nice things to say about Open Office and Office XML.

    I have a longer blog entry in the works, I promise I will post later more of the details on the various areas of collaboration on the business angle, and the technical angle

    If you have some questions about this, please email me at [email protected] and I will include answers to your questions on my updated blog entry.

    Posted on 02 Nov 2006


    Open Source XNA

    by Miguel de Icaza

    XNA is a new set of tools for assisting in game design, development and mangement (see the XNA Wikipedia page).

    One of the components is the "XNA Framework" a set of .NET APIs for actually building the applications. It does not expose DirectX which makes it simpler to be ported to other platforms.

    Rob Loach has started a project to do an open source implementation using the TaoFramework (Tao provides bindings for all things OpenGL and a few other media libraries).

    Rob's implementation is being developed here. Currently most of the development is happening on Windows, but the project on SVN has support for building this on Linux with Mono as well.

    Posted on 01 Nov 2006


    Mono in Barcelona

    by Miguel de Icaza

    At the Universitat de Barcelona

    Jordi Mas has organized for me to talk in Barcelona on November 8th at 19:30 in the Aula Magna at the Universitat de Barcelona at Gran Via de les Corts Catalanes, 585.

    Will talk about Mono, developing with Mono, will likely introduce the work from Jordi (Workflow) and Lluis (MonoDevelop and Stetic) and talk about our plans for Mono 2.0 and beyond.

    At the Microsoft TechEd

    Frank Rego and myself will be at TechEd Developers in Barcelona from the 7th to the 10th. If you are attending TechEd, we will be in the Novell booth.

    Posted on 31 Oct 2006


    F-Spot's Prepare Email

    by Miguel de Icaza

    F-Spot finally has a feature that I have been waiting for. It is now possible to scale pictures before sending them:


    Preparing Images for Email

    Posted on 31 Oct 2006


    MonoTorrent Updates

    by Miguel de Icaza

    Alan McGovern the developer of the BitSharp libraries (Bittorrent APIs for the CLI) started blogging.

    Alan has continued his work from the Summer of Code, here are a few updates from him:

    From his blog:

    So it looks like i well achieved my aim of creating a cross platform client that uses less than 1/3 the ram that Azureus uses.

    Here are a few screenshots of the updated GUI (Piotr did the GUI originally, and it has now been updated to the latest BitSharp API changes):


    GUI running on Windows (This is Gtk# on Windows).

    Alan keeps a To-Do list here, which should make it simple for people to help in the effort.

    a few more screenshots are available here and here.

    Posted on 30 Oct 2006


    Mono Meeting and the Olive Project.

    by Miguel de Icaza

    The Mono Meeting is over, it was a couple of very intensive days, and I managed to get very little sleep.

    The slides for the presentations are here:

    Olive: Infocard and Indigo

    On Monday Atsushi checked into the olive module the initial implementation of Indigo and Infocard.

    The status of the module is kept here and contains a human readable report of where we are standing. It is only the beginning, but some simple applications are able to run now.

    Hopefully in the next few days I will have time to write down a few more lines about everything we talked about in the public Mono meeting and in our internal discussions.

    Posted on 25 Oct 2006


    Brunch

    by Miguel de Icaza

    For those of you coming to the Mono Meeting early today (the "early-arrivers"), we will be having brunch at noon in Casa Romero.

    Posted on 22 Oct 2006


    Mono on Alpha

    by Miguel de Icaza

    Sergey Tikhonov has been working for a few months on an Alpha port of the Mono JIT. The port can currently bootstrap itself (a sanity test that is used by all Mono ports), and the port is able to build the usual Mono GUI libraries (Gtk# and the Gtk# apps).

    Currently the port still lacks varargs support, debugger support, global register usage and some peephole optimizations.

    All of this code is now on SVN, and will appear shortly on the Mono 1.1.18 release.

    Mark Mason has been working on a MIPS port, and he said this morning that the port is now "limping along". Not quite sure what that means until we see the patch.

    Now all we need is a m68k to conquer the Atari ST world and a VAX port for all of you that still run an 11/780 in your basement.

    Posted on 11 Oct 2006


    ?? Operator

    by Miguel de Icaza

    Today Jon pointed me to C#'s "??" operator, this is really the kind of thing that I should know. The operator is part of the nullable-type family of operators, but I did not know that you could use this with regular expressions.

    Its lovely, the expression: a ?? b evaluates to a if a is not null, or to b if a is null.

    Very handy, replaces the idiom: a == null ? b : a.

    This is only available in the gmcs compiler.

    Posted on 06 Oct 2006


    Compiler merge

    by Miguel de Icaza

    Mono's C# compiler was forked a few years ago (mid 2003) when we started developing the generic extensions to the language. We did this because the generic specification at the time was still in flux, and this new compiler was sort of a research compiler for us. We did not want to destabilize our production compiler (mcs) with generics at the time, so we kept the new compiler on its own tree (gmcs).

    The downside is that ever since, we have had to merge all the improvements and bug fixes done to the generics which required a considerable effort.

    Things have luckly changed. The C# generics specification is complete and gmcs is now stable.

    This past week Martin and Harinath completed the merging of mcs with gmcs. Now we have a unified source code base, the only place where we have kept the code base divided is the tokenizer and the parser. This is ok, as we are considering writing a hand-written parser instead of the yacc generated parser that we use today.

    This effort started because Martin did some major architectural changes in the anonymous method and iterator support.

    Posted on 05 Oct 2006


    Dick's Portability Layer

    by Miguel de Icaza

    One of the most common problems that people face when porting applications from Windows to Linux using Mono are paths.

    The Problem

    Windows developers are used to a case-insensitive file system, which means that they might create a file called "mydata" in one place, and try to access it somewhere else as "MyData" or as "MYDATA". This of course breaks on most Unix setups because Windows is case insensitive[1].

    Another problem is that developers on Windows are known to hardcode the directory separator character in their source code ("\") instead of using Path.DirectorySeparator and using Path.Combine for combining this paths. This is a problem because "\" is a valid file name components on Unix. This means that if an application hardcodes for example "Logs\access_log", in Unix this will not store the contents in the "Logs" directory as the file "access_log". Instead, it will store the results in a file called "Logs\access_log".

    Only a few applications cope with drive letters, but they might still pose a problem as the colon is a valid filename in Unix, which means that "A:\file" is a valid filename in the current directory.

    Although .NET provides the tools to write code that is portable, in practice, they do not use these features (the exception is Path.Combine, which some people use, as it is genuinely useful on its own).

    The Usual Solution

    When moving applications from Windows to Linux, it is always necessary to run the application, run its test suite, and validate that the application works as intended. With the path problems described above, the process above included a number of iterations to fix the assumptions made by programmers about the file system.

    This process could be time consuming, because identifying where the mistakes were made could take some time, the program might fail with FileNotFound exceptions (when referencing files that were not there), data would show up empty (listing contents of a directory that had nothing, as all the data went elsewhere) but it was doable.

    This process works as long as you have the source code to all the components that you are porting, but if you were using a third-party library that you had no source code for, you would not be able to fix the problems.

    The New Solution

    This week, Dick Porter introduced a portability layer into Mono that will address those problems without requiring changes to your code. This will remove a large component of the porting cycle as a whole class of obnoxious problems are gone.

    The new portability framework is enabled by setting the environment variable MONO_IOMAP (which we will likely rename to something shorter) to one of the following values:

    • case: makes all file system access case insensitive.
    • drive: strips drive name from pathnames.
    • all: enables both case and drive.

    In addition, if any of those options are enabled, the directory separator mapping is also turned on. So this basically means that you have to type this, or include this in your script that launches your application:

    	$ export MONO_IOMAP=all
    	$ mono myapp.exe
    	

    For ASP.NET applications hosted with mod_mono, you can add the following directive to your Apache configuration file:

    	MonoSetEnv MONO_IOMAP=all
    	

    This new feature will appear in Mono 1.1.18.

    The downside is that Mono will have to do some extra work when coping with your file system, to search for case insensitive file names. So if your application is still a portable application, you will be much better off without this switch.

    [1] Some Linux file systems are case insensitive, and some folks have used a combination of hacks, including doing loopback CIFS mounts to get case sensitivity issues out of the way; OS X does not have this particular problem, but it still has the others.

    Posted on 05 Oct 2006


    Dave Winer

    by Miguel de Icaza

    Dave Winer did post about the new bill in Congress, two posts:

    Posted on 03 Oct 2006


    Mexico City Talk: MonoDevelop, an IDE for developing desktop

    by Miguel de Icaza

    applications

    Lluis Sánchez ofrecerá una charla sobre Mono y MonoDevelop en la Facultad de Ciencias en la UNAM.

    La cita es este Miércoles 4 de Octubre a las 5pm en el anfiteatro Alfredo Barrera de la Facultad de Ciencias.

    Lluis es el desarrollador principal de MonoDevelop hoy en dia, y ha sido responsable de la integración del nuevo diseñador de formas Stetic, y es responsable de varios componentes importantes en Mono como Remoting, Serialización y los servicios de Web.

    Posted on 03 Oct 2006


    New York Times Reader

    by Miguel de Icaza

    I just downloaded and installed the Avalon-based the New York Times reader.

    This is one nice Avalon application, it distinguishes itself from all the samples that I have seen because it lacks a video playing in the background, and the buttons have not been rotated 30 degrees. It is one cute application, and I might have to eat my own words if someone from the New York Times developer team starts raving about their experience.

    A few years ago, before the Ajax revolution, it was to me pretty clear that Flash based frameworks and Avalon would pose a real threat to the web as we know it. Unlike the Web, developing applications with Flash or Avalon could be a more consistent developer experience than the combination of HTML, HTTP, CSS and JavaScript and the dozen other elements that must be mastered to create modern web applications. At least, they have a certain appeal to some developer segments.

    Robert O'Callahan from Novell weighs in on this subject, and offers a few alternatives on how things could be improved on the web world.

    Of course, the real solution is for someone to implement an open source Avalon stack to run on top of Mono. No applause, just throw money.

    Or developers.

    Posted on 02 Oct 2006


    US Constitution 2.0

    by Miguel de Icaza

    An updated version of the US Constitution was unveiled last week, a good summary is here.

    I have only noticed the commentary on a few political web sites about the impact of the new legislation, I was expecting everyone to be up in arms about it.

    The New York Times article Editorial has a good summary of the problems:

    Here’s what happens when this irresponsible Congress railroads a profoundly important bill to serve the mindless politics of a midterm election: The Bush administration uses Republicans’ fear of losing their majority to push through ghastly ideas about antiterrorism that will make American troops less safe and do lasting damage to our 217-year-old nation of laws — while actually doing nothing to protect the nation from terrorists. Democrats betray their principles to avoid last-minute attack ads. Our democracy is the big loser.

    Republicans say Congress must act right now to create procedures for charging and trying terrorists — because the men accused of plotting the 9/11 attacks are available for trial. That’s pure propaganda. Those men could have been tried and convicted long ago, but President Bush chose not to. He held them in illegal detention, had them questioned in ways that will make real trials very hard, and invented a transparently illegal system of kangaroo courts to convict them.

    It was only after the Supreme Court issued the inevitable ruling striking down Mr. Bush’s shadow penal system that he adopted his tone of urgency. It serves a cynical goal: Republican strategists think they can win this fall, not by passing a good law but by forcing Democrats to vote against a bad one so they could be made to look soft on terrorism.

    Last week, the White House and three Republican senators announced a terrible deal on this legislation that gave Mr. Bush most of what he wanted, including a blanket waiver for crimes Americans may have committed in the service of his antiterrorism policies. Then Vice President Dick Cheney and his willing lawmakers rewrote the rest of the measure so that it would give Mr. Bush the power to jail pretty much anyone he wants for as long as he wants without charging them, to unilaterally reinterpret the Geneva Conventions, to authorize what normal people consider torture, and to deny justice to hundreds of men captured in error.

    These are some of the bill’s biggest flaws:

    Enemy Combatants: A dangerously broad definition of “illegal enemy combatant” in the bill could subject legal residents of the United States, as well as foreign citizens living in their own countries, to summary arrest and indefinite detention with no hope of appeal. The president could give the power to apply this label to anyone he wanted.

    The Geneva Conventions: The bill would repudiate a half-century of international precedent by allowing Mr. Bush to decide on his own what abusive interrogation methods he considered permissible. And his decision could stay secret — there’s no requirement that this list be published.

    Habeas Corpus: Detainees in U.S. military prisons would lose the basic right to challenge their imprisonment. These cases do not clog the courts, nor coddle terrorists. They simply give wrongly imprisoned people a chance to prove their innocence.

    Judicial Review: The courts would have no power to review any aspect of this new system, except verdicts by military tribunals. The bill would limit appeals and bar legal actions based on the Geneva Conventions, directly or indirectly. All Mr. Bush would have to do to lock anyone up forever is to declare him an illegal combatant and not have a trial.

    Coerced Evidence: Coerced evidence would be permissible if a judge considered it reliable — already a contradiction in terms — and relevant. Coercion is defined in a way that exempts anything done before the passage of the 2005 Detainee Treatment Act, and anything else Mr. Bush chooses.

    Secret Evidence: American standards of justice prohibit evidence and testimony that is kept secret from the defendant, whether the accused is a corporate executive or a mass murderer. But the bill as redrafted by Mr. Cheney seems to weaken protections against such evidence.

    Offenses:The definition of torture is unacceptably narrow, a virtual reprise of the deeply cynical memos the administration produced after 9/11. Rape and sexual assault are defined in a retrograde way that covers only forced or coerced activity, and not other forms of nonconsensual sex. The bill would effectively eliminate the idea of rape as torture.

    There is not enough time to fix these bills, especially since the few Republicans who call themselves moderates have been whipped into line, and the Democratic leadership in the Senate seems to have misplaced its spine. If there was ever a moment for a filibuster, this was it.

    We don’t blame the Democrats for being frightened. The Republicans have made it clear that they’ll use any opportunity to brand anyone who votes against this bill as a terrorist enabler. But Americans of the future won’t remember the pragmatic arguments for caving in to the administration.

    They’ll know that in 2006, Congress passed a tyrannical law that will be ranked with the low points in American democracy, our generation’s version of the Alien and Sedition Acts.

    New York Times
    Antiterrorism Bill on Detainees, Geneva Conventions Rushing Off a Cliff
    September 28th, 2006.

    And of course, the problem is that these new provision are easily misused and abused: like the DMCA is misused and abused; like the war-on-drugs legislation is misused and abused and like the Patriot Act is misused and abused.

    Amy and David Goodman recently published Static: Government Liars, Media Cheerleaders and the People Who Fight Back a book that quotes extensively from the interviews they have done on their radio program on Democracy Now. The book is packed with first-hand accounts of people who have received the short end of the stick.

    Posted on 02 Oct 2006


    SQL Injection

    by Miguel de Icaza

    Scott has an interesting post detailing the risks of SQL injection.

    I made that mistake myself when I wrote the contributions web service for Monodoc. Until a few months ago, our Monodoc service had this very problem. Pablo Orduña contacted me off-line and even provided fixes to our web service to fix the issue. Highly recommended reading for anyone writing web apps.

    Posted on 02 Oct 2006


    George and Hugo speeches

    by Miguel de Icaza

    Annotations of George speech is over at billmon.

    Hugo's speech at the UN raises a few good points:

    And we must recall in this room that in just a few days there will be another anniversary. Thirty years will have passed from this other horrendous terrorist attack on the Cuban plane, where 73 innocents died, a Cubana de Aviacion airliner.

    And where is the biggest terrorist of this continent who took the responsibility for blowing up the plane? He spent a few years in jail in Venezuela. Thanks to CIA and then government officials, he was allowed to escape, and he lives here in this country, protected by the government.

    And he was convicted. He has confessed to his crime. But the U.S. government has double standards. It protects terrorism when it wants to.

    And this is to say that Venezuela is fully committed to combating terrorism and violence. And we are one of the people who are fighting for peace.

    Luis Posada Carriles is the name of that terrorist who is protected here. And other tremendously corrupt people who escaped from Venezuela are also living here under protection: a group that bombed various embassies, that assassinated people during the coup. They kidnapped me and they were going to kill me, but I think God reached down and our people came out into the streets and the army was too, and so I'm here today.

    But these people who led that coup are here today in this country protected by the American government. And I accuse the American government of protecting terrorists and of having a completely cynical discourse.

    Then he raises the issue of the veto:

    Point three, the immediate suppression -- and that is something everyone's calling for -- of the anti-democratic mechanism known as the veto, the veto on decisions of the Security Council. Let me give you a recent example. The immoral veto of the United States allowed the Israelis, with impunity, to destroy Lebanon. Right in front of all of us as we stood there watching, a resolution in the council was prevented.

    Worth reading the whole thing.

    Posted on 22 Sep 2006


    Firenze Talk, update

    by Miguel de Icaza

    My Firenze Talk will be held in a new location: Universitá degli Studi di Firenze - Facoltá di Ingegneria, in l'aula è la 008 di viale Morgagni at 3pm.

    A flier is available here.

    Posted on 19 Sep 2006


    Lang.NET Symposium Videos

    by Miguel de Icaza

    Michael Lehman has uploaded the videos from the various presentations that we had at the Lang.NET Symposium.

    My favorites:

    • John Gough on running Ruby on the CLR.
    • Mike Barnett on Spec# (Programming with contracts).
    • Anders Hejlsberg on the new LINQ extensions. A great introduction to the new data and XML processing facilities in C# 3.0 and how these are built on top of a few small changes to the language.
    • Dom Syme talks on F# and delivers a great live demo.
    • Jim Hugunin shows IronPython, this was done very close to 1.0
    • Jim and Cory on SecondLife. I absolutely loved Jim's presentation.
    • John Lam on bridging the Ruby interpreter and the CLR (different from John's presentation. He also pulls an incredible demo with Ruby and Avalon.

    There are more talks there, but I missed a few of those talks (one of the talks uses Mono's C# compiler as the base for their research.

    And my own presentation here, the usual Mono stuff that I talk about.

    Posted on 15 Sep 2006


    Cory and Jim presentation on SecondLife

    by Miguel de Icaza

    Cory does a fantastic presentation on what SecondLife is on this video from the Lang.NET Symposium.

    Jim then talks about the work that they have been doing to use Mono as the virtual machine to run their scripts. Jim is an excellent presenter.

    This is a must-watch presentation for programmers.

    Posted on 15 Sep 2006


    Updated Venue for Mono Meeting

    by Miguel de Icaza

    We have changed the hotel venue, to a nearby location, please check the Venue Update post on the Web site.

    Posted on 15 Sep 2006


    Iran

    by Miguel de Icaza

    Officials of the United Nations' International Atomic Energy Agency said in a letter that the report contained some "erroneous, misleading and unsubstantiated statements."

    Yesterday's letter, a copy of which was provided to The Washington Post, was the first time the IAEA has publicly disputed U.S. allegations about its Iran investigation. The agency noted five major errors in the committee's 29-page report, which said Iran's nuclear capabilities are more advanced than either the IAEA or U.S. intelligence has shown.

    Among the committee's assertions is that Iran is producing weapons-grade uranium at its facility in the town of Natanz. The IAEA called that "incorrect," noting that weapons-grade uranium is enriched to a level of 90 percent or more. Iran has enriched uranium to 3.5 percent under IAEA monitoring.

    Washington Post
    U.N. Inspectors Dispute Iran Report By House Panel
    September 14, 2006

    Last Sunday, Mohammad_Khatami, Iran's former president, had a talk at the Harvard Kennedy School of Government here in Boston, the talk is available on C-SPAN.

    Not an expert on the topic, but his talk is worth watching.

    The Q&A section of the talk was probably the most interesting, Harvard agreed to host him provided that Mohammad Khatami took unscripted questions from the audience. The questions and answers are the best part of the talk.

    When asked about the uranium enrichment program he said something along the lines that Iran continued to abide by the IAEA regulations. That they had withdrawn from some voluntarily stricter regulation that they had suggested in the past. This is roughly from memory.

    Posted on 15 Sep 2006


    SplendidCRM

    by Miguel de Icaza

    I completely had forgotten to blog about SplendidCRM, an open source, .NET-based CRM system

    The folks at SplendidCRM are very much Windows developers, they are completely new to Linux, they do not know our ways, nor speak the language that most of us Linux users do.

    They were interested in supporting their CRM system on Linux, but they were overwhelmed by the instructions on how to get their software up and running on a system that they barely knew.

    They were the first users to try our Mono VMware image. They had been requesting this from us for months, they got their software ported in a couple of days:

    Within an hour of getting the VMware image, I was able to compile my project without any errors. You guys should have done this years ago.

    We had to fix a couple of issues with our VMware image (DHCP configuration, installing the VMware tools) and after these changes, only after 48 hours since the release, his product was running on Linux.

    SplendidCRM running with Mono, SUSE/Linux and MySql.

    You can try their product running against MySQL or against SQL Server on top of Mono from their site.

    Posted on 12 Sep 2006


    Bush Questioned on Torture

    by Miguel de Icaza

    In this interview president Bush is visible upset by the questions about torture.

    Posted on 11 Sep 2006


    Mono in Games

    by Miguel de Icaza

    Otee and a few other companies are building games with Mono as the VM for running scripts.

    In Otee's case, I believe they are using some modified version of Boo. We are also assisting Second Life in adding a few features that they need in Mono for their own game.

    Today, while reading reddit, I ran into this article Why C++, an article where the author talks about the advantages of C++ over C for game engines. At the end there was an interesting paragraph:

    So I hate to admit it, but I come down on the side of conventional wisdom. Write your game engine in C++. Write your gameplay in Lua. Those might not be the right answers for the next generation. I can imagine a language with better support for concurrency stealing the application domain from C++ sometime in the next decade. And C#/Mono is nipping at Lua's heels as a game scripting language already. But for now, I think the C++/Lua combination is as good as it gets.

    Emphasis added.

    We know about a handful of games, but we do not have an entire list; I would love to know more about people using Mono to develop their game logic and would like to work with you guys (and yes, we can keep a secret).

    Although Mono is embeddable, I always got the feeling that we could improve that API, and would like to get feedback from those embedding the VM about what kind of things they would like to have in Mono to simplify the embedding and improving future embedders experience.

    Updated, some cute screenshots from Unity and games built with Unity are here

    If you install their web plugin (Windows and OSX only for now), you can try out some of the samples, and sample games in here.

    It is a shame that it does not run on Linux, but both the Windows and OSX versions use Mono as their high-level engine.

    Posted on 11 Sep 2006


    Mono, .NET and Linux in Firenze

    by Miguel de Icaza

    I will be talking about Mono, Mono-based applications and a little about our work on the desktop at Novell.

    Location: Universitá degli Studi di Firenze - Facoltá di Ingegneria, in l'aula è la 008 di viale Morgagni at 3pm.

    When: 29th of September, 2006.

    Thanks to Massi for helping me set this up!

    Updated

    Posted on 09 Sep 2006


    Mexico: Six More Years of Poverty.

    by Miguel de Icaza

    Calderón, the most recently purchased president and a corrupt politician has been now appointed Mexico's president by the court.

    From The Guardian:

    Felipe Calderón has been named president of Mexico, by a court, much as George Bush was named President of the United States, by a court.

    But did he win the election? We do not know. The court's decision does not establish this, any more than the Bush v Gore case established that Bush won his first election - which, as we now know, he did not.

    In both cases, the truth could have been known in time. But it was not. And that is because one side - in the legal struggle, the winning side - refused and resisted a full recount of the votes.

    Posted on 07 Sep 2006


    Mono Summit

    by Miguel de Icaza

    We finally have a location for the upcoming Mono Summit in Boston: The event will be held at Marriot Hotel at Kendall Square in Cambridge, MA on October 23 and 24th.

    Just in front of the Kendall T-Stop in Cambridge, 20 minute walking distance from Berklee College in Boston and across the street from MIT.

    If you are coming, please register in advance and if you wish to connect with other Mono summit attendees, you can list yourself in our our public Wiki.

    My boss today suggested that we should have some kind of reception, am thinking we could have a "Welcome Meeting" on Sunday evening for those arriving to the city, and maybe some small soire on Monday and maybe some parting drinks for Tuesday. Anyways, if you got some awesome idea about what to do with 80-100 C# developers, drop me a line.

    Posted on 07 Sep 2006


    New MonoDevelop is out!

    by Miguel de Icaza

    Lluis has finally put the finishing touches on the latest incarnation of MonoDevelop.

    This release is feature packed: Stetic now has toolbar, menu and action editors for Gtk# applications:


    The Menu Designer, showing stock-icons. Clicking on "Click to create an action" will enter a new row.


    The toolbar designer, here it show how to select a stock-icon for the toolbar.

    This GUI designer is based around the Gtk Action model, so all menu entries and toolbar commands are linked to the same action. So you actually hook up events to the actions, not to the individual items, which is useful to keep consistency in your application.

    The stock icons are not limited to the ones that ship with Gtk+, you can define your own that you can later reference, this is how:

    When designing your dialog boxes, a context-sensitive toolbar is activated depending on the widget selected, so the most common operations are available right in the design surface without having to hunt them down on a property list:


    Here you can see the options available for a label: alignment of the text,
    and the vertical and horizontal filling and expanding properties.

    Michael's Summer of Code ASP.NET GUI designer is now part of MonoDevelop, here it is in all of its glory:


    The palette on the right shows the properties for the selected control, the "OK" button.

    The ASP.NET designer is built on top of Mozilla, so a lot of the work is in the interaction between the embedded Mozilla engine and the MonoDevelop host.

    Code completion has been vastly improved, it now supports Generics and will also display a tooltip with the help associated with a method when you select it.

    Finally, when you hover over the source code, you can get documentation for a particular method:

    MonoDevelop will now also generate the auto-tools infrastructure for your project (thanks to Scott!), to ease the deployment of your applications. And is able to produce tarballs directly from the IDE:

    It will generate the standard auto-* stuff, but it will also install a .pc pkg-config file for your libraries, so third party projects can "reference" your library easily.

    Solutions and Widget Libraries

    My favorite feature is that your solution can include not only your main project, but also other libraries, like a widget library.

    In this screenshot I have created a library that contains a custom control "MyControl" which is part of the "MyWidgets" project. The "MyWidgets" project then gets added (Go to References, Edit) to the main project, and this new widget becomes available for consumption in the main program.

    You can also incorporate any other libraries and widgets, and they will show up in the palette just like MyControl show up on the right here:

    My Wish-list

    Internationalization: I personally would like to see something like Rafael's internationalization plugin to be integrated in MonoDevelop so you could also manage internationalization in the IDE.

    And there is plenty that can be done in this area, for translations we could poke web services that expose all known translation strings for a project and incorporate translations into a program. We could also have a service that translates with Google Translate and help people translate their project and keep track of progress.

    Web Services: There is a web service consumer add-in that was developed by Gideon (his current code lives in http://code.google.com/p/md-addins/ that provides a similar experience to Visual Studio for creating and consuming web services.

    Deployment: it would be great if someone wrote a deployment target that submits the tarball to the OpenSUSE build service.

    The OpenSUSE build service will take a piece of source code and produce packages for Fedora Core, Ubuntu, SUSE and others, so we could have MonoDevelop directly generate packages for all distributions from within the IDE.

    An XML Editor: it would be nice if someone wrote an XML editor that could use some RelaxNG or XmlSchema rules to provide intellisense for various file formats and provide a good XML editing experience.

    IronPython Integration: IronPython has a number of features to support IDEs, and it would be lovely if we could get these things supported into MonoDevelop, in the same spirit that the Boo support does today.

    More

    There is much more in the Release Notes where I liberally took screenshots from.

    The IDE today has support for various languages: Boo, Nemerle, Visual Basic, C#, Java and ILasm.

    Lluis and his team have done a fantastic job on MonoDevelop. The demo that Lluis did in Guadec this year was truly mind blowing, I hope we have some form of screencast soon for people to witness the great integration on this IDE.

    Posted on 06 Sep 2006


    IronPython 1.0 is out!

    by Miguel de Icaza

    Jim Hugunin has announced IronPython 1.0. Congratulations to the IronPython team at Microsoft for this release!

    From the release announcement:

    IronPython is about bringing together two worlds. The key value in IronPython is that it is both a true implementation of Python and is seamlessly integrated with the .NET platform. Most features were easy and natural choices where the language and the platform fit together with almost no work. However, there were challenges from the obvious cases like exception type hierarchies to the somewhat esoteric challenges concerning different methods on strings. We spent long days and sometimes weeks looking for the best answers to these challenging problems and in the end I think that we have stayed true to both Python and .NET.

    To drive our Python compatibility, we run a large portion of the standard Python regression test suite in addition to a large custom test suite we added that runs IronPython and CPython side-by-side to test for identical behavior whenever possible. Despite all of this work, there will still be differences between IronPython 1.0 and CPython. The most obvious difference is that IronPython is missing a number of standard C-based extension modules so things like "import bsddb" will fail. We maintain a detailed list of differences between the two implementations and aim to reduce the size of this list in every release.

    IronPython has also striven for deep integration with the CLR. For the implementation this is a great thing as it lets us take advantage of highly-tuned components developed for other languages such as the just-in-time compiler, garbage collector, debugging support, reflection, dynamic loading and more. This integration is also valuable to IronPython developers as it lets them easily use any and all libraries built for .NET from their Python code.

    Posted on 06 Sep 2006


    Mono Success Story: Plastic

    by Miguel de Icaza

    I have been exchanging some emails with Pablo from CodiceSoftware a Spanish startup that is building software configuration management tools using .NET and Windows.Forms called Plastic.

    Pablo's email on the subject:

    We started Códice Software (www.codicesoftware.com) in August 2005, and since then we have developed a new SCM system, full written in C#. It runs on Mono from the beginning, in fact, our automated NUnit based system always tests on Linux/Mono (pnunit.codicesoftware.com).

    Our intention building this new SCM was having something as powerful as Clearcase (ok, without some features like build enhacements and so on) but easy to use and fast (in some operations we are even faster than Perforce...), and also affordable to any-sized team. [Emphasis added]

    This is what the software looks like on Windows:

    In addition, they have developed a three way merge tool using OpenGL to render the view:

    This is what it looks like in Linux running with Mono's Windows.Forms:

    There are a couple of rendering glitches here and there, but other than that, its looking pretty sweet.

    Posted on 05 Sep 2006


    VBNC Compiles Hello World on Linux

    by Miguel de Icaza

    Rolf's excellent Visual Basic compiler was able to bootstrap itself a few weeks ago on Windows, but it did not work with Mono yet.

    The compiler needed the VB runtime to be upgraded, it required a few fixes in the way we handle interface implementation for generics in the Mono VM, the final bug today was reference file names with their proper casing.

    Also Rolf's compiler contained a few MS-specific hacks in the compiler, but those are no longer necessary so this afternoon the VB compiler was able to build Hello World on Linux:

    
    $ mono vbnc.exe a.vb
    	
                                                      DEBUG RUN
    
    Visual Basic.Net Compiler version 0.0.0.4706 (last write time: 05/09/2006 21:06:28)
    Copyright (C) 2004-2006 Rolf Bjarne Kvinge. All rights reserved.
    
    
    Starting Scan
    Scanning file /home/cvs/vbnc/vbnc/bin/a.vb
    File '/home/cvs/vbnc/vbnc/bin/a.vb' scanned in 0.118 seconds
    7 lines and 115 characters in total.
    After SCAN: True
    Starting Conditional Compilation
    After ConditionaL True
    Starting Parse
    Parsing file /home/cvs/vbnc/vbnc/bin/a.vb (1 of 1 files)
    3 assemblies were loaded.
    73 namespaces were loaded.
    2129 types were loaded.
    Starting Resolve
    Starting Resolve
    CreateImplicitTypes compiler (1 of 1 types)
    ResolveType compiler (1 of 1 types)
    ResolveTypeReferences compiler (1 of 1 types)
    CreateImplicitMembers compiler (1 of 1 types)
    ResolveMembers compiler (1 of 1 types)
    ResolveCode compiler (1 of 1 types)
    Finished Resolve
    DefineTypes compiler (1 of 1 types)
    DefineTypeParameters compiler (1 of 1 types)
    DefineTypeHierarchy compiler (1 of 1 types)
    DefineMembers compiler (1 of 1 types)
    Starting Emit
    Emit compiler (1 of 1 types)
    CreateType compiler (1 of 1 types)
    Creating: compiler
    Created:  compiler
    Assembly 'a, Version=0.0.0.0, Culture=neutral' saved successfully to '/home/cvs/vbnc/vbnc/bin/a.exe'.
    Compilation successful
    
    	

    The "DEBUG" run is a tiny bit verbose as you can see, the results are mind blowing:

    
    mono$ cat a.vb
    public class compiler
    shared function Main as integer
    Console.WriteLine ("Dingus")
    return 0
    End function
    end class
    mono$ mono a.exe
    Dingus
    
    	

    Am actually scared of trying to bootstrap on Mono, I do not know if there are enough pixels in my machine to build the 68,000 lines of VB that the compiler has.

    Posted on 05 Sep 2006


    Italy Trip

    by Miguel de Icaza

    I think we have decided on what we will be doing in Italy.

    We arrive to Pisa on September 16th, and we will head to the Elba island in the afternoon with the other speakers to the Elba island for the LASER Lectures.

    After Elba, we will go to Rome on the 22nd or 23rd for the most part of that week.

    Our plan is to go from Rome to Firenze and then to Pisa to take our airplane back home.

    With this in mind: could we arrange some talks in Rome and Firenze (if there are Mono/Linuxers/.NETers there?)

    Posted on 05 Sep 2006


    Workflow in Mono

    by Miguel de Icaza

    A few days ago, Mono contributor Jordi Mas posted on his blog about the work that he has done to create an open source implementation of the Workflow APIs to Mono.

    He announced his work here and provided the details about it here.

    Scott Guthrie posts a couple of pointers to interesting tutorials on Workflow:

    There are no screenshots at this time to spice up this blog entry, but here is the output of running the NUnit tests:

    MONO_PATH=`pkg-config mono --variable prefix`/lib/mono/2.0:"../../class/
    lib/net_3_0::$MONO_PATH" mono --debug ../../class/lib/net_3_0/nunit-console.exe
    /output:TestResult-net_3_0.log /exclude:NotWorking,ValueAdd,CAS,InetAccess
     /xml:TestResult-net_3_0.xml  System.Workflow.Activities_test_net_3_0.dll 
    || ok=false; \
    sed '1,/^Tests run: /d' TestResult-net_3_0.log; \
    $ok
    NUnit version 2.2.0
    Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov,
     Charlie Poole.
    Copyright (C) 2000-2003 Philip Craig.
    All Rights Reserved.
    
    OS Version: Unix 2.6.16.21    Mono Version: 2.0.50727.42
    
    Excluded categories: NotWorking,ValueAdd,CAS,InetAccess
    ..........
    
    Tests run: 10, Failures: 0, Not run: 0, Time: 0.245039 seconds
    
    	

    Exciting.

    Posted on 05 Sep 2006


    Tangerine

    by Miguel de Icaza

    Today I finally upgraded my home server which was running ancient software so I could run Tangerine for sharing my mp3s on the home network over DAAP.

    Worked like a charm.

    Posted on 03 Sep 2006


    F-Spot with PicasaWeb Export

    by Miguel de Icaza

    Gonzalo Paniagua developed a couple of new libraries: google-sharp to access a few Google services, and in particular Picasa and gnome-keyring-sharp, to access the Gnome Keyring from .NET applications.

    gnome-keyring-sharp is a completely managed implementation, it basically speaks the keyring protocol instead of using a P/Invoke binding to call into native libraries, which is convenient as it is one dependency less on running applications.

    Stephane Delcroix then developed a GUI for F-Spot to register your accounts, manage your albums and upload your pictures from F-Spot, the SVN version now has this fancy dialog box:

    My first uploaded gallery from F-Spot is here.

    Which reminds me, while traveling in Europe in July, I ran into the 12 Euro computer in a museum. I kid you not.

    12 Euros, that is quite a good price. It is going to be hard for the OLPC guys to compete with that 100 dollar price tag, it has a surprisingly similar design, they also fold and they are also have quite an innovative design.

    Judge for yourself here.

    Posted on 02 Sep 2006


    Martin Baulig, super hacker

    by Miguel de Icaza

    Martin has been working for the past couple of weeks on fixing a bug in the Mono C# compiler: how to properly compile an anonymous method inside a generic method.

    The problem started with an innocent looking program:

    	
            delegate void Foo ();
    
            class X
            {
                    static void Hello<U> (U u)
                    { }
    
                    static void Test<T> (T t)
                    {
                            Foo foo = delegate {
                                    Hello (t);
                            };
                    }
            }
    	
    	

    The issue is that when we generated the anonymous method for "foo", we had to turn the "T" generic method parameter into a generic *class* parameter:

    	
      .class nested private auto ansi sealed beforefieldinit 'AnonHelp<0>'
        extends [mscorlib]System.Object
      {
         .field  assembly  !0 'p:t'
      }
    	

    The code to cope with this in the compiler was fairly ugly, and Martin embarked on fixing the design internals at the end of July. We originally thought that there were two solutions: an elegant solution that required some refactoring and an ugly hack that basically accessed System.Reflection.Emit directly and poked at these internals from the anonymous method code path.

    I have never quite liked what I did with the implementation of anonymous methods; I have tried to bounce the ideas off a few people to try to get their feeling on how to redo this code. I explained the design to Federico and Gonzalo hoping to get some feedback on the bugs and to clarify my own thoughts.

    So to make a long story short, I did not like what was going on in the internals of the compiler; and in addition there are some annoying side effects and various constructs that crash the compiler when nested anonymous methods are used or when iterators and anonymous are mixed.

    On Friday, Martin sent his weekly status report where he officially has removed my design mistakes. He has eliminated CaptureContext's from the compiler, and has eliminated the special-cases that coped with captured variables in the compiler --another part piece of code that worked, but was far from elegant--.

    The new code that Martin has written replaced chunks of code that has bugged me for more than a year, so these are great news.

    The patch is available here

    In addition, cleaning up this code is essential as C# 3.0 will make extensive use of this infrastructure as part of the new lambda function support (This is because in C# 3.0 it is very natural for developers to create nested lambdas and anonymous methods, something that was more of a curiosity with the C# 2.0 syntax).

    Btw, Martin just had a birthday, and he likes chocolates ;-)

    Posted on 02 Sep 2006


    A To-Do list for Bittorrent Sharp

    by Miguel de Icaza

    Alan has updated the list of TODO activities for BitSharp.

    Posted on 02 Sep 2006


    BitTorrent, half a tone up

    by Miguel de Icaza

    This year, during the summer of code three students worked on Bittorrent support for Mono/.NET. Each one was in charge of an independent piece: a bittorrent downloading (Alan), a tracker (Gregor) and the GUI (Piotr).

    The code has now moved from our incubator repository to the public and it is available on SVN or you can get a tarball of it.

    The code is licensed under the terms of the MIT X11 license, which means, anyone can embed it anywhere.

    If you make fixes or improve the code, it would be nice for you to contribute those back. Let the sharp bitorrenting begin!

    Screenshots will come later.

    Posted on 01 Sep 2006


    Authoring File Systems with Mono on Linux

    by Miguel de Icaza

    On Linux it is possible to write user-level file system by using FUSE, a toolkit to write user-space tools that can be mounted as file systems.

    There is a whole scene of Fuse developers, to satisfy the most unique tastes in file system needs. Cryptographic file systems, gmail-as-a-backing-store, and of course a Wikipedia file system.

    Jon Pryor has released Mono and FUSE bridge: Mono.Fuse. With Mono.Fuse it is possible to author file system extensions with Mono using any of the libraries or languages supported by Mono.

    To create a file system with Mono.Fuse, you must create a class that derives from Mono.Fuse.FileSystem, like this:

    
      using Mono.Fuse
      class TypeNavigator : FileSystem {
    
          static void Main (string [] args)
          {
              using (TypeNavigator t = new TypeNavigator ()){
    	      t.MountPoint = args [0];
    	      t.Start ();
    	  }
          }
      }
    
    	

    Then you need to implement a couple of methods, you override the directory reading and attribute fetching methods like this:

    
      protected override Errno OnReadDirectory (string path, [Out] out string[] paths, OpenedFileInfo fi)
      {
              ...
      }
    
      protected override Errno OnGetFileAttributes (string path, ref Stat stbuf)
      {
              ...
      }	
    	

    I wrote a small file system to browse assemblies, you can get the source here.

    To run my toy file system, do this:

    	
    	$ mono fuse.exe /tmp/u
    	

    That will get the file system going (currently you need the Mono.Fuse.dll library in the same directory where fuse.exe lives, and the libMonoFuseHelper.so in your library path).

    With this, you can browse the types in your favorite assemblies from the shell (or for the less manly hackers in my readership: a file manager) like this:

    
    	$ ls /tmp/u/mscorlib
    	...
    	Mono.Security.Cryptography.RSAManaged+KeyGeneratedEventHandler/
    	Mono.Security.Cryptography.SymmetricTransform/
    	Mono.Security.PKCS7/
    	Mono.Security.PKCS7+ContentInfo/
    	Mono.Security.PKCS7+EncryptedData/
    	Mono.Security.PKCS7+EnvelopedData/
    	...
    	$ ls /tmp/u/mscorlib/Mono.Security.Cryptography.SymmetricTransform
    	CanReuseTransform               GetHashCode          OutputBlockSize
    	CanTransformMultipleBlocks      get_InputBlockSize   ToString
    	Equals                          get_OutputBlockSize  TransformBlock
    	get_CanReuseTransform           GetType              TransformFinalBlock
    	get_CanTransformMultipleBlocks  InputBlockSize
    
    	

    Once you are done with the exciting world of browsing your assemblies with ls and cd you can umount your file system like this:

    
    	$ fusermount -u /tmp/u
    	

    Very nice work Jon!

    Posted on 01 Sep 2006


    Mexico Mess

    by Miguel de Icaza

    I had not been writing about the state of affairs in Mexico for a while.

    Things are not looking any more positive now.

    A quick recap: the elections results are contested on many grounds, and various groups have put forward evidence that the results were tampered with (My father, has put together a number of academic studies at the results).

    Anyways, the PRD has taken over some portions of the city and "camped out" and there are some beginnings of civil resistance.

    The electoral tribunal has turned down the request to revisit/recount the contested ballot boxes which could very likely change the election results.

    The government in the meantime has been training some para-military forces, not directly linked to the government and which is supposed to infiltrate resitance groups. These had been barred from existance in Mexico after two massacres, the 1968 Tlatelolco Massacre (lead by the military) and the 1971 Corpus Christy massacre (lead by these paramilitary groups).

    With the vote by vote recount request ruled out, the civil resistance seems more imminent.

    Fox's government is busy getting a new paramilitary group ready for action for the upcoming State of the Union.

    Very much like the 1971 paramilitary group, the new group is supposed to "blend" with the crowd; They will not be wearing uniforms, have been asked to keep their hair long, and dress casually.

    Posted on 31 Aug 2006


    Visual Basic in Mono: VBNC is Self Hosting!

    by Miguel de Icaza

    Rolf has just commited the patch to make VBNC self-hosting, the goal that he was aiming for as part of the Google Summer of Code.

    VBNC is Rolf's Visual Basic 8 compiler written in Visual Basic 8, the one that we are using to replace Mono's current mbas compiler.

    From his patch:

    
    	2006-08-19  Rolf Bjarne Kvinge 
    		* Bugfixes: The compiler can now bootstrap itself!!!
    
    	

    Congratulations Rolf!

    In other news, the new VB runtime has been checked into SVN, in the module `mono-basic', this runtime is also written in VB8 unlike our previous attempt which was built on C#.

    Rolf's compiler is able to build this new runtime as well.

    The details of the new upgrade in Basic handling in Mono are here.

    Posted on 19 Aug 2006


    Wiki Dot Com

    by Miguel de Icaza

    A couple of friends of mine, Mono contributors, are working at Mindtouch, a new startup doing very nice Wikis.

    They are providing the engine behind Wiki.Com. You can create your own Wiki there.

    They are running DekiWiki a Wiki based on MediaWiki (the engine behind Wikipedia) that has been adapted to run on top of Dream.

    Posted on 19 Aug 2006


    MonoTorrent: early review

    by Miguel de Icaza

    I started my early review of the MonoTorrent code for the Summer of Code (from Alan McGovern). It works!

    The code is available from our incubator repository, once the summer of code is over, we will move it to the public repository.

    This is a screenshot of the command line version:

    Exciting.

    I know.

    Posted on 18 Aug 2006


    A month with Wobbly Windows

    by Miguel de Icaza

    Some people have said that Wobbly windows do not improve productivity, and that its unnecessary candy for the Linux desktop. I initially thought I would not be able to stand wobbly windows for long.

    I was wrong. Wobbly windows are now an integral part of my computing experience.

    Non wobbly systems feel arcane to me now. If a window does not become transparent when I drag it, I get the feeling am using a cell phone instead of a computer.

    Also, wobbly windows are great when you are waiting for an "svn update" to complete, or Evolution to import email, its great for stress relief.

    Posted on 18 Aug 2006


    F#

    by Miguel de Icaza

    There is now a community site for F# users at cs.HubFS.Net, some screenshots of the demos that were shown at Lang.Net are here, here and here.

    Posted on 17 Aug 2006


    Ahead of Time Compilation in Mono

    by Miguel de Icaza

    A few years ago we modified the Mono code generation engine from being merely a Just-in-Time compiler for managed code to be also a batch compiler that could be used to batch compile code in advance.

    We call this batch compilation process "Ahead of Time Compilation" or AOT.

    There are many reasons for supporting AOT compilation: reduced startup time, reduced overall memory usage and the possibility of running better optimized code.

    This batch compilation is typically done by invoking the mono command with the --aot flag on a managed assembly, like this:

    
     $ mono --aot hello.exe
     $ ls -l hello.exe.*
     -rwxr-xr-x 1 miguel users  3584 2006-08-15 12:38 hello.exe
     -rwxr-xr-x 1 miguel users 10769 2006-08-17 00:05 hello.exe.so
    
    	

    The .exe file in the above listing contains the managed code in CIL format, while the hello.exe.so is an ELF file that contains the pre-compiled code.

    Today, the .so file only contains the pre-compiled code but does not contain any of the additional metadata that is present on the .exe file. To run the application it is necessary to have the original assembly (.exe or .dll) around as it contains information that is not replicated on the executable.

    To execute the code, you must still invoke Mono with the original parameters, for instance:

    
     $ mono hello.exe
    
    	

    The runtime will take care of probing whether there is a native pre-compiled image, and if the image is valid, it will use the pre-compiled code from the shared object instead of JITing the code as it goes.

    As I mentioned before, there were an array of motivations for implementing AOT in Mono. Initially we hoped to reduced application startup time as the JIT had less work to do. In practice, the Mono JIT was fast enough that the JIT time was never much of an issue, even with the last batch of optimizations that were turned on in Mono 1.1.16, the startup speed is not even noticeable. In addition, there is a slight memory gain by not executing code in the JIT in the first place, so there was a small memory improvement as well.

    Heavier optimizations that exist today, and heavier optimizations that we are developing will make the use of AOT more important, as those code generation optimizations are slower to have enabled by default on the Just-in-Time compilation stage.

    This is what the original design of the AOT file format was designed to cope with: startup time.

    In the last few months Zoltan has been working on adapting AOT for another task: overall memory reduction.

    As developers start to run a handful of Mono applications on a desktop, we want to minimize the duplicated code in memory. To do this, we had to address a number of problems with the original AOT design.

    The original AOT design had poor multi-process page sharing capabilities, as the JIT had to fix-up the mapped AOT code in memory. The native code was shared across multiple processes by using mmap() to map the native code into each process, but as the fix-ups were applied to the mapped code, the numbers of pages that could be shared across processes decreased.

    The new design by Zoltan for the AOT generated code is very similar to the ELF shared libraries file format. It uses a couple of tables for data and code (Global Offset Table a slightly modified Program Linkage Table tuned for Mono compilation) which are the only pieces that are modified.

    
     $ mono --aot /mono/lib/mono/1.0/mscorlib.dll
     Mono Ahead of Time compiler - compiling assembly /mono/lib/mono/1.0/mscorlib.dll
     Code: 1632832 Info: 105844 Ex Info: 46601 Class Info: 39399 PLT: 4127 GOT: 55756
     Executing the native assembler: as /tmp/mono_aot_jiqD57 -o /tmp/mono_aot_jiqD57.o
     Executing the native linker: ld -shared -o /mono/lib/mono/1.0/mscorlib.dll.so 
     	/tmp/mono_aot_jiqD57.o
     Compiled 11050 out of 11051 methods (99%)
     1 methods contain absolute addresses (0%)
     0 methods contain wrapper references (0%)
     0 methods contain lmf pointers (0%)
     0 methods have other problems (0%)
     Methods without GOT slots: 7322 (66%)
     Direct calls: 11350 (53%)
     GOT slot distribution:
             methodconst: 25
             switch: 167
             class: 2176
             field: 165
             vtable: 3241
             sflda: 2356
             ldstr: 3003
             ldtoken: 14
             type_from_handle: 546
             iid: 414
             adjusted_iid: 1831
     AOT RESULT 0
    
    

    By reducing the pieces that have to be patched to a small set of pages, the rest of the code can be shared across multiple Mono processes.

    Now, with the same set of optimization flags, AOT code is slightly slower than JITed code because it has to be position independent and has to go through a few extra indirections that JIT code does not have to do (to maximize the sharing across applications).

    The big news is that the new file format design has finally reached the point where using AOT code on day to day operations is faster than using JIT code. Building our core class libraries with our C# compiler with AOT code now takes less time than using the JIT-tuned version.

    The mscorlib compilation consists of 262,261 lines of C# source code, the results are:

    JIT time: 4.34 seconds

    AOT time: 4.21 seconds

    Today AOT is only available on the x86 and x86-64 ports of Mono, this seems to be good enough and where most of the desktop deployments will be.

    Now, one common question we get is: if we already generate native code, how come you still need Mono to run your applications; or the variant of the question: can I produce statically generated executables that only contain native code?

    It is currently not possible to generate merely a native code file because Mono still needs to extract the metadata from the original assembly file (the .dll or the .exe file), information that we do not encode in the AOT file format. In addition the generated image still requires the Mono runtime (for GC, Just-in-Time compilation services, reflection and a handful of extra features).

    Mono does support a special mode that turns an assembly into a static binary, but it does not use native code, it still uses the JIT engine. This is done using the mkbundle command.

    It is still possible to turn off the use of AOT files in a per-run basis, this can be done by passing the -O=-aot command line option to the runtime. In the upcoming version of Mono, all of our wrapper scripts will also support the MONO_OPTIONS variable to control this.

    We are hoping to ship a script that will AOT all the libraries and executables that ship as part of Mono, or to disable all the AOT executables on demand in a future release of Mono.

    Don asked me at the Lang.NET Symposium how we handled generics, and I have no idea.

    Posted on 17 Aug 2006


    Micro Glib Project Started

    by Miguel de Icaza

    I have started working on a micro version of glib that is suitable to be embedded with Mono and which is licensed under the MIT X11 terms. The code lives in mono/eglib in the Mono repository.

    Posted on 16 Aug 2006


    Open Sourcing of Avalon

    by Miguel de Icaza

    Jon Udell, following up to Joe Beda's follow up to the J2EE/Avalon post:

    With 20/20 hindsight, Beda wishes things had been done differently: a smaller team, incremental releases. And he holds out some hope for the awkwardly named Windows Presentation Foundation/Everywhere (WPF/E), the lightweight, portable, .Net-based “Flash killer,” that I discussed in my interview with Bill Gates from the 2005 Professional Developers Conference.

    The WPF/E runtime won’t implement all of XAML (XML Application Markup Language), a .Net language tuned for declarative application layout. But “the portion of XAML we’ve picked,” Gates told me, “will be everywhere, absolutely everywhere, and it has to be.”

    “Everywhere” means the kind of ubiquity that the Flash player enjoys on Windows and Mac desktops, and to a lesser extent on Unix and handheld devices. And it sets up an arms race between Adobe and Microsoft, each giving away razors (that is, players) in order to sell blades (development tools).

    Here’s a crazy idea: Open-source the WPF/E, endorse a Mono-based version, and make XAML an open standard. Why? Because an Adobe/Microsoft arms race ignores the real competition: Web 2.0, and the service infrastructure that supports it.

    The HTML/JavaScript browser has been shown to be capable of tricks once thought impossible. Meanwhile, though, we’re moving inexorably toward so-called RIAs (rich Internet applications) that are defined, at least in part, by such declarative XML languages as Adobe’s MXML, Microsoft’s XAML, Mozilla’s XUL (XML User Interface Language), and a flock of other variations on the theme.

    Imagine a world in which browsers are ubiquitous, yet balkanized by incompatible versions of HTML. That’s just where RIA players and their XML languages are taking us. Is there an alternative? Sure. Open XAML. There’s a stake in the ground that future historians could not forget.

    Convenient use of HTML's <b> tag added.

    Posted on 16 Aug 2006


    Open Letter to the Heroes

    by Miguel de Icaza

    Are you adapting to win yet?

    Posted on 16 Aug 2006


    Liquids on a Plane.

    by Miguel de Icaza

    Last week, as the terror plot unfolded, Snapple and bottled water were banned from airplanes.

    It is now the theme for Hollywood Movie

    Posted on 15 Aug 2006


    The Open Sourcing of Java

    by Miguel de Icaza

    Stephen Walli blogs about the open sourcing of Java. Stephen was at one of the meetings where Sun is discussing the open sourcing of Java.

    About this move:

    So Sun has a huge opportunity to “do it right” with Java. They began the release of Java EE 5 with the GlassFish project, and continue the work in the context of a culture shift that has delivered OpenSolaris. Now time will tell if they can harness all their collective experience in open source software, standards, and the JCP to bring about a complete open source Java world.

    On Microsoft's positioning regarding Mono:

    Microsoft continues to position mono as “an interesting science experiment” in its market commentary, despite its growing success, and to maintain an arm’s length ambiguity about the state and status of non-essential patents that may be infringed by mono.

    Instead of encouraging multiple implementations of a standard they instigated, they discourage them. Instead of embracing open source collaborative development, innovation and contribution, they keep the community hobbled.

    Posted on 15 Aug 2006


    Mono User and Developers Conference

    by Miguel de Icaza

    We are having a user and developers conference for Mono users and developers on October 23 and 24th in Boston, MA.

    The event is free, but we need to know how many people will be coming. Please register here.

    Posted on 15 Aug 2006


    George Galloway, take 2

    by Miguel de Icaza

    Duncan pointed me to a George Galloway interview on Sky News (the UK edition of Fox News).

    The video is here.

    Oh, and Chomsky has some good background as well. This bit is interesting:

    Do you agree with the argument that Israel's military offensive in Lebanon is "legally and morally justified?"

    Noam Chomsky: The invasion itself is a serious breach of international law, and major war crimes are being committed as it proceeds. There is no legal justification.

    The "moral justification" is supposed to be that capturing soldiers in a cross-border raid, and killing others, is an outrageous crime. We know, for certain, that Israel, the United States and other Western governments, as well as the mainstream of articulate Western opinion, do not believe a word of that. Sufficient evidence is their tolerance for many years of US-backed Israeli crimes in Lebanon, including four invasions before this one, occupation in violation of Security Council orders for 22 years, and regular killings and abductions. To mention just one question that every journal should be answering: When did Nasrallah assume a leadership role? Answer: When the Rabin government escalated its crimes in Lebanon, murdering Sheikh Abbas Mussawi and his wife and child with missiles fired from a US helicopter. Nasrallah was chosen as his successor. Only one of innumerable cases. There is, after all, a good reason why last February, 70% of Lebanese called for the capture of Israeli soldiers for prisoner exchange.

    Emphasis added.

    Posted on 12 Aug 2006


    Mexican Elections Fraud

    by Miguel de Icaza

    My father did his own study of the official results of the mexican election on July 2nd.

    His first batch of results is here. The document is in Spanish and contains assorted awk and shell scripts to reproduce the studies in the comfort of your home.

    His study of course, is much more rigorous and interesting than mine ;-)

    Posted on 12 Aug 2006


    John Gough on compiling Ruby to the CLI

    by Miguel de Icaza

    Sam Ramji, at Port25 interviews professor John Gough on his project to compile Ruby for .NET.

    The interviews are here.

    Posted on 09 Aug 2006


    Italy in September

    by Miguel de Icaza

    Am doing a lecture at Bertrand Meyer's Summer School in the Elba Island in September.

    Since am going to be in the area, am considering staying some extra days in Italy and visit some cities with Laura (not quite sure if we should go north to Milan, or south to Rome).

    Anyways, I would love to do a presentation on the Desktop and Mono to the local Linux User Groups or .NET groups as I do not go to Italy very often.

    If you are interested, please drop me an email; Hurry up, am booking my flights soon :-)

    Update: Laura votes to include Florence in the equation.

    Posted on 09 Aug 2006


    Trendspotting

    by Miguel de Icaza

    On the double super secret background channel #ipodsharp:

    	<tseng> hating mono makes you ugly
    

    Posted on 07 Aug 2006


    Lluis, in Mexico

    by Miguel de Icaza

    Lluis, Web Services, Remoting and MonoDevelop hacker extraordinaire is going to Mexico.

    He is looking for a few recommendations on touristic activities he can do while there, and if you are interested in Mono, MonoDevelop, free software and hacking on Linux, you should try to hook up with him in Veracruz (GULEV) or at the FSL in Puerto Vallarta.

    Posted on 07 Aug 2006


    Dirvish: Linux's Time Machine

    by Miguel de Icaza

    At GUADEC, Keith Packard pointed me to a pretty nice piece of software: Dirvish which snapshots your system every time you run it.

    The nice bit is that you can browse your system at any point in time, from the site:

    With dirvish you can maintain a set of complete images of your filesystems with unattended creation and expiration. A dirvish backup vault is like a time machine for your data.

    Seems like Apple today announced a GUI for a similar system. They also announced thumbnails for document searches, very much in the spirit of Beagle.

    A little archaeological story is that Beagle was one of those technologies in which open source beat everyone else to the release.

    We developed Beagle in the open, and talked about it (and its predecessor Dashboard) for months before Spotlight was announced. In fact, Beagle was demonstrated and announced on the same day that Apple's Dashboard was, a few hours in advance at the GUADEC 2004 conference in Norway.

    The press coverage of GUADEC vs Apple was a little bit different though :-).

    Posted on 07 Aug 2006


    SUSE on ThinkPad T60p, follow up

    by Miguel de Icaza

    Shawn emailed me, he has a ThinkPad T60p and was experiencing a few problems with his SLED 10 setup on the ThinkPad. I replied with what I had done, and luckily his problems are gone.

    This is roughly what he emailed me, and roughly what worked for him, and it probably depends on the settings chosen at installation time:

    Xgl was not working: to get Xgl working, go to the control center, type "xgl", run the applet that shows up, and click "Enable 3D effects", then do the usual, "yes", "ok", "I accept", "yeah", "yeah", "yeah"; The applet will log you out and log you back into Xgl. You will be done. There is no need to manually configure Xgl.

    Suspend does not work: As root, go to the Power Save control applet, and change the event for "close lid" to be "suspend to ram". If you need to debug this, from a root shell, you can use "powersave --suspend-to-ram" and "dmesg", repeat until done;

    X applications do not open sometimes: this is caused because DHCP is set to "change hostname on DHCP" requests. For some reason X applications are not happy with changes in the hostname. I have no idea why. I personally have not experienced this, but I guessed that it was DHCP changing the host name.

    Solution: Make sure that your network setting does not change the hostname. I have no idea why this happens, but this is what happens. Just do not let DHCP change your hostname.

    Posted on 07 Aug 2006


    SLED Review in German

    by Miguel de Icaza

    Pro-Linux: I can not read German, but this page has a review of SLED 10 with cute animations in assorted video formats.

    DerStandard: their review has a *ton* of screenshots.

    The title: `Novell sets a new standard for the Linux desktop'. Thanks Andreas!

    eWeek: Ok, this one is not in German, but its still pretty good: here, it has this to say about Banshee and F-Spot, two of the Mono based applications in SLED: SLED includes very nice photo and music management applications---F-Spot and Banshee, respectively.

    These Mono-based applications should be easy to port to Windows, the article recommends Novell to get these applications supported as a Novell bundle on Windows.

    Posted on 07 Aug 2006


    Good News! Gtk# and Tomboy as part of Gnome

    by Miguel de Icaza

    Gtk# and Tomboy have been accepted into the new module list for GNOME 2.16.

    In preparation for this, Mike Kestner has been splitting up the gtk-sharp tarball to fit the release team requirements.

    In addition, Alex's Tomboy is now also part of Gnome 2.16.

    Posted on 05 Aug 2006


    SUSE Preloaded on Lenovo T60p

    by Miguel de Icaza

    The latest SUSE Linux Desktop (SLED) is now being preloaded with the ThinkPad T60p from Lenovo.

    Am a happy SLED user myself on the exact same machine, this is the first time the whole experience has been completely smooth from Linux: XGL works out of the box, suspend works just fine, Google Earth is smooth, configuring a printer took only a couple of clicks.

    I sadly bought got my machine before this preload deal was out, so I ended up with another XP license.

    SLED is available for download from here

    Posted on 05 Aug 2006


    Lebanon

    by Miguel de Icaza

    War by Tantrum.

    War by Tantrum II.

    The War Party.

    Robert Fisk articles reporting from Beirut are now open to the public, no payment required.

    Robert asks Is this why all the foreign warships came and took their citizens away, to make Beirut safe to destroy?:

    What in the meanwhile is happening to Lebanon? Bridges and buildings can be reconstructed - with European Union loans, no doubt - but many Lebanese are now questioning the institutions of the democracy for which the US was itself so full of praise last year. What is the point of a democratically elected Lebanese government which cannot protect its people? What is the point of a 75,000-member Lebanese army which cannot protect its nation, which cannot be sent to the border, which does not fire on Lebanon's enemies and which cannot disarm Hizbollah? Indeed, for many Lebanese Shias, Hizbollah is now the Lebanese army.

    ...

    And do the Israelis realise that they are legitimising Hizbollah, that a rag-tag army of guerrillas is winning its spurs against an Israeli army and air force whose targets - if intended - prove them to be war criminals and if unintended suggest that they are a rif-raff little better than the Arab armies they have been fighting, on and off, for more than half a century? Extraordinary precedents are being set in this Lebanon war.

    Posted on 05 Aug 2006


    Zen, Avalon and J2EE

    by Miguel de Icaza

    For those curious, Wesner has some background on the discussion we had at Lang.NET that prompted my previous blog entry.

    Joe Beda, a former developer of Avalon, follows up and complements it.

    Some folks emailed me to tell me that they love Avalon and that it works fine for them. Am glad you are happy with it, and did not want to spoil your fun. Some people also liked J2EE.

    Censorhip

    I had a beautiful reply to follow up, but Gonzalo wisely scissored-it up. He did not think paraphrasing Doctor Gonzo was appropriate.

    Posted on 04 Aug 2006


    Lang.NET Symposium

    by Miguel de Icaza

    Am back from the Lang.NET Symposium, that Erik Meijer put together.

    The conference was a blast, and the .NET Languages blog has a review of the talks: first day, second day and third day.

    I hung out most of the time with Jim Pubrick and John Lam.

    I got a chance to meet Michal Moskal, Nemerle creator is doing an internship at Microsoft this summer.

    Second Life

    Cory and Jim talked about Second Life, the current scripting system used in Second Life and their efforts to embed the Mono VM inside Second Life. The first part of the presentation was done by Cory and he presented an overview of Second Life and the audience was hooked on the virtual world that they have created. They had to stop answering social questions about Second Life so we could move into the actual technical details.

    Jim, who is a blast, introduced the technical challenges that Second Life has on scripts. They need to be able to load and unload thousands of scripts in a continuously running process, and they also need to stop scripts at any point to either suspend them or to move to another computer.

    Second Life maps computers to areas of land, so a computer is in charge of running all the simulations, physics and scripts for a given portion of virtual land. When a person crosses the boundaries the scripts have to migrate from one machine to the next machine.

    Today the scripts running on Second Life are a bit slow, so they are looking at Mono and the CLI as a way of providing more speed to their users and hopefully allow developers to write in other languages other than their Linden Labs Scripting Language.

    They have a compiler that translates their scripting language into CIL bytecodes, and the preliminary results give a performance increase between 50x and 150x faster execution with Mono.

    The challenge is to stop and save a running script. This is something that is relatively easy done with their scripting language, but it becomes trickier with the CLI.

    Their implementation instruments the generated CIL assembly to allow any script to suspend itself and resume execution on demand. This is a bit like continuations, the main difference is that the script does not control when it is suspended, the runtime does. The instrumentation basically checks on every back-branch and on every call site whether the script should stop (in Jim's words, "eventually, you run out of method, or you run out of stack") and if it must stop, it jumps to the end of the method where a little stub has been injected that saves the state in a helper class and returns.

    A very clever idea. Hopefully the slides for the presentation will be posted soon.

    Following my attorney's advise I have obtained a Second Life account.

    Ruby in .NET

    There were two presentations on Ruby running on .NET, the native compiler that John Gough's research team is working on and John Lam's RubyCLR bridge.

    Compiling Ruby is challenging for a number of reasons, the lack of a language specification means that sometimes the only specification for the behavior is the source code and because Ruby has a lot of features that do not map easily into the single-hierarchy, multiple-interface object model that is part of .NET. So Ruby.NET has to generate a number of helper classes and runtime support to provide the expected behavior.

    John's approach is different. Instead of creating a compiler for Ruby, he wants to reuse the existing Ruby and provide a good bridge to expose Ruby objects to the CLR and CLR objects to Ruby. He had some good demos of it, and he showed an interesting interactive shell that he built with Ruby and Avalon.

    Language Mapping

    During Gilad Bracha's presentation he pointed out that some languages fit naturally into the .NET and Java VM models, and those languages tend to feel like syntactic sugar for the existing VM.

    A few compilers for dynamic languages like IronPython and Ruby.NET as well as C++ require features that can not map directly into the .NET and Java models so it is necessary to create an independent universe and merely using the Common Type System (CTS) and the Common Language Specification (CLS) as "interoperability points".

    The conference really was split in two groups: those attending the talks (back-to-back with a couple of breaks) and those in the "kitchen track".

    In the kitchen track there were plenty of interesting discussions, among them, should there be a "CLR-2" or a "CLS-2" that provides the shared runtime support for dynamic languages and standardizes the second layer to allow higher interoperability of these new layers created for scripting languages.

    Don Syme

    Don Syme designed the generics support for the CLI and C# and did a fantastic presentation.

    He has since moved on from Generics and has been working on F#. His presentation and demostrations were fantastic. I would probably have benefited more from this talk had I known more about functional programming.

    Posted on 03 Aug 2006


    A J2EE Moment of Zen

    by Miguel de Icaza

    I just had a realization today.

    Microsoft's Avalon is the J2EE of GUI APIs.

    Its God's way of punishing us for replacing the ten commandments with the Design Pattern fad.

    We will have to wait a couple of years for the "Rails" of GUI toolkits to come into existance. In the meantime programmers will pay for their sins.

    Avalon marks the end of the American Dream.

    Posted on 02 Aug 2006


    Bittorrent Bootstrapping

    by Miguel de Icaza

    Alan is part of the Google Summer of Code team that is building a Bittorrent framework. Today, he achieved bittorrent self-hostingness-nirvana:

    
    <_Alan_> my freshly compiled windows mono runs monotorrent perfectly now :)
    <_Alan_> downloading the suse image with it now
    
    	

    Posted on 01 Aug 2006


    That was fast

    by Miguel de Icaza

    Gonzalo launched the Mono.Google API last night, and this morning at 7:25AM I received an email from Stephane Delcroix pointing me to his contribution that added Picasa export to F-Spot, his bugzilla comment:

    This patch will allow export to picasaweb.

    It's feature complete (as in PicasaWeb features), that means that it support multiple google accounts, creation of albums (private or public ones) and upload pictures to them.

    Posted on 28 Jul 2006


    Google Hosting

    by Miguel de Icaza

    So Google today launched its source code hosting effort.

    I suspected they were working on something along these lines, because the Subversion folks went to work for Google some time ago. You did not read about this, because I only speculated about this to Greg Stein, which would not leak one single bit about what he was doing.

    Anyways, Gonzalo has been on a roll recently. He changed our FileSystemWatcher code to use inotify instead of depending on FAM and Gamin. See his post on the subject.

    Google Sharp

    And he also just uploaded Google Sharp to subversion (module google-sharp). With GoogleSharp you can authenticate your application with Google and access some of their services. The one that both Gonzalo and myself care about is PicasaWeb. The code has everything for F-Spot to start exporting my pics there.

    Gonzalo has a web entry with details here and sample code to login, list albums in PicasaWeb, and upload pictures to it.

    Let the Mono uploading begin.

    Posted on 27 Jul 2006


    Mind Touch and the Dream Framework

    by Miguel de Icaza

    A few Mono contributors went to work and consult for a mysterious company a while ago, and this week we finally found out where they had gone.

    They went to MindTouch, an open source startup company that sells an appliance for document management, using a Wiki framework. The press release is here.

    They created a framework for building web applications, the dream framework. It is mostly focused on the back-end side of things. The framework allows developers to easily create REST services, with a number of interesting features:

    MindTouch Dream is a REST-based distributed application framework developed in Mono/.NET. With Dream, a Web service is similar to an object, and features interact through standard HTTP verbs. This design allows the developer to assume an "idealized" world where everything a service comes into contact with is accessed through Web requests. The Dream service library addresses common problems, and the Dream runtime orchestrates all interactions without requiring a Web server to be pre-installed on a target machine.

    MindTouch Dream manages all the complex aspects of interactive web services, such as providing storage locations, database connections, event notifications, automatic data conversion from XML to JSON and short-circuit communication for co-hosted services.

    And they ported MediaWiki to run on top of this framework, this port is DekiWiki. It differs from MediaWiki in that they have a GUI designer for the page, it is quite nice. You can see it in action here.

    I am told that they are porting the entire MediaWiki to C# as well.

    Aside from the high-level descriptions, there are a couple of interesting bits about Dream, the framework and applications are designed assuming that network connectivity could go down at any point, that the network will likely fail. A focus on making fault tolerant applications.

    Currently Dream and DekiWiki run out of the box with Mono, for installation instructions see this.

    I told Urs that I would migrate www.mono-project.com to it, but it first has to be ported to C# ;-)

    Posted on 27 Jul 2006


    Lang.NET 2006

    by Miguel de Icaza

    Next week I will be presenting Mono at the Lang.NET 2006 Symposium conference at Microsoft in Redmond. There are a number of interesting talks about VMs, new languages, mapping languages to the current VMs and some creative uses of these VMs.

    Will be arriving on Sunday, and leaving on Thursday, drop me an email if you want to meet.

    Posted on 26 Jul 2006


    NProject

    by Miguel de Icaza

    From the Daily Grind, I found out about NProject:

    NProject is a software project and content management system mainly for the .NET Framework (and Mono). It integrates a Wiki, an issue management and reporting system, a dynamic project calendar and integration with CruiseControl.NET. It's inspired by Trac (http://projects.edgewall.com/trac/) and other cool projects. It's based on Castle MonoRail, ActiveRecord? and Windsor projects (http://www.castleproject.org/). But most important : it's fun and looks cool!

    Posted on 26 Jul 2006


    2001 Essay

    by Miguel de Icaza

    Howard Zinn wrote in December 2001 the A Just Cause, Not a Just War.

    This essay is as relevant today as it was relevant at the end of 2001:

    Terrorism and war have something in common. They both involve the killing of innocent people to achieve what the killers believe is a good end. I can see an immediate objection to this equation: They (the terrorists) deliberately kill innocent people; we (the war makers) aim at "military targets," and civilians are killed by accident, as "collateral damage."

    Is it really an accident when civilians die under our bombs? Even if you grant that the intention is not to kill civilians, if they nevertheless become victims, again and again and again, can that be called an accident? If the deaths of civilians are inevitable in bombing, it may not be deliberate, but it is not an accident, and the bombers cannot be considered innocent. They are committing murder as surely as are the terrorists.

    The absurdity of claiming innocence in such cases becomes apparent when the death tolls from "collateral damage" reach figures far greater than the lists of the dead from even the most awful act of terrorism. Thus, the "collateral damage" in the Gulf War caused more people to die--hundreds of thousands, if you include the victims of our sanctions policy--than the very deliberate terrorist attack of September 11. The total of those who have died in Israel from Palestinian terrorist bombs is somewhere under 1,000. The number of dead from "collateral damage" in the bombing of Beirut during Israel's invasion of Lebanon in 1982 was roughly 6,000.

    We must not match the death lists--it is an ugly exercise--as if one atrocity is worse than another. No killing of innocents, whether deliberate or "accidental," can be justified. My argument is that when children die at the hands of terrorists, or--whether intended or not--as a result of bombs dropped from airplanes, terrorism and war become equally unpardonable.

    Let's talk about "military targets." The phrase is so loose that President Truman, after the nuclear bomb obliterated the population of Hiroshima, could say: "The world will note that the first atomic bomb was dropped on Hiroshima, a military base. That was because we wished in this first attack to avoid, insofar as possible, the killing of civilians."

    ...

    I suggest that the history of bombing--and no one has bombed more than this nation--is a history of endless atrocities, all calmly explained by deceptive and deadly language like "accident," "military targets," and "collateral damage."

    Some people argue that the only viable option to conflict resolution is the escalation to war:

    To get at the roots of terrorism is complicated. Dropping bombs is simple. It is an old response to what everyone acknowledges is a very new situation. At the core of unspeakable and unjustifiable acts of terrorism are justified grievances felt by millions of people who would not themselves engage in terrorism but from whose ranks terrorists spring.

    Those grievances are of two kinds: the existence of profound misery-- hunger, illness--in much of the world, contrasted to the wealth and luxury of the West, especially the United States; and the presence of American military power everywhere in the world, propping up oppressive regimes and repeatedly intervening with force to maintain U.S. hegemony.

    This suggests actions that not only deal with the long-term problem of terrorism but are in themselves just.

    ...

    In short, let us pull back from being a military superpower, and become a humanitarian superpower.

    Posted on 24 Jul 2006


    Lebanon, Collection of Links

    by Miguel de Icaza

    Yossi Sarid, was at the security cabinet table when the decision to escalate the war happened.

    In this fascinating article he discusses the role of deterrence and its undermining by its continuous use:

    Only once in history did America manage not only to win, but also to rehabilitate. The outcome of World War II was dictated not only by Franklin Roosevelt and Dwight Eisenhower, but also by Harry Truman and George Marshall. Since then America has only been winning, continually winning and losing. And so it is with us, too - winning and winning, yet we have had no quiet for 40 years or even 40 days.

    Iraq is destroyed, Afghanistan is destroyed, the Gaza Strip is destroyed and soon Beirut will be destroyed for the umpteenth time, and hundreds of billions of dollars are being invested solely in the vain war against the side that always loses and therefore has nothing more to lose. And hundreds of billions more go down the tubes of corruption.

    He concludes:

    Maybe the time has come to put the pistol into safety mode for a moment, back into the holster, and at high noon declare a worldwide Marshall Plan, so that the eternal losers will finally have something to lose. Only then will it be possible to isolate the viruses of violence and terrorism, for which quiet is quagmire and which in our eyes are themselves quagmire. And once isolated, it will be possible to eradicate them one day.

    Ilan Pappe wrote What does Israel Want? The whole article is very good:

    I have been teaching in the Israeli universities for 25 years. Several of my students were high ranking officers in the army. I could see their growing frustration since the outbreak of the first Intifada in 1987. They detested this kind of confrontation, called euphemistically by the gurus of the American discipline of International Relations: ‘low intensity conflict’. It was too low to their taste.

    He adds:

    The politicians at the top are more tamed, to a point. They have only partially satisfied the army’s hunger for a ‘high intensity conflict’. But their politics of the day are already donned by military propaganda and rational. This why Zipi Livni, Israeli foreign minister, an otherwise intelligent person, could say genuinely on Israeli TV tonight (13 July 2006) that the best way to retrieve the two captured soldiers ‘is to destroy totally the international airport of Beirut’. Abductors or armies that have two POWs of course immediately go and buy commercial tickets on the next flight from an international airport for the captors and the two soldiers. ‘But they can sneak them with a car’, insisted the interviewers. ‘Oh indeed’ said the Israeli Foreign Minister, ‘This is why we will also destroy all the roads in Lebanon leading outside the country’. This is good news for the army, to destroy airports, set fire to petrol tanks, blow up bridges, damage roads and inflict collateral damage on a civilian population. At least the airforce can show its ‘real’ might and compensate for the frustrating years of the ‘low intensity conflict’ that had sent Israel’s best and fiercest to run after boys and girls in the alleys of Nablus or Hebron. In Gaza the airforce has already dropped five such bombs, where in the last six years it dropped only one.

    This may be not enough, though, for the army generals. They already say clearly on TV that ‘we here in Israel should not forget Damascus and Teheran’. Past experiences tell us what they mean by this appeal against our collective amnesia.

    The options being evaluated:

    The captive soldiers in Gaza and Lebanon have already been deleted from the public agenda here. This is about destroying the Hizballah and Hamas once and for all, not about bringing home the soldiers. In a similar way in the summer of 1982, the Israeli public have totally forgotten the victim that provided the government of Menachem Begin with the excuse of invading Lebanon. He was Shlomo Aragov, Israel’s ambassador to London on whose life an attempt was made by a splinter Palestinian group. The attack on him served Ariel Sharon with the pretext of invading Lebanon and staying there for 18 years.

    Alternative routes for the conflict are not even raised in Israel, not even by the Zionist left. No one mentions commonsensical ideas such as an exchange of prisoners or a commencement of a dialogue with the Hamas and other Palestinian groups at least over a long ceasefire to prepare the ground for more meaningful political negotiations in the future. This alternative way forward is already backed by all the Arab countries, but alas only by them. In Washington, Donald Ramsfeld may have lost some of his deputies in the Defense Department, but he is still the Secretary. For him, the total destruction of the Hamas and Hizballah ---whatever the price and if it is without loss of American life --- will ‘vindicate’ the raison d’être for the Third World Theory he propagated early on in 2001.

    Billmon comments on Ilan's article here.

    Gideon Levy asks the question Who started?.

    Harper's interviews a professor that used to be in the West Point faculty and has specialized in Shiite political movements, the six questions and answers are here. He has a few interesting alternative explanations to the ones that have been discussed on the forums in the last few days.

    Censorship

    Reporters in Israel are being censored, Jonathan Cook reports:

    To remind you, I, like other residents of northern Israel, am under martial law. As are the foreign journalists -- and in addition they are required to submit their copy to the military censor. So all I can tell you, without breaking the law, is that you are not hearing the entire picture of what has been happening here in the Galilee.

    Certainly, a piece of news that I doubt you will hear from the foreign media, although bravely the liberal Hebrew media has been drawing attention to the matter, is that the "only democracy in the Middle East" has all but silenced al-Jazeera from reporting inside Israel.

    The reason is clear: until recently al-Jazeera had been running rings around the local and foreign press.

    ...

    But al-Jazeera’s coverage inside Israel -- the Arab world’s best chance of being exposed to the Israeli point of view -- is being effectively shut down. In the past two days, its editor has been arrested on two occasions and another senior journalists taken in for questioning. According to its reporters, they cannot move from their office without being followed by the Israeli security services.

    Billmon talks about something similar and updates us on War is Peace.

    NY Times Reports

    From Tyre, the New York Times has published a Flash video with pictures: here

    Posted on 20 Jul 2006


    New Mono Build Service

    by Miguel de Icaza

    In the past we used Buildbot as the tool to keep an eye on the continuous builds of Mono across multiple architectures.

    But buildbot was painful to manage, to add new tasks (for example, tracking multiple branches) and hosts we had to restart the server and we would have to update the machines in the cluster with the new scripts, which was an error prone task. The other problem we faced was that upgrading buildbot meant upgrading buildbot on assorted machines with different operating systems. And this was not limited to buildbot, but to all of its dependencies down to Python.

    Wade started working on a new centralized system which could be controlled from a central location. It does not require the build software to be installed on the target machines, but only on the central machines.

    The new system is available here.

    In addition, since its daemon-less, getting a "jail" up and running with the new software building system requires very little intervention on the jails.

    Wade added a few features to the system: its possible to track the state of the current/last build, and the previous build. The releases use SVN release numbers and can track multiple modules and multiple branches in our cluster.

    The various passes of the build can be seen here for example.

    Internally the build system creates tarballs and RPMs (they are available in our internal server). Hopefully once we reformat the machine hosting the current build status, we will be able to host the packages as well (the current public machine listed above does not have disk space).

    Posted on 20 Jul 2006


    Evolution Updates

    by Miguel de Icaza

    Evolution, the email and calendar program that we built for Gnome is now available for Windows users. Tor worked on the port for several months last year.

    Recently, Mark Pinto created an installer for Evolution on Windows. The missing component to make Evolution on Windows a reality.

    Packages for Windows are available here, they package release 2.6.2. Sourceforge reports only 3,115 downloads so far, we need to increase that number.

    Evolution UI Updates

    Srinivasa Ragavan reports on his blog on the various UI updates coming to Evolution 2.8.

    My favorite is probably the vertical view in the mailer. Although am currently trapped in a 1024x768 world (which feels like using a Commodore 64 with all 40 columns of text) I hope to go back to the wonders of 1400x1050.

    They also added Mozilla-like searching (the search is no longer a dialog box that pops up, but the search becomes part of the main window). They also added support for searching across all accounts from the same spot (without resorting to vfolders) and a quick search bar.

    The blog contains many updated screenshots.

    Posted on 20 Jul 2006


    Tikkun

    by Miguel de Icaza

    Ran into this web site tikkun.org that has some very sensible comments about the ongoing conflict.

    In particular, I liked this article from Michael Lerner. He makes a concrete set of proposals on how to end the current escalation of violence, and it opens with:

    The people of the Middle East are suffering again as militarists on all sides, and cheerleading journalists, send forth missiles, bombs and endless words of self-justification for yet another pointless round of violence between Israel and her neighbors. For those of us who care deeply about human suffering, this most recent episode in irrationality evokes tears of sadness, incredulity at the lack of empathy on all sides, anger at how little anyone seems to have learned from the past, and moments of despair as we once again see the religious and democratic ideals subordinated to the cynical realism of militarism.

    Meanwhile, the partisans on each side, content to ignore the humanity of "the Other," rush to assure their constituencies that the enemy is always to blame. Each such effort is pointless. We have a struggle that has been going on for over a hundred years. Who tosses the latest match into the tinder box matters little. What matters is how to repair the situation. The blame game only succeeds in diverting attention from that central issue.

    (Emphasis added).

    The same page also has a couple more of opinions (one by Gideon Levy, which I recently discovered).

    Posted on 18 Jul 2006


    New War

    by Miguel de Icaza

    Some Blogosphere Comments

    This just showed up on Blogsearch.Google.Com.

    Apparently bombs are hitting downtown Beirut, near Hamra street (a commercial street in West Beirut, the "Newbury St" of Beirut). Various folks I met in my trip to Beirut live off that street, including Hisham, who worked on Mono.Cairo.

    Alaa Salman, who I met in Beirut last year, is blogging here. The last time we had talked he was starting his own service-based company in Beirut.

    In Beirut, with Alaa Salman.

    Using Blogsearch shows up a number of blogs from people evacuating and various sites contain pictures. The Lebanese Bloggers have assorted updates from various regions in Lebanon.

    Update: Another find: Letter from Beirut from a 37-year old, blogging from Hamra street, very interesting background.

    From the News

    David Hirst, based in Beirut, is the author of one of my favorite books on Middle East conflicts: "The Gun and the Olive Branch". Has a good explanation of all the players in this Guardian article.

    Robert Fisk from his home in Beirut reports on the early attacks on the Beirut infrastructure. And on the second day.

    The Whiskey Bar as usual has excellent comments on the meaning and implications of the day to day events, in chronological order:

    And some pictures are here.

    I recently discovered Gideon Levy, a writer at Haaretz (some archives are here).

    His articles have an amazing human touch. My favorite ones are:

    Posted on 15 Jul 2006


    Mexican elections.

    by Miguel de Icaza

    Mexico remains without an elected president. In the last few days a number of problems have surfaced in the election.

    My friend Raymond first ran some basic integrity checks on the published results. The idea was to add the number of votes on each booth (valid and invalid) and counting whether they matched the number of votes that could be issued.

    Raymond at lunch last week.

    He found that the results did not match. This is bad either because someone cheated, or because the nation, as a whole can not count. There are arithmetic errors of this kind in nearly half the voting booths in the country.

    The tampering, we believe, happens when the votes registered on the official documents (Actas) does not match the votes that were counted at the particular voting booth.

    Now, without being a witness to the actual recounts, there are a number of statistical anomalies that can pinpoint the tampering.

    Update: Am removing this data, as it seems incorrect (the over-participation), see the next web page for the details.

    A list is available here. Democracy in Mexico is very inclusive.

    The following graph plots in the x axis the number of votes cast in a voting location. The y axis plots the number of booths that got that results for a given party. I have smoothed out the results, grouping 10 votes per tick. Here are the results for Mexico City:

    Each colored line represent the votes cast for each party. These curves are normal distribution for the population that cast its votes. This pattern repeats itself in the cities or place where the competition was well monitored.

    But plotting some of the contested states, the troublesome states, we find that some cheating took place. Not visible to the naked eye, but visible to SQL, awk, a Perl script and Gnuplot:

    This is the state of Durango. The cheating is very obvious, a number of votes were artificially deflated or nulled. This is why the red line, representing the PRD, presents this incredible behavior for the normal distribution.

    In the 1988 election, instead of deflating votes, they inflated votes, so the normal distribution was basically a mirror of this one (but for the wining party).

    The problem with these curves is that without opening the electoral packages it is not possible to determine the actual numer of votes cast. We only know that tampering took place, but the real results could alter the curves significantly.

    The results of these graphs are backed up by actual accounts of opened packages. Whenever packages are being randomly opened in these districts, votes that had gone missing for the PRD are showing up. 4,000 here, 20,000 there and all of a sudden the 250,000 vote difference (the 0.5% difference) between the candidates starts to shrink.

    The opening of the packages and the events in the last week reported on the press (illegal opening of the voting packages (there is no mandate yet to packages yet), election materials found on the trashcan) has confirmed what can be identified with a few SQL commands. These have been documented elsewhere.

    Now, tampering is not only hurting one party, its hurting all of them. So without a centralized and monitored recount it will be hard to determine the results of the election.

    The raw data is available here.

    The web site here is a wiki with a few other studies (in Spanish) on the official results. Full graphs (smoothened and unsmoothened, plus the data to plot them are available here

    Law violations

    In addition to the tampering with the results, there are a few contested bits as well. For one, president Fox was barred from helping out the candidate from his party (mexican law requirement), but its a requirement that he ignored and kept using his platform as a president to push for him.

    A number of ghost ads were run on the "quiet" period before the election by phantom organizations to instill fear in the population. Which had the effect that I have documented in a previous blog entry.

    Although the smear campaign was eventually determined to have been illegal, it was too little too late. By the time the courts ruled against it on the grounds of illegality, the ads had aired for five weeks in a row. And they were quickly replaced with new smear ads that had to go through the same court process before they could be taken off the streets.

    Posted on 12 Jul 2006


    Return to the Roots

    by Miguel de Icaza

    Found on Planet Gnome: Iain's fantastic web site for his Gnome-based Last FM player.

    This is a return to the basics, simplicity, elegance, and over all the kind of web site that demanding generations require. Strongly recommend it.

    The site is here, and you can see the screenshots for it here

    Now all we need is a stylesheet for it.

    Posted on 10 Jul 2006


    Cracking the Election's Nut

    by Miguel de Icaza

    Based on the final results from the election a group of friends, most of us met through the Linux User's Group in México, have been working on finding the voting booths that have problems.

    The results are available here, it is a work in progress.

    There are a number of angles at the problem: places where the number of blank votes is too high (Greg Palast wrote about this pattern on his "Mexico and Florida have more in common than heat" article).

    Another set of interesting graphs is plotting the number of booths that had a given number of votes. With that graph its possible to spot differences in the standard distribution and pin-point places where results were tampered with.

    This is the same study that José Barberán did in 1988 that showed the fraud done by the PRI. I talked about the details on a blog post from 2002.

    Some simple checksums are used to find "pregnant booths", that is booths where the total of votes exceeds the number of votes that could have been casted (there are limits per voting booth on the number).

    These results hopefully can be used to determine which voting packages need to be opened and audited.

    CommonDreams

    Another article from CommonDreams, in particular, there are some complains that can not be tracked down easily with awk and sql.

    Summary: Fox violating elections law; The fear campaign from the PAN; Using federal information from social programs to drive votes; Vote purchasing;

    Although Sunday's voting was peaceful and turnout high, reporters in the streets and letters to the press testify to the thousands of voters who waited in line for hours, only to be told that their polling place had run out of ballots. Thousands more were informed that their names had disappeared from the rolls. These people now complain that they were frustrated in the exercise of their civic duty by a system they suspect of bias. They are joined by millions more who are convinced that the whole process --- from the campaigns to the count --- was riddled with inequities.

    Many factors feed into this lack of public confidence. The first is the blatant partisan involvement of the president and federal government. President Fox consistently violated a Mexican law that calls for the neutrality of government officials in carrying out their public duties, despite weak admonitions from the elections authorities.

    The campaigns were not what Mexico's citizenry deserved. Calderón's campaign slogan "López Obrador is a danger to México" was low-level politicking and worked not to inform voters but to create a climate of fear until it was finally declared illegal by elections authorities. The veiled threats of the Business Council and dire warnings of economic collapse from Calderón were neither grounded in fact nor ethical as a campaign tactic. When fear ---of loss of jobs, houses, or national stability---trumps reasoned choice, it's the nation as a whole that has lost the elections.

    The PAN also made full use of the tactics of the Institutional Revolutionary Party (PRI). Part of the political culture entails delivering votes to the highest bidder---the party that brings in building materials, a new basketball court, or cash payments. It is a civic vice that the Mexican political system as a whole has not yet overcome. After years of one-party rule, many citizens still view their vote as a commodity to be bartered and not a principled statement to chart a course for the nation. On the local level where vote-buying is most prominent, none of the major parties has done much to change this view. The flip side of vote-buying is vote coercion, or threatening to cut off goods or services for voting the wrong way.

    Vote buying and vote coercion are tools primarily used by the government. Fox's "government of change," rather than eliminating this vestige of authoritarian rule, has refined it to a science. The first sign that this would be a major part of the PAN campaign came when Josefina Vázquez Mota, Secretary of Social Development was made campaign manager for Felipe Calderón. As secretary, she had access to detailed information on recipients of government assistance programs. An independent report commissioned by the government found that over four million people were susceptible to vote-buying or coercion due to the way government programs were used. During the campaigns, reporters gathered numerous testimonies of these practices in action.

    ...

    The electoral institutions created over the past decade are still weak. They were unable or unwilling to stop the PAN from violating electoral laws that forbid smear campaigns and the intromission of government officials in campaigns. Suspicions of collusion between authorities and the PAN were reinforced just days before the elections when Mexican journalist Carmen Aristegui demonstrated on national television that the PAN had developed a secret access code to the national registry of voters. Voter registration data is restricted by law to electoral authorities.

    Zocalo Meeting

    AMLO called for a 5pm meeting in downtown M�xico City today, 150,000 people showed up:

    Posted on 08 Jul 2006


    Inlining is on!

    by Miguel de Icaza

    This is the longest gap we have had between Mono releases (1.1.15 to 1.1.16), but the wait was worth it. The inlining optimization is now turned on as well as a number of other small optimizations that enhance inlining and the results are excellent. Thanks go to Massi that tuned the optimizations and hunt down every bug until it was ready.

    There is a lot of new stuff, in particular, Windows.Forms is better than ever in every possible way.

    The full release notes are here.

    Posted on 06 Jul 2006


    Mexico, Elections, Part 2

    by Miguel de Icaza

    It has certainly been an exciting time to be in Mexico. And I have been lucky enough to have friends working everywhere in the elections process, so I have got some good and juicy gossipy things.

    Laura at the IFE on Sunday.

    The "fast count" process on Sunday (called "PREP") gave an edge to the PAN candidate by a point or two early during the election. People suspected that someone was tampering with the flow of the data. Yesterday we learned that people were instructed to delay the data entry for results where the PRD was wining.

    The idea they were shooting for was to make the difference large enough on Sunday to call the election. But the difference was small enough and the missing data large enough that the plans were thwarted. By the next morning the trend had stopped.

    The Media area at the IFE, during a quiet period.

    There were also a lot of invalidated voting boxes, which were not accounted until Tuesday night and closed the gap from 500k to 200k (there were 2.5 million votes there, update: fixed the number from 1.5 to 2.5). Plus there were another 2.5 million votes missing when candidates had a 250 difference (Granado's Chapa account).

    Yesterday we learned from some whistle blowers, as suspected, that they had been instructed to delay the data entry for data that was not favorable to the PAN (right).

    Laura and Patrick posing at the IFE.

    But there are multiple layers of hacks being done in the election: boxes where the total sum surpasses the number of ballots (by hundreds); boxes where all the PRD votes were wiped out; boxes where a handful of votes are moved from one party to the other and boxes where there is only one winer.

    But the PREP fast-counting process is now useless, as I mentioned previously it was merely a coarse tool that had too many errors to be used for such a close election. The real counting began yesterday in the 300 districts, where people are counting the paper reports instead of the digitally entered data.

    Some of my friends working for the PRD, and some of them working on their own took the data from the PREP and used that to identify fishy ballot booths. Those which present funny statistical warts (more votes than allowed, where the margin is larger than 20; votes where the results vary wildy in the same geographical region; ballot boxes that do not follow a gaussian distribution and a few more).

    Armed with this information, the PRD has requested that those ballot booths be opened and all the votes on them counted at the district level.

    At least on one of the DF districts the opening of the ballot boxes that showed some signs of statistical creativity have rendered 7,000 votes that were missing for the PRD. A minute-by-minute account of how they were uncovered is here. Also Leo has a page.

    The issue is with the remote districts where there are not many PRD representatives to push for the opening of the boxes. If they can find 7,000 unaccounted votes in a district in Mexico City, a PRD stronghold, I can only imagine what happened elsewhere.

    The link listed above shows that in one of the rural districts in Tabasco, the mistakes made up for 20,000 votes for the PRD that had been wiped out.

    Part of the problem is that not every box with fishy results is being opened, there is a strong refusal to do this on the side of the PAN so each box is basically a fight. This means that the PRD might choose to bring the list of statistically fishy results and request the opening at the federal tribunal.

    Miguel's own Exit Polls

    I have been asking people I talk to on the streets (taxi drivers, my friends, waiters, salesmen, my family) who they voted for, and if they voted for the PAN, why they voted for them.

    I was interested in whether the PAN's propaganda had any effect. My family is sharply divided, my mother's side is of a strong catholic background, the kind of catholic that would fight with a gun to avoid the separation of Church and State last century. They still attend mass in Latin and refuse to use any of the public works/roads built my the PRD government in Mexico City.

    So here are the, statistically meaningless, reasons that I found interesting from people voting for the right (PAN):

    • If the PRD wins, I will lose my house.
    • If the PRD wins, they are going to nationalize all property, and I will lose my house.
    • The PRD called for a popular uprising on Friday (this was the rumor stared by the right when they hacked into the left's web site and posted an apocryphal letter).
    • The PRD will not allow business to operate, and I work at a business.
    • The PRD will force three to four families to share an appartment.
    • The PRD is a danger to Mexico (he couldn't say why).
    • Update: The PRD candidate killed his brother.
    • Update: If the PRD wins, they will close the churches.
    • Update: The PRD candidate killed another kid with a baseball bat when he was a kid.
    • Update: The PRD candidate never finished his degree.

    Am missing a few, but I can not remember them now.

    And of course, none of that makes sense nor does it follow the pattern that the PRD used in Mexico City for the past 10 or 12 years. But the propaganda was strong, the ads on TV explicitly spelled that for the population.

    Update: Federico overheard this discussion on the Paris airport, two mexicans talking to each other about the elections:

    Dude1: This election stuff is terrifying.

    Dude2: Yeah.

    Dude1: Imagine loosing everything you own.

    Alternate Vote Counting

    To prevent electronic fraud like in 1994, an alternate, site was set up, we went to this site on Sunday at night, where some of my friends are working. They had some 200 data entry people receiving data.

    The data coming out of this center was used to identify some of the fishy boxes (when the data reported here did not match the PREP data). The only problem is that it only has coverage for one third of the votes in the country.

    This is one of the capture rooms:

    Capture Room, Redes Ciudadanas

    Mancha and Laura.

    High Tech Cheating

    On Sunday, I was explaining to an international visitor that just like the US has a very advanced high-tech industry, Mexico is the leader in the election fraud industry.

    The range of schemes used to cheat in an election is very resourceful, varied in texture, color and smell. It will be the subject of another blog post where I cover the traditional "mapaches", "urnas embarazadas", "fraude hormiga", "el taco", "el carrusel", "raton loco", "remplazo de urna" and the new high-tech ones that were pioneered in 1994.

    Posted on 06 Jul 2006


    Summer of Code Progress: ASP.NET support in MonoDevelop

    by Miguel de Icaza

    Michael Hutchinson has commited his ASP.NET AddIn for MonoDevelop to SVN. This is a follow up to the work that he did last year, where he worked with Blagovest to create an ASP.NET editor.

    This year he is integrating the editor with MonoDevelop to provide a seemless development experience. Currently the Mozilla-based editor is not yet hooked up though.

    See his blog for more details

    Posted on 04 Jul 2006


    Mexican Elections.

    by Miguel de Icaza

    The news have reported that the election results do not point to any candidate as the clear winer yet. Sadly, the election is too close.

    The situation will soon move from the counting of the votes into the political realm, as there are a few things happening in parallel.

    There are three classes of computations in the election, two of them are ran by the Institute for Federal Elections (IFE) and another by third parties.

    • Exit polls and society sponsored sampling.
    • The IFE quick-vote counting, called the "PREP".
    • The official count, done by the IFE.

    The exit polls are pretty random, it depends who is doing them, and where they are doing them (the country seems to be mostly divided: the north is very much PAN, the south is very much PRI).

    The IFE quick vote counting (PREP) is not an official result, and is intended to give a quick overview of the election results. It would have been very useful to point out the winer if the disparity between parties was larger, say "40, 30, 20, others" (and in fact, its been useful to determine governors, senators and other broad strokes).

    But the problem is it is not very precise, it is missing a lot of data that is not being accounted for. There is an agreement that if anything goes even slightly wrong with any of voting results coming from a location, the values will not be computed (missing data, typos). They are still displayed (bottom of the page), but they are not making it into the end result.

    This means that the difference between the PAN and the PRD for the presidential is either:

    • 1%: quick vote count, and is still missing a few thousand voting booth results).
    • 0.7%: if the values for the pending values are taken into consideration (using a perl script on the data posted).
    • 0.4%: on the real count, but this so far only has 90% of the votes accounted for. The final number wont be announced for a few days.

    And this is where it turns political. The PAN is demanding the IFE to call the election on their favor based on the quick count. The real voting results are not as encouraging and might still flip over to the other side considering all the votes that have not been counted yet.

    In the meantime, a number of inconsistencies have been found in the PREP program between the reported numbers and the posted numbers on the streets (here).

    There are still a number of possible events, and the city is abuzz with theories on what will happen next.

    Unlike the Fox election, which was a relief to Mexicans, this one will not feel like a relief. With the Fox election, even if he was a right-wing candidate, getting rid of the PRI was good enough. Besides, Mexico City got the PRD as a major.

    Track Records

    The PAN orchestrated a fear campaign against the PRD/AMLO. The TV ads were fairly blunt "if they win, you will loose your job and your house", "Four families will be forced to live in an apartment", your standard cold-war era propaganda. I figured nobody would believe this sort of thing, but I was surprised to listen to my own friends echo these things back to me "we would have lost our houses and jobs".

    They managed to smear a guy that was the runner up for "Best City Major" in the world, which had a great track records and fixed a miriad of problems in Mexico City, created a University for Mexico City, opened new schools and funded old people that needed money.

    On the other hand, we have the fear-monger candidate. He was the man in charge of the largest debt in this administration (Fobaproa), the largest burden on the country; He is part of the small group of people which kept coming up with creative ways of privatizing the nationalized oil industry, and was recently discovered to be involved in a multi-million dollar nepotism scheme while he was Secretary of Energy. Basically, he has the profile of your standard CIA-approved candidate.

    Anyways, Mexicans, like the Americans two years ago, managed to vote against their own interest as the discussion shifted away from the Economic Policy to whether the man had finished his degree and whether he ate babies with his bare hands.

    Posted on 03 Jul 2006


    Ruby.NET Compiler Released

    by Miguel de Icaza

    Wayne Kelly and John Gough announced the release of their Ruby.NET Compiler, the details are available here.

    To build with Mono today, a few patches are necessary, see the comments here.

    Posted on 02 Jul 2006


    Mexico Election: Forgeries

    by Miguel de Icaza

    A new trick in the dirty politics going on in México.

    Someone cracked into the web site for AMLO/PRD and posted a forged letter that called for "civil resistance" the day after the elections.

    The media was notified in the morning of the letter and had a blast all day discussing the letter as real, and it took all of 24 hours to get the media to acknowledge that the letter was fake (they were notified half an hour after it was discovered).

    Posted on 01 Jul 2006


    GUADEC

    by Miguel de Icaza

    Just got back to Boston from GUADEC. It was extremely fun and energizing, just like last years. It is a shame I had to leave early the conference.

    And the Band Played On

    This year, there was a cover band made up of GNOME hackers and they did a fantastic job keeping us entertained at the Maemo/Nokia party, congratulations to the Macaques!

    Beagle

    As part of my upgrade to SLED 10, SUSE's new enterprise Linux desktop am finally a full-time Beagle user.

    Finding your documents and discovering information you did not even remember you had, playing $HOME archaeology, has been a very pleasant experience.

    Although Beagle is fantastic, it needs a little bit of tuning for my day to day use.

    Am a heavy email user, I have seven gigabytes of email in my laptop, and Beagle has a bad habit of optimizing the Evolution index files every 10 minutes if something has changed. And the optimization process hammers my machine very, very hard, to the point of not letting me get work done for a few minutes.

    I spoke to Joe, and he said "it happens about every 15 minutes or so", armed with this information I found the problem, the Beagle.Daemon.ScheduleOptimize routine has a 10 minute delay to run the query again.

    I tried rebuilding my modified Beagle from CVS, but CVS has new dependencies that I lack, so I decompiled the BeagleDaemonLib.dll, like this:

    $ export MONO_PATH=/usr/lib/beagle:/usr/lib/mono/gmime-sharp/
    $ monodis /usr/lib/beagle/BeagleDaemonLib.dll > a.il
    $ vi a.il
       # Replace the ldc.r8 10. in ScheduleOptimize
       # with ldc.r8 100. for a 100 minutes.
    $ ilasm /dll a.il
    $ mv a.dll /usr/lib/beagle/BeagleDaemonLib.dll
    	

    This has brought up my machine back to usable for me.

    There are a few other glitches here and there, but the Beagle team is aware of these. Beagle and Beagle-based applications have a lot of promise, I just hope that the core gets a few passes of love, improvements and small touch-ups before they jump on to new, innovative ideas.

    Avalon, WPF and Michael Zucchi

    Michael has started a blog about his experiences using Avalon/WPF on Windows. Michael was one of the main developers in Evolution while at Ximian and is now working in Australia hacking on WPF.

    His comments on WPF are interesting. His regular blog has had some negative comments about it in the past and his new blog has some more.

    I do not have as much experience as Michael has with Avalon/WPF, but I wrote about the complexity of the framework a few years ago (here and here).

    Although Michael is not involved in Mono, I have added his blog to the Monologue blog aggregator as his comments are very interesting.

    MonoDevelop

    Lluis Sánchez demoed the new developments of MonoDevelop at the conference.

    What was interesting about Lluis' presentation is that I did not know about half the features that MonoDevelop has. I was blown away. Specially, since am Lluis' manager and I read every status report, and try to read most of the MonoDevelop patches, but I did not know that MonoDevelop had all this magic behind it.

    I knew we had Stetic integration in MonoDevelop, but the integration goes beyond generating the UI for applications. The Stetic/MonoDevelop integration uses the refactoring engine to add method handlers for signals (double-click on signal) and if you change the names of your widgets in the designer, the source code that references it is updated. It also has a number of nice touch-ups that went into SVN recently, like a context-sensitive toolbar which has the most common operations in a per-widget basis.

    JPR raised some concerns, because this "smelled" similar to Glade's "Generate code" feature, but it is very different. The model that MonoDevelop uses for Stetic/C# integration is more similar to Glade and XML, it just happens to not use XML at runtime.

    The MonoDevelop model is more or less like this, for each "UI" element (custom widget, dialogs or windows):

    • A MyGUI.cs contains all the event hooks, top-level class handler for the given UI component. This code contains a call to Stetic.Gui.Build (this, typeof(MyGUI)).
      This is the equivalent of loading your Glade file in the Glade world.
    • A gtk-gui/MyGUI.stetic contains the representation used by Stetic to manipulate the UI. This is not used at runtime, its only used by Stetic to load and save the UI.
    • During compilation the gtk-gui/MyGUI.stetic produces a gtk-gui/generated.cs file that contains the code to create all the GUI widgets and hook up all the events.

    So you are free to add and remove as much code as you want to your MyGUI.cs file, that file is never touched by MonoDevelop.

    He also demonstrated creating custom widgets, and how these could be kept on a separate library that MonoDevelop can load into the GUI designer, the steps are:

    • Add a "New Project" to your solution, select "Library".
    • In the library, select "Add New Widget", develop your new widget, debug it, test it. When you are ready.
    • On the main project (or every project that consumes your library), right click on "References". Select "Projects" and click on the Library you want to incorporate.
    • The new widget appears on the widget palette, you can now drag it and use it in your main application.

    Finally, he demonstrated the "Deployment" feature, which produces an automake/autoconf setup and produces a tarball that is ready for redistribution. There is talk about doing a "deploy to RPM" and "deploy to DEB" functionality right into the IDE.

    Posted on 30 Jun 2006


    GUADEC for Latin Americans and Asians

    by Miguel de Icaza

    Rodrigo points out that GUADEC in Europe is an expensive conference for those coming from Latin America and Asia. Not only is the travel had to afford for those folks, but even if they manage to pay for it, their expenses in Europe are sometimes hard to afford:

    People from Latin American countries (and I guess Asia and Africa) find Europe quite expensive, so for them going out for lunch/dinner with US, Australia and Europe people is unaffordable, which makes them having to go on their own to look for cheaper places. So, I think it would be a great idea if we had, like in Copenhagen, free lunch for everyone at the venue. Thus, everyone, regardless of the country they are from, would have lunch together, making it easier for everyone to meet and talk.

    Anne had a couple of good ideas (or someone suggested this on the GUADEC list). They were:

    • Make the "E" in GUADEC stand for "Everywhere". Host the next GUADEC conference in Latin America or Asia. Travel to Latin America and Asia is affordable for Europeans and Americans.
    • If we continue in Europe, use some of the money to provide stipends to pay for some of the travel expenses for those who need it.

    Posted on 30 Jun 2006


    New Toolkit for Rich Web Applications

    by Miguel de Icaza

    The other day I ran into Jitsu, a new toolkit for creating Ajax-y applications.

    Jitsu takes an interesting approach in the Ajaxy space.

    Posted on 28 Jun 2006


    Mexico, Elections

    by Miguel de Icaza

    Am going back to Mexico to vote on this Sunday's election.

    Am voting for Andrés Manuel López Obrador (AMLO/PRD).

    The smear campaign against AMLO has been quite intense, a few mexicans in Barcelona told me the most amazing stories. The rumors being spread include "If AMLO wins, four families will be forced to live in an appartment", "AMLO is being financed by Fidel Castro", "If AMLO wins, you will only be able to buy food with food coupons from the state".

    It sounds like a list of recycled cold-war era propaganda.

    That's the kind of thing you have to make up, when your candidate gets caught up in a corruption scandal using a creative setup and mis-using federal information.

    More videos: here.

    Posted on 28 Jun 2006


    GUADEC Conference: Mono and Gtk# Q&A Rescheduled

    by Miguel de Icaza

    I had a conflict of schedule (my plane leaving Barcelona two hours before my talk at GUADEC) and the organizers were kind enough to reschedule the Mono and Gtk# Q&A session at GUADEC to be on Monday instead of Thursday.

    The session will be held in the "Sala de Actas" (Room #2) at 7pm on Monday 26th.

    Posted on 25 Jun 2006


    Microthreading with Mono

    by Miguel de Icaza

    Jim Pubrick has written an interesting blog entry detailing how they are using Mono on Second Life. Second Life is going to use Mono to run the user-provided scripts with native code (which am told can be up to 150 times faster than the current engine).

    SecondLife is using Mono in a non-conventional way, which I like to think is one of the benefits of having an open source engine, they have added a micro-threading implementation.

    Microthreading was necessary because some of their simulations are made up of thousand of threads/routines, and using the default threads in Mono (which are mapped to operating system threads) would have been too heavy.

    Their micro-threading implementation is different than Tomi's recent continuation work in that Second Life has added support to "migrate" running code across machines.

    A presentation from the Second Life folks at Google Tech Talks.

    Posted on 07 Jun 2006


    Zombo, invite needed

    by Miguel de Icaza

    If anyone has an invite to Zombo.Com please email it to me.

    Posted on 07 Jun 2006


    Boston Progressive Fix

    by Miguel de Icaza

    For your progressive needs, this week has a couple of interesting events in Boston:

    Posted on 05 Jun 2006


    Al Gore's new Movie.

    by Miguel de Icaza

    Tonight Laura, Duncan and myself went to watch "An Inconvenient Truth", featuring Al Gore as he presents his case for action to stop global warming.

    The movie, which follows Al Gore through as he delivers the same speech over and over around the globe had everyone in the movie theather glued to their seats.

    As the before and after images start rolling and the graphs and numbers of warming in the planet and the pictures of large chunks of ice the size of entire states start thawing the sense of urgency grows.

    By the end of the movie not only everyone was applauding, but stayed seated as the credits and some extra messages kept rolling and applauded again. Few movies have that effect on people.

    I highly recommend it.

    Here is the YouTube Trailer.

    Now, when I got home I Googled for the movie, to find the web site, and one of the sponsored link ads pointed to "Friends of Science" (not linking to them), which has a section on "Myths and Facts" about Global Warming. The section on Myths and Facts probably were strong enough a few months ago. They probably managed to make some people doubt the negative effects of Global Warming, but compared to the arguments put forth by Al Gore in the movie they just represent a radiography of the kind of shady discourse that passes as science and debate nowadays.

    Some extra googling landed me at a site that has actually done a littble bit of research about who exactly these "Friends of Science" are, basically astroturfers.

    In addition, last night we watched the PBS documentary on the AIDS epidemic (now you can watch it online). Both Bill Clinton and Al Gore appear on the documentary. After listening to both of them, Clinton very articulate and passionte, and Gore making the case in front of the Security Council on a health issue Laura turned and asked me "And this is the guy they tried to impeach?".

    Addendum:

    Posted on 03 Jun 2006


    Nearly all Binary Searches are Broken

    by Miguel de Icaza

    Duncan pointed me today to this blog entry from Google Research: "Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken".

    Fascinating read.

    Posted on 03 Jun 2006


    This Week on Linux

    by Miguel de Icaza

    Stetic Lluis completed the work in Stetic, the Gtk# GUI designer, to support menu and toolbar editing. His work is based around Gtk+ UIAction/Action/ActionGroup, which takes advantage of the new features in modern Gtk+'s.


    MonoDevelop hosting the updated Stetic GUI designer.

    Read his full blog entry for further screenshots and explanations. The code is available on trunk.

    MonoDevelop and C# 2.0: on the same blog entry Lluis talks about the integration of SharpDevelop 2.0's NRefactor code. This means that MonoDevelop will now do proper completion and parsing of C# 2.0 projects (Generics, anonymous methods, partial clases and so on).

    Zac Bowling: has two interesting posts this week: his progress on Mozilla embedding. His post describes his work to give us finer control over embedding Mozilla in our applications (in particular to implement Windows.Forms's WebControl).

    He also has a very nice post about uses of Mono beyond running your application on Linux and tips for .NET developers.

    Google announced Picasa running on Linux, I agree with Robert Love's opinion that using and improving Wine was the right thing to do for Google. Wine and Picasa stability and performance are very impressive.

    Posted on 26 May 2006


    Jonathan Schwartz and Open Standards

    by Miguel de Icaza

    Independently of the open source debate surrouding Java, I enjoyed very much this blog entry from Sun's CEO. In particular:

    I'm still amazed when I hear folks wondering how Sun monetizes Java. So at the risk of repetition, I'd like to share a few thoughts.

    ...

    Then there was the civil war era in the US, when locomotive companies all had their own railroad widths and shapes - designed only to work with their rail cars and steam engines. How'd they fare? They failed, standards emerged that unified railways and rail lines, and that era created massive wealth, connecting economies within economies. Standards grew markets and value.

    Posted on 26 May 2006


    Google's Summer of Code: Mono Edition

    by Miguel de Icaza

    The Google Summer of Code has started, and we have announced the list of projects that will be mentored in the Mono group here.

    This will be another exciting summer.

    Posted on 25 May 2006


    Continuations and The Web

    by Miguel de Icaza

    Disclaimer: I do not know how people are using continuations to build web applications, but on the ongoing debate about continuations and the web, Ian Griffith's has a small tutorial and makes the following observation which sounds sensibe:

    But continuations seem to offer a solution. Whenever we get to the point in the code where we need to generate a page and feed it back to the user, we could create a continuation, store it somewhere, and then return control to the web server. When the next request comes in, a framework could retrieve that continuation, and execute it, allowing us to continue from where we left off.

    You could probably cruft up a working example of this style of coding in a web app by writing an iterator function in C# which did a yield return each time it wanted to show a page to the user and wait for the results. Languages with comprehensive support for continuations could offer a more elegant example of the same idea.

    However, I think this is a bad idea. Although the relationship between the code and the user navigation path is apparently simple, it hides subtle but significant details. This makes the same mistake as we did in the 1990s with distributed object models. We'd like to believe we're hiding a lot of implementation details behind a simple abstraction. In practice we're hiding important features behind an inappropriate abstraction. Our industry has more or less learned the lesson that procedure calls are an unworkably naive abstraction for request/response messaging over a network. I suspect that it's equally naive to attempt to manage the complexities of user/web server interactions with simple sequential code.

    (Emphasis added).

    There is some discussion about whether the JVM CLR should add support for continuations. And Don Box doubts that Web Applications are the killer app for continuations.

    We abused iterators last year to implement our HTTP application pipeline, but am not sure this is something that can be easily generalized and is certainly not easy to explain.

    In the meantime, Tomi Valkeinen has prototyped a continuations framework for Mono.

    Update: Even if there is a good design for a web framework that uses continuations at its core, doesn't this require the state to be preserved in the server in some form?

    Posted on 21 May 2006


    Open Source Java, Part 3

    by Miguel de Icaza

    Mono competes with Java, and as Chris said a few weeks, am sure I have some agenda here. But I believe in open source and free software. Ultimately, a free java is just what the doctor ordered.

    Like every other pundit on the magazines, this is my followup into the speculative Java debate.

    Am reading the recent quotes from a Red Hat executive on the Register (so I guess we have to take these comments with a grain of salt, as the Register is highly selective about what it quotes and how it quotes it), but they ring true.

    Regarding the new binary license and Sun's announcement this week, he said:

    "They try to do the minimal amount they can get away with,"

    Am sure that Sun has its own reasons for doing a calculated release of Java, but they have a good track record of following up on their promises: OpenOffice and OpenSolaris (and I guess they are also GPLing their CPUs, not sure).

    The OpenOffice strategy was in the hands of Marco Boerries who has now departed Sun. And in the case of OpenOffice the value was in bringing down the leader in the space (Office); While in the Java case its a matter of opening up the leader (Java) and potentially loosing some leverage in the industry.

    Now, when it comes to the one laptop per child project and Java, its interesting to note what Chris said recently:

    Everyone has agendas. We ran into quite a few at this point in development. People who wanted us to use Java for Java’s sake, people who wanted to see their particular software on the laptop, people who wanted to control what kids would see, and what educational content they would be exposed to - everything.

    Red Hat is clearly now a company with a lot invested in Java and much to lose from Sun's control over such a core component of the OS. I have no way of confirming if the Register correctly paraphrased their CTO, but the reasons given had nothing to do with JBoss and everything to do with some research-grade projects: OLPC and Real Time Systems?

    In any case, it boggles the mind that people would like to run everything on Java on those poor OLPC machines. They have as much power as my cell phone (and Java has brought down and rebooted my phone more times than I care to remember; Granted I spend too much time in Google Talk and Google Maps).

    Now, on the other hand, everyone clamoring for Sun to open source Java seems to be tacitly admitting that free software can not compete in out-engineering a proprietary company if the proprietary company gives their goods for free, a point that I have made previously ("Fork in the Open Source Java world" and "Open Source Java, Part 2"). Tom Tromey did have an interesting follow up to my negative outlook (finding the post is an exercise for the reader).

    He certainly does not agree with me, and its very possible that my passion for Mono might influence my motivations, but in the end an open source Java is good for everyone.

    Beyond all the debate surrounding Sun's actions there is an interesting debate that we should look at: can open source effectively competing with proprietary software if the goods are given away for free?

    I believe we have overestimated the need and importance that people put on open source software over the need for free software (free as in price in this context, gratis). This is one of my points in the previous blog entries.

    Points to ponder: effect of free VisualStudio Express over SharpDevelop. The new license that allows binary distributions of Java among Linux users. Free Flash player over the three hundred incomplete efforts to reimplement it for free.

    Discuss among yourselves.

    Update: Some confused readers did not make the connection and are missing my point, so I quote a bit from the earlier article

    Unlike Mono, open source Java faces a big problem: there are a number of free commercial Java runtimes available for every operating system that matters. The group of people who would have contributed to a free java to scratch an itch are gone. From those who remain another large chunk will switch in a heartbeat to a commercial implementation the moment they run into missing features, scalability issues, the lack of a moving GC or a hard to debug problem.

    So you must rely purely on free software advocates or people employed to clone Sun's Java for a strategic purpose.

    As I mentioned in someone's comments section, broaldy speaking there are two large groups of contributors to open source software: free software kind, the activists, the idealists and the pragmatists, scratch-their-own-itch kind.

    Open Source Java moves slower because it lacks the second group of contributors. That group is happily using Sun's Java. Mono on the other hand has been able able to benefit from contributions of the second kind. The day Microsoft releases .NET for Linux/Unix is the day that Mono looses a big chunk of the second kind of contributors.

    Posted on 19 May 2006


    Paint.NET follow up

    by Miguel de Icaza

    An interview with Rick Brewster, one of the authors of Paint.NET, available here.

    Some quotes:

    I nominated myself to the project manager position and the four of us (Brandon Ortiz, Chris Trevino, Luke Walker, and myself) kicked out a v1.0 product in about 15 weeks. We didn't start with the source code to Paint, but instead built Paint.NET from scratch -- I was quite impressed with how easy it was to build an application in C# and to keep it organized.

    ...

    The primary goal of Paint.NET is ease of use. One rule of ease of use is recognizing that "people don't." They don't follow or even read directions (I certainly don't), they don't read dialog boxes (I hate dialog boxes), they don't backup their files, etc. And many people aren't interested in figuring out all sorts of complex or technical things. They just want it to work.

    ...

    I don't believe that we should be aiming to replace Photoshop or The GIMP.

    The rest of the interview is great, I recommend reading it.

    Posted on 19 May 2006


    Egypt

    by Miguel de Icaza

    Paolo just got back from vacationing in Egypt. Rodrigo loved it and tried to get me to go ever since he got back. Now Billmon is going too to cover the WEF and then doing some tourism.

    Its been on my TODO list for ages.

    Ideally, I should find myself an open source conference in Egypt as open-source based tourism is way better than just showing up at the airport and checking into your hotel.

    Posted on 19 May 2006


    Porting Paint.NET to Mono

    by Miguel de Icaza

    In the last few weeks a large number of bugs have been fixed in our Windows.Forms implementation which finally has allowed us to get larger applications running with Mono.

    As time goes by we are able to run more complicated applications with Mono.

    In October I imported a version of Paint.Net, a paint application built with .NET into our repository. I made some changes to it to get it working on Linux, this is a screenshot as of this afternoon:

    Paint.NET running on Linux

    Paint.NET has been a fantastic test case, it is made up of about 70,000 lines of C# code. Update: The port runs in Mono, without any external dependencies (no Wine for instance).

    Compiling Paint.NET on Mono: the first steps

    To get the code building on Linux, I had to remove all the references to a third party library that was used by the Paint.NET back in October (DotNetWidgets). This is the last release of Paint.NET that targeted .NET 1.x; Newer versions of Paint.NET have replaced DotNetWidgets for the Strip controls in Windows.Forms.

    The port is not as clean as I would like to, as I switched strategies in the middle of the port, let me explain.

    First I used prj2make to turn the Visual Studio solution into a Makefile; Then I had to rename some of the files, as the actual filenames were spelled differently (filename casing) than the files distributed. This was easy.

    A rather large and obnoxious task was replacing all the calls to DotNetWidgets (which provided Paint.NET with a spiced up UI experience) with the more simple widgets that ship as part of the standard API. This was done by removing the reference to the library and then changing the code to use the simpler widgets in a loop.

    And this was my first mistake in the port. Instead of planning the port, I kind of brute forced the port on my spare time. About one third of the way in manually replacing the code in my favorite editor, I realized that I should just have implemented the DotNetWidgets interface and be done with it. The result was a 129 line source file that in one hour gave me everything I needed to get Paint.NET building without this dependency.

    Exercise for the reader: describe the morale of the story.

    Making it Run

    This Paint application despite its young age is quite sophisticated and calls into a number of Win32 libraries to use features not exposed directly by the .NET libraries. For example, it determines the number of CPUs to adjust its thread pool, it uses low-level heap routines from the OS and other things like that.

    Luckily all this OS-specific code is neatly split into the SystemLayer directory of Paint.Net and wrapped in a handful of classes.

    Since most of these routines are very simple to provide in Unix I initially decided that it would be a good idea to implement these functions in a way that other future Windows.Forms applications would benefit, so I started implementing a number of routines that are now part of our "supporw" library.

    Also, supportw is useful in showing how we can map unmanaged calls back into managed calls, so it was a useful example to have around for anyone which might need to "bounce" unmanaged calls into the managed world.

    At this point in November, Paint.NET started running into missing functionality in Mono's System.Drawing and Mono's Windows.Forms; I would take a break of a few months before coming back to it a couple of weeks ago.

    System.Drawing

    One of the early road blocks that I ran into with Paint.NET was the incomplete support for Regions in our System.Drawing implementation. We supported rectangular regions, but not the GraphicsPath-based regions.

    Implementing this was not an easy task. Around the same time we started working with a third party control vendor that uses System.Drawing extensively for his commercial product and we also ran into ZedGraph which is a popular library for generating plots which was running into some gradient issues with our implementation.

    Sebastien was kind enough to take on the challenge of implementing these hard tasks.


    ZedGraph in Mono, April 2006;
    The original.

    Sebastien blogged extensively about his work on GDI+, some screenshots:

    Blogging about this attracted Bill Holmes, which helped refine the finer points of the gradient brushes.

    With GraphicsPath-based Regions implemented, gradients in place it is now possible to get most of the basic operations in Paint.NET going without a crash.

    We are still missing support for "GraphicsPath.WidenPath" (used by Paint.NET to paint ellipses and rectangles, but really, who uses that these days? Aren't bezier paths all people need?).

    Another missing feature are PathGradientBrushes. We do not believe that this can be implemented with Cairo, but we would love to be proved wrong. Cairo is the underlying engine that we use to implement GDI+.

    Some of the us secretly wish that the Xara Xtreme library was already open sourced (they are planning on releasing it) but to use it, we would need it to be licensed under the LGPL or the MPL license.

    System.Windows.Forms

    Once the graphics issues were sorted out, Paint.NET turned out to be a QA engineer dream come true. After a while, we got to the point where we can actually draw with the program and we have fixed the most critical performance problems (initially it was not even possible to draw, due to a trigger-happy redraw routine).

    Midways through the port, I changed direction. Instead of continuing to work on supporting the emulation of unmanaged APIs by emulation or by bouncing the API to managed code, I started to do a more regular "port". So I started to replace calls to SystemLayer with proper Unix calls or other Mono libraries. This has proved to be much simpler.

    We might still implement a few emulation routines for some P/Invokes, depending on the popularity of the technique, but in general we will advocate that folks use OS-specific calls depending on their needs.

    Paint.NET has exposed a lot of bugs in our Windows.Forms implementation (current bug list).

    Sadly, in addition to the bugs reported, we need to fix also the minor details, and the cosmetic aspects of Windows.Forms before we can ship it.

    At Novell, Jackson, Peter and Mike are now being joined by Atsushi, Gonzalo and Chris (who were up to this point working on ASP.NET 2.0) to assist in fixing bugs in Windows.Forms.

    And of course lots of people in the community are helping out, specially Alexander Olk, Jordi Mas and Jonathan Chambers.

    QA

    Carlos is now working in collecting applications from the CodeProject and SourceForge and repeat the process that I described above for Paint.NET: we will be gathering applications as test cases and Carlos will be routinely testing them for potential regressions.

    In addition, although we had a NUnit test case for Windows.Forms we were not really using it, so many failures went unnoticed for a while. So our immediate next step is to make sure that our NUnit tests pass on Unix (Atsushi just recently fixed them on Windows, as we had some incorrect tests or tests that depended on a specific release of the framework).

    Atsushi has a great call for contributors that includes some background information on those which migh be interesting in helping:

    So I have started to look around existing bug list and work on it. At first I thought that it is highly difficult task: to extract simple reproducible code from problematic sources, and of course, to fix bugs. Turned out that it is not that difficult. Actually, it is very easy to find MWF bugs. If you run your MWF program, it will immediately show you some problems. What I don't want you to do at this stage is just to report it as is. We kinda know that your code does not work on Mono. It's almost not a bug report. Please try to create good bug report. Here I want to share my ideas on how you can try creating good MWF bug reports and bugfixes.

    Followed by some easy-to-follow steps on how to squash the bugs.

    Other Mono Events

    There are a number of exciting new developments in the Mono Universe that I hope to write about next week in more detail (news on our compacting GC, a new IR representation for Mono, a few touch-ups for our inliner).

    The summer of code has some great proposals, and hopefully next week we will have the definite list of projects that we will be mentoring, but the one am most excited about is a VB.NET compiler (VB.NET 8, with Generics and all that) written in VB.NET.

    Posted on 19 May 2006


    Further Humor

    by Miguel de Icaza

    Someone has adapted Colbert Report's "The Word" format to Bill O'Reilly's own "Talking Points", the result are pure gold.

    hilarity link.

    Posted on 17 May 2006


    Pundits, they say the cutest things

    by Miguel de Icaza

    Thomas Friedman, "Six Months" remixed: Hilarious.

    Posted on 17 May 2006


    Mono on ArsTechnica

    by Miguel de Icaza

    I liked this bit from the Ars Technica News coverage on Sun's rumored license plans for Java:

    Sun's decision to make the license less restrictive is probably a response to the rapidly growing popularity of Mono, an open source implementation of Microsoft's .NET development platform. A variety of unique and compelling Linux desktop applications built with Mono have helped to popularize the use of .NET technology on Linux. The .NET runtime environment, known as the Common Language Infrastructure, is an official ISO standard, whereas Java is largely controlled by Sun through its own standards body, the Java Community Process. Java popularity is also threatened by the recent hype surrounding dynamic language web application development frameworks like Ruby on Rails and Django. Developers have found that web applications built with Ruby on Rails require less time and resources to develop and, in some cases, provide better performance than comparable web applications built with Java technologies like Spring and Hibernate.

    Posted on 11 May 2006


    Laser Summer School, Elba Island

    by Miguel de Icaza

    This summer I will be participating in a series of lectures at Bertrand Meyer's LASER Summer School on Software Engineering in the Elba Island.

    I will be talking about open source development.

    Posted on 09 May 2006


    Colbert and Bush

    by Miguel de Icaza

    In CSPAN1 last night you could watch the White House Correspondents Dinner where Stephen Colbert had a thirty minute intervention.

    From Boing Boing a transcript, and a torrent for the whole thing.

    Crooks and Liars has a copy here.

    Bush's face is priceless. And there were many tense moments, you can tell the audience was way uncomfortable.

    Update: Colbert will be profiled today in 60 minutes.

    Posted on 30 Apr 2006


    Neil Young's new Album

    by Miguel de Icaza

    "Living with War", Neil Young's new album, is currently being streamed from his web site.

    Alternative streaming site.

    It is also available from Real's Rhapsody.

    Neil interviewed in CNN, available on YouTube.

    An early review of the album by a friend of Neil Young.

    Another pre-release review.

    Posted on 28 Apr 2006


    Windows.Forms Progress

    by Miguel de Icaza

    Yesterday I found MonoCalendar, a Windows.Forms-based calendar application, very similar in spirit to iCal.

    MonoCalendar is a big exercise in abusing System.Drawing, when I ran it in the morning it was crashing. Just as I was preparing to file a proper bug (and after nagging Massimiliano to look at the crash) Sebastien, Bill Holmes and friends had fixed the GDI+ issues that were stopping MonoCalendar from running.

    here is a screenshot:

    Windows.Forms-based MonoCalendar.

    To run it, you must be using the latest versions from SVN of Mono and GDI+. Hopefully we will have a new beta of Mono soon (1.1.16).

    Posted on 26 Apr 2006


    Summer Hacking

    by Miguel de Icaza

    This summer Google is sponsoring a number of open source projects with their Summer of Code 2006.

    Last year Mono had a great success: a lot of fresh code was contributed and many of the students that participated in the effort continue to be contributors to the effort (see my previous comments about it).

    See our page with ideas for summer projects and feel free to email me if you have any questions (or reach me on irc.gnome.org, channel #mono).

    In addition to Mono, the Beagle Project is also being sponsored for the Summer of Code. They also have a great list of tasks to implement in the joyful world of C#.

    Posted on 24 Apr 2006


    Continuations for Mono

    by Miguel de Icaza

    Tomi Valkeinen has implemented continuations for the Mono virtual machine.

    His continuations work is here.

    Most of his tests are used for a user-level thread implementation he calls Microthreads.

    This looks like a very nice addition, and Paolo seems to like it too. In the past I abused C# iterators to get some of the benefits of continuations in Mono's ASP.NET (the HTTP processing pipeline).

    Posted on 19 Apr 2006


    Carl Bernstein on Senate Hearings

    by Miguel de Icaza

    Carl Bernstein, one of the reporters that triggered the fall of Nixon, calls for senate hearings on the Cheney administration.

    Most of what we have learned about the reality of this administration--and the disconcerting mind-set and decision-making process of President Bush himself--has come not from the White House or the Pentagon or the Department of Homeland Security or the Treasury Department, but from insider accounts by disaffected members of the administration after their departure, and from distinguished journalists, and, in the case of a skeletal but hugely significant body of information, from a special prosecutor. And also, of late, from an aide-de-camp to the British prime minister. Almost invariably, their accounts have revealed what the president and those serving him have deliberately concealed [...]

    Posted on 19 Apr 2006


    Mono Optimizations Enabled

    by Miguel de Icaza

    Alp just noticed this commit to Mono:

    2006-04-19  Massimiliano Mantione  
    
            * mini.c: Disabled inline where it can alter the call stack in a
            way visible from managed code.
    
            * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
            default.
    
    

    And was wondering why we did not make more noise about it.

    The story is that the actual new optimizations shipped in 1.1.14, but inlining had some negative side effects that broke some applications (for instance, if we inlined a method that used System.Reflection.Assembly.GetCallingAssembly() you would get the wrong assembly.

    The other problem that we found was related to the order in which classes were initialized when no static constructor was defined (for the full gory details, you can read this).

    The first issue has been fixed (the inliner was too happy inlining). We have solved the known instances of static constructor initialization, but inlining might expose some of these problems, hopefully they should be resolved by the time we ship 1.1.16.

    Posted on 19 Apr 2006


    Another Winforms Update

    by Miguel de Icaza

    Simon shows his Nexxia application running on Linux with Mono in this video. Check it out here.

    Posted on 17 Apr 2006


    Billmon is Back

    by Miguel de Icaza

    After a few months of no updates at Billmon.org he is back with each piece better than the previous one.

    His analysis on Iran and related events, priceless.

    New Billmon expression of the day: "neocons and their pet rocks". I love that expression in so many different levels.

    Posted on 15 Apr 2006


    Google's Summer of Code and Mono

    by Miguel de Icaza

    Today Zoltan pointed me to blog entry on Mozilla's experience with the Google summer of code.

    A long story short: all the projects funded in the Mozilla group that were completed have not shown any signs of movement since the SoC was over. Read the post for more details.

    At Mono we had a very different experience. There were sixteen projects funded:

    • Jaen Saul: Ruby.NET implementation
    • Jb Evain: Cecil/Write support
    • Jeyasankar Kottalam: GCC CIL backend
    • Marek Sieradzki: MSBuild implementation
    • Michael Hutchinson: ASP.NET GUI Designer
    • Aaron Tomb: Bug finder
    • Blagovest Dachev: ASP.NET GUI Designer
    • Hans Hesse: Managed C++ front-end
    • Iain McCoy: XAML compiler
    • Michael Dominic: Diva Video Editor
    • Raphael Romeikat: PHP Compiler for .NET
    • Dmitry Bobrovsky: XSLT Compiler
    • Mario Sopena Novales: Monodoc improvements
    • Pedro Martínez Julia: Windows.Forms 2 controls
    • Tino Morenz: QNX Port
    • Florian Groß: JScript improvements (originally Ruby.NET)

    From this list, we had:

    • 3 projects never completed (QNX, CIL C++ extensions, XSLT compiler).
    • 2 projects half-done, and the resulting code is not very useful (Ruby.NET and GCC CIL).
    • 11 projects that were completed to our satisfaction (Cecil/write support, MSBuild implementation, ASP.NET GUI designer, bug finder, XAML Compiler, Diva Video Editor, PHP Compiler for .NET, Monodoc improvements, Windows.Forms' DataGridView and JScript class library implementation).

    We had two medium-sized projects that required two students to work on the project: Ruby.NET and the ASP.NET GUI editor.

    We originally had two students working on Ruby.NET: the runtime and the compiler, but we reassigned the runtime student (Florian)to work on JScript runtime support while the compiler student (Jaen) worked on the core.

    Sadly, the compiler guy was not able to finish on time so Ruby.NET was not completed. But at least we got the JScript class libraries upgraded and integrated into Mono's build system.

    In the case of the ASP.NET GUI editor, the project was a success. Blagovest did most of the Mozilla-side work to turn Mozilla into an ASP.NET editor, and Michael did the Gtk# host and all o fthe integration. We have not heard much from Blagovest since the SoC finished, but Michael continues to be involved in the ASP.NET GUI editor, and has been become a contributor to the MonoDevelop IDE effort.

    Only recently, with the upgrades to MonoDevelop's architecture, we have started to look into hosting the ASP.NET editor into MonoDevelop itself. Chris Toshok has started this integration and will be devoting more time to it in the next few weeks.

    Marek completed the required tasks for an MSBuild implementation, he went back to school but came back to the project and leads the effort to complement the work that he did over the summer.

    Marek is now working with other Mono developers to improve his implementation. He is a regular in the development channels.

    JB Evain did complete the Cecil Write Support project. Cecil, a CIL image manipulation library, has been finding more and more uses in the Mono world. A few companies are using it (Mainsoft, DB4O) as well as the Mono Project for implementing various tools (Gendarme, our permission viewer.

    JB continues to be involved today in Cecil and the Mono project.

    Aaron Tomb implemented a bug finder based on Cecil during the summer. The bug finder looks at compiled code and looks for programming mistakes patterns in this code and reports it to end users.

    Aaron completed his project, and after the summer he integrated his code into the general-purpose Gendarme tool for tracking other problems in applications. Aaron continues to submit improvements to Gendarme.

    Iain McCoy completed the XAML Compiler during the summer and also wrote tests for ensuring that it worked. His code has been integrated into the main Mono class libraries and we hope to put it to use soon.

    Michael Dominic's Diva Video Editor is one of the most polished GUI applications I have seen. Michael continued to work on it after the summer, and thanks to Chris DiBonna at Google, Google continues to fund the work of Michael on the Diva editor. He recently released version 0.1 of Diva.

    Raphael completed the pieces he promised to complete on his PHP Compiler by the end of the summer of code. Raphael had structured the work on the compiler in three stages. He had commited to complete the first stage by the end of the summer.

    He was away for a while working on school projects, but he returned recently and published a 0.2 version of his PHP compiler. This second release implemented the second stage of features he had planned for. We hope to see Raphael complete his work on the third stage as it would make for a great way of running PHP and Mono code side-by-side.

    I personally would like to see the PHP community get involved in testing the compiler and improving the compiler as it would give a nice performance boost to all PHP applications and would be done in a completely open source stack.

    Mario Sopena did many updates to Monodoc, and all of those were eventually integrated into the main Monodoc. He switched the engine to use Mozilla, moved from plain HTML to CSS-based rendering and implemented many other pending tasks in Monodoc. Mario remained involved in Mono for a number of months in Mono and continued to contrinute. He recently got a job and his contributions declined.

    Pedro Martinez implemented the DataGridView control for Windows.Forms. This work was in a way ahead of its time, as his code was a 2.0 API contribution and our Windows.Forms is not yet 2.0 compatible. Pedro did a few code cleanups and improvements to the code after the summer was over, and helped us get the code in shape for integration into Mono's class libraries. But we have not heard much from Pedro since.

    In Summary

    We got lucky with the summer of code compared to Mozilla.

    Many of the students delivered code that we were able to use (11 out of 16) and many of these students continue to be involved in Mono after the Summer of Code was completed (6 out of 11).

    Am not sure I can pinpoint why we had more success with our summer of code projects than Mozilla did, but a few things might have helped.

    One possibility is that much of the work got integrated into a larger vessel (class libraries or other tools). The larger vessel exposed the code to more people, and ensured that it did suffer bitrot.

    Another possibility is that in the Mono case we listed projects that we needed external help with. We had identified things that we needed in advance and were looking for developers that would like to work on them.

    I personally, could not be happier with the results: code delivered, integrated and continued involvement in the project.

    On the downside, I wish we had been able to capture the other five students into continued involvement in Mono after the summer.

    Posted on 13 Apr 2006


    Region Operations in GDI+

    by Miguel de Icaza

    Sebastien has checked into SVN to both the GDI+ and System.Drawing modules an implementation of the binary operations on non-rectangular regions.

    For a long time Mono's System.Drawing API stack could only do binary operations on rectangular regions (ANDing two regions, ORing two regions, XORing two regions). With Sebastien's commits it is now possible to use these operations with regions created from any GraphicsPath object.

    These operations are used by many graphics controls and advanced graphics applications. So this is a pretty important step for Mono.

    His summary post is here (includes links to screenshots).

    Posted on 02 Apr 2006


    Links from the Monospace

    by Miguel de Icaza

    Aaron has a number of updates to Banshee:

    Idan does a screencast of MonoDevelop and Stetic. The new integration of Stetic into Gtk# projects introduces a slightly different model than Glade. See his blog post and videos for details.

    Massi has some graphs about the tuning work he has been doing on Mono's JIT.

    Brainshare closing thoughts:

    Posted on 28 Mar 2006


    Diva Progress

    by Miguel de Icaza

    Michael Dominik updates about the status of DIVA, a movie editing software for Linux with an impressive user interface here

    Diva Editor

    Diva is built using GStreamer, Gtk# and various Cairo-based widgets.

    Make sure you watch the videos of Diva in action.

    I love the Gtk# family of media applications: Banshee, Diva and F-Spot.

    Posted on 27 Mar 2006


    A New Acronym

    by Miguel de Icaza

    Last year we got "AJAX" for "Asynchronous JavaScript and XML".

    This year, we get "CRAP", which stands for: "Content, Restriction, Annulment and Protection" a much better description for the euphemistical "DRM".

    The expression was coined by David Berlind, executive Editor for ZDNet, see the details here:

    CRAP stands for Content, Restriction, Annulment and Protection. It's my catchy buzz-phrase for a technology that's really called DRM. Now DRM technically stands for Digital Rights Management, and it's a rather cancerous technology that technology vendors are actually building into most of the products that we're buying today.

    So for example, if you own an iPod, it's got CRAP in it. That's right, it's got this technology that will restrict what you can do with your content, allows the owners of the content to annul that content-in other words, take it away from you-or protect it from being copied out onto the internet.

    And there is a video too: here.

    A must-read.

    Posted on 27 Mar 2006


    Paco on Novell Open Audio

    by Miguel de Icaza

    Ted at Novell Open Audio interviews Paco who has been volunteering at the Mono booth at Brainshare.

    The mp3 is here.

    Paco, who today does a lot of work on Mono on Win32, talks about how he got involved in the effort and the extra bits in Mono.

    Posted on 24 Mar 2006


    Mono's Windows.Forms Progress

    by Miguel de Icaza

    Windows.Forms is approaching feature completeness in Mono. In the next few weeks we will be doing the first beta release of Mono for our target Mono 1.2.

    Although most of the API coverage was done a few months ago, the semantics of it were not exactly perfect. We were lucky to be able to tap into a large body of open source software for Windows.Forms to test and bug fix Mono's implementation.

    More recently, as Winforms has become more complete we have started work in running proprietary or commercial applications to run in Mono.

    Simon for instance built a VoIP messenger based on Jabber (Nexxia) and has been working for the past few months with us to ensure that it works in Mono.

    He has blogged a set of screenshots tracking the progress from the December to this date, here are the first and last screenshot from his blog:

    Nexxia in December.

    Nexxia running on Mono today.

    Check out his blog for more information.

    Posted on 23 Mar 2006


    Brainshare, Winforms, MonoDevelop.

    by Miguel de Icaza

    Paco has been hanging out at the Mono booth at Brainshare And he reports from the event:

    It has been terrific to see folks from all walks of life approach the booth and come carrying the applications that they are currently working on contained in an USB keydrive and having us run it on the different platforms. To most of them, they tend to be very dazzled when they see their WinForms projects run on Linux (SLED 10) often without modification. Some of the apps they have come talk about range from GroupWare clients, Decision Support Systems (DSS), Enterprise Information Systems (EIS) front ends (some web based others SmartClients), etc.

    Paco, an attendee and Wade in the Mono Booth.

    A journalist asked Nat whether Mono would run OpenDental.Net, an open source Winforms-based application for dentists. Nat SMSesed me the question, I downloaded the software, took a quick glance at what is needed (it will require replacing some Windows libraries with some Unix-specific libraries and renaming a few files to make bash happy for building on Linux):

    I emailed Jordan Sparks, Doctor of Dental Medicine and developer of OpenDental and asked him whether he could make the filesystem layout changes to ease the porting effort, and got a reply back from him that same night. In his words:

    I'm really a HUGE fan of what you guys are doing. It's going to change dental offices forever, and it will impact a lot of people.

    My plan is to assist Mr Jordan porting his OpenDental software to Linux. As I mentioned, it will require swapping out a few Windows components he is using for the equivalent Linux libraries. It will be educational. This along with the PaintDot.Net porting effort should be provide some good material for a .NET to Mono migration white paper.

    In general, porting from .NET on Windows to Mono on Linux has the same feel of porting across different versions of Unix in the past. From BSD to SystemV: replace a few libraries and routines with different versions. It is a relatively simple exercise.

    I find this very interesting. On of my dentists is also a hacker on his spare time, and runs his office completely on software he has developed using Visual Basic. On one of the visits I made to his office, as I was being treated, he explained to me with excitement why he liked working on VB: the software that runs his whole office is something he has built over the years. He does a lot of the coding himself, but he loves to spice up his application by purchasing a third party control for displaying graphs, managing his x-ray images and track patients.

    This is the kind of ease of use that we are trying to achieve with Mono and MonoDevelop. Lower the barrier for creating amazing applications on Linux.

    MonoDevelop

    MonoDevelop was originally a project that was developed by Mono users. Folks that wanted to have an IDE on Linux, so they ported various pieces of SharpDevelop to Linux and replaced Windows.Forms with our own toolkit Gtk#. The goal here was to create a truly native Linux application and to take advantage of Linux and GNOME specific features.

    DogFooding MonoDevelop: using MonoDevelop to develop MonoDevelop.

    As time passed on, our own engineers started using MonoDevelop. Lluis, better known for his work on remoting and web services, started using MonoDevelop to work on Mono itself. He developed a plugin that would allow him to build and develop the Mono runtime right in MonoDevelop.

    Around that time we decided that we should invest in MonoDevelop as part of the efforts of the Mono team, for a few reasons:

    • It was a great test of Mono and Gtk#
    • Many thought that without an IDE, the full potential of Mono would not be realized.
    • We needed a place to integrate developer tools that we had created and that we have planned (most based on Gtk#):
      • Stetic, our Gtk# GUI designer, originally developed by Dan Winship.
      • MonoDoc: although it is available as a standalone tool, it makes sense to have it integrated directly into the IDE.
      • The ASP.NET web page editor developed by Michael Hutchinson the part summer.
      • The Gendarme, bug-finding and sanity-checking tool, developed by Aaron Tomb and Sebastien Pouliot (currently lacking a GUI).
      • Integrate the Mono Debugger, which sports a C# interface.
      • NUnit integration: full with progress charts.

    Until December, we were using Glade-3 for our GUI design needs. At that point we went with Glade-3 as a short-term solution and because we felt it was complete enough to be a drop-in technology into MonoDevelop and had enough bits to allow it to be embedded.

    But we soon realized that for a full integration we would have to spend some significant developer time in getting it in shape for integration into MonoDevelop. So we changed our plans and Lluis started working on integrating Stetic and finishing the missing bits in Stetic.

    The upcoming MonoDevelop will contain a new Stetic-based GUI designer. You can learn more on Lluis' blog entry.

    The Stetic integration is fantastic, these are some of the features I like:

      Custom Gtk# widgets that you develop appear on the toolbox palette, and you can use these widgets right into your main application if you want to. No placeholders anymore.

      A wizard for creating custom Gtk# widgets.

      Double-clicking on events for a widget will create a stub for the handler. For example, if you double click on a button, it will create the

      OnButton1Clicked method with its
      		proper arguments.
      		
      	

    MonoDevelop also went through a major refactoring effort, where the IDE features are all plugins. This is an idea inspired by Eclipse's implementation.

    A new release of Mono and MonoDevelop will be coming out in a few weeks with these features.

    In the meantime, Chris Toshok has started integrating Michael's ASP.NET editor into MonoDevelop. So we will have an IDE that can be used for doing smart client development as well as web applications all in one:

    Posted on 22 Mar 2006


    Novell's Linux Desktop Demo

    by Miguel de Icaza

    At the Press Conference at the Novell Brainshare event this week in Salt Lake City Nat presented the new developments on the Linux desktop that the team has been working on.

    A life walk-through of the new search-based desktop works with the usual: Xgl, F-Spot, Banshee, Beagle, Tomboy, hardware plug-and-play and the desktop integration in the upcoming OpenSUSE release.

    Check it out at here (Updated with the official presentation).

    Some of these were visible on the video from the LinuxSolutions in Paris, but this time the video is part of Novell's production so you can actually see the details.

    Posted on 21 Mar 2006


    Chomsky, on Asia and Latin America.

    by Miguel de Icaza

    Noam Chomsky:

    China, unlike Europe, refuses to be intimidated by Washington, a primary reason for the fear of China by US planners, which presents a dilemma: steps toward confrontation are inhibited by US corporate reliance on China as an export platform and growing market, as well as by China's financial reserves - reported to be approaching Japan's in scale.

    ...

    An additional step, already being contemplated, is an Asian oil market trading in euros. The impact on the international financial system and the balance of global power could be significant. It should be no surprise that President Bush paid a recent visit to try to keep India in the fold, offering nuclear cooperation and other inducements as a lure.

    On Venezuela:

    Venezuela, the leading oil exporter in the hemisphere, has forged probably the closest relations with China of any Latin American country, and is planning to sell increasing amounts of oil to China as part of its effort to reduce dependence on the openly hostile US government.

    Venezuela has joined Mercosur, the South American customs union - a move described by Nestor Kirchner, the Argentinian president, as "a milestone" in the development of this trading bloc, and welcomed as a "new chapter in our integration" by Luiz Inacio Lula da Silva, the Brazilian president.

    Venezuela, apart from supplying Argentina with fuel oil, bought almost a third of Argentinian debt issued in 2005, one element of a region-wide effort to free the countries from the controls of the IMF after two decades of disastrous conformity to the rules imposed by the US-dominated international financial institutions.

    (Emphasis added).

    Interesting bits about Cuba and Venezuela as well:

    Cuba-Venezuela relations are becoming ever closer, each relying on its comparative advantage. Venezuela is providing low-cost oil, while in return Cuba organises literacy and health programmes, sending thousands of highly skilled professionals, teachers and doctors, who work in the poorest and most neglected areas, as they do elsewhere in the third world.

    "Cuba has provided the largest contingent of doctors and paramedics to Pakistan," paying all the costs (perhaps with Venezuelan funding), writes John Cherian in India's Frontline magazine, citing Dawn, a leading Pakistan daily.

    President Pervez Musharraf of Pakistan expressed his "deep gratitude" to Fidel Castro for the "spirit and compassion" of the Cuban medical teams - reported to comprise more than 1,000 trained personnel, 44% of them women, who remained to work in remote mountain villages, "living in tents in freezing weather and in an alien culture", after western aid teams had been withdrawn.

    On a separate note, the trend is for Mexico to elect the progressive candidate in the upcoming elections.

    Posted on 16 Mar 2006


    George Clooney

    by Miguel de Icaza

    George Clooney's I Am a Liberal. There, I Said It!:

    That's one of the things that drew me to making a film about Murrow. When you hear Murrow say, "We mustn't confuse dissent with disloyalty" and "We can't defend freedom at home by deserting it at home," it's like he's commenting on today's headlines.

    The fear of being criticized can be paralyzing. Just look at the way so many Democrats caved in the run up to the war. In 2003, a lot of us were saying, where is the link between Saddam and bin Laden? What does Iraq have to do with 9/11? We knew it was bullshit. Which is why it drives me crazy to hear all these Democrats saying, "We were misled." It makes me want to shout, "Fuck you, you weren't misled. You were afraid of being called unpatriotic."

    Posted on 13 Mar 2006


    Pictures from the Sorbonne Strike

    by Miguel de Icaza

    Pictures from the student strike in Paris that took over the Sorbonne University.

    Posted on 12 Mar 2006


    Novell's Linux Desktop Preview

    by Miguel de Icaza

    Alex today pointed me to some screenshots of the upcoming Novell Linux Desktop, they are here.

    Posted on 09 Mar 2006


    RSS Patents from Apple

    by Miguel de Icaza

    Dave Winer points to a couple of Apple patents:

    Apple is patenting our inventions, again. Oy. 

    Jens Alfke, one of Apple's "inventors" stopped by to explain how there's no real generosity in the tech business. I can see where he might get that idea, working where he does.

    There is an interesting discussion on Dave's site.

    If this is the kind of thing that passes as a patentable invention nowadays, we must get ready for a few very dull years in the technology scene.

    Posted on 08 Mar 2006


    AppArmor

    by Miguel de Icaza

    Joe posted an enthusiastic description of AppArmor: a Novell technology that uses the Linux security infrastructure to improve the security of your system. Novell originally acquired this proprietary product last year and included it with OpenSUSE and open sourced the effort.

    Joe links to a recent presentation at FOSDEM which is worth watching as it explains how AppArmor works and demostrates how you can augment the rules in AppArmor for your own applications and how you can secure a web site.

    I once got the demo live, and it was fairly impressive as I was given a root shell, but was basically unable to escape the "sandbox" that AppArmor had created.

    Both AppArmor and SELinux use the same kernel infrastructure to create the sandbox. From the AppArmor FAQ I liked this explanation:

    SELinux is an implementation of mandatory access controls that uses labeled security, ie, the application of a tag to each data file that identifies that file's appropriate security level. Labeled security has advantages in organizations where secrecy is paramount, that is, ensuring that only those authorized at appropriate clearance levels can view a given piece of data. The labels allow the operating system to handle data with appropriate controls, eliminating the need to store the information on multiple computers of varying security levels. Although this feature has value to organizations such as intelligence agencies whose main goal is to keep secret information secret, it introduces a significant level of complexity and has limited value to most commercial enterprises whose primary objective is data integrity, ie, preventing the corruption of data.

    The FAQ goes into a larger comparison with SELinux if you are interested in that.

    Posted on 07 Mar 2006


    Using Visual Studio to develop with Mono

    by Miguel de Icaza

    If you are interested in developing with Mono using Visual Studio, there are a number of tools that Francisco Martinez has developed to make your experience smoother.

    He created a few screencasts and a general introduction on his blog:

    • The Installing VSPrjMake screencast shows how you install the Visual Studio add-in.
    • In this screencast he shows how to test your Windows.Forms application with the Mono runtime using Visual Studio.
    • In this one he shows how to test an ASP.NET application with Mono from Visual Studio.

    Today for the first time I had the chance to play with these on Paco's laptop (he is visiting the Cambridge office this week). He also has developed a tool to choose which Mono runtime to use. The tool is useful for Mono power-users on Windows (you can watch your app work better with new versions of Mono as you go; Or you can track regressions in Mono).

    In his blog entry, he has other screencasts showing how to run the same application with different runtimes (.NET CLR and Mono). Check it out.

    Pretty much these tools do most of what we had discussed in the past in terms of Visual Studio and Mono integration.

    The next step would be to integrate this with a VMWare player with a OpenSUSE OS image to have all the Mono development tools and test applications directly from Visual Studio into the VMware image.

    Posted on 25 Feb 2006


    Infocard

    by Miguel de Icaza

    We have been exploring for some time the new Infocard identity framework from Microsoft. If you are interested in this new identity system being developed, check the Microsoft web site here.

    Thanks go to Mike Shaver for getting us in touch with Kim Cameron and Mike Jones:

    Kim:

    The Zen of this is that we cant change it by ourselves. Microsoft can be part of that.

    Posted on 23 Feb 2006


    Follow up to Chris

    by Miguel de Icaza

    Chris points out in his blog entry that Xgl is a lot of work:

    [...] The big thing about the AIGLX approach is that it's incremental. The path to get from here to there allows us to leverage the strengths we have, allow people to participate as their hardware allows and work iteratively with vendors to add support to cards. Simply put, AIGLX presents us with a hill instead of a cliff. That's the big difference.

    But it is not an academic discussion anymore about the complexity of getting from here to there. We are already there, and the code is already on CVS and we have already climbed the most difficult part of the cliff.

    Anyways, Chrisl, what about addressing the comments on the Fedora Wiki to reflect David's comments? There is a link added, but there were no "architectural" changes developed in private.

    Anyways, more power to the Red Hat folks with AIGLX, am sure we will have a combination of both in various machines and am just happy to be able to use both depending on the hardware I have available at my disposal.

    Posted on 23 Feb 2006


    Port Security

    by Miguel de Icaza

    Dave Winer observations are interesting:

    I love the political storm President Bush is caught in over the UAE port managers, because it is totally unfair, as he says it is. Of course they're perfectly qualified to manage the ports. They're not terrorists. They employ Americans. There's no extra risk. I love it because it's exactly the kind of dirty trick Bush uses, the same kind of dumb emotional illogic, and like his opponents he's left stammering like an idiot, caught in the headlights, explaining how it's not really an issue. It's the Swift Boat logic turned back at the master. It's as if Karl Rove was working for the Dems. I love it because it's funny and it's justice.

    Posted on 23 Feb 2006


    PHP.NET Compiler

    by Miguel de Icaza

    Raffa was funded by Google during the Summer of Code. He implemented a PHP compiler for Mono and .NET. After a small pause, he has resumed work on his compiler and has now started a blog here:

    Other .NET assemblies can now be accessed directly from within PHP scripts. Like that you can i.e. build GUIs with PHP using the Gnome libraries. I've already created two interesting examples including events and Drag&Drop features. You can import namespaces and types from other .NET assemblies with a spcial "using" syntax similar to the one known from C#. After doing so the imported types are avialable in the same way as classes implemented in PHP.

    Posted on 23 Feb 2006


    Novell Linux Desktop Updates Blog

    by Miguel de Icaza

    I just found out about Moosy a blog on Novell Linux Desktop-centric happenings.

    I believe its someone at Novell, but I could not find any contact info.

    Posted on 23 Feb 2006


    The Dave Reveman Files: Xgl and AIGLX

    by Miguel de Icaza

    David Reveman, has posted his thoughts on the Xgl/Aiglx debate here:

    One of the points that I particularly like is:

    An important goal with X on OpenGL is to make it easier for X to keep up with the advances in graphics hardware. Eliminating the custom 2D acceleration code will reduce the development burden and make this easier. This can probably be achieved through AIGLX as well, I know that the people working on AIGLX have discussed putting some of the acceleration code I have in Xgl inside Xorg with AIGLX and that would be a step in that direction. However, I strongly believe that going all the way to an X server completely on top of the OpenGL API is the best solution in the long run.

    In particular I like his comments on the criticisms of Xgl, they all boil down to "It is a lot of work":

    I think the arguments made by nvidia to why X on OpenGL would be worse than the current driver architecture can be debated on until forever. I think it all boils down to if we want put some more effort to it and take the big scary step to something new or if we want to stick to the old well known. Not too surprising, we have people who are in favor of both and we'll likely have development being done on both, which I don't think is that bad after all.

    So far I haven't heard a single argument for why X on OpenGL is a a bad idea other than that it's a big step and a lot of work will have to be done. If that would stop me from working on Xgl, I wouldn't have started working on it in the first place.

    Finally, David sets the record straight on the Xgl development, to refute the claims made on the Fedora page:

    "We've been working on the AIGLX code for a some time with the community, which is in direct contrast with the way that XGL was developed. XGL spent the last few months of its development behind closed doors and was dropped on the community as a finished solution. Unfortunately, it wasn't peer reviewed during its development process, and its architecture doesn't sit well with a lot of people."

    I've been developing Xgl in the open since November 2004. Only the last few months have been behind closed doors. I can agree that this wasn't the best thing but no architectural changes have been made during this period, just a lot of hard work implementing missing functionality, tracking down and fixing bugs in xgl and various other places in the x server tree. We didn't drop a finished solution, we dropped a much improved version, that's all.

    Anyways, more details are on David's post

    Posted on 23 Feb 2006


    Novell's Open Audio Podcast, part 2

    by Miguel de Icaza

    Ted has posted some updates on Open Audio: Ogg formats are comming, he discusses high/medium qualities, why they chose the format they did and the music they use. His post is: Next Steps for Novell Open Audio.

    Posted on 23 Feb 2006


    Novell starts Podcasting

    by Miguel de Icaza

    Novell has started a podcasting show.

    On the first show they talk with Brady Anderson and Calvin Gaisford from the iFolder.

    Since iFolder is built on top of Mono, you should listen to this right away.

    Posted on 22 Feb 2006


    Linux World México

    by Miguel de Icaza

    I am in México this week for Linux World.

    My keynote is open to the public on Thursday at 4pm.

    Posted on 15 Feb 2006


    Your Politics Update

    by Miguel de Icaza

    I ran into this article from conservative Paul Craig Roberts. Despite the growing excuses, I believe it spells out a few interesting bits.

    Americans have forgotten what it takes to remain free. Instead, every ideology, every group is determined to use government to advance its agenda. As the government's power grows, the people are eclipsed.

    We have reached a point where the Bush administration is determined to totally eclipse the people. Bewitched by neoconservatives and lustful for power, the Bush administration and the Republican Party are aligning themselves firmly against the American people. Their first victims, of course, were the true conservatives. Having eliminated internal opposition, the Bush administration is now using blackmail obtained through illegal spying on American citizens to silence the media and the opposition party.

    [...]

    Before flinching at my assertion of blackmail, ask yourself why President Bush refuses to obey the Foreign Intelligence Surveillance Act. The purpose of the FISA court is to ensure that administrations do not spy for partisan political reasons. The warrant requirement is to ensure that a panel of independent federal judges hears a legitimate reason for the spying, thus protecting a president from the temptation to abuse the powers of government. The only reason for the Bush administration to evade the court is that the Bush administration had no legitimate reasons for its spying. This should be obvious even to a naif.

    The years of illegal spying have given the Bush administration power over the media and the opposition. Journalists and Democratic politicians don't want to have their adulterous affairs broadcast over television or to see their favorite online porn sites revealed in headlines in the local press with their names attached. Only people willing to risk such disclosures can stand up for the country.

    (Emphasis added)

    In particular I like his point about the no-fly list. It always felt dumb to have the no-fly list in the first place and all of the side effects we have heard from it are the result of this dumbness. Maybe it was naivete on my part, but this makes sense:

    Consider the no-fly list. This list has no purpose whatsoever but to harass and disrupt the livelihoods of Bush's critics. If a known terrorist were to show up at check-in, he would be arrested and taken into custody, not told that he could not fly. What sense does it make to tell someone who is not subject to arrest and who has cleared screening that he or she cannot fly? How is this person any more dangerous than any other passenger?

    This is priceless:

    If Senator Ted Kennedy, a famous senator with two martyred brothers, can be put on a no-fly list, as he was for several weeks, anyone can be put on the list. The list has no accountability. People on the list cannot even find out why they are on the list. There is no recourse, no procedure for correcting mistakes.

    I am certain that there are more Bush critics on the list than there are terrorists. According to reports, the list now comprises 80,000 names! This number must greatly dwarf the total number of terrorists in the world and certainly the number of known terrorists.

    He has a follow up article, on the State of The Union, focusing in particular on the economy bits here.

    On that note, Bilmes and Stiglitz claim that the actual cost of the Iraq war will end up being between one and two trillion dollars.

    In the meantime there is a Sundance short that makes fun at the actual state of the economy. I found it entertaining, but it might not be appreciated by everyone (sorry, requires an updated Flash): here.

    Update: Robert's second article goes well with the previous video link:

    [...] The US trade deficit in ATP now exceeds the US surplus in Intellectual Property licenses and fees. The US no longer earns enough from high tech to cover any part of its import bill for oil, autos, or clothing.

    This is an astonishing development. The US "superpower" is dependent on China for advanced technology products and is dependent on Asia to finance its massive deficits and foreign wars. In view of the rapid collapse of US economic potential, my prediction in January 2004 that the US would be a third world economy in 20 years was optimistic. Another five years like the last, and little will be left.

    Posted on 13 Feb 2006


    Mono on SkyOS

    by Miguel de Icaza

    Robert, from SkyOS, ported Mono to SkyOS.

    On a separate post he talks about challenges he had in porting Mono to SkyOS. In the end he basically implemented the pthreads API that Mono expects, completed some kernel calls and got signals to behave like Posix signals.

    The post is interesting for those considering porting Mono to non-POSIX platforms.

    Xgl resources

    For those of you which are interested in getting Xgl running on your hardware, check the OpenSUSE Xgl and the Compiz wiki pages for the details.

    As I mentioned on the previous post compiz is a new window and compositing manager that must be used instead of your current window manager to get the most out of Xgl.

    One of the interesting bits about David's compiz architecture is that the actual decoration for you windows has been moved out of the window manager into a separate process. Today there is one decorator implemented gnome-window-decorator, but hopefully more will come in the future.

    apt-get on OpenSuse

    I am not an apt-get user, but some of my friends are. Yesterday I found out that OpenSUSE (and SUSE) ship with apt-get, and that they can do their apt-getty-related-program-activities in SUSE just fine.

    That being said, I am a Red Carpet/ZLM kind of guy (specially considering that the new ZenWorks client is implemented in, surprise surprise, Mono).

    Posted on 09 Feb 2006


    Imeem Interviewed at the Mac Market

    by Miguel de Icaza

    The Imeem founders, Jan and Dalton, were interviewed in Apple's Business Mac Market.

    "With Mono" says Jan, "we have a low-cost server environment where everything but the UI for the two clients is the same C# code. Then we can use Visual Studio to create a DLL for the Windows client; and Cocoa, Objective C, and Interface Builder for the Mac client. We think we're the first company to create a cross-platform product with this approach."

    They talk about Dumbarton, a framework that they built to create applications that mix Cocoa and Mono.

    Thanks to Zac for the link.

    Posted on 09 Feb 2006


    From our Upcoming Album

    by Miguel de Icaza

    This picture was taken during our practice sessions for our upcoming Album "Adventures of a Spaniard in Boston", featuring the song "Gonzalo":

    Miguel de Icaza and Alan Aspuru Practicing.

    Posted on 08 Feb 2006


    Url me

    by Miguel de Icaza


    Nat Friedman: what a beautiful mail danw just sent
    Nat Friedman: they should teach from that mail in software classes
    Miguel de Icaza: Url me
    Nat Friedman: http://mail.gnome.org/archives/desktop-devel-list/2006-February/msg00115.html

    Nat followed up here.

    Oh, and here is a picture of Dan:

    Dan

    Oh, and one of Nat:

    Nat

    And this is what a fork looks like:

    Oh, and Jakub has a nice XGL Logo.

    Update: Alternative link to Dan's post is here.

    Posted on 07 Feb 2006


    Xgl

    by Miguel de Icaza

    Today Novell announced the release of Xgl and Compiz, the new window manager/composition manager to go with it. Novell has the release details here.

    Videos of Xgl in action:

    1. True transparency .mpg (12MB)| .ogg (3.7MB) | streaming flash
    2. Zoom .mpg (8.5MB) | streaming flash
    3. Desktop Organization .mpg (16MB) | .ogg (5.7MB) | streaming flash
    4. Spinning Cube .mpg (16MB) | .ogg (7.1MB) | streaming flash

    Stephen at CNet puts it in context in his Novell seeks to boost Linux graphics article.

    Compiz is a new joint window manager and composition manager. David Reveman had to merge these into a single process to provide the kind of functionality that we wanted on the desktop.

    Compiz has a plugin framework, many of the visual effects are implemented by independent plugins. We hope to see numerous plugins for new effects that plug into the existing window manager.

    Now, the actual decoration rendering was split out into a separate process. Today Compiz has its own internal rendering of the window decorations which uses Cairo and an alpha channel to render its decorations.

    But someone could write a Gnome/Metacity decoration renderer or a KDE decoration rendered. Both would allow existing window manager themes to integrate with Compiz.

    Xgl has already been checked into the public repositories, Compiz will be checked in after David Reveman's presentation at the X conference.

    Check the Novell page for details on downloading the software.

    Posted on 07 Feb 2006


    Mono in LinuxAsia 2006

    by Miguel de Icaza

    Hari, which is in charge of Mono's C# compiler, will be representing Mono at LinuxAsia 2006 in New Delhi. He will do a few talks and will also be at the Novell booth.

    Posted on 07 Feb 2006


    Fon

    by Miguel de Icaza

    The company where my friend Juantom�s works just got funded by Skype and Google (18 million Euros).

    They are pitching an interesting way of providing WiFi access everywhere by having people donate their bandwidth. See what they are doing.

    Posted on 06 Feb 2006


    XMLmark and Mono Performance Improvements

    by Miguel de Icaza

    Atsushi has posted the result from his optimization week running the XMLmark benchmark. Very good results for a week of work, the graphs show transactions per second and the Mono revision number:

    DOM performance plot SAX performance plot

    See his post for all the details on this work.

    Windows.Forms updates

    Peter has posted an update to the Mono Windows Forms blog on their current work here.

    Sebastien posted some nice screenshots of the new region code in libgdiplus:

     

    See his blog for further discussion.

    Mono on MacOSX/Intel

    Geoff has been working on porting Mono to OSX/Intel, his progres report as well as the testing DMG are here.

    Packaging

    For the upcoming versions of Mono, we will be splitting the gtk-sharp packages to reduce the dependencies that a given application needs.

    So if you just use Gtk+ your application will not pull all the Gnome stack to run.

    Posted on 03 Feb 2006


    I love Jackson

    by Miguel de Icaza

    From #mono-winforms IRC channel today:

    <jackson> man at what point in your life do you start bootlegging OS videos.

    Posted on 02 Feb 2006


    Mono Series from Addison Wesley

    by Miguel de Icaza

    Erik just announced that he is the series editor for a number of books on Mono for Addison Wesley.

    Posted on 01 Feb 2006


    Novell Linux Desktop Demo

    by Miguel de Icaza

    Nat is in Paris demoing the upcoming Novell Linux Desktop, PC world has a description of his talk.

    Posted on 01 Feb 2006


    C5 Generics Class Library

    by Miguel de Icaza

    Peter Sestoft released version 1.0 of his C5 generics library for C#, it is available here:

    C5 provides functionality and data structures not provided by the standard .Net System.Collections.Generic namespace, such as tree data structures, heap based priority queues and hash indexed array lists and linked lists, making it more comprehensive than collection class libraries on similar platforms, such as Java. Unlike many other collection class libraries, C5 is designed with a strict policy of supporting "code to interface not implementation".

    C5 is documented on his technical report and he also has the docs online.

    Mono bundles his old 0.5 library, we will be upgrading the library soon.

    Posted on 01 Feb 2006


    Microsoft Documentation Browser -- Help Needed

    by Miguel de Icaza

    When am browsing documentation for an API on the .NET Framework in the Microsoft Documentation Browser I get the signature for the method in a bunch of languages.

    I typically only care about the C# signature, I really do not care about the other five languages. Now, when I turn them off with the "Language Filter: " to only show C# that works fine as long as I do not try to read another page. As soon as I switch to a different API the filter is reset and shows "All" again.

    I tried Googling for an answer. I even tried search-dot-msn-dot-com-ing it, but I could not find any way of forcing the doc browser to keep it funky.

    Posted on 30 Jan 2006


    Mono ships on Nexenta, OpenSolaris-based OS

    by Miguel de Icaza

    As the subject says, Mono, Beagle and F-Spot are now included in the second beta of Nexenta.

    Nexenta is an operating system built on top of the OpenSolaris core and the Debian userland.

    Beagle is the Mono-based desktop search that we implemented at Novell (similar in spirit to Google Desktop search or Apple's spotlight).

    F-Spot is our personal photo management software.

    This is great, and we look forward to help the Nexenta developers with any issues they might have with Mono on OpenSolaris.

    Although to reach magnificent-hack status we still need Sun and Apple to ship Mono.

    Video

    Oh, and if you have not seen the video from the previous blog entry, you should.

    Posted on 30 Jan 2006


    Funny Video

    by Miguel de Icaza

    This video is too funny.

    Gobble, gobble.

    Posted on 30 Jan 2006


    Updated Amendments

    by Miguel de Icaza

    The Jesus General proposes some updates to the amendments.

    The comments section has some great suggestions as well.

    Posted on 28 Jan 2006


    Tuning Code Generation

    by Miguel de Icaza

    The Mono team is working on a number of directions to improve code generation. Although Massi has worked on a number of advanced optimizations to improve code generation (based on SSA and HSSA), the improvements were dominated by problems on the register allocation.

    We are working in two directions to fix this issue. A long-term fix is the new linear IR representation which Zoltan is working on. This code today is available in the mini-linear-il branch on SVN. The intention of this new IR is to improve the visibility of register usage to the register allocator, so it can make better choices when producing code.

    A second line of work emerged from our research into inlining. Turning on the Mono inliner produced worse code than not turning on the inlining at all (we have it turned off by default on Mono). The problem was that inlining produced plenty of local variables and the resulting IR became very hard to optimize by the higher layers of the JIT engine so Massimiliano devised a plan to eliminate these extra temporary variables.

    The details of this new optimization can be found on his mailing list post "Tree Mover".

    What follows are a few excerpts from the email. Consider this piece of C# code:

    	private int f;
    	
    	public int F {
    	        get {
    	                return f;
    	        }
    	        set {
    	                f = value;
    	        }
    	}
    	
    	static int Inline (int a) {
    	        return a * 4;
    	}
    	
    	public override int Cprop (int v) {
    	        return Inline (F + v);
    	}
    	

    The IR produced with the method "Cprop" is this:

    	 (outarg (ldind.i arg[0]))
    	 (stind.i4 local[2] call[get_F])
    	 (outarg (add (ldind.i4 local[2]) (ldind.i4 arg[1])))
    	 (setret call[Inline])
    	

    The problem happens when we inline the call to "Inline", which turns the IR into this:

    	 (stind.ref local[3] (ldind.i arg[0]))
    	 (stind.i4 local[2] (ldind.i4 (add (ldind.ref local[3]) iconst[8])))
    	 (stind.i4 local[4] (ldind.i4 local[2]))
    	 (stind.i4 local[6] (add (ldind.i4 local[4]) (ldind.i4 arg[1])))
    	 (stind.i4 local[5] (mul (ldind.i4 local[6]) iconst[4]))
    	 (stind.i4 local[4] (ldind.i4 local[5]))
    	 (setret (ldind.i4 local[4]))
    	

    The extra variables introduce the extra pressue on the register allocator, which today produces pretty bad code (see Massi's original post for the details).

    What Massi's new tree mover code does is remove the unused local variables from the previous representation:

    	 (setret (shl (add (ldind.i4 (add (ldind.ref arg[0]) iconst[8]))
    	 (ldind.i4 arg[1])) iconst[2]))
    	

    That is a much better tree to cope with in the code generation phase, and produces nice and compact assembly code.

    Read his post "Tree Mover" for details for the actual assembly code produced before and after and benchmark information.

    Posted on 24 Jan 2006


    New Blogger

    by Miguel de Icaza

    Ankit Jain which maintains the Mono IL assembler has started a blog here.

    He is currently working on adding generics support to our assembler and disassemblers and working on roundtripping the assemblies (the process of disassembling and reassembling the libraries and obtaining the same binaries).

    Posted on 17 Jan 2006


    MonoDevelop with Glade3 integration.

    by Miguel de Icaza

    Lluis blogs about his recent work to integrate the Glade-3 GUI designer into MonoDevelop.

    With his recent changes you can maintain your Glade-based UIs from within MonoDevelop: changing properties of widgets, manipulating your UI and the best bit is that whenever you add a new event handler it automatically adds the stub of code to the C# file.

    You can see a screenshot in his post.

    Posted on 15 Jan 2006


    Mono on Windows

    by Miguel de Icaza

    Mono supports a number of platforms, Windows included. For us, supporting Windows is important because it helps us debug our code, helps ensure that we are doing things portably, and is useful to test applications on Mono in Windows and contrast it with .NET on Windows.

    Today on the mono-list someone mentioned another use of Mono on Windows (as part of a bug report), which made my day:

    It's reasonable to ask why someone should be interested in running Mono on Windows when the original .NET is available. My reason is that Mono applications can be run without an install. .NET requires a lengthy installation (and a reboot with 1.1 SP) that many administrators (if not users) will not consider. Mono can be copied on (or even run from a memory stick).

    It is not every day that you run into reasons to run an open source implementation of a Microsoft standard on a Microsoft operating system.

    Mono on S390x

    In the mean time, in another side of the universe Neale completed the 64 bit port of Mono to the S390x. It is part of Mono 1.1.13.

    Banshee Update

    Aaron posted an update on his work on Banshee, the awesome Mono-based music player that ships with SUSE Linux.

    Imeem on Mac

    Congratulations to the Imeem folks for shipping their Imeem Client for OSX.

    Imeem is the second commercial Mono OSX application that ships.

    Posted on 11 Jan 2006


    Mono and Fedora

    by Miguel de Icaza

    I just woke up to the announcement over at Chris Blizzard's blog (from Planet Gnome) that Mono today was included in Rawhide, the staging area for the next release of Fedora Core.

    These are fantastic news for Mono users and developers everywhere and for Fedora users which will get both Mono and the various Mono-based applications that have been cooking.

    Am looking forward to work together with the Fedora folks.

    If you are a new Mono user, here are some useful links:

    • A directory of introductory topics to Mono.
    • Links our development plans, broken up by category. A good entry point into the Mono hacking universe.
    • Mono's Platform Support.
    • Gnome users will be interested in Gtk#: our binding to the GNOME platform libraries.
    • Documentation on Embedding Mono into your C application, to extend your application with Mono-based code.
    • Programming Languages that are supported by Mono. As your tour guide, I suggest you look into these tasty new languages: Boo, IronPython and Nemerle.
    • For those learning C# for the first time, I still strongly recommend the ECMA 334 specification: the first few chapters include a very well written tutorial.
    • Edd and Niels book remains a good introduction to Mono and GUI programming on Linux: Mono: A Developer's Notebook.

    Posted on 10 Jan 2006


    Persons of Interest Documentary

    by Miguel de Icaza

    The Jesus General posts a few profiles from the documentary Persons of Interest.

    The "Reports to the General" over at the Jesus General are always fun, make sure you check them out.

    Reminds me of what Molly Ivins said about vegetarians.

    Posted on 04 Jan 2006


    Howard Zinn on War

    by Miguel de Icaza

    I found this quote from historian Howard Zinn insightful:

    There is a persistent argument against such a possibility, which I have heard from people on all parts of the political spectrum: We will never do away with war because it comes out of human nature. The most compelling counter to that claim is in history: We don’t find people spontaneously rushing to make war on others. What we find, rather, is that governments must make the most strenuous efforts to mobilize populations for war. They must entice soldiers with promises of money, education, must hold out to young people whose chances in life look very poor that here is an opportunity to attain respect and status. And if those enticements don’t work, governments must use coercion: They must conscript young people, force them into military service, threaten them with prison if they do not comply.

    Emphasis added.

    He follows up with assorted examples.

    Posted on 31 Dec 2005


    Developing on Apple Systems

    by Miguel de Icaza

    Recently Nitesh Dhanjani in a bit of a rude email exchange asked Steve Jobs if he had plans to support something like .NET or Ruby on the Mac.

    Update: On a positive note, Nitesh's blog entry has sparked an interesting discussion.

    Given the initial confrontational exchange (which can be found here) am not surprised at Steve's immediate comments.

    I would like to add some comments to the discussion as we develop a cross platform Common Language Infrastructure (CLI) implementation that also supports the Mac.

    On Speed

    Steve claims that ".NET with CLI and managed code runs SLOW". It is true that writing code in a managed language or an interpreter is likely going to be slower than the output produced by a C compiler, or the output produced by hand-tuned assembly code.

    Lets start with an example: F-Spot is our photo management software which is written in C# and runs on the CLI consistently outperforms iPhoto and scales easily to hundreds of thousands of pictures without the obnoxious pauses that are common in iPhoto for example. F-Spot gets bonus points for being written by a single developer.

    F-Spot makes use of a feature in the CLI called "Platform Invoke" (or P/Invoke) which allows code written in a managed language to call into native code easily. In F-Spot's case all the high-level logic is implemented in a managed language and the bits that are performance sensitive (like quickly rendering the image, transforming JPEG images and even the GUI toolkit employed) are implemented in C.

    From a productivity stand point this is the best of both worlds: programmers can use a higher-level language to focus on the functionality first. When they identify a performance bottleneck they can easily move this functionality into a C library.

    It is possible that Steve has only looked at Microsoft's Rotor implementation of the CLI which merely ships a toy code generator. We encourage them to look at Mono and the various new advanced optimizations that we are introducing in Mono.

    On Productivity

    Although raw performance is good for some applications they impose a heavy toll on the developer. A professionally written and hand tuned assembly language program will likely perform better than anything else generated by a compiler.

    The language and runtime choice is a tradeoff that developers make. A balance between the time available for releasing the product; the budget available for creating and maintaining the application; the target system requirements; any third party libraries and components required; the in-house expertise; availability of developers with knowledge to develop and maintain the code; language learnability; the project life-span and the requirements that it might impose on the project: from languages designed to maintain software over a large period of time to write-once, barely-touch-afterwards software.

    There is not a single solution to the problem of course, but we believe that Mono does bring a good mix of elements that make it a good choice for a large body of developers. Some people will continue to be happy with their existing tools and their existing frameworks, but I believe Mono can help Unix developers produce better applications faster.

    Mac developers interested in using Mono and its tools on the OSX could use the Cocoa# bindings today. It is not complete, but it has a good foundation on which people can add more bindings to Objective-C libraries.

    As a project maintainer, am interested in learning what Cocoa# and Mono are missing for developers on the OSX platform.

    I know that OSX developers in the past have asked for Mono integration into X-Code, this is an area where collaboration between Apple and Mono would be useful. Alternatively there is the X-Develop IDE by OmniCore and eventually when the next version of Gtk+ ships with Quartz support we will likely ship MonoDevelop for OSX as well.

    Tapping Existing Developers

    Another advantage of Mono and the CLI is that it becomes easy for existing developers that have been targeting .NET to target new platforms.

    This is just a pragmatic point. Developers can reuse a large body of their expertise, their books, their documentation, their connections to bring their software to Unix. Some things might have to change to work effectively on Unix, but porting an application from Windows to Unix is no longer a multi-month or multi-year project.

    Porting an application from .NET to Mono is similar to porting a Unix application from SystemV to BSD: there are a few differences, but they make up only a tiny fraction of the application.

    On Languages

    The CLI was designed so it could host efficiently any programming languages in use today, but it also contains a strong interoperability layer. I already mentioned P/Invoke which Mono supports, but the framework is complete enough that it is possible to also integrate other object systems easily into the system. Today we have done this with Gtk's GObjects and some volunteers are working into adding COM support to Mono.

    The languages story is a powerful one.

    The CLI defines a set of language interoperability requirements which every language should adhere to (these guidelines are called the "Common Language Specification"). By following these guidelines once an API is developed in any of the CLI languages the API becomes available to every other language.

    Apple has struggled in the past in maintaining two code bases: one for Objective-C programmers to develop GUI applications and another one in Java.

    It is understandable that they do not want to support every single one of their APIs for every programming language out there; otherwise their own development would slow down, it is just not possible to do so.

    This is where I think the CLI adds tremendous value. Today developers only have to "bind" the API once and it becomes available to all the languages in the CLI ecosystem.

    Consider Geoff's effort to bind Cocoa. The Cocoa bindings that Geoff has hand-written are now available to all of the programming languages that target the CLI. Apple developers can use this API and any of the other CLI APIs developed by .NET and Mono developers on their applications with their favorite programming language: Boo, Nemerle, C#, JavaScript, Java and more.

    Interoperability

    There are a number of ways in which a language can participate in the CLI ecosystem. The most common one is to have the compiler translate the source language into CLI byte codes. This requires the creation of a compiler that targets the CLI.

    Examples of some open source compilers in this group include: C#, Python (with the IronPython compiler), Java (with the IKVM compiler), Nemerle and Boo. In addition to this there are several commercial compilers available: Fujitsu's Cobol compiler, ISE's Eiffel, RemObjects, Microsoft's own Managed C/C++ and many more.

    In some cases it is easier to write a "bridge" than to write a new compiler. This reuses an existing implementation and merely bridges the calls between the existing language and the CLI universe.

    Bridges have been developed for Python (yes, this is a parallel approach), Perl, Ruby and OpenOffice's UNO (this is how we are able to script OpenOffice using Mono). There are more, but I do not keep track of these.

    In addition Mono provides an embedding interface which allows developers to embed the virtual machine into an existing application. OpenOffice Mono integration (available in OpenSUSE 10), the game Second Life and the Unity game engine all use this embedding interface.

    Collaboration

    As I mentioned before, I do not believe that Mono is an ideal solution for every kind of application; Like every other framework Mono also has its own limitations and features missing; Its up to every developer to make this choice. But we believe we got a very solid mix.

    One Mono's goals is to work-well-with-others. Working with ISVs to ensure that their software runs with Mono and Unix is one of the things we take pride in doing. We always welcome new collaborations on the Mono universe.

    Update: Erik also comments.

    Posted on 28 Dec 2005


    Early Christmas Presents

    by Miguel de Icaza

    JB Evain announced Cecil 0.2 the CIL image manipulation library.

    Thomas from Fluendo announced that they have licensed the MP3 decoding for use with their LGPL libraries. Details are also here. There are a number of licensing caveats, you should check them out.

    Banshee, our new media player, was licensed under the MIT X11 terms explicitly to avoid these issues (Banshee as shipped in Novell's Linux editions uses the RealPlayer framework for its playback).

    Posted on 24 Dec 2005


    Funny Quote

    by Miguel de Icaza

    On the ongoing debate over spying, Molli Ivins writes:

    Here is a curious fact about the government of this country spying on its citizens: It always goes wrong immediately. For some reason, it's not as though we start with people anyone would regard as suspicious and then somehow slip gradually into spying on the Girl Scouts. We get it wrong from the beginning every time. Never seem to be able to distinguish between a terrorist and a vegetarian.

    And then am sure it will be used against the political enemies. On an ironic twist, she continues:

    Bush defended his actions Monday by saying it was part of "connecting the dots." A painful moment, since the 9/11 Commission just finished giving this administration grades of D and F in terms of preventing another terrorist attack --- and it has jack-all to do with wiretapping. This administration has cried wolf so many times using the national security excuse it has lost all credibility.

    Posted on 22 Dec 2005


    Porto Alegre Talk

    by Miguel de Icaza

    Update: My talk today in Porto Alegre will be at:

    Auditório do Serpro:
    Av. Augusto de Carvalho 1133 / 4º andar
    Porto Alegre RS
    Time: 18:30

    Posted on 22 Dec 2005


    Building a Rationale for a Dictatorship

    by Miguel de Icaza

    Nat pointed me to Bruce Schneier weights in on the new administration self-appointed rights:

    This is indefinite dictatorial power. And I don't use that term lightly; the very definition of a dictatorship is a system that puts a ruler above the law. In the weeks after 9/11, while America and the world were grieving, Bush built a legal rationale for a dictatorship. Then he immediately started using it to avoid the law.

    This is, fundamentally, why this issue crossed political lines in Congress. If the president can ignore laws regulating surveillance and wiretapping, why is Congress bothering to debate reauthorizing certain provisions of the Patriot Act? Any debate over laws is predicated on the belief that the executive branch will follow the law.

    This is not a partisan issue between Democrats and Republicans; it's a president unilaterally overriding the Fourth Amendment, Congress and the Supreme Court. Unchecked presidential power has nothing to do with how much you either love or hate George W. Bush. You have to imagine this power in the hands of the person you most don't want to see as president, whether it be Dick Cheney or Hillary Rodham Clinton, Michael Moore or Ann Coulter.

    Bruce has a blog with more data on the subject.

    Posted on 21 Dec 2005


    Wednesday Links

    by Miguel de Icaza

    The Jesus General has a funny graphic, reminds me of Jack London's Iron Heel.

    The Release of Mrs. Anthrax: So it turns out that the story on Mrs Anthrax was not what the occupation forces told us. Shocking. At the time of detention there was an article that raised the same questions.

    The P.U.-Litzer Awards awarded to the foulest media performance in 2005. Funny.

    Here I am George, Come and Get me: A Christian peace activist has a few words for the emperor. This is obvious, but I have been thinking about it: isn't it funny that those pitching the sanctity of Christmas are none other than the war-mongering Fox? Am I missing something?

    Editorials on the new emperor powers that George has vested himself with: Bush Must be Held Accountable; on his attempts to stop publishing the news and keep it a secret; Republican Jesus weights in; Jesus General open letter: Defending our Values Brutally; Bush as Nixon; Fafblog's There is no War in Warrant.

    ElBaradei's Nobel lecture transcript is now online.

    Jamie has a bunch of great articles on his "Today in Treason News". Pay special attention to why impeaching Bush is a bad idea.

    Posted on 21 Dec 2005


    Robert Fisk on Iraq

    by Miguel de Icaza

    More on the fascinating chapter on Iraq, which gets better every page. The following quote appears after Robert describes the torture practices employed by the Saddam Hussein government and the routine elimination of his critics. He describes how various states preferred to ignore Iraq's human rights record and continued to supply weapons and funding:

    Throughout the early years of Saddam's rule, there were journalists who told the truth about his regime while governments -- for financial, trade and economic reasons-- preferred to remain largely silent. Yet those of us who opposed the Anglo-American invasion of Iraq in 2003 were quickly accused of being Saddam's "spokesmen" or, in my case, "supporting the maintenance of Baathist regime"-- this from, of all people, Richard Perle, one of the prime instigators of the whole disastrous war, whose friend Donald Rumsfeld was befriending Saddam in 1983. Two years after Rumsfeld's initial approach to the Iraqi leader -- followed up within months by a meeting with Tariq Aziz -- I was reporting on Saddam's gang-rape and torture in Iraqi prisons. On 31 July 1985, Wahbi al-Qaraghuli, the Iraqi ambassador in London, complained to William Rees-Mogg, the Times editor that:
    Robert Fisk's extremely one-sided article ignores the tremendous advances made by Iraq in the fields of social welfare, education, agricultural development, urban improvement and women's suffrage; and he claims without presenting any evidence to support such an accusation, that "Saddam himself imposes a truly terroristic regime on his own people." Especially outrageous is the statement that: "Suspected critics of the regime have been imprisoned at Abu Ghoraib [sic] jail and forced to watch their wives being gang-raped by Saddam's security men. Some prisoners have had to witness their children being tortured in front of them". It is utterly reprehensible that some journalists are quite prepared, without any supporting corroboration, to repeat wild, unfounded allegations about countries such as Iraq...

    I picked this quote because it resembles what people always say about Robert Fisk on his coverage. The amateur psychologist in me knows that this is because Robert's reporting causes cognitive dissonance problems to some people.

    Anyways, back to read, I just wanted to share this with those who are still reading. This book is fascinating.

    Posted on 21 Dec 2005


    Porto Alegre

    by Miguel de Icaza

    We decided to escape the sordid Boston winter and are currently refugees in the southern hemisphere.

    Am doing a Linux Desktop/Mono talk on Thursday at 5pm. I have no idea where it is yet though.

    Posted on 20 Dec 2005


    Iraq in Robert Fisk's book

    by Miguel de Icaza

    Doug pointed me to an online copy of Robert Fisk's chapter on Iraq that I mentioned last night.

    The online copy is limited to the 1917 invasion. It is part of the various teasers that the Independent published in advance of the release of Robert's book. I strongly recommend folks to get the book for the rest of the goods.

    Posted on 19 Dec 2005


    Iraq's Past

    by Miguel de Icaza

    I bought my copy of Robert Fisk's The Great War for Civilization: The Conquest of the Middle East his latest book on the various conflicts in the middle-east. I will likely talk more about the book in the future as it is packed with gems.

    I have been savoring this book for a while, not wanting to read it very quickly, I have paced myself and allowing myself sometime to research some of the stories and compare notes with other texts on the various events he describes.

    Anyways, tonight I reached the chapter on the formation of modern Iraq. The stories, the anecdotes and the background information in here justify getting the book, even if you only read this chapter.

    Iraq is a hot topic of debate and has been covered non-stop for the last couple of years but the information I found on this chapter is all fresh.

    The chapter begins with the liberation of Iraq by the British troops in 1917; the proclamations of "we come here as liberators"; the early mistakes of the British invaders which would lead to an insurgency that they would not be able to control. The similarities with the current invasion are striking, down to 'we can not leave Iraq now, have to finish the job'.

    It gets better and better on every page. I won't spoil the rest, but its a great educational read.

    Posted on 19 Dec 2005


    Christmas Fun

    by Miguel de Icaza

    This is pretty fun: http://fuckchristmas.org/:

    Some background for those not living in the US: for the past few months Fox News has managed a great campaign about how Christmas is under siege. The debate over water coolers across the United States revolves around important matters like what is more appropriate `Happy Holidays' vs `Merry Christmas'. Am not kidding.

    Seriously.

    Posted on 17 Dec 2005


    Mono Debugger

    by Miguel de Icaza

    Martin has announced a new release of the Mono Debugger.

    This is the first time that I have been able to use the debugger for a real application. It still has a few rough edges, but at least its working.

    The documentation for the command line interface can be found here.

    Posted on 16 Dec 2005


    Syriana

    by Miguel de Icaza

    Just got back from watching Syriana. Loved it.

    Posted on 12 Dec 2005


    Human Development Trends

    by Miguel de Icaza

    Various statistics of human development trends in flash-tutorial form here http://gapminder.org/.

    Posted on 10 Dec 2005


    Harold Pinter's Nobel Prize Lecture

    by Miguel de Icaza

    A transcript is available here.

    Political language, as used by politicians, does not venture into any of this territory since the majority of politicians, on the evidence available to us, are interested not in truth but in power and in the maintenance of that power. To maintain that power it is essential that people remain in ignorance, that they live in ignorance of the truth, even the truth of their own lives. What surrounds us therefore is a vast tapestry of lies, upon which we feed.

    Posted on 08 Dec 2005


    Mono goes to Munich

    by Miguel de Icaza

    I will be in Munich this week. Drop me an email if you want to meet. My schedule is a bit compact, but if you are interested you can join me and others for lunch or dinner Wednesday, Thursday or Friday.

    Posted on 06 Dec 2005


    Jonathan Chambers Screenshots COM in Mono

    by Miguel de Icaza

    Jonathan has posted a screenshot of his COM support for Mono. The sample shows Mono launching Excel with COM interop.

    Check Jonathan blog for more information on his effort to support COM and its variants in Mono.

    Posted on 03 Dec 2005


    ChronoJump

    by Miguel de Icaza

    My friend Xavi which is a sports instructor and also a circus performer got interested in Linux and free software a few years ago. He decided to learn C#, Gtk# and create his first GUI application some time ago and has now shipped it.

    His application is ChronoJump. Its interesting because he was the first user for the Gtk# port of NPlot.

    He also built some custom hardware to take the measurements:

    Some NPlot Graphs.

    Web report generation.

    Hardware prototype.

    More screenshots are here.

    Posted on 02 Dec 2005


    The Web Desktop

    by Miguel de Icaza

    As a follow up to yesterday's web-based desktop communication engine, I wanted to comment on a few ideas that we have been bouncing around.

    Clearly the HTTP end-points on desktop applications would be useful to invoke an arbitrary set of methods on each application. I envision a system in which we can remotely manipulate desktop applications through HTTP. The same idea that I pitched a few years ago on top of CORBA.

    The difference this time is that writing the client code is trivial, unlike the previous attempt where writing the client code to talk to a CORBA server was very difficult.

    But in addition to this HTTP-based RPC interface, it would be nice to make the GNOME desktop Web-Aware.

    Let me explain with a few use cases that we have been discussing at Novell:

    Photo Sharing: A common household issue that I face is when I import pictures from a party into my F-Spot photo management program.

    Here is where the problem arises: people want to look at the pictures right away, or they want copies of the pictures, or they want me to tag them or annotate them. All of those at once.

    I hear you say "Post them to Flickr", well that would be fine except that the informed in the audience will demand a full resolution version. They will hand you an email address and demand that a bunch of pictures be emailed. Emailing is a drag, because more than a handful of high-resolution pictures is a drag as they typically bounce.

    I could export to a folder and then scp the files over, but thats just because am a beautiful and unique snowflake. Other non-hacker types might not be able to pull the scp trick.

    A few people have suggested to use the photo sharing protocol that iPhoto has. The problem is that a custom protocol for photo sharing requires photo-sharing-aware applications. And these applications are not as ubiquitous as a web browser is.

    The Solution: F-Spot coult have a "File/Web Share" which would basically run an HTTP server. In the particular case of F-Spot it can just embed our embeddable web server and expose the pictures with an ASP.NET application.

    By doing this, my wife and friends can use their laptops to browse the pictures, email them, print them or send them around right there.

    Music Playback: Today I use Banshee as my media player. I have it available at home on my large music repository and on my laptop with a few songs that I carry with me.

    Again, I would like to have a "File/Web Share" option that I could use at home to play music from any room in the house from a laptop. Or when am traveling let others listen to interesting music from my laptop.

    For this particular case, a general purpose web interface can be cooked, and the media playback could be a Flash-based MP3 player (these are very easy to produce with FlashMX).

    Web Serving It is not necessary for the applications to embed a web server. If embedding a web server is complicated they can just launch an external web server.

    Mono based applications have a couple of choices: they can embed a raw HTTP server using HttpListener (available in the 2.x profile on trunk) or they can embed directly XSP which would let them host ASP.NET pages with little or no work.

    Multiplexor: In both cases the HTTP-based multiplexing system that I described before can be used by remote users. As far as they know the url will always be "http://machinename:123/application/frontend" or something like that. The routing system will merely send an HTTP 303 redirect to the correct port.

    The multiplexing system is not required, is merely cute.

    Summary: a Web-ready GNOME desktop would have applications expose two HTTP-based interfaces: an HTML one for users and a raw HTTP interface for applications.

    A web-aware desktop is not tremendously revolutionary, but it adds a little bit of convenience. A set of HTTP-accessible interfaces will make our desktop more scriptable than it currently is.

    Posted on 27 Nov 2005


    Debate

    by Miguel de Icaza

    Havoc, I was not trying to debate. I agree with your qualifications on your second post about SOAP, in fact depending on the task or depending on the day I would choose one over another, I just took exception at the "masochist" comment. I have no desire to debate the SOAP vs REST discussions again, they were long and boring two years ago and they likely will be long and boring today.

    That being said, my post about building the communications infrastructure on the desktop over HTTP was quite serious. I have been having this discussion over chicken schwarmas at lunch for months. I was not joking, nor was I trying to ridicule the discussion, I really believe that there is a lot to win with this model. The more I thought about it, the more sense it made to have applications speak HTTP on the desktop.

    The discussion over SOAP and REST reminded me that I had long postponed a blog entry on my thoughts on the subject.

    Will try to cook up a prototype activator.

    Posted on 27 Nov 2005


    SOAP and REST

    by Miguel de Icaza

    Am glad that Havoc brings up the simplicity of jamming and pulling XML from a socket:

    Miguel, that's cool, I know SOAP (with a library) doesn't involve a ton of application code. My point is more that (to me) it's just not worth learning about for this sort of thing. If you want to get a couple of pieces of data on an Amazon product you just do "get url contents" and "stuff into XML parser" and "grab the Item node" and that's about it. All programmers already know how to download a URL and pull out an XML node, and being able to try out requests in the browser by editing the address in the location bar is pretty useful. "REST" is just very conceptually simple and requires no ramp-up time, even if it involves a couple more lines of code.

    Recently I have been considering the implementation of a system that would replace D-BUS and CORBA with a simple HTTP framework.

    At the core of such replacement there is an activation and arbitration system running on a well known location, for example: http://localhost:123/. This can be an Apache module or a custom built HTTP server.

    The daemon, very much like our existing activation systems (bonobo-activation and d-bus) has a list of services that can be started on demand and provides assorted services to participants.

    When an application starts, it registers itself with the local arbitration daemon, it does this with a RESTful call, lets say:

    http://localhost:123/registration/id=f-spot&location=http://localhost:9000/

    Where "f-spot" in this case is the name of the application, and "localhost:9000" is the end point where F-Spot happens to have an HTTP server running that exposes the F-Spot RESTful API.

    A client application that wants to communicate with F-Spot always contacts the well-known end-point:

    http://localhost:123/app/f-spot/request

    The arbitration daemon merely returns an HTTP 303 result pointing to: http://localhost:9000/request. The http client library already has support for this redirection.

    If F-Spot was not running, the arbitration daemon would look into a special directory that lists the available applications. The file could be called "f-spot.service" and it would describe how to launch f-spot, very similar to the way d-bus does it:

    	[Service]
    	Name=f-spot
    	Exec=/opt/gnome/bin/f-spot
    	

    The request comes in on http://localhost:123/f-spot/request, the activator launches f-spot, f-spot registers itself using the previously discussed call, a redirect is then sent to the client and you are done.

    To use this system as a message bus, in the same spirit as d-bus, you merely connect and listen to another well known-end point: http://localhost:123/bus/event-name. The connection is never closed by the server and clients keep reading data from this stream.

    To push information into the bus, a POST request is done http://localhost:123/bus/event-name. The contents of the POST are then delivered to all the clients that are listening on the endpoint.

    The format and protocol for the information that flows on that particular HTTP request as REST is up to the creator, users would have to follow that format. For example it could be one line at a time, or it could be a url pointing to the full message.

    As for the security of this system, it should use a mechanism similar to what we have used in the past with Bonobo Activation: a randomly generated password is generated and stored on the file system in a well known location, and private location (~/.config/private/something).

    The security process is the only component that requires a little bit of code. The rest can be implemented just with an HTTP client and the HTTP server for those providing information. A client application would only needs something like this:

    	FILE f = popen ("http-get-key");
    	fgets (password, sizeof (buf), f);
    	close (f);
    	

    The benefits I think are multiple:

    • HTTP is a well known protocol.
    • There are plenty of HTTP client and server implementations that can be employed.
    • The protocol can be as simple or as complex as needed by the applications. From passing all the arguments on a REST header as arguments to the tool-aware SOAP.
    • HTTP works well with large volumes of data and large numbers of clients.
    • Scaling HTTP is a well understood problem.
    • Users can start with a REST API, but can easily move to SOAP if they need to.
    • HTTP includes format negotiations: clients can request a number of different formats and the server can send the best possible match, it is already part of the protocol. This colors the request with a second dimension if they choose to.
    • Servers can take advantage of HTTP frameworks to implement their functionality on the desktop.
    • It is not another dependency on an obscure Linux library.
    • The possibility of easily capturing, proxying and caching any requests.
    • Redirects could be used to redirect request to remote hosts transparently and securily.
    • And finally, makes the desktop "Web 2.0 ready" :-)

    HTTP on its own has plenty of fantastic advantages that today we are bound to reimplement with things like D-Bus or live without them.

    The implementation of this infrastructure is trivial. All I need now is a name for the project.

    Posted on 26 Nov 2005


    The Boo Version

    by Miguel de Icaza

    The same version of the C# program written in Boo:

    	if len(argv) < 3:
    		print "Usage is: associate-id token searchterm"
    		return
    	
    	search = AmazonSearchService ()
    	kr = KeywordRequest (keyword: argv [2], tag: argv [0],
    		devtag: argv [1], mode:"books", page: "1", type: "lite")
    	
    	for detail in search.KeywordSearchRequest (kr).Details:
    		print "Product: ${detail.ProductName}"
    		if detail.Authors != null:
    			print "Authors: {0}", string.Join (", ", detail.Authors)
    	

    To build:

    	$ mcs -target:library AmazonSearchService.cs -r:System.Web.Services
    	$ booc am.boo -r:AmazonSearchService.dll
    	

    To run:

    	$ mono am.exe YourAssociateID YourToken YourQuery
    	

    Posted on 26 Nov 2005


    PlanetGnome observations

    by Miguel de Icaza

    Havoc claims on his "Adventures in Web 2.0" post that Amazon has a SOAP API "for masochists". What exactly is difficult about SOAP exactly?

    It took me longer to register with Amazon and obtain my developer key after reading his post than it took me to write a small C# program.

    Step 1: Google for "Amazon WSDL", pass the link to the wsdl compiler:

    
    	$ wsdl http://soap.amazon.com/schemas2/AmazonWebServices.wsdl
    
    

    Step 2: register with Amazon, obtain your IDs.

    Step 3: write trivial program:

    using System;
    using System.Web;
    
    class X {
    	static void Main (string [] args)
    	{
    		if (args.Length != 3){
    			Console.Error.WriteLine ("Usage is: amazon amazon-affiliate-id amazon-access-key keyword");
    			return;
    		}
    		
    		AmazonSearchService s = new AmazonSearchService ();
    		KeywordRequest kr = new KeywordRequest ();
    
    		kr.keyword = args [3];
    		kr.tag = args [0];
    		kr.devtag = args [1];
    		kr.mode = "books";
    		kr.page = "1";
    		kr.type = "lite";
    		
    		ProductInfo pi = s.KeywordSearchRequest (kr);
    		foreach (Details detail in pi.Details){
    			Console.WriteLine ("Product: {0}", detail.ProductName);
    
    			if (detail.Authors != null)
    				Console.WriteLine ("Authors: {0}", string.Join (", ", detail.Authors));
    		}
    	}
    }
    

    Step 4: Compile the sample code, and include the generated client code from WSDL, link with the Web Services library:

    
    	$ mcs am.cs AmazonSearchService.cs -r:System.Web.Services
    
    	

    Step 5: Run:

    
    	$ mono --debug am.exe myassociate-id  my-key "bugs in writing"
    	Product: Writing Solid Code: Microsoft's Techniques for Developing Bug-Free C Programs (Microsoft Programming Series)
    	Authors: Steve Maguire
    	Product: BUGS in Writing: A Guide to Debugging Your Prose (2nd Edition)
    	Authors: lyn dupre
    	Product: The Writing Bug (Meet the Author)
    	Authors: Lee Bennett Hopkins, Diane Rubinger
    	Product: BUGS in writing: A guide to debugging your prose in mathematics ; taken from BUGS in writing a guide to debugging your prose
    	Authors: Lyn DupreÌ
    	Product: Raewyn's Got the Writing Bug (Voyages)
    	Authors: Raewyn Caisley, Brian Gilkes
    	Product: The Millennium Bug.(Brief Article)(Poem) : An article from: New Statesman (1996)
    	Product: Hooking the Nose of the Leviathan: Information, Knowledge, and the Mysteries of Bonding in The Gold Bug Variations. : An article from: The Review of Contemporary Fiction
    	Product: Mai-Lee's bug disaster. (poem) : An article from: U.S. Kids
    	Product: Don't Bug Me!
    	Authors: Gillian McHale
    	Product: All this talk about the millennium bug is sheer techno-paranoia, isn't it? But then again.... (year 2000 furor) : An article from: New Statesman (1996)
    
    	

    I concede that using SOAP with printf and jamming the output down a socket is harder than using a toolkit. But jamming down printf-generated XML down a socket without having a complete HTTP client stack implemented is asking for trouble on both counts anyways.

    Alvaro and US Airport Security

    Alvaro complains about being treated like a criminal in US airports. I would argue that every time you cope with "security" you are treated like a criminal, and this is not limited to US airports.

    Alvaro just came from Mexico, where every person entering the country is randomly subject to a full property search on arrival. The situation is no different in Europe. If you are white or European they will mostly leave you alone, but if you look remotely like arriving from Africa you get a very different treatment in immigration and customs.

    My point is merely that singling out the US airports for this treatment is not really fair. Annoying, perhaps, but with international travel you must be ready to cope with these kinds of things.

    Posted on 26 Nov 2005


    March 2003

    by Miguel de Icaza

    Boston

    Boston

    Paris

    Posted on 24 Nov 2005


    New MonoDevelop release

    by Miguel de Icaza

    Lluis has released a new version of MonoDevelop, there are plenty of new features in this release. The release notes are here.

    • A Welcome Page: a starting point for your ongoing projects.
    • New component-based architecture for the IDE. For details see the Architecture Overview.
    • New Add-In manager to install, update and remove plugins for the MonoDevelop IDE.
    • A command-line build tool, so you can integrate MonoDevelop projects into your batch compilation process.
    • Smartindent for C# and Boo languages.

    This release is the results of many months of work where he rearchitected MonoDevelop to be a modular IDE.

    The core of MonoDevelop basically offers a framework for plugins and third-party components. The framework includes a system to install, upgrade or remove plugins and little more. For instance it does not have any notion of projects.

    All the functionality of the IDE has been moved into its own modules that are layered on top of it.

    The new Welcome Page.

    Posted on 24 Nov 2005


    OpenOffice

    by Miguel de Icaza

    Radek Doulik talks about his work on his Cairo-based Canvas for OpenOffice and shows the quality difference.

    He also posted his slides for his presentation.

    Office File Formats

    Novell will be sending some folks from our Open Office team to the newly created ECMA TC45 working group. We hope to determine if the standard will be open enough and the details complete enough to allow for interoperability.

    Posted on 23 Nov 2005


    Gtk+/Quartz on OSX

    by Miguel de Icaza

    Imendio has checked into CVS their Gtk for OSX port.

    Posted on 23 Nov 2005


    Robert Fisk Lecture in LA

    by Miguel de Icaza

    Robert Fisk lecture in LA is available in MP3 format here.

    Robert is an incredible story teller.

    In this talk he describes some of his experiences as a journalist on the Middle East in the past twenty years and why he started to write his new book "The Great War of Civilization".

    Packed with anecdotes. The parallels between the British occupation of Iraq and the new occupation are incredible.

    Posted on 20 Nov 2005


    TV

    by Miguel de Icaza

    Been loving the US version of "The Office", the awkward moments are all there.

    I also find "American Dad" hilarious. My love is divided between the fish and the alien.

    Posted on 16 Nov 2005


    F-Spot Monitor

    by Miguel de Icaza

    A few weeks ago I purchased a 24" flat screen from Dell. The sole purpose of this monitor is to run F-Spot to manage my home photo collection. Today I completed the F-Spot setup at home.

    Posted on 16 Nov 2005


    Link-o-Fest'05

    by Miguel de Icaza

    Noam Chomsky on the debate about intelligent design:

    To proponents, intelligent design is the notion that the universe is too complex to have developed without a nudge from a higher power than evolution or natural selection.

    To detractors, intelligent design is creationism --- the literal interpretation of the Book of Genesis --- in a thin guise, or simply vacuous, about as interesting as "I don't understand" as has always been true in the sciences before understanding is reached.

    Accordingly, there cannot be a "debate."

    Robert Fisk on the rebranding of torture:

    What Americans do to their prisoners is "abuse" and there was a wonderful moment last week when Amy Goodman, who is every leftist's dream, showed a clip from Pontecorvo's wonderful 1965 movie "The Battle of Algiers" on her Democracy Now program. "Col. Mathieu" -- the film is semi-fictional -- was shown explaining why torture was necessary to safeguard French lives.

    Then up popped Bush's real spokesman, Scott McClellan, to say that while he would not discuss interrogation methods, the primary aim of the administration was to safeguard U.S. lives.

    U.S. journalists now refer to "abuse laws" rather than torture laws.

    Molly Ivins has her own take:

    I have known George W. Bush since we were both in high school -- we have dozens of mutual friends. I have written two books about him and so have interviewed many dozens more who know him well in one way or another. Spare me the tough talk. He didn't play football -- he was a cheerleader. ''He is really competitive,'' said one friend. ``You wouldn't believe how tough he is on a tennis court!''

    I tried to track down Robert Fisk as he tours the US but the only confirmed dates that I have are for California this weekend and I do not feel like crossing the country. If you happen to know of any dates somewhere closer to the East Coast, please drop me an email.

    Norman Finkelstein is talking on Thursday in Boston. Details are available here. Norman is the author of the "Beyond Chutzpah" and "Israel-Palestine Conflict" books. Am pretty psyched.

    Posted on 15 Nov 2005


    Fast DCE Implementation Posted

    by Miguel de Icaza

    Massi posted his fast implementation of Dead Code Elimiation for the Mono runtime.

    This is an optimization that we can hopefully enable by default, as opposed to the more expensive SSA-based optimizations.

    This is the first on a series of optimizations patches that Massi is completing.

    Posted on 15 Nov 2005


    Dan Pena Ajena

    by Miguel de Icaza

    El presidente Fox y su cabinete, nada más dan pena ajena. Que verguenza, y es que es una tras otra. Deberían de tener un examen de admisión.

    Ese es el problema de elegir a alguien que bajaron del cerro a tamborazos.

    Posted on 15 Nov 2005


    Microsoft Memos

    by Miguel de Icaza

    I was reading the leaked memos from Microsoft and as I was reading the first few paragraphs, I could not stop thinking that nobody on their right mind writes internal company memos like this. Nobody puts this kind of history background.

    Consider the recipients: "Executive Staff and Direct Reports; Distinguished Engineers".

    I could not stop thinking that these memos were written to be leaked. They read like ads.

    Update: Alex points out that Cringely made the same observation. The difference is his article is actually interesting. Here is a tidbit:

    But I have to say that Gates or Ozzie or whoever actually wrote these documents has done a very effective job of differentiating the company roles in a way that makes Google appear to be the bad guy, and Microsoft appear to be the good guy. Google is going to develop and deploy Internet services while Microsoft is going to ENABLE the deployment of such services BY ITS DEVELOPER PARTNERS. This makes Google the would-be monopolist.

    Looking deeper, though, we see that the only way Microsoft can achieve its vision is by continuing to own the platform. They want us to be GRATEFUL, in fact, that such an enlightened outfit is running the store. And this will work to an extent, but only to an extent. Then what happens? All hell breaks loose as Microsoft again changes the game. Here's how: read the rest

    Posted on 11 Nov 2005


    Italian Fallujah Documentary

    by Miguel de Icaza

    The Italian documentary about the use of chemical weapons in Fallujah can be downloaded here.

    A guy which sounds pretty upset about it is here.

    Robert Fisk described the use of Phosphorus bombs on the civilian population of Beirut, you can read a couple of pages with Google Print: here.

    Update: A reader points that the official page for the RAI documentary contains more download options and formats. The page is here.

    Posted on 11 Nov 2005


    F-Spot Tagging screencast

    by Miguel de Icaza

    Jakub has done a screencast of the new tagging feature in F-Spot.

    Posted on 11 Nov 2005


    Nat's Photo Tagging

    by Miguel de Icaza

    Nat recently implemented tag-typing for F-Spot, our new photo management software. For those of us with large picture collections this is probably one of the best interfaces for tagging.

    See Nat's post here and his latest patch here.

    Send copious amounts of email to Nat until he does a screencast of this new feature. You have to see it to appreciate it.

    On the hacking side of things, the beauty of this patch is that it was coded in two afternoons after long busy work days for Nat.

    Posted on 10 Nov 2005


    Secret Prisons

    by Miguel de Icaza

    The Washington Post yesterday ran an article that claims that the CIA has a network of secret prisons where they have been incarcerating suspects. The CIA denies such prisons exist:

    The CIA has been hiding and interrogating some of its most important al Qaeda captives at a Soviet-era compound in Eastern Europe, according to U.S. and foreign officials familiar with the arrangement.

    The secret facility is part of a covert prison system set up by the CIA nearly four years ago that at various times has included sites in eight countries, including Thailand, Afghanistan and several democracies in Eastern Europe, as well as a small center at the Guantanamo Bay prison in Cuba, according to current and former intelligence officials and diplomats from three continents.

    ...

    Mid-level and senior CIA officers began arguing two years ago that the system was unsustainable and diverted the agency from its unique espionage mission.

    "We never sat down, as far as I know, and came up with a grand strategy," said one former senior intelligence officer who is familiar with the program but not the location of the prisons. "Everything was very reactive. That's how you get to a situation where you pick people up, send them into a netherworld and don't say, 'What are we going to do with them afterwards?' "

    Billmon weights in:

    The plot line should be familiar to students of the Abu Ghraib atrocities. Interrogation tactics originally developed and/or authorized for use against "high value targets" at Guantanamo were exported first to the broader Gitmo population, and then to Iraq, where they were put into mass production by a group of half-trained or entirely untrained intelligence officers and MPs. The result was an entirely predictable moral and political disaster -- one which may have cost the United States whatever slim chance it had of establishing a popular, pro-Western government in Baghdad.

    Likewise, the CIA's mini-archipelago seems to have grown like a poisonous weed in the absence of any coherent strategy for fighting Islamic terrorism, other than the initial impulse to hunt down the "evildoers." But now, like a dog who chases cars and actually catches one, the war cabinet faces the awkward question of what do with its secret prisoners and their secret prisons, even as the media finally starts to peel back the layers of secrecy. This story is going to cause something close to panic in more than one Eastern European capital, I suspect, and a relatively quick exit from that Soviet-era "compound." Where will the CIA take its human contraband now?

    It seems to me that the Cheney administration has been trapped -- both by its ostentatious rejection of the "law enforcement" model of counterterrorism, and by its complete, willful failure to understand the limits of hard power and the steadily rising importance of soft power in a struggle that will last years, if not decades. Policies based on the adrenaline rush of war fever (circa 2002) were never likely to be sustainable. They also haven't brought us any closer to capturing Osama or prevented the transformation of Al Qaeda from an organization to a movement, one that is much more difficult to fight with dirty war tactics.

    In other news, Mexico joined the International Criminal Court which upset a few people in the US:

    Washington had warned Mexico that if it ratified the ICC and refused to sign an accord exempting U.S. nationals from the court's jurisdiction, it would cut 11.5 million dollars in funding from aid programs for fighting drug trafficking, according to human rights groups. The amount is equal to almost 40 percent of the economic aid Mexico receives from the United States.

    Posted on 03 Nov 2005


    Linux Desktop

    by Miguel de Icaza

    Nat makes an observation about the Linux Desktop.

    Posted on 02 Nov 2005


    Imeem and Mono

    by Miguel de Icaza

    Today we did a news brief with the Imeem folks. Imeem developed a client tool to create private networks with a number of tools (blogs, instant messaging, profiles, searching, file sharing).

    Imeem uses Mono on their servers and also they use it on their MacOS port to reuse the same codebase that they had on Windows. Like iFolder, they are creating a native Objective-C interface using Cocoa and communicating with Mono to call into the engine.

    My understanding is that Imeem uses Mono's cryptographic codebase extensively.

    Someone should do an interview with Dalton Caldwell founder and CEO of Imeem.

    Posted on 31 Oct 2005


    CORBA and Web Services

    by Miguel de Icaza

    Michi Henning participates in a discussion at Steve Vinoski's blog.

    Posted on 30 Oct 2005


    These Modern Times

    by Miguel de Icaza

    Priceless:

    AN INGENIOUS fraudster is believed to be sunning himself on a beach after persuading leading banks to pay him more than Euro 5 million (£3.5 million) in the belief that he was a secret service agent engaged in the fight against terrorist money-laundering.

    The man, described by detectives as the greatest conman they had encountered, convinced one bank manager to leave him Euro 358,000 in the lavatories of a Parisian bar. "This man is going to become a hero if he isn’t caught quickly," an officer said. "The case is exceptional, perfectly unbelievable and surreal."

    Posted on 28 Oct 2005


    Flight of the Conchords

    by Miguel de Icaza

    A few weeks back, when I was in LA I left the TV on as I read my email. I catched a stand up comedy show on HBO from a band called Flight of the Conchords on HBO's One Night Stand. You should watch it if you have a chance (it is available with cable on demand in a few places).

    Posted on 26 Oct 2005


    Tension

    by Miguel de Icaza

    I have been following the Fitzerald investigation in the last few weeks. As much as can be followed by the prosecutor that has so far not done any public appearances nor said a word about his findings or his strategy.

    Following the investigation has thus been limited to reading the various speculations based on who is being subpoenaed and the public statements done afterwards. An other interesting source of information in this puzzle is the PR campaign from those targeted by this opaque investigation.

    A few interesting links on the subject:

    A Cheat Sheet to get acquainted with the participants.

    BillMon:

    In other words, instead of blowing sky high, the volcano may simply snore loudly, roll over, and go back to sleep. And as Dean points out, since all the testimony Fitzgerald has collected is covered by the grand jury secrecy laws, we may never know what he found.

    One can easily imagine the howls of protest on the left, and the smug satisfaction on the right, should this come to pass. It would be particularly bitter finale for those of us who all along have regarded the Plame outing as a proxy for the more fundamental crimes committed along the march to war in Iraq.

    Unlike some (see Justin Raimondo's last two columns, for example) I've never had more than a forlorn hope that Fitzgerald would delve into the Niger forgeries, the Chalabi connection, the Office of Special Plans, the Downing Street Memos or any of the other investigative leads into the heart of the neocon conspiracy. Nor have I seen any evidence -- or even plausible speculation -- that would lead me to believe Fitzgerald has expanded his probe beyond the immediate matter at hand: the leak of Valerie Plame's identity and CIA affiliation. But, like most hardcore Cheney administration haters, I've been content with the busting-Al-Capone-for-tax-evasion metaphor. To paraphrase Donald Rumsfeld: You go to war with the indictments you can prove, not the ones you'd like to prove.

    Jeff Cohen:

    But there's a special reason this scandal is so personally satisfying to me as a media critic. It's because elite journalism is on trial. Powerful journalists are playing the role usually played in these scandals by besieged White House operatives. They're in the witness dock. It's a New York Times reporter who is failing to recall key facts...mysteriously locating misplaced documents...being leaned on to synchronize alibis.

    Elite journalism is at the center of Weaponsgate, and it can't extricate itself from the scandal. Because, at its core, Weaponsgate (or, if you're in a hurry, "Wargate") is about how the White House and media institutions jointly sold a war based on deception -- and how the White House turned to these media institutions to neutralize a war critic who challenged the deception.

    A particularly cute quote from Billmon:

    Of course, everybody’s free to indulge in their favorite theories about Whose Behind It All. After all, we are talking about the era of "dark actors playing their games," to quote the conveniently dead David Kelly. Like Watergate, this is one of those cases where paranoid conspiracy theories are simply alternative rough drafts of history.

    Posted on 26 Oct 2005


    Manu Chao's new Album

    by Miguel de Icaza

    The new Manu Chao album Siberie m'etait contéee... is wonderful. The lyrics are the best that Manu has put out so far and I can only understand half of them. If you were looking for an excuse to learn french, this is it.

    I was only able to order this from Amazon.fr. There must be a cheaper choice. If I did not have a busy schedule it would have been just as expensive to fly to Paris and get back to get the CD.

    Posted on 25 Oct 2005


    Ajax.Net source public

    by Miguel de Icaza

    I missed the announcement of the Ajax.Net source code, it was announced here.

    A discussion forum is available here and various Ajaxy controls are available from their Subversion repository:

    	svn co https://svn.borgworx.net/SVN/BorgWorX/trunk/Web/
    	

    Posted on 24 Oct 2005


    Ali-G

    by Miguel de Icaza

    Dear Lazyweb,

    Is the era of Ali-G over?

    Update: Bastien Nocera points out that it is over, but there are a couple of Sasha movies coming out. Its the end of an era.

    Posted on 24 Oct 2005


    Interviews

    by Miguel de Icaza

    Edd Dumbill interviewed Chia-liang Kao, the creator of SVK, a distributed version control system layered on top of Subversion:

    SVK allows distributed development using existing infrastructure, which means you don't need to deploy a new system for your whole organization. SVK works best with Subversion, but you can also seamlessly branch from CVS, Perforce, or even git repositories. SVK lets you commit directly back to Subversion repositories and "commit as a patch" to other systems or to Subversion repositories you don't have commit access to. Such patches can then be applied by the maintainer, using either a regular patch tool, or SVK, which also will help filling the commit log.

    [...]

    It makes things easier for contributors to open source projects to maintain their patches as a local branch and accept changes from upstream, rather than being treated like second-class citizens who have to deal with patch hell just because they can't commit. You can do this with many other version control systems using "vendor branches," but mostly they require too much work to maintain a short-lived branch just for a patch or two that haven't yet been reviewed and committed.

    Open source projects sometimes fork because it's too hard to integrate branches that have diverged too much. Painless merge makes it much easier to branch instead of fork.

    John Osborn interviews Anders Hejlsberg at O'Reilly. Mostly focused on the new features in C# 2.0 with a little touch of how they are used to build 3.0 features.

    Posted on 23 Oct 2005


    Today's Internet Weather

    by Miguel de Icaza

    Light patches of slashdot comments and a heavy downpour of porn later in the evening.

    Posted on 20 Oct 2005


    Community Service Announcement

    by Miguel de Icaza

    Tonight at 11:30pm, in Comedy Central, after the Daily Show. The premier of "The Colbert Report".

    Posted on 17 Oct 2005


    Interesting News

    by Miguel de Icaza

    Sebastien posted an update on the state of Code Access Security (CAS) in Mono:

    Today, actually this has been true for quite a while, we are able to run all of corlib's unit tests without any failure, including an additional 301 CAS specifc tests (i.e. that aren't normally executed). We can also execute all System.Drawing.dll unit tests without requiring, or even demanding, UnmanagedCode permissions. We also have a great coverage (including 2450 CAS specific tests) for System.Web.dll with perfect results (except for a small mcs bug on partial classes) and a few more tests (18) for System.Xml.dll.

    Make sure you read the rest of Sebastien's post if CAS is of interest to you.

    Mikael Hallendal from Imendio unveiled their effort to port Gtk to OSX. They had not done much publicity before as they wanted to get some code working first. Anders Carlson is behind this effort. Hopefully we will see the community pick up and a nice theme to integrate the apps with the native look of the Mac happen.

    Also see the GIMP running without on OSX without X11.

    These are fantastic news for Gtk# users.

    Erik points to an interesting inteview:

    Interesting interview of Otee's CEO on TUAW. Otee uses Mono for scripting in their Unity 3D game engine, that's the JavaScript feature they're talking about. Developers can also use Boo and C# for game scripting, thanks to Mono multi-language support.

    Posted on 06 Oct 2005


    Nemerle Offers Courses OnLine

    by Miguel de Icaza

    The Nemerle folks are going to teach some courses online to expose their language to more people.

    Posted on 03 Oct 2005


    Medsphere on Business Week

    by Miguel de Icaza

    Medsphere was profiled on BusinessWeek. Congratulations to the team!

    Medsphere uses Gtk# and Mono to develop their application which run on Windows and Linux from the same codebase. Todd showed their application at the Mono Users Meeting at the PDC.

    On the same issue they have an interesting article: Open Source: Now its an Ecosystem.

    Posted on 03 Oct 2005


    Using FireBird.NET with Mono

    by Miguel de Icaza

    Today I tried out the Firebird database as we just integrated Carlos' bindings for it into the Mono release. Firebird has two modes of operation, it can be used as a server that clients connect to or it can be used as an embedded database, just like SQLite.

    The traditional server/client setup works as expected, but I was more interested in using it as an embedded database, This mode is not very well documented. This blog entry tries to document the steps necessary to embed the database and use it with the managed API.

    I installed the "FireBird Classic" configuration as an RPM, which is available here. Other downloads are available here.

    These instructions are based on the data I found here and here.

    Then you must create a mini-firebird environment for your embedded database, the following commands must be done as root:

    
    	# mkdir /home/miguel/minibird
    	# mkdir /home/miguel/minibird/bin
    	# cd /home/miguel/minibird
    	# cp /opt/firebird/firebird.conf .
    	# cp /opt/firebird/firebird.msg .
    	# cp /opt/firebird/security.fdb .
    	# cp /opt/firebird/bin/fb_lock_mgr bin
    	# chmod +rx bin/fb_lock_mgr
    	# FIREBIRD=`pwd` /opt/firebird/bin/gsec
    	GSEC> add miguel -pw pwd
    	GSEC> quit
    	# chown -R miguel *
    	
    

    Edit the firebird.conf file and add (or edit the commented line) the following line:

    	RootDirectory = /home/miguel/minibird
    

    That will create the mini-root and create an account "miguel" with the password "pwd" and set the permissions for all the necessary files.

    You can now create a database:

    
    	$ /opt/firebird/bin/isql
    	SQL> create database "hola.gdb";
    	SQL> create table developers (name varchar (40), email varchar(40) not null);
    	SQL> insert into developers (name, email) values ('miguel', '[email protected]');
    	SQL> insert into developers (name, email) values ('duncan', '[email protected]');
    	SQL> commit;
    	SQL> exit;
    	
    

    The C# program to access it is fairly simple:

        using System; 
        using System.Data; 
        using FirebirdSql.Data.Firebird;
         
        public class Test {
                public static void Main(string[] args) {
                        string connectionString = 
                        "Database=hola.gdb;servertype=1;user=miguel;password=pwd";
         
                        IDbConnection dbcon = new FbConnection(connectionString); 
                        dbcon.Open(); 
                        IDbCommand dbcmd = dbcon.CreateCommand(); 
                        string sql = "SELECT * FROM developers"; 
                        dbcmd.CommandText = sql; 
                        IDataReader reader = dbcmd.ExecuteReader(); 
                        while(reader.Read()) {
                                object dataValue = reader.GetValue(0); 
                                string sValue = dataValue.ToString(); 
                                Console.WriteLine("Value: " + sValue);
                        } 
                        
                        // clean up 
                        reader.Close(); 
                        reader = null; 
                        dbcmd.Dispose(); 
                        dbcmd = null; 
                        dbcon.Close(); 
                        dbcon = null;
                }
        }
    

    Build your program:

    
    	$ mcs sample.cs -r:FirebirdSql.Data.Firebird -r:System.Data
    
    

    To run this program you must set the FIREBIRD environment variable to point to the mini-firebird directory:

    
    	$ FIREBIRD=/home/miguel/minibird mono sample.exe
    	Value: miguel
    	Value: duncan
    
    

    Posted on 30 Sep 2005


    SharpMusique 1.0

    by Miguel de Icaza

    Jon Lech Johansen has released version 1.0 of his SharpMusique client to iTunes Music Store, in 1.0 he supports:

    • Preview songs
    • Signup for an account
    • Buy songs and albums
    • Redownload songs that you bought with SharpMusique
    • Redeem Pepsi caps
    • Redeem gift certificates

    SharpMusique uses Gtk# and runs on Microsoft.NET or Mono.

    Posted on 30 Sep 2005


    World Wind Software on Linux

    by Miguel de Icaza

    WW2D now runs on Linux using Mono:

    World Wind on Linux.

    [WW2D] [..] is cross-platform, free and open-source version of NASA World Wind software, see http://worldwind.arc.nasa.gov for details. WW2D allows you to explore Earth using satellite imagery, topographic maps and image from other data sources also providing large placenames and boundaries database and allowing you to install community-made add-ons for even more information about our planet.

    In basic configuration WW2D uses images from Blue Marble (1 km/pixel), LandSat7 (15 m/pixel), USGS Topo Maps, USGS Digital Ortho imagery, USGS Urban Area imagery.

    WW2D is designed to dynamically download needed data from internet, however you can download data you want for faster access and offline usage.

    This is not the original NASA software, but a new implementation sharing some of the data. To render they use Tao.OpenGL and a little bit of native code.

    The new version is available here to run make sure you have libgdiplus+ installed and then do this:

    
    	$ cd demo-linux
    	$ mono WW2D.Frontend.exe
    	
    

    Posted on 30 Sep 2005


    Second Life

    by Miguel de Icaza

    I just learned that the folks at Second Life are using Mono for their 3D Digital Online World:

    Monoorientationisland Orientation Island with all 700+ LSL scripts compiled to CIL, assembled in to CLR assemblies and running in the Mono VM embedded in the Second Life simulator. The Mono scripted birds sing and the Mono scripted hands spin and go "bing" when you touch them. There's still lots of bug fixing, optimisation and integration to be done, but it's looking good.

    By doing this their existing LSL code will be JITed and optimized by the Mono engine and run at native speeds while giving their developers the flexibility that they need in using the LSL language. This also opens the doors to the Second Life developers to use other CLI languages like C#, Boo, Python or JavaScript side-by-side.

    A couple of weeks later they posted an update with more screenshots:

    Monobiplane1Monobiplane2_1Monobiplane3Flying a mono biplane through a mono scripted Abbotts Aerodrome (in monochrome). All 2700+ LSL Abbotts scripts compile to CIL, assemble in to CLR assemblies and run in the Mono VM embedded in the Second Life simulator. Note that no source code was changed to make this work, the LSL source was just recompiled to run on the Mono VM.

    This is pretty exciting. Am looking forward to help the SecondLife guys have a successful migration to Mono and assist them in exploiting the features of the Mono VM for their software.

    Posted on 27 Sep 2005


    Kurt Vonnegut's New Book.

    by Miguel de Icaza

    I enjoyed tremendously reading Kurt Vonnegut's latest book "A Man Without a Country" which recently came out.

    The theme is very personal, Vonnegut's view on the current state of affairs on the world. Unlike his fiction books on "A Man Without a Country" Vonnegut explicitly states what he believes is wrong, what must be fixed and identifies the crookitude by name.

    Posted on 27 Sep 2005


    Viggo Mortensen

    by Miguel de Icaza

    Crooks and Liars has the video of Viggo Mortensen amazing interview on Charlie Rose's show.

    I admire the man. He shows up with a gift for the host, a copy of Howard Zinn's Voices of A People's History of the United States. One of my favorite books and is followed by a brilliant presentation on the state of the country in a calm and articulate way.

    And on his web site I find a quote from another favorite author of mine, Gore Vidal and plenty of articles from authors that I like.

    Posted on 25 Sep 2005


    C# 3.0 Q&A

    by Miguel de Icaza

    A C# 3.0 Q&A, a lot of folks have been asking about these and other questions. Find it here

    People have been asking me when are we going to support C# 3.0.

    Our current focus is on delivering a very stable platform, so we are trying to fix the bugs that people are reporting and give developers a great experience with their existing code base. This is just a basic Joel principle: fix bugs before you write new code.

    Considering that C# 3.0 is still a year or two away from shipping and the specification will likely change it is best for us to polish our C# 2.0 compiler and our runtime classes than to start work on C# 3.0 right now.

    The good news is that all of the new C# 3.0 features are relatively simple and it builds on existing C# 2.0 features. The specification so far is 26 pages long. It is probably one third of the effort that it took to implement generics on the compiler and the runtime.

    We are as excited as everyone else about the language and can not wait to try to implement some of those features and provide feedback about it to the language architects, but this work will have to wait a few months. This is definitely not part of our Mono 1.2 release needs (that being said, if one of the contributors sends code for it, we will very likely integrate it).

    XLinq

    In the meantime, Atsushi has checked some early work on XLinq to our repository. It has only enough code to run Microsoft's XlinqIntro sample.

    Posted on 25 Sep 2005


    Mono on ARM

    by Miguel de Icaza

    Mono 1.1.9 shipped with a port of the JIT engine to the ARM processor and it currently supports the Linux operating system. A few days ago Paolo received his Nokia 770 which is a Linux/Gtk-based PDA. Mono and Gtk# work out of the box on it.

    Paolo reports:

    After the Mono JIT port was done using a desktop little-endian ARM computer, Geoff just recompiled it and run it on a Linksys NSLU2 (which runs a ARM processor in big-endian mode). That was pretty cool. I wonder if it is as cool as running mono on a Nokia 770 (no recompilation necessary, just copied the binary from my Debian box). Here it is running our hello world app. Many thanks to the fine folks at Nokia for sending me a prototype so quickly.

    ...

    I made tarballs of binaries for use on Linux/ARM systems, including the Nokia 770. And, yes, Gtk# apps work fine on it:-). Happy hacking, you'll find them here.

    I added a few links and updated some on the quoted text above.

    In addition Paolo made a small video of Gtk# starting up on the Nokia, notice that it starts up very fast.

    The NSLU2 has an ARM processor running at 130Mhz. At USD 78.84 it is probably the cheapest machine to run Mono. Geoff boostrapped Mono in about 10 hours on this little machine.

    Update: Geoff reports that he un-underclocked his Linksys machine so instead of being a running at 133Mhz he is running it at 266Mhz.

    With the machine at 266Mhz compiling Mono 1.1.9 (which includes building the C runtime with gcc and compiling the C# code for the 1.x and 2.x profiles) takes about 9 hours.

    Posted on 20 Sep 2005


    Must-own book

    by Miguel de Icaza

    The new book from Brad Abrams and Krzysztof Cwalina: Framework Design Guidelines : Conventions, Idioms, and Patterns for Reusable .NET Libraries is a must-have book for anyone writing .NET and Mono code.

    I got my copy at the PDC this week and it is a wonderful book. The book includes many of the design guidelines that Brad's blog is famous for. The book is not just a collection of rules, but it also includes the rationale for some of the design decisions and what really makes the book interesting are the commentaries from other developers and architects involved in .NET.

    This book is packed with gems. I hope we can start using these more in our own code

    Oh, and I also got my copy autographed by Brad himself.

    There are slides from his session posted here. Another set of must-read slides for any developer.

    More PDC

    Am working on a larger post with all-things PDC and the Mono meeting, but it is taking me some time to digest everything I learned this week.

    Posted on 18 Sep 2005


    Mono Meeting at the PDC: Reminder

    by Miguel de Icaza

    If you are attending the PDC or you live nearby, remember that today at 6pm we are having a Mono Users Meeting a the Sheraton Downtown Hotel in LA.

    Details on the meeting are here.

    We have a few fun stories to share about the PDC, I will try to blog them later this week.

    Posted on 13 Sep 2005


    Mono Meeting at the Microsoft PDC

    by Miguel de Icaza

    Update: We had a hugely successful meeting during the PDC. I will post details after I decompress from a great week at the event.

    Mono users meeting at the Microsoft PDC.

    Date: Tuesday September 13th.

    Location: Sheraton Downtown LA hotel, a short walk (map) from the Staples Conventions Center.

    Room: Santa Monica Room.

    Time:The meeting will start at 6pm and will go until 9:30pm.

    Open to the public

    Pass the word to other fellow .NET developers.

    At the meeting we will talk about the Mono Project's current state, milestones, new developments, platform support and upcoming releases. Various Mono developers will be there to answer your questions both members of the community and Novell employees working on Mono.

    The evening surprise is the unveiling of the new Mono T-Shirts design by Finnish artist Tuomas Kuosmanen. We will be giving out t-shirts to the attendees.

    We will showcase some of the Mono-based applications we have built for Linux:

    We will also showcase the new vector-based rendering APIs available for developers (completely cross-platform) as well as the new OpenGL-based windowing system.

    We will answer your questions on how to bring your .NET applications to Linux, MacOS X and Solaris and how to take advantage of the Mono and Linux-specific APIs.

    Finally, we will demo some of the the new Mono software funded by Google's Summer of Code:

    • XBuild: the open source msbuild implementation for assisting you in rebuilding your new projects on Mono.
    • Ruby.NET and PHP.NET compilers.
    • The DIVA Movie editor.
    • The new ASP.NET editor.
    • The .NET bug finder.
    • The Cecil libraries for reading and writing CIL images.
    • Mono's XAML compiler.

    Background for the Mono Meeting

    Background: As some of you know, Microsoft for the second time in a row blocked the Mono Birds-of-a-feathers (BOF) meeting from being held at their Professional Developers Conference. It is their conference, and I understand that a cross-platform .NET implementation might make them nervous (we are creating lots of new applications with it, and we are helping people reuse their existing skills on Linux).

    It is their conference, and they have every right to control what they will allow to be shown there, but they actively have misrepresented things. On the PDC web site they claim that the BOF selection is up to INETA ( apparently an independent non-profit organization). Here is what the BOF selection process was advertised (you must have an MS Passport to read this):

    The Birds of a Feather sessions at the Microsoft PDC05 are chaired by INETA (International .NET Association), the premier .NET developer user group associations.

    [..]

    Final selection and scheduling of the sessions will be performed by INETA based on popularity: all decisions are final. Submitters will be notified by Friday September 2, 2005 whether their session was accepted or declined.

    What they failed to mention is that the Mono BOF was never listed for voting, and hence it never received a single vote. My submission was confirmed as I exchanged two emails with Stuart Celarier at Corillian, but the BOF was never listed and further emails to Stuart went unanswered, he wrote on INETA'S web site:

    INETA is chairing the Birds of a Feather track at PDC 2005. This community-driven activity brings together conference attendees for open, moderated discussions on topics of shared professional or community interest.
    [..]

    Birds of a Feather really do flock together!

    Stuart probably did not get the memo.

    My guess is that it is best not to list the BOF than have to answer obnoxious questions about why the top-voted BOF had not been accepted (this year they also removed vote count display from the BOF listing).

    So much for the independent INETA chairing the BOF process. On Friday, I was notified that my BOF proposal was not accepted.

    I believe this is at the core on what is wrong in the way that Microsoft treats its users and developers and why people consider alternatives in the first place.

    BOF sessions in every conference I have attended in the past ten years is usually an event that happens after hours and is organized by the attendees in an organic way: a white board is left open for groups to allocate an hour or two for what they consider an interesting topic. Conference organizers never have any editorial control over them, they basically give out the rooms for the various communities to get together.

    At Stephen Walli's urging we put together Mono meeting on a nearby hotel and Tuomas designed a beautiful new T-Shirt (Thanks!). It will be fun, and I will probably wear my large foam red cowboy hat.

    Anyways, its important to separate the great and amazing developers, testers and architects working on .NET from the marketing and management people. I look forward to a great time at the PDC. See you there!

    Stickers

    We want to distribute some cute stickers, an idea courtesy of Mike Shaver's: something like this:

    "[Logo] using Mono;"

    Picture this with me: Black background, yellow letters, nice cute Mono logo outline. I think it will look lovely.

    Small stickers to put on badges and medium size for laptops. If you know someone in LA or Boston that can get this done quickly and before the PDC, let me know

    Posted on 06 Sep 2005


    Policies and Katrina

    by Miguel de Icaza

    A collection of various articles that in my opinion are relevant about policy making and the Katrina effect on New Orleans.

    First some background: The president finished his five week vacaction and went on a fundraising tour to Arizona and the west coast. He likes to keep a balanced life.

    In the meantime, as the vice president continued to enjoy his holidays the Secretary of State was spotted in New York City attending a Broadway show and going on a shopping spree:

    On Wednesday night, Secretary Rice was booed by some audience members at "Spamalot!," the Monty Python musical at the Shubert, when the lights went up after the performance.

    Yesterday, Rice went shopping at Ferragamo on Fifth Ave. According to the Web site www.Gawker.com, the 50-year-old bought "several thousand dollars' worth of shoes" at the pricey leather-goods boutique.

    A fellow shopper shouted, "How dare you shop for shoes while thousands are dying and homeless!" - presumably referring to Louisiana and Mississippi.

    The woman expressing her First Amendment rights was promptly removed from the store.

    Billmon:

    Paul Krugman's column in yesterday's New York Times argues that the Cheney administration's lackadaisical response to Hurricane Katrina is a symptom of a much larger problem -- the GOP contempt for government:

    At a fundamental level, I'd argue, our current leaders just aren't serious about some of the essential functions of government. They like waging war, but they don't like providing security, rescuing those in need or spending on preventive measures.

    I was thinking about posting something along those same lines -- along with a modest proposal to chaingang all the conservative pundits and politicians who've spent the past twenty five years trashing the federal government, and put them to work stacking sandbags down in Louisiana. And while we're at it, we could take all the think-tank libertarians and corporate bunko artists who promised us their blessed free market could and would solve all human problems, and use them as filler for the sandbags.

    Two Americas:

    Local National Guard are serving in a President's war of choice. People in trouble need them here.

    Molly Ivins states:

    Just plain political bad luck that, in June, Bush took his little ax and chopped $71.2 million from the budget of the New Orleans Corps of Engineers, a 44 percent reduction. As was reported in New Orleans CityBusiness at the time, that meant "major hurricane and flood projects will not be awarded to local engineering firms. Also, a study to determine ways to protect the region from a Category 5 hurricane has been shelved for now."

    Dave Winer:

    Comment: The writer above is absolutely correct that, if we were prepared, the response to the aftermath of Katrina would be further along by now. Responsibility however is not with the administration, it lies with the electorate. We had a chance to make last year's election a referendum on the politics of terrorism, to seriously evaluate our preparedness, if we really cared.

    If anything is learned from this, we have to think, we can't delegate. We need leadership that cares, not in a superficial way. That leadership must come from us. We have some very huge decisions to make right now, and many thousands of lives depend on how well we do. That said, I have few ideas of things we can do other than give money to relief agencies, which of course, we are doing.

    Molly Ivins echoes the need to care about politics:

    To use a fine Southern word, it's tacky to start playing the blame game before the dead are even counted. It is not too soon, however, to make a point that needs to be hammered home again and again, and that is that government policies have real consequences in people's lives.

    This is not "just politics" or blaming for political advantage. This is about the real consequences of what governments do and do not do about their responsibilities. And about who winds up paying the price for those policies.

    Maureen Dowd says:

    Stuff happens.

    And when you combine limited government with incompetent government, lethal stuff happens.

    Others are a bit harsher, but still correct.

    An open letter to the president:

    Any idea where all our helicopters are? It's Day 5 of Hurricane Katrina and thousands remain stranded in New Orleans and need to be airlifted. Where on earth could you have misplaced all our military choppers? Do you need help finding them? I once lost my car in a Sears parking lot. Man, was that a drag.

    Also, any idea where all our national guard soldiers are?

    [...]

    And don't listen to those who, in the coming days, will reveal how you specifically reduced the Army Corps of Engineers' budget for New Orleans this summer for the third year in a row. You just tell them that even if you hadn't cut the money to fix those levees, there weren't going to be any Army engineers to fix them anyway because you had a much more important construction job for them -- BUILDING DEMOCRACY IN IRAQ!

    The president tried to use the "nobody expected this" excuse. Dave Winer has collected some evidence that the problems in New Orleans were well known.

    CNN ripped each one of the excuses from the Homeland Security Secretary.

    In the meantime, operation scapegoat is in full swing. Joshua explains this succinctly:

    Now at least we have the storyline. The Bush administration wasn't caught sleeping on the job while New Orleans went under with a gutted FEMA run by a guy who got fired from his last job policing horse shows. In fact, according to the new White House storyline, the governor of Louisiana and the mayor of New Orleans didn't ask for help quickly enough. And the White House was powerless to act until they did. Apparently they couldn't even reschedule the president's vacation until the locals got the right forms signed.

    The Independent hosts some questions and answers:

    Why has it taken George Bush five days to get to New Orleans?

    How could the world's only superpower be so slow in rescuing its own people?

    Why did he cut funding for flood control and emergency management?

    Why did it take so long to send adequate National Guard forces to keep law and order?

    How can the US take Iraq, a country of £25m people, in three weeks but fail to rescue 25,000 of its own citizens from a sports arena in a big American city?

    Click for the answers

    Billmon points out that this disaster is similar to the 1927 flood of New Orleans and quotes some 1927 newspapers and photographs

    Greg Palast on the 1927 floods and the rise of the government for the people:

    There is nothing new under the sun. In 1927, a Republican President had his photo taken as the Mississippi rolled over New Orleans. Calvin Coolidge, "a little fat man with a notebook in his hand," promised to rebuild the state. He didn't. Instead, he left to play golf with Ken Lay or the Ken Lay railroad baron equivalent of his day.

    In 1927, the Democratic Party had died and was awaiting burial. As depression approached, the coma-Dems, like Franklin Roosevelt, called for balancing the budget.

    Then, as the waters rose, one politician finally said, roughly, "Screw this! They're lying! The President's lying! The rich fat cats that are drowning you will do it again and again and again. They lead you into imperialist wars for profit, they take away your schools and your hope and when you complain, they blame Blacks and Jews and immigrants. Then they push your kids under. I say, Kick'm in the ass and take your rightful share!"

    Huey Long laid out a plan: a progressive income tax, real money for education, public works to rebuild Louisiana and America, an end to wars for empire, and an end to financial oligarchy. The waters receded, the anger did not, and Huey "Kingfish" Long was elected Governor of Louisiana in 1928.

    At the time, Louisiana schools were free, but not the textbooks. Governor Long taxed Big Oil to pay for the books. Rockefeller's oil companies refused pay the textbook tax, so Long ordered the National Guard to seize Standard Oil's fields in the Delta.

    Billmon points out that the US is capable of deliverig efficient relief efforts Where there's a Will. He presents various newspapers quotes from 2004 and Florida:

    So you can see that when the chips are down, and the need is absolutely dire, this administration can still deliver the kind of coordinated emergency response that once made the U.S. government the envy of the world -- just as it cooly and capably protected the Iraqi Oil Ministry from the chaos and looting that trashed every other government office in post-invasion Baghdad. As is usually the case in public service, it's just a matter of having the right incentives.

    The comparison between the TLC showered on Florida last year and Bush's initial "What, me worry?" response to this year's disaster no doubt will go unnoticed by the amnesia patients in the corporate media. And since I'm lucky enough to live in a swing state that is also coveted by GOP political strategists, I probably don't have to worry about it either -- that is, as long as any future disasters around my neck of the woods happen in one of those years divisible by two.

    But for the citizens of staunch, deep red Mississippi and slightly less staunch but still red Louisiana, the lessons are painfully obvious. If you're going to insist on living in a hurricane alley, then you need to take personal responsibility for your own actions, stop whining about government incompetence, and embrace the free market solution to your problems -- by moving to Florida.

    On Rebuliding New Orleans:

    Long before Katrina, New Orleans was hit by a hurricane of poverty, racism, disinvestment, deindustrialization and corruption. Simply the damage from this pre-Katrina hurricane will take billions to repair.

    Now that the money is flowing in, and the world's eyes are focused on Katrina, its vital that progressive-minded people take this opportunity to fight for a rebuilding with justice. New Orleans is a special place, and we need to fight for its rebirth.

    [..]

    No sane person should classify someone who takes food from indefinitely closed stores in a desperate, starving city as a "looter," but that's just what the media did over and over again. Sheriffs and politicians talked of having troops protect stores instead of perform rescue operations.

    Images of New Orleans' hurricane-ravaged population were transformed into black, out-of-control, criminals. As if taking a stereo from a store that will clearly be insured against loss is a greater crime than the governmental neglect and incompetence that did billions of dollars of damage and destroyed a city.

    The press has not noticed where the real looting is going on:

    President Bush yesterday told ABC-TV, ''there ought to be zero tolerance of people breaking the law during an emergency such as this, whether it be looting or price-gouging at the gasoline pump or taking advantage of charitable giving or insurance fraud.''

    [..]

    In a thinly disguised attempt to act as if it cared about the people wading in the water, Chevron has pledged $5 million to relief efforts. ExxonMobil and Shell have pledged $2 million apiece. British Petroleum and Citgo have pledged $1 million each.

    Those disciplined operating practices are hardly confined to the oil fields. Everyone knows that Bush does not really mean what he says about price-gouging at the pump, since he just gave energy companies the bulk of $14.5 billion in tax breaks in the new energy bill. Surprise, surprise. In Bush's two elections, oil and gas companies gave Republicans 79 percent of their $61.5 million in campaign contributions, according to the Center for Responsive Politics.

    If Bush really meant what he said, he would call for a freeze or cap on gasoline prices, especially in the regions affected most dramatically by Katrina. He would challenge big oil to come up with a much more meaningful contribution to relief efforts.

    Insurance companies are expecting up to $25 billion in claims from Katrina. For ExxonMobil, which is headed to $30 billion in profits, to jack up prices at the pump and then only throw $2 million at relief efforts is unconscionable.

    Jamie has several other updates.

    Posted on 04 Sep 2005


    Building a new Arc

    by Miguel de Icaza

    The Jesus General makes an appeal to the Gates Foundation to rebuild Noah's Arc given that the Foundation is funding the Discovery Institute to promote ``intelligent design'' (through CrooksAndLiars).

    Update: A reader comments that the funding to the Discovery Institute is for project Cascadia for transportation alternatives in the Northwest. Seems like that ruins the fun of the Jesus General post.

    I enjoy reading the Jesus General: `An 11 on the Manly Scale of Absolute Gender'.

    In the meantime, one of my favorite BillMon's is his post: "Bring Me the Head of Hugo Chavez".

    Airlines

    I just got an email from one of the Airlines I fly on notifying me of a terrific opportunity: they will now have more seats in coach. In the email they seemed to be pretty psyched about it. I mean, really excited about it they even mention that they will continue to provide snacks.

    Meanwhile I was thinking `There goes the legroom'.

    Posted on 30 Aug 2005


    Iterators and Efficient Use of the Thread Pool

    by Miguel de Icaza

    The new HTTP application pipeline in Mono is in my opinion a beautiful work of art. Let me explain.

    The HTTP application pipeline processes an incoming HTTP request. When the request comes in it has to go through a number of steps before the request is actually handed over to the developer code: authentication, authorization, cache lookup, session state acquisition. There are a similar set of steps processed after your code is complete.

    The runtime by default provides a few modules. These are listed in the machine.config file in the <httpModules> section. Mono by default includes: FormsAuthentication, UrlAuthorization, Session and the OutputCache modules. These hook up to one or more of the stages in the application pipeline.

    These stages are part of the HttpApplication class. You typically have one of these per "directory" where you have deployed an ASP.NET application. As a developer, you can hook up to various points in the processing pipeline. For example, you could add your own authentication system by listing a dynamic module in the web.config file, and then hooking up to the processing pipeline:

    	app.AuthenticateRequest += my_authenticator;

    Now, typically when processing a request the various hooks are invoked synchronously: one after another. But in some cases your hook code might want to perform a lengthy operation, for example contacting a remote authentication server. Instead of blocking the executing thread, you want to queue the work using the CIL asynchronous framework and release the current thread from its duties so it can be used to process another request. To do this, you must register your hook using a different API:

    	app.AddOnAuthenticateRequestAsync (begin_authentication, end_authentication);

    Where begin_authentication is the method that will initiate the authentication asynchronously and end_authentication is the method that will be invoked when the asynchronous operation has completed. As I said before, while the asynchronous operation is pending the thread should be returned to the threadpool so it can handle the next request. When the asynchronous operation is completed it will be queued for execution again and when a thread becomes available it will execute the completion routine and resume execution.

    The challenge is that you might have both synchronous and asynchronous hooks in a given application and also that at any stage the pipeline can be stopped (for example if authorization failed).

    Now the challenge was to come up with a maintainable and clean design for the application pipeline. Here is where iterators came into play. The first step to make this simple was to treat all asynchronous registrations as synchronous at the event layer:

    	//
    	// AsyncInvoker is merely a wrapper class to hold the `b' and
    	// `e' events, it does not actually invoke anything.
    	// 
    	public void AddAsync (BeginEventHandler b, EndEventHandler e)
    	{
    		AsyncInvoker invoker = new AsyncInvoker (b, e);
    		Hook += new EventHandler (invoker.Invoke);
    	}

    The Pipeline is written like this:

    	IEnumerator Pipeline ()
    	{
    		if (Authentication != null)
    			foreach (bool stop in RunHooks (Authentication))
    				yield return stop;
    
    		if (Authorization != null)
    			foreach (bool stop in RunHooks (Authorization))
    				yield return stop;
    
    		[...]
    		
    		done.Set ();
    	}

    Now the trick is how to implement RunHooks which takes a list of events, here it is:

    	IEnumerable RunHooks (string stage, Delegate list)
    	{
    		Delegate [] delegates = list.GetInvocationList ();
    
    		foreach (EventHandler d in delegates){
    			if (d.Target != null && d.Target.GetType () is AsyncInvoker){
    				AsyncInvoker ai = (AsyncInvoker) d.Target;
    
    				ai.begin (this, EventArgs.Empty, resume, ai);
    				yield return false;
    			} else 
    				d (this, EventArgs.Empty);
    
    			if (stop_processing)
    				yield return true;
    		}
    	}

    Notice that we basically are using nested yield-based enumerators. The return value from "RunHooks" indicates whether the pipeline must be stopped (true) or not (false). RunHooks will execute as many synchronous operations as it can in order until it finds an asynchronous operation. At that point it initiates the operation calling the "begin" method and then it yields the control. The control is transfered to the Pipeline method which also yields and returns control to the caller.

    The pipeline is kicked into action by:

    	void Start (object callback)
    	{
    		done.Reset ();
    		pipeline = Pipeline ();
    
    		Execute ();
    	}

    Now the actual processing engine lives in the "Execute" method:

    	void Execute ()
    	{
    		if (pipeline.MoveNext ())
    			if ((bool)pipeline.Current){
    				Console.WriteLine (prefix + "Stop requested");
    				done.Set ();
    			}
    	}
    
    	// This restarts the pipeline after an async call completes.
    	void resume (IAsyncResult ar)
    	{
    		AsyncInvoker ai = (AsyncInvoker) ar.AsyncState;
    		if (ai.end != null)
    			ai.end (ar);
    
    		Console.WriteLine (prefix + "Completed async operation: {0}", ar.GetType ());
    		Execute ();
    	}

    Execute is basically using the IEnumerator interface directly while the Pipeline method uses the conveniece foreach method that iterates over every step.

    The complete sample can be obtained here. This is the prototype I used as a proof of concept. The actual implementation (with different routine names) that we landed on System.Web is more complete is available here (you must scroll down).

    At 1000 lines of code for the full file its one of the clean and small hacks that am most proud of.

    Posted on 28 Aug 2005


    George Galloway in the US

    by Miguel de Icaza

    George which kicked ass on his US Senate declaration and did not let any of the smears stick is touring the US.

    Am sadly going to miss him in Boston as am out of town on September 13th, but maybe I will catch up with him later on his US Peace Tour.

    Posted on 27 Aug 2005


    Mono Happenings

    by Miguel de Icaza

    Ports: August has been a good month for Mono ports. Zoltan has completed the JIT port to the IA64 platform, another 64 bit port of the Mono VM. Wade has made some RPMs based on a CVS snapshot that you can install on SLES9/IA64 (Update: Link to an external site with the snapshots).

    In the meantime Paolo has made significant progress on the ARM JIT port. It is now running on both little-endian and big-endian machines. Geoff even managed to build Mono and run Mono on his 133 Mhz Linksys machine

    Plenty of progress on the students from Google's Summer of Code:

    XBuild: Marek reports that his implementation of msbuild (xbuild) is now able to compile itself. Congratulations!

    ASP.NET Editor: Michael has merged Blago's code into the ASP.NET editor and it is now possible to create ASP.NET controls and also edit the HTML with the Mozilla editor. You can see his screenshot here. The code is available from SVN from the module `aspeditor'.

    XAML Compiler: Iain has reached feature completion on his XAML compiler.

    Bug Finder: Aaron report talks about some real bugs being found by his bug finding tool. His bug finding tool uses the Cecil library to read the metadata and analizes the program for known mistakes that developers incur on.

    DIVA: This is probably the flashiest and most visual of all the summer of code projects. This is a video editor that uses GStreamer. I recommend you read Michael's blog which is gives a detailed description of his progress and has various videos of the various UI widgets he has created to create an open source video editor with Mono and Gtk#. Michael just integrated Mono.Cairo into his application to polish various of his widgets.

    Compilers: Florian assisted Cesar in various JScript tests and the results are very promising. Mono's JScript compiler is passing more and more of the Rhino tests. Jaen checked in his Ruby.NET compiler into the repository and Florian has been assisting a bit. Discussion is happening on the #ruby.net channel on irc.gnome.org.

    Work on GCC CIL has made great progress but suffered a set back as Jey broke his wrist this week.

    And finally PHP.NET is on schedule to complete the goals that Raffa signed up for in the summer of code. He will continue working on the other milestones as part of his university work after the summer is over.

    Cecil: Cecil continues to make progress. The best way of tracking Cecil progress is on JB's blog. It is now capable of writing assemblies and hopefully soon we can start on the Mono diet linker.

    Monodoc: has received plenty of improvements: now it uses Mozilla, has font changing features, can summarize contributions, supports CSS rendering and integrated Lucene indexing to search the contents of documentation.

    DataGrid: Pedro continues to make progress on the Winforms DataGrid widget. His code hopefully can soon go into SVN.

    ASP.NET: We just landed a large patch to our implementation of ASP.NET.

    Libgdiplus: Now that Cairo 1.0 and the API is frozen we ported Libgdiplus to use the new version of Cairo. The code is almost ready to be landed on the main branch but there are a few loose ends still required before we commit it. The good news is that Windows.Forms applications are now significantly faster.

    MSDN Browser: Ben wrote a beautiful piece of code: a Gtk# client application for browsing MSDN documentation. The beauty? 220 lines of C# take a look at it and marvel at all the features Ben is using.

    IronPython: Zoltan has fixed pretty much all bugs in Mono that prevented Mono from running IronPython 0.9 and its included regression test suite. We have identified a couple of problems that still must be fixed, but hopefully they will be in place by the time we release Mono 1.1.9.

    MCS Just when we thought that we were done with the C# compiler Microsoft rectified a problem in the Nullable Types specification. We are all glad that they did and Hari is working on fixing this. In the meantime Marek and Atsushi continue on a quest to eliminate MCS bugs and to make the compiler stricter and more useful.

    There is one regression in the usefulness of mcs that I have noticed recently. In the past the compiler would continue reporting errors for other problem areas in your source, but now it stops too early. Way too early. So when you have been hacking for a few hours straight you might need a few builds to get all the errors ironed out. You always do, but we used to need less.

    The problem originates in that in a few places in the compiler we decided that if we can not compile a chunk it was best to stop processing and not continue as the compiler might depend on the types being defined and that might cause the compiler to crash. At the time, I felt that it was best to stop the compiler, but now am thinking that maybe we would serve our users best if we coped with incomplete trees in the compiler and produce more errors. It wont be easy to change this though.

    Posted on 27 Aug 2005


    PDC, take two

    by Miguel de Icaza

    Stephen Walli an ex-Microsoftie weights in on the Mono BOF at the PDC:

    They published the CLR and C# language specifications as international standards through ECMA and ISO, but it still looks like a proprietary controlled technology to the customer base. Standards are a message in the marketplace that encourage multiple implementations. As long as there is only one commercial implementation, there is no standard, and the customers know it regardless of the number of trees killed to produce specifications.

    He goes on saying that we should take our impromptu gathering beyond the hallway meeting into something larger:

    Instead of gathering in a hallway like stubborn refugees, get a meeting room in a neighbouring hotel, or take over a bar like a Dick's Last Resort.
    [..]
    Hand everyone a copy of the latest SuSE distribution, and whatever Mono tools can be put together. Hand out t-shirts to the first 100 people through the door and make them GREAT t-shirts.

    Posted on 27 Aug 2005


    Jon Stewart

    by Miguel de Icaza

    Last night's Jon Stewart show kept me on the brink of suspense since Jon announced that Christopher Hitchens would be the guest on the program. Hitchens being probably the best informed person and probably the only articulate person backing up the war on Iraq is a difficult bone to chew, and I knew this was going to be an interesting interview.

    Jon sometimes chooses to not confront head-on his guests on the show when they representing dissenting ideas. With Hitchens it was different, he asked directly "explain to me why I am wrong" and had the best comments on the debate.

    The episode was fantastic, if you missed it Crooks and Liars has the interview and in my opinion one of the best openings on talking points.

    My other show

    Nat recently introduced me to Discovery Channel's Mythbusters a TV show that looks at urban legends and looks at how plausible those myths really are. Am hooked on it.

    English

    Not being a native speaker means that sometimes my spelling is not great. I depend on Emacs ispell and Evolutions speller for many things, but recently I have started using Google's "define:word" to look up word definitions. Its just two keystrokes away: C-j define:word ENTER.

    Posted on 27 Aug 2005


    Mono Meeting at the Microsoft PDC

    by Miguel de Icaza

    There are many new things in the new Mono that are worth showing and talking about to folks at the PDC this year.

    Am afraid this year the Mono BOF will not be accepted again at the Microsoft PDC. My submission was reviewed on Tuesday and it has still not shown up in the voting list for BOFs, chances are voting for it will only happen (if it happens at all) on Saturday/Sunday, clearly the worst days to get any votes on.

    At the last PDC the Mono BOF had the largest number of votes when half the spots were still available and it got dropped out of the list. When I asked the various people in charge what happened they kept pointing fingers at someone else until it reached full circle. Nobody could tell me why the most voted BOF proposal did not get selected. I would be happy with an honest answer even if it is "We do not want to promote open source/Mono/Novell" instead I heard a number of variations on "The problem is that `New frontiers for 6502 assembly language in the copy-editing industry had more votes'" (it didnt).

    Anyways, this PDC ts looking just like the last one. So it is time to get ready for a Mono meeting like we hadthe last time: in the middle of the hallway. Last time we picked a spot in the middle of two concourses which had enough space and chairs to hold our meeting (about 80-100 people). I will do some scouting on Monday and find a good spot and a good time to hold the meeting and announce a meeting place here.

    If you get to the PDC early, and you know the spot where we had the meeting the last time and you can provide directions, please email me.

    Posted on 25 Aug 2005


    Google IM

    by Miguel de Icaza

    Am on Google IM now, [email protected]

    Please only request to be added if we have IMed, talked in person or emailed each other in the past.

    Instructions for Gnome/Gaim users: here. Google's IM is based on the open Jabber protocol which not only allows for many implementations and creative uses of IM, but in addition Jabber is an interesting protocol that can be used to route arbitrary XML messages across the internet (not necessarily IM only).

    The protocol has now a big service provider with a big user base that will help realize its potential.

    Posted on 24 Aug 2005


    Meanwhile, on the other side of the planet

    by Miguel de Icaza

    Robert Fisk has gone back to Baghdad and reports in a series of articles on life outside the green zone. Fisk refuses to be an "hotel journalist" a problem that starts as he reported on his first day back in Baghdad as:

    Once you let Iraqis buy your food on the streets, tell you what people are saying, come back to you with their observations, you have entered the pointless hothouse of hotel journalism, the reporter with the mobile phone trapped in his room who might as well be broadcasting or writing from Co Mayo.

    His Pity the Nation book has many colorful stories of hotel journalism as practiced by many in the days of the Lebanon civil war: from the bar at the Commodore Hotel when things got risky to reporting on the crisis from the nearby Island of Cyprus.

    There is a new twist to "hotel journalism" as things go from bad to worse in Iraq. The Lebanon years of Hotel-journalism are gone, replaced now with Prison-journalism:

    I head off to the Palestine Hotel where one of the largest Western news agencies has its headquarters. I take the lift to an upper floor only to be met by a guard and a vast steel wall which blocks off the hotel corridor. He searches me, sends in my card and after a few minutes an Iraqi guard stares at me through a grille and opens an iron door.

    I enter to find another vast steel wall in front of me. Once he has clanged the outer door shut, the inner door is opened and I am in the grotty old hotel corridor.

    The reporters are sitting in a fuggy room with a small window from which they can see the Tigris river. One of the American staff admits he has not been outside "for months". An Arab reporter does their street reporting; an American travels around Iraq - but only as an "embed" with US troops. No American journalists from this bureau travel the streets of Baghdad. This is not hotel journalism, as I once described it. This is prison journalism.

    He has been reporting back from the streets of Baghdad since August 12. Where accidents and death are treated in a way similar to Terry Gillian's Brazil's futuristic state: fill form completely.

    Billmon predicts that the new Iraqi constitution has enough sectarian and non-secular elements that will lead to a Lebanon-like civil war. The signs are there already:

    In all - and this was only an initial count - 43 civilians were killed and more than 80 wounded in the deadliest bombing in Baghdad this month.
    [..]
    For once, it seemed, there were no suicide bombers involved, just old-fashioned car bombs, packed with explosives to kill the largest number of innocents in the least possible time.

    Most troublesome is the new culture of revenge and the new culture of kidnapping which are emerging in one of the bloodiest months of the occupation:

    "I consider this a quiet day," one of the mortuary officials said to me as we stood close to the dead. So in just 36 hours - from dawn on Sunday to midday on Monday, 62 Baghdad civilians had been killed. No Western official, no Iraqi government minister, no civil servant, no press release from the authorities, no newspaper, mentioned this terrible statistic. The dead of Iraq - as they have from the beginning of our illegal invasion - were simply written out of the script. Officially they do not exist.

    Thus there has been no disclosure of the fact that in July 2003 - three months after the invasion - 700 corpses were brought to the mortuary in Baghdad. In July of 2004, this rose to around 800. The mortuary records the violent death toll for June of this year as 879 - 764 of them male, 115 female. Of the men, 480 had been killed by firearms, along with 25 of the women. By comparison, equivalent figures for July 1997, 1998 and 1999 were all below 200.

    Fisk quotes an Iraqi on what seems obvious to anyone but the Chenney administration:
    As for the constitution, I asked an old Iraqi friend what he thought yesterday. "Sure, it'ss important," he said. "But my family lives in fear of kidnapping, I'm too afraid to tell my father I work for journalists, and we only have one hour in six of electricity and we can't even keep our food from going bad in the fridge. Federalism? You can't eat federalism and you can't use it to fuel your car and it doesn't make my fridge work."

    And then someone told me the other day, and am not kidding you "at least they have democracy now". Fisk listens to a military commander weight on the bus station bombing:

    And that night, I flip on the television again and find the local US military commander in the Sadr City district of Baghdad - close to the bus station - remarking blithely that while local people had been very angry, they supported the local "security" forces (ie the Americans) and were giving them more help than ever and that we were - wait for it - "on the path to democracy".

    You cant make stuff up like this.

    I started blogging today about Utah's events. But they now seem minor issues.

    Posted on 22 Aug 2005


    Broken elbow

    by Miguel de Icaza

    Last week I broke my elbow when I fell off my bike. The humerous "tip" got broken and required surgery and three large screws to hold it in place. I wish at least I had broken it as part of a facinating story, involving a remote country, spies and a distress call. But all I got is "I was coming back from work and fell".

    I have tried to reconstruct the tragic events of 8/12 to find the failure on the system. But I have come up empty handed so far.

    What I do know is that in the morning I used Nat's air pump on my bike and got a kick out of it. I remember thinking "I think I over inflated these bad boys".

    That afternoon after a frantic hacking expedition removing "throw NotImplementedExceptions" from our new code and filing some compiler bugs, I realized I only had 20 minutes left to meet my wife on bthe opposite side of the river.

    The lock holder had loosened up, I took the lock out and put it on my back pack.

    Within 10 meters of getting on the bike I landed emarasingly in front of a bunch of guests of the Residence Inn, the hotel next door to the office. Being the proud man that I am, I picked the bike and got moving right away, took me a while to realize that I could not move my left arm.

    My doctors have been awesome. My only complain is that I had to wait six days to get my surgery done and on the ER it took them the best part of four hours to give me a pain killer.

    I started right away my rehabilitation. Took me almost two days to get my hand to lift again, and my fingers are moving now, but they cant really exert any pressure. My nose has more strength. I also painfully learned that you are supposed to keep your affected limbs above your hearth, so even if the fingers can move (and I managed to type a paragraph the other day) I cant dfind a position that wont make my hand swell.

    This comes at a very bad time: this is the third year on a row that I have missed FooCamp; The Google sponsored Mono students are progressing by leaps and bounds on their projects, Mono is getting ported to two new platforms, Minosse was completed. and my hacking has stopped for the time being. In particular, am very proud of a new htp pipeline design that we are about to land in Mono which uses iterators extensively to maximize the use of the threadpool. Luckly it got done before the accident.

    Reading books has also slown down, its very uncomfortable so am doing most of my reading from the computer. I almost finish reading all the web.

    Posted on 21 Aug 2005


    Gtk+ and Gnome go vectorial

    by Miguel de Icaza

    The new version of Gtk+, a library used to build GUI applications on Unix and the heart of the Gnome desktop ñwas announced this weekend.

    This is a major upgrade for developers creating GUI applications for Linux and Gnome as it makes it simpler to create visually reach applications. This new version of Gtk+ is built on top of the 2D graphics engine Cairo: every widget is now written using Cairo operations and most importantly developers can now draw their own widgets using the PDF-like rendering model offered by Cairo.

    Historically, the most painful part of building Gnome applications was the drawing layer: any interesting visualization or custom widget that needed to draw had to deal with some fairly low level APIs designed in the 80's: visuals, colormaps, GCs, collor allocation, resource acquisition and release (brushes, color resources, pens, patterns). With Cairo all of these problems will become history.

    In addition to the productivity boost and the innovative potential to create visually rich applications, Cairo also brings to the end user nice touches like anti-aliased rendering for a more pleasant experience. Gtk builds on this new functionality to bring vector-based themes to the desktop as well.

    Posted on 15 Aug 2005


    iFolder

    by Miguel de Icaza

    I just noticed the new notification UI for iFolder. I love the balloon:

    iFolder now ships with a sample server for those of you not lucky enough to have your sysadmins run one. The HOWTO is here.

    Posted on 12 Aug 2005


    by Miguel de Icaza

    Posted on 09 Aug 2005


    XML do's and don'ts

    by Miguel de Icaza

    Atsushi Enomoto has a great list of hints on developers using XML and Mono's XML if they care about performance, his list is available here.

    String Collation

    Mono originally was using IBM's Classes for Unicode (ICU) library. A C library that provides many tools to handle internationalized strings (like comparing strings, finding substrings, handling case sensitivity in a culture-aware fashion) and so on.

    Basically all the managed code in Mono would call into the C runtime and the C runtime would use ICU's functionality to carry out the job. Unluckly Microsoft's behavior of the unicode operations differed from ICU implementation and the fixes that we applied in our wrapper code that use ICU were insufficient to provide the same semantics. Developers were running into various unexpected problems and erratic behavior that came out of our mapping which prompted us first discourage the use of ICU, and later to completely disable the ICU support code in Mono.

    A few months ago, Atsushi was wrapping up his work on System.XML 2.x and asked me what should he look into as his next task. I asked Atsushi to look into implementing a replacement for ICU that we could use for Mono. He took this challenge very seriously and this past week he finally landed the new string collation code in the repository.

    His latest blog post has some performance information and he links to the various posts that detail his quest into implementing string collation for Mono.

    Posted on 09 Aug 2005


    OSCON

    by Miguel de Icaza

    On Friday I will be presenting some of the recent work being done at Novell on improving Linux including Beagle, Xgl and other Mono-based applications.

    There are a few Mono sessions and a Mono BOF that am planning on attending to discuss recent developments.

    Posted on 02 Aug 2005


    Tour de Nat, part 2

    by Miguel de Icaza

    I just called Nat to go out and have brunch at Henrietta's Table in Harvard Square and a panting Nat informed me that he was biking to Provincetown and back. Unlike his last trip two weeks ago he left Boston fairly late. I just got the following SMS with Nat's current location:

    14:50: N:41.690170, W:-70.317350. 74.9 miles from home or about 100 minutes by car.

    18:21: Nat has arrived to Provincetown. The trip is one hour shorter than his last trip. Now the painful return home begins.

    Posted on 30 Jul 2005


    Embeddable C# compiler and ASP.NET hacks

    by Miguel de Icaza

    Mono's C# compiler has a fairly complete regression test suite: we routinely use mcs to compile about the two million lines of code that make Mono up but it also contains about two thousand individual positive and negative test cases.

    Since we run continuous builds of Mono to detect regressions on the code base the two thousand test cases on the compiler were starting to slow down quite a bit the regular Mono builds and the release regression test cases by quite some time.

    Faced with this problem Marek Safar, one of the main C# compiler contributors, refactored the compiler so that it could be reused as a library. Then he built a couple of drivers that would process the compiler's negative and positive tests. This reduced the time to run all the tests from about 6-8 minutes to 24 seconds.

    The time savings come from not having to restart the compiler over and over for each one of the invocations and instead just have the compiler reset at the end of each compilation and move on to the next target:

    	test-anon-28.cs...	OK
    	test-anon-29.cs...	OK
    	test-anon-30.cs...	OK
    	
    I used to relax watching the screen scroll

    The bottle-neck moved from C# to my terminal program.

    This embedding turned out to be useful for a small hack. ASP.NET invokes the compiler on a page the first time that a page is hit. When you reference an ASP.NET page like "demo.aspx" the file is compiled down into C# code, which is then passed to the C# compiler and the output is dynamically loaded into the server which in turn dispatches the request from it.

    While developing applications developers might notice a 1-2 second delay on the first hit to the page as the compiler processes the file, some months ago I cooked a patch that uses Marek's interface to embed the C# compiler directly into the ASP.NET engine (original posting, patch).

    On my machine the time went from about 1.5 second to .9 seconds to compile and load a page on the first hit.

    This patch is not very interesting anymore as ASP.NET 2.x allows for websites to be deployed by preocompiling the whole site and copying the resulting DLL.

    Posted on 28 Jul 2005


    Third Edition of C# and CLI

    by Miguel de Icaza

    The third edition of the ECMA C# language specification and the Common Language Infrastructure (CLI) have been approved by the ECMA General Assembly. Check the press release for the juicy quote from my boss.

    The updated specs are here: CLI and C#.

    The introductory chapters of the C# specification read like a tutorial. I recommend those interested in the C# language to read the first few chapters as it has most of what they need.

    Mono 1.1.8.3 includes a complete implementation of the new C# specification (written in C# of course) and our runtime contains all the new CLI features required.

    We are still missing a few new classes and new methods from the updated class libraries, these should be with us soon.

    Posted on 28 Jul 2005


    ASP.NET and scalability

    by Miguel de Icaza

    Some people have drawn the wrong conclussion about J2EE and ASP.NET in terms of scalability. All that I said on the interview is that J2EE was entrenched on a segment of the application server market, in particular in the segment where the project budgets are north of two million dollars (this is what our research a few years ago showed). My data is from the research that we did in 2003 as part of a Mono Survey that talked to various companies about ASP.NET and J2EE.

    I do not personally track carefully enough the scalability and speed claims made by the Java or .NET camps when it comes to application server performance and scalability. All that our research showed back then was that people investing those large sums of money were using a combination of expensive non-Intel hardware and were purchasing expensive application servers and suites on the high and Java had been on that market for longer than ASP.NET.

    In my subjective opinion ASP.NET is thiner, lighter and simpler to grasp than the J2EE frameworks out there.

    Posted on 28 Jul 2005


    Mono Tools

    by Miguel de Icaza

    Joe correctly points out that a major sore point in Mono development today is the lack of a functional debugger. The lack of this tool is duly noted. All we can say at this point is that progress is happening in this area.

    Joe, you might want to look into using Mono's profiler in statistical mode instead of using it on the default instrumentation mode. This is described on the man page, but here is a shorthand:

    
    	$ mono --profile=default:stat app.exe
    		
    

    In statistical mode, the program is interrupted a number of times per second and the information about the current routine being executed is gathered. This technique has a much lower overhead that tracking every entry and every exit from a routine.

    For instance, bootstrapping the C# mono compiler with or without statistic profiling takes the same amount of time to run (2.5 seconds on my thinkpad t42p) while using the default settings for the Mono profiler takes four minutes and 21 seconds.

    In addition on Linux with rtc support it is possible to set the sample rate anywhere between 64 and 8192 samples per second by setting the MONO_RTC environment variable (more details are on the manual page).

    Other tools that Mono developers should get familiarized with is the tracing facility which lets developers peak at the program execution. The tracing facility has improved in the last few months and its worth taking a look at some of its new features.

    Posted on 27 Jul 2005


    Application servers, RPC stacks and more

    by Miguel de Icaza

    Tim Anderson at ITWriting interviewed me on various subjects related to Mono: the Novell/Mainsoft collaboration on Mono; the application server space and Mono's plans in terms of Indigo.

    I would like to expand on what I said on the interview as am afraid that the relation between Mainsoft and Novell was not clear.

    Mainsoft collaboration: Mainsoft's product Grasshopper is a solution that allows .NET ASP.NET applications to run on a J2EE server by doing code translation from CLI bytecodes into JVM bytecodes. Mono allows the same, but instead of running on a J2EE server we provide an ECMA CLI execution system to execute the code.

    Although we both use different virtual machines to provide this feature, the class libraries that are used to provide the functionality are shared between Mainsoft's Grasshopper product and Novell's Mono. As of a few weeks ago we finally merged both codebases into a single tree. There are some small differences in the hosting environment which we cope with by using a number of defines: TARGET_JVM, TARGET_J2EE and in some cases a completely different implementation of the class exists (XXX.jvm.cs) which is compiled instead of the XXX.cs equivalent.

    As part of this work to integrate the and we are also integrating their build process into our continous build infrastructure to ensure that we do not accidentally break the build of the Java-version of the Mono class libraries.

    On Indigo: A lot of folks are curious about Mono's plans regarding Indigo and I have not really had an answer in the past because I had not investigated Indigo in depth.

    There are a number of issues with Indigo: the first one is that am not very well versed on all the things that Indigo has to offer, but I lament certain things about its design. In particular, in this hyped world of Services Oriented Architecture where the contract must be precisely spelled out instead of adopting an IDL-like language a meta-language built on top of sprinkling attributes left and right to decorate classes, methods and so on. This meta-language created by the sprinkling of attributes is likely more obfuscated than any possible IDL incaranation of the same idea. The fact that now interfaces are the thing to describe should have been a warning to the designers that it was probably time to look at IDL again.

    My second issue with Indigo (and in general with many of the new WS-* protocols) is that the more they evolve, the closer they look and feel like the complex high-level CORBA services. Those services that got CORBA the reputation it has today.

    In the interview I point out that Indigo is not available today as a released product and that it will take a few years before we see Indigo-based applications.

    In the meantime, ZeroC is a startup founded by some ex-CORBA people who wanted something simpler. They have a fairly interesting OO RPC system called Ice which has many of the features that application developers need today and is available on a wide range of languages: Python, PHP, C++, Java and .NET languages. You can read about how it compares to CORBA and SOAP, it is available today and its dual licensed: free for free software applications and you can obtain a commercial license for your commercial applications.

    Posted on 26 Jul 2005


    Blogging Politics

    by Miguel de Icaza

    My recent favorite is Crooks And Liars since they have copious amounts of video clips on the stories of the day.

    Duncan pointed me to a fairly thorough blogger on current events: billmon.org. in particular I liked his analysis on the recent CIA operative leak and its follow up.

    Robert Fisk

    I used to wait for Robert Fisk articles to show up on Commondreams but they do not publish all of his articles, so I became a subscriber to the Independent to read Fisk's articles.

    Today I found a site that has a little bit of a lag but seems to have a fairly good coverage of Fisk's work here. For old Robert Fisk articles robert-fisk.com has a good selection and usually has a few audio interviews.

    Posted on 17 Jul 2005


    MonoDevelop New Feature

    by Miguel de Icaza

    Lluis has landed on SVN a new feature for MonoDevelop: integrated Unit Testing.

    The integrated unit testing framework provides the same functionality that `gnunit' did, but in addition it keeps track of progress and regressions as times goes by.

    Lovely screenshots .

    Posted on 15 Jul 2005


    Monotheca

    by Miguel de Icaza

    Monotheca is a niche application for those interested in organizing their video collection but it shows the love that the author had for his trade: polished, HIG compliant, well-laid out.

    Posted on 20 Jun 2005


    Link Fest 2005

    by Miguel de Icaza

    • Michael Zucchi reimplements the IMAP backend in Evolution: I don't want to get too far ahead of myself, but it could potentially solve all the existing IMAP performance issues, well, about as well as they can ever be solved..
    • Joseph Hill on MonoLive: the new mono-live project on Novell Forge. Beyond being a source repository, the Forge has bug and feature trackers, so I hope you'll use those tools to submit your suggestions / publicly lodge all of your complaints.
    • Edd Dumbill authored a podcasting client: Unfortunately, none of the obvious Linux podcast software really fitted my needs. Either too lo-fi (bashpodder) or just completely scary (iPodder). So I started to write my own. Monopod is a simple Podcast client.
    • OpenSolaris was released last week. Glynn has a few good introductory links here.
      The source is available on Bittorrent as well.
    • Mark Fiore's's PainMan: his take on the ban of medical marijuana.
    • Sebastien Pouliot on preventing integer overflows.
    • Morten Wellinder talks about the limitations in the OASIS OpenDocument Standard.
    • Rafi Mizrahi on how to do regression tests for image libraries and his implementation for System.Drawing.
    • The Downing Street Memo: the largest embarrassment of the war on Iraq so far. The democrats met to discuss it (C-SPAN real player stream).
    • Greg Palast written testimony and a timeline with photos is here.
    • Robert Fisk asks why Saddam's interrogation was screened in silence: The pictures the BBC BBC admitted, were "mute". What in God's name did this mean? Who emasculated the BBC to such a degree that it should say such a ridiculous thing? Why were they mute? The BBC didn't tell us.
    • Robert Fisk on torture.
    • Brazil, Argentina and India stall patent reforms, demanding that any harmonization treaty include provisions on technology transfer, anti-competitive practices and safeguarding of public interest flexibilities. Go Brazil, Argentina and India!

    Posted on 19 Jun 2005


    Alan's Wedding

    by Miguel de Icaza

    This weekend we went to Alan's wedding in Cuernavaca, Mexico.

    Adri�n, Mancha, Alan, Patrick playing.

    Adri�n, Mancha, Alan, Patrick playing.

    Laura and Mancha at Breakfast

    Maria Laura and Maria Vielle.

    Posted on 13 Jun 2005


    Extending OpenOffice with Mono

    by Miguel de Icaza

    Michael provided a screenshot from the work that MartinK and himself have been doing on adding support to write extensions for OpenOffice in Mono:

    OpenOffice hosting Mono with its script.

    Laura in Porto Alegre

    With the Mono Brasil group in the FISL conference last week:

    Laura and the Mono Brasil developers.

    Posted on 08 Jun 2005


    AsyncWorkers

    by Miguel de Icaza

    Philip, C# and the CLI have built-in support for async workers. Every delegate has support for asynchronous execution with BeginInvoke and EndInvoke.

    Posted on 06 Jun 2005


    Video Blogging

    by Miguel de Icaza

    Nat: do you want me to record this?

    Robert: You are recording this.

    Nat: am not recording.

  • Video

    Robert: you are not blogging this.

  • Video

    Nat: we are traveling at one half a mile per hour.

  • Video

  • Posted on 06 Jun 2005


    Glynn's 101 Things to Know About Gnome

    by Miguel de Icaza

    Awesome presentation available here.

    Posted on 02 Jun 2005


    Scripting Evolution with C#

    by Miguel de Icaza

    Michael Zucchi brings us C# bindings for Evolution.

    Look at his incredibly cute program.

    Posted on 01 Jun 2005


    "Thank God the French had the Common Sense to Read the Document"

    by Miguel de Icaza

    Confused about the EU constitution?

    Typically, we think of a constitution as a document that embraces the highest ideals of a people; laying out clear guidelines for safeguarding civil liberties and the rule of law; not a compendium of perks for big business and their cronies in high finance. The EU constitution simply hands over more power to an ``unelected'' class of euro-parasites who want to suck the life out of the social welfare system that has raised the standard of living for the middle class to the highest in the world. The French were smart enough to say, ``non!''

    From here. It is a fun read.

    Posted on 31 May 2005


    Mono and Wikipedia

    by Miguel de Icaza

    As of last Friday, Wikipedia started using Mono for indexing and searching the Wikipedia, it was tested first on one server and it is now being used on all three servers.

    Wikipedia's search backend uses Mono and dotLucense, the same search backend that is used by Beagle Desktop Search. Previously, Wikipedia had been using GCJ and Lucene to do the searches but after some tuning, Mono became the new engine.

    Mono 1.1.6 which was the originally tested configuration was slow, but version 1.1.7 introduced our simplified IO layer which improved IO performance significantly (2x-3x) and upcoming versions will an extra boost on IO, but most importantly the regular expression library (which MediaWiki uses) will also get a performance boost.

    Mono: Debian and Ubuntu.

    Mono is now on Debian/Unstable.

    The details about this adoption are here.

    Mark Shuttleworth announced today at his keynote in Guadec that Mono had been integrated into Ubuntu. He is looking forward to integrate IronPython into the distribution as well.

    Usability in Gnome

    Calum, I think I mentioned that Sun did usability studies, but I should probably stressed that more. I was refering mostly to the fact that we sometimes argue about usability, but do not have the data to back it up.

    I will be eternally grateful to Sun's work on Gnome usability testing and of course its code contributions.

    Posted on 30 May 2005


    Best Guadec Ever

    by Miguel de Icaza

    This year's Guadec conference has been amazing. The organization has been fantastic, the volunteers great and the talks superb. All of the rooms are packed. Non-stop talking with people all day. Best demos ever.

    Immendio, Fluendo and Movil (sp) are significant players at this conference. And the Nokia devices are very cute.

    Am exhausted, going to sleep.

    Posted on 29 May 2005


    Ulrich Drepper

    by Miguel de Icaza

    Duncan today pointed me to Ulrich Drepper's blog (Libc and binutils hacker).

    McVoy and Innovation

    Just last night I was writing a response to his quote on MIT Tech Review but decided to finish it another day just to find this morning that he now has a longer rant in Forbes magazine, as incorrect and as naive as the Tech Review quote.

    Will post from Germany my reply.

    Posted on 26 May 2005


    Nokia and Gnome

    by Miguel de Icaza

    The big news of the day is that Nokia has released their internet tablet. Effectively a tiny handheld computer based on Linux, Gtk+, an Opera/Gtk+ and GStreamer (I previously stated that they used WebCore/Gtk+, but I was wrong).

    The developer site is very interesting:

    This is the first mass-market use of Gnome technologies, this is *very* exciting.

    Of course, its only missing Mono for extended productivity.

    Posted on 25 May 2005


    Lame Blog Gets 20 Lines of Changes

    by Miguel de Icaza

    LameBlog is 5% better today. It now supports multiple-posts per day, and uses the file time for the timestamp, includes prev/next navigation and it sucks 1% less.

    Posted on 24 May 2005


    New home

    by Miguel de Icaza

    I moved my blog to a new domain, it is now on a spicy new domain.

    Posted on 24 May 2005


    Dissent like its 2005

    by Miguel de Icaza

    Check ChomskyTorrents for your dissenting needs in torrent form.

    Update: Fixed the previous link.

    Nina Simone

    Maria Laura just introduced me to Nina Simone, wonderful.

    Galloway's Transcriptn

    An transcript of the amazing declarations of George Galloway in the US Senate: here.

    Update: Even better, there is a video.

    Ex-UN weapons inspector Scott Ritter talks about the background of the hearing.

    Posted on 23 May 2005


    Cross Language Integration

    by Miguel de Icaza

    Lluis S�nchez from the Mono team on his blog produced two screencasts: (first and second) which demostrate how Mono allows code written in C#, Boo and Java to work transparently with each other.

    The demo shows:

    • The latest MonoDevelop IDE in action: creating a project made up of components and libraries written in multiple languages.
    • Three different languages consuming the Gtk# API.
    • The Mono Debugger in action. The debugger is a library and there are two front-ends that consume this library: a GUI front-end as seen on this screencast and a command-line front-end.
    • MonoDevelop's new templates for Boo and Java.
    • Three different languages instantiating and inheriting code from another language.

    The Java magic is achieved through IKVM and the GNU Classpath.

    Read Lluis' blog for more information on the futures for MonoDevelop.

    The screencasts: first and second.

    Enlightenment#

    Hisham has been working on Mono bindings for the Enlightenment (EFL#). You can find the bindings on the module "efl-sharp" on our repository.

    Better Late than Never

    Found about the existance of ccMixter: the Creative Commons site for sampling, mashing and sharing music.

    Old iPod

    I found a use for my old ipod. It will become a Linux-powered voice recorder.

    Zoltan Takes on the The Last Frontier

    Zoltan, hacker extraordinaire, has embarked on the last frontier.

    Posted on 17 May 2005


    Stuttgart, Pilsen, Prague, Paris

    by Miguel de Icaza

    I will be doing two keynotes at Guadec in Stuttgart and at the .NET Technologies in Pilsen.

    I have strategically placed a few cities on this Eurotrip to visit some friends and meet with some developers in the way. If you want to join me for lunch, dinner to discuss Mono, .NET, Gnome, free software or Linux write me an email to my gmail account [email protected].

    The dates are as follows:

    Update: Sorry about the dates. A bug in my brain prevented me from incrementing the month to June. The dates above have been fixed.

    Spec#

    A few new ideas for C# are being tried out on Spec#. It is taking steps into building tools to prove the correctness of the code. This is done by integrating into the language things like pre-conditions, post-conditions, object invariants, non-null types and checked exceptions. A separate tool is later used to do a lint-like process on the program.

    File Systems in C#

    You can now write your own user-level file system in C# bindings are here

    Paco, r0ml, Stephen in Boston

    Tonight Ben and myself had dinner with Paco, r0ml and Stephen which all happen to be in town this week. Sadly I did not take any pictures, but Paco might have some images to share later on.

    It was one of the most fun dinners I had in a while everyone had tons of stories to share. We went to Casa Romero one of my favorite restaurants in Boston. Ben ordered "shrimp with something". Only later he learned that "something" was a sauce of corn parasites. He seemed to like it.

    Only today I found that r0ml's not only had a blog, but he was raised in Brazil as a kid. His portuguese is vastly superior to mine, even after having being married to a brazilian for almost two years.

    Posted on 13 May 2005


    Open Source Java, part 2

    by Miguel de Icaza

    After my post on Apache's Harmony project I have been watching the fireworks on the blogs and the mailing lists. One thing is clear: nobody quite knows what Harmony is supposed to be.

    There are pros and cons. The main pro is that I discovered the BileBlog, a modern-age blog that reads like a good Jamie Zawinski opinion. In particular the flame about project Harmony is gem.

    Unlike Mono, open source Java faces a big problem: there are a number of free commercial Java runtimes available for every operating system that matters. The group of people who would have contributed to a free java to scratch an itch are gone. From those who remain another large chunk will switch in a heartbeat to a commercial implementation the moment they run into missing features, scalability issues, the lack of a moving GC or a hard to debug problem.

    So you must rely purely on free software advocates or people employed to clone Sun's Java for a strategic purpose.

    To illustrate my point: Mark reports that for the two months leading to May 7th GNU Classpath had 299 commits and today is made up of roughly 900,000 lines of source code. Mono in the same time frame had 985 commits to its core class libraries and has roughly of 1,600,000 lines of code. The previous count is only for the core class libraries and does not include Mono-specific or Gnome-specific class libraries. The Mono effort is also three years younger than Classpath and five years younger than Kaffe.

    For an open source Java effort to succeed, it not only needs to match the functionality of Sun's Java first, but it must offer functionality that is not available anywhere if it wants to attract developers to its core. Today there are probably two openings in this area. IKVM which makes Java and .NET run side-by-side and GCJ which turns Java code into native code.

    Java and C#, CLI and JVM

    Havoc last post bounces across every possible point.

    I was not going to enter the language discussion on PlanetGnome, because it touches on too many topics. For one, I think that:

    • Some key libraries must remain written in C. And we (The Mono Group) have a very good framework for binding GObject-based APIs into Mono APIs.
    • We have a tendency to dump things into a library and hoping that every application will use the library to gain consistency.
      For example, recently a user mailed me to point out that although he can browse his files on a SMB share, he can not actually use any of his local tools to manipulate these files. It turns out that instead of doing the obvious thing, which was to ask the kernel to mount the file system the path we went down on was to use the Gnome-VFS to provide an SMB transport. And this works beautifully with the Gnome tools, but it does not work with any other tools.
    • Mono right now shines as a platform for developing desktop applications, and we want to make sure that the developer experience there is great. Once we have conquered that space, we can organically reach into other spaces, but lets first get the first generation of Mono-based GNOME applications rock solid and shipping.
    • I would very much like Mono-based applications to be part of the standard Gnome desktop release and get the stamp of approval of the Gnome Foundation. There is no mandate that all distributions must ship all the packages, so Red Hat can just not ship this.

    I think my comments echo Mikael's post, which both Jeffrey and Havoc seem to have missed.

    I wanted to follow up on a few things that Havoc mentioned:

    • Graydon's contrast of Java and C# GUI code is a passable rendering of Java source code into C#, but is hardly an analysis of the technical issues.
      For an actual technical technical contrast there is Dare's C# for Java programmers document and the eight-part interviews with Anders Hejlsberg.
      Last year I was invited to present to the Red Hat Java summit in Boston. My presentation at the time focused on teaching to a Java-savvy audience the differences between the languages Java and C# and the JVM and the CLI, I have uploaded the slides here.
    • The same universe of open source libraries being furiously developed for Java are being developed for .NET. Either direct ports, or re-implementations of the same concepts.
      Mind you, a lot of these open source technologies under development for Java and .NET give me a Freshmeat.net-deja vu. I still fail to see the correlation between all this server code and the Gnome desktop.
    • I can only smile when I see that Havoc tells people to try Java 5 as an alternative to Mono. Specially considering that any use of Java 5 features will likely lock people into using Sun's proprietary Java.

    Posted on 11 May 2005


    Innovation

    by Miguel de Icaza

    Jamie correctly points out that the idea of having the search functionality present at all times without popping up an annoying dialog box predates Firefox, it has been availble on Emacs and XEmacs forever:

    Emacs search functionality is also a bit more evolved at this point than Firefox (in an Emacs kind of way). Anyways, I can not wait for more desktop applications to use this model for searches.

    Mono's Performance

    Gonzalo has posted some details on the evolution of Mono's performance for WebForms and WebServices here.

    Summary: Loading a test that shows a directory listing without any caching enabled has gone from 30 requests per second a year ago to 155 requests per second as of Mono 1.1.7. Check the details on the incremental improvements that got that performance.

    Posted on 10 May 2005


    National ID card in the US

    by Miguel de Icaza

    Some folks are opposing the national ID card in the US, for more details see the UnrealID.com web site. A FAQ is available from News.com. BoingBoing has a call for action.

    To get the law approved, legislators used a clever hack: the actual RealID thing is not being discussed or debated, instead it was just hidden inside another piece of legislation which will likely get approved (some military budget).

    Bruce Schneier, security and cryptography expert also has some negative things to say about the plan, but focuses more on the lack of security that this will bring and comments on the legislative hack:

    If you haven't heard much about REAL ID in the newspapers, that's not an accident. The politics of REAL ID is almost surreal. It was voted down last fall, but has been reintroduced and attached to legislation that funds military actions in Iraq. This is a "must-pass" piece of legislation, which means that there has been no debate on REAL ID. No hearings, no debates in committees, no debates on the floor. Nothing.

    ID cards have successfully been used in totalitarian regimes to impose the will of those in control. Am not saying this will be the case in the US, but I figured I might share some perspective:

    • In Lebanon they were effectively used to identify the opposition and carry massacres effectively (both major groups: christians and muslims).
    • If you saw "Hotel Rwanda" you probably saw the checking of the national ID document to sort out your ethnic affiliation and how folks dealt adequately with people.
    • In Military-Dictatorship Latin America, National ID documents were imposed to keep track of those who opposed the dictatorship: Trouble makers, haters of the freedom to do what they are told (Argentina, Brazil, Chile and Franco's Spain).

    Of course the situation is not the same in the US. In Lebanon people are pretty much "born" into their political party, as their political party is very much tied to the religion.

    Probably other developed nations of the world have National ID documents and they have been very happy with it, I have probably not paid attention to those.

    My point is that its a resource easily abusable by those in control. If you care about these issues, you got less than 48 hours to call your representative.

    Posted on 09 May 2005


    Fafblog and the Medium Lobster on Revisionism

    by Miguel de Icaza

    Very amusing: the Medium Lobster sets the record straight on the invasion of Iraq.

    Also from Fafblog: Great Moments in History: God Hides...

    Fun with abused Web Standards

    Some people fell in love with the idea of REST-based web services. But they mistakenly confused REST as `encode the operation anywhere you want, send and parse the document in any way you feel, hey we can do whatever we want as long as we use http'.

    The problem was that they did not follow the directions in the small print, and the Google Accelerator was the first application to byte them in the ass:

    • Here is what they saw
    • Here is the hillarious I told you so post:
      Well, you didn't listen to me, did you 37Signals? Did you? Now Google releases their Web Accelerator and your application is broken. Apparently you used GET to delete items from Backpack and when Googles Web Accelerator pre-fetches that URI in you web app, items get deleted. Let's make this clear, Google didn't break your application, your application was broken, Google was just the first person to point it out to you. Do you feel the pain? Do you feel it?

    This is a good example of something that people predicted would break (Dare has a post here).

    Not being a web developer, I just kind of watched the debate without much insight on what was going on until now.

    Posted on 08 May 2005


    Fork in the Open Source Java world

    by Miguel de Icaza

    For quite some time there have been a number of open source Java virtual machines implementations, it could be easily understood that each project was trying out different ways of implementing the virtual machine or had different goals, milestones or requirements.

    All of these JVM efforts at least shared the class libraries (which is a large component of a Java VM) in the form of the GNU Classpath, and this certainly helped these communities collaborate.

    The Apache Foundation is now starting up a new effort (Harmony) to put together a virtual machine and its class libraries under the Apache License. The FAQ posted is a bit short on the motivations for this effort. I can only speculate that this was done to avoid the side effects of class libraries licensed under the GPL-with-exceptions or the LGPL which make people nervous.

    Depending on how this process is managed, this could either become a big delay in bringing a full free software/open source Java implementation (as people take sides on the licensing debate) or if managed properly could make open source java more viable.

    The challenge that the Harmony project faces now is significant. They need to convince enough of the existing open source Java developers that they should abandon the current GNU classpath effort and either relicense their code to be Apache-license compatible, or that they should rewrite their code to assist this new effort on the grounds that the Apache License is better. This last point does not seem to be very well articulated in the FAQ which merely dances around the issue. The FAQ at this point seems to mostly focus on spinning things positively while not explaining the rationale for this split, as can be seen by the first follow ups.

    If they are not able to bring these existing contributors over they are going to have to grow this codebase from scratch and depend on member companies to contribute code to the effort. IBM might be interested in donating parts of their code (assuming they are allowed to) and might even be behind this split.

    We have been working on the open source Mono for almost four years now and it has helped me put things a bit into perspective. I can not blame the Apache folks for going down this path. This should have been sorted out a long time ago in GNU Classpath land, but am fairly skeptic about the viability of Harmony's class libraries.

    It is hard to tell what will happen, but without the endorsement of the majority of the GNU Classpath developers this is a major setback for open source/free software Java. It might be a necessary step, but am skeptical of its success possibilities.

    In the meantime, gentlemen, you can start using Mono with its lax license today! Get it while its fresh!

    Mhm, sorry about that. I just felt like plugging Mono again. Lets move on.

    Class Library Licensing

    Licensing wise, we went through a similar issue in the early days of Mono. Our class libraries used to be under the LGPL license. We switched the class libraries license from it to the MIT X11 license in response to comments from our potential users and contributors. Of course the MIT X11 license has pros and cons. On the pro side, it imposes very few restrictions on the users and its very easy to mix and match, and in general people feel comfortable with adopting it. On the downside, it is possible for companies to "appropriate" the code and never contribute anything back.

    Certainly people have copied the Mono class libraries into their proprietary products and not given changes back (mostly people find Mono components easy to reuse on the Compact Framework that lacks plenty of functionality), but even the GPL and LGPL would not have changed things dramatically in this case (only the receiving end would have the right to the source, and for Compact Framework users, even more irrelevant than desktop users).

    When it comes to large users of the Mono class libraries, Mainsoft is probably the largest consumer of it. Mainsoft has a product that turns CIL bytecodes into JVM bytecodes and allows users to port their C#/.NET code to a Java VM. Mainsoft could have chosen to make a proprietary copy of the class libraries, improve their copy and ship that to costumers. But instead Mainsoft has chosen to become an active contributor to the project, and is relicensing its own code under the same terms, the MIT X11.

    There are a number of reasons: it is simpler to get new improvements from the community into your own code base, you can drive the direction of the project, and they have created a great aura around their company in the community: they are not only socially responsible contributors, but the world can see that their contributions are top-notch. In addition, their customers get access to the code and can benefit from the shared knowledge pool of the resulting code.

    I mention this because a common reason to use the GPL and the LGPL, as opposed to a more lax license like the MIT X11, was that third-parties would tend to keep their improvements to themselves and that only a license with stronger terms could get them to contribute back. A few examples are usually mentioned: the X11's own failure in the 80's to get vendors to share their improvements and the success of GCC in forcing the C++ front-end to be released.

    Maybe those examples did apply in a poorly connected world and much smaller ecosystem of the 80's, but none of the two previous scenarios necessarily apply today for horizontal software. The Mono class libraries have demonstrated that companies are willing to contribute to the class libraries and that collaboration will help them reduce the cost of development.

    I am now less convinced that forcing people is the best way of achieving collaboration. The GPL has certainly played a role in educating people about free software, but for the most part people who contribute to nascent open source/free software projects have done so do for a plurality of reasons that have nothing to do with being forced by the license, including shared R&D costs, joy, need, curiosity, challenge, sense of community, social responsibility, or fame.

    Brilliant Ideas

    This must be obvious to every Firefox user now, but am still amazed at the simplicity and the beauty of Firefox's search design.

    Ever since I can remember GUI applications, searching has been implemented as a popup box that pops in the middle of your document covering the text you want to search. Descriptions on how to float these dialog boxes and the discussion about how to create these non-modal dialog boxes is present in most GUI programming books that taught these principles to developers.

    The beauty of placing the search at the bottom as opposed to using a sidebar is that the document is almost never reformatted.

    I find myself missing this interface on my applications. Evolution for example still has the old-school search dialogs:

    The new Adobe Acrobat pops up a small enough window with only the basics: the text to search for, backwards and forwards button, and configuration options are done from a button on the left:

    An improvement, but not as good as Firefox.

    That being said, the places where I miss search the most in my applications are:

    • GAIM: At some points during the day there are too many people logged on, and I would like to search for specific users online by typing on an incremental search box.
      Update: I know that I can select the list and start typing on the treeview, but the search is only done on the visible strings, not on other elements. So for example, someone's nick name might be "Arturo", and extra information from the messenger service might be that his full name is "Arturo Espinosa", and I have aliased him to "Pupilo". I can only search on the "Pupilo" string, not on the "Arturo" or "Espinosa" strings. Hence the need for a search feature on GAIM.
    • Evolution: the filters dialog box and the folders list. Like in the case before, I do not want to only search on the text string shown to me, but in any other strings that might be part of the filter criteria:

      It should be noted that this dialog probably needs some love anyways.

    Posted on 07 May 2005


    The Genesis of a Free Software Hacker

    by Miguel de Icaza

    Alex Graveley's story. An interesting read

    Posted on 06 May 2005


    Ajai Raj at University of Texas

    by Miguel de Icaza

    Ajai Raj attended a presentation from Ann Coulter in Austin, was arrested for swearing and being lewd. A very articulate article:

    So yes, the Q&A session came around, and it was pathetic. Her slack-jawed fans got up and licked her face so she could pat them on the head--one schmuck offered to be her bodyguard, and she smiled, doubtlessly making a mental note that she wouldn't touch his nether regions if she were King Midas. Liberal protestors posed well-intentioned but woefully timid questions and got shot down in a hail of ignorant shitfire from the She-Dragon. Standing in line awaiting my turn, I watched her send a moderate Republican, who had questioned the sheer incendiary magnitude of her rhetoric, walk away in tears when she tore him apart for daring to question her.

    So yes, I saw my "opportunity to say something lewd and offensive." And I took it.

    But the whole blog entry is worth reading.

    GanonScandal

    The Ganon scandal is getting more spicy. Using the Freedom of Information Act, a couple of members of congress obtained the records that show entry time and departure of Jeff Ganon, the fake reporter into the White House.

    Most of the records are normal, but there are a number of inconsistencies: multiple-entries with no exits recorded; Multiple exits without an entry recorded; Extended stays and double visits after press conferences.

    Speculate away.

    Iraq War: Fixing Facts

    The famous memo is here:

    SECRET AND STRICTLY PERSONAL - UK EYES ONLY

    DAVID MANNING
    From: Matthew Rycroft
    Date: 23 July 2002

    Greg Palast says Impeachment Time and Tom Paine publishes Ray McGoverns' explanation

    Iraq Taxi Rides

    From Tom Tomorrow a transcript from Meet The Press about how things are getting better:

    MR. FILKINS: Yeah. There's actually a company in Baghdad that does nothing except offer rides to the airport and back. They've got an armored cars and some guards. And they charge $35,000 for...
    MR. RUSSERT: Thirty-five thousand dollars?
    MR. FILKINS: ...for a ride to the airport. And I think you know, if you miss your plane and you have to come back, it's another $35,000. But...
    MR. RUSSERT: How long--is it six miles?
    MR. FILKINS: I think it's about six miles, yeah. It's not a happy six miles. So, you know, they earn their money.
    What's striking about this is that if you read the entire transcript, both of these reporters actually seemed to think that things are generally improving in Iraq--proving once again that everything is relative...

    Posted on 05 May 2005


    Switching to Mono

    by Miguel de Icaza

    A Java developer talks about his migration to Mono: he needed a cross-platform GUI framework and good database support. He goes on to describe his experience at length on his `Mono for Fun' article.

    Posted on 04 May 2005


    Making Gnome Fun

    by Miguel de Icaza

    Like everyone else, I have been thinking about Edd's blog entry as well as the follow up from Mikael.

    My feeling is that the Gnome Desktop itself is fairly complete at this point and that is why we have seen people invest less into the actual infrastructure on the desktop and a lot more on getting things right. Am personally very happy with the incremental goodies in Gnome 2.10, it continues to be a pleasant upgrade every time and it is a good direction to polish and improve while some of the fundamental components of the desktop are sorted out.

    In my opinion infrastructural hacking can be fun and its important, but the easy stuff is done, and the more complex issues can take years to get to the point of being fully baked and wildly deployed.

    This is why casul developers or those who do not happen to be working for companies that can do multi-year commitments of work on a single direction have turned their attention to create independent applications in Mono or Python. The activity in GnomeFiles is a proof of this. As it happened in the past, a lot of the new Gnome-based and related developments and activities are happening outside realms of Gnome. It would not hurt to create bridges to these projects.

    There are important pieces of the desktop that will bring considerable upgrades to our developer offering: Cairo, the new vector-based Gtk+ toolkit, GStreamer, The GL-based X server, Luminocity and D-Bus to name a few.

    But these technologies will take a few years to be completely baked. Cairo has been under development for almost three years and D-Bus under development for two and none of them are available yet in 1.0 form. And once they are ready, it will take sometime before these technologies are wildly available.

    In the meantime, there are a number of easy things that we can do to improve Gnome:

    • Desktop Improvements: both Windows and OSX have raised the bar in terms of what users expect from a desktop.
      Photo management, video editing and audio production are no longer vertical applications, this is a standard feature that every OS needs.
    • System Configuration: the Gnome System Tools have finally made it into a real distribution (Ubuntu), and its architecture is useful for both large-scale management as well as creating multiple front-ends (GUI, Console and Web).
      We should do a push to expand the scope of these tools and bring or port existing configuration tools from other systems.
    • Keep up: OSX just came out and it has a bunch of new and interesting ideas. We do not need to start with the huge pieces of OSX, we can start with the small increments, very much like we have done in the past to bring the best in them.
      We have also quite a few bugs open in Bugzilla that could use some help.
    • Evince: Probably one of the most important efforts in Gnome right now. What they have achieved so far is great, but it needs to keep up with Apple and Adobe's offerings to be a full replacement.
    • Web applets: Like every other user out there, I want to get the OSX dashboard widgets into my desktop. It should not be hard to modify Mozilla to provide the same functionality and even be source compatible. The core is there already.
      Probably the most important element of Apple's Dashboard is the fact that it basically runs full-screen: so there is no need to write small controls or make them tiny or try to get creative about showing them or hiding them. Its basically a full new screen where you can use the space effectively.

    We continue to maintain Evolution but we have also branched and started a few new desktop projects, this time built with Mono and Gtk#: a new GUI designer for Gtk+ (Stetic), a personal photo management application (F-Spot), disconnected file sharing (iFolder), desktop search (Beagle) all pieces that we consider important for the desktop.

    I believe these components (and more) should be part of a standard desktop offering. Whether they become part of the standard Gnome offering remains a political issue, but at least Novell, Mandriva, Debian and Ubuntu are making these available in one form or another (wink, wink).

    In my opinion, Mono is in a strong position since it provides the same libraries that have been developed for C# developers to be consumed by other languages (of particular interest are Boo and the renewed IronPython) and because it has opened the doors to the Windows developers which are now starting to get their feet wet on Linux, Open Source, Gtk and Gnome.

    Posted on 02 May 2005


    Jeremy Allison

    by Miguel de Icaza

    Jeremy Allison has now joined Novell as well. He will be in a number of conferences in Germany this week.

    Posted on 29 Apr 2005


    John Pilger Documentary

    by Miguel de Icaza

    Am a big fan of John Pilger's articles and books. And while doing my daily delicious popular browsing I found a torrent for Pilger's Palestine is Still the Issue documentary.

    The documentary aired in the UK, and I had read the blurb on his web site a few years ago.

    Posted on 28 Apr 2005


    .NET to Java

    by Miguel de Icaza

    Mono offers a mechanism to run your .NET code on non-Unix systems by providing a CLI execution environment. Mainsoft has taken a different approach. Mainsoft wrote a translator that integrates with Visual Studio that converts existing .NET applications into Java applications by translating the CIL bytecode into JVM bytecodes.

    Mainsoft has historically focused on server-side deployments with their product (Integrating ASP.NET with J2EE and bringing Visual Studio debugging to J2EE). But Erik Sink from SourceGear needed to bring the Vault software to Eclipse users.

    Erik wrote an article on how he got his .NET code to run inside Eclipse using Mainsoft's products, it is available on Microsoft's web site.

    Boo

    The programming language Boo is gaining popularity among developers. Boo is an open source Python-like language that has been designed to integrate into an ECMA CLI virtual machine, so it integrates things like properties and attributes directly into the language.

    Boo is a statically typed language very much like C#. This means that Boo will produce optimal strongly typed CIL code, but if you need the flexibility of dynamica types it makes this available through type inferencing or dynamic typing.

    You can learn about the differences from Python here and its main features here

    Peter Johanson has implemented a Boo Add-in for MonoDevelop, he has various screenshots on his blog:


    Intellisense Support for Boo in MD.

    Configuration Page for Boo Add-in.

    Boo Shell Inside MD.

    ASP.NET 2.0 updates

    Lluis updates us on Mono's ASP.NET 2.x status.

    Thomas Friedman Follow-Up

    Cullen pointed me out to McSweeney's take on Writing your own Thomas Friedman OpEd.

    VMware 5 Screenshots on Linux

    Christian Hammond has posted some screenshots of the new VMWare 5 with its snapshotting GUI here.

    Ajax for .NET

    There is a blog dedicated to Ajax for .NET here (from AjaxMatters).

    Posted on 26 Apr 2005


    More Books on Lebanon

    by Miguel de Icaza

    The book on Asad that I was recommended is awesome, it gives a different perspective on the Lebanon war from the Syrian point of view.

    As I was reading the book, Amazon introduced a new feature that allows customers to see a list of books referenced by a given book. I used this to get myself a couple of other books: "Israel's Lebanon War" and Abu Nidal: A Gun For Hire.

    In "Israel's Lebanon War" has an excellent introductory chapter on the Lebanese civil war as witnessed from Israel. The book relies on interviews and de-classified documents from the Israel government to recreate the Israeli involvement in Lebanon.

    I have not finished this book, but it is a good complement for Robert Fisk's "Pity the Nation" narrating the gradual involvement of Israel with the Phalange party. The book begins in the early years of the Lebanese Civil war (1977) and describes the rise of Bashir Gemayel from the low ranks of the Phalange Militia to its control of the other Christian militias through the assassination of his opponents to the presidency.

    On the other side Menachem Begin starts to empathize with Bashir's struggle and conceives a plan to make Bashir Lebanon's president. He relies on Ariel Sharon, his secretary of defense, to put together a plan to destroy the PLO, reach Beirut and install this new government.

    Such a plan would have been rejected by the Israeli Cabinet, so they have to prepare and operate in secret and only give as little information as possible to the Israeli Cabinet. To make their case they have to withhold negative information and intelligence assessments from the Cabinet and paint a rosy picture of the invasion.

    To get the cabinet to approve the plans, they present them with a limited plan: a military invasion of southern Lebanon of about forty kilometers. The real plan is to reach Beirut, but this will not be disclosed to the rest of the Cabinet until the invasion starts.

    The invasion plans faced a problem. There was a cease-fire in place between Israel and the PLO on the border and as long as the palestinians did not attack there would be little reason for an invasion. Arafat had managed to curb its guerrillas from responding to provocation (which included bombing and shelling of their cities and positions).

    Patrick Seale's "Abu Nidal: A Gun For Hire" is addictive and non-stop reading. A book tracing the inner working and operations of Abu Nidal's terrorist organization. Abu Nidal started a resistance group which splintered from the mainstream palestinian opinion in the 70's. Abu Nidal's would transform his group from an extreme palestinian group into a work-for-hire organization that would carry out terrorist attacks against the enemies of his sponsor of the day. Most importantly Abu Nidal broke early on with the PLO and did everything he could to destroy the moderate palestinian voices.

    The book recreates Abu Nidal's operations, its mode of operation and some missions it carried out by interviewing collaborators, defectors and opponents. The book starts by tracing the steps of a new recruit in the group, and then exploring the claim from a senior PLO officer: that either Abu Nidal's Organization was infiltrated by the Mossad or Abu Nidal himself was working for the Mossad. The exploration of this claim takes the rest of the book as Patrick Seale reconstructs the various terrorist strikes carried out by Abu Nidal. In this book, Lebanon appears only as a backdrop to the mainline story.

    In any case, Abu Nidal's strikes consistently undermined the efforts of the PLO and the palestinian cause which he claimed to be assisting. Attacks would set back any attempts from the PLO to become a political force to represent the interests of the Palestinians in the exile and on the occupied territories.

    Abu Nidal's group carried out an attempt to assassinate the Israeli ambassador in London in 1982. This was taken as a violation of the cease-fire and the invasion of Lebanon begun.

    A light side of Lebanon today

    A lebanese makes fun at the current state of affairs in Lebanon.

    Another one: How-To for a Lebanese Cabinet.

    Speaking of Books

    A few months ago, I was also recommended `From Beirut to Jerusalem' from Thomas Friedman. I never quite liked his articles on globalization in the past and I was skeptical about his book, but I gave it a shot.

    I could barely read one third of the book, as it felt mostly like a shrine that Thomas Friedman had written about himself, it felt very much like a `me, me, me book'.

    I mention this now because I found two interesting articles: Write Your Own Thomas Friedman Article which captures more elegantly what I disliked about the book.

    Update: the link above no longer works, but I transcribe it here


    1. Choose your title to intrigue the reader through its internal conflict:

    a. War and Peas
    b. Osama, Boulevardier
    c. Big Problems, Little Women

    2. Include a dateline from a remote location, preferably dangerous, unmistakably Muslim:

    a. Mecca, Saudi Arabia
    b. Islamabad, Pakistan
    c. Mohammedville, Trinidad

    3. Begin your first paragraph with a grandiose sentence and end with a terse, startlingly unexpected contradiction:

    a. The future of civilization depends upon open communication between Yasir Arafat and Ariel Sharon. If the two don't speak to each other, the world edges closer to the precipice of total war. If, on the other hand, they manage to engage in open conversation and resolve their differences, Israelis could soon be celebrating Seders in Saudi Arabia. But for now, the two men can't speak. Why? You can't make a collect call from Bethlehem.

    4. Use the next few paragraphs to further define the contradiction stated above, peppered with little questions making it look like you're having a conversation with the reader. Feel free to use the first person:

    a. My first thought was to ask: Why no collect calls from Bethlehem? It's easy to call collect from Bosnia, Kosovo, even Uzbekistan. Am I sure? Of course I'm sure. I was in each of those places just a few weeks ago, making collect calls all over the world. No problem. So why can't Arafat call collect from Bethlehem?

    5. Remember: Thomas Friedman is the Carrie Bradshaw of current events. Think Sex and the City, write "Sects and Tikriti":

    a. How can Islam get to its future, if its past is its present?

    b. Later that day I got to thinking about global civilizational warfare. There are wars that open you up to something new and exotic, those that are old and familiar, those that bring up lots of questions, those that bring you somewhere unexpected, those that take you far from where you started, and those that bring you back. But the most exciting, challenging and significant clash of all is the one you have with your own civilization. And if you can find a civilization to love the you that you love, well, that's just fabulous.

    c. Maybe Arabs and Israelis aren't from different planets, as pop culture would have us believe. Maybe we live a lot closer to each other. Perhaps, dare I even say it, in the same ZIP code.

    6. Name-drop heavily, particularly describing intimate situations involving hard-to-reach people:

    a. The Jacuzzi was nearly full when Ayman al-Zawahiri, former surgeon and now Al Qaeda's head of operations, slid in.

    b. It was Thomas Pynchon on the phone. "Tommy," he said, probably aware we share that name ..

    c. Despite the bumpy flight, I felt comfortable in the hands of a pilot as experienced as Amelia Earhart.

    7. Include unknowns from hostile places who have come to espouse rational Western thought and culture:

    a. I visited Mohammed bin Faisal Al-Hijazi, former top aide to Ayatollah Khomeini, now a reformer and graduate of the Wharton Business School.

    b. Last year Nura bin Saleh Al-Fulani worked in Gaza sewing C4 plastic explosives into suicide bombers' vests. I caught up with Nura last week in Paw Paw, Mich., where she sews activity patches on the uniforms of Cub Scout Pack 34.

    8. Make use of homey anecdotes about your daughters, Natalie and Orly, enrolled in Eastern Middle School, Silver Spring, Md.:

    a. My daughter Natalie, a student at Eastern Middle School, a public school in Silver Spring, Md., asked me at breakfast: "Daddy, if my school has students who are Muslims and Jews and Christians and Buddhists all working together, why can't the rest of the world be that way?" There was something in the innocence of her question that made me stop and think: Maybe she has a point.

    9. Quote a little-known Middle East authority at least once in every column:

    a. Stephen P. Cohen
    b. Stephen P. Cohen
    c. Stephen P. Cohen

    10. Conclude your column with a suggestion referring back to the opening contradiction, but with an ironic twist. Make sure the suggestion you proffer sounds plausible, but in fact has no chance of happening:

    a. Driving into Bethlehem in the back of a pickup, I wonder: What if Yasir Arafat and Ariel Sharon sit down and play a game of poker? And what if the stakes are these: If Sharon wins, the Intifada is over. If Arafat wins, Palestine gains statehood. One game of no-limit Texas hold 'em, and the Middle East crisis is resolved. Just like that. Yasir and Ariel, deal 'em out.

    And a very funny review of his new book.

    Posted on 24 Apr 2005


    Code Access Security in Mono

    by Miguel de Icaza

    Sebastien has two nice articles: Graphs to visualize security demands and the fourth part on the series of the Mono Security Manager.

    Sebastien is using the Cecil introspection library by JB to extract the CIL bytecodes and trace the use of the security manager.

    Mexican Coup, part 2

    Carlos Alberto points to an article with quotes from around the world on the recently staged coup. And has details on Mexican Ambassador to the US campaign to stick his foot in his mouth. He is mailing newspapers trying to justify the coup staged against Mexico City's major by the federal government.

    He is arguing that technically they are allowed to use a technicality to block Lopez Obrador from running for the presidency.

    Sign the petition online against the Fox coup: here

    Posted on 20 Apr 2005


    Boo Integration with MonoDevelop

    by Miguel de Icaza

    The Boo language integrated into MonoDevelop: description and screenshot.

    Posted on 17 Apr 2005


    Dirty Tricks in Mexico

    by Miguel de Icaza

    I have been considering for a while to write about the creative coup being cooked in Mexico. It is a creative coup, because nobody had thought of this before. If there is one area where we mexicans excel is in coming up with some crooked schemes. This time is the turn of President Fox.

    President Fox is using a technicality on a minor issue to block his strongest opponent from running on the upcoming elections.

    I envision many countries will be able to follow Mexico's leadership on this new twist on bringing improved democracy to their people. The trick is simple: make sure to sue your opponent shortly before he presents his candidacy for the elections. You must ensure that your country has, or passes a law that will allow you to keep people under investigation to run for office.

    Laura Carlsen's article gets to the facts quickly and with no verbiage.

    A few selected quotes:

    When Vicente Fox ended the 71-year reign of Mexico's Institutional Revolutionary Party in the 2000 presidential elections, many observers heralded it as the beginning of a long-overdue transition to democracy. Now President Fox, in a concerted effort with members of the former ruling party, has closed the door on that transition.

    By orchestrating a pseudo-legal offensive against Mexico City's popular mayor, Andr�s Manuel L�pez Obrador, Fox has not only dashed the hopes of Mexicans for a real democracy, but has also destroyed the political capital he gained back in 2000.

    Hundreds of thousands of people gathered in Mexico City's central square to protest Congres's decision to strip L�pez Obrador of immunity to prosecution granted elected officials. The mayor will now stand trial for allegedly failing to follow a court order to halt work on an access road to a local hospital. According to the federal attorney general's office, the government will likely put L�pez Obrador behind bars, as a "preventive measure," before the trial even starts.

    The president and his Secretary of State initially claimed that they were not involved in this activity, until the details about the secret meeting between them and a federal Judge came to light exposing the complot. Oops. They blamed the opposition for `politicizing' the issue.

    The trial for Andr�s Manuel is over a minor problem (read the article for the details), and you have to wonder about priorities.

    In the meantime, Fox has yet to answer to various charges of corruption in his administration involving his own campaign, Petroleos Mexicanos (the state owned oil company), his special properties, the use of federal resources for his personal use and the Cuban scandal.

    The Cuban scandal is probably the best, it is like Watergate but ten times bigger: infiltration, complots, video-taping, bribery, federal agents concocting against the opposition parties. It has it all. The only difference is that nothing is happening to Fox.

    On the economic side, the last week saw the largest capital transfer out of the country since the 1994 depression (the one that would bring the dollar price from 3 to 10 pesos).

    So we are dealing with a special kind of weasel here: a dumb weasel.

    The Independent story is here

    Edd is back from Lebanon.

    Edd, who was the first person to tell me that Lebanon was a great place to visit, just came back from his second trip to Lebanon. He posted parts of his travel log and some pictures on his blog.

    Posted on 10 Apr 2005


    GUI for hand-held devices

    by Miguel de Icaza

    Updated screenshots of GPE Palmtop Environment are available here.

    GPE is royalty-free GUI framework for embedded devices and is based on the Linux, X and the Gtk+ toolkit.

    Posted on 09 Apr 2005


    A Day in the Life of a Journalist

    by Miguel de Icaza

    I found this article on the fear of flying from Robert Fisk fascinating: After what I've been through, it's no wonder I have a fear of flying:

    C# programming tutorial

    A tutorial on C# in a Wiki: here

    Posted on 07 Apr 2005


    Scripting OpenOffice with Mono

    by Miguel de Icaza

    Progress on the OpenOffice/Mono front, here is a screenshot from the OOo/Mono team: Sample C# program running in OOo.

    Posted on 06 Apr 2005


    On Release Dates

    by Miguel de Icaza

    Loved the article of Joel on Picking a Ship Date. As usual, he has various entertaining stories to make his point.

    Both Red Hat and SUSE have their Linux distributions shipping every six months (Fedora Core and SUSE Professional) which in my opinion burns too many developer cycles on testing, quality assurance and documentation. Except for a few fairly obscure developer features each distribution is hardly distinguishable from the previous version.

    Maybe its a good thing that these features are released on a six-month based schedule, but in my opinion they are not as important as they used to be. In the early days of Linux the the a.out to ELF migration or the libc5 to glibc migration would have every Linux user running to download the latest distribution.

    A few interesting quotes:

    If you have a lot of validation and unit tests, and if you write your software carefully, you may get to the point where any daily build is almost high enough quality to ship.

    On reasons why you might have to change your release date, I found this painfully funny:

    Or maybe a new version of the Linux kernel is coming out soon with yet another all-new system to implement packe filtering;

    On new software releases that are not worth upgrading to:

    Corel PhotoPaint and Intuit Quickbooks are particularly egregious examples of this; they have a new "major" verson every year which is rarely worth buying

    I have a similar feeling with my Linux distros; I tend to stay with my current distribution for very long periods of time. Literally, only when forced to upgrade through dependencies I consider an upgrade. Maybe am no longer a sophisticated user.

    Joel has a series of new articles on the creation of his FogBugz, which am sure Joel readers have already clicked through: Part I, Part II, Part III and Part IV.

    On teaching and hackers:

    But mostly because I'm a pedantic windbag who can't resist the opportunity to teach a little lesson to the younguns who think that a compiler has to generate machine code.

    [...]

    Based on your age you will either call this an evil hack (if you're young) or an elegant hack (if you're old);

    Random

    Interesting read on blogs, IM, presence, wikis and our humanity on Adam's blog.

    Microsoft and Open Source

    Mitch Kapor comments on the recent Groove acquisition from Microsoft, Mitch said something interesting:

    The challenge now is whether Ray and Groove, which represent forces of architectural innovation, can have a successful impact at Microsoft, which after all, is a large (58,000 person), middle-aged (30 year-old) company. It's hard to know whether the loss of nimbleness due to size and age is a greater challenge to Microsoft than is open source.

    I have finally started looking at Microsoft's Indigo, and am disappointed at it for various reasons, maybe I will write something about it later. In the meantime, I started to learn about ZeroC's ICE which seems more useful as a basic RPC framework.

    Posted on 05 Apr 2005


    West Bank

    by Miguel de Icaza

    From the Electronic Intifada diaries: International peace observers report on the militas attacks on palestinians on the West Bank and poisoning of their flocks.

    A more comprehensive article is available on Zmag.

    Iraq and the case of the missing WMDs

    The report is out. The culprit for the war was "Curveball" for feeding bad intelligence. Everyone else can now go and get a raise.

    Posted on 03 Apr 2005


    SharpMusique

    by Miguel de Icaza

    Jon has authored SharpMusique: a port of PyMusique to C# on Gtk#.

    SharpMusique

    SharpMusique is a very useful tool, but in addition Jon is shipping a C# binding ("VLC.cs") to the VideoLan library. VideoLan is a cross platform media framework, so this is quite convenient for folks developing cross-plaform media apps with Mono.

    The only mistake of the afternoon was allowing Nat to test drive SharpMusique while I was logged in.

    Interviews

    An interview I did while in Turkey: here.

    Scott Ritter on Iran

    Scott Ritter, the weapons inspector that predicted that there were no weapons of mass destruction in Iraq has written a new article Sleepwaling to Disaster in Iran.

    Helen Thomas

    I enjoy reading Helen Thomas as well, her latest piece is: Screened Audiences, Fake News Promote Bush Agenda.

    Asad of Syria

    The day after my return from Beirut, Duncan and myself took a cab back home late at night. The cab driver was a Lebanese which overheard our conversation and suggested the book Asad of Syria: The Struggle for the Middle East.

    Someone had recommended this book before. So far, the book has been excellent, non-stop reading. I am giving it five stars in Amazon.

    Amazon

    Amazon keeps findinding ways of emptying my wallet. First the free-delivery service, and now they have added a list of books referenced by any given book. A feature that I have been properly abusing.

    Posted on 02 Apr 2005


    Mono updates

    by Miguel de Icaza

    I answered a few questions for Howard Wen from O'Reilly on Mono, it covers some of the progress that we have done recently, the interview is: here

    Posted on 22 Mar 2005


    Sad News

    by Miguel de Icaza

    Francisco, one of Mono's key contributors lost his son in Iraq yesterday while he was on a patrol operation.

    Our sorrows are with Paco and his family.

    One of my pending email was a follow up to an email from Paco to his son a few days ago. Paquito was looking forward to come back and continue composing music and continue his graphics design work. He was composing and mixing music from the barracks on his spare time.

    Update: Corrected the link above.

    Posted on 21 Mar 2005


    MonoDevelop

    by Miguel de Icaza

    Lluis has a nice summary of the progress in MonoDevelop.

    Posted on 19 Mar 2005


    Beirut

    by Miguel de Icaza

    Coming to Beirut was a revelation, because it is completely different from what you imagine. I consider myself informed on the Middle East and on its political situation, but I was still a little bit scared of visiting Lebanon.

    In the Corniche.

    Edd and Yuyu both e-mailed me and told me that it was worth visiting and they eased my fears. Then I talked for a few weeks with Alaa and Hisham from the Lebanon Linux Users Group and they answered all of my pressing questions on Beirut.

    Laura in the Corniche

    Turns out that Beirut today is a very safe city just like any other american or european city. What makes the trip interesting is the new language and arabic scripts.

    I went to Beirut after reading Robert Fisk's Pity the Nation. The book is similar to reading The Thousand Nights and a Night, it is packed with stories that span roughly fifteen years in the life of Lebanon and the civil war.

    Downtown Beirut.

    I got a haircut in Beirut. My barber asked me what I was doing there. `I am here because I read Pity the Nation' was my standard answer during my trip. He then said, ``I used to cut Mr. Robert Fisk's hair in the 80's during the civil war, he and the others staying at the Commodore Hotel''. He gave me his business card.

    While in Beirut, we had the pleasure of meeting with Robert Fisk for lunch:

    Laura and Robert at Lunch.

    I had attended one of his lectures at MIT a few years ago, being a fan of his writing. But meeting him and Victoria for lunch was a pleasure, not only we had a great conversation, but the conversation had so much information that when I got back to our hotel I took pages of notes on what I had learned.

    I told Robert the story about the guy who cut my hair, and showed him the business card. He said `Oh, yes, I remember him; I have now a new barber'.

    Posing for the camera.

    Our friends in Lebanon told us repeatedly that visiting the Sabra and Chatila camps was dangerous. We asked Robert about it, and he said `Nonsense, I go there every week' [1], `you should go; do you have plans this afternoon?'.

    Robert arranged for his driver to take us there, for Mohammed to show us the camp, and for drinks later that evening at his appartment. He only warned us that we would not be able to sleep after the visit. He was right.

    At the Entrance.

    Victoria left us at the entrance of the Sabra and Chatila refugee camps in the hands of Mohammed. Mohammed and his sister are the sole survivors in his family from the 1982 Sabra and Chatila massacre.

    At the entrance

    At the Sabra and Chatila Refugee Camps.

    Palestinians refugees living in Lebanon can only work in the refugee camps. The camps are bounded, they can not expand their surface, so families grow their housing by adding a new floor every once in a while as a gift to newly-weds:

    Vertical Growth in Sabra and Chatila.

    In addition to the work restriction, new legislation in Lebanon forces palestinian families to sell any property they own to a Lebanese if the owner passes away, they can not keep the property.

    At the Entrance.

    We accepted two tea invitations after much insistence, and we had dinner at Mohammed's place.

    Palestinian Kids.

    There is some limited internet connectivity in the camps, we saw one room where people were playing games and using the web, but no more than six computers.

    At the Palestinian Youth Center.


    [1] Or something like that, dont remember the exact frequency.

    Mono Updates

    We are back in town from our trip to Lebanon.

    Sunset at Byblos.

    Marek and Martin have completed two new features for C# 2.0: Nullable Types and Fixed Buffers. They will both be available as part of our upcoming Mono 1.1.5 release.

    Dan has posted an update on Stetic. His update has a flash video that you can see.

    Massi has posted a long explanation on how to improve Mono's SSAPRE implementation.

    Posted on 18 Mar 2005


    Daily Show

    by Miguel de Icaza

    Spreading Irony Throughout the World.

    A few articles

    Mokhiber and Weissman's book On the Rampage: Corporate Predators and the Destruction of Democracy is a book with individual stories that illustrate the unbounded power of corporations today. A must-have companion for anyone who enjoyed the movie "The Corporation".

    As a follow up, credit card companies are about to get an early christmas present with the new Bankrupcy Bill, coverage: Arianna Huffington and Molly Ivins.

    Posted on 11 Mar 2005


    More Tourism

    by Miguel de Icaza

    My friend Mancha is teaching an entry-level computer course in my old school with Mono. He is currently using Monoppix as a distribution, but he would like to use a purely Gnome-based environment instead of the current mix of applications.

    If anyone knows of a Gnoppix-like system with a full Mono suite please let me know.

    In his latest blog entry Mancha details his adventures cleaning up his keyboard a must-read if you understand spanish.

    Turkey, Lebanon and México

    I asked my friend Mancha about the similarities between Turkey, Lebanon and Mexico. It turns out that there was a large immigration of Turkish and Lebanese people into Mexico, and they shaped the early Mexico City and they were easily distinguishable in the 1920s and 1940s.

    The tacos-al-pastor which have their equivalents in Turkey and Lebanon did indeed originate in this side of the world and was exported to Mexico with the immigrants (the way its cooked is on a gigantic pile of meat). There are two big differences between the Turkish and the Mexican versions: the Turkish version is made with some kind of lamb meat, while in Mexico we use pork. In Turkey they simmer the meat on tomato sauce on top of a pita-like bread, while in Mexico adobo is used as a spice. They tend to serve this on a piece of bread, we use tortillas.

    In Lebanon they wrap the taco for you: you do not have to do the wrapping yourself, it comes pre-wrapped. The tradition of the lemon juice is also used here, and just like Turkey they give you a small jar with lemon juice next with your meal. In Mexico we just leave lemons cut in pieces on the table.

    Yesterday I did a presentation for the Lebanon Linux Users:

    Lebanon Linux Users Group

    We later went to Virgin Records in downtown to pick some books and movies, the anti-Syrian protest is camping right next to it, in Martyr's Square:

    Anti-Syrian Camping Site.

    At the Rafik Hariri's burial place, people have been leaving messages:

    Messages

    Burial Ground.

    After dinner:

    Lebanon Linux Users

    Cooking with Camels

    Dick Porter pointed me to a comment from the Daily Telegraph:

    "Sir- Sandy Pratt's pollack recipe (Letters, Mar 9) brings to memory a suggested method for cooking camel meat, which I saw hanging in the Arab souk in Hebron some years ago. Take a lump of camel meat and a stone of equal size. Place in a large pot, bring to the boil and simmer gently. When the stone is tender, so will the camel be."

    Everyone is Linking to This

    Everyone is raving over this technology over at Planet Gnome: Colorization Using Optimization.

    Posted on 10 Mar 2005


    Tourism

    by Miguel de Icaza

    Istanbul

    Had a great time in Istanbul, my hotel was conveniently located in a street in Beyoglu: packed with restaurants, coffee shops and tons of people walking up and down the street.

    As usual, my plane got delayed and canceled so I lost my first day in Istanbul. Instead, I got to enjoy everything that the CDG airport has to offer: from toilets to airport food and ten euro per hour wireless internet access.

    Currency in Turkey used to be measured in millions, but they have now removed six zeros from their currency:

    Currency

    My first meal was here:

    Kizilkayalar Hamburguer

    Peter from Linux Tecnolojic, Pinar and Gamze from Novell Turkey:

    Peter, Pinar and Gamze

    Customs in Istanbul are surprisingly similar to those in Mexico City, to the smallest details. The most interesting one is that people put lime juice in most things.

    My talk on Saturday was about Gnome and Mono. I showed a couple of applications at the end of my presentation, and I regret forgetting about showing Beagle. It would have been a nice demo.

    While jetlagged one night, I finally figured out how to make the IBM T42p go into standby mode and recover from it without leaving the screen blank. To do this, just add "acpi_sleep=s3_bios" to your kernel command line.

    Then the `powersave --standby' command will work. After the first time you standby, the powersave daemon seems to get stuck waiting for some helper process to finish, and wont work again. So am using a miggy-script of magic that does something like `powersaved restart', followed by some magic sleep command, followed by the standby command.

    The last day of the conference we had a big dinner with the Gnome Turkey group, here are some of the members:

    Gnome Turkey group

    On Sunday we went for a walk: Enver and Sezgin were my guides. Just like Mexico, they sell very cheap freshly squeezed orange juice on the streets:

    Orange Juice

    The Blue Mosque entrance:

    Blue Mosque

    Hagia Sophia, the church turned mosque, just in front of it:

    Hagia Sophia.

    Next to those two mosques, visitors can visit the underground roman cisterns:

    Roman Cistern.

    Beirut

    In Transit

    I arrived last afternoon to Beirut from Istanbul, a very short flight, only one hour and thirty minutes. I went straight to sleep as the couple of days that I spent on Istanbul were intense.

    White Coffee

    Later in the afternoon, Hisham from the Lebanese Linux Users Group picked me up and we went for a walk of the city. The stores that you find in Beirut are very much like those you would see in any other major city: Body Shop, Starbucks, McDonalds, Zara, KFC and even a Buddha Bar; All the big names car dealerships, hotels and so on. The only difference is that you can only read half the signs.

    They sell a thing called "White coffee" which I enjoyed very much, and it is just transparent water with some flower-like flavor.

    Zara Beirut

    I woke up very late this morning, recovering from the jetlag. In the reception, people were watching the pro-Syrian gathering in down town Beirut, which looked huge, and clearly was the place-to-be today. Now I can have a better story to tell next time the question of `Where were you the day of the pro-Syrian demostration in Beirut?' pops.

    Walking to the Etoile.

    The taxi dropped me off about a kilometer away from Place de L'Etoile where the event was happening. Most roads were closed to cars.

    Just like in Turkey, people are incredibly friendly, and they would try very hard to speak to me in either english or french. One of those guys volunteered to translate the signs and what people were saying over the loud speakers, and hanged out with me until the end of the day. Just like in Barcelona one in every five people you meet is a Jordi, in Beirut the same happens with the Mohammeds. I have met three so far.

    Hizbolah called for today's protest, it was a protest in support of Syria and against resolution 1559. Hizbolah is a popular resistance movement that emerged in Lebanon as a reaction to the Israeli invasion of 1982. Although Israel withdrew from Beirut, the army remained in occupation of the south of the country. The resistance eventually drove the Israeli army out of Lebanon in the year 2000.

    Hizbolah grew out as a resistance movement, but today is also a political player and has a few seats on congress.

    At the event.

    People in the city told me that the 1559 not only called for Syria to back out, but also for the Hizbolah militia to be disarmed. Me, being scared of anything remotely looking like a weapon could not agree more, but let me explain.

    Although the 1982 invasion was aimed at neutralizing the growing strength of the PLO as a political force instead of conquering Lebanon, those at the protest today do not necessarily see it that way. They repeatedly said that Hizbolah keeps Israel away from Lebanon (Here is the Reuters coverage).

    Syria entered Lebanon for the first time invited by the then president of Lebanon and by a mandate of the Arab League, to stop the civil war that had erupted in Beirut. They got themselves tangled into the civil war, and were basically powerless to stop the invasion in 1982. They have remained ever since and its the source of the current split opinion.

    At the event.

    The protest was like any other protest I have been to; you could smell some marijuana being burned, people with tons of signs everywhere, fairly packed, difficult to navigate and people chanting slogans. All I could understand was `Yala, Yala', which roughly means `Go go'.

    I could not reach the center. All of a sudden, it turns out that just next to where I was standing they were setting up the podium for the main speaker. In a building barely twenty meters away. First soldering it, and covering it up with a white blanket of sorts:

    Podium

    Half an hour later the main speaker showed up:

    Speech

    After the event was over, I was invited to dinner and to play pool. I had some tasty thing that is very much like a Taco al Pastor in Mexico, but they use bread instead of tortillas. Not only they did not let me pay anything (at the pool place, the dinner, the taxis), they also paid for my taxi to return to my hotel. I also got an invitation to see my now friend Mohammed in the south of Lebanon once Maria arrives:

    Pool

    Like in Turkey, the way to cross the street is to wait for a space between the cars and to jump into the street, hoping that the car will stop. Only later in the day I noticed that this was not like Mexico, where people do this when they see no cars coming. In Beirut there are no traffic lights (or at least I have not seen any so far).

    This pricing picture at the pool place probably gives you a taste of the city:

    Pricing

    Maria Laura

    Maria's flight to Beirut is delayed; She will be showing up later in the afternoon. This means that my Gnome/Mono presentation will have a hard-stop at 6:30pm.

    F-Spot

    Currently F-Spot nor ImageMagick on my machine have support for RAW images. I made the mistake of shooting about 20% of my photos with that, so am going to have to wait until I get back to figure out how to decode them.

    Posted on 09 Mar 2005


    Mono Awards

    by Miguel de Icaza

    Kevan Barney just pointed me out to this award that Mono received from Developer.Com's 2005 Products of the Years: .NET Tool/Add-in of the Year and also the reference on the article ``.NET Ecosystem is a Wonderful Place''.

    Congratulations to all the Mono developers!

    Robert Fisk

    As I was preparing my presentation for this afternoon at the University, I got a call from Robert Fisk, which just arrived in Beirut. Laura and myself will be having dinner with him later in the week.

    Robert Fisk wrote the book Pity the Nation which is the best book I have read in the last year. Not only its packed with hundreds of stories of people during the war in Beirut.

    Gonzo but not Forgotten

    George McGovern, presidential candidate in 1972, wrote about Hunter Thompson.

    Posted on 05 Mar 2005


    Web Site Migration

    by Miguel de Icaza

    Today we officially jumped into the Wiki bandwagon and switched the Mono web site from the old framework to use MediaWiki (the Wiki engine that powers the Wikipedia).

    Thanks go to Nat who helped me migrate the content and also is hosting our Wiki server on the same machine as his Hula web site.

    Posted on 03 Mar 2005


    Mono Updates

    by Miguel de Icaza

    Jb Evain has two screenshots about the new IL disassembler: here and here

    Tomboy has been updated to work with Mono 1.1.4 (Mono's 1.0 C# compiler allowed for invalid code to be compiled).

    Eugenia put together a large list of Gtk#/Mono-based applications.

    If you are using Mono from SVN you can use `xsp2' to try Lluis' latest work on supporting ASP.NET 2 features: dynamic menus, trees, master pages and the beginning of the grid control are in now.

    NPlot for Gtk#

    I have updated NPlot/Gtk# to the latest version of NPlot, the tarball is here

    F-Spot smoother than ever

    Larry has been doing a lot of work in making F-Spot smoother, now it is possible to quickly browse through pictures in full-screen mode. Also importing of images into the library is faster than ever, F-Spot takes only a couple of minutes to bring 6,000 pictures into the library now.

    F-Spot

    Photo Storage in Travel Times.

    I got four gigabytes worth of compact flash cards and two digital cameras for my trip to Istanbul and Beirut. The problem is where to backup all this data.

    I have seen that there is a plug for the iPod that downloads compactflash images into the ipod. This is almost ideal (I can use my old ipod). But are there other things I should be looking at for backing up photos while traveling?

    Send your recommendations to [email protected].

    Mono Wiki Migration

    Been busy moving the Mono Web Site to MediaWiki, following the footsteps of the Hula project.

    On Nuclear War

    A Chomsky talk excerpt: "Nuclear Terror at Home":

    There's a document called The Essentials of Post Cold War Deterrence that was released during the Clinton years by the Strategic Command, which is in charge of nuclear weapons. It's one of the most horrifying documents I've ever read. People haven't paid attention to it.

    The PDF to the above document is available here.

    Venezuela and Hugo Chavez.

    RMS has some interesting comments on his blog about Hugo Chavez (president of Venezuela).

    Greg Palast did an interview with Hugo Chavez after the failed coup. Various tid-bits about the events from last year.

    The World Social Forum in Brazil this year had Hugo Chavez as one of the speakers, it was packed:

    At the Chavez Presentation.

    Laura Went.

    Posted on 27 Feb 2005


    Istanbul, Beirut

    by Miguel de Icaza

    Next week I will be heading to the Turkish Open Source Days in Istanbul. I will be talking about the Gnome desktop and the Mono project there. The program for the event is here

    Since I was in the neighborhood, I decided to swing by Beirut and Maria Laura is meeting me there a few days after. The local Linux user group is setting up a small presentation at the American University.

    Posted on 25 Feb 2005


    Mono Sandboxing

    by Miguel de Icaza

    With Mono 1.1.4 we shipped our first VM with the support required to implement sandboxing. We have yet to deploy all the attributes on the libraries to have a useful sandbox for users.

    Sebastien has written two articles on this: here and here.

    Update: Sebastien has posted a third article on the sandbox.

    Mexico Politics

    In Mexico the federal government is doing everything on its power to avoid the most threatening candidate to the incumbent party to run. They are doing this by using a loophole in the election process which will prevent the candidate from running for office. The story has been developing for a few months, and a summary of it is available here.

    President Fox and a judge from the supreme court have been caught conspiring against the candidate (Andrés Manuel López).

    Love Erik

    Erik added me as his buddy on the Amazon insta-ship program so I do not have to pay for shipping and handling for 2-day delivery.

    Its been a crazy last couple of days.

    Posted on 23 Feb 2005


    250 millions of PR budget.

    by Miguel de Icaza

    New York Times on their staged "Daily Show": "By my count, "Jeff Gannon" is now at least the sixth "journalist" (four of whom have been unmasked so far this year) to have been a propagandist on the payroll of either the Bush administration or a barely arms-length ally like Talon News while simultaneously appearing in print or broadcast forums that purport to be real news."

    "The money that paid for both the Ryan-Garcia news packages and the Armstrong Williams contract was siphoned through the same huge public relations firm, Ketchum Communications, which itself filtered the funds through subcontractors. A new report by Congressional Democrats finds that Ketchum has received $97 million of the administration's total $250 million P.R. kitty, of which the Williams and Ryan-Garcia scams would account for only a fraction. We have yet to learn precisely where the rest of it ended up."

    More on the uncovering of Jeff Ganon: here.

    Bill Maher video

    Nat at Work

    Nat at Work.

    Some Mono SVN Stats

    From diffstat for the last month of Mono activity on the SVN repository (excluding deprecated code):

    	mcs:  1847 files changed, 122176 insertions(+), 23168 deletions(-)
    	mono:  323 files changed, 14845 insertions(+), 6360 deletions(-)
    	total:2170 files changed, 137021 insertions(+), 29528 deletions(-)
    	

    Running Windows.Forms on OS X

    Geoff describes how to run your Windows.Forms applications on OSX here. The short story: you must use the new `macpack' tool to create an OSX bundle.

    He also has a screenshot of Alexsander Olk's new color dialog here running on OSX.

    Posted on 20 Feb 2005


    by Miguel de Icaza

    Weekend

    We finally released Mono 1.1.4 and Mono 1.0.6. With this release we are recommending users to switch to the 1.1.x branch, as our automated testing and regression suites are much better than they ever were on 1.0.6.

    The runtime is faster, smaller, leaner and we have fixed many bugs and architectural problems that were hard to backport to 1.0.6.

    Programmers that have only been using Mono, and have not tested their code on .NET should keep an eye open for a few problems that might be exposed with the stricter 1.1.4 runtime:

    • C# compiler is stricter when it comes to namespace and typename resolution. Tomboy is known to not build with it.
    • Marshalling: A few incorrect uses of marshalling are now reported (Pointers can not reference marshaled structures, you must use byref in your P/Invokes, this affected F-Spot, but only marginally, F-Spot fallsback into a slower operation mode).
    • If you create delegates and pass those to unmanaged code as way to callback into managed land, you must keep a reference to the delegate, or the delegate will be garbage collected. This affected some old Gtk# applications. You will receive a warning message with the details to fix this problem.

    The full release notes are available here

    The performance difference is very visible on web-based applications. Our documentation system for example is now instantaneous.

    DB4Objects

    We have also started distributing DB4Objects from Mono's web site. For those of you that are missing ObjectSpaces, you might find db4o not only interesting, but faster than what ObjectSpaces could have been.

    New Tool

    We have included Paco's prj2make on the latest release of Mono. prj2make is a tool that produces Makefiles from Visual Studio or MonoDevelop solutions. Specially convenient if you download some random code from the network.

    SHA-1 and SHA-224

    This is the first release that ships with the security sandbox infrastructure, Sebastien has the full story.

    Last week SHA1 was broken. Because of this Sebastien is trying to get users to vote for incorporating SHA-224 into the Framework, see the details here. Mono users can use the Mono.Security stack that ships with this and more.

    Installers for Mono

    Installers: The folks at RawByte.com have been kind enough to package Mono with an installer that will work on all Linux systems. Many users love this, specially those without Red Carpet or Yum, as they only have to download a single binary and they get the whole system setup: Mono, all the class libraries, Gtk# and XSP. Like our Windows installer.

    There are two downsides to using the installer: for those using distributions with package management, the installer wont register Mono on the system, which means that third-party components that depend on Mono will still want RPM packages installed (or people have resorted to use the --force parameter for RPM). The second downside is that this ships a Mono configured for the smallest common denominator, so speed will suffer as Mono does not use the __thread-based local storage and has to go through a slower (but backwards compatible) system.

    Hula

    Hula's launch has been very successful. The Hula Channel is very active: people contributing patches, ports and various folks interested in the dynamic web interface are hanging out there. There is plenty of energy there.

    We are planning on following Hula's plan to use MediaWiki as the main page for the site, because updating the Mono web site has always been a bit annoying.

    Also, many people read Jamie's posting on Hula and miss-understood that Jamie was actually praising Nat's final direction on Hula, so there are plenty of comments along the lines of `Jamie slams Hula' and `They are clueless, we are not'.

    Being very interested in politics, I see this phenomenon as an interesting window into the human soul: if these very smart technical people have problems understanding a post like that, what does that say for people trying to discuss and debate the finer points of public policy?

    Posted on 19 Feb 2005


    Hula

    by Miguel de Icaza

    Today Novell open sourced and launched the Hula Project: an open-source groupware server.

    For full details, see Nat's blog post with a rationale, screenshots and details, here: here

    Beirut

    Robert Fisk has two articles on Hariri's assassination yesterday: here and here.

    The Phoenicia hotel seemed to be under construction: image here

    I still intend to go to Beirut on vacation with Laura in three weeks.

    Posted on 15 Feb 2005


    The origins of Ximian: 1999 interview

    by Miguel de Icaza

    Nat found an interview we did in 1999, when Ximian was launched. The inteview is here.

    In 1999 we had to rename our company from "International Gnome Support" (IGS) to HelixCode as we feared IBM's stock would dip due to the naming conflict with their own "IBM Global Services" (IGS).

    Update: It has been pointed out that our old domain for IGS is not something you want to click on if surrounded by polite company.

    Interview with Edd Dumbill

    There is an interesting interview with Edd Dumbill on his Mono book on a Turkish site.

    Posted on 12 Feb 2005


    iFolder

    by Miguel de Icaza

    iFolder has launched its new web site

    Posted on 11 Feb 2005


    Gnome memory use in various languages

    by Miguel de Icaza

    Paolo has an interesting post on the memory footprint that Gnome applications incur when using Mono. The following table shows the memory usage, Virtual Memory and Resident Set Size for various runtimes running the same simple Gtk+ based application:

    RuntimeVSIZERSSWritable Mapping
    Plain C10,568 KB4,728 KB.935 MB
    Mono 1.1.4+18,912 KB8,200 KB4.350 MB
    Python15,092 KB9,164 KB
    Mono 1.031,776 KB9,916 KB
    Perl17,032 KB10,028 KB
    Kaffe 1.1.4PRECVS7-141,452 KB11,136 KB22.000 MB
    Java HotSpot Client 1.4.2-01218,612 KB13,208 KB174.000 MB

    The important number to look at is the RSS, the VSIZE is just useful as a reference.

    Paolo explores the memory consumption from Mono, as well as a few problems with small libraries.

    Update: Paolo provided the numbers for Kaffe and I included his writtable mappings column.

    Other observations

    Paolo commented a few more things today online.

    Gtk+ 2.0 has grown quite a bit (Accessibility, Pango), here is a contrast of Gtk 2.4, 1.2 and Qt. Sorted by RSS:

    Runtime/ToolkitVSIZERSSWritable Mapping
    C/Gtk+ 1.24,716 KB2,168 KB.483 MB
    C/Gtk+ 2.410,568 KB4,728 KB.935 MB
    Perl/Gtk 1.210,684 KB5,424 KB2.208 MB
    C++/Qt 3.3.314,700 KB6,900 KB1.360 MB
    Perl/Gtk 2.417,032 KB10,028 KB

    Ahead of Time Compilation

    Note that in the numbers above, Mono was running in Just-in-Time compiler mode. One of the things that we have been working on in Mono in the 1.1.x series is improving the produced code for precompiled code. Expect the numbers for our next release to be even closer to C.

    The new file format that Zoltan created is designed to maximize the pages that can be shared by using position independent code (PIC). By using PIC code various running Mono applications will share the same pages in memory and only a few pages for each library must be mapped in read-write mode and updated.

    This PIC code is typically slower than code that is JIT compiled by Mono. The tradeoff that we are making is that users that run more than one Mono application will benefit by having the Mono applications share more code.

    But if performance is more important than memory consumption, users can pass the -O=-aot flag to the Mono runtime. This will disable the use of the Ahead-of-Time compiled code.

    The documentation for the new file format lives in mono/docs/aot-compiler.txt

    Posted on 09 Feb 2005


    Building Mono on Windows

    by Miguel de Icaza

    Kevin and Francisco have published an article on Building Mono on Windows.

    Paco said:

    This article was aimed at folks that are consumers of Mono maybe even contributors of patches and documentation. My approach when collaborating with Kevin Shockey was to give departmental developers a way to build the latest and greatest. These are the folks that may have even reported a bug to the list and gotten a reply like:

    "Is fixed on SVN".

    The twist on this witting is that the build approach does not use MS .NET Framework, rather uses Mono to build Mono. We will later put out a set of modified instructions to uncomment a couple of lines that we suggest creating on the user's .bashrc file to enable the build using csc.exe rather than mcs.

    Posted on 08 Feb 2005


    GnomeFiles

    by Miguel de Icaza

    Eugenia pointed out that "7 out of the 20 top-rated apps on gnomefiles.org are mono apps" in GnomeFiles.

    Intro to Mono

    There is a new article over at CodeProject on setting up Mono for .NET users on Linux and Windows.

    There is a whole section covering cross-platform development with .NET over there.

    Fafblog

    Became addicted to Fafblog a few days ago. I started with this post.

    Posted on 07 Feb 2005


    Mexico Talks

    by Miguel de Icaza

    Ciudad de México: charla sobre Mono y Gnome el dia Jueves 3 a las 4 de la tarde en el auditorio Amoxcalli de la Facultad de Ciencias en la UNAM.

    Otra charla el viernes en el Instituto de Ciencias Nucleares (detalles). Este auditorio es más pequeño y creo que la entrada al público en general va a ser más difícil.

    MonoDevelop

    Lluis has developed an addin to develop Mono with MonoDevelop.

    His blog post has more details on the work that is going into MonoDevelop.

    Posted on 01 Feb 2005


    Mexico

    by Miguel de Icaza

    I will be in Mexico doing a talk at my old job: Instituto de Ciencias Nucleares on Friday (Feb 4th). The program is here.

    Since am going to be there since Thursday, am wondering if we people are interested in a get-together to discuss Mono and Open Source the day before?

    Drop me an email, and we can set something up.

    Posted on 31 Jan 2005


    World Social Forum

    by Miguel de Icaza

    Laura is currently at the World Social Forum in Porto Alegre, Brasil:

    Laura at the World Social Forum.

    Youth Camping Site at the SWF.

    Laura in Queretaro.

    Aramis

    Mono Performance Discussion

    There is an interesting thread about Mono performance today. The debate centers around exception handling. For non-Monologue readers, you might want to start with the post from the Nemerle developers followed by very interesting reply from Paolo.

    By the end of the day, the report from the Nemerle folks is here:

    From the other news, lupus did some mambo jumbo in mono to get our testcase 4x as fast as it used to be. Impressive! If only the other implementation was as fast... I guess I can now report this as a performance issue with a nice argument in hand.

    Jailed for using Lynx

    Am feeling safer now: Donator to Tsunami effort jailed for using non-standard Web Brwoser.

    Politics

    Apparently there is another journalist paid by the administration to advance their agenda.

    Darrick liked my link to the pictures of Iraq the other day pointed me to this article: What I Heard About Iraq. I liked it.

    The 10 Worst Corporations of 2004. By none other than Russell Mokhiber and Robert Weissman.

    Mokhiber runs my favorite Scottie and Me' column, previously known as `Ari and I'.

    Posted on 28 Jan 2005


    Stephen Walli is Blogging

    by Miguel de Icaza

    Stephen has started a blog (you might remember him from interviews related to Microsoft's open source applications FlexWiki and WiX).

    He has posted an interesting essay: When are you going to sue your customers?:

    The article contains some histerical examples.

    Still in Boston

    I was on my route to Seattle, but my planes kept getting cancelled. Am scheduled to leave Boston tomorrow morning and arrive to Seattle at 7pm.

    Iraq

    An unparalleled collection of pictures from children in Iraq is here. Not the average images on mass media.

    This guy has 53 days of daily pictures from Iraq (I took the previous link from here).

    Another article from Robert Fisk reporting from Bagdad.

    Plutocracy and Ramsey Clark

    Former attorney general Ramsey Clark will be defending Hussein, some of his reasons are detailed on a note published today. I found it interesting, and also found this intereview from 1999 where he touches on Vietnam, Iraq and military spending:

    If we are to significantly change our culture, we need to recognize that we are held in thrall by two desperately harmful value patterns. One is the glorification of violence. We absolutely, irrationally, insanely glorify violence. We often think that we enjoy watching the good guys kill the bad guys, but the truth is that we enjoy watching the kill itself.

    The other value is materialism. We are the most materialistic people who have ever lived. We value things over children. Indeed, the way we show how much we value children is by giving them things, to the point where a mother's self-esteem depends on whether she's the first in her neighborhood to get her child some new toy.

    [...]

    You began this interview by asking me about U.S. foreign policy, and I said that it's been a failure. Here is the standard by which I would judge any foreign or domestic policy: has it built a healthier, happier, more loving society, both at home and abroad? The answer, in our case, is no on both counts.

    [...]

    We also have to realize that we're going to be here only one time, and we've got to enjoy life, however hard it is. To miss the opportunity for joy is to miss life. Any fool can be unhappy; in fact, we make whole industries out of being unhappy, because happy people generally make lousy consumers. It's interesting to see how the poor understand all of this better than the rich.

    Posted on 25 Jan 2005


    Beagle and Mono demos

    by Miguel de Icaza

    Nat has directed, produced and performed in a series of videos on Beagle, the desktop search tool for the Linux desktop that is being cooked by those in the Gnome, Mono and Novell communities.

    The videos are here. There are also a couple of Mono demos.

    Beagle was originally demostrated on the 28th of June in the GUADEC conference in Norway.

    Posted on 24 Jan 2005


    Recent Novell Open Source Hires

    by Miguel de Icaza

    Novell just hired Niels Bornstein, the co-author of Mono: A Developer's Notebook. The O'Reilly best-seller. Niel will be working on the Linux and Open Source practice group.

    Also Tor Lilqvist, the developers who brought GIMP and Gtk+ to Windows has been hired to work full time on Gtk+ on Windows and to assist us porting various Gtk+ based applications to Windows. Nat's blog has more details.

    Tor will initially be helping Frederik port our new Desktop Search tool Beagle to Windows:

    Later he will take on the final step to make the world a safer place: bring Evolution (our email and calendar client) to Windows. Even Windows users deserve an email program instead of a petri dish of worms and viruses.

    David Reveman one of two developers behind Glitz also joined Novell. He will be working full-time on completing and tuning Glitz as well as contributing to the Cairo imaging library (the framework that will become the foundation for most open source projects to do graphics rendering).

    Glitz brings OpenGL-based acceleration to Cairo rendering (Cairo is Mono's substrate for implementing the System.Drawing namespace). Screenshots of Glitz rendering are availble here.

    And finally Robert O'Callahan has joined the Novell desktop team to work full time on various Mozilla improvements. Robert is working on some pretty exciting things: Multi-column layout for web pages, improving Mozilla's SVG support and continuing Mike Shaver's work on MonoConnect.

    Commondreams favorites

    A few of my favorite articles from CommonDreams in the last few days:

    Mono News

    Tracking Performance: Tomas's team in Charles University has published the results from speed benchmarking on Mono to track potential performance regressions. On the graph you can clearly see Lluis' fix to the remoting channels (the large drop in the Tcp tests). These have caused quite a lot of excitement in the Mono team:

    Following up on Zac's port of Gecko# to Windows (which is now used in the Windows Beagle port), we now have patches to run Monodoc with Gecko# instead of GtkHTML.

    By Mono 1.2 I want to switch Monodoc to use Gecko, to let us use CSS instead of tables in our documentation rendering.

    Mono Windows.Forms implementation is rapidly advancing, it is now capable of running Winforms NPlot, as opposed to my Gtk# port:

    The Windows.Forms team has started a blog to track the major developments, it is available here.

    DotRay: A ray tracer written in C# for .NET and Mono was recently announced. It will become a nice test for the performance tuning going into Mono (Mono's Arrays Bounds Check Elimination code was recently updated to eliminate some checks it was missing and the AMD64 bit port has support for the SSE instructions set, which we are going to backport to the x86 backend):

    In the last couple of days people have been using Ben Maurer's Mono heap profiler:

    Various improvements have been based on the tool: from System.XML memory reduction (1.5 megabytes shaved with a relatively small patch when loading a 25 megabyte file) to improvements to F-Spot memory usage.

    Paolo also did some micro-tuning for P/Invoke hungry libraries; It shaved about 50k-60k of memory for Gtk# based applications on startup.

    F-Spot also went through some performance tuning optimizations: Larry greatly improved the rendering speed when switching pictures and in particular when rotating photographies (F-Spot automatically rotates pictures based on the EXIF metadata of the image).

    Robert Love's new Linux Kernel Book

    Robert Love (here shown in his natural habitat) just got the second edition of his book "Linux Kernel Development" published. It now comes with a cute Novell cover. Get your copy today.

    Companion to Pity the Nation

    I keep churning through Chomsky's Fateful Triangle book (he now has a blog!)

    Partly the book is a good complement to "Pity the Nation". Pity the Nation tells the story from Robert Fisk's standpoint a journalist in Beirut that covers the events on a daily basis. Chomsky's book on the other hand breaks up the various elements of the civil war by topic, so the actors and events are easier to identify in his book. Chomky's book lacks the sense of a story that Pity the Nation has though.

    OH MY GOD OH MY GOD OH MY GOD OH MY GOD OH MY GOD

    Keith Packard has a Blog. And I love it!

    Posted on 19 Jan 2005


    Mandatory Video

    by Miguel de Icaza

    I like to watch this video every six months, Larry Lessig's presentation at OSCON.

    A trascript is available: here

    One of my favorite quotes from this presentation is this:

    In an interview two days ago, Watts said, Here's the problem with Washington: "If you are explaining, you are losing." If you are explaining, you're losing. It's a bumper sticker culture. People have to get it like that, and if they don't, if it takes three seconds to make them understand, you're off their radar screen. Three seconds to understand, or you lose. This is our problem. Six years after this battle began, we're still explaining. We're still explaining and we are losing.

    Floating Point

    Havoc and Elijah, you might be interested in What Every Computer Scientist Should Know About Floating Point.

    Love, Miguel.

    Posted on 15 Jan 2005


    Visiting Seattle

    by Miguel de Icaza

    I will be in Seattle from the 23rd to the 28th of January. If you are in the area and would like to meet, have dinner, discuss free software, Mono, Gnome or debate interesting topics, drop me an email ([email protected]).

    iPod and iTunes

    Today a friend of mine asked me if I bought music from the Apple iTunes Store and whether she should. I explained to her that the music she purchases will be locked into the iPod and iTunes and she wont be able to play it on other MP3 players unless she hacks her music.

    As for myself, I have been using FairKeys to copy the music to my Linux running laptop.

    Today a timely article from the Register discusses some of the details.

    As Cory Doctorow likes to point out about Digital Rights Management: Its not about what you can do today, its about they will allow you to do tomorrow.

    Armed Spyware

    Joe points to an article on spyware that exploits security holes to install itself on people's computers. An interesting read.

    I have recommended my friends to use Macs or Linux in the past (If she can use Linux so can you). The only downside of Apple is that it creates a powerful distortion field.

    Posted on 14 Jan 2005


    Turkey

    by Miguel de Icaza

    This coming March I will be at the Free Software and Open Source days in Istanbul.

    Once I have traveled that far, the question is whether I should visit something else while am that far. The options are doing a technical stop in Paris, or doing more middle-eastish trips.

    After reading Pity the NationI am left with a desire to visit Lebanon. Most likely I will have little time to spend in the Middle East though.

    Mono Presentation in Dallas

    Paco from the Mono team will be doing a presentation on January 18th at the Dallas Forth Worth .NET users group, details are here

    Gnome LaunchBox

    Lovely tool for starting apps in Gnome from the fine folks at Imendio: LauncBox.

    Posted on 13 Jan 2005


    Cecil on Mono SVN

    by Miguel de Icaza

    Jb Evain check his Cecil library into the Mono SVN repository (module name `cecil').

    Cecil is a library that can be used to consume and produce CIL libraries. We are planning on using it for writing a "diet" program that will act as a "garbage collector" for assemblies (Paolo has written one already with the low-level C interface), allowing developers to create arbitrary profiles of the Mono class libraries given a starting root set. This will be handy addition to our bundles

    In addition to that, there are various other things that we have in mind for Cecil: writing a new verifier, writing a bug-finder, writing a CLS and style compliance tool (like FxCop) and Jb's own work on his Aspect weaver.

    Posted on 10 Jan 2005


    Confessions of an Economic Hit Man

    by Miguel de Icaza

    I first found out about "Confessions of an Economic Hit Man" from this article on CommonDreams.

    My copy of the book arrived yesterday and I have not been able to put it down. The book tells the story of a man that is trained to convince third-world countries to accept large loans for developing infrastructure. This is done by creating models and projections of the prosperity that such projects would bring to their countries.

    The book tells a story of money being funneled from the World Bank loans into various corporations in the United States as well as the resulting unpayable debt that remains in the country. This debt can never be canceled and it is later exchanged by land, military bases, or favoring votes in the UN. In exchange politicians who accept these terms get a popularity boost from bringing infrastructure into the country.

    The trick is to predict growth in terms of the gross national product. Even if the benefit goes to a single individual and the rest of the country is impoverished as a result.

    There are three stages described in the book to ensure that a country gets the debt. The first step is to convince the country leaders of the benefits that it will bring to the population and the economic growth of the country. If the leaders refuse, then a second team referred to as "the jackals" perform targeted assassinations and if this fails, then the army is sent.

    Any latin american has been a witness of these loans, the constructions and the special favors going to a few companies in the past twenty years. This book offers an insight into the inner workings of this process.

    John Perkins tried to write this book four times, and four times he was convinced not to. This book is the fifth encarnation.

    You always suspect something is fishy when living in Latin America, and the opposition typically blames large corporations for the sketchy deals. Sometimes the stories are so incredible that you can not believe them until you find documents like The Church Report.

    Gnome Artwork and Software Piracy

    Jakub points out that a company who is heavily borrowing GNOME's GPLed icons for its products and its web page has some strongs words about software piracy.

    Posted on 08 Jan 2005


    CommonDreams links

    by Miguel de Icaza

    An interesting an succint look at administration mistakes

    Gecko# working on Windows

    Thanks to the work of Zac Bowling the Mozilla bindings for Mono and Gtk# (Gecko#) are now working on Windows, see screenshot here.

    This is using the standard Mozilla DLLs. His code is available here

    Mono updates

    There are plenty of updates from the land of Mono, I will write about those later. The most important things is that the new Windows.Forms implementation has replaced the old version on our repository, and that Geoff has implemented native MacOS X support for it.

    On the JIT world Zoltan has completed the work to produce Position independent code (PIC) for our ahead-of-time compiled programs which will reduce the memory usage for long-running Mono applications.

    In the meantime Massi continues to improve our SSAPRE and is going to be adding elements from GVNPRE to SSAPRE which in a single pass will give us some nice performance numbers for computationally intensive tasks.

    Best Book in Years

    I finished reading Robert Fisk's Pity The Nation a book that recounts the last 20 years of the story of Lebanon from the point of view of a war journalist. The book is gripping and its hard to put it down. Robert Fisk weaves plenty of different stories, anecdotes and interviews to produce a detailed tale of life in Lebanond during the civil war.

    I have not read fiction for a long time, partially because books like this one tell a more vivid and interesting story than fiction does.

    This book goes into the living standards, the traditions and the sources of various conflicts as well as covering the mistakes that every army makes in their search for conquest or liberation.

    Of particular interest was watching the news with the reports from Iraq by the time I was reading the second half of the book, as it seems that the more we live and the more documented humanity mistakes are, the less we learn from them. Those who planned the latest war would have benefitted tremendously from reading Robert's account of the Lebanese conflict as they repeated the same mistakes the large armies did twenty years ago.

    Its only 12 dollars for 700 pages of stories.

    Posted on 07 Jan 2005


    Documenting your Libraries with Monodoc

    by Miguel de Icaza

    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


    Exposing Mono Libraries to C

    by Miguel de Icaza

    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


    Developing OpenOffice

    by Miguel de Icaza

    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


    Bundles in Mono

    by Miguel de Icaza

    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


    Mono Security Stack

    by Miguel de Icaza

    Sebastien for a while has been working on all-things-security in the Mono stack, in today's blog entry he describes how to write an SSL server in 3 simple steps.

    He uses that to showcase the Mono.Security assembly and the excellent work that Carlos Guzman Alvarez has done on the TLS/SSL stack in Mono (Carlos is also the man behind the Firebird database provider for .NET).

    In any case, Sebastien's blog is packed with technical information on a wide range of cryptographic and security topics (specially related to Mono).

    Posted on 30 Nov 2004


    ApacheCon

    by Miguel de Icaza

    At ApacheCon today, just finished my keynote, there is a video and audio of it here.

    The slides of my presentation are here.

    F-Spot failed during the demo, the problem was that on CVS Geoff just made Mono.Data.Sqlite support both the old Sqlite and the new Sqlite3, a tiny logic error gets the autodetection wrong (which is now fixed).

    Dmitry Robsman, myself, Scott Guthrie, Daniel López

    With the creators of ASP.NET (Dmitry and Scott) and the original author mod_mono (Daniel).

    Daniel is at the conference demostrating at the conference is BitRock installer for Unix which is an Install-Shield like installer for Linux, BSD, Solaris and Windows and works with in GUI, text or unattended modes.

    As a proof of his installer, he has a sample Mono installer for Linux that includes XSP and Apache for folks that want to get a quick head-start on Mono. The simplest Mono installation on Unix so far.

    There is a lot of Java presence, and some PHP presence at the conference.

    In other news: am running IBM's Derby in Mono, without having to write a line of Java. Love!

    Posted on 16 Nov 2004


    CVS to SVN migration completed

    by Miguel de Icaza

    We completed the migration of the Mono repository from CVS to SVN. We did a few dry runs of the whole migration to verify that nothing would go wrong.

    We are happy to report that the migration went as planned and we only had a small service interruption of a few hours while we did the final migration.

    The repository had 635 megs of data in 34,831 files checked-in. We are using the file system backend, and things went very smoothly.

    Details on the migration process for Mono users are here.

    Posted on 11 Nov 2004


    New Dynamic Code Generation API

    by Miguel de Icaza

    Lluis has been working on a new Dynamic Code Generation API for Mono. A detailed blog post with source code, examples and rationale is available here.

    Lluis' new code generation API is a medium-level API and sits happily between the CIL (too low level for certain tasks) and generating C# source code (too high level and slow to produce, compile and dynamically load for certain tasks).

    Notice the interesting model for the code generation.

    Posted on 10 Nov 2004


    Novell Linux Desktop

    by Miguel de Icaza

    The Novell Linux Desktop has been released, a web page with information (and various flash demos) is available here.

    Congratulations to the desktop folks for this release.

    They have a starter's page in Novell's Cool Solutions with an overview for those new to NLD.

    Joseph Hill

    Joseph has been running www.gotmono.net for a while, and today I discovered his blog. What I found interesting is that he has been maintaining ASP.NET applications and ports of Mono (here) and his blog talks about his experiences.

    It is an interesting read for those interested in Mono deployment and performance.

    Although he is beta testing some new ASP.NET-based forums, the current forums are very active.

    Alan Nugent Inteview

    An Interview with Alan on the recent Desktop Release is here

    Posted on 08 Nov 2004


    Sweet tool

    by Miguel de Icaza

    Joshua Tauberer (Monodoc hacker extraordinaire and of GovtTrackUs fame) has ported Perl's Algorithm::Diff to C#, lovely tool available here.

    It is not limited to strings or characters, it can operate on anything comparable.

    Posted on 06 Nov 2004


    Massi posted SSAPRE for Mono!

    by Miguel de Icaza

    Massimiliano just posted his implementation of the SSA-based Partial Redundance Elimination (for an explanation, see Massi's presentation).

    This is an important milestone in Mono's runtime to improve the performance of computationally intensive tasks. The patch is only 2069 lines of code.

    Massi previously implemented the Arrays Bound Check eliminination in the Mono VM. Congratulations Massi!

    Personal Web Sharing

    Am now using GPWS to share files from my computer at home.

    Hasan has a blog where he talks about his Gtk# experiences.

    Updated NPlot

    I have updated NPlot to version 0.9.7 and improved the widget performance. You still need to use CVS mcs and libgdiplus to get it to work.

    Code drop is here. Now with a spicy makefile.

    Matt (the maintainer of NPlot) said that he wanted to distribute the Gtk# moving forward.

    Ariel Faigon on Usability

    An interesting presentation from Ariel Faigon on usability and another one on testing

    Posted on 05 Nov 2004


    Elections

    by Miguel de Icaza

    Being the optimist that I am, I will go to sleep thinking that the count is not complete, and that the Electoral College will fix the world for us. If the supreme court made some hand tuning to democracy last time, I will hope some other hand tuning can still happen.

    Slashdot browsed at +5 has some very interesting comments

    Harper has a guide for those who want to Leave the Country and there is a list of reasons not to move to Canada.

    To me, its like an adventure, like in the Timeline movie: we get to go back to the middle age and explore a world where science and intelligence are a liability.

    Nixon got impeached on his second term, there is hope ;-).

    NPlot for Gtk#

    In the paste few days I had been doing a Gtk# facade for NPLot: a wonderful library to do plots.

    There was not much in the way of porting. NPlot alredy supported two front-ends: an ASP.NET one and a Windows.Forms one, so this is only an addition. The engine is completely independent of the presentation layer, which is good.

    NPlot exposed bugs in our C# compiler and in System.Drawing, they are both fixed on CVS HEAD and the 1-0 branches. Sadly these fixes came after Mono 1.0.4 and 1.1.2 were built, so to use it you will need to get CVS.

    The sources are available here. And here it is in action:

    NPlot Gtk

    Erik discovered NPlot a few weeks after Nat and myself were talking about widgetry that we would like to see available for developers. We were talking about scientific (2D plots, 3D plots, animations) and business widgetry (validating data entries, Gnumeric-like data entry, database-bound widgets).

    NPlot fills the 2D plotting gap quite nicely. We had looked at some Gtk+ solutions, but this solution requires no bindings at all and can also work in batch mode or to produce plots for web applications.

    Posted on 04 Nov 2004


    Why my next mp3 player wont be from Apple

    by Miguel de Icaza

    I want a music player that will play nicely with Linux and from a company that will not try to sabotage me at their will. When I buy music from the Apple Music Store, I can not play it on Linux.

    I know about FairKeys, but this is not a product that could be shipped by Linux distributions that are afraid of getting into a lawsuit. So it effectively can not enter the mass market of free software users.

    I have always been annoyed at this, and today I found this on BoingBoing: iTunes upgrade used to remove more features (disguissed as an "upgrade") and a follow up (through Dave Winer).

    Luckly Slashdot has pointers to a bunch of new iPod Killers: Part 1, Part 2, Part 3 and Part 4.

    Certainly Apple has a couple of years of advantage in terms of improving their product compared to their competition, but am going to spend my money into funding products and companies that are not out to screw me or limit what I can do with the device I purchased.

    If people have good experiences on a good portable player, let me know. Am looking for something with 20 gigs of space and possibly ogg support. FM and recording are pluses, but not very important.

    Posted on 01 Nov 2004


    Eminem

    by Miguel de Icaza

    New song from Eminem is out. lyrics, plus video in Real and Windows Media are available.

    Loved the video.

    Commentary and lyrics at common dreams

    Florida Elections

    Greg Palast on Harper magazine this month on the new touch-screen computers in Florida's election or how Florida is learning one or two tricks from Mexico's IFE.

    Nat on Inspiration and Software

    A great read from Nat's blog: Getting nothing wrong is for the uninspired

    Walking to Work

    Today my laptop was left on while I walked to work, and this is what happens when you walk by MIT:

    Posted on 29 Oct 2004


    Anonymous Methods on CVS

    by Miguel de Icaza

    The anonymous method support has been checked into CVS in the HEAD branch.

    Another cool Mono App: Panoramic Photos

    Autopano-sift is an application to assist in the creation of panoramic images from a series of pictures.

    Sam Ruby Slides

    From DevCon are available.

    Posted on 27 Oct 2004


    Mono Summit Notes

    by Miguel de Icaza

    Last week we had a Mono Summit in Cambridge, notes from the various discussions and developments are available here: http://www.go-mono.com/summit-notes.html

    Posted on 26 Oct 2004


    The Story of Diego Garcia

    by Miguel de Icaza

    John Pilger documents the Story of Diego Garcia and the cleaning of the native population in the 60's.

    The story has a happy ending, those expelled from Diego Garcia received 3,000 pounds (each).

    There is more information on Pilger's site.

    Duncan's NodeStore/NodeView

    Duncan has done some work to bring the NodeStore/NodeView to life, simplifying the life of those using the TreeView, here is a screenshot from his blog entry:

    NodeSample screenshot

    Posted on 25 Oct 2004


    100 facts, 1 opinion

    by Miguel de Icaza

    Interesting article: 100 facts, 1 opinion.

    Btw, you can not use `Fox News' as your fact check source ;-)

    Cleaning up the Record

    Yahoo picked up on the removal of transcripts of the from the White House web site. The removals include some priceless gems.

    For those running to the wayback machine to look for the originals the Whitehouse web site has been updated with a robots.txt file to avoid it.

    Gnome Notifier

    Thanks for all the e-mail on the Gnome Notifier. Am not interested in turning this prototype into a working product, there are better efforts underway. The point I was trying to make on my last post was that early on I realized that we needed the notification system to do more than just show a message: it is important to be able to have a list of actions associated with it that I can click on.

    My toy Gnome Notifier was written a few years ago as a sample program that I wanted the Gnome people to productize. It was not meant to be a real or completed program.

    Linux and Windows

    Nicholas Petreley has a Security Report on Windows vs Linux.

    Posted on 24 Oct 2004


    More on the Draft

    by Miguel de Icaza

    Jamin, you might want to read the news articles posted from Enjoy the Draft's FAQ. I was particularly interested in question (5).

    Posted on 23 Oct 2004


    .NET Performance

    by Miguel de Icaza

    Rico Mariani has a blog on .NET performance. An interesting read is his Performance TidBits post.

    A good companion is: Improving .NET Application Performance and Scalability.

    Notifications

    Calum writes his feelings about notifications: they should not have options. And here lies a problems with the view on notifications: am personally not interested in the equivalent to `tail -f some_log'. I want my notifications to be interactive, and hence those options seems awesome.

    I am personally interested in a notification framework to the desktop to avoid things like GAIM popping up a dialog box in the middle of writing an email that asks me if I want to accept a buddy or not. In this particular case having a default button makes things worse, because I do not know which people I have accepted or not accidentally. I literally have this problem every day.

    In fact, I want to have a log not only of notifications but of actions to follow up to. So some notifications should not go away, they should stick around, and when I have the time I can go and click the appropriate buttons `accept', `accept', `reject', `reject'.

    Some other notifications can just go away: if I have not responded to the CD insertion action, it can likely go away from my screen.

    Longhorn keeps track of notifications that the user has not seen.

    My old gnome-notifier does exactly this, and supports a special kind of url `run:' that you could use to run programs in response to actions.

    Elijah Gaim is one of the applications that have this behavior. But even if you do not steal focus, I do not want a window popping up in the middle of the screen for GAIM. I want these kind of notifications to go elsewhere (Windows uses a baloon and the proposals so far are along the same lines: notifications are out of your current work area).

    Enjoy the Draft

    An educational website: Enjoy the Draft Dot Com.

    The FAQ is a must-read.

    A lighter, more positive side of the draft.

    Posted on 22 Oct 2004


    MonoForge

    by Miguel de Icaza

    I am the last one to notice monoForge a site that allows you to test your Web-based Mono application on Linux. During the beta period the service is free.

    Gnome Notify

    An implementation of the Desktop Notification. Fredrik is working to get a notification that looks like Tuomas mockups.

    Another version is MonkeyPop which uses Mozilla. MonkeyPop uses a set of tools for developing desktop applications called the Chicken Framework. One nice thing about the Chicken Framework is that its distributed with documentation.

    It would be nice for the authors to work together.

    Posted on 21 Oct 2004


    Evolution E-Plugin HackFest

    by Miguel de Icaza

    Join the EPlugin hackfestTomorrow the 21st I will be participating on the Evolution E-Plugin hackfest. The hackfest will take place in the #evolution IRC channel on irc.gnome.org.

    We will be learning the E-Plugin interface that Michael Zucchi designed for Evolution. Now Evolution 2.x can be extended with user code to implement your favorite missing feature or your favorite aberration.

    Plugins are typically built with C but there is a Mono interface so any Mono supported language can be used to extend evolution.

    This blog entry has some demos of the E-Plugin from August, it will give you a few ideas of what can be done.

    Mark Crichton's Mozilla# for Windows

    Mark has Gecko-sharp running on Windows (this is the Gecko binding for Gtk# running on Windows).

    Gecko# on Windows.

    Posted on 20 Oct 2004


    Helix Code Fifth Anniversary

    by Miguel de Icaza

    Echoing Nat's post on the fifth anniversary of the incorporation of Helix Code.

    Seven Cool Mono Applications

    Edd has written an article on Seven Cool Mono Apps built for Linux using Gtk#.

    More Gnome Toys

    After the above article from Edd, Eugenia posted a list of another twelve applications written in Mono/Gtk# here and today I also noticed MonkeyPop and Word of the Day Applet

    A lot of cool innovation on top of Mono/Gtk#.

    Posted on 19 Oct 2004


    Citizen Microsoft

    by Miguel de Icaza

    An interesting article studying Microsoft as a citizen, based on the ideas from the movie "The Corporation".

    The author wrote a very interesting follow-up to it.

    Update: Nat has posted his thought on Microsoft. A must read.

    Jon Stewart

    Jon Stewart is my hero. His appearance on CNN this Friday was unbelievable. He showed the world the state of journalism in the country.

    You can read the script, but I recommend watching it (BitTorrent).

    Mono-esque and Gnome-esque happenings

    Garret has updated the F-Spot Product Design Wiki with many screenshots as a foundation for ideas to F-Spot

    This week all the Novell Mono developers came to town for our semi-annual meeting.

    Posted on 18 Oct 2004


    Mono Day in Bangalore

    by Miguel de Icaza

    Vasu has posted a description of the events on the Mono Day at Novell Bangalore. It describes some pretty cool demos that they did.

    Dodos

    If you were looking for information about the now extinct Dodo, look no further than here. The first match in Google is not about the Dodo, its about some Internet provided in Australia.

    Mono's XML stack

    We learned from Dare that XML 2 was going to get some features cut, which is a good thing for us, as there is less to implement. Kind of a shame, since Atsushi has a good foundation for XQuery already on the Mono tree. Until XQuery is added back to the Framework, we will likely distribute a Mono.XML assembly that contains our implementation of XQuery for those interested in using it before the next major revision of the .NET Framework.

    Atsushi had been working on our XQuery implementation for Mono, and has some insight on its current design and limitations.

    Sean has lost his mind

    From Todd's blog I see that Sean has decided to shoot Gaim in the foot: look at this this monstrosity.

    To add humor to this, Nat found the the ChangeLog entry for it:

    Modified Files:
     	gtkprefs.c 
     Log Message:
    
    Simplified the prefs dialog by replacing the tree with tabs.
     
    You may think this is a bad idea, but it"s not.
     
    	

    Posted on 14 Oct 2004


    Genuinely Interesting Hack

    by Miguel de Icaza

    John Luke blogged about Lazlo. Lazlo is very similar in spirit to Macromedia's Flex: it is a server-side XML markup for creating applications with JavaScript as the programming language for it.

    Like Flex it produces Flash files dynamically, and it is implemented using Java. An adorable project, worth helping those guys out.

    A demo of Lazlo can be seen here.

    Spanish Mono Article

    Jordi Mas (from our Windows.Forms team) has written an article in Spanish about Mono: Beyond .NET.

    Happy Anniversary Jackson

    Jackson has been with the Mono team at Novell now for a year.

    Most Missleading Foreign Policy Statements from the VP debate

    Someone had the patience to do it: here. This one is particuarly packed with jewels.

    And for healthcare, there is this one.

    Since am linking, a new Mark Fiore episode: The Few, The Contractors.

    Farenheit 9/11

    Got my Farenheit 9/11 DVD yesterday and I watched the beginning of the movie again. As awesome as it was when I first watched it, and comes with some extra footage and complimentary material.

    Watching it for the second time, I felt that there was so much more that could be added to the movie and spice it more with what we know since the movie was released. It is still a very powerful movie.

    Posted on 07 Oct 2004


    C# Precisely

    by Miguel de Icaza

    Peter Sestoft and Henrik Hansen have published their new book `C# Precisely', a pretty concise book from MIT Press and it covers the C# 2.0 language including generics, iterators and anonymous methods.

    Peter is one of the developers of the of the C5 class library: a library of generic classes for C# (We package this for Mono as the Mono.C5 assembly).

    Posted on 05 Oct 2004


    Mono Success Story

    by Miguel de Icaza

    I mentioned a few days ago Joshua's GovtTrack.us web site. This web site is data intensive and was ported from Perl to Mono, according to Joshua the porting experience was a joy.

    Joshua is one of the XSLT magicians in the Mono project, the man who turned 3,000 lines of C# code for pretty-printing our documentation into 300 lines of XSLT macros.

    But Joshua did not use ASP.NET to write the new site, Joshua rolled out his own processing model using Mono and the low-level hooks of System.Web, he discusses the porting process on a recent article:

    Websites have some of the same design issues as programs. One common issue is how to avoid duplication, but while software developers have solved this issue with functions, website developers are still struggling for a solution. GovTrack.us, my new website, solves this problem using XSL transformations and the Mono framework.

    The article is interesting for anyone interested in extending and hooking up to the HTTP processing pipeline in Mono and also discusses how to extend Mono's XSLT with C#-coded functions.

    Joshua has a blog.

    Linex (Debian) packages for Mono

    Users of Linex can download packages for Mono from here. The rumor on the street is that Alo himself packaged Mono. Maybe he has finally reached enlightenment.

    Posted on 04 Oct 2004


    Spreading Freedom

    by Miguel de Icaza

    While watching the debate, president Bush made a statement about how spreading freedom was the right thing to do. And how eventually freedom will help fix things in the world. The CNN blog had a funny remark:

    I love the way Bush talks about "spreading" liberty and "spreading" freedom. Like they're this peanut butter and jelly that can just be piled on top of slices of other countries.

    A point that I think people have been missing is that the major source of the problems around the globe have to do with quality of life, freedom comes in a distant second place.

    The focus on the war on terror I believe is completely missguided. Dropping bombs or shooting people will only exacerbate the dislike for an invasion. On the other hand, if social programs to reactivate the economy, to improve health-care, to improve schools, to create jobs, you will increase the number of happy people and minimize the discontent.

    There is a whole debate about what "freedom" means, and it probably means different things to different people. Every once in a while I ran into people who miss the days of living under a dictatorship: from the Franquistas in Spain who think the country was better off with dictator Franco, to chileans that believe that dictador Pinochet was the best thing to happen to Chile since sliced bread. These people were enjoying their lives and hence had no problem with the imperfect states of government they had.

    My point is that some people did not care about their freedom rights as long as they themselves were doing fine. Another example are some americans today. They seem to be just happy to reduce their own rights and freedoms for the sake of security (Patriot Act) or the sake of capitalism (The DMCA).

    A better strategy to fight terror around the globe would be to revisit US foreign economic policy, to help organizations like the FAO, give economic relief and revisit the free trade agreements to level the standard of living around the globe.

    The subject is explored from an economist point of view: here and here.

    And of course, at the core of the problem I believe strongly is ultra-capitalism: companies and practices which are only concerned in increasing shareholder value with no social compromise (The movie "The Corporation" digs into this issue more).

    Other post-debate links

    On Korea's nuclear proliferation.

    Last night I watched , very interesting documentary on the relentless effort to bring Clinton down. The ironic bit of the movie: while Clinton was preparing to do a speech at the UN on terrorism as the biggest threat to the world, the republicans were airing and promoting his deposition on the Lewinsky case.

    The most interesting tidbit comes in the DVD: at the premiere of the movie, Clinton got to speak to the audience, and had great bits of insight. What makes the man most admirable is that he respects those that disagree with him, and proposes to engage in a discussion to understand the different points of view.

    Posted on 02 Oct 2004


    The Debate

    by Miguel de Icaza

    Enjoyed pretty much the debate, I was surprised at Kerry's articulate intervention. Bush did try the whole show to point out Kerry as changing opinions, I wish Kerry had pointed to Record Shows Bush Shifting on Iraq War.

    Alex (of Tomboy fame told me today on IM:

    Alex: ya, he was damn good Alex: if he had been able to speak that way throughout the campaign he'd be winning Alex: the problem is that bush's progeny is much better at spin Alex: so by this time tomorrow the people will be convinced that bush won the debate

    Posted on 01 Oct 2004


    GovTrack.US

    by Miguel de Icaza

    Joshua is a long time contributor to Mono and on his copious spare time he works maintaining the GovTrack.US web site. He has just completed his port from Perl to Mono.

    Let me quote Joshua:

    So now if you go to www.govtrack.us, you get my new and improved Mono-powered site. I probably said this last email, but using Mono has been unbelievably easy and helpful.

    Congratulations to Joshua! And we will keep an eye on Monologue for his comments.

    Mono book at XML conference

    Edd reports that his Mono book was the top seller at the XML Open conference:

    O'Reilly had a book stall at XML Open, and I was very glad to hear that Mono: A Developer's Notebook was the best-selling book during the conference. Very amusing, for an XML conference!

    ...

    The way that people can help best is to ask for the book in their local stores and get them to order it. If lots of requests show up from stores, then it really helps make a case to the central buyers for ordering it.

    Posted on 29 Sep 2004


    Chomsky on Video

    by Miguel de Icaza

    In the last couple of years I attended a couple of talks from Noam at MIT and Harvard. Excellent talks, if you were not able to attend these, you might want to get the DVD.

    It comes with the presentation at Harvard and a Q&A section from both events.

    Duncan sent me a link to The Life of Joe Republican, very funny, excerpt:

    All but $10 of his medications are paid for by his employer's medical plan because some liberal union workers fought their employers for paid medical insurance - now Joe gets it too.

    On the other end of the spectrum

    On the other end of the spectrum, multi-billionaire George Soros gives his opinion on Why We Must Not Re-elect President Bush.

    Follow up: Bruce Springstein interview detailing why he had to take a position on this election.

    Interview with Mikael Hallendal

    Mikael is the founder of Imendio, there is an interview with him at OSnews on the subject of Gtk+/Gnome commercial support.

    Solaris and the Linux kernel

    I read with alarm the discussion between the Solaris kernel engineer and some Linux dude. I have to say that it is a bit sad that the Linux dude did not understand the points of the Solaris kernel developer.

    It was a bit embarassing to read the arguments from the Linux dude. And I found myself agreeing more with the Solaris engineer which clearly articulated the rationale for his decision. On the other hand or Linux friend just launched a long tirade of fanboyism and flames.

    This is the wrong way of advocating Linux. I have always maintained that to effectively compete you should never compare the downsides of your competitor with your advantages, that just leads to the placebo effect you can see from the Linux guy: "everyting we do is fine, there is no need to improve". He got defensive. But this is exactly the wrong attitude to take because in this mode of operation you do not react and do not take steps to improve. What the Linux community should do is compare the strengths of Solaris and the weaknesses of Linux. Maybe there are things that can improve, maybe there are cultural changes that can take place but dissing someone else on these grounds is not going to improve our loved kernel.

    When Sun decided to adopt Gnome as their desktop environment there was a big discussion about API stability, an issue that many of us although peripherally aware of, did not take as seriously as Sun did. We have to thank Sun for bringing that culture into Gnome, and I wish that the same culture spead further to other projects.

    Reverse Migration Linux to Windows

    The slashdot thread at +5 has some very interesting insight on the latest Get the Wrong Facts campaign from Microsoft. The best responses: one, two but in general everything at +5 is worth reading.

    We are all stoned slackers

    Awesome Interview Transcript: Jon Stewart being extremely classy in his replies to the ad-hominem comments from O'Reilly.

    According to O'Reilly viewers of the Daily Show are stoned slackers, research apparently proved the opposite: the audience of the Daily Show is more likely to have completed four years of college as opposed to the O'Reilly audience. Me not having completed college probably puts me on the `stoned slacker' category.

    In other news:

    Posted on 28 Sep 2004


    Managed Windows.Forms update

    by Miguel de Icaza

    Jackson just posted an update on Mono's new managed implementation of Windows.Forms.

    JavaScript update from Cesar

    Cesar has posted an update on his work on the JavaScript compiler for Mono, it is here

    Jon Stewart's new book

    I own it now.

    Johannes Software Page

    Mandatory link to Jon's blog. His software page has various C# programs.

    Two more things to go

    Todo list getting shorter: parameters missing, fix iterators (which I broke), switch statement, write rationale and author ChangeLogs:

      Test passes: a-call.cs
      Test passes: a-capture1.cs
      Test passes: a-capture2.cs
      Test passes: a-capture3.cs
      Test passes: a-capture4.cs
      Test passes: a-capture5.cs
      Test passes: a-capture6.cs
      Test passes: a-capture7.cs
      Test passes: a-capture8.cs
      Test passes: a-event.cs
      Test passes: a-instance.cs
      Test passes: a-nested-anon2.cs
      Test passes: a-nested-anon3.cs
      Test passes: a-nested-anon4.cs
      Test passes: a-nested-anon.cs
      Test passes: a-nested.cs
      Test passes: a-parameter2.cs
      Test passes: a-parameter3.cs
       Test fails: a-parameter4.cs
      Test passes: a-parameter.cs
      Test passes: a-simple.cs
            

    Code drop

    Posted on 21 Sep 2004


    Trip to M�xico City

    by Miguel de Icaza

    I will be talking to some Novell customers in Mexico City about Novell Linux initiatives and some of the Novell offerings on Thursday September 20th, if you want to come, register here.

    A Nation Divided

    I found this link from Jon Udell's blog: Valdis Krebs has graphed the books purchased in online retailers and has come up with a pretty interesting view of the nation based on the book purchasing patterns.

    It begins in 2003 continues in early 2004 and there is a recent update

    Atsushi Enomoto on the Move

    Super-hacker Atsushi Enomoto is on the move. He will be at the XMLOpen conference in the UK representing the Mono team, and later will land in Boston for couple of weeks to do some local hacking and consume lobster sushi.

    Evolution 2.0 is out

    Evolution 2.0 has been released.

    Shame about the shortcut bar being gone, I never use the folder list, I have my life organized using shortcut bars.

    Posted on 20 Sep 2004


    MD5 security: great blog entry

    by Miguel de Icaza

    Sebastien has posted his thoughts on the MD5 vulnerability. Check it out!

    Robert Cringely

    I always find Robert Cringely engaging on his articles, and his last installment follows this tradition. Some would say its nothing short of insanely great.

    Anyways, a couple of thoughts:

    • 50,000 or so geeks over at Microsoft spend some portion of their time thinking `How can we defeat/block Linux' and they come up with some pretty crazy ideas. In this installment Robert makes the point about the new USB system, but this is just one angle.

      It is clear from Chris Anderson's last post that it is an ongoing strategy to come up with schemes that will lock Linux out (even if they are highly inadequate for the world where scams are the rule of the day).

      Avalon's feature set is one of these creative things they come up with. I am convinced that they see Avalon as the tool that will replace the Web (the marketing folks will step in and claim that they `augment the user experience').

    • The software industry like no other one has a tremendous flexibility to create completely new models and abstractions, roll out prototypes and such.

      Maybe we are reaching a point where we need government regulations on the software industry or in some of its components. An explicit acknowledgment of Linux and open source players as an important player in consumer choice.

      Ah, not only had I suggested that when Slashdot posts a link to the MS lobbying efforts.

    Speaking of augmenting the user experience. It is clear that plenty of work can be done today to augment the user experience of the web: GMail and Google Local services is leading the pack in smooth user interfaces. Everyone is raving about the keyboard navigation, the clean look and the good interaction of GMail, while am delighted to see the clever hacks to explore maps without doing page reloads.

    And finally there is A9 who also sports a great user interface on the Web.

    Firefox reaches one million downloads

    Firefox reached one million downloads ahead of schedule. Congratulations to the Mozilla hackers!

    Java APIs too academic

    Someone else also thinks that Java APIs got too academic: here

    Posted on 19 Sep 2004


    Tomboy: the latest hack from Alex

    by Miguel de Icaza

    Alex has released into the world his tomboy software. Check it out. Am addicted to it.

    Kerry Followup

    Another reason to vote for Kerry: to avoid more de-regulation.

    Been enjoying reading Stiglitz's new book: The Roaring Nineties.

    Posted on 18 Sep 2004


    Follow up to John and Todd

    by Miguel de Icaza

    John list of reasons to vote for Kerry was zero, so I figured I could cook up a few interesting links:

    • Chomsky said: "Kerry is sometimes described as 'Bush-lite', which is not inaccurate. But despite the limited differences both domestically and internationally, there are differences. In a system of immense power, small differences can translate into large outcomes."
    • For an outsider like me, it seems interesting that Democrats can fix the deficit, while republicans like to get in debt, nice graph.
    • Military spending will not likely make the US more secure, see Zinn. Am not an American, but am living in the USA, so I care about my security.
    • Kerry's position on greenhouse-gas emisions.
    • Kerry's non-nuclear proliferation.
    • Kerry's position to embrace science instead of ideology. Contrast with the current administration distorted research.
    • Kerry's economic policies were endorsed by ten nobel prize winners. I guess its simple to have better policies than Bush, as Nobel economic winer described the current policies: `The worst in 200 years'.
    • MoveOn has a few ads. My favorite: the fisherman (Richard Dove).
    • Woody Allen thinks that voting for Bush for him would be tragic, extremely tragic.

    I guess am biased being the son of a scientist and all that.

    New Chomksy

    A new piece from Chomsky.

    I also found his blog. Wonder if Chomsky uses Emacs being from MIT. I have always wondered how approachable Chomsky would be to have dinner with my friends. Anyone have his email address?

    Gnome Updates

    A new publication: Gnome Journal to keep up-to-date on interesting bits from the Gnome world.

    Gnome 2.8 was released: fancier, simpler, cleaner and more hip than ever.

    I had dinner with the Fluendo guys in Barcelona last week at Thomas' place days after they had released their Theora Java applet. The quality is very good, and the best thing is: you do not need to install any software on any machine to watch live video streams from Theora servers. They will be happy to sell you a streaming server.

    The Gnome Summit announced its dates; this year in Boston will be held in the Stata Center in MIT, the new gorgeous buliding across the street from the Cambridge Novell offices where we work from: Mark your claendars.

    Jeff's company launched their new distribution: Ubuntu. Not only they picked a great name for their company, but they are adding timed releases to Debian, I would say the major problem for Debian's adoption (please do not send me email saying `just use sid/whatever' or `Debian testing is great for me').

    Evolution 2.0 is finally out according to the state page. But I can not find the official announcement. An overview of some of the new features is here

    Errors and Warnings

    When I started using C# on the early preview days of .NET, one of the first things I noticed is that the compiler did quite a lot of work to produce helpful error messages.

    While implementing MCS, we noticed that it went beyond the obvious internal checks of the compiler: the MS C# team actively had to add extra work to produce a more meaningful error. This is in addition to C#'s definite assignment requirements which by itself catch plenty of errors that are commonly introduced in C.

    Recently Marek Safar has been on a quest to refine our error and warnings to produce as many as the MS compiler does and to fine tune our reports. We are not there yet: today we catch 617 errors/warnings, we fail to report 18, and we report differently in 136 cases.

    The parsing errors are the most difficult to cope with our compiler as we used Yacc to build the parser and the parser recovery is a lot harder than if you do your own top-down parser (something that we might do in the future).

    Being Fabulous

    I did a presentation on Mono last week at the Universidad Oberta de Catalunya, here is the: video.

    I was exhausted when I did the presentation, having slept only four hours for the past fourty-eight due to the jetlag, the dinner following up was excellent, I had a chance to talk to a few folks afterwards.

    Posted on 17 Sep 2004


    Back from Barcelona

    by Miguel de Icaza

    Noticed that Matthew MacLaurin from MS research weight in on Nat's work on the dashboard, WinFS and metadata.

    Paco has posted a nice update for those who want to use Gtk# on Windows: simple installers and integration into Visual Studio as well as videos to see for yourself how to use it.

    Nat's keynote presentation this morning was excellent: plenty of content packed in the fifteen minutes they had allocated, and they showed some Groupwise integration, F-Spot and collaboration features using iFolder.

    The best feature of iFolder in my opinion? Being able to share the folder with myself in different computers: my laptop, my Windows box at work, my Mac at work and my two computers at home. The idea is simple: now all the data gets replicated and I no longer have to worry about which machine has the latest version of a draft.

    Massimiliano explains his SSAPRE implementation for Mono. Massi has been working on implementing the large optimizations for the Mono JIT engine.

    Gonzalo and Ben have been working on making Mono's ASP.NET implementation scale and perform better. The upcoming 1.1.1 release will contain all the goodies. Get ready to be impressed.

    Mexico

    I will be in Mexico City on Tuesday. To reach me, call my US cell phone number, I doubt my local phone works anymore.

    Posted on 16 Sep 2004


    Arrived in Paris

    by Miguel de Icaza

    Hanging out at the Paris airport, it was about time they had wireless access. Waiting for my plane to Barcelona.

    Posted on 11 Sep 2004


    Avalon part 2

    by Miguel de Icaza

    Chris Anderson from the Avalon team replied to some of my points that I made last week

    First, let me stress again that I think that the guys over at the Avalon team are doing some fantastic work and probably have had to make some hard decisions and have a lot on their plate.

    Cris, As I said in my previous post, if Avalon really takes off, we might look into bringing that API to Mono as well.

    My concerns stem from the fact that we do not want to waste our time with dead-end APIs as we are vastly under-resourced, so we must choose carefully. With that in mind, and keeping in mind my bias.

    Security:
    I agree that solving the low-tech attacks effectively with software is probably a research subject. And I appreciate that you guys are putting a lot effort on the security infrastructure for WinFX, Avalon and .NET but it still falls short: it will not resist the low-tech attack today.

    Bruce Schneier has a good introduction to attack trees. The core is that in any system that is to be secured an attacker only needs to choose the weakest link. In this case, Avalon's ClickOnce just seems like a disaster waiting to happen. Imagine Outlook viruses gone wild.

    Solving this is extremely simple, the answer is well known: do not allow ClickOnce-like technologies.

    My guess is that the problem is that this goes against the fundamental reason for the existence of Avalon.

    Joel's latest piece has some good points on the role of software in societies. It seem that engineering organizations are too much in contact with the technical details of how to make things happen, without looking at where and how the software is going to be consumed.

    Certain things in the Gnome world have been hard explicitly to avoid problems of this nature (the never-shipped and luckily-defunct executable-mime-type handler is one example).

    Complexity:

    Anyways, my problem is that it seems that Avalon is trying to do too much too soon. It seems to be following the over-designed footsteps of Java's Swing: it avoids the over model-view-controller-itis, but it introduces its own pains and has the elements of a second system

    The surface area is just of gargantuan proportions, sure, if you are dealing with a `Button' you will be fine. But hey, it was relatively simple to build buttons with Motif and Swing too.

    You are right that it is unfair to comment on a product that is not even beta, but if you guys are shipping in 2006, I do not see a lot of room to maneuver there. I can only hope I am wrong.

    Tk and XView are nice examples toolkits that hide the complexity from the user each on their own ways. These toolkits encapsulated the complexity and exposed only the basics to the user: they provided fairly high-level building blocks and the rest was tucked-in behind the scenes. On the other side, we have things like Avalon where the implementation details transpire at every level: not only is the developer going to use the high-level building blocks, but he will be exposed and will face the internals.

    Am not arguing that it is necessarily bad, but it is easier to expose as little as possible and add features on an as-needed-basis than it is to come up with a large framework and maintain every implementation decision made today.

    By exposing as little as possible you have a choice when it comes to architecting the internals, and most importantly to re-architect the internals in the future if you must. A clean separate between the exposed API and its implementation. But Avalon does not have this luxury: the API is the implementation and the API transpires very much of the implementation (mind you, this is very convenient for people interested in re-implementing it, while tying their hands to an existing design).

    Standards:
    I read with interest the various justifications for not following the standards just when Avalon was coming out, I wont argue about the merits of the CSS one, but the case for not using SVG is particularly poor: `not using pascal casing', `not using full english words'?

    It can only make sense in a world of only-Microsoft technologies, but even there, you are shooting yourself in the foot: collaboration with others might be initially difficult, but it has always paid off in nature.

    Collaboration of Microsoft with competitors tends to be difficult. Maybe there are ways we can improve this.

    As for missing features, there are ways of driving the standards forward. For example the whatwg group is finally moving the web forward again.

    In any case, thanks for listening Chris, and lets hope that you guys can improve Avalon, but in the meantime some folks are considering the options, Joel has two good articles: API war and his call to arms to improve the Web with some followups. Update: Fixed a few typos.

    Mono Updates

    Sebastien has posted an update on CAS.

    Our XQuery implementation was born on August 20. Atsushi has posted an update on System.XML 2. You can also see his prototype to call CIL from XQuery.

    Debating trip to Redmond

    Due to some other commitments it seems unwise to attend the TG2/TG3 ECMA meetings in Redmon on the week of the 20th.

    Am wondering if I should fly in on Sunday to attend the Tuesday meeting. If there are people from Microsoft interested in meeting on Sunday for dinner and Monday (nothing formal, just chilling out and debating software things). That might make for two useful days: one ECMA and one of chilling out.

    Thoughts? miguel at novell dot com is the address.

    Have to make a decision on the next 48 hours.

    Another Molly Ivins Gem

    Molly Ivins can write very well.

    Greg Palast on Choice Point

    Greg Palast on Choice Point and the DNA database of every citizen:

    These guys are in the Fear Industry. Secret danger lurks everywhere. Al Qaeda's just the tip of the iceberg. What about the pizza delivery boy? ChoicePoint hunted through a sampling of them and announced that 25 percent had only recently come out of prison. "What pizza do you like?" asks CEO Smith. "At what price? Are you willing to take the risk?..."

    Oh my god! Good thing I get my Pizza from the frozen section at the minimart. I feel safer now.

    From Planet Gnome

    Some great animations.

    Posted on 09 Sep 2004


    On Resolution

    by Miguel de Icaza

    I have been using a laptop with 1400x1050 for more than a year, probably two years. Recently I have been considering getting something more hip, to go with my hip nature. Something like the IBM X40.

    The only problem I have is that anything below 1400x1050 now feels to me like this:

    Posted on 08 Sep 2004


    Deficit

    by Miguel de Icaza

    Associated Press: Beating the last year record of 375 billion dollars, this year the projected deficit is going to be 422 billion.

    Taylor just sent this note:

    
    	Budget Deficit  $442,000,000,000
    	                      divided by
    	Workers              141,700,000 (Census Bureau)
    	                ----------------
    	Equals                     $3119 per worker
    	
    	I hope you all are ready to work extra hard next year.
    	 Flak Jackets don't grow on trees.
    
    

    Economic girlie men with a twist.

    Update 2: Am sorry for updating this so many times, but I could not help but make a reflection. The `do not be a girlie man' defense of economic and tax policies sounds as idiotic to me as the defense of the internet boom business models. I can not help but think back at how a few people warned of the coming catastrophe and people laughed at those who were wondering where the profits were and how those things would be sustained.

    It seems that the current economic and tax policies are rooted not on careful economic research but in punch lines. That bubble is going to burst.

    Barcelona

    I will be going to Barcelona on Saturday for the Novell Brainshare conference.

    Jordi has also organized a public Mono/Gnome presentation at the University Oberta de Catalunya on Tuesday (September 14th).

    Update: The location is: UOC, Avgda. Drassanes, 3-5, Barcelona at 7pm. I will try to drag Nat Friedman along.

    Nat in Barcelona last year.

    Peace Activist Detained

    Guardian: On Sunday, the military placed Ms Fahima in detention without trial using a law applied to thousands of Palestinians over the past four years of intifada but rarely to Israelis.

    Posted on 07 Sep 2004


    Longhorn changes

    by Miguel de Icaza

    Last week's announcement of the changes in Longhorn were interesting: the backporting of Avalon and the removal of WinFS from the mix.

    It was clear that the only way to get Avalon adopted was by backporting it in some capacity to older operating systems. By June 2004 XP had 51% of the market while 40% of the market was still held by Windows 95, 98, ME, 2000 and NT. This is after three years of XP having being available to the public.

    If Longhorn was going to ship in 2006, developers could not target Avalon as their UI for at least another three years, Microsoft's recommendation was just as disheartening. Of course this is assuming that Longhorn would have the same adoption rate as Windows XP.

    Incidentally, this was the reason why we decided to redo our Windows.Forms implementation: if Avalon was not going to be common platform for development until 2009 people would continue to target the Windows.Forms API. The announcement from last week closes the gap.

    As I have discussed earlier, Avalon is the latest edition of developer lock-in to the Microsoft platforms and the decision making process is driven by this more than technically. If the need arises, it can be implemented in open source as an interop measure, but it is an effort that will take time.

    Avalon has a few problems, the following is from my impressions from the latest code that has been made available to the public:

    Security: Although Avalon and .NET address the high-tech problem of secure sandbox execution, it fails to provide a low-tech solution for impersonation, and other forms of tricking a user into providing personal information (credit card numbers, Social Security).

    These scams are a serious problem today in the Web but we at least have the url bar. But rich clients make this harder for and end-user to distinguish. Of course some simple solutions exist, but nothing comprehensive enough to guarantee that novice users will not be tricked.

    The issue at stake here is that the feature (in this case a large API, feature-full and hard to reproduce) is driving the project, with security being cooked as an after-thought. As I said: the high-tech solution has been dealt with (the sandboxed execution environment) but not the low-tech problems. And the low-tech problems are resposible for most of the viruses affecting the Windows world today.

    As we have seen, education of the user base is not really a solution and leaving security as an after-thought has proved very dangerous so far.

    Complexity: The Avalon API has a very large surface area. To get an idea, the Button class is number 11 on the inheritance chain with ButtonBase, ContentControl, Control, FrameworkElement, UIElement, RetainedVisual, Visual, DependencyObject, UIContextObject and Object as its base classes.

    The implementation details transpire everywhere, and approach that I believe is a bad idea: there is little or no encapsulation of things.

    Avalon is clearly not fully cooked, at least it was not a few months ago when simple things like keyboard manipulation were not fleshed out. My feeling is that large changes are still required.

    Ignoring Standards: I understand why someone would invent their own version of SVG or their own version of CSS: those standards can be difficult to implement, and growing your own version is a lot simpler than having to adapt an existing model to a new model.

    I would have probably done the same if I had been in their position: its easy. But I would think that Microsoft has a higher responsibility towards the developer base that must create tools that interop with third party components: creating a new standard for graphics just because its `easy' is not really a good answer.

    Implementing SVG might have problems and limitations, but the advantages outweight these problems: there are plenty of tools today to produce and consume it and it fits better with the rest of the industry. A benefit that Avalon users will not have and will just partition the industry again for a fairly poor reason.

    Canvas model: Avalon's canvas model suffers from the same problem every other retained system suffers: they are hard to scale in the general case. We know this because Gnome has such system and its the basis for a couple of widgets and controls in applications like Evolution, Gnumeric.

    The model is fantastic until you have to scale it; And when you have to scale it, you have to fall back to the traditional programming model where you have to roll your own repaint and handle all the low-level details yourself.

    In general, I think its a great idea, but it is a limitation on which the rest of the system is built on.

    Lack of a GUI designer: Avalon today lacks a GUI designer, an effort that so far people have not noticed, because developers have been told that XAML is the new way of doing things and declarative programming is hip.

    Declarative programming is a cute idea (not new: its just the XML version of the old Windows resource files; or Gnome's glade files or MacOS X NIB files). The reality is that XAML is a serialization format that could be manipulated by tools, but the tools so far have been missing.

    Predictions

    My prediction is that Avalon v1 will be a throw-away: it is not really the foundation on which you will build applications: V2 will likely not be backwards compatible, they will have to re-architect bits of it: which means that people will end up with two frameworks running side-by-side: Avalon V1 and Avalon V2.

    The above problem is compounded with the fact that the CLR has not really sorted out a good model for sharing components across versions of the framework: the GAC solution today is a bit of a hack to keep things separate and allow for multiple installations, but falls short.

    This is like cooking, you can not rush a good steak, or a cake or an omelette by cranking the heat. Some things just take time.

    In a way the .NET Framework was like this: it was slowly cooked and it reached a great point (it could still be improved) but some of the new code is just not ready.

    In Gnome for example we ship immature APIs but we do not make them part of the developer platform: they have to simmer and marinate for a while before they make it into the official SDK.

    Death March?

    When I read Dave Winer's comment on Avalon and the Death March, I realized that the Avalon folks now must do two products instead of one: they need to build an Avalon for Longhorn, and another Avalon that will run on XP. It seems that they just added a pile of work to a team that was not ready to release their software.

    I watched Allchin's interview over at Channel9, and he looks nervous: he is addressing two audiences at once the winners and the losers: the external developers who get Avalon on XP, and the internal developers that have just been dumped a new set of tasks and challenges. He is walking a fine line.

    I do not think I could have solved a problem of this magnitude, am sure the complexity is huge and the Microsoft folks are doing their best, but maybe a change in the way that features are interlocked and how those are delivered to users must be rethought.

    When it comes to operating system releases, I believe that Apple has found the sweet spot: a combination of best practices from the industry and best practices from the open source world. In addition to this, the versioning setup that Apple ships for the Frameworks seems to be pretty good on the surface. Update: I fixed some embarassing typos.

    Posted on 01 Sep 2004


    Microsoft slammed over misleading Windows Linux Claims

    by Miguel de Icaza

    Microsoft comparing, apples to oranges when measuring itself against Linux.

    Best quote, from a footnote in the advertisement: "Results may vary outside the United States"

    Back from vacations

    Plenty of Mono activity in the past two weeks in the development branch (1.1.xx: we are using the same numbering scheme as the Linux kernel).

    The new managed implementation of Windows.Forms is moving along (internally it uses Win32 messages and codes to help applications that hook up to Wndproc or use CreateParams), the hack-a-thon in Provo, Utah seems to have been a success.

    Documentation of Gtk# is continuing at a rapid pace, and we will soon update the online version of the documentation.

    Progress is underway on a few major components: Code Access Security (CAS) and the security related infrastructure for .NET 1.x and 2.x by Sebastien. Atsushi has been busy working on our XQuery implementation: a fairly large task but progress is advancing rapidly.

    On the JIT side of things, the most important development are the s390 port morphing into s390x (to support the 64 bit machines of this kind) as well as the record-time port of Mono to the AMD64 platform. The AMD64 port was done by Zoltan and is the second 64-bit port of Mono (his SPARC v9 port being the first).

    During my vacation plenty of micro optimizations were done to the JIT and Paolo has fixed the exception bug that made throwing exceptions several orders of magnitude slower than it should have (exposed by IronPython). Also Paolo is working on a new trampoline setup that will help the dynamic nature of IronPython as well as enabling some clever recompilation strategies. Also Massi continues work on our SSAPRE implementation, an effort that is on hold while he goes on a two week vacation.

    Paolo has also checked in a few plans on changes that we want to make to our register allocator, you can find this on the Mono CVS repository in the mono module.

    Martin continues to improve our generics compiler: just when he thought he was done, we received the C5 generics class libraries (which seems to be the largest body of generics code out there) and he is now fixing the bugs exposed by this.

    The team in Bangalore continues work on the Basic compiler for Mono, and it is now possible to run simple ASP.NET applications with it. A Basic compiler is more important for ASP.NET 1.x as it does not support "pre-compiled" sites, so a compiler is required on the deployment machine. With ASP.NET 2.x we could eliminate this problem by having people pre-compile their sites and just deploy binaries on the target site.

    Chris Toshok from the Evolution team (thanks JP!) will be assisting us with the debugger core in the next few months.

    Induce Act, Venezuela, Greg Palast, Dimona

    Induce Act: Just learned about the INDUCE Act another retarded law (plenty of coverage here.

    Venezuela: Various readers raised an issue with my post about the Venezuelan election and said that if I do not document myself better I should not post to my blog about Chavez. That seems relatively fair, but it misses two points: Greg Palast is a man I respect for his investigative journalism.

    But my readers missed a larger point: In fact I do not know enough to advocate a `yes' or `no' vote on the Chavez election (which I did not advocate), but that was not the point of my post. The point of my post was the fishyness of foreign intervention through ChoicePoint in the Venezuelan election. ChoicePoint was the same company involved in removing black-voters from the Florida elections in 2000 (documented also in the great book `The Best Democracy Money Can Buy').

    One of my readers in the US claims that the oil production facilities in Venezuela are in the government power, Greg Palast disagrees.

    I found out about the results of Chavez election while on vacation. And Greg Palast has a great follow up article.

    Right now, the oil majors - like PhillipsConoco - keep 84% of the proceeds of the sale of Venezuela oil; the nation gets only 16%.

    Chavez wanted to double his Treasury's take to 30%. [...]

    But to feed and house the darker folk in those bread and brick lines, Chavez would need funds, and the 16% slice of the oil pie wouldn't do it. So the President of Venezuela demanded 30%, leaving Big Oil only 70%. Suddenly, Bill Clinton's ally in Caracas became Mr. Cheney's -- and therefore, Mr. Bush's -- enemy.

    So began the Bush-Cheney campaign to "Floridate" the will of the Venezuela electorate. It didn't matter that Chavez had twice won election. Winning most of the votes, said a White House spokesman, did not make Chavez' government "legitimate." Hmmm. Secret contracts were awarded by our Homeland Security spooks to steal official Venezuela voter lists. Cash passed discreetly from the US taxpayer, via the so-called 'Endowment for Democracy,' to the Chavez-haters running today's "recall" election.

    In Mexico at least, it is illegal to receiving funds from an external country to influence the political process. The SI people might be right or wrong, but the whole thing leaves a bad taste in the mouth.

    That being said, in Mexico there is an ongoing debate over the monies that funded Vicente's Fox election: a clever setup to bring funds from abroad into his political campaign is under scrutiny.

    Dimona: A nice animation of the Dimona Nuclear Complex in Israel. Based on the pictures taken by Mordechai Vanunu and revealed in 1986.

    Posted on 25 Aug 2004


    Fixing Venezuela's Elections

    by Miguel de Icaza

    Greg Palast has another detective piece. This time is about "fixing" the Venezuela Election results.

    Palast describes a document which landed on his desk:

    [Dept of] Justice offered up to $67 million, of our taxpayer money, to ChoicePoint in a no-bid deal, for computer profiles with private information on every citizen of half a dozen nations. The choice of which nation's citizens to spy on caught my eye. While the September 11th highjackers came from Saudi Arabia, Egypt, Lebanon and the Arab Emirates, ChoicePoint's menu offered records on Venezuelans, Brazilians, Nicaraguans, Mexicans and Argentines. How odd. Had the CIA uncovered a Latin plot to sneak suicide tango dancers across the border with exploding enchiladas?

    What do these nations have in common besides a lack of involvement in the September 11th attacks? Coincidentally, each is in the throes of major electoral contests in which the leading candidates -- presidents Lula Ignacio da Silva of Brazil, Nestor Kirschner of Argentina, Mexico City mayor Andres Lopez Obrador and Venezuela's Chavez -- have the nerve to challenge the globalization demands of George W. Bush.

    The last time ChoicePoint sold voter files to our government it was to help Governor Jeb Bush locate and purge felons on Florida voter rolls. Turns out ChoicePoint's felons were merely Democrats guilty only of V.W.B., Voting While Black. That little 'error' cost Al Gore the White House.

    An interesting document, worth a read.

    In Mexico every effort and dirty trick is being thrown at Andres Manuel L�pez Obrador with overwhelming support from the Media. Currently Mexico City's governor and the man with the popular backup.

    This past week to protest the dirty war waged by the federal government against L�pez Obrador a 42-kilometer (26 miles) human wall was constructed running from the South to the North of the Mexico City.

    Mexico's federal policies on economy have been a disaster as well. The government is a blind follower of all the recommendations (mandates) from the International Money Fund and World Bank (polices well known to be a recipe for social disaster). Also the government managed to extend our foreign debt, just when you thought that the platform of Vicente Fox on an "Enterprise Government" would be able to keep the budget on track. Seems like running the economy is not the forte of the right-wing economic policies anywhere in the world.

    Government's reply to the human chain run from funny to hillarious: `we need production chains, not human chains' stated Sonora's governor (in lieu of the president, which is known for his lack of verbal articulation power and being a master of sticking his foot on his mouth). Humor wise, you can not beat Vicente Fox's own justification for keeping the disastrous economic policies (notice that he criticized his predecesor for keeping these policies, policies that today he defends, follow the link for all the humor ;-)

    Posted on 14 Aug 2004


    Spain trip.

    by Miguel de Icaza

    I will be in Madrid from the 11th to the 13th, then will spend a week in Cadiz.

    The next step is Paris, roughly from the 17-20 (depending on weather) to the 22nd.

    Daily Show and Bill Clinton

    Great Daily Show last night with Bill Clinton. Clinton had great insight into

    Posted on 10 Aug 2004


    Happy Birthday Nat!

    by Miguel de Icaza

    Nat has been fairly active this morning replying to e-mail even if he should be enjoying himself outside on this gorgeous day in Boston.

    Happy birthday dude!

    Tim Bray on Software Patents and Linux.

    Duncan sent me this excellent post from Tim Bray on Patents and Linux.

    Posted on 06 Aug 2004


    Edd's book

    by Miguel de Icaza

    Edd's book on Mono today is #8 on the Internet section in Amazon.

    Posted on 05 Aug 2004


    So Chic!

    by Miguel de Icaza

    The new Real Player and Helix Player are out, with OGG support. Loving it.

    DotNetRocks

    On Thursday I will be on the Dot Net Rocks show with Rory and Carl.

    I ran into Rory the other day at the airport. He later came to OSCON to hang out.

    Is this true?

    Seems hard to believe:

    The Department of Justice has called for these five public documents, two of which are texts of federal statutes, to be removed from depository libraries and destroyed, making their content available only to those with access to a law office or law library.

    The topics addressed in the named documents include information on how citizens can retrieve items that may have been confiscated by the government during an investigation. The documents to be removed and destroyed include: Civil and Criminal Forfeiture Procedure; Select Criminal Forfeiture Forms; Select Federal Asset Forfeiture Statutes; Asset forfeiture and money laundering resource directory; and Civil Asset Forfeiture Reform Act of 2000 (CAFRA).

    Love Todd and Shaver.

    They are sweet. Love you guys.

    Molly Ivins

    Last week two of my airplanes in a day were broken, so they had to send me through some other airline or some other plane. While waiting for my next plane, I purchased a book of articles from Molly Ivins. I was laughing for the rest of the trip. It makes Clinton even more likable. Larry Flint also has a quite interesting book.

    This is a public service announcement: do not watch "The Village".

    Must see two-minute video: Will Ferrell as the president. Too many great bits.

    On that same subject, I enjoyed my first Gore Vidal book quite an excellent writer.

    My quest to learn to play four instruments at once is progressing nicely. I have learned to play 2 notes in four different things. At some point, I expect some kind of magic economic phenomenon to turn me into a virtuoso.

    OSCON

    Met loads of people, partly because I have developed a skill for missing every session and hanging out in the public areas. Loved the conference, always good to discuss things live.

    Dan Sugalski was a man of his word, and brought a couple of pies for the contest. I do not like Parrot, but the man and his team stood by their word. Guido was a gentlemen and refused to throw the pie. So no pics.

    I noticed that Open Source proponents using MacOS X have developed highly tuned excuses, similar to those that smokers have about why cigarettes are good for you.

    Posted on 03 Aug 2004


    Breaking News Update

    by Miguel de Icaza

    At this conference I also managed to miss Robert Love's presetntation. This entry is here to mend the offense, and as a public promise to Robert that there will be some intensive picture taking action at his next presentation.

    OSCON

    The big announcement yesterday was from Jim Hugunin: IronPython, an implementation of Python for Mono and the .NET Framework was released to the public under the CPL license. It has been a long wait, but it was worth it: Python is a language of choice for many developers because of its ease of use and rapid prototyping cycle, and C# is a fantastic language for component-based and large scale programming, now both languages have come together.

    His presentation touched on the challenges of getting a dynamic language like Python to run efficiently on the CLR, and also presented a couple of benchmarks with interesting results: while IronPython on the CLR seemed faster on average with the various tests, with Mono it ranges from 5% to 50% slower (and in a degenerate cases with exceptions, we are 65 times slower). But that being said, it is not terribly slower than Python 2.3, and we are going to look into these issues.

    IronPython works out of the box on Linux, and I was able to run Edd's sample out of the box.

    Echoing Edd's sentiment: there is a sense of freshness in being able to issue Gtk# commands from the Python command line.

    Jim also announced that he is joining the CLR team at Microsoft to improve the VM for scripting languages. Congratulations to Jim on his new job!

    Missed Robert's keynote again

    Robert is famous for doing the most interesting presentations and for two years in a row I have missed his presentation. Yesterday, I was on a meeting while his presentation was running.

    Mono Book is out!

    The Mono Developer's Handbook from Edd is out! I got my copy from Edd as they sold out the books that Powell had brought to the show. I was told on the elevator from some O'Reilly folks that today they are bringing a bunch more to the show.

    Slides

    Slides from my Mono presentation are here. These slides were done before IronPython was announced.

    Hotel

    I have met another five people who were told two nights ago that they had over-sold the hotel, and they could either take 100 dollars or the free room that they would put them on. The hotel claims its standard practice, but I have never met so many people in a conference that were left room-less. Am staying so far, that I can manage to take a nap from my hotel to the conference and ponder all kinds of deep topics on my trip.

    In Dallas I ran into Rory in the airport. All I can say on the McDonalds bit is that I was very hungry, and it wont happen again.

    Posted on 29 Jul 2004


    Next week

    by Miguel de Icaza

    Going to Austin on Monday, then hoping to OSCON in Portland.

    Posted on 25 Jul 2004


    Mono updates

    by Miguel de Icaza

    I posted a list of areas that we are working on for the Mono 1.2 release. Mono 1.0 has been fairly stable, we will likely issue a bug fix release with a few bug fixes in the next couple of weeks.

    Massimiliano has checked a of the Arrays Bounds Check Eliminations to CVS. See his results. This will help with computationally intensive tests. He is now working on a framework to implement Partial Redundancy Elimination for Mono (SSAPRE) as well as prototyping a new relocation feature to improve Ahead-of-Time compiled binaries memory footprint.

    In the meantime Ben and Duncan have been doing some optimizations to the code: many small tree optimizations, peephole optimizations and implementing a few tricks to reduce the size of generated code: each one giving a percent here, a percent there. Ben also has started the work to add precise garbage collection to Mono: now we track precisely everywhere where we keep handles to managed memory. The immediate side effect with Boehm's GC is a 3% performance improvement in the MCS bootstrap. For smaller programs, the visible effect is much larger.

    On the subject of JITs, Neale's support for s390 keeps on improving, we will likely back port these changes to the 1-0 branch.

    Spain, France

    We can finally travel again outside the United States. Maria and myself are planning on spending a couple of weeks in Europe visiting some friends in France and Spain (Paris and Madrid will be in the plan). Will be glad to meet folks during our trip.

    I will also attend Brainshare Europe in Barcelona in September.

    Posted on 21 Jul 2004


    Mistakes

    by Miguel de Icaza

    Yesterday I decided to use one of those nifty installation images that we have in the internal network to perform an OS upgrade on my machine. The only problem is that the images we have on the network are designed for quick-installs: no questions asked. A tiny bit of information that escaped me as I live life in the fast lane.

    This time I avoided spilling the coffee on the keyboard, but I was a few seconds too late to unplug the power and remove the battery of the computer when I saw the message that said `Formatting hard drive'. I was expecting an upgrade, and I got a reinstall image.

    Anyways, I managed to recover my partition setup by using a nifty tool called gpart which guesses my partitions (Linux, swap and Windows). But some data was corrupted, after running fsck on the file system, tons of files ended up in lost+found, all kind of very scary error messages were shown up, and many files on my machine ended up with large blobs of zeros in the middle.

    Happy for me, I had done a backup of the anonymous method support for MCS, which has not been checked in into CVS, but plenty of e-mail and images that I had not copied to my server got corrupted.

    For now, I have decided to install on a separate hard drive and machine.

    Perrspectives update on Google

    Jon has posted an update to the baning of his web site from Google advertisement: The Google Freedom of Information Act. His site has some updates on Google inconsistency here

    Macromedia Flex

    Very nice development platform for GUI applications, which happens to generate code that will run on the Flash Player VM. The widget set is very flash-like, and has the standard set of components you would expect from a widget set, and the components are tied together with their implementation of ECMA Script.

    Since the VM is the same across all platforms the code runs on Linux, Windows and the Mac unmodified, I am pleasantly surprised by the results.

    Microsoft's Avalon is doing something very similar to this, but the Macromedia markup is not only simpler, but also cross platform from the client to the server.

    Posted on 13 Jul 2004


    Sport Model GC

    by Miguel de Icaza

    Chris Toshok has been removing the Java-isms from the Mozilla Sport Model GC.

    A GC done in 1998 for Mozilla's own implementation of Java (Eletrical Sheep) which is concurrent, generational, precise and has a C API.

    Sport Model is available from the Mozilla tree as: mozilla/ef/gc

    Posted on 03 Jul 2004


    Glitz

    by Miguel de Icaza

    The Glitz hackers at Usenix did a mind-blowing demostration of their technology and how Cairo applications benefit from their OpenGL accelerated graphics support.

    They have modified the SVG rendered from Cairo as a simple presentations program: wonderful 3D-based transitions, very clearly rendered text, smooth and zoomable.

    Posted on 01 Jul 2004


    Mono 1.0 is out

    by Miguel de Icaza

    We vastly underestimated the Slashdot effect. There were 85k hits in the first hour since we went live, and then the machine collapsed under the weight and has remained in that state despite repeated attempts to get some data out of it.

    None of the betas really had this problem, we got some mild load, but today the load on the machine was insane.

    I made a few posts today: New Windows.Forms plan, the new cvs rules in the post 1.0 world and finally a thank you note to developers.

    Mike Kestner has posted an update on Gtk# in the release.

    Afternoon at Usenix

    I had a great afternoon at Usenix, met lots of good friends again.

    Tomorrow: Rob Pike's keynote at 9am.

    Posted on 30 Jun 2004


    Tiny Follow up on CORBA

    by Miguel de Icaza

    The OMG is one step ahead: they have a RFP for the Minimal CORBA. Beautiful.

    Apple's new Spotlight and Beagle

    Apple's new Spotlight is remarkably similar to Nat's Beagle and Nat's Dashboard.

    Nat's tool was demostrated yestearday at GUADEC, here is a photo from the talk.

    Posted on 29 Jun 2004


    On following the C# standard

    by Miguel de Icaza

    I have been asked recently whether we should fork the C# language and add extensions and improvements to the language and the class libraries to deviate from Microsoft (there are plenty of little small things that can be done with relatively no effort).

    I do not believe that making the Mono C# compiler incompatible with the Microsoft and the ECMA standard is a good idea. A big benefit of having a compatible language is that source code can be interchanged between the two platforms with ease. If we were to modify the language to have features not found in the Microsoft compiler, we would make the life of our end users (software developers) harder for no good reason.

    On the other hand, I would encourage folks to prototype their ideas on the compiler: if your idea is great, we could help drafting a proposal and bring that forward to ECMA and Microsoft, and who knows, it could even become part of the standard.

    Nullable types

    I personally did not like the C# language support for nullable types I felt they had no place in the language, and I think a lot of people feel the same way.

    I changed my opinion on its usefulness when I explained them to a couple of friends: they immediately saw the benefits to them. It was clear that my programmer background was not the same programmer background that nullable types addressed.

    Posted on 28 Jun 2004


    Corba, Web Services and Mono

    by Miguel de Icaza

    A good friend was asking me about why I had abandoned CORBA (I did not). Here is my response:

    On the CORBA question: I have not particularly abandoned the idea of CORBA. It was just that CORBA as a platform to solve the multi-lingual issue was too hard (too huge of an investment, steep learning curve). In fact, I would like to use more of IIOP as a replacement for remoting and web services in key places.

    I think that *some* elements of CORBA are extremely useful and are better than many of the Microsoft proposed APIs/protocols, but the problem with CORBA is that you must move carefully: it is too easy to get trapped in that world of standards and try to implement and use everything.

    Some bits of CORBA are extraordinary, but teaching it is hard given the large scope of it: what pieces of it must be ignored and what pieces are followed is a tricky part.

    I think the Next Generation Web Services (WS-*) world has reached the same level of complexity that CORBA achieved in an effort to satisfy the users requests. It seems that WS-* is a victim of its own success: once SOAP web services could be produced and consumed easily with `netcat', but today, realistically to integrate with any of the advanced features you need a stack as complete and as complex as the various CORBA implementations.

    Web Services were pushed in the same direction that CORBA was used, and it started to get used in places where CORBA was used, and they ended up with pretty much the same thing CORBA had, and sadly without some of the benefits of it. Not a particularly fascinating subject.

    Speaking of fascinating technologies, a few ex-CORBA people went to create a new RPC stack with a very precise set of features at ZeroC. It is called Ice

    I first heard about Ice from Vladimir, who wrote his own implementation of the protocol in C#. It is available from the Mono CVS repository, and is a subset the features offered by ZeroC's product. ZeroC's product is dual licensed: GPL and Commercial and today they support Java and PHP with a C# version in the works.

    Posted on 27 Jun 2004


    Fahrenheit 9/11

    by Miguel de Icaza

    Having being subject to three years of propaganda, this movie feels like an Oasis.

    Too short, seems like a lot of interesting material was left out.

    Posted on 26 Jun 2004


    Microsoft demoing Mono

    by Miguel de Icaza

    Various reports have arrived that Microsoft was demoing Mono at the LinuxDays. I do not have more data other than a Windows machine was used to build a web application, copied to Linux and ran there and that they also showed Monodoc.

    Nice!

    Mandatory Movie

    Got tickets for the worst possible time for Farenheit's 9/11 showing tonight. I underestimated the demand, all the other showings were sold out.

    Mono Freeze

    The Mono Freeze has continuted in preparation for the 1.0 release, everything is looking good.

    Posted on 25 Jun 2004


    Google censors Persspectives

    by Miguel de Icaza

    My friend Jon Perr was running a political commentary site, called Perrspectives and using Google adwords to advertise it.

    Here is the tale of the adwords censoring his site.

    Posted on 23 Jun 2004


    by Miguel de Icaza

    One of the best Daily Shows today. Jon Stewart was amazing.

    Atom support in LameBlog

    Lame Blog now supports Atom using Atom.NET. It supports Mono out of the box (yup, nice Makefile and all), and comes with awesome docs for it. Am still an Atom newbie, so I do not know if I got everything right, drop me a note if my Atom stinks.

    It took 10 minutes, so do not expect Enterprise-enabled, transactional based atom feed just yet.

    Posted on 21 Jun 2004


    Cory Doctorow's talk on DRM

    by Miguel de Icaza

    Cory from the EFF went to Microsoft to talk about DRM, here is a transcript which should be mandatory reading.

    Joel keeps pumping out the gems.

    Most importantly, he follows up with a concrete list of features that the web needs. Now is the time for all good hackers to join the Mozilla development.

    A key to the proposal from Joel is that some high-level features must be incorporated into HTML in some form, and not be limited to server-side controls implemented with a particular technology (ASP.NET or Struts or PHP): it should be something that can be placed on a static HTML page.

    Posted on 19 Jun 2004


    Usenix in Boston

    by Miguel de Icaza

    My favorite conference is coming to town in a couple of weeks. Hope to see a lot of folks

    Martin has been doing quite a lot of work on the Mono Debugger, getting nicer every day. And it has docs ;-)

    Posted on 18 Jun 2004


    More Microsoft Open Source

    by Miguel de Icaza

    A parser and scanner for VB.NET has been released by Microsoft. It is written in VB.

    Manufacturing the Facts.

    Kuwait Times: "U.S truck carrying radioactive material caught in Kuwait".

    Tehran Times: "The MNA reported for the first time the coalition forces suspicious transfer of WMD parts from Kuwait to Southern Iraq by trucks."

    Update: Someone researched this in depth here, and apparently the trucks were coming *out*, not in.

    Posted on 16 Jun 2004


    Cocoa Sharp

    by Miguel de Icaza

    The Cocoa# developers got their first window showing on the MacOS X, and they also got inheritance working. This is a young binding, but here is a screenshot of what it looks like:

    Cocoa# sample application.

    Posted on 15 Jun 2004


    Web Page Thumbails Sharp!

    by Miguel de Icaza

    Ross improved on a script from Matt to do web page thumbnails.

    Here is the same written C#, Gtk# and Gecko#.

    using System;
    using Gtk;
    using Gecko;
    
    class X {
    	static WebControl wc;
    	static string output = "shot.png";
    	static string url;
    	static int width = -1;
    	static int height = -1;
    	
    	static void Main (string [] args)
    	{
    		for (int i = 0; i < args.Length; i++){
    			switch (args [i]){
    			case "-width":
    				try {
    					i++;
    					width = Int32.Parse (args [i]);
    				} catch {
    					Console.WriteLine ("-width requires an numeric argument");
    				}
    				break;
    			case "-height":
    				try {
    					i++;
    					height = Int32.Parse (args [i]);
    				} catch {
    					Console.WriteLine ("-height requires an numeric argument");
    				}
    				break;
    			case "-help":
    			case "-h":
    				Help ();
    				break;
    				
    			default:
    				if (url == null)
    					url = args [i];
    				else if (output == null)
    					output = args [i];
    				else
    					Help ();
    				break;
    			}
    		}
    
    		Application.Init();
    		Window w = new Window ("test");
    		wc = new WebControl ();
    		wc.LoadUrl (args [0]);
    		wc.NetStop += MakeShot;
    		wc.Show ();
    		wc.SetSizeRequest (1024, 768);
    		w.Add (wc);
    		w.ShowAll ();
    		Application.Run();
    	}
    
    	static void Help ()
    	{
    		Console.WriteLine ("Usage is: shot [-width N] [-height N] url [shot]");
    		Environment.Exit (0);
    	}
    	
    	static void MakeShot (object sender, EventArgs a)
    	{
    		Gdk.Window win = wc.GdkWindow;
    		int iwidth = wc.Allocation.Width;
    		int iheight = wc.Allocation.Height;
    		Gdk.Pixbuf p = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, false, 8, iwidth, iheight);
    		Gdk.Pixbuf scaled;
    		
    		p.GetFromDrawable (win, win.Colormap, 0, 0, 0, 0, iwidth, iheight);
    		if (width == -1){
    			if (height == -1)
    				scaled = p;
    			else
    				scaled = p.ScaleSimple (height * iwidth / iheight, height, Gdk.InterpType.Hyper);
    		} else {
    			if (height == -1)
    				scaled = p.ScaleSimple (width, width * iheight / iwidth, Gdk.InterpType.Hyper);
    			else
    				scaled = p.ScaleSimple (width, height, Gdk.InterpType.Hyper);
    		}
    		
    		scaled.Savev (output, "png", null, null); 
    		Application.Quit (); 
    	}
    }
    

    Posted on 14 Jun 2004


    On .NET and portability

    by Miguel de Icaza

    Jeff posted on portability of Java vs .NET code in an article.

    First lets state the obvious: you can write portable code with C# and .NET (duh). Our C# compiler uses plenty of .NET APIs and works just fine across Linux, Solaris, MacOS and Windows. Scott also pointed to nGallery 1.6.1 Mono-compliance post which has some nice portability rules.

    Porting an application from the real .NET to Mono is a relatively simple exercise in most cases (path separators and filename casing). A situation that I would like to fix on upcoming versions of Mono to simplify the porting (with some kind of configuration flag).

    It is also a matter of how much your application needs to integrate with the OS. Some applications needs this functionality, and some others do not.

    If my choice is between a system that does not let me integrate with the OS easily or a system that does, I personally rather use the later and be responsible for any portability issues myself.

    That being said, I personally love to write software that takes advantage of the native platform am on, specially on the desktop. I want to take advantage of what my desktop has to offer: Gtk# (when using Linux), Cairo, OpenGL, Cocoa# (when using the Mac), GConf, Gnome Printing, and access to Posix.

    If my software uses all of the above libraries, will it be easily portable? Most likely not.

    Consider what the iFolder team is doing: they are writing the core libraries as a cross platform reusable component. This component is called "Simias" and provides the basic synchronization and replication services. Simias works unchanged on Linux, MacOS, Windows and Solaris. Like every other cross platform software, it must be tested on each platform, and bugs on each platform must be debugged.

    This is not different than doing any other kind of cross platform development.

    Then they integrate with each operating system natively at the user interface level. Windows.Forms and COM on Windows; Gtk# on Linux and in the future Cocoa# on the Mac.

    Although Gtk# looks and feels like Windows.Forms on Windows, the problem that they were facing is that Gtk# was an extra download for people using iFolder, and they chose to keep things simple for the end user.

    Mono as a new Wine?

    Although Jeff's post is fairly naive and not that interesting I do have a problem with his follow up: Mono is not just a `Wine-like' technology to emulate an API.

    Mono is a complete development stack, with a standard core from ECMA and ISO. Jeff has obviously not written any code with Mono, or he would know that it is quite an enjoyable standalone development platform as oppposed to just a runtime.

    Mono is also not limited to run the .NET code, thanks to IKVM: a Java VM written entirely in C# and .NET, we can run Java code just as well as .NET on the same virtual machine, and have them happily talking to each other.

    Posted on 11 Jun 2004


    Jeffrey in Boston

    by Miguel de Icaza

    Jeffrey McManus is in Boston this week.

    Nat Interview

    Another interview with Nat on the Novell Linux Strategy.

    Nat and Dan in Bangalore.

    Laura in Kona

    Bangalore.

    Arturo's Laptop

    Arturo is a modern day Indiana Jones, a resourceful humanist. On this picture with his laptop and portable 17" monitor, making up for a hard learned lesson: do not fight gravity with your notebook LCD screen.

    Arturo and his C64-like TiBook.

    Posted on 08 Jun 2004


    On the Google IPO

    by Miguel de Icaza

    Mitch Kapor: "In a better world, would all public corporations be more accountable to their shareholders? Hell, yes. But today's shareholders are, in the main, no better than the vast majority of companies they invest in. They only really care about their financial upside, not the means by which it is achieved. Exploitation of labor here and abroad a la Wal-mart, environmental degradation, and massive corporate welfare through government subsidies and sweetheart deals a la Halliburton are perfectly acceptable sources of profit and make for perfectly good investments most say."

    Summer movies: The Corporation and Farenheit 9/11

    Trailers are now available on Rotten Tomatoes, and a list of dates in the US

    Can not wait to see Michael Moore's new movie, opens on June 25th!

    Venus Transit

    Venus Transit on Tuesday.

    Posted on 05 Jun 2004


    MonoDevelop on MacOS

    by Miguel de Icaza

    With Mono Beta2 I was able to get MonoDevelop to work on my Mac.

    You must get Mono Beta 2 (0.95), gtksourceview (0.7 Fink), Mozilla (Fink), GtkSourceView# (0.3), Gecko# 0.4 and MonoDevelop 0.4.

    MonoDevelop on MacOS X

    There are a few Linux-isms in there that you must fix, a quick workaround is to add the following to your $prefix/etc/mono/config file:

    <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.0.dylib"/> <dllmap dll="gnomevfs-2" target="libgnomevfs-2.dylib"/> <dllmap dll="gdldock" target="libgdldock.dylib"/> <dllmap dll="libMonoPosixHelper" target="libMonoPosixHelper.dylib"/> <dllmap dll="libgtk-x11-2.0.so.0" target="libgtk-x11-2.0.0.dylib"/> <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>

    Then you must edit $prefix/lib/monodevelop/bin/gdl-sharp.config, this is what I have:

    <configuration> <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/> <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0"/> <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so.0"/> <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0"/> </configuration>

    You still need to use GDK_USE_XFT=0 from the command line.

    Of course, the real fix is to get MonoDevelop to generate those files (and fix the few incorrect hardcoded references to x11), but I will let Todd do that.

    InfoWorld Innovators!

    I was named one of InfoWorld's 2004 innovators: here.

    Rio

    Maria in Rio.

    Rio.

    Mauricio and Laura at the Metropolitan.

    At the first day of the ECMA meeting in Hawaii.

    Laura and Marcelo in March.

    Posted on 31 May 2004


    Al Gore remarks at NYU

    by Miguel de Icaza

    Al Gore's remarks at NYU..

    Finkelstein in Toronto

    video and audio.

    Posted on 28 May 2004


    Follow up

    by Miguel de Icaza

    Mark Pilgrim has a great follow up to his freedom-0 article.

    Nemerle, C# and Anonymous Methods.

    Spent some time this afternoon playing with Nemerle and their latest release.

    Specially nice since now MonoDevelop supports Nemerle in the built-in editor.

    My main problem is that I find it hard to think in any other way which is not the standard programming that I have grown up to do, maybe I need a hobby programming task to do. It will have to wait until we release Mono 1.0, right now things are busy.

    My personal wish: I would like a C#-like scripting language myself. Sprinkle a few perlisms, rubyisms and pythonisms in there. Drop the class carcass.

    A small patch I have been playing with in my copious spare time is one to turn all unresolved method calls in C# to a dynamic code translation. So basically:

    
      object a = new XmlDocument ();
      a.Load ("/tmp/a.xml");
    

    ie, notice that the type of the variable is `o'. The downside: the runtime has to transform the incoming parameters to something that matches the call, you loose the compiler safety net, and its slower. But at least you can prototype quickly ;-)

    I do not like the current implementation of anonymous methods, it really does not work in the presence of nested anonymous methods, so I have gone back to the drawing board and have now a new design for this internal chunk of the compiler that am a lot happier with. As soon as the beast compiles, I will upload a new patch.

    The C# compiler also gained recently a new flag: -pkg:NAME which integrates pkg-config directly into the compiler. We are making the world a better place, one command line option a day.

    Managed code is fast

    Andreas, Ben and Paolo have been discussing moving existing code that we implement in C to the managed world, as our JIT is in some cases as good as the C compiler and the transition from managed to unmanaged is too costly: we can now move more code into the managed world.

    The old gcc exceptions mechanism that the Mono JIT used for a long time to speedup calls into the unmanaged world is gone. It was too much of a support nightmare (gcc and libc would often be out of sync, rendering the optimization useless), and instead Zoltan has cooked up some ways to improve the transition cost on x86 and SPARC.

    Ports

    The PowerPC port got a big boost today with various fixes checked in from Paolo; Neale continues to update the S390 port and Zoltan has checked in some fixes to support Linux on the SPARC (in addition to Solaris).

    We still need to support the Itanium and the x86-64 CPUs (if you have a good recommendation about a book on these platform, please mail me) as they are important platforms for SUSE.

    Thread.Abort and File locking

    Lluis completed this week the Thread.Abort implementation for Mono. Our old implementation had various issues if we aborted thread while we were in unmanaged code (since there was no way to clean things up). Lluis' new implementation now shuts down things properly.

    Now this might seem like a problem that few people would run into, but the reality is that it happened a lot with people using ThreadPools, ASP.NET or WebRequests since all of them triggered a call to Thread.Abort, and the side effects were ugly: from assertions in the runtime, to hangs at program exit.

    This fixes the last major reliability blocker problem we had for Mono 1.0.

    Dick in the meantime implemented the locking functionality for Files, a feature that some people needed and that was not really there before.

    Xslt Joshua and documentation

    Joshua has checked in the tools to produce HTML out of Monodoc. Real men use Monodoc, but if you feel like giving up on your manhood, now you can browse uncompressed, not-as-beautiful, not-indexed classes ;-)

    Marek. Martin. Raja

    They are rapidly closing the last pending bugs in the MCS compiler, none of them are crucial, but we want to ship with as few bugs as possible in the compiler. At this point, we are no longer accepting large changes to the compiler (which also means that Anonymous Methods will just not make it into the 1.0 release, too bad, they were too cute).

    Posted on 22 May 2004


    More patents

    by Miguel de Icaza

    Seth has raised some valid points on the patent problem, as it related to Mono.

    A big problem with everyone raising potential patent problems with Mono is not that they are wrong in any way, but there are a few problems with it:

    • Not using Mono in any shape or form is not a blank waiver against patents. That means that even if you choose to stick to your beloved C, Python, C++ or anything else, for any new software you write, you are likely to infringe on someone else's patents (or even the same ones that Mono could potentially infringe).
    • Patents can be: declared void with prior art showing that such invention did exist in the past. Alternatively, you can route around it by using a different technique than the one described in the patent to provide the same feature (or something close) to avoid infringing on a patent.
    • Most people have no idea of what a patent is, or how it works. The actual invention is the claims bit. Not the introduction, not the summary, not the background, not the references and not the drawings. They help in making the claims, but they are not the patent itself. If you want to play patent-lawyer on Internet, you should at least familiarize yourself with the process.

    Now, it is hard to argue with the nay-sayers about routing around the patent for two reasons: we do not know what might be patented and valid (ie, no prior art can be found or properly articulated) and most importantly for any given topic we can engage in weeks of discussion on what-if scenarios.

    We do not plan on infringing patents, and if were to infringe on patent, we will either find prior art that renders that particular claim invalid, or rewrite the code to work in a different form. We do not like software patents, but we will abide by the legal rules.

    If you can not think of a different way of running a C# program than the one that exists today, you are not a very imaginative/innovative programmer. The worst possible scenario is not `They will stop distribution forever'. The worst possible scenario is `They can stop distribution until we find a workaround'.

    And again, remember, the software patents problem is not limited to the specific instance of Mono. Everything Seth said applies equally well to every bit of our open source stack today: do we infringe on a Microsoft patent? Do *you* know for sure you do not? Have you performed a patent search? On every possible bit?

    Red Hat has chosen to adopt Java (despite the same potential problems with patents) and has decided that it is in their interest not to use C#/Mono. Like Red Hat's Seth states: this is self inflicted damage on their part, and they will not be able to ship any of our leading edge GPL code (Simias, iFolder, F-Spot or any of our future development tools).

    Red Hat could either stop whining, and have their developers work in Mono and use Mono, and help us fight bogus patents or route around them, or they can keep posting to their blogs more fear-mongering.

    Andy Satori has posted his insight here.

    If you are going to reply, I just ask you that you take a step back, and for every instance of the word `Mono' replace it with every major open source project today `gnu libc', `linux kernel', `Open Office', `samba', `x11', `cairo', `gtk+', `qt', `binutils', `gcc', gnome', `qt', `mozilla', `my favorite file system', use your imagination.

    Does your foe have a patent to it? Or someone that can be acquired by your foe?

    On Stop Energy: my policy

    Most people operate in Stop Energy mode, so I typically ignore them, and keep moving.

    A small story I like to tell people: when I started writing Gnumeric, I was very afraid of one thing: the computational engine. How do we recalculate the value of cells when a change happens? How do we make this perform well? How do we do iterative computations? How do you resolve recursive references?

    All of those problems were fairly scary, and I did not have an answer to them. I looked at all the source code I could find for spreadsheets around that time, and none of it did even a remotely good job: it was all pretty amateur, and none of it really did anything remotely close to what commercial software did.

    I started work on Gnumeric nonetheless, figuring `When the time comes, I will face that problem', and spent the next three months making sure that Gnumeric was visually pleasant, that it looked like Excel, and that the "feel" was right. I tried to implement computations trivially during that time in a couple hour hack and that failed miserably.

    By the third month, I decided I would not touch a computer until I figured out an algorithm for doing these computations, I took a pencil and a notebook and went to write down the steps. Surprisingly after a few hours of work I had something that looked correct.

    That same day I implemented the computational engine with the features I wanted and it just worked!

    What I like about this story, is that I could have given up at any point since there was a large problem ahead of me: a problem I had no answers to. And I see this with many free software developers, students and even in normal social situations: people stop doing things because they see a big problem ahead of them that they can not possibly conceive working around. My advise to every young programmer is to start writing code and delay addressing imaginary problems until they become real.

    I like people who find and propose solutions.

    The Mono team (both the community and the Novell employees working on it) is pretty much such a group: a group solving problems, and moving forward.

    Interview with a soldier

    Ran into this interview this morning. From the Sacramento Bee.

    Incidentally, watched For of War this week, McNamara at some point says `We need to win the hearts and minds of the Vietnamese people'.

    Posted on 20 May 2004


    GCC for Mono

    by Miguel de Icaza

    Kristian Rietveld picked up on the challenge to write a WHIRL to CIL compiler. This means that any languages supported by the GCC WHIRL fork (C, C++ and the two Fortrans) could be used as compiler front-ends.

    Kris has a sample of his work so far: a small C program translated to WHIRL (gcc), then to CIL (he had to write his own WHIRL reader.

    Congratulations!

    Sweet Interview with Nat Friedman

    A sweet interview with Nat on the Novell Linux Desktop.

    The JBoss soap opera

    Man, I spent some quality time going over the JBoss soap opera. I always felt things were not quite right when I was reading TheServerSide.

    Posted on 19 May 2004


    Cathartic moments in software.

    by Miguel de Icaza

    Not everyone gets the importance of free software at once. To me the point of no return came when I was using non-Intel Linux machines, and could not run any of the new proprietary Linux software on the Alpha host we had.

    The Movable Type licensing term changes have done the same for a new generation. Dive into Mark's Freedom 0 article rings true. The same kind of feeling we had when we started the Gnome project, we decided to not look away with something that was `free enough'.

    Posted on 17 May 2004


    New Mono team members

    by Miguel de Icaza

    After five months of delays, Massimiliano Mantione has joined the Novell Mono team. His focus will be on compiler optimizations.

    As part of his interview process (which lasted a month), Massimiliano completed the arrays bounds check elimination feature for the JIT compiler. Now that he is part of the Novell staff he is redoing his work to match the current VM.

    Mono Beta

    Plenty of good feedback from the Mono Beta 1. Duncan has been taking care of the packaging things, and as of today we are shipping zip files with all the packages for those of you who did not want to manually download all of the packages one by one.

    Posted on 14 May 2004


    Exchange Connector Open Sourced

    by Miguel de Icaza

    Novell has just open sourced the Evolution connector to Exchange. The code is available on our ftp server or you can browse CVS.

    Congratulations to everyone involved!

    Posted on 11 May 2004


    Shocking Video.

    by Miguel de Icaza

    Was reading Robert Fisk's latest article and googled for the keywords. Here is the shocking video.

    Some cartoons, and a couple of interesting sites: Talking Points Memo and the Media Matters web site.

    Posted on 07 May 2004


    Made with Mono

    by Miguel de Icaza

    Jon Johansen's used Mono and MonoDevelop to build DeDRMS, a program used to decrypt the music you purchase from iTunes Music Store.

    I tried it out, and I was able to play the music I had purchased on Linux, it is really nice.

    Johansen was on the #mono channel, and we got a chance to look into some of the performance issues in Rijandel. Ben noticed something interesting: plenty of our array access was done with a byte value on an array that always had at least 255 elements. So he cooked up a patch that does said ABC elimination.

    A more comprehensive patch has been cooked by Massimiliano (who joined Novell today to work on Mono) which hopefully will make it before Mono Beta 1.

    Roadmapy things

    A series of dates for the Mono 1.0 have been posted.

    Posted on 26 Apr 2004


    Defining the Game

    by Miguel de Icaza

    Jeff seems to like Cringley's statement of "The central point was that paying too much attention to Microsoft simply allows Microsoft to define the game. And when Microsoft gets to define the game, they ALWAYS win."

    A nice statement, but nothing more than a nice statement, other than that, its all incorrect.

    Microsoft has won in the past due to many factors, and none of them related to `Let them define the game', a couple from a list of many:

    • They leveraged their monopoly to break into new markets. The most discussed one is when they used brute force and anti-competitive strategies to get their products into new markets, but in some other cases they got fairly good adoption of their products with little or no effort: just bundle it with Windows: MSN messenger, Media Player.

    • Competitors were outmaneuvered or were incompetent (See HIgh Stakes No Prisoners).

    • People were sleeping at the wheel.

      In 1993-1994, Linux had the promise of becoming the best desktop system. We had real multi-tasking, real 32-bit OS. Client and Server in the same system: Linux could be used as a server (file sharing, web serving), we could run DOS applications with dosemu. We had X11: could run applications remotely on a large server, and display on small machine. Linux quickly became a vibrant innovative community, and with virtual-desktops in our window managers, we could do things ten times as fast as Windows users! TeX was of course `much better than Windows, since it focuses on the content and the logical layout' and for those who did not like that, there was always the "Andrew" word processor. Tcl/Tk was as good as building apps with QuickBasic.

      And then Microsoft released Windows 95.

    • A few years later, everyone is talking components: Netscape is putting IIOP on their client and server (ahead of their time, this later became popular as web-services on the browser); Xerox ILU; Bonobo; KParts; the Borland sponsored event to build a small component system that everyone agrees with; language bindings are at their top.

      The concensus at that time? Whatever Microsoft is doing is just a thin layer on top of COM/DCOM/Windows DNA which to most of us means `same old, same old, we are innovating!'.

      And then Microsoft comes up with .NET.

    Does something like XAML matter? Not really. But it makes it simple to create relatively cute apps, by relatively newby users, in the same way anyone could build web pages with HTML.

    Does Avalon really matter? Its a cute toolkit, with tons of widgetry, but nothing that we cant do on a weekend, right?

    Does the fact that its built on top of .NET matter? Well, you could argue it has some productivity advantages, security features and get into a long discussion of .NET vs Java, but its besides the point.

    Everyone is arguing about tiny bits of the equation `We have done that with Glade before!', `Gtk/Qt are cross-platform!', `We can get the same with good language bindings!', `We already have the widgets!', `Cairo is all we need', `What do users really want?' and of course `Dont let them define the game!'.

    They are all fine points of view, but what makes Longhorn dangerous for the viability of Linux on the desktop is that the combination of Microsoft deployment power, XAML, Avalon and .NET is killer. It is what Java wanted to do with the Web, but with the channel to deploy it and the lessons learned from Java mistakes.

    The combination means that Longhorn apps get the web-like deployment benefits: develop centrally, deploy centrally, and safely access any content with your browser.

    The sandboxed execution in .NET [1] means that you can visit any web site and run local rich applications as oppposed to web applications without fearing about your data security: spyware, trojans and what have you.

    Avalon means also that these new "Web" applications can visually integrate with your OS, that can use native dialogs can use the functionality in the OS (like the local contact picker).

    And building fat-clients is arguably easier than building good looking, integrated, secure web applications (notice: applications, not static web pages).

    And finally, Longhorn will get deployed, XAML/Avalon applications will be written, and people will consume them. The worst bit: people will expect their desktop to be able to access these "rich" sites. With 90% market share, it seems doable.

    Will Avalon only run on Longhorn? Maybe. But do not count on that. Microsoft built IE4 for Windows 98, and later backported it to Windows 95, Windows 3.11 and moved it to HP-UX and Solaris.

    The reason people are genuinely concerned and are discussing these issues is because they do not want to be caught sleeping at the wheel again.

    Will this be the end of the world for Linux and the Mac? Not likely, many of us will continue using our regular applications, and enjoy our nicely usable and consistent desktops, but it will leave us out of some markets (just like it does today).

    Btw, the Mozilla folks realized this already

    [1] Although it was easy to see why .NET supported the Code Access Security (CAS) in .NET 1.0, there was no real use for it. With Longhorn/Avalon/XAML it becomes obvious why it was implemented.

    Planning for the future

    Although some of the discussion has centered around using a native toolkit like Gtk+/XUL to build a competitor that would have ISV sex-appeal, this is not a good foundation as it wont give us Web-like deployment (we need a stack that can be secured to run untrusted applications, and we need to be able to verify the code that is downloaded, which leaves us with Java or .NET).

    The time is short, Microsoft will ship Avalon in 2-3 years, and they got a preview of the technology out.

    I see two possible options:

    • Implement Avalon/XAML and ship it with Linux (with Mono).
    • Come up with our own, competitive stack.

    I think someone will eventually implement Avalon (with or without the assistance of the Mono team), its just something that developers enjoy doing.

    If we choose to go in our own direction, there are certain strengths in open source that we should employ to get to market quickly: requirements, design guidelines, key people who could contribute, compatibility requirements and deployment platforms.

    We have been referring internally at Novell to the later approach as the Salvador platform (after a long debate about whether it should be called MiggyLon or Natalon).

    We do not know if and when we would staff such an effort but its on the radar.

    The patent issue

    Are there patents in Avalon? It is likely that Microsoft will try to get some patents on it, but so far there are little or no new inventions on Avalon:

    • Canvas graphics, persistent objects (Tk Canvas, Gnome Canvas)
    • With AA/vector-based graphics (Gnome AA Canvas)
    • With animation (Nautilus Andy-branch Canvas items)
    • With Vector graphics (Gnome Print, librsvg)
    • With A 2D graphics model (PDF, Libart, Cairo)
    • With Web-like-Deployment security (SecureTcl, Tcl Plugin, Java)
    • XAML has been done before (Glade, Qt designer), but am not sure that XAML is the best "authoring" model yet. The power lies in their deployment power.

    Posted on 24 Apr 2004


    Usenix VM Conference

    by Miguel de Icaza

    I will be doing the keynote at the Usenix Virtual Machine Research and Technology Symposium on May 6 and 7 in California next month.

    Am also attending the Usenix Conference in Boston this summer.

    Amazon Search

    Nice new search engine from Amazon.

    Posted on 19 Apr 2004


    Pathscale and Open64

    by Miguel de Icaza

    Greg was nice enough to point me to the PathScale compiler suite: a high performance compiler suite for AMD64. Pathscale's compiler is based on Open64, but has reportedly updated its C/C++ compiler frontends to a recent GCC (as opposed to the current Open64 derivative compilers).

    OpenScale is lead by Fred Chow, an ex-SGI developer that created WHIRL, and later Pro64.

    So as a starting point for a Managed C++ compiler, PathScale sources might be a better option.

    This product shows one of the splits that people were afraid of to circumvent the GPL: the front-ends which are fairly complex (C++) has been split out from the backend and a proprietary highly optimizing compiler has been developed for the AMD64. It was just a matter of time before someone did this though.

    Posted on 18 Apr 2004


    Another Anonymous Methods Code Drop

    by Miguel de Icaza

    A fresh patch and a full tarball for MCS.

    Managed C++

    I read Anthony Green's feedback on using Open64 as the foundation for implementing a Managed C++ compiler. I respectfully disagree with his opinion.

    Let me explain why Open64 is the best starting point for implementing Managed C++.

    First, the requirements:

    • A C++ compiler that can generate images in the Common Intermediate Language (CIL). The intermediate language for the ECMA 335 virtual machine.
      Essentially, any existing C or C++ code needs to be compiled into CIL code.
    • Expand the language to include the Managed C++ extensions, in some cases the extensions might restrict what you can do.
    • High level information must propagate to the low-level CIL layer to provide introspection capabilities, attributes, and become a full CLS consumer and producer.

    Since C++ is a language of titanic dimensions, it is not one that you want to reimplement. Your best choice is to pick an existing C++ compiler. In the case of the free software community, that means gcc or any of its forks.

    The question is whether GCC's internal IR can be retargetted to produce code for the stack-based CIL and whether you can propagate the extra available metadata. The later seems like a problem that we would have in both Open64 and gcc.

    Now what makes Open64 interesting is the fact that we can achieve the first goal without touching GCC: C and C++ compilation would be performed with the Open64 compiler down to WHIRL and then a new generic WHIRL-to-CIL compiler is produced that generates the files we want. We do not have to mess or touch any of the existing GCC internals (it is a difficult code base to work with).

    The above is very similar to IKVM's JVM to CIL compiler: the input "language" is an IR, the output language is a different IR.

    The fact that Open64 does not target the x86 in a way is irrelevant, because we are not interested in targeting the x86. We are interested in targeting the CIL.

    If we were to use the current GCC, we would have to intercept a good stage in the compiler, and most likely deal with RTL and produce bytecodes for CIL. The RTL is hard to penetrate and deeply linked to gcc internals. WHIRL is independent, well documented, and has various tools to process, consume and analyze the various WHIRL stages.

    Finally there is the point of the FSF and the GCC maintainers refusing to make structural changes to GCC on philosophical grounds. A split that would encourage the creation of proprietary front-end and back-end systems.

    Not only does this mean that its better to work with the Open64 fork of GCC which has already made this pragmatic decision and is a better foundation for targeting the CIL, but our goals are more aligned than those of the GCC maintainers.

    Update: Open64

    The latest version of Open64 folded in the changes from Intel and ICT.

    Posted on 15 Apr 2004


    Fascinated by the JIT

    by Miguel de Icaza

    Some people think that I wrote the Mono JIT. I did not. Dietmar, Paolo, Zoltan and Martin are the people who have hacked on the JIT engine in Mono.

    Recently, as a side project, I have been playing with the JIT a bit to improve some code generation here and there, and together with Ben we are learning how it works internally, it is fascinating to watch it in action.

    We have been using a simple example: String.GetHashCode hoping to get things to the point where the JIT output matches GCC -O3. The code is slightly smaller than GCC, but it is wasting two registers, so in a tight loop it ends up placing a local variable on the stack which has a high impact on a tight loop.

    Managed C++ and Mono

    Someone on IRC pointed me a few days ago to Open64. A compiler suite that includes C, C++ and Fortrans that generate a new intermediate representation called `WHIRL'.

    Some of the compiler front-ends are the GNU compiler front ends that have been re-targeted to generate WHIRL instead of RTL. This is fascinating because it means we can now seriously consider implementing the ECMA managed extensions to C++ (the job of moving to a non-RTL IR was done by SGI).

    It also means that any compiler that is moved to generate WHIRL could run on any ECMA VM.

    You can get the WHIRL IR documentation from here

    CIL image manipulation

    This topic keeps coming up: are there tools to manipulate CIL images (instrument code: pre- and post- processing, add classes, remove classes, trim methods, replace methods, append instructions) and sometime ago the fine folks at the University of Coimbra have implemented such a tool: Runtime Assembly Instrumentation Library

    In Chicago

    The other day Nat and I met David Vaskevitch, Microsoft's CTO. We went dancing.

    Posted on 12 Apr 2004


    Blogs are the TV of the Internet

    by Miguel de Icaza

    Blogs are the TV of the Internet. Reading them is fun, but they are not particularly challenging.

    Plenty of channels to choose from though.

    Posted on 10 Apr 2004


    Spam

    by Miguel de Icaza

    My e-mail now consists of 40% of spam after it has gone through SpamAssassin, in the mornings or weekends it is 50% of it.

    These days I use Mutt to manually remove the spam before I incorporate my e-mail into Evolution where the mail gets split in plenty of folders (and would make spam removal harder).

    Is everyone else getting this same volume of trash?

    Big News of the Day

    Of course, the big news is that Microsoft has released an internal project called "WiX" as open source and is being hosted in SourceForge. A good move, since it gives a lot of people confidence that the license used is an open source license, without having to spend some quality time reading every sentence of a new license.

    From the blog entry from one of the authors you can see that Stephen Walli was behind making this happen. I first saw Stephen doing a talk on startups and VCs at Usenix, on the early days of Ximian, and I remember taking notes frantically. Later I had a chance to meet him at OSCON in Portland.

    Posted on 05 Apr 2004


    C# Compiler

    by Miguel de Icaza

    As I make slow progress on Anonymous Methods on the C# compiler -due to some very embarassing assumption on my part- but most issues have been solved now. Am now implementing parameter capturing and must finish the field access reference from an anonymous method, fix a couple of regressions with iterators and commit quickly to CVS. Martin Baulig has been going through the C# generics spec item by item double-checking that his compiler has everything that we are supposed to have (Generic tests today amount to 20% of our positive tests, and 10% of our negative tests). He has finished with the generics spec as far as the ECMA working draft is concerned, but its lacking some of the latest additions that were freshly submitted in January.

    Martin also worked on the new alias features in C# 2.0 and some of that code is already on the CVS tree.

    Reflection.Emit is sadly not complete enough to build our generics C# compiler (even with the recently released .NET Framework 2.0 preview) so we had to resort to more hidden methods in our Reflection.Emit API which are only available to our compiler. We hope to post the list of our API needs in case Microsoft is interested in exposing these kind of changes in their implementation.

    At the PDC in one of the compiler BOFs, Brad Abrams asked if people had written a compiler that followed the Common Language Specification (CLS) rules and very few people actually said they had. Although we had a C# compiler, we had not implemented the CLS rules for it.

    Marek Safar recently contributed the CLS support for our C# compiler. The initial patch is about two months old, we went through various code reviews before the code could land on CVS: the traidional review for maintanability, style and performance was done before we could take his patch. Marek did a fantastic job addressing every concern that Martin and myself had. It turned out that the CLS tests have a minimal impact on compilation time.

    Partial Classes is another feature that more and more people are asking about. On the surface you would think its trivial to implement it. And in fact most of it is trivial to implement, except that there is a tiny little clause in the spec that states that type lookup must be performed using the current list of using declarations. The problem is that the list of using declarations might be different from file to file, so in two different pieces of a partial class "MyType" might have a different meaning.

    Partial classes are debatable an ugly hack, but at least this rules make sense in terms of doing what the programmer expects.

    Implementation wise, it means that we need to do a lot of code shuffling to implement it, and it is not something that we are likely going to have by Mono 1.0.

    Posted on 04 Apr 2004


    Nice Gnome writeup

    by Miguel de Icaza

    Erik pointed me to this nice writeup on the usability of Gnome given recent debates on the topic.

    Posted on 03 Apr 2004


    Now that Sun and Microsoft are buddies

    by Miguel de Icaza

    I am counting the minutes for Sun to ship our Mono implementation for Solaris. Maybe we can still make it to the Solaris 10 release.

    Just picture the benefits, out of the box free C# compiler on Solaris SPARC and Solaris Intel. Out of the box ASP.NET and ADO.NET on SPARC, and the Gtk# bindings for writing applications for the Java Desktop System.

    Not to mention that they get the industry's most sexy JIT compiler for free.

    I am walking with an extra cell phone battery in case McNealy or Schwartz decide to call me up over the weekend to discuss potential agreements (if I dont pick up, please leave a message, the wonders of ATT wireless).

    Posted on 02 Apr 2004


    Mono Brainshare Presentations

    by Miguel de Icaza

    Thanks to Pedro Santos I got a full list of the Mono Brainshare PPT files:

    • Introducing Mono for Developers [ppt];
    • Advanced Mono Development: Best Practices [ppt];
    • Mono: Developing and Deploying .NET Applications for Linux [ppt];
    • Mono: Rapid GUI Application Development on Linux [ppt];
    • Developing ASP .NET on Linux with Mono - ainda n�o h� o ppt dispon�vel
    • Using Mono to Develop the Next Version of Novell iFolder [ppt];
    • Developing with the System.DirectoryServices Namespace API for Mono [ppt].

    Notice that the slides that Erik and myself used were slightly different than those that we published for the event, as we continue the long tradition of `Redo your presentation the night before'.

    Posted on 30 Mar 2004


    On Novell and Toolkits

    by Miguel de Icaza

    Nat just posted the official Novell position on the toolkits

    I just posted this to Slashdot:

    As Nat has posted elsewhere, the Heise article is wrong.

    My team and other teams within Novell continue to develop and use Gtk as their toolkit (recently open sourced Simias/iFolder for instance) and all of the Mono GUI development tools.

    The only use of Qt that am aware of today is SUSE's recently open sourced YAST.

    Btw, if you have been following my posts on my blog and on the desktop-devel-list, you will know that my feeling is that all of the existing toolkits today (Gtk, Qt, XUL and VCL) will become obsolete and we need to start looking at the next generation toolkit system.

    Next Generation Toolkits

    One of the interesting aspects of Avalon is that they built the widget set on the equivalent of Gnome's AA canvas. Canvas and Canvas items. They call them `FrameworkElements', but it is the same model: once you "paint" something, it stays there (link)

    Nautilus had a branch that had some more advanced canvas items than the ones we ship in libgnomecanvas: Andy had written some canvas items that rendered tiny visualizations of a web page, so "web page" links would update live.

    Novell LDAP for Mono

    Sunil has an amazing tutorial on using the Novell.LDAP library for Mono. To find, go here and search for "DirectoryServices" on the Title. Sorry, the direct link fails.

    Posted on 29 Mar 2004


    Keynote at Brainshare

    by Miguel de Icaza

    In a few more hours Erik and myself will be doing the Mono components of the Friday keynote at Novell's Brainshare event.

    In spite of his race, that man is extremely valuable to me. He is not some random dingbat I found on the Strip.

    You can watch the keynote live tomorrow at 9am MST or you can wait and get the archive.

    We'd be fools not to ride this strange torpedo all the way to the end.

    Posted on 26 Mar 2004


    Gnome Users Conference in Spain

    by Miguel de Icaza

    The Gnome Users in Spain (host of the largest Linux deployment today) are having the "GUADEC Hispana", their Gnome Users and Developers Conference for the Spanish speaking developers on the 21-23 of May in Almedralejo, Spain.

    Posted on 23 Mar 2004


    Novell Brainshare Announcements

    by Miguel de Icaza

    Chris Stone just announced that Novell will be moving the whole company to OpenOffice by the end of the year, and to Linux on the desktop a year after (I did not see the graph clearly).

    iFolder and Simias (A metadata-based file system, with built-in synchronization) have been Open Sourced as well, and you can check it out here. Simias is similar to Longhorn's WinFS and i tis built on Mono.

    Nat just demoed the desktop, with iFolder/Simias to share and synchronize the data between a Windows machine and a Linux machine and demostrated the Groupwise support for Evolution and Gaim.

    Posted on 22 Mar 2004


    On Fragmentation, reply

    by Miguel de Icaza

    Havoc, you are skipping over the fact that a viable compromise for the community is not a viable compromise for some products, and hence why you see some companies picking a particular technology as I described at length below.

    The community can go XPCOM/PyGtk if they choose to (btw, same legal problems apply related to patents on COM ;-), but it is unlikely that the larger projects will pick on this.

    You are right that a "wrapper" could encapsulate Longhorn. But I think it will be a useless effort.

    No ISV will pick a layer on top of the Longhorn layer on Windows today or tomorrow: .NET is simple, easy to use as opposed to older APIs. ISVs will demand native support for them.

    Perl and Python directly support COM and .NET APIs today for interop. Am sure others will agree that why wrap everything in Longhorn, when you can just use your favorite language interop to use those features?

    As I said, I still believe that the "Open Source Desktop Components" is a better way of going, more than the "Linux-based Open Source Desktop".

    Underestimating Longhorn: Also, we should not under-estimate Longhorn. This is not a traditional OS anymore. This is an OS, that exposes .NET APIs as well as plugin interfaces for classes at every layer of the stack: file system, synchronization, transactions, communications, presentation and a miriad things more. "Wrappers" will hardly cut it here.

    Not surprisingly, I think that Mono is the best possible path for ISVs: it allows them to share plenty of code (not all of it if they are aiming at "perfect" integration) between the various platforms with a high-level programming language. With a runtime environment that will let developers take advantage of the APIs in the major market.

    On Fragmentation

    So the core of Havoc's thesis can be summed up as:

    We need to avoid fragmentation as various Unix desktop companies pick up a platform to develop software.

    Sun is a major Linux Desktop player that will never ship Mono, but is using Java. So we should use Java to avoid fragmentation.

    Legal and technical details, while interesting topics, are not at the core of this debate.

    Novell: At least from this side, there has not been a company mandate to pick Mono over Java for any projects. Individual teams and projects inside the company have picked up on its own merits: iFolder, F-Spot and a few other internal projects which are not public yet. Some other internal projects picked Java for their own efforts.

    The community has picked up on Mono/Gtk for a few applications on its own as well, the Gnome Foundation had no saying on this.

    In a few areas, we believe that we should use Mono, but avoiding a community splint is an important consideration to us. Our plans to adopt Mono on Evolution are on hold, as well as integrating Mono with OpenOffice (notice that OpenOffice already has hooks for .NET though).

    Sun: I will just assume that Sun developers have enough experience, and visibility into Java, that to them it is a natural fit to pick Java for projects, and that there is some degree of company mandate to use it. Am assuming this based on the naming of their Java Desktop System.

    Longhorn: Microosft jokes aside, an important consideration for some projects is the fact that Longhorn will be released, will get deployed and the OS APIs have switched from C/C++ to CLR-based API.

    In the Longhorn world, APIs are no longer your C/C++ grandmother APIs. Every new API introduced for the operating system is built on top of .NET. If you want to take advantage of it, you must write .NET code.

    Writing code in Java is nice for writing code that is portable and uses to the lowest common denominator. But living in this bubble is not an option on Windows.

    So the rationale for using Mono in some cases internally has been the fact that in Longhorn, you will have to write code in C#. Even if we have to write different GUIs (like iFolder: it will have three implementations: Windows.Forms, Gtk# and in the future a Cocoa# based one), we still get to share a lot of the functionality below.

    Maybe the community does not need this kind of functionality, but most ISVs will, and that I think is a pretty big setback for Java and its Java ways. To survive in the desktop ISV market, Java will have to break with the write-once-run-anywhere mantra, and deeply integrate with Longhorn's WinFX.

    If I were Sun, I would be retargetting my JVM code generator on Windows to generate CIL and making sure they can use every single Longhorn API.

    Who are we and what are we building?

    I personally think that we should move away from the "Linux Desktop" view of the world, and more into the "Open Source Desktop and Components" (I first heard this idea from Nat a few months ago).

    It may sound like a trivial difference, but it is not. As much as I love the Linux desktop, and as much as I love our tools, the most successful desktop components today are OpenOffice and Mozilla because of their cross-platform nature.

    Windows NT, XP, MacOS X and Longhorn will be with us for a long time. The best possible outcome of open source will likely be a segmented market like 33/33/33 for the desktop market.

    In my opinion Java, Swing, Gtk+ nor Qt address effectively portability to all these systems. And by that, I mean that you always end up with an alien application: either the look, or the integration into the platform is substandard.

    Mozilla and Abi to a larger extent got this relatively close to right. The botttom line is: no technology today gives you transparent portability.

    The best bet today is to share as much as possible on your "engine" and redo the OS integration components for each OS you support.

    Forks

    Today there is already a major fork on the road.

    Audio/Video: Today we got Xine, GStreamer and Helix as platforms for doing audio/media playback with different angles on the problem and no clear way of uniting them any time soon. Not to mention all the different player-level components.

    I would love to see a standardized C-based interface that every one of them exposed and allow people to pick one over the other. I for one am not excited about requiring 160 megs of GStreamer code on my machine to essentially play mp3s and CDs.

    And having an interface for the above is probably more important than any amount of Gtk+, Java, C# or Python skin on top of it.

    Office Suites: We got plenty to choose from here: OpenOffice (in my opinion the only contender for the next three years) and the two smaller open source solutions.

    Still, when it comes to engaging the community and pushing in a single direction, we got half the Gnome community pushing for Gnumeric/Abiword. If we can not reach concensus at this level with the community, I think we are going to have a hard problem selling anyone into agreeing into Java or C#.

    Ok, gotta catch a plane.

    Posted on 21 Mar 2004


    Paolo's follow up

    by Miguel de Icaza

    For those keeping up with the language debate in Planet.Gnome, am linking to Paolo's excellent second follow up on the subject. Paolo is not yet aggregated in Planet.Gnome.

    Paolo touches on why the ECMA CLI VM is a better VM to pick and describes his gives his view on the patent risks.

    Preparing for Brainshare

    Am getting ready to attend the Novell Brainshare conference in Salt Lake City this coming week. This trip agenda is pretty packed.

    Am doing two presentations on Advanced Development with Mono as well as attending plenty of meetings with users, customers and reporters. Am looking forward to demostrate some of the latest developments in Mono and MonoDevelop

    Sadly, we are not bringing our SPARC to the show to demostrate it, as it is kind of heavy ;-).

    Am doing a talk at a local users group, but I can not find the e-mail with the information for my presentation, so if you know what it is, please mail me the information.

    Latest Mono Develop

    Installed the latest MonoDevelop from CVS. It now comes with integrated Mono Documentation (from MonoDoc) and the Mono Debugger.

    New Planet

    Discovered Blogs at MSDN, fascinating stuff on all things .NET related. For those interested in tracking Avalon and XAML, you also should check out Longhorn Blogs.

    Posted on 20 Mar 2004


    Paolo on Havoc's thoughts

    by Miguel de Icaza

    Paolo has written some follow up comments to Havoc's language advocacy post today.

    Iraq on the Record

    A report on the 237 missleading statements made by the Bush Administration on the threat possed by Iraq is now available from the House of Representatives Web Site, it includes a nice PDF with the report and graphics and a searchable database.

    Posted on 17 Mar 2004


    Mono with SPARC/Solaris support

    by Miguel de Icaza

    Last night Zoltan Varga checked-in his last patches that complete the Mono JIT port to the SPARC (with Solaris). The system passes all of our regression tests, and bootstraps Mono from scratch.

    We had support for SPARC v8 and v9 as an interpreter, and some early work had been started by Mark last year. Zoltan picked up on the job on the first week of February and got the port done in marginally more than a month.

    With three JIT ports now (1 CISC, 2 RISC), most of the portability issues on the JIT must have been taken care of.

    Edd on the Mono Meeting

    Edd has written a fantastic article on the Mono Meeting. The Slashdot peanut gallery has initiated a flame-fest over the comment that to me C is dead.

    Gnome Notifier

    The Gnome Notifier is definitely not a production system, it is a toy that illustrates a simple way of sending notifications to the system (some other people have discussed this before. Ideally a more complete system would have a history mechanism, and a way of browsing/answering previous messages.

    For example, the most annoying problem I have with GAIM (My Instant Messenger in GNOME) is that whenever there is an interaction (you got disconnected from a remote site, or someone added you to their buddy list) a pop-up window shows up. This pop-up window shows up in the middle of your typing and grabs the focus. If you are writing code, writing an e-mail or doing any other form of typing, you are likely going to accept whatever is the default button by mistake, as you press the spacebar. Not to mention that you will have to re-type a few letters.

    What I would like is for someone to integrate that into the Panel in some form, patch Gaim and all the other offenders, and have a way of getting back all the pending notifications.

    I believe strongly that the Gnome Human Interface Guidelines should incorporate notification patterns and practies in their document, the following comes from the UI talk at the Microsoft PDC where there is a nice classification of user interaction:

    Spectrum of Interaction Possibilities, from the PDC

    Posted on 12 Mar 2004


    Our hearts with the people from Madrid

    by Miguel de Icaza

    Very sad news this morning; An outrageous attack on Madrid. Speechless.

    Gnome Notifier

    This is a quick hack that I put together in December 2002, a small notifier that looks like the Windows XP notifier with a nice little scrolling thingie. Someone asked me today about this hack, so am uploading it here.

    The notifier embeds HTML with a few small tags that get displayed.

    The nice trick back then was that you can send notifications to it by changing a Gconf key. You can then send notifications using the gconf api from your favorite language or from the command line language.

    To use it today, do:

    $ gnome-notifier &

    Then to do notifications, you call a command line tool:

    $ notify 'Hello World, to check your email <a href="http://....">click here</a>'

    It supports a cute little prefix "run:", which does the obvious:

    $ notify 'To run Xeyes <a href="run:xeyes">click here</a>'

    notify is just a shell script that calls gconftool.

    Ideally this would be incorporated in some form into the panel, and with a history mechanism, you could use that to replace things like Gaim's annoying notifications.

    XAML

    So someone has implemented a XAML-like stack for Windows.Forms. Just to be clear on the danger of XAML for the Linux desktop: it is not about the markup language being a problem: its about the fact that XAML developers would create XAML applications that are bound to the Avalon toolkit.

    So it comes down to: No Avalon, no app.

    Posted on 11 Mar 2004


    Mono CAS configuration tool

    by Miguel de Icaza

    Benjamin Wootton has been working on Mono's Code Access Security (CAS) support. CAS is a way of creating arbitrary "sandboxes" in the .NET environment. The idea here is to load and execute untrusted side-by-side with your trusted code code without compromising your application. Similar in spirit to Java's security model.

    CAS is needed for the various "click-once" setups for downloading, running and updating applications over the web, but more advanced uses enable scenarios like running untrusted plugins in a trusted application (for instance, a file format importer downloaded from the network, or plugins for your application which you do not necessarily want to trust).

    You can read his list of requirements here; The project status page (with all his patches to add CAS to Mono) and a screenshot of his Mono CAS Configuration tool.

    Anonymous Methods in Mono's C# compiler

    I have been working on anonymous method support for the compiler in stages. My latest patch for the curious lives here.

    The first one was to implement the implicit method group conversions to delegates, that one allows you to write things like:

    void Method ()
    {
    	button.Clicked += clicked_handler;
    	...
    }
    void clicked_handler ()
    {
    }

    The second stage was to handle anonymous method declarations inline, and move the body of the code into an helper method in a chunk like this:

    void Method ()
    {
    	button.Clicked += delegate {
    		Console.WriteLine ("hello");
    	}
    }

    Until that point things were relatively simple, the next step was a lot more tricky, and it involved capturing local variables:

    void Method ()
    {
    	int i = 0;
    	
    	button.Clicked += delegate {
    		Console.WriteLine (i);
    	}
    }

    The above code needs to be compiled into something like:

    void Method ()
    {
    	Locals1 __locals = new Locals1 ();
    	locals1.i = 0;
    	button.Clicked += locals1.__AnonymousMethod1;
    }
    
    class Locals1 {
    	int i;
    	
    	void _AnonymousMethod ()
    	{
    		Console.WriteLine (i);
    	}
    }
    

    Things get more complicated when you add multiple levels of scopes to variables:

    void Method ()
    {
    	for (int i = 0; i < 10; i++){
    		int j = 0;
    		button.Clicked += delegate {
    			Console.WriteLine (i + j);
    		}
    		int z = i + j;
    	}
    }

    The above needs to generate roughly this:

    void Method ()
    {
    	Local1 locals1 = new Locals1 ();
    	locals1.i = i;
    	
    	for (int i = 0; i < 10; i++){
    		Locals2 locals2 = new Locals2 ();
    		locals2.locals1 = locals1;
    		locals2.j = 0;
    		
    		button.Clicked += locals2.AnonymousMethod1;
    		z = locals2.locals1.i + locals2.j;
    	}
    }
    
    class Locals1 {
    	int i;
    }
    
    class Locals2 {
    	Locals1 locals1;
    	int j;
    
    	void AnonymousMethod ()
    	{
    		Console.WriteLine (locals1.i, j);		
    	}
    }

    So fairly tricky: the variable can be accessed from the method containing the anonymous method.

    One of the trickiest parts is the process that guesses the return value for the anonymous method: it might seem like inference is at work, but in fact during the resolution process we know the type we requiere, so the compiler triggers the resolution of the inner block when it gets this information.

    Another complex bit was that the resolution/emit phases of the compiler had to be completely decoupled (they were already partially decoupled) because it is necessary to identify any variables that might be captured before we can even generate the first line of the block.

    The patch is my work-in-progress code, it can not be checked into CVS just yet, since it breaks the iterator support in the compiler, so that must be fixed first.

    First Mono Summit

    I need to finish my write up and post the pictures of the event, but that will come later ;-)

    Posted on 10 Mar 2004


    My two cents

    by Miguel de Icaza

    Posted on 08 Mar 2004


    Mono hackers in Boston

    by Miguel de Icaza

    This week the Mono Novell hackers have met for the first time in Boston, and we have been discussing the various tasks that need to be completed for Mono 1.0 and 1.2. IRC has been relatively quiet, and the exchange of ideas and discussions in town have been great.

    The good news: we are on schedule for the 1.0 release, with a very nice cushion to test things. The only areas that are going to be very close to the deadline are System.Data and System.Drawing.

    We got a few folks explain their areas of work to the others (so far I attended the meetings on security, remoting and the debugging session).

    Duncan has been leading the release engineering meetings and laying down a process for the ongoing builds, and the 1.0 release packages.

    Martin, Mike, Todd and Daniel are busy working on a small surprise for MonoDevelop, that they are hoping to demostrate on the open house this Friday/Saturday.

    Windows.Forms is alive again! Peter Bartok demostrated various applications working with the new Wine, and together with Jordi Mas, they are resolving the various rendering integration issues between Libgdiplus (cairo) and WineLib (Wine turned into a library).

    XAML

    I read with interest Edd's thoughts on XAML and a new UI for GNOME. I have been doing some small XAML tests recently, and it is a very easy markup to generate. As I mentioned before the issue with XAML is that it will be very attractive to developers to move from HTML to XAML, as it provides more control, more widgetry and is an extensible system.

    The future of Linux on the desktop is in fact on the line: if enterprise developers and IT developers fall in love with Xaml for building their in-house applications it will marginalize again Linux on the desktop.

    There are two views of how to solve this problem. The Nat Friedman view of building a matching system in the meantime: leveraging our existing technologies, or the Miggy-view, which is lets implement the Avalon/XAML API. I think we should pursue both paths.

    Posted on 03 Mar 2004


    New Chomsky Article

    by Miguel de Icaza

    New article on the Israeli wall.

    Posted on 27 Feb 2004


    Crazy Week

    by Miguel de Icaza

    Monday flew in-and-out of Denver; Followed by XML Edge panel yesterday in Boston, where I had a chance to meet again Margo from Sleepycat.

    Next week will be twice as crazy: all of the Novell Mono Developers are descending into Boston for a whole week of meetings and working together. This is a historical event, since the team has never met before face to face (only a few of them have met).

    On Friday and Saturday we are hosting an open house event for folks to come and meet with the team and learn a bit about Mono. We have now an agenda for the meeting.

    Fun

    Duncan shared a few links with me today Rumsfeld Fighting Technique and this. From Dare, I found a nice post from Aaron: How Stating the False Hides The True

    Posted on 26 Feb 2004


    In Gnome Country

    by Miguel de Icaza

    Am in the international Open Source Conference held in Malaga in Andalucia. Andalucia and Extremadura are the two states that have adopted Gnome across the board: education and government. There are 400,000 users in these two areas (20% of the Extremadura population are Gnome users) and have around 100,000 Gnome desktops deployed.

    This is a very big number of Gnome desktops deployed. This might be the largest Linux desktop deployment in the world (China will follow later with the Gnome-based JDS system next year).

    This is entirely a Debian/GNOME setup, and there is a local industry that has emerged out of this: various small companies here are providing the support to the governments of Andalucia and Extremadura (Will get the name of the consortium of open source companies tomorrow, because right now I forgot).

    They have developed quite a set of interesting tools: from back-porting changes to the stable version of Debian (addressing one of Debian's weaknesses) to developing tools to manage large network deployments (similar to Red Carpet's enterprise features, but for Debian) and a nifty tool to create bootable distributions and turn them into CDs that people can carry around (metadistros).

    Tales

    There are tons of stories floating around, and people very excited about this technology. From the kids that after doing their work in school ask the teacher for permission to use the "Guadalinux" (this is the name they use to refer to the Linux machine, based on the distribution name) to the class rooms that are now entirely quiet due to the kids playing with the "Guadalinux" systems.

    Also grandmothers refer to the web as "mozilla" they pronounce it "mo-ci-yha", as in `I found in mo-ci-ya that you can do this and that'. Very interesting stuff.

    During a few conversations with the various officials and engineers that work on this project, I have mentioned that they should probably should join the Gnome Foundation's Advisory Board, something that I think we should fast track. I asked the education secretary if they had any issues with Gnome, and if there was something we could fix, or improve for them, and they said `So far we have not had problems with the teachers'. A good perception.

    The technical guys on the other hand had a few requests: from Evolution failing to send SMTP mails in some occasions (we should investigate this) to better integration with the braille stack in the accessibility framework (accessibility here is very important due to a fairly strong Spaniard organization called "La Once").

    My friend Charles Curran from the UK Linux Users group is also in town, he is now living in Sevilla, and came to the meeting. It was very nice to see him again.

    Lastly, about 30 Gnome Developers from the "Gnome Hispano" got together in the afternoon to meet and discuss. I learned that a "GUADEC Hispano" is being planned for May in Extremadura.

    Mono Presentation

    The Mono presentation went fairly well, I was still a bit tired from the jetlag, but it came out OK. I updated MonoDevelop from CVS, and things worked out of the box: I demoed the intellisense feature which is just a great way of developing Gtk# apps.

    While jetlagged

    While jetlagged and unable to sleep, am checking out the Nemerle language. A functional language designed by Michal Moskal for the .NET Framework that works out of the box in Mono.

    This compiler is self-hosting, which is fascinating. Worked out of the box on Mono 0.30

    Posted on 19 Feb 2004


    Mainsoft's J2EE product

    by Miguel de Icaza

    A fascinating product from Mainsoft has been released: Visual MainWin for J2EE.

    This product lets you run your ASP.NET applications written in C# or VB.NET inside a J2EE application server and integrates beautifully with Visual Studio.NET. All .NET applications can also use EJBs and reference Java classes, you can see a live Flash demo of it.

    Mainsoft has been using Mono's class libraries to deliver the functionality and they are regular contributors to the code base. We wish them much luck with their new product.

    Posted on 17 Feb 2004


    Madrid y M�laga

    by Miguel de Icaza

    I will be in Madrid on Monday and Tuesday (busy all day until dinner-time).

    Cena el Lunes, Comida el martes: Si est�n en Madrid, por favor p�nganse en contacto con Juantom�s o Roberto Santos para que nos juntemos para una cena el Lunes o desayuno/comida el Martes.

    Perrspectives

    Jon Perr who used to work for us at Ximian has launched a new web site.

    Posted on 14 Feb 2004


    Anonymous Methods

    by Miguel de Icaza

    Been doing good progress with anonymous methods, but last night on the plane on the way back home, I discovered a big problem with my design (I had a fairly clever way of computing the right return type in an anonymous method).

    My clever hack was to hook up to the standard conversion code: anonymous methods are generated during the implicit conversion code. The problem with this approach is that it was too late to capture variables.

    Am right now toying with overloading the implementation of Field expressions and LocalVariableReference expressions to handle the lifting, rather than the clever CapturedVariable expression which I was using before.

    Marek and CLS compliance

    Marek has been cleaning up the compiler internals to turn our compiler into a CLS-aware compiler, now we will be able to flag CLS violation errors. His fixes includes long-standing wishlist items to refactor the interface members to become regular MemberCores (which they do now) and refactoring some of the attribute emission and gratuitous differences in constants and fields that we had in the code.

    Posted on 11 Feb 2004


    In Provo, Utah

    by Miguel de Icaza

    Am visiting Novell's main development offices for the next two days. If you are here and want to talk about Mono, drop me an email.

    Posted on 09 Feb 2004


    MonoDevelop progress

    by Miguel de Icaza

    After yesterday's release of Mono 0.30 I finally had some time to look into what the guys have been up to with MonoDevelop (the port of the venerable SharpDevelop from Windows to Linux).

    To my surprise, MonoDevelop is fairly advanced, and I was able to do all of my MonoDoc development on it today:

    MonoDevelop with a fresh project for MonoDoc

    I was improving the file format for our Index, as well as some touch ups to the collaborative framework in MonoDoc:

    MonoDoc's index

    Here is what the collaborative documentation editor looks like now:

    The MonoDoc embedded editor.

    I have most of the anonymous method support written now. Now the time for debugging has come.

    Posted on 03 Feb 2004


    Back from Hawaii

    by Miguel de Icaza

    My excuse for being there for almost a week was the ECMA meeting for the CLI and C#. As Brad pointed out, there are now two public mailing lists for providing feedback and discussing the ongoing work of the ECMA CLI and C# standard efforts, you can subscribe to them by going here for C# and here for CLI

    During the meeting there was a set of "interesting" proposals to the C# language, and I have come up with my own, watch this space for them.

    After the ECMA meetings were over during the day, I would run to the beach and do some all-amateur snorkeling action: the hotel where we stayed at was packed with multi-colored fish and large turtles that would swim next to you, minding their own business.

    Build Buddy released

    At Ximian we developed a tool to build, package, sign, qa and distribute the Gnome desktop, which we refered to as "Build Buddy". This week it was released as GPL software.

    Build buddy uses an XML-based configuration file similar to the RPM spec file to describe how to build a package and apply optional configuration options and patches depending on the target operating system. It can work on a cluster of computers and can also run various builds for different operating system on the same machine by using chroot-ed environments (we call those "jails").

    We will be moving our XML build files to the public CVS this week.

    Brilliant mockups

    Nat pointed me to the Scoop proposal. We have been talking about implementing this kind of functionality to solve the issue with the IM client in Gnome poping up all the time, and handling other notifications that the system has for quite some time. The mockups in that site are a great starting place.

    Movie of the Night

    Went with Duncan and Robert to see Fog of War featuring Robert McNamara. A media rich movie, surely inspired by his book on the Vietnam mistake. Gorgeous music by Philip Glass. Obligatory watching required.

    Message to Nat

    Dude, if you read this, please return our salami and cheese. We checked your fridge while you were out, and you have to dispose those tomatoes you got six weeks ago, they are starting to smell.

    I love the Internet

    Sometimes I get advise from random people on writing code.

    Posted on 30 Jan 2004


    State of the Union

    by Miguel de Icaza

    The Independent/UK is running the Real State of the Union report.

    DaCapo

    A research project called DaCapo implemented a memory management toolkit in Java for the Jikes Java VM. This GC engine looks fairly good.

    One of the fascinating things about Jikes's JIT engine is that it was completely written in Java. Absolutely mind-blowing. The upside is that many things can now be done in a higher-level language than C like JITing and garbage collection, the downside is that these systems are fairly heavy during compilation time and are best suited for server use and not desktop use.

    A balancing act would be fantastic.

    In Mono a few months ago we discussed a few possibilities on implementing more code in the managed world for the JIT engine. One of the options is to expose our current IR, and perform a few optimization in the C# world who could mutate the IR and keep the two existing layers: CIL to IR and IR to machine code to remain intact.

    To make the above balanced, we could invoke the C#-based optimizations only conditionally, for example, when doing Ahead-of-Time compilation of code.

    Just turned the TV on

    I turned the TV on, to Bush saying that abstention was the only way of fighting STDs, followed by an applause. Oddly, I was not tuned to Comedy Central.

    Posted on 20 Jan 2004


    Sun working on new Intermediate Language

    by Miguel de Icaza

    Little is known about the new intermediate language that Sun is working on. All I know is that Guy Steele is involved in this effort.

    The story has various interesting elements: a new intermediate language for high-performance computing; A call to get IBM and Cray involved into the architecture/design of such an intermediate language, a new language (or maybe a language extension) to take advantage of these features and finally because they want to create an industry standard out of it.

    This is interesting in many levels: first, it could be a departure from Java's current focus of compatibility. This policy of VM compatibility, while good for software developers, and to Sun's story of write-once, run anywhere has also lead to the stagnation of the VM specification, and the intermediate byte code language. Which is a source of criticism from people who want a performing intermediate language. Today the Java intermediate representation can not be effectively used as it is for high performance code.

    But Sun has the engineering talent, the knowledge, and the team to turn their expertise in optimizing compilers into a new intermediate language that would better suite the Fortran/C/C++ developers.

    I of course would love to see the ECMA CLI be the foundation for this work, but if I were in their shoes, I would probably begin by extending the Java byte codes towards supporting features from the Sun IR for their optimizing compilers, or extend the Sun IR to support object-oriented features that could support Java.

    Maybe Sun is interested in going through an ECMA-like process to standardize this intermediate representation. Am looking forward to learn more about this project.

    My interest in this comes from the work we have done in Mono and Mono's IR. Although we are very proud of the code generation engine we have, it is still in its infancy in terms of the optimizations we can perform. I guess I would love to learn how Mono can benefit from it, and even maybe be able to consume this IR.

    Posted on 18 Jan 2004


    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, asp.net 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: http://www.newton.cx/~peter/files/mbuild-0.0.1.tar.gz 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


    Ettore

    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


    Monodoc contributions

    by Miguel de Icaza

    We are getting some pretty sizable contributions to the documentation of Mono through Monodoc.

    Posted on 10 Dec 2003


    Python running fast on .NET

    by Miguel de Icaza

    Jim Hugunin (the creator of Jython) reports that his early .NET compiler for Python is performing very well, in contrast with ActiveState's previous attempt, in some cases better than CPython. It always bothered meb that ActiveState discontinued work, and came to a conclussion on .NET performance rather quickly, with JScript and VB.NET being proofs that better speeds could be achieved.

    A copy of Jim's posting is here (the listserv requires a password to read), the details:

    The early results with IronPython show that Python compiled to IL can run fast. On the standard pystone benchmark, IronPython-0.1 is 70% faster than CPython-2.3. The numbers for pystone as well as several micro-benchmarks are shown below. For ease of comparison, all times are normalized to Python-2.3. Smaller numbers indicate faster performance.
                    IronPython-0.1  Python-2.3      Python-2.1      Jython-2.1
    pystone         0.58            1.00            1.29            1.61
    
    function call   0.19            1.00            1.12            1.33
    integer add     0.59            1.00            1.18            1.08
    string.replace  0.92            1.00            1.00            1.40
    range(bigint)   5.57            1.00            1.09            16.02
    eval("2+2")     66.97           1.00            1.58            91.33
    

    Good to stop the meme of `.NET is slow for scripting languages'.

    Two simple links for the day

    Illustration: patent on a simple web app

    The simple joys in life

    Someone on the net sent me this:

    Mono's ASP.NET running on an X-Box running Debian

    On the other hand, I do not know how I forgot to blog about a real ASP.NET web site running on Mono: http://www.mo8il.com/

    Posted on 09 Dec 2003


    Gnome goes Enterprise!

    by Miguel de Icaza

    I have not seen this reported yet anywhere, but as I was flipping through the pages of the newspapers on the airplane on the way back from Frankfurt, I noticed that Sun has signed a deal with the UK to provide 500,000 of its desktops based on Gnome, OpenOffice, Mozilla and Evolution.

    A second batch of congratulations for our competitors/collaborator friends at Sun. They got one million users for GNOME in China. 1.5 million desktops: not bad, not bad at all.

    The guys got a very good review from eWeek: Sun Rivals Windows, Office. An interview from a couple of months ago with Jonathan Schwartz is here. This one about their desktop effort.

    XD2 is also doing well

    Here is a review of our own XD2 in Open for Business.

    Novell article on Mono

    Richard Smith has published an intro to Mono in the Novell CoolSolutions.

    Posted on 08 Dec 2003


    Linux Bangalore is over

    by Miguel de Icaza

    The conference was awesome. We got to meet a large community of enthusiastic hackers that wanted to participate in Gnome and Mono activities. Nat and myself did in total four presentations, three of them we did together, people really enjoyed the complemented discussion on stage.

    Our talks were spaced out so we could spend time to talking to people, which turned out to be a great idea: we spend the three days at the conference answering questions and hopefully giving some helpful hints on how to get involved in open source developement.

    The Novell Booth at Bangalore Linux.

    The Novell booth was crowed the whole time, and the Novell team here did a fantastic job, they even had a quiz competition for various open source topics.

    Posted on 04 Dec 2003


    Bangalore update.

    by Miguel de Icaza

    The conference so far has been fantastic, it is great to meet so many students and developers who are interested in becoming contributing citizens in the free software world. Yesterday Nat and myself did a couple of joint talks on the desktop. Today was Mono day #1 and the talk covered the basics: the rationale for Mono, what is available, and the roadmap.

    The Main Room

    I spent the next five hours talking to various people who were interested in different facets of Mono and open source development. The Novell booth was packed, and the guys manning the booth were overloaded with questions about the desktop, the bounties (which we are promoting here for the first time in public) and Gnome Bangalore (which was just launched).

    Naba Kumar of Anjuta fame has a boot all for himself to demo Anjuta and the locally built PDA is also being displayed on the show. Another important project at the show was the IndLinux effort: they have been working on translating Gnome to ten different Indian languages:

    IndiLinux GNOME

    Tomorrow we are doing another joint presentation, this time on rapid application development with Mono. We have a little surprise prepared for this one.

    Posted on 03 Dec 2003


    Mono 0.29 has been released

    by Miguel de Icaza

    This release took us a long time to go out, but it is pretty exciting, with PPC supported. The best Mono release ever!

    Today I do my first Mono presentation at the Bangalore Linux event. I helped Nat with two of the Gnome presentations yesterday at the event, those were fun.

    Posted on 02 Dec 2003


    Arrived to Bangalore

    by Miguel de Icaza

    A very pleasant journey to Bangalore. At the lounge in Boston they had Champagne and Burritos:

    Champagne and Burritos For the Traveling Connoisseur.

    During the six hour layover in the Frankfurt airport, I did some low-hanging-fruit hacking: reduced MCS compilation times and memory usage a bit more. On the airplane I managed to get Gtk# using Cairo# which required fixing various Cairo# issues, and adding some custom features to Gtk#. Will check those in, once we decide on the new name for the `CairoState' object, which we currently call `Cairo.Object' which is just not right.

    Barb wire, keeping someone out of something.

    Planet Novell

    Following the steps of PlanetGnome, Novell now has an aggregated service of Novell blogs at Planet Novell

    Monodoc Editing

    Added some helper buttons to assist the folks writing documentation with Monodoc, also we have now activated the Monodoc editing web service, so those users that are using Monodoc CVS are now able to send their contributions back from the GUI.

    Our web service is running on Mono ASP.NET with the Apache2 module. For the curious, our web service is hosted here.

    Posted on 29 Nov 2003


    Going to Bangalore

    by Miguel de Icaza

    Am taking a plane to Bangalore in a few hours. This trip is to meet with my colleagues at Novell/Bangalore who will be working in Mono (starting next week) and also to attend the Bangalore Linux Conference. Will be talking about Mono as a development platform, and meeting with some of the existing contributors to Mono and Gnome that have e-mailed me.

    On my way back, am planning on stopping by Germany and Spain, but the exact dates and locations have not been sorted out yet.

    The Mono team is in good hands, with a flury of activity on every corner: we are advancing quickly on completing the .NET 1.1 APIs for the Mono 1.0 release, and a few team members have been amusing themselves implementing features from the .NET 1.2 release.

    As I write this, am migrating my album from my mPhoto software to Ettore's F-Spot photo management application (both written in C#, but Ettore has done a much better job than I did with mPhoto ;-).

    Lastly, I have been playing with Cairo in Gtk#, and having a fun time using it from C#, it needs a bit of loving which am going to be doing on the airplane, and will have something to check in when I land in India.

    Cool link of the day, comes from Brad Adams blog: http://broken.typepad.com/

    Posted on 28 Nov 2003


    Editorial Prize

    by Miguel de Icaza

    My friend Mancha (Fernando Magari�os) worked for two years on and off doing the typography for a physics book in Mexico, and the book was just awarded the prize for the best typesetting, layout and editing in Mexico.

    Mancha composed the book with TeX. Will post links when I have them.

    Posted on 27 Nov 2003


    Sun's Linux Desktop in China

    by Miguel de Icaza

    Congratulations to Sun on getting the deal with the government of China. We are competitors, but still the software they are delivering is open source.

    I know various of the hackers and developers at Sun that have worked hard on this: on Gnome, in OpenOffice and Java, and I am glad that their hard work is going to in such a large deployment.

    A few years ago, we met with John Heard and Marco Boerries who were working on various angles of Sun on the desktop. It was back then that John had seen a future for Gtk+ as an ISV platform, and that Marco would bring up the idea of open sourcing StarOffice (which we have been very excited about contributing to). They wanted to see Gnome mature: and they were two important driving forces for the establishment of the Gnome Foundation. Through all these years of work, Sun has funded big parts of development of various components of the open source.

    Despite all the criticism they get from Jonathan Schwartz quotes about Linux, Sun is a massive contributor to the open source pool. OpenOffice alone is a big chunk of functionality. But their daily involvement in Gnome 2 has been a pleasure to watch: they were the first to push Gnome to be fully accessible to comply with government regulations.

    Anyways, good luck to our competitors. Tonight is a big win: at least 1.3 billion people will be running Evolution.

    Royalty-Free Office XML file formats

    Microsoft announced the specs for the XML markup for Office, and they are royalty free. The actual license text contains:

    If you distribute, license or sell a Licensed Implementation, this license is conditioned upon you requiring that the following notice be prominently displayed in all copies and derivative works of your source code and in copies of the documentation and licenses associated with your Licensed Implementation:

    "This product may incorporate intellectual property owned by Microsoft Corporation. The terms and conditions upon which Microsoft is licensing such intellectual property may be found at http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp?frame=true."

    By including the above notice in a Licensed Implementation, you will be deemed to have accepted the terms and conditions of this license. You are not licensed to distribute a Licensed Implementation under license terms and conditions that prohibit the terms and conditions of this license.

    It appears that the above *might* be incompatible with the GPL. It sounds like the BSD advertisement requirement. Further study is needed to really understand the issues.

    Posted on 18 Nov 2003


    Chema Celorio, we will miss you

    by Miguel de Icaza

    Chema Celorio, a good friend for the past four years died yesterday on a skydiving accident in Mexico City.

    The Gnome folks might remember Chema for taking over gEdit, the Gnome Printing platform and later on managing the Ximian team in Mexico and the Ximian Desktop effort. He was became famous for being the #1 bug reporter to Gnumeric, and a close friend to everyone that met him.

    He helped bring newbies by fueling the Gnome-Love project, a project, where developers would be hand-hold, and no question was too simple to be asked.

    Chema was passionate about skydiving, technology and free software. He was preparing for a mexican record of skydiving in the upcoming weeks. We had dinner frequently when he was in town, and he would always ask the right questions, and make us laugh all.

    Just two weeks ago Maria and I had him for dinner at home, and we taught him to cook crepes. We will miss him.

    There is a skydiver's forum: in Mexico.

    Chema was thinking about moving to Europe.

    I have a few pictures I took from Chema, from Barcelona in September: here, here, here, here, here and here.

    Nat has a picture of Chema last year at the Cave.

    Nat comments

    Posted on 10 Nov 2003


    Back from the PDC

    by Miguel de Icaza

    Am back in Boston from the PDC. Lots of improvements to the .NET Framework in the short-term, and some very interesting but still early work for the long term.

    Will post all my notes on Monday, once I decompress.

    Posted on 01 Nov 2003


    Vietnam goes Open Source

    by Miguel de Icaza

    The Vietnameese government goes Open Source. WOW

    Posted on 30 Oct 2003


    Mono Get Together at the PDC

    by Miguel de Icaza

    Mono people: Lets get together on Tuesday 28th at 6pm at the West Tower Lobby in the LA Conventions Center at the PDC to discuss Mono. Pass the message.

    After this we can head over to the "Meet the Experts" session at 7pm.

    Posted on 28 Oct 2003


    More Mono at the PDC

    by Miguel de Icaza

    Tomorrow we will devise a plot to get more people interested in Mono to get together; My plan right now is to take over one of those empty areas around 7pm and just get together around the tables. I spotted a few places that seem to be deserted, will confirm tomorrow, and we can have a massive Mono love-fest.

    Posted on 27 Oct 2003


    Mono Meeting tonight

    by Miguel de Icaza

    The fine folks at the `Microsoft and Academia' BOF have welcomed us to participate on their track so we can discuss Mono from an academic perspective.

    The BOF is at 7pm at the Conventions Center.

    BOF Patching

    We just arrived to the PDC, and we put open source in practice and did some patching of the BOF announcements to reflect the Mono session.

    Posted on 26 Oct 2003


    PDC time

    by Miguel de Icaza

    After a nice evening improving the new System.Drawing foundation built by Alexandre am ready for some airplane hacking. Will be arriving early to LA for the Microsoft PDC.

    In LA

    I have arrived to LA, we are staying at the Hyatt, feel free to leave messages to get in touch with me. and Lluis will be arriving later today.

    C# 2.0 specs have been published

    The language specs for C# have been published

    Posted on 24 Oct 2003


    GDI+

    by Miguel de Icaza

    As I upgraded the hard drive on my machine today --which took a few hours to copy the rats' nest that is my home directory-- I begun the process of assimilating the GDIPlus Flat API.

    A few weeks ago, Alexandre Pigolkine, Jordi Mas and myself were discussing the development roadblocks that we had with System.Drawing (as part of the Windows.Forms effort). The problem is that we made one of the most common engineering mistakes: when faced with the issue of multiple choices, instead of choosing one, we chose them all.

    Being seasoned C# developers, we created an internal interface, and had each backend implement the interface. Then the official System.Drawing API was implemented and it became a multiplexor for the various implementations. We had Win32, Xr and Gtk backends. Of course the issue is that improving the backends becomes fairly hard: a change has to be reflected in five places: three backends, the interface and the multiplexing call site. Not terribly hard for one or two API calls, but it starts to become hard with an API as big as this one. I take all the blame for the mistake.

    After some discussion, we decided on a new strategy: System.Drawing would only have one implementation, and this implementation would be based on GDI+. On Windows, the implementation would just call into the real GDI+ library, and on Unix systems we would provide a full implementation of it. To implement GDI+ on Unix, we have based our implementation on Cairo which has pretty much the same imaging model that GDI+ (and PDF) have.

    This has several advantages: we maintain and write less code; we can test against the real GDI+ implementation on Windows and remove a variable in the debugging process; and we can contribute this code back to the Wine project.

    But plenty of assumptions we had made before do not apply necessarily now. Before we had a managed implementation of the image loaders: it was just as fast as the C code and by virtue of being C# code, by extension it was cooler. But now in this GDI+ world, we will move things like the image loaders into the C code API, and the C# code will become thin wrappers around it.

    The above also explains why there is a regression in Windows.Forms and System.Drawing on CVS as opposed to the latest official Mono release. So now I should be able to assist the System.Drawing developers.

    Mono Installers

    The upcoming Mono not only will add Cairo as a depedency (if you care about System.Drawing), but our internationalization support will also require the International Components for Unicode library.

    We will continue to provide packages on Red Carpet, and RPMs on the site for downloading, but we are seriously considering reusing the Ximian Desktop installer to install Mono on a machine. That means that instead of downloading a dozen packages from our site, you would only download one. This hopefully will reduce the number of problems that people have with installations and we would also ship the Apache module pre-configured in the distribution.

    Duncan is researching this, and we will keep people posted.

    Posted on 21 Oct 2003


    Mono Meeting at the PDC

    by Miguel de Icaza

    Wondering about the organization of a meeting of Mono users at the PDC, it seems like Monday afternoon before the reception, or Thursday are good time slots for getting together.

    Alternatively, the Mono folks will be wearing the cool Mono t-shirts, so if you are interested in discussing a Mono topic, feel free to come and join us.

    Nat in Bangalore

    Today's most beautiful blog update goes to Nat for his fantastic photographic update on the Bangalore trip and his insight on his trip to ramp up the new Novell open source hackers that will be working on improving Gnome, OpenOffice, Mozilla and Mono.

    In other news, am going to Bangalore in early December, and I have to plan something with convenient stops in the middle. It has to involve a Paris stop, so I can meet the Mono hackers in Paris, and introduce myself to Fabrice Bellard.

    Gnome Summit: New York City

    In November the Gnome Hackers will descend into New York for the Gnome Summit where we will talk about the major problems facing the Linux desktop today. This event is a follow up to last years Boston Gnome Summit.

    There are tons of new topics for this year that I am looking forward to discuss:

    • Hardware detection: Havoc has posted some initial thoughts on freedesktop.org on how to hook hardware detection systems into the stack of applications in the desktop.
    • D-BUS is maturing as a system-wide broadcast and messaging system, and it will be nice to see it plugged into the desktop. We are still lacking Mono bindings for it though.
    • OpenOffice has changed massively since last year, and has a few killer features. It took Mozilla three years to go from open-source code base to best browser on the desktop. And developers are slowly, but steadily joining the OpenOffice project. Am looking forward to meet Michael and get an update on it.
    • Mozilla is now on its own, without their original corporate backing, a change of landscape, and am looking forward to meet the Galeon, Epiphany and Firebird developers.
    • Would love to find out what the OSAF guys are up to, and if they have demos, even better!

    And of course, get everyone to adopt Mono for their projects, as we know it is the One True Runtime (bug reports, happily accepted

    Posted on 18 Oct 2003


    No Mono BOF at the PDC

    by Miguel de Icaza

    I just received a letter from the INETA PDC organizers informing me that the Mono BOF would not be happening. I was looking forward to discuss Mono. The BOF suggestion had a pretty good rating and hat plenty of voters, I guess it was a far stretch to have Microsoft have a BOF on Mono :-)

    Notice that there is an estimated of 60 BOF talks, but only 48 were approved.

    If there are people interested, we can still sit down and discuss Mono at the PDC, there will be at least three of us: Gonzalo, Lluis and myself.

    Posted on 15 Oct 2003


    Expanding the Mono team.

    by Miguel de Icaza

    I am looking to hire a full-time developer to work on the Mono JIT engine. This would include working on the code generation engine of the JIT (so compiler experience, low-level programming experience is a plus), advanced optimizations for the compilation engine (various SSA-based optimizations, array-bounds check elimination, fast-call conventions, loop optimizations), debugging interfaces and would involve dealing with a garbage collected, multi-threaded runtime environment.

    We are porting the Mono JIT to various platforms, so you would be learning new assembly languages, new ABIs and more. If you are interested, drop me an email at [email protected]

    Posted on 14 Oct 2003


    Problems on my machine

    by Miguel de Icaza

    I have been applying every one of those "Apply this patch immediately" updates that I have received on e-mail from [email protected], and my machine seems slower every time.

    Update: I have received on last count 9 emails from people informing me that the above is a virus. Guys, it was a joke. Obviously I failed in my attempt to be funny.

    Evolution and Mono

    Chris Toshok today has been working on embedding Mono and Mono-based applications inside Evolution in their new UI branch.

    Here is a screenshot embedding the Mono documentation browser in Evolution:

    More Mono Bloggers

    New mono bloggers, I think I should track them in in Monologue.

    Posted on 13 Oct 2003


    by Miguel de Icaza

    Posted on 12 Oct 2003


    Birthday Theme

    by Miguel de Icaza

    Some people have asked me about the theme for this year Birthday's present. This year theme is going to be `Nice and Expensive'. It is a repetition of an old-time favorite. But this year, lets try harder to stick to the theme.

    Posted on 09 Oct 2003


    Robert Fisk on the attack on Syria

    by Miguel de Icaza

    The article is here, and I had forgotten about the Syria Accountability Act that was making the news last year until I ran into Robert's article today.

    Multi-threaded MonoLogue: Gonzalo has fixed all the runtime bugs

    We modified the Monologue software to use multiple-threads to download the RSS feeds concurrently, and this exposed a couple of tricky bugs in the runtime and our DNS setup. Gonzalo was on a quest to track all of these problems down, and our abusive version of Monologue is now fully functional.

    Now the major source of problems was not a Mono bug, but a dead-lock condition that was not obvious. Turns out that Monologue/threaded happened to fill the Threadpool queue (no surprises there: threadpool will just take care of things), but the Http code needed a thread from the pool to download things (the API is using the async version of this as well), and that caused a deadlock.

    Posted on 07 Oct 2003


    MonoLogue: Mono's aggregator is up and running

    by Miguel de Icaza

    Ben wrote an RSS aggregator that we are running now on http://www.go-mono.com/monologue to track the Mono blogs. You can now get all your Mono news in a single spot. This is similar in spirit to Jeff's Planet GNOME

    If you are interested in running the aggregator in your machine for your own personal blog reading, just download the `monologue' module from our AnonCVS repository.

    On RSS Aggregators

    I have tried three kinds of RSS aggregators out there: desktop-based, mozilla-based and html-based. From my personal browsing experience I believe that the HTML-based aggregators are the best kind. Specially when we you are using Mozilla/Firebird with tab browsing.

    There are plenty of desktop-based aggregators for both Windows and Linux (I tried them all in a quest for the perfect UI). The desktop-based aggregators typically embed a web browser in the browsing pane to render the news. And this is the source of most frustration with them.

    The embedded HTML rendering engine has some very bizarre interaction glitches when you follow links, and you try to go back in history, or when you start following links inside the aggregator (which it is bound to happen).

    Since it is not really possible to read comfortably the news inside the aggregator, you can either open a new window (uncomfortable) or hope that the aggregator can instruct your browser to open a new tab, but it is still annoying to use.

    The obvious answer to the above problem is to put the aggregator inside the browser. Luckily Mozilla/Firebird have made plugin authoring a breeze, and there are a couple of options out there.

    These aggregators today suffer from a problem shared by the desktop-based aggregators: they are based on the modern news-reading/mail-reading model. These present the user with a collection of folders with items old and new, and you read your feeds one by one. This model is ill-suited for blog reading because blogs do not produce large volumes of data per day, and you most likely want to read all the new things in the day at once. Not once per week, so the interaction model is basically to read a single post on each folder and move to the next one, and repeat this a number of times per day. Not very efficient.

    The third kind, the one I like the most are the aggregators that generate an HTML page with the consolidated data. This in my opinion is the best model because you get to read HTML content on your main HTML browser and all the tools available on your browser are available to you and most important: there are no surprises on the behavior. Since it aggregates all the data at once, every time you visit it, you can get a snapshot of what is happening, rather than having to check 20 sources one by one.

    Firebird users probably will like the last one the most, since its a feature packed browser, and with a rich set of extensions that make browsing more efficient. But in general any user of a tabbed-based browser will enjoy the later kind the most.

    Escalation of Violence

    Yesterday there was another suicide bombing in Israel. The reaction was an attack on an alleged terrorist training camp in Syria. Following the Bush doctrine of `destroy evidence first, cover-up with non-answers later'.

    Been thinking this morning that it is time to write a Israeli-Palestine Conflict Primer. On second thought, maybe I should just strongly recommend reading John Pilger's Palestine Is Still The Issue an eight-parth documentary available online (wish they sold the video on DVD).

    Edward Said passed away, his latest article and a tribute to his writing.

    The Hamas group that has been striking at the civilian population was initially funded by Israel in the 70's to undermine the growing popularity of the PLO and Arafat. A policy that now has backfired. Some details here.

    Posted on 05 Oct 2003


    SouceGear is done!

    by Miguel de Icaza

    We completed the SouceGear project!

    The project included adding a lot of functionality to Mono to support Web Services on the client (mostly having a full XmlSerializer implementation as well as its close family members) and making Mono robust.

    To make sure that Mono was robust, SourceGear designed a series of extensive tests that Mono would be put under, and the acceptance criteria for the work we did included running the tests for a 24 hour period of time on a single instance of the virtual machine. Needless to say, making the Mono VM robust enough to run these tests for 24 hours was not easy, and we ran into all sorts of low-level interesting features, memory leaks, race conditions and other assorted small problems that would not have shown under normal circumstances. We are very happy about this.

    In the meantime, while parts of the team were tracking down the elusive bugs in the runtime, Lluis took the time to implement the server side component of ASP.NET, so as part of the SourceGear effort, we also got our web services stack implement on the server, which was a nice plus.

    More on exceptions

    I was feeling that I should argue a bit more about exceptions, until I received a mail from Krzysztof Cwalina at Microsoft, he raises a good point about exceptions and the null return pattern: they do not allow an error to be propagated, nor details about the error.

    He is absolutely right, and my example with files was not a good one. I had in mind APIs that did not need to propagate a rich error or details about the condition. Krzysztof said:

    One problem with null is that you may get notified about the problem really far away from the point when the error occurred. Exception will be thrown right there at the point where the error occurs. The other problem is that null cannot tell you why the error occurred. Error codes have their own set of problems.

    Of course (as with every design) it's a tradeoff. In this case a tradeoff between better error reporting (fail fast, rich error message) and performance (and other things). In general, we err on the side of better reliability, clarity of errors, etc. when designing the Framework. We have several exceptions to the general rule in explicitly identified performance-sensitive APIs.

    IXmlSerializable explained

    Lluis the man behind the Mono implementation of Remoting and Xml Serializer explains on his latest blog entry how the undocumented IXmlSerializable interface works. If you ever wondered how you could have precise control over the Xml mapping in XmlSerializer, this is the interface used internally by the framework.

    Welcome Sebastien Pouliot and Duncan Mak!

    Sebastien, the man behind the Mono cryptographic infrastructure now has his own blog.

    Duncan also started his

    Posted on 01 Oct 2003


    Anders Hejlsberg

    by Miguel de Icaza

    In a recent interview Anders said:

    If you ask beginning programmers to write a calendar control, they often think to themselves, "Oh, I'm going to write the world's best calendar control! It's going to be polymorphic with respect to the kind of calendar. It will have displayers, and mungers, and this, that, and the other." They need to ship a calendar application in two months. They put all this infrastructure into place in the control, and then spend two days writing a crappy calendar application on top of it. They'll think, "In the next version of the application, I'm going to do so much more."

    Once they start thinking about how they're actually going to implement all of these other concretizations of their abstract design, however, it turns out that their design is completely wrong. And now they've painted themself into a corner, and they have to throw the whole thing out. I have seen that over and over. I'm a strong believer in being minimalistic. Unless you actually are going to solve the general problem, don't try and put in place a framework for solving a specific one, because you don't know what that framework should look like. [Artima's interview with Anders]

    I like Anders' position regarding Checked Exceptions, contrast this with James Gosling's statement, which I believe does paint a broken picture:

    One of the traditional things to screw up in C code is opening a data file to read. It's semi-traditional in the C world to not check the return code, because you just know the file is there, right? So you just open the file and you read it. But someday months from now when your program is in deployment, some system administrator reconfigures files, and the file ends up in the wrong place. Your program goes to open the file. It's not there, and the open call returns you an error code that you never check. You take this file descriptor and slap it into your file descriptor variable. The value happens to be -1, which isn't very useful as a file descriptor, but it's still an integer, right? So you're still happily calling reads. And as far as you can tell, the world is all rosy, except the data just isn't there. [Artima's interview with James Gosling]

    This is in fact the source of many security problems. One of the first security code audits I witnessed was by a volunteer that reviewed my first setuid application that I shipped as part of the Midnight Commander (the software only shipped after the security audit). A 200 line program got back 700 lines worth of comments, many of them related to not checking error conditions from trivial system calls like `close()'.

    But modern C APIs do not use int return codes, in fact not even the C standard library uses those: that is only the low-level Unix C API that has this feature. The standard C library API returns a FILE * object, and for instance, most of Gtk+ and Gnome APIs return objects (in the form of a pointer to an object).

    The beauty of returning a pointer to an object, is that you can return NULL as your standard error return value, and if the value mattered, you will most likely take the necessary steps to check its return value, or they application will just crash the moment you try to use it.

    This could be applied to the .NET and Java APIs to reduce the amount of required try/catchs. For example, the File.IO.OpenRead method could be (shown here is the artist's representation):

    	public static FileStream OpenRead (string file)
    	{
    		int fd = open (file);
    		
    		if (f == -1)
    			return null;
    		return new FileStreamFromFD (f);
    	}

    Which makes null a valid return value. If you fail to check for the return value, you would get a nice NullReferenceException, but you would allow the expensive creation of an exception object, and the ugly try/catch block in the call site.

    Obviously we can not change the existing APIs, but we could encourage developers to minimize their use of exceptions. In my limited personal experience with software design, when I have faced applications with tons of Exceptions it was extremely hard to keep up with them. A rewrite of the software to avoid exceptions and use the more sane API paid for.

    More Mono Bloggers

    I wrote about Ben previously, he now has a blog which we are hosting for him at Ximian.

    Posted on 29 Sep 2003


    Assembling life

    by Miguel de Icaza

    Laura and myself have been shopping for various items for our new appartment. Once we had chosen the rug, everything fell into place, and in two hours we swiftly sorted out our color differences. The rug really ties the room together.

    New Mono Bloggers

    Martin Baulig now has a blog. He talks mostly about his work on the C# compiler. He is not lucky enough to be using my LameBlog technology.

    Posted on 27 Sep 2003


    Madrid

    by Miguel de Icaza

    Just coming back from the HispaLinux congress in Madrid. This was a very short trip: only two days in Madrid, traveled all this and did not have enough time to eat enough ham.

    Update on Extremadura from Jose: they are 100,000 Linux desktop machines in the administration and 276 machines on public centers. The public machines are fewer than the 1,500 from the Telecentros, but still a healthy number.

    Try Ximian Desktop 2

    The fine folks in Spain have a Live CD with Ximian Desktop 2. You can try Ximian Desktop without installing Linux on your machine, the whole system runs from a CD.

    OpenOffice gets .NET support

    Federico pointed me to the announcement of OpenOffice's support for C# and the CLI, it is here:

    We are pleased to provide a preview of the CLI-UNO language binding. It gives developers the possibility to write client programs for OpenOffice.org, as well as stand-alone UNO applications, with CLI languages, such as C# and VB.NET.

    The details about the language binding are here: http://udk.openoffice.org/cli/cli-uno.html.

    PDC

    The Microsoft PDC program is getting more and more interesting. As a sneak preview of the table of contents of a System.Xml/System.Data based book shows. Dare also sent me a link to the ASP.NET changes. Fantastic!

    Posted on 24 Sep 2003


    Lluis has a blog

    by Miguel de Icaza

    Lluis, the developer behind Mono's XML Serialization, a large part of Remoting and our SOAP web services stack has started a blog. His first post is about the his GenXS tool used to create custom XmlSerializers (a feature not found on Microsoft's edition, but that we use in a few places).

    Posted on 20 Sep 2003


    Binary XML.

    by Miguel de Icaza

    Dare linked to Omri's posting about why binary serialization for XML is a bad idea.

    I have not really formed an opinion, and am definitely not an expert on the matter of binary serialization for XML, but I believe that Omri's position is an incorrect one. Omri's thesis is that there are multiple things that you might want to opmize for: size, parsing speed and overhead for generating the data and that it is not possible to define a file format that satisfies all of those different needs.

    This is not new, and this happens with everything we build today: as software developers we constantly have to balance multiple needs: maintainability, performance, extensibility, perfection, scalability, configurability, usability. The job of an architect is precisely to find a good balance taking input from multiple sources. We are going to make mistakes, every step of the way, but the sooner we start making those mistakes, the earlier we will be able to collect real data on the issues at hand.

    The other problem with Omri's thesis is that it misses one bit: who are those likely to benefit from a binary format? They probably will fall in two camps: those who want smaller chunks of data transfered, and those who want faster encoding/decoding of the infoset not the average XML user.

    We do not need to satisfy everyone, just a large percentage of the user base. The others can feel free to define a different format, or ignore this solution altogether or build on top of this in the future.

    For instance TCP/IP makes no guarantees on quality of service despite the fact that many people have valid and important uses for it. Still, it did serve a large community of people and what is even more interesting: clever people found ways to work with these limitations and do a reasonable job given the foundation.

    Posted on 16 Sep 2003


    XSLT in Mono: the story of a young hacker.

    by Miguel de Icaza

    Some time ago, I spoke to Daniel Veillard the author of Libxslt and Libxml. When Mono started, we wanted to reuse as code as possible, and those two libraries made a lot of sense to reuse.

    The problem is that .NET Framework defines three mechanism for handling Xml: the Dom model, the pull parser, and the path navigator (a DOM-like interface). It was not possible for us to just use libxml to implement our Xml needs, it would have added too much overhead, and would have been an ugly hack.

    .NET contains two pretty clever tricks: the pull parser (XmlTextReader and XmlTextWriter) and the path navigator, which exposes a cursor-based navigation interface. The beauty of the interface is that you can wrap any kind of data source and expose it to the XML subsystem with this interface. So you can wrap a database, a comma separated value file, a file system, anything you can think of, and dynamically provide the content. Interesting because it is possible to use XPath queries on top of it, or apply xslt transformations. XSLT in .NET is built completely on top of the XPathNavigator.

    For a long time, in Mono we used libxslt: we would dump all the data from an XmlDocument, or a XPathNavigator into a temporary file, and then use libxslt to do the heavy lifting.

    This approach had various problems: libxslt was not designed to be thread safe (a requirement for us: on ASP.NET we need to be able to do xslt transformations from multiple threads), so we had to add big locks around the xslt invocations. Also, it was not possible to create a context for the transformation, so extension functions were global to all the transformations. The only solution was to shutdown and restart the libxslt engine every time we did a transformation, not really optimal.

    Fixing the problem was not going to be easy. Libxslt is a very large piece of code, and Daniel estimated that re-implementing it would take about a year. That is why I discouraged 16-year old Mono developer Ben Maurer from working on this project. He was not really ready to spend a year of hairy coding, and would likely not be able to do something even as fast as Libxslt.

    Ben ignored my advise and went on to implement a managed implementation of XSLT. The idea was to remove the libxsl dependency: remove the temporary files, fix the extension object problem, and the locks.

    In the course of a couple of weeks this summer, Ben had the basics of XSLT done, and he recruited the help of Atsushi to help with problems and missing features in the XML core, and Piers to fix and improve our XPath implementation.

    The three hacker team in less than a month did a tremendous amount of progress implementation was able to be used instead of Libxslt for Monodoc.

    The surprising news this week is that Ben has made Mono's managed XSLT faster than the C-based libxslt. Faster on a number of the XSLTMark tests and on other practical stylesheets (including the stylesheet used in Monodoc). The performance can be attributed partially to some performance improvements Atsushi did to our handling of XPathDocuments. The other part was the tireless work of Ben in doing performance tuning in our implementation: from profile-driven changes like removing calls to foreach on ArrayLists with loops to architectural changes. The biggest improvement was adding an interface for resolving functions/variables at compile time.

    Atsushi mentioned that lots of the performance improvements came from Ben reusing concepts from SAXON. SAXON is the fastest xslt implementation out there, and its written in Java.

    Congratulations to all the Mono XML crazy hackers for achieving this fantastic progress in so little time.

    Oberon in Mono

    The Mono IL assembler has finally matured to the point where it can be used to bootstrap the Oberon IL compiler on Mono. The details are in Jackson's Blog.

    Of course, some of you might want to laugh because we got generics support before Oberon worked ;-)

    Go Jackson!

    Jakarta and Mono

    Anne talks about our recent discussion. She wants to reuse the Mono CLI, and build on top of it patent-free technologies along the lines of the technologies done in the past for Java (Cocoon, Struts).

    She is absolutely right about the need to build a parallel universe of technologies. In Mono we have already started this process:

    Posted on 14 Sep 2003


    P/Invoke limitations

    by Miguel de Icaza

    Jonathan Pryor has written a tutorial about Marshaling on Mono and the .NET Framework. Hopefully this will become a chapter on the Mono Handbook

    One of the points discussed on the document is about string marshalling in .NET and the limitation imposed by the current specification. Sadly the ECMA specification (and .NET) only cover Ansi and Unicode as encodings for strings. Both are also underspecified, they are both `platform independent encodings'.

    This is a problem, because there is no such thing as `Unicode encoding'. There are specific ways of encoding: utf-8, utf-16, ucs-2, ucs-4 and others. Which one are we talking about.

    The issue we face on Unix and Windows is that there are plenty of libraries that have very specific requirements. We first ran into this problem with the Python bindings to .NET. Python can be compiled to either use utf-8 or ucs-4 API entry points.

    Another example is Gtk#. Currently it generates bindings like this:

    [DllImport("libgtk-win32-2.0-0.dll")]
    static extern void gtk_label_set_text(IntPtr raw, string str);
    
    public string Text { 
    	set {
    		gtk_label_set_text(Handle, value);
    	}
    }		
    	

    The above uses the default "Ansi" encoding, which we have conveniently mapped in Mono to do a conversion from Unicode to utf-8 (Gtk+ uses utf-8 as input). But this is not entirely correct. The trouble is that to be entirely correct we will have to generate code like this:

    [DllImport("libgtk-win32-2.0-0.dll")]
    static extern void gtk_label_set_text(IntPtr raw, IntPtr str);
    
    public string Text { 
    	set {
    		// Marshaller is a helper class that every developer
    		// has to roll on its own.
                    IntPtr raw_str = Marshaller.ConvertToUTF8 (value);
    		gtk_label_set_text(Handle, raw_str);
    		Marshaller.PtrToStringGFree (raw_str);
    	}
    }		
    	

    This is not a problem for Gtk# which is generating the bindings for us, just a bit more of annoyance, but it is a problem for newcomers to .NET who will find the above just too complicated for average use. Not only that, but the other problem is that most of the time the app appears to work. It is only under stress conditions found during deployment (or testing if you are lucky) that the developer will be bit by this missing functionality.

    We identified a couple of unused bits on the encoding for this attribute in the ECMA spec, and suggested that they get used for the most populate encodings (utf-8 and ucs-2 I believe), but we were turned down by Microsoft. The current position is to use a platform specific attribute to encode this. This has problems, because we can not be compatible with .NET unless we all adopt the same scheme. The other problem is that by using a real custom attribute to do this, as opposed to a synthesized one (the attribute being turned into a bit value) is that we will loose performance.

    Anyways, too bad that Microsoft is not interested in fixing this platform usability issue, specially since they have been focusing on fixing things that would force programmers to write more code. This seems like one of those things.

    Posted on 13 Sep 2003


    Barcelona

    by Miguel de Icaza

    Plenty of us the Mono developers and Linux developer got together during the Brainshare event in Barcelona. Lluis (the man behind the implementation of Mono's Remoting and Mono's WebServices support) lives in Barcelona, and Gonzalo (Mono's ASP.NET developer) was coming back from vacation from Istambul. It was the perfect chance to discuss Mono.

    Juantom�s (HispaLinux's president) joined us on Monday night, and Man, Andreu and Osorio showed up on Tuesday for a few hours for dinner. We had a great time with both our new co-workers are Novell and the Spanish Linux crowd in Barcelona.

    Jordi Mas who has been working on Abiword and on the catalonian support for various free software projects is developing an interest for Mono. He has plenty of Win32 experience, and he is interested in helping us move Mono's Windows.Forms support forward. He advocates following a single path: Wine-based Windows.Forms and customizations to Wine to make it track the Gtk+ theme and dropping our support for the Gtk+ based toolkit.

    Spent a fair amount of time with Nat: mostly at night when tracking the best restaurants that served jam�n and the bars afterwards. Nat had a little accident with his new cell phone.

    Novell

    One of the benefits of joining Novell for us was that our products have a much bigger audience now. This is due to the fantastic channel that Novell has with enterprises. During the conference we met many sales and solution engineers of Novell, many of them already with contacts of people interested in Linux-based solutions (both the Novell Linux software stack for servers as well as the desktop side).

    Plenty of people at the confere are considering Linux on the desktop, a recurrent topic with people we met on the hallways was large scale enterprise deployments.

    XD2 has the right mix of components to make the Linux Desktop on enterprises a reality:

    • GNOME 2.4 has been making tremendous progress in terms of accessibility, ease-of-use, simplicity, API stability and the Gnome Foundation who has helped focus the development on these important projects.
    • OpenOffice is maturing, and we are commited to keep improving the common code base on which OpenOffice is built to help people migrate and reduce their costs of deployment.
    • Mozilla: a fantastic standards compliant browser. My favorite feature today: tabbed browsing, the smartbar plugin.
    • Red Carpet: A recurrent theme we hear about people doing large desktop deployments is that they need a way of managing these machines. Red Carpet does a lot today, and the management roadmap is at the center of the development effort right now.
    • Evolution: Mail, calendar and addressbook, with groupware collaboration.

    Nat did one of the most amazing presentations I have ever seen on why the above software stack is the right one for Linux on the desktop.

    We are collaborating with other teams inside Novell to support the Novell software stack: Groupwise, i-Folder, e-Directory and Liberty Aliance authentication

    More Gnome Deployments

    In Andaluc�a, 20,000 Gnome desktops were just launched. I have to take a trip there to witness this again. 20,000 Gnome-based machines on 1,800 schools in Andalucia. I have to go see this. Congrats Gnome folks!

    The Telecentros experience in Sao Paolo was very interesting, because the site I went to was one of the centros equipped with accessibility hardware.

    Posted on 11 Sep 2003


    Barcelona

    by Miguel de Icaza

    Yesterday I arrived to Barcelona for the Novell Brainshare event.

    Got together with Chema, Lluis and Nat. Went relatively early back to the hotel, and discovered that we had wireless access, so we hung around until 4am. Nat's humor quality is directly proportional to how long he has gone without sleeping.

    Monodoc editing

    In our effort to improve the documentation in Mono we have been working on a GUI tool to browse all kinds of documentation (Monodoc), but we need more people documenting our APIs.

    To address this problem, we are making it really simple for people to contribute documentation: we have made our documentation editable. When you are viewing a stub, you have the choice to edit it; For example:

    Summary
            To be added [Edit]

    I recently added a preview viewer for it, for example here we are editing some documentation:

    All those changes are saved into a changeset, that the contributor can submit when he is ready. We will submit those using Mono's web services infrastructure. When the changes are reviewed and approved, we commit those to CVS, and they appear on the next release of the code.

    This same infrastructure will help for our collaborative annotations for the documentation. This is important to have people share their personal experiences and samples for any given API.

    Posted on 07 Sep 2003


    If you read one web page this month

    by Miguel de Icaza

    What I really like about blogs is that sometimes people sit down, and write little essays reflecting on their experience. My personal choice is from the craftsmen: because they tell you tales and lesson from the trenches.

    I can not make justice to the beauty of Eric's latest entry: F5.

    Posted on 05 Sep 2003


    The history of SWT and Swing

    by Miguel de Icaza

    While doing my daily reading of the SWT-port-to-C# reading this morning, found this post that describes the torrid story of Swing and SWT.

    Update: That document contains various errors on the side of the origins of Swing. For more details see this thread.

    Amy describes her experiences with the iPod and a native user interface here. Very good point about using native interfaces. Firebird already has a couple of XUL-based clients that let the user browse Amazon more comfortably than using the regular Web interface.

    Al Franken's book

    I have been reading Al Franken's Lies book. It has been entertaining for the past couple of days, but it turned out really interesting on the chapter on the Clinton efforts on the war against terror and how the Bush administration dropped the ball on that (chapter 15, but it shines on chapter 16).

    I tried writting a summary, but its impossible to make justice to those two chapters. It is particularly interesting, because Franken got a team of Harvard graduates from the Kennedy school to fact-check everything he wrote.

    Anyways: mandatory reading if you stop by a book store.

    Cant wait

    To see The Band on the Runtime perform

    Posted on 04 Sep 2003


    My new T40 and Linux.

    by Miguel de Icaza

    I am using a new IBM T40 now as my main computer. I was about to go for the X31 which is lighter and smaller, but I have gotten used to the large resolution from my old T30.

    Michael Zucchi provided me with a few links to people running Linux on the T40. Most hardware is supported on the T40, but the speed of the hard drive left much to be desired. The new T40 felt like it could not handle the load the T30 did. Any IO would make the system very slow.

    After dropping by the #kernel channel on LinuxNet, I was told to upgrade my Kernel to the latest RH update. So far the speed of my hard drive went from 2.5 MB/second to 25 Mb/second. An e-mail expunge that used to take about two minutes seconds, now takes 13 seconds.

    Posted on 03 Sep 2003


    The PDC

    by Miguel de Icaza

    I am going to the PDC, hoping to listen to Don's new single.

    Gonzalo and Lluis from the Mono team are coming as well.

    Also found the PDC Bloggers site.

    Moving day

    A completely unproductive day. I just moved into my new apartment, where I will be Nat's neighbor.

    Verizon cancelled my DSL during the move, and am using a kind soul's wireless access.

    Posted on 02 Sep 2003


    The largest Gnome deployment: The Sao Paulo Telecentros

    by Miguel de Icaza

    The Sao Paulo Telecentros provide service to 150,000 users. Each Telecentro is running a small cluster of computers: a high-end server and 20 diskless workstations (Pentium class machines).

    The diskless Linux workstations are hooked up to the server with a 100mb network, and each workstation boots in 20 to 30 seconds (this is from memory). Very fast. All applications run on a pretty big server, and OpenOffice is pre-loaded, so it starts in no time.

    Each Telecentro offers service to about 3,000 users; People schedule time on the workstations in slots of half an hour or an hour.

    They have written lots of tutorials in Portuguese in each of the Telecentros and cover the basics: the Gnome desktop, Star Writer, Star Calc, Galeon and Gnome Paint.

    Today there are 72 telecentros open for a total of 107 planned. The cost of setting up a telecentro is 10,000 dollars.

    During my visit to the Telecentro's headquarters, I heard a few new arguments I had not heard before about the advantages of free software:

    • Cost-wise: They were able to deploy 80 tele-centros instead of 20.
    • The government initiative of Digital-inclusion means that users that use the software setups today can take the software home and replicate *the exact* functionality.
    • Number of applications: There are 1,700 software programs available as part of the Debian Linux distribution which are both free and legal for the users to copy.

    Posted on 29 Aug 2003


    Generics, generics

    by Miguel de Icaza

    Martin reports: * baulig just compiled his first "Hello Generic World" :-)

    The Mono C# compiler today compiled it first generics program (see the various generic tests on CVS). It is still lacking support for method overloading. All the goodies are in mcs/gmcs (the special tree for our generics compiler).

    Paolo had previously added the Generics support to our class libraries (System.Reflection and System.Reflection.Emit) and added the code to JIT generics code. This was helped enormously by Jackson's earlier work on the IL Assembler which was already generics aware.

    In .NET 2.0, Generics are part of the instruction set, and the metadata in an executable. Some of the advantages of this approach vs the C++ mechanism of having the templates defines in .h files is that we keep getting the performance increase from having the generics information "pre-compiled". Those of us with a Turbo Pascal background, cant help but think `These are like the Turbo Pascal Units (TPUs): they were just so much better than C libraries and header files'.

    Its surprising how a good idea like TPUs did not take over the industry, and instead the C libraries and headers was kept on use for so long. GC was also around a long time ago, and it is surprising that today C and C++ are still the standard for software production.

    Monodoc progres

    Even more progress on Monodoc. Ben now got an `error messages provider', and we have included all the errors mcs produces (all 311 of them) with sample files in the documentation. Mandatory screenshot

    Posted on 28 Aug 2003


    Mono Developments

    by Miguel de Icaza

    Zoltan Varga has removed the big locks we had on the Mono runtime, and has replaced them with fine-grained locks using a lattice to describe the order in which the locks are to be obtained to avoid dead-lock situations. This was part of the thread safety audit on the Mono runtime engine.

    Alp improved the UI of Monodoc, so it now looks a lot prettier:

    Other changes in Monodoc during the past week include the display of extra information for matches, in this case, I selected the "ToString" method from the incremental search window, and a list of matches is displayed:

    Johannes today contributed a patch to Mono's Windows.Forms that makes it track the Gtk theme colors; His new patch will also pick the default font settings. You can see it here.

    Gonzalo in the meantime made me very happy with the changes to XSP (our ASP.NET server) that allow for multiple applications to be hosted on a single server. This finally will let me run all my web apps and web services under Apache.

    The SharpWT team has a full C#-based version of SWT ready to run, and they have made tremendous progress on the toolkit in the last two weeks (working both on Windows and on Gtk+).

    The Mono Brazil site is Up. It is TWiki based, but the content is there now.

    Hip stuff

    Today's hip thing is of course the text-mode Gtk+. I love this hack, and am puzzled by their effort to build a Midnight Commander-like program using it, but the pages are in Czech.

    Chris Brumme's last post on his blog is also fascinating: many internal details about the CLR are exposed, but also, I am still quite surprised by the layering done by NT on their low-level loading interfaces, it seems too complicated when you contrast it with ELF file loading (seems to me like a backwards compatibility feature). Mono happily can avoid a lot of this, but for a price: they are today executing C++ code out of the box, we cant yet.

    Michael Meeks is also showing off what seems to the uninformed viewer like a Gtk-like layout system for Open Office.

    Guadec, and Linux at Work?

    There are various cities in Europe that want to host the Guadec, and we can only host it in one place. I was thinking that maybe after Guadec, or before Guadec, the tutorial speakers for Guadec could tour Europe for a week or two, delivering tutorials on the various subjects: not really a tour aimed at Gnome developers, but aimed at users and developers interested in using the Gnome platform. Very much like what the Linux at Work folks do.

    That has the advantage of getting Gnome better known in various places in Europe, but focusing our Guadec effort in a single city. What do you think? Mail me your thoughts.

    Don: what is that cell phone of yours?

    Don is going around with an absolutely hip SmartPhone running the .NET Framework, which am in love with. But after using all my internet browsing powers, I have failed to locate the model and provider for it. It seems to be available only in Europe.

    If you run into Don, get him to mail me the information ;-)

    Sao Paolo

    Maria Laura and myself arrived to Sao Paolo. Tomorrow we will be visiting the Joao at the telecentros in the Favelas where they are using Gnome, Debian and Linux to operate those centers.

    Posted on 27 Aug 2003


    Mono from Brazil

    by Miguel de Icaza

    During the free softwaremeeting in Brasilia, we launched the Mono Brazil effort: a community of Brazilian hackers is creating a Portuguese community around Mono. This is an important step for the local community, just like the creation of Mono Hispano was.

    In the meantime in Mono-land things keep moving, I logged into IRC recently, only to be bombarded with news about the progress in Mono-land: Windows.Forms widget rendering was re-structured to better match the rendering model. Plenty of bug fixes in this area, so you might want to get your mono-wine packages from the Mono site.

    Duncan also contributed our Cairo bindings to System.Drawing (we previously were using Xr, and we have finally migrated to the new API). For those who want to use Cairo directly, we do provide a nice Cairo binding as well without using System.Drawing.

    Atsushi Enomoto continues his work on the XML Schema validation. After watching the XML editor demo after Don's presentation, I am quite interested in seeing more smart XML editors based on this code. Although Conglomerate looks a lot nicer, it is very fragile (due to its C heritage ;-) and whatever is the language use to describe the graphical rendering is not simple.

    Microsoft instead chose a different approach: instead of making a mapping from the XML schema to describe the rendering using the 2 or 3 level system used by Conglomerate, they have pluggable renderers into Visual Studio. So it is possible to provide custom editors or renderers for SVG files or well-known XML configuration files.

    Lluis has got all the SourceGear regression tests running with Mono now, so I am sure Eric will be very pleased to see his product running on Linux (and soon on the Mac, as Paolo has been busily hacking on it)

    Vladimir has been busily implementing a .NET version of the Internet Communications Engine: the new hip OO-RPC protocol in the world. Several of the people involved with CORBA contributed to the design of this vastly simplified and high-performance RPC system.

    Gonzalo has got XSP to support multiple-applications. This means one thing: I am migrating my blog finally to ASP.NET, running side-by-side with the ASP.NET-based online Mono docs

    Martin and Zoltan continue their bug hunting on the compiler, class libraries and runtime. Martin's debugger is also becoming more and more stable, but he wont get to work on it too much, as C# Generics await him ;-)

    Yuri Astrakhan discovered Open Internationalization effort to create a data-base of all the things localizable/internationalizable that a framework needs to provide. Dick has been working on this based on some empty skeletons we created, but having real data files to work with will make our effort more interesting

    Piers again impressed everyone with his Javascript skills: he implemented a lighter, more portable, less buggy Javascript dynamic tree, which can be seen on the mono docs site. Ben in the meantime helped me fix a few issues in Monodoc, in particular now we get a better hint on multiple matches for the same entry on the index, and he also implemented method grouping.

    Porto Alegre

    Been spending most of my time visiting friends and family of Laura in Porto Alegre. Also we have visited Marcelo and Suzana a few times at their place.

    Posted on 25 Aug 2003


    Married

    by Miguel de Icaza

    I got married at 5:30pm in Porto Alegre to Maria Laura.

    Posted on 22 Aug 2003


    Going to Brazil

    by Miguel de Icaza

    Today am flying to Brazil. First stop will be Brasilia, for the Congress-sponsored event on Free Software. Then am off to Porto Alegre to marry Maria Laura

    Posted on 17 Aug 2003


    New RSS feed

    by Miguel de Icaza

    After months of keeping on my TODO list `write a blog system', I gave up and wrote a small C# program to pull the existing messy files massage them and upload them to the site. Part of the problem is that I need something that will work in disconnected mode and let me use Emacs to compose these entries.

    I also gave up waiting for BlogX to be released: I like it, but the GotDotNet workspaces software is just horrible to use. Even with Windows its horrible.

    Microsoft still has some things to learn from the existing open source tools.

    The next step is to write my own ASP.NET-based weblog system, but I have to overcome the the feeling of guilt everytime am not working on the core of Mono.

    Posted on 16 Aug 2003


    My problems with C# and .NET

    by Miguel de Icaza

    I love C# very much, and the new extensions that are being added to C# will improve the language in many areas:

    • Iterators: they simplify authoring the IEnumerable/IEnumerator interfaces in a class. Very nice.
    • Anonymous methods: reduce the glue required for small use cases. For large cases, you dont want to use them anyways, as they make your code look ugly (remember: if a function does not fit on the screen, its probably buggy).

    Those will reduce the amount of coding required in some scenarios, but they do not address some of the most common problems that programmers face: strings and regular expressions.

    .NET ships with a very powerful regex engine. The engine is so powerful, that it is possible to use it to implement very advanced regexp-based applications. Its as easy to use as the POSIX regex API is: slightly more verbose due to its OO heritage, but in general, very similar.

    The problem is that there is no simple way of using this API from a language like C#: the developer is stuck with this low-level API. Perl and Python both bundle powerful regular expression engines that are bound in a fairly usable way in the language.

    Its a shame that C# does not have any simple way, or a nice syntactic sugar to manipulate this common idiom.

    Strings manipulation in C# falls on the same category: some work was done, but it was not really completed. Adding a few overloads to the class libraries would make C# a sweet language for string processing.

    A two parameter indexer: string this [int start, int end] would clear a lot of the confussion with Substring arguments (a previous log entry has more details).

    Although we could add this to Mono, the result would not be portable to .NET.

    Finally, there is the Stream problem. Reading a file in .NET involves two steps: opening the stream, and then creating a streamreader to read from it. The code looks a bit like this:

    	Stream st = File.OpenRead ("notes.txt");
    	StreamReader re = new StreamReader (st);
            string line;
    			
    	while ((line = re.ReadLine ()) != null)
    		Console.WriteLine (line);
    

    Wouldn't it be nicer, if you could just do:

    	string line;
    	while ((line = File.OpenRead ("notes.txt")) != null){
    		Console.WriteLine (line);
    	}
    

    The above could be easily implemented by having the FileStream implement IEnumerator as Guido does in Python.

    Posted on 15 Aug 2003


    Mono 0.26

    by Miguel de Icaza

    A new version of Mono has hit the streets. This version is obviously the best Mono release ever. A roadmap to Mono 1.0 is also being prepared as we speak, for the joy of all the Mono users.

    Duncan surprised me on Sunday with a C# Cairo binding. This was fast, and am really glad to see it happen so quickly.

    Posted on 14 Aug 2003


    Don Box in town.

    by Miguel de Icaza

    Duncan and myself left the office early today to attend Don's keynote at the XML web services conference.

    It was good to see Don, despite having taking a red eye the day before, he did an outstanding presentation on web services and showed some of the new features in C#.

    Posted on 13 Aug 2003


    Novell

    by Miguel de Icaza

    Went to Provo today to do a small presentation about Mono in an open session to Novell engineers. It went pretty well, and I also got to talk with various developers about Novell's existing product line.

    Of particular interest are iFolder and NetMail

    Posted on 12 Aug 2003


    New apartment

    by Miguel de Icaza

    I signed my lease for my new apartment, which will be just a few blocks away from my current place. Nat will be my neighbor.

    Posted on 10 Aug 2003


    New Chapter

    by Miguel de Icaza

    A fresh new chapter begins.

    More updates at Nat's site

    Two fantastic movies this weekend. I just finished watching Was tun, wenn's brennt? which Laura recommended. Yesterday Alex, Nat and myself went to see L'Auberge Espagnole.

    Maria Laura in Mexico:

    Posted on 04 Aug 2003


    VMs

    by Miguel de Icaza

    Guido recently quoted a conversation we had about Parrot. I said to him that the Parrot VM design was based on ideology (Guido quoted me as saying religion ;-).

    One of my favorite books is Computer Architecture: A quantitative approach.

    The parrot design is based on ideology because some of the core design considerations are just that: `real machine use registers, hence register-based intermediate code is faster'. An ideology-based design is one where the design decisions are driven by punch lines and not by a careful and quantitative study of the problem at hand.

    Mono implements the .NET virtual execution system; This execution system uses a stack-based instruction set to transport code. Mono never actually sees the stack operations, because we treat the stack-based operations by their name: a serialization format for a tree representation of the original code.

    So for example, if you have an operation like:

    		a = b + c;
    

    The code can be thought of as:

    A possible serialization of this tree is easily expressed by a lisp-like expression:

    	(assign a (add b c))
    

    Another possible serialization is using bytecodes, for a stack machine

    :
    	ldloc b
    	ldloc c
    	add
    	stloc a
    

    The above set of stack instructions can be easily decoded back into its original form (see drawing above). This is what the Mono JIT does: it transforms its input CIL bytecodes into various trees like this (we call these the forest of trees):

    (stind.i4 regoffset[0xfffffff8(%ebp)] (add (ldind.i4 regoffset[0xfffffff4(%ebp)]) 
    				      (ldind.i4 regoffset[0xfffffffc(%ebp)])))
    

    The above if the debugging output that renders our C-based trees. We then use a code generator generator to transform the high-level operations (not listed in this example) into a list of low-level instructions:

            1  loadi4_membase R9 <- %ebp
            2  loadi4_membase R10 <- %ebp
            3  add R8 <- R9 R10 clobbers: 1
            4  move %eax <- R8
    

    Depending on the optimizations turned on, there might be other steps involved, the end result is:

    	mov    0x8(%ebp),%eax
    	mov    0xc(%ebp),%ecx
    	add    %ecx,%eax
    

    (Actually, I had to trick the JIT compiler into doing this, because dead-code elimination and inlining in Mono eliminate redundant code).

    Scripting languages

    Now, am interested in this debate, because I think that Mono and the .NET VM are ideal virtual machines for scripting languages. Since the .NET folks have done a fair ammount of work into the interop issues (The Common Language Specification) and it is a fairly advance virtual machine, my interest is making Mono a good host for those languages.

    It has been said `.NET works great for static languages, but not for scripting'. Which is not true; VB.NET and JScript are both dynamic languages that happen to work just fine on the .NET Framework. And we are convinced that the virtual machine can be improved.

    The main issue we have today with Mono and scripting languages is that nobody has done a quantitatie study of what are the performance problems of running a dynamic language in the .NET/Mono CLR: Without an attempt to have a native compiler for the platform, and studying the problems, it is not possible to solve them.

    In one particular case (Lisp), we know that implementors will likely want to structure their code (or their generated code) like this:

    class Cell {
    	Atom Head;
    	Cell tail;
    }
    
    Method ()
    {
    	if (object is Cell){
    		...
    	} if (object is Atom){
    		...
    	}
    }
    

    So what they need in this particular case is a fast implementation of the `is' operator (the `isinst' instruction). For this, we did a proposal

    Posted on 22 Jul 2003


    Back!

    by Miguel de Icaza

    Posted on 13 Jul 2003


    by Miguel de Icaza

    Lots of Mono improvements recently; We released version 0.25 recently, which included plenty of the updates to the runtime and class libraries that were required by our partnership with Source Gear to run their vault software on Linux.

    Still doing plenty of traveling, after the awesome GUADEC conference in Dublin, I visited Madrid fora couple of days, and then came to Mexico to do some paperwork. Will be flying to Oregon to the O'Reilly conference on July 8th

    Will be on Mexico this weekend, and I get to vote (por the PRD of course)

    Posted on 02 Jul 2003


    by Miguel de Icaza

    Miggy went to Brazil, met girl, fell in love, got engaged.

    Pictures are here, here, here and here.

    Posted on 12 Jun 2003


    by Miguel de Icaza

    Data Loss

    My T30 hard drive died today with all of my information. If you know of a good data recovery service that deals with Linux file systems, please let me know ([email protected]).

    Now I have an excuse for not replying to pending mail.

    Update: I did recover all my data from a company that does disk drive recovery. I was fortunate enough that only the beginning of the hard drive got scratched, and my Linux data partition was not there. Now a long and painful process of pulling the data back begins.

    Posted on 25 Apr 2003


    by Miguel de Icaza

    Generators Zen

    I got most of the iterators support on the Mono C# compiler working now, hopefully these will be checked in CVS as soon as I polish a few things. You can read a small tutorial about them here.

    I think that this has more potential than advertised.

    Basically, the iterators support in C# simplifies the implementation of methods that return IEnumerable and IEnumerator classes. Typically an implementor would have to create a helper class that would track the state of the enumerable class, and implement a number of methods: MoveNext, Reset, and GetCurrent. Implementing this state machine is not only boring, but also error prone.

    Implementing these patterns are so boring, that the average developer fights the system, and designs clever workarounds: From passing a delegate (a method pointer) to be called back, and have the enumerator work linearly; to construct an array with all the results, and returning this; or the worst, exposing the internals of their object. These solutions might work, but they are not available to the platform developers, as they have to provide the right framework for developers; This also means that average developers wont have their code integrate nicely with the underlying platform and interoperate nicely with others.

    The C# iterator support works around the problem. Now it is trivial to implement these enumeration interfaces. There is no excuse to not use the system pattern, as it is so simple to use. Lame sample follows:

    	IEnumerable CountToThree ()
    	{
    		print ("About to say one");
    		yield 1;
    		print ("About to say two");
    		yield 2;
    		print ("About to say three");
    		yield 3;
    	}
    

    When invoked, say from the foreach construct:

    	foreach (int value in CountToThree){
    		print (value);
    	}
    

    The message "About to say one" would be printed, then, the routine would return, and the value would be printed by the print in the foreach main loop. Then, when the next value is about to be retrieved, the execution will be resumed where it left, and the string "About to say two" would be printed, and the value 2 returned.

    Notice something: the values are not pre-computed ahead of time and returned: they are returned as they are consumed. This is implemented by a clever state machine and an internal class generated by the C# compiler.

    Now, today as I explained my excitement to Ettore on the yield keyword, I realized that it could have more uses outside the scope of implementing enumerator interfaces. Part of the beauty of the yield is that from the developer perspective, it suspends the execution of the method at that point, only to be resumed later on.

    This beauty is not obvious at first. It took quite some time for me to assimilate this. Lets repeat it again: the yield keyword suspends the execution of the routine, only to be resumed later. This is not only interesting, this is absolutely fabulous.

    What the designers of C# have done here, is that they have taken an annoying and error prone pattern and have made a language extension that effectively addresses a problem.

    But it seems like yield could be used for a lot more. In fact, over the years I have implemented plenty of state machines, in the presence of non-blocking operations. Non-blocking protocols handlers, parsers, and GUI applications. It starts to feel like a waste to have this functionality under-used.

    For example, an streaming XML parser looks like this:

    HandleToken (int token)
    {
    	switch (state){
    		case START:
    			if (match (token, "<")){
    				state = "<";
    			error ();
    		case "<":
    			if (match (token, identifier)){
    				state = IDENTIFIER;
    			error ();
    		case IDENTIFIER:
    			if (match (token, OPEN_QUOTES)){
    				state = QUOTE_HANDLING;
    			} if (match (token, ">"){
    				state = START;
    			}
    	}
    }
    

    It would be fascinating if this could be implemeted with yield:

    HandleToken (int token)
    {
    	open:
    	if (match (token, "<")){
    		yield;
    		if (match (token, identifier)){
    			yield;
    			if (match (token, OPEN_QUOTES)){
    				...
    			} if (match (token, ">")){
    				yield;
    				goto open; 	// you know you love it.
    			}
    		}
    	}
    }
    

    Ok, that is probably not the best example, as this is just the first time I have thought of this (Am sure the lisp, scheme, icon people have better examples of this). The one things missing here is how to resume the method, and how to provide any new parameters to it. Maybe a resume (method, args) would do the trick.

    But the same sort of patterns exist on GUI applications: for example consider the state handling of user input while doing region selection (or the other hundred states tracked by Gnumeric for example).

    Extending C# string support

    A few things I would like to see in C#, these do not even require changes to the language, but only to the String class:

    class String {
    	// 
    	// Returns the string STR replicated COUNT times.
    	//
    	static string operator * (String str, int count);
    
    	//
    	// Splits the string used the provided string
    	//
    	static string operator / (String str, String sep);
    	static string operator / (String str, char c);
    
    	//
    	// Extracts a range of characters, notice that String.Substring is annoying
    	//
    	static string this [int start, int end] 
    }
    
    string s = "Hello World;
    
    print (s [0, 4]);  	// prints "Hello"
    print (s [-2, 2]);	// prints "ld"
    print (s * 2);		// prints "Hello WorldHello World"
    string [] j = s / " ";  // returns {"Hello", "World"}
    

    Wikis

    Been fascinated about the Gtk# Wiki

    Posted on 22 Apr 2003


    by Miguel de Icaza

    After Zoltan got us some nice 20% of performance back in the compiler by providing the GC with object maps and having the compiler drop unused structures early on, I felt compelled to do some performance work myself. My results not as impressive as Zoltan, got us another 10% from using a negative type lookup (it was there, but not fully used) and another 5% from using the new namespace information (Paolo got us a new Mono method to fetch all the namespaces in a type).

    Also been fixing plenty of bugs in the compiler so Paolo wont complain when I look at C# 2.0 features. There is one bug that I have tried to fix four times now, and made some progress. I have patches to fix part of this, but not to gracefully handle some of the side effects.

    After doing pure bug fixing this weekend, I started the work on C# Iterators, a fascinating new addition to the language. Initially I got pretty scared at them, because I did not have any ideas on how to handle the iterator state. Now that I figured how trivial and simple it is, I started to implement it. This is going to be very nice to use.

    Posted on 21 Apr 2003


    by Miguel de Icaza

    Only two hospitals are functioning in Baghdad after all the looting and robbing after the city was "liberated". The only building that has been protected from looting was the Iraqi Ministry of Oil.

    But that is just a coincidence. In the meantime, the history of civilization, and the history of Iraq has been destroyed, set on fire. And the Bush administration is distracting people now with an increased set of verbal attacks on Syria.

    The era of dictatorship has ended in Iraq. The new century of idiocy reigns on the world.

    Posted on 15 Apr 2003


    by Miguel de Icaza

    A couple of interesting photographs from the fall of Baghdad.

    John Pilger on Blair's responsibility on war crimes:

    A BBC television producer, moments before he was wounded by an American fighter aircraft that killed 18 people with "friendly fire", spoke to his mother on a satellite phone. Holding the phone over his head so that she could hear the sound of the American planes overhead, he said: "Listen, that's the sound of freedom."

    OrbitaFM, my favorite mexican radio station is broadcasting on the Internet. Finally I can keep up.

    Today: Global March against the war: Occupation is not Liberation, for more details go to the Intenrational Answer site.

    I used to wait for Robert Fisk's coverage to reach the sites I track (CommonDreams, ZMag and Jornada), but with his daily coverage from Baghdad, covering the other side of the story, I have been tracking him directly on the Independent newspaper.

    The latest articles from Robert Fisk (which Duncan and I had the priviledge of listening to at MIT two months ago):

    Michael Moore's has an awesome letter on his web page. The best bits: his movie, his books, and his web site are getting more hits now than ever. His book (Stupid White Men) has jumped for the fourth time to the New York Times bestseller list (very unusual); His documentary Bowling for Columbine has been ordered more than Chicago;

    He looks over various cases of people who criticize the war, and finds that the media is not telling you the truth: there is no backlash against those who protest the war, but quite the opposite. But I guess that is what we get for consuming news from a single source.

    My new book from John Pilger, arrived this week. The first chapter talks about Indonesia and the dictatorship that was established there on the 60's (Guess who was behind sponsoring it?) and the mass killings of dissenters. I had heard the stories about East Timor, but never got into the details of what happened. Corporate greed, and just like in the case of Vietnam: the desire to control one of the most resource rich parts of the world (tin, oil, rubber, coal).

    The IMF and the World Bank appear once again as the stars of the show: sinking Indonesia into deep poverty, and promoting what can best be described as an enslaved society.

    Finished Greg Palast's new edition of `The Best Democracy Money Can Buy'. You should go to your library or bookstore, and read this book now. One of the few books that got Nat upset.

    I strongly recommend the two books above. Do not wait, just get them today (or come by my office to grab them)

    Today's miggy-economic advise to countries all over the world: keep the World Bank and the IMF loans away; Do not cave to pressure to change your laws in favor of foreign investment; Do not erode your civil rights, and civil liberties in favor of a unproven economic plans (do not forget to ask for references, because there is not a single good reference); Do not sign any free-trade agreements; Push for high tariffs if you want to survive; Provide state-sponsored social programs. (Hint: Chile does not count, they smartly cheated on the IMF/WorldBank)

    Posted on 12 Apr 2003


    by Miguel de Icaza

    Everybody is linking to this article, so am jumpint into the bandwagon. This is an article written before the war started.

    Quotes:

    One of the fundamental findings of cognitive science is that people think in terms of frames and metaphors -- conceptual structures like those we have been describing. The frames are in the synapses of our brains -- physically present in the form of neural circuitry. When the facts don't fit the frames, the frames are kept and the facts ignored.

    And:

    First, the anti-war movement, properly understood, is not just, or even primarily, a movement against the war. It is a movement against the overall direction that the Bush administration is moving in. Second, such a movement, to be effective, needs to say clearly what it is for, not just what it is against.

    Third, it must have a clearly articulated moral vision, with values rather than mere interests determining its political direction.

    As the war begins, we should look ahead to transforming the anti-war movement into a movement that powerfully articulates progressive values and changes the course of our nation to where those values take us. The war has begun a discussion about values. Let's continue it.

    Posted on 09 Apr 2003


    by Miguel de Icaza

    Robert Fisk reports from Baghdad, on the American/British invasion.

    Ali Ismail Abbas, 12, wounded during an airstrike according to hospital sources, lies in a hospital bed in Baghdad, April 6, 2003. Abbas was fast asleep when war shattered his life. A missile obliterated his home and most of his family, leaving him orphaned, badly burned and blowing off both his arms.

    More photos of the victims of the invasion.

    Posted on 08 Apr 2003


    by Miguel de Icaza

    Duncan, myself and 25,000 other people marched on Boston against War. We ran into Peter and Lizzi.

    300 new pictures of slogans, but I will spare the audience the download.

    I share Ettore's frustration. I have avoided watching/reading the minute-by-minute war analysis, which is just dehumanizing. On the other hand, I have kept up with the events by tracking Common Dreams as well as Robert Fisk's coverage from Bagdhad.

    C-Span had a debate about war with Daniel Ellsberg. He mentioned antiwar.com, I found Blogs Against War and found Raph's Other blog

    Posted on 31 Mar 2003


    by Miguel de Icaza

    Went with Ana to Paris for the weekend.

    Posted on 21 Mar 2003


    by Miguel de Icaza

    Hamburg, did the OpenOffice keynote.

    Posted on 20 Mar 2003


    by Miguel de Icaza

    Join the Global Vigil for Peace:

    Posted on 13 Mar 2003


    by Miguel de Icaza

    Helen Thomas has covered every president since JFK was not given the chance to ask a question in the recent Bush press conference. Details are here.

    Posted on 09 Mar 2003


    by Miguel de Icaza

    Laughed off stage: The following video from C-SPAN is amazing. It is worth listening to the whole thing, Ari is a professional question dodger. But check the video, and go to minute 28, and listen ;-)

    The video

    Also the American Embassador in Athens resigns to his post due to the administration push for war against Iraq.

    In the meantime, an interesting analysis of the new hatered being promoted in the US towards the French.

    Posted on 28 Feb 2003


    by Miguel de Icaza

    Russell Mokhiber on covering the White House. Russell writes the famous Ari and I column.

    The last bit of the article points something we did not know. When the mexican vote on the UN was discussed, a couple of news papers ran the story that the vote was being bought. The press reported what Ari says at the end. But they did not report the feedback following it. Read it, its fun.

    Posted on 27 Feb 2003


    by Miguel de Icaza

    Gnome 2

    I always have enjoyed comments and criticisms from Jamie Zawinski. His insight into this industry, and the communities of this industry are unique, and combined with his sense of humor, it makes for some of the best comments you are likely to read.

    Recently Jamie wrote some comments about how those of us in the open source world, and in particular gnome likes to rewrite software gratuitously. I happen to agree with him

    Today I upgraded my gnome installation to gnome 2.2. The application I use the most is the terminal. For a long time I had been using happily gnome-terminal which used Michael Zucchi's fast Zvt widget. The UI code was written mostly by me. This terminal had the advantage of being easy to customize and was fast (both at input and output. Keep this in mind). It supported dingus clicking, as well as mouse input, was an international terminal and I was happy.

    With Gnome 2, an effort was made to improve the user interface. The "terminal class" concept from gnome-terminal 1.0 was considered too complicated, so a new effort to rebuild gnome terminal from scratch was started and completed by Havoc. This terminal became the new gnome-terminal for gnome 2.0. During the rewriting process a number of features that people had requested were dropped (flags to control the behavior of "logging" the presence of the user: update utmp, wtmp, lastlog) so I promptly filed bug reports for it. Those bug reports were promptly closed, and marked as duplicate because more information was needed (the xterm man page had this). Eventually all this information got logged into another bug and I guess someday it will be implemented.

    Anyways, am a grown up man, and I can live with the defaults. If I need to tweak something, I figured `I have the source code'

    Today I upgraded to Gnome 2.2. This new version of Gnome includes a new gnome-terminal that drops support for Zvt and instead uses a new terminal widget called Vte. Vte is different from Zvt in that it uses more of the traditional Gimp/Gtk coding style and apparently will be easier to maintain. But the main difference is that Vte is not an xterm emulator, instead it is a terminal emulator that will emulate any terminal, given a terminfo definition for it. This is an interesting academic excercise, no doubt about this. I had my reservations about whether Vte's academic background was good enough as a terminal solution. As I still depend heavily on my terminal, and I still use Midnight Commander as my file manager a good terminal is important.

    You could arge argue that terminfo is not a complete definition of a terminal, but only the subset that was used for terminfo/curses, but lets not get these facts get in the way of innovation.

    Anyways, my first attempt at using vte with the mouse failed. Apparently events are sent for up to some number of columns, but not all. So it is useless if you want to click on the right pane of mc.

    To be fair, Vte lets you use any font on the system, and not only those that were monospaced fonts, which is nice.

    Later, I was faced with the slowness of the terminal. I have a P4 running at 1.8ghz. I turned off anti-aliasing (everyone told me to). But it still was slow, for instance if you have a window on top of it, and you drag it around, the widget takes a *long time* to repaint. I mean, significantly longer than OpenOffice or Mozilla take to repaint.

    Haven given up on coffee and Sawfish I figured I could also give up dragging windows around. There is really no need to drag windows around see note [1]. But it was still slow, very slow. Someone reported:

    fejj: lets put it this way
    fejj: nautilus 1.0 can render my home directory faster than vte can 
          render the output from `ls`
    fejj: in my home directory
    	

    For those of you non-Gnomites, Nautilus is the Gnome File Manager, and a few years ago, it had a reputation for being slow.

    It is also annoying that a compile will take 50% of the time on gcc, and the other 50% by your terminal process as it scrolls the window.

    I did not want to spend all day fixing gnome-terminal, so I ran `xterm'. There is enough a man can do and still get something done in the day.

    Well, turns out that the default xterm colors are the most annoying ever put together for an application. They hurt my aged eyes.

    Next stop: Konsole. As much as it pained me, I installed KDE to run Konsole. I just wanted to get my work done, and I had heard good things about it. Konsole has a complex configuration menu, a lot harder to use than the clean gnome-terminal, but nothing that would require a PhD, as I figured it out in the time it took for the menu to popup. Ugly, crowded, but functional.

    I was partially happy. Konsole performed decently speed wise, but it consumed too much memory. I guess it is designed to run on rendering farms. I have enough memory, so I did not particularly care about the 12 megs used at startup. But unlike gnome-terminal which uses a single process to render multiple windows (a nice memory saver), every time you start konsole, a whole process is launched. I could survive, thanks to my loyal 512 meg on-board simm chip. But when I was editing a file, and holding the cursor key down, I noticed an unbearable lag. Konsole was good for text output, and re-rendering of its window, but it is just unbearable for text input.

    Me, being the savvy `configure; make; make install' kind of user, decided to build my own gnome-terminal with Zvt. Well, surprise. There is no more support for Zvt in gnome-terminal in the main branch on CVS. Time to use my cvs skills to check out a version of Gnome Terminal that used Zvt. I did so, but the new Zvt has been hacked to use Pango, and it is just as slow as Zvt. I can understand why they dropped support for Zvt: it is now as slow as Vte and I guess if you want to emulate a Wyse-66 it will do it.

    I rapidly added to my to-do list `Get an old Zvt, get an old gnome-terminal package', but for now, I wanted to get some work done.

    I tried rxvt. That terminal emulator is still as bad as it was five years ago. Next.

    Am back at using xterm. The UI leaves a lot to be desired, but it took me only 5 minutes to find the decent colors from gnome-terminal and paste them into the .Xdefaults file, load the resources database into the server, and another 5 minutes to add that to my session startup. I look forward to reincarnate Zvt and Gnome Terminal from its ashes one day.

    Five years after Gnome, and am back with the hated xterm. Jamie's post on the `cascade of attention-deficit teenagers' development model resonated in my head.

    Update: I got Zvt 2.0 and GnomeTerminal 2.0 packages running on my machine (thanks to Duncan). This is very good news. Xterm was driving me crazy (it is actually *slower* than Zvt) and I had forgotten how to set a massive scrollback. Happiness in MiggyLand.

    [1] Btw, there is a fabulous demo about a window manager that tries to always give the best space for a window in a multi-window desktop. Sadly, I lack any interest on it, as I like to run all my apps full-screen, and just keep an app per-desktop.

    The World

    Do not forget to call your senator today: Move On's Virtual March on Washington

    Blair faces a revolt, not everyone on the parliment believes a case for war has been made.

    Australian legal experts warn that Attack on Iraq could end in International Court.

    Posted on 26 Feb 2003


    by Miguel de Icaza

    Paolo reports that a SIGSEGV takes a whole second to be handled in MacOS X on a high-end G4. Not even my PC/AT was so slow. (this is a null pointer dereference).

    Posted on 21 Feb 2003


    by Miguel de Icaza

    Xml Zen.

    I am a simple programmer that learned perl out of the necessity to parse Unix formatted files and crunch some data. Just like everyone else.

    Typically a crunching data script is born by visually inspecting the look of the file to be parsed, guessing how to parse it, write a perl loop and using the appropriate split or regular expression. Then you move on and do something useful with it.

    Of course a quick glance at a file fails to reveal the underlying representation, or the rules used on it to handle corner cases. For example, parsing a comma-separated line is fine as long as there are no escape characters, or not quote-grouping, which is not always obvious during visual inspection. These special rules will appear unexpectedly in a production system, most likely because you only looked at a sample of the file, and not at all the possible combinations. God forbid you actually read the documentation for the file (and in an open source system, the challenge is to find documentation that actually matches the file format, but that is a separate story)

    Recently I have been using XPath in .NET to parse, pull and extract information out of XML files. Before XPath I used to be one of those `find the node, now call a function to search the matching children node, repeat until found'-kind of person. XPath has made me a happier man. I realized that part of the pain in dealing with simple text files can be easily addressed with XPath and XML: There is a single format that you can use (and a set of tools that produce and consume valid XML) and a simple way of fetching nicely structured data (as opposed to files like /etc/inittab, /etc/fstab, /etc/termcap or the terminfo database.

    Don't get me wrong. Termcap is a great file format if you have a single implementation of the beast, the only API call you know about is strtok(2) and you just learned how to test for end-of-string marker in C.

    I know the above sounds completely obvious to everyone. But I liked my little realization this week. I think I might be on the path to XML Zen.

    I used this tutorial to learn XPath. First match in Google.

    XML extensions for C#

    Duncan saw a talk at Stanford by Todd Proebsting. In his talk he mentioned that it would be nice to have extensions to handle XML from your favorite programming language as XML was becoming ubiquitous. XPath gets close to this, but its typically implemented as a library routine. Then Don Box went to a conference and pushed for the same idea. Wild speculation about what Microsoft could be doing begun.

    The above gave Duncan an idea: he wanted to be able to use XPath-like expressions within C# to address nodes

    It ocurred to me that we could hack our C# compiler to implement Duncan's idea with relatively ease. The idea would be to flag XmlNode with a special attribute (say, [Dynamic]) and then have the compiler resolve "Member Access" expressions with dynamic code instead of using static code.

    At compile time the compiler will figure out what "This.String.Method" means. One interpretation could well be `In namespace "This", pick class "String" and lookup the member "Method"'. This in turn becomes "Fetch from class-id XXXX the field YYYY". We could use the [Dynamic] flag to let the compiler know that after resolving the meaning of a particular element in a member access expression, it should not try to statically resolve the meaning of it, but do it dynamically and generate code accordingl.

    So given: "XmlNode n = GetNode ();" and the expression "j = n.Types [5].Dingus" would become:

    	XmlNode temp1 =	n.SelectNodes ("Types");
    	XmlNode temp2 = temp1 [5]; // Gets the fifth node
    	XmlNode temp3 = temp2.SelectNodes ("Dingus");
    	j = temp3;
    	

    If you can annotate the node with the XML Schema, the compiler could do strong type checking as well:

    	[Schema ("Dingus")] XmlNode n = GetNode ();
    	

    There are issues to be addressed here, like how would C# cope with identifiers like "my-element-name".

    My presents

    I got a set of nice presents from Ana.

    Posted on 13 Feb 2003


    by Miguel de Icaza

    Today I ran into a fascinating visualization tool. The tool renders the market data using a clever use of color and layout to present the information.

    I had never thought of the markets in this way. The beauty of this visualization tool is the novel way in which data which would otherwise be hard to correlate can be easily digested with the visual cortex.

    Posted on 11 Feb 2003


    by Miguel de Icaza

    Nat sent me this chilling account of what is going on in Bagdhad

    Posted on 06 Feb 2003


    by Miguel de Icaza

    Robert Fisk came to do a talk at MIT after attending this morning Powell's presentation at the Security Council. His presentation today is one of a true journalist, I was delighted to read this interview with him a few days ago.

    Robert Fisk is a reporter for the UK Independent magazine, and has been reporting on the Middle East for twenty seven years. One of the few journalists that interviewed Bin Laden.

    Duncan and myself took the opportunity to have our picture taken with him:

    Posted on 05 Feb 2003


    by Miguel de Icaza

    Beautiful article

    A beautiful article from John Pilger. The first half you can skip, the second half gets graphic.

    Cool pictures from the ECMA meeting coming as soon as possible.

    Posted on 30 Jan 2003


    by Miguel de Icaza

    101 Reasons

    101 reasons not to go to war with Iraq

    41 American Nobel Laureates oppose war.

    In Redmond this week, for the ECMA meeting.

    Ariel Sharon got re-elected in Israel, a dark day for human rights.

    Nat said "`Best Ari and I' ever". `Ari and I' is a series of articles with prime quotes from Ari, the White House spokesperson.

    Reading Chomsky's Fateful Triangle. Published in 1983, has an enormous amount of information relevant to the current situation in Iraq. Surprisingly that all this information had been published for so long and I just ran into it.

    Posted on 29 Jan 2003


    by Miguel de Icaza

    Books

    Just finished reading The Holocaust Industry. Fascinating. Check the Amazon comments and Norman Finkelstein's web site. Funny Cartoon

    Posted on 26 Jan 2003


    Fisk

    by Miguel de Icaza

    Another informative piece from Robert Fisk.

    Times

    America has gone mad in the UK Times.

    Posted on 18 Jan 2003


    Big recommendation

    by Miguel de Icaza

    I am loving Wilson's Ghost. A book from McNamara that did not get enough coverage when it came out (few months before 9/11).

    Read the reviews on Amazon, as there are some great comments about it.

    Open Season

    Israel will start killing people in other countries that they identify as dangerous.

    Countries with a lot of power, by trying to define the rules of engagement are basically destroying the work of those that lived through the war and wanted to create mechanisms that would stop it. I have been reading the new book from former Secretary of Defense Robert McNamara on the subject. Every mechanism that he recommended to put in place as part of international policy is getting backed out in this world of war against terror.

    Allowing this seems like an extremely dangerous policy for the world to allow. But there is little that can be done about it. Lets hope we do not become annoying to those running the show and we do not become targets that have to be silenced.

    Last year, two armed Israeli Mossad agents were captured last year inside Mexico's congress. They were detained and sent out of the country.

    MacOS: Innovate, get sued.

    Apple was welcomed by many of us because they decided to open source pieces of their operating system (Darwin).

    Darwin is the core of the operating system, but does not cover the more interesting "upper layers" like the advanced windowing system, their framework libraries to create end-user applications or their collection of iTools. But any contribution is good to open source.

    The code open sourced is for an implementation of Unix built on top of Mach. It has been improved over the years, and some of those improvements are very good. Sadly, Mach is a microkernel architecture. It has been demostrated time and again that microkernels are more inefficient than monolithic kernels. So today you have to need to get a more powerful computer to perform the same tasks that a smaller computer would do, as the operating system consumes those resources.

    Anyways, today by reading Scripting.com, I ran into a project call ICommune. These people are extending in some way the non-open source iTunes component from the MacOS to allow people to export music as if they were file shares. The project got a letter from Apple:

    Uh oh... I just received a "Notice of Breach and Termination of License" letter from Apple, stating that I violated my license to the Device Plug-in API which iCommune uses. For the time being, I'm making the download unavailable, while I try to sort things out with Apple. Sorry about this folks. Any good lawyers in the house?

    State of the Union Address

    Found this state of the union address. Its funny because its true.I

    Posted on 17 Jan 2003


    E-Mexico and free software laws.

    by Miguel de Icaza

    The E-Mexico site is running a story about the proposed open source legislation for M�xico.

    Eldred case

    The news are all over the place now. The supreme court ruled in favor of Disney and against the people.

    Posted on 16 Jan 2003


    by Miguel de Icaza

    Mexico

    I went to Mexico this winter break. Here I am with Ana:

    Posted on 28 Dec 2002


    CommonDreams

    by Miguel de Icaza

    On the propaganda agency and what has happened so far towards secrecy.

    INS detentions.

    As arabs complied with the new INS regulations to register that they are in the country, apparently one fourth of them were detained the details come from the LA Times (copy is here)

    Posted on 20 Dec 2002


    RIAA

    by Miguel de Icaza

    http://www.azoz.com/music/features/0008.html

    Posted on 18 Dec 2002


    Corporations

    by Miguel de Icaza

    Recently I was discussing with Nat the fact that I did not believe that the way corporations responded to the anonymous share holder was right. And that corporations should have a dual commitment: one social, and one to their sharholders.

    He sent me this link from Adbusters.

    Also, there is a new Mark Fiore

    Posted on 14 Dec 2002


    by Miguel de Icaza

    * Funny

    Some fun sites I read every once in a while: Mark Fiore, Things my Girlfriend and I have argue about. and In passing.

    Posted on 09 Dec 2002


    by Miguel de Icaza

    * Perpetual War Portfolio

    Death is the best investment: The Perpetual War Portfolio.

    * Open Secrets: how is the government ran

    Democracy today is not ran by the people, but by corporations that purchase their own leader. http://www.opensecrets.org has the data on contributions to the ellections.

    * The Best Democracy Money Can Buy:

    I contributed this post to a thread on slashdot.

    * Pentagon Papers

    I have been fascinated by the process through which Daniel Ellsberg leaked the Vietnam study that was commisioned by McNamara to the New York Times.

    Daniel Ellsberg wrote a book after 30 years of silence called `Secrets'. There are a couple of interviews with him in Salon: `My only regret' and a recent interview:

    The man who leaked the Pentagon Papers talks about why five American presidents lied about Vietnam -- and how to get the truth on Iraq.

    Audio from the Nixon phone conversations when the Pentagon Papers were leaked out to the New York Times. Amazing recordings. The call with Kissinger actually started the "plumbers" mess that would eventually lead to Watergate, and later to his impeachment.

    * Found the National Security Archive

    Lots of information on US National Security. Including information from the Pentagon Papers incident.

    * Operation Enduring Fredom: Best Bloopers

    Can be found: here

    * Oil

    My friend Adam gave me a link to this interesting story on oil

    * Am I a terrorist or Not?

    Am I a Terrorist or Not. Not funny.

    * What the world thinks in 2002.

    An interesting poll about what people think in 2002.

    * Mozilla 1.2.1 and new Galeon

    Am using a set of RPMs compiled by Duncan, and the Xft packages for Ximian and am loving my web browsing experience with the new Xft2-based Mozilla and Galeon.

    Mozilla 1.2.1 is significantly faster, and the Typeahead features of it are a delight to use.

    Posted on 08 Dec 2002


    paypal

    by Miguel de Icaza

    Pretty scary

    Posted on 27 Oct 2002


    No war against Iraq

    by Miguel de Icaza

    Duncan and myself flew down to Washington DC to join the rally against the war in Iraq. I took plenty of pictures, some are available here.

    The pictures had to be scaled down to 900x600 because the original files were too big to upload. If you want a particular picture in high resolution, mail me.

    Posted on 26 Oct 2002


    Me, the Movie Director

    by Miguel de Icaza

    So compelled by Michael Moore's new movie I have decided to get myself a video camera and do a documentary about an interesting topic.

    Interesting Read

    Very interesting read from CommonDreams:

    http://www.commondreams.org/views02/1025-07.htm

    Another Fisk

    http://www.zmag.org/content/showarticle.cfm?SectionID=22&ItemID=2524

    Posted on 25 Oct 2002


    Media Coverage

    by Miguel de Icaza

    An awesome report on how media reports: Now and Then

    Sean Penn on the Washington Post.

    Sean Penn paid 56,000 dollars to publish a full page open letter to president Bush.

    Arundhati Roy.

    A beautiful talk by Arundhati Roy: transcription or Real Audio

    Also make sure you listen to the follow up discussion with Howard Zinn.

    Up

    Loving my new Peter Gabriel UP CD.

    Posted on 20 Oct 2002


    Bombing for Peace

    by Miguel de Icaza

    The Monty Python on bombing for peace

    IRA spied on Blair and Bush

    This is priceless.

    Israel's democracy.

    There is a common error being spread among those who support the Israeli policies towards the invaded territories of Palestine: that the Israel administration is the only democracy in the middle east.

    In fact, a quick look at the CIA Factbook shows that Lebanon, Egypt and Turkey are all republics. and Jordan is a constitutional monarchy.

    But even if Israel were the only democracy has nothing to do with how the nation behaves. Its government repeatedly violates human rights of the Palestinian population. Of course, there are two ways of looking at the palestinian issue:

    • (a) Israel is invading the Palestinian nation (which the UN claims they are since 1967), in which case every time people report that terrorists were shot by the IDF, it should just be assumed that Israel's invading army shot another indepence fighter. -or-

    • (b) Palestinians have no nation, and are under the control of the Israeli administration. In which case the Israel administration is a racist adminisrtation that takes lands, property, lives and the rights from those who are not worthy enough.

    Either way it does not look very possitively on the Israeli administration: either they are violating UN regulations and international law, or they are guilty of crimes against humanity (obMeme: Ariel Sharon was found responsible for the massacres of Sabra and Shatila, he is a sanguinary man).

    Reading this article it is clear that Israel is fighting a war against the Palestinian population. The United Nations should intevene, deploy forces and restore the peace.

    Anyways, the point is that we need to distinguish democracy from justice. The fact that you have a democratic process does not ensure justice. The popular proverb sums it up nicely: `The US has the best democracy money can buy'. That and corruption.

    Israel's prime minister is a war criminal, how is this man going to even vaguely give peace to this region? The man is a monster.

    I grew up with the image of my country having a terrible problem of corruption (which it does) and a lack of justice (which it does) and having a lot of injustice between the powerful and the poor. But the more I learn about the rest of the world, the more petty Mexico's offenses seem. My country is just an amateur when it comes to high grade corruption.

    Dumb terms.

    Oh, something else. The term `anti-semitism' is miss-used all the time, semites are:

    Semites are peoples who speak Semitic languages; the group includes Arabs, Aramaeans, Jews, and many Ethiopians. In a Biblical sense, Semites are peoples whose ancestry can be traced back to Shem, Noah's eldest son. The ancient Semitic populations were pastoral Nomads who several centuries before the Christian Era were migrating in large numbers from Arabia to Mesopotamia, the coasts of the Mediterranean Sea, and the Nile River delta. Jews and other Semites settled in villages in Judea, southern Palestine.

    Present day speakers of Semitic languages are as diverse in physical, psychological, cultural, and sociological characteristics as are speakers of Indo European languages. The most prominent Semites today are Arabs and Jews. They are different in many ways, and they have absorbed a variety of European traits through centuries of migration and trade. The origin of Semitic languages, however, and many similarities in the stories of Islam and Judaism reflect a common ancient history.

    So the term anti-semitism is being misused to mean `people who hate the jews' and by some clever propaganda extension to mean `people who dislike the Israel administration policies' .

    Racially, those Palestinians that the Israel administration is happilly disposing of their flesh are just as semitic as those pulling the trigger.

    Dictators in Latin America

    Found these trading cards. Pinochet's card is interesting, and contains the following quote: "Democracy is the breeding ground of communism,".

    The Church Report from the Freedom of Information Act contains all the fun details!

    Posted on 15 Oct 2002


    Background on Iraq:

    by Miguel de Icaza

    Richard Cumming's interesting background

    Posted on 11 Oct 2002


    Not in Our Name

    by Miguel de Icaza

    Posted on 06 Oct 2002


    Hilarious

    by Miguel de Icaza

    Introducing the Chicken Hawks!

    Posted on 03 Oct 2002


    Record Labels

    by Miguel de Icaza

    Legalized corruption by the Record Labels

    Posted on 02 Oct 2002


    Pre-emptive strike policy.

    by Miguel de Icaza

    Anyone who considers a pre-emptive strike policy, should be pre-emptively be put in a mental institution.

    For some interesting history, look at Pilgers's new article. Pay special attention to the politician's speeches. This was scary.

    Posted on 01 Oct 2002


    Washington: October 26th

    by Miguel de Icaza

    This weekend, am going to Washington DC for the `Stop the War on Iraq Before it Starts' demostration.

    End the War and End the Sanctions

    Pictures from Iraq from the Voices in the Wilderness gallery: First, second, thid and children drawings

    Iraq Peace Team

    Today I found the Iraq Peace Team web site.

    Posted on 23 Sep 2002


    Mono Survey

    by Miguel de Icaza

    If you use Mono, or are interested in Mono, please fill the following Survey to help us plot its future.

    Evolution

    Evolution got a great review on PC Magazine.

    Posted on 19 Sep 2002


    Pilger Documentary on Palestine.

    by Miguel de Icaza

    Pilger's Documentary available as a web page. It was broadcast yesterday in the UK on ITV.

    Wish this got some coverage outside the UK though.

    Some are more equal than others.

    Salon is running an article on the War on Drugs and Jeb Bush regarding the different treatments that his daughter gets, and what other ten thousand drug offenders get.

    Posted on 17 Sep 2002


    The Video

    by Miguel de Icaza

    See the movie trailer for Occupation 101.

    Remember

    New Fisk:

    So a few thoughts for the coming weeks: remember the days when Saddam was America's friend; remember that Arabs committed the crimes against humanity of 11 September last year and that they came from a place called the Middle East, a place of injustice and occupation and torture; remember "Palestine"; remember that, a year ago, no one spoke of Iraq, only of al-Qa'ida and Osama bin Laden. And, I suppose, remember that "evil" is a good crowd-puller but a mighty hard enemy to shoot down with a missile.

    Posted on 16 Sep 2002


    Understanding the problem in Iraq

    by Miguel de Icaza

    I found this history of the Iran-Iraq war very enlightening about the real reasons behind a war against Iraq. I will summarize it for you: US control over the oil in the Middle East.

    The control is not required because a need on the Middle East oil, but because Japan and Europe are highly dependent on it. You want *your* companies profiting from that oil, and not someone else.

    It also explains why Britain wants to get some piece of the action. In fact, they have always wanted to get a piece of the action.

    Posted on 15 Sep 2002


    UNAM

    by Miguel de Icaza

    My University acquired the rights to the photographies from the 1968 student movement in Mexico and released the digitized pictures to the government. They will be making the material available on line.

    Palestinian Ethnic Cleansing by Israel.

    Edward Herman does --of course-- a much better job than I do at showing all the international laws violated by Israel on his Israel Approved Ethnic Cleansing article.

    Reports from Palestine

    Direct from Indymedia. More civilians being shot.

    Posted on 13 Sep 2002


    NY Times

    by Miguel de Icaza

    The New York Times is running an article piece on Mono.

    Posted on 12 Sep 2002


    Camera

    by Miguel de Icaza

    So all my pictures for the best part of the day turned greenish. A phenomenon that can only be explained by the multitude of settings that the camera has, compounded with my random knob moving.

    By the end of the day, I had figured a few things, but now everything is turning out red. The automatic mode in the D60 is not as simple as the one in the S40, not to mention that there is no way to get flash-less automatic.

    World

    Nelson Mandela warned Bush and Blair about war against Iraq.

    Chomsky's Drain the Swap and there will be no more mosquitos.

    Posted on 11 Sep 2002


    Das Experiment

    by Miguel de Icaza

    Today the Boston Film Festival showed Das Experiment. The movie was very intense and disturbing. Intense as very few movies I have seen in my life, indeed, it is hard to tell when was the last time I got so scared.

    Anyways, we learned while leaving the movie (from a German girl that had seen the movie before) that they had removed from the end the subtitles that said `The events of this movie aren based on the Stanford Prison Experiment.'

    It is even more scary that this actually took place.

    I feel uneasy reading the experiment description from the professor, because to him it was only an experiment. The only place where he redeems himself a bit is where he ponders a number of questions at the end about the prison system.

    From this site, I ran into the Peace Psychology papers, I have not checked them all yet, but there are some interesting bits.

    Anyways, the movie stresses one interesting part based on the research from the Stanford Experiment: people in a position of power are bound to break the rules, and seem to enjoyed it.

    This makes the need for strong rules where human rights can be violated not only extremely important, but they have to be carefully monitored.

    Just found a reviewat FilmCritic.

    New Camera

    Today I met a very nice photographer called Rick Friedman who was carrying a Canon D60. I was shocked to see someone carrying that camera, as it is just about impossible to get your hands on that, I have tried, and I have looked every web site on the Internet, and that camera is just unavailable.

    Well, Rick was nice enough to actually call a friend of his in the area that actually carries the camera and was able to give us one. So today after work, Peter and I went to check out Zeff Photo this store, which was about 20 minutes away from the office.

    I got back with the camera and all sorts of extra toys for it, now its time to take some pictures and see if I can match those from Juantomas with his mighty Canon Ixus.

    Now the next step is to get either a compact flash with 512 megs of ram and 24x access speed, or to get the IBM 1gig Microdrive, decisions, decisions.

    DSL

    I just got DSL at home, but it seems to be slower than the public Newbury Open Wireless network that I was using before. Although with the DSL I can actually use irc and https POST (I have no idea why https POST did not work with the open network)

    Mono

    Quick status report: Martin is working on a C + CIL Debugger that we should be able to use very soon; Paolo and Dietmar are fixing our existing bugs in the runtime, and working on new optimizations for the JIT engine; Dick and Duncan are fixing bugs on the underlying class libraries and finally Gonzalo is working on the ASP.NET code.

    Posted on 10 Sep 2002


    79 days under curfew

    by Miguel de Icaza

    Israel has kept three million people under curfew for 79 days now. The article goes on to describe how Israel is seizing illegaly more Palestinian land.

    That means roughly since late June.

    How did the summer treat you? Some nice vacations on the beach? Did you get to travel around the world? Maybe have a challenging summer internship?

    I know I got a lot of fun, and traveled a lot this summer. In the meantime, a nation was ketp under house arrest, some of them shot, some of them do not have food, and no access to medical facilities.

    The war against terror in Israel and Palestine is nothing but a smart spin on ethnic cleansing.

    How is this any less evil than the worst attrocities in humanity?

    A few days ago, I made a list of Human Rights that are being violated by Israel, here is the list:

    • Article 2:
      Not every person has the same right, there is active discrimination based on race/religion
      . Palestinians are subject to military law, while Israelis are subject to civil law.
    • Article 3:
      Israel actively puts the life of civilians in danger
      Israel curfews limit 3 million of palestinians liberty
      Israel uses summary executions without a trial and kills people
    • Article 4:
      Conditions for Palestinians working on Israel is one of servitude.
    • Article 5:
      Israel interrogation mechanisms are reportedly using torture
      Curfews put population under inhuman treatment
      Curfews prohibit people from getting supplies and medicine they need
    • Article 7:
      Palestinians are held to military law in various zones in Palestine, while Jews are subject to regular Israeli law
    • Article 9:
      Israel uses its fight against terror to engage in ethnical cleansing
    • Article 10:
      Suspects are not tried before a tribunal, but summarily executed
    • Article 11:
      Ditto.
    • Article 13:
      Curfews since April violate this right
      Palestinians are not allowed to re-enter the land that belongs to them
    • Article 17:
      Looting by Israel Defense Forces to demoralize the population violates this principle
      The stealing of Palestinian land is ilegal

    Posted on 09 Sep 2002


    Boston Film Festival

    by Miguel de Icaza

    Today I went to see a movie to the Copley Place movie theater, which I try to avoid, as the seats are far from great, but seems like every bad movie is playing on the comfortable theaters, and all the good ones are playing either here or Kendall.

    I noticed that the Boston Film Festival was going on, and got a ticket for Interview with the Assassin. Not only good, but the director introduced the movie and there was an questions and answers session at the end.

    Great performance from Raymond Barry as the asssassin.

    Posted on 08 Sep 2002


    Israel's military sports.

    by Miguel de Icaza

    Darts in the chest: just following orders.

    Jimmy Carter

    Jimmy Carter's published an interesting piece in the Washington Post: The Troubling Face of America.

    September 11

    A new piece from Howard Zinn talks about the ignored issues after September 11.

    This reminds me I also found something interesting from the Freedom of Information Act a few days ago. This includes the Church Report that describes the covert operations of the US in Chile, and the financing of anti-Allende activities including the organization of the 1973 State Coup.

    The State Coup was carried out on on September 11 1973. Estimates range from six thousand people killed to ten thousand during the first few weeks of the dictatorship.

    Posted on 07 Sep 2002


    Chomsky on Iraq

    by Miguel de Icaza

    New Interview with Chomsky on Iraq

    Posted on 06 Sep 2002


    We dont have any photos...

    by Miguel de Icaza

    of his weapons of mass destruction... -- From the Independent.

    War Blogs

    Today as I was reading Trevor's log I found a link to Warblogger watch. This is a site dedicated to keeping an eye on all the nutcases advocating war.

    Gyro

    Microsoft Research released their prototype CLR and C# compiler with support for generics

    Posted on 05 Sep 2002


    Israel: terrorist state.

    by Miguel de Icaza

    30 of 49 Palestinians killed by Israel in August were civilians and other stories of Israel state terrorism.

    Hardly a controversial view, here is Noam Chomsky addressing the same question

    Ana

    Girlfriend Ana has setup a new web page

    Posted on 03 Sep 2002


    New Blog Software

    by Miguel de Icaza

    I have avoided updating my activity log, because I wanted to run it using a Mono-based logging software. I have various of the pieces in place already (rss, macros for my site, and a replacement for the text processor I have). But I wanted to have a better mechanism to maintain the log, and get a new design, because the one you see right now is terrible.

    Anyways, instead of doing this, I have been working on mPhoto: a scalable image viewer (an image widget currently) so Nat can stop using his MacOS X to browse his 10k+ picture collection and use Mono/Linux.

    Curfew

    Israel maintains the Palestinian population under curfew. This madeness began in April. How would you like to have spent the last five months of your life under curfew, without food to give to your children, without a chance to see a doctor, or get the medical supplies you need.

    Ariel Sharon, who was held responsible for the massacre of Shabra and Shatila

    Nobody should be above the law, nobody should be able to violate international law, and nobody should be allowed to violate human right, and much less in the scale that the state of Israel is doing.

    35 years of military occupation, 35 years of living under military law, 35 years of racial discrimination in the territories that lawfully belonged to your population.

    By actions like the summary executions, bombing of a family complex where an alleged Hamas leader lived (killing 11 children) without due process, only puts Israel on the same moral ground as the terrorists.

    The Israel government is not interested in eliminating terror, it is interested in ethnically cleaning the Palestinian population.

    Iraq

    Former UN Weapons inspector has testified that Iraq does not pose a threat to their neighbors; that Iraq does not have weapons of mass destruction (as opposed to the US weapons of mass love); that Iraq does not pose a risk to the United States.

    He pointed out in an interview with Jon Stewart that since Saddam Hussein has been demonized, a whole range of diplomatic options have been removed from the table. Again, we, as civilized humans have the duty to attempt every possible diplomatic option before resorting to meassures that would lead to loss of human life.

    He also advocated on that very interview that sanctions to Iraq should be dropped. He did testify about this in Congress as well. Of course, Iraq is already being bombed routinely. Sounds like a violation of international law.

    Posted on 30 Aug 2002


    Failed Cloning of Rupert.

    by Miguel de Icaza

    Jose Antonio Sol�s tried to do a Rupert clone by using advanced bio-engineering techniques but failed. Here is the result of the experiment:

    Mono

    New type lookup system in the compiler has been deployed, fixing many existing problems. Martin Baulig has also joined Ximian and has been killing many pending bugs in the compiler, and the compiler is more robust than ever.

    There is also a faira amount of Mono coverage this week, as I am doing a presentation at O'Reilly with the latest and greatest about Mono.

    Cover story on eWeek, InfoWorld and the Ximian press release Enterprise Systems picked me in their top 100 power-picks I got #18.

    Posted on 22 Jul 2002


    by Miguel de Icaza

    Posted on 20 Jul 2002


    Gnome Summit

    by Miguel de Icaza

    Today it was the second day of the Gnome Summit. Peter took various yesterday, which are now available here .

    I arrived at MIT around 2pm, and went to the hacking room. But found nobody there, which I found quite surprising. It would take me 90 minutes to figure what had happened: everybody was at the Rob Pike presentation. At this point, I ran to the presentation, but people were coming back, and found Rob with a group of people coming towards the hacking room.

    The good news is that the discussion about Rob's work continued on the hacking room, and I got to catch up on his presentation on the plumber. As part of his plumber presentation, there were various Plan-9 features discussed, which are always nice to see.

    Posted on 19 Jul 2002


    Mono

    by Miguel de Icaza

    The big news today is that Paolo fixed the last remaining problems in the runtime and the compiler and we are now completely self hosting on Linux. Which is good.

    I am still working on the new type lookup system that should close various bugs in the compiler.

    Martin Baulig will be an intern over at Ximian for a couple of weeks during the summer. These are great news, because he is the man behind the debugging support in Mono. Great news. Just great.

    Duncan has been busy writing sample applications for Gtk#, so we can stress test the bindings, and we can have something nice to show for the O'Reilly conference.

    Posted on 16 Jul 2002


    Appartment

    by Miguel de Icaza

    I have signed my lease to my new apartment. Very cool, and in a nice location. Will be moving out by the end of August.

    Evolution

    Switched to the development branch of Evolution (RupertZilla) for my day to day work. I use a peculiar view of the calendar and have a lot of information, which made Evolution 1.0.x quite slow. The new version is about three times faster.

    Also, incorporating e-mail into evolution is dramatically faster for indexed mailboxes, thanks to Michael Zucchi for the new indexing engine which can cope much better with large volumes of e-mail.

    Finally, the new user interface touches are really nice in RupertZilla, something that I was missing. I decided to switch because all of the bug reports that I had filed before in Bugzilla have been taken care of now.

    Also, the new composer is gorgeous, and allows for multiple-language spelling. Since I write in Spanish and English this is very helpful.

    Posted on 15 Jul 2002


    Barber�n

    by Miguel de Icaza

    Jos� Barber�n, which was my boss while working for the PRD during the 1994 elections died this morning. He studied the results of the 1988 and 1994 elections, and found plenty of evidence of the tampering of the electoral results.

    His findings were documented in "Radiorgraf�a del Fraude". What nobody realized is that it was possible to plot the results from the elections. You would expect a regular population distribution, but instead the results for the election showed the PRI winning with abnormalities in the population graphics, they called this phenomenon the "crocodile's tail" because of the shape of the graph.

    A typical graph would look like this (plotting the percentage with which a given party won per locality):

    This is how the PRI won in several states:

    What that means is that there were many places where the PRI won the election completely (100% votes of the votes) which is an anomality, particularly in Chiapas.

    Sorry for the poor graphs ;-)

    A quote I found online for the book:

    "The statisticians found two telltale signs of massive tampering. In place of the single bell-shaped curve that would be expected to describe the distribution of votes obtained by each party, the PRI was found to have two such curves: one centered around a mean of 36 percent (its true national average), and the other peaking around an implausible 100 percent."

    "A second diagnostic test revealed the provenance of these 'unanimous' results. Whereas totals for each of the opposition parties had last digits that occurred with roughly equal frequency, the last digit of PRI totals was 60 percent more likely to be a zero, indicating that the PRI had inflated its totals by simply adding zeros to its actual vote count."

    Last year he begun leading the effort to make the Mexico City government move to Linux.

    Many people in the Linux community in Mexico had been working with his teams bringing Linux to the administration.

    We will miss him.

    Posted on 09 Jul 2002


    FishCal

    by Miguel de Icaza

    The University of Mariland's Fishcal user interface for calendars seems like a good place to borrow ideas for things that we can do with Mono, Gtk# and Evolution.

    Posted on 08 Jul 2002


    More on the RIAA

    by Miguel de Icaza

    Janis Ian:

    Costing me money? I don't pretend to be an expert on intellectual property law, but I do know one thing. If a music industry executive claims I should agree with their agenda because it will make me more money, I put my hand on my wallet?and check it after they leave, just to make sure nothing's missing

    ...

    Again, from personal experience: in 37 years as a recording artist, I've created 25+ albums for major labels, and I've never once received a royalty check that didn't show I owed them money.

    The article goes on to explain what things the RIAA should do if they really cared about artists (they dont) instead of caring only for their own profits.

    The issue here is profits: The artist needs are not going to enter the picture, unless they will help profits. In the above article, a nice case is made.

    Courtney Love said the same thing two years ago in Courtney Love does the Math in Salon.

    Peru report

    In Peru, the free software law is getting very good coverage.

    The coverage is in depth, with interviews to the congressmen behind the law, and what it means to people.

    In spanish.

    Refusenik

    Another real hero speaks: Why I wont serve Sharon:

    No more. No more excuses. We members of Courage to Refuse, reserve soldiers who have vowed not to serve in the occupied territories, will not set foot beyond the 1967 line unless it is in civilian clothes and as invited guests.

    Posted on 05 Jul 2002


    Palestine thoughts

    by Miguel de Icaza

    Recently I was having a discussion about the Palestine situation with my friend Jody. And there are a couple of things that I have been thinking about since that discussion:

    First, we should all strive to preserve Human Rights. That is the only foundation in which we can have a meaningful debate.

    Take a look at the Universal Declaration of Human Rights. And ask yourself whether Ariel Sharon is violating or not human rights.

    Second, Spain has dealt in a pretty interesting way with terrorism in the Basque country. For instance, they have not resorted to establishing curfews on the entire population because there are terrorist groups in the region.

    They have not resorted to blaming the entire Basque countrie for the crimes of a few.

    A million people in Palestine are under curfew, that is also a human rights violation.

    Bush's plan on Palestine

    What an Israel Officer has to say about Bush's policy on the Middle East.

    Peace

    An article on peace activism in Israel: here

    More Killing

    Ha'arez reports on `How Abd a-Samed became the 116 child killed in Gaza'. 26% of those killed in Gaza are children.

    Libert�, Egalit�, Fraternit�.

    Rodolfo said something very interesting in Uruguay. In modern culture, most people realize the importance of the french revolution's "Libert� and Egalit�" (although, as some people say, those with money are more equal than others). But we do not generally acknowledge the importance of the Fraternit� piece.

    Gnome has been for some time been seen as a hippy project, because we originally used some nice flowers on our web site. I think that many of the people involved with gnome and free software were of the fraternit� kind.

    Anyways, something worth keeping in mind.

    Palladium

    Interesting list of questions and answers on the Palladium.

    This raises the question of whether governments are serving the people that elect them, or are serving other interests. The war on drugs, the Ucita, the Dmca, the war on communism, and the war on terror.

    Posted on 02 Jul 2002


    Banrisul

    by Miguel de Icaza

    Today I was invited to do a talk to a group of people at one of the banks in Porto Alegre, Banrisul. I did the same Gnome presentation that I had done the day before. After the presentation was over, I saw some of the work that the bank has been doing with free software.

    The ATM machines that they started rolling out in 2000 are all Linux-based systems, and I had a chance to see the ATM machine boot: the traditional Linux boot sequence is shown, followed by the X startup and finally the ATM application runs.

    Not only is the bank rolling out ATM machines with Linux-based systems and their own software, but the terminals that are being deployed are running Linux systems as well.

    Debian

    Marcelo and I later on went to meet with some of the Debian developers from Porto Alegre in a Churrasquer�a, the food was most excellent. First you begin by getting some salads from the salad bar and some rice and beans, and then you wait for your choice of meat to arrive. The waiters bring different kinds of cuts to the table, and you pick the pieces you like the most.

    We created an interest group: Gnome-RS (Rio Grande do Sul) to start developing and contributing to the Gnome effort.

    Yerba Mate in the central market in Porto Alegre.

    Remembering Arturo, I ordered a Guaran� drink (people remember Arturo fondly, not only for his passion for the Guaran�, but also for his crazy pupilo-adventures in town).

    Porto Alegre

    Porto Alegre is the home for the World Social Forum. Whose motto is: "Another World is Possible". They have taken this principle to practice with the Participative Budget.

    Basically, the people decide what the budget should be spent on and the government just executes on the decisions from the people (Unesco report)

    Posted on 28 Jun 2002


    Gnome 2.0

    by Miguel de Icaza

    As GNOME 2.0 was being announced in Ottawa, we did our own introduction of Gnome at the UERGS. The State University of Rio Grande do Sul. This university is has deployed in all the desktops Gnome.

    They want us to change the default in Gnumeric, Abiword and OpenOffice to store the files in Office 95 format. This is important because not everyone uses the same spreadsheet all the time: some people prefer Gnumeric and Abiword for quick documents, and some other prefer the larger OpenOffice applications.

    They are using a customized version of the Conectiva Linux distribution that includes the Ximian Gnome.

    I met with Vagner from Conectiva, and hoped that Conectiva would include more support for Gnome in their distribution. We are interested to work with them.

    Porto Alegre Government

    Marcelo had arranged a meeting with the vice-governor of Porto Alegre to discuss the impact of free software and Gnome. Marcelo reports directly to the vice governor office and he is a liason with the UERGS.

    University

    That afternoon I did a talk on Mono, and some bits about Gnome at the Federal University. The talk went pretty well, it was mostly a technical presentation on Mono: the history behind it, and the reasons to develop it.

    I was exhausted at this point.

    Procergs

    The last stop of the day was a meeting with Marcos Manzoni and other representatives of Procergs the state software development company. They have a very nice piece of software called Direto GNU which is a web-based groupware solution written in Java.

    The question of building a protocol handler for calendars to Evolution came up. We have to research what is the status of the CAP protocol, because the last time we looked at that at Ximian, it was still a protocol either in flux or broken.

    Later that night, we went for a traditional dinner at a churrasco restaurant. Here you can see me dressed as a RS Gaucho

    Posted on 27 Jun 2002


    Unesco

    by Miguel de Icaza

    After catching up some sleep (very little) Haroldo and Rodolfo showed up at my hotel with some Mate to drink and took me to our next destination: Unesco.

    I met with Cl�udio Menezes at the Unesco offices in Montevideo which is a Regional Adviser in the Communication and Information Sector.

    Lunch

    Before departing to the next city, we had lunch at the downtown market. Here you can see some of the delicious food we were about to have.

    Porto Alegre

    My next destination was Puerto Alegre. Pretty tired at this point after all these meetings, but I had a lot of fun.

    Puerto Alegre was the last destination of my trip.

    At my next destination Marcelo would pick me up at the airport. I almost do not make it into Porto Alegre, as there was no time to get a visa for Brasil, but various guys in Puerto Alegre managed to expedite my visa application.

    Arturo had been in Puerto Alegre before, when he was working on the Red Escolar project in M�xico. The people from Procergs in Porto Alegre had taken some of the ideas from Arturo's work and continued it. One of the major changes from Arturo's project to the one being deployed in Rio Grande do Sul is that they have switched to Debian as the distribution for their own Scholar Network project.

    Marcelo had also arranged a pretty active agenda in Puerto Alegre, but for now, it was time to sleep some.

    Posted on 26 Jun 2002


    Buenos Aires

    by Miguel de Icaza

    I arrived to Buenos Aires from Santiago de Chile early in the morning with very little sleep. But turns out that even if American Airlines and Lan Chile are partners of the One World alliance, American Airlines forces you to go through immigration and customs even if you are a passenger in transit.

    Forms had to be filled, immigration cleared, and customs cleared. Only to find out that I lost my airplane by five minutes. Thank you American Airlines.

    Loosing this plane was particularly annoying, because there are no more flights from the Buenos Aires international airport to Montevideo that day. I had to go to the Aeroparque airport (40 minutes away) to catch a different airplane.

    Cultural note: when you make changes to your airline tickets, airlines feel the need to charge you a hundred dollars for the change. This is a pressing need that they can not avoid, but when it is the airlines fault (like, say, this time), they do not reimburse you anything, or give you a hundred dollars.

    Of course the employees that you deal with are not the ones to blame for the company policies, but I wish I was not completely at mercy of the airlines will. Worth reading: `Plane Insanity'.

    If I had known that I would be for so long in Buenos Aires, I would have set something up with the local users group.

    The one good thing about missing the airplane was a small restaurant in the airport that was cooking `Lomitos' in the airport. I ordered a `Lomito Completo' which is a sandwitch with two steaks of Lomito, ham, cheese, and a egg on top with french fries on the side.

    It is not only the best food I ever had in an airport, but one of the most delicious sandwitches ever.

    I could not believe an airport could have such delicious food. The restaurant also had wine, which I did not want to have to avoid further dehydration.

    Uruguay

    Rodolfo and Haroldo picked me up at the Carrasco airport in Montevideo, Uruguay. I was at this point completely exhausted by the lack of sleep from the trip from Lima.

    I had a meeting with the founders of a company called Genexus and I got to see their product.

    They produce software to ease the development of database applications. A developer only defines the schema of the database, and hooks up the rules, the user interface and the reports they want. What is particularly interesting about this tool, its that it provides an evolution path to evolve the databases: as you make changes and introduce new relationships the software moves the information from the existing tables to new tables and creates and populates them for you.

    The software is a multi-plaform software, it is not free software, but it is genuinely interesting.

    Talk

    I did a presentation of GNOME 2 in the University in Uruguay shortly after the previous meeting, this was in what used to be an old church inside a convent. The talk was well attended and we discussed issues of free software, Gnome, and Mono. If people are interested in my OpenOffice slides, I can mail those.

    I got to meet my friend Pablo that I have met a few times at previous Usenix events.

    After the talk, a group of people went for dinner to a vegetarian restaurant. But being in Uruguay and eating vegetarian food was not ideal, so we split off and went to eat some traditional food from Uruguay. This picture was taken late that night.

    Posted on 25 Jun 2002


    Congress

    by Miguel de Icaza

    In the morning I met with Federico Heinz (from Via Libre) and Enrique Chaparro, both representing the FSF and the GNU project. We had breakfast (and I spilled coffee all over my brand new IBM Thinkpad) and headed over to the Peruvian Congress.

    Federico and Enrique are part of the group in Argentina that drafted the law that is being discussed in Argentina, and is the foundation for the law that was submitted by Edgar Villanueva and is being discussed by the Peruvian Congress.
    Here I am with Congressman Edgar Villanueva in the Congress meeting, he has introduced the free software project of law. He became internationally famous after his reply to Microsoft's comments on the law (the text is available in Spanish and English).

    Lunch

    After the meeting in the Congress with the congressman and the commission evaluating the project of law we went for lunch in Lima and got to try the ceviche from Peru. Different style, but just as tasty as the mexican version.

    Linux and Free Software in the State

    In the afternoon I participated in the `Linux and Free Software in the State' conference. There were six hundred registered people for the conference. It was inaugurated by Edgar Villanueva.
    During this trip, I arrived to an interesting conclussion, nothing really new, but it finally "clicked" for me. It is interesting to note that different groups of people have very different reasons for adopting free software/open source software. Not everyone agrees on the needs for it.

    For instance, recently we learned that the US administration is interested mostly in free software for its reliability and security. Third world countries and US corporations want to reduce their licensing costs. Other countries consider the use for free software a matter of national security; others a matter of technological independence.

    Some groups want to have the four freedoms promoted by the free software foundation; some others only care about the particular technical benefits, others want to use it as a vehicle to distribute their software.

    We all converge on the licensing and the basic guidelines for what constitutes free software/open source software and we agree to cooperate, because open source/free software has the pieces required to have multiple parties participate. But the different parties might not necessarily agree on the objectives.

    And I do bring this up, because I was asked a few times whether I was an `Open Source' person or a `Free Software' person and what was mi position on the debate.

    I personally think that the distinction is silly and a complete waste of time. I do have many different reasons for using and developing Linux, Gnome and Mono, and they are not the same as everyone else. Sometimes I care about freedom, sometimes about security, sometimes about innovation, sometimes about the gadget factor, sometimes it is nice to be part of a community.

    A group of Ximian users greeted me at the entrance of the conference.

    Lima-Montevideo

    The next step in the Gnome en el Sur was Montevideo. To go from Lima to Montevideo I had to take a number of planes: Lima to Santiago de Chile (2am); Santiago de Chile to Buenos Aires (5am) and then Buenos Aires to Montevideo.

    I did not get a lot of sleep that night, but being very tired from the activities in Lima helped me get to sleep for a few hours.

    I traveled with Enrique's wife which happened to be heading to Buenos Aires on the first two airplanes. She researches Asian cultures. Since I had been reading Saramago's Gospel according to Jesus Christ and pondering who exactly are the Palestinians in Israel, I had developed a theory of mine: the Palestinians are the same people that populated the area two thousand years ago, but have switched religions as invasions came and went.

    She confirmed my theory: both palestinians and israeli decendants are semites (surprise!) and gave me some details on the origins of words that both populations use. Very interesting.

    Posted on 24 Jun 2002


    trip intro

    by Miguel de Icaza

    Today I start my trip to South America to promote free software, GNOME and Mono. Three cities, five days, nine airplanes.

    Of special importance is the meeting with the Congressman Edgar Villanueva and the team creating the law for the use of free software in the state. The Congressman became famous for his reply to the objections that Microsoft sent about the proposed law.

    Coverage on Slashdot took a few weeks after the actual reply; The Associated Press is running a story with an update as well.

    Boston-Lima

    The trip begun at 12:30 Boston time, I was as usual late for the airplane, I only had time to get a bottle of water and get into my emergency exit row on time.
    Eating before going into an American Airlines flight has become rather important. You would think that when American Airlines acquired TWA, they will bring the good features of AA to TWA. For instance, that you would finally get decent food in TWA.

    Instead the opposite happened: Now American Airlines gives either terrible food, or none at all.

    Ecuador

    Over the Ecuador.

    Lima

    I was received by some members of the Lima Linux Users Group at the airport. We went for a tour of the city.

    While looking for a place to have dinner, we did a stop and found some ponchos. I took this opportunity to purchase a few souvenirs. I will be using them on the next winter in Boston.

    Posted on 23 Jun 2002


    Mark Fiore

    by Miguel de Icaza

    If you have not seen yet the animated cartoons from Mark Fiore, I suggest you go and watch them now.

    They are Flash-based.

    Posted on 27 May 2002


    Gnome News

    by Miguel de Icaza

    New site for tracking GNOME: www.gnomedesktop.com. Beautiful.

    Funny cartoons

    Funny flash-based cartoons Here

    Posted on 22 May 2002


    NY Times

    by Miguel de Icaza

    On E-Mexico, I spoke to Graham Gory from the NY Times, and it just got published

    Ingo Rammer

    Today I had a little chat with Ingo about OpenOffice. He tried it out after a while. I left to walk around Boston in one nice day, and found this on my logs:

    *Ingo* ok. I tried OpenOffice
    *Ingo* I'm impressed
    *Ingo* I could open a chapter from my book and everything
     (including "track changes") worked. WOW!
    *Ingo* I then created an XLS which would interface with my 
    SQL server and should be able to refresh the data
    *Ingo* it also worked
    *Ingo* hmmm ...
    *Ingo* this makes me think
    

    I hope Ingo does not mind the quote.

    Open Office

    Great news about Open Office 1.0: They do have a pre-compiled setup for people who want to focus only on improving a little part of it. Now, rather than having to build the entire beast, you can just compile and hack on a tiny portion!

    Posted on 19 May 2002


    Movies

    by Miguel de Icaza

    Today Duncan and I went to see Changing Lanes. We were not too excited at the beginning, but the movie turned out to be pretty good.

    Posted on 18 May 2002


    Birthday

    by Miguel de Icaza

    Today I went to Viviane's birthday party.

    Posted on 16 May 2002


    Episode III

    by Miguel de Icaza

    Chris Lahey got us tickets to watch the midnight show of Attack of the Clones.

    Posted on 15 May 2002


    Interview with Abunima

    by Miguel de Icaza

    A great interview at the Washington Post with Ali Abunimah, creator of the Electronic Intifada.

    Pictures

    I found finally some pictures of the conflict. The army that receives 3 billion dollars in US tax payer money vs the rocks.

    Davos

    Last year I went to Davos, and had a chance to see the debate between Peres and Arafat. I did not know much about the story of Israel and Palestine at the time.

    Arafat was supposed to go first, and Peres second. But Arafat had a technical problem (his translator I believe was not there). Peres went first, and delivered his speech. Not knowing much about the situation back then, I only concluded that Peres was just another politician delivering a regular speach: no content, but a lot of promises. I noticed immediately this, being a mexican. Being a mexican and living in Mexico makes you very sensitive to this particular kind of speaches: content free and promises that make you look good, but with no intentions to deliver.

    I figured `This is Davos, probably every speach is just like this'. Politicians at their core.

    The turn came to Arafat to speak. I do not remember the content of his speach (and I wish the speach was available on-line somewhere; Update: found a transcript), but it was a very sad thing to listen to, and it touched a nerve to listen to the story this man was telling.

    Arafat was trembling, and you could see that he was a man that had a lot of pain.

    Klaus Schwab closed this debate on peace, by asking each leader to say what they wished for the other country. Peres answer was exactly what you would expect from a mexican politician. I know this because I can not remember anything interesting about it.

    But Arafat's reply said something that immediately caught my attention: `I wish to the Israeli people, and the Israeli children that they do not ever have to live the lives that the Palestinian people and the Palestinian children'.

    This was a translation, and I do not remember the exact words, as that happened more than a year ago, and transcripts of the closing remarks are not to be found.

    The Destruction of Culture

    I guess children were hiding weapons of mass destruction in their paintings.

    Some Real Audio about Israel Channel 2 Broadcast. About the ambulance that could not pick her wife up: `Its a mistake'. The Israel Occupation Forces must be really dumb to make 1,500 mistakes like this, either that, or they are confident that the world is stupid.

    The good news is that 50,000 to 100,000 Israeli citizens (depending on your source) protested in Tel Aviv the government policy of occupation of Palestine.

    Posted on 12 May 2002


    Humiliation

    by Miguel de Icaza

    The best way to fight terror is through humiliating the civil population. This is what the Israeli Defense Forces did at the Palestine Ministry of Culture. Check the details of modern warfare.

    Posted on 06 May 2002


    Mono

    by Miguel de Icaza

    This week has been interesting.

    We have been considering using a new intermediate representation for the JIT compiler in Mono because it was hard with the current framework to implement register allocation.

    Dietmar has been researching the various options to move the JIT compiler to: a new intermediate representation was something we considered. Or a new "instruction scheduling" interface that would perform register allocation on "nodes" that would be semantically annotated.

    This week, Dietmar had a massive breakthrough: he figured how to add spill/reloads to our current framework and flag the register usage, which allowed us to free registers (two currently) for other purposes. There was no noticeable performance degradation after this change (even without using those two registers).

    Now work is moving along the lines of implementing linear register allocation (which is very fast to do, and is almost as good as register coloring).

    Benchmarks

    Some friends came by the office to check out how Mono was doing, and I showed them the Mono C# compiler recompiling itself on Linux. My Linux machine runs at 650Mhz and my Windows desktop runs at 800Mhz.

    Timing both compiles took the same ammount of time! It had been a while since I had compared both systems, but my Linux machine was just as fast as the Windows compile.

    This is not really a scientific benchmark, as both systems are loaded (Evolution, Nautilus, Galeon with 20 or so web sites open, Gaim, 20 gnome-terminals in Linux; Media Player playing, 5 copies of IE, Gui .NET Debugger, Cygwin with bunch of remote sessions and Word Viewer on the C# spec).

    Paolo points out that it might be related to the fact that our Reflection.Emit library is heavily optimized (he optimized this). Also, keep in mind that in the last few weeks a lot of improvements have been done to the Mono runtime by everyone. Ever since Paolo gave us profiling in the JIT, people have been going crazy tuning their code.

    Still, the major speed boost for computation intensive code will likely come from deploying linear register allocation; Paolo's CMOV patches plus Sergey's CPU-detection code.

    Patrik (totte) wants to contribute 64-bit specific support for PIII machines (now that he is working for Intel).

    All in all, things are looking very bright for Mono.

    ASP.NET, ADO.NET, Gtk# and Windows.Forms.

    Gonzalo reworked his ASP.NET parser this week to be a top-down predictive parser rather than the jay hack he used (I hever liked that approach anyways ;-). And we have some code generation going on now for ASP.NET pages.

    Also Mike Kestner got some more demoable features in Gtk# this week, an interesting acomplishment because it will be our foundation for the System.Windows.Form implementation.

    The hackers working on System.Data have gone crazy this week: Daniel Morgan, Duncan Mak, Rodrigo Moya and Tim Coleman have the Postgress backend for the Sql classes working (with nice test suite included ;-). Rodrigo and Gonzalo also got libGDA to be CORBA-free, so it is easier to use now as a wrappable library to implement the OleDB interfaces. So it is all very cool.

    Mono on Windows

    Thanks to Johannes, many people have been able to get Windows pre-compiled versions of Mono. This is pretty useful, as they can give it a try without having to download all the source code and all the development tools before they can use it (Cygwin mostly ;-).

    A few people are very happy with what we have right now, and a lot of people are sad because we dont have more.

    If you want to finance a particular area of Mono, get in touch with me ;-)

    Posted on 05 May 2002


    Mono

    by Miguel de Icaza

    Today I got back to hack, and I managed to finish the dead code removal code in the compiler. I also started fixing some bugs that I started looking into this weekend.

    More to come.

    Defining terrorism.

    A simple definition of terrorism:

    Fuzzy and ideological definitions of terrorism just make it easier to kill people. When you know your actions will kill innocent non-combatants, that's terrorism. And it must be clearly named as unacceptable - no matter who does it (individuals, groups, or states), and whatever the weapons, the expressed intentions, or political justifications. Deliberately taking the lives of innocent civilians must simply be morally condemned. That's a clear definition of terrorism and a beginning of resistance to it.

    Maps

    The West Bank Conflict in 3D. A set of picture essays by Architect Eyal Weizman. There is one new episode coming every day for seven days: 1 and 2 were the Maps; 3. Hills and Valleys; 4. West Bank Settlements; 5. From Water to Shit.

    Generals and Israel

    An article from linguist Tanya Reinhart from the university of Tel Aviv: Israel: The Generals' grand design

    Jenin

    We still do not know what has happened in Jenin: but the Israeli Occupation Forces provide us with to prove that nothing really happened.

    A separate measurement of the destruction by David Chandler

    Palestine Remembered

    Very interesting site, containing pictures of the occupation (before, during and after).

    It comes with per-city pictures, testimonials, maps, and a message board.

    Chomsky makes a much better case explaining the issues than the people on that web site.

    Posted on 30 Apr 2002


    Dave Winer on Sharon

    by Miguel de Icaza

    Dave Winer's essay Sharon Must Go

    Six Myths

    Debunking Six Common Israeli Myths.

    Microsoft right to innovation

    If Microsoft's thinks that they can only innovate if they integrate third party products into the operating system, that tells you a lot about how little they know about innovation.

    It seems more like they are closing their eyes to innovation. I understand that innovation might not be as profitable if you can not drive competitors out of the market, or if you do not bundle the products with the OS.

    Everybody else (but the convicted monopolist) has to ship products which are not bundled with the OS. Why should Microsoft be given special treatment? Specially when two courts have found Microsoft guilty of abusing its monopoly.

    Microsoft next step should be to strip out the OS from all the extra middle ware and sell those components separately. This is how the industry works today. Each component then has to be tested against the operating system, and cross-company and cross-product testing will have to happen.

    Microsoft is one of the proponents of interface-based programming (as part of COM and now .NET) in which the implementation details are not relevant provided that the individual "components" follow the contract specified.

    So everyone will have to develop using these contracts (Microsoft and third party people), and a chance for software to compete on the operating system level will happen: if you get a bare-bones operating system, where you purchase the extra components, we might get some competition in there, and people might be able to get different options.

    Right now, Microsoft bundled products (CD burning, Media Player, Internet Explorer, the Movie software, MSN, WordPad, DVD playing (that does not work)) are 50% to 70% of what people need, not really worth spending the extra 69 dollars to get the full product.

    Why dont we get a discount on that, and let people build their own solutions using the best components?

    XP

    I consider myself a savvy user, but when it comes to using the "consumer XP", I have found that XP has all sorts of troubles playing my DVDs or having an intuitive interface (or even providing the options) to burn CDs.

    I bought my XP machine so I could read the .NET documentation at home while I hack on my Linux laptop. After trying to use the XP machine for something more than a document browser, I was really dissapointed by how poor this OS is.

    They got better icons now (of far lower quality than MacOS X and GNOME) and their file manager has some neat features, but I had to install Linux on the machine to play DVDs and burn CDs.

    It was easier to find the device drivers on the net and recompile my kernel and try various DVD players than trying to get a coherent answer from my PC and DVD manufacturer and the Windows consumer OS.

    No Movies

    No movies will ever be made of this account by reporters for the UK Independent on the Jenin massacre (which right now is being spinned quickly as `It did not happen')

    Posted on 26 Apr 2002


    Palestine

    by Miguel de Icaza

    The Guardian: Red Cross and Amnesty International say attack violated Geneva accords: Amnesty International concurred and called for an investigation on the same basis as the war crimes inquiries in the Balkans.

    An account of Israel War Crimes in the past few days.

    Like shooting an american young mother that was holding her 9-month old kid on her arms. Collateral damage. Maybe she had evil thoughts that had to be eliminated.

    Research Guide

    A Research Guide to the Palestine-Israeli conflict.

    Work out your own conclussions.

    Destroy their roots.

    why they had to do this? To demoralize the population:

    Let's not deceive ourselves; this was not a mission to search and destroy the terrorist infrastructure. If the forces breaking into every hard disk of every bank and clinic, commercial consultant's office or PA ministry, thought that a list of weapons or wanted men was inside the disk, all they had to do was copy the information and pass it on to the Shin Bet. If they thought incriminating evidence was hidden in the Education Ministry and the International Bank of Palestine and in a shop that rents prosthetics, the soldiers would have examined document after document, and not thrown the files on the floor without opening them.

    Keeping an eye for justice:

    From here:

    The globalization movement isn't anti-Semitic, it just hasn't fully confronted the implications of diving into the Middle East conflict. Most people on the left are simply choosing sides and in the Middle East, where one side is under occupation and the other has the U.S. military behind it, the choice seems clear. But it is possible to criticize Israel while forcefully condemning the rise of anti-Semitism.

    And it is equally possible to be pro-Palestinian independence without adopting a simplistic "pro-Palestinian/anti-Israel" dichotomy, a mirror image of the good-versus-evil equations so beloved by President George W. Bush.

    Posted on 24 Apr 2002


    Chomsky

    by Miguel de Icaza

    Today I went to see my Fourth Noam Chomsky talk. He answered questions about the current (current?) crisis in Palestine.

    Posted on 23 Apr 2002


    Colorado Delegations to Palestine

    by Miguel de Icaza

    The making of a suicide bomber: Diary of a 15 year old palestinian girl. In the meantime, a man watched his son die next to him.

    pictures

    Pictures of the conflict

    Posted on 22 Apr 2002


    Humor

    by Miguel de Icaza

    The iTolet

    UN

    Sharon states that the UN representative in the Middle East is a persona non-grata and has cut relationships with, after his statements yesterday about the situation in Jenin.

    Posted on 21 Apr 2002


    Free Software UI

    by Miguel de Icaza

    A great piece from Havoc on Free Software UI.

    Not only he answers the question of user interface design in free software, but also some more organizational issues of a project of the size of Gnome

    Infrahumans

    Hakam Kanafani is the CEO for Palestinian telecom company. He has a diary of the last two weeks.

    My take: Palestinians will be erradicated from the region, this year, or in the next 30 years. It is Israel objective, (see the older links for the history of the conflict). Terrorism is just today's excuse.

    If I were a Palestinian, I would just leave any land Israel claims to have divine rights to and move to a different country. Israel has no intention of any co-habitation in the area. The sooner people get out of there, the better for their families.

    Alex

    Today Alex said to me `If you have two groups of people who hate each other and one of them is going door by door looking for terrorists, what do you expect to happen?'

    Of course, you have to wonder, how Apache missiles targeted at buildings in Jenin were supposed to hit a terrorist.

    People are not allowed back in Jenin either (guess touching Jenin turns you into a terrorist), so they just shoot at them.

    Posted on 20 Apr 2002


    Concensus at Lawyer Point

    by Miguel de Icaza

    A blog about the activities of the hollywood lobbyists trying to take away our freedoms.

    Posted on 19 Apr 2002


    Boston

    by Miguel de Icaza

    Back in Boston after two weeks in Spain.

    Peru

    Congress man Edgar David on the use of open source software in the Peru administration.

    Posted on 18 Apr 2002


    Media

    by Miguel de Icaza

    The Guardian reports on a very interesting study done by the Glasgow University Media Group. on how the Palestine news are reported and why people do not understand what is going on.

    Gershon Baskin:

    They don't have faith in UN Resolutions. They see that that the entire world could not even send one Red Cross Ambulance into Jenin to rescue even one single life. Bush, Powell, Prince Abdallah, King Abdallah, President Mubarak, all of them and others can do nothing to help the Palestinians.

    Finkelstein

    First the carrot, then the stick Behind the Carnage in Palestine.

    Israel invasion.

    Some accounts from international volunteers that are trying to help the population in Nablus:

    Israel continues its invasion, after the successful cover up for the Jenin massacre, the Israel military continues the various violations to human rights and the agreements of the Fourth Generva Convention in Nablus: `No ambulances are allowed in':

    There are few patients in the hospital, not because there are few injuries or deaths, but because ambulances are not allowed by the Israeli military to reach the dead and dying.

    Of course, who cares about the 4th Geneva Convention agreements, when you already ignore years of resolutions from the UN to withdrew from the territories you illegally occupy?

    UN Vetos

    Why has the US consistently vetoed the UN Resolution 272, which calls for Israel to withdraw from the occupied territories?

    Posted on 17 Apr 2002


    by Miguel de Icaza

    Posted on 16 Apr 2002


    Saramago

    by Miguel de Icaza

    Recently my friend Alan got me to read `Blindness' from Jos� Saramago, and I loved the book immediately. The book is being removed from bookstores in Israel.

    Jos� Saramago (Nobel prize winer for literature) went to Palestine and was interviewed. I have only got pieces of it, and I am trying to find an english translation, I have a copy in spanish.

    Palestine.

    The Amnesty International report: Israel and the Occupied Territories: a must read, a quote from the Amnesty report:

    ''The military operations we have investigated appear to be carried out not for military purposes but instead to harass, humiliate, intimidate and harm the Palestinian population. Either the Israeli army is extremely ill-disciplined or it has been ordered to carry out acts which violate the laws of war.''

    Prime Minister Ariel Sharon, March 5, 2002, talking to the press:

    ``The Palestinians must be hit and it must be very painful. We must cause them losses, victims, so that they feel the heavy price''
    .

    Robert Fisk on the Jenin massacre. 150 civilians murdered by the Israeli Army. In the meantime, everyone is sitting still, watching what is that there is

    Chomsky talks about US-Israel-Palestine.

    Posted on 15 Apr 2002


    Saturday

    by Miguel de Icaza

    Amaya got a group of people together for dinner outside Madrid: Amaya, Ana Carolia, Bego�a, Hector, Israel, Juan, Marta, Lucia, Pablo, and Myself. We went outside Madrid for dinner.

    Me and Ana Carolia.

    Juantom�s joined us back in Madrid.

    Posted on 13 Apr 2002


    UAM

    by Miguel de Icaza

    Morning talk in the UAM. A large group of users from the Universidad Pontificia came.

    I also had an idea during my talk: countries could have a tariff on proprietary software. This has been done for centuries for other products to protect the local economy. The money from the taxes could be used to improve free software.

    Since it would be very hard to do this for every piece of software, I suggest that the tariffs are only impossed on proprietary software from mass monopolies.

    Sharp readers will be thinking that this goes against free markets, and the whole invisible hand theory that "magically" fixes economies. The problem with the theory of free markets is that we do not have one. We have a monopoly that has been found guilty of abusing of their position, and can not be broken.

    A tariff on proprietary software from a monopolist would help naturally balance our industry. Once they stop being a monopoly, and become another player, the tariff can be removed.

    More on Palestine.

    A reader found my weblog and sent me this great link. It contains all kinds of information, pictures and maps of the problem in Palestine.

    Posted on 12 Apr 2002


    More Palestine

    by Miguel de Icaza

    Live report from Ramallah.

    Gila Svirksy: Can you imagine life with no water, while men, women, and children are bleeding to death around you? And finally having to bury the corpses in an empty lot nearby, after days of keeping them at home?

    Tax Dollars At Work

    Mono talk

    Today I did another talk on Mono in the afternoon in the University in Mostoles (south of Madrid). Rodrigo Moya did a GNOME 2.0 presentation before my presentation.

    This picture was taken after the talk.

    Posted on 11 Apr 2002


    Senate

    by Miguel de Icaza

    Today I met with the members of the special commission on new technologies in the Spanish Senate. I got to see the senate, a beautiful building and visit their library and event attended a real voting.

    In the main room, we took many pictures.

    SanJuan

    Later in the day, we headed to the Colegio Mayor San Juan Evangelista where I did a talk on Gnome and Mono. Since there was no projector, the conference was a bit more informal. I had fun, and the student audience was awesome.

    We had a long session of questions and answers at the end. Also various good friends from the Madrid Linux Users Group were there.

    Posted on 10 Apr 2002


    Palestine

    by Miguel de Icaza

    I have been trying to understand what has happened in Palestine which started the current events, and I finally understand what has been going on. There are plenty of articles on the history of the conflict.

    I particularly like this account of events: "The origin of the Palestine-Israeli conflict".

    The article above is interesting in understanding why the Oslo and Madrid agreements are not being followed up on.

    The Electronic Intifada has pointers and resources to information on the new intifada. I read with interest the Historical Myths section (covering for example, the origin of the various wars, and the Israeli need for security).

    A countering view of things can be viewed in the Israeli Insider.

    The palestinians are in checkmate: Arafat locked down, 450 tanks vs 50 and 130 helicopters vs 2 and 450k active soldiers vs 69,000 militia man (as reported by Spain's newspapers).

    Elen Cantarow describes her experience.

    Chomsky has covered the topic in depth in various books, there is a short Q/A with him from a couple of days ago.

    From the front

    Reports from the front are available on the Electronic Intifada WebLog.

    Robert Frisk who has been covering the Middle East for a long time has a great piece.

    Neta Golan, an Israeli part of the 40 peace observers that are in the building with Arafat has a live report

    War criminals.

    I do not know what Arafat's background is, but Robert Fisk once called him a criminal of war (He did not go into the details in the article I read that, Robert was covering the bombing in Afghanistan).

    He refers in the same terms to Sharon.

    Electronic Intifada has an annotated resume of Sharon.

    Posted on 09 Apr 2002


    Madrid

    by Miguel de Icaza

    Nat and I were on a train back to Madrid, and ran into Montana, Jakub and Tuomas in . I am currently hosted at La Red's offices with Juantom�s

    Posted on 08 Apr 2002


    Guadec

    by Miguel de Icaza

    The Guadec (The Gnome Developers and Users Conference) conference in Sevilla is over.

    What a great conference we had this year. We had four tracks of activities going on. Guadec has grown a lot from the first Guadec conference we had in Paris.

    Various groups have developed around the project: the Anjuta developers had a strong presence. The Gnome Hispano group and various interest groups on specific areas of Gnome: Usability, Accessibility, training, project management and bug tracking.

    Everyone had a lot of fun. The Gnome Hispano group beat the record for continous partying at a conference. Many new developers came to the conference for the first time, I was looking forward to meet Naba, and finally he made it to the conference.

    Microsoft

    It is obvious that Microsoft has no intention of correcting their behaviour as Steve Ballmer had promised: to act responsible, and do the right thing, given that Microsoft is a monopoly.

    The new licensing changes to the CIFS specification are disturbing. It is disturbing because you would expect that a company the size of Microsoft that previously had competed by delivering what users wanted and improving their tools would do that, rather than depend on tricky licensing issues.

    Attacking the GPL as a license is just a smokescreen for the fact that Linux, that little operating system *is* fulfilling the needs of big sectors of users without giving Microsoft a chance to compete.

    Finally, I have been using Galeon has my web browser and it turns out that MSN and Hotmail no longer allow me to create new accounts using a plain Web Browser.

    What is most striking is the fact that Microsoft does not envision a world where there are multiple software providers. They envision a word where they are the only source of software for horizontal applications.

    patents

    I have come to realize recently that if software patents continue, those countries that do not acknowledge them (for their bogosity) could become software development paradises.

    Places where the software industry could still have a chance to compete without being hampered by artificial limitations.

    Posted on 07 Apr 2002


    Sevilla

    by Miguel de Icaza

    Today was the meeting of the GNOME Foundation's Advisory Board. It was great to see everyone again at the conference. During lunch, I picked Keith's brain about the history of X (again, in my quest to dig more in the history of software than software itself).

    The faith of OpenLook compared to Motif and how a consortium pushed for bad technologies to be adopted by technologies that were worst than what Sun and ATT had developed. Really interesting.

    Jim and Keith were running beautifully configured X servers with anti-aliasing, apparently I had never correctly configured my system, because Keith later during the week fixed my X configuration and I have the best anti-aliased desktop (after installing GdkXft).

    Evolution is so beautiful. It is a joy to read email with the anti-aliased, sub-pixel rendered fonts.

    I met for the first time Don from HP. Also the Mandrake guys demostrated their `Tasks' feature that they incorporated from Debian: a very nice idea to simplify the use of Linux.

    Fav-apps

    I would love if Ximian would ship GnomeMeeting. I have been asking Nat for this for a few months, but so far I had no luck. At least it seems like we will be shipping the enhanced Mozilla that does anti-aliasing, because it is so beautiful.

    Posted on 03 Apr 2002


    Sevilla

    by Miguel de Icaza

    I arrived to Sevilla at night. Vigu, Rocio and Juantom�s were at the airport to pick me up. Telsa had also arrived there.

    Nat was in bed when we got to our hotel, and was as funny as always.

    Posted on 02 Apr 2002


    Mono and Rotor

    by Miguel de Icaza

    Mono 0.10 has been released.

    Microsoft released Rotor, here is a link to the potential problems patent-wise.

    Posted on 28 Mar 2002


    ECMA

    by Miguel de Icaza

    Today was the last day of the ECMA meeting. After the meeting was over I had lunch with David Stutz and Lee Fisher and a few other guys from the .NET Framework's team.

    Posted on 21 Mar 2002


    dinner

    by Miguel de Icaza

    I ran into Sam Ruby as he was arriving to the hotel today.

    Later that night we went to have dinner organized by Dare Osbanjo (you might know him for his Java and C# comparission document). He got a group of really interesting people together: Joshua Allen, Paul Johns (Dr Gui) and Omri. I invited Lee Fisher.

    We had a great evening. The dinner discussion was really interesting (specially the licensing and open source discussion), because we had some really smart people on the table. The fascinating part of this discussion is that we were passionate about what we believed in on both sides of the table, but both sides exposed some very interesting points. For example, there is the matter of forcing people to release their IP, which bothers people.

    And just like it bothers me to not have source code, and not being able to change it, I could feel that we connected in terms of the fact that *forcing* you to release the code could bother other people on the same level. I still love the GPL, but I *can* understand much better the feeling if you watch it from the other side.

    Sam has some great thoughts on the subject as well: he goes into a bit of depth on the topic of communities and the various "protections" in them.

    Later on we explored a bit more of the archeology of .NET. In general, I have found that I do enjoy a lot the *history* of software projects and .NET is one of my favorite projects.

    Posted on 20 Mar 2002


    Plane

    by Miguel de Icaza

    I spent the whole day on an airplane coming to Seattle.

    I am almost done with `Blindness' from Jos� Saramago. An extraordinary book, I love the way this book is written. Thanks go to Alan for suggesting it.

    fuji

    My Fuji 6800 digital camera broke last week. It just started claiming `ERR CRD' and it would never recover. Am trying to get a replacement right now. But it is sad, because I will not get to take pictures of people in my trip and if I do not get a replacement on time, I will not have a camera by the time I go to Madrid in two weeks.

    Posted on 18 Mar 2002


    senate

    by Miguel de Icaza

    Today I talked about free software and open source on a video conference with the special commission on new technologies of the Spanish Senate.

    The Europapress post.

    A video is available here. Microsoft later charged against the GPL.

    Posted on 14 Mar 2002


    Today.

    by Miguel de Icaza

    Paolo got the Mono C# compiler compiling itself on Linux finally. It has been a long week. Dietmar and Ravi have been fixing bugs everywhere.

    Getting ready for the Jaguares concert tomorrow in Boston.

    My new of new books from Amazon just arrived, `The Adapted Mind', `Plane Insanity' and `Manufacturing Consent'

    Posted on 07 Mar 2002


    Wedding Pictures

    by Miguel de Icaza

    With Nat in Orlando Florida.

    We went to Ben's wedding in Disney World. Some pictures are here.

    Federico

    Federico has been taking some amazing pictures.

    Posted on 05 Mar 2002


    foot

    by Miguel de Icaza

    Last night as Duncan and I were walking from Sushi Express to Cafe Royale I twisted my ankle, and we had to cancel our plans to get intravenously cafeinated.

    The pain in the morning was more severe than it was when I went to sleep, so I did what every other google user would have done. I googled for the problem. I found everything I needed to fix myself up through google. The process of fixing yourself up in this particular case seemed pretty straight forward, so I followed the indication.

    The only bit I was not quite ready to handle was the `anti-inflamatory medication'. So I decided to get an appointment with my doctor to get some anti-inflamatories and to get a quick checkup.

    I took my Profits over People book from Chomsky, and my nice sweater I got from Chiapas.

    My doctor asked what the Chomsky book was about, and by the looks of my sweater, she ventured to say `Is that some kind of revolution?'. I found that funny.

    I found a loophole in capitalism.

    Today I went to see Michael Moore which is touring the country promoting his new book Stupid White Men.

    Michael's web site is a recommended reading for everyone, and the book is a great eye opener. He does this through humor, which is great. Michael is a great speaker as well, he went through the 90 minutes that were allocated for his talk in no time, and he kept the crowd informed and amused at the same time.

    Check the calendar for his book

    Posted on 27 Feb 2002


    Chomsky on the war on drugs

    by Miguel de Icaza

    I was always tempted to ask Chomsky about his opinion on the War on Drugs.

    Now there is an interview where he covers this subject. Fascinating.

    Posted on 19 Feb 2002


    FOSDEM

    by Miguel de Icaza

    The confence has been incredible and everyone I have met has been great. I have pictures.

    Leen Toelen from Mono fame came to the conference, and I had a chance to meet him, it is great to finally put a face to a name.

    In the morning I went to Damien's GnomeMeeting talk which was awesome. The program is awesome, the demo was awesome, and those guys know what they are doing.

    I also did my Mono talk. It went very well, as I prepared the talk with two days in advance, and I had been polishing it since I am now moving to use Open Office's presentations program instead of Magic Point.

    A great audience, and there were some really interesting questions after the talk.

    I spent most of my time with Damien, Ines, Jonita, Kenneth, Hanna, Matthias, Rodrigo and my friends from Spain (The two Carlos and Alvaro) Francisco de Urquijo also came to the show.

    Brussels is a beautiful city as well. I had a very good time, and as usual the food was excellent.

    Mono

    Open Office Slides for my presentation are here

    Posted on 17 Feb 2002


    Album

    by Miguel de Icaza

    I finally installed some gallery software. It was really easy, and works with PHP. Trivial to setup. I am loving it.

    My albums are here

    Dinner

    Went with my friends from Spain, Francisco and Michael to dinner to downton Brussels, and took many pictures that should be available shortly in my album.

    Posted on 16 Feb 2002


    Afganisthan

    by Miguel de Icaza

    The Guardian reports:

    "I sold my daughter for money because of the hunger," he says, shivering with fever in the chill of his mud and chaff house. "I sold my daughter to save the other people in my family, to save them from dying."

    And so Aziz Gul was contracted in marriage to a distant relative on the far side of the gorge that cuts off the village of Siya Sang from the outside world, for a down payment of 2m Afghanis - about �50.

    Posted on 09 Feb 2002


    chomksy

    by Miguel de Icaza

    Noam Chomsky at Harvard University. As usual a great talk, but this time the session of questions and answers was awesome: the answers were great stories that I had not heard before.

    At the end we met Noam and took a bunch of pictures.

    Posted on 06 Feb 2002


    Time

    by Miguel de Icaza

    From Time Magazine: How the US killed the Wrong Soldiers:

    Two dead Afghans were found with their wrists bound. One U.S. soldier left behind a note: "Have a nice day. From Damage Inc." Days after the attack, the classrooms at the school were still soaked in thick blood. Surveying the carnage, a Uruzgan elder said, "The U.S. must be punished for what they did in this room." Even mistakes aren't easily forgotten.

    Made me think of The My Lai Massacre. Kind of like this

    Black-Hawk-Down and Propaganda

    I was pondering whether I should watch this movie. Today I made up my mind not to watch it. At The Guardian.

    Embedded Gtk

    Interesting read.

    Chomsky

    Chomksy is talking this week in Cambridge. Just got his new book 9/11.

    Am reading also Catch-22, very amusing so far.

    Posted on 04 Feb 2002


    Final day

    by Miguel de Icaza

    Today was the last day of LWE. As usual, these things consume all of your waking hours, and by the last day I was pretty tired.

    The show was over relatively early, and everyone at Ximian had gone home (the two options we had were: to take a boat ride in NY or eat lobster in Boston). Patrick, Mancha and myself stayed another day to enjoy New York a bit more. We had dinner and a greek waiter at "Pete's" with the Rutgers University LUG members.

    Show

    Afterwards we catched the `De la Guarda' show in Union Square per Patrick's advise. Lovely show. Worth watching a couple of times. The NY times said about this show `Better than Sex'. Patrick, always full of expressivity summarized it with `No mames'.

    NYU

    We met with our friends from NYU (Felix, Mauricio, Ramon) and went for some bar hoping, despite the fact that everyone was very tired. Here are four mexicans in the third stop that night.

    Dinner

    Attempted dinner at 2am `El Coyote Cojo de las Nalgas Pintas' in the Village (see picture for evidence). Met with Mauricio's friend Alma Marcela (Silva de Alegria) at the last stop.

    Nice evening. Given that Patrick talked to everyone we ran into in the streets, cabs, shops or bars. More than one cab driver knows about Patrick's new son Nicolas.

    Mexico City

    Earlier this year I was in Mexico City:

    Roberto, Coffee shop.
    Plaza Loreto, Jan 1st.
    Raymond Hall.

    Posted on 01 Feb 2002


    New York

    by Miguel de Icaza

    Slides of my Mono talk are available here. They are in the trusty text/mgp format. The material is a bit out of date, but this is what was submitted for being printed a couple of months in advance.

    The show continues. Maddog likes my new camera (but I have not yet managed to get the flash settings just right).
    That day later on Mauricio showed up at the show. We went for dinner to `Uncle Nicks' with Mancha and Patrick.
    Despite being a long day, Nat and I had trouble sleeping, and went for a midnight snack on 5th avenue, close to our hotel.

    There was a guy sleeping.

    Posted on 31 Jan 2002


    Columbia University

    by Miguel de Icaza

    Did my talk at Columbia. Lots of interesting questions from the audience (some compiler students went, now if only they could email me ;-). Ben went to the talk!

    I do not have any group pictures, but I will post some of the individual pictures.

    Mancha and Patrick came to meet me to Penn Station.

    Posted on 30 Jan 2002


    Presentations

    by Miguel de Icaza

    I will be doing a Mono presentation at Linux World Expo on thursday 31 in New York City.

    And I have been invited to Columbia University (wooohoo!) to do a talk on Mono on Wednesday 30. You are welcome to come. Details are here

    Posted on 28 Jan 2002


    Ximian

    by Miguel de Icaza

    Woohooo! Galeon, Evolution and new Mozilla are on Red Carpet!

    I have switched from Mozilla to Galeon for my browsing needs. Funny fact: I installed Galeon to try their Smart Bookmark feature (where you get a Google toolbar entry and a Bugzilla toolbar entry) and never noticed that I did not miss Mozilla at all.

    It uses the same Mozilla engine, but the GUI integrates much better with GNOME and it is a lot more responsive. The tabbed feature has gone from proof of concept to a fairly usable implementation and the auto-portal is really nice.

    Posted on 26 Jan 2002


    Gnumeric

    by Miguel de Icaza

    Interesting article on Gnumeric. It is written in Spanish.

    It talks about GNOME-DB, the Basic support in Gnumeric and Guppi. Interesting overview.

    Funny

    I find the WinerLog funny. It apparently has a built-in 2-second delay in editthispage to discourage people from reading it.

    Posted on 24 Jan 2002


    camera

    by Miguel de Icaza

    Just purchased a new camera: the Fuji FinePix 6800.

    Time to hit reload and see when is it going to be delivered.

    breakfast

    I had breakfast with Eben Moglen this morning.

    Posted on 21 Jan 2002


    Chema

    by Miguel de Icaza

    You can read an interview with Chema here. Chema is not only in charge of our Mexico City development office, he is also in charge of the desktop team at Ximian.

    Mono

    It has been a while since I have updated the status of Mono here. Mono has been doing an enourmous ammount of progress

    Posted on 20 Jan 2002


    by Miguel de Icaza

    Mancha on the 100 franc bill. One day before the Euro kicks-in.

    Posted on 31 Dec 2001


    Mono

    by Miguel de Icaza

    Using statement is finished, hundreds of small bugs fixed as well. Did some hacking on the JIT engine, entertaining.

    Posted on 09 Dec 2001


    Propaganda

    by Miguel de Icaza

    Top level order at CNN to downplay civilian deaths in Afghanistan.

    I found the link at http://www.jihaddict.com/

    Hunger starts to strike in Afghanistan

    As stated by those informed (Chomsky also brought this up in his MIT talk) hunger in Afghanistan among refugees is starting to make its toll with many civilian deaths.

    "She hadn't eaten anything for 10 days," Baran said. "We have no tent, either. She froze to death last night."

    Baran brought his family to this camp outside the city of Herat 10 days ago from Badghis. Like hundreds of other families at Maslakh, which means "slaughterhouse," they have no shelter and are not yet eligible for food distributions.

    These people do not have to worry anymore about the evil Taliban inflicting pain on them. They have been liberated and released from these evil-doers. These people thank the bombing for releasing their souls from the evil oppression.

    Ximian Mexico

    Went today to the Ximian Mexico offices and met with Israel, Javier, Tambet (who is visiting town), Chema, Arturo. Federico was missing as he spilled coffee on his keyboard.

    Chema and I went to La Buena Tierra for an early dinner, and then across the street for some coffe. Very good location picked for the Ximian offices in Mexico.

    Mancha

    Went out with Mancha, Arturo, and Cynthia to Los Bigotes de Villa.

    Posted on 30 Nov 2001


    mono

    by Miguel de Icaza

    Implemented the base operator in Mono. While writing the test suite I ran into another piece of the compiler that I have neglected and have to start working on (mostly visibility issues).

    radio

    Today I was a guest at the Zona Libre a radio show that talks about Linux in Mexico City and broadcast from the University.

    We had a lot of fun: Mancha, Arturo, Natorro and I were there, together with a bunch of guys that run this volunteer radio organization.

    They have Pictures of the show, and you can also get the Audio (in spanish) and the IRC log

    Posted on 29 Nov 2001


    by Miguel de Icaza

    Posted on 28 Nov 2001


    Mexico

    by Miguel de Icaza

    Flew to Mexico City, Arturo picked me up at the airport.

    Later that night we had dinner at El Cambalache (Mancha's favorite meat restaurant).

    Mono-C# compiler

    Finally finished all the switch statement. The only bit missing now is `goto default'.

    Working on airplanes is excellent. I love working without a network connection to distract me.

    Posted on 27 Nov 2001


    train

    by Miguel de Icaza

    Back from New York at 1pm. The train from New York to Boston is pretty nice. You get to go to the coffee wagon, chill, get a spacious seat and they have AC power plugs for laptops.

    Posted on 26 Nov 2001


    NY

    by Miguel de Icaza

    I hug out all day with Mauricio. We mostly went restaurant and coffee hoping all day until it was time for the Jaguares Concert.

    We ran into a few other friends at the concert, it was pretty good, but I had the feeling that the singer was in some kind of rush to finish singing a song. I might go see them again in Boston on December 15th.

    Posted on 25 Nov 2001


    NY

    by Miguel de Icaza

    On my way to New York to meet Mauricio and to go see the Jaguares concert tomorrow.

    Posted on 24 Nov 2001


    Mono

    by Miguel de Icaza

    Switch statement in progress; Helped Ravi with the code to initialize arrays with non-static data.

    Posted on 23 Nov 2001


    spy-game

    by Miguel de Icaza

    Went to the movies with Tuomas, Radek, Duncan and Chema to see Spy Game.

    Posted on 21 Nov 2001


    monitor

    by Miguel de Icaza

    Staples happened to sell the Envision 17" LCD monitor. It is cheap, gorgeous and easy to carry around.

    Posted on 20 Nov 2001


    New-computer

    by Miguel de Icaza

    My new computer has arrived. A nice and shiny HP desktop for home use. It came with a copy of Windows XP Home edition, pre-installed and with no CD to reinstall it.

    As I tried to purchase a computer screen, I found out that MicroCenter had some pretty juicy screens, but they were expensive. And CompuUSA Cambridge is no more. They shut down.

    Posted on 19 Nov 2001


    Today

    by Miguel de Icaza

    Howard Zinn's article on "A Just Cause, Not a Just War" appeared re-printed in Mexico's Jornada newspaper today. You can read more at ZMag

    MIT Social Justice Cooperative produced two fliers One and two.

    An interview with Eqbal Ahmad, a Pakistani Scholar-activist that died on May 11, 1999 on the Taliban, Afganistan.

    Yossou N'Dur: ``The next song is for all kids that suffer; Kids are the first victims of repression, Seven Seconds''

    Operation Enduring Freedom, bringing Infinite Justice to people all over the world (click on images for details not on TV)

    News

    This page has good links on alternative News Sites

    In other news, Oliver Stone's movie JFK had an interesting side effect. Worth keeping in mind when you read Richard Stallman's opinion on today events.

    Posted on 15 Nov 2001


    Mono

    by Miguel de Icaza

    There is only one thing I have been afraid all of my life as a programmer (besides revere engineering device drivers) and it is to implement pointer dereference.

    I have never been able to figure out why I am afraid of it, it seems pretty simple in theory, specially with the CIL bytecodes. But there is still something unknown in there that makes me afraid of it. It is definitely material for my shrink to study.

    Anyways, in case you were wondering, I am still stuck in mutator unary operators while Dietmar hacked ValueType support and Paolo is quickly fixing System.Reflection.Emit bugs and Dick is busy finishing the threading/locking semantics of Mono to mimic the ones in Win32

    webpage

    I have been sprinkling my web page with a few pictures that I have taken. I also discovered that the HTML table tag is not as hard to use as I thought. One item less for the shrink.

    Posted on 12 Nov 2001


    Mono

    by Miguel de Icaza

    Still fixing the unary mutator operators.

    House

    I woke up late this morning.


    Exhibit A
    Nat was still yelling at his computer this morning. I made a mental note to investigate the matter in more detail later.

    It is hard to believe that such a peaceful person like Nat (see Exhibit A) could be yelling at a computer for 12 hours straight.

    Required-reading

    I finished last week reading Howard Zinn's Declarations of Independence. A required reading for every american (or anyone trying to understand americans).
    I am slowly going through my queue of pending books, the next victim is Tragicomedia Mexicana (this one is to understand how some people in Mexico got so rich, and how others got so poor).

    Posted on 11 Nov 2001


    Computer

    by Miguel de Icaza

    Ordered a desktop computer online. I just remembered that I forgot to get an ethernet card for it and a monitor. Details, details.

    Mono

    Ravi got enumerations going in the compiler, very good news. I am stuck handling a few non trivial cases for some unary operators.

    Movies

    Saw Amelie with Daniel. Best movie I have seen in the last two years. Wonderful movie.

    Not only is the movie excellent, but it manages to capture the spirit of Paris. Juantom�s had suggested in Spain that I watch it. I was in the mood to discuss the movie, but Daniel was in the mood to get a sweater. When I got home, Nat was yelling at his computer so I decided to purchase movies on amazon.fr as a replacement to discussing Amelie.

    Posted on 10 Nov 2001


    movie-night

    by Miguel de Icaza

    Went to the movies with Duncan and super hacker Radek (which just arrived this weekend to Boston) and we watched the Heist. The Fandango internet-ticket thing did not quite work as advertised so there was a long line of people waiting, and we missed the first few minutes of the movie.

    Radek

    I got a chance to talk to Radek about Mono and .NET. He currently works on GtkHTML together with Larry Ewing for the Evolution project, but he is looking for a spare time hacking activity.

    Mono is of course the right spare time activity for every hacker ;-)

    Posted on 09 Nov 2001


    Madrid

    by Miguel de Icaza

    My last day in Madrid. Lunch with Rodrigo, Juantomas, Hector, Ismael.

    Dinner with everyone. Went straight from dinner to pack, and then to the airport at 5am.

    Posted on 05 Nov 2001


    sleep

    by Miguel de Icaza

    Went to sleep at 7am, woke up at 12:30, just in time for lunch at Juantom�s'.

    Paella

    Juantom�s made a RFC for a Paella on Saturday. He cooked it today.

    Pictures available somewhere in the web site, I have to track them down.

    Hector came back from Valencia, and was quite sleepy.

    Posted on 04 Nov 2001


    Lunch

    by Miguel de Icaza

    Arroz caldoso with everyone.

    Posted on 02 Nov 2001


    Frankfurt

    by Miguel de Icaza

    Jetlagged and woke up at 2am, ran into Nat on irc.

    Went to the conference center and found that the GNOME booth was completely crowded! The guys in charge of the GNOME booth had been doing some excellent demos.

    A bunch of pictures (no thumbnails) from the Frankfurt trip are also available.

    Went to a panel on Open Source, met Roberto Zicari on the panel (after so many years of emailing each other).

    Did my Mono presentation

    Flew to Madrid very tired.

    Madrid

    Ismael, Juantom�s and Amaya picked me up at the airport.

    Mandatory dinner in town, we went to the Galician restaurant close to Ismael's house (which is now close to Juantom�s' new office).

    Stayed at Ismael's

    Posted on 01 Nov 2001


    Back home

    by Miguel de Icaza

    Traveling back home.

    Posted on 26 Oct 2001


    Morning

    by Miguel de Icaza

    Woke up late again, so I missed breakfast at the hotel and at the show. While on our way to the PDC we saw a show being shot a few blocks away from our hotel. The dude from McGiver was on the set. The bus driver told us everything we wanted to know about McGiver.

    PDC

    Pretty good talk from Jim on the internals of the CLR, I took various notes on his talk that I will share later on the Mono list.

    Someone asked about .NET on Unix and C# on Unix and Jim pointed to the shared source non-commercial implementation that Microsoft will be releasing and also mentioned Mono.

    Various people approached me after the talk to ask more about Mono. There was a lot of interest on .NET for Unix.

    I had lunch afterwards with various people interested in alternate implementations of the CLI and C# afterwards (Sam Ruby had lunch with us as well). It is always good to see Sam again, a very pragmatic guy, and also enthusiastic about C# and the CLI (he particularly likes the metadata).

    Ask-The-Experts

    In the late afternoon there was a large get together of people in the "Ask the Experts" hall. This has to be one of the best ideas of the show, basically there are various workgroups organized in tables with the various topics about .NET. It is easy to find the group you are interested in, and have a nice talk with them.

    I had a chance to meet Anders and enjoyed listening to the answers he gave to the various questions that people asked him. His comments were very interesting, as he shows definetly a sign of good taste in language design. For example, regarding the lack of exception checking in C# his answer was along the lines of: none of the current approaches really have proved to work or are too cumbersome. When we find a good way of implementing that, we will.

    Learned also that foreach (X i in SomeArray) is translated by the C# compiler into for (X i = SomeArray.LowBoundary; i <= SomeArray.UpperBoundary; i++), which turns out to be pretty cool as it generates code that is as efficient as it can be.

    I also ran into Dick Hardt which is a combination of a hacker and a businessman. Passionate about technology, and also interested in widening the use of Perl and Python in the windows world. He introduced me to some of the programmers at Active State and Ian who has been working on making Perl expose .NET components and consume .NET components.

    Don Box is a pretty cool dude. He is the only hacker I have outside the GNOME world that uses the word "dude". His new book is about .NET. A preview of the first two chapters of the book were distributed at the show.

    His new book is `a thousand times better written than the Essential COM book'. It was pretty funny that he told us `The Moniker section on the Essential COM book is the part I like the least; That and the first chapter of Essential XML'. So honest and so funny.

    Don apparently loves Barcelona.

    Jim Miller and David Stutz was extermely busy fielding a bunch of questions on the CLR, C# and ECMA.

    I was so tired and had so much wine, that I went back to the hotel afterwards (and got to discuss the GPL, american ideology and the war with Frank).

    Posted on 25 Oct 2001


    PDC

    by Miguel de Icaza

    Another long day at the PDC; Ran into Ben a couple of times. He finally got his Mac wavelan to work at the show.

    I decided to skip the concert as I was too tired and had a headache, so I went back to the hotel to sleep for a few hours before I went for dinner with Pilar and Sid.

    sister

    My sister picked me up at the hotel and we went over to her house which turns out to be perfectly decorated by things that both her and Sid have painted, built, designed and assembled.

    It was pretty amazing, I took lots of pictures of her house, it is a very nice place. Sid is a really creative person and builds all sorts of things.

    They both like LA.

    Posted on 24 Oct 2001


    Laptop woes

    by Miguel de Icaza

    I have been having some problems with my upgraded laptop and my upgraded OS. Been fighting them all day.

    The network at the PDC is horrible. Getting an address from the DHCP server can take up to a 30 seconds if you are lucky.

    Then they have some kind of proxy server that crashes all the time, because now is the second time that a guy shows up and tells us `Dont worry, we are rebooting the proxy server, it will be ready in a few minutes'.

    When the server comes up, I can visit many web sites, but many others just never resolve to an IP address. Randomly. Wild guess of the day: the Proxy Server is MS Proxy Server.

    Linux at the PDC

    I have not heard a single mention of Linux so far. But I ran into Ben Adida (from OpenACS) and Eric of AbiSource fame (which is not doing much AbiSource these days).

    All the talks are pretty focused on the new .NET stuff, which made me realize that we should ship and distribute a library to make propper use of Jabber on Linux. I am not sure if Gabber is enough, or if Gabber can act as the multiplexor it is supposed to be, but we should look into that.

    Ben is having a love/hate relationship with the various .NET technologies.

    Project-7

    Met Luis Daniel Soto in between breaks finally. He was kind enough to sponsor my trip to the PDC. Talked about Mexico, .NET, Passport and found out that he got married last year.

    I went to the Project-7 talk at the end of the day. The presentation on Fortran for .NET was pretty fun. Bertrand Meyer also tried to convince the audience that Eiffel was the way to go.

    Bertrand made a good point that is not mentioned very often. .NET will give people a chance to choose the best language for a particular application instead of choose a language because of the libraries provided by it.

    He also discussed how the Eiffel compiler for .NET supports multiple inheritance. It is a pretty cool trick: for each class created an interface is also created. So multiple inheritance is implemented by having the derived class implement both interfaces from the parents.

    Pilar and Sid have been working on their costumes for Halloween and they decided this year to use some science fiction characters, so they had been working on all the pieces: the dress, and the gadgets. I am not sure if I took pictures of that though. We had dinner in a nice restaurant called `North' in Sunset boulevard. We had a good night.

    Dinner with the ECMA guys

    Thanks to Sam Ruby, I had a chance to join the ECMA committee members that attended the PDC. A bunch of us got Mojitos at the restaurant.

    Bertrand poses with other ECMA members (here you can see Jim, the man in charge of the MS CLR). Bertrand made very compeling points on why people should use and buy Eiffel ;-)

    Posted on 23 Oct 2001


    Los Angeles

    by Miguel de Icaza

    As usual, I woke up and stayed in bed, so I spend most of my 60 minutes that I had reserved for having breakfast at home, taking a long shower and all that stuff in bed instead.

    Made it to the airport. They now check your boarding pass when you enter the restricted area and before you board the plane. You also need it to get during baggage claim.

    The airplane food used to be passable, I never complained about it (with the notable exception of TWA food which consisted of a piece of bread with a piece of ham and water). But these days the food is just bad.

    Sister

    Got to see my sister and her husband. She took us to a Oaxacan mexican restaurant in Los Angeles, and I had a wonderful barbacoa. It was so tasty. Jacob would have loved it, although he probably would just have ordered a burrito.

    I forgot to bring my camera, so I have no evidence.

    Posted on 22 Oct 2001


    Laptop

    by Miguel de Icaza

    I am still moving files from my old hard drive to the new hard drive. By the end of the day I was done.

    Thanks to the help of Duncan I got all the nice new features on my laptop setup properly: USB mouse, fully antialiased desktop, lots of new fonts, relevant updates and packages.

    I eventually got sick of the AA display, and have now gone back to crisp and clean non-AA fonts.

    I think that we should disable anti-aliasing small fonts, and only use it for certain weight/size and up. Anyways GdkXft is pretty cool, any monkey can get this working.

    Posted on 21 Oct 2001


    Ximian

    by Miguel de Icaza

    Today we celebrated Ximian's 2 year anniversary in the company. Bijan and David were out on a business trip, and we missed them.

    The spirit of the hackers at Ximian was present in the lounge as Nat had passed out from working 50 hours straight without sleeping. We also had to wake up Dan who also had passed out. Shortly after the celebration Vladimir passed out.

    So Ximian is as busy as we have always been.

    My camera is still at home so no pictures from me.

    Chomksy Audio

    The audio for yesterday's talk on Chomsky is now available in Real Audio format: Chomsky at MIT Audio

    upgrade

    I have now installed my new Red Hat 7.1 on my new machine and reinstalled VMware as well as all the software I use for developing Mono. Tomorrow I will be migrating my data from my current hard drive to the new hard drive and hopefully I can go on my trip with my new computer.

    Hopefully I will be able to run Gnome on AA mode, Duncan has been helping me out, as he has setup a beautiful desktop on his machine. I finally got everything working the way I wanted, although I am not very pleased with the anti-aliased fonts on my desktop, I think I will go back to the sharp fonts that I have been using.

    Nautilus

    I have been running Nautilus with Tuomas and Jakub's SVG artwork, and it looks so much nicer than anything I have used before.

    If I had copious spare time I would be hacking the task-oriented features of the new Windows file manager into it, it should be pretty simple to do.

    It is definetly a task for the various hackers in GNOME Love to do.

    Nautilus/Galeon

    I am convinced that we need to get a Galeon component for Nautilus which would bring the all nice browsing capabilities and the supporting infrastructure of browsing into the Gnome shell.

    Posted on 19 Oct 2001


    talk

    by Miguel de Icaza

    Today Anindita, Iain, Alex and I went to see Noam Chomsky's talk at MIT.

    Very good, I even took some notes, but they are incomplete, and you might be better off reading some of his recent interviews at ZNet. The MSNBC Chat With Noam has some of the content that was discussed today.

    c#

    This is my second day trying to re-organize the expression handling in the C# compiler to cope with Indexers and Properties correctly.

    The problem is that so far my whole model for evaluating expressions consisted of recursively asking each expression to "resolve" itself (which was perfect until this point). The resolution process might return a different object and by the time it returns, it has to set two values in the base: the Type of the expression and the expression classification.

    This breaks in some cases, because there is no guarantee that indexers will have both their set and get properties, and the argument (that can be properly implicitly converted, and hence used in an OverloadResolve operation) is not available unless it is the left side of an assignment. So, I have to do a lot of work to reorganize the sources around this change.

    sickness

    I am still sick from whatever I got on saturday, am starting to get better slowly, but the weather and the random changes in temperature at night have not helped.

    Posted on 18 Oct 2001


    evolution-1.0

    by Miguel de Icaza

    Evolution is fast approaching, Nat and I did a little thing for the hackers last night.

    laptop

    Installing new pieces of the laptop.

    Upgrading to a new version of the operating system is not worth all this pain.

    Posted on 17 Oct 2001


    music

    by Miguel de Icaza

    I am starting to appreciate more and more the new CD from Jaguares (Cuando la Sangre Galopa)

    I also have been listening to Norris Man, a CD I got from a Reggae concert that my mother and I saw in San Francisco a couple of months ago.

    nautilus

    Tuomas has been doing some incredible things with Nautilus.

    I also discovered that people have been putting together a bunch of Nautilus Scripts

    Posted on 16 Oct 2001


    conference

    by Miguel de Icaza

    Went to the Howard Zinn talk at the Massart, as usual very good.

    mono

    More work on Mono, things progressing nicely.

    Posted on 10 Oct 2001


    gnumeric

    by Miguel de Icaza

    Jody showed me some screenshots of the Excel graph importing support in Gnumeric.

    music

    Today's CD is `The Police Live'.

    Posted on 08 Sep 2001


    DotNet

    by Miguel de Icaza

    Found a large ammount of tutorial material from Conference.NET at Develop Mentor.

    Listened to a few of the talks from the conference at http://technetcast.ddj.com. Interesting bit. From Don Box: `The COM team put the COM in complexity' and

    Sergey checked in the new enumerations to the CVS.

    Movies

    American Pie 2. Enough said.

    Posted on 07 Sep 2001


    Mono

    by Miguel de Icaza

    An interview with David Stutz on Mono.

    Wired

    Wired's top article on Linux World Expo has some very nice things to say about what what we are doing

    LWE

    Still more interviews today, pretty good.

    Posted on 29 Aug 2001


    travel

    by Miguel de Icaza

    Going to San Francisco for LWE. This week is going to be super exciting!

    Last night I went to sleep very late, as I was reading some of the Winforms code. Doing a lot of learning, and a lot of coding.

    We arrived at the airport at 3:20, the airplane left at 3:25. We were the last two people to jump on board, so we got special seats (seats that are usually reserved for the crew).

    There was a little TV, and I asked Nat `What do think that button on the left of the screen does'. This button, I have to say is very misterious. Nat pressed the button a few times.

    Later a stewardess came and Nat asked `What does that button do?'. And she answered: `It shuts down the TV for the rest of the flight'. As it turns out, that was not a joke. We flew without any flight entertainment.

    The food on AA is getting worse every time I fly it. This time I got chicken, and it consisted of a very very tiny piece of chicken (the equivalent of two mozarella sticks).

    compiler

    The compiler is coming out very nicely. It is amazing how simple the C# language is. It is clean and simple, anyone can write a compiler for this thing with relatively little effort.

    Started to read the SGI Pro compiler source code, which is very interesting.

    Posted on 26 Aug 2001


    movies

    by Miguel de Icaza

    Saw the new Woody Allen movie. Have to see this movie a few more times.

    Saw the new movie from Amenabar. Excellent. A miggy-pick. That guy has done 3 outstanding movies in a row. Thesis still being my favorite.

    Posted on 25 Aug 2001


    Sergio

    by Miguel de Icaza

    One year celebration of the presetation of `No Llores Ojos Azules', the play from Sergio. I need to set up a nice image gallery, because I have hundreds of pictures of the event.

    Sergio Zurita, Jaime L�pez and Fernando Magari�os.

    Posted on 16 Aug 2001


    mexico

    by Miguel de Icaza

    In Mexico this week.

    dinner

    Laura, Mancha and I went to the Blu to have some dinner. Good tuna sashimi. Afterwards we went to cluny to satisfy Mancha's wild desire for chocolate crepes.

    Posted on 06 Aug 2001


    ACPI

    by Miguel de Icaza

    Jacob pointed me today to this post from Alan on the ACPI list:

    Sony have their own problems, from trying to sell cd's that will blow up innocent users speakers upwards. The big problem with AML is the moment someone puts any kind of content protection system into their AML control code people will risk a five year jail sentence in the US merely for owning an AML disassembler

    control-center

    The new control center is pretty nice.

    The Setup Tools are integrated there as well.

    evolution

    Evolution Beta 2 is out. Probably the most advanced GNOME application out there.

    I have started migrating slowly to Evolution, I still have a couple of gigs worth of email in my Gnus setup, so it is going to take some time.

    I discovered today that Evolution comes with a set of templates for your email, which makes html mail very pretty. "My Evolution" is also pretty nice, but i do not have screenshots around.

    It is extremely usable right now, I was very impressed with this release quality.

    The beauty of Evolution is how it integates so many technologies that we have been developing: The HTML engine has turned out to be extremely good with a built-in editor that supports GUI table editing. The Gnome Print setup generates very nice printed output. Gal is the foundation for a lot of the nice widgets on the screen.

    So many things to praise about Evolution. The constant work and polish from Anna, Jakub and Tuomas makes the product look very professional. It is really hard to describe, as everywhere I go, there are new features.

    Like the calendar now supports displaying per-category icons. Finally I can put all my birthdays with a nice icon.

    The VFolders, where I can quickly see if Nat has sent something urgent are really useful as well.

    Connected and disconnected operation. Man, where do the features end? Where? Where?

    And then the mailer has these beautiful thumbnails on images that people send you. Oh man, this rules.

    What am I doing with Gnus is beyond my comprehension.

    mono

    Got snapshots going today. Me and Dick started looking at the ORP interfaces to reuse their GC system.

    Compiler wise, I started generating assemblies with interface data a couple of days ago, I am currently doing the classes. Very nice hacks.

    The bottom line is that using System.Reflection.Emit for a compiler is just beautiful. It is simple, and it is trivial. Man, the power.

    sharpdevelop

    A new release of SharpDevelop is out.

    redhat-7.1

    I finally installed Red Hat 7.1 on my desktop computer. There are so many patches in that kernel. I could not get a kernel with modules by default. I must be missing something.

    Anyways, my HP 8230e CD writer is not working (although it seems like drivers/usb/storage knows about this device). It claims that the device refuses to get an address. Oh well.

    mexico

    Going to Mexico tomorrow. I am all excited and stuff.

    Posted on 03 Aug 2001


    photo

    by Miguel de Icaza

    Today we had some funny photo shoots

    Posted on 02 Aug 2001


    video

    by Miguel de Icaza

    Nice video from the Open Source vs Microsoft debate. Look for it yourself

    Mitchel and Tim are outstanding on that debate, do not miss it.

    Tiemman makes a good point on patents in there. He makes a point on patents and escalation of lost civil liberties, very good point. A smart man.

    Dave Winer has another good point

    Posted on 01 Aug 2001


    quotes

    by Miguel de Icaza

    Stealth viruses: ``Only in the World of Windows would adding 137kilo-bloat to a word processor document be considered "stealthy."''

    info

    How to Open SirCam files safely

    mail

    My record in mail sending has reached this month a new peak: 1679 mails sent so far this month (from Gnus, which is actually a partial count, that does not account for M-x mail and mail) . Compared to my last record: 1290 in May 2000.

    seen-on-the-web

    Eric Raymond on himself:

    Ever since I did "The New Hacker's Dictionary" back in 1991, I've had a strong and humbling feeling that the hacker culture invented me in order to see itself more clearly -- that my recent power as an advocate comes, when it comes, from expressing as purely as possible the dreams and aspirations and values of the hacker tribe.

    Posted on 31 Jul 2001


    home

    by Miguel de Icaza

    Its good to be home. After a week outside home sweet home, I returned and saw a Piano. I did not dare to touch it, as I will loose my self respect as a musician.

    quotes

    I have found some very good quotes on the various postings related to Mono, here are some of the jewels I found:

    From http://www.kuro5hin.org/story/2001/7/27/145058/342

    Whether dealing with Microsoft, Adobe, or any other company, the Open Source community has been nothing short of a simulator of the "Infinite Monkey" effect, where our reactions come from all directions and all viewpoints.

    This guy makes an interesting point on how to get organized to have a global single-logon system:

    http://slashdot.org/comments.pl?sid=01/07/28/041204&cid=305

    I can not find the others, but they were really good. Someone said something on Petreley: He does not understand a lot about .NET, but he is very afraid of what he does not know

    I wish I could get the original quote.

    cofradia

    My friend Popochas in Mexico today pointed me to his new news site: http://cofradia.org, beautiful logo. A web site to discuss open source news for the mexican community.

    Today they ran an article that talks about Proceso coverage on the Fox/Gates meeting: here.

    passport

    The article I wrote on my thoughts on Passport that is on the Mono site appeared on Slashdot today, together with a link to Joe Barr's Linuxtoday article.

    Many interesting comments, and I have updated the Passport page to reflect the comments from various people.

    cvs

    I did not know that SSH did not quite work correctly if the authorized keys did not have a space between the comma in the options and the actual key.

    This caused some lost time for the various developers that wanted to use the CVS. It should be fixed now, and I apologized already for the mistakes on your's truly ;)

    Posted on 30 Jul 2001


    Boston

    by Miguel de Icaza

    I am back to Boston after a week out.

    We were on the 5:50am flight, so as soon as I got home, I went straight to sleep.

    There is a new Piano in the living room. I tried playing like Phillip Glass, but failed. Back to hacking for me I guess.

    Posted on 29 Jul 2001


    ols-closing

    by Miguel de Icaza

    Ted Ts'o delivered the closing keynote of OLS. A very good speech. There are a few things worth mentioning about Ted's talk:

    Ted has joined the ranks of those who are still confused about what .NET is. It is completely understandable, given the fact that Microsoft labels everything as .NET. What is dissapointing is to see people making bold statements on the `Dangers of Mono' because it will allow Linux servers to participate with Passport.

    The bad news is: Linux servers can *already* participate with passport. Microsoft has been shipping the Linux development toolkit for Passport since the first day of their release.

    He also encouraged application writters to stop breaking the library APIs, because that gets vendors upset. I replied to him that kernel developers should get their act together and stop breaking the device driver API on each kernel release.

    Honestly, my mum really cares very little about getting a 0.0005% perormance improvement on her system. To the average user, it is more important to spend less time configuring and fixing the machine and dealing with device driver problems than getting a few nano-seconds less of latency.

    Remember: computers are cheap. Time is not.

    If Linux is going to loose to Microsoft is not because of some evil super plot and rollout of technologies like passport.

    Microsoft might win just because they understand `binary compatibility'.

    openbsd

    I remember when the OpenBSD did a port to the m88k machines. They needed drivers for their system, and they just use an 10-year old driver that they extracted from CMU Mach. Plug and play. It was working.

    party

    The Ximian Party as usual was great. Thanks Michelle! Thanks Nat! And everyone else who went to the party and made great conversation.

    I talked to Don Becker about GNU/Linux, and he had an interesting story to tell. Back in the day when he was at MIT and was an active contributor to gcc, he tried to get RMS to support Linux. RMS' answer back in the day went along the lines of `Linux is a waste of time, work on the Hurd instead, it is the future'.

    An interesting twist to the Linux vs GNU/Linux debate.

    Posted on 28 Jul 2001


    monikers

    by Miguel de Icaza

    Today I did my talk at OLS, after having an morning Ximian meeting.

    I decided to not talk about Monikers and Bonobo, and instead focused on Ximian's new project: Mono.

    There were a lot of interesting things to say about Monikers, specially the fact that our moniker implementation and design is much better than the Microsoft version, simpler, and more general.

    Microsoft begun their moniker work as a way of addressing a particular problem (object linking). Eventually, this grew up to be an object naming space, sort of by accident.

    We began on the other side of the spectrum: we saw monikers as an object naming space, and we walked towards implementing that. So `object linking' happens to be just one of the uses of monikers in GNOME.

    If you are interested in Monikers, you can read the docs we wrote on monikers: http://primates.ximian.com/~miguel/monikers.html

    Posted on 27 Jul 2001


    OReilly

    by Miguel de Icaza

    Our last day at the O'Reilly conference. We woke up early to have an interview with Rachel at the451, we talked about Mono, but we talked more about the cool stuff that we are doing at Ximian (Evolution coming out, Red Carpet getting better every day, the Setup Tools, etc).

    Then we headed for the Tiemman/Mundie debate. Nothing new to report, nothing that you have not read anywhere else. I felt there was not much to learn from the debate.

    Mitchell and Tim O'Reilly were the most lucid voices in the debate. I love them.

    I got to meet Dave Winer for the first time, he was as wise and smart as I had pictured him to be.

    leaving

    As we were taking our bus to the airport, we heard a woman ask a couple of the attendees `What is this convetion?'. The explanation of the `Open Source convention' from these guys begun like this:

    Well, there are two factions: the Open Source people and the Free Software people. It is all about being able to [...]

    The scary thing is that now people present things as a `split' movement. This is becoming ridiculous. First of all, I do not believe that there are two `factions': those who want freedoms and those who want source code. Instead there are hundreds of factions:

    those who care about cheap software; those who want sources to be able to change things; those who care about freedom; those who care about open protocols; those who care about open standards; those who care about cool features; those who care about complex software; those who want to learn from the sources; those who like some kind of scripting language; those who want to reuse software; those who want to innovate; those who want to use an alternative operating system; those who want to use a Unix system; those who want a unix system with drivers; those who want a secure unix system; those who want unix on the desktop; those who want to give back; those who want to build a different tomorrow.

    But you get the idea: there are many different reasons why you might like Open Source software. And not everybody agrees on two points: not everybody is working on Open Source/Free Software because they "belong" to a camp. There is no such camp division, but in the minds of those who want to push a specific naming convention over the other.

    Calling this `body' of software and reasons `Open Source' is good enough for me. I realize that other people might have different interests and reasons to use and contribute to the software than I do, and that is perfectly fine with me.

    I like the pragmatic approach of Tim O'Reilly: Tim does lean more towards new technologies. He likes Open Source, but deep inside Tim, you can see that his interest is more about how technology will change people's lives and hearing such an articulate man speak is a unique experience. When Tim speaks, I listen.

    Anyways, the bottom line is: we should not present our community as a split community. This is a community of people with different interests, which sometimes are aligned, and sometimes are not. This is not a black and white situation.

    airplane

    We flew out from San Diego to Ottawa to attend the Ottawa Linux Symposium

    Posted on 26 Jul 2001


    release-day

    by Miguel de Icaza

    We just released a new version of Mono and MCS, more classes, more stuff. The usual.

    Sean has been doing a great job in getting the complete package to build with a single `make' command. We are on our way to pass one entry more in the Joel test.

    lunch

    Today we attacked the Longhorm restaurant. Alex (whooo-pah!) Graveley came to the office to spend some time hacking, he had to (whooo-pah!) go back (whooo-pah!) home.

    rio

    So I got a Rio Volt player a couple of weeks ago, and I unpacked it today. The next step is to figure out a strategy to put my music on mp3 cds. What theme should each mp3 cd have?

    I do not think that a plain dump of my cd collection will do it. I think I am going to need various organizations:

    Per artist (so I can hear all the music from a single artist).

    Per theme (dancing, programming, chilling out, party, party for american attendees, reading, cooking, walking, sky watching, exploring the universe, looking at core dumps and annoying the neighbors).

    I got an external USB HP CD-RW, which does not work on Windows. I tried and tried, and it wont work. And people thought that Linux device drivers were hard. I have a few things to say about USB, HP-RW drivers and Windows 2000.

    femme fatales and old girlfriends.

    Jacob recently has been trying to go out with some femme fatale (actually, she is more like a wannabe femme fatale).

    Jacob should just use the Aztec Kiss.

    hacking

    The more I learn about code compiler-compilers, the more confused I am. LCC is one genuine pieces of beautifully architected code. I wish there were more design documents, and not the line-by-line documentation that the book is.

    Regarding the code generator-generators: They are beautiful beasts, and today I learned a few nice tricks like tree pattern matching, which made me feel definely smarter than I was yesterday.

    Posted on 14 Jul 2001


    work

    by Miguel de Icaza

    Wow! So we finally launched the Mono Project. Go check it out! It rules.

    The community has been really receptive, and I have tried to keep the FAQ updated and as much documentation as possible since the beginning (hey, our APIs are inline documented with gnome-doc ;-)

    Too many things have happened since the last time I updated my diary to remember. Laura came to visit to Boston this week, and I went to New York and had lunch with Mauricio, which was good.

    ximian

    Things at Ximian are as exciting as always. The Red Carpet team has been busy working on their next generation updater features: better, more, faster, nicer, quicker!

    Evolution went into a feature freeze last week or so, and the guys are working towards their UI freeze now, followed by their bug freeze. Great stuff.

    Nat also has scheduled The Ximian Setup Tools team to release their first public release (btw, it is available through Red Carpet, if you want to try out the all innovative, all ground-breaking technology).

    the-web

    I still think that there is no good infrastructure for building Web applications from my personal experience maintaing my home page (go ahead, laugh at me). I talked to Dave Winer who pointed me out to his manila software, and I will be trying to use it in the next few days.

    But I still got this feeling that there-must-be-something-I-am-missing.

    passport

    After launching Mono, I keep getting the question about Passport, so I decided to write up about it: here

    oreilly

    Check out a couple of stories at O'Reilly Network about .NET and Open Source

    reading

    Currently I am a busy bee, and I am reading as much as possible on code generation. Man, this is wonderful!

    Posted on 12 Jul 2001


    hack

    by Miguel de Icaza

    More work on the MonoNet runtime. I realized soon that the recent documentation released is already inconsistent with Beta1.

    So some research on the differences between Beta1 and Beta2 had to happen. This is a good excuse to leave this bit of the project alone, and go back to finish the type system on the compiler.

    lunch

    Mancha and Tonio

    Posted on 06 Jun 2001


    ximian-mexico

    by Miguel de Icaza

    Visited the offices of Ximian Mexico.

    doctor

    Went to visit my doctor to get fixed.

    Posted on 28 May 2001


    patrick

    by Miguel de Icaza

    Visited Patrick, had sunday lunch kind of thing. Tasty.

    Saw the Purple Rivers.

    Dinner late at el Charco.

    Posted on 27 May 2001


    fly

    by Miguel de Icaza

    Slept for an hour before I had to catch my airplane for Mexico City. Not as terrible as I expected it to be, my luggage was heavy though.

    arrival

    Had lunch with my friends at el Cambalache -again-

    Posted on 26 May 2001


    filesel

    by Miguel de Icaza

    Jacob has got also the icon-view mode mode working on the file selector. Today's version is pretty sweet

    pearl-harbor

    The raving review for Pearl Harbor from MrCranky

    Jetas

    Heard my friend Sergio on the Radio today.

    ximian-setup-tools

    A new release of the great Ximian Setup Tools is out, the team got support for SuSE, Red Hat 7.1 and Debian Woody on this release, plus a load of fixes, and many improvements. Progess is being done at an amazing pace.

    rpm

    I have been listening for some time to Ian explain to me the problems that RPM and the libRPM has. RPM was born as a good solution (by 1996 standards) for the problem of package management. But the library apparently changes the API, the ABI and the database format on every release (even on micro-updates the ABI changes, funfun). So Red Carpet actually has to cope with those problems by dynamically loading the library, and depending on the version, finding the correct entry points for the library.

    Pretty CRAZY if you ask me.

    laptops

    I think I am going to purchase the new Sony laptop

    Posted on 25 May 2001


    gnome-exe-handler

    by Miguel de Icaza

    Who would have thought that the debate would spawn such a large thread on the mailing lists. The heat is not turning down yet.

    guavac

    Got in touch with Guavac's author, and I keep reading the source code for the Guavac compiler. It is very similiar to my approach and actually has shed the light on a number of problems I did not know how to solve and where I was getting stuck.

    work

    New mailing list for the Labs team at Ximian.

    Posted on 24 May 2001


    chema

    by Miguel de Icaza

    So Chema went skydiving to California and achieved some kind of record.

    eweek

    GNOME has been mentioned a few times in EWeek in the past month, and I had not noticed until my friend Leila told me about it. Today's note, this one talks about us, and this one talks about Ximian's Red Carpet

    sun

    Sun released GNOME 1.4 for Solaris which is pretty cool. Now Solaris Intel and Solaris SPARC users can get enjoy GNOME.

    guavac

    I am still impressed by Guavac, the design is very elegant (just like my compiler, ahem, *cough*, *cough*) and I learned a few tricks in there: how to detect the use of uninitialized variables and I learned how it does type resolution.

    Very nice code. I mailed the author (David Engberg), I tried to find other software written by him afterwards, but could not find much.

    gnome-printing

    Lauris is making progress, and we got some input from Federico on how to support the OMNI drivers in `low memory consumption mode'.

    review-of-smoke-and-mirrors

    Smoke and Mirrors is a book that you *have* to read, but here is a new review I found.

    soup-is-out

    Alex has put out the first public release of Soup, the SOAP implementation for GNOME.

    lunch

    I had lunch with Mexico's consul in Boston at what used to be Legal Sea Foods, very close to the Arlington station. An interesting character.

    documentation

    Finally got my printed documentation bound. My life is a bit cleaner as I dont have to keep paper all over my office in unbound format.

    drinking-culture

    Went with the guys for drinking culture tonight at Bukowski's Tavern. Had some lasagna, and came back to work.

    opencola

    OpenCola released SwarmCast today.

    gnome-love

    Subscribers are still pouring into the GNOME Love effort, and we are starting to see some contributions. We feel all good and nice citizens.

    pondering

    Getting another Aeron chair, this time for home. So I can hack from the comfort of my bedroom.

    cameron

    Provided me with the Article to that great RMS presentation on MIT about copyrights and globalization.

    RMS can be a really nice person if you know how to get the best out of him.

    Posted on 23 May 2001


    Berkmanator-part-1-hide

    by Miguel de Icaza

    According to Joe Jacob has some kind of crush on the girl at the burrito place.

    Interview

    Nick Walker came to the office today. He seems like a very good programmer. The concensus was `Lets get him, and we later figure out what for'. He does not want to do UI coding, but I think he will get used to it.

    Jeff came with us to lunch, and we had a chance to discuss broken IMAP protocols. And lamented the state of the standards world.

    Jacob

    He is working busily on the new file-sel, there are a few screenshots here and there. We got a feature list for file-sel-1.0 and file-sel-2.0 done.

    He is also running into a few problems in ETable, but isn't everyone?

    linux-on-the-desktop

    We are doomed! We are doomed! Another reporter with the vision of a profet has predicted that Linux on the desktop does not stand a chance. I wonder what he expects to achieve with those articles (maybe he just wants to be regarded as a `pundit' or a `visionaire').

    Which reminds me of a story from Jamie Zawinski: "I always delete mail messages that begin with `I am what most people call a visionaire'". We know what follows that.

    GNOME got its own breed of those people in the early days in the GNOME UI mailing lists. Discussion threads would frequently shift towards debates like this: `We have to ask ourselves: what is a file anyways, and more importantly, do 8-bit bytes make any sense? Lets rethink computing'.

    Most of the GNOME hackers were actually visionaires and abandoned that mailing list for a full year. When we came back a year later, it seems like a completely different culture had evolved there, a whole different civilization. People are taking UI more seriously these days, specially after reading the stuff from `Joel on Software'.

    making-linux-simple

    So today I made my little contribution to make GNOME more usable by humans. The problem is that when normal humans download software on Linux, the software does not get the executable bit set, so there is no way you can launch those programs without changing permissions (which is way annoying for someone who has never dealt with Linux in the past).

    So I wrote `gnome-exe-handler' and put it in gnome-utils. This program will handle ELF and a.out files and set the permissions bit on demand. That is CRAZY! I know. I know. No applause, just throw in the money.

    My original idea was pretty hacky, but Yakk came up with the idea for the current implementation.

    ximian-setup-tools

    Chema and his hackers got a lot of momentum from the announcement last week of the XST. Now they are working furiously into getting more ports of the XST and bug fixing and pushing a new release out.

    Contributions seem to be pouring in, and it seems like we will be working with some developers that want to build a KDE user interface.

    Dietmar

    Dietmar was right about configuration bits: I think it makes sense to have individual configuration elements of applications as global programs that set values on the global configuration space, and have every application listen to that.

    gnome-games

    That stuff needs to be a bit maintained. Those games are not even using the latest and greatest widgets. Man, so many things to do.

    gnome-love

    After the recent announcement of the GNOME Love project on the GNOME weekly news, a flood of people joined the mailing list, and we are trying to help contributors to become full fledged hackers.

    tv

    Season Finale for that 70's show. SPOILER: Eric and Donna break up. Terrible. I know, I know. The good news is that Jackie and Kelso made it to the end of the season.

    Fez is always funny. And Hyde a Zen guide. Oh, and of course Kitty.

    health

    I swear I must have pieces of that killer potato on the lungs, because I can not get into shape.

    soup

    Alex today released for the first time Soup (a SOAP implementation) to the public in tarball format. This is good, as we can start using Soup in a few applications here and there.

    irc

    The debate over how to correctly assemble OAFIID's is back alive. Owen was porting gmc to use OAF instead of GNORBA and we ran into a debate on irc on unique component ids.

    The thread that will not die. At least we were not claiming we were technology pundits.

    Practical-Joke-Part-1-hide

    Told Jacob that I chit-chatted with the girl at the burrito place and told her about `my friend that has a crush on her'. He did not believe me. So I had to take further measures.

    Jacob later went with Joe to get some food, and I tagged along. I pretended to call the restaurant and talk to the girl the Berk has a crush on and say `My Friend with the crush on you is on its way and is wearing a hat'.

    Jacob got annoyed at me.

    chomski-and-zinn

    Been reading `The Manufacture Of Consent', I guess this is an article version of the interview on `Propaganda, the American Way'. It is a very sad reading. That and my Howard Zinn `On War' are just too sad to be true.

    memorial-day

    I have introduced a new keyword in my diary system that `hides' entries when I generate the text file, so I can keep a log of my inner thinking for the future. So my conclussions after reading Chomski and Zinn are kept hidden, you will have to get the books, read them and form your opinion ;-)

    hide

    With Memorial Day coming (and me finally figuring out what it means), I am not sure I am going to watch the Pearl Harbor movie. I keep thinking of the trailers `A day that will live in infamy', and then I think of Zinn and Chomski's text on the two million people assasinated in Vietnam, the victims of Korea, Chile, El Salvador, Nicaragua, Irak and Cambodia.

    Posted on 22 May 2001


    mhm

    by Miguel de Icaza

    Cleaned up the office. You get to wonder how I can convert a room into a pig hole in so little time.

    compiler

    Got the new typeref system in place. Now have to figure out whether I want to use my own internal -and large- parse tree types as the internal type representation, or bite the bullet and implement a Type interface, and access both the Reflection types and my internal types through this interface.

    I need to research what other compilers do.

    Did some massive all amateur printing action today.

    I discovered today that my compiler is designed in the very same spirit as Guavac is. Funny.

    ideas

    I had the most innovative idea that would change the way we think about the web. Alex claims my idea is lame, Jeff thinks I am a genius!

    software

    I saw Aethera from the Kompany in action. Not much in there, only a few menus work, and the rest seems to be a lot of GUI, but there is not much being done in there.

    gnome

    Found a few problematic areas that could be improved to enhance the user experience. So much to do.

    Contribute to GNOME! Look at http://www.gnome.org/todo

    Posted on 21 May 2001


    reading

    by Miguel de Icaza

    I have been reading a few other books, the first one is Drugs: Should We Legalize, Decriminalize or Deregulate? a number of essays from the various people involved in the war on drugs; pro-war and anti-war. An interesting reading to get the whole picture.

    My fully unbiassed opinion summed up in three word is: it is dumb. The whole explanation really requires you to read a lot more (John Gilmore's initial statement that caught my attention, followed by a story on the War on Drugs Smoke and Mirrors : The War on Drugs and the Politics of Failure.

    I have also been reading Howard Zinn's On War, a collection of articles he published in various magazines talking about the US Governments involvement in War. Mandatory reading for everyone.

    I first was introduced to Howard Zinn's books by my friend La Mancha who suggested I read A People's History of the United States : 1492-Present. Chilling book.

    hacking

    Ok, I figured what to do about handling the internal and external types --pretty much-- so I am going to fix the breakage I introduced last week, and get the thing in shape.

    xml-needs

    I need to understand XSLT so I can become a productive member of XML society that keeps all of its stuff in XML rather than this ugly combination of text files with Perl scripts that generate my horrible web pages.

    Posted on 20 May 2001


    waking-up-experience

    by Miguel de Icaza

    I left Nat and Taylor talking about which t-shirt to take to their trip to Bahamas around 4am.

    Going to sleep at 4:30 is really bad, because the birds start to sing really loud. So I have a hard time trying to sleep. Who would have thought that the beautiful sing of a bird would be so stressing when you are trying to sleep.

    Although I woke up at 3:30pm, a combination of people calling on the phone to check on what I had for breakfast and Michael's alarm clock going off at 10am, I had a bad sleeping experience.

    office

    Went quickly to the office to check e-mail, nothing really interesting, but a few emails from rms asking me to say `gnu/linux' in a place or two.

    media-lab

    Went to visit my friend Daniel to the Media Lab, where I got a demo of a bunch of cool things. I got to see the electronic ink, and a nice piece of software for kids to program little robots. And a lot of little robots. Pretty slick.

    dinner

    Went with Daniel to Vivian's birthday party, met a bunch of people. Had some nice mexican and spanish food for dinner there.

    I got really tired around 10pm, so I went back home to sleep.

    back-at-work

    Did some e-mail reading, and some more reading of the system.reflection api. Trying to achieve the nirvana here.

    Posted on 19 May 2001


    file-selector

    by Miguel de Icaza

    Dear Berkster, the code I had in file-sel for loading directories was a quick hack, and you should probably drop it all in favor of a full gnome-vfs aware piece of code.

    meekster

    Michael Meeks has got ORBit2 generating some tiny, tiny stubs and skeletons. Which is good for the platform. He also added a CORBA "strace" like facility, so you can see all the calls being done as he is now using a typecode-based generic marshaller.

    paolo

    Paolo has done a great job in making the Perl Bonobo bindings move along. The nice thing is that with Perl there is no need to create any stubs or skeletons, things just plain work.

    He has a number of nice demos in his gnome-perl module in the GNOME CVS. Vladimir used this to write a quick Next-like file browser built all with Bonobo components in Perl in an afternoon. Very very slick. Vlad also made use of his media player component.

    urquijo

    Urquijo reports from the EU meeting on Open Source that things are moving nicely over there.

    dietmar

    He has been working on the supporting the GNOME 2 platform with Bonobo-Conf as well as the current platform. Of course Bonobo-Conf rules (the "ideas" behind bonobo-conf were first explored in the Monikers for Bonobo document.

    Some documentation for the new bonobo-conf system are available here.

    mozilla

    Today's Mozilla snapshot is nice as it does completion as IE5 does, which is good. But the snapshot crashes when downloading files, so I had to move back to 0.9.

    Mozilla is amazingly fast these days.

    dancing

    Later that night, Iain, Alex and me went dancing on a pre-21 thing for Alex birthday. Of course, both Iain and Alex wear snickers. And not those of the discrete kind. They wear those blind-me white snickers (that Alex for some reason thinks are a sign of individual uniqueness), so we managed to not get into the Roxy.

    So we ended up in a small, not that classy place with horrible R+B place. Which Iain and I could tolerate, but which triggered Alex's sensitivity i-am-too-cool-to-listen-to-anything-but-elite-music sensor, so he enganged in moaning, complaining and bitching. I should have known better from last week's experience with Alex.

    He is cool on the outside, but in the inside he is even more picky than my most snob friends. So he left, and we came back to the R+B place to finish. Later apparently he felt guilty and made up some story and we ended up at the Blue Dinner again, where I enjoyed some nice pancakes.

    Posted on 18 May 2001


    dance

    by Miguel de Icaza

    Alex and Cheridy dragged Nat and me to the Axis for another night of lame music. Apparently today was the day where the `good music' plays. We discovered again, that the music was as bad as always.

    So we stood there talking about Ximian while Alex danced and Cheridy watched Alex look like a compact squid dancing.

    life

    Came back the day before from work at around 3am with Michael. And we did some debating on the kitchen.

    Later I did some reading before going to sleep of a book called `Drugs: should we penalize, decriminalize or regulate'. A set of articles from all the sides involved in thew war in drugs.

    So again I went to sleep around 5am.

    At 6am Nat's alarm clock woke me up (Nat just will not wake up, so I have go to his bedroom and kick him to turn the thing off).

    He likes to press on the `snooze' button instead of turning it off. I figured `maybe he has a meeting', but I figured wrong, he was just trying to `start the day early'.

    Of course the alarm clock went off another two times, and each time I had to leave my bed, walk to Nat's room and wake him up. After the third time I could not sleep anymore, so I took a shower under the false impression that it was 9:30am.

    Little did I know that it was 7am. It will remain a mistery why I thought it was 9:30am. So I came to work, and found the office empty, and only then I noticed it was 7:45.

    Later that day, I felt bad for not sleeping and was not being too productive, so went back to sleep at around 3pm hoping to be woken up by Amanda at 5pm, but I did not. So instead I woke up at 7:30m, ready to watch the Season Finale of Friends.

    RACHEL IS PREGNANT. Yes, Rachel by the end of the episode is pregnant, but we do not know who the father is. I just hope it is not either Tag or Ross. I hate them. I would be ok if the father of the baby is Joey.

    And of course Chandler freaked out about marriage, but Ross saved the day with his Karate knowledge.

    I also seem to have gotten dumped.

    hacking

    I started a rearchitecture of the type handling in the compiler, just to find a few hours later that rearchitecting the type handling during a period of sleep deprivation lead to too many warnings. So I took the hint and went to sleep as described above.

    printing

    We have a new Canon photo copier in the office that acts also as a network postscript printer. So I printed the new drafts from the ECMA standard.

    party

    Nat aka `Commander Flibbity Gibbits' together with AssBarn productions sent out the invitaion for the party at our place.

    Posted on 17 May 2001


    life

    by Miguel de Icaza

    I am an idiot.

    That pretty much sums it up for the day.

    Posted on 16 May 2001


    gnome

    by Miguel de Icaza

    Eazel officially shut down today.

    A number of people wonder what this means to GNOME and whether this is the end of free software.

    Ximian will of course contribute to Nautilus in the future, as it is part of our desktop strategy. It is sad to see Eazel go, and we will miss the guys, but we will continute working with their code base.

    Andrew posted bits of my reply here

    more-gnome

    Jacob is currently working on the new file selector for GNOME, using the gnome-vfs and wondering what this means: GLib-ERROR **: could not allocate 2080374800 bytes

    Posted on 15 May 2001


    home

    by Miguel de Icaza

    Woke up really late, and kept reading `Smoke and Mirrors' a fascinating book on the history of the war on drugs in the United States.

    I was prompted to read this book after I read the chilling description from John Gilmore on his web page.

    After reading the book, there are few things worth mentioning:

    • The US begun as a very idealistic country with a set of very idealistic core rights for every citizen that seems to have been dismantled by either political agendas, corporations, lobying and a few individuals in strong positions. Like various ammendments gave people a number of rights that no longer exist, which brings into consideration why would you even keep them if they are not valid.

    • That corruption happens everywhere, and that Mexico is not alone here.

    • Propaganda is used in a different form in democratic countries, as it needs to improve over the simplistic Orwellian basics (cool Chomski article on the topic here: http://www.geocities.com/CapitolHill/Senate/3761/prop.html. I wish I could find the original link, but I cant right now.

    The reading triggered some interesting discussion with Michael Meeks at the office yesterday and we did some looking around the web, there are a number of interesting sites discussing various pros and cons of marijuana and advocating its legalization or its complete banning. NORML is one. There is also some interesting reading here:: http://www.ecstasy.org

    reading

    I have been reading The Noam Chomski Archive and the Bad News: Noam Chomski web sites.

    I also got my hands on an interview with Richard Stallman on Copyrights and Globalization. I have been trying to remember where I got the link to it from, and I can not find the article again, but I will post it here when I have a chance.

    dinner

    Today Daniel Kornhauser and I cooked mexican dinner at home, and invited a bunch of friends over. We did some meat with adobo which was just absolutely tasty as well as black bean soup and had nice tamarindo water and crepas con cajeta.

    Posted on 13 May 2001


    work

    by Miguel de Icaza

    Ok, finally finished the Linux Magazine article, and I am pretty happy with the results. Now I need to bounce it back and forth a few times until all the rough spots in my written english are gone.

    I have been listening to some nice Indian rock that I bought a year ago in Mexico at Mix Up.

    dancing

    Around midnight I went dancing to the Axis with Alex and Iain. The music was so-so as usual, but we can not go anywhere else as Alex is not 21 yet, and wears these white "please watch that I am wearing" sneaker anywhere.

    Later when the club shut down we went to the Blue Dinner and had some cheese omelette. Ran into a friend, and Chris Lahey joined us as well.

    Came back to the office, tried to keep up with e-mail, tried to keep up with my web reading experience, and ended up going to sleep at 6am again.

    Posted on 12 May 2001


    work

    by Miguel de Icaza

    A single goal today: to write the Linux Magazine Article that I have been putting off for so long. This goal which seems so simple and trivial to achieve did take me all day, and by the end of the day it was obvious I was not happy with the result.

    I asked Jon at Ximian if I could deliver my article to Monday.

    haircut

    I got a fresh, crispy and perfect haircut today at Newberry street with Maite. I look perfect.

    clothing

    Arturo finally shipped my new, hip and cool new clothing to the US, so I got to try on my new jacket.

    stuff

    Nat is back from his trip to New York. Apparently the trip went really well. It was CRAZY according to some reports.

    Posted on 11 May 2001


    hacking

    by Miguel de Icaza

    More C# code work. This is amazing. Got e-lahey to write a pretty complex routine for me (because I am dumber than I look)

    ximian

    Wrote a reply to the article on LinuxPower on Ximian, Eazel, GNOME and the FSF.

    I also got to have a long talk with Chema about the future of the Ximian Setup Tools: they are now tackling a couple a few more projects: A simple `Make my Linux machine a home router', Font installation and Xfree configuration. Discussed how it integrated with SOAP and stuff.

    Posted on 08 May 2001


    hacking

    by Miguel de Icaza

    More work on my C# compiler as usual. Lots of progress, I think I can start working on the semantic analysis phase really soon now.

    gnome

    Joakim got the GNOME TODO system up again, I added a few more tasks here and there for new volunteers and asked people to send their favorite requests there.

    Posted on 07 May 2001


    hacking

    by Miguel de Icaza

    I keep working on my C# compiler. All looking good.

    Wow. I am tracking now fully interfaces. Looking good, looking good.

    life

    Woke up late, made some breakfast, and figured `MAN I GOTTA HACK'. So I went hacking

    Posted on 06 May 2001


    life

    by Miguel de Icaza

    Woke up really late (3pm) as the night before I managed to go to sleep really late again.

    I did some nice breakfast today, I decided to make some crepes, and as it turns out, I made some magnificient crepes, I did not expect the job to be so easy.

    Nat came back from the New Hampshire: he missed his attitude re-adjustment class (he overslept) and came back. He went directly to do some drinking with the now-21 Assbarn CEO Joe.

    movies

    Went to see Platoon to the midnight show in the Fenway, this is the first time I see this movie. This is increasing my Oliver Stone set of movies I have seen. I failed to recognize if he was trying to tell a different side of the story of the vietnam war, or not.

    reading

    Continued reading ` Smoke and Mirrors' a book about the War on Drugs in the United States. How it begun and the politics behind it. I originally got interested in the topic after reading John Gilmore's web site.

    The whole war on drugs thing is pretty sad, because legal and medical uses of Mariguana are discouraged by a combination of panic, miss-information on the general population and the politics behind it.

    music

    I keep enjoying my new aquisitions: Hola and Chao from the Fabulosos Cadillacs.

    hacking

    I keep hacking on my C# Compiler

    Got inherited classes working, interfaces and a few more things being parsed. Constants are recorded and dumped as well as block variables being dumped to the C# backend of the compiler.

    Posted on 05 May 2001


    work

    by Miguel de Icaza

    Spent all day at company meetings outside Boston.

    work-hide

    Went to an AOL meeting to discuss possible involvements of Ximian and AOL: an AOL PC and an AOL Media Console. The people involved in the meeting did not think the AOL PC is a worth project to pursue (mostly from the AOL TV and Instant AOL projects), although the office of the CTO seems to think that a proper response to .NET must be done.

    life

    Went to Harvard Square for dinner with Alex after I came back from my trip, we had lunch at the eastern restaurant and hanged around the place watching people play. Of course anything that is not typing in a keyboard makes Alex uneasy, so we had to leave after his repeated nodding.

    Dragged Alex home, hoping we would hit some of the dance clubs where this under-21 year old gentelman could dance, but ended up in my appartment dancing with Abby.

    Nat went to New Hampshire to an `attitude re-adjustment class' which will teach him not to speed. He might have gotten a better deal if instead of showing up to court with a lawyer to defend the Yupi boy with a BMW had just shown up alone.

    Posted on 04 May 2001


    gnome

    by Miguel de Icaza

    Board of directors meeting of the GNOME foundation.

    hacking

    More work on my C# compiler.

    Posted on 01 May 2001


    freesoftware

    by Miguel de Icaza

    Went to the Marriot in Cambridge to meet with a bunch of people that were attending a micro open-source summit organized by Michael Tiemann at Red Hat.

    Interesting things were discussed (the validity of the Open Source message these days, .NET, the future of Open Source, people we would like to see involved in the effort, etc).

    The participants included: Mitchell Baker, Russ Nelson, Jim Gettys, Andre Durand, Dan Frye, Phil Greenspun, Ben Adida, Michael Tiemann, Guido van Rossum, Tim O'Reilly, Chris Blizzard (this is the official list, and actually there were a few differences with the actual attendees).

    ximian

    We released Ximian GNOME 1.4 today (The Prion release), it is pretty cool, it includes `MonkeyTalk' a support chat system integrated with the desktop and it also includes Red Carpet 1.0, our super perfect package management system. It is a cross platform installation and update system which just totally rules.

    We also have a few nice improvements in it: an improved GtkFileSelector dialog as well as integration of GMC and Nautilus desktop directories and automatic reloading of contents of the desktop. Mozilla was modified to save downloaded files in your desktop, so it all works out very nicely.

    life

    Ana left for Mexico this morning as I was on the Open Source summit.

    In the afternoon I catched up with the guys that were celebrating the Ximian GNOME 1.4 release.

    Posted on 24 Apr 2001