<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Jb in a nutshell: Category Mono</title>
    <link>http://evain.net/blog/articles/category/mono</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Mono 2.0</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/2917328657/" title="Mono 2.0 by Jb Evain, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3023/2917328657_37428d5034.jpg" width="500" height="333" style="border: 2px solid black" alt="Mono 2.0" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.mono-project.com/news/archive/2008/Oct-06.html"&gt;&lt;i&gt;Mono&amp;#8217;s 2.0 grand release has finally arrived.&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 06 Oct 2008 09:00:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:8486a781-2b20-496c-a90b-e315b81442bf</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/10/06/mono-2-0</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/516</trackback:ping>
    </item>
    <item>
      <title>LINQ Expression Trees on the Compact Framework</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/224749567/" title="Red Church, Blue Sky by Jb Evain, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/90/224749567_0e49c30cd5.jpg" width="500" height="333" alt="Red Church, Blue Sky" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;A week ago, I was &lt;a href="http://evain.net/blog/articles/2008/09/14/c-3-and-linq-on-net-2"&gt;writing&lt;/a&gt; about the ability to use &lt;a href="http://www.mono-project.com"&gt;Mono&lt;/a&gt;&amp;#8217;s System.Core to run C# 3 and &lt;span class="caps"&gt;LINQ&lt;/span&gt; applications on .net 2.&lt;/p&gt;


	&lt;p&gt;A few months ago, I was &lt;a href="http://evain.net/blog/articles/2008/02/06/an-elegant-linq-to-db4o-provider-and-a-few-linq-tricks"&gt;writing&lt;/a&gt; about the new &lt;span class="caps"&gt;LINQ&lt;/span&gt; provider that friends at &lt;a href="http://developer.db4o.com"&gt;db4o&lt;/a&gt; released. This &lt;span class="caps"&gt;LINQ&lt;/span&gt; provider uses &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression trees to optimize &lt;span class="caps"&gt;LINQ&lt;/span&gt; queries, turning them into db4o&amp;#8217;s native query language.&lt;/p&gt;


	&lt;p&gt;Today I&amp;#8217;m going to write about a cute new hack from our friends at db4o.&lt;/p&gt;


	&lt;p&gt;If the 3.5 version of the Compact Framework comes with a System.Core, and a &lt;span class="caps"&gt;LINQ&lt;/span&gt; to objects implementation, it doesn&amp;#8217;t contain the namespace System.Linq.Expressions, which is used by all optimized &lt;span class="caps"&gt;LINQ&lt;/span&gt; providers. What those fine folks did, was simply to take Mono&amp;#8217;s implementation of this namespace. There was one issue with that approach. Expression Trees can be compiled at runtime, and that uses System.Reflection.Emit, that the Compact Framework doesn&amp;#8217;t have.&lt;/p&gt;


	&lt;p&gt;A nice thing is that folks at &lt;a href="http://www.mainsoft.com"&gt;Mainsoft&lt;/a&gt; contributed to Mono&amp;#8217;s System.Core an expression interpreter, which allows you to use the full &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression trees without using System.Reflection.Emit. They sent me the patches they have for the expression interpreter to make it pass the full test suite we have, so I&amp;#8217;ll integrate it shortly.&lt;/p&gt;


	&lt;p&gt;And voilà, just by using Mono&amp;#8217;s implementation of System.Core, and by hacking a little in it, to make it compile on the Compact Framework, they&amp;#8217;ve been able to produce a new assembly, System.Linq.Expressions.dll. You just have to reference it in your Compact Framework project, and it will let you use &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression trees, which allows you to write optimized &lt;span class="caps"&gt;LINQ&lt;/span&gt; providers for the Compact Framework.&lt;/p&gt;


	&lt;p&gt;Of course, this is completely open-source and licensed under the &lt;span class="caps"&gt;MIT&lt;/span&gt;/X11. For now, you can find the code in &lt;a href="https://source.db4o.com/db4o/trunk/db4o.net/Libs/compact-3.5/System.Linq.Expressions/"&gt;db4o&amp;#8217;s repository&lt;/a&gt;, but I&amp;#8217;ll backport the changes they did to the &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression interpreter, so that people that want to use it can use our code base directly.&lt;/p&gt;


	&lt;p&gt;Congrats to you guys for making the finest choice in the third party code you ship!&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 19:59:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:e19d5d22-0fc9-46fa-bab3-dbf39cc1ec50</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/09/22/linq-expression-trees-on-the-compact-framework</link>
      <category>Mono</category>
      <category>db4o</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/515</trackback:ping>
    </item>
    <item>
      <title>C# 3 and LINQ on .net 2</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/429558558/" title="Macro test by Jb Evain, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/167/429558558_58ec2bf043.jpg" width="500" height="333" alt="Macro test" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;My friend &lt;a href="http://codebetter.com/blogs/patricksmacchia/"&gt;Patrick&lt;/a&gt; is &lt;a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/09/14/targeting-the-net-runtime-version-2-0-matters.aspx"&gt;wondering&lt;/a&gt; what&amp;#8217;s the best way to use the type &lt;a href="http://msdn.microsoft.com/en-us/library/bb359438.aspx"&gt;System.Collections.Generic.HashSet&lt;/a&gt;, in &lt;a href="http://www.ndepend.com"&gt;NDepend&lt;/a&gt;, that he wants to deploy on computers with only .net 2 installed.&lt;/p&gt;


	&lt;p&gt;Well it&amp;#8217;s pretty simple, the best way to get it, is to get it from &lt;a href="http://www.mono-project.com"&gt;Mono&lt;/a&gt;. The code is licensed under the &lt;span class="caps"&gt;MIT&lt;/span&gt;/X11 license, allowing multiple usages.&lt;/p&gt;


	&lt;p&gt;And that&amp;#8217;s not all. If you&amp;#8217;re dying to use C#3 or &lt;span class="caps"&gt;LINQ&lt;/span&gt; to objects in your application, but that you want to be able to release on .net 2 only, you can simply compile and ship Mono&amp;#8217;s implementation of System.Core. Microsoft&amp;#8217;s C# compiler, csc 3.5, won&amp;#8217;t have any issue using it, et voilà, you&amp;#8217;ll get an application using &lt;span class="caps"&gt;LINQ&lt;/span&gt; or C#3, and deployable on .net 2.&lt;/p&gt;


	&lt;p&gt;Mono&amp;#8217;s implementation of System.Core is available in &lt;span class="caps"&gt;SVN&lt;/span&gt; &lt;a href="http://anonsvn.mono-project.com/source/trunk/mcs/class/System.Core/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sun, 14 Sep 2008 19:08:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:a731ce73-b01c-40a6-9b8e-2e9c5cb03984</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/09/14/c-3-and-linq-on-net-2</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/508</trackback:ping>
    </item>
    <item>
      <title>Cecil performance issues</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/2496833680/" title="Then it showed up by Jb Evain, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2032/2496833680_7d3b8086f5.jpg" width="500" height="333" alt="Then it showed up" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;At the beginning, &lt;a href="http://mono-project.com/Cecil"&gt;Cecil&lt;/a&gt; was written to be an assembly manipulation library. The initial goal was to be able to read assemblies without loading them in an AppDomain, and also, to expose more that what .net 1.1 provided.&lt;/p&gt;


	&lt;p&gt;I implemented the writing parts of Cecil during my first Summer of Code, and barely touched it after, at it turns out it was working.&lt;/p&gt;


	&lt;p&gt;But this summer, two great hackers, &lt;a href="http://weblog.ikvm.net/"&gt;Jeroen, author or &lt;span class="caps"&gt;IKVM&lt;/span&gt;&lt;/a&gt;, and &lt;a href="http://rolfkvinge.blogspot.com"&gt;Rolf&lt;/a&gt;, our &lt;a href="http://www.mono-project.com/Language_BASIC"&gt;&lt;span class="caps"&gt;VB 8&lt;/span&gt; compiler&lt;/a&gt; author, decided that they gave enough blood and sweat to work around System.Reflection.Emit issues, and prototyped a version of their project based on Cecil instead.&lt;/p&gt;


	&lt;p&gt;If Rolf decided to go the full Cecil way, and replaced the usage of System.Reflection and System.Reflection.Emit (his &lt;a href="http://anonsvn.mono-project.com/source/branches/rolf/cecil-vbnc/"&gt;branch is available&lt;/a&gt;), Jeroen decided to write a layer on top of Cecil that mimics the System.Reflection.Emit &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Both wrote a sum-up about their findings, &lt;a href="http://weblog.ikvm.net/CommentView.aspx?guid=afda88af-e2cf-47d6-917b-5f3134b681c1"&gt;here for Jeroen&lt;/a&gt;, and &lt;a href="http://rolfkvinge.blogspot.com/2008/08/cecil-reloaded.html"&gt;there for Rolf&lt;/a&gt;. And both came to the conclusion that Cecil performs a lot less well that System.Reflection.Emit, both in terms of speed and memory consumption.&lt;/p&gt;


	&lt;p&gt;Rolf also uses the &lt;a href="http://anonsvn.mono-project.com/source/branches/cecil-delayed-loading/"&gt;delay loading branch&lt;/a&gt; of Cecil, created by &lt;a href="http://dev.mainsoft.com/"&gt;Mainsoft&lt;/a&gt; for their &lt;span class="caps"&gt;CIL&lt;/span&gt; to Java bytecode translator.&lt;/p&gt;


	&lt;p&gt;So the point is that Cecil uses too much memory, and is not fast enough in those scenarios, while it performs better in the reading only or reading + manipulating.&lt;/p&gt;


	&lt;p&gt;The good news is that, thanks to those hackers, we have now two amazing test cases to work on and to optimize. I&amp;#8217;ve also started a few weeks ago, as a night hack, a refactoring of Cecil, that removes the intermediate structures that the current version of Cecil uses to read and write assemblies. If that makes reading and writing a little bit more complicated, it should also save a lot of memory.&lt;/p&gt;


	&lt;p&gt;And who knows, maybe one day, when Cecil will be optimized properly, and that the &lt;span class="caps"&gt;SRE&lt;/span&gt; on top of Cecil layer will be sufficient, it will require only a couple of changes to base mcs on Cecil.&lt;/p&gt;


	&lt;p&gt;Anyway, kudos to those hackers, let see what I can do to catch up.&lt;/p&gt;


	&lt;p&gt;&lt;i&gt;We&amp;#8217;ll let you know!&lt;/i&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 02 Sep 2008 08:45:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:c0f4d289-1f2a-4182-a73a-cb4de4989768</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/09/02/cecil-performance-issues</link>
      <category>Cecil</category>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/504</trackback:ping>
    </item>
    <item>
      <title>System.Scripting</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/271257238/" title="Plume by Jb Evain, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/117/271257238_e544c3fe8e.jpg" width="500" height="333" alt="Plume" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Two days ago, I was sharing what I was foreseeing for &lt;a href="http://evain.net/blog/articles/2008/07/29/net-4-c-4-and-the-dlr"&gt;C# 4 and .net 4&lt;/a&gt;, and the integration with the &lt;span class="caps"&gt;DLR&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;Turns out that today, by reading &lt;a href="http://blogs.msdn.com/shrib/archive/2008/07/30/idispatch-support-on-in-ironpython-beta-4.aspx"&gt;this post&lt;/a&gt;, my eye was caught by the namespace I was thinking about: System.Scripting.&lt;/p&gt;


	&lt;p&gt;But this post is about the beta 4 of &lt;a href="http://www.codeplex.com/IronPython/"&gt;IronPython&lt;/a&gt; 2, that hasn&amp;#8217;t been released yet. But heh, it&amp;#8217;s easy to forget that latest IronPython code can be &lt;a href="http://www.codeplex.com/IronPython/SourceControl/ListDownloadableCommits.aspx"&gt;downloaded from CodePlex&amp;#8217;s &lt;span class="caps"&gt;TFS&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;And it indeed turns out, that in the latest revision, Microsoft.Scripting.Core namespace has been renamed to System.Scripting, and that the &lt;span class="caps"&gt;DLR AST&lt;/span&gt; has been merged into System.Linq.Expressions.&lt;/p&gt;


	&lt;p&gt;So yeah, I guess we can safely admit that C# 4 will have statements support inside expression trees.&lt;/p&gt;


	&lt;p&gt;And that .net 4 will contain very cute features for dynamically generating programs, without resorting to emitting plain IL, simply using the &lt;span class="caps"&gt;DLR&lt;/span&gt;, contained in a new assembly (or namespace, if they move some to parts to System.Core), System.Scripting.&lt;/p&gt;</description>
      <pubDate>Thu, 31 Jul 2008 10:36:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:a23e7961-baa9-408a-85dd-0a32a8d44cf9</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/07/31/system-scripting</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/493</trackback:ping>
    </item>
    <item>
      <title>.net 4, C# 4, and the DLR</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/453037066/" title="On the road again by Jb Evain, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/170/453037066_16cc80df54.jpg" width="500" height="333" style="border: 2px solid black" alt="On the road again" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;b&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/b&gt;: turns out that there&amp;#8217;s some true in those previsions, a small &lt;a href="http://evain.net/blog/articles/2008/07/31/system-scripting"&gt;follow up&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been thinking a bit about the discussion in &lt;a href="http://channel9.msdn.com/posts/Charles/C-40-Meet-the-Design-Team/"&gt;this video&lt;/a&gt;, about the future of C#, and specifically about its next version. If nothing is said clearly and loudly, as they&amp;#8217;re most probably waiting for the &lt;span class="caps"&gt;PDC&lt;/span&gt;, you can still get a glimpse of what C# 4 and .net 4 will get as new features.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m mostly interested in one aspect of those new features. It&amp;#8217;s the possible integration of the &lt;a href="http://en.wikipedia.org/wiki/Dynamic_Language_Runtime"&gt;&lt;span class="caps"&gt;DLR&lt;/span&gt;&lt;/a&gt; inside the framework, and in the C# language.&lt;/p&gt;


	&lt;p&gt;The &lt;span class="caps"&gt;DLR&lt;/span&gt;, as we used to have it in &lt;a href="http://www.codeplex.com/IronPython"&gt;IronPython&lt;/a&gt;, has been split into two separate assemblies, Microsoft.Scripting, and Microsoft.Scripting.Core a few months ago.&lt;/p&gt;


	&lt;p&gt;Microsoft.Scripting.Core is probably the part that will make it into the framework. It&amp;#8217;s the part that contains a generalist &lt;a href="http://en.wikipedia.org/wiki/Abstract_syntax_tree"&gt;&lt;span class="caps"&gt;AST&lt;/span&gt;&lt;/a&gt;, a compiler for this &lt;span class="caps"&gt;AST&lt;/span&gt;, using both &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.dynamicmethod.aspx"&gt;&lt;span class="caps"&gt;LCG&lt;/span&gt;&lt;/a&gt; and traditional &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.emit.aspx"&gt;&lt;span class="caps"&gt;SRE&lt;/span&gt;&lt;/a&gt; for the debug scenarios. It also comes with a fast dynamic call site implementation, and an hosting &lt;span class="caps"&gt;API&lt;/span&gt;. So are we going to have a new System.Scripting assembly?&lt;/p&gt;


	&lt;p&gt;An interesting change in the &lt;span class="caps"&gt;DLR&lt;/span&gt;, is the naming of the &lt;span class="caps"&gt;AST&lt;/span&gt; factory and nodes. I&amp;#8217;ve spent the last months working on &lt;a href="http://msdn.microsoft.com/en-us/vbasic/aa904594.aspx"&gt;&lt;span class="caps"&gt;LINQ&lt;/span&gt;&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/en-us/library/bb345362.aspx"&gt;&lt;span class="caps"&gt;LINQ&lt;/span&gt; compiler&lt;/a&gt; in &lt;a href="http://mono-project.com"&gt;Mono&lt;/a&gt;, and comparing the &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression &lt;span class="caps"&gt;AST&lt;/span&gt; with the &lt;span class="caps"&gt;DLR AST&lt;/span&gt; is an interesting thing to do.&lt;/p&gt;


	&lt;p&gt;The &lt;span class="caps"&gt;DLR AST&lt;/span&gt; is now basically the &lt;span class="caps"&gt;LINQ&lt;/span&gt; expression &lt;span class="caps"&gt;AST&lt;/span&gt;, with statements added. And it looks like the current &lt;span class="caps"&gt;DLR AST&lt;/span&gt; has been tinkered around what has been already shipped inside .net 3.5 in the namespace System.Linq.Expressions.&lt;/p&gt;


	&lt;p&gt;Here&amp;#8217;s a small example. In System.Linq.Expressions, pretty much all node from the &lt;span class="caps"&gt;AST&lt;/span&gt; extends the type Expression. Each Expression has a NodeType property, of type ExpressionType.&lt;/p&gt;


	&lt;p&gt;And you can find the same thing now in the &lt;span class="caps"&gt;DLR&lt;/span&gt;, but with some stuff added.&lt;/p&gt;


