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
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
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
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
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
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
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
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
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
Are you adapting to win yet?
Posted on 16 Aug 2006
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
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
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
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
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
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
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
On the double super secret background channel #ipodsharp:
<tseng> hating mono makes you ugly
Posted on 07 Aug 2006
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
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
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
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
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
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
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
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.
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
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.
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.
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.
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 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
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
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