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.
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
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 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
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
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
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
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
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
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.
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
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