Sharpen, an Open Source Java to C# converter 3
Today folks at db4o released Sharpen, an open source Java to C# converter.
Am happy to see this coming, as it is soming I’ve pushed strongly for when I was working at db4objects, and was hacking on it, mentored by its main developer, Rodrigo. There I had the chance to improve the generated code, to make it look like hand written code, that follows .net conventions.
It’s nothing magic, and requires compromises on both the Java and the generated C#, but it’s pretty handy, easily hackable, and all in all, damn useful.
Rodrigo wrote a nice tutorial on Sharpen.
Time to port your Java applications to the amazing Mono!
Mono and the Summer of Code 2
For the fourth time, Mono has been accepted as a mentoring organization for Google’s Summer of Code.
I started contributing to Mono at the end of 2004, and I was lucky to be accepted as a student for the very first Summer of Code during the 2005 summer. And I was even luckier to be accepted again the year after. This year, just like the year before, I’m a possible mentor.
The Summer of Code is an amazing opportunity for young developers to be involved in a FOSS project, to learn, to practice programming on exciting projects, while being surrounded with talented peoples. And also to have a great summer. And to get a cool t-shirt.
Oh, and for what it’s worth, five students (including me) from the previous SoC editions are now employed by Novell to work on Mono or Moonlight.
So yeah, if I had an advice, that would be to go have a look at the proposed tasks, you can even submit your own original proposal if you think you have a bright idea, and apply for it. You have three days.
Mono.Cecil vs System.Reflection 2
My friend Patrick, who’s leading the amazing NDepend effort wrote a great post comparing Cecil against the built-in System.Reflection:
Mono.Cecil vs System.Reflection
Thanks Patrick for the kind words!
Yet another Hello World
using System;
using System.Linq.Expressions;
class HelloWorldOfTrees {
static void Main ()
{
var param = Expression.Parameter (typeof (string), "p");
var cwl = Expression.Lambda<Action<string>> (
Expression.Call (
typeof (Console).GetMethod (
"WriteLine", new [] { typeof (string) }),
param), param).Compile ();
cwl ("Hello World !");
}
}
[mono] /tmp @ gmcs test.cs [mono] /tmp @ mono test.exe Hello World !
Well heh, you can’t do really much more than that, but at least, that is working (sort of).