&lt;pre&gt;
public enum ExpressionType {
    // some traditional expressions

    Add,
    AddChecked,

    // ...
    Call,

    // ...

    IfStatement,
    SwitchStatement,   

    // ...
}
&lt;/pre&gt;

	&lt;p&gt;So for the &lt;span class="caps"&gt;DLR&lt;/span&gt;, a statement is an expression. It makes kind of sense for a dynamic language you&amp;#8217;ll tell me, but it looks a bit weird to be implemented this way.&lt;/p&gt;


	&lt;p&gt;Anyway, C# 3 already has a way to create expression trees to support some basic meta programming features, I guess we can only wonder if C# 4 will extend the meta programming features to support not only expressions but also statements, using the &lt;span class="caps"&gt;DLR&lt;/span&gt; tree.&lt;/p&gt;


	&lt;p&gt;I have no idea how they&amp;#8217;ll deal with the fact that the existing stuff is in System.Linq.Expressions. Are they going to obsolete the whole namespace, and redirect everything to a possible System.Scripting.Ast (sounds less likely)? Are they moving the &lt;span class="caps"&gt;DLR AST&lt;/span&gt; to System.Linq.Expressions (sounds more likely)? Who knows? Not me (I&amp;#8217;ve never lost control).&lt;/p&gt;


	&lt;p&gt;Interesting speculations anyway :)&lt;/p&gt;


	&lt;p&gt;So for now, the only change I can foresee for C# 4, is that you&amp;#8217;ll be able to get full code blocks instead of only expressions when asking for an Expression of T.&lt;/p&gt;


	&lt;p&gt;But here&amp;#8217;s another interesting one we can have a &lt;a href="http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx"&gt;glimpse here&lt;/a&gt;, is duck typing support based the &lt;span class="caps"&gt;DLR&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;At the language level, it&amp;#8217;s difficult to say if they&amp;#8217;re going to rely&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;on a dynamic code block, like the example shows in this blog entry,&lt;/li&gt;
		&lt;li&gt;on a custom marker type,&lt;/li&gt;
		&lt;li&gt;on another syntax for message passing to dynamic objects,&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;All in all, it looks like C# 4 will have some nifty stuff, let&amp;#8217;s wait for the &lt;span class="caps"&gt;PDC&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 29 Jul 2008 17:07:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:95b74d8a-e628-404f-ba90-c2512a942b62</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/07/29/net-4-c-4-and-the-dlr</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/492</trackback:ping>
    </item>
    <item>
      <title>Sharpen, an Open Source Java to C# converter</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/2435496909/" title="Dandelion by Jb Evain, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3207/2435496909_2218937b8c.jpg" width="500" height="333" alt="Dandelion" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Today folks at &lt;a href="http://developer.db4o.com/"&gt;db4o&lt;/a&gt; released &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Sharpen"&gt;Sharpen&lt;/a&gt;, an open source Java to C# converter.&lt;/p&gt;


	&lt;p&gt;Am happy to see this coming, as it is soming I&amp;#8217;ve pushed strongly for when I was working at &lt;a href="http://www.db4o.com"&gt;db4objects&lt;/a&gt;, and was hacking on it, mentored by its main developer, &lt;a href="http://blogs.codehaus.org/people/bamboo/"&gt;Rodrigo&lt;/a&gt;. There I had the chance to &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2006/11/15/new-conventions-for-db4o-on-net.aspx"&gt;improve&lt;/a&gt; the &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2007/04/23/adding-love-to-the-c-sources.aspx"&gt;generated code&lt;/a&gt;, to make it look like hand written code, that follows .net conventions.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s nothing magic, and requires compromises on both the Java and the generated C#, but it&amp;#8217;s pretty handy, easily hackable, and all in all, damn useful.&lt;/p&gt;


	&lt;p&gt;Rodrigo wrote a &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/05/20/smart-java-to-c-conversion-for-the-masses-with-sharpen.aspx"&gt;nice tutorial&lt;/a&gt; on Sharpen.&lt;/p&gt;


	&lt;p&gt;Time to port your Java applications to the amazing &lt;a href="http://mono-project.com."&gt;Mono&lt;/a&gt;!&lt;/p&gt;</description>
      <pubDate>Tue, 20 May 2008 21:18:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:ca0abb3a-760e-4620-bb79-1e2e0a66a971</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/05/20/sharpen-an-open-source-java-to-c-converter</link>
      <category>Mono</category>
      <category>db4o</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/487</trackback:ping>
    </item>
    <item>
      <title>Mono and the Summer of Code</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/429556027/" title="Macro test by Jb Evain, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/177/429556027_39225d7b1c.jpg" width="500" height="333" alt="Macro test" style="border: 2px solid black" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;For the fourth time, &lt;a href="http://www.mono-project.com/"&gt;Mono&lt;/a&gt; has been accepted as a mentoring organization for &lt;a href="http://code.google.com/soc/2008"&gt;Google&amp;#8217;s Summer of Code&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;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 &lt;a href="http://mono-project.com/Summer2005"&gt;2005 summer&lt;/a&gt;. And I was even luckier to be &lt;a href="http://mono-project.com/Summer2006#A_CIL_Linker"&gt;accepted again the year after&lt;/a&gt;. This year, just like the year before, I&amp;#8217;m a possible mentor.&lt;/p&gt;


	&lt;p&gt;The Summer of Code is an amazing opportunity for young developers to be involved in a &lt;span class="caps"&gt;FOSS&lt;/span&gt; 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.&lt;/p&gt;


	&lt;p&gt;Oh, and for what it&amp;#8217;s worth, five students (including me) from the previous SoC editions are now employed by &lt;a href="http://www.novell.com"&gt;Novell&lt;/a&gt; to work on &lt;a href="http://www.mono-project.com/"&gt;Mono&lt;/a&gt; or &lt;a href="http://www.mono-project.com/"&gt;Moonlight&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;So yeah, if I had an advice, that would be to go have a look at &lt;a href="http://mono-project.com/StudentProjects"&gt;the proposed tasks&lt;/a&gt;, you can even submit your own original proposal if you think you have a bright idea, and apply for it. You have three days.&lt;/p&gt;</description>
      <pubDate>Fri, 28 Mar 2008 22:29:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:39a7929f-02e6-475c-80d7-b8e5cdea18ee</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/03/28/mono-and-the-summer-of-code</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/481</trackback:ping>
    </item>
    <item>
      <title>Mono.Cecil vs System.Reflection</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/2311630873/" title="Mouvement by Jb Evain, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3126/2311630873_c3c40b732e.jpg" style="border : 2px solid black" width="500" height="333" alt="Mouvement" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;My friend &lt;a href="http://codebetter.com/blogs/patricksmacchia/"&gt;Patrick&lt;/a&gt;, who&amp;#8217;s leading the amazing &lt;a href="http://www.ndepend.com/"&gt;NDepend&lt;/a&gt; effort wrote &lt;a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/03/18/mono-cecil-vs-system-reflection.aspx"&gt;a great post&lt;/a&gt; comparing &lt;a href="http://mono-project.com/Cecil"&gt;Cecil&lt;/a&gt; against the built-in &lt;a href="http://msdn2.microsoft.com/en-us/library/system.reflection.aspx"&gt;System.Reflection&lt;/a&gt;:&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/03/18/mono-cecil-vs-system-reflection.aspx"&gt;Mono.Cecil vs System.Reflection&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Thanks Patrick for the kind words!&lt;/p&gt;</description>
      <pubDate>Tue, 18 Mar 2008 11:25:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:adeb1a23-118a-4db2-ae95-557678785137</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/03/18/mono-cecil-vs-system-reflection</link>
      <category>Cecil</category>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/478</trackback:ping>
    </item>
    <item>
      <title>Yet another Hello World</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/jbevain/2194123480/" title="Statue by Jb Evain, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2028/2194123480_a018c84bbd.jpg" width="500" height="333" alt="Statue" /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;pre&gt;
using System;
using System.Linq.Expressions;

class HelloWorldOfTrees {

    static void Main ()
    {
        var param = Expression.Parameter (typeof (string), "p");

        var cwl = Expression.Lambda&amp;lt;Action&amp;lt;string&amp;gt;&amp;gt; (
            Expression.Call (
                typeof (Console).GetMethod (
                    "WriteLine", new [] { typeof (string) }),
                param), param).Compile ();

        cwl ("Hello World !");
    }
}
&lt;/pre&gt;

&lt;pre&gt;
[mono] /tmp @ gmcs test.cs 
[mono] /tmp @ mono test.exe 
Hello World !
&lt;/pre&gt;

	&lt;p&gt;Well heh, you can&amp;#8217;t do really much more than that, but at least, that is working (sort of).&lt;/p&gt;</description>
      <pubDate>Wed, 30 Jan 2008 21:51:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:725eb56a-53ad-4516-810b-5cffeaf93e47</guid>
      <author>Jb Evain</author>
      <link>http://evain.net/blog/articles/2008/01/30/yet-another-hello-world</link>
      <category>Mono</category>
      <trackback:ping>http://evain.net/blog/articles/trackback/470</trackback:ping>
    </item>
  </channel>
</rss>
